@clickview/exchange 0.43.0 → 0.43.1-dev.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 (284) hide show
  1. package/dist/Actions-BtMRNMuv.cjs +1 -0
  2. package/dist/Actions-DfeKDy3k.js +178 -0
  3. package/dist/AddToLibraryView-BoCLtcWV.js +508 -0
  4. package/dist/AddToLibraryView-MpkcVgoR.cjs +1 -0
  5. package/dist/Badge-3MW5GacP.cjs +1 -0
  6. package/dist/Badge-Ddz0Il5v.js +326 -0
  7. package/dist/BadgeListContainer-CqwUuWKL.js +19 -0
  8. package/dist/BadgeListContainer-DLrBuDpU.cjs +1 -0
  9. package/dist/ButtonGroup-C-z2yWvb.cjs +1 -0
  10. package/dist/ButtonGroup-zaxEq7ZK.js +24 -0
  11. package/dist/Caret-Cpx0uvJ0.js +36 -0
  12. package/dist/Caret-Dgjy7YHO.cjs +1 -0
  13. package/dist/ChevronDownSvg-BI6xUNrZ.cjs +1 -0
  14. package/dist/ChevronDownSvg-BfijmId7.js +13 -0
  15. package/dist/ClassNameHelper-aJ0BDnVo.js +29 -0
  16. package/dist/ClassNameHelper-n4BHW-GR.cjs +1 -0
  17. package/dist/CloseSvg-2PKjla1T.js +13 -0
  18. package/dist/CloseSvg-B7rizkGp.cjs +1 -0
  19. package/dist/CurationStatus-BGjsO3l8.cjs +1 -0
  20. package/dist/CurationStatus-DZn3C9Qe.js +4 -0
  21. package/dist/DevErrorView-Bg1Ufy6-.js +79 -0
  22. package/dist/DevErrorView-CpXfV0V4.cjs +1 -0
  23. package/dist/DialogView-B5FEh3e8.cjs +1 -0
  24. package/dist/DialogView-RcNOylD7.js +22 -0
  25. package/dist/DownloadHelper-ChKHN-Le.cjs +1 -0
  26. package/dist/DownloadHelper-dL46n0Kq.js +32 -0
  27. package/dist/DownloadVideoView-CvDFi8HI.cjs +1 -0
  28. package/dist/DownloadVideoView-HSnwAYLp.js +32 -0
  29. package/dist/DragDropMoveWrapper-B_dy7ady.cjs +1 -0
  30. package/dist/DragDropMoveWrapper-TdzJqiqv.js +462 -0
  31. package/dist/ExchangeAddView-BRLjRe3p.js +63 -0
  32. package/dist/ExchangeAddView-CWfp5W52.cjs +1 -0
  33. package/dist/ExchangeFolderView-4ArEcQvn.js +159 -0
  34. package/dist/ExchangeFolderView-_ldS0uwf.cjs +1 -0
  35. package/dist/ExchangeMostRecentView-BMAosIXz.js +61 -0
  36. package/dist/ExchangeMostRecentView-s1iLfclz.cjs +1 -0
  37. package/dist/ExchangeNotFoundView-C_dtuc6J.cjs +1 -0
  38. package/dist/ExchangeNotFoundView-Cb-rmQH1.js +7 -0
  39. package/dist/ExchangePreviewView-hztBChIE.js +82 -0
  40. package/dist/ExchangePreviewView-kjDv-uqf.cjs +1 -0
  41. package/dist/ExchangeRequests-B3wRfv5Y.cjs +1 -0
  42. package/dist/ExchangeRequests-DV7BD3HZ.js +115 -0
  43. package/dist/ExchangeSearchBar-CNtU_swT.js +32 -0
  44. package/dist/ExchangeSearchBar-Ci1_Sc2S.cjs +1 -0
  45. package/dist/ExchangeSearchResultsView-CEueb9Li.js +1641 -0
  46. package/dist/ExchangeSearchResultsView-CGSIyjiV.cjs +2 -0
  47. package/dist/ExchangeSeriesView-BGBgwgMW.cjs +1 -0
  48. package/dist/ExchangeSeriesView-DMr_mCAH.js +143 -0
  49. package/dist/ExchangeSuggestEditView-B3P-nGFE.js +307 -0
  50. package/dist/ExchangeSuggestEditView-D1m5Z20N.cjs +1 -0
  51. package/dist/ExchangeTabs-CrA22PjN.js +46 -0
  52. package/dist/ExchangeTabs-KgrROs1d.cjs +1 -0
  53. package/dist/ExchangeUtils-BRDE3b9w.cjs +1 -0
  54. package/dist/ExchangeUtils-CCCrn5oQ.js +65 -0
  55. package/dist/ExchangeView-Cui4zZ4D.js +30 -0
  56. package/dist/ExchangeView-Dql8pHzi.cjs +1 -0
  57. package/dist/FormButtons-CDOsf9A-.cjs +1 -0
  58. package/dist/FormButtons-fQkvwYsy.js +20 -0
  59. package/dist/FormFeedback-5Dd3bMCl.js +7 -0
  60. package/dist/FormFeedback-BU7vSBqB.cjs +1 -0
  61. package/dist/FormField-Cb2l2GMO.cjs +5 -0
  62. package/dist/FormField-DYeERWxm.js +3353 -0
  63. package/dist/GiveFeedbackView-0tH6h1s3.js +5436 -0
  64. package/dist/GiveFeedbackView-DirGDc2a.cjs +7 -0
  65. package/dist/GroupSvg-BmwXO6yT.js +53 -0
  66. package/dist/GroupSvg-DVAq4iNX.cjs +1 -0
  67. package/dist/HardCoded-25AFj2sZ.js +51 -0
  68. package/dist/HardCoded-BbbeCQNt.cjs +1 -0
  69. package/dist/HttpErrorHandlers-CBhvfsvb.cjs +1 -0
  70. package/dist/HttpErrorHandlers-DKqNIMOg.js +76 -0
  71. package/dist/IconCircle-BVHFUBGt.cjs +1 -0
  72. package/dist/IconCircle-CxFLsbLY.js +26 -0
  73. package/dist/InstanceRegion-C7aJEkFV.cjs +1 -0
  74. package/dist/InstanceRegion-DQlzs4EK.js +4 -0
  75. package/dist/LazyImage-DBQklqeJ.js +163 -0
  76. package/dist/LazyImage-lv36coda.cjs +1 -0
  77. package/dist/LibraryRequests-BHAZPSUw.js +186 -0
  78. package/dist/LibraryRequests-DKCsJHbr.cjs +1 -0
  79. package/dist/LinkifyHelper-DPHYATPc.js +925 -0
  80. package/dist/LinkifyHelper-EOfbsqdi.cjs +4 -0
  81. package/dist/MasterTypeHelper-Y_SDsEUF.cjs +1 -0
  82. package/dist/MasterTypeHelper-uSKy6GZd.js +16 -0
  83. package/dist/MediaQueries-9caJ2eG6.js +4 -0
  84. package/dist/MediaQueries-CE9Kbs0e.cjs +1 -0
  85. package/dist/PartialLoadingHelper-D42uOdDd.cjs +1 -0
  86. package/dist/PartialLoadingHelper-DIas6hnM.js +29 -0
  87. package/dist/PermissionFilterOption-B-QrMVdA.js +4 -0
  88. package/dist/PermissionFilterOption-BIA__Q_O.cjs +1 -0
  89. package/dist/PillTabSelector-B5V2rqf0.js +64 -0
  90. package/dist/PillTabSelector-yR52s5ix.cjs +14 -0
  91. package/dist/PreviewVideoDetails-BQ0lYYbK.cjs +362 -0
  92. package/dist/PreviewVideoDetails-DJXB4vV3.js +68337 -0
  93. package/dist/ProgramType-DHk-SlRZ.cjs +1 -0
  94. package/dist/ProgramType-FpE5cuZV.js +60 -0
  95. package/dist/RatingRequests-BNPZAxXm.cjs +1 -0
  96. package/dist/RatingRequests-Dr3w3-z8.js +11 -0
  97. package/dist/RedirectView-BK8yU-PU.js +22 -0
  98. package/dist/RedirectView-OEJhJrvf.cjs +1 -0
  99. package/dist/RestrictionHelper-BSceJYz-.js +112 -0
  100. package/dist/RestrictionHelper-C5u_CmoL.cjs +1 -0
  101. package/dist/ScrollHelper-Dg7bDIH7.js +10 -0
  102. package/dist/ScrollHelper-ESsjtyv8.cjs +1 -0
  103. package/dist/SearchFilters-C_yEnumc.js +3046 -0
  104. package/dist/SearchFilters-D3fLjseM.cjs +1 -0
  105. package/dist/SearchSvg-BB6oXs1v.js +13 -0
  106. package/dist/SearchSvg-BU6G1Fs0.cjs +1 -0
  107. package/dist/SharedSearchHelper-BuVD-GvT.js +159 -0
  108. package/dist/SharedSearchHelper-D5GJJwW7.cjs +1 -0
  109. package/dist/TagItem-BBc3HmnI.cjs +1 -0
  110. package/dist/TagItem-BFnSikAz.js +1125 -0
  111. package/dist/TvAdFreeBadge-BDFn2ujd.js +11 -0
  112. package/dist/TvAdFreeBadge-X2iSf6B3.cjs +1 -0
  113. package/dist/TvAdFreeRequestView-CEAvozfO.js +46 -0
  114. package/dist/TvAdFreeRequestView-DgnMCKX4.cjs +1 -0
  115. package/dist/TvAddView-Bv12wfX7.js +276 -0
  116. package/dist/TvAddView-CA7Yappn.cjs +1 -0
  117. package/dist/TvAlreadyAddedView-C240rLQ7.js +56 -0
  118. package/dist/TvAlreadyAddedView-X4KElzJA.cjs +1 -0
  119. package/dist/TvBroadcastContentView-DizJHvTQ.js +52 -0
  120. package/dist/TvBroadcastContentView-g8i0Cy-k.cjs +1 -0
  121. package/dist/TvChannelBadge-B4a1wkQI.cjs +1 -0
  122. package/dist/TvChannelBadge-Doqs12s9.js +11 -0
  123. package/dist/TvChannelView-CSn0VleL.js +177 -0
  124. package/dist/TvChannelView-Ds_F3Mmp.cjs +1 -0
  125. package/dist/TvChannelsView-CM_T5E3j.js +171 -0
  126. package/dist/TvChannelsView-r3NO_BRv.cjs +1 -0
  127. package/dist/TvGuideView-B8vS-8lS.cjs +1 -0
  128. package/dist/TvGuideView-BLlQJiZ3.js +54 -0
  129. package/dist/TvHomeView-C_h4DZw_.cjs +1 -0
  130. package/dist/TvHomeView-CbNg8AyI.js +15 -0
  131. package/dist/TvPreviewView-DhXD3H__.js +114 -0
  132. package/dist/TvPreviewView-hGq7_Bzs.cjs +1 -0
  133. package/dist/TvProgramTimeBadge-BtQKNLz2.js +18 -0
  134. package/dist/TvProgramTimeBadge-DPJu73xG.cjs +1 -0
  135. package/dist/TvProgramsView-Ba9VPnEh.cjs +1 -0
  136. package/dist/TvProgramsView-DO4WnPJx.js +223 -0
  137. package/dist/TvRadioDownloadView-ByABG_YW.js +41 -0
  138. package/dist/TvRadioDownloadView-CitV60kZ.cjs +1 -0
  139. package/dist/TvRequestProgramView-CYc5nAEt.cjs +1 -0
  140. package/dist/TvRequestProgramView-Dm5Bra4d.js +267 -0
  141. package/dist/TvRequests-Bcy68aT5.js +227 -0
  142. package/dist/TvRequests-l_Xv-rcr.cjs +1 -0
  143. package/dist/TvSearchBar-5J6420z2.cjs +1 -0
  144. package/dist/TvSearchBar-KZqcg7G0.js +95 -0
  145. package/dist/TvSearchResultsView-BTONTtMg.cjs +1 -0
  146. package/dist/TvSearchResultsView-CMsq8ehS.js +212 -0
  147. package/dist/TvTabs-CrQVKuod.js +88 -0
  148. package/dist/TvTabs-JuCI2Ea7.cjs +1 -0
  149. package/dist/TypeHelper-Dt2Y9Wc4.js +14 -0
  150. package/dist/TypeHelper-Z2rqPzup.cjs +1 -0
  151. package/dist/UseAlerts-B2BbQeN3.js +39 -0
  152. package/dist/UseAlerts-pIg83NsO.cjs +1 -0
  153. package/dist/UseFetchAll-BaDVJFdj.cjs +1 -0
  154. package/dist/UseFetchAll-DYGA8s5a.js +147 -0
  155. package/dist/UseGetMediaQueryString-BLeJTZt2.cjs +1 -0
  156. package/dist/UseGetMediaQueryString-Dc_jP0rr.js +226 -0
  157. package/dist/UseHandleDialogError-BJHsOnKn.js +9 -0
  158. package/dist/UseHandleDialogError-PbyWsVaT.cjs +1 -0
  159. package/dist/UseHandleObjectError-CBFN1Ill.cjs +1 -0
  160. package/dist/UseHandleObjectError-DAhDbPEo.js +16 -0
  161. package/dist/UseHover-CLOLtbUV.cjs +1 -0
  162. package/dist/UseHover-Cc_d5rRf.js +85 -0
  163. package/dist/UseSelectAllPages-04737Rdu.cjs +1 -0
  164. package/dist/UseSelectAllPages-Cnk3MEAt.js +149 -0
  165. package/dist/VideoHelper-3AKe5Jyy.js +477 -0
  166. package/dist/VideoHelper-BQ7rWUw0.cjs +1 -0
  167. package/dist/VideoList-SNG1hmoL.cjs +49 -0
  168. package/dist/VideoList-s7lvSqSs.js +2622 -0
  169. package/dist/VideoRequests-CpDXl7E_.cjs +1 -0
  170. package/dist/VideoRequests-DlUeYLjl.js +225 -0
  171. package/dist/VideoSortSelect-3JfrvPfj.cjs +1 -0
  172. package/dist/VideoSortSelect-DS9Uvc-S.js +116 -0
  173. package/dist/VisibleOnSvg-BisjF586.cjs +1 -0
  174. package/dist/VisibleOnSvg-WDCQPPvV.js +33 -0
  175. package/dist/app-2U039aX_.js +67680 -0
  176. package/dist/app-DcIbciDa.cjs +454 -0
  177. package/dist/app.js +1 -0
  178. package/dist/en.json +1 -0
  179. package/dist/exchange.css +1 -0
  180. package/dist/getRegionInfo-B_h_jjAy.js +31 -0
  181. package/dist/getRegionInfo-Bs5JKG7h.cjs +1 -0
  182. package/dist/index-CGkY5YVS.cjs +1 -0
  183. package/dist/index-DUgR-v-j.js +885 -0
  184. package/dist/toLocalTime-Bt8Uy4Kq.js +15 -0
  185. package/dist/toLocalTime-DF9SIfIt.cjs +1 -0
  186. package/dist/useBreakpoints-37V489ap.js +66 -0
  187. package/dist/useBreakpoints-B-bcgx-L.cjs +1 -0
  188. package/dist/useGetExchangeActions-BwXrBSH-.cjs +1 -0
  189. package/dist/useGetExchangeActions-C8Y1FNSl.js +176 -0
  190. package/dist/useGetTvActions-CmEBdHbw.cjs +1 -0
  191. package/dist/useGetTvActions-DENrO3wZ.js +54 -0
  192. package/dist/useHandleRegionError-BNRrs6y8.cjs +1 -0
  193. package/dist/useHandleRegionError-BNxhNPKP.js +10 -0
  194. package/dist/usePreviewContext--ihfEi4P.js +14 -0
  195. package/dist/usePreviewContext-DjpFhe3I.cjs +1 -0
  196. package/dist/useSelectedRegion-7_2s4QQF.js +16 -0
  197. package/dist/useSelectedRegion-D3Xsu2Ut.cjs +1 -0
  198. package/dist/useVerifiedEmailRequiredErrorHandler-CSkvs-EW.cjs +1 -0
  199. package/dist/useVerifiedEmailRequiredErrorHandler-DFLs3cQc.js +57 -0
  200. package/package.json +12 -3
  201. package/typings/utils/imports.d.ts +1 -1
  202. package/vite-i18n-plugin.ts +113 -0
  203. package/vite.config.ts +59 -0
  204. package/dist/bundles.json +0 -4
  205. package/dist/css/137-exchange-8c1b8716b3.chunk.css +0 -25
  206. package/dist/css/212-exchange-d71527fc65.chunk.css +0 -1
  207. package/dist/css/226-exchange-9ab9f14b3c.chunk.css +0 -57
  208. package/dist/css/291-exchange-be9d9f0cdb.chunk.css +0 -11
  209. package/dist/css/298-exchange-78ece5c7c5.chunk.css +0 -37
  210. package/dist/css/332-exchange-e4754ae27a.chunk.css +0 -1
  211. package/dist/css/489-exchange-6ecb1e7adc.chunk.css +0 -85
  212. package/dist/css/494-exchange-02d7a0249c.chunk.css +0 -2
  213. package/dist/css/522-exchange-1387f35e92.chunk.css +0 -14
  214. package/dist/css/538-exchange-4cbfe56ba3.chunk.css +0 -1
  215. package/dist/css/589-exchange-fa098d9131.chunk.css +0 -11
  216. package/dist/css/611-exchange-cbf2bb5621.chunk.css +0 -5
  217. package/dist/css/669-exchange-e80e6c6649.chunk.css +0 -10
  218. package/dist/css/68-exchange-b5eaf8af44.chunk.css +0 -35
  219. package/dist/css/75-exchange-6d2304419c.chunk.css +0 -5
  220. package/dist/css/759-exchange-23bb5dd175.chunk.css +0 -8
  221. package/dist/css/858-exchange-06944bdfa4.chunk.css +0 -1
  222. package/dist/css/904-exchange-0eab318199.chunk.css +0 -40
  223. package/dist/css/95-exchange-4cbfe56ba3.chunk.css +0 -1
  224. package/dist/css/lite-exchange-ed6bd260c5.css +0 -14
  225. package/dist/languages/en.json +0 -1
  226. package/dist/scripts/117-259130ac0e-exchange.chunk.js +0 -1
  227. package/dist/scripts/127-4a3c8f9725-exchange.chunk.js +0 -1
  228. package/dist/scripts/136-fd99ef4c9d-exchange.chunk.js +0 -2
  229. package/dist/scripts/136-fd99ef4c9d-exchange.chunk.js.LICENSE.txt +0 -1
  230. package/dist/scripts/137-51b4dab452-exchange.chunk.js +0 -1
  231. package/dist/scripts/156-847dae6ace-exchange.chunk.js +0 -1
  232. package/dist/scripts/170-9db7c3b12e-exchange.chunk.js +0 -1
  233. package/dist/scripts/173-3668db114a-exchange.chunk.js +0 -1
  234. package/dist/scripts/212-6ed71b2797-exchange.chunk.js +0 -1
  235. package/dist/scripts/226-889bef8e6c-exchange.chunk.js +0 -1
  236. package/dist/scripts/267-7daf64f8a1-exchange.chunk.js +0 -1
  237. package/dist/scripts/291-7e85a6e844-exchange.chunk.js +0 -1
  238. package/dist/scripts/298-ed8e8b8328-exchange.chunk.js +0 -1
  239. package/dist/scripts/312-69afcbbc39-exchange.chunk.js +0 -1
  240. package/dist/scripts/325-76baea117f-exchange.chunk.js +0 -1
  241. package/dist/scripts/332-08d48debc2-exchange.chunk.js +0 -1
  242. package/dist/scripts/414-567e121c75-exchange.chunk.js +0 -2
  243. package/dist/scripts/414-567e121c75-exchange.chunk.js.LICENSE.txt +0 -60
  244. package/dist/scripts/442-fcba36183d-exchange.chunk.js +0 -1
  245. package/dist/scripts/455-ceeb969c54-exchange.chunk.js +0 -1
  246. package/dist/scripts/484-08c82c5a88-exchange.chunk.js +0 -1
  247. package/dist/scripts/489-8554f0ce7a-exchange.chunk.js +0 -2
  248. package/dist/scripts/489-8554f0ce7a-exchange.chunk.js.LICENSE.txt +0 -1
  249. package/dist/scripts/494-abba46b945-exchange.chunk.js +0 -2
  250. package/dist/scripts/494-abba46b945-exchange.chunk.js.LICENSE.txt +0 -1
  251. package/dist/scripts/507-b6e119c8e2-exchange.chunk.js +0 -1
  252. package/dist/scripts/522-ce819dee18-exchange.chunk.js +0 -2
  253. package/dist/scripts/522-ce819dee18-exchange.chunk.js.LICENSE.txt +0 -1
  254. package/dist/scripts/536-b915864d5f-exchange.chunk.js +0 -1
  255. package/dist/scripts/538-ccc01a623f-exchange.chunk.js +0 -2
  256. package/dist/scripts/538-ccc01a623f-exchange.chunk.js.LICENSE.txt +0 -1
  257. package/dist/scripts/558-1bdbbc1f64-exchange.chunk.js +0 -1
  258. package/dist/scripts/589-17d73ab116-exchange.chunk.js +0 -1
  259. package/dist/scripts/601-a3c22b0a9f-exchange.chunk.js +0 -1
  260. package/dist/scripts/611-d8bd3e98dc-exchange.chunk.js +0 -1
  261. package/dist/scripts/619-1abac6cb1d-exchange.chunk.js +0 -1
  262. package/dist/scripts/648-485af12c37-exchange.chunk.js +0 -1
  263. package/dist/scripts/659-d08f206e1d-exchange.chunk.js +0 -1
  264. package/dist/scripts/669-a49a0838ff-exchange.chunk.js +0 -1
  265. package/dist/scripts/68-34b81dae8c-exchange.chunk.js +0 -1
  266. package/dist/scripts/725-9ddf1084b6-exchange.chunk.js +0 -1
  267. package/dist/scripts/726-868a877381-exchange.chunk.js +0 -1
  268. package/dist/scripts/75-9780e4300e-exchange.chunk.js +0 -1
  269. package/dist/scripts/759-f1a9db4868-exchange.chunk.js +0 -1
  270. package/dist/scripts/782-2c340d8404-exchange.chunk.js +0 -1
  271. package/dist/scripts/831-8808647fc7-exchange.chunk.js +0 -1
  272. package/dist/scripts/851-61f77ce4aa-exchange.chunk.js +0 -2
  273. package/dist/scripts/851-61f77ce4aa-exchange.chunk.js.LICENSE.txt +0 -1
  274. package/dist/scripts/858-70085ed3b1-exchange.chunk.js +0 -1
  275. package/dist/scripts/866-14ce8a3a4d-exchange.chunk.js +0 -1
  276. package/dist/scripts/87-d569a1463e-exchange.chunk.js +0 -1
  277. package/dist/scripts/877-5b357aeb63-exchange.chunk.js +0 -1
  278. package/dist/scripts/904-bd1dfd39e0-exchange.chunk.js +0 -1
  279. package/dist/scripts/925-f70ee1c7f9-exchange.chunk.js +0 -1
  280. package/dist/scripts/937-2e1f1f330e-exchange.chunk.js +0 -1
  281. package/dist/scripts/95-841a847f54-exchange.chunk.js +0 -2
  282. package/dist/scripts/95-841a847f54-exchange.chunk.js.LICENSE.txt +0 -1
  283. package/dist/scripts/bundle-15f20b2d26.min.js +0 -2
  284. package/dist/scripts/bundle-15f20b2d26.min.js.LICENSE.txt +0 -108
@@ -1,2 +0,0 @@
1
- /*! For license information please see 489-8554f0ce7a-exchange.chunk.js.LICENSE.txt */
2
- (self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[489],{66090:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{O:()=>i});var i={isNumber:function(e){return i.isType(e,"number")},isString:function(e){return i.isType(e,"string")},isType:function(e,t){return r(e)===t}}},87611:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(32735),i=n(1048),o=n(28825),a=n(40320),u=n(54610),l=n(67453);const c={image:"vdd4V",thumbnail:"Ez0E7",tallPoster:"H9bQA",cover:"Nudts",banner:"IOvDH",poster:"iiY56",pdf:"aDJiJ",link:"wDpui"};function s(e){var t=c.image,n="";return e.imageType===u.__.Thumbnails&&(n="thumbnail ".concat(c.thumbnail)),e.imageType===u.__.TallPosters&&(n=c.tallPoster),e.imageType===u.__.Covers&&(n=c.cover),e.imageType===u.__.Banners&&(n=c.banner),e.imageType===u.__.Posters&&(n=c.poster),e.imageType===u.__.Pdf&&(n=c.pdf),e.imageType===u.__.Link&&(n=c.link),n&&(t+=" ".concat(n)),e.className&&(t+=" ".concat(e.className)),t}function f(e){var t=e.data,n=e.imageOptions,u=e.appLink,c=e.preload,f=e.preventLoad,p=e.analyticsOptions,h=e.analyticsData,y=e.imageClassName,v=e.alt,d="";"string"==typeof t?d=t:i.t.isObject(t)&&(d=t.url);var m=d&&n?l.j.createUrl(d,n):d;return r.createElement("div",{className:s(e),style:e.imageStyle},r.createElement(o.F,{appLink:u,analyticsData:h,analyticsOptions:p,onClick:e.onClick,preventFocus:e.preventFocus,className:e.appLinkClassName},e.children,m&&r.createElement(a.w,{src:m,alt:v,forceLoad:c,preventLoad:f,extraClasses:y,errorFallbackImageSrc:e.errorFallbackImageSrc,errorFallbackImageClassName:e.errorFallbackImageClassName,onLoad:e.onLoad})))}},40320:(e,t,n)=>{"use strict";n.d(t,{w:()=>u});var r=n(32735),i=n(65294);const o="fVSzb";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u=r.memo(function(e){var t,n,u=e.forceLoad,l=e.extraClasses,c=void 0===l?"":l,s=e.errorFallbackImageSrc,f=e.preventLoad,p=void 0!==f&&f,h=e.errorFallbackImageClassName,y=e.src,v=e.alt,d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["forceLoad","extraClasses","errorFallbackImageSrc","preventLoad","errorFallbackImageClassName","src","alt"]),m=(0,i.Y)({rootMargin:"500px"}),b=m.ref,g=m.inView,w=(t=r.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),O=w[0],S=w[1];function k(){return O&&s?s:e.src}if(r.useEffect(function(){if((u||g)&&!p){var e=new Image;return e.onerror=function(){S(!0),s&&(e.src=s)},e.src=y,function(){return e.onerror=null}}},[g,p]),O&&!s)return r.createElement(r.Fragment,null);if(!b)return r.createElement("img",Object.assign({className:"".concat(o," ").concat(c," ").concat(O&&h||""),alt:v,src:k()},d));var P=Object.assign(Object.assign({alt:v},d),!g&&!u||p?{src:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}:{src:k()});return u||(P.ref=b),r.createElement("img",Object.assign({className:"".concat(o," ").concat(c," ").concat(O&&h||"")},P))})},7733:(e,t,n)=>{"use strict";n.d(t,{o:()=>r});var r=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},23455:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var r=n(32735),i=n(81886),o=n(20470);function a(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.useEffect(function(){t.length&&t.some(i.Q.Ry.isStatusCodeError)&&i.Q.Ry.throw(new o.x)},t)}},65294:(e,t,n)=>{"use strict";n.d(t,{Y:()=>o});var r=n(34152);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.prevent,a=n.rootMargin,u=n.triggerOnce,l=void 0===u||u,c=(e=(0,r.YD)({triggerOnce:l,rootMargin:a}),t=3,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=c[0],f=c[1],p=c[2];return!0!==o&&void 0!==window.IntersectionObserver||(f=!0,s=null),{ref:s,inView:f,initialized:!!p}}},79967:(e,t,n)=>{"use strict";n.d(t,{k:()=>o});var r=n(32735),i=n(49677);function o(){return r.useContext(i.X)}},74237:(e,t,n)=>{"use strict";n.d(t,{T:()=>c});var r=n(97395),i=n(49985),o=n(65858);function a(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof c?r:c,s=Object.create(a.prototype);return u(s,"_invoke",function(n,r,i){var o,a,u,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,a=0,u=e,p.n=n,l}};function h(n,r){for(a=n,u=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,a=0))}if(i||n>1)return l;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),a=s,u=y;(t=a<2?e:u)||!f;){o||(a?a<3?(a>1&&(p.n=-1),h(a,u)):p.n=u:p.v=u);try{if(c=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(f=p.n<0)?u:n.call(r,p))!==l)break}catch(t){o=e,a=1,u=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),s}var l={};function c(){}function s(){}function f(){}t=Object.getPrototypeOf;var p=[][r]?t(t([][r]())):(u(t={},r,function(){return this}),t),h=f.prototype=c.prototype=Object.create(p);function y(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,u(e,i,"GeneratorFunction")),e.prototype=Object.create(h),e}return s.prototype=f,u(h,"constructor",f),u(f,"constructor",s),s.displayName="GeneratorFunction",u(f,i,"GeneratorFunction"),u(h),u(h,i,"Generator"),u(h,r,function(){return this}),u(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:y}})()}function u(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}u=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){u(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},u(e,t,n,r)}var l=null,c={getVideoDownloadUrl:function(e,t){return r._.safeUrlConcat(r._.makeHttps(e),"/download?token=".concat(t))},downloadResource:function(e,t,n,r){var a,u=l;l||(u=l=document.createElement("iframe"),document.body.appendChild(u),u.style.display="none"),u.src=e.url,r||i.k.logUserAction(Object.assign({id:null==e?void 0:e.id,name:null==e?void 0:e.name,resourceType:null===(a=null==e?void 0:e.metadata)||void 0===a?void 0:a.resourceType},t),Object.assign({actionType:o.Vw.Download,entity:o.py.Resource,workflowPhase:o.eu.Complete},n))},downloadBlob:function(e,t){return n=this,r=void 0,i=void 0,o=a().m(function n(){var r,i,o,u,l;return a().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,fetch(e);case 1:if((r=n.v).ok){n.n=2;break}throw new Error("Error downloading file");case 2:return u=URL,n.n=3,r.blob();case 3:l=n.v,i=u.createObjectURL.call(u,l),(o=document.createElement("a")).href=i,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.setTimeout(function(){return URL.revokeObjectURL(i)},100);case 4:return n.a(2)}},n)}),new(i||(i=Promise))(function(e,t){function a(e){try{l(o.next(e))}catch(e){t(e)}}function u(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i(function(e){e(n)})).then(a,u)}l((o=o.apply(n,r||[])).next())});var n,r,i,o}}},7017:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(32735),i=n(83345);const o={adFreeBadge:"xUXHs",small:"rqFjv"};var a="tv.adFreeBadge";function u(e){return r.createElement("div",{className:"".concat(o.adFreeBadge," ").concat(e.small?o.small:""," ").concat(e.className||""," d-flex align-items-center rounded bg-red text-white fw-semibold px-1 font-size-sm")},r.createElement(i.x,{namespace:a,phrase:"adFree"}))}},69435:(e,t,n)=>{"use strict";n.d(t,{J:()=>o});var r=n(32735);const i={channelBadge:"Ud_W9",small:"A0WD4"};function o(e){return r.createElement("div",{className:"".concat(i.channelBadge," ").concat(e.small?i.small:""," ").concat(e.className||"")},r.createElement("img",{className:"h-100 align-baseline",src:e.logoUrl}))}},65972:(e,t,n)=>{"use strict";n.d(t,{B:()=>u});var r=n(32735),i=n(14965),o=n(55667);const a={programTimeBadge:"Avu4L",small:"a1Wkd",hover:"fbzDz"};function u(e){var t=e.program.timeZone||e.program.region.timeZone,n=(0,o.h)(e.program.startTime,t),u=(0,o.h)(e.program.stopTime,t);return r.createElement("div",{className:"".concat(a.programTimeBadge," ").concat(e.small?"".concat(a.small," align-items-end"):"align-items-center"," ").concat(e.hover?a.hover:""," ").concat(e.className||""," d-flex bg-white text-nowrap border border-dark rounded-pill px-2")},r.createElement("span",null,e.showDate&&"".concat(i.O.format(n,"D MMM")," @ "),i.O.format(n,"hh:mma"),e.showEndTime&&" - ".concat(i.O.format(u,"hh:mma"))))}},55667:(e,t,n)=>{"use strict";n.d(t,{h:()=>o});var r=n(14965),i={"AUS Eastern Standard Time":"Australia/Sydney","W. Australia Standard Time":"Australia/Perth","E. Australia Standard Time":"Australia/Brisbane","Cen. Australia Standard Time":"Australia/Adelaide","New Zealand Standard Time":"Pacific/Auckland","GMT Standard Time":"Europe/London"};function o(e,t){return r.O.getUtcTimeByTimezone(e,"YYYY-MM-DDTHH:mm:ss",i[t])}},1557:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var r=n(32735),i=n(11607),o=n(83914),a=n(35223);const u={overlay:"Ux3Um",close:"D1Gyv",preview:"IGttc"};function l(e){return r.createElement(r.Fragment,null,r.createElement("div",{className:"".concat(u.overlay," ").concat(u.preview," d-flex align-items-center justify-content-start")},r.createElement(o.x,{svgName:a.vn.VisibleOn,size:o.S.Large})),r.createElement(i.L,{className:"".concat(u.overlay," ").concat(u.close," d-flex align-items-center justify-content-center"),onClick:e.closePopup},r.createElement(o.x,{svgName:a.vn.Close,size:o.S.Large})))}},84034:(e,t,n)=>{"use strict";n.d(t,{d:()=>U});var r=n(32735),i=n(42648),o=n(78259),a=n(65858),u=n(18967),l=n(16831),c=n(17464),s=n(42029),f=n(83345),p=n(49439);const h={copyrightDisclaimer:"z8YoI",overlayContainer:"eJDbJ"};function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var v="shared.copyrightDisclaimer",d=150;function m(e){var t,n,i,o=(n=(0,p.L)({}),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(n,i)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],u=o[1];return r.createElement("div",{ref:a,className:e.className},r.createElement("p",{className:"".concat(h.copyrightDisclaimer," ").concat(null!==(t=e.phraseClassName)&&void 0!==t?t:"mb-1")},r.createElement(f.x,{namespace:v,phrase:"copyrightDisclaimer"})),r.createElement(s.Z,{target:a.current,show:u,placement:e.overflowPlacement&&function(){var e;return document.documentElement.clientHeight-(null===(e=a.current)||void 0===e?void 0:e.getBoundingClientRect().bottom)<d}()?e.overflowPlacement:e.placement},r.createElement("div",{className:"".concat(h.overlayContainer," mw-100 bg-white border rounded-3 p-2")},r.createElement("p",null,r.createElement(f.x,{namespace:v,phrase:"warning"})),r.createElement("p",{className:"fw-semibold mb-0"},r.createElement(f.x,{namespace:v,phrase:"sharing"})))))}var b=n(82302),g=n(1048),w=n(66090);function O(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function k(e){var t=e.page,n=e.totalPages,r=w.O.isNumber(t)&&t>0&&t<n&&t+1,i=w.O.isNumber(t)&&t>1&&t-1,o={};if(r&&r<=n&&(o.next=r.toString()),i&&(o.previous=i.toString()),!g.t.isEmpty(o))return o}var P={isEmpty:function(e){return e&&!(e.data&&e.data.length)},length:function(e){return e&&e.data&&e.data.length},at:function(e,t){if(e&&e.data&&e.data.length&&!(t>e.data.length))return e.data[t]},get:function(e,t){if(e&&e.data&&e.data.length)return e.data.find(function(e){return e.id&&e.id.toString()===t})},flattenCollections:function(e){if(e&&e.length){var t=[];return e.forEach(function(e){t=[].concat(O(t),O(e.data))}),t}},getNextCursor:function(e){return e.pagination&&e.pagination.cursors&&e.pagination.cursors.next},convertLegacyPaginatedCollection:function(e){if(e)return{data:e.data,pagination:{cursors:k(e.pagination),limit:e.pagination.pageSize}}},hasData:function(e){return!P.isEmpty(e)}},N=n(23481),j=n(16035),C=n(44829),T=n(2096);function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _(e){var t;switch(null===(t=e.tagType)||void 0===t?void 0:t.toLowerCase()){case C.Q.Pedagogy:return 0;case C.Q.Skill:return 1;default:return 2}}function R(e){if(!e.tags)return r.createElement(r.Fragment,null);var t,n=(t=e.tags,function(e){if(Array.isArray(e))return E(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort(function(e,t){return _(e)-_(t)});return r.createElement("div",{className:"".concat(T.Z.tagList," ").concat(e.className)},n.map(function(t){var n="function"==typeof e.getAppLink?e.getAppLink(t):null,i="function"==typeof e.onRemove?function(){return e.onRemove(t)}:null,o="function"==typeof e.onClick?function(){return e.onClick(t)}:null;return r.createElement(j.z,{key:t.id||t.name,tag:t,appLink:n,themeColours:e.themeColours,onRemove:i,onClick:o})}))}function x(e){var t=e.label,n=e.items;if(!(n&&n.data&&n.data.length))return r.createElement(r.Fragment,null);var i=n.data.map(function(e){return e.name}).join(", ");return r.createElement("div",{className:"mb-2"},t,": ",i)}var I="exchange.detailsSection",M=N.T.encloseNamespace(I);function B(e){var t,n,i,o,a,u,l,c,s,p,h=e.video,y=e.hasPPDD,v=e.description;return r.createElement("div",{className:v?"col-md-5 ps-md-3 pt-3 pt-md-0":"col-12"},r.createElement("h2",{className:"h6 mb-2"},r.createElement(f.x,{namespace:I,phrase:"details"})),y&&r.createElement("div",null,r.createElement(x,{label:M("productionCompanies",{smartCount:null===(n=null===(t=h.productionCompanies)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length}),items:h.productionCompanies}),r.createElement(x,{label:M("distributors",{smartCount:null===(o=null===(i=h.distributors)||void 0===i?void 0:i.data)||void 0===o?void 0:o.length}),items:h.distributors}),r.createElement(x,{label:M("producers",{smartCount:null===(u=null===(a=h.producers)||void 0===a?void 0:a.data)||void 0===u?void 0:u.length}),items:h.producers}),r.createElement(x,{label:M("directors",{smartCount:null===(c=null===(l=h.directors)||void 0===l?void 0:l.data)||void 0===c?void 0:c.length}),items:h.directors})),!!(null===(p=null===(s=h.tags)||void 0===s?void 0:s.data)||void 0===p?void 0:p.length)&&r.createElement(R,{tags:h.tags.data}))}var L=n(55215),D=n(7017),A=n(69435),F=n(65972);const z={previewBadge:"JA0mN",previewAlert:"qFT4M"};var Z="exchange.previewVideoDetails",V=200;function U(e){var t,n,s,p,h,y=e.title,v=e.description,d=e.video,g=e.videoActions,w=function(e){return!!e&&!P.isEmpty(e)},O=!!(null==d?void 0:d.series),S=!!(null===(t=null==d?void 0:d.rating)||void 0===t?void 0:t.value)||!!(null==d?void 0:d.productionYear)||e.program,k=w(null==d?void 0:d.productionCompanies)||w(null==d?void 0:d.producers)||w(null==d?void 0:d.distributors)||w(null==d?void 0:d.directors),N=!!v,j=k||!!(null===(s=null===(n=null==d?void 0:d.tags)||void 0===n?void 0:n.data)||void 0===s?void 0:s.length);return r.createElement("div",{className:"p-3"},r.createElement("div",{className:"".concat(O||S?"mb-3":"mb-2"," position-relative")},r.createElement("div",{className:"w-100"},r.createElement("div",{className:"ms-2 float-end"},r.createElement(u.e,{actions:g,actionsDropdownClassName:"btn btn-outline-dark px-1"})),!!d&&r.createElement(b.$,{type:"series",video:d,appLink:(0,L.cL)(d.series),className:"text-wrap",analyticsOptions:{location:a.LZ.PlayPage}}),r.createElement("h1",{className:"h4 mb-1 ".concat(O||S?"":"mb-0 pt-2")},r.createElement("span",{className:"align-self-center"},y))),S&&r.createElement(c.c,null,r.createElement(l.C,{type:l.g.Rating,data:null==d?void 0:d.rating,className:"".concat(z.previewBadge," fw-semibold py-0 font-size-normal align-items-center px-2")}),r.createElement(l.C,{type:l.g.ProductionYear,data:null==d?void 0:d.productionYear,className:"".concat(z.previewBadge," fw-semibold font-size-sm align-items-center px-1")}),(null===(p=e.program)||void 0===p?void 0:p.channelLogoUrl)&&r.createElement(A.J,{logoUrl:e.program.channelLogoUrl,className:"me-1"}),(null===(h=e.program)||void 0===h?void 0:h.hasAdsFree)&&r.createElement(D.Z,{className:"me-1"}),e.program&&r.createElement(F.B,{program:e.program,showDate:!0,showEndTime:!0}))),r.createElement("div",null,r.createElement(i.$B,{autoHeight:!0,autoHeightMax:V},r.createElement("div",{className:"row g-0"},N&&r.createElement("div",{className:j?"border-end pe-3 col-md-7":"col-12"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("h2",{className:"h6 mb-2"},r.createElement(f.x,{namespace:Z,phrase:"description"}))),r.createElement("p",{className:"mb-2",dangerouslySetInnerHTML:{__html:o.O.linkifyText(v,{nl2br:!0})}})),j&&r.createElement(B,{video:d,hasPPDD:k,description:v}))),e.video&&r.createElement("div",{className:"row"},r.createElement("div",{className:"".concat(k?"d-md-block col-7":""," d-none")}),r.createElement("div",{className:"".concat(k?"col-md-5 ps-md-3":"ps-2 "," ")},r.createElement(m,{placement:k?"bottom-end":"bottom-start",overflowPlacement:k?"top-end":"top-start"})))))}},87197:(e,t,n)=>{"use strict";n.d(t,{L:()=>IS});var r=n(32735),i=(n(39682),n(76032));function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function l(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function s(e,t,n){return t=y(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function p(e,t,n,r){var i=h(y(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},h.apply(null,arguments)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var m=function(e){function t(e,n){return a(this,t),s(this,t,[e,n])}return v(t,e),l(t,[{key:"handleClick",value:function(e){var n=this;p(t,"handleClick",this,3)([e]),this.requestAnimationFrame(function(){n.options_.item.showCollapsibleMenu()})}},{key:"createEl",value:function(e,n,r){if(!this.options_.item)return p(t,"createEl",this,3)([e,n,r]);var o=this.options_.item.getCollabsibleName(),a=this.options_.item.getCollabsibleValue(),u=this.options_.item.className,l='<span class="vjs-menu-item-text">'.concat(o,"</span>");this.valueHolder_=i.Z.dom.createEl("span",{innerHTML:a});var c=p(t,"createEl",this,3)([e,{className:"vjs-menu-item cv-cog-menu-item ".concat(a?"cv-has-cog-value":""," ").concat(u||"").trim(),innerHTML:l},r]);return c.appendChild(this.valueHolder_),c}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}])}(i.Z.getComponent("MenuItem")),b=function(e){function t(e,n){var r;return a(this,t),(r=s(this,t,[e,n])).controlText("Settings"),r}return v(t,e),l(t,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(p(t,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(p(t,"buildCSSClass",this,3)([]))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach(function(e){e.updateCollapsibleValue&&e.updateCollapsibleValue()}),p(t,"pressButton",this,3)([]))}},{key:"createItems",value:function(){for(var e,t=this,n=[],r=0;r<this.options_.items.length;r++){var i=this.options_.items[r];i.isCollabsible&&i.showInCollabsibleMenu()&&i.isCollapsed&&n.push(new m(this.player_,{item:i}))}return(null===(e=this.additionalItems)||void 0===e?void 0:e.length)&&this.additionalItems.forEach(function(e){var r,i=new e.ctor(t.player_,Object.assign(Object.assign({},t.options_),null!==(r=e.options)&&void 0!==r?r:{}));n.splice(e.index,0,i)}),n}},{key:"update",value:function(){p(t,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(e){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some(function(t){return t.name===e.name})||(this.additionalItems.push(e),this.update())}}])}(i.Z.getComponent("MenuButton"));function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,O(r.key),r)}}function O(e){var t=function(e){if("object"!=g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=P(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},k.apply(null,arguments)}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}i.Z.registerComponent("cogButton",b);var j=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=P(t),function(e,t){if(t&&("object"==g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,n||[],P(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return i.Z.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(e){var n,r,i,o=this;(n=t,r=this,"function"==typeof(i=k(P(1&3?n.prototype:n),"handleClick",r))?function(e){return i.apply(r,e)}:i)([e]),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame(function(){o.player_.getChild("collapserator").getChild("cogButton").pressButton()})}}],r&&w(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function T(){return T="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=B(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},T.apply(null,arguments)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,x(r.key),r)}}function R(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e){var t=function(e){if("object"!=C(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==C(t)?t:t+""}function I(e,t,n){return t=B(t),function(e,t){if(t&&("object"==C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,M()?Reflect.construct(t,n||[],B(e).constructor):t.apply(e,n))}function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(M=function(){return!!e})()}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}function L(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var A=i.Z.getComponent("MenuItem"),F=i.Z.getComponent("MenuButton"),z=["large","medium","small"],Z=function(e){function t(e,n){return E(this,t),I(this,t,[e,n])}return L(t,e),R(t,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}])}(A),V=function(e){function t(e,n){var r;return E(this,t),(r=I(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.player_.ready(function(){r.update()}),r}return L(t,e),R(t,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting(),r=[new j(this.player_,{label:"Caption Text Size",onClickBack:function(){e.requestAnimationFrame(function(){e.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()})}})];return z.map(function(t){r.push(new Z(e.player_,{label:t.charAt(0).toUpperCase()+t.substring(1),selectable:!0,multiSelectable:!1,selected:t===n,value:t}))}),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=T(B(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){F.prototype.handleClick.apply(this)}}])}(F);i.Z.registerComponent("SubtitleSizeButton",V);var U=n(28400);function G(e,t,n,r){if(!e.length)return[];for(var i=[],o=e.length-1;o>=0;o--){var a=e[o];if(a.kind===t){if(n&&a.label!==n)continue;if(r&&a.language!==r)continue;i.push(a)}}return i}function K(e,t,n,r,i){e.kind===t&&(n&&e.label!==n||i&&e.language!==i||(e.loaded_?r(e):e.one("loadeddata",function(){r(e)})))}function q(e){if(null==e?void 0:e.cues.length)for(var t=0;t<e.cues.length;t++){var n=e.cues[t];(null==n?void 0:n.text)&&(n.text=U.m.sanitize(n.text))}}function H(e,t,n,r,i){var o=e.textTracks(),a=G(o,t,n,i)[0];if(a)K(a,t,n,r);else{var u=function(e){K(e.track,t,n,r),o.removeEventListener("addtrack",u)};o.addEventListener("addtrack",u),e.one("dispose",function(){o.removeEventListener("addtrack",u)})}}function W(e,t,n,r,i){var o=e.textTracks(),a=G(o,t,n,i);a.length&&a.forEach(function(e){return K(e,t,n,r,i)});var u=function(e){K(e.track,t,n,r,i)};o.addEventListener("addtrack",u),e.one("dispose",function(){o.removeEventListener("addtrack",u)})}var Q={getTrack:function(e,t,n,r){return G(e.textTracks(),t,n,r)[0]},useChapters:function(e,t){H(e,"chapters",null,t)},useMetadataTrack:function(e,t,n){H(e,"metadata",t,n,null)},useMetadataTracks:function(e,t,n,r){W(e,"metadata",t,n,r)},useSubtitles:function(e,t,n){W(e,"subtitles",null,t,n)},getCurrentTextTrack:function(e){return this.findTrackByPredicate(e,function(e){return"showing"===e.mode})},findTrackByPredicate:function(e,t){if(!e)return null;for(var n=e.textTracks(),r=0;r<n.length;r++){var i=n[r];if(t(i))return i}return null},forEachTrack:function(e,t){if(e)for(var n=e.textTracks(),r=0;r<n.length;r++)t(n[r])},sanitizeTrack:function(e,t){if(e&&t)if(e.loaded)q(e);else{var n=function(){return q(e)};e.addEventListener("loadeddata",n),t.one("dispose",function(){e.removeEventListener("loadeddata",n)})}},activeTextTrack:function(e){"disabled"===e.mode&&"subtitles"===e.kind&&(e.mode="hidden")}},J=function(e,t,n){var r,i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];var c=!1,s=function(){r=null,s=null,e.apply(this,u)};return!r&&n&&(e.apply(i,u),c=!0),o.clearTimeout(r),r=o.setTimeout(s,t),c};return a.cancel=function(){o.clearTimeout(r),r=null},a};function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function X(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,te(r.key),r)}}function ee(e,t,n){return t&&$(e.prototype,t),n&&$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function te(e){var t=function(e){if("object"!=Y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Y(t)?t:t+""}function ne(e,t,n){return t=ae(t),function(e,t){if(t&&("object"==Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,re()?Reflect.construct(t,n||[],ae(e).constructor):t.apply(e,n))}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(re=function(){return!!e})()}function ie(e,t,n,r){var i=oe(ae(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function oe(){return oe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ae(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},oe.apply(null,arguments)}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function ue(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&le(e,t)}function le(e,t){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},le(e,t)}var ce=i.Z.getComponent("MenuItem"),se=function(e){function t(e,n){var r;return X(this,t),(r=ne(this,t,[e,n])).onChange=J(r.onChange,100,!1,r),r.bindEventListeners(),r}return ue(t,e),ee(t,[{key:"createEl",value:function(){var e=this.localize("Search");return ie(t,"createEl",this,3)(["li",{className:"vjs-menu-item cv-search-input-menu-item-container ".concat(this.options_.className||"").trim(),innerHTML:'\n <div class="cv-search-input-menu-item">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="'.concat(e,'" type="text" autocomplete="off" spellcheck="false" aria-label="').concat(e,'" />\n </div>\n ')}])}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("input");this.onChange=this.onChange.bind(this),t.addEventListener("keyup",this.onChange),t.addEventListener("blur",function(t){e.options_.menuButton.menu.handleBlur(t)})}},{key:"onChange",value:function(e){var t=e.target;this.options_.search(t.value)}}])}(ce);i.Z.registerComponent("SearchInputMenuItem",se);var fe=function(e){function t(){return X(this,t),ne(this,t,arguments)}return ue(t,e),ee(t,[{key:"createEl",value:function(e,n,r){return ie(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:"vjs-menu-item cv-no-results"}),r])}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}}])}(ce);function pe(e){return pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pe(e)}function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ye(r.key),r)}}function ye(e){var t=function(e){if("object"!=pe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pe(t)?t:t+""}function ve(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ve=function(){return!!e})()}function de(e){return de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},de(e)}function me(e,t){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},me(e,t)}i.Z.registerComponent("NoMatchingResultsMenuItem",fe);var be=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=de(t),function(e,t){if(t&&("object"==pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ve()?Reflect.construct(t,n||[],de(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&me(e,t)}(t,e),n=t,(r=[{key:"update",value:function(e,t){var n=this;if(null==e?void 0:e.length){var r=[],i=0;e.forEach(function(e){var o=n.options_.label.substr(i,e);o&&r.push(o),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(e,t)),r.push("</span>"),i=e+t}),r.push(this.options_.label.substring(i,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&he(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function ge(e){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(e)}function we(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Oe(r.key),r)}}function Oe(e){var t=function(e){if("object"!=ge(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ge(t)?t:t+""}function Se(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Se=function(){return!!e})()}function ke(e,t,n,r){var i=Pe(Ne(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Pe(){return Pe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ne(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Pe.apply(null,arguments)}function Ne(e){return Ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ne(e)}function je(e,t){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},je(e,t)}var Ce=i.Z.getComponent("MenuButton"),Te=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ne(t),function(e,t){if(t&&("object"==ge(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Se()?Reflect.construct(t,n||[],Ne(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(r),r.search=r.search.bind(r),r.player_.textTracks().addEventListener("selectedlanguagechange",r.update),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&je(e,t)}(t,e),n=t,(r=[{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.update),e.addEventListener("loadeddata",this.update),this.player_.one("dispose",function(){e.removeEventListener("loadeddata",t.update)})}},{key:"createItems",value:function(){var e,t=Q.getCurrentTextTrack(this.player_);if(t){if(null===(e=t.cues)||void 0===e?void 0:e.length){for(var n=[new se(this.player_,{menuButton:this,search:this.search})],r=0;r<t.cues.length;r++){var i=t.cues[r];n.push(new be(this.player_,{cue:i,label:i.text,selected:!1,multiSelectable:!1}))}var o=new fe(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return o.hide(),n.push(o),n}this.bindTrackEvents(t)}}},{key:"search",value:function(e){var t;e=e.trim();var n=Q.getCurrentTextTrack(this.player_);if(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length){var r=this.findMatches(e,n);this.toggleItemVisibility(e,r),this.toggleNoResults(e,r)}}},{key:"findMatches",value:function(e,t){var n={};if(!e)return n;for(var r=new RegExp(e,"gi"),i=0;i<t.cues.length;i++){for(var o=t.cues[i].text,a=[],u=void 0;u=r.exec(o);)a.push(u.index);a.length&&(n[i]=a)}return n}},{key:"toggleItemVisibility",value:function(e,t){this.menu.children_.slice(1,this.menu.children_.length-1).forEach(function(n,r){!e||t[r]?n.show():n.hide(),n.update(t[r],e.length)})}},{key:"toggleNoResults",value:function(e,t){var n=this.menu.children_[this.menu.children_.length-1];!e||Object.keys(t).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(ke(t,"buildWrapperCSSClass",this,3)([]))}},{key:"update",value:function(){ke(t,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){ke(t,"pressButton",this,3)([]);var e=this.menu.children_[0];(null==e?void 0:e.focus)&&(null==e||e.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Ce.prototype.handleClick.apply(this)}}])&&we(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ce);function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function _e(){return _e="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=De(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},_e.apply(null,arguments)}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Me(r.key),r)}}function Ie(e,t,n){return t&&xe(e.prototype,t),n&&xe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Me(e){var t=function(e){if("object"!=Ee(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ee(t)?t:t+""}function Be(e,t,n){return t=De(t),function(e,t){if(t&&("object"==Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Le()?Reflect.construct(t,n||[],De(e).constructor):t.apply(e,n))}function Le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Le=function(){return!!e})()}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}function Ae(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}function Fe(e,t){return Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fe(e,t)}i.Z.registerComponent("subtitleSearchButton",Te);var ze=i.Z.getComponent("MenuItem"),Ze=i.Z.getComponent("MenuButton"),Ve=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"},{label:"Toggle theatre mode",type:"theatre-mode"}],Ue=function(e){function t(e,n){return Re(this,t),Be(this,t,[e,n])}return Ae(t,e),Ie(t,[{key:"createEl",value:function(){return i.Z.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(e){switch(e){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">&uArr;</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">&dArr;</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>';case"theatre-mode":return'<span class="cv-keyboard-button cv-single-key">t</span>'}return""}}])}(ze),Ge=function(e){function t(){var e;return Re(this,t),(e=Be(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return Ae(t,e),Ie(t,[{key:"createItems",value:function(){var e=this,t=[];return t.push(new j(this.player_,{label:"Keyboard shortcuts"})),Ve.forEach(function(n){t.push(new Ue(e.player_,n))}),t}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat((e=t,n=this,"function"==typeof(r=_e(De(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"getCollabsibleName",value:function(){return"Keyboard shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!this.player_.options_.mobile}},{key:"showCollapsibleMenu",value:function(){Ze.prototype.handleClick.apply(this)}}])}(Ze);function Ke(e){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ke(e)}function qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,He(r.key),r)}}function He(e){var t=function(e){if("object"!=Ke(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ke(t)?t:t+""}function We(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(We=function(){return!!e})()}function Qe(e,t,n,r){var i=Je(Ye(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Je(){return Je="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ye(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Je.apply(null,arguments)}function Ye(e){return Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ye(e)}function Xe(e,t){return Xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xe(e,t)}i.Z.registerComponent("KeyboardShortcutsButton",Ge);var $e="cv-collapsed",et=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ye(t),function(e,t){if(t&&("object"==Ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,We()?Reflect.construct(t,n||[],Ye(e).constructor):t.apply(e,n))}(this,t,[e,n])).addChild("cogButton",{items:r.children_},r.children_.length-1),r.update=r.update.bind(r),r.player_.on("cv-updatecog",r.update),r.player_.on("playerresize",r.update),r.player_.one("play",r.update),r.player_.on("dispose",function(){r.player_.off("cv-updatecog",r.update),r.player_.off("playerresize",r.update),r.player_.off("play",r.update)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xe(e,t)}(t,e),n=t,(r=[{key:"toggleHidden",value:function(e){for(var t=0;t<this.children_.length;t++){var n=this.children_[t];n.isCollabsible&&(n.alwaysCollapsed||e?(n.isCollapsed=!0,n.addClass($e)):(n.isCollapsed=!1,n.removeClass($e)))}this.getChild("cogButton").update()}},{key:"update",value:function(){var e=this.player_.isFullscreen(),t=this.player_.whiteboardModePlugin().side,n=this.player_.el().getBoundingClientRect(),r=!e||"left"!==t&&"right"!==t?n.width:n.height;if(r){this.addClass("cv-collapsorator-ready");var i=r<(!e||"left"!==t&&"right"!==t&&"top"!==t?600:1200);this.player_.options_.deferMenus&&(i=!0),this.toggleHidden(i)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(Qe(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Qe(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&qe(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));i.Z.registerComponent("collapserator",et);var tt=["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"],nt=n(67624),rt=n(33800),it=n(65858),ot=n(50873),at=n(870);function ut(e){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(e)}function lt(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return ct(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(ct(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ct(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,ct(f,"constructor",c),ct(c,"constructor",l),l.displayName="GeneratorFunction",ct(c,i,"GeneratorFunction"),ct(f),ct(f,i,"Generator"),ct(f,r,function(){return this}),ct(f,"toString",function(){return"[object Generator]"}),(lt=function(){return{w:o,m:p}})()}function ct(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}ct=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){ct(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},ct(e,t,n,r)}function st(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ft(r.key),r)}}function ft(e){var t=function(e){if("object"!=ut(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ut(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ut(t)?t:t+""}var pt=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()},(t=[{key:"logStream",value:function(){var e="v:".concat(this.options.videoId);nt.SG.cacheExists(e)||(this.collectionApiClient.log({type:it.Vw.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:it.eq.V3}),nt.SG&&nt.SG.cacheSet(e,null,300))}},{key:"logVideoProgress",value:function(e){var t=this,n=this.getAnalyticsData();this.collectionApiClient.log(e.map(function(e){return{type:it.Vw.StreamProgress,actionContext:t.getActionContext(),data:Object.assign(Object.assign({},n),{progress:e}),eventVersion:it.eq.V2}}))}},{key:"logUserAction",value:function(e,t){var n=Object.assign(Object.assign({},this.getAnalyticsData()),e),r=Object.assign(Object.assign({},this.getActionContext()),t);this.collectionApiClient.log({type:t.actionType,data:n,actionContext:r,eventVersion:t.eventVersion||it.eq.V2})}},{key:"getAnalyticsData",value:function(){var e=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(e.video.shareId=this.options.shareId);var t=this.getEntityType();return t===it.py.Interactive?e.interactive={id:+this.options.mediaId}:t===it.py.Clip&&(e.clip={id:+this.options.mediaId}),e}},{key:"initialize",value:function(){this.setupCollectionApiClient(),at.Y.lockWindowSession(),this.options.player.one("dispose",function(){return at.Y.unlockWindowSession()})}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new rt.q({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return e.getCurrentUser()},shouldLog:ot.k.shouldLog,formatData:ot.k.formatData})}},{key:"getCurrentUser",value:function(){return e=this,t=void 0,n=void 0,r=lt().m(function e(){return lt().w(function(e){for(;;)if(0===e.n)return e.a(2,{id:this.options.userId,customerId:this.options.customerId,sessionId:this.options.authSessionId})},e,this)}),new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())});var e,t,n,r}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?it.MC.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return it.py.Video;case"MasterInteractive":return it.py.Interactive;case"MasterClip":return it.py.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return it.LZ.Player;case"interactive-player":return it.LZ.InteractivePlayer;case"create-clip-player":return it.LZ.CreateClipPlayer}}}])&&st(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ht(e){return ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ht(e)}function yt(e){var t="function"==typeof Map?new Map:void 0;return yt=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(vt())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&dt(i,n.prototype),i}(e,arguments,mt(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),dt(n,e)},yt(e)}function vt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vt=function(){return!!e})()}function dt(e,t){return dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dt(e,t)}function mt(e){return mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mt(e)}var bt=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=mt(t),function(e,t){if(t&&("object"==ht(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,vt()?Reflect.construct(t,n||[],mt(e).constructor):t.apply(e,n))}(this,t,[(null==n?void 0:n.title)||"Ajax error"])).url=e,r.response=n,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dt(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(yt(Error));function gt(e){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gt(e)}function wt(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Ot(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Ot(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ot(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Ot(f,"constructor",c),Ot(c,"constructor",l),l.displayName="GeneratorFunction",Ot(c,i,"GeneratorFunction"),Ot(f),Ot(f,i,"Generator"),Ot(f,r,function(){return this}),Ot(f,"toString",function(){return"[object Generator]"}),(wt=function(){return{w:o,m:p}})()}function Ot(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Ot=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Ot(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Ot(e,t,n,r)}function St(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kt(r.key),r)}}function kt(e){var t=function(e){if("object"!=gt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gt(t)?t:t+""}var Pt,Nt=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},jt=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tokens={gateway:null}},t=[{key:"get",value:function(e,t){return Nt(this,void 0,void 0,wt().m(function n(){var r,i;return wt().w(function(n){for(;;)switch(n.n){case 0:return r=this,n.n=1,fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)});case 1:return i=n.v,n.n=2,r.parseResponse.call(r,i);case 2:return n.a(2,n.v)}},n,this)}))}},{key:"delete",value:function(e,t){return Nt(this,void 0,void 0,wt().m(function n(){return wt().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,fetch(e,{method:"DELETE",headers:this.getHeaders(t)});case 1:return n.a(2)}},n,this)}))}},{key:"post",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Nt(this,void 0,void 0,wt().m(function i(){var o;return wt().w(function(i){for(;;)switch(i.n){case 0:return i.n=1,fetch(e,{method:"POST",headers:this.getHeaders(n),body:t,mode:"cors"});case 1:if(o=i.v,!r){i.n=3;break}return i.n=2,this.parseResponse(o);case 2:return i.a(2,i.v);case 3:return i.a(2)}},i,this)}))}},{key:"put",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Nt(this,void 0,void 0,wt().m(function i(){var o;return wt().w(function(i){for(;;)switch(i.n){case 0:return i.n=1,fetch(e,{method:"PUT",headers:this.getHeaders(n),body:t,mode:"cors"});case 1:if(o=i.v,!r){i.n=3;break}return i.n=2,this.parseResponse(o);case 2:return i.a(2,i.v);case 3:return i.a(2)}},i,this)}))}},{key:"setToken",value:function(e,t){this.tokens[e]=t}},{key:"getHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization="Bearer ".concat(this.tokens[e.tokenName])),t}},{key:"parseResponse",value:function(e){return Nt(this,void 0,void 0,wt().m(function t(){var n,r;return wt().w(function(t){for(;;)switch(t.n){case 0:if(404!==e.status){t.n=1;break}return t.a(2,null);case 1:if(e.ok){t.n=6;break}return t.p=2,t.n=3,e.json();case 3:n=t.v,t.n=5;break;case 4:throw t.p=4,t.v,new bt(e.url);case 5:throw t.p=5,new bt(e.url,n);case 6:return t.n=7,e.json();case 7:return r=t.v,t.a(2,r)}},t,null,[[2,4,5,6]])}))}}],t&&St(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()),Ct=n(19389),Tt=n.n(Ct);function Et(e){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Et(e)}function _t(e,t,n){return(t=function(e){var t=function(e){if("object"!=Et(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Et(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rt(e){e.paused()?e.play():e.pause()}function xt(e,t){e.currentTime(e.currentTime()+t)}function It(e,t){e.volume(e.volume()+t)}var Mt,Bt=(_t(_t(_t(_t(_t(_t(_t(_t(_t(_t(Pt={},"f",function(e){document[e.fsApi_.fullscreenEnabled]&&(e.isFullscreen()?e.exitFullscreen():e.requestFullscreen())}),"m",function(e){var t=e.volume(),n=e.lastVolume_();if(0===t){var r=n<.1?.1:n;e.volume(r),e.muted(!1)}else e.muted(!e.muted())}),"k",Rt),"space",Rt),"t",function(e){var t=e.theatreModePlugin().getTheatreMode();e.theatreModePlugin().toggleTheatreMode(!t,{shouldLog:!0})}),"left",function(e){return xt(e,-5)}),"right",function(e){return xt(e,5)}),"j",function(e){return xt(e,-10)}),"l",function(e){return xt(e,10)}),"up",function(e){return It(e,.05)}),_t(Pt,"down",function(e){return It(e,-.05)}));!function(e){e.PhysicallyChapteredVideo="physically-chaptered-video"}(Mt||(Mt={}));var Lt=n(83765);function Dt(e){return Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dt(e)}function At(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ft(r.key),r)}}function Ft(e){var t=function(e){if("object"!=Dt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dt(t)?t:t+""}function zt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zt=function(){return!!e})()}function Zt(){return Zt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Vt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Zt.apply(null,arguments)}function Vt(e){return Vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vt(e)}function Ut(e,t){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ut(e,t)}n(35571);var Gt=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Vt(t),function(e,t){if(t&&("object"==Dt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,zt()?Reflect.construct(t,n||[],Vt(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.configureMenuDimensions=r.configureMenuDimensions.bind(r),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ut(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.player.ready(this.configureMenuDimensions),this.player.one("play",this.configureMenuDimensions),this.player.on("resize",this.configureMenuDimensions),this.player.on("fullscreenchange",this.configureMenuDimensions),this.player.on("resizemenus",this.configureMenuDimensions),this.player.on("ready",this.configureMenuDimensions)}},{key:"dispose",value:function(){var e,n,r;this.player.off("resize",this.configureMenuDimensions),this.player.off("fullscreenchange",this.configureMenuDimensions),this.player.off("resizemenus",this.configureMenuDimensions),this.player.off("ready",this.configureMenuDimensions),(e=t,n=this,"function"==typeof(r=Zt(Vt(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"configureMenuDimensions",value:function(){var e=this,t=function(t){if(!e.options.mobile){var n=e.player.getChild("collapserator"),r=n.getChild("volumePanel"),i=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:t},i),e.player.trigger("volumechange")}},n=this.player.isFullscreen();if(n&&!this.options.mobile){var r=this.player.whiteboardModePlugin().side;if(t("top"!==r),"left"===r||"right"===r||"top"===r){var i=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach(function(e){e.style.paddingTop=null,e.style.marginBottom=null,e.style.width="calc(".concat(i,"px - 4em)")})}}n||t(!0);var o=this.player.currentWidth(),a=this.player.currentHeight()/o*100,u=this.player.el().querySelector(".cv-collapsorator"),l=this.player.el().querySelectorAll(".vjs-menu"),c=u&&u.offsetHeight;c?("CreateClipSeekBar"===this.options.seekBarName&&(c+=22),l&&l.length&&l.forEach(function(t){!n&&e.options.overflowControls?t.style.paddingTop="80%":t.style.paddingTop="calc(".concat(a,"% - ").concat(c,"px)"),t.style.marginBottom="".concat(c,"px"),t.style.width=null,t.querySelector(".vjs-menu-content")&&(o<=450?e.player.addClass("cv-player-small"):e.player.removeClass("cv-player-small"))})):this.player.one("play",this.configureMenuDimensions)}}],r&&At(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));i.Z.registerPlugin("configureMenuDimensionsPlugin",Gt);var Kt="cv-persisttest",qt=function(){try{return window.localStorage.setItem(Kt,"cv-player-storage-test"),window.localStorage.removeItem(Kt),!0}catch(e){return!1}},Ht=function(e){return window.localStorage.getItem(e)},Wt=function(e,t){window.localStorage.setItem(e,t)};function Qt(e){return Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qt(e)}function Jt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Yt(r.key),r)}}function Yt(e){var t=function(e){if("object"!=Qt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qt(t)?t:t+""}function Xt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xt=function(){return!!e})()}function $t(){return $t="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=en(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},$t.apply(null,arguments)}function en(e){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},en(e)}function tn(e,t){return tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tn(e,t)}var nn=i.Z.getPlugin("plugin"),rn="cvplayer-volume",on="cvplayer-mute",an=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=en(t),function(e,t){if(t&&("object"==Qt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Xt()?Reflect.construct(t,n||[],en(e).constructor):t.apply(e,n))}(this,t,[e])).enabled=!0,n.player.ready(function(){return n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tn(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.player.options_.mobile?this.removeVolumeControl():qt()&&(this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var e=Ht(rn),t=Ht(on);e&&this.player.volume(+e),t&&this.player.muted("true"===t)}},{key:"saveVolumeState",value:function(){this.enabled&&(Wt(rn,this.player.volume().toString()),Wt(on,this.player.muted().toString()))}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var e=this.player.getChild("collapserator"),t=e.getChild("volumePanel");e.removeChild(t)}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"dispose",value:function(){var e,n,r;this.player.off("volumechange",this.saveVolumeState),(e=t,n=this,"function"==typeof(r=$t(en(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&Jt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(nn);function un(e){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(e)}function ln(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cn(r.key),r)}}function cn(e){var t=function(e){if("object"!=un(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=un(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==un(t)?t:t+""}function sn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sn=function(){return!!e})()}function fn(e){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fn(e)}function pn(e,t){return pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pn(e,t)}i.Z.registerPlugin("persistVolumePlugin",an);var hn=i.Z.getPlugin("plugin"),yn="cvplayer-playback-rate",vn=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=fn(t),function(e,t){if(t&&("object"==un(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sn()?Reflect.construct(t,n||[],fn(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.player.dataLoaded(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pn(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){var e,t=this;if(qt()){this.savePlaybackRate=this.savePlaybackRate.bind(this),this.player.on("ratechange",this.savePlaybackRate),this.one("dispose",function(){t.player.off("ratechange",t.savePlaybackRate)});var n=+Ht(yn);(null===(e=this.player.options_.playbackRates)||void 0===e?void 0:e.some(function(e){return e===n}))&&this.player.playbackRate(n)}}},{key:"savePlaybackRate",value:function(){var e,t=this.player.playbackRate().toString();Wt(yn,t),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({rate:t},{actionType:it.Vw.Select,workflowPhase:it.eu.Complete,descriptor:it.UX.ChangeSpeed,entity:it.py.PlaybackSpeed,eventVersion:it.eq.V3})}}])&&ln(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(hn);function dn(e){return dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn(e)}function mn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bn(r.key),r)}}function bn(e){var t=function(e){if("object"!=dn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dn(t)?t:t+""}function gn(e,t){if(t&&("object"==dn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function wn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wn=function(){return!!e})()}function On(e){return On=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},On(e)}function Sn(e,t){return Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sn(e,t)}i.Z.registerPlugin("persistPlaybackRatePlugin",vn);var kn=function(e){function t(e){var n,r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,o=[e],i=On(i=t),(n=gn(r,wn()?Reflect.construct(i,o||[],On(r).constructor):i.apply(r,o))).fullscreenBecauseOfRotate=!1,n.player.supportsFullScreen()?(n.onRotate=n.onRotate.bind(n),n.onFullscreenChange=n.onFullscreenChange.bind(n),n.player.ready(function(){return n.initialize()}),n):gn(n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sn(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.player.on("fullscreenchange",this.onFullscreenChange),window.addEventListener("orientationchange",this.onRotate)}},{key:"dispose",value:function(){this.player.off("fullscreenchange",this.onFullscreenChange),window.removeEventListener("orientationchange",this.onRotate)}},{key:"onFullscreenChange",value:function(){this.player.isFullscreen()||(this.fullscreenBecauseOfRotate=!1)}},{key:"onRotate",value:function(){var e=this.getAngle();90===e||-90===e||270===e?(this.player.requestFullscreen(),this.fullscreenBecauseOfRotate=!0):this.fullscreenBecauseOfRotate&&this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"getAngle",value:function(){var e,t;return"number"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.angle)?window.screen.orientation.angle:0}}])&&mn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));i.Z.registerPlugin("fullscreenOnRotatePlugin",kn);var Pn="\n <svg viewBox='0 0 434 71'>\n <g>\n <path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/>\n <path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/>\n </g>\n </svg>\n";function Nn(e){return Nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nn(e)}function jn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Cn(r.key),r)}}function Cn(e){var t=function(e){if("object"!=Nn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Nn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nn(t)?t:t+""}function Tn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Tn=function(){return!!e})()}function En(e){return En=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},En(e)}function _n(e,t){return _n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_n(e,t)}var Rn=function(e){function t(e,n){var r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=En(t),function(e,t){if(t&&("object"==Nn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Tn()?Reflect.construct(t,n||[],En(e).constructor):t.apply(e,n))}(this,t,[e,n])).update=(i=r.update.bind(r),o=window.performance.now(),function(){var e=window.performance.now();e-o>=1e3&&(i.apply(void 0,arguments),o=e)}),e.on("timeupdate",r.update),e.one("dispose",function(){e.off("timeupdate",r.update),r.el_.removeEventListener("click",r.pause)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_n(e,t)}(t,e),n=t,(r=[{key:"update",value:function(){var e=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(e)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var e={innerHTML:Pn,className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=i.Z.dom.createEl("a",e,t);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&jn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Button"));function xn(e){return xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xn(e)}function In(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Mn(r.key),r)}}function Mn(e){var t=function(e){if("object"!=xn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xn(t)?t:t+""}function Bn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Bn=function(){return!!e})()}function Ln(e){return Ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ln(e)}function Dn(e,t){return Dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dn(e,t)}Rn.prototype.controlText_="Open in ClickView",i.Z.registerComponent("OpenExternallyButton",Rn);var An=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ln(t),function(e,t){if(t&&("object"==xn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Bn()?Reflect.construct(t,n||[],Ln(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,e.ready(function(){return r.onReady()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dn(e,t)}(t,e),n=t,(r=[{key:"onReady",value:function(){var e=this.player.getChild("collapserator"),t=e.getChild("customControlSpacer"),n=e.children_.indexOf(t);e.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&In(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function Fn(e){return Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fn(e)}function zn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Zn(r.key),r)}}function Zn(e){var t=function(e){if("object"!=Fn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fn(t)?t:t+""}function Vn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vn=function(){return!!e})()}function Un(e,t,n,r){var i=Gn(Kn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Gn(){return Gn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Kn(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Gn.apply(null,arguments)}function Kn(e){return Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kn(e)}function qn(e,t){return qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qn(e,t)}i.Z.registerPlugin("openExternallyPlugin",An);var Hn=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Kn(t),function(e,t){if(t&&("object"==Fn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vn()?Reflect.construct(t,n||[],Kn(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qn(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(Un(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Un(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"setUi",value:function(e,t){var n=this,r=e>0,i=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(i,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*e,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){n.removeText()},t)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&zn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("component"));function Wn(e){return Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wn(e)}function Qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Jn(r.key),r)}}function Jn(e){var t=function(e){if("object"!=Wn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Wn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wn(t)?t:t+""}function Yn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yn=function(){return!!e})()}function Xn(){return Xn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=$n(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Xn.apply(null,arguments)}function $n(e){return $n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$n(e)}function er(e,t){return er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},er(e,t)}i.Z.registerComponent("TouchControls",Hn);var tr=i.Z.getPlugin("plugin"),nr=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=$n(t),function(e,t){if(t&&("object"==Wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Yn()?Reflect.construct(t,n||[],$n(e).constructor):t.apply(e,n))}(this,t,[e])).doubleTouchCount=0,n.seekStartTime=0,n.directionModifier=0,n.bindFunctions(),n.player.ready(function(){return n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&er(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this),this.unBindEventListeners=this.unBindEventListeners.bind(this)}},{key:"initialize",value:function(){var e=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",function(){e.player.off("ready",e.reBindEventListeners)}),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.tech.on("touchstart",this.onTouchStart),this.tech.on("touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&"Html5"===this.tech.name()&&(this.tech.off("touchstart",this.onTouchStart),this.tech.off("touchend",this.onTouchEnd))}},{key:"dispose",value:function(){var e,n,r;(e=t,n=this,"function"==typeof(r=Xn($n(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([]),this.unBindEventListeners()}},{key:"onTouchStart",value:function(e){this.touchStartTime=e.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(e){var t=this;if(e.changedTouches.length){if(e.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(e),void(this.lastTouchTime=e.timeStamp);this.resetProperties(),this.lastTouchTime=e.timeStamp,e.timeStamp-this.touchStartTime<300&&window.setTimeout(function(){t.doubleTouchCount||(t.player.paused()?t.player.play():t.userActive&&t.player.pause())},300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(e){var t=this.player.el().getBoundingClientRect(),n=t.left+t.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),e.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}],r&&Qn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(tr);function rr(e){return rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rr(e)}function ir(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,or(r.key),r)}}function or(e){var t=function(e){if("object"!=rr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rr(t)?t:t+""}i.Z.registerPlugin("touchControls",nr);var ar=function(){return e=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=n.id,this.plugin=t,this.source=n,this.enabled=this.enabled.bind(this)},(t=[{key:"enabled",value:function(e){return void 0===e?this.plugin.currentSource===this.source:(e&&this.plugin.setSource(this.source.id),e)}}])&&ir(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ur(e){return ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ur(e)}function lr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cr(r.key),r)}}function cr(e){var t=function(e){if("object"!=ur(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ur(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ur(t)?t:t+""}function sr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sr=function(){return!!e})()}function fr(e){return fr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fr(e)}function pr(e,t){return pr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pr(e,t)}var hr=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=fr(t),function(e,t){if(t&&("object"==ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sr()?Reflect.construct(t,n||[],fr(e).constructor):t.apply(e,n))}(this,t,[e])).options_=n,r.player.ready(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pr(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){var e=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",function(){e.qualityLevels.off("change",e.onQualityChange)})}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var e=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",e.id)}},{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();this._currentSource=n;var o=this.player.playbackRate(),a=this.player.hasStarted();return this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",function(){t.player.playbackRate(o),t.player.currentTime()!==r&&t.player.currentTime(r),i&&t.player.play(),a&&t.player.hasStarted(!0)}),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find(function(t){return t.id===e})}},{key:"repopulateSources",value:function(e){for(var t=null;this.qualityLevels.length;)this.qualityLevels[0].enabled&&(t=this.qualityLevels[0].id),this.qualityLevels.removeQualityLevel(this.qualityLevels[0]);this.sources=[],this.populateSources(e,t)}},{key:"sortSources",value:function(e){return e.sort(function(e,t){return e.id===t.id?0:+e.id>+t.id?-1:1})}},{key:"populateSources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=null;(e=this.sortSources(e)).forEach(function(e){t.qualityLevels.addQualityLevel(new ar(t,e)),t.sources.push(e),t.trigger({event:"addsource",source:e}),null===n?e.default&&(r=e):e.id===n&&(r=e)}),null===r&&(r=this.sources[0]),null!==r&&this.setSource(r.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(e){for(var t=this.qualityLevels,n=-1,r=0;r<t.length;r++)if(t[r].id===e.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}}],r&&lr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function yr(e){return yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yr(e)}function vr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dr(r.key),r)}}function dr(e){var t=function(e){if("object"!=yr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yr(t)?t:t+""}i.Z.registerPlugin("progressiveFiles",hr);var mr=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(e,t){var n=e.getQualityLevelById(t);if(n||(n=this.getNextBestQuality(e,t)),!n)return null;for(var r=0;r<e.length;r++){var i=e[r];i.enabled=n.id===i.id}return n}},{key:"getNextBestQuality",value:function(e,t){var n=this.getKnownProfiles(),r=n.indexOf(t);if(r>=0){for(var i=r+1;i<n.length;i++){var o=n[i],a=e.getQualityLevelById(o);if(a)return a}for(var u=r-1;u>0;u--){var l=n[u],c=e.getQualityLevelById(l);if(c)return c}}return null}}],null&&vr(e.prototype,null),t&&vr(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function br(e){return br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},br(e)}function gr(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return wr(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(wr(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,wr(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,wr(f,"constructor",c),wr(c,"constructor",l),l.displayName="GeneratorFunction",wr(c,i,"GeneratorFunction"),wr(f),wr(f,i,"Generator"),wr(f,r,function(){return this}),wr(f,"toString",function(){return"[object Generator]"}),(gr=function(){return{w:o,m:p}})()}function wr(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}wr=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){wr(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},wr(e,t,n,r)}function Or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sr(r.key),r)}}function Sr(e){var t=function(e){if("object"!=br(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==br(t)?t:t+""}var kr=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.name,this.playbackProfile=t.playbackProfile,this.address=new URL(t.httpsAddress)},(t=[{key:"getUrl",value:function(e){return e?this.address+"cache?file="+encodeURIComponent(e):null}},{key:"ping",value:function(){return e=this,t=void 0,n=void 0,r=gr().m(function e(){var t,n,r,i;return gr().w(function(e){for(;;)switch(e.n){case 0:return t=new AbortController,n=setTimeout(function(){return t.abort()},1e3),e.p=1,e.n=2,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:t.signal});case 2:return r=e.v,e.n=3,r.text();case 3:return i=e.v,clearTimeout(n),e.a(2,"PONG"===i);case 4:return e.p=4,e.v,e.a(2,!1)}},e,this,[[1,4]])}),new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())});var e,t,n,r}}])&&Or(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Pr(e){return Pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pr(e)}function Nr(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return jr(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(jr(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,jr(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,jr(f,"constructor",c),jr(c,"constructor",l),l.displayName="GeneratorFunction",jr(c,i,"GeneratorFunction"),jr(f),jr(f,i,"Generator"),jr(f,r,function(){return this}),jr(f,"toString",function(){return"[object Generator]"}),(Nr=function(){return{w:o,m:p}})()}function jr(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}jr=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){jr(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},jr(e,t,n,r)}function Cr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tr(r.key),r)}}function Tr(e){var t=function(e){if("object"!=Pr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pr(t)?t:t+""}var Er=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.logger=i.Z.log.createLogger("localcache")},(t=[{key:"setSource",value:function(e,t){return n=this,r=void 0,i=void 0,o=Nr().m(function n(){var r;return Nr().w(function(n){for(;;)switch(n.n){case 0:if(!this.player.localCache||void 0===(null==e?void 0:e.src)){n.n=2;break}return n.n=1,this.player.localCache().getActiveLocalCache();case 1:null!==(r=n.v)&&(this.logger.debug("Using Local Cache",r),e.src=r.getUrl(e.src));case 2:t(null,e);case 3:return n.a(2)}},n,this)}),new(i||(i=Promise))(function(e,t){function a(e){try{l(o.next(e))}catch(e){t(e)}}function u(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i(function(e){e(n)})).then(a,u)}l((o=o.apply(n,r||[])).next())});var n,r,i,o}}])&&Cr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function _r(e){return _r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_r(e)}function Rr(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return xr(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(xr(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,xr(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,xr(f,"constructor",c),xr(c,"constructor",l),l.displayName="GeneratorFunction",xr(c,i,"GeneratorFunction"),xr(f),xr(f,i,"Generator"),xr(f,r,function(){return this}),xr(f,"toString",function(){return"[object Generator]"}),(Rr=function(){return{w:o,m:p}})()}function xr(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}xr=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){xr(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},xr(e,t,n,r)}function Ir(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Mr(r.key),r)}}function Mr(e){var t=function(e){if("object"!=_r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_r(t)?t:t+""}function Br(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Br=function(){return!!e})()}function Lr(){return Lr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Dr(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Lr.apply(null,arguments)}function Dr(e){return Dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Dr(e)}function Ar(e,t){return Ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ar(e,t)}i.Z.use("*",function(e){return new Er(e)});var Fr='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',zr=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Dr(t),function(e,t){if(t&&("object"==_r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Br()?Reflect.construct(t,n||[],Dr(e).constructor):t.apply(e,n))}(this,t,[e,n])).hide(),r.onLocalCacheChange=r.onLocalCacheChange.bind(r),e.ready(function(){r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ar(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=Lr(Dr(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(Fr,"</div>")},{title:"Streaming from ClickView Local Cache"}]);var e,n,r}},{key:"initialize",value:function(){var e=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",function(){e.localCachePlugin.off("localcachechanged",e.onLocalCacheChange)}),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return e=this,t=void 0,n=void 0,r=Rr().m(function e(){return Rr().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.localCachePlugin.getActiveLocalCache();case 1:e.v?this.show():this.hide();case 2:return e.a(2)}},e,this)}),new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())});var e,t,n,r}}],r&&Ir(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Zr(e){return Zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(e)}function Vr(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Ur(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Ur(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ur(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Ur(f,"constructor",c),Ur(c,"constructor",l),l.displayName="GeneratorFunction",Ur(c,i,"GeneratorFunction"),Ur(f),Ur(f,i,"Generator"),Ur(f,r,function(){return this}),Ur(f,"toString",function(){return"[object Generator]"}),(Vr=function(){return{w:o,m:p}})()}function Ur(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Ur=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Ur(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Ur(e,t,n,r)}function Gr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Kr(r.key),r)}}function Kr(e){var t=function(e){if("object"!=Zr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Zr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Zr(t)?t:t+""}function qr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qr=function(){return!!e})()}function Hr(){return Hr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Wr(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Hr.apply(null,arguments)}function Wr(e){return Wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wr(e)}function Qr(e,t){return Qr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qr(e,t)}i.Z.registerComponent("localCacheIndicator",zr);var Jr=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},Yr=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Wr(t),function(e,t){if(t&&("object"==Zr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,qr()?Reflect.construct(t,n||[],Wr(e).constructor):t.apply(e,n))}(this,t,[e])).logger_=i.Z.log.createLogger("localcache"),void 0===n)throw Error("no options defined");return r.localCaches_=n.localCacheAddresses.map(function(e){return new kr(e)}),r.player.ready(function(){r.initialize(),n.enabled&&r.enable()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qr(e,t)}(t,e),n=t,r=[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"removeLocalCache",value:function(e){this.localCaches_=this.localCaches_.filter(function(t){return t!==e})}},{key:"dispose",value:function(){var e,n,r;(e=t,n=this,"function"==typeof(r=Hr(Wr(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"initialize",value:function(){this.player.controlBar.addChild("localCacheIndicator")}},{key:"handleNetworkError",value:function(){return Jr(this,void 0,void 0,Vr().m(function e(){var t;return Vr().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getActiveLocalCache();case 1:if(!(t=e.v)){e.n=3;break}return e.n=2,t.ping();case 2:e.v&&this.removeLocalCache(t);case 3:return this.resetActiveLocalCache(),e.n=4,this.getActiveLocalCache();case 4:return this.resetSource(),e.a(2,!0)}},e,this)}))}},{key:"resetSource",value:function(){for(var e=this.player.qualityLevels(),t=0;t<e.length;t++)e[t].enabled&&(e[t].enabled=!0)}},{key:"getActiveLocalCacheInternal",value:function(){return Jr(this,void 0,void 0,Vr().m(function e(){var t,n,r,i=this;return Vr().w(function(e){for(;;)switch(e.n){case 0:return t=[],n=function(e){return Jr(i,void 0,void 0,Vr().m(function n(){return Vr().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,e.ping();case 1:if(!n.v){n.n=2;break}t.push(e);case 2:return n.a(2)}},n)}))},e.n=1,Promise.all(this.localCaches_.map(function(e){return n(e)}));case 1:if(!(t.length>0)){e.n=2;break}return r=t[0],this.onLocalCacheChange(r),e.a(2,r);case 2:return e.a(2,null)}},e,this)}))}},{key:"onLocalCacheChange",value:function(e){this.logger_.debug("Local Cache changed",e),this.trigger("localcachechanged",{localCache:e});var t=!1;e&&e.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",e.playbackProfile),mr.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}],r&&Gr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function Xr(e){return Xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xr(e)}function $r(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return ei(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(ei(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ei(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,ei(f,"constructor",c),ei(c,"constructor",l),l.displayName="GeneratorFunction",ei(c,i,"GeneratorFunction"),ei(f),ei(f,i,"Generator"),ei(f,r,function(){return this}),ei(f,"toString",function(){return"[object Generator]"}),($r=function(){return{w:o,m:p}})()}function ei(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}ei=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){ei(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},ei(e,t,n,r)}function ti(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ni(r.key),r)}}function ni(e){var t=function(e){if("object"!=Xr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xr(t)?t:t+""}function ri(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ri=function(){return!!e})()}function ii(){return ii="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=oi(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ii.apply(null,arguments)}function oi(e){return oi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oi(e)}function ai(e,t){return ai=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ai(e,t)}i.Z.registerPlugin("localCache",Yr);var ui=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},li=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=oi(t),function(e,t){if(t&&("object"==Xr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ri()?Reflect.construct(t,n||[],oi(e).constructor):t.apply(e,n))}(this,t,[e])).playerApi=n.playerApi,r.fileToken=n.fileToken,r.logger=i.Z.log.createLogger("video-signature-expiry-plugin"),r.bindErrorHandlers(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ai(e,t)}(t,e),n=t,r=[{key:"bindErrorHandlers",value:function(){this.onError=this.onError.bind(this),this.player.on("error",this.onError)}},{key:"dispose",value:function(){var e,n,r;this.player.off("error",this.onError),(e=t,n=this,"function"==typeof(r=ii(oi(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"onError",value:function(){return ui(this,void 0,void 0,$r().m(function e(){var t,n=this;return $r().w(function(e){for(;;)switch(e.n){case 0:if((t=this.player.error().code)===MediaError.MEDIA_ERR_NETWORK||t===MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED){e.n=1;break}return e.a(2);case 1:return e.n=2,this.player.localCache().getActiveLocalCache();case 2:if(!e.v){e.n=3;break}return this.callErrorHandler(function(){return n.player.localCache().handleNetworkError()}),e.a(2);case 3:this.callErrorHandler(function(){return n.handleVideoSignatureExpiry()});case 4:return e.a(2)}},e,this)}))}},{key:"handleVideoSignatureExpiry",value:function(){return ui(this,void 0,void 0,$r().m(function e(){var t,n;return $r().w(function(e){for(;;)switch(e.n){case 0:if(this.playerApi&&this.fileToken){e.n=1;break}return e.a(2,!1);case 1:if(!(this.refetchedSourcesTimestamp+9e5>Date.now())){e.n=2;break}return e.a(2,!1);case 2:return this.refetchedSourcesTimestamp=Date.now(),t=null,e.p=3,this.logger.debug("Detected expired mp4 urls, attempting to refetch"),n="".concat(this.playerApi.origin,"/api/files?fileToken=").concat(this.fileToken),e.n=4,jt.get(n);case 4:t=e.v,e.n=6;break;case 5:return e.p=5,e.v,this.logger.error("Failed to refetch expired mp4 urls"),e.a(2,!1);case 6:return this.logger.debug("Mp4 urls successfully refetched"),this.player.progressiveFiles().repopulateSources(t.progressive.map(function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}})),this.fileToken=t.fileToken,e.a(2,!0)}},e,this,[[3,5]])}))}},{key:"callErrorHandler",value:function(e){return ui(this,void 0,void 0,$r().m(function t(){var n,r,i,o,a=this;return $r().w(function(t){for(;;)switch(t.n){case 0:return n=this.player.currentTime(),r=!this.player.paused(),i=this.player.playbackRate(),o=function(){a.player.playbackRate(i),a.player.currentTime(n),r&&a.player.play(),a.player.error(null)},this.player.one("loadedmetadata",o),t.n=1,e();case 1:if(!t.v){t.n=2;break}return t.a(2);case 2:this.player.off("loadedmetadata",o);case 3:return t.a(2)}},t,this)}))}}],r&&ti(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function ci(e){return ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ci(e)}function si(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fi(r.key),r)}}function fi(e){var t=function(e){if("object"!=ci(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ci(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ci(t)?t:t+""}function pi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pi=function(){return!!e})()}function hi(e){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hi(e)}function yi(e,t){return yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yi(e,t)}i.Z.registerPlugin("handleNetworkErrors",li);var vi=i.Z.getPlugin("plugin"),di="cvplayer-show-subtitles",mi="cvplayer-selected-language",bi="cvplayer-subtitle-size",gi=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=hi(t),function(e,t){if(t&&("object"==ci(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pi()?Reflect.construct(t,n||[],hi(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yi(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.applyUserPreferences=this.applyUserPreferences.bind(this),this.player.textTracks().length&&(this.applyUserPreferences(),this.bindEventListeners())}},{key:"applyUserPreferences",value:function(){var e=!!this.options.showSubtitles,t=this.safeGet(di);if("true"===t&&(e=!0),"false"===t&&(e=!1),e){var n=this.guessWhichTrack();n&&(n.mode="showing",this.player.trigger("cv:languageselected"))}else this.hideSubtitles();var r=this.safeGet(bi);r||(r=this.options.subtitleSize),this.player.options_.mobile&&(r="medium"),r&&this.player.textTrackSettings.setSizeSetting(r)}},{key:"safeGet",value:function(e){if(qt())return Ht(e)}},{key:"onSelectedLanguageChange",value:function(){for(var e,t,n=this.player.textTracks(),r=0;r<n.length;r++){var i=n[r];if("showing"===i.mode)return Wt(di,"true"),Wt(mi,i.language),void(null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({language:i.language},{actionType:it.Vw.Select,entity:it.py.Subtitle,workflowPhase:it.eu.Complete,descriptor:it.DL.On}))}var o;Wt(di,"false"),o=mi,window.localStorage.removeItem(o),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({language:""},{actionType:it.Vw.Select,entity:it.py.Subtitle,workflowPhase:it.eu.Complete,descriptor:it.DL.Off,eventVersion:it.eq.V3})}},{key:"bindEventListeners",value:function(){var e=this;qt()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",function(){e.player.off("cv:languageselected",e.onSelectedLanguageChange),e.player.off("changesubtitlesize",e.onChangeSubtitleSize)}))}},{key:"onChangeSubtitleSize",value:function(){var e=this.player.textTrackSettings.getSizeSetting();Wt(bi,e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet(mi)||window.navigator.language,r=this.getLanguageParts(n),i=r.language,o=r.country,a=this.player.textTracks(),u=0;u<a.length;u++){var l=a[u],c=this.getLanguageParts(l.language),s=c.language,f=c.country;if(s===i&&(e=l,f||(t=l),f===o))return e}return t||e||null}},{key:"getLanguageParts",value:function(e){var t=e.toLowerCase().split("-");return{language:t[0],country:t[1]}}},{key:"hideSubtitles",value:function(){for(var e=this.player.textTracks(),t=0;t<e.length;t++)e[t].mode="hidden"}},{key:"previewModeSubtitles",value:function(){var e=this.guessWhichTrack();e&&(e.mode="showing"),this.player.off("changesubtitlesize",this.onChangeSubtitleSize),this.player.textTrackSettings.setSizeSetting("large"),this.player.on("changesubtitlesize",this.onChangeSubtitleSize)}}])&&si(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vi);function wi(e){return wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wi(e)}function Oi(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Si(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Si(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Si(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Si(f,"constructor",c),Si(c,"constructor",l),l.displayName="GeneratorFunction",Si(c,i,"GeneratorFunction"),Si(f),Si(f,i,"Generator"),Si(f,r,function(){return this}),Si(f,"toString",function(){return"[object Generator]"}),(Oi=function(){return{w:o,m:p}})()}function Si(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Si=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Si(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Si(e,t,n,r)}function ki(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Pi(r.key),r)}}function Pi(e){var t=function(e){if("object"!=wi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wi(t)?t:t+""}function Ni(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ni=function(){return!!e})()}function ji(e){return ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ji(e)}function Ci(e,t){return Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ci(e,t)}i.Z.registerPlugin("persistSubtitleSettingsPlugin",gi);var Ti=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},Ei=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ji(t),function(e,t){if(t&&("object"==wi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ni()?Reflect.construct(t,n||[],ji(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.player.ready(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ci(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){return Ti(this,void 0,void 0,Oi().m(function e(){var t,n,r,i,o=this;return Oi().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getActiveLocalCache();case 1:if(t=e.v,(n=t?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),qt()&&(r=Ht(this.getStorageKey(!!t)))&&(n=r),i=this.player.qualityLevels(),(null==t?void 0:t.playbackProfile)||mr.enableProfileOrNextBest(i,n),qt()){e.n=2;break}return e.a(2);case 2:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),i.on("change",this.onQualityLevelsChange),this.on("dispose",function(){i.off("change",o.onQualityLevelsChange)});case 3:return e.a(2)}},e,this)}))}},{key:"onQualityLevelsChange",value:function(){var e;return Ti(this,void 0,void 0,Oi().m(function t(){var n,r,i;return Oi().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.isLocalCacheActive();case 1:n=t.v,r=this.player.qualityLevels(),i=r[r.selectedIndex],Wt(this.getStorageKey(n),i.id),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({quality:i.id},{actionType:it.Vw.Select,workflowPhase:it.eu.Complete,descriptor:it.UX.ChangeResolution,entity:it.py.Resolution,eventVersion:it.eq.V3});case 2:return t.a(2)}},t,this)}))}},{key:"isLocalCacheActive",value:function(){return Ti(this,void 0,void 0,Oi().m(function e(){return Oi().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.player.localCache().getActiveLocalCache();case 1:return e.a(2,!!e.v)}},e,this)}))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(e){return e?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&ki(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function _i(e){return _i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_i(e)}function Ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ii(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bi(r.key),r)}}function Mi(e,t,n){return t&&Ii(e.prototype,t),n&&Ii(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bi(e){var t=function(e){if("object"!=_i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_i(t)?t:t+""}function Li(e,t,n){return t=Ai(t),function(e,t){if(t&&("object"==_i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Di()?Reflect.construct(t,n||[],Ai(e).constructor):t.apply(e,n))}function Di(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Di=function(){return!!e})()}function Ai(e){return Ai=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ai(e)}function Fi(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zi(e,t)}function zi(e,t){return zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zi(e,t)}i.Z.registerPlugin("persistQualitySettingsPlugin",Ei);var Zi=i.Z.getComponent("Component"),Vi=function(e){function t(e,n){return xi(this,t),Li(this,t,[e,n])}return Fi(t,e),Mi(t,[{key:"createEl",value:function(){return i.Z.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var e=this.options_.event,t=this.player_.duration(),n=(e.end.time-e.start.time)/t;this.el_.style.width=100*n+"%";var r=e.start.time/t;this.el_.style.left=100*r+"%"}}])}(Zi),Ui=function(e){function t(){var e;return xi(this,t),(e=Li(this,t,arguments)).events_=[],e}return Fi(t,e),Mi(t,[{key:"update",value:function(){for(var e=this,t=this.children(),n=t.length;n>0;n--)this.removeChild(t[n]);this.events_.forEach(function(t){var n=new Vi(e.player(),{event:t});e.addChild(n),n.update()})}},{key:"addEvents",value:function(e){var t,n;(t=this.events_).push.apply(t,function(e){if(Array.isArray(e))return Ri(e)}(n=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Ri(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ri(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),this.update()}},{key:"createEl",value:function(){return i.Z.dom.createEl("div",{className:"cv-progress-reporter-display"})}}])}(Zi);function Gi(e){return Gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gi(e)}function Ki(e,t,n){return(t=Hi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hi(r.key),r)}}function Hi(e){var t=function(e){if("object"!=Gi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gi(t)?t:t+""}function Wi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wi=function(){return!!e})()}function Qi(e){return Qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qi(e)}function Ji(e,t){return Ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ji(e,t)}var Yi=i.Z.getPlugin("plugin"),Xi="play",$i="playing",eo="pause",to="seekstart",no="ended",ro="pausedseek",io=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Qi(t),function(e,t){if(t&&("object"==Gi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wi()?Reflect.construct(t,n||[],Qi(e).constructor):t.apply(e,n))}(this,t,[e,n])).eventBuffer=[],r.latestTime=0,r.lastPlayingTime=0,r.isPlaying=!1,r.isSeeking=!1,r.hasEnded=!1,r.shouldLogPlayOnTimeUpdate=!1,r.options=n,r.player.ready(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ji(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var e=this,t=Ki(Ki(Ki(Ki(Ki(Ki({},Xi,function(){return e.onPlay()}),eo,function(){return e.onPause()}),"timeupdate",function(){return e.onTimeUpdate()}),"seeking",function(){return e.onSeeking()}),no,function(){return e.onEnded()}),$i,function(){return e.onPlaying()}),n=Object.keys(t);n.forEach(function(n){return e.player.on(n,t[n])}),this.one("dispose",function(){n.forEach(function(n){return e.player.off(n,t[n])})})}},{key:"startInterval",value:function(){var e=this,t=this.options.interval||5e3;this.interval=window.setInterval(function(){return e.flushBuffer()},t),this.player.one("dispose",function(){return window.clearInterval(e.interval)})}},{key:"addEasterEgg",value:function(){var e,t,n=this,r="",i=function(t){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=t.key)&&n.addDisplay(),window.clearTimeout(e),e=window.setTimeout(function(){r=""},500)},o=!1,a=function(){o=!0,t=window.setTimeout(function(){o&&n.addDisplay()},1e4)};function u(){o=!1,window.clearTimeout(t)}this.player.el().addEventListener("keyup",i);var l=this.player.getChild("Collapserator").getChild("PlayToggle");l.on("touchstart",a),l.on("touchend",u),this.player.one("dispose",function(){var e,t;null===(t=null===(e=n.player)||void 0===e?void 0:e.el())||void 0===t||t.removeEventListener("keyup",i),l.off("touchstart",a),l.off("touchend",u)})}},{key:"addDisplay",value:function(){var e=this;this.progressReporterDisplay||(this.progressReporterDisplay=new Ui(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",function(){e.progressReporterDisplay=void 0}))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent("seekend"),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(Xi)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout(function(){e.isPlaying=!1,e.logEvent(eo),delete e.pauseTimeout},50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(Xi)),this.isPlaying&&!this.isSeeking&&this.logEvent($i)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(ro),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(to))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(no)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===to&&(t=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:t,type:e})}}},{key:"shouldUseCarriedOverTime",value:function(e){return this.lastPlayingTime&&(e===$i||e===Xi)}},{key:"shouldSaveCarriedOverTime",value:function(e){return e===$i||e===eo}},{key:"shouldClearCarriedOverTime",value:function(e){return e===no||e===ro}},{key:"flushBuffer",value:function(){for(var e,t,n=[],r={};this.eventBuffer.length;){var i=this.eventBuffer.shift();this.shouldClearCarriedOverTime(i.type)?delete this.lastPlayingTime:r.start?i.type===$i&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(i.type)&&(this.lastPlayingTime=i.time),r.end=i,n.push(r),r={}):(this.shouldUseCarriedOverTime(i.type)&&(i.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=i)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(e=this.player)||void 0===e||e.trigger("progressflush"),null===(t=this.progressReporterDisplay)||void 0===t||t.addEvents(n))}},{key:"validateEvents",value:function(e){var t=0;e.forEach(function(e){t+=e.end.time-e.start.time});var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),t<n}}],r&&qi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Yi);function oo(e){return oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oo(e)}function ao(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uo(r.key),r)}}function uo(e){var t=function(e){if("object"!=oo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oo(t)?t:t+""}function lo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lo=function(){return!!e})()}function co(e){return co=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},co(e)}function so(e,t){return so=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},so(e,t)}i.Z.registerPlugin("progressReporterPlugin",io);var fo=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=co(t),function(e,t){if(t&&("object"==oo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,lo()?Reflect.construct(t,n||[],co(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&so(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return i.Z.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&ao(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component")),po=["top","left","right","bottom"],ho={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};function yo(e){return yo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yo(e)}function vo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,go(r.key),r)}}function bo(e,t,n){return t&&mo(e.prototype,t),n&&mo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function go(e){var t=function(e){if("object"!=yo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yo(t)?t:t+""}function wo(e,t,n){return t=ko(t),function(e,t){if(t&&("object"==yo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oo()?Reflect.construct(t,n||[],ko(e).constructor):t.apply(e,n))}function Oo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oo=function(){return!!e})()}function So(){return So="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ko(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},So.apply(null,arguments)}function ko(e){return ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ko(e)}function Po(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&No(e,t)}function No(e,t){return No=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},No(e,t)}var jo=i.Z.getComponent("Component"),Co=function(e){function t(e,n){var r;return vo(this,t),(r=wo(this,t,[e,n])).bindEventListeners(),r}return Po(t,e),bo(t,[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=So(ko(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)}]);var e,n,r}},{key:"bindEventListeners",value:function(){var e=this,t=this.el(),n=function(t){t.preventDefault(),t.dataTransfer.dropEffect="move",e.addClass("cv-drag-over")},r=function(t){t.preventDefault(),e.removeClass("cv-drag-over"),e.player_.whiteboardModePlugin().setWhiteboardMode(e.options_.side)},i=function(){e.removeClass("cv-drag-over")};t.addEventListener("dragover",n),t.addEventListener("drop",r),t.addEventListener("dragleave",i),this.on("dispose",function(){t.removeEventListener("dragover",n),t.removeEventListener("drop",r),t.removeEventListener("dragleave",i)})}}])}(jo),To=function(e){function t(e,n){var r;return vo(this,t),(r=wo(this,t,[e,n])).addChildren(),r}return Po(t,e),bo(t,[{key:"addChildren",value:function(){var e=this;po.forEach(function(t){e.addChild(new Co(e.player_,{side:t}))})}}])}(jo);function Eo(e){return Eo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eo(e)}function _o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ro(r.key),r)}}function Ro(e){var t=function(e){if("object"!=Eo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Eo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Eo(t)?t:t+""}function xo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xo=function(){return!!e})()}function Io(e){return Io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Io(e)}function Mo(e,t){return Mo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mo(e,t)}var Bo=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Io(t),function(e,t){if(t&&("object"==Eo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,xo()?Reflect.construct(t,n||[],Io(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mo(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&_o(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function Lo(e){return Lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lo(e)}function Do(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ao(r.key),r)}}function Ao(e){var t=function(e){if("object"!=Lo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Lo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Lo(t)?t:t+""}function Fo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fo=function(){return!!e})()}function zo(){return zo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Zo(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},zo.apply(null,arguments)}function Zo(e){return Zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zo(e)}function Vo(e,t){return Vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vo(e,t)}var Uo=i.Z.getComponent("MenuButton"),Go=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Zo(t),function(e,t){if(t&&("object"==Lo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fo()?Reflect.construct(t,n||[],Zo(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vo(e,t)}(t,e),n=t,r=[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[new j(this.player_,{label:"Video Controls"})];return po.forEach(function(r){n.push(new Bo(e.player_,{side:r,label:ho[r],selectable:!0,multiSelectable:!1,selected:r===t}))}),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=zo(Zo(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.whiteboardModePlugin().side;return ho[e]}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.whiteboardModePlugin().isEnabled()&&this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Uo.prototype.handleClick.apply(this)}}],r&&Do(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Uo);function Ko(e){return Ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ko(e)}function qo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ho(r.key),r)}}function Ho(e){var t=function(e){if("object"!=Ko(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ko(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ko(t)?t:t+""}function Wo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wo=function(){return!!e})()}function Qo(e){return Qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qo(e)}function Jo(e,t){return Jo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jo(e,t)}var Yo="cv-whiteboard-side",Xo=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Qo(t),function(e,t){if(t&&("object"==Ko(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wo()?Reflect.construct(t,n||[],Qo(e).constructor):t.apply(e,n))}(this,t,[e])).side="bottom",n.enabled=!0,n.player.ready(function(){n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jo(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(qt()){var e=Ht(Yo);e&&(this.side=e)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var e,t,n=this;if(!(null===(t=(e=this.player).viewTranscriptPlugin)||void 0===t?void 0:t.call(e).isTranscriptOn())){var r=this.player.getChild("collapserator");this.dragHandle=new fo(this.player),this.button=new Go(this.player),r.addChild(this.dragHandle),r.addChild(this.button),this.player.trigger("cv-updatecog");var i=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","true")},o=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","false")},a=function(e){n.player.isFullscreen()&&(n.player.addClass("cv-dragging"),e.dataTransfer.setData("text/plain","handle"))},u=function(){n.player.isFullscreen()&&(n.player.removeClass("cv-dragging"),r.el().setAttribute("draggable","false"))};this.dragHandle.el().addEventListener("mousedown",i),this.dragHandle.el().addEventListener("mouseup",o),r.el().addEventListener("dragstart",a),r.el().addEventListener("dragend",u),this.on("dispose",function(){n.dragHandle.el().removeEventListener("mousedown",i),n.dragHandle.el().removeEventListener("mouseup",o),r.el().removeEventListener("dragstart",a),r.el().removeEventListener("dragend",u)})}}},{key:"initDragTargets",value:function(){this.player.addChild(new To(this.player))}},{key:"initFullscreenListener",value:function(){var e=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.player.on("cv-transcript-toggle",this.update),this.one("dispose",function(){e.player.off("fullscreenchange",e.update)})}},{key:"setWhiteboardMode",value:function(e){this.side=e,this.button.update(),qt()&&Wt(Yo,e),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"setEnabled",value:function(e){this.enabled=e,this.update()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"getSide",value:function(){return this.isEnabled()?this.side:"bottom"}},{key:"update",value:function(){var e,t;if(this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),i.Z.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.trigger("cv-updatecog"),this.isEnabled()){null===(t=this.dragHandle)||void 0===t||t.show();var n=this.getSide();this.player.isFullscreen()&&"bottom"!==n&&(this.player.addClass("cv-whiteboard-".concat(n)),i.Z.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}else null===(e=this.dragHandle)||void 0===e||e.hide()}}],r&&qo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function $o(e){return $o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$o(e)}function ea(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ta(r.key),r)}}function ta(e){var t=function(e){if("object"!=$o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$o(t)?t:t+""}function na(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(na=function(){return!!e})()}function ra(e){return ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ra(e)}function ia(e,t){return ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ia(e,t)}i.Z.registerPlugin("whiteboardModePlugin",Xo);var oa=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ra(t),function(e,t){if(t&&("object"==$o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,na()?Reflect.construct(t,n||[],ra(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ia(e,t)}(t,e),n=t,(r=[{key:"deferMenu",value:function(){var e={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",e)}},{key:"buildSubtitles",value:function(){for(var e=[],t=!1,n=this.player.textTracks(),r=0;r<n.length;r++){var i=n[r],o="showing"===i.mode;e.unshift({id:i.label,name:i.label,selected:o}),o&&(t=!0)}return e.push({id:null,name:"Off",selected:!t}),e}},{key:"buildQualities",value:function(){for(var e=[],t=this.player.qualityLevels(),n=0;n<t.length;n++){var r=t[n];e.push({id:r.id,name:r.id+"p",selected:r.enabled})}return e}},{key:"buildPlaybackSpeeds",value:function(){var e=this.player.playbackRate();return this.player.options_.playbackRates.map(function(t){return{id:t,name:t+"x"+(1===t?" (Normal)":""),selected:e===t}})}}])&&ea(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));i.Z.registerPlugin("deferMenusPlugin",oa);var aa="PreventScrubbingTooltip";function ua(e){return ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ua(e)}function la(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ca(r.key),r)}}function ca(e){var t=function(e){if("object"!=ua(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ua(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ua(t)?t:t+""}function sa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sa=function(){return!!e})()}function fa(e,t,n,r){var i=pa(ha(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function pa(){return pa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ha(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},pa.apply(null,arguments)}function ha(e){return ha=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ha(e)}function ya(e,t){return ya=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ya(e,t)}var va=i.Z.getComponent("Component"),da="cv-prevent-scrubbing-tooltip-show",ma="cv-prevent-scrubbing-tooltip-remove-transition",ba=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=ha(t),function(e,t){if(t&&("object"==ua(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sa()?Reflect.construct(t,n||[],ha(e).constructor):t.apply(e,n))}(this,t,arguments)).isShowing=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ya(e,t)}(t,e),n=t,r=[{key:"buildCSSClass",value:function(){return"cv-prevent-scrubbing-tooltip ".concat(fa(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return fa(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerText:"No skipping ahead!"}),r])}},{key:"show",value:function(){this.isShowing||(this.player_.userActive(!0),this.addClass(da),this.isShowing=!0)}},{key:"hide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isShowing&&(t&&(this.addClass(ma),window.requestAnimationFrame(function(){e.removeClass(ma)})),this.player_.userActive(!1),this.removeClass(da),this.isShowing=!1)}}],r&&la(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(va);function ga(e){return ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ga(e)}function wa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Oa(r.key),r)}}function Oa(e){var t=function(e){if("object"!=ga(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ga(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ga(t)?t:t+""}function Sa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sa=function(){return!!e})()}function ka(){return ka="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Pa(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ka.apply(null,arguments)}function Pa(e){return Pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pa(e)}function Na(e,t){return Na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Na(e,t)}i.Z.registerComponent(aa,ba);var ja=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Pa(t),function(e,t){if(t&&("object"==ga(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Sa()?Reflect.construct(t,n||[],Pa(e).constructor):t.apply(e,n))}(this,t,[e])).isEnabled=!1,r.isPreviewing=!1;var i=null!=n?n:{},o=i.furthestVisitedTime,a=void 0===o?0:o,u=i.isEnabled,l=void 0!==u&&u;return r.playerCurrentTimeFn=r.player.currentTime.bind(e),r.player.currentTime=r.currentTime.bind(r),r.onTimeUpdate=r.onTimeUpdate.bind(r),r.furthestVisitedTime=a,r.isEnabled=l,l&&r.enable(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Na(e,t)}(t,e),n=t,r=[{key:"dispose",value:function(){var e,n,r;this.player.currentTime=this.playerCurrentTimeFn,this.isEnabled&&(this.disable(),(e=t,n=this,"function"==typeof(r=ka(Pa(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([]))}},{key:"togglePreview",value:function(e){if(e){if(this.configurePreview(),this.isEnabled)return;this.enable(),this.isPreviewing=!0}else this.disable(),this.isPreviewing=!1}},{key:"configurePreview",value:function(){this.player.currentTime(0),this.furthestVisitedTime=0}},{key:"enable",value:function(){this.player.on("timeupdate",this.onTimeUpdate),this.getProgressControl().addChild(aa),this.isEnabled=!0}},{key:"disable",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.getProgressControl().removeChild(this.getPreventScrubbingTooltip()),this.isEnabled=!1}},{key:"getProgressControl",value:function(){return this.player.controlBar.getChild("progressControl")}},{key:"onTimeUpdate",value:function(){var e=this.playerCurrentTimeFn();e>this.furthestVisitedTime&&(this.furthestVisitedTime=e)}},{key:"currentTime",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if("number"!=typeof e)return this.playerCurrentTimeFn.apply(this,[e].concat(r));if(this.isEnabled){var o=this.getPreventScrubbingTooltip(),a=null===(t=this.getSeekBar())||void 0===t?void 0:t.getChild("MouseTimeDisplay");if(e>this.furthestVisitedTime)return o.show(),J(o.hide,1e3,!1,o)(),null==a||a.hide(),void this.playerCurrentTimeFn(this.furthestVisitedTime,r);null==a||a.show(),o.hide(!0),this.playerCurrentTimeFn(e,r)}else this.playerCurrentTimeFn.apply(this,[e].concat(r))}},{key:"getPreventScrubbingTooltip",value:function(){return this.getProgressControl().getChild(aa)}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}}],r&&wa(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function Ca(e){return Ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ca(e)}function Ta(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ea(r.key),r)}}function Ea(e){var t=function(e){if("object"!=Ca(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ca(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ca(t)?t:t+""}function _a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_a=function(){return!!e})()}function Ra(e){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ra(e)}function xa(e,t){return xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xa(e,t)}i.Z.registerPlugin("preventScrubbingPlugin",ja);var Ia=i.Z.getComponent("Button"),Ma="cv-muted",Ba=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Ra(t),function(e,t){if(t&&("object"==Ca(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_a()?Reflect.construct(t,n||[],Ra(e).constructor):t.apply(e,n))}(this,t,[e])).update(),n.update=n.update.bind(n),e.on("volumechange",n.update),e.on("dispose",function(){return e.off("volumechange",n.update)}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xa(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){this.player_.muted(!this.player_.muted()),this.update()}},{key:"update",value:function(){this.player_.muted()?this.addClass(Ma):this.removeClass(Ma)}},{key:"buildCSSClass",value:function(){return"cv-mute-button cv-muted"}}])&&Ta(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ia);function La(e){return La="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},La(e)}function Da(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Aa(r.key),r)}}function Aa(e){var t=function(e){if("object"!=La(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=La(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==La(t)?t:t+""}function Fa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fa=function(){return!!e})()}function za(){return za="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Za(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},za.apply(null,arguments)}function Za(e){return Za=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Za(e)}function Va(e,t){return Va=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Va(e,t)}i.Z.registerComponent("muteButton",Ba),Ba.prototype.controlText_="Mute";var Ua,Ga=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Za(t),function(e,t){if(t&&("object"==La(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fa()?Reflect.construct(t,n||[],Za(e).constructor):t.apply(e,n))}(this,t,[e,n]))._onClickHandler=n.onClickHandler,r.bindEventListeners(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Va(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return i.Z.dom.createEl("div",{className:"cv-player-overlay"})}},{key:"handleClick",value:function(e){"function"==typeof this._onClickHandler&&(e.stopImmediatePropagation(),this._onClickHandler())}},{key:"dispose",value:function(){var e,n,r;this.off("click",this.handleClick),(e=t,n=this,"function"==typeof(r=za(Za(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"bindEventListeners",value:function(){this.on("click",this.handleClick)}}],r&&Da(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Ka(e){return Ka="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ka(e)}function qa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ha(r.key),r)}}function Ha(e){var t=function(e){if("object"!=Ka(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ka(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ka(t)?t:t+""}function Wa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wa=function(){return!!e})()}function Qa(e){return Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qa(e)}function Ja(e,t){return Ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ja(e,t)}i.Z.registerComponent("playerOverlay",Ga),function(e){e.Default="play",e.Hover="hover"}(Ua||(Ua={}));var Ya=i.Z.getPlugin("plugin"),Xa="cv-preview-mode",$a=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Qa(t),function(e,t){if(t&&("object"==Ka(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wa()?Reflect.construct(t,n||[],Qa(e).constructor):t.apply(e,n))}(this,t,[e])).buttonAdded=!1,n.mode=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ja(e,t)}(t,e),n=t,(r=[{key:"getMode",value:function(){return this.mode}},{key:"setPlayerMode",value:function(e,t){var n=this.mode;if(this.mode=e,e===Ua.Hover)return this.buttonAdded||this.addButtons(t),this.player.addClass(Xa),this.enableSubtites(),this.mute(),this.removeActivityTimeout(),void this.player.trigger("resize");n===Ua.Hover&&(this.player.removeClass(Xa),this.disableSubtitles(),this.unmute(),this.restoreActivityTimeout(),this.player.trigger("resize"))}},{key:"addButtons",value:function(e){var t=new Ba(this.player),n=new Ga(this.player,{onClickHandler:e});this.player.addChild(t),this.player.addChild(n),this.buttonAdded=!0}},{key:"enableSubtites",value:function(){var e=this;this.player.dataLoaded(function(){return e.player.persistSubtitleSettingsPlugin().previewModeSubtitles()})}},{key:"disableSubtitles",value:function(){var e=this;this.player.dataLoaded(function(){return e.player.persistSubtitleSettingsPlugin().applyUserPreferences()})}},{key:"mute",value:function(){var e=this;this.player.ready(function(){e.player.persistVolumePlugin().disable(),e.player.muted(!0)})}},{key:"unmute",value:function(){var e=this;this.player.ready(function(){e.player.persistVolumePlugin().applyUserPreferences(),e.player.persistVolumePlugin().enable()})}},{key:"removeActivityTimeout",value:function(){this.player.cache_.inactivityTimeout=this.player.options_.inactivityTimeout,this.player.options_.inactivityTimeout=0}},{key:"restoreActivityTimeout",value:function(){this.player.options_.inactivityTimeout=this.player.cache_.inactivityTimeout}}])&&qa(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ya);function eu(e){return eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eu(e)}function tu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iu(r.key),r)}}function ru(e,t,n){return t&&nu(e.prototype,t),n&&nu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function iu(e){var t=function(e){if("object"!=eu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=eu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eu(t)?t:t+""}function ou(e,t,n){return t=uu(t),function(e,t){if(t&&("object"==eu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,au()?Reflect.construct(t,n||[],uu(e).constructor):t.apply(e,n))}function au(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(au=function(){return!!e})()}function uu(e){return uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uu(e)}function lu(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cu(e,t)}function cu(e,t){return cu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cu(e,t)}i.Z.registerPlugin("playerModePlugin",$a);var su=i.Z.getComponent("Component"),fu=i.Z.getComponent("ClickableComponent"),pu=function(e){function t(){return tu(this,t),ou(this,t,arguments)}return lu(t,e),ru(t,[{key:"createEl",value:function(){return su.prototype.createEl.call(this,"span",{className:"cv-favourite-button-svg",innerHTML:"<span class='cv-favourite-heart'>".concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Heart-Filled" d="m18.833 5.9735c-0.78916-0.95022-1.8839-1.4735-3.0826-1.4735-1.6859 0-2.7532 1.0685-3.3517 1.9648-0.15528 0.2326-0.28738 0.46582-0.39828 0.68529-0.11091-0.21946-0.24297-0.45269-0.39828-0.68529-0.5985-0.89636-1.6658-1.9648-3.3517-1.9648-1.1987 0-2.2935 0.52333-3.0827 1.4735-0.75275 0.90644-1.1673 2.1204-1.1673 3.4183 0 1.4128 0.51978 2.7268 1.6358 4.1353 0.99741 1.2588 2.4323 2.5564 4.0939 4.0589 0.61916 0.5599 1.2594 1.1389 1.9411 1.7718l0.02047 0.01903c0.08837 0.08211 0.19856 0.12313 0.30875 0.12313s0.22038-0.04105 0.30875-0.12313l0.02047-0.01903c0.68166-0.63289 1.3219-1.2119 1.9412-1.7719 1.6615-1.5024 3.0964-2.8 4.0938-4.0588 1.116-1.4085 1.6358-2.7225 1.6358-4.1353 0-1.2979-0.41459-2.5119-1.1674-3.4183z"/>\n </svg>\n',"</span><span class='cv-favourite-outline'>").concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Shape" d="m18.959 5.9741c-0.76992-0.92705-1.9357-1.5351-3.1052-1.5351-1.6448 0-2.8808 0.74937-3.4647 1.6238-0.15149 0.22693-0.28074 0.55125-0.38894 0.76537-0.10821-0.21411-0.23718-0.53844-0.38871-0.76537-0.58391-0.87451-1.8205-1.6238-3.4653-1.6238-1.1695 0-2.2376 0.60808-3.0075 1.5351-0.7344 0.88434-1.1388 1.9712-1.1388 3.2374 0 1.3784 0.50711 3.0509 1.5959 4.4251 0.97309 1.2281 2.373 2.4941 3.9941 3.9599 0.60406 0.54625 1.2285 1.1104 1.8936 1.7278l0.01997 0.01934c0.08622 0.08011 0.38931 0.21727 0.49681 0.21727 0.1075 0 0.40992-0.13796 0.49614-0.21804l0.0201-0.0178c0.66504-0.61746 1.2897-1.1824 1.8939-1.7287 1.621-1.4658 3.0209-2.7317 3.994-3.9598 1.0888-1.3742 1.5955-3.0467 1.5955-4.4251 0-1.2663-0.30646-2.3531-1.0409-3.2374zm-5.337 10.688c-0.51948 0.47226-1.0567 0.95549-1.6218 1.4768-0.56507-0.52124-1.101-1.0059-1.6219-1.4769-3.1725-2.8689-5.2684-4.7641-5.2684-7.2556 0-1.0298 0.32333-1.9863 0.91044-2.6933 0.59385-0.71497 1.4183-1.1088 2.3213-1.1088 1.254 0 2.0645 0.81976 2.5237 1.5074 0.41187 0.61679 0.62678 1.2385 0.70006 1.4772 0.06131 0.19978 0.23683 0.33499 0.43482 0.33499s0.37351-0.1352 0.43482-0.33499c0.07329-0.23867 0.28821-0.86044 0.70006-1.4773 0.45914-0.68766 1.2698-1.5074 2.5237-1.5074 0.90309 0 1.7274 0.39377 2.3213 1.1088 0.58714 0.70695 0.91047 1.6634 0.91047 2.6933 0 2.4914-2.1035 4.3783-5.2685 7.2557z" stroke-width=".97562"/>\n </svg>\n',"</span>")})}}])}(su),hu=function(e){function t(e,n){var r;return tu(this,t),(r=ou(this,t,[e,n])).isFavourited=n.isFavourited,r.renderIcon(),r.update(),r}return lu(t,e),ru(t,[{key:"renderIcon",value:function(){this.icon&&this.removeChild(this.icon),this.icon=new pu(this.player_),this.addChild(this.icon)}},{key:"update",value:function(){this.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"createEl",value:function(e,t,n){t=Object.assign({innerHTML:"",className:"cv-favourite-button"},t),n=Object.assign({type:"button"},n);var r=su.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(r),r}},{key:"handleClick",value:function(){this.isFavourited=!this.isFavourited,this.update(),this.options_.onClick&&this.options_.onClick(this.isFavourited)}}])}(fu);function yu(e){return yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yu(e)}function vu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,du(r.key),r)}}function du(e){var t=function(e){if("object"!=yu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yu(t)?t:t+""}function mu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mu=function(){return!!e})()}function bu(e){return bu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bu(e)}function gu(e,t){return gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gu(e,t)}hu.prototype.controlText_="Favourite";var wu=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=bu(t),function(e,t){if(t&&("object"==yu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,mu()?Reflect.construct(t,n||[],bu(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gu(e,t)}(t,e),n=t,(r=[{key:"setFavourite",value:function(e,t){if(!this.initialized){var n=new hu(this.player,{isFavourited:e,onClick:t});this.player.addChild(n),this.initialized=!0}}}])&&vu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function Ou(e){return Ou="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ou(e)}function Su(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ku(r.key),r)}}function ku(e){var t=function(e){if("object"!=Ou(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ou(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ou(t)?t:t+""}function Pu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pu=function(){return!!e})()}function Nu(e,t,n,r){var i=ju(Cu(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function ju(){return ju="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Cu(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ju.apply(null,arguments)}function Cu(e){return Cu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cu(e)}function Tu(e,t){return Tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tu(e,t)}i.Z.registerPlugin("favouritePlugin",wu);var Eu=i.Z.getComponent("MenuButton"),_u="Theatre mode (t)",Ru="Default view (t)",xu="cv-theatre-mode-button",Iu=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Cu(t),function(e,t){if(t&&("object"==Ou(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pu()?Reflect.construct(t,n||[],Cu(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.updateControlText(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tu(e,t)}(t,e),n=t,(r=[{key:"getCollabsibleName",value:function(){return""}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!(window.innerWidth<992)}},{key:"showCollapsibleMenu",value:function(){Nu(t,"handleClick",this,3)([null])}},{key:"buildCSSClass",value:function(){return"cv-default-mode-button ".concat(Nu(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Nu(t,"buildWrapperCSSClass",this,3)([]))}},{key:"handleClick",value:function(){this.player_.theatreModePlugin().toggleTheatreMode(void 0,{shouldLog:!0}),this.updateControlText()}},{key:"updateControlText",value:function(){this.player().theatreModePlugin().getTheatreMode()?this.controlText(Ru):this.controlText(_u)}}])&&Su(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Eu);function Mu(e){return Mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mu(e)}function Bu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Lu(r.key),r)}}function Lu(e){var t=function(e){if("object"!=Mu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Mu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mu(t)?t:t+""}function Du(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Du=function(){return!!e})()}function Au(){return Au="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Fu(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Au.apply(null,arguments)}function Fu(e){return Fu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fu(e)}function zu(e,t){return zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zu(e,t)}i.Z.registerComponent("theatreModeButton",Iu);var Zu=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Fu(t),function(e,t){if(t&&("object"==Mu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Du()?Reflect.construct(t,n||[],Fu(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,r.bindListeners(),e.ready(function(){return r.onReady()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zu(e,t)}(t,e),n=t,r=[{key:"bindListeners",value:function(){this.onResize=this.onResize.bind(this),this.onFullscreenChange=this.onFullscreenChange.bind(this),this.player.on("playerresize",this.onResize),this.player.on("fullscreenchange",this.onFullscreenChange)}},{key:"onReady",value:function(){if(this.options&&!(window.innerWidth<992)&&this.getCollapserator()){this.button=this.createButton();var e=this.options.theatreMode;e&&(this.toggleButton(!0),this.options.onRequestTheatreMode(e))}}},{key:"dispose",value:function(){var e,n,r;this.player.off("playerresize",this.onResize),this.player.off("fullscreenchange",this.onFullscreenChange),(e=t,n=this,"function"==typeof(r=Au(Fu(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"toggleTheatreMode",value:function(e,t){var n,r=this;if(this.options){var i=this.options.theatreMode,o=void 0!==e?e:!i;if(this.options.onRequestTheatreMode(o),this.options.theatreMode=o,window.requestAnimationFrame(function(){return r.player.trigger("resize")}),this.button)return i!==o&&(null==t?void 0:t.shouldLog)&&(null===(n=this.analyticsService)||void 0===n||n.logUserAction({id:this.options.playbackObject.videoId,name:this.options.playbackObject.title},{actionType:it.Vw.Click,descriptor:o?it.UX.EnableTheatreMode:it.UX.DisableTheatreMode,entity:it.py.Video})),o?(i||this.player.fill(!0),this.toggleButton(!0),o):(i&&this.player.fluid(!0),this.toggleButton(!1),this.player.viewTranscriptPlugin&&this.player.viewTranscriptPlugin().toggleTranscript(!1,{shouldLog:!1}),o)}}},{key:"onResize",value:function(){var e,t;window.innerWidth<992?null===(e=this.button)||void 0===e||e.hide():this.player.isFullscreen()||(this.button||(this.button=this.createButton()),null===(t=this.button)||void 0===t||t.show())}},{key:"createButton",value:function(){var e=this.getCollapserator();return(null==e?void 0:e.getChild("theatreModeButton"))||e.addChild("theatreModeButton",{},e.children_.length-3),null==e?void 0:e.getChild("theatreModeButton")}},{key:"onFullscreenChange",value:function(){var e,t;this.player.isFullscreen()?null===(e=this.button)||void 0===e||e.hide():null===(t=this.button)||void 0===t||t.show()}},{key:"getCollapserator",value:function(){return this.player.getChild("collapserator")}},{key:"getTheatreMode",value:function(){return this.options.theatreMode}},{key:"registerAnalytics",value:function(e){this.analyticsService=e}},{key:"toggleButton",value:function(e){var t;this.button&&(e?(this.button.addClass(xu),this.button.updateControlText(_u),this.button.setActive(!0)):(null===(t=this.button)||void 0===t||t.removeClass(xu),this.button.updateControlText(Ru),this.button.setActive(!1)))}}],r&&Bu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));i.Z.registerPlugin("theatreModePlugin",Zu);var Vu=n(18204),Uu=i.Z.getComponent("Menu"),Gu=Uu.prototype.createEl;Uu.prototype.createEl=function(){var e=Gu.call(this);return this.simpleBar=new Vu.Z(this.contentEl(),{autoHide:!1}),e};var Ku=Uu.prototype.contentEl;Uu.prototype.contentEl=function(){return this.simpleBar?this.simpleBar.getContentElement():Ku.call(this)};var qu=Uu.prototype.dispose;Uu.prototype.dispose=function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),qu.call(this)};var Hu=Uu.prototype.addItem;Uu.prototype.addItem=function(e){Hu.call(this,e),this.simpleBar.recalculate()};var Wu=Uu.prototype.lockShowing;Uu.prototype.lockShowing=function(){Wu.call(this),this.simpleBar.recalculate()},Uu.prototype.recalculateScrollBar=function(){this.simpleBar.recalculate()};var Qu=Uu.prototype.handleBlur;function Ju(e){return Ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ju(e)}function Yu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xu(r.key),r)}}function Xu(e){var t=function(e){if("object"!=Ju(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ju(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ju(t)?t:t+""}function $u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($u=function(){return!!e})()}function el(e){return el=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},el(e)}function tl(e,t){return tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tl(e,t)}Uu.prototype.handleBlur=function(e){var t=e.relatedTarget||document.activeElement;this.el().contains(t)||Qu.call(this,e)};var nl="cv-active-button",rl=i.Z.getComponent("Menu"),il=i.Z.getComponent("Component"),ol=i.Z.getComponent("MenuButton"),al=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=el(t),function(e,t){if(t&&("object"==Ju(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$u()?Reflect.construct(t,n||[],el(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tl(e,t)}(t,e),n=t,(r=[{key:"createMenu",value:function(){var e,t=new rl(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=i.Z.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(e=this.options_.title,"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})),tabIndex:-1});this.hideThreshold_+=1;var r=new il(this.player_,{el:n});t.addItem(r)}if(this.items=this.createItems(),this.items)for(var o=0;o<this.items.length;o++)t.addItem(this.items[o]);return t}}])&&Yu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ol),ul=ol.prototype.pressButton;ol.prototype.pressButton=function(){ul.call(this),this.inactivityTimeout=this.player_.cache_.inactivityTimeout,this.player_.cache_.inactivityTimeout=0,this.player_.options_.inactivityTimeout=0};var ll=ol.prototype.unpressButton;function cl(e){return cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cl(e)}function sl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fl(r.key),r)}}function fl(e){var t=function(e){if("object"!=cl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cl(t)?t:t+""}function pl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pl=function(){return!!e})()}function hl(e,t,n,r){var i=yl(vl(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function yl(){return yl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=vl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},yl.apply(null,arguments)}function vl(e){return vl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vl(e)}function dl(e,t){return dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dl(e,t)}ol.prototype.unpressButton=function(){ll.call(this),this.player_.cache_.inactivityTimeout=this.inactivityTimeout,this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.player_.reportUserActivity()},ol.prototype.setActive=function(e){e?this.addClass(nl):this.removeClass(nl)},i.Z.registerComponent("MenuButton",al);var ml=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=vl(t),function(e,t){if(t&&("object"==cl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pl()?Reflect.construct(t,n||[],vl(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dl(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(hl(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return hl(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&sl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function bl(e){return bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bl(e)}function gl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wl(r.key),r)}}function wl(e){var t=function(e){if("object"!=bl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bl(t)?t:t+""}function Ol(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ol=function(){return!!e})()}function Sl(e){return Sl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sl(e)}function kl(e,t){return kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kl(e,t)}ml.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},i.Z.registerComponent("TimeWrapper",ml);var Pl=i.Z.getComponent("SeekBar"),Nl=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Sl(t),function(e,t){if(t&&("object"==bl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ol()?Reflect.construct(t,n||[],Sl(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kl(e,t)}(t,e),n=t,(r=[{key:"handleMouseDown",value:function(e){var t=this.player_.preventScrubbingPlugin();t.isEnabled&&this.getMouseTime(e)>t.furthestVisitedTime||(Pl.prototype.handleMouseDown.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"))}},{key:"handleMouseMove",value:function(e){Pl.prototype.handleMouseMove.call(this,e),this.update()}},{key:"getPercent",value:function(){var e=this.player_.currentTime()/this.player_.duration();return e>=1?1:e}},{key:"handleMouseUp",value:function(e){var t=this;Pl.prototype.handleMouseUp.call(this,e),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){t.player_.removeClass("cv-disable-play-pause-feedback")},500)}},{key:"clamp",value:function(e,t,n){return Math.min(Math.max(e,t),n)}},{key:"getMouseTime",value:function(e){return this.clamp(Pl.prototype.calculateDistance.call(this,e).x,0,1)*this.player_.duration()}}])&&gl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Pl);function jl(e){return jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jl(e)}function Cl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tl(r.key),r)}}function Tl(e){var t=function(e){if("object"!=jl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=jl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jl(t)?t:t+""}function El(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(El=function(){return!!e})()}function _l(e,t,n,r){var i=Rl(xl(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Rl(){return Rl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=xl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Rl.apply(null,arguments)}function xl(e){return xl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xl(e)}function Il(e,t){return Il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Il(e,t)}i.Z.registerComponent("SeekBar",Nl);var Ml=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=xl(t),function(e,t){if(t&&("object"==jl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,El()?Reflect.construct(t,n||[],xl(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Il(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(_l(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return _l(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(e){this.el_.style.width=100*e+"%"}}])&&Cl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Bl(e){return Bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bl(e)}function Ll(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dl(r.key),r)}}function Dl(e){var t=function(e){if("object"!=Bl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bl(t)?t:t+""}function Al(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Al=function(){return!!e})()}function Fl(e,t,n,r){var i=zl(Zl(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function zl(){return zl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Zl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},zl.apply(null,arguments)}function Zl(e){return Zl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zl(e)}function Vl(e,t){return Vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vl(e,t)}var Ul=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Zl(t),function(e,t){if(t&&("object"==Bl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Al()?Reflect.construct(t,n||[],Zl(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vl(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Fl(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Fl(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(e){e>0&&e<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*e+"%"}}])&&Ll(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Gl(e){return Gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gl(e)}function Kl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ql(r.key),r)}}function ql(e){var t=function(e){if("object"!=Gl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gl(t)?t:t+""}function Hl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hl=function(){return!!e})()}function Wl(e,t,n,r){var i=Ql(Jl(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Ql(){return Ql="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Jl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ql.apply(null,arguments)}function Jl(e){return Jl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jl(e)}function Yl(e,t){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yl(e,t)}var Xl=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Jl(t),function(e,t){if(t&&("object"==Gl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hl()?Reflect.construct(t,n||[],Jl(e).constructor):t.apply(e,n))}(this,t,[e,n])).playProgress=new Ul(r.player_),r.addChild(r.playProgress),r.loadProgress=new Ml(r.player_),r.addChild(r.loadProgress),r.update(),r.updateBuffered(0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yl(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(Wl(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Wl(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var e=this.player_.duration()||3600,t=this.options_.endTime-this.options_.startTime;if(e!==this.duration_){var n=t/e;this.el_.style.width=100*n+"%";var r=this.options_.startTime/e;this.el_.style.left=100*r+"%",this.duration_=e}var i=this.getCurrentTime();i<this.options_.startTime?this.playProgress.update(0):i>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((i-this.options_.startTime)/t)}},{key:"updateBuffered",value:function(e){var t=this.options_.endTime-this.options_.startTime;e<this.options_.startTime?this.loadProgress.update(0):e>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((e-this.options_.startTime)/t)}}])&&Kl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function $l(e){for(var t=e.buffered(),n=e.currentTime(),r=0,i=0;i<t.length;i++){var o=t.start(i),a=t.end(i);if(o<=n&&a>=n){r=a;break}}return r}function ec(e){return ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ec(e)}function tc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nc(r.key),r)}}function nc(e){var t=function(e){if("object"!=ec(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ec(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ec(t)?t:t+""}function rc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rc=function(){return!!e})()}function ic(e,t,n,r){var i=oc(ac(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function oc(){return oc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ac(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},oc.apply(null,arguments)}function ac(e){return ac=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ac(e)}function uc(e,t){return uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uc(e,t)}var lc=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ac(t),function(e,t){if(t&&("object"==ec(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rc()?Reflect.construct(t,n||[],ac(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uc(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(ic(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return ic(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(){this.children_.forEach(function(e){e.update()})}},{key:"updateBuffered",value:function(){var e=this;this.children_.forEach(function(t){t.updateBuffered($l(e.player_))})}}])&&tc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function cc(e){return cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cc(e)}function sc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fc(r.key),r)}}function fc(e){var t=function(e){if("object"!=cc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cc(t)?t:t+""}function pc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pc=function(){return!!e})()}function hc(e,t,n,r){var i=yc(vc(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function yc(){return yc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=vc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},yc.apply(null,arguments)}function vc(e){return vc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vc(e)}function dc(e,t){return dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dc(e,t)}var mc=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=vc(t),function(e,t){if(t&&("object"==cc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pc()?Reflect.construct(t,n||[],vc(e).constructor):t.apply(e,n))}(this,t,[e,n])).onDurationChange=r.onDurationChange.bind(r),r.createChapterItems=r.createChapterItems.bind(r),r.updateBuffered=r.updateBuffered.bind(r),Q.useChapters(r.player_,r.createChapterItems),r.player_.on("durationchange",r.onDurationChange),r.player_.on("progress",r.updateBuffered),r.createChapterItems(),r.update(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dc(e,t)}(t,e),n=t,(r=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),hc(t,"dispose",this,3)([])}},{key:"createEl",value:function(){return i.Z.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar"),role:"progressbar"})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var e=hc(t,"update",this,3)([]);return this.chapterBarItems&&this.chapterBarItems.update(),e}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"bindUpdateListener",value:function(e){var t=this,n=function(){t.createChapterItems(),t.updateBuffered()};e.addEventListener("cv:cuechange",n),this.player_.one("dispose",function(){return e.removeEventListener("cv:cuechange",n)})}},{key:"createChapterItems",value:function(e){var t,n;e&&(this.track_||this.bindUpdateListener(e),this.track_=e);var r=new lc(this.player_);if((null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var i=0;i<this.track_.cues.length;i++){var o=this.track_.cues[i],a=o.startTime,u=o.endTime,l=this.player_.duration();l&&(i===this.track_.cues.length-1&&o.endTime<this.player_.duration()&&(u=this.player_.duration()),u>l&&(u=l));var c=new Xl(this.player_,{startTime:a,endTime:u});if(r.addChild(c),l&&u===l)break}else r.addChild(new Xl(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&sc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("SeekBar"));function bc(e){return bc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bc(e)}function gc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wc(r.key),r)}}function wc(e){var t=function(e){if("object"!=bc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bc(t)?t:t+""}function Oc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oc=function(){return!!e})()}function Sc(){return Sc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=kc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Sc.apply(null,arguments)}function kc(e){return kc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kc(e)}function Pc(e,t){return Pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pc(e,t)}mc.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},i.Z.browser.IS_IOS||i.Z.browser.IS_ANDROID||mc.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),i.Z.registerComponent("ChapterSeekBar",mc);var Nc=i.Z.getComponent("ProgressControl"),jc="seekBar",Cc=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=kc(t),function(e,t){if(t&&("object"==bc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oc()?Reflect.construct(t,n||[],kc(e).constructor):t.apply(e,n))}(this,t,arguments)).seekBarName_=jc,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pc(e,t)}(t,e),n=t,r=[{key:"setSeekBarName",value:function(e){this.seekBarName_=e}},{key:"getChild",value:function(e){return(null==e?void 0:e.toLowerCase())===jc.toLowerCase()&&(e=this.seekBarName_),(n=t,r=this,"function"==typeof(i=Sc(kc(1&3?n.prototype:n),"getChild",r))?function(e){return i.apply(r,e)}:i)([e]);var n,r,i}}],r&&gc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nc);function Tc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n<10?"0"+n:n)}function Ec(e){return Ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ec(e)}function _c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Rc(r.key),r)}}function Rc(e){var t=function(e){if("object"!=Ec(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ec(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ec(t)?t:t+""}function xc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xc=function(){return!!e})()}function Ic(){return Ic="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Mc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ic.apply(null,arguments)}function Mc(e){return Mc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mc(e)}function Bc(e,t){return Bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bc(e,t)}Cc.prototype.options_={children:[]},i.Z.registerComponent("ProgressControl",Cc);var Lc=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Mc(t),function(e,t){if(t&&("object"==Ec(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,xc()?Reflect.construct(t,n||[],Mc(e).constructor):t.apply(e,n))}(this,t,[e,n])).hasCustomChapterText=!1,Q.useChapters(r.player_,function(e){r.track_=e}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bc(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){var e,n,r,o=(e=t,n=this,"function"==typeof(r=Ic(Mc(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)([]);return this.chapter_=i.Z.dom.createEl("div"),o.appendChild(this.chapter_),this.time_=i.Z.dom.createEl("div"),o.appendChild(this.time_),o}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(i.Z.dom.textContent(this.time_,Tc(e,t)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],o=r.endTime||t;if(r.startTime<=e&&o>=e)return void i.Z.dom.textContent(this.chapter_,r.text)}i.Z.dom.textContent(this.chapter_,"")}}},{key:"clearChapterContent",value:function(){i.Z.dom.textContent(this.chapter_,"")}},{key:"updateText",value:function(e){i.Z.dom.textContent(this.time_,e)}},{key:"setCustomChapterText",value:function(e){this.hasCustomChapterText=!!e,i.Z.dom.textContent(this.chapter_,null!=e?e:"")}}],r&&_c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("TimeTooltip"));function Dc(e){return Dc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dc(e)}function Ac(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fc(r.key),r)}}function Fc(e){var t=function(e){if("object"!=Dc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dc(t)?t:t+""}function zc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zc=function(){return!!e})()}function Zc(){return Zc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Vc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Zc.apply(null,arguments)}function Vc(e){return Vc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vc(e)}function Uc(e,t){return Uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uc(e,t)}i.Z.registerComponent("TimeTooltip",Lc);var Gc=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Vc(t),function(e,t){if(t&&("object"==Dc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,zc()?Reflect.construct(t,n||[],Vc(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uc(e,t)}(t,e),n=t,r=[{key:"setTrack",value:function(e){this.track_=e}},{key:"createEl",value:function(){var e,n,r,o=(e=t,n=this,"function"==typeof(r=Zc(Vc(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{className:"cv-thumbnail-display"}]);return this.img_=i.Z.dom.createEl("img"),o.appendChild(this.img_),o}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(e){var t=e.indexOf("#");if(-1===t)return{src:e,w:0,h:0,x:0,y:0};var n=e.substr(0,t),r=e.substr(t+1);if("xywh="!==r.substr(0,5))return{src:e,w:0,h:0,x:0,y:0};var i=this.getScale(),o=r.substr(5).split(",");return{src:n,w:parseInt(o[2])*i,h:parseInt(o[3])*i,x:parseInt(o[0])*i,y:parseInt(o[1])*i}}},{key:"getScale",value:function(){var e=this.options_.scaleFactor,t=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==t&&(e*=2),e}},{key:"update",value:function(e){var t,n;if(null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length){for(var r,i=e,o=0;o<this.track_.cues.length;){var a=this.track_.cues[o];if(a.startTime<=i&&a.endTime>=i){r=this.parseImageLink(a.text);break}o++}if(null==r?void 0:r.src){this.enable();var u=r,l=u.src,c=u.w,s=u.h,f=u.x,p=u.y,h=this.getScale();this.img_.src=l,this.img_.style.left=-f+"px",this.img_.style.top=-p+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(h,")"),this.el_.style.width=c+"px",this.el_.style.height=s+"px"}else this.disable()}}}],r&&Ac(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Kc(e){return Kc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kc(e)}function qc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hc(r.key),r)}}function Hc(e){var t=function(e){if("object"!=Kc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kc(t)?t:t+""}function Wc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wc=function(){return!!e})()}function Qc(e){return Qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qc(e)}function Jc(e,t){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jc(e,t)}Gc.prototype.options_={scaleFactor:1},i.Z.registerComponent("ThumbnailDisplay",Gc);var Yc=i.Z.getComponent("MouseTimeDisplay"),Xc="cv-mouse-time-display-force-show",$c=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=Qc(t),function(e,t){if(t&&("object"==Kc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wc()?Reflect.construct(t,n||[],Qc(e).constructor):t.apply(e,n))}(this,t,[e,n]),Q.useMetadataTrack(r.player_,"thumbnails",function(e){r.getChild("ThumbnailDisplay").setTrack(e)}),r.update=r.update.bind(r),r.player_.on("durationchange",r.update),r.player_.one("dispose",function(){r.player_.off("durationchange",r.update)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)}(t,e),n=t,(r=[{key:"update",value:function(e,t){var n=this;this.requestAnimationFrame(function(){var r=n.getChild("TimeTooltip"),i=n.getChild("ThumbnailDisplay"),o=t*n.player_.duration(),a=n.player_.preventScrubbingPlugin(),u=n.player_.controlBar.getChild("progressControl").getChild(aa),l=!1;a.isEnabled&&(l=o>a.furthestVisitedTime),l?(n.hide(),u.show(),J(u.hide,1e3,!1,u)()):(n.show(),u&&u.hide(!0),i.update(o),r.updateTime(o));var c=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-c.width/2+"px";var s=e.width*t;s<c.width/2?n.el_.style.left=c.width/2+"px":s>e.width-c.width/2?n.el_.style.left=e.width-c.width/2+"px":n.el_.style.left=e.width*t+"px"})}},{key:"forceShow",value:function(){this.addClass(Xc)}},{key:"removeForceShow",value:function(){this.removeClass(Xc)}}])&&qc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Yc);function es(e){return es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},es(e)}function ts(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ns(r.key),r)}}function ns(e){var t=function(e){if("object"!=es(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=es(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==es(t)?t:t+""}function rs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rs=function(){return!!e})()}function is(){return is="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=os(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},is.apply(null,arguments)}function os(e){return os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},os(e)}function as(e,t){return as=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},as(e,t)}$c.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},i.Z.registerComponent("MouseTimeDisplay",$c);var us=i.Z.getComponent("ChaptersTrackMenuItem"),ls=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=os(t),function(e,t){if(t&&("object"==es(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rs()?Reflect.construct(t,n||[],os(e).constructor):t.apply(e,n))}(this,t,[e,n])).nonIconControl=!1,r.thumbnailDisplay=new Gc(r.player_,{scaleFactor:.5}),r.el().insertBefore(r.thumbnailDisplay.el(),r.el().firstChild),Q.useMetadataTrack(r.player_,"thumbnails",function(e){r.addClass("cv-has-thumbnails"),r.thumbnailDisplay.setTrack(e),r.thumbnailDisplay.update(r.options_.cue.startTime)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&as(e,t)}(t,e),n=t,r=[{key:"update",value:function(){this.player_&&us.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(e,n,r){return this.nonIconControl=!0,(i=t,o=this,"function"==typeof(a=is(os(1&3?i.prototype:i),"createEl",o))?function(e){return a.apply(o,e)}:a)(["li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},n),r]);var i,o,a}},{key:"getInnerHTML",value:function(){var e=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(Tc(this.options_.cue.startTime,e),")</p>")+"</span>"}}],r&&ts(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(us);function cs(e){return cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cs(e)}function ss(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fs(r.key),r)}}function fs(e){var t=function(e){if("object"!=cs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cs(t)?t:t+""}function ps(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ps=function(){return!!e})()}function hs(e,t,n,r){var i=ys(vs(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function ys(){return ys="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=vs(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ys.apply(null,arguments)}function vs(e){return vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vs(e)}function ds(e,t){return ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ds(e,t)}var ms=function(e){function t(e,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=function(e,t,n){return t=vs(t),function(e,t){if(t&&("object"==cs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ps()?Reflect.construct(t,n||[],vs(e).constructor):t.apply(e,n))}(this,t,[e,n,r])).alwaysCollapsed=!1,i.isCollapsed=!1,i.isCollabsible=!0,i.update=i.update.bind(i),i.player_.on("cv-whiteboard-change",i.update),i.player_.on("fullscreenchange",i.update),i.player_.on("dispose",function(){i.player_.off("cv-whiteboard-change",i.update),i.player_.off("fullscreenchange",i.update)}),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ds(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(hs(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(hs(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t||t.length<2)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new ls(this.player_,{track:this.track_,cue:i});e.push(o)}return e}},{key:"setTrack",value:function(e){var n=this;if(hs(t,"setTrack",this,3)([e]),this.track_&&"chapters"===this.track_.kind){e.one("loadeddata",this.update);var r=function(){n.update(),n.player_.trigger("resizemenus")};e.on("cv:cuechange",r),this.player_.one("dispose",function(){return e.off("cv:cueupdate",r)})}}},{key:"update",value:function(e){hs(t,"update",this,3)([e])}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var e=this.track_.activeCues[0];return(null==e?void 0:e.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var e=this.track_.cues;return!(!e||!e.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&ss(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("ChaptersButton"));function bs(e){return bs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bs(e)}function gs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ws(r.key),r)}}function ws(e){var t=function(e){if("object"!=bs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bs(t)?t:t+""}function Os(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Os=function(){return!!e})()}function Ss(){return Ss="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ks(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ss.apply(null,arguments)}function ks(e){return ks=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ks(e)}function Ps(e,t){return Ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ps(e,t)}i.Z.registerComponent("ChaptersButton",ms);var Ns=i.Z.getComponent("OffTextTrackMenuItem"),js=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n.track={player:e,kind:n.kind,kinds:n.kinds,default:!1,mode:"hidden"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,function(e,t,n){return t=ks(t),function(e,t){if(t&&("object"==bs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Os()?Reflect.construct(t,n||[],ks(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ps(e,t)}(t,e),n=t,r=[{key:"handleClick",value:function(e){Ns.prototype.handleClick.call(this,e);for(var t=this.player_.textTracks(),n=0;n<t.length;n++){var r=t[n];"subtitles"===r.kind&&(r.mode="hidden")}this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(e,n,r){return(i=t,o=this,"function"==typeof(a=Ss(ks(1&3?i.prototype:i),"createEl",o))?function(e){return a.apply(o,e)}:a)(["li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},n),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),r]);var i,o,a}}],r&&gs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ns);function Cs(e){return Cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cs(e)}function Ts(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Es(r.key),r)}}function Es(e){var t=function(e){if("object"!=Cs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cs(t)?t:t+""}function _s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_s=function(){return!!e})()}function Rs(e){return Rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rs(e)}function xs(e,t){return xs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xs(e,t)}i.Z.registerComponent("OffTextTrackMenuItem",js);var Is=i.Z.getComponent("TextTrackButton"),Ms=i.Z.getComponent("TextTrackMenuItem"),Bs=i.Z.getComponent("OffTextTrackMenuItem"),Ls=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Rs(t),function(e,t){if(t&&("object"==Cs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_s()?Reflect.construct(t,n||[],Rs(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xs(e,t)}(t,e),n=t,r=[{key:"createItems",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ms;this.label_&&(e="".concat(this.label_," off")),t.push(new Bs(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new n(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(o.kind,"-menu-item")),t.push(a)}}return this.player().trigger("resizemenus"),t}}],r&&Ts(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Is);i.Z.registerComponent("TextTrackButton",Ls);var Ds=n(16951),As=n(83983),Fs=n.n(As),zs=n(56050),Zs=n(81886),Vs=n(23481);const Us=JSON.parse('{"aa":{"englishName":"Afar","nativeName":"Qafar"},"aa-dj":{"englishName":"Afar (Djibouti)","nativeName":"Qafar (Yabuuti)"},"aa-er":{"englishName":"Afar (Eritrea)","nativeName":"Qafar (Eretria)"},"aa-et":{"englishName":"Afar (Ethiopia)","nativeName":"Qafar (Otobbia)"},"af":{"englishName":"Afrikaans","nativeName":"Afrikaans"},"af-na":{"englishName":"Afrikaans (Namibia)","nativeName":"Afrikaans (Namibië)"},"af-za":{"englishName":"Afrikaans (South Africa)","nativeName":"Afrikaans (Suid-Afrika)"},"agq":{"englishName":"Aghem","nativeName":"Aghem"},"agq-cm":{"englishName":"Aghem (Cameroon)","nativeName":"Aghem (K� m� lûŋ)"},"ak":{"englishName":"Akan","nativeName":"Akan"},"ak-gh":{"englishName":"Akan (Ghana)","nativeName":"Akan (Gaana)"},"am":{"englishName":"Amharic","nativeName":"�� ማርኛ"},"am-et":{"englishName":"Amharic (Ethiopia)","nativeName":"�� ማርኛ (ኢትዮጵያ)"},"ar":{"englishName":"Arabic","nativeName":"العربية"},"ar-001":{"englishName":"Arabic (World)","nativeName":"العربية (العالم)"},"ar-ae":{"englishName":"Arabic (United Arab Emirates)","nativeName":"العربية (الإمارات العربية المتحدة)"},"ar-bh":{"englishName":"Arabic (Bahrain)","nativeName":"العربية (البحرين)"},"ar-dj":{"englishName":"Arabic (Djibouti)","nativeName":"العربية (جيبوتي)"},"ar-dz":{"englishName":"Arabic (Algeria)","nativeName":"العربية (الجزائر)"},"ar-eg":{"englishName":"Arabic (Egypt)","nativeName":"العربية (مصر)"},"ar-er":{"englishName":"Arabic (Eritrea)","nativeName":"العربية (إريتريا)"},"ar-il":{"englishName":"Arabic (Israel)","nativeName":"العربية (إسرائيل)"},"ar-iq":{"englishName":"Arabic (Iraq)","nativeName":"العربية (العراق)"},"ar-jo":{"englishName":"Arabic (Jordan)","nativeName":"العربية (الأردن)"},"ar-km":{"englishName":"Arabic (Comoros)","nativeName":"العربية (جزر القمر)"},"ar-kw":{"englishName":"Arabic (Kuwait)","nativeName":"العربية (الكويت)"},"ar-lb":{"englishName":"Arabic (Lebanon)","nativeName":"العربية (لبنان)"},"ar-ly":{"englishName":"Arabic (Libya)","nativeName":"العربية (ليبيا)"},"ar-ma":{"englishName":"Arabic (Morocco)","nativeName":"العربية (المملكة المغربية)"},"ar-mr":{"englishName":"Arabic (Mauritania)","nativeName":"العربية (موريتانيا)"},"ar-om":{"englishName":"Arabic (Oman)","nativeName":"العربية (عمان)"},"ar-ps":{"englishName":"Arabic (Palestinian Authority)","nativeName":"العربية (السلطة الفلسطينية)"},"ar-qa":{"englishName":"Arabic (Qatar)","nativeName":"العربية (قطر)"},"ar-sa":{"englishName":"Arabic (Saudi Arabia)","nativeName":"العربية (المملكة العربية السعودية)"},"ar-sd":{"englishName":"Arabic (Sudan)","nativeName":"العربية (السودان)"},"ar-so":{"englishName":"Arabic (Somalia)","nativeName":"العربية (الصومال)"},"ar-ss":{"englishName":"Arabic (South Sudan)","nativeName":"العربية (جنوب السودان)"},"ar-sy":{"englishName":"Arabic (Syria)","nativeName":"العربية (سوريا)"},"ar-td":{"englishName":"Arabic (Chad)","nativeName":"العربية (تشاد)"},"ar-tn":{"englishName":"Arabic (Tunisia)","nativeName":"العربية (تونس)"},"ar-ye":{"englishName":"Arabic (Yemen)","nativeName":"العربية (اليمن)"},"arn":{"englishName":"Mapudungun","nativeName":"Mapudungun"},"arn-cl":{"englishName":"Mapudungun (Chile)","nativeName":"Mapudungun (Chile)"},"as":{"englishName":"Assamese","nativeName":"অসমীয়া"},"as-in":{"englishName":"Assamese (India)","nativeName":"অসমীয়া (ভাৰত)"},"asa":{"englishName":"Asu","nativeName":"Kipare"},"asa-tz":{"englishName":"Asu (Tanzania)","nativeName":"Kipare (Tadhania)"},"ast":{"englishName":"Asturian","nativeName":"asturianu"},"ast-es":{"englishName":"Asturian (Spain)","nativeName":"asturianu (España)"},"az":{"englishName":"Azerbaijani","nativeName":"azÉ™rbaycan dili"},"az-cyrl":{"englishName":"Azerbaijani (Cyrillic)","nativeName":"Азәрбајҹан дили"},"az-cyrl-az":{"englishName":"Azerbaijani (Cyrillic, Azerbaijan)","nativeName":"Азәрбајҹан дили (Азәрбајҹан)"},"az-latn":{"englishName":"Azerbaijani (Latin)","nativeName":"AzÉ™rbaycan dili"},"az-latn-az":{"englishName":"Azerbaijani (Latin, Azerbaijan)","nativeName":"AzÉ™rbaycan dili (AzÉ™rbaycan)"},"ba":{"englishName":"Bashkir","nativeName":"Башҡорт"},"ba-ru":{"englishName":"Bashkir (Russia)","nativeName":"Башҡорт (� әсәй)"},"bas":{"englishName":"Basaa","nativeName":"Ɓ� s� a"},"bas-cm":{"englishName":"Basaa (Cameroon)","nativeName":"Ɓ� s� a (K� mɛ̀rûn)"},"be":{"englishName":"Belarusian","nativeName":"Беларуская"},"be-by":{"englishName":"Belarusian (Belarus)","nativeName":"Беларуская (Беларусь)"},"bem":{"englishName":"Bemba","nativeName":"Ichibemba"},"bem-zm":{"englishName":"Bemba (Zambia)","nativeName":"Ichibemba (Zambia)"},"bez":{"englishName":"Bena","nativeName":"Hibena"},"bez-tz":{"englishName":"Bena (Tanzania)","nativeName":"Hibena (Hutanzania)"},"bg":{"englishName":"Bulgarian","nativeName":"български"},"bg-bg":{"englishName":"Bulgarian (Bulgaria)","nativeName":"български (България)"},"bin":{"englishName":"Edo","nativeName":"Ẹ̀dó"},"bin-ng":{"englishName":"Edo (Nigeria)","nativeName":"Ẹ̀dó (Nigeria)"},"bm":{"englishName":"Bamanankan","nativeName":"bamanakan"},"bm-latn":{"englishName":"Bamanankan (Latin)","nativeName":"bamanakan"},"bm-latn-ml":{"englishName":"Bamanankan (Latin, Mali)","nativeName":"bamanakan (Mali)"},"bn":{"englishName":"Bangla","nativeName":"বাংলা"},"bn-bd":{"englishName":"Bangla (Bangladesh)","nativeName":"বাংলা (বাংলাদেশ)"},"bn-in":{"englishName":"Bangla (India)","nativeName":"বাংলা (ভারত)"},"bo":{"englishName":"Tibetan","nativeName":"བོད་ཡིག"},"bo-cn":{"englishName":"Tibetan (China)","nativeName":"བོད་ཡིག (ཀྲུང་ཧྭ་མི་དམངས་སྤྱི་མཐུན་རྒྱལ་ཁབ།)"},"bo-in":{"englishName":"Tibetan (India)","nativeName":"བོད་སྐད་ (རྒྱ་གར་)"},"br":{"englishName":"Breton","nativeName":"brezhoneg"},"br-fr":{"englishName":"Breton (France)","nativeName":"brezhoneg (Frañs)"},"brx":{"englishName":"Bodo","nativeName":"बड़ो"},"brx-in":{"englishName":"Bodo (India)","nativeName":"बड़ो (भारत)"},"bs":{"englishName":"Bosnian","nativeName":"bosanski"},"bs-cyrl":{"englishName":"Bosnian (Cyrillic)","nativeName":"босански"},"bs-cyrl-ba":{"englishName":"Bosnian (Cyrillic, Bosnia and Herzegovina)","nativeName":"босански (Босна и Херцеговина)"},"bs-latn":{"englishName":"Bosnian (Latin)","nativeName":"bosanski"},"bs-latn-ba":{"englishName":"Bosnian (Latin, Bosnia and Herzegovina)","nativeName":"bosanski (Bosna i Hercegovina)"},"byn":{"englishName":"Blin","nativeName":"ብሊን"},"byn-er":{"englishName":"Blin (Eritrea)","nativeName":"ብሊን (ኤርትራ)"},"ca":{"englishName":"Catalan","nativeName":"catal� "},"ca-ad":{"englishName":"Catalan (Andorra)","nativeName":"catal� (Andorra)"},"ca-es":{"englishName":"Catalan (Catalan)","nativeName":"catal� (catal� )"},"ca-es-valencia":{"englishName":"Valencian (Spain)","nativeName":"valenci� (Espanya)"},"ca-fr":{"englishName":"Catalan (France)","nativeName":"catal� (França)"},"ca-it":{"englishName":"Catalan (Italy)","nativeName":"catal� (It� lia)"},"ce":{"englishName":"Chechen","nativeName":"нохчийн"},"ce-ru":{"englishName":"Chechen (Russia)","nativeName":"нохчийн (� осси)"},"cgg":{"englishName":"Chiga","nativeName":"Rukiga"},"cgg-ug":{"englishName":"Chiga (Uganda)","nativeName":"Rukiga (Uganda)"},"chr":{"englishName":"Cherokee","nativeName":"ᏣᎳᎩ"},"chr-cher":{"englishName":"Cherokee","nativeName":"ᏣᎳᎩ"},"chr-cher-us":{"englishName":"Cherokee (Cherokee)","nativeName":"ᏣᎳᎩ (ᏣᎳᎩ)"},"co":{"englishName":"Corsican","nativeName":"Corsu"},"co-fr":{"englishName":"Corsican (France)","nativeName":"Corsu (Francia)"},"cs":{"englishName":"Czech","nativeName":"čeÅ¡tina"},"cs-cz":{"englishName":"Czech (Czech Republic)","nativeName":"čeÅ¡tina (ÄŒeská republika)"},"cu":{"englishName":"Church Slavic","nativeName":"церковнослове́нскїй"},"cu-ru":{"englishName":"Church Slavic (Russia)","nativeName":"церковнослове́нскїй (рѡссі́а)"},"cy":{"englishName":"Welsh","nativeName":"Cymraeg"},"cy-gb":{"englishName":"Welsh (United Kingdom)","nativeName":"Cymraeg (Y Deyrnas Unedig)"},"da":{"englishName":"Danish","nativeName":"dansk"},"da-dk":{"englishName":"Danish (Denmark)","nativeName":"dansk (Danmark)"},"da-gl":{"englishName":"Danish (Greenland)","nativeName":"dansk (Grønland)"},"dav":{"englishName":"Taita","nativeName":"Kitaita"},"dav-ke":{"englishName":"Taita (Kenya)","nativeName":"Kitaita (Kenya)"},"de":{"englishName":"German","nativeName":"Deutsch"},"de-at":{"englishName":"German (Austria)","nativeName":"Deutsch (Österreich)"},"de-be":{"englishName":"German (Belgium)","nativeName":"Deutsch (Belgien)"},"de-ch":{"englishName":"German (Switzerland)","nativeName":"Deutsch (Schweiz)"},"de-de":{"englishName":"German (Germany)","nativeName":"Deutsch (Deutschland)"},"de-li":{"englishName":"German (Liechtenstein)","nativeName":"Deutsch (Liechtenstein)"},"de-lu":{"englishName":"German (Luxembourg)","nativeName":"Deutsch (Luxemburg)"},"dje":{"englishName":"Zarma","nativeName":"Zarmaciine"},"dje-ne":{"englishName":"Zarma (Niger)","nativeName":"Zarmaciine (Nižer)"},"dsb":{"englishName":"Lower Sorbian","nativeName":"dolnoserbšćina"},"dsb-de":{"englishName":"Lower Sorbian (Germany)","nativeName":"dolnoserbšćina (Nimska)"},"dua":{"englishName":"Duala","nativeName":"duálá"},"dua-cm":{"englishName":"Duala (Cameroon)","nativeName":"duálá (Cameroun)"},"dv":{"englishName":"Divehi","nativeName":"ދިވެހިބަސް"},"dv-mv":{"englishName":"Divehi (Maldives)","nativeName":"ދިވެހިބަސް (Þ‹Þ¨ÞˆÞ¬Þ€Þ¨ ÞƒÞ§Þ‡Þ°Þ–Þ¬)"},"dyo":{"englishName":"Jola-Fonyi","nativeName":"joola"},"dyo-sn":{"englishName":"Jola-Fonyi (Senegal)","nativeName":"joola (Senegal)"},"dz":{"englishName":"Dzongkha","nativeName":"རྫོང་ཁ"},"dz-bt":{"englishName":"Dzongkha (Bhutan)","nativeName":"རྫོང་ཁ (�� བྲུག)"},"ebu":{"englishName":"Embu","nativeName":"KÄ©embu"},"ebu-ke":{"englishName":"Embu (Kenya)","nativeName":"KÄ©embu (Kenya)"},"ee":{"englishName":"Ewe","nativeName":"EÊ‹egbe"},"ee-gh":{"englishName":"Ewe (Ghana)","nativeName":"EÊ‹egbe (Ghana nutome)"},"ee-tg":{"englishName":"Ewe (Togo)","nativeName":"EÊ‹egbe (Togo nutome)"},"el":{"englishName":"Greek","nativeName":"Ελληνικά"},"el-cy":{"englishName":"Greek (Cyprus)","nativeName":"Ελληνικά (Κύπρος)"},"el-gr":{"englishName":"Greek (Greece)","nativeName":"Ελληνικά (Ελλάδα)"},"en":{"englishName":"English","nativeName":"English"},"en-001":{"englishName":"English (World)","nativeName":"English (World)"},"en-029":{"englishName":"English (Caribbean)","nativeName":"English (Caribbean)"},"en-150":{"englishName":"English (Europe)","nativeName":"English (Europe)"},"en-ag":{"englishName":"English (Antigua and Barbuda)","nativeName":"English (Antigua and Barbuda)"},"en-ai":{"englishName":"English (Anguilla)","nativeName":"English (Anguilla)"},"en-as":{"englishName":"English (American Samoa)","nativeName":"English (American Samoa)"},"en-at":{"englishName":"English (Austria)","nativeName":"English (Austria)"},"en-au":{"englishName":"English (Australia)","nativeName":"English (Australia)"},"en-bb":{"englishName":"English (Barbados)","nativeName":"English (Barbados)"},"en-be":{"englishName":"English (Belgium)","nativeName":"English (Belgium)"},"en-bi":{"englishName":"English (Burundi)","nativeName":"English (Burundi)"},"en-bm":{"englishName":"English (Bermuda)","nativeName":"English (Bermuda)"},"en-bs":{"englishName":"English (Bahamas)","nativeName":"English (Bahamas)"},"en-bw":{"englishName":"English (Botswana)","nativeName":"English (Botswana)"},"en-bz":{"englishName":"English (Belize)","nativeName":"English (Belize)"},"en-ca":{"englishName":"English (Canada)","nativeName":"English (Canada)"},"en-cc":{"englishName":"English (Cocos (Keeling) Islands)","nativeName":"English (Cocos (Keeling) Islands)"},"en-ch":{"englishName":"English (Switzerland)","nativeName":"English (Switzerland)"},"en-ck":{"englishName":"English (Cook Islands)","nativeName":"English (Cook Islands)"},"en-cm":{"englishName":"English (Cameroon)","nativeName":"English (Cameroon)"},"en-cx":{"englishName":"English (Christmas Island)","nativeName":"English (Christmas Island)"},"en-cy":{"englishName":"English (Cyprus)","nativeName":"English (Cyprus)"},"en-de":{"englishName":"English (Germany)","nativeName":"English (Germany)"},"en-dk":{"englishName":"English (Denmark)","nativeName":"English (Denmark)"},"en-dm":{"englishName":"English (Dominica)","nativeName":"English (Dominica)"},"en-er":{"englishName":"English (Eritrea)","nativeName":"English (Eritrea)"},"en-fi":{"englishName":"English (Finland)","nativeName":"English (Finland)"},"en-fj":{"englishName":"English (Fiji)","nativeName":"English (Fiji)"},"en-fk":{"englishName":"English (Falkland Islands)","nativeName":"English (Falkland Islands)"},"en-fm":{"englishName":"English (Micronesia)","nativeName":"English (Micronesia)"},"en-gb":{"englishName":"English (United Kingdom)","nativeName":"English (United Kingdom)"},"en-gd":{"englishName":"English (Grenada)","nativeName":"English (Grenada)"},"en-gg":{"englishName":"English (Guernsey)","nativeName":"English (Guernsey)"},"en-gh":{"englishName":"English (Ghana)","nativeName":"English (Ghana)"},"en-gi":{"englishName":"English (Gibraltar)","nativeName":"English (Gibraltar)"},"en-gm":{"englishName":"English (Gambia)","nativeName":"English (Gambia)"},"en-gu":{"englishName":"English (Guam)","nativeName":"English (Guam)"},"en-gy":{"englishName":"English (Guyana)","nativeName":"English (Guyana)"},"en-hk":{"englishName":"English (Hong Kong SAR)","nativeName":"English (Hong Kong SAR)"},"en-id":{"englishName":"English (Indonesia)","nativeName":"English (Indonesia)"},"en-ie":{"englishName":"English (Ireland)","nativeName":"English (Ireland)"},"en-il":{"englishName":"English (Israel)","nativeName":"English (Israel)"},"en-im":{"englishName":"English (Isle of Man)","nativeName":"English (Isle of Man)"},"en-in":{"englishName":"English (India)","nativeName":"English (India)"},"en-io":{"englishName":"English (British Indian Ocean Territory)","nativeName":"English (British Indian Ocean Territory)"},"en-je":{"englishName":"English (Jersey)","nativeName":"English (Jersey)"},"en-jm":{"englishName":"English (Jamaica)","nativeName":"English (Jamaica)"},"en-ke":{"englishName":"English (Kenya)","nativeName":"English (Kenya)"},"en-ki":{"englishName":"English (Kiribati)","nativeName":"English (Kiribati)"},"en-kn":{"englishName":"English (Saint Kitts and Nevis)","nativeName":"English (Saint Kitts and Nevis)"},"en-ky":{"englishName":"English (Cayman Islands)","nativeName":"English (Cayman Islands)"},"en-lc":{"englishName":"English (Saint Lucia)","nativeName":"English (Saint Lucia)"},"en-lr":{"englishName":"English (Liberia)","nativeName":"English (Liberia)"},"en-ls":{"englishName":"English (Lesotho)","nativeName":"English (Lesotho)"},"en-mg":{"englishName":"English (Madagascar)","nativeName":"English (Madagascar)"},"en-mh":{"englishName":"English (Marshall Islands)","nativeName":"English (Marshall Islands)"},"en-mo":{"englishName":"English (Macao SAR)","nativeName":"English (Macao SAR)"},"en-mp":{"englishName":"English (Northern Mariana Islands)","nativeName":"English (Northern Mariana Islands)"},"en-ms":{"englishName":"English (Montserrat)","nativeName":"English (Montserrat)"},"en-mt":{"englishName":"English (Malta)","nativeName":"English (Malta)"},"en-mu":{"englishName":"English (Mauritius)","nativeName":"English (Mauritius)"},"en-mw":{"englishName":"English (Malawi)","nativeName":"English (Malawi)"},"en-my":{"englishName":"English (Malaysia)","nativeName":"English (Malaysia)"},"en-na":{"englishName":"English (Namibia)","nativeName":"English (Namibia)"},"en-nf":{"englishName":"English (Norfolk Island)","nativeName":"English (Norfolk Island)"},"en-ng":{"englishName":"English (Nigeria)","nativeName":"English (Nigeria)"},"en-nl":{"englishName":"English (Netherlands)","nativeName":"English (Netherlands)"},"en-nr":{"englishName":"English (Nauru)","nativeName":"English (Nauru)"},"en-nu":{"englishName":"English (Niue)","nativeName":"English (Niue)"},"en-nz":{"englishName":"English (New Zealand)","nativeName":"English (New Zealand)"},"en-pg":{"englishName":"English (Papua New Guinea)","nativeName":"English (Papua New Guinea)"},"en-ph":{"englishName":"English (Philippines)","nativeName":"English (Philippines)"},"en-pk":{"englishName":"English (Pakistan)","nativeName":"English (Pakistan)"},"en-pn":{"englishName":"English (Pitcairn Islands)","nativeName":"English (Pitcairn Islands)"},"en-pr":{"englishName":"English (Puerto Rico)","nativeName":"English (Puerto Rico)"},"en-pw":{"englishName":"English (Palau)","nativeName":"English (Palau)"},"en-rw":{"englishName":"English (Rwanda)","nativeName":"English (Rwanda)"},"en-sb":{"englishName":"English (Solomon Islands)","nativeName":"English (Solomon Islands)"},"en-sc":{"englishName":"English (Seychelles)","nativeName":"English (Seychelles)"},"en-sd":{"englishName":"English (Sudan)","nativeName":"English (Sudan)"},"en-se":{"englishName":"English (Sweden)","nativeName":"English (Sweden)"},"en-sg":{"englishName":"English (Singapore)","nativeName":"English (Singapore)"},"en-sh":{"englishName":"English (St Helena, Ascension, Tristan da Cunha)","nativeName":"English (St Helena, Ascension, Tristan da Cunha)"},"en-si":{"englishName":"English (Slovenia)","nativeName":"English (Slovenia)"},"en-sl":{"englishName":"English (Sierra Leone)","nativeName":"English (Sierra Leone)"},"en-ss":{"englishName":"English (South Sudan)","nativeName":"English (South Sudan)"},"en-sx":{"englishName":"English (Sint Maarten)","nativeName":"English (Sint Maarten)"},"en-sz":{"englishName":"English (Swaziland)","nativeName":"English (Swaziland)"},"en-tc":{"englishName":"English (Turks and Caicos Islands)","nativeName":"English (Turks and Caicos Islands)"},"en-tk":{"englishName":"English (Tokelau)","nativeName":"English (Tokelau)"},"en-to":{"englishName":"English (Tonga)","nativeName":"English (Tonga)"},"en-tt":{"englishName":"English (Trinidad and Tobago)","nativeName":"English (Trinidad and Tobago)"},"en-tv":{"englishName":"English (Tuvalu)","nativeName":"English (Tuvalu)"},"en-tz":{"englishName":"English (Tanzania)","nativeName":"English (Tanzania)"},"en-ug":{"englishName":"English (Uganda)","nativeName":"English (Uganda)"},"en-um":{"englishName":"English (U.S. Outlying Islands)","nativeName":"English (U.S. Outlying Islands)"},"en-us":{"englishName":"English (United States)","nativeName":"English (United States)"},"en-vc":{"englishName":"English (Saint Vincent and the Grenadines)","nativeName":"English (Saint Vincent and the Grenadines)"},"en-vg":{"englishName":"English (British Virgin Islands)","nativeName":"English (British Virgin Islands)"},"en-vi":{"englishName":"English (U.S. Virgin Islands)","nativeName":"English (U.S. Virgin Islands)"},"en-vu":{"englishName":"English (Vanuatu)","nativeName":"English (Vanuatu)"},"en-ws":{"englishName":"English (Samoa)","nativeName":"English (Samoa)"},"en-za":{"englishName":"English (South Africa)","nativeName":"English (South Africa)"},"en-zm":{"englishName":"English (Zambia)","nativeName":"English (Zambia)"},"en-zw":{"englishName":"English (Zimbabwe)","nativeName":"English (Zimbabwe)"},"eo":{"englishName":"Esperanto","nativeName":"esperanto"},"eo-001":{"englishName":"Esperanto (World)","nativeName":"esperanto (World)"},"es":{"englishName":"Spanish","nativeName":"español"},"es-419":{"englishName":"Spanish (Latin America)","nativeName":"español (Latinoamérica)"},"es-ar":{"englishName":"Spanish (Argentina)","nativeName":"español (Argentina)"},"es-bo":{"englishName":"Spanish (Bolivia)","nativeName":"español (Bolivia)"},"es-cl":{"englishName":"Spanish (Chile)","nativeName":"español (Chile)"},"es-co":{"englishName":"Spanish (Colombia)","nativeName":"español (Colombia)"},"es-cr":{"englishName":"Spanish (Costa Rica)","nativeName":"español (Costa Rica)"},"es-cu":{"englishName":"Spanish (Cuba)","nativeName":"español (Cuba)"},"es-do":{"englishName":"Spanish (Dominican Republic)","nativeName":"español (República Dominicana)"},"es-ec":{"englishName":"Spanish (Ecuador)","nativeName":"español (Ecuador)"},"es-es":{"englishName":"Spanish (Spain, International Sort)","nativeName":"español (España, alfabetización internacional)"},"es-gq":{"englishName":"Spanish (Equatorial Guinea)","nativeName":"español (Guinea Ecuatorial)"},"es-gt":{"englishName":"Spanish (Guatemala)","nativeName":"español (Guatemala)"},"es-hn":{"englishName":"Spanish (Honduras)","nativeName":"español (Honduras)"},"es-mx":{"englishName":"Spanish (Mexico)","nativeName":"español (México)"},"es-ni":{"englishName":"Spanish (Nicaragua)","nativeName":"español (Nicaragua)"},"es-pa":{"englishName":"Spanish (Panama)","nativeName":"español (Panamá)"},"es-pe":{"englishName":"Spanish (Peru)","nativeName":"español (Perú)"},"es-ph":{"englishName":"Spanish (Philippines)","nativeName":"español (Filipinas)"},"es-pr":{"englishName":"Spanish (Puerto Rico)","nativeName":"español (Puerto Rico)"},"es-py":{"englishName":"Spanish (Paraguay)","nativeName":"español (Paraguay)"},"es-sv":{"englishName":"Spanish (El Salvador)","nativeName":"español (El Salvador)"},"es-us":{"englishName":"Spanish (United States)","nativeName":"español (Estados Unidos)"},"es-uy":{"englishName":"Spanish (Uruguay)","nativeName":"español (Uruguay)"},"es-ve":{"englishName":"Spanish (Venezuela)","nativeName":"español (Venezuela)"},"et":{"englishName":"Estonian","nativeName":"eesti"},"et-ee":{"englishName":"Estonian (Estonia)","nativeName":"eesti (Eesti)"},"eu":{"englishName":"Basque","nativeName":"euskara"},"eu-es":{"englishName":"Basque (Basque)","nativeName":"euskara (euskara)"},"ewo":{"englishName":"Ewondo","nativeName":"ewondo"},"ewo-cm":{"englishName":"Ewondo (Cameroon)","nativeName":"ewondo (KamÉ™rún)"},"fa":{"englishName":"Persian","nativeName":"فارسى"},"fa-ir":{"englishName":"Persian (Iran)","nativeName":"فارسى (ایران)"},"ff":{"englishName":"Fulah","nativeName":"Fulah"},"ff-cm":{"englishName":"Fulah (Cameroon)","nativeName":"Pulaar (Kameruun)"},"ff-gn":{"englishName":"Fulah (Guinea)","nativeName":"Pulaar (Gine)"},"ff-latn":{"englishName":"Fulah","nativeName":"Fulah"},"ff-latn-sn":{"englishName":"Fulah (Latin, Senegal)","nativeName":"Fulah (Sénégal)"},"ff-mr":{"englishName":"Fulah (Mauritania)","nativeName":"Pulaar (Muritani)"},"ff-ng":{"englishName":"Fulah (Nigeria)","nativeName":"Pulaar (Nigeria)"},"fi":{"englishName":"Finnish","nativeName":"suomi"},"fi-fi":{"englishName":"Finnish (Finland)","nativeName":"suomi (Suomi)"},"fil":{"englishName":"Filipino","nativeName":"Filipino"},"fil-ph":{"englishName":"Filipino (Philippines)","nativeName":"Filipino (Pilipinas)"},"fo":{"englishName":"Faroese","nativeName":"føroyskt"},"fo-dk":{"englishName":"Faroese (Denmark)","nativeName":"føroyskt (Danmark)"},"fo-fo":{"englishName":"Faroese (Faroe Islands)","nativeName":"føroyskt (Føroyar)"},"fr":{"englishName":"French","nativeName":"français"},"fr-029":{"englishName":"French (Caribbean)","nativeName":"français (caraïbes)"},"fr-be":{"englishName":"French (Belgium)","nativeName":"français (Belgique)"},"fr-bf":{"englishName":"French (Burkina Faso)","nativeName":"français (Burkina Faso)"},"fr-bi":{"englishName":"French (Burundi)","nativeName":"français (Burundi)"},"fr-bj":{"englishName":"French (Benin)","nativeName":"français (Bénin)"},"fr-bl":{"englishName":"French (Saint Barthélemy)","nativeName":"français (Saint-Barthélemy)"},"fr-ca":{"englishName":"French (Canada)","nativeName":"français (Canada)"},"fr-cd":{"englishName":"French (Congo DRC)","nativeName":"français (Congo, République démocratique du)"},"fr-cf":{"englishName":"French (Central African Republic)","nativeName":"français (République centrafricaine)"},"fr-cg":{"englishName":"French (Congo)","nativeName":"français (Congo)"},"fr-ch":{"englishName":"French (Switzerland)","nativeName":"français (Suisse)"},"fr-ci":{"englishName":"French (Côte d’Ivoire)","nativeName":"français (Côte d’Ivoire)"},"fr-cm":{"englishName":"French (Cameroon)","nativeName":"français (Cameroun)"},"fr-dj":{"englishName":"French (Djibouti)","nativeName":"français (Djibouti)"},"fr-dz":{"englishName":"French (Algeria)","nativeName":"français (Algérie)"},"fr-fr":{"englishName":"French (France)","nativeName":"français (France)"},"fr-ga":{"englishName":"French (Gabon)","nativeName":"français (Gabon)"},"fr-gf":{"englishName":"French (French Guiana)","nativeName":"français (Guyane française)"},"fr-gn":{"englishName":"French (Guinea)","nativeName":"français (Guinée)"},"fr-gp":{"englishName":"French (Guadeloupe)","nativeName":"français (Guadeloupe)"},"fr-gq":{"englishName":"French (Equatorial Guinea)","nativeName":"français (Guinée équatoriale)"},"fr-ht":{"englishName":"French (Haiti)","nativeName":"français (Haïti)"},"fr-km":{"englishName":"French (Comoros)","nativeName":"français (Comores)"},"fr-lu":{"englishName":"French (Luxembourg)","nativeName":"français (Luxembourg)"},"fr-ma":{"englishName":"French (Morocco)","nativeName":"français (Maroc)"},"fr-mc":{"englishName":"French (Monaco)","nativeName":"français (Monaco)"},"fr-mf":{"englishName":"French (Saint Martin)","nativeName":"français (Saint-Martin)"},"fr-mg":{"englishName":"French (Madagascar)","nativeName":"français (Madagascar)"},"fr-ml":{"englishName":"French (Mali)","nativeName":"français (Mali)"},"fr-mq":{"englishName":"French (Martinique)","nativeName":"français (Martinique)"},"fr-mr":{"englishName":"French (Mauritania)","nativeName":"français (Mauritanie)"},"fr-mu":{"englishName":"French (Mauritius)","nativeName":"français (Maurice)"},"fr-nc":{"englishName":"French (New Caledonia)","nativeName":"français (Nouvelle-Calédonie)"},"fr-ne":{"englishName":"French (Niger)","nativeName":"français (Niger)"},"fr-pf":{"englishName":"French (French Polynesia)","nativeName":"français (Polynésie française)"},"fr-pm":{"englishName":"French (Saint Pierre and Miquelon)","nativeName":"français (Saint-Pierre-et-Miquelon)"},"fr-re":{"englishName":"French (Réunion)","nativeName":"français (La Réunion)"},"fr-rw":{"englishName":"French (Rwanda)","nativeName":"français (Rwanda)"},"fr-sc":{"englishName":"French (Seychelles)","nativeName":"français (Seychelles)"},"fr-sn":{"englishName":"French (Senegal)","nativeName":"français (Sénégal)"},"fr-sy":{"englishName":"French (Syria)","nativeName":"français (Syrie)"},"fr-td":{"englishName":"French (Chad)","nativeName":"français (Tchad)"},"fr-tg":{"englishName":"French (Togo)","nativeName":"français (Togo)"},"fr-tn":{"englishName":"French (Tunisia)","nativeName":"français (Tunisie)"},"fr-vu":{"englishName":"French (Vanuatu)","nativeName":"français (Vanuatu)"},"fr-wf":{"englishName":"French (Wallis and Futuna)","nativeName":"français (Wallis-et-Futuna)"},"fr-yt":{"englishName":"French (Mayotte)","nativeName":"français (Mayotte)"},"fur":{"englishName":"Friulian","nativeName":"furlan"},"fur-it":{"englishName":"Friulian (Italy)","nativeName":"furlan (Italie)"},"fy":{"englishName":"Western Frisian","nativeName":"Frysk"},"fy-nl":{"englishName":"Western Frisian (Netherlands)","nativeName":"Frysk (Nederlân)"},"ga":{"englishName":"Irish","nativeName":"Gaeilge"},"ga-ie":{"englishName":"Irish (Ireland)","nativeName":"Gaeilge (Éire)"},"gd":{"englishName":"Scottish Gaelic","nativeName":"G� idhlig"},"gd-gb":{"englishName":"Scottish Gaelic (United Kingdom)","nativeName":"G� idhlig (An Rìoghachd Aonaichte)"},"gl":{"englishName":"Galician","nativeName":"galego"},"gl-es":{"englishName":"Galician (Galician)","nativeName":"galego (galego)"},"gn":{"englishName":"Guarani","nativeName":"Avañe’ẽ"},"gn-py":{"englishName":"Guarani (Paraguay)","nativeName":"Avañe’ẽ (Paraguái)"},"gsw":{"englishName":"Alsatian","nativeName":"Elsässisch"},"gsw-ch":{"englishName":"Alsatian (Switzerland)","nativeName":"Elsässisch (Schwiiz)"},"gsw-fr":{"englishName":"Alsatian (France)","nativeName":"Elsässisch (Fr� nkrisch)"},"gsw-li":{"englishName":"Alsatian (Liechtenstein)","nativeName":"Elsässisch (Liächteschtäi)"},"gu":{"englishName":"Gujarati","nativeName":"ગુજરાતી"},"gu-in":{"englishName":"Gujarati (India)","nativeName":"ગુજરાતી (ભારત)"},"guz":{"englishName":"Gusii","nativeName":"Ekegusii"},"guz-ke":{"englishName":"Gusii (Kenya)","nativeName":"Ekegusii (Kenya)"},"gv":{"englishName":"Manx","nativeName":"Gaelg"},"gv-im":{"englishName":"Manx (Isle of Man)","nativeName":"Gaelg (Ellan Vannin)"},"ha":{"englishName":"Hausa","nativeName":"Hausa"},"ha-latn":{"englishName":"Hausa (Latin)","nativeName":"Hausa"},"ha-latn-gh":{"englishName":"Hausa (Latin, Ghana)","nativeName":"Hausa (Gana)"},"ha-latn-ne":{"englishName":"Hausa (Latin, Niger)","nativeName":"Hausa (Nijar)"},"ha-latn-ng":{"englishName":"Hausa (Latin, Nigeria)","nativeName":"Hausa (Najeriya)"},"haw":{"englishName":"Hawaiian","nativeName":"ʻŌlelo HawaiÊ»i"},"haw-us":{"englishName":"Hawaiian (United States)","nativeName":"ʻŌlelo HawaiÊ»i (Ê»Amelika Hui PÅ« Ê»Ia)"},"he":{"englishName":"Hebrew","nativeName":"עברית"},"he-il":{"englishName":"Hebrew (Israel)","nativeName":"עברית (ישראל)"},"hi":{"englishName":"Hindi","nativeName":"हिंदी"},"hi-in":{"englishName":"Hindi (India)","nativeName":"हिंदी (भारत)"},"hr":{"englishName":"Croatian","nativeName":"hrvatski"},"hr-ba":{"englishName":"Croatian (Bosnia and Herzegovina)","nativeName":"hrvatski (Bosna i Hercegovina)"},"hr-hr":{"englishName":"Croatian (Croatia)","nativeName":"hrvatski (Hrvatska)"},"hsb":{"englishName":"Upper Sorbian","nativeName":"hornjoserbšćina"},"hsb-de":{"englishName":"Upper Sorbian (Germany)","nativeName":"hornjoserbšćina (NÄ›mska)"},"hu":{"englishName":"Hungarian","nativeName":"magyar"},"hu-hu":{"englishName":"Hungarian (Hungary)","nativeName":"magyar (Magyarország)"},"hy":{"englishName":"Armenian","nativeName":"Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶"},"hy-am":{"englishName":"Armenian (Armenia)","nativeName":"Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶ (Õ€Õ¡ÕµÕ¡Õ½Õ¿Õ¡Õ¶)"},"ia":{"englishName":"Interlingua","nativeName":"interlingua"},"ia-001":{"englishName":"Interlingua (World)","nativeName":"interlingua (World)"},"ia-fr":{"englishName":"Interlingua (France)","nativeName":"interlingua (Francia)"},"ibb":{"englishName":"Ibibio","nativeName":"Ibibio-Efik"},"ibb-ng":{"englishName":"Ibibio (Nigeria)","nativeName":"Ibibio-Efik (Nigeria)"},"id":{"englishName":"Indonesian","nativeName":"Indonesia"},"id-id":{"englishName":"Indonesian (Indonesia)","nativeName":"Indonesia (Indonesia)"},"ig":{"englishName":"Igbo","nativeName":"Igbo"},"ig-ng":{"englishName":"Igbo (Nigeria)","nativeName":"Igbo (Nigeria)"},"ii":{"englishName":"Yi","nativeName":"ꆈ�� ꁱꂷ"},"ii-cn":{"englishName":"Yi (China)","nativeName":"ꆈ�� ꁱꂷ (ꍏꉸꏓꂱꇭꉼꇩ)"},"is":{"englishName":"Icelandic","nativeName":"íslenska"},"is-is":{"englishName":"Icelandic (Iceland)","nativeName":"íslenska (Ísland)"},"it":{"englishName":"Italian","nativeName":"italiano"},"it-ch":{"englishName":"Italian (Switzerland)","nativeName":"italiano (Svizzera)"},"it-it":{"englishName":"Italian (Italy)","nativeName":"italiano (Italia)"},"it-sm":{"englishName":"Italian (San Marino)","nativeName":"italiano (San Marino)"},"iu":{"englishName":"Inuktitut","nativeName":"Inuktitut"},"iu-cans":{"englishName":"Inuktitut (Syllabics)","nativeName":"ᐃᓄᒃᑎᑐᑦ"},"iu-cans-ca":{"englishName":"Inuktitut (Syllabics, Canada)","nativeName":"ᐃᓄᒃᑎᑐᑦ (ᑲᓇᑕᒥ)"},"iu-latn":{"englishName":"Inuktitut (Latin)","nativeName":"Inuktitut"},"iu-latn-ca":{"englishName":"Inuktitut (Latin, Canada)","nativeName":"Inuktitut (Kanatami)"},"ja":{"englishName":"Japanese","nativeName":"日本語"},"ja-jp":{"englishName":"Japanese (Japan)","nativeName":"日本語 (日本)"},"jgo":{"englishName":"Ngomba","nativeName":"Ndaꞌa"},"jgo-cm":{"englishName":"Ngomba (Cameroon)","nativeName":"Ndaꞌa (KamÉ›lûn)"},"jmc":{"englishName":"Machame","nativeName":"Kimachame"},"jmc-tz":{"englishName":"Machame (Tanzania)","nativeName":"Kimachame (Tanzania)"},"jv":{"englishName":"Javanese","nativeName":"Basa Jawa"},"jv-java":{"englishName":"Javanese (Javanese)","nativeName":"ꦧꦱꦗꦮ"},"jv-java-id":{"englishName":"Javanese (Javanese, Indonesia)","nativeName":"ꦧꦱꦗꦮ (Indonesia)"},"jv-latn":{"englishName":"Javanese","nativeName":"Basa Jawa"},"jv-latn-id":{"englishName":"Javanese (Indonesia)","nativeName":"Basa Jawa (Indonesia)"},"ka":{"englishName":"Georgian","nativeName":"ქა�� თული"},"ka-ge":{"englishName":"Georgian (Georgia)","nativeName":"ქა�� თული (საქა�� თველო)"},"kab":{"englishName":"Kabyle","nativeName":"Taqbaylit"},"kab-dz":{"englishName":"Kabyle (Algeria)","nativeName":"Taqbaylit (Lezzayer)"},"kam":{"englishName":"Kamba","nativeName":"Kikamba"},"kam-ke":{"englishName":"Kamba (Kenya)","nativeName":"Kikamba (Kenya)"},"kde":{"englishName":"Makonde","nativeName":"Chimakonde"},"kde-tz":{"englishName":"Makonde (Tanzania)","nativeName":"Chimakonde (Tanzania)"},"kea":{"englishName":"Kabuverdianu","nativeName":"kabuverdianu"},"kea-cv":{"englishName":"Kabuverdianu (Cabo Verde)","nativeName":"kabuverdianu (Kabu Verdi)"},"khq":{"englishName":"Koyra Chiini","nativeName":"Koyra ciini"},"khq-ml":{"englishName":"Koyra Chiini (Mali)","nativeName":"Koyra ciini (Maali)"},"ki":{"englishName":"Kikuyu","nativeName":"Gikuyu"},"ki-ke":{"englishName":"Kikuyu (Kenya)","nativeName":"Gikuyu (Kenya)"},"kk":{"englishName":"Kazakh","nativeName":"қазақ тілі"},"kk-kz":{"englishName":"Kazakh (Kazakhstan)","nativeName":"қазақ тілі (Қазақстан)"},"kkj":{"englishName":"Kako","nativeName":"kakÉ”"},"kkj-cm":{"englishName":"Kako (Cameroon)","nativeName":"kakÉ” (KamÉ›run)"},"kl":{"englishName":"Greenlandic","nativeName":"kalaallisut"},"kl-gl":{"englishName":"Greenlandic (Greenland)","nativeName":"kalaallisut (Kalaallit Nunaat)"},"kln":{"englishName":"Kalenjin","nativeName":"Kalenjin"},"kln-ke":{"englishName":"Kalenjin (Kenya)","nativeName":"Kalenjin (Emetab Kenya)"},"km":{"englishName":"Khmer","nativeName":"ភាសាខ្មែរ"},"km-kh":{"englishName":"Khmer (Cambodia)","nativeName":"ភាសាខ្មែរ (កម្ពុជា)"},"kn":{"englishName":"Kannada","nativeName":"ಕನ್ನಡ"},"kn-in":{"englishName":"Kannada (India)","nativeName":"ಕನ್ನಡ (ಭಾರತ)"},"ko":{"englishName":"Korean","nativeName":"한국어"},"ko-kp":{"englishName":"Korean (North Korea)","nativeName":"한국어 (조�� 민주주의인민공화국)"},"ko-kr":{"englishName":"Korean (Korea)","nativeName":"한국어(대한민국)"},"kok":{"englishName":"Konkani","nativeName":"कोंकणी"},"kok-in":{"englishName":"Konkani (India)","nativeName":"कोंकणी (भारत)"},"kr":{"englishName":"Kanuri","nativeName":"Kanuri"},"kr-ng":{"englishName":"Kanuri (Nigeria)","nativeName":"Kanuri (Nigeria)"},"ks":{"englishName":"Kashmiri","nativeName":"کٲشُر"},"ks-arab":{"englishName":"Kashmiri (Perso-Arabic)","nativeName":"کٲشُر"},"ks-arab-in":{"englishName":"Kashmiri (Perso-Arabic)","nativeName":"کٲشُر (اَربی)"},"ks-deva":{"englishName":"Kashmiri (Devanagari)","nativeName":"कॉशुर"},"ks-deva-in":{"englishName":"Kashmiri (Devanagari, India)","nativeName":"कॉशुर (India)"},"ksb":{"englishName":"Shambala","nativeName":"Kishambaa"},"ksb-tz":{"englishName":"Shambala (Tanzania)","nativeName":"Kishambaa (Tanzania)"},"ksf":{"englishName":"Bafia","nativeName":"rikpa"},"ksf-cm":{"englishName":"Bafia (Cameroon)","nativeName":"rikpa (kamÉ›rún)"},"ksh":{"englishName":"Ripuarian","nativeName":"Kölsch"},"ksh-de":{"englishName":"Ripuarian (Germany)","nativeName":"Kölsch (Doütschland)"},"ku":{"englishName":"Central Kurdish","nativeName":"کوردیی ناوەڕاست"},"ku-arab":{"englishName":"Central Kurdish","nativeName":"کوردیی ناوەڕاست"},"ku-arab-iq":{"englishName":"Central Kurdish (Iraq)","nativeName":"کوردیی ناوەڕاست (کوردستان)"},"ku-arab-ir":{"englishName":"Kurdish (Perso-Arabic, Iran)","nativeName":"کوردی (ئێران)"},"kw":{"englishName":"Cornish","nativeName":"kernewek"},"kw-gb":{"englishName":"Cornish (United Kingdom)","nativeName":"kernewek (Rywvaneth Unys)"},"ky":{"englishName":"Kyrgyz","nativeName":"Кыргыз"},"ky-kg":{"englishName":"Kyrgyz (Kyrgyzstan)","nativeName":"Кыргыз (Кыргызстан)"},"la":{"englishName":"Latin","nativeName":"lingua latÄ«na"},"la-001":{"englishName":"Latin (World)","nativeName":"lingua latÄ«na (World)"},"lag":{"englishName":"Langi","nativeName":"Kɨlaangi"},"lag-tz":{"englishName":"Langi (Tanzania)","nativeName":"Kɨlaangi (Taansanía)"},"lb":{"englishName":"Luxembourgish","nativeName":"Lëtzebuergesch"},"lb-lu":{"englishName":"Luxembourgish (Luxembourg)","nativeName":"Lëtzebuergesch (Lëtzebuerg)"},"lg":{"englishName":"Ganda","nativeName":"Luganda"},"lg-ug":{"englishName":"Ganda (Uganda)","nativeName":"Luganda (Yuganda)"},"lkt":{"englishName":"Lakota","nativeName":"Lakȟólʼiyapi"},"lkt-us":{"englishName":"Lakota (United States)","nativeName":"Lakȟólʼiyapi (MílahaÅ‹ska TÈŸamákÈŸočhe)"},"ln":{"englishName":"Lingala","nativeName":"lingála"},"ln-ao":{"englishName":"Lingala (Angola)","nativeName":"lingála (Angóla)"},"ln-cd":{"englishName":"Lingala (Congo DRC)","nativeName":"lingála (Repibiki demokratiki ya Kongó)"},"ln-cf":{"englishName":"Lingala (Central African Republic)","nativeName":"lingála (Repibiki ya Afríka ya Káti)"},"ln-cg":{"englishName":"Lingala (Congo)","nativeName":"lingála (Kongo)"},"lo":{"englishName":"Lao","nativeName":"ລາວ"},"lo-la":{"englishName":"Lao (Laos)","nativeName":"ລາວ (ລາວ)"},"lrc":{"englishName":"Northern Luri","nativeName":"لۊری شومالی"},"lrc-iq":{"englishName":"Northern Luri (Iraq)","nativeName":"لۊری شومالی (Iraq)"},"lrc-ir":{"englishName":"Northern Luri (Iran)","nativeName":"لۊری شومالی (Iran)"},"lt":{"englishName":"Lithuanian","nativeName":"lietuvių"},"lt-lt":{"englishName":"Lithuanian (Lithuania)","nativeName":"lietuvių (Lietuva)"},"lu":{"englishName":"Luba-Katanga","nativeName":"Tshiluba"},"lu-cd":{"englishName":"Luba-Katanga (Congo DRC)","nativeName":"Tshiluba (Ditunga wa Kongu)"},"luo":{"englishName":"Luo","nativeName":"Dholuo"},"luo-ke":{"englishName":"Luo (Kenya)","nativeName":"Dholuo (Kenya)"},"luy":{"englishName":"Luyia","nativeName":"Luluhia"},"luy-ke":{"englishName":"Luyia (Kenya)","nativeName":"Luluhia (Kenya)"},"lv":{"englishName":"Latvian","nativeName":"latvieÅ¡u"},"lv-lv":{"englishName":"Latvian (Latvia)","nativeName":"latvieÅ¡u (Latvija)"},"mas":{"englishName":"Masai","nativeName":"Maa"},"mas-ke":{"englishName":"Masai (Kenya)","nativeName":"Maa (Kenya)"},"mas-tz":{"englishName":"Masai (Tanzania)","nativeName":"Maa (Tansania)"},"mer":{"englishName":"Meru","nativeName":"KÄ©mÄ©rÅ©"},"mer-ke":{"englishName":"Meru (Kenya)","nativeName":"KÄ©mÄ©rÅ© (Kenya)"},"mfe":{"englishName":"Morisyen","nativeName":"kreol morisien"},"mfe-mu":{"englishName":"Morisyen (Mauritius)","nativeName":"kreol morisien (Moris)"},"mg":{"englishName":"Malagasy","nativeName":"Malagasy"},"mg-mg":{"englishName":"Malagasy (Madagascar)","nativeName":"Malagasy (Madagasikara)"},"mgh":{"englishName":"Makhuwa-Meetto","nativeName":"Makua"},"mgh-mz":{"englishName":"Makhuwa-Meetto (Mozambique)","nativeName":"Makua (Umozambiki)"},"mgo":{"englishName":"Metaʼ","nativeName":"metaʼ"},"mgo-cm":{"englishName":"Metaʼ (Cameroon)","nativeName":"metaʼ (Kamalun)"},"mi":{"englishName":"Maori","nativeName":"Reo Māori"},"mi-nz":{"englishName":"Maori (New Zealand)","nativeName":"Reo Māori (Aotearoa)"},"mk":{"englishName":"Macedonian","nativeName":"македонски"},"mk-mk":{"englishName":"Macedonian (Macedonia, FYRO)","nativeName":"македонски (� епублика Македонија)"},"ml":{"englishName":"Malayalam","nativeName":"മലയാളം"},"ml-in":{"englishName":"Malayalam (India)","nativeName":"മലയാളം (ഇന്ത്യ)"},"mn":{"englishName":"Mongolian","nativeName":"Монгол хэл"},"mn-cyrl":{"englishName":"Mongolian","nativeName":"монгол"},"mn-mn":{"englishName":"Mongolian (Mongolia)","nativeName":"монгол (Монгол)"},"mn-mong":{"englishName":"Mongolian (Traditional Mongolian)","nativeName":"� �� �� �� �� �� �� � � �� �� �� �"},"mn-mong-cn":{"englishName":"Mongolian (Traditional Mongolian, China)","nativeName":"� �� �� �� �� �� �� � � �� �� �� � (� �� �� �� �� �� � � �� � �� �� � �� �� � �� � � �� �� �� �� � �� � � � �� � � � �� �� �� �)"},"mn-mong-mn":{"englishName":"Mongolian (Traditional Mongolian, Mongolia)","nativeName":"� �� �� �� �� �� �� � � �� �� �� � (� �� �� �� �� �� �� � � �� �� �� �)"},"mni":{"englishName":"Manipuri","nativeName":"মৈতৈলোন্"},"mni-in":{"englishName":"Manipuri (India)","nativeName":"মৈতৈলোন্ (India)"},"moh":{"englishName":"Mohawk","nativeName":"Kanien’kéha"},"moh-ca":{"englishName":"Mohawk (Mohawk)","nativeName":"Kanien\'kéha"},"mr":{"englishName":"Marathi","nativeName":"मरा�� ी"},"mr-in":{"englishName":"Marathi (India)","nativeName":"मरा�� ी (भारत)"},"ms":{"englishName":"Malay","nativeName":"Bahasa Melayu"},"ms-bn":{"englishName":"Malay (Brunei)","nativeName":"Bahasa Melayu (Brunei)"},"ms-my":{"englishName":"Malay (Malaysia)","nativeName":"Bahasa Melayu (Malaysia)"},"ms-sg":{"englishName":"Malay (Singapore)","nativeName":"Bahasa Melayu (Singapura)"},"mt":{"englishName":"Maltese","nativeName":"Malti"},"mt-mt":{"englishName":"Maltese (Malta)","nativeName":"Malti (Malta)"},"mua":{"englishName":"Mundang","nativeName":"MUNDAÅŠ"},"mua-cm":{"englishName":"Mundang (Cameroon)","nativeName":"MUNDAÅŠ (kameruÅ‹)"},"my":{"englishName":"Burmese","nativeName":"ဗမာ"},"my-mm":{"englishName":"Burmese (Myanmar)","nativeName":"ဗမာ (မြန်မာ)"},"mzn":{"englishName":"Mazanderani","nativeName":"مازرونی"},"mzn-ir":{"englishName":"Mazanderani (Iran)","nativeName":"مازرونی (ایران)"},"naq":{"englishName":"Nama","nativeName":"Khoekhoegowab"},"naq-na":{"englishName":"Nama (Namibia)","nativeName":"Khoekhoegowab (Namibiab)"},"nb":{"englishName":"Norwegian BokmÃ¥l","nativeName":"norsk bokmÃ¥l"},"nb-no":{"englishName":"Norwegian BokmÃ¥l (Norway)","nativeName":"norsk bokmÃ¥l (Norge)"},"nb-sj":{"englishName":"Norwegian BokmÃ¥l (Svalbard and Jan Mayen)","nativeName":"norsk bokmÃ¥l (Svalbard og Jan Mayen)"},"nd":{"englishName":"North Ndebele","nativeName":"isiNdebele"},"nd-zw":{"englishName":"North Ndebele (Zimbabwe)","nativeName":"isiNdebele (Zimbabwe)"},"ne":{"englishName":"Nepali","nativeName":"नेपाली"},"ne-in":{"englishName":"Nepali (India)","nativeName":"नेपाली (भारत)"},"ne-np":{"englishName":"Nepali (Nepal)","nativeName":"नेपाली (नेपाल)"},"nl":{"englishName":"Dutch","nativeName":"Nederlands"},"nl-aw":{"englishName":"Dutch (Aruba)","nativeName":"Nederlands (Aruba)"},"nl-be":{"englishName":"Dutch (Belgium)","nativeName":"Nederlands (België)"},"nl-bq":{"englishName":"Dutch (Bonaire, Sint Eustatius and Saba)","nativeName":"Nederlands (Bonaire, Sint Eustatius en Saba)"},"nl-cw":{"englishName":"Dutch (Curaçao)","nativeName":"Nederlands (Curaçao)"},"nl-nl":{"englishName":"Dutch (Netherlands)","nativeName":"Nederlands (Nederland)"},"nl-sr":{"englishName":"Dutch (Suriname)","nativeName":"Nederlands (Suriname)"},"nl-sx":{"englishName":"Dutch (Sint Maarten)","nativeName":"Nederlands (Sint-Maarten)"},"nmg":{"englishName":"Kwasio","nativeName":"Kwasio"},"nmg-cm":{"englishName":"Kwasio (Cameroon)","nativeName":"Kwasio (Kamerun)"},"nn":{"englishName":"Norwegian Nynorsk","nativeName":"nynorsk"},"nn-no":{"englishName":"Norwegian Nynorsk (Norway)","nativeName":"nynorsk (Noreg)"},"nnh":{"englishName":"Ngiemboon","nativeName":"Shwóŋò ngiembɔɔn"},"nnh-cm":{"englishName":"Ngiemboon (Cameroon)","nativeName":"Shwóŋò ngiembɔɔn (K� malûm)"},"no":{"englishName":"Norwegian","nativeName":"norsk"},"nqo":{"englishName":"N\'ko","nativeName":"ߒߞߏ"},"nqo-gn":{"englishName":"N\'ko (Guinea)","nativeName":"ߒߞߏ (ߖߌ߬ߣߍ߬ ߞߊ߲ߓߍ߲)"},"nr":{"englishName":"South Ndebele","nativeName":"isiNdebele"},"nr-za":{"englishName":"South Ndebele (South Africa)","nativeName":"isiNdebele (South Africa)"},"nso":{"englishName":"Sesotho sa Leboa","nativeName":"Sesotho sa Leboa"},"nso-za":{"englishName":"Sesotho sa Leboa (South Africa)","nativeName":"Sesotho sa Leboa (Afrika Borwa)"},"nus":{"englishName":"Nuer","nativeName":"Thok Nath"},"nus-ss":{"englishName":"Nuer (South Sudan)","nativeName":"Thok Nath (South Sudan)"},"nyn":{"englishName":"Nyankole","nativeName":"Runyankore"},"nyn-ug":{"englishName":"Nyankole (Uganda)","nativeName":"Runyankore (Uganda)"},"oc":{"englishName":"Occitan","nativeName":"Occitan"},"oc-fr":{"englishName":"Occitan (France)","nativeName":"Occitan (França)"},"om":{"englishName":"Oromo","nativeName":"Oromoo"},"om-et":{"englishName":"Oromo (Ethiopia)","nativeName":"Oromoo (Itoophiyaa)"},"om-ke":{"englishName":"Oromo (Kenya)","nativeName":"Oromoo (Keeniyaa)"},"or":{"englishName":"Odia","nativeName":"ଓଡ଼ିଆ"},"or-in":{"englishName":"Odia (India)","nativeName":"ଓଡ଼ିଆ (ଭାରତ)"},"os":{"englishName":"Ossetian","nativeName":"Ирон æвзаг"},"os-ge":{"englishName":"Ossetian (Georgia)","nativeName":"Ирон æвзаг (Гуырдзыстон)"},"os-ru":{"englishName":"Ossetian (Russia)","nativeName":"Ирон æвзаг (Уӕрӕсе)"},"pa":{"englishName":"Punjabi","nativeName":"ਪੰਜਾਬੀ"},"pa-arab":{"englishName":"Punjabi","nativeName":"پنجابی"},"pa-arab-pk":{"englishName":"Punjabi (Pakistan)","nativeName":"پنجابی (پاکستان)"},"pa-in":{"englishName":"Punjabi (India)","nativeName":"ਪੰਜਾਬੀ (ਭਾਰਤ)"},"pap":{"englishName":"Papiamento","nativeName":"Papiamentu"},"pap-029":{"englishName":"Papiamento (Caribbean)","nativeName":"Papiamentu (Caribbean)"},"pl":{"englishName":"Polish","nativeName":"polski"},"pl-pl":{"englishName":"Polish (Poland)","nativeName":"polski (Polska)"},"prg":{"englishName":"Prussian","nativeName":"prÅ«siskan"},"prg-001":{"englishName":"Prussian (World)","nativeName":"prÅ«siskan (swÄ«tai)"},"prs":{"englishName":"Dari","nativeName":"درى"},"prs-af":{"englishName":"Dari (Afghanistan)","nativeName":"درى (افغانستان)"},"ps":{"englishName":"Pashto","nativeName":"پښتو"},"ps-af":{"englishName":"Pashto (Afghanistan)","nativeName":"پښتو (افغانستان)"},"pt":{"englishName":"Portuguese","nativeName":"português"},"pt-ao":{"englishName":"Portuguese (Angola)","nativeName":"português (Angola)"},"pt-br":{"englishName":"Portuguese (Brazil)","nativeName":"português (Brasil)"},"pt-cv":{"englishName":"Portuguese (Cabo Verde)","nativeName":"português (Cabo Verde)"},"pt-gw":{"englishName":"Portuguese (Guinea-Bissau)","nativeName":"português (Guiné-Bissau)"},"pt-mo":{"englishName":"Portuguese (Macao SAR)","nativeName":"português (RAE de Macau)"},"pt-mz":{"englishName":"Portuguese (Mozambique)","nativeName":"português (Moçambique)"},"pt-pt":{"englishName":"Portuguese (Portugal)","nativeName":"português (Portugal)"},"pt-st":{"englishName":"Portuguese (São Tomé and Príncipe)","nativeName":"português (São Tomé e Príncipe)"},"pt-tl":{"englishName":"Portuguese (Timor-Leste)","nativeName":"português (Timor-Leste)"},"quc":{"englishName":"K\'iche\'","nativeName":"K\'iche\'"},"quc-latn":{"englishName":"K\'iche\'","nativeName":"K\'iche\'"},"quc-latn-gt":{"englishName":"K\'iche\' (Guatemala)","nativeName":"K\'iche\' (Guatemala)"},"quz":{"englishName":"Quechua","nativeName":"runasimi"},"quz-bo":{"englishName":"Quechua (Bolivia)","nativeName":"runasimi (Qullasuyu)"},"quz-ec":{"englishName":"Quichua (Ecuador)","nativeName":"runa shimi (Ecuador Suyu)"},"quz-pe":{"englishName":"Quechua (Peru)","nativeName":"runasimi (Peru)"},"rm":{"englishName":"Romansh","nativeName":"rumantsch"},"rm-ch":{"englishName":"Romansh (Switzerland)","nativeName":"rumantsch (Svizra)"},"rn":{"englishName":"Rundi","nativeName":"Ikirundi"},"rn-bi":{"englishName":"Rundi (Burundi)","nativeName":"Ikirundi (Uburundi)"},"ro":{"englishName":"Romanian","nativeName":"română"},"ro-md":{"englishName":"Romanian (Moldova)","nativeName":"română (Republica Moldova)"},"ro-ro":{"englishName":"Romanian (Romania)","nativeName":"română (România)"},"rof":{"englishName":"Rombo","nativeName":"Kihorombo"},"rof-tz":{"englishName":"Rombo (Tanzania)","nativeName":"Kihorombo (Tanzania)"},"ru":{"englishName":"Russian","nativeName":"русский"},"ru-by":{"englishName":"Russian (Belarus)","nativeName":"русский (Беларусь)"},"ru-kg":{"englishName":"Russian (Kyrgyzstan)","nativeName":"русский (Киргизия)"},"ru-kz":{"englishName":"Russian (Kazakhstan)","nativeName":"русский (Казахстан)"},"ru-md":{"englishName":"Russian (Moldova)","nativeName":"русский (Молдова)"},"ru-ru":{"englishName":"Russian (Russia)","nativeName":"русский (� оссия)"},"ru-ua":{"englishName":"Russian (Ukraine)","nativeName":"русский (Украина)"},"rw":{"englishName":"Kinyarwanda","nativeName":"Kinyarwanda"},"rw-rw":{"englishName":"Kinyarwanda (Rwanda)","nativeName":"Kinyarwanda (Rwanda)"},"rwk":{"englishName":"Rwa","nativeName":"Kiruwa"},"rwk-tz":{"englishName":"Rwa (Tanzania)","nativeName":"Kiruwa (Tanzania)"},"sa":{"englishName":"Sanskrit","nativeName":"संस्कृत"},"sa-in":{"englishName":"Sanskrit (India)","nativeName":"संस्कृत (भारतम्)"},"sah":{"englishName":"Sakha","nativeName":"Саха"},"sah-ru":{"englishName":"Sakha (Russia)","nativeName":"Саха (� оссия)"},"saq":{"englishName":"Samburu","nativeName":"Kisampur"},"saq-ke":{"englishName":"Samburu (Kenya)","nativeName":"Kisampur (Kenya)"},"sbp":{"englishName":"Sangu","nativeName":"Ishisangu"},"sbp-tz":{"englishName":"Sangu (Tanzania)","nativeName":"Ishisangu (Tansaniya)"},"sd":{"englishName":"Sindhi","nativeName":"سنڌي"},"sd-arab":{"englishName":"Sindhi","nativeName":"سنڌي"},"sd-arab-pk":{"englishName":"Sindhi (Pakistan)","nativeName":"سنڌي (پاکستان)"},"sd-deva":{"englishName":"Sindhi (Devanagari)","nativeName":"सिन्धी"},"sd-deva-in":{"englishName":"Sindhi (Devanagari, India)","nativeName":"सिन्धी (India)"},"se":{"englishName":"Northern Sami","nativeName":"davvisámegiella"},"se-fi":{"englishName":"Sami, Northern (Finland)","nativeName":"davvisámegiella (Suopma)"},"se-no":{"englishName":"Sami, Northern (Norway)","nativeName":"davvisámegiella (Norga)"},"se-se":{"englishName":"Sami, Northern (Sweden)","nativeName":"davvisámegiella (Ruoŧŧa)"},"seh":{"englishName":"Sena","nativeName":"sena"},"seh-mz":{"englishName":"Sena (Mozambique)","nativeName":"sena (Moçambique)"},"ses":{"englishName":"Koyraboro Senni","nativeName":"Koyraboro senni"},"ses-ml":{"englishName":"Koyraboro Senni (Mali)","nativeName":"Koyraboro senni (Maali)"},"sg":{"englishName":"Sango","nativeName":"Sängö"},"sg-cf":{"englishName":"Sango (Central African Republic)","nativeName":"Sängö (Ködörösêse tî Bêafrîka)"},"shi":{"englishName":"Tachelhit","nativeName":"ⵜⴰⵛⵍⵃⵉⵜ"},"shi-latn":{"englishName":"Tachelhit (Latin)","nativeName":"Tashelḥiyt"},"shi-latn-ma":{"englishName":"Tachelhit (Latin, Morocco)","nativeName":"Tashelḥiyt (lmÉ£rib)"},"shi-tfng":{"englishName":"Tachelhit (Tifinagh)","nativeName":"ⵜⴰⵛⵍⵃⵉⵜ"},"shi-tfng-ma":{"englishName":"Tachelhit (Tifinagh, Morocco)","nativeName":"ⵜⴰⵛⵍⵃⵉⵜ (ⵍⵎⵖⵔⵉⴱ)"},"si":{"englishName":"Sinhala","nativeName":"සිංහල"},"si-lk":{"englishName":"Sinhala (Sri Lanka)","nativeName":"සිංහල (ශ්‍රී ලංකාව)"},"sk":{"englishName":"Slovak","nativeName":"slovenčina"},"sk-sk":{"englishName":"Slovak (Slovakia)","nativeName":"slovenčina (Slovensko)"},"sl":{"englishName":"Slovenian","nativeName":"slovenščina"},"sl-si":{"englishName":"Slovenian (Slovenia)","nativeName":"slovenščina (Slovenija)"},"sma":{"englishName":"Sami (Southern)","nativeName":"Ã¥arjelsaemiengïele"},"sma-no":{"englishName":"Sami, Southern (Norway)","nativeName":"Ã¥arjelsaemiengïele (Nöörje)"},"sma-se":{"englishName":"Sami, Southern (Sweden)","nativeName":"Ã¥arjelsaemiengïele (Sveerje)"},"smj":{"englishName":"Sami (Lule)","nativeName":"julevusámegiella"},"smj-no":{"englishName":"Sami, Lule (Norway)","nativeName":"julevusámegiella (Vuodna)"},"smj-se":{"englishName":"Sami, Lule (Sweden)","nativeName":"julevusámegiella (Svierik)"},"smn":{"englishName":"Sami (Inari)","nativeName":"anarâškielâ"},"smn-fi":{"englishName":"Sami, Inari (Finland)","nativeName":"anarâškielâ (Suomâ)"},"sms":{"englishName":"Sami (Skolt)","nativeName":"sää´mÇ©iõll"},"sms-fi":{"englishName":"Sami, Skolt (Finland)","nativeName":"sää´mÇ©iõll (Lää´ddjânnam)"},"sn":{"englishName":"Shona","nativeName":"chiShona"},"sn-latn":{"englishName":"Shona (Latin)","nativeName":"chiShona (Latin)"},"sn-latn-zw":{"englishName":"Shona (Latin, Zimbabwe)","nativeName":"chiShona (Zimbabwe)"},"so":{"englishName":"Somali","nativeName":"Soomaali"},"so-dj":{"englishName":"Somali (Djibouti)","nativeName":"Soomaali (Jabuuti)"},"so-et":{"englishName":"Somali (Ethiopia)","nativeName":"Soomaali (Itoobiya)"},"so-ke":{"englishName":"Somali (Kenya)","nativeName":"Soomaali (Kiiniya)"},"so-so":{"englishName":"Somali (Somalia)","nativeName":"Soomaali (Soomaaliya)"},"sq":{"englishName":"Albanian","nativeName":"shqip"},"sq-al":{"englishName":"Albanian (Albania)","nativeName":"shqip (Shqipëri)"},"sq-mk":{"englishName":"Albanian (Macedonia, FYRO)","nativeName":"shqip (Republika e Maqedonisë)"},"sq-xk":{"englishName":"Albanian (Kosovo)","nativeName":"shqip (Kosovë)"},"sr":{"englishName":"Serbian","nativeName":"srpski"},"sr-cyrl":{"englishName":"Serbian (Cyrillic)","nativeName":"српски"},"sr-cyrl-ba":{"englishName":"Serbian (Cyrillic, Bosnia and Herzegovina)","nativeName":"српски (Босна и Херцеговина)"},"sr-cyrl-me":{"englishName":"Serbian (Cyrillic, Montenegro)","nativeName":"српски (Црна Гора)"},"sr-cyrl-rs":{"englishName":"Serbian (Cyrillic, Serbia)","nativeName":"српски (Србија)"},"sr-cyrl-xk":{"englishName":"Serbian (Cyrillic, Kosovo)","nativeName":"српски (Косово)"},"sr-latn":{"englishName":"Serbian (Latin)","nativeName":"srpski"},"sr-latn-ba":{"englishName":"Serbian (Latin, Bosnia and Herzegovina)","nativeName":"srpski (Bosna i Hercegovina)"},"sr-latn-me":{"englishName":"Serbian (Latin, Montenegro)","nativeName":"srpski (Crna Gora)"},"sr-latn-rs":{"englishName":"Serbian (Latin, Serbia)","nativeName":"srpski (Srbija)"},"sr-latn-xk":{"englishName":"Serbian (Latin, Kosovo)","nativeName":"srpski (Kosovo)"},"ss":{"englishName":"siSwati","nativeName":"Siswati"},"ss-sz":{"englishName":"siSwati (Swaziland)","nativeName":"siSwati (Swaziland)"},"ss-za":{"englishName":"siSwati (South Africa)","nativeName":"siSwati (South Africa)"},"ssy":{"englishName":"Saho","nativeName":"Saho"},"ssy-er":{"englishName":"Saho (Eritrea)","nativeName":"Saho (Eretria)"},"st":{"englishName":"Sesotho","nativeName":"Sesotho"},"st-ls":{"englishName":"Sesotho (Lesotho)","nativeName":"Sesotho (Lesotho)"},"st-za":{"englishName":"Sesotho (South Africa)","nativeName":"Sesotho (South Africa)"},"sv":{"englishName":"Swedish","nativeName":"svenska"},"sv-ax":{"englishName":"Swedish (Ã…land Islands)","nativeName":"svenska (Ã…land)"},"sv-fi":{"englishName":"Swedish (Finland)","nativeName":"svenska (Finland)"},"sv-se":{"englishName":"Swedish (Sweden)","nativeName":"svenska (Sverige)"},"sw":{"englishName":"Kiswahili","nativeName":"Kiswahili"},"sw-cd":{"englishName":"Kiswahili (Congo DRC)","nativeName":"Kiswahili (Jamhuri ya Kidemokrasia ya Kongo)"},"sw-ke":{"englishName":"Kiswahili (Kenya)","nativeName":"Kiswahili (Kenya)"},"sw-tz":{"englishName":"Kiswahili (Tanzania)","nativeName":"Kiswahili (Tanzania)"},"sw-ug":{"englishName":"Kiswahili (Uganda)","nativeName":"Kiswahili (Uganda)"},"syr":{"englishName":"Syriac","nativeName":"ܣܘܪܝܝܐ"},"syr-sy":{"englishName":"Syriac (Syria)","nativeName":"ܣܘܪܝܝܐ (ܣܘܪܝܐ)"},"ta":{"englishName":"Tamil","nativeName":"தமிழ்"},"ta-in":{"englishName":"Tamil (India)","nativeName":"தமிழ் (இந்தியா)"},"ta-lk":{"englishName":"Tamil (Sri Lanka)","nativeName":"தமிழ் (இலங்கை)"},"ta-my":{"englishName":"Tamil (Malaysia)","nativeName":"தமிழ் (மலேசியா)"},"ta-sg":{"englishName":"Tamil (Singapore)","nativeName":"தமிழ் (சிங்கப்பூர்)"},"te":{"englishName":"Telugu","nativeName":"తెలుగు"},"te-in":{"englishName":"Telugu (India)","nativeName":"తెలుగు (భారత దేశం)"},"teo":{"englishName":"Teso","nativeName":"Kiteso"},"teo-ke":{"englishName":"Teso (Kenya)","nativeName":"Kiteso (Kenia)"},"teo-ug":{"englishName":"Teso (Uganda)","nativeName":"Kiteso (Uganda)"},"tg":{"englishName":"Tajik","nativeName":"Тоҷикӣ"},"tg-cyrl":{"englishName":"Tajik (Cyrillic)","nativeName":"Тоҷикӣ"},"tg-cyrl-tj":{"englishName":"Tajik (Cyrillic, Tajikistan)","nativeName":"Тоҷикӣ (Тоҷикистон)"},"th":{"englishName":"Thai","nativeName":"ไทย"},"th-th":{"englishName":"Thai (Thailand)","nativeName":"ไทย (ไทย)"},"ti":{"englishName":"Tigrinya","nativeName":"ትግርኛ"},"ti-er":{"englishName":"Tigrinya (Eritrea)","nativeName":"ትግርኛ (ኤርትራ)"},"ti-et":{"englishName":"Tigrinya (Ethiopia)","nativeName":"ትግርኛ (ኢትዮጵያ)"},"tig":{"englishName":"Tigre","nativeName":"ትግረ"},"tig-er":{"englishName":"Tigre (Eritrea)","nativeName":"ትግረ (ኤርትራ)"},"tk":{"englishName":"Turkmen","nativeName":"Türkmen dili"},"tk-tm":{"englishName":"Turkmen (Turkmenistan)","nativeName":"Türkmen dili (Türkmenistan)"},"tn":{"englishName":"Setswana","nativeName":"Setswana"},"tn-bw":{"englishName":"Setswana (Botswana)","nativeName":"Setswana (Botswana)"},"tn-za":{"englishName":"Setswana (South Africa)","nativeName":"Setswana (Aforika Borwa)"},"to":{"englishName":"Tongan","nativeName":"lea fakatonga"},"to-to":{"englishName":"Tongan (Tonga)","nativeName":"lea fakatonga (Tonga)"},"tr":{"englishName":"Turkish","nativeName":"Türkçe"},"tr-cy":{"englishName":"Turkish (Cyprus)","nativeName":"Türkçe (Kıbrıs)"},"tr-tr":{"englishName":"Turkish (Turkey)","nativeName":"Türkçe (Türkiye)"},"ts":{"englishName":"Tsonga","nativeName":"Xitsonga"},"ts-za":{"englishName":"Xitsonga (South Africa)","nativeName":"Xitsonga (South Africa)"},"tt":{"englishName":"Tatar","nativeName":"Татар"},"tt-ru":{"englishName":"Tatar (Russia)","nativeName":"Татар (� оссия)"},"twq":{"englishName":"Tasawaq","nativeName":"Tasawaq senni"},"twq-ne":{"englishName":"Tasawaq (Niger)","nativeName":"Tasawaq senni (Nižer)"},"tzm":{"englishName":"Central Atlas Tamazight","nativeName":"TamaziÉ£t n laá¹­laá¹£"},"tzm-arab":{"englishName":"Central Atlas Tamazight (Arabic)","nativeName":"أطلس المركزية التامازيتية"},"tzm-arab-ma":{"englishName":"Central Atlas Tamazight (Arabic, Morocco)","nativeName":"أطلس المركزية التامازيتية (Morocco)"},"tzm-latn":{"englishName":"Central Atlas Tamazight (Latin)","nativeName":"TamaziÉ£t n laá¹­laá¹£"},"tzm-latn-dz":{"englishName":"Central Atlas Tamazight (Latin, Algeria)","nativeName":"TamaziÉ£t n laá¹­laá¹£ (Djazaïr)"},"tzm-latn-ma":{"englishName":"Central Atlas Tamazight (Latin, Morocco)","nativeName":"TamaziÉ£t n laá¹­laá¹£ (Meṛṛuk)"},"tzm-tfng":{"englishName":"Central Atlas Tamazight (Tifinagh)","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ"},"tzm-tfng-ma":{"englishName":"Central Atlas Tamazight (Tifinagh, Morocco)","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ (ⵍⵎⵖⵔⵉⴱ)"},"ug":{"englishName":"Uyghur","nativeName":"ئۇيغۇرچە"},"ug-cn":{"englishName":"Uyghur (China)","nativeName":"ئۇيغۇرچە (جۇڭخۇا خەلق جۇمھۇرىيىتى)"},"uk":{"englishName":"Ukrainian","nativeName":"українська"},"uk-ua":{"englishName":"Ukrainian (Ukraine)","nativeName":"українська (Україна)"},"ur":{"englishName":"Urdu","nativeName":"اُردو"},"ur-in":{"englishName":"Urdu (India)","nativeName":"اردو (بھارت)"},"ur-pk":{"englishName":"Urdu (Pakistan)","nativeName":"اُردو (پاکستان)"},"uz":{"englishName":"Uzbek","nativeName":"o‘zbek"},"uz-arab":{"englishName":"Uzbek (Perso-Arabic)","nativeName":"اوزبیک"},"uz-arab-af":{"englishName":"Uzbek (Perso-Arabic, Afghanistan)","nativeName":"اوزبیک (افغانستان)"},"uz-cyrl":{"englishName":"Uzbek (Cyrillic)","nativeName":"Ўзбек"},"uz-cyrl-uz":{"englishName":"Uzbek (Cyrillic, Uzbekistan)","nativeName":"Ўзбек (Ўзбекистон)"},"uz-latn":{"englishName":"Uzbek (Latin)","nativeName":"o‘zbek"},"uz-latn-uz":{"englishName":"Uzbek (Latin, Uzbekistan)","nativeName":"o‘zbek (OÊ»zbekiston)"},"vai":{"englishName":"Vai","nativeName":"ꕙꔤ"},"vai-latn":{"englishName":"Vai (Latin)","nativeName":"Vai"},"vai-latn-lr":{"englishName":"Vai (Latin, Liberia)","nativeName":"Vai (Laibhiya)"},"vai-vaii":{"englishName":"Vai (Vai)","nativeName":"ꕙꔤ"},"vai-vaii-lr":{"englishName":"Vai (Vai, Liberia)","nativeName":"ꕙꔤ (ꕞꔤꔫꕩ)"},"ve":{"englishName":"Venda","nativeName":"Tshivenḓa"},"ve-za":{"englishName":"Venda (South Africa)","nativeName":"Tshivenḓa (South Africa)"},"vi":{"englishName":"Vietnamese","nativeName":"Tiếng Việt"},"vi-vn":{"englishName":"Vietnamese (Vietnam)","nativeName":"Tiếng Việt (Việt Nam)"},"vo":{"englishName":"Volapük","nativeName":"Volapük"},"vo-001":{"englishName":"Volapük (World)","nativeName":"Volapük (World)"},"vun":{"englishName":"Vunjo","nativeName":"Kyivunjo"},"vun-tz":{"englishName":"Vunjo (Tanzania)","nativeName":"Kyivunjo (Tanzania)"},"wae":{"englishName":"Walser","nativeName":"Walser"},"wae-ch":{"englishName":"Walser (Switzerland)","nativeName":"Walser (Schwiz)"},"wal":{"englishName":"Wolaytta","nativeName":"ወላይታቱ"},"wal-et":{"englishName":"Wolaytta (Ethiopia)","nativeName":"ወላይታቱ (ኢትዮጵያ)"},"wo":{"englishName":"Wolof","nativeName":"Wolof"},"wo-sn":{"englishName":"Wolof (Senegal)","nativeName":"Wolof (Senegaal)"},"xh":{"englishName":"isiXhosa","nativeName":"isiXhosa"},"xh-za":{"englishName":"isiXhosa (South Africa)","nativeName":"isiXhosa (eMzantsi Afrika)"},"xog":{"englishName":"Soga","nativeName":"Olusoga"},"xog-ug":{"englishName":"Soga (Uganda)","nativeName":"Olusoga (Yuganda)"},"yav":{"englishName":"Yangben","nativeName":"nuasue"},"yav-cm":{"englishName":"Yangben (Cameroon)","nativeName":"nuasue (Kemelún)"},"yi":{"englishName":"Yiddish","nativeName":"ייִדיש"},"yi-001":{"englishName":"Yiddish (World)","nativeName":"ייִדיש (וועלט)"},"yo":{"englishName":"Yoruba","nativeName":"Èdè Yorùbá"},"yo-bj":{"englishName":"Yoruba (Benin)","nativeName":"Èdè Yorùbá (Orílɛ́ède Bɛ̀nɛ̀)"},"yo-ng":{"englishName":"Yoruba (Nigeria)","nativeName":"Èdè Yorùbá (Orílẹ́ède N� ìjírí� )"},"zgh":{"englishName":"Standard Moroccan Tamazight","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ"},"zgh-tfng":{"englishName":"Standard Moroccan Tamazight (Tifinagh)","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ"},"zgh-tfng-ma":{"englishName":"Standard Moroccan Tamazight (Tifinagh, Morocco)","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ (ⵍⵎⵖⵔⵉⴱ)"},"zh":{"englishName":"Chinese","nativeName":"中文"},"zh-cn":{"englishName":"Chinese (Simplified, China)","nativeName":"中文(中国)"},"zh-hans":{"englishName":"Chinese (Simplified)","nativeName":"中文(简体)"},"zh-hans-hk":{"englishName":"Chinese (Simplified Han, Hong Kong SAR)","nativeName":"中文 (香港特别行政区)"},"zh-hans-mo":{"englishName":"Chinese (Simplified Han, Macao SAR)","nativeName":"中文 (澳门特别行政区)"},"zh-hant":{"englishName":"Chinese (Traditional)","nativeName":"中文(繁體)"},"zh-hk":{"englishName":"Chinese (Traditional, Hong Kong SAR)","nativeName":"中文(香港特別行政區)"},"zh-mo":{"englishName":"Chinese (Traditional, Macao SAR)","nativeName":"中文(澳門特別行政區)"},"zh-sg":{"englishName":"Chinese (Simplified, Singapore)","nativeName":"中文(新�� 坡)"},"zh-tw":{"englishName":"Chinese (Traditional, Taiwan)","nativeName":"中文(台灣)"},"zu":{"englishName":"isiZulu","nativeName":"isiZulu"},"zu-za":{"englishName":"isiZulu (South Africa)","nativeName":"isiZulu (i-South Africa)"},"zh-chs":{"englishName":"Chinese (Simplified) Legacy","nativeName":"中文(简体) 旧版"},"zh-cht":{"englishName":"Chinese (Traditional) Legacy","nativeName":"中文(繁體) 舊版"}}');function Gs(e){return Us[e.toLowerCase()]}var Ks=function(e){var t,n,r;return null===(t=Gs(-1===(r=(n=e).indexOf("-"))?n:n.substring(0,r)))||void 0===t?void 0:t.englishName},qs=function(e,t){var n,r,i=e.language;return r=(null==t?void 0:t.filter(function(e){return e.language!==i})).length>0?function(e){var t;return null===(t=Gs(e))||void 0===t?void 0:t.englishName}(i):Ks(i),(null===(n=e.metadata)||void 0===n?void 0:n.autoGenerated)?Vs.T.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:r}):r},Hs={ALLOWED_TAGS:["i","b","u","ruby","rt"]},Ws="en-US",Qs=new Map,Js={getLanguagesOptions:function(e){if(!e)return[];var t=e.filter(function(e){return!e.customer});return t.map(function(e){return{label:qs(e,t),value:e.language,id:e.id}}).sort(function(e,t){var n=e.value.includes(Xs)?1:0;return(t.value.includes(Xs)?1:0)-n})},transformVtt:function(e){if(!e)return[];var t=[],n=new(Fs().WebVTT.Parser)(window,Fs().WebVTT.StringDecoder()),r=[];return n.oncue=function(e){r.push(e)},n.onparsingerror=function(e){t.push(e)},n.parse(e),n.flush(),t.length>0&&Zs.Q.Ry.throw(new zs.H("Failed to parse vtt, ".concat(t.map(function(e){return e.message})))),r},createTextTrackList:function(e,t){var n=document.createElement("video"),r=n.addTextTrack("subtitles",t?Ks(t):"English",t||Ws);return e.forEach(function(e){r.addCue(e)}),n.textTracks},attachCuesToPlayer:function(e,t,n){var r;if(t){var i=null===(r=null==e?void 0:e.addTranscript)||void 0===r?void 0:r.call(e,n||Ws),o=Js.transformVtt(t);return null==o||o.forEach(function(e){null==i||i.addCue(e)}),i}},transformVttToTextTrackList:function(e,t,n){var r="".concat(n,"-").concat(t);if(Qs.has(r))return Qs.get(r);if(!e)return null;var i=Js.transformVtt(e),o=Js.createTextTrackList(i,t);return Qs.set(r,o),o},sanitizeCueText:function(e){return(0,Ds.sanitize)(e,Hs)}},Ys="transcript-selected-language",Xs="en";function $s(e){var t,n;return(null===(t=e.find(function(e){return e.language.includes(Xs)}))||void 0===t?void 0:t.language)||(null===(n=e[0])||void 0===n?void 0:n.language)}var ef=n(42648),tf=n(6620),nf=n(74097),rf=n(75896);function of(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return af(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?af(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function af(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var uf=/\n/g;var lf=n(49985),cf=n(11607),sf=n(83914),ff=n(26354),pf=n(35223);function hf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var yf=Vs.T.encloseNamespace("shared.copyContentIconButton");function vf(e){var t,n,i=(t=r.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return hf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hf(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],a=i[1];return r.useEffect(function(){if(o){var e=window.setTimeout(function(){a(!1)},1e3);return function(){return window.clearTimeout(e)}}},[o]),r.createElement(ff.u,{title:yf(o?"copied":"copy"),spanHack:!0,spanHackClassName:e.tooltipClassName||""},r.createElement(cf.L,{"aria-label":"Copy to clipboard",className:e.visible?"QzREy":"_LaKg",onClick:function(t){t.stopPropagation(),navigator.clipboard.writeText(e.copyableContent).then(function(){var t;a(!0),null===(t=e.onClick)||void 0===t||t.call(e)})}},r.createElement(sf.x,{svgName:pf.vn.Copy,size:sf.S.Small})))}var df=n(49439),mf=n(93264);const bf={timePoint:"VOCS4",wide:"ewc3a",item:"sbTZM",inPlayer:"ZSsXf"};function gf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wf(e){var t,n,i=e.currentTimePoint===e.timePoint,o=(t=(0,df.X)(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return gf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gf(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],u=o[1];return r.createElement("div",Object.assign({},e.isAuthenticated&&{role:"button"},{className:"d-flex p-2 align-items-center cursor-pointer rounded text-dark ".concat(e.inPlayer?bf.inPlayer:""," ").concat(e.isAuthenticated?"cursor-pointer":""," ").concat(bf.item," ").concat(i?"bg-gray-100":""),id:e.timePoint.toString(),onClick:function(){e.onClick(),lf.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{cueIndex:e.cueIndex}),Object.assign(Object.assign({},e.analyticsOptions),{descriptor:it.XX.TranscriptTimepoint,actionType:it.Vw.Click}))},ref:a}),r.createElement("div",{className:"d-flex flex-column align-items-center"},r.createElement("div",{className:"bg-light-blue text-info rounded-pill d-inline py-1 text-center ".concat(bf.timePoint," ").concat(e.wideTimeTag?bf.wide:""," ").concat(i?"bg-white":"")},mf.T.ToDisplayDuration(1e3*e.timePoint))),r.createElement("div",{className:"".concat(bf.transcript," ms-3 w-100")},e.nodes.map(function(t,n){var i=Js.sanitizeCueText(t.text);return null===t.searchResultIndex?r.createElement("span",{key:n,dangerouslySetInnerHTML:{__html:i}}):r.createElement("mark",{className:"".concat(bf.mark," ").concat(t.searchResultIndex===e.currentSearchResultIndex?"bg-orange":"bg-yellow"),key:n,dangerouslySetInnerHTML:{__html:i}})})),r.createElement(vf,{copyableContent:e.transcript,visible:u,onClick:function(){lf.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{cueIndex:e.cueIndex}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Copy}))}}))}function Of(e){var t,n,i=e.cuesToDisplay.some(function(e){return e.startTime>=3600}),o=new Map;return e.chapters.forEach(function(t,n){var r=e.cuesToDisplay.findIndex(function(e){return e.startTime>t.startTime});o.set(r,n)}),r.createElement("div",{className:"w-100 position-relative",style:{height:e.virtualizer.getTotalSize()}},r.createElement("div",{className:"w-100 position-absolute top-0 start-0",style:{transform:"translateY(".concat(null!==(n=null===(t=e.items[0])||void 0===t?void 0:t.start)&&void 0!==n?n:0,"px)")}},e.items.map(function(t){var n,a=t.index,u=e.cuesToDisplay[a],l=!1,c="";return o.has(a)&&(l=!0,c=e.chapters[o.get(a)].name),r.createElement("div",{className:e.inPlayer?"":"px-3",key:u.startTime,ref:e.virtualizer.measureElement,"data-index":a},l&&r.createElement("h3",{className:"".concat(0!==o.get(a)?"mt-2":""," my-2 h6 ").concat(e.inPlayer?"px-2":"")},r.createElement("span",null,o.get(a)+1,". ",c)),r.createElement(wf,{timePoint:u.startTime,transcript:u.text,nodes:u.nodes,onClick:function(){return e.onClickTranscriptionItem(u)},currentTimePoint:null===(n=e.timepoint)||void 0===n?void 0:n.startTime,currentSearchResultIndex:e.currentSearchResultIndex,wideTimeTag:!!i,inPlayer:e.inPlayer,analyticsOptions:e.analyticsOptions,analyticsData:e.analyticsData,cueIndex:a,isAuthenticated:e.isAuthenticated}))})))}n(32102),n(97395);var Sf=n(79014),kf=n(31453);function Pf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Nf=Vs.T.encloseNamespace("playPage.transcriptSearchBar");function jf(e){var t,n,i=r.useRef(null),o=(t=r.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Pf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pf(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],u=o[1];function l(t){lf.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:t}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Search,descriptor:t?it.uG.SearchTranscript:it.uG.ResetResults}))}var c=r.useCallback(Sf.q.debounce(function(e){return l(e)},500),[]);function s(){lf.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:e.query}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Search,descriptor:it.uG.NextResult})),e.currentSearchResultIndex===e.totalSearchResults-1?e.jumpToSearchResult(0):e.jumpToSearchResult(e.currentSearchResultIndex+1)}function f(){lf.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:e.query}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Search,descriptor:it.uG.PreviousResult})),0===e.currentSearchResultIndex?e.jumpToSearchResult(e.totalSearchResults-1):e.jumpToSearchResult(e.currentSearchResultIndex-1)}function p(e){var t;e.keepFocus||null===(t=i.current)||void 0===t||t.focus(),s()}function h(e){var t;e.keepFocus||null===(t=i.current)||void 0===t||t.focus(),f()}function y(e){u("focus"===e)}return r.createElement("div",{className:(0,kf.A)("form-control py-0 px-1 d-flex align-items-center",a?"KFd6d":"QBjyt","XfIEh"),onClick:function(){var e;return null===(e=i.current)||void 0===e?void 0:e.focus()},role:"search"},r.createElement("div",{"aria-hidden":"true"},r.createElement(sf.x,{svgName:pf.vn.Search})),r.createElement("input",{className:"form-control border-0 px-1 ".concat("MAoRJ"),value:e.query,onChange:function(t){c(t.target.value),e.onSearch(t.target.value)},autoComplete:"off",placeholder:Nf("searchPlaceholder"),ref:i,onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),e.shiftKey?f():s())},onFocus:function(){return y("focus")},onBlur:function(){return y("blur")}}),!!e.query&&r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",null,e.totalSearchResults?"".concat(e.currentSearchResultIndex+1,"/").concat(e.totalSearchResults):"0/0"),r.createElement(cf.L,{"aria-label":Nf("previousResult"),onClick:function(){return h({keepFocus:!1})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||h({keepFocus:!0})}},r.createElement(sf.x,{svgName:pf.vn.ChevronUp})),r.createElement(cf.L,{"aria-label":Nf("nextResult"),onClick:function(){return p({keepFocus:!1})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||p({keepFocus:!0})}},r.createElement(sf.x,{svgName:pf.vn.ChevronDown})),r.createElement(cf.L,{"aria-label":Nf("clearSearch"),onClick:function(){var t;l(""),null===(t=i.current)||void 0===t||t.focus(),e.onSearch("")}},r.createElement(sf.x,{svgName:pf.vn.Close}))))}n(83345);var Cf,Tf,Ef=n(69883),_f=n(79967),Rf=n(74237);n(62400),(Tf=Cf||(Cf={})).Resources="resources",Tf.Interactives="interactives",Tf.Video="video",Tf.Clips="clips",Tf.CurriculumLinks="curriculum-links",Tf.VideoDetails="video-details",Tf.RelatedVideos="related-videos",Tf.ClippedFrom="clipped-from",Tf.Transcript="transcript",Vs.T.encloseNamespace("shared.playPageTranscription");var xf=n(8935);const If={languageSelect:"rHbhp",inputWithoutHighlight:"nJvbl"};function Mf(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Bf(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Bf(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Bf(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Bf(f,"constructor",c),Bf(c,"constructor",l),l.displayName="GeneratorFunction",Bf(c,i,"GeneratorFunction"),Bf(f),Bf(f,i,"Generator"),Bf(f,r,function(){return this}),Bf(f,"toString",function(){return"[object Generator]"}),(Mf=function(){return{w:o,m:p}})()}function Bf(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Bf=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Bf(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Bf(e,t,n,r)}function Lf(e){var t,n,i=null===(t=e.languageOptions[0])||void 0===t?void 0:t.label,o=e.track.src,a=(0,Ef.Z)();return r.createElement("div",{className:"d-flex px-1 mb-3"},r.createElement(jf,{query:e.searchQuery,currentSearchResultIndex:e.currentSearchResultIndex,onSearch:e.onSearch,totalSearchResults:e.totalSearchResults,jumpToSearchResult:e.jumpToSearchResult,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions}),r.createElement(ff.u,{spanHack:!0,title:e.languageOptions.length>1?"":"Only available in ".concat(i)},r.createElement(xf.Z,null,r.createElement(xf.Z.Toggle,{className:"text-dark ".concat(If.languageSelect),id:"language-select",disabled:(null===(n=e.languageOptions)||void 0===n?void 0:n.length)<=1,variant:"outline-dark"},r.createElement(sf.x,{svgName:pf.vn.Globe})),r.createElement(xf.Z.Menu,{className:If.menu,"aria-labelledby":"language-select"},e.languageOptions.map(function(t,n){return r.createElement(xf.Z.Item,{key:n,onClick:function(){var n;null===(n=e.onChangeLanguage)||void 0===n||n.call(e,t.value),lf.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{language:t.value,previousLanguageName:e.selectedLanguage}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Select}))},className:"cursor-pointer",active:t.value===e.selectedLanguage},t.label)})))),r.createElement(nf.h,{svgName:pf.vn.Download,onClick:function(){return t=this,n=void 0,r=void 0,i=Mf().m(function t(){return Mf().w(function(t){for(;;)switch(t.n){case 0:return lf.k.logUserAction(e.analyticsData,Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Download})),t.p=1,t.n=2,Rf.T.downloadBlob(o,"Subtitles-".concat(e.selectedLanguage,".vtt"));case 2:t.n=4;break;case 3:t.p=3,t.v,a.error("Error downloading transcript");case 4:return t.a(2)}},t,null,[[1,3]])}),new(r||(r=Promise))(function(e,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function u(e){try{l(i.throw(e))}catch(e){o(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r(function(e){e(n)})).then(a,u)}l((i=i.apply(t,n||[])).next())});var t,n,r,i},className:"position-relative d-flex align-items-center text-dark"}))}var Df=n(44645);function Af(e){return Af="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Af(e)}function Ff(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Vf(r.key),r)}}function Zf(e,t,n){return t&&zf(e.prototype,t),n&&zf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vf(e){var t=function(e){if("object"!=Af(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Af(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Af(t)?t:t+""}function Uf(e,t,n){return t=qf(t),function(e,t){if(t&&("object"==Af(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Gf()?Reflect.construct(t,n||[],qf(e).constructor):t.apply(e,n))}function Gf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gf=function(){return!!e})()}function Kf(){return Kf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=qf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Kf.apply(null,arguments)}function qf(e){return qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qf(e)}function Hf(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wf(e,t)}function Wf(e,t){return Wf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wf(e,t)}var Qf=function(e){function t(e,n){return Ff(this,t),Uf(this,t,[e,n])}return Hf(t,e),Zf(t,[{key:"dispose",value:function(){var e,n,r,i=this;setImmediate(function(){var e;null===(e=i.root)||void 0===e||e.unmount()}),(e=t,n=this,"function"==typeof(r=Kf(qf(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}])}(i.Z.getComponent("Component")),Jf={tagName:"div"};function Yf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Jf;if(!e)throw new Error("componentCtor is required");var n=function(n){function r(){return Ff(this,r),Uf(this,r,arguments)}return Hf(r,n),Zf(r,[{key:"createEl",value:function(){var n=i.Z.dom.createEl(t.tagName,t.properties,t.attributes),r=(0,Df.s)(n);return r.render(e(this.player_,this.options_)),this.root=r,n}}])}(Qf);return n}function Xf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ep(e){var t=Ht(Ys)||$s(e.allTracks),n=r.useState(function(){return e.allTracks.find(function(e){return e.language===t})||e.allTracks.find(function(t){return t.language===$s(e.allTracks)})}),i=Xf(n,2),o=i[0],a=i[1],u=Xf(r.useState(t),2),l=u[0],c=u[1],s=Xf(r.useState(-1),2),f=s[0],p=s[1],h=Xf(r.useState(!0),2),y=h[0],v=h[1],d=Xf(r.useState([]),2),m=d[0],b=d[1],g=r.useMemo(function(){return Array.from((null==o?void 0:o.cues)||[])},[l]),w={videoId:e.playbackObject.videoId,videoName:e.playbackObject.title,language:l},O={location:it.LZ.Player,entity:it.py.Transcript},S=e.player.hasStarted();!function(e){function t(t){var n=Array.from((null==t?void 0:t.activeCues)||[]);if(n.length){var r=e.cuesToDisplay.findIndex(function(e){return e.startTime===rf.m.last(n).startTime});-1!==r?e.setCurrentCueIndex(r):e.setCurrentCueIndex(null)}}function n(){t(e.currentTranscriptTrack)}r.useEffect(function(){e.hasStarted&&t(e.currentTranscriptTrack)},[e.hasStarted]),r.useEffect(function(){return e.currentTranscriptTrack&&e.currentTranscriptTrack.addEventListener("cuechange",n),function(){var t;return null===(t=e.currentTranscriptTrack)||void 0===t?void 0:t.removeEventListener("cuechange",n)}},[e.currentTranscriptTrack])}({currentTranscriptTrack:o,cuesToDisplay:g,setCurrentCueIndex:p,hasStarted:S});var k=r.useRef(),P=(0,tf.MG)({count:m.length,getScrollElement:function(){var e;return null===(e=k.current)||void 0===e?void 0:e.view},estimateSize:function(){return 40},enabled:m.length>0}),N=P.getVirtualItems(),j=function(e,t,n){function i(e){n&&n.scrollToIndex(e,{align:"start"})}return r.useEffect(function(){t&&"number"==typeof e&&i(e)},[e,t,n]),i}(f,y,P),C=function(e){var t=e.cuesToDisplay,n=e.resetHighlightedCues,i=e.setHighlightedCues,o=e.scrollToCue,a=of(r.useState(""),2),u=a[0],l=a[1],c=of(r.useState(null),2),s=c[0],f=c[1],p=of(r.useState(0),2),h=p[0],y=p[1],v=of(r.useTransition(),2)[1];return{isSearching:null!==s,searchQuery:u,onSearch:function(e){l(e),0!==h&&y(0),v(function(){!function(e){if(!e.length)return f(null),void n();var r=new RegExp(e.replace(uf," "),"gi"),a=[],u=0,l=t.map(function(e,t){var n=e.text,i=n.replace(uf," ").matchAll(r);if(0===i.length)return Object.assign(e,{nodes:[{text:n,searchResultIndex:null}]});var o=[],l=0;return i.forEach(function(e,r){var i=e[0],c=e.index;c>l&&o.push({text:n.substring(l,c),searchResultIndex:null}),o.push({text:i,searchResultIndex:u}),u++,a.push({cueIndex:t,cueMatchIndex:r}),l=c+i.length}),l<n.length&&o.push({text:n.substring(l),searchResultIndex:null}),Object.assign(e,{nodes:o})});f(a),i(l),a.length&&o(a[0].cueIndex)}(e)})},jumpToSearchResult:function(e){var t=s[e];t&&(y(e),o(t.cueIndex))},totalSearchResults:null==s?void 0:s.length,currentSearchResultIndex:h,resetSearchResults:function(){f(null),l(""),y(0),n()}}}({cuesToDisplay:g,resetHighlightedCues:F,setHighlightedCues:b,scrollToCue:j}),T=C.isSearching,E=C.searchQuery,_=C.totalSearchResults,R=C.jumpToSearchResult,x=C.onSearch,I=C.currentSearchResultIndex,M=C.resetSearchResults,B=e.player.paused(),L=Xf((0,df.X)(),2),D=L[0],A=L[1];function F(){b(g.map(function(e){return Object.assign(e,{nodes:[{text:e.text,searchResultIndex:null}]})}))}return r.useEffect(function(){v(!A&&!T&&S&&!B)},[A,T,S,B]),r.useEffect(function(){F()},[g]),o&&g.length?r.createElement("div",{ref:D,className:"cv-transcript py-3 px-2 ".concat(e.showTranscript?"cv-open":"")},r.createElement("div",{className:"text-dark d-flex justify-content-between px-1"},r.createElement("h3",null,"Transcript"),r.createElement(nf.h,{svgName:pf.vn.Close,onClick:function(){e.toggleTranscript(!1)},ariaLabel:"Close transcript"})),r.createElement(Lf,{selectedLanguage:l,languageOptions:e.languageOptions,onChangeLanguage:function(t){a(e.allTracks.find(function(e){return e.language===t})),c(t),Wt(Ys,t),M()},track:o,onSearch:x,searchQuery:E,currentSearchResultIndex:I,totalSearchResults:_,jumpToSearchResult:R,analyticsData:w,analyticsOptions:O}),r.createElement("div",{className:"cv-transcript-list-wrapper text-dark"},r.createElement(ef.ZP,{ref:k},r.createElement(Of,{timepoint:g[f],onClickTranscriptionItem:function(t){var n;null===(n=e.setStartTime)||void 0===n||n.call(e,t.startTime)},cuesToDisplay:m,chapters:e.chapters,currentSearchResultIndex:I,inPlayer:!0,virtualizer:P,items:N,analyticsOptions:O,analyticsData:w,isAuthenticated:!1})))):r.createElement(r.Fragment,null)}function tp(e){return tp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tp(e)}function np(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rp(r.key),r)}}function rp(e){var t=function(e){if("object"!=tp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tp(t)?t:t+""}function ip(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ip=function(){return!!e})()}function op(){return op="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ap(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},op.apply(null,arguments)}function ap(e){return ap=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ap(e)}function up(e,t){return up=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},up(e,t)}i.Z.registerComponent("Transcript",Yf(function(e,t){return r.createElement(ep,Object.assign({player:e},t))}));var lp=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=ap(t),function(e,t){if(t&&("object"==tp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ip()?Reflect.construct(t,n||[],ap(e).constructor):t.apply(e,n))}(this,t,[e])).allClickViewTracks=[],n.player=e,n.bindListeners(),e.ready(function(){return n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&up(e,t)}(t,e),n=t,r=[{key:"bindListeners",value:function(){var e=this;this.onResize=this.onResize.bind(this),Q.useMetadataTracks(this.player,"transcript",function(){return e.player.trigger("resizemenus")}),this.player.on("playerresize",this.onResize)}},{key:"dispose",value:function(){var e,n,r;this.player.off("playerresize",this.onResize),(e=t,n=this,"function"==typeof(r=op(ap(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"initialize",value:function(){Q.useSubtitles(this.player,this.onTrackLoaded.bind(this)),Q.useChapters(this.player,this.onChaptersLoaded.bind(this))}},{key:"onChaptersLoaded",value:function(e){this.chapterTrack=e}},{key:"onTrackLoaded",value:function(e){var t=e.isClickViewProduced;!this.allClickViewTracks.find(function(t){return t.language===e.language})&&t&&this.allClickViewTracks.push(e),this.languageOptions=this.buildOptions(this.allClickViewTracks)}},{key:"buildOptions",value:function(e){return e.map(function(e){return{label:e.label,value:e.language}}).sort(function(e,t){var n=e.value.includes(Xs)?1:0;return(t.value.includes(Xs)?1:0)-n})}},{key:"buildComponentProps",value:function(e,t,n){var r,i=Array.from((null===(r=this.chapterTrack)||void 0===r?void 0:r.cues)||[]).map(function(e){return{endTimeStamp:e.endTime,startTime:e.startTime,name:e.text}});return{showTranscript:e,languageOptions:this.languageOptions,toggleTranscript:function(e){return t(e,{shouldLog:!0})},allTracks:this.allClickViewTracks,setStartTime:n,chapters:i,playbackObject:this.playbackObject}}},{key:"addChildren",value:function(e){if(this.component)return this.component.show(),this.component;var t=this.toggleTranscript.bind(this),n=this.setStartTime.bind(this),r=this.buildComponentProps(e,t,n);this.component=this.player.addChild("Transcript",r)}},{key:"toggleTranscript",value:function(e,t){var n,r,i,o=void 0!==e?e:!this.showTranscript;this.showTranscript=o,o?(null===(n=this.player.theatreModePlugin())||void 0===n||n.toggleTheatreMode(!0,{shouldLog:!1}),this.addChildren(!0),this.player.addClass("cv-transcript-plugin")):(null===(r=this.component)||void 0===r||r.hide(),this.player.removeClass("cv-transcript-plugin")),this.player.whiteboardModePlugin&&this.player.whiteboardModePlugin().setEnabled(!o),this.player.trigger("cv-transcript-toggle",o),this.player.trigger("resizemenus"),this.player.trigger("playerresize"),(null==t?void 0:t.shouldLog)&&(null===(i=this.analyticsService)||void 0===i||i.logUserAction({videoId:this.playbackObject.videoId,videoName:this.playbackObject.title},{actionType:it.Vw.Click,descriptor:o?it.UX.ShowTranscript:it.UX.HideTranscript,entity:it.py.Transcript}))}},{key:"setStartTime",value:function(e){this.player.currentTime(e)}},{key:"isTranscriptOn",value:function(){return!!this.showTranscript}},{key:"onResize",value:function(){window.innerWidth<992?this.player.addClass("hide-transcript"):this.showTranscript&&this.player.removeClass("hide-transcript")}},{key:"registerAnalytics",value:function(e,t){this.analyticsService=e,this.playbackObject=t}}],r&&np(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function cp(e){return cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cp(e)}function sp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fp(r.key),r)}}function fp(e){var t=function(e){if("object"!=cp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cp(t)?t:t+""}function pp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pp=function(){return!!e})()}function hp(e){return hp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hp(e)}function yp(e,t){return yp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yp(e,t)}i.Z.registerPlugin("viewTranscriptPlugin",lp);var vp=i.Z.getComponent("SubsCapsMenuItem"),dp=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=hp(t),function(e,t){if(t&&("object"==cp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pp()?Reflect.construct(t,n||[],hp(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yp(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(e){vp.prototype.handleClick.call(this,e);for(var t=this.player_.textTracks(),n=0;n<t.length;n++){var r=t[n];"subtitles"===r.kind&&"disabled"===r.mode&&(r.mode="hidden")}this.player_.trigger("cv:languageselected")}}])&&sp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vp);function mp(e){return mp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mp(e)}function bp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gp(r.key),r)}}function gp(e){var t=function(e){if("object"!=mp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mp(t)?t:t+""}function wp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wp=function(){return!!e})()}function Op(e){return Op=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Op(e)}function Sp(e,t){return Sp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sp(e,t)}var kp=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};r.track={player:e,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSearchMenuItem",(n=function(e,t,n){return t=Op(t),function(e,t){if(t&&("object"==mp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,wp()?Reflect.construct(t,n||[],Op(e).constructor):t.apply(e,n))}(this,t,[e,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-subtitle-search-menu-item"),n.controlText(", opens subtitle search"),n.toggleEnabled=n.toggleEnabled.bind(n);var i=n.player_.textTracks();return i.addEventListener("selectedlanguagechange",n.toggleEnabled),n.player_.one("dispose",function(){i.removeEventListener("selectedlanguagechange",n.toggleEnabled)}),n.toggleEnabled(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sp(e,t)}(t,e),n=t,(r=[{key:"toggleEnabled",value:function(){var e;if(this.player_){var t=Q.getCurrentTextTrack(this.player_);t?(null===(e=t.cues)||void 0===e?void 0:e.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(t),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.toggleEnabled),e.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",function(){e.removeEventListener("loadeddata",t.toggleEnabled)})}},{key:"handleClick",value:function(){var e,t=this,n=Q.getCurrentTextTrack(this.player_);(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length)&&this.requestAnimationFrame(function(){t.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()})}}])&&bp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("TextTrackMenuItem"));function Pp(e){return Pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pp(e)}function Np(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jp(r.key),r)}}function jp(e){var t=function(e){if("object"!=Pp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pp(t)?t:t+""}function Cp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Cp=function(){return!!e})()}function Tp(e){return Tp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tp(e)}function Ep(e,t){return Ep=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ep(e,t)}var _p=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};return r.track={player:e,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSizeMenuItem",(n=function(e,t,n){return t=Tp(t),function(e,t){if(t&&("object"==Pp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Cp()?Reflect.construct(t,n||[],Tp(e).constructor):t.apply(e,n))}(this,t,[e,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-divider-after-menu-item"),n.addClass("cv-subtitle-size-menu-item"),n.controlText(", opens subtitle size settings"),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ep(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame(function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()})}}])&&Np(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("TextTrackMenuItem"));function Rp(e){return Rp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rp(e)}function xp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ip(r.key),r)}}function Ip(e){var t=function(e){if("object"!=Rp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Rp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Rp(t)?t:t+""}function Mp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Mp=function(){return!!e})()}function Bp(e){return Bp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bp(e)}function Lp(e,t){return Lp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lp(e,t)}var Dp=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};return r.track={player:e,kind:"subtitle",label:"Video Transcript",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="TranscriptMenuItem",(n=function(e,t,n){return t=Bp(t),function(e,t){if(t&&("object"==Rp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Mp()?Reflect.construct(t,n||[],Bp(e).constructor):t.apply(e,n))}(this,t,[e,r])).transcriptOn=n.player_.viewTranscriptPlugin&&n.player_.viewTranscriptPlugin().isTranscriptOn(),n.bindEventListeners(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lp(e,t)}(t,e),n=t,(r=[{key:"bindEventListeners",value:function(){var e=this,t=this.toggleListener.bind(this),n=this.onResize.bind(this);this.player_.on("cv-transcript-toggle",t),this.player_.on("playerresize",n),this.on("dispose",function(){e.player_.off("cv-transcript-toggle",t),e.player_.off("playerresize",n)})}},{key:"onResize",value:function(){var e=window.innerWidth<992;this.item&&(this.item.style.display=e?"none":"block")}},{key:"handleToggleListener",value:function(){this.transcriptOn?this.toggleOff():this.toggleOn()}},{key:"toggleListener",value:function(e,t){var n,r;t?(this.transcriptOn=!0,i.Z.dom.addClass(this.toggleEl,"on")):(this.transcriptOn=!1,null===(r=(n=i.Z.dom).removeClass)||void 0===r||r.call(n,this.toggleEl,"on"))}},{key:"toggleOn",value:function(){var e,t;this.transcriptOn=!0,i.Z.dom.addClass(this.toggleEl,"on"),this.player_.viewTranscriptPlugin&&(null===(t=null===(e=this.player_.viewTranscriptPlugin())||void 0===e?void 0:e.toggleTranscript)||void 0===t||t.call(e,!0,{shouldLog:!0})),this.player_.whiteboardModePlugin&&this.player_.whiteboardModePlugin().setEnabled(!1)}},{key:"toggleOff",value:function(){var e,t,n,r;this.transcriptOn=!1,null===(t=(e=i.Z.dom).removeClass)||void 0===t||t.call(e,this.toggleEl,"on"),this.player_.viewTranscriptPlugin&&(null===(r=null===(n=this.player_.viewTranscriptPlugin())||void 0===n?void 0:n.toggleTranscript)||void 0===r||r.call(n,!1,{shouldLog:!0}))}},{key:"createEl",value:function(e,t,n){return this.handlerBound||(this.handleToggleListener=this.handleToggleListener.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggleListener),this.toggleEl=i.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggleListener),this.item=i.Z.dom.createEl("li",{className:"vjs-menu-item cv-transcript-toggle",innerHTML:'\n <span class="vjs-menu-item-text">Video Transcript</span>\n <span class="cv-toggle-container"></span>\n <span class="vjs-control-text" aria-live="polite">, opens transcript</span>\n ',tabIndex:-1},n),this.item.children[1].appendChild(this.toggleEl),this.item}}])&&xp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("TextTrackMenuItem"));function Ap(e){return Ap="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ap(e)}function Fp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zp(r.key),r)}}function zp(e){var t=function(e){if("object"!=Ap(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ap(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ap(t)?t:t+""}function Zp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zp=function(){return!!e})()}function Vp(){return Vp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Up(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Vp.apply(null,arguments)}function Up(e){return Up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Up(e)}function Gp(e,t){return Gp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gp(e,t)}i.Z.registerComponent("ToggleTranscriptMenuItem",Dp);var Kp=i.Z.getComponent("TextTrackButton"),qp=i.Z.getComponent("SubsCapsButton"),Hp=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Up(t),function(e,t){if(t&&("object"==Ap(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Zp()?Reflect.construct(t,n||[],Up(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-subs-caps-menu-button",r.onSelectedLanguageChange=r.onSelectedLanguageChange.bind(r),r.player_.on("cv:languageselected",r.onSelectedLanguageChange),r.player_.one("dispose",function(){return r.player_.off("cv:languageselected",r.onSelectedLanguageChange)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gp(e,t)}(t,e),n=t,r=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=Vp(Up(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"createItems",value:function(){var e=[];if(!this.player_.options_.mobile){var t=this.player().textTracks(),n=Array.from(t||[]).some(function(e){return"subtitles"===e.kind});this.player_.options_.allowTranscript&&!!n&&this.player_.viewTranscriptPlugin&&window.innerWidth>=992&&e.push(new Dp(this.player_)),this.player_.options_.allowTranscript||e.push(new kp(this.player_)),e.push(new _p(this.player_)),this.hideThreshold_=this.hideThreshold_+2}return this.player().trigger("resizemenus"),Kp.prototype.createItems.call(this,e,dp)}},{key:"onSelectedLanguageChange",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++)if("showing"===e[t].mode)return void this.setActive(!0);this.setActive(!1)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){qp.prototype.handleClick.apply(this)}}],r&&Fp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(qp);function Wp(e){return Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wp(e)}function Qp(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Jp(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Jp(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Jp(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Jp(f,"constructor",c),Jp(c,"constructor",l),l.displayName="GeneratorFunction",Jp(c,i,"GeneratorFunction"),Jp(f),Jp(f,i,"Generator"),Jp(f,r,function(){return this}),Jp(f,"toString",function(){return"[object Generator]"}),(Qp=function(){return{w:o,m:p}})()}function Jp(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Jp=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Jp(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Jp(e,t,n,r)}function Yp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xp(r.key),r)}}function Xp(e){var t=function(e){if("object"!=Wp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Wp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wp(t)?t:t+""}function $p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($p=function(){return!!e})()}function eh(e){return eh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},eh(e)}function th(e,t){return th=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},th(e,t)}i.Z.registerComponent("SubsCapsButton",Hp);var nh="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Fr,"</span>"),rh=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=eh(t),function(e,t){if(t&&("object"==Wp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$p()?Reflect.construct(t,n||[],eh(e).constructor):t.apply(e,n))}(this,t,[e,n])).qualityId=n.qualityId;var i=e.qualityLevels(),o=r.handleQualityChange.bind(r);return i.on("change",o),e.one("dispose",function(){i.off("change",o)}),r.handleLocalCacheChange=r.handleLocalCacheChange.bind(r),r.player_.ready(function(){r.player_&&(r.player_.on("localcachechanged",r.handleLocalCacheChange),r.player_.one("dispose",function(){var e;null===(e=r.player_)||void 0===e||e.off("localcachechanged",r.handleLocalCacheChange)}),r.handleLocalCacheChange())}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&th(e,t)}(t,e),n=t,(r=[{key:"handleLocalCacheChange",value:function(){return e=this,t=void 0,n=void 0,r=Qp().m(function e(){var t,n;return Qp().w(function(e){for(;;)switch(e.n){case 0:return t=this.player_.localCache(),e.n=1,t.getActiveLocalCache();case 1:if(null==(n=e.v)?void 0:n.playbackProfile){e.n=2;break}return this.show(),this.enable(),this.setLabel(this.options_.label),e.a(2);case 2:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+nh);case 3:return e.a(2)}},e,this)}),new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())});var e,t,n,r}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var e=this.player_.qualityLevels(),t=0;t<e.length;t++){var n=e[t];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var e=this.player_.qualityLevels(),t=e[e.selectedIndex],n=t&&t.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&Yp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function ih(e){return ih="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ih(e)}function oh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ah(r.key),r)}}function ah(e){var t=function(e){if("object"!=ih(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ih(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ih(t)?t:t+""}function uh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(uh=function(){return!!e})()}function lh(e,t,n,r){var i=ch(sh(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function ch(){return ch="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=sh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ch.apply(null,arguments)}function sh(e){return sh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sh(e)}function fh(e,t){return fh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fh(e,t)}var ph={144:"144p (Preview)",240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},hh=i.Z.getComponent("MenuButton"),yh=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=sh(t),function(e,t){if(t&&("object"==ih(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,uh()?Reflect.construct(t,n||[],sh(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-quality-menu-button";var i=r.player_.qualityLevels(),o=r.update.bind(r);return i.on("addqualitylevel",o),i.on("removequalitylevel",o),e.one("dispose",function(){i.removeEventListener("addqualitylevel",o),i.removeEventListener("removequalitylevel",o)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fh(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(lh(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(lh(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var e=[],t=this.player_.qualityLevels();e.push(new j(this.player_,{label:"Quality"}));for(var n=0;n<t.length;n++){var r=t[n];if(r){var i=ph[r.id];i&&e.push(new rh(this.player_,{qualityId:r.id,label:i,selectable:!0,multiSelectable:!1}))}}return e}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.qualityLevels(),t=e[e.selectedIndex];return t?ph[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){hh.prototype.handleClick.apply(this)}}])&&oh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(hh);function vh(e){return vh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vh(e)}function dh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mh(r.key),r)}}function mh(e){var t=function(e){if("object"!=vh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vh(t)?t:t+""}function bh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(bh=function(){return!!e})()}function gh(){return gh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=wh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},gh.apply(null,arguments)}function wh(e){return wh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wh(e)}function Oh(e,t){return Oh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oh(e,t)}i.Z.registerComponent("QualityButton",yh);var Sh=i.Z.getComponent("Menu"),kh=i.Z.getComponent("MenuButton"),Ph=i.Z.getComponent("PlaybackRateMenuItem"),Nh=i.Z.getComponent("PlaybackRateMenuButton"),jh=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=wh(t),function(e,t){if(t&&("object"==vh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,bh()?Reflect.construct(t,n||[],wh(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e.className="cv-playback-rate-menu-button",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oh(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=kh.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=gh(wh(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"createMenu",value:function(){var e=new Sh(this.player(),{menuButton:this});e.addItem(new j(this.player_,{label:"Playback speed"}));var t=this.playbackRates();if(t)for(var n=0;n<t.length;n++){var r=t[n]+"x";1===t[n]&&(r+=" (Normal)"),e.addItem(new Ph(this.player(),{rate:r}))}return e}},{key:"handleClick",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=kh.prototype.handleClick).apply.apply(e,[this].concat(n))}},{key:"updateLabel",value:function(){var e;this.setupLabelEl();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=Nh.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=i.Z.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}],r&&dh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nh);function Ch(e){return Ch="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ch(e)}function Th(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Eh(r.key),r)}}function Eh(e){var t=function(e){if("object"!=Ch(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ch(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ch(t)?t:t+""}function _h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_h=function(){return!!e})()}function Rh(e){return Rh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rh(e)}function xh(e,t){return xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xh(e,t)}i.Z.registerComponent("PlaybackRateMenuButton",jh);var Ih=i.Z.getComponent("TextTrackSettings"),Mh={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},Bh={small:Mh,medium:Object.assign(Object.assign({},Mh),{fontPercent:1.5}),large:Object.assign(Object.assign({},Mh),{fontPercent:2})},Lh=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Rh(t),function(e,t){if(t&&("object"==Ch(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_h()?Reflect.construct(t,n||[],Rh(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xh(e,t)}(t,e),n=t,(r=[{key:"setSizeSetting",value:function(e){var t=this;this.size_=e,this.player_.getChild("textTrackDisplay").updateDisplay();var n=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame(function(){n.update(),t.player_.trigger("resizemenus")})}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return Bh[this.size_]?Bh[this.size_]:Mh}}])&&Th(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ih);function Dh(e){return Dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dh(e)}function Ah(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fh(r.key),r)}}function Fh(e){var t=function(e){if("object"!=Dh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dh(t)?t:t+""}function zh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zh=function(){return!!e})()}function Zh(e,t,n,r){var i=Vh(Uh(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Vh(){return Vh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Uh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Vh.apply(null,arguments)}function Uh(e){return Uh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Uh(e)}function Gh(e,t){return Gh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gh(e,t)}i.Z.registerComponent("TextTrackSettings",Lh);var Kh=window.navigator&&window.navigator.userAgent||"",qh=(/iPod/i.test(Kh),/Android/i.test(Kh),i.Z.getComponent("Player")),Hh=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Uh(t),function(e,t){if(t&&("object"==Dh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,zh()?Reflect.construct(t,n||[],Uh(e).constructor):t.apply(e,n))}(this,t,[e,n]))._dataLoaded=!1,n.mobile&&r.addClass("cv-mobile-player");var i=function(){return r._dataLoaded=!0};return r.on("cv-playback-data-loaded",i),r.on("dispose",function(){return r.off("cv-playback-data-loaded",i)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gh(e,t)}(t,e),n=t,r=[{key:"dataLoaded",value:function(e){var t=this;this._dataLoaded?e():(this.one("cv-playback-data-loaded",e),this.one("dispose",function(){t.off("cv-playback-data-loaded",e)}))}},{key:"lock",value:function(e){this.callback_=e}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(e,n){var r=this;if("number"!=typeof e||!this.callback_||n)return Zh(t,"currentTime",this,3)([e]);this.callback_(function(){r.unlock(),r.currentTime(e)})}},{key:"play",value:function(){var e=this;if(!this.callback_)return Zh(t,"play",this,3)([]);this.callback_(function(){e.unlock(),e.play()})}},{key:"createEl",value:function(){var e=this,n=Zh(t,"createEl",this,3)([]);return this.videoContainer||(this.videoContainer=i.Z.dom.createEl("div",{className:"cv-video-wrapper"}),n.appendChild(this.videoContainer)),Array.from(n.childNodes).forEach(function(t){return t!==e.videoContainer&&e.videoContainer.appendChild(t)}),n}},{key:"addChild",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,i=Zh(t,"addChild",this,3)([e,n,r]),o=i.el();return o&&this.videoContainer.appendChild(o),i}},{key:"updateStyleEl_",value:function(){if(qh.prototype.updateStyleEl_.call(this),this.options_.fluid){var e=this.el_.parentNode;if(e&&this.options_.setMaxHeight){var t=this.aspectRatio();if(void 0!==t&&"auto"!==t||(t=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9"),this.player_.playerModePlugin().getMode()===Ua.Hover)return e.style.removeProperty("maxWidth"),void e.style.removeProperty("margin");var n=t.split(":"),r=+n[1]/+n[0];e.style.maxWidth=85/r+"vh",e.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var e=this;qh.prototype.listenForUserActivity_.call(this);var t=this.getChild("collapserator");t.on("mouseenter",function(){e.player().cache_.inactivityTimeout=e.player().options_.inactivityTimeout,e.player().options_.inactivityTimeout=0}),t.on("mouseleave",function(){e.player().options_.inactivityTimeout=e.player().cache_.inactivityTimeout})}}],r&&Ah(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(qh);function Wh(e){return Wh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wh(e)}function Qh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Jh(r.key),r)}}function Jh(e){var t=function(e){if("object"!=Wh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Wh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wh(t)?t:t+""}function Yh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yh=function(){return!!e})()}function Xh(e){return Xh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xh(e)}function $h(e,t){return $h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$h(e,t)}Hh.prototype.options_=Object.assign(Object.assign({},qh.prototype.options_),{setMaxHeight:!0}),i.Z.registerComponent("player",Hh);var ey=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Xh(t),function(e,t){if(t&&("object"==Wh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Yh()?Reflect.construct(t,n||[],Xh(e).constructor):t.apply(e,n))}(this,t,[e,n])).player_.addClass("cv-disable-play-pause-feedback"),r.onFirstPlay=r.onFirstPlay.bind(r),r.player_.one("play",r.onFirstPlay),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$h(e,t)}(t,e),n=t,(r=[{key:"dispose",value:function(){this.player_.off("play",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var e=this;window.setTimeout(function(){e.player_.isDisposed()||e.player_.removeClass("cv-disable-play-pause-feedback")},500)}},{key:"createEl",value:function(){return i.Z.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Qh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function ty(e){return ty="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ty(e)}function ny(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ry(r.key),r)}}function ry(e){var t=function(e){if("object"!=ty(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ty(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ty(t)?t:t+""}function iy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(iy=function(){return!!e})()}function oy(e){return oy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oy(e)}function ay(e,t){return ay=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ay(e,t)}i.Z.registerComponent("PlayPauseFeedback",ey);var uy=i.Z.getComponent("PlayToggle"),ly="Play (space)",cy=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=oy(t),function(e,t){if(t&&("object"==ty(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,iy()?Reflect.construct(t,n||[],oy(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ay(e,t)}(t,e),n=t,(r=[{key:"handlePlay",value:function(){uy.prototype.handlePlay.call(this),this.controlText("Pause (space)")}},{key:"handlePause",value:function(){uy.prototype.handlePause.call(this),this.controlText(ly)}},{key:"handleClick",value:function(e){var t=this;uy.prototype.handleClick.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){t.player_.removeClass("cv-disable-play-pause-feedback")},500)}}])&&ny(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(uy);function sy(e){return sy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sy(e)}function fy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,py(r.key),r)}}function py(e){var t=function(e){if("object"!=sy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sy(t)?t:t+""}function hy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hy=function(){return!!e})()}function yy(e){return yy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yy(e)}function vy(e,t){return vy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vy(e,t)}i.Z.registerComponent("PlayToggle",cy),cy.prototype.controlText_=ly;var dy=i.Z.getComponent("TextTrackDisplay"),my=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=yy(t),function(e,t){if(t&&("object"==sy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hy()?Reflect.construct(t,n||[],yy(e).constructor):t.apply(e,n))}(this,t,[e,n])).bindListeners(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vy(e,t)}(t,e),n=t,(r=[{key:"bindListeners",value:function(){this.onResize=this.onResize.bind(this),this.player_.on("resize",this.onResize)}},{key:"onResize",value:function(){this.updateDisplay()}},{key:"updateDisplayState",value:function(e){dy.prototype.updateDisplayState.call(this,e);for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var i=n[r];if(i){var o=i.displayState;if(t.fontPercent&&1!==t.fontPercent){var a=.025*this.el().getBoundingClientRect().width*100/100;o.style.fontSize=a*t.fontPercent+"px"}}}}}])&&fy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dy);function by(e){return by="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},by(e)}function gy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wy(r.key),r)}}function wy(e){var t=function(e){if("object"!=by(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=by(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==by(t)?t:t+""}function Oy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oy=function(){return!!e})()}function Sy(e){return Sy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sy(e)}function ky(e,t){return ky=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ky(e,t)}i.Z.registerComponent("TextTrackDisplay",my);var Py=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Sy(t),function(e,t){if(t&&("object"==by(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oy()?Reflect.construct(t,n||[],Sy(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ky(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return i.Z.dom.createEl("div",{className:"cv-control-bar-gradient-container",innerHTML:'<div class="cv-control-bar-gradient"></div>'})}}])&&gy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Ny(e){return Ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ny(e)}function jy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Cy(r.key),r)}}function Cy(e){var t=function(e){if("object"!=Ny(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ny(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ny(t)?t:t+""}function Ty(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ty=function(){return!!e})()}function Ey(e,t,n,r){var i=_y(Ry(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function _y(){return _y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ry(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},_y.apply(null,arguments)}function Ry(e){return Ry=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ry(e)}function xy(e,t){return xy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xy(e,t)}i.Z.registerComponent("ControlBarGradient",Py);var Iy=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ry(t),function(e,t){if(t&&("object"==Ny(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ty()?Reflect.construct(t,n||[],Ry(e).constructor):t.apply(e,n))}(this,t,[e,n])).options_=n,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xy(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e=this.options_.title;if(!this.options_.seriesName)return Ey(t,"createEl",this,3)(["h1",{innerHTML:e}]);var n=this.buildSeasonEpisodeString();return n?(e="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase()," ").concat(n,"</div>")+e,Ey(t,"createEl",this,3)(["h1",{innerHTML:e}])):(e="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+e,Ey(t,"createEl",this,3)(["h1",{innerHTML:e}]))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var e=this.padNumber(this.options_.seasonNumber,2),t=this.padNumber(this.options_.episodeNumber,2);return"S".concat(e," • E").concat(t)}},{key:"padNumber",value:function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}}])&&jy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function My(e){return My="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},My(e)}function By(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ly(r.key),r)}}function Ly(e){var t=function(e){if("object"!=My(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=My(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==My(t)?t:t+""}function Dy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dy=function(){return!!e})()}function Ay(){return Ay="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Fy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ay.apply(null,arguments)}function Fy(e){return Fy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fy(e)}function zy(e,t){return zy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zy(e,t)}var Zy=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Fy(t),function(e,t){if(t&&("object"==My(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Dy()?Reflect.construct(t,n||[],Fy(e).constructor):t.apply(e,n))}(this,t,[e,n])).options_=n,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zy(e,t)}(t,e),n=t,r=[{key:"buildCSSClass",value:function(){return"cv-splash-rating ".concat((e=this.options_.ratingValue)?function(e){switch(!0){case e<32:return"cv-rating-purple";case e<48:return"cv-rating-green";case e<80:return"cv-rating-blue";case e<96:return"cv-rating-red";case e<128:return"cv-rating-pink";case e>=128:return"cv-rating-yellow";default:return""}}(e):"");var e}},{key:"createEl",value:function(e,n,r){return this.options_.ratingCode?(i=t,o=this,"function"==typeof(a=Ay(Fy(1&3?i.prototype:i),"createEl",o))?function(e){return a.apply(o,e)}:a)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerHTML:this.options_.ratingCode}),r]):null;var i,o,a}}],r&&By(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Vy(e){return Vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vy(e)}function Uy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gy(r.key),r)}}function Gy(e){var t=function(e){if("object"!=Vy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vy(t)?t:t+""}function Ky(e,t){if(t&&("object"==Vy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function qy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qy=function(){return!!e})()}function Hy(e){return Hy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hy(e)}function Wy(e,t){return Wy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wy(e,t)}var Qy=function(e){function t(e,n){var r,i,o,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,a=[e,n],o=Hy(o=t),r=Ky(i,qy()?Reflect.construct(o,a||[],Hy(i).constructor):o.apply(i,a)),n.embed?(r.addChild(new Iy(e,n)),r.addChild(new Zy(e,n)),r):Ky(r,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wy(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return i.Z.dom.createEl("div",{className:"cv-splash-metadata"})}}])&&Uy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Jy(e){return Jy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jy(e)}function Yy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xy(r.key),r)}}function Xy(e){var t=function(e){if("object"!=Jy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Jy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jy(t)?t:t+""}function $y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($y=function(){return!!e})()}function ev(e){return ev=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ev(e)}function tv(e,t){return tv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tv(e,t)}var nv=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ev(t),function(e,t){if(t&&("object"==Jy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$y()?Reflect.construct(t,n||[],ev(e).constructor):t.apply(e,n))}(this,t,[e,n])).addChild(new Qy(e,n)),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tv(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e="<div class='cv-splash-mask'></div>";return this.options_.embed&&(e+="<div class='cv-splash-logo'>".concat(Pn,"</div>")),i.Z.dom.createEl("div",{className:"vjs-poster cv-embed-splash cv-embed-splash-black",tabIndex:-1,innerHTML:e})}},{key:"setSrc",value:function(e){var t="";e&&(t='url("'.concat(e,'")')),this.el_.style.backgroundImage=t}}])&&Yy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("posterImage"));function rv(e){return rv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rv(e)}function iv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ov(r.key),r)}}function ov(e){var t=function(e){if("object"!=rv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rv(t)?t:t+""}function av(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(av=function(){return!!e})()}function uv(e){return uv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uv(e)}function lv(e,t){return lv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lv(e,t)}i.Z.registerComponent("posterImage",nv);var cv=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=uv(t),function(e,t){if(t&&("object"==rv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,av()?Reflect.construct(t,n||[],uv(e).constructor):t.apply(e,n))}(this,t,[e,n])).el().prepend(r.getErrorImage()),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lv(e,t)}(t,e),n=t,(r=[{key:"getErrorImage",value:function(){return i.Z.dom.createEl("div",{className:"cv-error-image",innerHTML:'\n <svg viewBox="0 0 301 185" xmlns="http://www.w3.org/2000/svg">\n <path d="M267.393 36.6514V167.906C267.393 168.182 267.169 168.406 266.893 168.406H32C31.7239 168.406 31.5 168.182 31.5 167.906V36.6514C31.5 36.3752 31.7239 36.1514 32 36.1514H80.5C80.7761 36.1514 81 36.3752 81 36.6514V57.7196C81 58.7622 82.0375 59.4868 83.0164 59.1279L95.7377 54.4634C95.9961 54.3687 96.2825 54.5006 96.3785 54.7585L102.094 70.1194C102.677 71.6866 105 71.2685 105 69.5964V48.4925C105 47.7632 104.475 47.1396 103.757 47.0146L94.2479 45.3609C93.9436 45.308 93.7596 44.9946 93.8616 44.7031L96.7376 36.4862C96.8077 36.2856 96.997 36.1514 97.2095 36.1514H266.893C267.169 36.1514 267.393 36.3752 267.393 36.6514Z" stroke="white"/>\n <path d="M163.296 101.777L149.437 90.1217C148.275 89.1441 146.5 89.9705 146.5 91.4894V113.664C146.5 115.141 148.191 115.98 149.367 115.087L163.226 104.569C164.139 103.876 164.173 102.515 163.296 101.777Z" stroke="white" stroke-linecap="round"/>\n <path d="M295.53 23.0783L277.524 26.2801L283.252 32.7192L274.855 38.9079L292.861 35.7061L287.133 29.2671L295.53 23.0783Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M268.06 2.91764L254.192 14.8403L262.401 17.4661L258.324 27.0679L272.192 15.1453L263.983 12.5194L268.06 2.91764Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n '})}}])&&iv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("ErrorDisplay"));function sv(e){return sv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sv(e)}function fv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pv(r.key),r)}}function pv(e){var t=function(e){if("object"!=sv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sv(t)?t:t+""}function hv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hv=function(){return!!e})()}function yv(e){return yv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yv(e)}function vv(e,t){return vv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vv(e,t)}i.Z.registerComponent("ErrorDisplay",cv);var dv=i.Z.getComponent("FullscreenToggle"),mv="Fullscreen (f)",bv=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=yv(t),function(e,t){if(t&&("object"==sv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hv()?Reflect.construct(t,n||[],yv(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vv(e,t)}(t,e),n=t,(r=[{key:"handleFullscreenChange",value:function(){dv.prototype.handleFullscreenChange.call(this),this.controlText(mv)}}])&&fv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dv);function gv(e){return gv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gv(e)}function wv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ov(r.key),r)}}function Ov(e){var t=function(e){if("object"!=gv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gv(t)?t:t+""}function Sv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sv=function(){return!!e})()}function kv(e){return kv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kv(e)}function Pv(e,t){return Pv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pv(e,t)}i.Z.registerComponent("FullscreenToggle",bv),bv.prototype.controlText_=mv;var Nv=i.Z.getComponent("MuteToggle"),jv="Mute (m)",Cv=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=kv(t),function(e,t){if(t&&("object"==gv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Sv()?Reflect.construct(t,n||[],kv(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pv(e,t)}(t,e),n=t,(r=[{key:"updateControlText_",value:function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute (m)":jv;this.controlText_!==e&&this.controlText(e)}}])&&wv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nv);i.Z.registerComponent("MuteToggle",Cv),Cv.prototype.controlText_=jv;var Tv=n(67453),Ev=n(54610);function _v(e){return _v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_v(e)}function Rv(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return xv(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(xv(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,xv(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,xv(f,"constructor",c),xv(c,"constructor",l),l.displayName="GeneratorFunction",xv(c,i,"GeneratorFunction"),xv(f),xv(f,i,"Generator"),xv(f,r,function(){return this}),xv(f,"toString",function(){return"[object Generator]"}),(Rv=function(){return{w:o,m:p}})()}function xv(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}xv=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){xv(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},xv(e,t,n,r)}function Iv(e){return function(e){if(Array.isArray(e))return Mv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Mv(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mv(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Bv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Lv(r.key),r)}}function Lv(e){var t=function(e){if("object"!=_v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_v(t)?t:t+""}var Dv,Av=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},Fv=i.Z.getComponent("Player"),zv=function(){return e=function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamLogged=!1,this.options=i.Z.obj.merge({},e.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(t),this.buildVideoJs(),this.options.splash&&this.setupSplash(this.options.splash),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready(function(){r._configurePlugins(),r.options.setup&&r.options.setup(r.options,r.player),r.fetch().catch(function(e){return r.handleFetchError(e)})})},(t=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.configureMenuDimensionsPlugin({mobile:this.options.mobile,overflowControls:this.options.overflowControls,seekBarName:this.getSeekBarName()}),this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),!this.options.mobile&&this.options.allowFullscreen&&this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(e){var t;null===(t=this.analyticsService)||void 0===t||t.logVideoProgress(e)}},{key:"buildVideoJs",value:function(){return this.player=(0,i.Z)(this.el,this.getPlayerOptions())}},{key:"getInactivityTimeout",value:function(){if("number"==typeof this.options.inactivityTimeout)return this.options.inactivityTimeout;var e=500;return(this.options.mobile||i.Z.browser.IS_IOS||i.Z.browser.IS_ANDROID)&&(e=3e3),e}},{key:"getFluid",value:function(){return!this.options.theatreMode&&!this.options.embed&&!this.options.mobile}},{key:"getFill",value:function(){return!!this.options.theatreMode||!(!this.options.embed&&!this.options.mobile)}},{key:"getPlayerOptions",value:function(){var e=this,t=Fv.prototype.options_.children;return t=t.filter(function(e){return"bigPlayButton"!==e&&"posterImage"!==e}),{controls:this.options.controls,fluid:this.getFluid(),fill:this.getFill(),inactivityTimeout:this.getInactivityTimeout(),controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(Iv(t),[{name:"collapserator",children:tt.filter(function(t){return!("fullscreenToggle"===t&&!e.options.allowFullscreen)})},"playPauseFeedback","controlBarGradient"]),userActions:{hotkeys:function(t){return function(e,t,n){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){var r=Tt()(e);if(("t"!==r||n.allowTheatreMode)&&("f"!==r||n.allowFullscreen)&&Bt[r]){Bt[r](t,e);var i=function(e){var t=e.target;return"video"===t.tagName.toLowerCase()||!!["video-js","vjs-tech"].find(function(e){return t.classList.contains(e)})}(e),o=["space"].includes(r);(i||o)&&(e.preventDefault(),e.stopPropagation())}}}(t,e.player,e.options)}},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,allowTheatreMode:this.options.allowTheatreMode,deferMenus:this.options.deferMenus,muted:this.options.muted,devicesConfig:this.options.devicesConfig}}},{key:"getPlaybackObject",value:function(){return Av(this,void 0,void 0,Rv().m(function e(){var t,n,r=this;return Rv().w(function(e){for(;;)switch(e.n){case 0:if(!this.options.offlinePlaybackObject){e.n=1;break}return e.a(2,this.options.offlinePlaybackObject);case 1:if(t=this.options.fetch,void 0===this.options.fetch&&(t=function(e){var t="".concat(r.options.playerApi.origin,"/api/playback?viewKey=").concat(e);return jt.get(t)}),this.options.viewKey){e.n=2;break}throw new Error("Please specify a viewKey or a fetch function");case 2:return e.n=3,t(this.options.viewKey);case 3:if(n=e.v){e.n=4;break}throw new Error("Error fetching playback object");case 4:return e.a(2,n)}},e,this)}))}},{key:"setChaptersInternal",value:function(e,t){var n=Q.getTrack(this.player,"chapters",null);n||(n=this.player.addTextTrack("chapters")),Iv(n.cues.cues_).forEach(function(e){return n.removeCue(e)}),e.forEach(function(e){n.addCue({startTime:e.timestamp,endTime:e.endTimestamp,text:e.name})}),t&&n.trigger({type:"cv:cuechange",target:n}),n.trigger({type:"loadeddata",target:n})}},{key:"setChapters",value:function(e){this.setChaptersInternal(e,!0)}},{key:"setPlayerMode",value:function(e,t){this.player.playerModePlugin().setPlayerMode(e,t)}},{key:"setFavourite",value:function(e,t){this.player.favouritePlugin().setFavourite(e,t)}},{key:"fetch",value:function(){var e,t,n,r,i;return Av(this,void 0,void 0,Rv().m(function o(){var a,u,l,c=this;return Rv().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,this.getPlaybackObject();case 1:if(a=o.v,!this.isDisposed()){o.n=2;break}return o.a(2);case 2:u="MasterClip"===a.mediaType,l=null===(e=a.additionalData)||void 0===e?void 0:e.clipData,(null===(n=null===(t=a.chapters)||void 0===t?void 0:t.list)||void 0===n?void 0:n.length)>0&&!u&&!l&&this.setChaptersInternal(a.chapters.list,!1),this.player.localCache({localCacheAddresses:null!==(r=a.localCacheAddresses)&&void 0!==r?r:[],enabled:null===(i=this.options.enableLocalCache)||void 0===i||i}),this.player.progressiveFiles({sources:a.files.progressive.map(function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}})}),this.player.handleNetworkErrors({playerApi:this.options.playerApi,fileToken:a.files.fileToken}),a.subtitles.list.length>0&&a.subtitles.list.forEach(function(e){if("text/vtt"===e.mimeType){var t=c.player.addRemoteTextTrack({kind:"subtitles",src:e.url,language:e.language,label:e.label},!0);t.track.isClickViewProduced=e.isClickViewProduced,Q.sanitizeTrack(t.track,c.player),Q.activeTextTrack(t.track)}}),a.posterUrl&&this.player.poster(Tv.j.createUrl(a.posterUrl,{size:Ev.h2.Large})),this.setupSplash({title:a.title,posterUrl:a.posterUrl,episodeNumber:a.episodeNumber,ratingCode:a.ratingCode,seasonNumber:a.seasonNumber,seriesName:a.seriesName}),this.additionalSetup(a),this.handleAutoplay(a),this.options.startTime&&(this.player.currentTime(this.options.startTime),this.player.one("canplay",function(){c.player.currentTime(c.options.startTime)})),this.player.trigger("cv-playback-data-loaded",a);case 3:return o.a(2)}},o,this)}))}},{key:"handleFetchError",value:function(e){var t,n=e.message;e instanceof bt&&(null===(t=e.response)||void 0===t?void 0:t.type)===Mt.PhysicallyChapteredVideo&&(n="Video cannot be played because it is either corrupt or damaged."),this.player.error(n),this.options.onError&&this.options.onError(e)}},{key:"fetchConfig",value:function(){return Av(this,void 0,void 0,Rv().m(function e(){var t;return Rv().w(function(e){for(;;)switch(e.n){case 0:if(!(Dv||this.options.fetch||this.options.offlinePlaybackObject)){e.n=1;break}return e.a(2);case 1:return t="".concat(this.options.playerApi.origin,"/api/config"),e.n=2,jt.get(t);case 2:if(Dv=e.v,!this.isDisposed()){e.n=3;break}return e.a(2);case 3:this.trigger("config:loaded");case 4:return e.a(2)}},e,this)}))}},{key:"additionalSetup",value:function(e){var t,n=this;this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var r=this.options.enableLocalCache&&!!(null===(t=e.localCacheAddresses)||void 0===t?void 0:t.length);Dv?this.setupAnalyticsService(e,r):this.one("config:loaded",function(){return n.setupAnalyticsService(e,r)}),this.analyticsService||!this.isAnalyticsEnabled()?this.setupAnalyticsDependentPlugins(e):this.one("analytics:loaded",function(){return n.setupAnalyticsDependentPlugins(e)})}},{key:"setupAnalyticsService",value:function(e,t){this.options.eventLogging&&(this.analyticsService=new pt({player:this.player,collectionApiUrls:Dv.collectionApi.urls,collectionApiClientId:Dv.collectionApi.clientId,productVersion:"1.36.0-rc.0",authSessionId:e.viewerAuthSessionId,videoId:e.videoId,mediaId:e.mediaId,userId:e.viewerId,shareId:e.shareId,customerId:e.viewerCustomerId,mediaType:e.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:t,additionalAnalyticsData:this.getAdditionalAnalyticsData(e),regionName:e.instanceRegion||this.options.sharerInstanceRegion||Lt.M.CvApSoutheast1}),this.on("timeupdate",this.logStream),this.trigger("analytics:loaded"))}},{key:"setupAnalyticsDependentPlugins",value:function(e){var t,n,r,i;this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(t=e.settings)||void 0===t?void 0:t.showSubtitles,subtitleSize:null===(n=e.settings)||void 0===n?void 0:n.playbackSubtitleSizeDefault,analyticsService:this.analyticsService}),this.player.persistQualitySettingsPlugin({playbackProfile:null===(r=e.settings)||void 0===r?void 0:r.playbackProfile,playbackProfileLocalCache:null===(i=e.settings)||void 0===i?void 0:i.playbackProfileLocalCache,analyticsService:this.analyticsService}),this.player.persistPlaybackRatePlugin({analyticsService:this.analyticsService})}},{key:"getAdditionalAnalyticsData",value:function(e){return{}}},{key:"isAnalyticsEnabled",value:function(){return!this.options.fetch&&!this.options.offlinePlaybackObject&&this.options.eventLogging}},{key:"handleAutoplay",value:function(e){var t=this;this.options.autoplay&&this.player.ready(function(){t.player.play().catch(function(){t.isDisposed()||t.showSplash()})})}},{key:"logStream",value:function(){this.analyticsService&&(this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream)))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(e){var t;"string"==typeof e?(e=function(e){return 0===e.indexOf("#")?e.slice(1):e}(e),t=i.Z.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=i.Z.dom.createEl("video",{},{class:n}),t.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(e,t){this.player.on(e,t)}},{key:"one",value:function(e,t){this.player.one(e,t)}},{key:"off",value:function(e,t){this.player.off(e,t)}},{key:"trigger",value:function(e,t){return this.player.trigger(e,t)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(e){this.player.ready(e)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(e){return this.player.currentTime(e)}},{key:"muted",value:function(e){return this.player.muted(e)}},{key:"duration",value:function(){return this.player.duration()}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"requestFullscreen",value:function(){this.player.requestFullscreen()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"playbackRate",value:function(e){return this.player.playbackRate(e)}},{key:"quality",value:function(e){for(var t=this.player.qualityLevels(),n=0;n<t.length;n++){var r=t[n];if(e)r.enabled=r.id===e.toString();else if(r.enabled)return r.id}}},{key:"subtitles",value:function(e){for(var t=this.player.textTracks(),n=0;n<t.length;n++){var r=t[n];if(void 0===e){if("showing"===r.mode)return r.label}else r.label===e?r.mode="showing":r.mode="hidden"}}},{key:"bindEventListeners",value:function(){var e=this,t=function(e){return e.preventDefault()};if(this.showSplash=this.showSplash.bind(this),this.hideSplash=this.hideSplash.bind(this),this.player.on("ended",this.showSplash),this.player.on("play",this.hideSplash),this.player.tech(!0).on("contextmenu",t),this.player.one("dispose",function(){e.off("ended",e.showSplash),e.off("play",e.hideSplash),e.player.tech(!0).off("contextmenu",t)}),this.options.hotkeyElQuerySelector){var n=i.Z.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",function(){e.player.off(n,"keydown",e.player.handleKeyDown)}))}}},{key:"setupSeekBar",value:function(){var e=this.getSeekBarName(),t=this.player.controlBar.getChild("progressControl");t.addChild(e,this.getSeekBarOptions()),t.setSeekBarName(e)}},{key:"setupSplash",value:function(e){this._splashAdded||(this._splashAdded=!0,this.player.addChild("posterImage",Object.assign({embed:this.options.embed},e)),this.player.addChild("bigPlayButton"),this.options.autoplay?this.hideSplash():this.showSplash())}},{key:"showSplash",value:function(){this.player.hasStarted(!1),this.player.getChild("posterImage").show(),this.player.getChild("bigPlayButton").show()}},{key:"hideSplash",value:function(){this.player.getChild("posterImage").hide(),this.player.getChild("bigPlayButton").hide()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}}])&&Bv(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Zv(e){return Zv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zv(e)}function Vv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Uv(r.key),r)}}function Uv(e){var t=function(e){if("object"!=Zv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Zv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Zv(t)?t:t+""}function Gv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gv=function(){return!!e})()}function Kv(){return Kv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=qv(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Kv.apply(null,arguments)}function qv(e){return qv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qv(e)}function Hv(e,t){return Hv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hv(e,t)}zv.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0,eventLogging:!0,allowFullscreen:!0};var Wv=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=qv(t),function(e,t){if(t&&("object"==Zv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Gv()?Reflect.construct(t,n||[],qv(e).constructor):t.apply(e,n))}(this,t,[e]),void 0===n.startTime)throw Error("Invalid clip start");if(void 0===n.endTime)throw Error("Invalid clip end");if(n.startTime>n.endTime)throw Error("Clip start cannot be greater than clip end");return r._clipStart=parseFloat(n.startTime.toPrecision(4)),r._clipEnd=parseFloat(n.endTime.toPrecision(4)),r.playerEndedFn=r.player.ended.bind(e),r.playerDurationFn=r.player.duration.bind(e),r.playerCurrentTimeFn=r.player.currentTime.bind(e),r.playerbufferedFn=r.player.buffered.bind(e),r.player.ended=r.ended.bind(r),r.player.duration=r.duration.bind(r),r.player.currentTime=r.currentTime.bind(r),r.player.buffered=r.buffered.bind(r),r.initialize(),r.player.ready(function(){r.player.trigger("durationchange")}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hv(e,t)}(t,e),n=t,r=[{key:"clipStart",get:function(){var e=this.playerDurationFn();return this._clipStart>e?e:this._clipStart}},{key:"clipEnd",get:function(){var e=this.playerDurationFn();return e<=0?this._clipEnd:this._clipEnd>e?e:this._clipEnd}},{key:"dispose",value:function(){var e,n,r;this.player.off("timeupdate",this.onTimeUpdate),this.player.off("play",this.onPlay),this.player.ended=this.playerEndedFn,this.player.duration=this.playerDurationFn,this.player.currentTime=this.playerCurrentTimeFn,this.player.buffered=this.playerbufferedFn,this.player.trigger("durationchange"),(e=t,n=this,"function"==typeof(r=Kv(qv(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var e=this.getCurrentTime(!1);e>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,e<this.clipStart-10&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(e){return e&&e>0&&(this.playerDurationFn()?console.info("The duration of the player has already been set. This is a no-op."):this.playerDurationFn(e)),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(e){if("number"!=typeof e)return this.getCurrentTime(!0);for(var t=e+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.playerCurrentTimeFn(t,r)}},{key:"getCurrentTime",value:function(e){var t=this.playerCurrentTimeFn(),n=0;return t>=this.clipStart&&(n=t-this.clipStart),this.player.getCache().currentTime=n,e?n:t}},{key:"buffered",value:function(){for(var e=this.playerbufferedFn(),t=[],n=0;n<e.length;n++)t[n]=[Math.max(0,e.start(n)-this.clipStart),Math.min(Math.max(0,e.end(n)-this.clipStart),this.player.duration())];return i.Z.createTimeRanges(t)}}],r&&Vv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function Qv(e){return Qv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qv(e)}function Jv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Yv(r.key),r)}}function Yv(e){var t=function(e){if("object"!=Qv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qv(t)?t:t+""}function Xv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xv=function(){return!!e})()}function $v(){return $v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ed(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},$v.apply(null,arguments)}function ed(e){return ed=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ed(e)}function td(e,t){return td=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},td(e,t)}i.Z.registerPlugin("clipPlugin",Wv);var nd=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=ed(t),function(e,t){if(t&&("object"==Qv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Xv()?Reflect.construct(t,n||[],ed(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&td(e,t)}(t,e),n=t,r=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){var e,n,r;(e=t,n=this,"function"==typeof(r=$v(ed(1&3?e.prototype:e),"handleClick",n))?function(e){return r.apply(n,e)}:r)([null])}}],r&&Jv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Button"));function rd(e){return rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rd(e)}function id(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,od(r.key),r)}}function od(e){var t=function(e){if("object"!=rd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rd(t)?t:t+""}function ad(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ad=function(){return!!e})()}function ud(e){return ud=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ud(e)}function ld(e,t){return ld=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ld(e,t)}nd.prototype.controlText_="Create clip",i.Z.registerComponent("CreateClipButton",nd);var cd=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ud(t),function(e,t){if(t&&("object"==rd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ad()?Reflect.construct(t,n||[],ud(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,e.ready(function(){return r.onReady()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ld(e,t)}(t,e),n=t,(r=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex(function(e){return"CustomControlSpacer"===e.name()});n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&id(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function sd(e){return sd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sd(e)}function fd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pd(r.key),r)}}function pd(e){var t=function(e){if("object"!=sd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sd(t)?t:t+""}function hd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hd=function(){return!!e})()}function yd(e){return yd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yd(e)}function vd(e,t){return vd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vd(e,t)}i.Z.registerPlugin("createClipButtonPlugin",cd);var dd=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=yd(t),function(e,t){if(t&&("object"==sd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hd()?Reflect.construct(t,n||[],yd(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vd(e,t)}(t,e),n=t,(r=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&fd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("PictureInPictureToggle"));function md(e){return md="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},md(e)}function bd(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return gd(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(gd(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,gd(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,gd(f,"constructor",c),gd(c,"constructor",l),l.displayName="GeneratorFunction",gd(c,i,"GeneratorFunction"),gd(f),gd(f,i,"Generator"),gd(f,r,function(){return this}),gd(f,"toString",function(){return"[object Generator]"}),(bd=function(){return{w:o,m:p}})()}function gd(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}gd=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){gd(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},gd(e,t,n,r)}function wd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Od(r.key),r)}}function Od(e){var t=function(e){if("object"!=md(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=md(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==md(t)?t:t+""}function Sd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sd=function(){return!!e})()}function kd(){return kd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Pd(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},kd.apply(null,arguments)}function Pd(e){return Pd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pd(e)}function Nd(e,t){return Nd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nd(e,t)}i.Z.registerComponent("PictureInPictureToggle",dd);var jd=i.Z.getComponent("PlayToggle"),Cd=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Pd(t),function(e,t){if(t&&("object"==md(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Sd()?Reflect.construct(t,n||[],Pd(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,r.bindFunctions(),e.ready(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nd(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"initialize",value:function(){var e=this,t=this.player.getChild("collapserator"),n=t.children().findIndex(function(e){var t;return"fullscreentoggle"===(null===(t=e.name())||void 0===t?void 0:t.toLowerCase())});-1===n&&(n=t.children().length-1),this.toggle=t.addChild("pictureInPictureToggle",{},n),this.toggle.enable(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",function(){var t;null===(t=e.player)||void 0===t||t.off("playerresize",e.onPlayerResize)})}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){var e,t;if(!this.player.isInPictureInPicture()){var n=this.player.el().getBoundingClientRect();0!==n.width&&(n.width<800?null===(e=this.toggle)||void 0===e||e.hide():null===(t=this.toggle)||void 0===t||t.show())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new jd(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){var e;this.togglePictureInPicture(!0),"function"==typeof(null===(e=this.options)||void 0===e?void 0:e.onRequestPictureInPicture)&&this.options.onRequestPictureInPicture(!0)}},{key:"exitPictureInPicture",value:function(){return e=this,t=void 0,n=void 0,r=bd().m(function e(){return bd().w(function(e){for(;;)switch(e.n){case 0:this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles();case 1:return e.a(2)}},e,this)}),new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())});var e,t,n,r}},{key:"dispose",value:function(){var e,n,r;this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,(e=t,n=this,"function"==typeof(r=kd(Pd(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&wd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function Td(e){return Td="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Td(e)}function Ed(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_d(r.key),r)}}function _d(e){var t=function(e){if("object"!=Td(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Td(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Td(t)?t:t+""}i.Z.registerPlugin("pictureInPicture",Cd);var Rd=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}},t=[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex(function(e){return e.callback===t});"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[e]){var o=[];this.listeners[e].forEach(function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&o.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))}),o.length&&o.forEach(function(n){return t.deregisterListener(e,n)})}}}],t&&Ed(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());function xd(e){return xd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xd(e)}function Id(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Md(r.key),r)}}function Md(e){var t=function(e){if("object"!=xd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xd(t)?t:t+""}function Bd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Bd=function(){return!!e})()}function Ld(e,t,n,r){var i=Dd(Ad(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Dd(){return Dd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ad(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Dd.apply(null,arguments)}function Ad(e){return Ad=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ad(e)}function Fd(e,t){return Fd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fd(e,t)}var zd=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ad(t),function(e,t){if(t&&("object"==xd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Bd()?Reflect.construct(t,n||[],Ad(e).constructor):t.apply(e,n))}(this,t,[e,n])).hasBuffered=!1,r.hasPlayed=!1,r.eventsService=Rd,r.pointOfInterest=n.pointOfInterest,r.onMouseOver=r.onMouseOver.bind(r),r.onMouseLeave=r.onMouseLeave.bind(r),r.onGlancePointOfInterestMouseEnter=r.onGlancePointOfInterestMouseEnter.bind(r),r.onGlancePointOfInterestMouseLeave=r.onGlancePointOfInterestMouseLeave.bind(r),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fd(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(Ld(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Ld(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/e*100+"%"}},{key:"updateBuffered",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasBuffered){this.hasBuffered=t;var n="cv-point-of-interest-indicator-buffered";this.hasBuffered?this.addClass(n):this.removeClass(n)}}},{key:"updatePlaybackProgress",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasPlayed){this.hasPlayed=t;var n="cv-point-of-interest-indicator-played";t?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(e){var t="cv-point-of-interest-indicator-hidden";e?this.removeClass(t):this.addClass(t)}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(e){e.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var e=this.getTimeTooltip();null==e||e.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var e,t,n=null===(e=this.getSeekBar())||void 0===e?void 0:e.el();if(n){var r=i.Z.dom.findPosition(n),o=this.getPointOfInterestTime()/this.player().duration();null===(t=this.getMouseTimeDisplay())||void 0===t||t.update(r,o)}}},{key:"showMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.removeForceShow()}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player().controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var e;return null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var e;return null===(e=this.getMouseTimeDisplay())||void 0===e?void 0:e.getChild("TimeTooltip")}}])&&Id(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Zd(e){return Zd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zd(e)}function Vd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ud(r.key),r)}}function Ud(e){var t=function(e){if("object"!=Zd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Zd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Zd(t)?t:t+""}function Gd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gd=function(){return!!e})()}function Kd(){return Kd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=qd(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Kd.apply(null,arguments)}function qd(e){return qd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qd(e)}function Hd(e,t){return Hd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hd(e,t)}var Wd=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=qd(t),function(e,t){if(t&&("object"==Zd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Gd()?Reflect.construct(t,n||[],qd(e).constructor):t.apply(e,n))}(this,t,[e,n])).pointsOfInterestVisible=n.pointsOfInterestVisible,r.toggle(r.pointsOfInterestVisible),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hd(e,t)}(t,e),n=t,r=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){i.Z.dom.addClass(this.toggleEl,"on"),i.Z.dom.setAttribute(this.toggleEl,"aria-checked","true"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){i.Z.dom.removeClass(this.toggleEl,"on"),i.Z.dom.setAttribute(this.toggleEl,"aria-checked","false"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,n,r){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=i.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),i.Z.dom.setAttribute(this.toggleEl,"id","poi-toggle"),i.Z.dom.setAttribute(this.toggleEl,"role","switch"),this.toggleEl.addEventListener("click",this.handleToggle);var o,a,u,l=(o=t,a=this,"function"==typeof(u=Kd(qd(1&3?o.prototype:o),"createEl",a))?function(e){return u.apply(a,e)}:u)([e,{className:"vjs-menu-item cv-cog-menu-item cv-poi-toggle",innerHTML:'\n <span for="poi-toggle" class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},r]);return l.children[1].appendChild(this.toggleEl),l}}],r&&Vd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function Qd(e){return Qd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qd(e)}function Jd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Yd(r.key),r)}}function Yd(e){var t=function(e){if("object"!=Qd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qd(t)?t:t+""}function Xd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xd=function(){return!!e})()}function $d(e){return $d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$d(e)}function em(e,t){return em=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},em(e,t)}i.Z.registerComponent("PointsOfInterestMenuItem",Wd);var tm,nm=i.Z.getPlugin("plugin"),rm="cvplayer-points-of-interest",im=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=$d(t),function(e,t){if(t&&("object"==Qd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Xd()?Reflect.construct(t,n||[],$d(e).constructor):t.apply(e,n))}(this,t,[e])).pointOfInterestIndicators=[],r.enabled=!0,r.pointsOfInterest=null==n?void 0:n.pointsOfInterest,r.initialize=r.initialize.bind(r),r.updateBuffered=r.updateBuffered.bind(r),r.updatePlaybackProgress=r.updatePlaybackProgress.bind(r),r.player.one("loadedmetadata",function(){return r.player.ready(r.initialize)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&em(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.pointsOfInterest&&(qt()&&"false"===Ht(rm)&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var e=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",function(){var t,n;null===(t=e.player)||void 0===t||t.off("progress",e.updateBuffered),null===(n=e.player)||void 0===n||n.off("timeupdate",e.updatePlaybackProgress)})}},{key:"togglePointsOfInterest",value:function(e){Wt(rm,e.toString()),this.pointOfInterestIndicators.forEach(function(t){return t.toggleVisibility(e)})}},{key:"setupTrack",value:function(){var e=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach(function(t){e.addCue({startTime:t.startTime,endTime:t.endTime,text:t.description})}),e.trigger({type:"loadeddata",target:e})}},{key:"createPointOfInterestIndicators",value:function(){var e,t=this,n=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.pointsOfInterest.forEach(function(e){var r=new zd(t.player,{pointOfInterest:e});t.pointOfInterestIndicators.push(r),n.addChild(r)})}},{key:"addMenuItem",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({index:0,ctor:Wd,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach(function(t){return t.updateBuffered($l(e.player))})}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach(function(t){return t.updatePlaybackProgress(e.player.currentTime())})}}])&&Jd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(nm);function om(e){return om="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},om(e)}function am(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,um(r.key),r)}}function um(e){var t=function(e){if("object"!=om(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=om(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==om(t)?t:t+""}function lm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lm=function(){return!!e})()}function cm(e){return cm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cm(e)}function sm(e,t){return sm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sm(e,t)}i.Z.registerPlugin("pointsOfInterestPlugin",im),function(e){e.None="None",e.Complete="Complete",e.Incomplete="Incomplete"}(tm||(tm={}));var fm=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=cm(t),function(e,t){if(t&&("object"==om(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,lm()?Reflect.construct(t,n||[],cm(e).constructor):t.apply(e,n))}(this,t,[e,n])).update(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sm(e,t)}(t,e),n=t,r=[{key:"update",value:function(){this.options_.activityStatus===tm.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.getToggledActivityStatus(),this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}},{key:"getToggledActivityStatus",value:function(){return this.options_.activityStatus===tm.None||this.options_.activityStatus===tm.Incomplete?tm.Complete:this.options_.activityStatus===tm.Complete?tm.Incomplete:void 0}}],r&&am(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Button"));function pm(e){return pm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pm(e)}function hm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ym(r.key),r)}}function ym(e){var t=function(e){if("object"!=pm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pm(t)?t:t+""}function vm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vm=function(){return!!e})()}function dm(e){return dm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dm(e)}function mm(e,t){return mm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mm(e,t)}fm.prototype.controlText_="Complete";var bm=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=dm(t),function(e,t){if(t&&("object"==pm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,vm()?Reflect.construct(t,n||[],dm(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mm(e,t)}(t,e),n=t,(r=[{key:"setActivityStatus",value:function(e,t){var n=this;e!==this.activityStatus&&(this.activityStatus=e,this.onToggleStatus=t,this.player.ready(function(){n.renderActivityStatusButton()}))}},{key:"renderActivityStatusButton",value:function(){this.button&&this.player.removeChild(this.button),this.button=new fm(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button)}}])&&hm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function gm(e){return gm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gm(e)}function wm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Om(r.key),r)}}function Om(e){var t=function(e){if("object"!=gm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gm(t)?t:t+""}function Sm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sm=function(){return!!e})()}function km(e,t,n,r){var i=Pm(Nm(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Pm(){return Pm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Nm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Pm.apply(null,arguments)}function Nm(e){return Nm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nm(e)}function jm(e,t){return jm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jm(e,t)}i.Z.registerPlugin("activityStatusPlugin",bm);var Cm=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Nm(t),function(e,t){if(t&&("object"==gm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Sm()?Reflect.construct(t,n||[],Nm(e).constructor):t.apply(e,n))}(this,t,[e,n])).initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jm(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.setPosition()}},{key:"buildCSSClass",value:function(){return"cv-range-indicator ".concat(km(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return km(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.options_.time/e*100+"%"}}])&&wm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Tm(e){return Tm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tm(e)}function Em(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_m(r.key),r)}}function _m(e){var t=function(e){if("object"!=Tm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Tm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Tm(t)?t:t+""}function Rm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Rm=function(){return!!e})()}function xm(e,t,n,r){var i=Im(Mm(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Im(){return Im="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Mm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Im.apply(null,arguments)}function Mm(e){return Mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mm(e)}function Bm(e,t){return Bm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bm(e,t)}var Lm=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Mm(t),function(e,t){if(t&&("object"==Tm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Rm()?Reflect.construct(t,n||[],Mm(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bm(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view-button ".concat(xm(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return xm(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{innerHTML:'<span class="'.concat(this.options_.iconClassName,'"></span><span>').concat(this.options_.label,"</span>"),className:this.buildCSSClass()}),r])}},{key:"handleClick",value:function(){this.options_.onPress()}}])&&Em(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("ClickableComponent"));function Dm(e){return Dm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dm(e)}function Am(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fm(r.key),r)}}function Fm(e){var t=function(e){if("object"!=Dm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dm(t)?t:t+""}function zm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zm=function(){return!!e})()}function Zm(e,t,n,r){var i=Vm(Um(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Vm(){return Vm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Um(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Vm.apply(null,arguments)}function Um(e){return Um=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Um(e)}function Gm(e,t){return Gm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gm(e,t)}var Km=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Um(t),function(e,t){if(t&&("object"==Dm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,zm()?Reflect.construct(t,n||[],Um(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gm(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view ".concat(Zm(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){var o=Zm(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r]),a=i.Z.dom.createEl("h5",{innerHTML:this.localize("This clip has finished"),className:"cv-replay-heading"}),u=i.Z.dom.createEl("div",{className:"cv-button-container"}),l=new Lm(this.player_,{label:this.localize("Replay clip"),iconClassName:"cv-replay-icon",onPress:this.options_.onReplayPress}),c=new Lm(this.player_,{label:this.localize("Continue watching"),iconClassName:"cv-continue-icon",onPress:this.options_.onContinuePress});return o.appendChild(a),o.appendChild(u),u.appendChild(l.el()),u.appendChild(c.el()),o}}])&&Am(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function qm(e){return qm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qm(e)}function Hm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wm(r.key),r)}}function Wm(e){var t=function(e){if("object"!=qm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qm(t)?t:t+""}function Qm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qm=function(){return!!e})()}function Jm(){return Jm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ym(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Jm.apply(null,arguments)}function Ym(e){return Ym=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ym(e)}function Xm(e,t){return Xm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xm(e,t)}var $m=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ym(t),function(e,t){if(t&&("object"==qm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Qm()?Reflect.construct(t,n||[],Ym(e).constructor):t.apply(e,n))}(this,t,[e,n])).startTime=parseFloat(n.startTime.toPrecision(4)),r.endTime=parseFloat(n.endTime.toPrecision(4)),r.dismissed=!1,r.startTime>r.endTime)throw Error("Range start cannot be greater than range end");return r.bindFunctions(),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xm(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.onReady=this.onReady.bind(this),this.onTimeUpdateOrSeeked=this.onTimeUpdateOrSeeked.bind(this),this.onReplayPress=this.onReplayPress.bind(this),this.onContinuePress=this.onContinuePress.bind(this)}},{key:"initialize",value:function(){var e=this;this.player.one("loadedmetadata",function(){return e.player.ready(e.onReady)}),this.player.on("timeupdate",this.onTimeUpdateOrSeeked),this.player.on("seeked",this.onTimeUpdateOrSeeked)}},{key:"onReady",value:function(){this.addCssClasses(),this.showRangeIndicators(),this.addMaskToProgressBar()}},{key:"onTimeUpdateOrSeeked",value:function(){if(!this.dismissed){var e=this.player.currentTime();if(!(e<this.startTime))return e>this.endTime?(this.showReplayView(),this.disablePlayToggle(),this.player.pause(),void this.player.currentTime(this.endTime)):void 0;this.player.currentTime(this.startTime)}}},{key:"onReplayPress",value:function(){this.player.currentTime(this.startTime),this.player.play(),this.hideReplayView(),this.enablePlayToggle()}},{key:"onContinuePress",value:function(){this.dismissed=!0,this.player.play(),this.hideRangeIndicators(),this.removeMaskFromProgressBar(),this.hideReplayView(),this.enablePlayToggle(),this.removeCssClasses()}},{key:"showRangeIndicators",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.startTimeIndicator||(this.startTimeIndicator=new Cm(this.player,{time:this.startTime}),null==t||t.addChild(this.startTimeIndicator)),this.endTimeIndicator||(this.endTimeIndicator=new Cm(this.player,{time:this.endTime}),null==t||t.addChild(this.endTimeIndicator))}},{key:"hideRangeIndicators",value:function(){var e,t;null===(e=this.startTimeIndicator)||void 0===e||e.hide(),null===(t=this.endTimeIndicator)||void 0===t||t.hide()}},{key:"addMaskToProgressBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar"),n=null==t?void 0:t.el().getElementsByClassName("cv-chapter-bar-items");if(n&&n.length){var r=n[0],i=this.player.duration(),o=this.startTime/i*100,a=100-this.endTime/i*100;r.style.clipPath="inset(".concat(-5,"em ").concat(a,"% ").concat(-5,"em ").concat(o,"%)")}}},{key:"removeMaskFromProgressBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar"),n=null==t?void 0:t.el().getElementsByClassName("cv-chapter-bar-items");n&&n.length&&(n[0].style.clipPath="")}},{key:"showReplayView",value:function(){this.replayView||(this.replayView=new Km(this.player,{onContinuePress:this.onContinuePress,onReplayPress:this.onReplayPress}),this.player.addChild(this.replayView)),this.replayView.show()}},{key:"hideReplayView",value:function(){var e;null===(e=this.replayView)||void 0===e||e.hide()}},{key:"getPlayToggle",value:function(){var e=this.player.getChild("collapserator");return null==e?void 0:e.getChild("PlayToggle")}},{key:"enablePlayToggle",value:function(){var e=this.getPlayToggle();e&&e.enable()}},{key:"disablePlayToggle",value:function(){var e=this.getPlayToggle();e&&e.disable()}},{key:"addCssClasses",value:function(){this.player.addClass("cv-range-indicator-plugin")}},{key:"removeCssClasses",value:function(){this.player.removeClass("cv-range-indicator-plugin")}},{key:"dispose",value:function(){var e,n,r,i,o,a;this.removeCssClasses(),this.player.off("timeupdate",this.onTimeUpdateOrSeeked),this.player.off("seeked",this.onTimeUpdateOrSeeked),null===(e=this.startTimeIndicator)||void 0===e||e.dispose(),null===(n=this.endTimeIndicator)||void 0===n||n.dispose(),null===(r=this.replayView)||void 0===r||r.dispose(),(i=t,o=this,"function"==typeof(a=Jm(Ym(1&3?i.prototype:i),"dispose",o))?function(e){return a.apply(o,e)}:a)([])}}],r&&Hm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function eb(e){return eb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eb(e)}function tb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nb(r.key),r)}}function nb(e){var t=function(e){if("object"!=eb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=eb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eb(t)?t:t+""}function rb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rb=function(){return!!e})()}function ib(e,t,n,r){var i=ob(ab(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function ob(){return ob="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ab(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ob.apply(null,arguments)}function ab(e){return ab=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ab(e)}function ub(e,t){return ub=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ub(e,t)}i.Z.registerPlugin("rangeIndicatorPlugin",$m);var lb=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ab(t),function(e,t){if(t&&("object"==eb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rb()?Reflect.construct(t,n||[],ab(e).constructor):t.apply(e,n))}(this,t,[e,n])).onLoopVideoChange=r.onLoopVideoChange.bind(r),r.player_.on("cv:loopvideo",r.onLoopVideoChange),r.onLoopVideoChange(null,r.player_.loopVideoPlugin().loop()),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ub(e,t)}(t,e),n=t,(r=[{key:"onLoopVideoChange",value:function(e,t){t?this.toggleOn():this.toggleOff()}},{key:"handleToggle",value:function(){var e=this.player_.loopVideoPlugin().loop();this.player_.loopVideoPlugin().loop(!e)}},{key:"toggleOn",value:function(){i.Z.dom.addClass(this.toggleEl,"on")}},{key:"toggleOff",value:function(){i.Z.dom.removeClass(this.toggleEl,"on")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,n,r){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=i.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var o=ib(t,"createEl",this,3)([e,{className:"vjs-menu-item cv-cog-menu-item cv-loop-video-toggle",innerHTML:'\n <span class="vjs-menu-item-text">Loop video</span>\n <span class="cv-toggle-container"></span>'},r]);return o.children[1].appendChild(this.toggleEl),o}},{key:"dispose",value:function(){this.player_.off("cv:loopvideo",this.onLoopVideoChange),ib(t,"dispose",this,3)([])}}])&&tb(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function cb(e){return cb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cb(e)}function sb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fb(r.key),r)}}function fb(e){var t=function(e){if("object"!=cb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cb(t)?t:t+""}function pb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pb=function(){return!!e})()}function hb(){return hb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=yb(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},hb.apply(null,arguments)}function yb(e){return yb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yb(e)}function vb(e,t){return vb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vb(e,t)}i.Z.registerComponent("LoopVideoMenuItem",lb);var db=i.Z.getPlugin("plugin"),mb=(i.Z.getComponent("MenuItem"),i.Z.getComponent("LoopVideoMenuItem")),bb=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=yb(t),function(e,t){if(t&&("object"==cb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pb()?Reflect.construct(t,n||[],yb(e).constructor):t.apply(e,n))}(this,t,[e]),n.allowLoop&&r.player.ready(function(){return r.addButton()}),r.onEnded=r.onEnded.bind(r),r.player.on("ended",r.onEnded),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vb(e,t)}(t,e),n=t,r=[{key:"addButton",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({index:0,ctor:mb,name:"LoopVideoMenuItem"})}},{key:"onEnded",value:function(){this.player.loop()&&this.player.play()}},{key:"loop",value:function(e){var t,n,r;if("boolean"!=typeof e)return this.player.loop();e&&(null===(r=null===(n=(t=this.player).nextVideoPlugin)||void 0===n?void 0:n.call(t))||void 0===r||r.setShouldPlayNext(!1,!1)),this.player.trigger("cv:loopvideo",e),this.player.loop(e)}},{key:"dispose",value:function(){var e,n,r;this.player.off("ended",this.onEnded),(e=t,n=this,"function"==typeof(r=hb(yb(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&sb(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(db);i.Z.registerPlugin("loopVideoPlugin",bb);var gb=function(){var e,t,n;return null!==(n=null===(t=null===(e=window.crypto)||void 0===e?void 0:e.randomUUID)||void 0===t?void 0:t.call(e))&&void 0!==n?n:Math.random().toString()};function wb(e){return wb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wb(e)}function Ob(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Sb(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Sb(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Sb(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Sb(f,"constructor",c),Sb(c,"constructor",l),l.displayName="GeneratorFunction",Sb(c,i,"GeneratorFunction"),Sb(f),Sb(f,i,"Generator"),Sb(f,r,function(){return this}),Sb(f,"toString",function(){return"[object Generator]"}),(Ob=function(){return{w:o,m:p}})()}function Sb(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Sb=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Sb(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Sb(e,t,n,r)}function kb(e){return function(e){if(Array.isArray(e))return Pb(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Pb(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pb(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Nb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jb(r.key),r)}}function jb(e){var t=function(e){if("object"!=wb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wb(t)?t:t+""}function Cb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Cb=function(){return!!e})()}function Tb(e,t,n,r){var i=Eb(_b(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Eb(){return Eb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=_b(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Eb.apply(null,arguments)}function _b(e){return _b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_b(e)}function Rb(e,t){return Rb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rb(e,t)}var xb,Ib,Mb=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=_b(t),function(e,t){if(t&&("object"==wb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Cb()?Reflect.construct(t,n||[],_b(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rb(e,t)}(t,e),n=t,(r=[{key:"getPlayerOptions",value:function(){var e,n=Tb(t,"getPlayerOptions",this,3)([]);return this.options.allowTranscript&&(n.allowTranscript=!0),(null===(e=n.devicesConfig)||void 0===e?void 0:e.canUserCastToDevices)?Object.assign(Object.assign({},n),{techOrder:["devices"].concat(kb(n.techOrder)),devices:{instanceId:gb()}}):n}},{key:"configurePlugins",value:function(){var e;try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),(null===(e=this.options.pointsOfInterest)||void 0===e?void 0:e.length)&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest}),this.player.loopVideoPlugin({allowLoop:this.options.allowLoop})}catch(e){console.log("failed to register plugins",e)}}},{key:"setNextVideo",value:function(e,t,n){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(e,t,n)}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"toggleTheatreMode",value:function(e){var t=this.player.theatreModePlugin();t&&t.toggleTheatreMode(e,{shouldLog:!0})}},{key:"toggleTranscript",value:function(e){if(this.player.viewTranscriptPlugin){var t=this.player.viewTranscriptPlugin();t&&t.toggleTranscript(e)}}},{key:"hasStarted",value:function(){return this.player.hasStarted()}},{key:"additionalSetup",value:function(e){var n,r,i,o,a=this,u=Object.create(null,{additionalSetup:{get:function(){return Tb(t,"additionalSetup",a,1)}}});return n=this,r=void 0,i=void 0,o=Ob().m(function t(){var n;return Ob().w(function(t){for(;;)switch(t.n){case 0:if(this.options.onRequestTheatreMode&&this.options.allowTheatreMode&&this.player.theatreModePlugin&&this.player.theatreModePlugin({onRequestTheatreMode:this.options.onRequestTheatreMode,theatreMode:this.options.theatreMode,playbackObject:e}),u.additionalSetup.call(this,e),this.options.showResources&&e.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:e.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==e.mediaType){t.n=2;break}if(null!==(n=e.additionalData)){t.n=1;break}throw Error("Invalid clip data");case 1:this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime});case 2:"MasterVideo"===e.mediaType&&this.options.startTime&&this.options.endTime&&this.player.rangeIndicatorPlugin({startTime:this.options.startTime,endTime:this.options.endTime});case 3:return t.a(2)}},t,this)}),new(i||(i=Promise))(function(e,t){function a(e){try{l(o.next(e))}catch(e){t(e)}}function u(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i(function(e){e(n)})).then(a,u)}l((o=o.apply(n,r||[])).next())})}},{key:"setupAnalyticsDependentPlugins",value:function(e){var n;Tb(t,"setupAnalyticsDependentPlugins",this,3)([e]),this.options.allowTranscript&&this.player.viewTranscriptPlugin().registerAnalytics(this.analyticsService,e),this.options.onRequestTheatreMode&&this.options.allowTheatreMode&&this.player.theatreModePlugin&&this.player.theatreModePlugin().registerAnalytics(this.analyticsService),(null===(n=this.options.devicesConfig)||void 0===n?void 0:n.canUserCastToDevices)&&this.player.devicesPlugin&&this.player.devicesPlugin(Object.assign(Object.assign({},this.options.devicesConfig),{userId:parseInt(e.viewerId),title:e.title,analyticsService:this.analyticsService}))}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}},{key:"addTranscript",value:function(e){return Q.getTrack(this.player,"metadata","transcript",e)?null:this.player.addTextTrack("metadata","transcript",e)}},{key:"useCurrentTranscript",value:function(e,t){return Q.useMetadataTracks(this.player,"transcript",e,t)}}])&&Nb(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(zv),Bb=n(33937);function Lb(e){return Lb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lb(e)}function Db(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ab(r.key),r)}}function Ab(e){var t=function(e){if("object"!=Lb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Lb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Lb(t)?t:t+""}!function(e){e.AppleTv="apple-tv",e.Vivi="vivi"}(xb||(xb={})),function(e){e.Available="available",e.Offline="offline",e.Busy="busy"}(Ib||(Ib={}));var Fb=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this[Symbol.toStringTag]=t[Symbol.toStringTag],this.innerPromise=t,this.onTimeout=n,this.bindFunctions()}return t=e,r=[{key:"reject",value:function(t){return new e(Promise.reject(t))}},{key:"fromPromise",value:function(t){return new e(t)}}],(n=[{key:"bindFunctions",value:function(){this.timeout=this.timeout.bind(this),this.then=this.then.bind(this),this.catch=this.catch.bind(this),this.finally=this.finally.bind(this)}},{key:"timeout",value:function(e){var t=this;return new Promise(function(n,r){t.then(n).catch(r).finally(function(){return clearTimeout(i)});var i=setTimeout(function(){var e;null===(e=t.onTimeout)||void 0===e||e.call(t),r(new Error("Promise timed out"))},e)})}},{key:"then",value:function(e,t){return this.innerPromise.then(e,t)}},{key:"catch",value:function(e){return this.innerPromise.catch(e)}},{key:"finally",value:function(e){return this.innerPromise.finally(e)}}])&&Db(t.prototype,n),r&&Db(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();function zb(e){return zb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zb(e)}function Zb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gb(r.key),r)}}function Ub(e,t,n){return t&&Vb(e.prototype,t),n&&Vb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gb(e){var t=function(e){if("object"!=zb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zb(t)?t:t+""}Symbol.toStringTag;var Kb=function(){return Ub(function e(){Zb(this,e),this.callbacks=[],this.predicates=[],this.controller=new AbortController,this.signal=this.controller.signal,this.trigger=this.trigger.bind(this),this.on=this.on.bind(this),this.one=this.one.bind(this),this.off=this.off.bind(this),this.dispose=this.dispose.bind(this),this.isDisposed=this.isDisposed.bind(this)},[{key:"trigger",value:function(e){var t=this;this.callbacks.forEach(function(n,r){var i=t.predicates[r];i&&!i(e)||n(e)})}},{key:"on",value:function(e){var t=this;this.isDisposed()&&console.warn("This EventChannel instance been disposed - this is a no-op");var n=this.callbacks.length;this.callbacks[n]=e,this.predicates[n]=function(){return!0};var r=function(){t.off(e)};return{off:r,filter:function(e){return t.predicates[n]=e,r}}}},{key:"one",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return this.isDisposed()?Fb.reject(new Error("This EventChannel instance has been disposed")):new Fb(new Promise(function(r,i){e=t.on(function(n){t.signal.removeEventListener("abort",o),e(),r(n)}).filter(n);var o=function(){e(),i(new Error("Aborted while waiting for message"))};t.signal.addEventListener("abort",o,{once:!0})}),function(){e()})}},{key:"off",value:function(e){var t=this.callbacks.indexOf(e);-1!==t&&(this.callbacks.splice(t,1),this.predicates.splice(t,1))}},{key:"dispose",value:function(){this.callbacks.length=0,this.predicates.length=0,this.controller.abort()}},{key:"isDisposed",value:function(){return this.signal.aborted}}])}(),qb=function(){return Ub(function e(){Zb(this,e),this.channels={},this.trigger=this.trigger.bind(this),this.on=this.on.bind(this),this.one=this.one.bind(this),this.off=this.off.bind(this),this.dispose=this.dispose.bind(this),this.getChannel=this.getChannel.bind(this)},[{key:"trigger",value:function(e,t){this.getChannel(e).trigger(t)}},{key:"on",value:function(e,t){return this.getChannel(e).on(t)}},{key:"one",value:function(e,t){return this.getChannel(e).one(t)}},{key:"off",value:function(e,t){this.getChannel(e).off(t)}},{key:"dispose",value:function(){this.trigger("dispose",Hb.void),Object.values(this.channels).forEach(function(e){return e.dispose()}),this.channels={}}},{key:"getChannel",value:function(e){return this.channels[e]||(this.channels[e]=new Kb),this.channels[e]}}])}(),Hb={void:void 0};function Wb(e){return Wb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wb(e)}function Qb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Jb(r.key),r)}}function Jb(e){var t=function(e){if("object"!=Wb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Wb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wb(t)?t:t+""}var Yb,Xb,$b,eg=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions()},(t=[{key:"bindFunctions",value:function(){this.schedule=this.schedule.bind(this),this.every=this.every.bind(this),this.trigger=this.trigger.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this)}},{key:"schedule",value:function(e){return this.task=e,this}},{key:"every",value:function(e){return this.intervalInMilliseconds=e,this}},{key:"trigger",value:function(){var e;return null===(e=this.task)||void 0===e||e.call(this,this),this}},{key:"start",value:function(){var e=this;return this.intervalId||(this.intervalId=setInterval(function(){return e.trigger()},this.intervalInMilliseconds)),this}},{key:"stop",value:function(){return this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this}}])&&Qb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),tg=function(e,t){return e._lastModified||(e._lastModified={}),new Proxy(e,{set:function(n,r,i,o){var a=e._lastModified[r.toString()];return!!(a&&Date.now()<a+t)||Reflect.set(n,r,i,o)}})},ng=function(e){return e._lastModified||(e._lastModified={}),new Proxy(e,{set:function(t,n,r,i){return e._lastModified[n.toString()]=Date.now(),Reflect.set(t,n,r,i)}})};function rg(e){return rg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rg(e)}function ig(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ag(r.key),r)}}function og(e,t,n){return t&&ig(e.prototype,t),n&&ig(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ag(e){var t=function(e){if("object"!=rg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rg(t)?t:t+""}!function(e){e[e.Offline=0]="Offline",e[e.Online=1]="Online",e[e.Locked=2]="Locked",e[e.Suspended=3]="Suspended"}(Yb||(Yb={})),function(e){e[e.PlaybackStatusChange=0]="PlaybackStatusChange",e[e.PositionChange=1]="PositionChange"}(Xb||(Xb={})),function(e){e.Begin="BEGIN",e.Play="PLAY",e.Pause="PAUSE",e.Load="LOAD",e.Scan="SCAN",e.Stop="STOP"}($b||($b={}));var ug=og(function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.title=t,this.device=n,this.locked=!1,this.position=0,this.playbackStatus=$b.Load,this.debounced=tg(this,2e3),ng(this)});function lg(e){return lg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lg(e)}function cg(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return sg(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(sg(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,sg(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,sg(f,"constructor",c),sg(c,"constructor",l),l.displayName="GeneratorFunction",sg(c,i,"GeneratorFunction"),sg(f),sg(f,i,"Generator"),sg(f,r,function(){return this}),sg(f,"toString",function(){return"[object Generator]"}),(cg=function(){return{w:o,m:p}})()}function sg(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}sg=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){sg(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},sg(e,t,n,r)}function fg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pg(r.key),r)}}function pg(e){var t=function(e){if("object"!=lg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=lg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lg(t)?t:t+""}function hg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hg=function(){return!!e})()}function yg(){return yg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=vg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},yg.apply(null,arguments)}function vg(e){return vg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vg(e)}function dg(e,t){return dg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dg(e,t)}var mg=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=vg(t),function(e,t){if(t&&("object"==lg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hg()?Reflect.construct(t,n||[],vg(e).constructor):t.apply(e,n))}(this,t)).client=e,r.localState=new ug(n.title,n.device),r.bindFunctions(),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dg(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.dispose=this.dispose.bind(this),this.handleDisconnected=this.handleDisconnected.bind(this),this.handleAllVideoMessages=this.handleAllVideoMessages.bind(this),this.handlePlaybackChange=this.handlePlaybackChange.bind(this),this.handlePositionChange=this.handlePositionChange.bind(this),this.loadSource=this.loadSource.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.isPlaying=this.isPlaying.bind(this),this.getPosition=this.getPosition.bind(this),this.getDuration=this.getDuration.bind(this),this.getVolume=this.getVolume.bind(this)}},{key:"initialize",value:function(){this.client.on("dispose",this.dispose),this.client.on("disconnected",this.handleDisconnected),this.client.on("message",this.handleAllVideoMessages)}},{key:"dispose",value:function(){var e,n,r;this.client.off("dispose",this.dispose),this.client.off("disconnected",this.handleDisconnected),this.client.off("message",this.handleAllVideoMessages),this.client.stop(this.getDevice().id).catch(function(e){return console.error(e)}),(e=t,n=this,"function"==typeof(r=yg(vg(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"handleDisconnected",value:function(){this.trigger("error",new Error("The connection to the Apple TV has been lost and cannot be recovered"))}},{key:"handleAllVideoMessages",value:function(e){if(e.deviceId===this.getDevice().id){var t=this.localState.debounced;switch(e.event){case Xb.PlaybackStatusChange:this.handlePlaybackChange(t,e);break;case Xb.PositionChange:this.handlePositionChange(t,e)}}}},{key:"handlePlaybackChange",value:function(e,t){e.playbackStatus!==t.params.playbackStatus&&(e.playbackStatus=t.params.playbackStatus,this.trigger("playingchange",Hb.void),e.playbackStatus===$b.Stop&&this.dispose())}},{key:"handlePositionChange",value:function(e,t){e.position!==t.params.position&&(e.position=t.params.position,this.trigger("positionchange",Hb.void))}},{key:"loadSource",value:function(){return e=this,t=void 0,n=void 0,r=cg().m(function e(){var t;return cg().w(function(e){for(;;)switch(e.n){case 0:if(e.p=0,!this.localState.locked){e.n=1;break}return e.a(2);case 1:return e.n=2,this.client.lock(this.getDevice().id);case 2:return this.localState.locked=!0,e.n=3,this.client.loadVideo(this.getDevice().id);case 3:this.trigger("sourceloaded",Hb.void),e.n=5;break;case 4:e.p=4,t=e.v,console.error(t),this.trigger("error",new Error("Could not load video on Apple TV device"));case 5:return e.a(2)}},e,this,[[0,4]])}),new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())});var e,t,n,r}},{key:"play",value:function(){this.localState.locked&&this.localState.playbackStatus!==$b.Play&&(this.localState.playbackStatus=$b.Play,this.client.play(this.getDevice().id),this.trigger("playingchange",Hb.void))}},{key:"pause",value:function(){this.localState.locked&&this.localState.playbackStatus!==$b.Pause&&(this.localState.playbackStatus=$b.Pause,this.client.pause(this.getDevice().id),this.trigger("playingchange",Hb.void))}},{key:"seek",value:function(e){this.localState.locked&&this.localState.position!==e&&(this.localState.position=e,this.client.seek(this.getDevice().id,e),this.trigger("positionchange",Hb.void))}},{key:"setVolume",value:function(){console.info("Setting the volume is not supported on Apple TV")}},{key:"setMuted",value:function(){console.info("Muting is not supported on Apple TV")}},{key:"setSubtitles",value:function(){console.info("Subtitles are not supported on Apple TV")}},{key:"isPlaying",value:function(){return this.localState.playbackStatus===$b.Play||this.localState.playbackStatus===$b.Begin||this.localState.playbackStatus===$b.Load}},{key:"isPlaybackFinished",value:function(){return this.localState.playbackStatus===$b.Stop}},{key:"getPosition",value:function(){return this.localState.position}},{key:"getDuration",value:function(){}},{key:"getVolume",value:function(){return 1}},{key:"getMuted",value:function(){return!1}},{key:"getSubtitles",value:function(){}},{key:"getDevice",value:function(){return this.localState.device}},{key:"getTitle",value:function(){return this.localState.title}}],r&&fg(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(qb);function bg(e){return bg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bg(e)}function gg(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return wg(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(wg(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,wg(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,wg(f,"constructor",c),wg(c,"constructor",l),l.displayName="GeneratorFunction",wg(c,i,"GeneratorFunction"),wg(f),wg(f,i,"Generator"),wg(f,r,function(){return this}),wg(f,"toString",function(){return"[object Generator]"}),(gg=function(){return{w:o,m:p}})()}function wg(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}wg=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){wg(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},wg(e,t,n,r)}function Og(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sg(r.key),r)}}function Sg(e){var t=function(e){if("object"!=bg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bg(t)?t:t+""}function kg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(kg=function(){return!!e})()}function Pg(){return Pg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ng(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Pg.apply(null,arguments)}function Ng(e){return Ng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ng(e)}function jg(e,t){return jg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jg(e,t)}var Cg,Tg,Eg,_g=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})};!function(e){e.DeviceList="DeviceList",e.DeviceStateChange="DeviceStateChange",e.Paired="Paired",e.Unpaired="Unpaired",e.PlayStatusChange="PlayStatusChange",e.TimeSync="TimeSync"}(Cg||(Cg={})),function(e){e.Command="Command",e.Pair="Pair",e.Unpair="Unpair",e.RenameDevice="Renamedevice",e.Subscribe="Subscribe",e.Lock="Lock"}(Tg||(Tg={})),function(e){e[e.Connecting=0]="Connecting",e[e.Connected=1]="Connected",e[e.Reconnecting=2]="Reconnecting",e[e.Disconnected=4]="Disconnected"}(Eg||(Eg={}));var Rg=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Ng(t),function(e,t){if(t&&("object"==bg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kg()?Reflect.construct(t,n||[],Ng(e).constructor):t.apply(e,n))}(this,t)).options=e,n.accessToken=void 0,n.devices=[],n.heartbeat=new eg,n.bindFunctions(),n.initialize(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jg(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.connect=this.connect.bind(this),this.subscribe=this.subscribe.bind(this),this.tryFixConnection=this.tryFixConnection.bind(this),this.invoke=this.invoke.bind(this),this.invokeDebounced=J(this.invoke,500,!0),this.handleDeviceList=this.handleDeviceList.bind(this),this.handleDeviceStateChange=this.handleDeviceStateChange.bind(this),this.handleDevicePaired=this.handleDevicePaired.bind(this),this.handleDeviceUnpaired=this.handleDeviceUnpaired.bind(this),this.handlePlayStatusChange=this.handlePlayStatusChange.bind(this),this.handleTimeSync=this.handleTimeSync.bind(this),this.dispose=this.dispose.bind(this),this.canCastToDevice=this.canCastToDevice.bind(this),this.getDevices=this.getDevices.bind(this),this.startCastSession=this.startCastSession.bind(this),this.lock=this.lock.bind(this),this.loadVideo=this.loadVideo.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.stop=this.stop.bind(this),this.pair=this.pair.bind(this),this.unpair=this.unpair.bind(this),this.renameDevice=this.renameDevice.bind(this)}},{key:"initialize",value:function(){return _g(this,void 0,void 0,gg().m(function e(){var t;return gg().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,this.options.fetchAccessToken();case 1:return this.accessToken=e.v,this.connection=(0,Bb.OB)(this.accessToken.host,{logging:!1}),this.hubProxy=this.connection.createHubProxy("DeviceUserHub"),this.hubProxy.on(Cg.DeviceList,this.handleDeviceList),this.hubProxy.on(Cg.DeviceStateChange,this.handleDeviceStateChange),this.hubProxy.on(Cg.Paired,this.handleDevicePaired),this.hubProxy.on(Cg.Unpaired,this.handleDeviceUnpaired),this.hubProxy.on(Cg.PlayStatusChange,this.handlePlayStatusChange),this.hubProxy.on(Cg.TimeSync,this.handleTimeSync),e.n=2,this.connect();case 2:return e.n=3,this.subscribe(this.accessToken.token);case 3:this.heartbeat.schedule(this.tryFixConnection).every(5e3).start(),e.n=5;break;case 4:e.p=4,t=e.v,console.error(t),this.trigger("error",new Error("Could not connect to Online API"));case 5:return e.a(2)}},e,this,[[0,4]])}))}},{key:"connect",value:function(){return _g(this,void 0,void 0,gg().m(function e(){var t=this;return gg().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,n){t.connection.start({jsonp:!1,withCredentials:!1}).done(function(){return e()}).fail(function(){return n(new Error("Could not connect to SignalR hub"))})}))},e)}))}},{key:"subscribe",value:function(e){return _g(this,void 0,void 0,gg().m(function t(){return gg().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(Tg.Subscribe,e);case 1:if(t.v){t.n=2;break}throw new Error("The subscription request was rejected by Online API");case 2:return t.a(2)}},t,this)}))}},{key:"tryFixConnection",value:function(){return _g(this,void 0,void 0,gg().m(function e(){var t;return gg().w(function(e){for(;;)switch(e.n){case 0:if(this.connection.state===Eg.Disconnected){e.n=1;break}return e.a(2);case 1:return e.p=1,this.heartbeat.stop(),e.n=2,this.options.fetchAccessToken();case 2:return this.accessToken=e.v,e.n=3,this.connect();case 3:return e.n=4,this.subscribe(this.accessToken.token);case 4:e.n=6;break;case 5:e.p=5,t=e.v,console.warn(t),console.warn("Could not reconnect to Online API");case 6:return e.p=6,this.heartbeat.start(),e.f(6);case 7:return e.a(2)}},e,this,[[1,5,6,7]])}))}},{key:"invoke",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return _g(this,void 0,void 0,gg().m(function t(){var r,i=this;return gg().w(function(t){for(;;)if(0===t.n)return r=new Promise(function(t,r){var o,a;(null===(a=i.hubProxy)||void 0===a?void 0:(o=a).invoke.apply(o,[e].concat(n))).done(t).fail(r)}),t.a(2,Fb.fromPromise(r).timeout(2e4))},t)}))}},{key:"handleDeviceList",value:function(e){this.devices=e.filter(function(e){return"vivi"!==e.type}).map(t.convertToGenericDevice),this.trigger("deviceschange",Hb.void)}},{key:"handleDeviceStateChange",value:function(e){var n=this.devices.findIndex(function(t){return t.id===e.deviceId});n>=0&&(this.devices[n]=t.convertToGenericDevice(e),this.trigger("deviceschange",Hb.void))}},{key:"handleDevicePaired",value:function(e){"vivi"!==e.type&&(this.devices.push(t.convertToGenericDevice(e)),this.trigger("deviceschange",Hb.void))}},{key:"handleDeviceUnpaired",value:function(e){this.devices=this.devices.filter(function(t){return t.id!==e}),this.trigger("deviceschange",Hb.void)}},{key:"handlePlayStatusChange",value:function(e,t){this.trigger("message",{event:Xb.PlaybackStatusChange,deviceId:e,params:{playbackStatus:t.commandType}})}},{key:"handleTimeSync",value:function(e,t){this.trigger("message",{event:Xb.PositionChange,deviceId:e,params:{position:t}})}},{key:"dispose",value:function(){var e,n,r;this.hubProxy.off(Cg.DeviceList,this.handleDeviceList),this.hubProxy.off(Cg.DeviceStateChange,this.handleDeviceStateChange),this.hubProxy.off(Cg.Paired,this.handleDevicePaired),this.hubProxy.off(Cg.Unpaired,this.handleDeviceUnpaired),this.hubProxy.off(Cg.PlayStatusChange,this.handlePlayStatusChange),this.hubProxy.off(Cg.TimeSync,this.handleTimeSync),this.hubProxy.connection.stop(!1,!0),this.heartbeat.stop(),(e=t,n=this,"function"==typeof(r=Pg(Ng(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"canCastToDevice",value:function(e){return e===xb.AppleTv}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new mg(this,e)}},{key:"lock",value:function(e){var t;return _g(this,void 0,void 0,gg().m(function n(){return gg().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,this.invoke(Tg.Lock,e,this.options.userId,null!==(t=this.options.username)&&void 0!==t?t:"");case 1:if(n.v){n.n=2;break}throw new Error("Could not lock device");case 2:return n.a(2)}},n,this)}))}},{key:"loadVideo",value:function(e){return _g(this,void 0,void 0,gg().m(function t(){return gg().w(function(t){for(;;)switch(t.n){case 0:if(this.options.trackingCode){t.n=1;break}throw new Error("Tracking code must be provided to cast videos");case 1:return t.n=2,this.invoke(Tg.Command,{DeviceId:e,CommandType:$b.Play,Data:this.options.trackingCode});case 2:return t.a(2)}},t,this)}))}},{key:"play",value:function(e){return _g(this,void 0,void 0,gg().m(function t(){return gg().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(Tg.Command,{DeviceId:e,CommandType:$b.Play});case 1:return t.a(2)}},t,this)}))}},{key:"pause",value:function(e){return _g(this,void 0,void 0,gg().m(function t(){return gg().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(Tg.Command,{DeviceId:e,CommandType:$b.Pause});case 1:return t.a(2)}},t,this)}))}},{key:"seek",value:function(e,t){this.invokeDebounced(Tg.Command,{DeviceId:e,CommandType:$b.Play,Params:"1,".concat(Math.trunc(t))})}},{key:"stop",value:function(e){return _g(this,void 0,void 0,gg().m(function t(){return gg().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(Tg.Command,{DeviceId:e,CommandType:$b.Stop});case 1:return t.a(2)}},t,this)}))}},{key:"pair",value:function(e){return _g(this,void 0,void 0,gg().m(function t(){var n;return gg().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(Tg.Pair,e);case 1:if(n=t.v){t.n=2;break}throw new Error("Could not pair device");case 2:return t.a(2,n)}},t,this)}))}},{key:"unpair",value:function(e){return _g(this,void 0,void 0,gg().m(function t(){return gg().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(Tg.Unpair,e);case 1:return t.a(2)}},t,this)}))}},{key:"renameDevice",value:function(e){var t=e.deviceId,n=e.deviceName;return _g(this,void 0,void 0,gg().m(function e(){return gg().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.invoke(Tg.RenameDevice,t,n);case 1:if(e.v){e.n=2;break}throw new Error("Could not rename device");case 2:return e.a(2)}},e,this)}))}}],i=[{key:"convertToGenericDeviceStatus",value:function(e){switch(e){case Yb.Online:return Ib.Available;case Yb.Locked:return Ib.Busy;case Yb.Suspended:case Yb.Offline:return Ib.Offline}}},{key:"convertToGenericDevice",value:function(e){return{id:e.deviceId,name:e.name,type:xb.AppleTv,status:t.convertToGenericDeviceStatus(e.status)}}}],r&&Og(n.prototype,r),i&&Og(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(qb);function xg(e){return xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xg(e)}function Ig(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Mg(r.key),r)}}function Mg(e){var t=function(e){if("object"!=xg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xg(t)?t:t+""}var Bg={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},Lg=function(){return e=function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bg;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions(),this.url=t,this.options=Object.assign(Object.assign({},Bg),r),this.webSocket=this.connect(),this.heartbeat=(new eg).schedule(function(){return n.send(n.options.heartbeatMessage)}).every(this.options.heartbeatIntervalInMillseconds)},(t=[{key:"bindFunctions",value:function(){this.cleanup=this.cleanup.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleMessage=this.handleMessage.bind(this),this.handleClose=this.handleClose.bind(this),this.handleError=this.handleError.bind(this),this.connect=this.connect.bind(this),this.send=this.send.bind(this),this.dipose=this.dipose.bind(this)}},{key:"cleanup",value:function(){this.heartbeat.stop(),this.webSocket.removeEventListener("error",this.handleError),this.webSocket.removeEventListener("message",this.handleMessage),this.webSocket.removeEventListener("open",this.handleOpen),this.webSocket.removeEventListener("close",this.handleClose)}},{key:"handleOpen",value:function(e){var t;null===(t=this.onOpen)||void 0===t||t.call(this,e),this.options.heartbeatEnabled&&this.heartbeat.start()}},{key:"handleMessage",value:function(e){var t;null===(t=this.onMessage)||void 0===t||t.call(this,e)}},{key:"handleClose",value:function(e){var t,n=this;null===(t=this.onClose)||void 0===t||t.call(this,e),this.cleanup(),setTimeout(function(){n.webSocket=n.connect()},this.options.reconnectIntervalInMilliseconds)}},{key:"handleError",value:function(e){var t;null===(t=this.onError)||void 0===t||t.call(this,e),this.handleClose()}},{key:"connect",value:function(){var e=new WebSocket(this.url);return e.addEventListener("open",this.handleOpen),e.addEventListener("message",this.handleMessage),e.addEventListener("close",this.handleClose),e.addEventListener("error",this.handleError),e}},{key:"send",value:function(e){this.webSocket.send(e)}},{key:"dipose",value:function(){this.cleanup(),this.webSocket.close()}}])&&Ig(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Dg(e){return Dg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dg(e)}function Ag(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fg(r.key),r)}}function Fg(e){var t=function(e){if("object"!=Dg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dg(t)?t:t+""}var zg,Zg=function(){return e=function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._timerStartedAt=0,this.position=0,this.duration=void 0,this.playing=!1,this.mute=!1,this.videoSource="",this.subtitleSource="",this.subtitles=!1,this.volume=0,this.title=t,this.device=n,this.ready=!1,this.playbackFinished=!1,this.debounced=tg(this,2e3),ng(this)},(t=[{key:"position",get:function(){return this._position+this.getTimerDurationInSeconds()},set:function(e){this._position=e,this.restartTimer()}},{key:"playing",get:function(){return this._playing},set:function(e){this._playing=e,e?this.restartTimer():(this._position+=this.getTimerDurationInSeconds(),this.stopTimer())}},{key:"restartTimer",value:function(){this._timerStartedAt=Date.now()}},{key:"stopTimer",value:function(){this._timerStartedAt=0}},{key:"getTimerDurationInSeconds",value:function(){return this._timerStartedAt?(Date.now()-this._timerStartedAt)/1e3:0}}])&&Ag(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Vg(e){return Vg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vg(e)}function Ug(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Gg(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Gg(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Gg(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Gg(f,"constructor",c),Gg(c,"constructor",l),l.displayName="GeneratorFunction",Gg(c,i,"GeneratorFunction"),Gg(f),Gg(f,i,"Generator"),Gg(f,r,function(){return this}),Gg(f,"toString",function(){return"[object Generator]"}),(Ug=function(){return{w:o,m:p}})()}function Gg(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Gg=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Gg(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Gg(e,t,n,r)}function Kg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qg(r.key),r)}}function qg(e){var t=function(e){if("object"!=Vg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vg(t)?t:t+""}function Hg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hg=function(){return!!e})()}function Wg(){return Wg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Qg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Wg.apply(null,arguments)}function Qg(e){return Qg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qg(e)}function Jg(e,t){return Jg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jg(e,t)}!function(e){e.Update="update",e.Volume="volume",e.Playing="playing",e.Paused="paused",e.NewChapter="new_chapter",e.Stopped="stopped",e.Ready="ready",e.Mute="mute",e.Finished="finished",e.Subtitles="subtitles"}(zg||(zg={}));var Yg=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},Xg=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Qg(t),function(e,t){if(t&&("object"==Vg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hg()?Reflect.construct(t,n||[],Qg(e).constructor):t.apply(e,n))}(this,t)).client=e,r.localState=new Zg(n.title,n.device),r.bindFunctions(),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jg(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.dispose=this.dispose.bind(this),this.handleClientConnected=this.handleClientConnected.bind(this),this.handleDisconnectMessage=this.handleDisconnectMessage.bind(this),this.handleAllVideoMessages=this.handleAllVideoMessages.bind(this),this.handleUpdateMessage=this.handleUpdateMessage.bind(this),this.handleVolumeMessage=this.handleVolumeMessage.bind(this),this.handlePlayingMessage=this.handlePlayingMessage.bind(this),this.handlePausedMessage=this.handlePausedMessage.bind(this),this.handleFinishedMessage=this.handleFinishedMessage.bind(this),this.handleNewChapterMessage=this.handleNewChapterMessage.bind(this),this.handleStoppedMessage=this.handleStoppedMessage.bind(this),this.loadSource=this.loadSource.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.isPlaying=this.isPlaying.bind(this),this.getPosition=this.getPosition.bind(this),this.getDuration=this.getDuration.bind(this),this.getVolume=this.getVolume.bind(this)}},{key:"initialize",value:function(){var e=this;this.client.on("dispose",this.dispose),this.client.on("connected",this.handleClientConnected),this.client.on("message",this.handleDisconnectMessage).filter(function(t){return t.source===e.getDevice().id&&"disconnect"===t.message.type}),this.client.on("message",this.handleAllVideoMessages).filter(function(t){return t.source===e.getDevice().id&&"video_event"===t.message.type})}},{key:"dispose",value:function(){var e,n,r;this.client.off("dispose",this.dispose),this.client.off("connected",this.handleClientConnected),this.client.off("message",this.handleDisconnectMessage),this.client.off("message",this.handleAllVideoMessages),this.client.stop(this.getDevice().id).catch(function(e){return console.error(e)}),(e=t,n=this,"function"==typeof(r=Wg(Qg(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"handleClientConnected",value:function(){return Yg(this,void 0,void 0,Ug().m(function e(){var t;return Ug().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,this.client.joinRoom(this.getDevice().id);case 1:e.n=3;break;case 2:e.p=2,t=e.v,this.trigger("error",t);case 3:return e.a(2)}},e,this,[[0,2]])}))}},{key:"handleDisconnectMessage",value:function(){this.dispose()}},{key:"handleAllVideoMessages",value:function(e){var t=this.localState.debounced,n=e.message.payload.params||{};switch(e.message.payload.event){case zg.Update:this.handleUpdateMessage(t,n);break;case zg.NewChapter:this.handleNewChapterMessage(t,n);break;case zg.Volume:this.handleVolumeMessage(t,n);break;case zg.Playing:this.handlePlayingMessage(t);break;case zg.Paused:this.handlePausedMessage(t);break;case zg.Finished:this.handleFinishedMessage(t);break;case zg.Stopped:this.handleStoppedMessage()}}},{key:"handleUpdateMessage",value:function(e,t){e.duration!==t.duration&&(e.duration=t.duration,this.trigger("durationchange",Hb.void)),e.position!==t.position&&(e.position=t.position,this.trigger("positionchange",Hb.void)),e.subtitles!==t.subtitles&&(e.subtitles=t.subtitles,this.trigger("subtitleschange",Hb.void))}},{key:"handleVolumeMessage",value:function(e,t){e.volume!==t.level&&(e.volume=t.level,e.mute=0===t.level,this.trigger("volumechange",Hb.void))}},{key:"handlePlayingMessage",value:function(e){!0!==e.playing&&(e.playing=!0,e.playbackFinished=!1,this.trigger("playingchange",Hb.void))}},{key:"handlePausedMessage",value:function(e){!1!==e.playing&&(e.playing=!1,this.trigger("playingchange",Hb.void))}},{key:"handleFinishedMessage",value:function(e){!0!==e.playbackFinished&&(e.playing=!1,e.playbackFinished=!0,this.trigger("playingchange",Hb.void))}},{key:"handleNewChapterMessage",value:function(e,t){var n,r=(null!==(n=t.queue)&&void 0!==n?n:[]).find(function(t){return t.url===e.videoSource});if(!r)return console.info("The device is no longer playing the source we loaded - disposing the session"),void this.dispose();e.subtitleSource!==r.suburl&&(e.subtitleSource=r.suburl,this.trigger("subtitleschange",Hb.void))}},{key:"handleStoppedMessage",value:function(){this.dispose()}},{key:"loadSource",value:function(e,t){return Yg(this,void 0,void 0,Ug().m(function n(){var r,i,o;return Ug().w(function(n){for(;;)switch(n.n){case 0:if(this.localState.videoSource!==e||this.localState.subtitleSource!==t){n.n=1;break}return n.a(2);case 1:return n.p=1,r=this.getDevice().id,i=this.getPosition(),this.localState.videoSource=e,this.localState.subtitleSource=t,this.localState.ready=!1,n.n=2,this.client.joinRoom(r);case 2:return n.n=3,this.client.loadQueue({title:this.getTitle(),roomId:r,videoSource:e,subtitleSource:t});case 3:this.localState.ready=!0,this.trigger("sourceloaded",Hb.void),i>0&&this.seek(i),t&&this.setSubtitles(t),n.n=5;break;case 4:n.p=4,o=n.v,console.error(o),this.trigger("error",new Error("Could not load video on Vivi device"));case 5:return n.a(2)}},n,this,[[1,4]])}))}},{key:"play",value:function(){this.localState.ready&&!0!==this.localState.playing&&(this.localState.playing=!0,this.client.play(this.getDevice().id),this.trigger("playingchange",Hb.void))}},{key:"pause",value:function(){this.localState.ready&&!1!==this.localState.playing&&(this.localState.playing=!1,this.client.pause(this.getDevice().id),this.trigger("playingchange",Hb.void))}},{key:"seek",value:function(e){this.localState.ready&&this.localState.position!==e&&(this.localState.position=e,this.client.seek(this.getDevice().id,e),this.trigger("positionchange",Hb.void))}},{key:"setVolume",value:function(e){this.localState.ready&&this.localState.volume!==e&&(this.localState.volume=e,this.client.setVolume(this.getDevice().id,e),this.trigger("volumechange",Hb.void))}},{key:"setMuted",value:function(e){this.localState.ready&&this.localState.mute!==e&&(this.localState.mute=e,this.client.setMuted(this.getDevice().id,e),this.trigger("volumechange",Hb.void))}},{key:"setSubtitles",value:function(e){return Yg(this,void 0,void 0,Ug().m(function t(){var n;return Ug().w(function(t){for(;;)switch(t.n){case 0:if(this.localState.ready){t.n=1;break}return t.a(2);case 1:if(!e){t.n=2;break}return t.n=2,this.loadSource(this.localState.videoSource,e);case 2:n=!!e,this.localState.subtitles!==n&&(this.localState.subtitles=n,this.client.setSubtitles(this.getDevice().id,n),this.trigger("subtitleschange",Hb.void));case 3:return t.a(2)}},t,this)}))}},{key:"isPlaying",value:function(){return this.localState.playing}},{key:"isPlaybackFinished",value:function(){return this.localState.playbackFinished}},{key:"getPosition",value:function(){return this.localState.position}},{key:"getDuration",value:function(){return this.localState.duration}},{key:"getVolume",value:function(){return this.localState.volume}},{key:"getMuted",value:function(){return this.localState.mute}},{key:"getSubtitles",value:function(){if(this.localState.subtitles)return this.localState.subtitleSource}},{key:"getDevice",value:function(){return this.localState.device}},{key:"getTitle",value:function(){return this.localState.title}}],r&&Kg(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(qb);function $g(e){return $g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$g(e)}function ew(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return tw(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function h(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],h=p.p,y=o[2];n>3?(i=y===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<y&&(i=n<3||o[0]>r||r>y)&&(o[4]=n,o[5]=r,p.n=y,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,y),u=s,l=y;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(tw(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,tw(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,tw(f,"constructor",c),tw(c,"constructor",l),l.displayName="GeneratorFunction",tw(c,i,"GeneratorFunction"),tw(f),tw(f,i,"Generator"),tw(f,r,function(){return this}),tw(f,"toString",function(){return"[object Generator]"}),(ew=function(){return{w:o,m:p}})()}function tw(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}tw=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){tw(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},tw(e,t,n,r)}function nw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rw(r.key),r)}}function rw(e){var t=function(e){if("object"!=$g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$g(t)?t:t+""}function iw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(iw=function(){return!!e})()}function ow(){return ow="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=aw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ow.apply(null,arguments)}function aw(e){return aw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},aw(e)}function uw(e,t){return uw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uw(e,t)}var lw=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},cw=1e4,sw=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=aw(t),function(e,t){if(t&&("object"==$g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,iw()?Reflect.construct(t,n||[],aw(e).constructor):t.apply(e,n))}(this,t)).options=e,n.accessToken="",n.devices=[],n.devicesFingerprint="",n.deviceDiscovery=new eg,n.bindFunctions(),n.initialize(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uw(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.sendMessage=this.sendMessage.bind(this),this.sendMessageDebounced=J(this.sendMessage,500,!0),this.beginDeviceDiscovery=this.beginDeviceDiscovery.bind(this),this.dispose=this.dispose.bind(this),this.canCastToDevice=this.canCastToDevice.bind(this),this.getDevices=this.getDevices.bind(this),this.startCastSession=this.startCastSession.bind(this),this.authenticateWithVivi=this.authenticateWithVivi.bind(this),this.getRoomList=this.getRoomList.bind(this),this.joinRoom=this.joinRoom.bind(this),this.query=this.query.bind(this),this.loadQueue=this.loadQueue.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.stop=this.stop.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.setMuted=this.setMuted.bind(this),this.setSubtitles=this.setSubtitles.bind(this)}},{key:"initialize",value:function(){var e=this;this.webSocket=new Lg(this.options.url),this.webSocket.onMessage=function(t){return e.trigger("message",JSON.parse(t.data))},this.webSocket.onOpen=function(){return lw(e,void 0,void 0,ew().m(function e(){var t;return ew().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,this.options.fetchAccessToken();case 1:return this.accessToken=e.v,e.n=2,this.authenticateWithVivi();case 2:this.beginDeviceDiscovery(),this.trigger("connected",Hb.void),e.n=4;break;case 3:e.p=3,t=e.v,console.error(t),this.trigger("error",new Error("Could not connect to Vivi"));case 4:return e.a(2)}},e,this,[[0,3]])}))}}},{key:"sendMessage",value:function(e){var t;null===(t=this.webSocket)||void 0===t||t.send(JSON.stringify(e))}},{key:"beginDeviceDiscovery",value:function(){var e=this;this.deviceDiscovery.every(1e4).schedule(function(){return lw(e,void 0,void 0,ew().m(function e(){var n,r,i,o,a;return ew().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,this.getRoomList();case 1:if(n=e.v,(r=t.calculateFingerprint(n))!==this.devicesFingerprint){e.n=2;break}return e.a(2);case 2:i=new Set(n.map(function(e){var t;return null!==(t=e.organisation)&&void 0!==t?t:""})).size,o=new Set(n.map(function(e){var t;return null!==(t=e.location)&&void 0!==t?t:""})).size,this.devices=n.map(function(e){return{id:e.id,name:e.name,schoolName:i>1?e.organisation:"",description:o>1?e.location:"",type:xb.Vivi,status:Ib.Available}}),this.devicesFingerprint=r,this.trigger("deviceschange",Hb.void),e.n=4;break;case 3:e.p=3,a=e.v,console.warn(a);case 4:return e.a(2)}},e,this,[[0,3]])}))}).trigger().start()}},{key:"dispose",value:function(){var e,n,r,i;this.deviceDiscovery.stop(),null===(e=this.webSocket)||void 0===e||e.dipose(),(n=t,r=this,"function"==typeof(i=ow(aw(1&3?n.prototype:n),"dispose",r))?function(e){return i.apply(r,e)}:i)([])}},{key:"canCastToDevice",value:function(e){return e===xb.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new Xg(this,e)}},{key:"authenticateWithVivi",value:function(){return lw(this,void 0,void 0,ew().m(function e(){return ew().w(function(e){for(;;)switch(e.n){case 0:return this.sendMessage({destination:"relay",message:{token:this.accessToken,type:"identify_video_api"}}),e.n=1,this.one("message",function(e){return"video_api_identified"===e.message.type}).timeout(cw).catch(function(){throw new Error("Failed to authenticate with Vivi")});case 1:return e.a(2)}},e,this)}))}},{key:"getRoomList",value:function(){return lw(this,void 0,void 0,ew().m(function e(){var t;return ew().w(function(e){for(;;)switch(e.n){case 0:return this.sendMessage({destination:"relay",message:{type:"video_api_rooms"}}),e.n=1,this.one("message",function(e){return"video_api_rooms"===e.message.type}).timeout(cw).catch(function(){throw new Error("Failed to fetch rooms")});case 1:return t=e.v,e.a(2,t.message.rooms||[])}},e,this)}))}},{key:"joinRoom",value:function(e){return lw(this,void 0,void 0,ew().m(function t(){return ew().w(function(t){for(;;)switch(t.n){case 0:return this.sendMessage({destination:"relay",message:{destination_type:"box",new_destination:e,token:this.accessToken,type:"connect"}}),t.n=1,this.one("message",function(t){return t.source===e&&"connect"===t.message.type||"error"===t.message.type&&"already_connected"===t.message.error_type||void 0}).timeout(cw).catch(function(){throw new Error("Failed to join room")});case 1:return t.a(2)}},t,this)}))}},{key:"query",value:function(e){return lw(this,void 0,void 0,ew().m(function n(){var r;return ew().w(function(n){for(;;)switch(n.n){case 0:return r=t.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:r,name:"query"}}),n.n=1,this.one("message",function(e){return e.message.ack_id===r}).timeout(cw).catch(function(){throw new Error("Failed to fetch query")});case 1:return n.a(2,n.v)}},n,this)}))}},{key:"loadQueue",value:function(e){var n=e.roomId,r=e.title,i=e.videoSource,o=e.subtitleSource;return lw(this,void 0,void 0,ew().m(function e(){return ew().w(function(e){for(;;)switch(e.n){case 0:return this.sendMessage({destination:n,message:{type:"message_with_ack",ack_id:t.createAckId(),name:"queue_load",payload:{urls:[{title:r,url:i,suburl:o}]}}}),e.n=1,this.one("message",function(e){var t;return e.source===n&&"ready"===(null===(t=e.message.payload)||void 0===t?void 0:t.event)}).timeout(cw).catch(function(){throw new Error("Failed to load media")});case 1:return e.a(2)}},e,this)}))}},{key:"play",value:function(e){return lw(this,void 0,void 0,ew().m(function t(){return ew().w(function(t){for(;;)switch(t.n){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_play",payload:{}}}),t.n=1,this.one("message",function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(cw).catch(function(){throw new Error("Failed to play video")});case 1:return t.a(2)}},t,this)}))}},{key:"pause",value:function(e){return lw(this,void 0,void 0,ew().m(function t(){return ew().w(function(t){for(;;)switch(t.n){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_pause"}}),t.n=1,this.one("message",function(t){var n;return t.source===e&&"paused"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(cw).catch(function(){throw new Error("Failed to pause video")});case 1:return t.a(2)}},t,this)}))}},{key:"stop",value:function(e){return lw(this,void 0,void 0,ew().m(function t(){return ew().w(function(t){for(;;)switch(t.n){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_stop"}}),t.n=1,this.one("message",function(t){var n;return t.source===e&&"stopped"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(cw).catch(function(){throw new Error("Failed to stop video")});case 1:return t.a(2)}},t,this)}))}},{key:"seek",value:function(e,t){return lw(this,void 0,void 0,ew().m(function n(){return ew().w(function(n){for(;;)switch(n.n){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"video_seek",payload:{position:t}}})){n.n=1;break}return n.n=1,this.one("message",function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(cw).catch(function(){throw new Error("Failed to seek video")});case 1:return n.a(2)}},n,this)}))}},{key:"setVolume",value:function(e,t){return lw(this,void 0,void 0,ew().m(function n(){return ew().w(function(n){for(;;)switch(n.n){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"set_volume",payload:{volume:t}}})){n.n=1;break}return n.n=1,this.one("message",function(t){var n;return t.source===e&&"volume"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(cw).catch(function(){throw new Error("Failed to set volume")});case 1:return n.a(2)}},n,this)}))}},{key:"setMuted",value:function(e,t){return lw(this,void 0,void 0,ew().m(function n(){return ew().w(function(n){for(;;)switch(n.n){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"set_mute",payload:{mute:t}}}),n.n=1,this.one("message",function(t){var n;return t.source===e&&"mute"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(cw).catch(function(){throw new Error("Failed to set mute")});case 1:return n.a(2)}},n,this)}))}},{key:"setSubtitles",value:function(e,n){return lw(this,void 0,void 0,ew().m(function r(){var i;return ew().w(function(r){for(;;)switch(r.n){case 0:return i=t.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:i,name:"set_subtitles",payload:{subtitles:n}}}),r.n=1,this.one("message",function(t){var n;return t.source===e&&"subtitles"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(cw).catch(function(){throw new Error("Failed to set subtitles")});case 1:return r.a(2)}},r,this)}))}}],i=[{key:"createAckId",value:function(){return gb()}},{key:"calculateFingerprint",value:function(e){return e.map(function(e){return e.id}).sort().join(",")}}],r&&nw(n.prototype,r),i&&nw(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(qb);function fw(e){return fw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fw(e)}function pw(e){return function(e){if(Array.isArray(e))return hw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return hw(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hw(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vw(r.key),r)}}function vw(e){var t=function(e){if("object"!=fw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fw(t)?t:t+""}function dw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dw=function(){return!!e})()}function mw(){return mw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=bw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},mw.apply(null,arguments)}function bw(e){return bw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bw(e)}function gw(e,t){return gw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gw(e,t)}var ww=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=bw(t),function(e,t){if(t&&("object"==fw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dw()?Reflect.construct(t,n||[],bw(e).constructor):t.apply(e,n))}(this,t)).instanceId=e,n.clients=[],n.bindFunctions(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gw(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.addClient=this.addClient.bind(this),this.hasInstanceOfClient=this.hasInstanceOfClient.bind(this),this.startCastSession=this.startCastSession.bind(this),this.gatherAndPublishDevices=this.gatherAndPublishDevices.bind(this),this.dispose=this.dispose.bind(this)}},{key:"addClient",value:function(e){var t=this;e.on("deviceschange",this.gatherAndPublishDevices),e.on("error",function(e){return t.trigger("error",e)}),this.clients.push(e)}},{key:"hasInstanceOfClient",value:function(e){return this.clients.some(function(t){return t instanceof e})}},{key:"startCastSession",value:function(e){var t=this;if(this.castSession){if(this.castSession.getDevice().id===e.device.id)return void console.info("A session with device ".concat(e.device.id," already exists - this is a no-op"));this.castSession.dispose()}var n=this.clients.find(function(t){return t.canCastToDevice(e.device.type)});n&&(this.castSession=n.startCastSession(e),this.castSession.on("error",function(e){t.castSession.dispose(),t.trigger("error",e)}),this.castSession.on("dispose",function(){t.castSession=void 0,t.trigger("castsessionchange",void 0)}),this.trigger("castsessionchange",this.castSession))}},{key:"getCastSession",value:function(){return this.castSession}},{key:"gatherAndPublishDevices",value:function(){var e=this.clients.map(function(e){return e.getDevices()}).reduce(function(e,t){return[].concat(pw(e),pw(t))},[]);this.trigger("deviceschange",e)}},{key:"dispose",value:function(){var e,n,r,i;null===(e=this.castSession)||void 0===e||e.dispose(),this.clients.forEach(function(e){return e.dispose()}),this.castSession=void 0,this.clients=[],(n=t,r=this,"function"==typeof(i=mw(bw(1&3?n.prototype:n),"dispose",r))?function(e){return i.apply(r,e)}:i)([])}}],i=[{key:"getOrCreateInstance",value:function(e){if(!e)throw new Error("instanceId is required");return this.instances[e]||(this.instances[e]=new t(e)),this.instances[e]}},{key:"disposeAndRemoveInstance",value:function(e){e.dispose(),delete this.instances[e.instanceId]}},{key:"isActive",value:function(){return Object.keys(this.instances).length>0}}],r&&yw(n.prototype,r),i&&yw(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(qb);function Ow(e){return Ow="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ow(e)}function Sw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kw(r.key),r)}}function kw(e){var t=function(e){if("object"!=Ow(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ow(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ow(t)?t:t+""}function Pw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pw=function(){return!!e})()}function Nw(e,t,n,r){var i=jw(Cw(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function jw(){return jw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Cw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},jw.apply(null,arguments)}function Cw(e){return Cw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cw(e)}function Tw(e,t){return Tw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tw(e,t)}ww.instances={};var Ew=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Cw(t),function(e,t){if(t&&("object"==Ow(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pw()?Reflect.construct(t,n||[],Cw(e).constructor):t.apply(e,n))}(this,t,[e,n])).isVisible=r.isVisible.bind(r),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tw(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e,n,r=Nw(t,"createEl",this,3)(["li",{className:"vjs-menu-item cv-device-menu-item"}]),o=i.Z.dom.createEl("div",{className:"cv-device-menu-item-body",innerHTML:'\n <span class="cv-device-icon '.concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[this.options_.type],'"></span>\n <div>\n <span class="vjs-menu-item-text">').concat(this.options_.label,'</span>\n <span class="vjs-menu-item-text cv-device-truncated-text">').concat(null!==(e=this.options_.schoolName)&&void 0!==e?e:"",'</span>\n <span class="vjs-menu-item-text cv-device-truncated-text cv-device-description">').concat(null!==(n=this.options_.description)&&void 0!==n?n:"","</span>\n </div>\n ")});return r.replaceChildren(o),r}},{key:"handleClick",value:function(){this.options_.onClick()}},{key:"show",value:function(){Nw(t,"show",this,3)([])}},{key:"hide",value:function(){Nw(t,"hide",this,3)([])}},{key:"isVisible",value:function(){return!Nw(t,"hasClass",this,3)(["vjs-hidden"])}}])&&Sw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function _w(e){return _w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_w(e)}function Rw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xw(r.key),r)}}function xw(e){var t=function(e){if("object"!=_w(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_w(t)?t:t+""}function Iw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Iw=function(){return!!e})()}function Mw(e){return Mw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mw(e)}function Bw(e,t){return Bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bw(e,t)}var Lw=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Mw(t),function(e,t){if(t&&("object"==_w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Iw()?Reflect.construct(t,n||[],Mw(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bw(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e=Gu.apply(this),t=this.contentEl_;return this.contentWrapper=i.Z.dom.createEl("div",{className:"vjs-menu-content"}),e.className="vjs-menu cv-devices-menu",t.className="cv-devices-menu-item-list",e.removeChild(t),e.appendChild(this.contentWrapper),this.contentWrapper.appendChild(t),this.simpleBar=new Vu.Z(t,{autoHide:!1}),e}},{key:"addCta",value:function(e){this.ctaElement?console.warn("CTA has already been added to the menu - this is a no-op"):(this.ctaElement=e.el(),this.contentWrapper.prepend(this.ctaElement),this.el().classList.add("has-cta"))}},{key:"removeCta",value:function(){this.ctaElement&&(this.contentWrapper.removeChild(this.ctaElement),this.el().classList.remove("has-cta"))}}])&&Rw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Menu"));function Dw(e){var t=e.inactiveIntegrations,n=e.canUserManageIntegrations,i=e.player,o=e.onDismiss,a=e.onInstall,u=e.onLearnMore,l=e.onContactSupport;if(0===t.length)return r.createElement(r.Fragment,null);var c,s=function(e){return i.localize(e)},f=function(e){return-1!==t.indexOf(e)};return c=f(xb.AppleTv)&&f(xb.Vivi)?"vivi_and_apple_tv":f(xb.Vivi)?"vivi":"apple_tv",r.createElement("div",{className:"cv-devices-cta",tabIndex:-1},r.createElement(Aw,{context:c,localize:s,onDismiss:function(){return o(c)}}),r.createElement(Fw,{context:c}),r.createElement(zw,{context:c,canUserManageIntegrations:n,localize:s,onContactSupport:function(){return l(c)},onInstall:function(){return a(c)},onLearnMore:function(){return u(c)}}))}function Aw(e){var t=e.context,n=e.localize,i=e.onDismiss;return r.createElement("div",{className:"cv-devices-cta-header"},r.createElement("span",{className:"cv-devices-badge"},n("New")),r.createElement("span",{className:"cv-devices-title"},"vivi_and_apple_tv"===t&&n("Cast to Vivi and Apple TV"),"vivi"===t&&n("Cast to Vivi"),"apple_tv"===t&&n("Cast to Apple TV")),r.createElement("span",{className:"cv-devices-close",onClick:i},r.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"white",d:"M11.9588 10.6413L16.3612 6.34478C16.7361 5.97191 17.3439 5.97191 17.7188 6.34478C18.0937 6.71764 18.0937 7.32218 17.7188 7.69505L13.3165 11.9916L17.7188 16.3701C18.0937 16.7429 18.0937 17.3475 17.7188 17.7203C17.3439 18.0932 16.7361 18.0932 16.3612 17.7203L11.9588 13.3419L7.63882 17.7203C7.26392 18.0932 6.65608 18.0932 6.28118 17.7203C5.90627 17.3475 5.90627 16.7429 6.28118 16.3701L10.6012 11.9916L6.28118 7.62993C5.90627 7.25706 5.90627 6.65252 6.28118 6.27965C6.65608 5.90678 7.26392 5.90678 7.63882 6.27965L11.9588 10.6413Z"}))))}function Fw(e){var t=e.context,n="vivi_and_apple_tv"===t?"bg-vivi-and-apple":"vivi"===t?"bg-vivi":"bg-apple";return r.createElement("div",{className:"cv-devices-cta-body ".concat(n)},("vivi_and_apple_tv"===t||"apple_tv"===t)&&r.createElement("div",{className:"cv-devices-icon-container"},r.createElement("span",{className:"cv-devices-icon apple"})),("vivi_and_apple_tv"===t||"vivi"===t)&&r.createElement("div",{className:"cv-devices-icon-container"},r.createElement("span",{className:"cv-devices-icon vivi"})))}function zw(e){var t=e.context,n=e.canUserManageIntegrations,i=e.localize,o=e.onInstall,a=e.onLearnMore,u=e.onContactSupport;return n?r.createElement("div",{className:"cv-devices-cta-footer"},r.createElement("span",null,"vivi_and_apple_tv"===t&&i("Discover our new device integrations to make presenting in the classroom easy!"),"vivi"===t&&i("Discover our new Vivi integration."),"apple_tv"===t&&i("Discover our new Apple TV integration.")),r.createElement("br",null),r.createElement("span",{className:"cv-devices-link",onClick:o},i("Click here to install"))):r.createElement("div",{className:"cv-devices-cta-footer"},r.createElement("span",null,"vivi_and_apple_tv"===t&&i("Cast to Vivi and Apple TV is now available! Please contact "),"vivi"===t&&i("Cast to Vivi is now available! Please contact "),"apple_tv"===t&&i("Cast to Apple TV is now available! Please contact ")),r.createElement("span",{className:"cv-devices-link",onClick:u},"ClickView Support"),r.createElement("span",null,"vivi_and_apple_tv"===t&&i(" or your administrator to set up Apple TV and Vivi."),"vivi"===t&&i(" or your administrator to set up Vivi."),"apple_tv"===t&&i(" or your administrator to set up Apple TV.")),r.createElement("br",null),r.createElement("span",{className:"cv-devices-link",onClick:a},"Learn more"))}function Zw(e){return Zw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zw(e)}function Vw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Uw(r.key),r)}}function Uw(e){var t=function(e){if("object"!=Zw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Zw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Zw(t)?t:t+""}function Gw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gw=function(){return!!e})()}function Kw(e,t,n,r){var i=qw(Hw(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function qw(){return qw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Hw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},qw.apply(null,arguments)}function Hw(e){return Hw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hw(e)}function Ww(e,t){return Ww=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ww(e,t)}i.Z.registerComponent("DevicesMenu",Lw),i.Z.registerComponent("DevicesCta",Yf(function(e,t){return r.createElement(Dw,Object.assign({player:e},t))},{properties:{className:"cv-devices-cta-wrapper"}}));var Qw=i.Z.getComponent("DevicesCta"),Jw=i.Z.getComponent("MenuButton"),Yw=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Hw(t),function(e,t){if(t&&("object"==Zw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Gw()?Reflect.construct(t,n||[],Hw(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-devices-menu-button",r.searchText="",r.devices=[],r.castSession=void 0,r.bindFunctions(),r.bindEventListeners(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ww(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.setDevices=this.setDevices.bind(this),this.setCastSession=this.setCastSession.bind(this),this.setSearchText=this.setSearchText.bind(this),this.getDeviceMenuItems=this.getDeviceMenuItems.bind(this),this.showNotificationBadge=this.showNotificationBadge.bind(this),this.hideNotificationBadge=this.hideNotificationBadge.bind(this),this.render=this.render.bind(this),this.removeMenuItems=this.removeMenuItems.bind(this),this.addMenuItemsForDevices=this.addMenuItemsForDevices.bind(this),this.shouldShowSearchInput=this.shouldShowSearchInput.bind(this),this.toggleSearchInput=this.toggleSearchInput.bind(this),this.toggleDeviceMenuItems=this.toggleDeviceMenuItems.bind(this),this.toggleEmptyStatePlaceholder=this.toggleEmptyStatePlaceholder.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("button"),n=function(t){e.menu.handleBlur(t)};t.addEventListener("blur",n),this.one("dispose",function(){var r;t.removeEventListener("blur",n),null===(r=e.cta)||void 0===r||r.dispose()})}},{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=Jw.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(Kw(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createMenu",value:function(){var e=this,t=new Lw(this.player_,{menuButton:this});if(!this.options_.ctaOptions.hasBeenDismissed&&this.options_.ctaOptions.inactiveIntegrations.length>0){var n=this.options_.ctaOptions,r=n.onDismiss,i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(n,["onDismiss"]);this.cta=new Qw(this.player(),Object.assign(Object.assign({},i),{onDismiss:function(n){e.hideNotificationBadge(),t.removeCta(),r(n)}})),this.showNotificationBadge(),t.addCta(this.cta)}return this.createItems().forEach(function(e){return t.addItem(e)}),t}},{key:"createItems",value:function(){var e=this,t=[];return this.headingItem=new j(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new se(this.player_,{menuButton:this,search:function(t){return e.setSearchText(t)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new fe(this.player_,{label:"No devices found",selected:!1,selectable:!1,multiSelectable:!1}),this.headingItem.show(),this.searchInputItem.hide(),this.emptyPlaceholder.show(),t.push(this.headingItem,this.searchInputItem,this.emptyPlaceholder),t}},{key:"pressButton",value:function(){var e;Kw(t,"pressButton",this,3)([]),this.shouldShowSearchInput()&&(null===(e=this.searchInputItem)||void 0===e||e.focus())}},{key:"setDevices",value:function(e){this.devices=e,this.render()}},{key:"setCastSession",value:function(e){this.castSession=e,this.render()}},{key:"setSearchText",value:function(e){this.searchText=e,this.render()}},{key:"getDeviceMenuItems",value:function(){return this.menu.children_.filter(function(e){return e instanceof Ew})}},{key:"showNotificationBadge",value:function(){this.addClass("notification-badge")}},{key:"hideNotificationBadge",value:function(){this.removeClass("notification-badge")}},{key:"render",value:function(){this.removeMenuItems(this.getDeviceMenuItems()),this.addMenuItemsForDevices(this.devices),this.toggleSearchInput(),this.toggleDeviceMenuItems(),this.toggleEmptyStatePlaceholder()}},{key:"removeMenuItems",value:function(e){var t=this;e.forEach(function(e){t.menu.removeChild(e),e.dispose()})}},{key:"addMenuItemsForDevices",value:function(e){var t=this;e.sort(function(e,t){var n,r,i,o,a="".concat(e.type).concat(null!==(n=e.schoolName)&&void 0!==n?n:"").concat(null!==(r=e.description)&&void 0!==r?r:"").concat(e.name),u="".concat(t.type).concat(null!==(i=t.schoolName)&&void 0!==i?i:"").concat(null!==(o=t.description)&&void 0!==o?o:"").concat(t.name);return a.localeCompare(u)}).forEach(function(e){var n=new Ew(t.player(),{id:e.id,label:e.name,schoolName:e.schoolName,description:e.description,selected:!1,multiSelectable:!1,selectable:!0,available:e.status===Ib.Available,type:e.type,onClick:function(){t.options_.onDeviceMenuItemClick(n,e)}});t.menu.addItem(n)})}},{key:"shouldShowSearchInput",value:function(){return this.getDeviceMenuItems().length>=20}},{key:"toggleSearchInput",value:function(){this.shouldShowSearchInput()?(this.searchInputItem.show(),this.menu.addClass("vertical-fill")):(this.searchInputItem.hide(),this.menu.removeClass("vertical-fill"))}},{key:"toggleDeviceMenuItems",value:function(){var e=this,t=this.getDeviceMenuItems(),n=this.shouldShowSearchInput(),r=this.searchText.toLowerCase();t.forEach(function(t){var i,o,a,u=e.devices.find(function(e){return e.id===t.options_.id});if(u){var l=u.status===Ib.Available,c=u.id===(null===(i=e.castSession)||void 0===i?void 0:i.getDevice().id),s=!n||-1!=="".concat(u.name," ").concat(null!==(o=u.schoolName)&&void 0!==o?o:""," ").concat(null!==(a=u.description)&&void 0!==a?a:"").trim().toLowerCase().indexOf(r);l?t.enable():t.disable(),s?t.show():t.hide(),c?t.selected(!0):t.selected(!1)}})}},{key:"toggleEmptyStatePlaceholder",value:function(){var e=this.getDeviceMenuItems();e.filter(function(e){return e.isVisible()}).length?this.emptyPlaceholder.hide():this.emptyPlaceholder.show(),e.length?this.emptyPlaceholder.setLabel(this.localize("No matching results")):this.emptyPlaceholder.setLabel(this.localize("No devices found"))}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){var e,t;return null!==(t=null===(e=this.castSession)||void 0===e?void 0:e.getDevice().name)&&void 0!==t?t:" "}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){this.handleClick()}},{key:"handleClick",value:function(){Kw(t,"handleClick",this,3)([null]),this.options_.onClick()}}],r&&Vw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Jw);function Xw(e){return Xw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xw(e)}function $w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eO(r.key),r)}}function eO(e){var t=function(e){if("object"!=Xw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xw(t)?t:t+""}function tO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tO=function(){return!!e})()}function nO(){return nO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=rO(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},nO.apply(null,arguments)}function rO(e){return rO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rO(e)}function iO(e,t){return iO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},iO(e,t)}Yw.prototype.controlText_="Devices",i.Z.registerComponent("DevicesButton",Yw);var oO=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=rO(t),function(e,t){if(t&&("object"==Xw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tO()?Reflect.construct(t,n||[],rO(e).constructor):t.apply(e,n))}(this,t,[null,e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iO(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=nO(rO(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{className:"cv-devices-tech"}]);var e,n,r}},{key:"setPoster",value:function(e){this.poster=e,this.update()}},{key:"setDevice",value:function(e){this.device=e,this.update()}},{key:"update",value:function(){var e,t,n,r,i=this;this.el_.innerHTML='\n <div class="cv-devices-content">\n <p>'.concat(this.localize("Currently playing on"),'</p>\n <h2><span class="cv-device-icon ').concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[null!==(t=null===(e=this.device)||void 0===e?void 0:e.type)&&void 0!==t?t:xb.Vivi],'"></span>').concat(null!==(r=null===(n=this.device)||void 0===n?void 0:n.name)&&void 0!==r?r:"",'</h2>\n </div>\n <div class="cv-devices-background" style="background-image: url(').concat(this.poster,')"></div>\n ');var o=document.createElement("button"),a=function(e){e.stopPropagation(),i.options_.onStopCasting()};o.onclick=a,o.ontouchstart=a,o.className="stop-casting-button",o.innerHTML=this.localize("Stop casting"),this.el_.querySelector(".cv-devices-content").appendChild(o)}},{key:"play",value:function(){}}],r&&$w(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function aO(e){return aO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aO(e)}function uO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lO(r.key),r)}}function lO(e){var t=function(e){if("object"!=aO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=aO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==aO(t)?t:t+""}function cO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cO=function(){return!!e})()}function sO(e,t,n,r){var i=fO(pO(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function fO(){return fO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=pO(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},fO.apply(null,arguments)}function pO(e){return pO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pO(e)}function hO(e,t){return hO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hO(e,t)}var yO=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=pO(t),function(e,t){if(t&&("object"==aO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cO()?Reflect.construct(t,n||[],pO(e).constructor):t.apply(e,n))}(this,t,[e,n])).featuresVolumeControl=!0,r.featuresPlaybackRate=!1,r.movingMediaElementInDOM=!1,r.featuresFullscreenResize=!0,r.featuresTimeupdateEvents=!0,r.featuresProgressEvents=!1,r.featuresNativeTextTracks=!1,r.featuresNativeAudioTracks=!1,r.featuresNativeVideoTracks=!1,r.featuresMuteControl=!0,r.featuresSourceset=!1,r.videojsPlayer=(0,i.Z)(r.options_.playerId),r.bindFunctions(),r.bindEventListeners(),r.ready(function(){r.setSource(r.options_.source)}),r.triggerReady(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hO(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.onTextTrackChanged=this.onTextTrackChanged.bind(this),this.getSelectedTextTrack=this.getSelectedTextTrack.bind(this),this.setSelectedTextTrack=this.setSelectedTextTrack.bind(this),this.showUI=this.showUI.bind(this),this.hideUI=this.hideUI.bind(this),this.dispose=this.dispose.bind(this),this.setSource=this.setSource.bind(this),this.getCastSession=this.getCastSession.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.getCastSession();t&&(this.textTracks().on("change",this.onTextTrackChanged),this.videojsPlayer.one("ended",function(){t.dispose()}),t.on("durationchange",function(){e.trigger("durationchange")}),t.on("dispose",function(){e.trigger("ended"),e.hideUI()}),t.on("playingchange",function(){t.isPlaying()?(e.trigger("play"),e.trigger("playing")):e.trigger("pause")}),t.on("volumechange",function(){e.trigger("volumechange")}),t.on("sourceloaded",function(){e.trigger("loadeddata")}),t.on("subtitleschange",function(){e.setSelectedTextTrack(t.getSubtitles())}))}},{key:"onTextTrackChanged",value:function(){var e,t=this.getSelectedTextTrack();null===(e=this.getCastSession())||void 0===e||e.setSubtitles(null==t?void 0:t.src)}},{key:"getSelectedTextTrack",value:function(){return Q.findTrackByPredicate(this.videojsPlayer.player_,function(e){return"showing"===e.mode&&!!e.src})}},{key:"setSelectedTextTrack",value:function(e){Q.forEachTrack(this.videojsPlayer.player_,function(t){t.src===e?t.mode="showing":t.mode="hidden"})}},{key:"showUI",value:function(e){this.ui&&(this.ui.setPoster(this.options_.poster),this.ui.setDevice(e),this.ui.show())}},{key:"hideUI",value:function(){var e;null===(e=this.ui)||void 0===e||e.hide()}},{key:"dispose",value:function(){this.textTracks().off("change",this.onTextTrackChanged);var e=this.getCastSession();e&&e.dispose(),sO(t,"cleanupAutoTextTracks",this,3)([]),sO(t,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=this;return this.ui=this.ui||new oO({onStopCasting:function(){var t;null===(t=e.getCastSession())||void 0===t||t.dispose()}}),this.ui.el()}},{key:"setSource",value:function(e){var t=this.getCastSession();if(t){this.showUI(t.getDevice()),this.trigger("loadstart");var n=this.getSelectedTextTrack();t.loadSource(e.src,null==n?void 0:n.src)}}},{key:"addRemoteTextTrack",value:function(e){return sO(t,"addRemoteTextTrack",this,3)([e,!0])}},{key:"getCastSession",value:function(){var e;return ww.getOrCreateInstance(null!==(e=this.options_.instanceId)&&void 0!==e?e:"").getCastSession()}},{key:"play",value:function(){var e;null===(e=this.getCastSession())||void 0===e||e.play()}},{key:"pause",value:function(){var e;null===(e=this.getCastSession())||void 0===e||e.pause()}},{key:"paused",value:function(){var e;return!1===(null===(e=this.getCastSession())||void 0===e?void 0:e.isPlaying())}},{key:"ended",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.isPlaybackFinished())&&void 0!==t&&t}},{key:"setCurrentTime",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.seek(null!=e?e:0)}},{key:"currentTime",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getPosition())&&void 0!==t?t:0}},{key:"duration",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getDuration())&&void 0!==t?t:this.videojsPlayer.duration()}},{key:"volume",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getVolume())&&void 0!==t?t:1}},{key:"setVolume",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.setVolume(e)}},{key:"muted",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getMuted())&&void 0!==t&&t}},{key:"setMuted",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.setMuted(e)}},{key:"buffered",value:function(){}},{key:"seekable",value:function(){return i.Z.createTimeRanges(0,this.duration())}},{key:"playbackRate",value:function(){return 1}},{key:"readyState",value:function(){return 4}},{key:"controls",value:function(){return!1}},{key:"playsinline",value:function(){return!0}},{key:"supportsFullScreen",value:function(){return!0}},{key:"setAutoplay",value:function(){}},{key:"preload",value:function(){}},{key:"load",value:function(){}},{key:"setPlaybackRate",value:function(){}}],o=[{key:"canPlayType",value:function(){return""}},{key:"canPlaySource",value:function(e,t){var n;return!!ww.getOrCreateInstance(null!==(n=null==t?void 0:t.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return ww.isActive()}}],r&&uO(n.prototype,r),o&&uO(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(i.Z.getComponent("Tech"));function vO(e){return vO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vO(e)}function dO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mO(r.key),r)}}function mO(e){var t=function(e){if("object"!=vO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vO(t)?t:t+""}function bO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(bO=function(){return!!e})()}function gO(){return gO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=wO(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},gO.apply(null,arguments)}function wO(e){return wO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wO(e)}function OO(e,t){return OO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},OO(e,t)}i.Z.registerTech("devices",yO);var SO=function(e){function t(e,n){var r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=wO(t),function(e,t){if(t&&("object"==vO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,bO()?Reflect.construct(t,n||[],wO(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,r.instanceId=null!==(o=null===(i=r.player.options_.devices)||void 0===i?void 0:i.instanceId)&&void 0!==o?o:"",r.bindFunctions(),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OO(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.onReady=this.onReady.bind(this),this.onDevicesChanged=this.onDevicesChanged.bind(this),this.onCastSessionChanged=this.onCastSessionChanged.bind(this),this.onDevicesError=this.onDevicesError.bind(this),this.addViviClient=this.addViviClient.bind(this),this.addAppleTvClient=this.addAppleTvClient.bind(this),this.reloadTech=this.reloadTech.bind(this),this.getSessionManager=this.getSessionManager.bind(this),this.dispose=this.dispose.bind(this)}},{key:"initialize",value:function(){this.player.ready(this.onReady)}},{key:"onReady",value:function(){var e=this,t=this.player.getChild("collapserator"),n=null==t?void 0:t.children().findIndex(function(e){return"CustomControlSpacer"===e.name()}),r=null==t?void 0:t.children().findIndex(function(e){return"OpenExternallyButton"===e.name()}),i=Math.max(n,r)+1,o=this.getSessionManager();if(t&&n&&-1!==n&&o){o.on("deviceschange",this.onDevicesChanged),o.on("castsessionchange",this.onCastSessionChanged),o.on("error",this.onDevicesError);var a=this.options.ctaOptions,u=this.options.vivi,l=[];this.options.appleTv.enabled||l.push(xb.AppleTv),u.enabled&&u.accountConnected||l.push(xb.Vivi);var c={onClick:function(){e.addViviClient(o),e.addAppleTvClient(o)},onDeviceMenuItemClick:function(t,n){var r;o.startCastSession({device:n,title:e.options.title}),null===(r=e.options.analyticsService)||void 0===r||r.logUserAction(n,{actionType:it.Vw.Select,workflowPhase:it.eu.Complete,descriptor:it.UX.ChangeDevice,entity:it.py.Device,eventVersion:it.eq.V3})},ctaOptions:Object.assign(Object.assign({},a),{inactiveIntegrations:l})};this.devicesButton=t.addChild("DevicesButton",c,i)}}},{key:"onDevicesChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setDevices(e)}},{key:"onCastSessionChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setCastSession(e),this.reloadTech(),e?(this.player.addClass("cv-device-casting"),this.player.addClass("cv-device-".concat(e.getDevice().type)),this.player.isFullscreen()&&this.player.exitFullscreen()):(this.player.removeClass("cv-device-casting"),this.player.removeClass("cv-device-".concat(xb.AppleTv)),this.player.removeClass("cv-device-".concat(xb.Vivi)))}},{key:"onDevicesError",value:function(e){this.player.error(e.message),this.player.pause()}},{key:"addViviClient",value:function(e){if(this.options.vivi.enabled&&this.options.vivi.accountConnected&&this.options.vivi.apiUrl&&!e.hasInstanceOfClient(sw)){var t=new sw({url:this.options.vivi.apiUrl,fetchAccessToken:this.options.vivi.fetchAccessToken});e.addClient(t)}}},{key:"addAppleTvClient",value:function(e){if(this.options.appleTv.enabled&&this.options.trackingCode&&this.options.userId&&!e.hasInstanceOfClient(Rg)){var t=new Rg({fetchAccessToken:this.options.appleTv.fetchAccessToken,trackingCode:this.options.trackingCode,userId:this.options.userId});e.addClient(t)}}},{key:"reloadTech",value:function(){var e=this.player,t=e.currentSources(),n=e.volume(),r=e.muted(),i=e.currentTime(),o=e.paused();e.src(t),e.one("playing",function(){e.volume(n),e.muted(r),e.currentTime(i),o?e.pause():e.play()})}},{key:"getSessionManager",value:function(){if(this.instanceId)return ww.getOrCreateInstance(this.instanceId)}},{key:"dispose",value:function(){var e,n,r,i=this.getSessionManager();i&&(i.off("deviceschange",this.onDevicesChanged),i.off("castsessionchange",this.onCastSessionChanged),i.off("error",this.onDevicesError),ww.disposeAndRemoveInstance(i),(e=t,n=this,"function"==typeof(r=gO(wO(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([]))}}],r&&dO(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function kO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function PO(e){var t,n,i,o=(n=r.useState(5),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(n,i)||function(e,t){if(e){if("string"==typeof e)return kO(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kO(e,t):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],u=o[1];if(r.useEffect(function(){var e=setInterval(function(){u(function(e){return e-1})},1e3);return function(){clearInterval(e)}},[]),r.useEffect(function(){0===a&&e.onPlayNext()},[a]),!e.nextVideo||!e.onPlayNext)return r.createElement(r.Fragment,null);var l=Math.ceil(a),c=1===l?"second":"seconds";return r.createElement(r.Fragment,null,r.createElement("div",{className:"cv-up-next-container"},r.createElement("div",{className:"cv-cancel-up-next cursor-pointer",role:"button",onClick:e.onCancel},"×"),r.createElement("div",{className:"cv-up-next-heading"},"Up next in ",l," ",c,":"),r.createElement("div",{className:"cv-up-next-image cursor-pointer",onClick:e.onPlayNext,style:{backgroundImage:"url(".concat(null===(t=e.nextVideo)||void 0===t?void 0:t.thumbnailUrl,")")}}),r.createElement("div",{className:"cv-up-next-title"},e.nextVideo.name)))}function NO(e){return NO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},NO(e)}function jO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,CO(r.key),r)}}function CO(e){var t=function(e){if("object"!=NO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=NO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==NO(t)?t:t+""}function TO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(TO=function(){return!!e})()}function EO(e,t,n,r){var i=_O(RO(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function _O(){return _O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=RO(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},_O.apply(null,arguments)}function RO(e){return RO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},RO(e)}function xO(e,t){return xO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xO(e,t)}i.Z.registerPlugin("devicesPlugin",SO),i.Z.registerComponent("UpNext",Yf(function(e,t){return r.createElement(PO,Object.assign({player:e},t))}));var IO=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=RO(t),function(e,t){if(t&&("object"==NO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,TO()?Reflect.construct(t,n||[],RO(e).constructor):t.apply(e,n))}(this,t,[e,n])).bindListeners(),r.player_.nextVideoPlugin().getShouldPlayNext()&&r.toggleOn(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xO(e,t)}(t,e),n=t,(r=[{key:"bindListeners",value:function(){this.onPlayNextChange=this.onPlayNextChange.bind(this),this.player_.on("cv:playnext",this.onPlayNextChange)}},{key:"handleToggle",value:function(){var e=this.player_.nextVideoPlugin().getShouldPlayNext();this.player_.nextVideoPlugin().setShouldPlayNext(!e,!0)}},{key:"onPlayNextChange",value:function(e,t){t?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){i.Z.dom.addClass(this.toggleEl,"on")}},{key:"toggleOff",value:function(){i.Z.dom.removeClass(this.toggleEl,"on")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,n,r){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=i.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var o=EO(t,"createEl",this,3)([e,{className:"vjs-menu-item cv-cog-menu-item cv-play-next-toggle",innerHTML:'\n <span class="vjs-menu-item-text">Play next video</span>\n <span class="cv-toggle-container"></span>'},r]);return o.children[1].appendChild(this.toggleEl),o}},{key:"dispose",value:function(){this.player_.off("cv:playnext",this.onPlayNextChange),EO(t,"dispose",this,3)([])}}])&&jO(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function MO(e){return MO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MO(e)}function BO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LO(r.key),r)}}function LO(e){var t=function(e){if("object"!=MO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=MO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==MO(t)?t:t+""}function DO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(DO=function(){return!!e})()}function AO(){return AO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=FO(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},AO.apply(null,arguments)}function FO(e){return FO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},FO(e)}function zO(e,t){return zO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zO(e,t)}i.Z.registerComponent("NextVideoMenuItem",IO);var ZO="cv-persisttest",VO="cv-play-next-video",UO=i.Z.getPlugin("plugin"),GO=(i.Z.getComponent("MenuItem"),i.Z.getComponent("NextVideoMenuItem")),KO=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=FO(t),function(e,t){if(t&&("object"==MO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,DO()?Reflect.construct(t,n||[],FO(e).constructor):t.apply(e,n))}(this,t,[e])).setShouldPlayNext=n.setShouldPlayNext.bind(n),n.getShouldPlayNext=n.getShouldPlayNext.bind(n),n.getChapterTrack=n.getChapterTrack.bind(n),n.onTimeUpdate=n.onTimeUpdate.bind(n),n.hasLocalStorage=n.testHasLocalStorage(),n.shouldPlayNextVideo=!1,n.hasLocalStorage){var r=window.localStorage.getItem(VO);n.shouldPlayNextVideo="true"===r}return e.ready(function(){n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zO(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.player.isDisposed()||this.bindListeners()}},{key:"getChapterTrack",value:function(){return Q.getTrack(this.player,"chapters",null)}},{key:"setNextVideo",value:function(e,t,n){var r;this.nextVideo=e,this.callback=n,t&&this.setShouldPlayNext(!0),(null===(r=this.player.getChild("collapserator"))||void 0===r?void 0:r.getChild("cogButton")).addItem({index:0,ctor:GO,name:"NextVideoMenuItem"})}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.player.trigger("cv:playnext",e),this.hasLocalStorage&&t&&window.localStorage.setItem(VO,e.toString()),e&&this.player.loopVideoPlugin().loop(!1)}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){var e,n,r;this.player.off("timeupdate",this.onTimeUpdate),this.hideUpNext(),(e=t,n=this,"function"==typeof(r=AO(FO(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"onTimeUpdate",value:function(){this.player.pictureInPicture&&this.player.isInPictureInPicture()||(this.getShouldPlayNext()?this.upNextRendered&&this.player.currentTime()<this.player.duration()?this.hideUpNext():this.player.ended()&&this.showUpNext():this.hideUpNext())}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){e.hideUpNext(),e.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1;var e=this.player.getChild("UpNext");e&&(this.player.removeChild(e),e.dispose())}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem(ZO,"persistPlayNext"),window.localStorage.removeItem(ZO),!0}catch(e){return!1}}}],r&&BO(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(UO);i.Z.registerPlugin("nextVideoPlugin",KO);var qO=n(39202),HO=n(28825),WO=n(86073),QO=n(1164),JO=n(45778),YO=n(87611);var XO={width:200,resizeType:Ev.Nq.Cover};function $O(e){var t;return JO.G.isResource(e)?e.metadata.type===QO.L.Pdf||(null===(t=e.pdf)||void 0===t?void 0:t.url)?Ev.__.Pdf:Ev.__.Thumbnails:Ev.__.Link}function eS(e){var t,n,i,o=null,a=0;JO.G.isResource(e.resource)&&(o=e.resource.metadata,a=null!==(i=null===(n=null===(t=e.resource.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==i?i:0);var u=function(e,t){var n,r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:XO,a=$O(t);if("thumbnail"in t&&(null===(n=t.thumbnail)||void 0===n?void 0:n.url))return Tv.j.createUrl(null===(r=t.thumbnail)||void 0===r?void 0:r.url,Object.assign({},o));var u=WO._.safeUrlConcat(e,"/v1/previews");return JO.G.isResource(t)?a===Ev.__.Pdf?t.metadata.type===QO.L.Pdf?Tv.j.createResourceImage(u,t.url,Object.assign({},o)):Tv.j.createResourceImage(u,null===(i=t.pdf)||void 0===i?void 0:i.url,Object.assign({},o)):t.metadata.type!==QO.L.Zip?Tv.j.createUrl(t.url,{size:Ev.h2.Medium,resizeType:Ev.Nq.Cover}):"/images/zip-resource.png":Tv.j.createResourceImage(u,t.url,Object.assign({},o))}(e.imageCdnUrl,e.resource,e.dynamicRatioImageOptions);return r.createElement(YO.Z,{data:u,imageType:$O(e.resource),imageStyle:{transform:"rotate(".concat(a,"deg)")},alt:e.resource.name,errorFallbackImageSrc:e.imageErrorFallbackUrl,errorFallbackImageClassName:"Xy4zX",imageClassName:(null==o?void 0:o.type)===QO.L.Image?"".concat("z4O5p"," ").concat("FFgf3"):"",preload:e.preloadImage,preventLoad:!e.preloadImage})}var tS=n(26117),nS=n(52999),rS=n(71063),iS=n(4594);function oS(e){var t,n,i,o,a=null;"metadata"in e.data&&(a=e.data.metadata);var u=JO.G.isType(e.data,iS.E.Resource);return r.createElement(r.Fragment,null,r.createElement("div",{className:"OnJDH"},r.createElement("div",{className:"CIFy7"},r.createElement("div",{className:function(t){var n,r="\n d-flex flex-column align-items-center justify-content-end rounded-3 h-100\n position-relative ".concat(function(e){switch(e){case"atom-guide":return"X39wU";case"student-activity":return"X9pMl";case"teacher-pack":return"_tdVE";case"additional-materials":return"qRVUo";default:return"_18JaV"}}(t)," ").concat("oUZPD");return(null===(n=e.theme)||void 0===n?void 0:n.containerClass)?r+=" ".concat(e.theme.containerClass):r+=" pt-3 px-3",e.applyHoverState&&(r+=" ".concat("xRYhX")),r}(null==a?void 0:a.resourceType)},"above"===e.titlePosition&&r.createElement(ff.u,{title:e.data.name},r.createElement("h3",{className:"text-center text-break h5 mb-3 ".concat("g5NWS")},r.createElement("span",{className:"clamp-1"},e.data.name))),r.createElement("div",{className:"\n ".concat(null!==(n=null===(t=e.theme)||void 0===t?void 0:t.thumbnailContainerClass)&&void 0!==n?n:""," w-75 overflow-hidden \n ").concat("EDiGi"," ").concat("above"===e.titlePosition?"e9ejn":""," \n ").concat("I9E5O","\n ")},r.createElement(eS,{resource:e.data,imageCdnUrl:e.imageCdnUrl,imageErrorFallbackUrl:e.imageErrorFallbackUrl,preloadImage:e.preloadImage})),u&&e.onClickDownload&&"normal"===e.actionBehaviour&&r.createElement("div",{className:"jzGAm"},r.createElement(cf.L,{onClick:function(t){return e.onClickDownload(t,e.data)},className:"".concat("fbb_e"," d-flex align-items-center justify-content-center")},r.createElement(sf.x,{svgName:pf.vn.Download}))),!e.hideTypeBadge&&u&&r.createElement(nS.y,{typeId:iS.E.Resource})))),"below"===e.titlePosition&&r.createElement("div",{className:"mt-1 ".concat("Cpjs3")},JO.G.isType(e.data,iS.E.Resource)&&!!(null===(o=null===(i=e.data)||void 0===i?void 0:i.metadata)||void 0===o?void 0:o.resourceType)&&r.createElement(tS.m,null,function(e){switch(e){case"additional-materials":return"Additional Materials";case"atom-guide":return"ATOM Guide";case"teacher-pack":return"Teacher Pack";case"student-activity":return"Student Activity";default:return"N/A"}}(e.data.metadata.resourceType)),r.createElement("h3",{className:"h6 clamp-2"},e.data.name)))}function aS(e){return aS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aS(e)}function uS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lS(r.key),r)}}function lS(e){var t=function(e){if("object"!=aS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=aS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==aS(t)?t:t+""}function cS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cS=function(){return!!e})()}function sS(){return sS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=fS(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},sS.apply(null,arguments)}function fS(e){return fS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fS(e)}function pS(e,t){return pS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pS(e,t)}function hS(e){return r.createElement("div",{className:"cv-resource-item"},r.createElement(oS,{data:e.resource,imageCdnUrl:e.imageCdnUrl,titlePosition:"above",hideTypeBadge:!0}))}oS.defaultProps={preloadImage:!0,actionBehaviour:"normal"},r.memo(function(e){var t,n,i,o,a=(t=e.data,n=e.actionBehaviour,o=(0,_f.k)(),"public"===n||!o.xs&&!o.sm&&"resource"===t.type&&"metadata"in t&&(t.metadata.type===QO.L.Image||(t.metadata.type===QO.L.Pdf?!!t.url:!!(null===(i=t.pdf)||void 0===i?void 0:i.url)))),u=Object.assign(Object.assign({},e.analyticsData),e.data),l=Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Click,entity:e.data.typeId===iS.E.Resource?it.py.Resource:it.py.Link});function c(){lf.k.logUserAction(u,l)}var s,f=Object.assign(Object.assign({},e),{applyHoverState:a||!!e.data.url});return r.createElement("div",{className:"px-1 flex-shrink-0 ".concat("tqUFn"," ").concat("play-page"===e.location?"V2RwX":"o7j7p"," ").concat(rS.M.RESOURCE_ITEM_SELECTOR)},(s="d-block no-decoration","link"===e.data.type?r.createElement("a",{href:e.data.url,target:"_blank",className:s,onClick:c},r.createElement(oS,Object.assign({},f))):a?"public"===e.actionBehaviour?r.createElement("div",{className:"".concat(s," cursor-pointer d-inline"),onClick:function(){c(),qO.C$.trigger(e.getAppLink(e.data))}},r.createElement(oS,Object.assign({},f))):r.createElement(HO.F,{appLink:e.getAppLink(e.data),className:s,analyticsData:u,analyticsOptions:l},r.createElement(oS,Object.assign({},f))):e.data.url?r.createElement("a",{href:e.data.url,className:s,onClick:c},r.createElement(oS,Object.assign({},f))):r.createElement("div",{className:s},r.createElement(oS,Object.assign({},f)))))});var yS=Yf(function(e,t){return r.createElement(hS,Object.assign({},t))}),vS=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=fS(t),function(e,t){if(t&&("object"==aS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cS()?Reflect.construct(t,n||[],fS(e).constructor):t.apply(e,n))}(this,t,[e,n]);var i=new yS(e,{resource:n.resource,imageCdnUrl:n.imageCdnUrl});return r.addChild(i),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pS(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(e){var n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;return(n=t,r=this,"function"==typeof(i=sS(fS(1&3?n.prototype:n),"createEl",r))?function(e){return i.apply(r,e)}:i)([e,Object.assign(Object.assign({},o),{className:"".concat(o.className," cv-resource-menu-item")}),a])}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}],r&&uS(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function dS(e){return dS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dS(e)}function mS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bS(r.key),r)}}function bS(e){var t=function(e){if("object"!=dS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dS(t)?t:t+""}function gS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(gS=function(){return!!e})()}function wS(e,t,n,r){var i=OS(SS(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function OS(){return OS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=SS(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},OS.apply(null,arguments)}function SS(e){return SS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},SS(e)}function kS(e,t){return kS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kS(e,t)}var PS=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=SS(t),function(e,t){if(t&&("object"==dS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,gS()?Reflect.construct(t,n||[],SS(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kS(e,t)}(t,e),n=t,(r=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-resources-button-wrapper ".concat(wS(t,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(wS(t,"buildCSSClass",this,3)([]))}},{key:"update",value:function(){wS(t,"update",this,3)([])}},{key:"createItems",value:function(){var e=this,t=[];return t.push(new j(this.player_,{label:"Resources"})),this.options_.resources.forEach(function(n){var r=new vS(e.player(),{resource:n,imageCdnUrl:e.options_.imageCdnUrl,downloadResource:function(t){return e.downloadResource(t)},label:n.name});t.push(r)}),t}},{key:"downloadResource",value:function(e){"link"!==e.type?this.getDownloadIframe().src=e.url:qO.Ab.PageLoad(e.url,!0)}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=i.Z.dom.createEl("iframe"),this.downloadIframe.style.display="none",i.Z.dom.appendContent(i.Z.dom.$("body"),this.downloadIframe)),this.downloadIframe}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){wS(t,"handleClick",this,3)([null])}}])&&mS(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuButton"));function NS(e){return NS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},NS(e)}function jS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,CS(r.key),r)}}function CS(e){var t=function(e){if("object"!=NS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=NS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==NS(t)?t:t+""}function TS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(TS=function(){return!!e})()}function ES(e){return ES=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ES(e)}function _S(e,t){return _S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_S(e,t)}PS.prototype.controlText_="Resources",i.Z.registerComponent("ResourcesButton",PS);var RS=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ES(t),function(e,t){if(t&&("object"==NS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,TS()?Reflect.construct(t,n||[],ES(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,e.ready(function(){return r.onReady()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_S(e,t)}(t,e),n=t,(r=[{key:"onReady",value:function(){if(this.options.resources.length){var e=this.player.getChild("collapserator");e.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},e.children_.length-4)}}}])&&jS(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));i.Z.registerPlugin("resourcesPlugin",RS);var xS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function IS(e){var t=e.className,n=void 0===t?"":t,i=e.playerApi,o=e.onReady,a=e.onDispose,u=xS(e,["className","playerApi","onReady","onDispose"]),l=r.useRef(null);return r.useEffect(function(){if(l){var e=new Mb(l.current,Object.assign(Object.assign({},u),{playerApi:i}));return o&&e.ready(function(){o(function(e){return new Proxy(e,{get:function(e,t,n){if("off"===t||!e.isDisposed())return Reflect.get(e,t,n)}})}(e))}),a&&e.one("dispose",a),function(){null==e||e.dispose()}}},[e.viewKey]),r.createElement("div",{ref:l,className:n})}},58421:()=>{}}]);