@clickview/lite 0.35.2 → 0.35.3-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{1980-lite-3c1d9a0bd8.chunk.css → 1201-lite-c31c094e0b.chunk.css} +1 -1
  3. package/dist/css/1426-lite-840995aa62.chunk.css +26 -0
  4. package/dist/css/{6702-lite-7caa0be777.chunk.css → 1461-lite-8a6d9f8005.chunk.css} +1 -1
  5. package/dist/css/{6822-lite-2c4dbd6721.chunk.css → 1514-lite-b377d8aad7.chunk.css} +1 -1
  6. package/dist/css/{5611-lite-0ad79a4f81.chunk.css → 1519-lite-8818fa8d4c.chunk.css} +1 -1
  7. package/dist/css/{9622-lite-23f29cce3d.chunk.css → 1688-lite-cbde295a12.chunk.css} +1 -1
  8. package/dist/css/1805-lite-971ea2bd5a.chunk.css +5 -0
  9. package/dist/css/{1820-lite-e06465f5de.chunk.css → 1820-lite-983fc2b64e.chunk.css} +1 -1
  10. package/dist/css/{6154-lite-9de6d937cb.chunk.css → 2408-lite-d788a06bf3.chunk.css} +1 -1
  11. package/dist/css/{7564-lite-d60de6c7e1.chunk.css → 2469-lite-7a8e220d2f.chunk.css} +1 -1
  12. package/dist/css/{9522-lite-3c1d9a0bd8.chunk.css → 2651-lite-c31c094e0b.chunk.css} +1 -1
  13. package/dist/css/{9869-lite-baa5f27c85.chunk.css → 2703-lite-c11aaae4be.chunk.css} +6 -3
  14. package/dist/css/2819-lite-1ebce7bdcf.chunk.css +6 -0
  15. package/dist/css/{4373-lite-70e0bc4a9c.chunk.css → 3311-lite-8f53694323.chunk.css} +1 -1
  16. package/dist/css/{7286-lite-871baa523e.chunk.css → 3401-lite-705c2c5fe4.chunk.css} +1 -1
  17. package/dist/css/{817-lite-d4b875a3bb.chunk.css → 4210-lite-5f2e12e28a.chunk.css} +1 -1
  18. package/dist/css/{3755-lite-0da0cc9d62.chunk.css → 4463-lite-b9b1686d14.chunk.css} +1 -1
  19. package/dist/css/{6957-lite-d486456f1e.chunk.css → 4546-lite-3d08e5e8c2.chunk.css} +1 -1
  20. package/dist/css/{5151-lite-d4ae59eb2d.chunk.css → 4728-lite-be5b495f2e.chunk.css} +1 -1
  21. package/dist/css/487-lite-96ad0f943f.chunk.css +5 -0
  22. package/dist/css/{8095-lite-814daf86d6.chunk.css → 4956-lite-12f53a63d0.chunk.css} +1 -1
  23. package/dist/css/{3446-lite-1b1ec87a28.chunk.css → 4973-lite-f724003877.chunk.css} +11 -11
  24. package/dist/css/{4405-lite-d4ae59eb2d.chunk.css → 5127-lite-be5b495f2e.chunk.css} +1 -1
  25. package/dist/css/{275-lite-4f19640eb7.chunk.css → 5306-lite-40a1dcaba5.chunk.css} +1 -1
  26. package/dist/css/536-lite-b8b24bff42.chunk.css +29 -0
  27. package/dist/css/5379-lite-b9ce6d4999.chunk.css +29 -0
  28. package/dist/css/5442-lite-5b422a19e4.chunk.css +4 -0
  29. package/dist/css/{5659-lite-0ad79a4f81.chunk.css → 5965-lite-8818fa8d4c.chunk.css} +1 -1
  30. package/dist/css/{1366-lite-69969922c3.chunk.css → 6683-lite-bfbd8a654d.chunk.css} +1 -1
  31. package/dist/css/6746-lite-cbacfd109f.chunk.css +1 -0
  32. package/dist/css/7167-lite-e7bc934b47.chunk.css +5 -0
  33. package/dist/css/7178-lite-d470e2a870.chunk.css +3 -0
  34. package/dist/css/{9714-lite-ac0b76a84c.chunk.css → 757-lite-649ce0643d.chunk.css} +1 -1
  35. package/dist/css/{5555-lite-0ad79a4f81.chunk.css → 763-lite-8818fa8d4c.chunk.css} +1 -1
  36. package/dist/css/7791-lite-afbd54454d.chunk.css +7 -0
  37. package/dist/css/7864-lite-eaa787cfb2.chunk.css +3 -0
  38. package/dist/css/7877-lite-753ceb57d9.chunk.css +7 -0
  39. package/dist/css/8296-lite-1e63b6b5d8.chunk.css +6 -0
  40. package/dist/css/{5171-lite-67352d5f48.chunk.css → 8364-lite-8c45fd1bcc.chunk.css} +1 -1
  41. package/dist/css/{6076-lite-26ebfc882b.chunk.css → 8469-lite-bc1a27e4da.chunk.css} +1 -1
  42. package/dist/css/{1781-lite-62db879d64.chunk.css → 8541-lite-0f6c636afb.chunk.css} +1 -1
  43. package/dist/css/{3987-lite-26ebfc882b.chunk.css → 9133-lite-bc1a27e4da.chunk.css} +1 -1
  44. package/dist/css/9230-lite-5010e72da6.chunk.css +4 -0
  45. package/dist/css/{7164-lite-4424261809.chunk.css → 9516-lite-4751b1e0aa.chunk.css} +5 -5
  46. package/dist/css/{4145-lite-10dcae6491.chunk.css → 9704-lite-60ead9f8df.chunk.css} +1 -1
  47. package/dist/css/{519-lite-e5eb6a5c45.chunk.css → 9719-lite-f28f11cc5a.chunk.css} +2 -1
  48. package/dist/css/{7484-lite-bef9094c58.chunk.css → 9871-lite-71a39d9bb3.chunk.css} +1 -1
  49. package/dist/css/{lite-app-df99273901.css → lite-app-ddb4f64bbb.css} +7 -7
  50. package/dist/languages/en.json +1 -1
  51. package/dist/scripts/{1980-535747e896-lite.chunk.js → 1201-c93ac8a29a-lite.chunk.js} +1 -1
  52. package/dist/scripts/1426-94857a953c-lite.chunk.js +2 -0
  53. package/dist/scripts/{6702-d96686b5d6-lite.chunk.js → 1461-f7e964ae21-lite.chunk.js} +1 -1
  54. package/dist/scripts/151-5268c8b0b2-lite.chunk.js +1 -0
  55. package/dist/scripts/{6822-35fc1ff6f9-lite.chunk.js → 1514-c423b48155-lite.chunk.js} +1 -1
  56. package/dist/scripts/{1517-b1cad166ec-lite.chunk.js → 1517-dcfff93ae3-lite.chunk.js} +1 -1
  57. package/dist/scripts/{5611-d521edcea1-lite.chunk.js → 1519-bae52ef1b1-lite.chunk.js} +1 -1
  58. package/dist/scripts/1672-9ae25f79a6-lite.chunk.js +2 -0
  59. package/dist/scripts/{9622-365c5b0e22-lite.chunk.js → 1688-ca1a2a9f04-lite.chunk.js} +1 -1
  60. package/dist/scripts/1805-05413695af-lite.chunk.js +2 -0
  61. package/dist/scripts/1820-204b28ad32-lite.chunk.js +1 -0
  62. package/dist/scripts/1913-fef63b944b-lite.chunk.js +1 -0
  63. package/dist/scripts/1919-7889c92284-lite.chunk.js +1 -0
  64. package/dist/scripts/{1944-23f4b400c6-lite.chunk.js → 1944-b156ae061e-lite.chunk.js} +1 -1
  65. package/dist/scripts/209-f1187b4df2-lite.chunk.js +1 -0
  66. package/dist/scripts/{2118-4e769f5020-lite.chunk.js → 2118-7741e69919-lite.chunk.js} +1 -1
  67. package/dist/scripts/2188-0278da007c-lite.chunk.js +1 -0
  68. package/dist/scripts/2208-1799924a6a-lite.chunk.js +1 -0
  69. package/dist/scripts/2251-519ee9915e-lite.chunk.js +1 -0
  70. package/dist/scripts/2279-d09cf05062-lite.chunk.js +1 -0
  71. package/dist/scripts/{2318-a0fc0fe177-lite.chunk.js → 2318-0eb533e9f6-lite.chunk.js} +1 -1
  72. package/dist/scripts/{6154-05e9ba5525-lite.chunk.js → 2408-04112a0ed3-lite.chunk.js} +1 -1
  73. package/dist/scripts/{7564-b42d4f59a6-lite.chunk.js → 2469-1c69c69857-lite.chunk.js} +1 -1
  74. package/dist/scripts/{9522-f6a3bf5aa5-lite.chunk.js → 2651-1323807150-lite.chunk.js} +1 -1
  75. package/dist/scripts/2703-d8a1c8e6f5-lite.chunk.js +2 -0
  76. package/dist/scripts/2819-a949173a2e-lite.chunk.js +2 -0
  77. package/dist/scripts/3311-808538c9c6-lite.chunk.js +1 -0
  78. package/dist/scripts/{7286-96e1818fd0-lite.chunk.js → 3401-c7a150f32d-lite.chunk.js} +1 -1
  79. package/dist/scripts/{3645-30ba602f0c-lite.chunk.js → 3645-d1313ec6dc-lite.chunk.js} +1 -1
  80. package/dist/scripts/{3667-c9a9052d61-lite.chunk.js → 3667-6ce2b5b14a-lite.chunk.js} +1 -1
  81. package/dist/scripts/3962-3738b0a52e-lite.chunk.js +1 -0
  82. package/dist/scripts/407-1e3ffc6e32-lite.chunk.js +2 -0
  83. package/dist/scripts/4210-66c5d14532-lite.chunk.js +1 -0
  84. package/dist/scripts/{3755-6ed23bfa7a-lite.chunk.js → 4463-49b8d27dbb-lite.chunk.js} +1 -1
  85. package/dist/scripts/4546-050a6f180a-lite.chunk.js +1 -0
  86. package/dist/scripts/4632-74c440dce4-lite.chunk.js +1 -0
  87. package/dist/scripts/{5151-28b95c9098-lite.chunk.js → 4728-8837108457-lite.chunk.js} +1 -1
  88. package/dist/scripts/4754-fe1cbf4ea4-lite.chunk.js +1 -0
  89. package/dist/scripts/487-55f69c7d70-lite.chunk.js +2 -0
  90. package/dist/scripts/{8095-c6901b0fa6-lite.chunk.js → 4956-b0840f1cfa-lite.chunk.js} +1 -1
  91. package/dist/scripts/4972-4eb7102934-lite.chunk.js +1 -0
  92. package/dist/scripts/4973-5df11dd4e8-lite.chunk.js +1 -0
  93. package/dist/scripts/5134-8e129a0a0b-lite.chunk.js +1 -0
  94. package/dist/scripts/5177-ea01e21af3-lite.chunk.js +2 -0
  95. package/dist/scripts/528-8cfebb9254-lite.chunk.js +1 -0
  96. package/dist/scripts/5306-b25542939f-lite.chunk.js +1 -0
  97. package/dist/scripts/536-7c7970277a-lite.chunk.js +2 -0
  98. package/dist/scripts/5379-95b5e191fe-lite.chunk.js +1 -0
  99. package/dist/scripts/5442-82e8147edc-lite.chunk.js +2 -0
  100. package/dist/scripts/5940-54217d5e0d-lite.chunk.js +1 -0
  101. package/dist/scripts/{5555-e227390cc4-lite.chunk.js → 5965-55b2273c41-lite.chunk.js} +1 -1
  102. package/dist/scripts/6086-642813efbe-lite.chunk.js +2 -0
  103. package/dist/scripts/{6158-eaf4e9c1e8-lite.chunk.js → 6158-fc2ae93c2c-lite.chunk.js} +1 -1
  104. package/dist/scripts/6290-b8e7be07c0-lite.chunk.js +1 -0
  105. package/dist/scripts/6347-5fa92cd82e-lite.chunk.js +1 -0
  106. package/dist/scripts/6368-6e322edf00-lite.chunk.js +1 -0
  107. package/dist/scripts/{6433-7b2bd48f40-lite.chunk.js → 6433-8a473c7c44-lite.chunk.js} +2 -2
  108. package/dist/scripts/6683-6a53507e03-lite.chunk.js +2 -0
  109. package/dist/scripts/6746-a32d22602e-lite.chunk.js +1 -0
  110. package/dist/scripts/689-165a5a700c-lite.chunk.js +1 -0
  111. package/dist/scripts/6891-b2c5f27bce-lite.chunk.js +1 -0
  112. package/dist/scripts/{6998-309a16b24e-lite.chunk.js → 6998-43af06b2d9-lite.chunk.js} +1 -1
  113. package/dist/scripts/7052-7ba7299ff2-lite.chunk.js +2 -0
  114. package/dist/scripts/7052-7ba7299ff2-lite.chunk.js.LICENSE.txt +1 -0
  115. package/dist/scripts/{7056-6d3a7715c8-lite.chunk.js → 7056-b2c401e297-lite.chunk.js} +1 -1
  116. package/dist/scripts/7112-02e4fa8fd1-lite.chunk.js +2 -0
  117. package/dist/scripts/7112-02e4fa8fd1-lite.chunk.js.LICENSE.txt +1 -0
  118. package/dist/scripts/7167-9668cb85d2-lite.chunk.js +1 -0
  119. package/dist/scripts/7178-d9ec32d7d3-lite.chunk.js +1 -0
  120. package/dist/scripts/{7293-9edf8dab3b-lite.chunk.js → 7293-aa9c9eeb72-lite.chunk.js} +1 -1
  121. package/dist/scripts/{1830-6aba57235d-lite.chunk.js → 7351-dce910a8f8-lite.chunk.js} +1 -1
  122. package/dist/scripts/7432-d41b2e0039-lite.chunk.js +1 -0
  123. package/dist/scripts/757-67c0765021-lite.chunk.js +1 -0
  124. package/dist/scripts/763-a6b6d996a9-lite.chunk.js +1 -0
  125. package/dist/scripts/{7701-d1233778f2-lite.chunk.js → 7701-791908e1c3-lite.chunk.js} +1 -1
  126. package/dist/scripts/{7703-5b15c739bd-lite.chunk.js → 7703-87cabd69cf-lite.chunk.js} +1 -1
  127. package/dist/scripts/{7708-966b540945-lite.chunk.js → 7708-4dc3fe8aec-lite.chunk.js} +1 -1
  128. package/dist/scripts/7791-45cbec4cb9-lite.chunk.js +2 -0
  129. package/dist/scripts/7791-45cbec4cb9-lite.chunk.js.LICENSE.txt +1 -0
  130. package/dist/scripts/7864-eb01ccb48c-lite.chunk.js +2 -0
  131. package/dist/scripts/7864-eb01ccb48c-lite.chunk.js.LICENSE.txt +1 -0
  132. package/dist/scripts/7877-b7427a8fc3-lite.chunk.js +2 -0
  133. package/dist/scripts/7877-b7427a8fc3-lite.chunk.js.LICENSE.txt +1 -0
  134. package/dist/scripts/8296-61fbedf389-lite.chunk.js +2 -0
  135. package/dist/scripts/8296-61fbedf389-lite.chunk.js.LICENSE.txt +1 -0
  136. package/dist/scripts/{8323-ca8e0d6371-lite.chunk.js → 8323-e2892d3bed-lite.chunk.js} +2 -2
  137. package/dist/scripts/8323-e2892d3bed-lite.chunk.js.LICENSE.txt +1 -0
  138. package/dist/scripts/{5171-8572a352e6-lite.chunk.js → 8364-3f8f3ebbfd-lite.chunk.js} +1 -1
  139. package/dist/scripts/8466-627dcf6218-lite.chunk.js +1 -0
  140. package/dist/scripts/{3987-8a8da439f0-lite.chunk.js → 8469-c872f52295-lite.chunk.js} +1 -1
  141. package/dist/scripts/{1781-a04e438477-lite.chunk.js → 8541-e93ccc1e65-lite.chunk.js} +1 -1
  142. package/dist/scripts/{8771-4530cc4e58-lite.chunk.js → 8771-fdb379457c-lite.chunk.js} +1 -1
  143. package/dist/scripts/8834-bb079c32a4-lite.chunk.js +1 -0
  144. package/dist/scripts/{8873-e305e24d04-lite.chunk.js → 8873-514feb8faa-lite.chunk.js} +1 -1
  145. package/dist/scripts/8905-7e47ba1360-lite.chunk.js +1 -0
  146. package/dist/scripts/8982-267320e287-lite.chunk.js +1 -0
  147. package/dist/scripts/{9016-236a5997d4-lite.chunk.js → 9016-68a0088483-lite.chunk.js} +1 -1
  148. package/dist/scripts/9118-43d2bf9226-lite.chunk.js +1 -0
  149. package/dist/scripts/{6076-d0ab857b36-lite.chunk.js → 9133-d324adda28-lite.chunk.js} +1 -1
  150. package/dist/scripts/{9151-a4b1b99c42-lite.chunk.js → 9151-97d4bda2a9-lite.chunk.js} +1 -1
  151. package/dist/scripts/{9226-8d25ca41f8-lite.chunk.js → 9226-81363cd855-lite.chunk.js} +1 -1
  152. package/dist/scripts/9230-b5f75f4b25-lite.chunk.js +2 -0
  153. package/dist/scripts/9230-b5f75f4b25-lite.chunk.js.LICENSE.txt +1 -0
  154. package/dist/scripts/{9478-6f19948322-lite.chunk.js → 9478-7210139ef4-lite.chunk.js} +2 -2
  155. package/dist/scripts/9478-7210139ef4-lite.chunk.js.LICENSE.txt +1 -0
  156. package/dist/scripts/9516-7437a5a60e-lite.chunk.js +1 -0
  157. package/dist/scripts/9657-3bd86a7f20-lite.chunk.js +1 -0
  158. package/dist/scripts/{4145-8a549f2fd1-lite.chunk.js → 9704-ee574224f3-lite.chunk.js} +1 -1
  159. package/dist/scripts/9719-c890a68331-lite.chunk.js +2 -0
  160. package/dist/scripts/9719-c890a68331-lite.chunk.js.LICENSE.txt +1 -0
  161. package/dist/scripts/{7484-f15261951b-lite.chunk.js → 9871-2573a8bff1-lite.chunk.js} +1 -1
  162. package/dist/scripts/{9894-1e493082b6-lite.chunk.js → 9894-0e66baa841-lite.chunk.js} +1 -1
  163. package/dist/scripts/9894-0e66baa841-lite.chunk.js.LICENSE.txt +1 -0
  164. package/dist/scripts/993-51d56e4686-lite.chunk.js +2 -0
  165. package/dist/scripts/993-51d56e4686-lite.chunk.js.LICENSE.txt +1 -0
  166. package/dist/scripts/bundle-1db2700368.min.js +2 -0
  167. package/package.json +3 -2
  168. package/dist/css/109-lite-e638e5617a.chunk.css +0 -3
  169. package/dist/css/7178-lite-b4e4346f43.chunk.css +0 -3
  170. package/dist/css/8329-lite-1f86f27b10.chunk.css +0 -3
  171. package/dist/css/8978-lite-aa21368531.chunk.css +0 -3
  172. package/dist/scripts/109-c94f9ee532-lite.chunk.js +0 -1
  173. package/dist/scripts/1366-9085be8f1d-lite.chunk.js +0 -2
  174. package/dist/scripts/1672-18d6a86a04-lite.chunk.js +0 -2
  175. package/dist/scripts/1820-d34eefdad4-lite.chunk.js +0 -1
  176. package/dist/scripts/1913-00de345658-lite.chunk.js +0 -1
  177. package/dist/scripts/209-d5def5db16-lite.chunk.js +0 -1
  178. package/dist/scripts/2208-c345263710-lite.chunk.js +0 -1
  179. package/dist/scripts/2269-48415bbc64-lite.chunk.js +0 -1
  180. package/dist/scripts/2279-02a72d36ec-lite.chunk.js +0 -1
  181. package/dist/scripts/2608-5af270eedf-lite.chunk.js +0 -1
  182. package/dist/scripts/2743-deafaa1681-lite.chunk.js +0 -1
  183. package/dist/scripts/275-ba99531836-lite.chunk.js +0 -1
  184. package/dist/scripts/3371-bb9a674c07-lite.chunk.js +0 -1
  185. package/dist/scripts/3446-f8a4d517dd-lite.chunk.js +0 -1
  186. package/dist/scripts/3488-dd8581e604-lite.chunk.js +0 -2
  187. package/dist/scripts/3706-482b7bb8d2-lite.chunk.js +0 -2
  188. package/dist/scripts/3865-f7e73fec9c-lite.chunk.js +0 -1
  189. package/dist/scripts/3962-3dcedae047-lite.chunk.js +0 -1
  190. package/dist/scripts/4373-388f025686-lite.chunk.js +0 -1
  191. package/dist/scripts/4417-1ef8363302-lite.chunk.js +0 -1
  192. package/dist/scripts/4632-ac71090d0d-lite.chunk.js +0 -1
  193. package/dist/scripts/5134-5a2efd579d-lite.chunk.js +0 -1
  194. package/dist/scripts/519-4140367219-lite.chunk.js +0 -1
  195. package/dist/scripts/528-9a6deb93d3-lite.chunk.js +0 -1
  196. package/dist/scripts/5659-176b355d0b-lite.chunk.js +0 -1
  197. package/dist/scripts/6290-337e7cf0ba-lite.chunk.js +0 -1
  198. package/dist/scripts/6368-632bb31d55-lite.chunk.js +0 -1
  199. package/dist/scripts/6609-433a3003e6-lite.chunk.js +0 -1
  200. package/dist/scripts/689-30388920c3-lite.chunk.js +0 -1
  201. package/dist/scripts/6957-691d6fbdc7-lite.chunk.js +0 -1
  202. package/dist/scripts/7052-ff6e30ba46-lite.chunk.js +0 -2
  203. package/dist/scripts/7112-25e9780c3f-lite.chunk.js +0 -2
  204. package/dist/scripts/7164-6489adf352-lite.chunk.js +0 -1
  205. package/dist/scripts/7178-3c36d6ca9f-lite.chunk.js +0 -1
  206. package/dist/scripts/7432-ed0fdcb18c-lite.chunk.js +0 -1
  207. package/dist/scripts/817-fc0acd6208-lite.chunk.js +0 -1
  208. package/dist/scripts/8236-10fe50cf1f-lite.chunk.js +0 -1
  209. package/dist/scripts/8329-db3ca45cb6-lite.chunk.js +0 -2
  210. package/dist/scripts/8367-6946446a01-lite.chunk.js +0 -1
  211. package/dist/scripts/8466-2c58de04c4-lite.chunk.js +0 -1
  212. package/dist/scripts/8564-3183d8595c-lite.chunk.js +0 -1
  213. package/dist/scripts/8905-039126dc2f-lite.chunk.js +0 -1
  214. package/dist/scripts/8978-2cb6319c36-lite.chunk.js +0 -2
  215. package/dist/scripts/9118-53bed185a5-lite.chunk.js +0 -1
  216. package/dist/scripts/9581-41cb8eba5b-lite.chunk.js +0 -1
  217. package/dist/scripts/9714-f8d16adc4e-lite.chunk.js +0 -1
  218. package/dist/scripts/9869-87a902e2d1-lite.chunk.js +0 -2
  219. package/dist/scripts/bundle-d66378a758.min.js +0 -2
  220. /package/dist/css/{2743-lite-ab01f5dc3b.chunk.css → 1919-lite-ab01f5dc3b.chunk.css} +0 -0
  221. /package/dist/css/{3706-lite-8601f9a468.chunk.css → 5177-lite-8601f9a468.chunk.css} +0 -0
  222. /package/dist/css/{8367-lite-a3507f7491.chunk.css → 5940-lite-a3507f7491.chunk.css} +0 -0
  223. /package/dist/css/{3865-lite-a288188c68.chunk.css → 6891-lite-a288188c68.chunk.css} +0 -0
  224. /package/dist/css/{6609-lite-08c053955f.chunk.css → 9657-lite-08c053955f.chunk.css} +0 -0
  225. /package/dist/scripts/{1285-2d3299c556-lite.chunk.js → 1285-7e8f858b90-lite.chunk.js} +0 -0
  226. /package/dist/scripts/{1366-9085be8f1d-lite.chunk.js.LICENSE.txt → 1426-94857a953c-lite.chunk.js.LICENSE.txt} +0 -0
  227. /package/dist/scripts/{1518-eaabe78385-lite.chunk.js → 1518-0ea2791c37-lite.chunk.js} +0 -0
  228. /package/dist/scripts/{1672-18d6a86a04-lite.chunk.js.LICENSE.txt → 1672-9ae25f79a6-lite.chunk.js.LICENSE.txt} +0 -0
  229. /package/dist/scripts/{1725-2eb898f9e6-lite.chunk.js → 1725-0e284a32f3-lite.chunk.js} +0 -0
  230. /package/dist/scripts/{1750-dd4c1bf3fc-lite.chunk.js → 1750-82cf9361fb-lite.chunk.js} +0 -0
  231. /package/dist/scripts/{2118-4e769f5020-lite.chunk.js.LICENSE.txt → 1805-05413695af-lite.chunk.js.LICENSE.txt} +0 -0
  232. /package/dist/scripts/{1863-e2e84114ee-lite.chunk.js → 1863-8f826ffb83-lite.chunk.js} +0 -0
  233. /package/dist/scripts/{1891-c0e59b8132-lite.chunk.js → 1891-dd253c3378-lite.chunk.js} +0 -0
  234. /package/dist/scripts/{3488-dd8581e604-lite.chunk.js.LICENSE.txt → 2118-7741e69919-lite.chunk.js.LICENSE.txt} +0 -0
  235. /package/dist/scripts/{3645-30ba602f0c-lite.chunk.js.LICENSE.txt → 2703-d8a1c8e6f5-lite.chunk.js.LICENSE.txt} +0 -0
  236. /package/dist/scripts/{2767-5df93b7c43-lite.chunk.js → 2767-299f58bb17-lite.chunk.js} +0 -0
  237. /package/dist/scripts/{3667-c9a9052d61-lite.chunk.js.LICENSE.txt → 2819-a949173a2e-lite.chunk.js.LICENSE.txt} +0 -0
  238. /package/dist/scripts/{3020-923bf44c9b-lite.chunk.js → 3020-6f39be646f-lite.chunk.js} +0 -0
  239. /package/dist/scripts/{3108-ae911e3d71-lite.chunk.js → 3108-86d4c73e29-lite.chunk.js} +0 -0
  240. /package/dist/scripts/{3171-663aa64cae-lite.chunk.js → 3171-9eda288c67-lite.chunk.js} +0 -0
  241. /package/dist/scripts/{3468-4d7076a979-lite.chunk.js → 3468-8926a9db70-lite.chunk.js} +0 -0
  242. /package/dist/scripts/{3706-482b7bb8d2-lite.chunk.js.LICENSE.txt → 3645-d1313ec6dc-lite.chunk.js.LICENSE.txt} +0 -0
  243. /package/dist/scripts/{6433-7b2bd48f40-lite.chunk.js.LICENSE.txt → 3667-6ce2b5b14a-lite.chunk.js.LICENSE.txt} +0 -0
  244. /package/dist/scripts/{389-e7037a0807-lite.chunk.js → 389-2ab260e7d2-lite.chunk.js} +0 -0
  245. /package/dist/scripts/{7052-ff6e30ba46-lite.chunk.js.LICENSE.txt → 407-1e3ffc6e32-lite.chunk.js.LICENSE.txt} +0 -0
  246. /package/dist/scripts/{4182-2de6622588-lite.chunk.js → 4182-6869dfda31-lite.chunk.js} +0 -0
  247. /package/dist/scripts/{4541-c08f765eab-lite.chunk.js → 4541-9ad274071e-lite.chunk.js} +0 -0
  248. /package/dist/scripts/{4617-3f998d9b1e-lite.chunk.js → 4617-940157b232-lite.chunk.js} +0 -0
  249. /package/dist/scripts/{4690-57efd6540e-lite.chunk.js → 4690-40f41af539-lite.chunk.js} +0 -0
  250. /package/dist/scripts/{482-8139ae4723-lite.chunk.js → 482-c9fd7b68d3-lite.chunk.js} +0 -0
  251. /package/dist/scripts/{7112-25e9780c3f-lite.chunk.js.LICENSE.txt → 487-55f69c7d70-lite.chunk.js.LICENSE.txt} +0 -0
  252. /package/dist/scripts/{8323-ca8e0d6371-lite.chunk.js.LICENSE.txt → 5177-ea01e21af3-lite.chunk.js.LICENSE.txt} +0 -0
  253. /package/dist/scripts/{5229-7329bd81e6-lite.chunk.js → 5229-fed729d13a-lite.chunk.js} +0 -0
  254. /package/dist/scripts/{8329-db3ca45cb6-lite.chunk.js.LICENSE.txt → 536-7c7970277a-lite.chunk.js.LICENSE.txt} +0 -0
  255. /package/dist/scripts/{5385-f53e603625-lite.chunk.js → 5385-2719aaaf84-lite.chunk.js} +0 -0
  256. /package/dist/scripts/{8978-2cb6319c36-lite.chunk.js.LICENSE.txt → 5442-82e8147edc-lite.chunk.js.LICENSE.txt} +0 -0
  257. /package/dist/scripts/{5595-5ee4c1c5ed-lite.chunk.js → 5595-ed6e8d9ca0-lite.chunk.js} +0 -0
  258. /package/dist/scripts/{5606-2596d38d1b-lite.chunk.js → 5606-68f1afd060-lite.chunk.js} +0 -0
  259. /package/dist/scripts/{5877-0acd7d3124-lite.chunk.js → 5877-1dc9ca4f2d-lite.chunk.js} +0 -0
  260. /package/dist/scripts/{6057-a8b9812431-lite.chunk.js → 6057-3c43af21b1-lite.chunk.js} +0 -0
  261. /package/dist/scripts/{9478-6f19948322-lite.chunk.js.LICENSE.txt → 6086-642813efbe-lite.chunk.js.LICENSE.txt} +0 -0
  262. /package/dist/scripts/{6274-f3769a7518-lite.chunk.js → 6274-bd0f8f77cb-lite.chunk.js} +0 -0
  263. /package/dist/scripts/{9869-87a902e2d1-lite.chunk.js.LICENSE.txt → 6433-8a473c7c44-lite.chunk.js.LICENSE.txt} +0 -0
  264. /package/dist/scripts/{6450-1b69ecb4d2-lite.chunk.js → 6450-0bde4cef33-lite.chunk.js} +0 -0
  265. /package/dist/scripts/{6465-7a63bc80b6-lite.chunk.js → 6465-5b42f81416-lite.chunk.js} +0 -0
  266. /package/dist/scripts/{6480-3e17c41241-lite.chunk.js → 6480-93ab348bf1-lite.chunk.js} +0 -0
  267. /package/dist/scripts/{9894-1e493082b6-lite.chunk.js.LICENSE.txt → 6683-6a53507e03-lite.chunk.js.LICENSE.txt} +0 -0
  268. /package/dist/scripts/{6689-ec5171ba5f-lite.chunk.js → 6689-65a1b86bb2-lite.chunk.js} +0 -0
  269. /package/dist/scripts/{6863-5dbc85c4b9-lite.chunk.js → 6863-d4f402b72e-lite.chunk.js} +0 -0
  270. /package/dist/scripts/{7128-87b101d7b7-lite.chunk.js → 7128-bb219eed51-lite.chunk.js} +0 -0
  271. /package/dist/scripts/{7172-7dadcbf10c-lite.chunk.js → 7172-7710a90e85-lite.chunk.js} +0 -0
  272. /package/dist/scripts/{7338-e0306c666f-lite.chunk.js → 7338-a5d6a68d8e-lite.chunk.js} +0 -0
  273. /package/dist/scripts/{7715-b21edc60f0-lite.chunk.js → 7715-4f575c978b-lite.chunk.js} +0 -0
  274. /package/dist/scripts/{7855-4598a122c5-lite.chunk.js → 7855-80d224d718-lite.chunk.js} +0 -0
  275. /package/dist/scripts/{7925-c8cd8aace8-lite.chunk.js → 7925-29ca2fc37a-lite.chunk.js} +0 -0
  276. /package/dist/scripts/{8025-1982900b56-lite.chunk.js → 8025-0ef8f041ea-lite.chunk.js} +0 -0
  277. /package/dist/scripts/{8830-16c2fd1319-lite.chunk.js → 8830-122c8ae807-lite.chunk.js} +0 -0
  278. /package/dist/scripts/{9016-236a5997d4-lite.chunk.js.LICENSE.txt → 9016-68a0088483-lite.chunk.js.LICENSE.txt} +0 -0
  279. /package/dist/scripts/{9060-aea36d49b0-lite.chunk.js → 9060-c035711b40-lite.chunk.js} +0 -0
  280. /package/dist/scripts/{9455-283f477332-lite.chunk.js → 9455-c80c14ea98-lite.chunk.js} +0 -0
  281. /package/dist/scripts/{9674-25ccc9ee52-lite.chunk.js → 9674-f5e66f8c06-lite.chunk.js} +0 -0
  282. /package/dist/scripts/{9843-d084ed32bf-lite.chunk.js → 9843-07f0304cc4-lite.chunk.js} +0 -0
  283. /package/dist/scripts/{bundle-d66378a758.min.js.LICENSE.txt → bundle-1db2700368.min.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 5177-ea01e21af3-lite.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5177],{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:()=>P,R:()=>O});var r=n(32735),i=n(39202),o=n(97395),a=n(49985),s=n(65858),c=n(36848),u=n(78276),l=n(76177),f=n(71063),h=n(54610),p=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:h.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:h.h2.Medium,resizeType:h.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?h.__.Pdf:e.metadata.type===d.L.Image?h.__.Thumbnails:(null===(t=e.pdf)||void 0===t?void 0:t.url)?h.__.Pdf:(e.metadata.type,d.L.Zip,h.__.Thumbnails):h.__.Link}function P(e){var t,n,i,o,a,c,f,h=null,p=0;"metadata"in e.data&&(h=e.data.metadata,p=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==h?void 0:h.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(p,"deg)")},alt:e.data.name,analyticsOptions:{location:s.LZ.SlidingListItem},errorFallbackImageSrc:e.imageErrorFallbackUrl,imageClassName:(null==h?void 0:h.type)===d.L.Image?"".concat(b.imageTypeResource," ").concat(b.imageStyle):"",preload:e.preloadImage,preventLoad:!e.preloadImage})))}P.defaultProps={preloadImage:!0,actionBehaviour:"normal"};var O=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,[]),h=(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===p.E.Resource?s.py.Resource:s.py.Link});function m(){a.k.logUserAction(v,g)}var w,O=!!e.data.url;return l.applyHoverState=h||O,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(P,Object.assign({},l))):h?"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(P,Object.assign({},l))):r.createElement(c.F,{appLink:e.getAppLink(e.data),className:w,analyticsData:v,analyticsOptions:g},r.createElement(P,Object.assign({},l))):O?r.createElement("a",{href:e.data.url,className:w,onClick:m},r.createElement(P,Object.assign({},l))):r.createElement("div",{className:w},r.createElement(P,Object.assign({},l)))))}))},65100:(e,t,n)=>{n.r(t),n.d(t,{ClickViewPlayer:()=>zn});var r=n(32735),i=n(51482),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(){return u="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=f(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}},u.apply(this,arguments)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var h=function(e){!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&&l(e,t)}(c,e);var t,n,r,i,o=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(i){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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)}(this,e)});function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(e=o.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=c,(n=[{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(){u(f(c.prototype),"handleClick",this).call(this,null)}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Z.getComponent("Button"));function p(e){return p="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},p(e)}function d(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"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:String(t)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}h.prototype.controlText_="Create Clip",o.Z.registerComponent("CreateClipButton",h);var g=function(e){!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)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(r);if(i){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===p(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)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=a,(n=[{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)}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));function m(e){return m="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},m(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P(r.key),r)}}function P(e){var t=function(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:String(t)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}o.Z.registerPlugin("createClipButtonPlugin",g);var k=function(e){!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)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(r);if(i){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===m(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)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("PictureInPictureToggle"));function j(e){return j="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},j(e)}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E(r.key),r)}}function E(e){var t=function(e,t){if("object"!=j(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==j(t)?t:String(t)}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=I(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 x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}o.Z.registerComponent("PictureInPictureToggle",k);var _=o.Z.getComponent("PlayToggle"),R=function(e){!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&&x(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=I(r);if(i){var n=I(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===j(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)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).pictureInPictureEnabled=!1,n.options=t,n.bindFunctions(),n}return t=a,(n=[{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 _(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,T(I(a.prototype),"dispose",this).call(this)}}])&&C(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("pictureInPicture",R);var M=n(23035),L=n(42892),D=n(73758);function N(e){return N="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},N(e)}function A(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,V(r.key),r)}}function V(e){var t=function(e,t){if("object"!=N(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==N(t)?t:String(t)}function B(){return B="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=Z(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}},B.apply(this,arguments)}function F(e,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},F(e,t)}function U(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Z(e)}var z=function(e){!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&&F(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Z(r);if(i){var n=Z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===N(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return U(e)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).hasBuffered=!1,n.hasPlayed=!1,n.eventsService=D.n,n.pointOfInterest=t.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(U(n)),n.onMouseLeave=n.onMouseLeave.bind(U(n)),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(U(n)),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(U(n)),n.initialize(),n}return t=s,(n=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(B(Z(s.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return B(Z(s.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{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")}}])&&A(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("Component"));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,H(r.key),r)}}function H(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 Y(){return Y="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=$(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Y.apply(this,arguments)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}var Q=function(e){!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&&W(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$(r);if(i){var n=$(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===G(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).pointsOfInterestVisible=t.pointsOfInterestVisible,n.toggle(n.pointsOfInterestVisible),n}return t=s,(n=[{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,t,n){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 r=Y($(s.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>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&q(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuItem"));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 J(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,K(r.key),r)}}function K(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 ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}function te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ne(e){return ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ne(e)}o.Z.registerComponent("PointsOfInterestMenuItem",Q);var re=o.Z.getPlugin("plugin"),ie="cvplayer-points-of-interest",oe=function(e){!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&&ee(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ne(r);if(i){var n=ne(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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 te(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e)).pointOfInterestIndicators=[],n.enabled=!0,n.pointsOfInterest=null==t?void 0:t.pointsOfInterest,n.initialize=n.initialize.bind(te(n)),n.updateBuffered=n.updateBuffered.bind(te(n)),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(te(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return t=a,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(L.S.hasLocalStorage()&&"false"===L.S.get(ie)&&(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){L.S.set(ie,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 z(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:Q,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered((0,M.b)(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])&&J(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(re);o.Z.registerPlugin("pointsOfInterestPlugin",oe),n(93262);var ae=n(65858),se=n(86086),ce=n(12399),ue=n(6156);function le(e){return le="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},le(e)}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,he(r.key),r)}}function he(e){var t=function(e,t){if("object"!=le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==le(t)?t:String(t)}var pe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions()}var t,n;return t=e,(n=[{key:"bindFunctions",value:function(){this.schedule=this.schedule.bind(this),this.every=this.every.bind(this),this.trigger=this.trigger.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this)}},{key:"schedule",value:function(e){return this.task=e,this}},{key:"every",value:function(e){return this.intervalInMilliseconds=e,this}},{key:"trigger",value:function(){var e;return null===(e=this.task)||void 0===e||e.call(this,this),this}},{key:"start",value:function(){var e=this;return this.intervalId||(this.intervalId=setInterval((function(){return e.trigger()}),this.intervalInMilliseconds)),this}},{key:"stop",value:function(){return this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this}}])&&fe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function de(e){return de="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},de(e)}function ye(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,ve(r.key),r)}}function ve(e){var t=function(e,t){if("object"!=de(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=de(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==de(t)?t:String(t)}var be={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},ge=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be;!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({},be),r),this.webSocket=this.connect(),this.heartbeat=(new pe).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()}}])&&ye(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),me=n(95569),we=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()},Pe=n(35884);function Oe(e){return Oe="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},Oe(e)}function Se(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,ke(r.key),r)}}function ke(e){var t=function(e,t){if("object"!=Oe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Oe(t)?t:String(t)}var je,Ce=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=Pe.l.withDebouncedSetters(this,2e3),Pe.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}}])&&Se(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();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(){Te=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 h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(_([])));O&&O!==n&&r.call(O,a)&&(w=O);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"==Ee(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=h;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=E(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===h)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:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function E(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,E(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 T(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function _(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(Ee(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=_,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(x),!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),x(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;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ie(r.key),r)}}function Ie(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 _e(){return _e="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=Me(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},_e.apply(this,arguments)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}function Me(e){return Me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Me(e)}!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"}(je||(je={}));var Le=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())}))},De=function(e){!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&&Re(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Me(r);if(i){var n=Me(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this)).client=e,n.localState=new Ce(t.title,t.device),n.bindFunctions(),n.initialize(),n}return t=a,(n=[{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)})),_e(Me(a.prototype),"dispose",this).call(this)}},{key:"handleClientConnected",value:function(){return Le(this,void 0,void 0,Te().mark((function e(){return Te().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 je.Update:this.handleUpdateMessage(t,n);break;case je.NewChapter:this.handleNewChapterMessage(t,n);break;case je.Volume:this.handleVolumeMessage(t,n);break;case je.Playing:this.handlePlayingMessage(t);break;case je.Paused:this.handlePausedMessage(t);break;case je.Finished:this.handleFinishedMessage(t);break;case je.Stopped:this.handleStoppedMessage()}}},{key:"handleUpdateMessage",value:function(e,t){e.duration!==t.duration&&(e.duration=t.duration,this.trigger("durationchange",ue.j.void)),e.position!==t.position&&(e.position=t.position,this.trigger("positionchange",ue.j.void)),e.subtitles!==t.subtitles&&(e.subtitles=t.subtitles,this.trigger("subtitleschange",ue.j.void))}},{key:"handleVolumeMessage",value:function(e,t){e.volume!==t.level&&(e.volume=t.level,e.mute=0===t.level,this.trigger("volumechange",ue.j.void))}},{key:"handlePlayingMessage",value:function(e){!0!==e.playing&&(e.playing=!0,e.playbackFinished=!1,this.trigger("playingchange",ue.j.void))}},{key:"handlePausedMessage",value:function(e){!1!==e.playing&&(e.playing=!1,this.trigger("playingchange",ue.j.void))}},{key:"handleFinishedMessage",value:function(e){!0!==e.playbackFinished&&(e.playing=!1,e.playbackFinished=!0,this.trigger("playingchange",ue.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",ue.j.void))}},{key:"handleStoppedMessage",value:function(){this.dispose()}},{key:"loadSource",value:function(e,t){return Le(this,void 0,void 0,Te().mark((function n(){var r,i;return Te().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",ue.j.void),i>0&&this.client.seek(r,i),n.next=21;break;case 17:n.prev=17,n.t0=n.catch(2),console.error(n.t0),this.trigger("error",new Error("Could not load video on Vivi device"));case 21:case"end":return n.stop()}}),n,this,[[2,17]])})))}},{key:"play",value:function(){this.localState.ready&&!0!==this.localState.playing&&(this.localState.playing=!0,this.client.play(this.getDevice().id),this.trigger("playingchange",ue.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",ue.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",ue.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",ue.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",ue.j.void))}},{key:"setSubtitles",value:function(e){return Le(this,void 0,void 0,Te().mark((function t(){var n;return Te().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",ue.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}}])&&xe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(ue.N);function Ne(e){return Ne="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},Ne(e)}function Ae(){Ae=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 h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(_([])));O&&O!==n&&r.call(O,a)&&(w=O);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"==Ne(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=h;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=E(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===h)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:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function E(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,E(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 T(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function _(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(Ne(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=_,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(x),!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),x(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;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Ve(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,Be(r.key),r)}}function Be(e){var t=function(e,t){if("object"!=Ne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ne(t)?t:String(t)}function Fe(){return Fe="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=Ze(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}},Fe.apply(this,arguments)}function Ue(e,t){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ue(e,t)}function Ze(e){return Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ze(e)}var ze=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())}))},Ge=1e4,qe=function(e){!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&&Ue(e,t)}(s,e);var t,n,r,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ze(i);if(o){var n=Ze(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ne(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)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).options=e,t.accessToken="",t.devices=[],t.devicesFingerprint="",t.deviceDiscovery=new pe,t.bindFunctions(),t.initialize(),t}return t=s,r=[{key:"createAckId",value:function(){return we()}},{key:"calculateFingerprint",value:function(e){return e.map((function(e){return e.id})).sort().join(",")}}],(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.sendMessage=this.sendMessage.bind(this),this.sendMessageDebounced=(0,me.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 ge(this.options.url.toString()),this.webSocket.onMessage=function(t){return e.trigger("message",JSON.parse(t.data))},this.webSocket.onOpen=function(){return ze(e,void 0,void 0,Ae().mark((function e(){return Ae().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",ue.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 ze(e,void 0,void 0,Ae().mark((function e(){var t,n;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getRoomList();case 3:if(t=e.sent,(n=s.calculateFingerprint(t))!==this.devicesFingerprint){e.next=7;break}return e.abrupt("return");case 7:this.devices=t.map((function(e){return{id:e.id,name:e.name,type:ce.Y.Vivi,status:ce.L.Available}})),this.devicesFingerprint=n,this.trigger("deviceschange",ue.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(),Fe(Ze(s.prototype),"dispose",this).call(this)}},{key:"canCastToDevice",value:function(e){return e===ce.Y.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new De(this,e)}},{key:"authenticateWithVivi",value:function(){return ze(this,void 0,void 0,Ae().mark((function e(){return Ae().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(Ge).catch((function(){throw new Error("Failed to authenticate with Vivi")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getRoomList",value:function(){return ze(this,void 0,void 0,Ae().mark((function e(){var t;return Ae().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(Ge).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 ze(this,void 0,void 0,Ae().mark((function t(){return Ae().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(Ge).catch((function(){throw new Error("Failed to join room")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"query",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){var n;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:n,name:"query"}}),t.next=4,this.one("message",(function(e){return e.message.ack_id===n})).timeout(Ge).catch((function(){throw new Error("Failed to fetch query")}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"loadQueue",value:function(e){var t=e.roomId,n=e.title,r=e.videoSource,i=e.subtitleSource;return ze(this,void 0,void 0,Ae().mark((function e(){return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:t,message:{type:"message_with_ack",ack_id:s.createAckId(),name:"queue_load",payload:{urls:[{title:n,url:r,suburl:i}]}}}),e.next=3,this.one("message",(function(e){var n;return e.source===t&&"ready"===(null===(n=e.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to load media")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"play",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){return Ae().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(Ge).catch((function(){throw new Error("Failed to play video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"pause",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){return Ae().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(Ge).catch((function(){throw new Error("Failed to pause video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"stop",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){return Ae().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(Ge).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 ze(this,void 0,void 0,Ae().mark((function n(){return Ae().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(Ge).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 ze(this,void 0,void 0,Ae().mark((function n(){return Ae().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(Ge).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 ze(this,void 0,void 0,Ae().mark((function n(){return Ae().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(Ge).catch((function(){throw new Error("Failed to set mute")}));case 3:case"end":return n.stop()}}),n,this)})))}},{key:"setSubtitles",value:function(e,t){return ze(this,void 0,void 0,Ae().mark((function n(){var r;return Ae().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=s.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:r,name:"set_subtitles",payload:{subtitles:t}}}),n.next=4,this.one("message",(function(t){return t.source===e&&t.message.ack_id===r})).timeout(Ge).catch((function(){throw new Error("Failed to set subtitles")}));case 4:case"end":return n.stop()}}),n,this)})))}}])&&Ve(t.prototype,n),r&&Ve(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(ue.N);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 Ye(e){return function(e){if(Array.isArray(e))return We(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 We(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)?We(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 We(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 $e(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,Qe(r.key),r)}}function Qe(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 Xe(){return Xe="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}},Xe.apply(this,arguments)}function Je(e,t){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Je(e,t)}function Ke(e){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ke(e)}var et=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Je(e,t)}(s,e);var t,n,r,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ke(i);if(o){var n=Ke(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).instanceId=e,t.clients=[],t.bindFunctions(),t}return t=s,r=[{key:"getOrCreateInstance",value:function(e){if(!e)throw new Error("instanceId is required");return this.instances[e]||(this.instances[e]=new s(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}}],(n=[{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(Ye(e),Ye(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=[],Xe(Ke(s.prototype),"dispose",this).call(this)}}])&&$e(t.prototype,n),r&&$e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(ue.N);et.instances={};var tt=n(30050),nt=n(98115);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(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,ot(r.key),r)}}function ot(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 at(){return at="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=ut(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}},at.apply(this,arguments)}function st(e,t){return st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},st(e,t)}function ct(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ut(e){return ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ut(e)}var lt=function(e){!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&&st(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ut(r);if(i){var n=ut(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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 ct(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).isVisible=n.isVisible.bind(ct(n)),n}return t=a,(n=[{key:"createEl",value:function(){return at(ut(a.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(){at(ut(a.prototype),"show",this).call(this)}},{key:"hide",value:function(){at(ut(a.prototype),"hide",this).call(this)}},{key:"isVisible",value:function(){return!at(ut(a.prototype),"hasClass",this).call(this,"vjs-hidden")}}])&&it(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("MenuItem"));function ft(e){return ft="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},ft(e)}function ht(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"!=ft(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ft(t)?t:String(t)}function dt(){return dt="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=vt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},dt.apply(this,arguments)}function yt(e,t){return yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yt(e,t)}function vt(e){return vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vt(e)}var bt=o.Z.getComponent("MenuButton"),gt=function(e){!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&&yt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=vt(r);if(i){var n=vt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ft(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)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).alwaysCollapsed=!1,n.isCollapsed=!1,n.isCollabsible=!0,n.className="cv-devices-menu-button",n.searchText="",n.devices=[],n.castSession=void 0,n.bindFunctions(),n.bindEventListeners(),n}return t=a,n=[{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.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(){t.removeEventListener("blur",n)}))}},{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=bt.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(dt(vt(a.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=this,t=[];return this.headingItem=new tt.Z(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new nt.Z(this.player_,{menuButton:this,search:function(t){return e.setSearchText(t)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new nt.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;dt(vt(a.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 lt}))}},{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 lt(t.player(),{id:e.id,label:e.name,selected:!1,multiSelectable:!1,selectable:!0,available:e.status===ce.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.headingItem.hide(),this.searchInputItem.show(),this.menu.addClass("vertical-fill")):(this.headingItem.show(),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===ce.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(){dt(vt(a.prototype),"handleClick",this).call(this,null),this.options_.onClick()}}],n&&ht(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(bt);gt.prototype.controlText_="Devices",o.Z.registerComponent("DevicesButton",gt);var mt=n(10463);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 Pt(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,Ot(r.key),r)}}function Ot(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)}function St(){return St="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=jt(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}},St.apply(this,arguments)}function kt(e,t){return kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kt(e,t)}function jt(e){return jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jt(e)}var Ct=function(e){!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&&kt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=jt(r);if(i){var n=jt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===wt(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)}(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,null,e)}return t=a,(n=[{key:"createEl",value:function(){return St(jt(a.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:ce.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(){}}])&&Pt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("Component"));function Et(e){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Et(e)}function Tt(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,xt(r.key),r)}}function xt(e){var t=function(e,t){if("object"!=Et(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Et(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Et(t)?t:String(t)}function It(){return It="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=Rt(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}},It.apply(this,arguments)}function _t(e,t){return _t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_t(e,t)}function Rt(e){return Rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rt(e)}var Mt=function(e){!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&&_t(e,t)}(c,e);var t,n,r,i,a,s=(i=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Rt(i);if(a){var n=Rt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Et(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)}(this,e)});function c(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(n=s.call(this,e,t)).featuresVolumeControl=!0,n.featuresPlaybackRate=!1,n.movingMediaElementInDOM=!1,n.featuresFullscreenResize=!0,n.featuresTimeupdateEvents=!0,n.featuresProgressEvents=!1,n.featuresNativeTextTracks=!1,n.featuresNativeAudioTracks=!1,n.featuresNativeVideoTracks=!1,n.featuresMuteControl=!0,n.featuresSourceset=!1,n.videojsPlayer=(0,o.Z)(n.options_.playerId),n.bindFunctions(),n.bindEventListeners(),n.ready((function(){n.setSource(n.options_.source)})),n.triggerReady(),n}return t=c,r=[{key:"canPlayType",value:function(){return""}},{key:"canPlaySource",value:function(e,t){var n;return!!et.getOrCreateInstance(null!==(n=null==t?void 0:t.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return et.isActive()}}],(n=[{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 mt.O.findTrackByPredicate(this.videojsPlayer.player_,(function(e){return"showing"===e.mode&&!!e.src}))}},{key:"setSelectedTextTrack",value:function(e){mt.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(),It(Rt(c.prototype),"cleanupAutoTextTracks",this).call(this),It(Rt(c.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){var e=this;return this.ui=this.ui||new Ct({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 It(Rt(c.prototype),"addRemoteTextTrack",this).call(this,e,!0)}},{key:"getCastSession",value:function(){var e;return et.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(){}}])&&Tt(t.prototype,n),r&&Tt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Z.getComponent("Tech"));function Lt(e){return Lt="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},Lt(e)}function Dt(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,Nt(r.key),r)}}function Nt(e){var t=function(e,t){if("object"!=Lt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Lt(t)?t:String(t)}function At(){return At="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=Bt(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}},At.apply(this,arguments)}function Vt(e,t){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vt(e,t)}function Bt(e){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bt(e)}o.Z.registerTech("devices",Mt);var Ft=function(e){!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&&Vt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Bt(r);if(i){var n=Bt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Lt(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)}(this,e)});function a(e,t){var n,r,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,n.instanceId=null!==(i=null===(r=n.player.options_.devices)||void 0===r?void 0:r.instanceId)&&void 0!==i?i:"",n.bindFunctions(),n.initialize(),n}return t=a,(n=[{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=this.getSessionManager();if(t&&n&&-1!==n&&r){r.on("deviceschange",this.onDevicesChanged),r.on("castsessionchange",this.onCastSessionChanged),r.on("error",this.onDevicesError);var i={onClick:function(){e.addViviClient(r),e.addAppleTvClient(r)},onDeviceMenuItemClick:function(t,n){var i;r.startCastSession({device:n,title:e.options.title}),null===(i=e.options.analyticsService)||void 0===i||i.logUserAction({device:n},{actionType:ae.Vw.Play,workflowPhase:ae.eu.Complete,descriptor:ae.UX.CastToDevice})}};this.devicesButton=t.addChild("DevicesButton",i,n+1)}}},{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(ce.Y.AppleTv)),this.player.removeClass("cv-device-".concat(ce.Y.Vivi)))}},{key:"onDevicesError",value:function(e){this.player.error(e.message),this.player.pause()}},{key:"addViviClient",value:function(e){if(this.options.viviEnabled&&this.options.viviApi&&this.options.fetchViviAccessToken&&!e.hasInstanceOfClient(qe)){var t=new qe({url:this.options.viviApi,fetchAccessToken:this.options.fetchViviAccessToken});e.addClient(t)}}},{key:"addAppleTvClient",value:function(e){if(this.options.appleTvEnabled&&this.options.fetchOnlineApiAccessToken&&this.options.trackingCode&&this.options.userId&&!e.hasInstanceOfClient(se.w)){var t=new se.w({fetchAccessToken:this.options.fetchOnlineApiAccessToken,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 et.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),et.disposeAndRemoveInstance(e),At(Bt(a.prototype),"dispose",this).call(this))}}])&&Dt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));function Ut(e){return Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ut(e)}function Zt(){Zt=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 h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(_([])));O&&O!==n&&r.call(O,a)&&(w=O);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"==Ut(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=h;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=E(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===h)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:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function E(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,E(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 T(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function _(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(Ut(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=_,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(x),!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),x(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;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function zt(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 Gt(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,qt(r.key),r)}}function qt(e){var t=function(e,t){if("object"!=Ut(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ut(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ut(t)?t:String(t)}function Ht(){return Ht="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=Wt(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}},Ht.apply(this,arguments)}function Yt(e,t){return Yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yt(e,t)}function Wt(e){return Wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wt(e)}o.Z.registerPlugin("devicesPlugin",Ft);var $t=function(e){!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&&Yt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Wt(r);if(i){var n=Wt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ut(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)}(this,e)});function a(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e,t)}return t=a,(n=[{key:"getPlayerOptions",value:function(){var e,t=Ht(Wt(a.prototype),"getPlayerOptions",this).call(this);return this.areDevicesEnabled()?Object.assign(Object.assign({},t),{techOrder:["devices"].concat((e=t.techOrder,function(e){if(Array.isArray(e))return zt(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 zt(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)?zt(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.")}())),devices:{instanceId:we()}}):t}},{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 t,n,r,i,o,s,c,u,l,f,h=this,p=Object.create(null,{additionalSetup:{get:function(){return Ht(Wt(a.prototype),"additionalSetup",h)}}});return c=this,u=void 0,l=void 0,f=Zt().mark((function a(){var c;return Zt().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(p.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){a.next=7;break}if(null!==(c=e.additionalData)){a.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:c.startTime,endTime:c.endTime});case 7:this.areDevicesEnabled()&&this.player.devicesPlugin({viviEnabled:null===(t=this.options.devicesConfig)||void 0===t?void 0:t.viviEnabled,viviApi:null===(n=this.options.devicesConfig)||void 0===n?void 0:n.viviApi,fetchViviAccessToken:null===(r=this.options.devicesConfig)||void 0===r?void 0:r.fetchViviAccessToken,appleTvEnabled:null===(i=this.options.devicesConfig)||void 0===i?void 0:i.appleTvEnabled,fetchOnlineApiAccessToken:null===(o=this.options.devicesConfig)||void 0===o?void 0:o.fetchOnlineApiAccessToken,trackingCode:null===(s=this.options.devicesConfig)||void 0===s?void 0:s.trackingCode,userId:parseInt(e.viewerId),title:e.title,analyticsService:this.analyticsService});case 8:case"end":return a.stop()}}),a,this)})),new(l||(l=Promise))((function(e,t){function n(e){try{i(f.next(e))}catch(e){t(e)}}function r(e){try{i(f.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof l?i:new l((function(e){e(i)}))).then(n,r)}i((f=f.apply(c,u||[])).next())}))}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}}])&&Gt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(i.r),Qt=n(63816),Xt=n(14735);function Jt(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 Kt(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 Jt(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)?Jt(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 en(e){return en="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},en(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,nn(r.key),r)}}function nn(e){var t=function(e,t){if("object"!=en(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=en(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==en(t)?t:String(t)}function rn(){return rn="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=an(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}},rn.apply(this,arguments)}function on(e,t){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},on(e,t)}function an(e){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},an(e)}o.Z.registerComponent("UpNext",(0,Xt.Z)((function(e,t){return r.createElement(Kt,Object.assign({player:e},t))})));var sn=function(e){!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&&on(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=an(r);if(i){var n=an(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===en(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)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).playNext=e.nextVideoPlugin().getShouldPlayNext(),n.toggle(n.playNext),n}return t=s,(n=[{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,t,n){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 r=rn(an(s.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>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&tn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuItem"));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 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,ln(r.key),r)}}function ln(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 fn(){return fn="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=dn(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}},fn.apply(this,arguments)}function hn(e,t){return hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hn(e,t)}function pn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dn(e){return dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dn(e)}o.Z.registerComponent("NextVideoMenuItem",sn);var yn="cv-persisttest",vn="cv-play-next-video",bn=o.Z.getPlugin("plugin"),gn=(o.Z.getComponent("MenuItem"),o.Z.getComponent("NextVideoMenuItem")),mn=function(e){!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)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=dn(r);if(i){var n=dn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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 pn(e)}(this,e)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).setShouldPlayNext=t.setShouldPlayNext.bind(pn(t)),t.getShouldPlayNext=t.getShouldPlayNext.bind(pn(t)),t.getChapterTrack=t.getChapterTrack.bind(pn(t)),t.onTimeUpdate=t.onTimeUpdate.bind(pn(t)),t.hasLocalStorage=t.testHasLocalStorage(),t.shouldPlayNextVideo=!1,t.hasLocalStorage){var n=window.localStorage.getItem(vn);t.shouldPlayNextVideo="true"===n}return e.ready((function(){t.initialize()})),t}return t=a,(n=[{key:"initialize",value:function(){this.player.isDisposed()||this.bindListeners()}},{key:"getChapterTrack",value:function(){return mt.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:gn,name:"NextVideoMenuItem"})}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.hasLocalStorage&&t&&window.localStorage.setItem(vn,e.toString())}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.hideUpNext(),fn(dn(a.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(yn,"persistPlayNext"),window.localStorage.removeItem(yn),!0}catch(e){return!1}}}])&&un(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(bn);o.Z.registerPlugin("nextVideoPlugin",mn);var wn=n(26733);function Pn(e){return Pn="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},Pn(e)}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,Sn(r.key),r)}}function Sn(e){var t=function(e,t){if("object"!=Pn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Pn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pn(t)?t:String(t)}function kn(e,t){return kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kn(e,t)}function jn(e){return jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jn(e)}function Cn(e){return r.createElement("div",{className:"cv-resource-item"},r.createElement(wn.s,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var En=(0,Xt.Z)((function(e,t){return r.createElement(Cn,Object.assign({},t))})),Tn=function(e){!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&&kn(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=jn(r);if(i){var n=jn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Pn(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)}(this,e)});function s(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),n=a.call(this,e,t);var r=new En(e,{resource:t.resource,imageCdnUrl:t.imageCdnUrl});return n.addChild(r),n}return t=s,(n=[{key:"createEl",value:function(){return o.Z.dom.createEl("div")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&On(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("ClickableComponent"));function xn(e){return xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xn(e)}function In(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_n(r.key),r)}}function _n(e){var t=function(e,t){if("object"!=xn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=xn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xn(t)?t:String(t)}function Rn(){return Rn="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}},Rn.apply(this,arguments)}function Mn(e,t){return Mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mn(e,t)}function Ln(e){return Ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ln(e)}var Dn=function(e){!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&&Mn(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ln(r);if(i){var n=Ln(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===xn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=s,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(Rn(Ln(s.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(Rn(Ln(s.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){Rn(Ln(s.prototype),"update",this).call(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",Rn(Ln(s.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new Tn(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(){Rn(Ln(s.prototype),"handleClick",this).call(this,null)}}])&&In(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuButton"));function Nn(e){return Nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nn(e)}function An(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,Vn(r.key),r)}}function Vn(e){var t=function(e,t){if("object"!=Nn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Nn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nn(t)?t:String(t)}function Bn(e,t){return Bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bn(e,t)}function Fn(e){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fn(e)}Dn.prototype.controlText_="Resources",o.Z.registerComponent("ResourcesButton",Dn);var Un=function(e){!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&&Bn(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Fn(r);if(i){var n=Fn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Nn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=a,(n=[{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)}}}])&&An(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("resourcesPlugin",Un);var Zn=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 zn(e){var t=e.className,n=void 0===t?"":t,i=e.playerApi,o=e.onReady,a=e.onDispose,s=Zn(e,["className","playerApi","onReady","onDispose"]),c=r.useRef();return r.useEffect((function(){if(c){var e=new $t(c.current,Object.assign(Object.assign({},s),{playerApi:i}));return o&&e.ready((function(){o((0,Qt.G)(e))})),a&&e.one("dispose",a),function(){null==e||e.dispose()}}}),[e.viewKey]),r.createElement("div",{ref:c,className:n})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[528],{99705:(e,t,r)=>{var a,n;r.d(t,{b:()=>n}),function(e){e.AddToPlaylist="115005679748",e.EditSsoAccounts="8202508040345",e.LibraryEditor="360001974533",e.VideoAccess="360000153947",e.AddFromOnline="360011718234",e.UploadToLibraryEditor="360012069334",e.PBTErrorCodes="360012421153",e.ManuelReview="360020004534",e.LibraryReview="360000163788"}(a||(a={})),function(e){e.Integrations="4407268725529",e.Classrooms="4405362551833",e.MakeInteractive="4405370510873",e.EditSsoAccounts="8202605666073",e.UploadToLibraryEditor="10672936659865",e.AddFromLite="10671345281561",e.ManageSsoYearGroups="12522160412313",e.ContentReview="18525199576601",e.ContentPermissions="14692125209497",e.AccessSettings="22110291468057",e.ContentGuidelines="24133696186009",e.FoxtelFaq="24133519542169",e.ViviIntegration="23826297956377",e.AppleTvIntegration="25832373739929"}(n||(n={}))},62148:(e,t,r)=>{r.r(t),r.d(t,{BulkUserActionsAddToClassroomActionDetailsView:()=>k});var a=r(32735),n=r(97395),o=r(20354),s=r(23481),l=r(2948),i=r(82872),c=r(7855),u=r(83345),m=r(38143),d=r(96728);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var f="userManager.bulkUserActionsAddToClassroomActionDetails",g=s.T.encloseNamespace(f);function v(e){var t,r,n=(t=(0,l.D)(m.g.BULK_USER_ACTIONS),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o,s,l=[],i=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;i=!1}else for(;!(i=(a=o.call(r)).done)&&(l.push(a.value),l.length!==t);i=!0);}catch(e){c=!0,n=e}finally{try{if(!i&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw n}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}(t,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=n[0],s=n[1];a.useEffect((function(){s("subAction","addToClassroom")}),[]);var v=a.useContext(d.e).setDisableNext;return a.useEffect((function(){v(!(null==o?void 0:o.classroom))}),[null==o?void 0:o.classroom]),a.createElement(u.D.Provider,{value:f},a.createElement("h2",{className:"h4 mb-3"},a.createElement(u.x,{phrase:"heading"})),a.createElement("p",{className:"mb-2"},a.createElement(u.x,{phrase:"info"})),a.createElement("div",{className:"p-2 border rounded mb-2"},a.createElement("label",null,a.createElement(u.x,{phrase:"placeholder"})),o.classroom?a.createElement("div",{className:"d-flex"},a.createElement(i.t,{selection:o.classroom,onClickRemove:function(){return s("classroom",null)}})):a.createElement("div",{className:"w-50"},a.createElement(c.R,{placeholder:g("placeholder"),getRemoteUrl:e.getSearchUrl,requestHeaders:null==e?void 0:e.requestHeaders,selections:o.classroom?[o.classroom]:[],formatRemoteSuggestions:function(e){return e.results},onSuggestionSelected:function(e){return s("classroom",e)},removeSelection:function(){},imageCdnUrl:e.imageCdnUrl,activationLength:2,debounceTime:200,errorStateImageUrl:e.errorStateImageUrl,emptyStateImageUrl:e.emptyStateImageUrl})),e.addToClassroomSupportLink&&a.createElement("p",{className:"mb-0 mt-2"},a.createElement(u.x,{phrase:"cantFindAClassroom"})," ",a.createElement("a",{href:e.addToClassroomSupportLink,className:"text-info",target:"_blank"},a.createElement(u.x,{phrase:"howToCreateClassroom"})))))}var E=r(58703),h=r(99705),y=r(39151),b=r(31949),S=r(12778),A=r(99742),C=r(1211),U=r(88323),T=r(18087);function k(e){var t=(0,U.h)(e.userType),r=t.users,s=t.count,l=(0,T.Y)(e.userType),i=o.a.useBasicFetch(b.N.currentUser()),c=o.a.useBasicFetch(b.N.token()),u=o.a.useBasicFetch(y.L.config()),m=!!i.data&&!!c.data&&!!u.data,d=S.o.getLiteArticle(h.b.Classrooms);return a.createElement(E.d,{appLinks:l,userType:e.userType,users:r,currentStep:"action-details",userCount:s,loaded:m},m&&a.createElement(v,{getSearchUrl:function(e){return function(e,t,r){var a=C.J.searchClassrooms(e,t).url.split("{gateway}")[1];return n._.safeUrlConcat(r,a)}(e,i.data.customerId,u.data.gatewayApiUrl)},requestHeaders:{authorization:"Bearer ".concat(c.data.value)},imageCdnUrl:u.data.imageCdnUrl,addToClassroomSupportLink:d,errorStateImageUrl:A.W.TYPEAHEAD_ERROR,emptyStateImageUrl:A.W.EmptyStates.TYPEAHEAD_RESULTS,appLinks:l}))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5306],{49935:(e,t,n)=>{n.d(t,{Oo:()=>u,b2:()=>d});var a=n(32735),r=n(36848),i=n(86764),c=n(3747),o=n(5859),l=n(35223),s=n(83914),m=function(e){var t=e.breadcrumb,n=t.name,i=t.appLink,c=t.active,o=e.withBackIcon;return a.createElement("li",{className:"breadcrumb-item".concat(c?" active":"")},c?a.createElement("strong",null,n):a.createElement(r.F,{appLink:i},o&&a.createElement(s.x,{svgName:l.vn.ChevronLeft,size:s.S.Small}),a.createElement("span",{className:o?"ms-2":""},n)))},u=function(e){var t=e.breadcrumbs,n=(0,c.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(m,{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(m,{key:t,breadcrumb:e})}))))},d=a.memo((function(e){var t=e.numItems,n=void 0===t?3:t;return(0,c.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"},o.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"}}))}))))}))},38502:(e,t,n)=>{n.d(t,{r:()=>s});var a=n(32735),r=n(49985),i=n(36848),c=n(76246),o=n(11607),l=n(87432);function s(e){var t;return a.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},a.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(l.Z.pillTabSelector)},e.tabs.map((function(e){return a.createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?a.createElement(i.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"cursor-pointer d-flex justify-content-center text-decoration-none text-reset px-2 ".concat(l.Z.pillItem)},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(c.C,{type:c.g.Count,data:e.count}))):a.createElement(o.L,{className:"".concat(l.Z.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&r.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(c.C,{type:c.g.Count,data:e.count}))))}))))}},74696:(e,t,n)=>{n.d(t,{S:()=>s});var a=n(32735),r=n(68050),i=n(69111),c=n(9977),o=n(79967);const l={partialName:"SicQQ",partialDescription:"dPGMq",partialThumbnail:"vZrnb",partialDragHandle:"iq73R"};function s(e){return a.createElement(a.Fragment,null,Array(e.numVideos).fill(null).map((function(t,n){return a.createElement(m,Object.assign({key:n},e))})))}function m(e){var t=(0,o.k)(),n="sm"===c.O.getSize(t,"md"),s=e.withReordering&&!t.xs;return a.createElement(r.Z,{className:"".concat(n?"":"py-2")},a.createElement(i.Z,Object.assign({},c.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(n?"pb-2 pe-2":"mb-1 px-2")}),a.createElement(r.Z,null,!!s&&a.createElement("div",{className:"d-flex align-items-center justify-content-center col-2"},a.createElement("div",{className:"partial-loading-background ".concat(l.partialDragHandle)})),a.createElement(i.Z,{xs:c.O.getThumbnailColSize(s)},a.createElement("div",{className:"partial-loading-background ".concat(n?"rounded":"rounded-3"," ").concat(l.partialThumbnail)})))),a.createElement(i.Z,Object.assign({},c.O.getDetailsColumns(),{className:n?"pb-2":"px-2"}),a.createElement("div",{className:"partial-loading-background mb-1 ".concat(l.partialName)}),a.createElement("div",{className:"partial-loading-background ".concat(l.partialDescription)})))}s.defaultProps={numVideos:15}},99705:(e,t,n)=>{var a,r;n.d(t,{b:()=>r}),function(e){e.AddToPlaylist="115005679748",e.EditSsoAccounts="8202508040345",e.LibraryEditor="360001974533",e.VideoAccess="360000153947",e.AddFromOnline="360011718234",e.UploadToLibraryEditor="360012069334",e.PBTErrorCodes="360012421153",e.ManuelReview="360020004534",e.LibraryReview="360000163788"}(a||(a={})),function(e){e.Integrations="4407268725529",e.Classrooms="4405362551833",e.MakeInteractive="4405370510873",e.EditSsoAccounts="8202605666073",e.UploadToLibraryEditor="10672936659865",e.AddFromLite="10671345281561",e.ManageSsoYearGroups="12522160412313",e.ContentReview="18525199576601",e.ContentPermissions="14692125209497",e.AccessSettings="22110291468057",e.ContentGuidelines="24133696186009",e.FoxtelFaq="24133519542169",e.ViviIntegration="23826297956377",e.AppleTvIntegration="25832373739929"}(r||(r={}))},5859:(e,t,n)=>{function a(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}n.d(t,{u:()=>i});var r={numItems:5,minWidth:50,maxWidth:100},i={getPartialLoadingItems:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(Object.assign({},r),t);return(e=Array(n.numItems),function(e){if(Array.isArray(e))return a(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 a(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)?a(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.")}()).map((function(){return{width:"".concat(Math.max(Math.floor(Math.random()*n.maxWidth),n.minWidth),"px")}}))}}},23224:(e,t,n)=>{n.d(t,{j:()=>p});var a=n(32735),r=n(39202),i=n(23481),c=n(65858),o=n(38502),l=n(14070),s=n(97291),m="settings.restrictedVideosTabs",u=i.T.encloseNamespace(m),d={restrictedVideos:{application:s.O.SETTINGS,action:l.e.Settings.VIDEO_RESTRICTIONS},contentReview:{application:s.O.SETTINGS,action:l.e.Settings.CONTENT_REVIEW},contentReviewSettings:{application:s.O.SETTINGS,action:l.e.Settings.CONTENT_REVIEW_SETTINGS}};function p(e){return a.createElement("div",{className:"mb-3"},a.createElement(o.r,{tabs:[{name:u("restrictedVideos"),appLink:d.restrictedVideos,active:"restricted-videos"===e.active,analyticsData:{name:u("restrictedVideos"),url:r.C$.getHref(d.restrictedVideos)},analyticsOptions:{actionType:c.Vw.Click,entity:c.py.Url,location:c.LZ.MagicTabs}},{name:u("contentReview"),appLink:d.contentReview,active:"content-review"===e.active,analyticsData:{name:i.T.getPhrase(m,"contentReview"),url:r.C$.getHref(d.contentReview)},analyticsOptions:{actionType:c.Vw.Click,entity:c.py.Url,location:c.LZ.MagicTabs}},{name:u("contentReviewSettings"),appLink:d.contentReviewSettings,active:"content-review-settings"===e.active,analyticsData:{name:i.T.getPhrase(m,"contentReviewSettings"),url:r.C$.getHref(d.contentReviewSettings)},analyticsOptions:{actionType:c.Vw.Click,entity:c.py.Url,location:c.LZ.MagicTabs}}]}))}},81803:(e,t,n)=>{n.d(t,{d:()=>v});var a=n(32735),r=n(81886),i=n(23481),c=n(49935),o=n(22902),l=n(14070),s=n(97291),m=n(96368);function u(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 d="settings.settingsLayout",p=function(e){var t=(0,o.T)().hasPermissions,n=(0,m.e)();if(e)return t(e);var a=r.Q.C$.getCurrentAppLink();return a.application!==s.O.SETTINGS||n.some((function(e){return e.modules.some((function(e){return"appLink"in e&&e.appLink.action===a.action}))}))};function v(e){var t,n=p(e.requiredPermissions);if(a.useEffect((function(){n||r.Q.C$.trigger({application:s.O.SETTINGS,action:l.e.Settings.HOME},{replace:!0})}),[n]),!n)return a.createElement(a.Fragment,null);var o,m=e.breadcrumbs.map((function(t,n){return{name:t,appLink:{application:s.O.SETTINGS,action:l.e.Settings.HOME},active:n===e.breadcrumbs.length-1}}));return a.createElement("div",{className:"px-3"},a.createElement("div",{className:"d-flex align-items-center justify-content-between"},a.createElement("h1",{className:"h2"},e.heading),null===(t=e.headingButton)||void 0===t?void 0:t.call(e)),a.createElement("div",{className:"pb-3"},a.createElement(c.Oo,{breadcrumbs:[{name:i.T.getPhrase(d,"settingsBreadcrumb"),appLink:{application:s.O.SETTINGS,action:l.e.Settings.HOME}}].concat((o=m,function(e){if(Array.isArray(e))return u(e)}(o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||function(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):void 0}}(o)||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.")}()))})),e.description&&a.createElement(a.Fragment,null,a.createElement("p",null,e.description),a.createElement("hr",null)),e.children)}},17749:(e,t,n)=>{n.d(t,{g:()=>r});var a=n(99940),r={getLibraryReviewPeriod:function(){return{url:"{gateway}/v1/library-reviews",key:"coming:soon:settings",normalize:!1}},setLibraryReviewPeriod:function(e){return{url:"{gateway}/v1/library-reviews",key:"update:coming:soon:settings",invalidationKeys:"coming:soon:settings",type:a.k.POST,data:{reviewPeriod:e},normalize:!1}},deleteLibraryReviewPeriod:function(){return{url:"{gateway}/v1/library-reviews",key:"delete:coming:soon:settings",invalidationKeys:"coming:soon:settings",type:a.k.DELETE,normalize:!1}}}},81367:(e,t,n)=>{n.r(t),n.d(t,{ContentReviewView:()=>G});var a=n(32735),r=n(23481),i=n(20354),c=n(65858),o=n(36848),l=n(37395),s=n(83345),m=n(74696),u=n(4632),d=n(51365),p=n(16714),v=n(5345),g=n(1666),E=n(31949),b=n(97037),y=n(26361),f=n(67753),S=n(14070),T=n(97291),h=n(21491),N=n(65986),k=n(44110),w=n(82431),I=n(23224),O=n(81803),L=n(17749),C=n(23232),R=n(99742),A="settings.noItemsEmptyState";function x(){return a.createElement(C.u,null,a.createElement(C.u.Image,{src:R.W.EmptyStates.ContentReview.NO_ITEMS}),a.createElement(C.u.Heading,null,a.createElement(s.x,{namespace:A,phrase:"heading"})),a.createElement(C.u.Info,null,a.createElement(s.x,{namespace:A,phrase:"info"})))}var j=n(99705),V=n(12778),P="settings.turnedOffEmptyState",F=r.T.encloseNamespace(P);function _(){var e=V.o.getLiteArticle(j.b.ContentReview);return a.createElement(C.u,null,a.createElement(C.u.Image,{src:R.W.EmptyStates.ContentReview.TURNED_OFF}),a.createElement(C.u.Heading,null,a.createElement(s.x,{namespace:P,phrase:"heading"})),a.createElement(C.u.Info,null,a.createElement(s.x,{namespace:P,phrase:"info"})," ",a.createElement(o.F,{className:"info-link",appLink:{application:T.O.SETTINGS,action:S.e.Settings.CONTENT_REVIEW_SETTINGS}},a.createElement(s.x,{namespace:P,phrase:"contentReviewSettings"}))),a.createElement(C.u.Cta,{href:e,text:F("learnMore"),className:"btn btn-link info-link"}))}var M="settings.contentReview",D=r.T.encloseNamespace(M);function G(e){var t,n,r,C,R=(0,b.c)(c.LZ.VideoThumbnail),A=R.setFavourite,j=R.canFavourite,V=i.a.useBasicFetch(h.I.getRestrictedObjects([v.c.Custom],e.cursor)),P=i.a.useBasicFetch(E.N.currentUser()),F=i.a.useBasicFetch(P.data&&g.h.yearGroups(P.data.customerId)),G=i.a.useBasicFetch(L.g.getLibraryReviewPeriod()),B=(0,k.i)(),Z=(0,N._)(N.i.VideoItem),H=V.hasCompleted&&G.hasCompleted;return a.createElement(O.d,{heading:D("heading"),breadcrumbs:[D("heading")],requiredPermissions:p.C.ManageVideoAccess},a.createElement(I.j,{active:"content-review"}),H?(null===(t=G.data)||void 0===t?void 0:t.reviewPeriod)?(null===(r=null===(n=V.data)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length)?a.createElement(a.Fragment,null,a.createElement("div",{className:"d-flex justify-content-between mb-2"},a.createElement("p",{className:"h4"},a.createElement(s.x,{namespace:M,phrase:"count",options:{smartCount:V.data.count}})),a.createElement(o.F,{appLink:{application:T.O.SETTINGS,action:S.e.Settings.APPROVE_ALL_VIDEOS},className:"btn btn-dark"},a.createElement(s.x,{namespace:M,phrase:"approveAll"}))),a.createElement("hr",null),a.createElement(d.M.Provider,{value:Z},a.createElement(u.E4,{videos:V.data.data.filter((function(e){return!!y.l.getRestrictionByType(e,v.c.Custom)})),yearGroups:F.data,getVideoAppLink:f.W.getAppLink,getSeriesAppLink:w.j.getSeriesAppLink,setFavourite:A,canFavourite:j,presentationAudiences:B.data})),(null===(C=V.data.pagination)||void 0===C?void 0:C.cursors)&&a.createElement("div",{className:"clearfix"},a.createElement(l.t,{cursors:V.data.pagination.cursors,appLink:{application:T.O.SETTINGS,action:S.e.Settings.CONTENT_REVIEW},buttonVariant:"outline-dark",className:"py-2 float-end"}))):a.createElement(x,null):a.createElement(_,null):a.createElement(m.S,null))}},21491:(e,t,n)=>{n.d(t,{I:()=>c});var a=n(99940),r=n(97395),i=n(62803),c={getRestrictions:function(e){return{key:"restrictions:".concat(e),url:r._.urlBuilder("{gateway}/v1/objects/restrictions",{id:e})}},addRestriction:function(e){return{type:a.k.POST,key:"restrictions:".concat(e.objectTypeId,":").concat(e.objectId,":add"),url:"{gateway}/v1/restrictions",data:[e],invalidationKeys:["restrictions"]}},deleteRestrictions:function(e){return{url:r._.urlBuilder("{gateway}/v1/restrictions",{objectId:e}),key:"restrictions:delete",type:a.k.DELETE,invalidationKeys:["restrictions"]}},getRestrictedObjects:function(e,t){var n={type:e,"query.video":i.v.VIDEO_COLLECTION,"query.interactive":i.v.INTERACTIVE,"query.clip":i.v.CLIP_COLLECTION};return t&&(n.cursor=t),{url:r._.urlBuilder("{gateway}/v1/restrictions/objects",n),key:"restrictions:objects:".concat(e.sort().join(","),":").concat(t)}},approveAll:function(){return{url:"{gateway}/v1/library-reviews/restrictions",key:"restrictions:approve:all",type:a.k.DELETE}}}},44110:(e,t,n)=>{n.d(t,{i:()=>c});var a=n(20354),r=n(89454),i=n(86698),c=function(){var e=(0,i.y)({redirectOnError:!0}).activePresentation;return a.a.useBasicFetch(!!e&&r.O.presentationAudiences(e.id))}},87432:(e,t,n)=>{n.d(t,{Z:()=>a});const a={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 536-7c7970277a-lite.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[536],{49602:(e,t,n)=>{var r;n.d(t,{b:()=>o}),function(e){e[e.None=0]="None",e[e.AllSubjects=1]="AllSubjects",e[e.AllLevels=2]="AllLevels",e[e.AllSubjectsAndAllLevels=3]="AllSubjectsAndAllLevels"}(r||(r={}));var a=n(25925),o={hasManyPresentationTypes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0,n=0;return null==e||e.forEach((function(e){e.type===a.R.Subject?t++:e.type===a.R.Curriculum&&n++})),{hasManySubjectPresentations:t>1,hasManyCurriculumPresentations:n>1}},getBulkPreferencesState:function(e){return e===r.AllSubjectsAndAllLevels?{levels:!0,subjects:!0}:{levels:e===r.AllLevels,subjects:e===r.AllSubjects}},hasBulkSelectedLevels:function(e){return e===r.AllLevels||e===r.AllSubjectsAndAllLevels},hasBulkSelectedTopics:function(e){return e===r.AllSubjects||e===r.AllSubjectsAndAllLevels},getNextBulkState:function(e,t){var n=r.None,a=r.AllSubjects,o=r.AllLevels,i=r.AllSubjectsAndAllLevels,c="topics"===t;switch(e){case n:default:return c?a:o;case a:return c?n:i;case o:return c?i:n;case i:return c?o:a}}}},80143:(e,t,n)=>{n.d(t,{n:()=>o});var r=n(32735),a=n(69454);function o(e,t){var n=r.useMemo((function(){return(null==e?void 0:e.length)&&t&&a.T.shouldShowAudiences(t)?a.T.getSortedPresentationAudiences(e,t):null}),[e]);return r.useMemo((function(){return(null==n?void 0:n.length)?a.T.getMergedPresentationAudienceString(n):null}),[n])}},69454:(e,t,n)=>{n.d(t,{T:()=>m});var r=n(75896),a=n(1048),o=n(55171);function i(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}var c=/\d/,l=function(e){var t,n,a=r.m.first(e),o=r.m.last(e);return a.name===o.name?a.name:"Advanced"===o.name?"lower"===(t=a.name.split(" "),n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return i(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)?i(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0].toLowerCase()?"Lower Sec - Adv":"Upper Sec - Adv":"Lower - Upper Sec"},s=/([0-9]+)/gi,u=/\s|\+/gi,m={getSortedPresentationAudiences:function(e,t){var n=e.filter((function(e){return!!e})).map((function(e){return e.id.toString()}));return t.filter((function(e){return n.includes(e.masterId.toString())}))},getMergedPresentationAudienceString:function(e){var t,n,a,i="";switch(+r.m.first(e).presentationId){case o.e.PresentationIds.DEFAULT:case o.e.PresentationIds.AU_SECONDARY:case o.e.PresentationIds.US_ELEMENTARY:case o.e.PresentationIds.AU_PRIMARY:if(1===e.length)return e[0];i=function(e){var t=e.map((function(e){return e.name})).join(" "),n=t.split(" ").filter((function(e){return!isNaN(+e)})).map((function(e){return+e}))||[],r=t.split(" ").filter((function(e){return isNaN(+e)}))||[],a=e.find((function(e){return!c.test(e.name)})),o=r.find((function(e){return e!==(null==a?void 0:a.name)}));if(e.length>1&&(o+="s"),a&&n.length)return"".concat(o," ").concat(a.name.charAt(0)," - ").concat(n.pop());var i=function(e){var t,n,r,a,o=!1,i=[];for(e=e.sort((function(e,t){return e-t})),r=0;r<e.length;r++)a=r+1,o||(t=e[r]),n=e[a],e[r]+1===n?o=!0:o?(i.push("".concat(t," - ").concat(e[r])),o=!1):(i.push("".concat(e[r])),o=!1);return i}(n);return"".concat(o," ").concat(i.join(", "))}(e);break;case o.e.PresentationIds.SCOTLAND_PRIMARY:case o.e.PresentationIds.INTERNATIONAL_PRIMARY:case o.e.PresentationIds.INTERNATIONAL_SECONDARY:if(1===e.length)return e[0];i=function(e){var t=e.map((function(e){return e.name})),n={};t.forEach((function(e,t){if(0!==t){var r=e.split(" ");Object.keys(n).forEach((function(e){r.includes(e)||delete n[e]}))}else e.split(" ").forEach((function(e,t){n[e]=0===t?"start":"end"}))}));var r=Object.keys(n)[0],a=n[r];if(!r)return e[0].name;var o=e[0].name,i=e[e.length-1].name,c=function(e){return e.split(r)[0]},l="".concat(c(o)," - ").concat(c(i));return"start"===a?"".concat(r," ").concat(l):"".concat(l," ").concat(r)}(e);break;case o.e.PresentationIds.ENGLISH_SECONDARY:i=l(e);break;case o.e.PresentationIds.SCOTLAND_SECONDARY:t=e,n=r.m.first(t),a=r.m.last(t),i=n.name===a.name?n.name:"Senior Phase"===a.name?"".concat(n.name," - Senior"):"Third - Fourth Level";break;case o.e.PresentationIds.ENGLAND_PRIMARY:i=function(e){var t=r.m.first(e),n=r.m.last(e),a=r.m.first(t.name.split(" ")),o=r.m.first(n.name.split(" ")),i=t.name.split(" ").find((function(e){return!isNaN(+e)})),c=n.name.split(" ").find((function(e){return!isNaN(+e)}));if(t===n)return"Key"===a||"Reception"===a?t.name:"".concat(a," KS").concat(i);var l="",s="";return l="Reception"===a?"R":"KS".concat(i),s="KS".concat(c),"Lower"===a&&"Upper"===o?"L ".concat(l," - U ").concat(s):("Lower"===a&&(l="Lower ".concat(l)),"Upper"===o&&(s="Upper ".concat(s)),"Key"===o&&(s=n.name),"".concat(l," - ").concat(s))}(e);case o.e.PresentationIds.US_MIDDLE:case o.e.PresentationIds.US_HIGH:}return i?{name:i}:null},sortMembersWithDuplicateNamesByAudience:function(e){var t=function(e){return e.length?(e.forEach((function(e){var a=+r.m.first(e.name.match(s));if(!t)return t=e,void(n=a);a<n&&(t=e)})),t):null;var t,n},n={},a=[];return e.forEach((function(e){if(!n[e.name])return n[e.name]=1,void a.push(e);a.push(e),n[e.name]++;var r=a.splice(a.length-n[e.name]).sort((function(e,n){var r=t(e.subjectPresentationAudiences.data),a=t(n.subjectPresentationAudiences.data);if(!r&&a)return 1;if(!a)return-1;var o=r.name.localeCompare(a.name);return 0===o?o:o>0?-1:1}));a=a.concat(r)})),a},getActiveAudiencesFromParams:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(a.t.isObject(t)&&!a.t.isEmpty(t)&&e&&e.length&&m.shouldShowAudiences(e)){var n=t.a;if(n){"string"==typeof n&&(n=[n]);var r=function(e){return e.replace(u,"").toLowerCase()},o=n.reduce((function(e,t){return e[r(t)]=t,e}),{});return e.filter((function(e){return o[r(e.name)]}))}}},getAudienceParams:function(e){return(null==e?void 0:e.length)?{a:e.map((function(e){return e.name}))}:null},shouldShowAudiences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return!!e&&e.length>1}}},12058:(e,t,n)=>{n.d(t,{X:()=>a});var r=n(32735);function a(e){return r.createElement("p",{className:e.className},e.children)}},75919:(e,t,n)=>{n.d(t,{N:()=>o});var r=n(32735);const a={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",height:"kRhKC"};function o(e){return r.createElement("div",{className:(t="d-flex align-items-center text-center position-relative w-100 ".concat(a.height),"center"===e.contentPosition&&(t+=" px-5 justify-content-center"),"right"===e.contentPosition&&(t+=" me-n5 justify-content-end"),t)},r.createElement("div",{className:function(){var t=a.annotation;switch(e.annotationPosition){case"top-left":t+=" ".concat(a.above," ").concat(a.left);break;case"top-right":t+=" ".concat(a.above," ").concat(a.right);break;case"bottom-left":t+=" ".concat(a.below," ").concat(a.left);break;case"bottom-right":t+=" ".concat(a.below," ").concat(a.right)}return e.annotationClassName&&(t+=" ".concat(e.annotationClassName)),t}()},r.createElement("img",{className:"img-fluid",src:e.annotationUrl})),e.children,"right"===e.contentPosition&&r.createElement("div",{className:a.divider}));var t}o.defaultProps={contentPosition:"center"}},63478:(e,t,n)=>{n.d(t,{B:()=>a});var r=n(32735);function a(e){return r.createElement("div",{className:"w-100 h-100 position-fixed bg-".concat(e.variant)},e.children)}},24250:(e,t,n)=>{n.d(t,{R:()=>u});var r=n(32735),a=n(75896),o=n(55171),i=n(54610),c=n(79967),l=n(67453);function s(e,t){return"mobile"===t?function(e){var t=e%10,n={top:"".concat(4*e,"%")};switch(t){case 0:return n.left="12.5%",n.animationDelay="0.5s",n;case 1:return n.right="7.5%",n.animationDelay="1s",n;case 2:return n.left="10%",n;case 3:return n.right="2.5%",n.animationDelay="0.5s",n;case 4:return n.left="2.5%",n.animationDelay="1.5s",n;case 5:return n.right="10%",n;case 6:return n.left="12.5%",n.animationDelay="1.5s",n;case 7:return n.right="7.5%",n.animationDelay="0.5s",n;case 8:return n.left="5%",n.animationDelay="1s",n;case 9:return n.right="2.5%",n.animationDelay="1s",n;default:return n.left="10%",n.animationDelay="1.5s",n}}(e):"50%"===t?function(e){var t=e%10,n={top:"".concat(4*e,"%")};switch(t){case 0:return n.left="25%",n.animationDelay="0.5s",n;case 1:return n.right="15%",n.animationDelay="1s",n;case 2:return n.left="20%",n;case 3:return n.right="5%",n.animationDelay="0.5s",n;case 4:return n.left="5%",n.animationDelay="1.5s",n;case 5:return n.right="20%",n;case 6:return n.left="25%",n.animationDelay="1.5s",n;case 7:return n.right="15%",n.animationDelay="0.5s",n;case 8:return n.left="10%",n.animationDelay="1s",n;case 9:return n.right="5%",n.animationDelay="1s",n;default:return n.left="20%",n.animationDelay="1.5s",n}}(e):function(e){var t=e%10,n={top:"".concat(4*e,"%")};switch(t){case 0:return n.left="25%",n.animationDelay="0.5s",n;case 1:return n.right="30%",n.animationDelay="1s",n;case 2:return n.left="40%",n;case 3:return n.right="10%",n.animationDelay="0.5s",n;case 4:return n.left="10%",n.animationDelay="1.5s",n;case 5:return n.right="40%",n;case 6:return n.left="30%",n.animationDelay="1.5s",n;case 7:return n.right="30%",n.animationDelay="0.5s",n;case 8:return n.left="10%",n.animationDelay="1s",n;case 9:return n.right="10%",n.animationDelay="1s",n;default:return n.left="40%",n.animationDelay="1.5s",n}}(e)}var u=r.memo((function(e){var t=a.m.shuffle(o.e.Onboarding.LOADING_THUMBNAILS),n=(0,c.k)();return r.createElement("div",{className:"".concat("n2Qe4"," ").concat("50%"===e.screenSize?"w-50":"w-100")},t.map((function(t,a){return r.createElement("div",{key:a,className:"".concat("ZlA2t"," position-absolute rounded-3 overflow-hidden"),style:s(a,n.xs?"mobile":e.screenSize)},!e.hideThumbnailMask&&r.createElement("div",{className:"".concat("jNop3"," ").concat("blue"===e.variant?"jVOWE":"YNfFq")}),r.createElement("img",{className:"img-fluid",src:l.j.createUrl(t,{size:i.h2.Small})}))})))}))},2248:(e,t,n)=>{n.d(t,{L:()=>v});var r=n(32735),a=n(60376),o=n(83914),i=n(2786),c=n(83345),l=n(72639),s=n(79967),u=n(35223),m=n(10144);const d={dot:"AlRQD",logo:"L42gR",blackBar:"ESCxm",topNav:"a3G_4",leftNav:"YxGVV",belowHeader:"jc_cg",leftNavIcon:"U6i6r",leftNavText:"LnYlW",presentationPlaceholderIcon:"Ljaju",presentationIcon:"QdwPq",presentationPlaceholderText:"af06V",curriculumIcon:"N7T4T",curriculumIconSmall:"_6xrUg",curriculumContainer:"Z65qX",iconPlaceholder:"CKOXL",shadow:"zygeJ",presentationName:"Oj7Dt"};var f="onboarding.mockLayout";function h(){return r.createElement("div",{className:"d-flex align-items-center justify-content-center mb-2 px-3"},r.createElement("div",{className:"".concat(d.leftNavIcon," rounded-circle")}),r.createElement("div",{className:"".concat(d.leftNavText," rounded-pill")}))}function v(e){var t,n,v=(0,s.k)();return r.createElement("div",{className:"border border-dark border-2 bg-white rounded-3 user-select-none overflow-hidden position-relative h-100 w-100"},!!e.editingCurriculum&&r.createElement("div",{className:"w-100 h-100 position-absolute ".concat(d.shadow)},r.createElement("div",{className:"d-flex align-items-center h-100 w-50 ".concat(d.curriculumContainer)},r.createElement("div",{className:"bg-white rounded-3 border p-3 w-100"},r.createElement("h2",{className:"h6 text-start"},r.createElement(c.x,{namespace:f,phrase:"curriculum"})),e.curriculum?r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(d.curriculumIcon," rounded-circle me-2 border")},r.createElement(a.f,{imageUrl:null===(t=e.curriculum.cover)||void 0===t?void 0:t.url})),r.createElement("div",{className:"text-start"},e.curriculum.name)):r.createElement("div",{className:"d-flex align-items-center text-muted"},r.createElement("div",{className:"me-2 rounded-circle p-1 ".concat(d.iconPlaceholder)},r.createElement(a.f,{svgSize:o.S.Large,textVariant:"secondary",svgName:u.vn.GraduationCap})),r.createElement(c.x,{namespace:f,phrase:"selectCurriculum"}))))),r.createElement("div",{className:"bg-dark d-flex px-3 py-2 ".concat(d.blackBar)},r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle ".concat(d.dot)})),r.createElement("div",{className:"border-bottom px-3 py-2 d-flex align-items-center ".concat(d.topNav)},r.createElement("div",{className:"".concat(d.logo," me-4")},v.xs?r.createElement(i.bc,null):r.createElement(i.$S,null)),r.createElement("div",{className:"form-control w-75 d-flex justify-content-start"},r.createElement(o.x,{svgName:u.vn.Search})),!!e.curriculum&&r.createElement("div",{className:"".concat(d.curriculumIconSmall," rounded-circle ms-2 me-n1 border")},r.createElement(a.f,{imageUrl:null===(n=e.curriculum.cover)||void 0===n?void 0:n.url}))),r.createElement("div",{className:"d-flex ".concat(d.belowHeader)},r.createElement("div",{className:"".concat(d.leftNav," border-end")},r.createElement("div",{className:"d-flex flex-column pt-3 h-100"},r.createElement(h,null),r.createElement(h,null),r.createElement(h,null),r.createElement(h,null),r.createElement(h,null),r.createElement("div",{className:"d-flex align-items-end h-100 w-100"},r.createElement("div",{className:"border-top p-3 w-100"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(function(){if(!e.presentation)return d.presentationPlaceholderIcon;switch(m.i.getMappedPresentationLevel(e.presentation.learningLevel)){case l.p.Level_1:return"bg-indigo ".concat(d.presentationIcon);case l.p.Level_3:return"bg-blue ".concat(d.presentationIcon);default:case l.p.Level_2:return"bg-green ".concat(d.presentationIcon)}}()," text-white rounded")},r.createElement(o.x,{svgName:u.vn.School,size:o.S.Large})),e.presentation?r.createElement("span",{className:"fw-semibold text-truncate ".concat(d.presentationName)},e.presentation.name):r.createElement("div",{className:"".concat(d.presentationPlaceholderText," fw-semibold")},r.createElement(c.x,{namespace:f,phrase:"schoolLevel"}))))))),r.createElement("div",{className:"w-100 h-100 overflow-hidden"},e.children)))}},62007:(e,t,n)=>{n.d(t,{u:()=>u});var r=n(32735),a=n(5465),o=n(72188),i=n(54610),c=n(2248);const l={banner:"CQxNy",title:"NzV5V",description1:"kjCZi",description2:"cBeyJ",placeholder:"Ks_Tl",playlistName:"eFPqz",thumbnailCol:"dgCQ7",videoInfoCol:"pzfE2"};function s(e){return r.createElement("li",{className:"row mb-2"},r.createElement("div",{className:"col-lg-4 col-5 ".concat(l.thumbnailCol)},e.video?r.createElement(o.u,{video:e.video,type:"cosmetic",hideDuration:!0,imageOptions:{size:i.h2.Small}}):r.createElement(a.oy,{type:a.mS.Video,extraClasses:"position-relative rounded-3 ".concat(l.placeholder)})),r.createElement("div",{className:"col-lg-8 col-7 ".concat(l.videoInfoCol)},r.createElement("div",{className:"".concat(l.title," rounded-pill bg-grey mb-1")}),r.createElement("div",{className:"".concat(l.description1," rounded-pill bg-grey mb-1")}),r.createElement("div",{className:"".concat(l.description2," rounded-pill bg-grey mb-1")})))}function u(e){var t,n,a,o=e.hidePlaceholders?0:Math.max(6-(null!==(n=null===(t=e.videos)||void 0===t?void 0:t.length)&&void 0!==n?n:0),0);return r.createElement(c.L,{presentation:e.presentation,curriculum:e.curriculum},r.createElement("div",{className:"bg-teal ".concat(l.banner," position-relative")},e.name&&r.createElement("div",{className:"h5 text-white mb-0 ".concat(l.playlistName)},e.name)),r.createElement("ul",{className:"list-unstyled mb-0 w-100 p-2"},null===(a=e.videos)||void 0===a?void 0:a.map((function(e){return r.createElement(s,{key:e.id,video:e})})),new Array(o).fill(0).map((function(e,t){return r.createElement(s,{key:t})}))))}},14495:(e,t,n)=>{n.r(t),n.d(t,{OnboardingSelectVideosView:()=>Q});var r=n(32735),a=n(57900),o=n(2948),i=n(20354),c=n(83345),l=n(89454),s=n(79967),u=n(99742),m=n(86702),d=n(82817),f=n(86698),h=n(89682),v=n(72188),p=n(54610),y=n(80143);const g={selected:"ZG5MR"};function b(e){var t,n=(0,y.n)(null===(t=e.video.subjectPresentationAudiences)||void 0===t?void 0:t.data,e.audiences);return r.createElement(v.u,{type:"cosmetic",video:e.video,imageOptions:{size:p.h2.Small},audience:n,checkMarkStatus:e.isSelected?h.h.Complete:h.h.Incomplete,setCheckMarkStatus:function(){return e.onSelectVideo(e.video),Promise.resolve()},extraClasses:e.isSelected?"border border-success border-2 rounded-3 overflow-hidden":"",imageClassName:e.isSelected?"".concat(g.selected):"",hideDuration:!0})}function E(e){return r.createElement("ul",{className:"list-unstyled"},e.classificationVideosGrouping.map((function(t){return r.createElement("li",{key:t.classificationId,className:"pb-3"},r.createElement("h2",{className:"h6"},t.classificationName),r.createElement("ul",{className:"row list-unstyled g-2"},t.videos.map((function(t){return r.createElement("li",{key:t.id,className:"col-sm-6 col-md-4 col-lg-6 col-xl-6"},r.createElement(b,{video:t,onSelectVideo:e.onSelectVideo,audiences:e.audiences,isSelected:e.isSelected(t.id)}))}))))})))}var N=n(75359),w=n(12058),S=n(27583),A=n(75919),x=n(63478),L=n(24250),j=n(62007),I=n(75896),O=n(60736),k=n(49602),P=n(61699),C=n(1575),D=n(37802);function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||_(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 _(e,t){if(e){if("string"==typeof e)return R(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)?R(e,t):void 0}}function R(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}var M=n(73190);const B={loaderText:"pg4Oj"};function U(e){return U="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},U(e)}function V(){V=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),c=new k(r||[]);return a(i,"_invoke",{value:L(e,n,c)}),i}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",f="suspendedYield",h="executing",v="completed",p={};function y(){}function g(){}function b(){}var E={};s(E,i,(function(){return this}));var N=Object.getPrototypeOf,w=N&&N(N(P([])));w&&w!==n&&r.call(w,i)&&(E=w);var S=b.prototype=y.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(a,o,i,c){var l=m(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==U(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,n,r){var a=d;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var s=m(t,n,r);if("normal"===s.type){if(a=r.done?v:f,s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=v,r.method="throw",r.arg=s.arg)}}}function j(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,j(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=m(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,p;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function I(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 O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(U(t)+" is not iterable")}return g.prototype=b,a(S,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,l,"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,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},A(x.prototype),s(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(S),s(S,l,"Generator"),s(S,i,(function(){return this})),s(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=P,k.prototype={constructor:k,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(O),!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 a(r,a){return c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},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),p},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),O(n),p}},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 a=r.arg;O(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}function G(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||z(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 z(e,t){if(e){if("string"==typeof e)return F(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)?F(e,t):void 0}}function F(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}var Y=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))},H=6e3,K=3,W="onboarding.selectVideos";function Q(){var e=(0,M.Q)(),t=e.onClickBack,n=e.exitOnboarding,h=e.completeStepAsync,v=e.onSaveError,p=G(r.useState(!1),2),y=p[0],g=p[1],b=G((0,o.D)(m.y.ONBOARDING_VIDEOS,[],{storage:a.Z1.LocalStorage}),2),U=b[0],Q=b[1],q=i.a.useBasicFetch(l.O.presentationAudiences()),Z=(0,f.y)().preferredPresentation,X=(0,d.M)().activeCurriculum,$=function(){var e,t,n=(0,f.y)().preferredPresentation,r=(0,D.r)(null),a=r.bulkOnboardingPreferencesState,o=r.isLoadingSettings,c=i.a.useBasicFetch(P.o.mySubjectPreferences()),l=O.A[n.id]||{},s=Object.entries(l).reduce((function(e,t){var n=T(t,2),r=n[0],a=n[1].name;return e[r]=a,e}),{}),u=k.b.hasBulkSelectedTopics(a)?l:null!==(t=null===(e=c.data)||void 0===e?void 0:e.reduce((function(e,t){return l[t.id]?(e[t.id]=l[t.id],e):e}),{}))&&void 0!==t?t:{},m=[],d={};Object.entries(u).forEach((function(e){var t,n=T(e,2),r=n[0],a=n[1];m.push.apply(m,function(e){if(Array.isArray(e))return R(e)}(t=a.videoIds)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||_(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a.videoIds.forEach((function(e){d[e]||(d[e]=[]),d[e].push(r)}))}));var h=i.a.useBasicFetchAll(I.m.chunk(I.m.uniq(m),25).map((function(e){return C.R.videos(e)}))),v=I.m.flatten(h.data||[]),p={};return null==v||v.forEach((function(e){d[e.id].forEach((function(t){p[t]||(p[t]={classificationId:t,classificationName:s[t],videos:[]}),p[t].videos.push(e)}))})),{hasCompleted:c.hasCompleted&&h.hasCompleted&&!o,data:Object.values(p)}}(),J=(0,s.k)(),ee=J.lg||J.xl||J.xxl;r.useEffect((function(){var e=window.setTimeout((function(){g(!0)}),H);return function(){window.clearTimeout(e)}}),[]);var te=$.hasCompleted&&q.hasCompleted,ne=!y||!te,re=ne?{hasCustomButtons:!0}:{hasCustomButtons:!1,onClickNext:function(){return Y(this,void 0,void 0,V().mark((function e(){return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,h();case 3:e.next=9;break;case 5:return e.prev=5,e.t0=e.catch(0),v(),e.abrupt("return",Promise.reject());case 9:case"end":return e.stop()}}),e,null,[[0,5]])})))},onClickBack:t,onClickComeBackLater:n,disableNext:U.length<K};return ne&&!ee?r.createElement(x.B,{variant:"dark-blue"},r.createElement("div",{className:"w-100 d-flex align-items-center px-4 text-center flex-column text-white ".concat(B.loaderText)},r.createElement("h1",{className:"h3 mb-4"},r.createElement(c.x,{namespace:W,phrase:"loadingHeading"})),r.createElement("p",{className:"h6"},r.createElement(c.x,{namespace:W,phrase:"searching"}))),r.createElement(L.R,{variant:"dark-blue",screenSize:"100%",hideThumbnailMask:!0})):r.createElement(S.z,{namespace:W},r.createElement(S.z.Left,{className:"bg-dark-blue d-flex flex-column align-items-end justify-content-center"},ne?r.createElement(L.R,{variant:"dark-blue",screenSize:"50%"}):r.createElement(A.N,{contentPosition:"right",annotationUrl:U.length>=K?u.W.OnboardingV2.SelectVideos.LOOKING_GOOD:u.W.OnboardingV2.SelectVideos.BEFORE_SELECTION,annotationPosition:U.length>=K?"bottom-left":"top-left"},r.createElement(j.u,{presentation:Z,curriculum:X,videos:U}))),r.createElement(S.z.Right,Object.assign({},re),ne?r.createElement(r.Fragment,null,r.createElement(N.W,null,r.createElement(c.x,{phrase:"loadingHeading"})),r.createElement("p",null,r.createElement(c.x,{phrase:"searching"}))):r.createElement(r.Fragment,null,r.createElement(N.W,null,r.createElement(c.x,{phrase:"heading"})),r.createElement(w.X,null,r.createElement(c.x,{phrase:"info"})),r.createElement(E,{classificationVideosGrouping:$.data,onSelectVideo:function(e){var t;U.some((function(t){return t.id.toString()===e.id.toString()}))?Q(U.filter((function(t){return t.id.toString()!==e.id.toString()}))):Q([].concat(function(e){if(Array.isArray(e))return F(e)}(t=U)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||z(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e]))},audiences:q.data,isSelected:function(e){return U.some((function(t){return t.id.toString()===e.toString()}))}}))))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5379],{2158:(e,t,a)=>{a.d(t,{T:()=>u});var n=a(20354),r=a(50122),c=a(25925),l=a(21750),i=a(31949),o=a(37802),s=a(75795);function u(e){var t=n.a.useBasicFetch(i.N.currentUser()),a=n.a.useBasicFetch(i.N.user(t.data.id)),u=n.a.useBasicFetch(l.x.availablePresentations(c.R.Subject)),m=n.a.useBasicFetch(l.x.presentation(c.R.Subject)),d=n.a.useBasicFetch(l.x.availablePresentations(c.R.Curriculum)),v=t.hasCompleted&&a.hasCompleted&&u.hasCompleted&&d.hasCompleted&&m.hasCompleted,f=(0,o.r)(null).userSettings;return{getPathway:function(t){var n,c,l;return r.m.getOnboardingPathway({jobTitle:t||(null===(l=null===(c=null===(n=a.data)||void 0===n?void 0:n.userProfile)||void 0===c?void 0:c.metadata)||void 0===l?void 0:l.jobTitle),userSettings:f.data,presentations:u.data,curriculums:d.data,preferredPresentation:m.data,appLink:s.O.getCurrentRoute().appLink,appLinks:e})},hasLoadedPathway:v}}},63478:(e,t,a)=>{a.d(t,{B:()=>r});var n=a(32735);function r(e){return n.createElement("div",{className:"w-100 h-100 position-fixed bg-".concat(e.variant)},e.children)}},24250:(e,t,a)=>{a.d(t,{R:()=>u});var n=a(32735),r=a(75896),c=a(55171),l=a(54610),i=a(79967),o=a(67453);function s(e,t){return"mobile"===t?function(e){var t=e%10,a={top:"".concat(4*e,"%")};switch(t){case 0:return a.left="12.5%",a.animationDelay="0.5s",a;case 1:return a.right="7.5%",a.animationDelay="1s",a;case 2:return a.left="10%",a;case 3:return a.right="2.5%",a.animationDelay="0.5s",a;case 4:return a.left="2.5%",a.animationDelay="1.5s",a;case 5:return a.right="10%",a;case 6:return a.left="12.5%",a.animationDelay="1.5s",a;case 7:return a.right="7.5%",a.animationDelay="0.5s",a;case 8:return a.left="5%",a.animationDelay="1s",a;case 9:return a.right="2.5%",a.animationDelay="1s",a;default:return a.left="10%",a.animationDelay="1.5s",a}}(e):"50%"===t?function(e){var t=e%10,a={top:"".concat(4*e,"%")};switch(t){case 0:return a.left="25%",a.animationDelay="0.5s",a;case 1:return a.right="15%",a.animationDelay="1s",a;case 2:return a.left="20%",a;case 3:return a.right="5%",a.animationDelay="0.5s",a;case 4:return a.left="5%",a.animationDelay="1.5s",a;case 5:return a.right="20%",a;case 6:return a.left="25%",a.animationDelay="1.5s",a;case 7:return a.right="15%",a.animationDelay="0.5s",a;case 8:return a.left="10%",a.animationDelay="1s",a;case 9:return a.right="5%",a.animationDelay="1s",a;default:return a.left="20%",a.animationDelay="1.5s",a}}(e):function(e){var t=e%10,a={top:"".concat(4*e,"%")};switch(t){case 0:return a.left="25%",a.animationDelay="0.5s",a;case 1:return a.right="30%",a.animationDelay="1s",a;case 2:return a.left="40%",a;case 3:return a.right="10%",a.animationDelay="0.5s",a;case 4:return a.left="10%",a.animationDelay="1.5s",a;case 5:return a.right="40%",a;case 6:return a.left="30%",a.animationDelay="1.5s",a;case 7:return a.right="30%",a.animationDelay="0.5s",a;case 8:return a.left="10%",a.animationDelay="1s",a;case 9:return a.right="10%",a.animationDelay="1s",a;default:return a.left="40%",a.animationDelay="1.5s",a}}(e)}var u=n.memo((function(e){var t=r.m.shuffle(c.e.Onboarding.LOADING_THUMBNAILS),a=(0,i.k)();return n.createElement("div",{className:"".concat("n2Qe4"," ").concat("50%"===e.screenSize?"w-50":"w-100")},t.map((function(t,r){return n.createElement("div",{key:r,className:"".concat("ZlA2t"," position-absolute rounded-3 overflow-hidden"),style:s(r,a.xs?"mobile":e.screenSize)},!e.hideThumbnailMask&&n.createElement("div",{className:"".concat("jNop3"," ").concat("blue"===e.variant?"jVOWE":"YNfFq")}),n.createElement("img",{className:"img-fluid",src:o.j.createUrl(t,{size:l.h2.Small})}))})))}))},49036:(e,t,a)=>{a.d(t,{Y:()=>u});var n=a(32735),r=a(54610),c=a(67453),l=a(2248);const i={magicTab:"H5jzm",subjectPlaceholder:"r1L6T",placeholderCover:"z9CFT",promotedTopicPlaceholder:"PbYs6",promotedTopicPlaceholderText:"hZ8Nf"};function o(e){return n.createElement("li",{className:"col-4"},n.createElement("div",{className:"d-flex border rounded-3 overflow-hidden ".concat(i.subjectPlaceholder)},e.coverUrl?n.createElement("div",{className:i.placeholderCover},n.createElement("img",{className:"img-fluid",src:c.j.createUrl(e.coverUrl,{size:r.h2.Small})})):n.createElement("div",{className:"".concat(i.placeholderCover," bg-light-blue")})))}function s(){return n.createElement("li",{className:"col-4"},n.createElement("div",{className:"bg-light-blue rounded-3 w-100 p-1 ".concat(i.promotedTopicPlaceholder)}))}function u(e){var t,a,r,c=Math.max(12-(null!==(a=null===(t=e.subjects)||void 0===t?void 0:t.length)&&void 0!==a?a:0),0);return n.createElement(l.L,{presentation:e.presentation,curriculum:e.curriculum,editingCurriculum:e.editingCurriculum},n.createElement("div",{className:"px-3 pt-3 w-100 d-flex flex-column align-items-center"},n.createElement("div",{className:"rounded-3 border overflow-hidden d-flex mb-2"},n.createElement("div",{className:"bg-light ".concat(i.magicTab)}),n.createElement("div",{className:"".concat(i.magicTab)})),n.createElement("ul",{className:"list-unstyled mb-0 row w-100 g-xl-2 g-lg-1 mb-2"},null===(r=e.subjects)||void 0===r?void 0:r.map((function(e){var t;return n.createElement(o,{key:e.id,coverUrl:null===(t=e.cover)||void 0===t?void 0:t.url})})),new Array(c).fill(0).map((function(e,t){return n.createElement(o,{key:t})}))),n.createElement("ul",{className:"list-unstyled mb-0 row w-100 g-xl-2 g-lg-1"},n.createElement(s,null),n.createElement(s,null),n.createElement(s,null),n.createElement(s,null),n.createElement(s,null),n.createElement(s,null),n.createElement(s,null),n.createElement(s,null),n.createElement(s,null))))}},2248:(e,t,a)=>{a.d(t,{L:()=>p});var n=a(32735),r=a(60376),c=a(83914),l=a(2786),i=a(83345),o=a(72639),s=a(79967),u=a(35223),m=a(10144);const d={dot:"AlRQD",logo:"L42gR",blackBar:"ESCxm",topNav:"a3G_4",leftNav:"YxGVV",belowHeader:"jc_cg",leftNavIcon:"U6i6r",leftNavText:"LnYlW",presentationPlaceholderIcon:"Ljaju",presentationIcon:"QdwPq",presentationPlaceholderText:"af06V",curriculumIcon:"N7T4T",curriculumIconSmall:"_6xrUg",curriculumContainer:"Z65qX",iconPlaceholder:"CKOXL",shadow:"zygeJ",presentationName:"Oj7Dt"};var v="onboarding.mockLayout";function f(){return n.createElement("div",{className:"d-flex align-items-center justify-content-center mb-2 px-3"},n.createElement("div",{className:"".concat(d.leftNavIcon," rounded-circle")}),n.createElement("div",{className:"".concat(d.leftNavText," rounded-pill")}))}function p(e){var t,a,p=(0,s.k)();return n.createElement("div",{className:"border border-dark border-2 bg-white rounded-3 user-select-none overflow-hidden position-relative h-100 w-100"},!!e.editingCurriculum&&n.createElement("div",{className:"w-100 h-100 position-absolute ".concat(d.shadow)},n.createElement("div",{className:"d-flex align-items-center h-100 w-50 ".concat(d.curriculumContainer)},n.createElement("div",{className:"bg-white rounded-3 border p-3 w-100"},n.createElement("h2",{className:"h6 text-start"},n.createElement(i.x,{namespace:v,phrase:"curriculum"})),e.curriculum?n.createElement("div",{className:"d-flex align-items-center"},n.createElement("div",{className:"".concat(d.curriculumIcon," rounded-circle me-2 border")},n.createElement(r.f,{imageUrl:null===(t=e.curriculum.cover)||void 0===t?void 0:t.url})),n.createElement("div",{className:"text-start"},e.curriculum.name)):n.createElement("div",{className:"d-flex align-items-center text-muted"},n.createElement("div",{className:"me-2 rounded-circle p-1 ".concat(d.iconPlaceholder)},n.createElement(r.f,{svgSize:c.S.Large,textVariant:"secondary",svgName:u.vn.GraduationCap})),n.createElement(i.x,{namespace:v,phrase:"selectCurriculum"}))))),n.createElement("div",{className:"bg-dark d-flex px-3 py-2 ".concat(d.blackBar)},n.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),n.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),n.createElement("div",{className:"rounded-circle ".concat(d.dot)})),n.createElement("div",{className:"border-bottom px-3 py-2 d-flex align-items-center ".concat(d.topNav)},n.createElement("div",{className:"".concat(d.logo," me-4")},p.xs?n.createElement(l.bc,null):n.createElement(l.$S,null)),n.createElement("div",{className:"form-control w-75 d-flex justify-content-start"},n.createElement(c.x,{svgName:u.vn.Search})),!!e.curriculum&&n.createElement("div",{className:"".concat(d.curriculumIconSmall," rounded-circle ms-2 me-n1 border")},n.createElement(r.f,{imageUrl:null===(a=e.curriculum.cover)||void 0===a?void 0:a.url}))),n.createElement("div",{className:"d-flex ".concat(d.belowHeader)},n.createElement("div",{className:"".concat(d.leftNav," border-end")},n.createElement("div",{className:"d-flex flex-column pt-3 h-100"},n.createElement(f,null),n.createElement(f,null),n.createElement(f,null),n.createElement(f,null),n.createElement(f,null),n.createElement("div",{className:"d-flex align-items-end h-100 w-100"},n.createElement("div",{className:"border-top p-3 w-100"},n.createElement("div",{className:"d-flex align-items-center"},n.createElement("div",{className:"".concat(function(){if(!e.presentation)return d.presentationPlaceholderIcon;switch(m.i.getMappedPresentationLevel(e.presentation.learningLevel)){case o.p.Level_1:return"bg-indigo ".concat(d.presentationIcon);case o.p.Level_3:return"bg-blue ".concat(d.presentationIcon);default:case o.p.Level_2:return"bg-green ".concat(d.presentationIcon)}}()," text-white rounded")},n.createElement(c.x,{svgName:u.vn.School,size:c.S.Large})),e.presentation?n.createElement("span",{className:"fw-semibold text-truncate ".concat(d.presentationName)},e.presentation.name):n.createElement("div",{className:"".concat(d.presentationPlaceholderText," fw-semibold")},n.createElement(i.x,{namespace:v,phrase:"schoolLevel"}))))))),n.createElement("div",{className:"w-100 h-100 overflow-hidden"},e.children)))}},62007:(e,t,a)=>{a.d(t,{u:()=>u});var n=a(32735),r=a(5465),c=a(72188),l=a(54610),i=a(2248);const o={banner:"CQxNy",title:"NzV5V",description1:"kjCZi",description2:"cBeyJ",placeholder:"Ks_Tl",playlistName:"eFPqz",thumbnailCol:"dgCQ7",videoInfoCol:"pzfE2"};function s(e){return n.createElement("li",{className:"row mb-2"},n.createElement("div",{className:"col-lg-4 col-5 ".concat(o.thumbnailCol)},e.video?n.createElement(c.u,{video:e.video,type:"cosmetic",hideDuration:!0,imageOptions:{size:l.h2.Small}}):n.createElement(r.oy,{type:r.mS.Video,extraClasses:"position-relative rounded-3 ".concat(o.placeholder)})),n.createElement("div",{className:"col-lg-8 col-7 ".concat(o.videoInfoCol)},n.createElement("div",{className:"".concat(o.title," rounded-pill bg-grey mb-1")}),n.createElement("div",{className:"".concat(o.description1," rounded-pill bg-grey mb-1")}),n.createElement("div",{className:"".concat(o.description2," rounded-pill bg-grey mb-1")})))}function u(e){var t,a,r,c=e.hidePlaceholders?0:Math.max(6-(null!==(a=null===(t=e.videos)||void 0===t?void 0:t.length)&&void 0!==a?a:0),0);return n.createElement(i.L,{presentation:e.presentation,curriculum:e.curriculum},n.createElement("div",{className:"bg-teal ".concat(o.banner," position-relative")},e.name&&n.createElement("div",{className:"h5 text-white mb-0 ".concat(o.playlistName)},e.name)),n.createElement("ul",{className:"list-unstyled mb-0 w-100 p-2"},null===(r=e.videos)||void 0===r?void 0:r.map((function(e){return n.createElement(s,{key:e.id,video:e})})),new Array(c).fill(0).map((function(e,t){return n.createElement(s,{key:t})}))))}},81217:(e,t,a)=>{a.r(t),a.d(t,{OnboardingCompletedLoaderView:()=>H});var n=a(32735),r=a(57900),c=a(2948),l=a(20354),i=a(2158),o=a(21750),s=a(86702),u=a(82817),m=a(86698),d=a(83345),v=a(63478),f=a(24250),p=a(81886),h=a(14070),E=a(97291);function g(e){n.useEffect((function(){var t=window.setTimeout((function(){p.Q.C$.trigger({application:E.O.DASHBOARD,action:h.e.Dashboard.HOME})}),e);return function(){window.clearTimeout(t)}}),[])}const b={loaderText:"acbPl"};var y="onboarding.advisorVideoLoader";function N(){return g(4e3),n.createElement(v.B,{variant:"blue"},n.createElement("h1",{className:"h-100 w-100 d-flex align-items-center justify-content-center text-white h3 mb-3 position-relative ".concat(b.loaderText)},n.createElement(d.x,{namespace:y,phrase:"takingYouToClickView"})),n.createElement(f.R,{screenSize:"100%",variant:"blue"}))}var w=a(99742);const x={content:"qggDl",imageContainer:"lqHIJ"};var D="onboarding.contactSalesLoader";function S(){return g(4e3),n.createElement(v.B,{variant:"blue"},n.createElement("div",{className:"".concat(x.content," text-center")},n.createElement("div",{className:"".concat(x.imageContainer," mx-auto")},n.createElement("img",{className:"img-fluid",src:w.W.OnboardingV2.ContactSales.LOADER})),n.createElement("h1",{className:"h-100 w-100 d-flex align-items-center justify-content-center text-white h3"},n.createElement(d.x,{namespace:D,phrase:"heading"}))),n.createElement(f.R,{screenSize:"100%",variant:"blue"}))}var C=a(62007),j=a(96347);function T(){n.useEffect((function(){(0,j.p)("tsparticles",{count:500,drift:25,origin:{x:50,y:100},position:{x:50,y:100},startVelocity:100,ticks:100,gravity:3})}),[])}const O={playlistContainer:"J5iom",confetti:"Ja1bk",discover:"njFgx"};function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var A="onboarding.creatingPlaylistLoader",L=5e3;function P(e){var t,a,r=(t=n.useState(!1),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,c,l,i=[],o=!0,s=!1;try{if(c=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;o=!1}else for(;!(o=(n=c.call(a)).done)&&(i.push(n.value),i.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{if(!o&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(s)throw r}}return i}}(t,a)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?k(e,t):void 0}}(t,a)||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.")}()),c=r[0],l=r[1];return T(),n.useEffect((function(){var e=window.setTimeout((function(){l(!0)}),L);return function(){window.clearTimeout(e)}}),[]),n.useEffect((function(){if(c){var e=window.setTimeout((function(){p.Q.C$.trigger({application:E.O.DASHBOARD,action:h.e.Dashboard.HOME})}),L);return function(){window.clearTimeout(e)}}}),[c]),c?n.createElement(v.B,{variant:"dark-blue"},n.createElement("div",{className:"".concat(O.playlistContainer," ").concat(O.discover)},n.createElement("h1",{className:"text-white h3 text-center mb-3"},n.createElement(d.x,{namespace:A,phrase:"takingYouToDiscover"})),n.createElement(C.u,{presentation:e.presentation,curriculum:e.curriculum,videos:e.videos,name:e.name,hidePlaceholders:!0})),n.createElement(f.R,{screenSize:"100%",variant:"dark-blue"})):n.createElement(v.B,{variant:"dark-blue"},n.createElement("div",{className:"".concat(O.playlistContainer," ").concat(O.confetti)},n.createElement("h1",{className:"text-white h3 text-center mb-3"},n.createElement(d.x,{namespace:A,phrase:"greatJob"}),n.createElement("br",null),n.createElement(d.x,{namespace:A,phrase:"creatingPlaylist"})),n.createElement(C.u,{presentation:e.presentation,curriculum:e.curriculum,videos:e.videos,name:e.name,hidePlaceholders:!0})))}var I=a(49036);const B={container:"GVDR9"};function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var z="onboarding.defaultLoader",V=5e3;function U(e){var t,a,r=(t=n.useState(!1),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,c,l,i=[],o=!0,s=!1;try{if(c=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;o=!1}else for(;!(o=(n=c.call(a)).done)&&(i.push(n.value),i.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{if(!o&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(s)throw r}}return i}}(t,a)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?R(e,t):void 0}}(t,a)||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.")}()),c=r[0],l=r[1];return T(),n.useEffect((function(){var e=window.setTimeout((function(){l(!0)}),V);return function(){window.clearTimeout(e)}}),[]),n.useEffect((function(){if(c){var e=window.setTimeout((function(){p.Q.C$.trigger({application:E.O.DASHBOARD,action:h.e.Dashboard.HOME})}),V);return function(){window.clearTimeout(e)}}}),[c]),c?n.createElement(v.B,{variant:"dark-blue"},n.createElement("div",{className:"".concat(B.container)},n.createElement("h1",{className:"text-white h3 text-center mb-3"},n.createElement(d.x,{namespace:z,phrase:"takingYouToDiscover"})),n.createElement(I.Y,{presentation:e.presentation,curriculum:e.curriculum,subjects:e.subjects})),n.createElement(f.R,{screenSize:"100%",variant:"dark-blue"})):n.createElement(v.B,{variant:"dark-blue"},n.createElement("div",{className:"".concat(B.container)},n.createElement("h1",{className:"text-white h3 text-center mb-3"},n.createElement(d.x,{namespace:z,phrase:"allDone"})),n.createElement(I.Y,{presentation:e.presentation,subjects:e.subjects,curriculum:e.curriculum})))}var _=a(67963);function M(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,c,l,i=[],o=!0,s=!1;try{if(c=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;o=!1}else for(;!(o=(n=c.call(a)).done)&&(i.push(n.value),i.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{if(!o&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?F(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function H(){var e=(0,_.u)(),t=(0,i.T)(e).getPathway,a=M((0,c.D)(s.y.ONBOARDING_LOADER,{}),1)[0],d=M((0,c.D)(s.y.ONBOARDING_VIDEOS,[],{storage:r.Z1.LocalStorage}),1)[0],v=(0,m.y)().preferredPresentation,f=(0,u.M)().activeCurriculum,p=l.a.useBasicFetch(o.x.classifications()),h=n.useMemo((function(){switch(t().currentScreen){case"create-playlist":return"create-playlist";case"advisor-video":return"advisor-video";case"contact-sales":return"contact-sales";default:return"default"}}),[]);return"default"===h?n.createElement(U,{subjects:p.data,presentation:v,curriculum:f}):"create-playlist"===h?n.createElement(P,{name:a.playlistName,videos:d,presentation:v,curriculum:f}):"advisor-video"===h?n.createElement(N,null):"contact-sales"===h?n.createElement(S,null):n.createElement(n.Fragment,null)}}}]);