@clickview/lite 0.43.0 → 0.43.1

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 (251) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/scripts/121-7ea66e5966-lite.chunk.js +1 -0
  3. package/dist/scripts/1276-3649cb6030-lite.chunk.js +2 -0
  4. package/dist/scripts/{1437-631fffdd38-lite.chunk.js → 1437-7e88bfe248-lite.chunk.js} +1 -1
  5. package/dist/scripts/1466-1e609d0f2d-lite.chunk.js +2 -0
  6. package/dist/scripts/{1526-58fe2eda49-lite.chunk.js → 1526-af2eac3dcb-lite.chunk.js} +1 -1
  7. package/dist/scripts/1605-8d63722fa8-lite.chunk.js +1 -0
  8. package/dist/scripts/{1672-1cc56570f6-lite.chunk.js → 1672-3aee4ad2e0-lite.chunk.js} +2 -2
  9. package/dist/scripts/1818-b1111e7fc2-lite.chunk.js +1 -0
  10. package/dist/scripts/{1895-ab79a61bf0-lite.chunk.js → 1895-d2546a0cd3-lite.chunk.js} +2 -2
  11. package/dist/scripts/{2118-137eb07a47-lite.chunk.js → 2118-3ea471e7fa-lite.chunk.js} +2 -2
  12. package/dist/scripts/2235-c26089dac6-lite.chunk.js +1 -0
  13. package/dist/scripts/2261-c321060b23-lite.chunk.js +1 -0
  14. package/dist/scripts/2857-0eb6890691-lite.chunk.js +1 -0
  15. package/dist/scripts/{287-06359ea09a-lite.chunk.js → 287-ef6618e87a-lite.chunk.js} +1 -1
  16. package/dist/scripts/{3020-7a5b4bc9fd-lite.chunk.js → 3020-e297059595-lite.chunk.js} +1 -1
  17. package/dist/scripts/3067-2d4b2a7550-lite.chunk.js +1 -0
  18. package/dist/scripts/3081-b55baaca7c-lite.chunk.js +2 -0
  19. package/dist/scripts/{3095-dfe7a98802-lite.chunk.js → 3095-bf608cb2cb-lite.chunk.js} +2 -2
  20. package/dist/scripts/3216-157a11893b-lite.chunk.js +1 -0
  21. package/dist/scripts/355-c2888d4603-lite.chunk.js +1 -0
  22. package/dist/scripts/360-3cf4f252d4-lite.chunk.js +2 -0
  23. package/dist/scripts/3602-903eb1cd1e-lite.chunk.js +2 -0
  24. package/dist/scripts/{3645-f80a190884-lite.chunk.js → 3645-c78674bb10-lite.chunk.js} +1 -1
  25. package/dist/scripts/3654-758c9e46e0-lite.chunk.js +1 -0
  26. package/dist/scripts/3667-09226e6369-lite.chunk.js +2 -0
  27. package/dist/scripts/3728-c288e986a7-lite.chunk.js +1 -0
  28. package/dist/scripts/3836-c1b0423e7a-lite.chunk.js +1 -0
  29. package/dist/scripts/3841-539aa9573e-lite.chunk.js +2 -0
  30. package/dist/scripts/3848-4eb815382b-lite.chunk.js +1 -0
  31. package/dist/scripts/3866-0333c31602-lite.chunk.js +1 -0
  32. package/dist/scripts/3867-3db1c4ae68-lite.chunk.js +2 -0
  33. package/dist/scripts/3966-5c38e725b9-lite.chunk.js +1 -0
  34. package/dist/scripts/{4032-b03e3ab723-lite.chunk.js → 4032-447a2a4182-lite.chunk.js} +1 -1
  35. package/dist/scripts/4393-48db651ab8-lite.chunk.js +1 -0
  36. package/dist/scripts/4436-7682d831f0-lite.chunk.js +1 -0
  37. package/dist/scripts/4612-f6ba941518-lite.chunk.js +1 -0
  38. package/dist/scripts/4676-beb0d246a2-lite.chunk.js +2 -0
  39. package/dist/scripts/{4753-c8a19a5c5f-lite.chunk.js → 4753-fa7c39e008-lite.chunk.js} +1 -1
  40. package/dist/scripts/4778-54d690212d-lite.chunk.js +2 -0
  41. package/dist/scripts/4942-eb4a01aff6-lite.chunk.js +2 -0
  42. package/dist/scripts/5009-e742b3b11e-lite.chunk.js +2 -0
  43. package/dist/scripts/{5143-bb74b5c75b-lite.chunk.js → 5143-a61ff5768d-lite.chunk.js} +1 -1
  44. package/dist/scripts/{5236-f9803e6cdc-lite.chunk.js → 5236-2df80ffe90-lite.chunk.js} +2 -2
  45. package/dist/scripts/5268-5d8644cad3-lite.chunk.js +2 -0
  46. package/dist/scripts/{537-3e4996c5d8-lite.chunk.js → 537-546b4eb266-lite.chunk.js} +2 -2
  47. package/dist/scripts/5438-78389dcaeb-lite.chunk.js +1 -0
  48. package/dist/scripts/5512-254e4101b7-lite.chunk.js +2 -0
  49. package/dist/scripts/{5622-a13aac797f-lite.chunk.js → 5622-3d0bdd9770-lite.chunk.js} +2 -2
  50. package/dist/scripts/{578-56a1addcc4-lite.chunk.js → 578-f9b10da13c-lite.chunk.js} +1 -1
  51. package/dist/scripts/{5940-9493052ad5-lite.chunk.js → 5940-b8ad77c3d4-lite.chunk.js} +1 -1
  52. package/dist/scripts/5956-7ae21a8993-lite.chunk.js +1 -0
  53. package/dist/scripts/5986-b67f4ecfea-lite.chunk.js +1 -0
  54. package/dist/scripts/6014-f460228962-lite.chunk.js +1 -0
  55. package/dist/scripts/6086-6e1cd58ace-lite.chunk.js +2 -0
  56. package/dist/scripts/6102-07945fec00-lite.chunk.js +2 -0
  57. package/dist/scripts/615-92aa23faec-lite.chunk.js +1 -0
  58. package/dist/scripts/{6330-748f77531b-lite.chunk.js → 6330-90534c8505-lite.chunk.js} +1 -1
  59. package/dist/scripts/6368-f6dc2b01be-lite.chunk.js +1 -0
  60. package/dist/scripts/6433-355f54088c-lite.chunk.js +2 -0
  61. package/dist/scripts/{6489-e1794b98c8-lite.chunk.js → 6489-4d22ec2409-lite.chunk.js} +2 -2
  62. package/dist/scripts/6532-998af9d801-lite.chunk.js +1 -0
  63. package/dist/scripts/6617-60a05d215d-lite.chunk.js +2 -0
  64. package/dist/scripts/6741-2abe8a3d40-lite.chunk.js +2 -0
  65. package/dist/scripts/6801-c3b5411aef-lite.chunk.js +1 -0
  66. package/dist/scripts/6823-0c0e463dc4-lite.chunk.js +2 -0
  67. package/dist/scripts/6896-a3d38ae7a4-lite.chunk.js +2 -0
  68. package/dist/scripts/7017-1c686d77cb-lite.chunk.js +2 -0
  69. package/dist/scripts/7030-c786d4e8ec-lite.chunk.js +2 -0
  70. package/dist/scripts/7052-1670c2a6de-lite.chunk.js +2 -0
  71. package/dist/scripts/7112-2294fbf212-lite.chunk.js +2 -0
  72. package/dist/scripts/7117-91ae366d34-lite.chunk.js +1 -0
  73. package/dist/scripts/7178-b0d19154b1-lite.chunk.js +1 -0
  74. package/dist/scripts/{7205-05c2b05546-lite.chunk.js → 7205-0a33c1ff11-lite.chunk.js} +1 -1
  75. package/dist/scripts/7221-fc696d1984-lite.chunk.js +2 -0
  76. package/dist/scripts/7288-2882ea6a8a-lite.chunk.js +1 -0
  77. package/dist/scripts/{7351-14343c2f59-lite.chunk.js → 7351-60c7b4a926-lite.chunk.js} +1 -1
  78. package/dist/scripts/7385-8472652f32-lite.chunk.js +2 -0
  79. package/dist/scripts/7402-88ffc2535a-lite.chunk.js +2 -0
  80. package/dist/scripts/7506-799a5aa8ba-lite.chunk.js +1 -0
  81. package/dist/scripts/{7540-1306a8daf6-lite.chunk.js → 7540-7c5a0fc317-lite.chunk.js} +1 -1
  82. package/dist/scripts/{7555-181e877fce-lite.chunk.js → 7555-5650392ae9-lite.chunk.js} +1 -1
  83. package/dist/scripts/7670-9684a40bb3-lite.chunk.js +2 -0
  84. package/dist/scripts/771-2a50f4b492-lite.chunk.js +2 -0
  85. package/dist/scripts/7726-10f2482d47-lite.chunk.js +1 -0
  86. package/dist/scripts/7902-c2cf220002-lite.chunk.js +2 -0
  87. package/dist/scripts/7934-1d8a062799-lite.chunk.js +1 -0
  88. package/dist/scripts/8046-0eccefca74-lite.chunk.js +1 -0
  89. package/dist/scripts/8199-24bace5758-lite.chunk.js +2 -0
  90. package/dist/scripts/{8323-4ff53a3139-lite.chunk.js → 8323-b3a467d26e-lite.chunk.js} +2 -2
  91. package/dist/scripts/{841-51c690486c-lite.chunk.js → 841-204e8dffbc-lite.chunk.js} +2 -2
  92. package/dist/scripts/8581-e6c2975133-lite.chunk.js +1 -0
  93. package/dist/scripts/8681-fd629972e5-lite.chunk.js +2 -0
  94. package/dist/scripts/8759-e1bd74ab1c-lite.chunk.js +1 -0
  95. package/dist/scripts/8935-9cf0afbfd0-lite.chunk.js +2 -0
  96. package/dist/scripts/9173-33a8c5c0ba-lite.chunk.js +2 -0
  97. package/dist/scripts/9226-f6b171dbe4-lite.chunk.js +1 -0
  98. package/dist/scripts/9230-fc45f2e21d-lite.chunk.js +2 -0
  99. package/dist/scripts/9242-6064f14b8c-lite.chunk.js +1 -0
  100. package/dist/scripts/9371-adcc457db4-lite.chunk.js +2 -0
  101. package/dist/scripts/9428-02847e469a-lite.chunk.js +2 -0
  102. package/dist/scripts/9433-2633f88768-lite.chunk.js +1 -0
  103. package/dist/scripts/9478-d3fc621fa0-lite.chunk.js +2 -0
  104. package/dist/scripts/9484-f7ade8822e-lite.chunk.js +2 -0
  105. package/dist/scripts/9557-b994444554-lite.chunk.js +1 -0
  106. package/dist/scripts/{9719-a171fa6dfc-lite.chunk.js → 9719-d0ad006c61-lite.chunk.js} +2 -2
  107. package/dist/scripts/9894-3628ac93b9-lite.chunk.js +2 -0
  108. package/dist/scripts/9918-eb167d3142-lite.chunk.js +2 -0
  109. package/dist/scripts/9931-abf79a99fb-lite.chunk.js +2 -0
  110. package/dist/scripts/bundle-70e9f8d7f3.min.js +2 -0
  111. package/dist/scripts/{polyfills-7bd16772e3.min.js → polyfills-7cab3b27a6.min.js} +2 -2
  112. package/package.json +1 -1
  113. package/dist/scripts/121-67e7df47c6-lite.chunk.js +0 -1
  114. package/dist/scripts/1276-c906943bd2-lite.chunk.js +0 -2
  115. package/dist/scripts/1466-8c87c52bac-lite.chunk.js +0 -2
  116. package/dist/scripts/1605-149c2134d1-lite.chunk.js +0 -1
  117. package/dist/scripts/1818-02ab6ec5de-lite.chunk.js +0 -1
  118. package/dist/scripts/2235-17d38cbc78-lite.chunk.js +0 -1
  119. package/dist/scripts/2261-e5a16a463c-lite.chunk.js +0 -1
  120. package/dist/scripts/2857-e6aa9b67f4-lite.chunk.js +0 -1
  121. package/dist/scripts/3067-ccf9d113ae-lite.chunk.js +0 -1
  122. package/dist/scripts/3081-108dff6034-lite.chunk.js +0 -2
  123. package/dist/scripts/3216-2622b09d95-lite.chunk.js +0 -1
  124. package/dist/scripts/355-833532b4ed-lite.chunk.js +0 -1
  125. package/dist/scripts/360-054d9fa0b0-lite.chunk.js +0 -2
  126. package/dist/scripts/3602-7fd870ae27-lite.chunk.js +0 -2
  127. package/dist/scripts/3654-e4ce211ef5-lite.chunk.js +0 -1
  128. package/dist/scripts/3667-ca54928839-lite.chunk.js +0 -2
  129. package/dist/scripts/3728-6dbaab9fa1-lite.chunk.js +0 -1
  130. package/dist/scripts/3836-ca3688f876-lite.chunk.js +0 -1
  131. package/dist/scripts/3841-5f7adfd01c-lite.chunk.js +0 -2
  132. package/dist/scripts/3848-3d23e7ebe9-lite.chunk.js +0 -1
  133. package/dist/scripts/3866-8c87ffcfe7-lite.chunk.js +0 -1
  134. package/dist/scripts/3867-f54c8c7620-lite.chunk.js +0 -2
  135. package/dist/scripts/3966-f974de8f41-lite.chunk.js +0 -1
  136. package/dist/scripts/4393-f5ca3cd7cc-lite.chunk.js +0 -1
  137. package/dist/scripts/4436-6c821a65e3-lite.chunk.js +0 -1
  138. package/dist/scripts/4612-668b3947be-lite.chunk.js +0 -1
  139. package/dist/scripts/4676-3b968e527e-lite.chunk.js +0 -2
  140. package/dist/scripts/4778-3d35a96da5-lite.chunk.js +0 -2
  141. package/dist/scripts/4942-7f8f1c056b-lite.chunk.js +0 -2
  142. package/dist/scripts/5009-d8f58f2f6d-lite.chunk.js +0 -2
  143. package/dist/scripts/5268-4201f3a418-lite.chunk.js +0 -2
  144. package/dist/scripts/5438-b1178bfe97-lite.chunk.js +0 -1
  145. package/dist/scripts/5512-cef514f35e-lite.chunk.js +0 -2
  146. package/dist/scripts/5956-8cf49a7924-lite.chunk.js +0 -1
  147. package/dist/scripts/5986-9a35646e4d-lite.chunk.js +0 -1
  148. package/dist/scripts/6014-83edee02fe-lite.chunk.js +0 -1
  149. package/dist/scripts/6086-119dd59a8c-lite.chunk.js +0 -2
  150. package/dist/scripts/6102-faee0966e1-lite.chunk.js +0 -2
  151. package/dist/scripts/615-47359245c1-lite.chunk.js +0 -1
  152. package/dist/scripts/6368-1d7aa2f406-lite.chunk.js +0 -1
  153. package/dist/scripts/6433-2d6d2c0425-lite.chunk.js +0 -2
  154. package/dist/scripts/6532-990126a37a-lite.chunk.js +0 -1
  155. package/dist/scripts/6617-a01e71dced-lite.chunk.js +0 -2
  156. package/dist/scripts/6741-cdc8cf05a6-lite.chunk.js +0 -2
  157. package/dist/scripts/6801-07270579c3-lite.chunk.js +0 -1
  158. package/dist/scripts/6823-4d9cec7108-lite.chunk.js +0 -2
  159. package/dist/scripts/6896-07e4c9237f-lite.chunk.js +0 -2
  160. package/dist/scripts/7017-68fd760191-lite.chunk.js +0 -2
  161. package/dist/scripts/7030-7143384a72-lite.chunk.js +0 -2
  162. package/dist/scripts/7052-52ef9d3618-lite.chunk.js +0 -2
  163. package/dist/scripts/7112-1e62fffef9-lite.chunk.js +0 -2
  164. package/dist/scripts/7117-59efcfef9b-lite.chunk.js +0 -1
  165. package/dist/scripts/7178-c7988251f6-lite.chunk.js +0 -1
  166. package/dist/scripts/7221-f88ee657b5-lite.chunk.js +0 -2
  167. package/dist/scripts/7288-1890d3d440-lite.chunk.js +0 -1
  168. package/dist/scripts/7385-a9fecdfb18-lite.chunk.js +0 -2
  169. package/dist/scripts/7402-3f6f29e4d6-lite.chunk.js +0 -2
  170. package/dist/scripts/7506-728c338ce6-lite.chunk.js +0 -1
  171. package/dist/scripts/7670-4d64f337ea-lite.chunk.js +0 -2
  172. package/dist/scripts/771-7baa5d9948-lite.chunk.js +0 -2
  173. package/dist/scripts/7726-5ee4e48be5-lite.chunk.js +0 -1
  174. package/dist/scripts/7902-379a79adec-lite.chunk.js +0 -2
  175. package/dist/scripts/7934-507a9ee897-lite.chunk.js +0 -1
  176. package/dist/scripts/8046-868da71a4d-lite.chunk.js +0 -1
  177. package/dist/scripts/8199-b717f3320a-lite.chunk.js +0 -2
  178. package/dist/scripts/8581-de35c5edc9-lite.chunk.js +0 -1
  179. package/dist/scripts/8681-44c94eded8-lite.chunk.js +0 -2
  180. package/dist/scripts/8759-38a1df6fa0-lite.chunk.js +0 -1
  181. package/dist/scripts/8935-eb635219f2-lite.chunk.js +0 -2
  182. package/dist/scripts/9173-f15b9cbcbe-lite.chunk.js +0 -2
  183. package/dist/scripts/9226-c83ae5aa82-lite.chunk.js +0 -1
  184. package/dist/scripts/9230-8797c9c5ff-lite.chunk.js +0 -2
  185. package/dist/scripts/9242-253c1fa28f-lite.chunk.js +0 -1
  186. package/dist/scripts/9371-dfb78a274f-lite.chunk.js +0 -2
  187. package/dist/scripts/9428-1dcd12662a-lite.chunk.js +0 -2
  188. package/dist/scripts/9433-9d964eb375-lite.chunk.js +0 -1
  189. package/dist/scripts/9478-e3fe60ea47-lite.chunk.js +0 -2
  190. package/dist/scripts/9484-1f09488069-lite.chunk.js +0 -2
  191. package/dist/scripts/9557-2f55d62d3f-lite.chunk.js +0 -1
  192. package/dist/scripts/9894-04b7d1bf02-lite.chunk.js +0 -2
  193. package/dist/scripts/9918-f2d762f32e-lite.chunk.js +0 -2
  194. package/dist/scripts/9931-d0df42247b-lite.chunk.js +0 -2
  195. package/dist/scripts/bundle-4a19f84363.min.js +0 -2
  196. /package/dist/scripts/{1276-c906943bd2-lite.chunk.js.LICENSE.txt → 1276-3649cb6030-lite.chunk.js.LICENSE.txt} +0 -0
  197. /package/dist/scripts/{1466-8c87c52bac-lite.chunk.js.LICENSE.txt → 1466-1e609d0f2d-lite.chunk.js.LICENSE.txt} +0 -0
  198. /package/dist/scripts/{1672-1cc56570f6-lite.chunk.js.LICENSE.txt → 1672-3aee4ad2e0-lite.chunk.js.LICENSE.txt} +0 -0
  199. /package/dist/scripts/{1895-ab79a61bf0-lite.chunk.js.LICENSE.txt → 1895-d2546a0cd3-lite.chunk.js.LICENSE.txt} +0 -0
  200. /package/dist/scripts/{2118-137eb07a47-lite.chunk.js.LICENSE.txt → 2118-3ea471e7fa-lite.chunk.js.LICENSE.txt} +0 -0
  201. /package/dist/scripts/{3081-108dff6034-lite.chunk.js.LICENSE.txt → 3081-b55baaca7c-lite.chunk.js.LICENSE.txt} +0 -0
  202. /package/dist/scripts/{3095-dfe7a98802-lite.chunk.js.LICENSE.txt → 3095-bf608cb2cb-lite.chunk.js.LICENSE.txt} +0 -0
  203. /package/dist/scripts/{360-054d9fa0b0-lite.chunk.js.LICENSE.txt → 360-3cf4f252d4-lite.chunk.js.LICENSE.txt} +0 -0
  204. /package/dist/scripts/{3602-7fd870ae27-lite.chunk.js.LICENSE.txt → 3602-903eb1cd1e-lite.chunk.js.LICENSE.txt} +0 -0
  205. /package/dist/scripts/{3667-ca54928839-lite.chunk.js.LICENSE.txt → 3667-09226e6369-lite.chunk.js.LICENSE.txt} +0 -0
  206. /package/dist/scripts/{3841-5f7adfd01c-lite.chunk.js.LICENSE.txt → 3841-539aa9573e-lite.chunk.js.LICENSE.txt} +0 -0
  207. /package/dist/scripts/{3867-f54c8c7620-lite.chunk.js.LICENSE.txt → 3867-3db1c4ae68-lite.chunk.js.LICENSE.txt} +0 -0
  208. /package/dist/scripts/{4676-3b968e527e-lite.chunk.js.LICENSE.txt → 4676-beb0d246a2-lite.chunk.js.LICENSE.txt} +0 -0
  209. /package/dist/scripts/{4778-3d35a96da5-lite.chunk.js.LICENSE.txt → 4778-54d690212d-lite.chunk.js.LICENSE.txt} +0 -0
  210. /package/dist/scripts/{4942-7f8f1c056b-lite.chunk.js.LICENSE.txt → 4942-eb4a01aff6-lite.chunk.js.LICENSE.txt} +0 -0
  211. /package/dist/scripts/{5009-d8f58f2f6d-lite.chunk.js.LICENSE.txt → 5009-e742b3b11e-lite.chunk.js.LICENSE.txt} +0 -0
  212. /package/dist/scripts/{5236-f9803e6cdc-lite.chunk.js.LICENSE.txt → 5236-2df80ffe90-lite.chunk.js.LICENSE.txt} +0 -0
  213. /package/dist/scripts/{5268-4201f3a418-lite.chunk.js.LICENSE.txt → 5268-5d8644cad3-lite.chunk.js.LICENSE.txt} +0 -0
  214. /package/dist/scripts/{537-3e4996c5d8-lite.chunk.js.LICENSE.txt → 537-546b4eb266-lite.chunk.js.LICENSE.txt} +0 -0
  215. /package/dist/scripts/{5512-cef514f35e-lite.chunk.js.LICENSE.txt → 5512-254e4101b7-lite.chunk.js.LICENSE.txt} +0 -0
  216. /package/dist/scripts/{5622-a13aac797f-lite.chunk.js.LICENSE.txt → 5622-3d0bdd9770-lite.chunk.js.LICENSE.txt} +0 -0
  217. /package/dist/scripts/{6086-119dd59a8c-lite.chunk.js.LICENSE.txt → 6086-6e1cd58ace-lite.chunk.js.LICENSE.txt} +0 -0
  218. /package/dist/scripts/{6102-faee0966e1-lite.chunk.js.LICENSE.txt → 6102-07945fec00-lite.chunk.js.LICENSE.txt} +0 -0
  219. /package/dist/scripts/{6433-2d6d2c0425-lite.chunk.js.LICENSE.txt → 6433-355f54088c-lite.chunk.js.LICENSE.txt} +0 -0
  220. /package/dist/scripts/{6489-e1794b98c8-lite.chunk.js.LICENSE.txt → 6489-4d22ec2409-lite.chunk.js.LICENSE.txt} +0 -0
  221. /package/dist/scripts/{6617-a01e71dced-lite.chunk.js.LICENSE.txt → 6617-60a05d215d-lite.chunk.js.LICENSE.txt} +0 -0
  222. /package/dist/scripts/{6741-cdc8cf05a6-lite.chunk.js.LICENSE.txt → 6741-2abe8a3d40-lite.chunk.js.LICENSE.txt} +0 -0
  223. /package/dist/scripts/{6823-4d9cec7108-lite.chunk.js.LICENSE.txt → 6823-0c0e463dc4-lite.chunk.js.LICENSE.txt} +0 -0
  224. /package/dist/scripts/{6896-07e4c9237f-lite.chunk.js.LICENSE.txt → 6896-a3d38ae7a4-lite.chunk.js.LICENSE.txt} +0 -0
  225. /package/dist/scripts/{7017-68fd760191-lite.chunk.js.LICENSE.txt → 7017-1c686d77cb-lite.chunk.js.LICENSE.txt} +0 -0
  226. /package/dist/scripts/{7030-7143384a72-lite.chunk.js.LICENSE.txt → 7030-c786d4e8ec-lite.chunk.js.LICENSE.txt} +0 -0
  227. /package/dist/scripts/{7052-52ef9d3618-lite.chunk.js.LICENSE.txt → 7052-1670c2a6de-lite.chunk.js.LICENSE.txt} +0 -0
  228. /package/dist/scripts/{7112-1e62fffef9-lite.chunk.js.LICENSE.txt → 7112-2294fbf212-lite.chunk.js.LICENSE.txt} +0 -0
  229. /package/dist/scripts/{7221-f88ee657b5-lite.chunk.js.LICENSE.txt → 7221-fc696d1984-lite.chunk.js.LICENSE.txt} +0 -0
  230. /package/dist/scripts/{7385-a9fecdfb18-lite.chunk.js.LICENSE.txt → 7385-8472652f32-lite.chunk.js.LICENSE.txt} +0 -0
  231. /package/dist/scripts/{7402-3f6f29e4d6-lite.chunk.js.LICENSE.txt → 7402-88ffc2535a-lite.chunk.js.LICENSE.txt} +0 -0
  232. /package/dist/scripts/{7670-4d64f337ea-lite.chunk.js.LICENSE.txt → 7670-9684a40bb3-lite.chunk.js.LICENSE.txt} +0 -0
  233. /package/dist/scripts/{771-7baa5d9948-lite.chunk.js.LICENSE.txt → 771-2a50f4b492-lite.chunk.js.LICENSE.txt} +0 -0
  234. /package/dist/scripts/{7902-379a79adec-lite.chunk.js.LICENSE.txt → 7902-c2cf220002-lite.chunk.js.LICENSE.txt} +0 -0
  235. /package/dist/scripts/{8199-b717f3320a-lite.chunk.js.LICENSE.txt → 8199-24bace5758-lite.chunk.js.LICENSE.txt} +0 -0
  236. /package/dist/scripts/{8323-4ff53a3139-lite.chunk.js.LICENSE.txt → 8323-b3a467d26e-lite.chunk.js.LICENSE.txt} +0 -0
  237. /package/dist/scripts/{841-51c690486c-lite.chunk.js.LICENSE.txt → 841-204e8dffbc-lite.chunk.js.LICENSE.txt} +0 -0
  238. /package/dist/scripts/{8681-44c94eded8-lite.chunk.js.LICENSE.txt → 8681-fd629972e5-lite.chunk.js.LICENSE.txt} +0 -0
  239. /package/dist/scripts/{8935-eb635219f2-lite.chunk.js.LICENSE.txt → 8935-9cf0afbfd0-lite.chunk.js.LICENSE.txt} +0 -0
  240. /package/dist/scripts/{9173-f15b9cbcbe-lite.chunk.js.LICENSE.txt → 9173-33a8c5c0ba-lite.chunk.js.LICENSE.txt} +0 -0
  241. /package/dist/scripts/{9230-8797c9c5ff-lite.chunk.js.LICENSE.txt → 9230-fc45f2e21d-lite.chunk.js.LICENSE.txt} +0 -0
  242. /package/dist/scripts/{9371-dfb78a274f-lite.chunk.js.LICENSE.txt → 9371-adcc457db4-lite.chunk.js.LICENSE.txt} +0 -0
  243. /package/dist/scripts/{9428-1dcd12662a-lite.chunk.js.LICENSE.txt → 9428-02847e469a-lite.chunk.js.LICENSE.txt} +0 -0
  244. /package/dist/scripts/{9478-e3fe60ea47-lite.chunk.js.LICENSE.txt → 9478-d3fc621fa0-lite.chunk.js.LICENSE.txt} +0 -0
  245. /package/dist/scripts/{9484-1f09488069-lite.chunk.js.LICENSE.txt → 9484-f7ade8822e-lite.chunk.js.LICENSE.txt} +0 -0
  246. /package/dist/scripts/{9719-a171fa6dfc-lite.chunk.js.LICENSE.txt → 9719-d0ad006c61-lite.chunk.js.LICENSE.txt} +0 -0
  247. /package/dist/scripts/{9894-04b7d1bf02-lite.chunk.js.LICENSE.txt → 9894-3628ac93b9-lite.chunk.js.LICENSE.txt} +0 -0
  248. /package/dist/scripts/{9918-f2d762f32e-lite.chunk.js.LICENSE.txt → 9918-eb167d3142-lite.chunk.js.LICENSE.txt} +0 -0
  249. /package/dist/scripts/{9931-d0df42247b-lite.chunk.js.LICENSE.txt → 9931-abf79a99fb-lite.chunk.js.LICENSE.txt} +0 -0
  250. /package/dist/scripts/{bundle-4a19f84363.min.js.LICENSE.txt → bundle-70e9f8d7f3.min.js.LICENSE.txt} +0 -0
  251. /package/dist/scripts/{polyfills-7bd16772e3.min.js.LICENSE.txt → polyfills-7cab3b27a6.min.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
1
- /*! For license information please see 3841-5f7adfd01c-lite.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3841],{73758:(e,t,n)=>{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 i(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,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:String(t)}n.d(t,{n:()=>a});var a=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}}var t,n;return t=e,n=[{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)}))}}}],n&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}())},26733:(e,t,n)=>{n.d(t,{s:()=>O,R:()=>P});var r=n(32735),i=n(39202),o=n(97395),a=n(49985),s=n(65858),c=n(36848),u=n(75163),l=n(76177),f=n(71063),p=n(54610),h=n(4594),d=n(1164),y=n(79967),v=n(67453);const b={imageStyle:"I9E5O",item:"tqUFn",background:"s1dNr",thumbnailContainer:"EDiGi",teacherPack:"_tdVE",text:"g5NWS",hoverState:"xRYhX",atomGuide:"X39wU",studentActivity:"X9pMl",additionalMaterials:"qRVUo",userUploaded:"_18JaV",imageTypeResource:"KYtZL"};var g={width:200,resizeType:p.Nq.Cover};function m(e,t){var n,r,i;if("thumbnail"in t&&(null===(n=t.thumbnail)||void 0===n?void 0:n.url))return v.j.createUrl(null===(r=t.thumbnail)||void 0===r?void 0:r.url,Object.assign({},g));var a=o._.safeUrlConcat(e,"/v1/previews");return"metadata"in t?t.metadata.type===d.L.Pdf?v.j.createResourceImage(a,t.url,g):t.metadata.type===d.L.Image?v.j.createUrl(t.url,{size:p.h2.Medium,resizeType:p.Nq.Cover}):(null===(i=t.pdf)||void 0===i?void 0:i.url)?v.j.createResourceImage(a,t.pdf.url,g):(t.metadata.type,d.L.Zip,"/images/zip-resource.png"):v.j.createResourceImage(a,t.url,Object.assign({},g))}function w(e){var t;return"metadata"in e?e.metadata.type===d.L.Pdf?p.__.Pdf:e.metadata.type===d.L.Image?p.__.Thumbnails:(null===(t=e.pdf)||void 0===t?void 0:t.url)?p.__.Pdf:(e.metadata.type,d.L.Zip,p.__.Thumbnails):p.__.Link}function O(e){var t,n,i,o,a,c,f,p=null,h=0;"metadata"in e.data&&(p=e.data.metadata,h=null!==(i=null===(n=null===(t=e.data.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==i?i:0);var y="".concat(null!==(a=null===(o=e.theme)||void 0===o?void 0:o.containerClass)&&void 0!==a?a:""," pt-3 px-3 rounded-3 d-flex flex-column align-items-center")+" justify-content-end ".concat(function(e){switch(e){case"atom-guide":return b.atomGuide;case"student-activity":return b.studentActivity;case"teacher-pack":return b.teacherPack;case"additional-materials":return b.additionalMaterials;default:return b.userUploaded}}(null==p?void 0:p.resourceType)," ").concat(b.background," ").concat(e.applyHoverState?b.hoverState:""," ");return r.createElement("div",{className:y},!e.hideHeading&&r.createElement(l.u,{title:e.data.name},r.createElement("h3",{className:"text-center text-break h5 mb-3 ".concat(b.text)},r.createElement("span",{className:"clamp-1"},e.data.name))),r.createElement("div",{className:"".concat(null!==(f=null===(c=e.theme)||void 0===c?void 0:c.thumbnailContainerClass)&&void 0!==f?f:""," w-75 overflow-hidden ").concat(b.thumbnailContainer," ").concat(b.imageStyle)},r.createElement(u.Z,{data:m(e.imageCdnUrl,e.data),imageType:w(e.data),imageStyle:{transform:"rotate(".concat(h,"deg)")},alt:e.data.name,analyticsOptions:{location:s.LZ.SlidingListItem},errorFallbackImageSrc:e.imageErrorFallbackUrl,imageClassName:(null==p?void 0:p.type)===d.L.Image?"".concat(b.imageTypeResource," ").concat(b.imageStyle):"",preload:e.preloadImage,preventLoad:!e.preloadImage})))}O.defaultProps={preloadImage:!0,actionBehaviour:"normal"};var P=r.memo((function(e){var t,n,o,u,l=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,[]),p=(t=e.data,n=e.actionBehaviour,u=(0,y.k)(),"public"===n||!u.xs&&!u.sm&&"resource"===t.type&&"metadata"in t&&(t.metadata.type===d.L.Image||(t.metadata.type===d.L.Pdf?!!t.url:!!(null===(o=t.pdf)||void 0===o?void 0:o.url)))),v=Object.assign(Object.assign({},e.analyticsData),e.data),g=Object.assign(Object.assign({},e.analyticsOptions),{actionType:s.Vw.Click,entity:e.data.typeId===h.E.Resource?s.py.Resource:s.py.Link});function m(){a.k.logUserAction(v,g)}var w,P=!!e.data.url;return l.applyHoverState=p||P,r.createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat(b.item," ").concat(f.M.RESOURCE_ITEM_SELECTOR)},(w="d-block no-decoration","link"===e.data.type?r.createElement("a",{href:e.data.url,target:"_blank",className:w,onClick:m},r.createElement(O,Object.assign({},l))):p?"public"===e.actionBehaviour?r.createElement("div",{className:"".concat(w," cursor-pointer d-inline"),onClick:function(){m(),i.C$.trigger(e.getAppLink(e.data))}},r.createElement(O,Object.assign({},l))):r.createElement(c.F,{appLink:e.getAppLink(e.data),className:w,analyticsData:v,analyticsOptions:g},r.createElement(O,Object.assign({},l))):P?r.createElement("a",{href:e.data.url,className:w,onClick:m},r.createElement(O,Object.assign({},l))):r.createElement("div",{className:w},r.createElement(O,Object.assign({},l)))))}))},82452:(e,t,n)=>{n.r(t),n.d(t,{ClickViewPlayer:()=>ji});var r=n(32735),i=n(36527),o=(n(16852),n(93861));function a(e){return a="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},a(e)}function s(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 c(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:String(t)}function u(e,t,n){return t=p(t),function(e,t){if(t&&("object"===a(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,l()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.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}},f.apply(this,arguments)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var d=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=u(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}var 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&&h(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(){f(p(t.prototype),"handleClick",this).call(this,null)}}])&&s(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("Button"));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 v(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,b(r.key),r)}}function b(e){var t=function(e,t){if("object"!=y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:String(t)}function g(e,t,n){return t=w(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,m()?Reflect.construct(t,n||[],w(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 w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}d.prototype.controlText_="Create Clip",o.Z.registerComponent("CreateClipButton",d);var P=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=g(this,t,[e,n])).options=n,e.ready((function(){return r.onReady()})),r}var 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&&O(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)}}])&&v(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getPlugin("plugin"));function S(e){return S="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},S(e)}function k(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,j(r.key),r)}}function j(e){var t=function(e,t){if("object"!=S(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:String(t)}function C(e,t,n){return t=E(t),function(e,t){if(t&&("object"===S(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,T()?Reflect.construct(t,n||[],E(e).constructor):t.apply(e,n))}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(T=function(){return!!e})()}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}o.Z.registerPlugin("createClipButtonPlugin",P);var I=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),C(this,t,arguments)}var 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&&_(e,t)}(t,e),n=t,(r=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&k(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("PictureInPictureToggle"));function x(e){return x="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},x(e)}function R(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,t){if("object"!=x(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==x(t)?t:String(t)}function L(e,t,n){return t=B(t),function(e,t){if(t&&("object"===x(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,D()?Reflect.construct(t,n||[],B(e).constructor):t.apply(e,n))}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D=function(){return!!e})()}function N(){return N="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.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}},N.apply(this,arguments)}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}o.Z.registerComponent("PictureInPictureToggle",I);var A=o.Z.getComponent("PlayToggle"),F=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=L(this,t,[e,n])).pictureInPictureEnabled=!1,r.options=n,r.bindFunctions(),r}var 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&&V(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:"enablePictureInPicture",value:function(){var e=this;if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var t=this.getToggleParentComponent();if(t){this.pictureInPictureEnabled=!0;var 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),t.addChild("pictureInPictureToggle",{},n);var r=t.getChild("pictureInPictureToggle");null==r||r.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:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var e=this.getToggleParentComponent(),t=null==e?void 0:e.getChild("pictureInPictureToggle");t&&e.removeChild(t),this.player.off("playerresize",this.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(){if(!this.player.isInPictureInPicture()){var e=this.player.el().getBoundingClientRect();0!==e.width&&(e.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new A(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.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),"function"==typeof(null===(e=this.options)||void 0===e?void 0:e.onRequestPictureInPicture)&&this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,N(B(t.prototype),"dispose",this).call(this)}}])&&R(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("pictureInPicture",F);var U=n(23035),Z=n(42892),z=n(73758);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 q(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,Y(r.key),r)}}function Y(e){var t=function(e,t){if("object"!=G(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==G(t)?t:String(t)}function H(e,t,n){return t=X(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 $(e)}(e,W()?Reflect.construct(t,n||[],X(e).constructor):t.apply(e,n))}function W(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(W=function(){return!!e})()}function $(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(){return Q="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=X(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}},Q.apply(this,arguments)}function X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}var K=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=H(this,t,[e,n])).hasBuffered=!1,r.hasPlayed=!1,r.eventsService=z.n,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}var 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&&J(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(Q(X(t.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,n,r){return Q(X(t.prototype),"createEl",this).call(this,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=o.Z.dom.findPosition(n),i=this.getPointOfInterestTime()/this.player().duration();null===(t=this.getMouseTimeDisplay())||void 0===t||t.update(r,i)}}},{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")}}])&&q(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("Component"));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 te(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,ne(r.key),r)}}function ne(e){var t=function(e,t){if("object"!=ee(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ee(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ee(t)?t:String(t)}function re(e,t,n){return t=ae(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,ie()?Reflect.construct(t,n||[],ae(e).constructor):t.apply(e,n))}function ie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ie=function(){return!!e})()}function oe(){return oe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.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(this,arguments)}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function se(e,t){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},se(e,t)}var ce=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=re(this,t,[e,n])).pointsOfInterestVisible=n.pointsOfInterestVisible,r.toggle(r.pointsOfInterestVisible),r}var 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&&se(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(){o.Z.dom.addClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){o.Z.dom.removeClass(this.toggleEl,"on"),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=o.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var i=oe(ae(t.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},r);return i.children[1].appendChild(this.toggleEl),i}}])&&te(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("MenuItem"));function ue(e){return ue="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},ue(e)}function le(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,fe(r.key),r)}}function fe(e){var t=function(e,t){if("object"!=ue(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ue(t)?t:String(t)}function pe(e,t,n){return t=de(t),function(e,t){if(t&&("object"===ue(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ye(e)}(e,he()?Reflect.construct(t,n||[],de(e).constructor):t.apply(e,n))}function he(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(he=function(){return!!e})()}function de(e){return de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},de(e)}function ye(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ve(e,t){return ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ve(e,t)}o.Z.registerComponent("PointsOfInterestMenuItem",ce);var be=o.Z.getPlugin("plugin"),ge="cvplayer-points-of-interest",me=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=pe(this,t,[e])).pointOfInterestIndicators=[],r.enabled=!0,r.pointsOfInterest=null==n?void 0:n.pointsOfInterest,r.initialize=r.initialize.bind(ye(r)),r.updateBuffered=r.updateBuffered.bind(ye(r)),r.updatePlaybackProgress=r.updatePlaybackProgress.bind(ye(r)),r.player.one("loadedmetadata",(function(){return r.player.ready(r.initialize)})),r}var 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&&ve(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.pointsOfInterest&&(Z.S.hasLocalStorage()&&"false"===Z.S.get(ge)&&(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){Z.S.set(ge,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 K(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:ce,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered((0,U.b)(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])&&le(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(be);function we(e){return we="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},we(e)}function Oe(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,Pe(r.key),r)}}function Pe(e){var t=function(e,t){if("object"!=we(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=we(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==we(t)?t:String(t)}function Se(e,t,n){return t=Ce(t),function(e,t){if(t&&("object"===we(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,ke()?Reflect.construct(t,n||[],Ce(e).constructor):t.apply(e,n))}function ke(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ke=function(){return!!e})()}function je(){return je="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ce(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(this,arguments)}function Ce(e){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ce(e)}function Te(e,t){return Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Te(e,t)}o.Z.registerPlugin("pointsOfInterestPlugin",me),n(93262);var Ee=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=Se(this,t,[e,n])).initialize(),r}var 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&&Te(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.setPosition()}},{key:"buildCSSClass",value:function(){return"cv-range-indicator ".concat(je(Ce(t.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,n,r){return je(Ce(t.prototype),"createEl",this).call(this,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+"%"}}])&&Oe(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("Component"));function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function Ie(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,xe(r.key),r)}}function xe(e){var t=function(e,t){if("object"!=_e(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=_e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_e(t)?t:String(t)}function Re(e,t,n){return t=De(t),function(e,t){if(t&&("object"===_e(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,Me()?Reflect.construct(t,n||[],De(e).constructor):t.apply(e,n))}function Me(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Me=function(){return!!e})()}function Le(){return Le="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.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}},Le.apply(this,arguments)}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}function Ne(e,t){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ne(e,t)}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),Re(this,t,[e,n])}var 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&&Ne(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view-button ".concat(Le(De(t.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,n,r){return Le(De(t.prototype),"createEl",this).call(this,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()}}])&&Ie(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("ClickableComponent"));function Ve(e){return Ve="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},Ve(e)}function Ae(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,Fe(r.key),r)}}function Fe(e){var t=function(e,t){if("object"!=Ve(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ve(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ve(t)?t:String(t)}function Ue(e,t,n){return t=Ge(t),function(e,t){if(t&&("object"===Ve(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,Ze()?Reflect.construct(t,n||[],Ge(e).constructor):t.apply(e,n))}function Ze(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ze=function(){return!!e})()}function ze(){return ze="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ge(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}},ze.apply(this,arguments)}function Ge(e){return Ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ge(e)}function qe(e,t){return qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qe(e,t)}var Ye=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),Ue(this,t,[e,n])}var 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&&qe(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view ".concat(ze(Ge(t.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,n,r){var i=ze(Ge(t.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r),a=o.Z.dom.createEl("h5",{innerHTML:this.localize("This clip has finished"),className:"cv-replay-heading"}),s=o.Z.dom.createEl("div",{className:"cv-button-container"}),c=new Be(this.player_,{label:this.localize("Replay clip"),iconClassName:"cv-replay-icon",onPress:this.options_.onReplayPress}),u=new Be(this.player_,{label:this.localize("Continue watching"),iconClassName:"cv-continue-icon",onPress:this.options_.onContinuePress});return i.appendChild(a),i.appendChild(s),s.appendChild(c.el()),s.appendChild(u.el()),i}}])&&Ae(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("Component"));function He(e){return He="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},He(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,$e(r.key),r)}}function $e(e){var t=function(e,t){if("object"!=He(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=He(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==He(t)?t:String(t)}function Qe(e,t,n){return t=Ke(t),function(e,t){if(t&&("object"===He(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,Xe()?Reflect.construct(t,n||[],Ke(e).constructor):t.apply(e,n))}function Xe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Xe=function(){return!!e})()}function Je(){return Je="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ke(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(this,arguments)}function Ke(e){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ke(e)}function et(e,t){return et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},et(e,t)}var tt=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=Qe(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}var 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&&et(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 Ee(this.player,{time:this.startTime}),null==t||t.addChild(this.startTimeIndicator)),this.endTimeIndicator||(this.endTimeIndicator=new Ee(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 Ye(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;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(),Je(Ke(t.prototype),"dispose",this).call(this)}}])&&We(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("rangeIndicatorPlugin",tt);var nt=function(){var e,t;return null!==(t=null===(e=window.crypto)||void 0===e?void 0:e.randomUUID())&&void 0!==t?t:Math.random().toString()};function rt(e){return rt="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},rt(e)}function it(){it=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(x([])));P&&P!==n&&r.call(P,a)&&(w=P);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==rt(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=p;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=T(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var u=f(t,n,r);if("normal"===u.type){if(i=r.done?y:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(rt(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function ot(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}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,st(r.key),r)}}function st(e){var t=function(e,t){if("object"!=rt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=rt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rt(t)?t:String(t)}function ct(e,t,n){return t=ft(t),function(e,t){if(t&&("object"===rt(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,ut()?Reflect.construct(t,n||[],ft(e).constructor):t.apply(e,n))}function ut(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ut=function(){return!!e})()}function lt(){return lt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ft(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}},lt.apply(this,arguments)}function ft(e){return ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ft(e)}function pt(e,t){return pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pt(e,t)}var ht=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),ct(this,t,[e,n])}var 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&&pt(e,t)}(t,e),n=t,(r=[{key:"getPlayerOptions",value:function(){var e,n,r=lt(ft(t.prototype),"getPlayerOptions",this).call(this);return(null===(e=r.devicesConfig)||void 0===e?void 0:e.canUserCastToDevices)?Object.assign(Object.assign({},r),{techOrder:["devices"].concat((n=r.techOrder,function(e){if(Array.isArray(e))return ot(e)}(n)||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 ot(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ot(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.")}())),devices:{instanceId:nt()}}):r}},{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})}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:"enablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"additionalSetup",value:function(e){var n,r,i,o,a,s=this,c=Object.create(null,{additionalSetup:{get:function(){return lt(ft(t.prototype),"additionalSetup",s)}}});return r=this,i=void 0,o=void 0,a=it().mark((function t(){var r;return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c.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.next=7;break}if(null!==(r=e.additionalData)){t.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:r.startTime,endTime:r.endTime});case 7:if(!(null===(n=this.options.devicesConfig)||void 0===n?void 0:n.canUserCastToDevices)){t.next=11;break}if(this.player.devicesPlugin){t.next=10;break}return t.abrupt("return");case 10:this.player.devicesPlugin(Object.assign(Object.assign({},this.options.devicesConfig),{userId:parseInt(e.viewerId),title:e.title,analyticsService:this.analyticsService}));case 11:"MasterVideo"===e.mediaType&&this.options.startTime&&this.options.endTime&&this.player.rangeIndicatorPlugin({startTime:this.options.startTime,endTime:this.options.endTime});case 12:case"end":return t.stop()}}),t,this)})),new(o||(o=Promise))((function(e,t){function n(e){try{c(a.next(e))}catch(e){t(e)}}function s(e){try{c(a.throw(e))}catch(e){t(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(n,s)}c((a=a.apply(r,i||[])).next())}))}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}}])&&at(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(i.r),dt=n(63816),yt=n(65858),vt=n(86086),bt=n(12399),gt=n(6156),mt=n(11707);function wt(e){return wt="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},wt(e)}function Ot(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,Pt(r.key),r)}}function Pt(e){var t=function(e,t){if("object"!=wt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=wt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wt(t)?t:String(t)}var St={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},kt=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:St;!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({},St),r),this.webSocket=this.connect(),this.heartbeat=(new mt.b).schedule((function(){return n.send(n.options.heartbeatMessage)})).every(this.options.heartbeatIntervalInMillseconds)}var t,n;return t=e,(n=[{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()}}])&&Ot(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),jt=n(95569),Ct=n(35884);function Tt(e){return Tt="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},Tt(e)}function Et(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,_t(r.key),r)}}function _t(e){var t=function(e,t){if("object"!=Tt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Tt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Tt(t)?t:String(t)}var It,xt=function(){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=Ct.l.withDebouncedSetters(this,2e3),Ct.l.withTimestampedSetters(this)}var t,n;return t=e,(n=[{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}}])&&Et(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Rt(e){return Rt="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},Rt(e)}function Mt(){Mt=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(x([])));P&&P!==n&&r.call(P,a)&&(w=P);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Rt(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=p;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=T(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var u=f(t,n,r);if("normal"===u.type){if(i=r.done?y:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Rt(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Lt(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,Dt(r.key),r)}}function Dt(e){var t=function(e,t){if("object"!=Rt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Rt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Rt(t)?t:String(t)}function Nt(e,t,n){return t=At(t),function(e,t){if(t&&("object"===Rt(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,Bt()?Reflect.construct(t,n||[],At(e).constructor):t.apply(e,n))}function Bt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Bt=function(){return!!e})()}function Vt(){return Vt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=At(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}},Vt.apply(this,arguments)}function At(e){return At=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},At(e)}function Ft(e,t){return Ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ft(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"}(It||(It={}));var Ut=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Zt=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=Nt(this,t)).client=e,r.localState=new xt(n.title,n.device),r.bindFunctions(),r.initialize(),r}var 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&&Ft(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(){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)})),Vt(At(t.prototype),"dispose",this).call(this)}},{key:"handleClientConnected",value:function(){return Ut(this,void 0,void 0,Mt().mark((function e(){return Mt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.client.joinRoom(this.getDevice().id);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),this.trigger("error",e.t0);case 8:case"end":return e.stop()}}),e,this,[[0,5]])})))}},{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 It.Update:this.handleUpdateMessage(t,n);break;case It.NewChapter:this.handleNewChapterMessage(t,n);break;case It.Volume:this.handleVolumeMessage(t,n);break;case It.Playing:this.handlePlayingMessage(t);break;case It.Paused:this.handlePausedMessage(t);break;case It.Finished:this.handleFinishedMessage(t);break;case It.Stopped:this.handleStoppedMessage()}}},{key:"handleUpdateMessage",value:function(e,t){e.duration!==t.duration&&(e.duration=t.duration,this.trigger("durationchange",gt.j.void)),e.position!==t.position&&(e.position=t.position,this.trigger("positionchange",gt.j.void)),e.subtitles!==t.subtitles&&(e.subtitles=t.subtitles,this.trigger("subtitleschange",gt.j.void))}},{key:"handleVolumeMessage",value:function(e,t){e.volume!==t.level&&(e.volume=t.level,e.mute=0===t.level,this.trigger("volumechange",gt.j.void))}},{key:"handlePlayingMessage",value:function(e){!0!==e.playing&&(e.playing=!0,e.playbackFinished=!1,this.trigger("playingchange",gt.j.void))}},{key:"handlePausedMessage",value:function(e){!1!==e.playing&&(e.playing=!1,this.trigger("playingchange",gt.j.void))}},{key:"handleFinishedMessage",value:function(e){!0!==e.playbackFinished&&(e.playing=!1,e.playbackFinished=!0,this.trigger("playingchange",gt.j.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",gt.j.void))}},{key:"handleStoppedMessage",value:function(){this.dispose()}},{key:"loadSource",value:function(e,t){return Ut(this,void 0,void 0,Mt().mark((function n(){var r,i;return Mt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.localState.videoSource!==e||this.localState.subtitleSource!==t){n.next=2;break}return n.abrupt("return");case 2:return n.prev=2,r=this.getDevice().id,i=this.getPosition(),this.localState.videoSource=e,this.localState.subtitleSource=t,this.localState.ready=!1,n.next=10,this.client.joinRoom(r);case 10:return n.next=12,this.client.loadQueue({title:this.getTitle(),roomId:r,videoSource:e,subtitleSource:t});case 12:this.localState.ready=!0,this.trigger("sourceloaded",gt.j.void),i>0&&this.seek(i),t&&this.setSubtitles(t),n.next=22;break;case 18:n.prev=18,n.t0=n.catch(2),console.error(n.t0),this.trigger("error",new Error("Could not load video on Vivi device"));case 22:case"end":return n.stop()}}),n,this,[[2,18]])})))}},{key:"play",value:function(){this.localState.ready&&!0!==this.localState.playing&&(this.localState.playing=!0,this.client.play(this.getDevice().id),this.trigger("playingchange",gt.j.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",gt.j.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",gt.j.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",gt.j.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",gt.j.void))}},{key:"setSubtitles",value:function(e){return Ut(this,void 0,void 0,Mt().mark((function t(){var n;return Mt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.localState.ready){t.next=2;break}return t.abrupt("return");case 2:if(!e){t.next=5;break}return t.next=5,this.loadSource(this.localState.videoSource,e);case 5:n=!!e,this.localState.subtitles!==n&&(this.localState.subtitles=n,this.client.setSubtitles(this.getDevice().id,n),this.trigger("subtitleschange",gt.j.void));case 7:case"end":return t.stop()}}),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}}])&&Lt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(gt.N);function zt(e){return zt="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},zt(e)}function Gt(){Gt=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(x([])));P&&P!==n&&r.call(P,a)&&(w=P);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==zt(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=p;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=T(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var u=f(t,n,r);if("normal"===u.type){if(i=r.done?y:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(zt(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function qt(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,t){if("object"!=zt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=zt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zt(t)?t:String(t)}function Ht(e,t,n){return t=Qt(t),function(e,t){if(t&&("object"===zt(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,Wt()?Reflect.construct(t,n||[],Qt(e).constructor):t.apply(e,n))}function Wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wt=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(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Qt(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(this,arguments)}function Qt(e){return Qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qt(e)}function Xt(e,t){return Xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xt(e,t)}var Jt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Kt=1e4,en=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=Ht(this,t)).options=e,n.accessToken="",n.devices=[],n.devicesFingerprint="",n.deviceDiscovery=new mt.b,n.bindFunctions(),n.initialize(),n}var n,r,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&&Xt(e,t)}(t,e),n=t,i=[{key:"createAckId",value:function(){return nt()}},{key:"calculateFingerprint",value:function(e){return e.map((function(e){return e.id})).sort().join(",")}}],(r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.sendMessage=this.sendMessage.bind(this),this.sendMessageDebounced=(0,jt.Ds)(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 kt(this.options.url),this.webSocket.onMessage=function(t){return e.trigger("message",JSON.parse(t.data))},this.webSocket.onOpen=function(){return Jt(e,void 0,void 0,Gt().mark((function e(){return Gt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.options.fetchAccessToken();case 3:return this.accessToken=e.sent,e.next=6,this.authenticateWithVivi();case 6:this.beginDeviceDiscovery(),this.trigger("connected",gt.j.void),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),console.error(e.t0),this.trigger("error",new Error("Could not connect to Vivi"));case 14:case"end":return e.stop()}}),e,this,[[0,10]])})))}}},{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 Jt(e,void 0,void 0,Gt().mark((function e(){var n,r;return Gt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getRoomList();case 3:if(n=e.sent,(r=t.calculateFingerprint(n))!==this.devicesFingerprint){e.next=7;break}return e.abrupt("return");case 7:this.devices=n.map((function(e){return{id:e.id,name:e.name,type:bt.Y.Vivi,status:bt.L.Available}})),this.devicesFingerprint=r,this.trigger("deviceschange",gt.j.void),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.warn(e.t0);case 15:case"end":return e.stop()}}),e,this,[[0,12]])})))})).trigger().start()}},{key:"dispose",value:function(){var e;this.deviceDiscovery.stop(),null===(e=this.webSocket)||void 0===e||e.dipose(),$t(Qt(t.prototype),"dispose",this).call(this)}},{key:"canCastToDevice",value:function(e){return e===bt.Y.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new Zt(this,e)}},{key:"authenticateWithVivi",value:function(){return Jt(this,void 0,void 0,Gt().mark((function e(){return Gt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:"relay",message:{token:this.accessToken,type:"identify_video_api"}}),e.next=3,this.one("message",(function(e){return"video_api_identified"===e.message.type})).timeout(Kt).catch((function(){throw new Error("Failed to authenticate with Vivi")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getRoomList",value:function(){return Jt(this,void 0,void 0,Gt().mark((function e(){var t;return Gt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:"relay",message:{type:"video_api_rooms"}}),e.next=3,this.one("message",(function(e){return"video_api_rooms"===e.message.type})).timeout(Kt).catch((function(){throw new Error("Failed to fetch rooms")}));case 3:return t=e.sent,e.abrupt("return",t.message.rooms||[]);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"joinRoom",value:function(e){return Jt(this,void 0,void 0,Gt().mark((function t(){return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:"relay",message:{destination_type:"box",new_destination:e,token:this.accessToken,type:"connect"}}),t.next=3,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(Kt).catch((function(){throw new Error("Failed to join room")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"query",value:function(e){return Jt(this,void 0,void 0,Gt().mark((function n(){var r;return Gt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:r,name:"query"}}),n.next=4,this.one("message",(function(e){return e.message.ack_id===r})).timeout(Kt).catch((function(){throw new Error("Failed to fetch query")}));case 4:return n.abrupt("return",n.sent);case 5:case"end":return n.stop()}}),n,this)})))}},{key:"loadQueue",value:function(e){var n=e.roomId,r=e.title,i=e.videoSource,o=e.subtitleSource;return Jt(this,void 0,void 0,Gt().mark((function e(){return Gt().wrap((function(e){for(;;)switch(e.prev=e.next){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.next=3,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(Kt).catch((function(){throw new Error("Failed to load media")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"play",value:function(e){return Jt(this,void 0,void 0,Gt().mark((function t(){return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_play",payload:{}}}),t.next=3,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(Kt).catch((function(){throw new Error("Failed to play video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"pause",value:function(e){return Jt(this,void 0,void 0,Gt().mark((function t(){return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_pause"}}),t.next=3,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(Kt).catch((function(){throw new Error("Failed to pause video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"stop",value:function(e){return Jt(this,void 0,void 0,Gt().mark((function t(){return Gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_stop"}}),t.next=3,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(Kt).catch((function(){throw new Error("Failed to stop video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"seek",value:function(e,t){return Jt(this,void 0,void 0,Gt().mark((function n(){return Gt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"video_seek",payload:{position:t}}})){n.next=4;break}return n.next=4,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(Kt).catch((function(){throw new Error("Failed to seek video")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setVolume",value:function(e,t){return Jt(this,void 0,void 0,Gt().mark((function n(){return Gt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"set_volume",payload:{volume:t}}})){n.next=4;break}return n.next=4,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(Kt).catch((function(){throw new Error("Failed to set volume")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setMuted",value:function(e,t){return Jt(this,void 0,void 0,Gt().mark((function n(){return Gt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"set_mute",payload:{mute:t}}}),n.next=3,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(Kt).catch((function(){throw new Error("Failed to set mute")}));case 3:case"end":return n.stop()}}),n,this)})))}},{key:"setSubtitles",value:function(e,n){return Jt(this,void 0,void 0,Gt().mark((function r(){var i;return Gt().wrap((function(r){for(;;)switch(r.prev=r.next){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.next=4,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(Kt).catch((function(){throw new Error("Failed to set subtitles")}));case 4:case"end":return r.stop()}}),r,this)})))}}])&&qt(n.prototype,r),i&&qt(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(gt.N);function tn(e){return tn="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},tn(e)}function nn(e){return function(e){if(Array.isArray(e))return rn(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 rn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rn(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 rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function on(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,an(r.key),r)}}function an(e){var t=function(e,t){if("object"!=tn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=tn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tn(t)?t:String(t)}function sn(e,t,n){return t=ln(t),function(e,t){if(t&&("object"===tn(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,cn()?Reflect.construct(t,n||[],ln(e).constructor):t.apply(e,n))}function cn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cn=function(){return!!e})()}function un(){return un="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ln(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}},un.apply(this,arguments)}function ln(e){return ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ln(e)}function fn(e,t){return fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fn(e,t)}var pn=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=sn(this,t)).instanceId=e,n.clients=[],n.bindFunctions(),n}var n,r,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&&fn(e,t)}(t,e),n=t,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=[{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(nn(e),nn(t))}),[]);this.trigger("deviceschange",e)}},{key:"dispose",value:function(){var e;null===(e=this.castSession)||void 0===e||e.dispose(),this.clients.forEach((function(e){return e.dispose()})),this.castSession=void 0,this.clients=[],un(ln(t.prototype),"dispose",this).call(this)}}])&&on(n.prototype,r),i&&on(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(gt.N);pn.instances={};var hn=n(30050),dn=n(98115);function yn(e){return yn="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},yn(e)}function vn(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,t){if("object"!=yn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=yn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yn(t)?t:String(t)}function gn(e,t,n){return t=Pn(t),function(e,t){if(t&&("object"===yn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return wn(e)}(e,mn()?Reflect.construct(t,n||[],Pn(e).constructor):t.apply(e,n))}function mn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(mn=function(){return!!e})()}function wn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function On(){return On="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Pn(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}},On.apply(this,arguments)}function Pn(e){return Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pn(e)}function Sn(e,t){return Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sn(e,t)}var kn=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=gn(this,t,[e,n])).isVisible=r.isVisible.bind(wn(r)),r}var 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&&Sn(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return On(Pn(t.prototype),"createEl",this).call(this,"li",{className:"vjs-menu-item cv-device-menu-item",innerHTML:'\n <span class="cv-device-icon '.concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[this.options_.type],'"></span>\n <span class="vjs-menu-item-text">').concat(this.options_.label,"</span>\n ")})}},{key:"handleClick",value:function(){this.options_.onClick()}},{key:"show",value:function(){On(Pn(t.prototype),"show",this).call(this)}},{key:"hide",value:function(){On(Pn(t.prototype),"hide",this).call(this)}},{key:"isVisible",value:function(){return!On(Pn(t.prototype),"hasClass",this).call(this,"vjs-hidden")}}])&&vn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("MenuItem")),jn=n(86777);function Cn(e){return Cn="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},Cn(e)}function Tn(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,En(r.key),r)}}function En(e){var t=function(e,t){if("object"!=Cn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Cn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cn(t)?t:String(t)}function _n(e,t,n){return t=xn(t),function(e,t){if(t&&("object"===Cn(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,In()?Reflect.construct(t,n||[],xn(e).constructor):t.apply(e,n))}function In(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(In=function(){return!!e})()}function xn(e){return xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xn(e)}function Rn(e,t){return Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rn(e,t)}var Mn=o.Z.getComponent("Menu"),Ln=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),_n(this,t,arguments)}var 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&&Rn(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e=Mn.originalProto.createEl.apply(this),t=this.contentEl_;return this.contentWrapper=o.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 jn.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"))}}])&&Tn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(Mn);o.Z.registerComponent("DevicesMenu",Ln);var Dn=n(14735);function Nn(e){var t=e.inactiveIntegrations,n=e.canUserManageIntegrations,i=e.player,o=e.onDismiss,a=e.onInstall,s=e.onLearnMore,c=e.onContactSupport;if(0===t.length)return r.createElement(r.Fragment,null);var u,l=function(e){return i.localize(e)},f=function(e){return-1!==t.indexOf(e)};return u=f(bt.Y.AppleTv)&&f(bt.Y.Vivi)?"vivi_and_apple_tv":f(bt.Y.Vivi)?"vivi":"apple_tv",r.createElement("div",{className:"cv-devices-cta",tabIndex:-1},r.createElement(Bn,{context:u,localize:l,onDismiss:function(){return o(u)}}),r.createElement(Vn,{context:u}),r.createElement(An,{context:u,canUserManageIntegrations:n,localize:l,onContactSupport:function(){return c(u)},onInstall:function(){return a(u)},onLearnMore:function(){return s(u)}}))}function Bn(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 Vn(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 An(e){var t=e.context,n=e.canUserManageIntegrations,i=e.localize,o=e.onInstall,a=e.onLearnMore,s=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:s},"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 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 Un(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,t){if("object"!=Fn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Fn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fn(t)?t:String(t)}function zn(e,t,n){return t=Yn(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,Gn()?Reflect.construct(t,n||[],Yn(e).constructor):t.apply(e,n))}function Gn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Gn=function(){return!!e})()}function qn(){return qn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Yn(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}},qn.apply(this,arguments)}function Yn(e){return Yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yn(e)}function Hn(e,t){return Hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hn(e,t)}o.Z.registerComponent("DevicesCta",(0,Dn.Z)((function(e,t){return r.createElement(Nn,Object.assign({player:e},t))}),{properties:{className:"cv-devices-cta-wrapper"}}));var Wn=o.Z.getComponent("DevicesCta"),$n=o.Z.getComponent("MenuButton"),Qn=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=zn(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}var 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&&Hn(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=$n.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(qn(Yn(t.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var e=this,t=new Ln(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 Wn(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 hn.Z(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new dn.Z(this.player_,{menuButton:this,search:function(t){return e.setSearchText(t)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new dn.C(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;qn(Yn(t.prototype),"pressButton",this).call(this),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 kn}))}},{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){return"".concat(e.type,"-").concat(e.name).localeCompare("".concat(t.type,"-").concat(t.name))})).forEach((function(e){var n=new kn(t.player(),{id:e.id,label:e.name,selected:!1,multiSelectable:!1,selectable:!0,available:e.status===bt.L.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=e.devices.find((function(e){return e.id===t.options_.id}));if(o){var a=o.status===bt.L.Available,s=!n||-1!==o.name.toLowerCase().indexOf(r),c=o.id===(null===(i=e.castSession)||void 0===i?void 0:i.getDevice().id);a?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(){qn(Yn(t.prototype),"handleClick",this).call(this,null),this.options_.onClick()}}],r&&Un(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}($n);Qn.prototype.controlText_="Devices",o.Z.registerComponent("DevicesButton",Qn);var Xn=n(10463);function Jn(e){return Jn="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},Jn(e)}function Kn(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,er(r.key),r)}}function er(e){var t=function(e,t){if("object"!=Jn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Jn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jn(t)?t:String(t)}function tr(e,t,n){return t=ir(t),function(e,t){if(t&&("object"===Jn(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,nr()?Reflect.construct(t,n||[],ir(e).constructor):t.apply(e,n))}function nr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(nr=function(){return!!e})()}function rr(){return rr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ir(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}},rr.apply(this,arguments)}function ir(e){return ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ir(e)}function or(e,t){return or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},or(e,t)}var ar=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),tr(this,t,[null,e])}var 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&&or(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return rr(ir(t.prototype),"createEl",this).call(this,"div",{className:"cv-devices-tech"})}},{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:bt.Y.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(){}}])&&Kn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("Component"));function sr(e){return sr="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},sr(e)}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,ur(r.key),r)}}function ur(e){var t=function(e,t){if("object"!=sr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=sr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sr(t)?t:String(t)}function lr(e,t,n){return t=hr(t),function(e,t){if(t&&("object"===sr(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,fr()?Reflect.construct(t,n||[],hr(e).constructor):t.apply(e,n))}function fr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fr=function(){return!!e})()}function pr(){return pr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=hr(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}},pr.apply(this,arguments)}function hr(e){return hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hr(e)}function dr(e,t){return dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dr(e,t)}var yr=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=lr(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,o.Z)(r.options_.playerId),r.bindFunctions(),r.bindEventListeners(),r.ready((function(){r.setSource(r.options_.source)})),r.triggerReady(),r}var n,r,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&&dr(e,t)}(t,e),n=t,i=[{key:"canPlayType",value:function(){return""}},{key:"canPlaySource",value:function(e,t){var n;return!!pn.getOrCreateInstance(null!==(n=null==t?void 0:t.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return pn.isActive()}}],(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 Xn.O.findTrackByPredicate(this.videojsPlayer.player_,(function(e){return"showing"===e.mode&&!!e.src}))}},{key:"setSelectedTextTrack",value:function(e){Xn.O.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(),pr(hr(t.prototype),"cleanupAutoTextTracks",this).call(this),pr(hr(t.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){var e=this;return this.ui=this.ui||new ar({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 pr(hr(t.prototype),"addRemoteTextTrack",this).call(this,e,!0)}},{key:"getCastSession",value:function(){var e;return pn.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 o.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(){}}])&&cr(n.prototype,r),i&&cr(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("Tech"));function vr(e){return vr="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},vr(e)}function br(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,gr(r.key),r)}}function gr(e){var t=function(e,t){if("object"!=vr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=vr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vr(t)?t:String(t)}function mr(e,t,n){return t=Pr(t),function(e,t){if(t&&("object"===vr(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,wr()?Reflect.construct(t,n||[],Pr(e).constructor):t.apply(e,n))}function wr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(wr=function(){return!!e})()}function Or(){return Or="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Pr(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}},Or.apply(this,arguments)}function Pr(e){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pr(e)}function Sr(e,t){return Sr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sr(e,t)}o.Z.registerTech("devices",yr);var kr=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=mr(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}var 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&&Sr(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,s=this.options.vivi,c=[];this.options.appleTv.enabled||c.push(bt.Y.AppleTv),s.enabled&&s.accountConnected||c.push(bt.Y.Vivi);var u={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:yt.Vw.Select,workflowPhase:yt.eu.Complete,descriptor:yt.UX.ChangeDevice,entity:yt.py.Device,eventVersion:yt.eq.V3})},ctaOptions:Object.assign(Object.assign({},a),{inactiveIntegrations:c})};this.devicesButton=t.addChild("DevicesButton",u,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(bt.Y.AppleTv)),this.player.removeClass("cv-device-".concat(bt.Y.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(en)){var t=new en({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(vt.w)){var t=new vt.w({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 pn.getOrCreateInstance(this.instanceId)}},{key:"dispose",value:function(){var e=this.getSessionManager();e&&(e.off("deviceschange",this.onDevicesChanged),e.off("castsessionchange",this.onCastSessionChanged),e.off("error",this.onDevicesError),pn.disposeAndRemoveInstance(e),Or(Pr(t.prototype),"dispose",this).call(this))}}])&&br(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getPlugin("plugin"));function jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cr(e){var t,n,i,o=r.useRef(e.player.duration()-e.player.currentTime()),a=(n=r.useState(o.current),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,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(n,i)||function(e,t){if(e){if("string"==typeof e)return jr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jr(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.")}()),s=a[0],c=a[1];function u(){var t=e.player.duration()-e.player.currentTime();c(t),t>o.current&&(o.current=t)}if(r.useEffect((function(){return e.player.on("timeupdate",u),function(){e.player.off("timeupdate",u)}}),[]),!e.nextVideo||!e.onPlayNext)return r.createElement(r.Fragment,null);var l=Math.ceil(s),f=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," ",f,":"),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 Tr(e){return Tr="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},Tr(e)}function Er(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,_r(r.key),r)}}function _r(e){var t=function(e,t){if("object"!=Tr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Tr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Tr(t)?t:String(t)}function Ir(e,t,n){return t=Mr(t),function(e,t){if(t&&("object"===Tr(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,xr()?Reflect.construct(t,n||[],Mr(e).constructor):t.apply(e,n))}function xr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xr=function(){return!!e})()}function Rr(){return Rr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Mr(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}},Rr.apply(this,arguments)}function Mr(e){return Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mr(e)}function Lr(e,t){return Lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lr(e,t)}o.Z.registerPlugin("devicesPlugin",kr),o.Z.registerComponent("UpNext",(0,Dn.Z)((function(e,t){return r.createElement(Cr,Object.assign({player:e},t))})));var Dr=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=Ir(this,t,[e,n])).playNext=e.nextVideoPlugin().getShouldPlayNext(),r.toggle(r.playNext),r}var 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&&Lr(e,t)}(t,e),n=t,(r=[{key:"handleToggle",value:function(){this.toggle(!this.playNext)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){this.playNext=!0,o.Z.dom.addClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"toggleOff",value:function(){this.playNext=!1,o.Z.dom.removeClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{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=o.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var i=Rr(Mr(t.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Play next video</span>\n <span class="cv-toggle-container"></span>'},r);return i.children[1].appendChild(this.toggleEl),i}}])&&Er(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("MenuItem"));function Nr(e){return Nr="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},Nr(e)}function Br(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,Vr(r.key),r)}}function Vr(e){var t=function(e,t){if("object"!=Nr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Nr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nr(t)?t:String(t)}function Ar(e,t,n){return t=zr(t),function(e,t){if(t&&("object"===Nr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ur(e)}(e,Fr()?Reflect.construct(t,n||[],zr(e).constructor):t.apply(e,n))}function Fr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Fr=function(){return!!e})()}function Ur(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zr(){return Zr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=zr(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}},Zr.apply(this,arguments)}function zr(e){return zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zr(e)}function Gr(e,t){return Gr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gr(e,t)}o.Z.registerComponent("NextVideoMenuItem",Dr);var qr="cv-persisttest",Yr="cv-play-next-video",Hr=o.Z.getPlugin("plugin"),Wr=(o.Z.getComponent("MenuItem"),o.Z.getComponent("NextVideoMenuItem")),$r=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=Ar(this,t,[e])).setShouldPlayNext=n.setShouldPlayNext.bind(Ur(n)),n.getShouldPlayNext=n.getShouldPlayNext.bind(Ur(n)),n.getChapterTrack=n.getChapterTrack.bind(Ur(n)),n.onTimeUpdate=n.onTimeUpdate.bind(Ur(n)),n.hasLocalStorage=n.testHasLocalStorage(),n.shouldPlayNextVideo=!1,n.hasLocalStorage){var r=window.localStorage.getItem(Yr);n.shouldPlayNextVideo="true"===r}return e.ready((function(){n.initialize()})),n}var 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&&Gr(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.player.isDisposed()||this.bindListeners()}},{key:"getChapterTrack",value:function(){return Xn.O.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:Wr,name:"NextVideoMenuItem"})}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.hasLocalStorage&&t&&window.localStorage.setItem(Yr,e.toString())}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.hideUpNext(),Zr(zr(t.prototype),"dispose",this).call(this)}},{key:"onTimeUpdate",value:function(){var e,t;if(!this.player.pictureInPicture||!this.player.isInPictureInPicture())if(this.getShouldPlayNext()){if(this.player.ended())return this.callback(),void this.hideUpNext();if(!(this.player.duration()<=0||this.upNextRendered&&this.player.currentTime()>this.upNextTimepoint)){var n=this.getChapterTrack(),r=(null===(e=null==n?void 0:n.activeCues)||void 0===e?void 0:e.length)&&n.activeCues[0];"credits"===(null===(t=null==r?void 0:r.text)||void 0===t?void 0:t.toLowerCase())||this.player.currentTime()>=this.player.duration()-5?this.showUpNext():this.hideUpNext()}}else this.hideUpNext()}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.upNextTimepoint=this.player.currentTime(),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,this.upNextTimepoint=null;var e=this.player.getChild("UpNext");e&&(this.player.removeChild(e),e.dispose())}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem(qr,"persistPlayNext"),window.localStorage.removeItem(qr),!0}catch(e){return!1}}}])&&Br(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(Hr);o.Z.registerPlugin("nextVideoPlugin",$r);var Qr=n(26733);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 Jr(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,t){if("object"!=Xr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Xr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xr(t)?t:String(t)}function ei(e,t,n){return t=ni(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,ti()?Reflect.construct(t,n||[],ni(e).constructor):t.apply(e,n))}function ti(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ti=function(){return!!e})()}function ni(e){return ni=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ni(e)}function ri(e,t){return ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ri(e,t)}function ii(e){return r.createElement("div",{className:"cv-resource-item"},r.createElement(Qr.s,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var oi=(0,Dn.Z)((function(e,t){return r.createElement(ii,Object.assign({},t))})),ai=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=ei(this,t,[e,n]);var i=new oi(e,{resource:n.resource,imageCdnUrl:n.imageCdnUrl});return r.addChild(i),r}var 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&&ri(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return o.Z.dom.createEl("div")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&Jr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("ClickableComponent"));function si(e){return si="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},si(e)}function ci(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,ui(r.key),r)}}function ui(e){var t=function(e,t){if("object"!=si(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=si(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==si(t)?t:String(t)}function li(e,t,n){return t=hi(t),function(e,t){if(t&&("object"===si(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,fi()?Reflect.construct(t,n||[],hi(e).constructor):t.apply(e,n))}function fi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fi=function(){return!!e})()}function pi(){return pi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=hi(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}},pi.apply(this,arguments)}function hi(e){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hi(e)}function di(e,t){return di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},di(e,t)}var yi=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=li(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}var 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&&di(e,t)}(t,e),n=t,(r=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(pi(hi(t.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(pi(hi(t.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){pi(hi(t.prototype),"update",this).call(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",pi(hi(t.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new ai(e.player(),{resource:n,imageCdnUrl:e.options_.imageCdnUrl,downloadResource:function(t){return e.downloadResource(t)}});t.push(r)})),t}},{key:"downloadResource",value:function(e){this.getDownloadIframe().src=e.url}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=o.Z.dom.createEl("iframe"),this.downloadIframe.style.display="none",o.Z.dom.appendContent(o.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(){pi(hi(t.prototype),"handleClick",this).call(this,null)}}])&&ci(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("MenuButton"));function vi(e){return vi="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},vi(e)}function bi(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,gi(r.key),r)}}function gi(e){var t=function(e,t){if("object"!=vi(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=vi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vi(t)?t:String(t)}function mi(e,t,n){return t=Oi(t),function(e,t){if(t&&("object"===vi(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||[],Oi(e).constructor):t.apply(e,n))}function wi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(wi=function(){return!!e})()}function Oi(e){return Oi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Oi(e)}function Pi(e,t){return Pi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pi(e,t)}yi.prototype.controlText_="Resources",o.Z.registerComponent("ResourcesButton",yi);var Si=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=mi(this,t,[e,n])).options=n,e.ready((function(){return r.onReady()})),r}var 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&&Pi(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-3)}}}])&&bi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("resourcesPlugin",Si);var ki=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 ji(e){var t=e.className,n=void 0===t?"":t,i=e.playerApi,o=e.onReady,a=e.onDispose,s=ki(e,["className","playerApi","onReady","onDispose"]),c=r.useRef();return r.useEffect((function(){if(c){var e=new ht(c.current,Object.assign(Object.assign({},s),{playerApi:i}));return o&&e.ready((function(){o((0,dt.G)(e))})),a&&e.one("dispose",a),function(){null==e||e.dispose()}}}),[e.viewKey]),r.createElement("div",{ref:c,className:n})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3848],{93262:(t,e,r)=>{var n=r(93861),o=r(11576);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:String(e)}function c(t,e,r){return e=f(e),function(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(e,r||[],f(t).constructor):e.apply(t,r))}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(l=function(){return!!t})()}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}var s=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).update(),n}var r,n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),r=e,n=[{key:"update",value:function(){this.options_.activityStatus===o.T.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 t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.options_.clickHandler.call(this,e)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}},{key:"getToggledActivityStatus",value:function(){return this.options_.activityStatus===o.T.None||this.options_.activityStatus===o.T.Incomplete?o.T.Complete:this.options_.activityStatus===o.T.Complete?o.T.Incomplete:void 0}}],n&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),e}(n.Z.getComponent("Button"));function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,b(n.key),n)}}function b(t){var e=function(t,e){if("object"!=y(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==y(e)?e:String(e)}function d(t,e,r){return e=m(e),function(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,v()?Reflect.construct(e,r||[],m(t).constructor):e.apply(t,r))}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(v=function(){return!!t})()}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}s.prototype.controlText_="Complete";var w=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),d(this,e,arguments)}var r,n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}(e,t),r=e,(n=[{key:"setActivityStatus",value:function(t,e){var r=this;t!==this.activityStatus&&(this.activityStatus=t,this.onToggleStatus=e,this.player.ready((function(){r.renderActivityStatusButton()})))}},{key:"renderActivityStatusButton",value:function(){this.button&&this.player.removeChild(this.button),this.button=new s(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button)}}])&&h(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),e}(n.Z.getPlugin("plugin"));n.Z.registerPlugin("activityStatusPlugin",w)},16852:(t,e,r)=>{var n=r(93861);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:String(e)}function a(t,e,r){return e=p(e),function(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}(t,c()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},f.apply(this,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}var y=function(t){function e(t,r){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=a(this,e,[t]),void 0===r.startTime)throw Error("Invalid clip start");if(void 0===r.endTime)throw Error("Invalid clip end");if(r.startTime>r.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=parseFloat(r.startTime.toPrecision(4)),n._clipEnd=parseFloat(r.endTime.toPrecision(4)),n.playerEndedFn=n.player.ended.bind(t),n.playerDurationFn=n.player.duration.bind(t),n.playerCurrentTimeFn=n.player.currentTime.bind(t),n.playerbufferedFn=n.player.buffered.bind(t),n.player.ended=n.ended.bind(l(n)),n.player.duration=n.duration.bind(l(n)),n.player.currentTime=n.currentTime.bind(l(n)),n.player.buffered=n.buffered.bind(l(n)),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}var r,o;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(e,t),r=e,o=[{key:"clipStart",get:function(){var t=this.playerDurationFn();return this._clipStart>t?t:this._clipStart}},{key:"clipEnd",get:function(){var t=this.playerDurationFn();return t<=0?this._clipEnd:this._clipEnd>t?t:this._clipEnd}},{key:"dispose",value:function(){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"),f(p(e.prototype),"dispose",this).call(this)}},{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 t=this.getCurrentTime(!1);t>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,t<this.clipStart-10&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(t){return t&&t>0&&(this.playerDurationFn()?console.info("The duration of the player has already been set. This is a no-op."):this.playerDurationFn(t)),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(t){if("number"!=typeof t)return this.getCurrentTime(!0);for(var e=t+this.clipStart,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this.playerCurrentTimeFn(e,n)}},{key:"getCurrentTime",value:function(t){var e=this.playerCurrentTimeFn(),r=0;return e>=this.clipStart&&(r=e-this.clipStart),this.player.getCache().currentTime=r,t?r:e}},{key:"buffered",value:function(){for(var t=this.playerbufferedFn(),e=[],r=0;r<t.length;r++)e[r]=[Math.max(0,t.start(r)-this.clipStart),Math.min(Math.max(0,t.end(r)-this.clipStart),this.player.duration())];return n.Z.createTimeRanges(e)}}],o&&i(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),e}(n.Z.getPlugin("plugin"));n.Z.registerPlugin("clipPlugin",y)},14735:(t,e,r)=>{r.d(e,{Z:()=>m});var n=r(44645),o=r(93861);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function c(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:String(e)}function f(t,e,r){return e=y(e),function(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,r||[],y(t).constructor):e.apply(t,r))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function s(){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},s.apply(this,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}var d=function(t){function e(t,r){return u(this,e),f(this,e,[t,r])}return h(e,t),c(e,[{key:"dispose",value:function(){var t=this;setImmediate((function(){var e;null===(e=t.root)||void 0===e||e.unmount()})),s(y(e.prototype),"dispose",this).call(this)}}]),e}(o.Z.getComponent("Component")),v={tagName:"div"};function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;if(!t)throw new Error("componentCtor is required");var r=function(r){function i(){return u(this,i),f(this,i,arguments)}return h(i,r),c(i,[{key:"createEl",value:function(){var r=o.Z.dom.createEl(e.tagName,e.properties,e.attributes),i=(0,n.s)(r);return i.render(t(this.player_,this.options_)),this.root=i,r}}]),i}(d);return r}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3866],{7870:(e,t,n)=>{n.d(t,{N:()=>c});var a=n(97395),r=n(75896),i=n(110),o=n(73582),c={calendarEvents:function(e,t,n){return{url:a._.urlBuilder("{gateway}/v1/discover/special-events/content",{from:e,to:t,presentationId:n}),publicUrl:a._.urlBuilder("/api/discover/special-events/content",{from:e,to:t,presentationId:n}),key:"presentation:".concat(n,":events:from:").concat(e,":to").concat(t)}},nextTopicSpecialEvent:function(e,t){var n={presentationId:t,limit:1,from:i.O.format(new Date,"YYYY-MM-DD"),objectType:o.VH.Classification};return{url:a._.urlBuilder("{gateway}/v1/discover/special-events/object/".concat(e,"/next-events"),n),publicUrl:a._.urlBuilder("/api/discover/special-events/object/".concat(e,"/next-events"),n),key:"presentation:".concat(t,":events:classification:").concat(e),formatData:function(e){return r.m.first(e)}}}}},69395:(e,t,n)=>{n.d(t,{e:()=>o});var a=n(32735),r=n(91967);const i={disabled:"pERi4",disabledHighlighted:"AxyWm"};function o(e){var t=e.audience,n=e.highlight,o=e.setAudience,c=e.isDisabled,l=e.extraClasses,s=function(e,t){return e?t?"".concat(i.disabledHighlighted," text-light"):"bg-info text-light":t?"".concat(i.disabled," text-muted"):"bg-light"}(n,c),u="rounded-pill d-inline-block me-1 user-select-none ".concat(c?"cursor-default":"cursor-pointer"," ").concat(s," ").concat(l);return a.createElement("span",{className:u,onClick:function(){!c&&r.q.isFunction(o)&&o(t,!n)},role:"checkbox","aria-checked":n},t.name.split(" ").map((function(e){return e.charAt(0).toUpperCase()+e.substring(1)})).join(" "))}o.defaultProps={extraClasses:""}},14875:(e,t,n)=>{n.d(t,{a:()=>y});var a=n(32735),r=n(23481),i=n(75902),o=n(35223);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 l(e,t,n){var a;return a=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!=c(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==c(a)?a:String(a))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=l(l(l({},i.GL.Archived,{svgName:o.vn.Archive,svgColorClassName:"text-muted",actionName:"Archive",statusName:"Archived"}),i.GL.Draft,{svgName:o.vn.Edit,svgColorClassName:"",actionName:"Draft",statusName:"Draft"}),i.GL.Published,{svgName:o.vn.VisibleOn,svgColorClassName:"text-success",actionName:"Publish",statusName:"Published"}),u=n(83914),d=n(73582);const m={badge:"ciO47",draftLight:"A6Yi7",draftDark:"fkXBX",published:"Ovzwy",archived:"r_dco"};function p(e){var t="rounded-pill d-flex align-items-center ps-2 py-1 fw-semibold ms-2 ".concat(m.badge);switch(e.status){case d.GL.Published:t+=" ".concat(m.published);break;case d.GL.Archived:t+=" ".concat(m.archived);break;case d.GL.Draft:t+=" ".concat(e.darkMode?m.draftDark:m.draftLight)}return e.wrapperClassName&&(t+=" ".concat(e.wrapperClassName)),t}function f(e){var t=s[e.status],n=t.statusName,r=t.svgName;return a.createElement("div",{className:p(e)},a.createElement(u.x,{svgName:r}),a.createElement("div",null,n))}var v=n(98364);const b={stickyWrapper:"zhw6K",badgeWrapper:"NOvn1",badge:"pxQSR"};var g=r.T.encloseNamespace("shared.classificationPreviewBanner");function y(e){return a.createElement("div",{className:"".concat(b.stickyWrapper," py-2 d-flex justify-content-space-between bg-dark text-white mx-2 rounded")},a.createElement("div",{className:"position-absolute d-flex ".concat(b.badgeWrapper)},a.createElement(f,{status:e.status,wrapperClassName:"".concat(b.badge),darkMode:!0})),a.createElement("div",{className:"flex-grow-1"},a.createElement("h1",{className:"text-center my-3 h5"},a.createElement(v.V,{emoji:"👀"}),g("topic"===e.type?"topicTitle":"companyTitle"))))}},89043:(e,t,n)=>{n.d(t,{p:()=>I,v:()=>T});var a=n(32735),r=n(110),i=n(12788),o={renderInPortalIfExists:function(e,t){return t?(0,i.createPortal)(e,t):e}},c=n(84963),l=n(73679),s=n(83657),u=n(23481),d=n(36848),m=n(83914),p=n(35223),f="shared.backButton";function v(e){var t=Object.assign({textShadow:!0},e),n=t.backToName,r=t.appLink,i=t.color,o=t.extraClasses,c=t.textShadow,l=n?u.T.getPhrase(f,"backTo",{backToName:n}):u.T.getPhrase(f,"back"),s="black"===i?"":"text-white",v=c?"text-shadow":"";return a.createElement(d.F,{appLink:r,className:"d-inline-flex align-items-center h5 mb-0 ".concat(o," ").concat(s," ").concat(v)},a.createElement(m.x,{svgName:p.vn.ChevronLeft,size:m.S.Medium}),a.createElement("span",{className:"ms-1"},l))}v.defaultProps={color:"black",extraClasses:""};var b=n(83345),g=n(10587),y=n(94232),h=n(54610),w=n(79967),E=n(67453);const C={bannerContent:"sSCTB",actionsContainer:"Z5WI2",bannerContentWithLogo:"rgs7Q",container:"M51HJ",logoContainer:"vkeJk",specialEventContainer:"rOxDc",headingLarge:"_8pnV",heading:"JXVBH"};var S="".concat(g.y[h.__.Banners].width,":").concat(g.y[h.__.Banners].height);function k(e){return e.length<160?"h1":C.headingLarge}var I=a.memo((function(e){var t,n,i=e.heading,u=e.banner,d=e.imageCdnUrl,m=e.actions,p=e.sortComponent,f=e.blockColourClass,g=e.specialEvent,I=a.useContext(y.n),T=(0,w.k)().xxl?1920:1200,A=a.useMemo((function(){if(!g||e.showComingSoon)return!1;var t=r.O.format(new Date,"YYYY-MM-DD");return g.endDate?g.startDate<=t&&g.endDate>=t:g.startDate===t}),[g]),L=e.imageOptions||{width:T,ratio:S,resizeType:h.Nq.Cover},O=!!u&&!!d&&E.j.createBannerUrl(u,{fallbackBaseUrl:d,fallbackCategoryName:i,type:h.__.Banners},L),N={className:"banner banner-header ".concat(e.bannerClassName),style:O?{backgroundImage:"url('".concat(O,"')")}:{}};!u&&f&&(delete N.style,N.className+=" ".concat(f));var P=e.detailsComponent;return o.renderInPortalIfExists(a.createElement("header",Object.assign({},N),a.createElement("div",{className:"container ".concat(C.container," position-relative inner-banner")},e.backButtonAppLink&&a.createElement("div",{className:"pt-3"},a.createElement(v,{appLink:e.backButtonAppLink,backToName:e.backButtonText,extraClasses:e.backButtonClasses,color:"white"})),a.createElement("div",{className:"".concat(C.bannerContent," ").concat((null===(t=e.logo)||void 0===t?void 0:t.url)?C.bannerContentWithLogo:"")},!!g&&a.createElement("div",{className:"position-relative ".concat(C.specialEventContainer)},a.createElement(l.s,{body:{type:g.endDate?"range":"day",text:g.endDate?"".concat(r.O.format(g.startDate,"DD"),"-").concat(r.O.format(g.endDate,"DD")):r.O.format(g.startDate,"DD")},month:r.O.format(g.startDate,"MMMM")})),a.createElement("div",null,A&&a.createElement("div",{className:"rounded-pill py-1 px-2 my-1 me-1 fw-semibold bg-light-blue lh-1 d-inline-block"},a.createElement(b.x,{namespace:"shared.bannerHeader",phrase:"onToday"})),e.showComingSoon&&a.createElement(c.r,{className:"pe-2 fw-semibold mb-1 rounded-pill justify-content-start text-nowrap"}),a.createElement("h1",{className:"text-white text-shadow ".concat(C.heading," ").concat(k(i))},i,P&&a.createElement(P,null))),!!m&&a.createElement("div",{className:C.actionsContainer},a.createElement(s.e,{actions:m,sortComponent:p,actionsDropdownClassName:e.actionsDropdownClassName}))),!!(null===(n=e.logo)||void 0===n?void 0:n.url)&&a.createElement("div",{className:C.logoContainer},a.createElement("img",{src:E.j.createUrl(e.logo.url,{size:h.h2.Small}),className:"rounded-circle"})))),null==I?void 0:I.container)}),(function(e,t){var n,a;return e.actions===t.actions&&e.heading===t.heading&&(null===(n=e.logo)||void 0===n?void 0:n.url)===(null===(a=t.logo)||void 0===a?void 0:a.url)}));function T(){var e=a.useContext(y.n);return o.renderInPortalIfExists(a.createElement("div",{className:"partial-banner partial-loading-background ".concat(C.banner)}),null==e?void 0:e.container)}},49935:(e,t,n)=>{n.d(t,{Oo:()=>d,b2:()=>m});var a=n(32735),r=n(36848),i=n(86764),o=n(3747),c=n(5859),l=n(35223),s=n(83914),u=function(e){var t=e.breadcrumb,n=t.name,i=t.appLink,o=t.active,c=e.withBackIcon;return a.createElement("li",{className:"breadcrumb-item".concat(o?" active":"")},o?a.createElement("strong",null,n):a.createElement(r.F,{appLink:i},c&&a.createElement(s.x,{svgName:l.vn.ChevronLeft,size:s.S.Small}),a.createElement("span",{className:c?"ms-2":""},n)))},d=function(e){var t=e.breadcrumbs,n=(0,o.a)(i.r.XS),r=null==t?void 0:t.length;return!r||n&&r<2?a.createElement(a.Fragment,null):n?a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},a.createElement(u,{breadcrumb:t[r-2],withBackIcon:!0}))):a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},t.map((function(e,t){return a.createElement(u,{key:t,breadcrumb:e})}))))},m=a.memo((function(e){var t=e.numItems,n=void 0===t?3:t;return(0,o.a)(i.r.XS)?a.createElement("div",{className:"partial-loading-background",style:{height:"1.3125rem",width:"6rem"}}):a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},c.u.getPartialLoadingItems({numItems:n}).map((function(e,t){var n=e.width;return a.createElement("li",{key:t,className:"breadcrumb-item"},a.createElement("span",{className:"d-inline-block partial-loading-background",style:{width:n},dangerouslySetInnerHTML:{__html:"&nbsp"}}))}))))}))},94644:(e,t,n)=>{n.d(t,{r:()=>u});var a=n(50242),r=n(81886),i=n(67058),o=n(14553),c=n(49267),l=n(49075),s={notFound:i.d,forbidden:{rating:o.q,yearLevel:o.q,region:c.a,privacy:o.q},badRequest:l._};function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var i;i="number"==typeof e?e:e.status;var o=Object.assign(Object.assign({},s),t);i&&r.Q.Ry.isStatusCodeError(i)&&(i!==a.o.NotFound?i!==a.o.Forbidden?n.badRequest||r.Q.Ry.throw(new o.badRequest):n.forbidden||r.Q.Ry.throw(new o.forbidden.privacy):n.notFound||r.Q.Ry.throw(new o.notFound))}}},25665:(e,t,n)=>{n.d(t,{k:()=>l});var a=n(99940),r=n(97395);function i(e){return function(e){if(Array.isArray(e))return o(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 o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var c=function(e){return r._.urlBuilder("/api/domain/v1/subjects/classifications/following",{id:e})},l={follow:function(e,t,n){return{url:"/api/domain/v1/subjects/classifications/following",key:"follow:".concat(e.join(",")),type:a.k.POST,data:e,success:t,error:n,invalidationKeys:[].concat(i(e.map((function(e){return"classification:".concat(e)}))),["my:subject:preferences","classifications"])}},unfollow:function(e,t,n){return{url:c(e),key:"unfollow:".concat(e.join(",")),type:a.k.DELETE,success:t,error:n,invalidationKeys:[].concat(i(e.map((function(e){return"classification:".concat(e)}))),["my:subject:preferences","classifications"])}}}},91286:(e,t,n)=>{n.d(t,{v:()=>o});var a=n(32735),r=n(94644);function i(e){return e.map((function(e){return e.statusCode})).join(":")}function o(e,t,n){var o=Array.isArray(e)?e:[e];(0,a.useEffect)((function(){o.forEach((function(e){(0,r.r)(e.statusCode,t,n)}))}),[i(o),t,n])}},94631:(e,t,n)=>{n.d(t,{D:()=>r});var a=n(32735);function r(e){var t=a.useRef();return a.useEffect((function(){t.current=e})),t.current}},4399:(e,t,n)=>{n.d(t,{$7:()=>o,Dp:()=>c});var a=n(28400),r=n(14070),i=n(97291),o=function(e){return function(t){return{application:i.O.SUBJECT,action:r.e.Subjects.CLASSIFICATION,args:t?[t.id,a.m.slugify(t.name)]:[],params:e||{}}}},c=function(e){return{application:i.O.SUBJECT,action:r.e.Subjects.CLASSIFICATION_ALL,params:e?{presentationId:e}:{}}}},93248:(e,t,n)=>{n.r(t),n.d(t,{CuratedClassificationView:()=>rt});var a=n(32735),r=n(23481),i=n(20354),o=n(28400),c=n(49985),l=n(65858),s=n(7870),u=n(81886),d=n(23232),m=n(83345),p=n(76177),f=n(73582),v=n(35223),b="subjects.curatedClassificationEmptyState",g=r.T.encloseNamespace(b);function y(e){var t,n,i=(null===(t=e.dashboard)||void 0===t?void 0:t.status)===f.GL.Archived;return a.createElement(m.D.Provider,{value:b},a.createElement(d.u,null,a.createElement(d.u.Image,{src:e.imageUrl,altText:g("headingForNP")}),e.isReadonly?a.createElement(a.Fragment,null,a.createElement(d.u.Heading,null,a.createElement(m.x,{namespace:b,phrase:"headingForCurator"})),a.createElement(d.u.Info,null,a.createElement(m.x,{namespace:b,phrase:"info"})),a.createElement(p.u,{title:i?r.T.getPhrase(b,"archivedCtaTooltip"):"",spanHack:!0},a.createElement(d.u.Cta,{text:r.T.getPhrase(b,"add"),appLink:null===(n=e.addWidgetApplink)||void 0===n?void 0:n.call(e),className:"btn btn-dark",icon:v.vn.Plus,disabled:i}))):a.createElement(d.u.Heading,null,a.createElement(m.x,{phrase:"headingForNP"}))))}var h=n(92869),w=n(36848);const E={container:"k1iOO",itemsWrapper:"IC4wJ",anchorWrapper:"ciEf6",default:"CJonr",selectedItem:"A9mBx",disabled:"sp1Xl"};function C(e){return a.createElement("div",{className:"".concat(E.container," ps-3")},a.createElement("h2",{className:"h5"},e.title),a.createElement("div",{className:"".concat(E.itemsWrapper)},e.widgets.map((function(t,n){return a.createElement(w.F,{key:t.id,appLink:(r=t,i=u.Q.C$.getCurrentAppLink(),o=i.params?Object.assign({},i.params):{},o.tocId=r.id,Object.assign(Object.assign({},i),{params:o})),appLinkOptions:{replace:!0},className:"".concat(E.anchorWrapper," ").concat(e.clickable?"":E.disabled," ").concat(e.activeId===t.id?E.selectedItem:""),onClick:function(){h.t.preventScrollTop(),e.setControlledId(t.id)},analyticsData:Object.assign(Object.assign({},e.analyticsData),{id:t.id,name:t.name}),analyticsOptions:{actionType:l.Vw.Click,entity:l.py.Widget,location:l.LZ.TableOfContents}},a.createElement("div",{className:"".concat(e.activeId||0!==n?"":E.default," ")},t.name));var r,i,o}))))}var S="subjects.teacherOnlyEmptyState",k=r.T.encloseNamespace(S);function I(e){var t;return a.createElement(m.D.Provider,{value:S},a.createElement(d.u,null,a.createElement(d.u.Image,{src:e.imageUrl,altText:k("heading")}),a.createElement(d.u.Heading,null,a.createElement(m.x,{phrase:"heading"})),a.createElement(d.u.Info,null,a.createElement(m.x,{phrase:"info"})),a.createElement(d.u.Cta,{text:k("cta"),appLink:null===(t=e.ctaAppLink)||void 0===t?void 0:t.call(e),className:"btn btn-dark"})))}var T,A=n(75896),L=n(42308),O=n(80889),N=n(21366),P=n(89043),j=n(49935),x=n(4632),F=n(88513),D=n(12275),B=n(86764),U=n(16714),R=n(78479),_=n(67058),M=n(3747),W=n(22902),V=function(e){var t=e.setActiveId,n=e.headingElements,r=e.controlledId,i=e.setControlledId,o=a.useRef(0);a.useEffect((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){if(r)return t(r),void(T=window.setTimeout((function(){i("")}),800));if(e.isIntersecting)t(e.target.id),o.current=window.scrollY;else{var a=o.current-window.scrollY>0,c=n.findIndex((function(t){return t.id===e.target.id})),l=n[c-1];a&&(null==l?void 0:l.id)&&t(null==l?void 0:l.id)}}))}),{rootMargin:"-67px 0px -80% 0px"});return n.forEach((function(t){return e.observe(t)})),function(){T&&window.clearTimeout(T),e.disconnect()}}),[t,n.length,r])},q=n(94631);function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var H=function(e,t){var n,r,i=(n=a.useState(!1),r=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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(n,r)||function(e,t){if(e){if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}(n,r)||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],c=i[1],l=(0,q.D)(t),s=t;a.useLayoutEffect((function(){if(!o||l!==s){var t=e.find((function(e){return e.id===s}));if(t){var n=t.getBoundingClientRect();window.scrollBy({top:n.top-80,behavior:"smooth"}),o||c(!0)}}}),[e,l,s,o])},z=n(57900),Y=n(2948),J=n(1048),Q=n(69395),$=n(11607),X=n(38143),Z=n(5859);function K(e,t){if(e){if("string"==typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ee(e,t):void 0}}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var te="subjects.audienceFilter";function ne(e){var t,n,r=e.audiences,i=e.activeAudiences,o=e.disabled,c=e.appLink,l=(t=(0,Y.D)(X.g.AUDIENCE_FILTER,void 0,{storage:z.Z1.SessionStorage}),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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(t,n)||K(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.")}())[1];function s(e,t){var n,a,r=t?[].concat(function(e){return function(e){if(Array.isArray(e))return ee(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||K(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.")}()}(null!==(n=null==i?void 0:i.map((function(e){return e.name})))&&void 0!==n?n:[]),[e.name]):i.map((function(e){return e.name})).filter((function(t){return t!==e.name}));u.Q.C$.trigger(Object.assign(Object.assign({},c),{params:(a=J.t.omit(c.params,["a"]),r.length?Object.assign({},a,{a:r}):a)}),{replace:!0})}return a.useEffect((function(){e.disablePersist||l(i)}),[i]),r&&r.length?a.createElement("div",{className:"d-flex flex-wrap row-gap-2"},r.map((function(e){return a.createElement(Q.e,{key:e.masterId,audience:e,highlight:!!(null==i?void 0:i.find((function(t){return t.masterId===e.masterId}))),setAudience:s,isDisabled:o})})),!!i&&!!Object.keys(i).length&&a.createElement($.L,{className:"info-link d-inline-block fw-semibold ms-1",onClick:function(){var e=J.t.omit(c.params,["a"]);u.Q.C$.trigger(Object.assign(Object.assign({},c),{params:e}),{replace:!0})}},a.createElement(m.x,{namespace:te,phrase:"clear"}))):a.createElement(a.Fragment,null)}var ae=Z.u.getPartialLoadingItems({numItems:6}),re=function(){return a.createElement("div",{className:"d-flex flex-wrap row-gap-2"},ae.map((function(e,t){var n=e.width;return a.createElement("span",{key:t,className:"rounded-pill partial-loading-background me-1",dangerouslySetInnerHTML:{__html:"&nbsp"},style:{width:n}})})))},ie=n(69454);function oe(e){var t;return e.isComingSoon||e.isEmpty&&!(null===(t=e.activeAudiences)||void 0===t?void 0:t.length)?a.createElement(a.Fragment,null):ie.T.shouldShowAudiences(e.audiences)?a.createElement(ne,{audiences:e.audiences,activeAudiences:e.activeAudiences,disabled:e.isReadonly,appLink:e.appLink,disablePersist:e.disablePersist}):a.createElement(a.Fragment,null)}function ce(e){return ce="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},ce(e)}function le(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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?se(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 se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var ue="shared.classificationDashboard";function de(e){return e.widgetId===L.z.Blurb&&e.templateId===R.f.Heading}function me(e){var t,n,o,c,l=function(e,t){var n,r,o,c,l=a.useMemo((function(){return e?{isSystemGeneratedDashboard:N.S.isSystemGeneratedDashboard(e.widgets),systemGeneratedVideoWidget:e.widgets.find((function(e){return e.widgetId===L.z.ClassificationPinnedVideos}))}:{isSystemGeneratedDashboard:!1,systemGeneratedVideoWidget:null}}),[null==e?void 0:e.id]),s=l.isSystemGeneratedDashboard,u=l.systemGeneratedVideoWidget,d=i.a.useBasicFetch(!!u&&O._.dashboardWidgetContent(null==u?void 0:u.id,N.S.getWidgetParams(u.widgetId,u.templateId,N.S.getDashboardTargetType(e),null==t?void 0:t.map((function(e){return e.masterId}))),null==u?void 0:u.templateId));return s?{widgets:null!==(r=null===(n=null==e?void 0:e.widgets)||void 0===n?void 0:n.filter((function(e){return e.widgetId!==L.z.ClassificationPinnedVideos})))&&void 0!==r?r:[],videoList:null!==(c=null===(o=d.data)||void 0===o?void 0:o.content)&&void 0!==c?c:[],videoListWidgetId:null==u?void 0:u.id}:{widgets:A.m.sortBy(null==e?void 0:e.widgets,"index")}}(e.dashboard,e.activeAudiences),s=l.widgets,d=l.videoList,m=l.videoListWidgetId,p=(0,(0,W.T)().hasPermissions)(U.C.StudentExperience),v=(0,M.a)(B.r.LGDown),b=a.useRef(new Set),g=a.useMemo((function(){return s.reduce((function(e,t){return e[t.id]=!1,e}),{})}),[null==s?void 0:s.length]),h=le(a.useState(g),2),w=h[0],E=h[1],S=le(a.useState(window.location.hash.slice(1)||""),2),k=S[0],T=S[1],R=le(a.useState(""),2),q=R[0],G=R[1],z=Array.from(b.current);function Y(t,n,a){var r,i=N.S.getWidgetParams(n,a,N.S.getDashboardTargetType(e.dashboard),null===(r=e.activeAudiences)||void 0===r?void 0:r.map((function(e){return e.masterId})));return e.getWidgetContentRequest(t,i,a)}H(z,e.tableOfContentsId),V({setActiveId:G,headingElements:z,controlledId:k,setControlledId:T});var J=!e.isComingSoon&&!e.isTeacherOnly&&(!e.dashboard||e.dashboard.status===f.GL.Archived&&!e.isReadonly||e.dashboard.status===f.GL.Draft&&!e.isPreviewing||!e.isComingSoon&&(!(null==s?void 0:s.length)||(!d||!d.length)&&Object.values(w).every((function(e){return!!e})))),Q=null===(t=e.getBreadcrumbs)||void 0===t?void 0:t.call(e);a.useEffect((function(){J&&E(g)}),[null==s?void 0:s.length]);var $=a.useCallback((function(e,t){if(w[e]!==t){for(var n,a=(Object.assign(Object.assign({},w),(u={},m=t,p=void 0,p=function(e,t){if("object"!=ce(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!=ce(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(d=e),(d="symbol"==ce(p)?p:String(p))in u?Object.defineProperty(u,d,{value:m,enumerable:!0,configurable:!0,writable:!0}):u[d]=m,u))),r=0;r<s.length;){var i=s[r];if(de(i)){for(var o=!0,c=r+1;o&&c<s.length;){var l=s[c];if(de(l))break;a[l.id]||(n=l).widgetId===L.z.CuratedClassifications||n.widgetId===L.z.Classifications||(o=!1),c++}r=c,a[i.id]=o}else r++}E(a)}var u,d,m,p}),[w,s]);function X(e){return de(e)&&w[e.id]}var Z=s.filter((function(e){var t;return!X(e)&&!!(null===(t=e.metadata)||void 0===t?void 0:t.showInTableOfContents)})),K=Z.length>=2&&!v;return e.isComingSoon&&u.Q.Ry.throw(new _.d),a.createElement("div",{className:"bg-white px-4 ".concat(e.moviesAndTv?"":"topic-dashboard")},a.createElement(P.p,{heading:e.classification.name,banner:e.classification.banner,imageCdnUrl:e.imageCdnUrl,actions:null===(n=e.getBannerActions)||void 0===n?void 0:n.call(e),actionsDropdownClassName:"btn btn-outline-dark",specialEvent:e.specialEvent,showComingSoon:e.isComingSoon}),a.createElement("div",{className:"d-flex flex-column row-gap-3 py-3 mb-3 ".concat(e.isComingSoon?"":"border-bottom")},a.createElement(j.Oo,{breadcrumbs:Q}),a.createElement(oe,{classification:e.classification,audiences:e.audiences,activeAudiences:e.activeAudiences,appLink:null===(c=(o=e.appLinks).audience)||void 0===c?void 0:c.call(o),isEmpty:J,isReadonly:e.isReadonly,isComingSoon:e.isComingSoon,disablePersist:!e.isViewCurrentPresentation})),a.createElement("div",{className:"".concat(K?"row no-wrap":"")},a.createElement("div",{className:K?"col-9":""},s.map((function(t,n){return X(t)?a.createElement(a.Fragment,{key:t.id}):a.createElement(D.L,{headingElementRef:b,key:t.id,id:t.id,name:t.name,description:t.description,templateId:t.templateId,widgetTypeId:t.widgetId,audiences:e.audiences,getContentRequest:Y,setIsEmpty:$,setFavourite:e.setFavourite,canFavourite:e.canFavourite,appLinks:e.appLinks,yearGroups:e.yearGroups,curriculum:e.curriculum,presentation:e.presentation,getCurriculumLinksRequest:e.getCurriculumLinksRequest,analyticsData:e.analyticsData,isScrollToTargetWidget:e.scrollToWidgetId===t.id,imageCdnUrl:e.imageCdnUrl,resourceThumbnailFallbackImageUrl:e.resourceThumbnailFallbackImageUrl,onSubmitFeedback:e.onSubmitFeedback,metadata:t.metadata,hasTableOfContents:K,lazyLoad:e.lazyLoad,dashboardTarget:f.ku.Classification,widgetIndex:n,showVideoGuidance:!p,hasPermissions:e.hasPermissions,hasLocalPermissions:e.hasLocalPermissions,isPreviewing:e.isReadonly,companyLogoFallbackUrl:e.companyLogoFallbackUrl,subTextType:e.subTextType})})),!!(null==d?void 0:d.length)&&a.createElement(a.Fragment,null,a.createElement(F.B,{name:r.T.getPhrase(ue,"videos"),description:""}),a.createElement(x.E4,{videos:d,yearGroups:e.yearGroups,getVideoAppLink:function(t){return e.appLinks.videoType(t,m)},getSubTextAppLink:e.appLinks.subText,setFavourite:e.setFavourite,canFavourite:e.canFavourite,presentationAudiences:e.audiences,companyLogoFallbackUrl:e.companyLogoFallbackUrl,subTextType:e.subTextType}))),K&&a.createElement("aside",{className:"col-3"},a.createElement(C,{widgets:Z,title:e.classification.name,activeId:q,clickable:!e.isReadonly,analyticsData:e.analyticsData,setControlledId:T}))),J&&a.createElement(y,{dashboard:e.dashboard,isReadonly:e.isReadonly,imageUrl:e.emptyImageUrl,addWidgetApplink:e.appLinks.widgetWizard}),e.isTeacherOnly&&a.createElement(I,{imageUrl:e.emptyImageUrl,ctaAppLink:function(){return e.appLinks.allTopics(e.classification.presentationId)}}))}function pe(){return a.createElement("div",{className:"bg-white px-4"},a.createElement(P.v,null),a.createElement("div",{className:"d-flex flex-column row-gap-3 py-3 mb-3 border-bottom"},a.createElement(j.b2,null),a.createElement(re,null)))}me.defaultProps={appLinks:{}};var fe=n(14875),ve=n(51365),be=n(2284),ge=n(4594),ye=n(89454),he=n(21750),we=n(39151),Ee=n(1666),Ce=n(25665),Se=n(31949),ke=n(56520),Ie=n(91286),Te=n(79612),Ae=n(99742),Le=n(14070),Oe=n(97291),Ne=n(52333),Pe=n(65986),je=n(82817),xe=n(7179),Fe=n(27638),De=n(86698),Be=n(23737),Ue=n(56017),Re=n(33192),_e=n(64364);function Me(e){return Me="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},Me(e)}function We(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Ve(a.key),a)}}function Ve(e){var t=function(e,t){if("object"!=Me(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!=Me(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Me(t)?t:String(t)}function qe(e,t,n){return t=He(t),function(e,t){if(t&&("object"===Me(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,Ge()?Reflect.construct(t,n||[],He(e).constructor):t.apply(e,n))}function Ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ge=function(){return!!e})()}function He(e){return He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},He(e)}function ze(e,t){return ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ze(e,t)}var Ye="subjects.topicNotFoundError",Je=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),qe(this,t,["Topic doesn't exist"])}var n,a;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&&ze(e,t)}(t,e),n=t,(a=[{key:"name",get:function(){return"TopicNotFoundError"}},{key:"heading",get:function(){return r.T.getPhrase(Ye,"heading")}},{key:"description",get:function(){return r.T.getPhrase(Ye,"description")}},{key:"cta",get:function(){return{text:r.T.getPhrase(Ye,"cta"),appLink:{application:Oe.O.SUBJECT,action:Le.e.Subjects.CLASSIFICATION_ALL}}}}])&&We(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),t}(_e.H),Qe=n(183),$e=n(10144),Xe=n(67753),Ze=n(82431),Ke=n(4399),et=r.T.encloseNamespace("subjects.classification");const tt={followButton:"HlRXj"};function nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}rt.defaultProps={queryParams:{}};var at=r.T.encloseNamespace("subjects.classification");function rt(e){var t,n,r,u,d,m,p,b,g,y,h,w,E,C,S=(E=a.useState(!1),C=2,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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(E,C)||function(e,t){if(e){if("string"==typeof e)return nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nt(e,t):void 0}}(E,C)||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.")}()),k=S[0],I=S[1],T=i.a.useGetFetchAsync(),A=(0,W.T)(),L=A.hasPermissions,N=A.hasLocalPermissions,P=i.a.useBasicFetch(we.L.config()),j=i.a.useBasicFetch(Se.N.currentUser()),x=(0,ke.R0)(),F=x.openInCurationStudioLabel,D=x.isUserCurator,R=x.getOpenInCurationStudioLink,_=i.a.useBasicFetch(L(U.C.CanSubmitFeedback)&&j.data&&Ee.h.customer(j.data.customerId)),V=i.a.useBasicFetch(he.x.classification(e.id,null===(t=j.data)||void 0===t?void 0:t.id)),q=i.a.useBasicFetch(V.data&&he.x.presentationById(V.data.presentationId)),G=i.a.useBasicFetch(V.data&&ye.O.audiencesByPresentationId(V.data.presentationId)),H=i.a.useBasicFetch(V.data&&s.N.nextTopicSpecialEvent(e.id,V.data.presentationId)),z=(0,De.y)(),Y=z.activePresentation,Q=z.availablePresentations,$=z.canAccessPresentation,X=(0,je.M)().activeCurriculum,Z=i.a.useBasicFetch((null===(n=j.data)||void 0===n?void 0:n.isAuthenticated)&&Ee.h.yearGroups(j.data.customerId)),K=i.a.useBasicFetch(he.x.path(e.id)),ee=(0,Be.y)({classificationId:e.id,queryParams:e.queryParams,targetType:f.ku.Classification}),te=ee.dashboard,ne=ee.isPreviewing,ae=ee.isTeacherOnly,re=i.a.useBasicFetch(he.x.regionAlternatives(e.id));(0,Te.M)(Ue.C.getClassificationMetadata({content:V.data,phraseContext:{phraseHandler:at,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:Re.f.getCanonicalLink({stripPresentationSlug:!0}),allowIndexing:Re.f.allowIndexing(),hrefLang:Re.f.getContentHrefLang(re.data,(function(e,t){return{application:Oe.O.SUBJECT,action:Le.e.Subjects.CLASSIFICATION,args:[e,o.m.slugify(t)]}}))})),(0,Ie.v)(V,{notFound:Je}),(0,xe.P)({id:e.id,app:"topics"});var oe=(null==Y?void 0:Y.id)===(null===(r=q.data)||void 0===r?void 0:r.id),ce=(0,M.a)(B.r.MDDown),le=(0,M.a)(B.r.SMDown),se=(0,Fe.u)(l.LZ.ExpandableVideoThumbnail),ue=se.setFavourite,de=se.canFavourite,_e=(0,Pe._)(Pe.i.VideoItem),Me=L(U.C.FollowSubjects),We=(null===(u=V.data)||void 0===u?void 0:u.status)===be.W.ComingSoon&&!ne,Ve=ie.T.getActiveAudiencesFromParams(G.data,e.queryParams),qe=null!==(d=null==Ve?void 0:Ve.map((function(e){return e.masterId})))&&void 0!==d?d:[];function Ge(e){var t,n;if(Me){I(!0);var a=!!(null===(n=null===(t=V.data.followers)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length),r=a?Ce.k.unfollow:Ce.k.follow;T(r([V.data.id])).then((function(){c.k.logUserAction(rt,{location:e,actionType:l.Vw.Follow,workflowPhase:l.eu.Complete,descriptor:a?l.DL.Off:l.DL.On,entity:l.py.Classification})})).finally((function(){return I(!1)}))}}var He,ze,Ye=(He=V.data,ze=e.queryParams,{audience:function(){return{application:Oe.O.SUBJECT,action:Le.e.Subjects.CLASSIFICATION,args:[He.id,o.m.slugify(He.name)],params:ze}},classification:function(e){var t=e||He;return{application:Oe.O.SUBJECT,action:Le.e.Subjects.CLASSIFICATION,args:[t.id,o.m.slugify(t.name)],params:J.t.omit(ze,["preview","dashboardId","skipPrompt"])}},classificationTopics:function(){return{application:Oe.O.SUBJECT,action:Le.e.Subjects.CLASSIFICATION_TOPICS,args:He?[He.id,o.m.slugify(He.name)]:[],params:ze||{}}},videoType:function(e,t){return Xe.W.getAppLink(e,{context:Qe.Q.Widget,contextId:t,moviesAndTv:ze.mtv})},allTopics:function(e){return{application:Oe.O.SUBJECT,action:Le.e.Subjects.CLASSIFICATION_ALL,params:{presentationId:e}}},series:function(e){return Ze.j.getSeriesAppLink(e,{classificationId:He.id,mtv:!!ze.mtv||void 0})},subText:function(e){return Ze.j.getSeriesAppLink(e.series,{classificationId:He.id,mtv:!!ze.mtv||void 0})},playlist:function(e){return{application:Oe.O.PLAYLISTS,action:Le.e.Playlists.PLAYLIST,args:[e.id,o.m.slugify(e.name)],params:{classificationId:He.id,mtv:!!ze.mtv||void 0}}}}),rt={presentationId:null===(m=q.data)||void 0===m?void 0:m.id,presentationName:null===(p=q.data)||void 0===p?void 0:p.name,currentClassificationId:null===(b=V.data)||void 0===b?void 0:b.id,currentClassificationName:null===(g=V.data)||void 0===g?void 0:g.name,followingCurrentClassification:!!(null===(w=null===(h=null===(y=V.data)||void 0===y?void 0:y.followers)||void 0===h?void 0:h.data)||void 0===w?void 0:w.length),activeAudienceNames:(null==Ve?void 0:Ve.length)?Ve.map((function(e){return e.name})):null,activeAudienceIds:qe.length?qe:null};return P.data&&te.hasCompleted&&V.data&&q.data&&K.data&&Q&&G.data&&H.hasCompleted?a.createElement(ve.M.Provider,{value:_e},a.createElement("div",{className:"position-relative"},!(!ne||!te.data)&&a.createElement(fe.a,{status:te.data.status,type:"topic"}),a.createElement(me,{dashboard:te.data,classification:V.data,getWidgetContentRequest:O._.dashboardWidgetContent,getBreadcrumbs:function(){var t;if($(null===(t=q.data)||void 0===t?void 0:t.id))return function(){return function(e){var t=e.classification,n=e.path,a=e.presentation,r=e.availablePresentations,i=e.appLinks;if(e.queryParams.mtv){var o=[{name:et("moviesAndTv"),appLink:{application:Oe.O.MOVIES_AND_TV,action:Le.e.MoviesAndTv.HOME}}];return n.slice(1,n.length).forEach((function(e){o.push({name:e.name,appLink:i.classification(e),active:e.name===t.name})})),o}var c=[{name:$e.i.getExploreAllTopicsTitle(null==a?void 0:a.name,null==r?void 0:r.length),appLink:(0,Ke.Dp)(null==a?void 0:a.id)}];return n.forEach((function(e){c.push({name:e.name,appLink:i.classification(e),active:e.name===t.name})})),c}({appLinks:Ye,availablePresentations:Q,classification:V.data,path:K.data,presentation:q.data,queryParams:e.queryParams})}}(),hasPermissions:L,hasLocalPermissions:N,curriculum:X,presentation:q.data,getCurriculumLinksRequest:function(e){return he.x.curriculumLinks(e,null==X?void 0:X.id)},onToggleFollow:Ge,getBannerActions:function(){var e,t,n,a,r,i=!!(null===(n=null===(t=null===(e=V.data)||void 0===e?void 0:e.followers)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length);if(!Me||We)return[];var o=[{label:le?"":at(i?"unfollow":"follow"),onClick:function(){return Ge(l.LZ.Banner)},svgName:i?v.vn.Check:v.vn.Bell,className:"btn follow-btn me-2 ".concat(i?"btn-outline-dark":"btn-dark"," ").concat(tt.followButton),button:!0,tooltip:i||ce?void 0:at("followBtnTooltip"),showSpinner:k}];return D&&o.push({label:F,href:R(ge.E.Subject,null===(a=V.data)||void 0===a?void 0:a.id,null===(r=q.data)||void 0===r?void 0:r.id),openInNewTab:!0}),o},audiences:e.queryParams.mtv?null:G.data,activeAudiences:Ve,analyticsData:rt,imageCdnUrl:P.data.imageCdnUrl,resourceThumbnailFallbackImageUrl:Ae.W.Fallbacks.RESOURCE_THUMBNAIL,emptyImageUrl:ae?Ae.W.EmptyStates.Topics.TEACHER_ONLY:Ae.W.EmptyStates.Topics.TOPIC,isComingSoon:We,appLinks:Ye,isPreviewing:ne,setFavourite:ue,canFavourite:de,isViewCurrentPresentation:oe,canFollowSubjects:Me,onSubmitFeedback:L(U.C.CanSubmitFeedback)&&function(e){var t=T(Ne.n.sendTopicFooterFeedback(e,j.data,_.data,q.data,V.data,te.data,L(U.C.StudentExperience)));return c.k.logUserAction({feedbackType:e.type,content:e.content,presentationId:q.data.id,classificationId:V.data.id,dashboardId:te.data.id},{actionType:l.Vw.Submit,location:l.LZ.ClassificationFooter,entity:l.py.Feedback,workflowPhase:l.eu.Complete}),t},tableOfContentsId:e.queryParams.tocId,yearGroups:Z.data,lazyLoad:!Re.f.isBot(),moviesAndTv:e.queryParams.mtv,isTeacherOnly:ae,specialEvent:H.data}))):a.createElement(pe,null)}},52333:(e,t,n)=>{n.d(t,{n:()=>c});var a=n(99940),r=n(19808),i=n(86613);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var c={sendDiscoverFooterFeedback:function(e,t,n,a,r,i){var o=e.content.split("\n").join("<br />");return l("Discover Footer Feedback","\n <b>Type:</b> ".concat("positive"===e.type?"Positive":"Negative","\n <br />\n <b>Location:</b> Discover Footer\n <br />\n <b>Presentation:</b> ").concat(a.description," (ID: ").concat(a.id,")\n <br />\n <b>Dashboard:</b> ").concat(r.name," (ID: ").concat(r.id,")\n <br />\n ").concat(s(t,n,i),"\n <br />\n <b>Feedback:</b>\n <br />\n ").concat(o,"\n "),t,["discover",i?"student":"staff"])},sendTopicFooterFeedback:function(e,t,n,a,r,i,o){var c=e.content.split("\n").join("<br />");return l("Topic Footer Feedback","\n <b>Type:</b> ".concat("positive"===e.type?"Positive":"Negative","\n <br />\n <b>Location:</b> Topic Footer\n <br />\n <b>Presentation:</b> ").concat(a.description," (ID: ").concat(a.id,")\n <br />\n <b>Classification:</b> ").concat(r.name," (ID: ").concat(r.id,")\n <br />\n <b>Dashboard:</b> ").concat(i.name," (ID: ").concat(i.id,")\n <br />\n ").concat(s(t,n,o),"\n <br />\n <b>Feedback:</b>\n <br />\n ").concat(c,"\n "),t,["topics",o?"student":"staff"])}};function l(e,t,n,c){var l,s=["new product","in product feedback"].concat(function(e){if(Array.isArray(e))return o(e)}(l=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(l)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(l)||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.")}());n.role===i.i.Admin&&s.push("administrator");var u=function(e){switch(e){case r.b.AU:return"au";case r.b.NZ:return"nz";case r.b.UK:return"uk";case r.b.US:return"us"}}(n.instanceRegion);return u&&s.push(u),{url:"/api/productboard/notes",key:"productboard:feedback",data:{title:e,content:t,user:{email:n.emailVerified?n.email:""},tags:s},type:a.k.POST}}function s(e,t,n){return"\n <b>User:</b>\n <br />\n <li>ID: ".concat(e.id,"</li>\n <li>Username: ").concat(e.username,"</li>\n <li>Email: ").concat(e.email,"</li>\n <li>User Type / Role: ").concat(function(e,t){return t?"Learner":e.role===i.i.Admin?"Admin":"Staff"}(e,n),"</li>\n <li>Customer ID: ").concat(e.customerId,"</li>\n <li>CVC ID: ").concat(t.crmId,"</li>\n <li>Customer Name: ").concat(t.name,"</li>\n <li>Instance Region: ").concat(e.instanceRegion,"</li>\n <li>Content Region: ").concat(e.contentRegion,"</li>\n ")}},41063:(e,t,n)=>{n.d(t,{b:()=>o});var a=n(16714),r=n(22902),i=n(37802);function o(){var e=(0,r.T)().hasPermissions;return(0,i.r)(null).manageVideoAccess&&e(a.C.ManageVideoAccess)}}}]);