@clickview/streamable-learning 0.34.1-dev.2 → 0.35.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +2 -2
- package/dist/css/103-streamable-learning-5060b6cda5.chunk.css +7 -0
- package/dist/css/1269-streamable-learning-a12c4ebc99.chunk.css +2 -0
- package/dist/css/1457-streamable-learning-c8c8b3b9b1.chunk.css +50 -0
- package/dist/css/2334-streamable-learning-de03ae073a.chunk.css +2 -0
- package/dist/css/3322-streamable-learning-510e1aa3f3.chunk.css +34 -0
- package/dist/css/3838-streamable-learning-da10685fe8.chunk.css +22 -0
- package/dist/css/4254-streamable-learning-e493f4a027.chunk.css +2 -0
- package/dist/css/4607-streamable-learning-2605302fc2.chunk.css +90 -0
- package/dist/css/4772-streamable-learning-f83b838d71.chunk.css +9 -0
- package/dist/css/5003-streamable-learning-b38d2ddbbe.chunk.css +98 -0
- package/dist/css/5565-streamable-learning-0caae3809b.chunk.css +13 -0
- package/dist/css/6017-streamable-learning-098a205d01.chunk.css +6 -0
- package/dist/css/6356-streamable-learning-8c5b220bf6.chunk.css +1 -0
- package/dist/css/6987-streamable-learning-8f682301c6.chunk.css +1 -0
- package/dist/css/7317-streamable-learning-b5d226bbb6.chunk.css +5 -0
- package/dist/css/8058-streamable-learning-539cf7be18.chunk.css +12 -0
- package/dist/css/8294-streamable-learning-c797263ac2.chunk.css +1 -0
- package/dist/css/8496-streamable-learning-ce19f6ca52.chunk.css +13 -0
- package/dist/css/8601-streamable-learning-f525210660.chunk.css +6 -0
- package/dist/css/9514-streamable-learning-251703c6d1.chunk.css +2 -0
- package/dist/css/9766-streamable-learning-31650ffe5d.chunk.css +8 -0
- package/dist/css/9842-streamable-learning-24729103f7.chunk.css +4 -0
- package/dist/css/9899-streamable-learning-0338f8d2dc.chunk.css +4 -0
- package/dist/css/streamable-learning-dd0c1095d5.css +23 -0
- package/dist/languages/en.json +1 -0
- package/dist/scripts/103-aceced8961-streamable-learning.chunk.js +1 -0
- package/dist/scripts/1097-680a971192-streamable-learning.chunk.js +2 -0
- package/dist/scripts/1097-680a971192-streamable-learning.chunk.js.LICENSE.txt +105 -0
- package/dist/scripts/1269-2d0b903343-streamable-learning.chunk.js +2 -0
- package/dist/scripts/1269-2d0b903343-streamable-learning.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/1457-899f40d09a-streamable-learning.chunk.js +1 -0
- package/dist/scripts/1482-b1dd75897c-streamable-learning.chunk.js +1 -0
- package/dist/scripts/1934-fc017df0da-streamable-learning.chunk.js +2 -0
- package/dist/scripts/1934-fc017df0da-streamable-learning.chunk.js.LICENSE.txt +9 -0
- package/dist/scripts/2042-d51622d63e-streamable-learning.chunk.js +1 -0
- package/dist/scripts/2087-eba9033b1c-streamable-learning.chunk.js +1 -0
- package/dist/scripts/2245-8cd3224e1b-streamable-learning.chunk.js +1 -0
- package/dist/scripts/2334-00b028191d-streamable-learning.chunk.js +1 -0
- package/dist/scripts/2676-c842ec7e8d-streamable-learning.chunk.js +2 -0
- package/dist/scripts/2676-c842ec7e8d-streamable-learning.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/2877-5ffc9711f6-streamable-learning.chunk.js +1 -0
- package/dist/scripts/2911-2ec3a6600a-streamable-learning.chunk.js +1 -0
- package/dist/scripts/3057-731a8ca978-streamable-learning.chunk.js +1 -0
- package/dist/scripts/3093-efbcc927ea-streamable-learning.chunk.js +1 -0
- package/dist/scripts/3186-d1a6ccffde-streamable-learning.chunk.js +1 -0
- package/dist/scripts/3322-33c015dec9-streamable-learning.chunk.js +1 -0
- package/dist/scripts/3472-50ca92bde3-streamable-learning.chunk.js +1 -0
- package/dist/scripts/3838-4a38f33dc2-streamable-learning.chunk.js +1 -0
- package/dist/scripts/3941-2ef15ca9ac-streamable-learning.chunk.js +1 -0
- package/dist/scripts/4254-ef581b8105-streamable-learning.chunk.js +1 -0
- package/dist/scripts/4607-a4edb06dba-streamable-learning.chunk.js +2 -0
- package/dist/scripts/4607-a4edb06dba-streamable-learning.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/4772-3cb280f959-streamable-learning.chunk.js +2 -0
- package/dist/scripts/4772-3cb280f959-streamable-learning.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/4951-df701c6a8d-streamable-learning.chunk.js +1 -0
- package/dist/scripts/5003-7468a75d64-streamable-learning.chunk.js +2 -0
- package/dist/scripts/5003-7468a75d64-streamable-learning.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/5088-2e09e1ba6e-streamable-learning.chunk.js +1 -0
- package/dist/scripts/5173-a800a17d0d-streamable-learning.chunk.js +1 -0
- package/dist/scripts/5446-2cbe9f9d1b-streamable-learning.chunk.js +1 -0
- package/dist/scripts/5543-205aaa36a6-streamable-learning.chunk.js +1 -0
- package/dist/scripts/5565-224d86dc1b-streamable-learning.chunk.js +1 -0
- package/dist/scripts/578-2cc99f46f7-streamable-learning.chunk.js +1 -0
- package/dist/scripts/6017-5bd6f9bf7a-streamable-learning.chunk.js +2 -0
- package/dist/scripts/6017-5bd6f9bf7a-streamable-learning.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/6356-eefa3ff22e-streamable-learning.chunk.js +1 -0
- package/dist/scripts/6979-ef9a3931a2-streamable-learning.chunk.js +2 -0
- package/dist/scripts/6979-ef9a3931a2-streamable-learning.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/6987-e58de31cfe-streamable-learning.chunk.js +1 -0
- package/dist/scripts/7317-6b7186c85d-streamable-learning.chunk.js +1 -0
- package/dist/scripts/7347-772848ba8a-streamable-learning.chunk.js +1 -0
- package/dist/scripts/7570-cd4f70ff52-streamable-learning.chunk.js +2 -0
- package/dist/scripts/7570-cd4f70ff52-streamable-learning.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/7904-96574373ca-streamable-learning.chunk.js +1 -0
- package/dist/scripts/7925-1e1cfa2a04-streamable-learning.chunk.js +1 -0
- package/dist/scripts/8058-51c4b442d6-streamable-learning.chunk.js +1 -0
- package/dist/scripts/8126-9d09959b28-streamable-learning.chunk.js +2 -0
- package/dist/scripts/8126-9d09959b28-streamable-learning.chunk.js.LICENSE.txt +60 -0
- package/dist/scripts/8397-39ce77876d-streamable-learning.chunk.js +1 -0
- package/dist/scripts/8496-1b2519f9fd-streamable-learning.chunk.js +2 -0
- package/dist/scripts/8496-1b2519f9fd-streamable-learning.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/8599-b74e1ab6e3-streamable-learning.chunk.js +1 -0
- package/dist/scripts/8601-37783cf18b-streamable-learning.chunk.js +1 -0
- package/dist/scripts/8819-2a50dd6a9b-streamable-learning.chunk.js +1 -0
- package/dist/scripts/8937-5103db88d8-streamable-learning.chunk.js +1 -0
- package/dist/scripts/9390-bbaf07ad0f-streamable-learning.chunk.js +1 -0
- package/dist/scripts/9514-a31ca9af06-streamable-learning.chunk.js +1 -0
- package/dist/scripts/9766-48d72d9285-streamable-learning.chunk.js +2 -0
- package/dist/scripts/9766-48d72d9285-streamable-learning.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/9842-36d830ee87-streamable-learning.chunk.js +1 -0
- package/dist/scripts/9899-f33e8f1d43-streamable-learning.chunk.js +2 -0
- package/dist/scripts/9899-f33e8f1d43-streamable-learning.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/bundle-7ea4deeaa8.min.js +2 -0
- package/dist/scripts/bundle-7ea4deeaa8.min.js.LICENSE.txt +108 -0
- package/dist/scripts/pdf.worker.entry-a2092a6670.min.worker.js +2 -0
- package/dist/scripts/pdf.worker.entry-a2092a6670.min.worker.js.LICENSE.txt +21 -0
- package/package.json +3 -5
- package/typings/utils/imports.d.ts +1 -2
- package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/css/B-attovs.chunk.css +0 -9
- package/dist/css/B1NucFMn.chunk.css +0 -1
- package/dist/css/BPdg7JW4.chunk.css +0 -1
- package/dist/css/BPrUSCaY.chunk.css +0 -1
- package/dist/css/BR0fUt9D.chunk.css +0 -1
- package/dist/css/BhYm6SRm.chunk.css +0 -1
- package/dist/css/BiRz4h1c.chunk.css +0 -1
- package/dist/css/Bq1ChJn4.chunk.css +0 -1
- package/dist/css/Bt85j9js.chunk.css +0 -1
- package/dist/css/BuYrqi9E.chunk.css +0 -1
- package/dist/css/BugV1Bpa.chunk.css +0 -1
- package/dist/css/BuuVPl7n.chunk.css +0 -1
- package/dist/css/C1NkrNqQ.chunk.css +0 -1
- package/dist/css/C1qv5jz5.chunk.css +0 -1
- package/dist/css/C7XoyEPr.chunk.css +0 -1
- package/dist/css/C7_MDu56.chunk.css +0 -1
- package/dist/css/CC5F5C8O.chunk.css +0 -1
- package/dist/css/CChSC6Ta.chunk.css +0 -1
- package/dist/css/CCsCPLDG.chunk.css +0 -1
- package/dist/css/CD1qrI1T.chunk.css +0 -1
- package/dist/css/CKqvCBj4.chunk.css +0 -1
- package/dist/css/CLZ0Ycds.chunk.css +0 -1
- package/dist/css/CO7M4rZW.chunk.css +0 -1
- package/dist/css/CY0yvCW4.chunk.css +0 -1
- package/dist/css/CYGsw8FT.chunk.css +0 -1
- package/dist/css/Cbi3KYBa.chunk.css +0 -1
- package/dist/css/CliS8Q8r.chunk.css +0 -1
- package/dist/css/D-kQKsZN.chunk.css +0 -1
- package/dist/css/D2NwUVrK.chunk.css +0 -1
- package/dist/css/D4g1IoUU.chunk.css +0 -1
- package/dist/css/DBgpcO3T.chunk.css +0 -1
- package/dist/css/DDnpOnVB.chunk.css +0 -1
- package/dist/css/DZJSONGP.chunk.css +0 -1
- package/dist/css/Dc0zNt2E.chunk.css +0 -1
- package/dist/css/DeAfaPiD.chunk.css +0 -1
- package/dist/css/Dj731zLm.chunk.css +0 -1
- package/dist/css/DjPPxa0A.chunk.css +0 -1
- package/dist/css/DlOtoSz0.chunk.css +0 -1
- package/dist/css/DwduQat7.chunk.css +0 -1
- package/dist/css/Dzuu2GTx.chunk.css +0 -1
- package/dist/css/JAvsJreH.chunk.css +0 -1
- package/dist/css/NKlFYVOc.chunk.css +0 -1
- package/dist/css/VZd8qGtK.chunk.css +0 -1
- package/dist/css/Y7U--2na.chunk.css +0 -1
- package/dist/css/ir3IcK_l.chunk.css +0 -1
- package/dist/css/jbMisi9r.chunk.css +0 -1
- package/dist/css/kS5aDtIJ.chunk.css +0 -1
- package/dist/css/mqCL1o7m.chunk.css +0 -1
- package/dist/css/qZzkUeZk.chunk.css +0 -1
- package/dist/css/sC_H3yXE.chunk.css +0 -1
- package/dist/css/wR_6C_NV.chunk.css +0 -1
- package/dist/en.json +0 -1
- package/dist/scripts/7tlnqdEj.chunk.js +0 -2
- package/dist/scripts/7tlnqdEj.chunk.js.map +0 -1
- package/dist/scripts/82OY25pR.chunk.js +0 -2
- package/dist/scripts/82OY25pR.chunk.js.map +0 -1
- package/dist/scripts/8JOxjlae.chunk.js +0 -15
- package/dist/scripts/8JOxjlae.chunk.js.map +0 -1
- package/dist/scripts/B-_Kgmt0.chunk.js +0 -2
- package/dist/scripts/B-_Kgmt0.chunk.js.map +0 -1
- package/dist/scripts/B0KMLOp5.chunk.js +0 -2
- package/dist/scripts/B0KMLOp5.chunk.js.map +0 -1
- package/dist/scripts/B1QWJfPw.chunk.js +0 -3
- package/dist/scripts/B1QWJfPw.chunk.js.map +0 -1
- package/dist/scripts/B26T27lj.chunk.js +0 -2
- package/dist/scripts/B26T27lj.chunk.js.map +0 -1
- package/dist/scripts/B32lL5ga.chunk.js +0 -2
- package/dist/scripts/B32lL5ga.chunk.js.map +0 -1
- package/dist/scripts/B5lCwpXp.chunk.js +0 -2
- package/dist/scripts/B5lCwpXp.chunk.js.map +0 -1
- package/dist/scripts/B8qPNVvK.chunk.js +0 -2
- package/dist/scripts/B8qPNVvK.chunk.js.map +0 -1
- package/dist/scripts/BBnDr_iy.chunk.js +0 -2
- package/dist/scripts/BBnDr_iy.chunk.js.map +0 -1
- package/dist/scripts/BCQ0kOEO.chunk.js +0 -6
- package/dist/scripts/BCQ0kOEO.chunk.js.map +0 -1
- package/dist/scripts/BCyuhFou.chunk.js +0 -2
- package/dist/scripts/BCyuhFou.chunk.js.map +0 -1
- package/dist/scripts/BF7Uu3LW.chunk.js +0 -2
- package/dist/scripts/BF7Uu3LW.chunk.js.map +0 -1
- package/dist/scripts/BG6_Ss4G.chunk.js +0 -2
- package/dist/scripts/BG6_Ss4G.chunk.js.map +0 -1
- package/dist/scripts/BMrWb7Ku.chunk.js +0 -2
- package/dist/scripts/BMrWb7Ku.chunk.js.map +0 -1
- package/dist/scripts/BQH1xd9z.chunk.js +0 -2
- package/dist/scripts/BQH1xd9z.chunk.js.map +0 -1
- package/dist/scripts/BW1iqZG2.chunk.js +0 -2
- package/dist/scripts/BW1iqZG2.chunk.js.map +0 -1
- package/dist/scripts/BdHxGaRy.chunk.js +0 -2
- package/dist/scripts/BdHxGaRy.chunk.js.map +0 -1
- package/dist/scripts/BdniDID_.chunk.js +0 -2
- package/dist/scripts/BdniDID_.chunk.js.map +0 -1
- package/dist/scripts/BeTQIGnj.chunk.js +0 -2
- package/dist/scripts/BeTQIGnj.chunk.js.map +0 -1
- package/dist/scripts/Bf3WCYXw.chunk.js +0 -8
- package/dist/scripts/Bf3WCYXw.chunk.js.map +0 -1
- package/dist/scripts/Bh4NsrSi.chunk.js +0 -2
- package/dist/scripts/Bh4NsrSi.chunk.js.map +0 -1
- package/dist/scripts/BjOv-usB.chunk.js +0 -2
- package/dist/scripts/BjOv-usB.chunk.js.map +0 -1
- package/dist/scripts/BkGt8Gr1.chunk.js +0 -2
- package/dist/scripts/BkGt8Gr1.chunk.js.map +0 -1
- package/dist/scripts/BlFiywl_.chunk.js +0 -2
- package/dist/scripts/BlFiywl_.chunk.js.map +0 -1
- package/dist/scripts/BoNyBWaZ.chunk.js +0 -2
- package/dist/scripts/BoNyBWaZ.chunk.js.map +0 -1
- package/dist/scripts/Bvum7-8x.chunk.js +0 -8
- package/dist/scripts/Bvum7-8x.chunk.js.map +0 -1
- package/dist/scripts/BwDmMfAz.chunk.js +0 -2
- package/dist/scripts/BwDmMfAz.chunk.js.map +0 -1
- package/dist/scripts/BwgQZkdi.chunk.js +0 -2
- package/dist/scripts/BwgQZkdi.chunk.js.map +0 -1
- package/dist/scripts/C-7yn3rc.chunk.js +0 -2
- package/dist/scripts/C-7yn3rc.chunk.js.map +0 -1
- package/dist/scripts/C-pJ0Wi3.chunk.js +0 -2
- package/dist/scripts/C-pJ0Wi3.chunk.js.map +0 -1
- package/dist/scripts/C35NlkUr.chunk.js +0 -2
- package/dist/scripts/C35NlkUr.chunk.js.map +0 -1
- package/dist/scripts/C36-3UWl.chunk.js +0 -2
- package/dist/scripts/C36-3UWl.chunk.js.map +0 -1
- package/dist/scripts/C3fMNXil.chunk.js +0 -2
- package/dist/scripts/C3fMNXil.chunk.js.map +0 -1
- package/dist/scripts/C8Br2CdQ.chunk.js +0 -2
- package/dist/scripts/C8Br2CdQ.chunk.js.map +0 -1
- package/dist/scripts/CEmtkty-.chunk.js +0 -2
- package/dist/scripts/CEmtkty-.chunk.js.map +0 -1
- package/dist/scripts/CFs3kdQx.chunk.js +0 -53
- package/dist/scripts/CFs3kdQx.chunk.js.map +0 -1
- package/dist/scripts/CGNCg1fO.chunk.js +0 -2
- package/dist/scripts/CGNCg1fO.chunk.js.map +0 -1
- package/dist/scripts/CPXlV0fg.chunk.js +0 -2
- package/dist/scripts/CPXlV0fg.chunk.js.map +0 -1
- package/dist/scripts/CSoZBG8v.chunk.js +0 -2
- package/dist/scripts/CSoZBG8v.chunk.js.map +0 -1
- package/dist/scripts/CW7x8M-z.chunk.js +0 -2
- package/dist/scripts/CW7x8M-z.chunk.js.map +0 -1
- package/dist/scripts/CWHjB5Ye.chunk.js +0 -2
- package/dist/scripts/CWHjB5Ye.chunk.js.map +0 -1
- package/dist/scripts/CXslDtbb.chunk.js +0 -2
- package/dist/scripts/CXslDtbb.chunk.js.map +0 -1
- package/dist/scripts/CZLZ0bbA.chunk.js +0 -2
- package/dist/scripts/CZLZ0bbA.chunk.js.map +0 -1
- package/dist/scripts/CZafJWQk.chunk.js +0 -2
- package/dist/scripts/CZafJWQk.chunk.js.map +0 -1
- package/dist/scripts/CbFIe2Y6.chunk.js +0 -2
- package/dist/scripts/CbFIe2Y6.chunk.js.map +0 -1
- package/dist/scripts/Cg8SIDnK.chunk.js +0 -8
- package/dist/scripts/Cg8SIDnK.chunk.js.map +0 -1
- package/dist/scripts/Cib9o4sK.chunk.js +0 -2
- package/dist/scripts/Cib9o4sK.chunk.js.map +0 -1
- package/dist/scripts/Ciyuu-YU.chunk.js +0 -356
- package/dist/scripts/Ciyuu-YU.chunk.js.map +0 -1
- package/dist/scripts/CkMhHhda.chunk.js +0 -2
- package/dist/scripts/CkMhHhda.chunk.js.map +0 -1
- package/dist/scripts/CmAQo6rx.chunk.js +0 -2
- package/dist/scripts/CmAQo6rx.chunk.js.map +0 -1
- package/dist/scripts/CmcmWGL0.chunk.js +0 -2
- package/dist/scripts/CmcmWGL0.chunk.js.map +0 -1
- package/dist/scripts/Cmu1J2M7.chunk.js +0 -262
- package/dist/scripts/Cmu1J2M7.chunk.js.map +0 -1
- package/dist/scripts/CrkRNOU9.chunk.js +0 -2
- package/dist/scripts/CrkRNOU9.chunk.js.map +0 -1
- package/dist/scripts/CskJerl_.chunk.js +0 -2
- package/dist/scripts/CskJerl_.chunk.js.map +0 -1
- package/dist/scripts/Ct_IIxaS.chunk.js +0 -2
- package/dist/scripts/Ct_IIxaS.chunk.js.map +0 -1
- package/dist/scripts/Cuuw0EUi.chunk.js +0 -8
- package/dist/scripts/Cuuw0EUi.chunk.js.map +0 -1
- package/dist/scripts/Cz45aonc.chunk.js +0 -2
- package/dist/scripts/Cz45aonc.chunk.js.map +0 -1
- package/dist/scripts/D-I94wdL.chunk.js +0 -7
- package/dist/scripts/D-I94wdL.chunk.js.map +0 -1
- package/dist/scripts/D0UlXsF8.chunk.js +0 -2
- package/dist/scripts/D0UlXsF8.chunk.js.map +0 -1
- package/dist/scripts/D0cZC7S-.chunk.js +0 -2
- package/dist/scripts/D0cZC7S-.chunk.js.map +0 -1
- package/dist/scripts/D1D6Gqx1.chunk.js +0 -2
- package/dist/scripts/D1D6Gqx1.chunk.js.map +0 -1
- package/dist/scripts/D3tziVkG.chunk.js +0 -2
- package/dist/scripts/D3tziVkG.chunk.js.map +0 -1
- package/dist/scripts/D4MOOnR6.chunk.js +0 -2
- package/dist/scripts/D4MOOnR6.chunk.js.map +0 -1
- package/dist/scripts/D83kc0Wf.chunk.js +0 -2
- package/dist/scripts/D83kc0Wf.chunk.js.map +0 -1
- package/dist/scripts/D8dAIhzO.chunk.js +0 -2
- package/dist/scripts/D8dAIhzO.chunk.js.map +0 -1
- package/dist/scripts/DBp0J6X9.chunk.js +0 -2
- package/dist/scripts/DBp0J6X9.chunk.js.map +0 -1
- package/dist/scripts/DCds0mCy.chunk.js +0 -2
- package/dist/scripts/DCds0mCy.chunk.js.map +0 -1
- package/dist/scripts/DEwFBSVv.chunk.js +0 -2
- package/dist/scripts/DEwFBSVv.chunk.js.map +0 -1
- package/dist/scripts/DF55CDS8.chunk.js +0 -2
- package/dist/scripts/DF55CDS8.chunk.js.map +0 -1
- package/dist/scripts/DFw_xy-Y.chunk.js +0 -2
- package/dist/scripts/DFw_xy-Y.chunk.js.map +0 -1
- package/dist/scripts/DIGYepWa.chunk.js +0 -2
- package/dist/scripts/DIGYepWa.chunk.js.map +0 -1
- package/dist/scripts/DKeFeMvi.chunk.js +0 -2
- package/dist/scripts/DKeFeMvi.chunk.js.map +0 -1
- package/dist/scripts/DKqLfL60.chunk.js +0 -5
- package/dist/scripts/DKqLfL60.chunk.js.map +0 -1
- package/dist/scripts/DLJB8vZh.chunk.js +0 -2
- package/dist/scripts/DLJB8vZh.chunk.js.map +0 -1
- package/dist/scripts/DNtSrq_L.chunk.js +0 -2
- package/dist/scripts/DNtSrq_L.chunk.js.map +0 -1
- package/dist/scripts/DOHPsm0Q.chunk.js +0 -2
- package/dist/scripts/DOHPsm0Q.chunk.js.map +0 -1
- package/dist/scripts/DP-ErTOD.chunk.js +0 -2
- package/dist/scripts/DP-ErTOD.chunk.js.map +0 -1
- package/dist/scripts/DUwkrIwb.chunk.js +0 -2
- package/dist/scripts/DUwkrIwb.chunk.js.map +0 -1
- package/dist/scripts/DUyJfVnL.chunk.js +0 -2
- package/dist/scripts/DUyJfVnL.chunk.js.map +0 -1
- package/dist/scripts/DVfbSloY.chunk.js +0 -2
- package/dist/scripts/DVfbSloY.chunk.js.map +0 -1
- package/dist/scripts/DWvpibWQ.chunk.js +0 -2
- package/dist/scripts/DWvpibWQ.chunk.js.map +0 -1
- package/dist/scripts/DYmgSjx-.chunk.js +0 -10
- package/dist/scripts/DYmgSjx-.chunk.js.map +0 -1
- package/dist/scripts/D_EfITTc.chunk.js +0 -2
- package/dist/scripts/D_EfITTc.chunk.js.map +0 -1
- package/dist/scripts/DayWKE6G.chunk.js +0 -2
- package/dist/scripts/DayWKE6G.chunk.js.map +0 -1
- package/dist/scripts/DcOpKno_.chunk.js +0 -2
- package/dist/scripts/DcOpKno_.chunk.js.map +0 -1
- package/dist/scripts/DgMPP2NS.chunk.js +0 -2
- package/dist/scripts/DgMPP2NS.chunk.js.map +0 -1
- package/dist/scripts/DhWvZ3GP.chunk.js +0 -2
- package/dist/scripts/DhWvZ3GP.chunk.js.map +0 -1
- package/dist/scripts/Digrmnl9.chunk.js +0 -2
- package/dist/scripts/Digrmnl9.chunk.js.map +0 -1
- package/dist/scripts/DjWOPQVv.chunk.js +0 -2
- package/dist/scripts/DjWOPQVv.chunk.js.map +0 -1
- package/dist/scripts/DkSHJqHu.chunk.js +0 -2
- package/dist/scripts/DkSHJqHu.chunk.js.map +0 -1
- package/dist/scripts/Dpq10cRY.chunk.js +0 -2
- package/dist/scripts/Dpq10cRY.chunk.js.map +0 -1
- package/dist/scripts/DrsDxQ8i.chunk.js +0 -2
- package/dist/scripts/DrsDxQ8i.chunk.js.map +0 -1
- package/dist/scripts/DrsVPpSl.chunk.js +0 -3
- package/dist/scripts/DrsVPpSl.chunk.js.map +0 -1
- package/dist/scripts/DvDdiDQN.chunk.js +0 -7
- package/dist/scripts/DvDdiDQN.chunk.js.map +0 -1
- package/dist/scripts/DwU9lZgg.chunk.js +0 -2
- package/dist/scripts/DwU9lZgg.chunk.js.map +0 -1
- package/dist/scripts/I8EoNmf8.chunk.js +0 -2
- package/dist/scripts/I8EoNmf8.chunk.js.map +0 -1
- package/dist/scripts/Im8afRMN.chunk.js +0 -2
- package/dist/scripts/Im8afRMN.chunk.js.map +0 -1
- package/dist/scripts/N_QgBckB.chunk.js +0 -2
- package/dist/scripts/N_QgBckB.chunk.js.map +0 -1
- package/dist/scripts/SnHtKbiQ.chunk.js +0 -2
- package/dist/scripts/SnHtKbiQ.chunk.js.map +0 -1
- package/dist/scripts/U-eF69sj.chunk.js +0 -2
- package/dist/scripts/U-eF69sj.chunk.js.map +0 -1
- package/dist/scripts/XarUQJMp.chunk.js +0 -2
- package/dist/scripts/XarUQJMp.chunk.js.map +0 -1
- package/dist/scripts/ZYx7Po5r.chunk.js +0 -2
- package/dist/scripts/ZYx7Po5r.chunk.js.map +0 -1
- package/dist/scripts/app-DfSv_-O3.js +0 -220
- package/dist/scripts/app-DfSv_-O3.js.map +0 -1
- package/dist/scripts/awsfwCdu.chunk.js +0 -2
- package/dist/scripts/awsfwCdu.chunk.js.map +0 -1
- package/dist/scripts/b1pZWz43.chunk.js +0 -2
- package/dist/scripts/b1pZWz43.chunk.js.map +0 -1
- package/dist/scripts/cvX-F_mx.chunk.js +0 -2
- package/dist/scripts/cvX-F_mx.chunk.js.map +0 -1
- package/dist/scripts/lBHPAFYv.chunk.js +0 -2
- package/dist/scripts/lBHPAFYv.chunk.js.map +0 -1
- package/dist/scripts/mP-Ymt5z.chunk.js +0 -2
- package/dist/scripts/mP-Ymt5z.chunk.js.map +0 -1
- package/dist/scripts/nay4aGaa.chunk.js +0 -2
- package/dist/scripts/nay4aGaa.chunk.js.map +0 -1
- package/dist/scripts/pkzD5BEm.chunk.js +0 -2
- package/dist/scripts/pkzD5BEm.chunk.js.map +0 -1
- package/dist/scripts/tHf2V3t0.chunk.js +0 -2
- package/dist/scripts/tHf2V3t0.chunk.js.map +0 -1
- package/vite.config.ts +0 -6
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 4607-a4edb06dba-streamable-learning.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_clickview_streamable_learning=self.webpackChunk_clickview_streamable_learning||[]).push([[4607],{91053:(e,t,n)=>{"use strict";n.d(t,{B:()=>o});var r=n(32735),i=2;function o(e){var t;return(null===(t=e.availableCurriculums)||void 0===t?void 0:t.length)<i||!e.selectedCurriculum?r.createElement(r.Fragment,null):r.createElement("select",{className:"mb-3 form-select ".concat(e.className),onChange:function(t){return e.onChangeCurriculum(t.target.value)},value:e.selectedCurriculum.id},e.availableCurriculums.map(function(e){return r.createElement("option",{key:e.id,id:e.id,value:e.id},e.name)}))}},49267:(e,t,n)=>{"use strict";n.d(t,{a:()=>p});var r=n(23481),i=n(64364);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){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,u(r.key),r)}}function u(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var f="shared.regionLockedResourceError",p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=c(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n))}(this,t,[r.T.getPhrase(f,"title")])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e),n=t,(i=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return r.T.getPhrase(f,"heading")}},{key:"description",get:function(){return r.T.getPhrase(f,"description")}}])&&a(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.H)},45445:(e,t,n)=>{"use strict";n.d(t,{r:()=>g});var r=n(50242),i=n(81886),o=n(67058),a=n(23481),u=n(64364);function l(e){return l="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},l(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,s(r.key),r)}}function s(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}var h="shared.privateResourceError",v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=p(t),function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}(this,t,[a.T.getPhrase(h,"title")])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return a.T.getPhrase(h,"heading")}},{key:"description",get:function(){return a.T.getPhrase(h,"description")}}])&&c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(u.H),d=n(49267),m=n(49075),b={notFound:o.d,forbidden:{rating:v,yearLevel:v,region:d.a,privacy:v},badRequest:m._,internalServerError:m._};function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o;o="number"==typeof e?e:e.status;var a=Object.assign(Object.assign({},b),t);o&&i.Q.Ry.isStatusCodeError(o)&&(o!==r.o.InternalServer?o!==r.o.NotFound?o!==r.o.Forbidden?n.badRequest||i.Q.Ry.throw(new a.badRequest):n.forbidden||i.Q.Ry.throw(new a.forbidden.privacy):n.notFound||i.Q.Ry.throw(new a.notFound):n.internalServerError||i.Q.Ry.throw(new m._))}}},91286:(e,t,n)=>{"use strict";n.d(t,{v:()=>a});var r=n(32735),i=n(45445);function o(e){return e.map(function(e){return e.statusCode}).join(":")}function a(e,t,n){var a=Array.isArray(e)?e:[e];(0,r.useEffect)(function(){a.forEach(function(e){(0,i.r)(e.statusCode,t,n)})},[o(a),t,n])}},45719:(e,t,n)=>{"use strict";n.d(t,{P:()=>s});var r=n(32735),i=n(70680),o=n(50242),a=n(91967),u=n(20354);function l(e){return function(e){if(Array.isArray(e))return c(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 c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t,n){function o(e){if(e)return a.q.isFunction(t)?l(t(e)):l(e.data)}function c(e){var t,r;if(e)return n?n(e):null===(r=null===(t=e.pagination)||void 0===t?void 0:t.cursors)||void 0===r?void 0:r.next}return(0,i.v9)((0,r.useMemo)(function(){return function(t){if(a.q.isFunction(e)){for(var n=e,r=a.q.isFunction(e)&&n(),i=r&&u.a.getResponse(t,r),s=i&&i.isFetching,f=i&&i.statusCode,p=i&&i.hasCompleted,y=p,h=i&&i.shouldFetch,v=o(i&&i.data),d=c(i&&i.data),m=function(e){if(e)return null==e?void 0:e.count}(i&&i.data);d&&(i=u.a.getResponse(t,n(d)),s=s||i.isFetching,f=i.statusCode,p=i.hasCompleted,!i.shouldFetch);){var b=o(i.data);b&&v.push.apply(v,l(b));var g=c(i.data);d=g===d?null:g}var w={shouldInitialFetch:h,items:v,nextCursor:d,isFetching:s,statusCode:f,hasCompleted:p,hasFirstPageCompleted:y};return"number"==typeof m&&(w.totalItems=m),w}}},[e]))}o.o.Ok},89758:(e,t,n)=>{"use strict";n.d(t,{M:()=>j});var r=n(32735),i=n(23481),o=n(57900),a=n(20354),u=n(2948),l=n(75896),c=n(92582),s=n(65858),f=n(38143),p=n(16714),y=n(25925),h=n(21750),v=n(61699),d=n(31949),m=n(69883),b=n(22902);function g(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return w(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(w(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,w(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,w(f,"constructor",c),w(c,"constructor",l),l.displayName="GeneratorFunction",w(c,i,"GeneratorFunction"),w(f),w(f,i,"Generator"),w(f,r,function(){return this}),w(f,"toString",function(){return"[object Generator]"}),(g=function(){return{w:o,m:p}})()}function w(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}w=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){w(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},w(e,t,n,r)}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(e,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 S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var k=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},P=new Map,j=function(e){var t,n,w,S,j=O((0,u.D)((S=y.R.Curriculum,"".concat(S.toLowerCase(),":").concat(f.g.PRESENTATION_ID)),void 0,{storage:o.Z1.LocalStorage}),2),N=j[0],C=j[1],T=O(r.useState(null),2),E=T[0],_=T[1],R=O(r.useState(null),2),I=R[0],x=R[1],M=O(r.useState(!1),2),L=M[0],B=M[1],D=a.a.useBasicFetch(d.N.currentUser()),A=a.a.useBasicFetch(h.x.availablePresentations(y.R.Curriculum)),F=a.a.useGetFetchAsync(),z=(0,m.Z)(),V=(0,(0,b.T)().hasLocalPermissions)(p.E.ManagePublicPresentation),Z=a.a.useBasicFetch(function(){var e;if(null===(e=D.data)||void 0===e?void 0:e.isAuthenticated)return h.x.presentation(y.R.Curriculum);var t=function(){var e;return isNaN(+N)?null===(e=l.m.first(A.data))||void 0===e?void 0:e.id:N}();return t?h.x.presentationById(t):null}());r.useEffect(function(){var t;Z.data&&(_(Z.data),e&&!I&&F(h.x.curriculumLinks(e,null===(t=Z.data)||void 0===t?void 0:t.id)).then(function(e){var t,n;x(e),P.set(null===(n=null===(t=Z.data)||void 0===t?void 0:t.id)||void 0===n?void 0:n.toString(),e)}))},[null===(t=Z.data)||void 0===t?void 0:t.id]);var U=null!==(w=null===(n=A.data)||void 0===n?void 0:n.map(function(e){return e.id}))&&void 0!==w?w:[],G=a.a.useBasicFetch(e&&U.length&&h.x.getMappedCurriculums(e,U));function K(t){return k(this,void 0,void 0,g().m(function n(){var r;return g().w(function(n){for(;;)switch(n.n){case 0:if(e){n.n=1;break}return n.a(2);case 1:if(!P.has(t.toString())){n.n=2;break}return x(P.get(t.toString())),n.a(2);case 2:if(G.data.find(function(e){return e.id.toString()===t.toString()})){n.n=3;break}return x([]),n.a(2);case 3:return B(!0),n.n=4,F(h.x.curriculumLinks(e,t));case 4:r=n.v,x(r),P.set(t.toString(),r),B(!1);case 5:return n.a(2)}},n)}))}function q(e,t){if(t.shouldLog){var n={id:e.id,name:e.id,description:e.description};t.video&&(n.videoId=t.video.id,n.videoName=t.video.name),c.k.logUserAction(n,{entity:s.py.Presentation,actionType:s.Vw.Select,descriptor:s.kD.Curriculum,location:t.locationContext})}}return{preferredCurriculum:E||Z.data,curriculumLinks:I||[],availableCurriculums:A.data||[],mappedCurriculums:G.data||[],updateCurriculum:function(t,n){return k(this,void 0,void 0,g().m(function r(){var o;return g().w(function(r){for(;;)switch(r.n){case 0:if(E.id.toString()!==t.toString()){r.n=1;break}return r.a(2);case 1:if(o=A.data.find(function(e){return e.id.toString()===t.toString()}),_(o),V&&C(t),r.p=2,!e){r.n=3;break}return r.n=3,K(t);case 3:if(!V){r.n=4;break}return r.a(2);case 4:return r.n=5,F(v.o.setPresentation(o,y.R.Curriculum));case 5:q(o,n),r.n=7;break;case 6:r.p=6,r.v,z.error(i.T.getPhrase("videos.hooks","curriculumUpdateError")),_(E);case 7:return r.a(2)}},r,null,[[2,6]])}))},hasCompleted:!!E&&(!e||!!I&&G.hasCompleted),isFetching:L}}},99303:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PlayView:()=>Qj});var r,i=n(32735),o=n(50242),a=n(81886),u=n(23481),l=n(20354),c=n(28400);!function(e){e.Share="share",e.MasterObject="masterobject"}(r||(r={}));var s=n(78417),f=n(67058),p=n(64364);function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function h(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){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}var g="shared.videoNotFoundError",w=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=m(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}(this,t,[u.T.getPhrase(g,"title")])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"VideoNotFoundError"}},{key:"heading",get:function(){return u.T.getPhrase(g,"heading")}},{key:"description",get:function(){return u.T.getPhrase(g,"description")}}])&&h(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(p.H),O=n(17447);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P(r.key),r)}}function P(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}var T=u.T.encloseNamespace("shared.videoPrivateError");function E(e){return O.M.isClip(e)?T("clipTitle"):O.M.isInteractive(e)?T("interactiveTitle"):T("videoTitle")}var _,R,I=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=N(t),function(e,t){if(t&&("object"==S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,j()?Reflect.construct(t,n||[],N(e).constructor):t.apply(e,n))}(this,t,[E(e)])).video=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"VideoPrivateError"}},{key:"heading",get:function(){return E(this.video)}},{key:"description",get:function(){return e=this.video,O.M.isClip(e)?T("clipDescription"):O.M.isInteractive(e)?T("interactiveDescription"):T("videoDescription");var e}}])&&k(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(p.H),x=n(89454),M=n(39151),L=n(98064),B=n(99940),D={createViewKey:function(e,t,n,r,i){var o={mediaId:e.toString(),mediaIdType:t};return n&&(o.shareContextId=n),{url:"/api/player/create-view-key",key:"view:key:".concat(e,":").concat(t),type:B.k.POST,data:o,cacheDuration:28800,success:r,error:i}}},A=n(97395),F={theme:function(e){return{url:"/api/domain/v1/themes/".concat(e),key:"themes:".concat(e)}},themeImages:function(e,t){return{url:A._.urlBuilder("/api/domain/v1/themes",{name:e,type:t}),key:"themes:".concat(e,":").concat(t)}},themes:function(e){var t="/api/domain/v1/themes",n="themes";return e&&(t+="?type=".concat(e),n+=":type:".concat(e)),{url:t,key:n,formatData:function(e){return e.sort(function(e,t){return e.name.localeCompare(t.name)})}}},createTheme:function(e,t,n,r){return{url:"/api/domain/v1/themes",key:"theme",data:e,type:B.k.POST,invalidationKeys:"themes",success:t,error:n,always:r}},updateTheme:function(e,t,n,r,i){return{url:"/api/domain/v1/themes/".concat(e),key:"update:theme:".concat(e),data:t,type:B.k.PUT,success:n,error:r,always:i}},deleteTheme:function(e,t,n,r){return{url:"/api/domain/v1/themes/".concat(e),key:"delete:theme:".concat(e),type:B.k.DELETE,invalidationKeys:"themes",success:t,error:n,always:r}}},z=n(31949),V=n(11565);!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"}(_||(_={})),function(e){e.Integrations="4407268725529",e.Classrooms="4405362551833",e.MakeInteractive="4405370510873",e.EditSsoAccounts="8202605666073",e.UploadToLibraryEditor="10672936659865",e.AddFromLite="42450541662233",e.ManageSsoYearGroups="14691130889241",e.ContentReview="18525199576601",e.ContentPermissions="14692125209497",e.AccessSettings="27927466562201",e.ContentGuidelines="24133696186009",e.FoxtelFaq="24133519542169",e.ViviIntegration="23826297956377",e.AppleTvIntegration="25832373739929",e.RssFeed="32567445635097",e.ManageGroupPermissions="35407217335705",e.MarcFormatDifferences="48276917260441",e.ExportLibraries="17684275853465",e.StudentSharingGuide="50326395499417",e.Sharing="49512742828953"}(R||(R={}));var Z=n(12778);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 G(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){if("object"!=U(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(t)?t:t+""}function q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(q=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}var Q="shared.restrictedLibraryError",Y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=H(t),function(e,t){if(t&&("object"==U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,q()?Reflect.construct(t,n||[],H(e).constructor):t.apply(e,n))}(this,t,[u.T.getPhrase(Q,"title")])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"RestrictedLibraryError"}},{key:"heading",get:function(){return u.T.getPhrase(Q,"heading")}},{key:"description",get:function(){return u.T.getPhrase(Q,"description")}},{key:"cta",get:function(){return{text:u.T.getPhrase(Q,"cta"),url:Z.o.getLiteArticle(R.StudentSharingGuide),openInNewTab:!0}}}])&&G(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(p.H),$=n(49267),J=n(49075);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 ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,te(r.key),r)}}function te(e){var t=function(e){if("object"!=X(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=X(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==X(t)?t:t+""}function ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ne=function(){return!!e})()}function re(e){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},re(e)}function ie(e,t){return ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ie(e,t)}var oe=u.T.encloseNamespace("shared.loginRequired"),ae=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=re(t),function(e,t){if(t&&("object"==X(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ne()?Reflect.construct(t,n||[],re(e).constructor):t.apply(e,n))}(this,t,[oe("title")])).video=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"LoginRequiredError"}},{key:"heading",get:function(){return oe("title")}},{key:"description",get:function(){return e=this.video,O.M.isClip(e)?oe("clipDescription"):O.M.isInteractive(e)?oe("interactiveDescription"):oe("videoDescription");var e}}])&&ee(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(a.Q._R);function ue(e){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ue(e)}function le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ce(r.key),r)}}function ce(e){var t=function(e){if("object"!=ue(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ue(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ue(t)?t:t+""}function se(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(se=function(){return!!e})()}function fe(e){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fe(e)}function pe(e,t){return pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pe(e,t)}var ye=u.T.encloseNamespace("shared.videoNotInSubscriptionError"),he=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=fe(t),function(e,t){if(t&&("object"==ue(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,se()?Reflect.construct(t,n||[],fe(e).constructor):t.apply(e,n))}(this,t,["VideoNotInSubscriptionError"])).video=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pe(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"VideoNotInSubscriptionError"}},{key:"heading",get:function(){return ye("title")}},{key:"description",get:function(){return ye("description")}}])&&le(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(p.H);function ve(e){return ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ve(e)}function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,me(r.key),r)}}function me(e){var t=function(e){if("object"!=ve(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ve(t)?t:t+""}function be(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(be=function(){return!!e})()}function ge(e){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ge(e)}function we(e,t){return we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},we(e,t)}var Oe=u.T.encloseNamespace("shared.parentVideoDeletedError");function Se(e){return O.M.isClip(e)?Oe("clipTitle"):O.M.isInteractive(e)?Oe("interactiveTitle"):Oe("videoTitle")}var ke=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=ge(t),function(e,t){if(t&&("object"==ve(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,be()?Reflect.construct(t,n||[],ge(e).constructor):t.apply(e,n))}(this,t,[Se(e)])).video=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&we(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"ParentVideoDeletedError"}},{key:"heading",get:function(){return Se(this.video)}},{key:"description",get:function(){return e=this.video,O.M.isClip(e)?Oe("clipDescription"):O.M.isInteractive(e)?Oe("interactiveDescription"):Oe("videoDescription");var e}}])&&de(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(p.H);function Pe(e){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(e)}function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ne(r.key),r)}}function Ne(e){var t=function(e){if("object"!=Pe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pe(t)?t:t+""}function Ce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ce=function(){return!!e})()}function Te(e){return Te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Te(e)}function Ee(e,t){return Ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ee(e,t)}var _e=u.T.encloseNamespace("shared.videoRatingAccess");function Re(e){return O.M.isClip(e)?_e("clipTitle"):O.M.isInteractive(e)?_e("interactiveTitle"):_e("videoTitle")}var Ie=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Te(t),function(e,t){if(t&&("object"==Pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ce()?Reflect.construct(t,n||[],Te(e).constructor):t.apply(e,n))}(this,t,[Re(e)])).video=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ee(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"VideoRatingAccessError"}},{key:"heading",get:function(){return Re(this.video)}},{key:"description",get:function(){return e=this.video,O.M.isClip(e)?_e("clipDescription"):O.M.isInteractive(e)?_e("interactiveDescription"):_e("videoDescription");var e}}])&&je(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(p.H);function xe(e){return xe="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},xe(e)}function Me(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,Le(r.key),r)}}function Le(e){var t=function(e){if("object"!=xe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xe(t)?t:t+""}function Be(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Be=function(){return!!e})()}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}function Ae(e,t){return Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ae(e,t)}var Fe=u.T.encloseNamespace("shared.videoRestrictedError");function ze(e){return O.M.isClip(e)?Fe("clipTitle"):O.M.isInteractive(e)?Fe("interactiveTitle"):Fe("videoTitle")}var Ve={"rating-not-allowed":Ie,"video-deleted":ke,private:I,"clickview-private":he,"login-required":ae,"restricted-access":function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=De(t),function(e,t){if(t&&("object"==xe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Be()?Reflect.construct(t,n||[],De(e).constructor):t.apply(e,n))}(this,t,[ze(e)])).video=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ae(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"VideoRestrictedError"}},{key:"heading",get:function(){return ze(this.video)}},{key:"description",get:function(){return e=this.video,O.M.isClip(e)?Fe("clipDescription"):O.M.isInteractive(e)?Fe("interactiveDescription"):Fe("videoDescription");var e}}])&&Me(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(p.H),"content-region-violated":$.a,"restricted-library":Y},Ze=Object.assign(Object.assign({},Ve),{private:ae,"clickview-private":ae}),Ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=l.a.useBasicFetch(z.N.currentUser());i.useEffect(function(){var r;if(e.hasCompleted&&n.hasCompleted){var i=e.data;if(i){var o=O.M.getCanBeConsumed(i),u=o.canConsume,l=o.reason;if(!u){var c=null!==(r=Object.assign(Object.assign({},n.data.isAuthenticated?Ve:Ze),t)[null!=l?l:"private"])&&void 0!==r?r:J._;a.Q.Ry.throw(new c(i))}}}},[e.hasCompleted,n.hasCompleted])},Ge=n(91286),Ke=n(79612),qe=n(25301),He=n(96359),We=n(41760),Qe=n(41135),Ye=n(31700),$e=n(58321),Je=n(6117),Xe=n(65858),et=n(83345),tt=n(1048),nt=n(11607),rt={getTagActionProps:function(e,t,n){return n?{onClick:function(n){t&&t();var r=e?e(n):null;if(r)return a.Q.C$.trigger(r)}}:{getAppLink:function(t){return e?e(t):null},onClick:t}}},it=n(16035),ot=n(44829),at=n(2096);function ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lt(e){var t;switch(null===(t=e.tagType)||void 0===t?void 0:t.toLowerCase()){case ot.Q.Pedagogy:return 0;case ot.Q.Skill:return 1;default:return 2}}function ct(e){if(!e.tags)return i.createElement(i.Fragment,null);var t,n=(t=e.tags,function(e){if(Array.isArray(e))return ut(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return ut(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ut(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort(function(e,t){return lt(e)-lt(t)});return i.createElement("div",{className:"".concat(at.Z.tagList," ").concat(e.className)},n.map(function(t){var n="function"==typeof e.getAppLink?e.getAppLink(t):null,r="function"==typeof e.onRemove?function(){return e.onRemove(t)}:null,o="function"==typeof e.onClick?function(){return e.onClick(t)}:null;return i.createElement(it.z,{key:t.id||t.name,tag:t,appLink:n,themeColours:e.themeColours,onRemove:r,onClick:o})}))}var st=n(54610),ft=n(67453),pt=n(38946);function yt(e){return yt="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},yt(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,vt(r.key),r)}}function vt(e){var t=function(e){if("object"!=yt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yt(t)?t:t+""}var dt=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}},t=[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex(function(e){return e.callback===t});"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[e]){var o=[];this.listeners[e].forEach(function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&o.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))}),o.length&&o.forEach(function(n){return t.deregisterListener(e,n)})}}}],t&&ht(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());function mt(e,t,n,r){var o=function(){dt.unsubscribe(e,t)};return(0,i.useEffect)(function(){if(r)return n?dt.subscribeOnce(e,t):dt.subscribe(e,t),function(){o()}},[]),o}var bt=n(93264);const gt={container:"BImYH",background:"aAY0j",topLeft:"azcIT",bottomLeft:"mBkCx",topRight:"tcN5n",bottomRight:"sHsOr",detailsBtn:"jyxT7",content:"PeWbM",highlightPoi:"un8Q0"};function wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ot=/(\[.*\]\(cv:\/\/poi\?id=[0-9]+\))/g,St=/[0-9]+/,kt=/\[.*\]/,Pt=/[\[\]]/g;function jt(e,t){var n,r;return t&&(null===(n=e.glance)||void 0===n?void 0:n.content)&&"text/markdown"===(null===(r=e.glance)||void 0===r?void 0:r.format)}var Nt="shared.videoAtAGlance";function Ct(e){var t=jt(e.video,e.theme),n=function(e,t,n,r){var o,a,u,l=(a=(0,i.useState)(""),u=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(a,u)||function(e,t){if(e){if("string"==typeof e)return wt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wt(e,t):void 0}}(a,u)||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=l[0],s=l[1];return(0,i.useEffect)(function(){if(n){var i=function(e,t,n){var r=function(e,t,n){return(null==t?void 0:t.length)?e.content.replace(Ot,function(e){var r=e.match(St);if(!(null==r?void 0:r.length))return e;var i=t.find(function(e){return e.id.toString()===r[0]}),o=e.match(kt);if(!i||!(null==o?void 0:o.length))return e;var a='<span class="me-2">'.concat(bt.T.ToDisplayDuration(1e3*i.startTime),"</span>"),u=o[0];return u=(u=u.replace(Pt,""))||i.description,u="".concat(a," ").concat(u),n?'<span class="d-flex">'.concat(u,"</span>"):e.replace(kt,"[".concat(u,"]"))}):e.content}(e,t,n);return(0,pt.TU)(r,{async:!1}).split('a href="cv://poi').join('a class="d-flex" href="cv://poi')}(e.glance,t,r);s(i)}},[null===(o=e.glance)||void 0===o?void 0:o.content,null==t?void 0:t.length,n]),c}(e.video,e.pointsOfInterest,t,e.suppressInteractivity),r=function(e,t){var n=(0,i.useRef)(null);function r(){var t=this.getAttribute("href");if((null==t?void 0:t.includes("cv://poi"))&&(null==e?void 0:e.length)){var n=t.split("cv://poi?id=")[1];if(n){var r=e.find(function(e){return e.id.toString()===n});r&&dt.trigger("glance:poi:mouseover",r)}}}function o(){dt.trigger("glance:poi:mouseleave")}function a(){var e;return null===(e=n.current)||void 0===e?void 0:e.querySelectorAll('[href*="cv://poi"]')}return mt("player:poi:mouseover",function(e){var t,r=null==e?void 0:e.id;r&&(null===(t=function(e){var t;return null===(t=n.current)||void 0===t?void 0:t.querySelector('[href="cv://poi?id='.concat(e,'"]'))}(r))||void 0===t||t.classList.add(gt.highlightPoi))},null,t),mt("player:poi:mouseleave",function(){var e;null===(e=a())||void 0===e||e.forEach(function(e){return e.classList.remove(gt.highlightPoi)})},null,t),(0,i.useEffect)(function(){if(n.current&&t){var e=a();return e.forEach(function(e){return e.addEventListener("mouseover",r)}),e.forEach(function(e){return e.addEventListener("mouseleave",o)}),function(){e.forEach(function(e){return e.removeEventListener("mouseover",r)}),e.forEach(function(e){return e.removeEventListener("mouseleave",o)})}}},[n.current]),n}(e.pointsOfInterest,t);if(!t)return i.createElement(i.Fragment,null);var o,a,u,l,c=function(e){var t,n,r,i;return(null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.colours)||void 0===n?void 0:n.primary)&&(null===(i=null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.colours)||void 0===i?void 0:i.secondary)?e.data.colours:{primary:"#F5F4FF",secondary:"#9294FF"}}(e.theme),s="function"==typeof e.onClickShowDescription,f="function"==typeof e.onClickShowCurriculumLinks;return i.createElement("div",{className:"rounded border px-3 px-sm-5 py-3 mb-3 position-relative d-flex justify-content-center ".concat(gt.container),style:{backgroundColor:c.primary}},i.createElement("div",{className:"".concat(gt.content," d-flex align-items-center pt-4 pt-sm-0")},i.createElement("div",null,i.createElement("h2",{className:"h4"},i.createElement(et.x,{namespace:Nt,phrase:"videoAtAGlance"})),s&&i.createElement(nt.L,{onClick:e.onClickShowDescription,className:"".concat(gt.detailsBtn," position-absolute cursor-pointer me-4 fw-semibold text-info")},i.createElement(et.x,{namespace:Nt,phrase:"readFullDescription"})),i.createElement("div",{ref:r,onClick:function(t){return function(e,t,n){e.preventDefault();var r=e.target.getAttribute("href");if((null==r?void 0:r.includes("cv://poi"))&&(null==t?void 0:t.length)){var i=r.split("cv://poi?id=")[1],o=t.find(function(e){return e.id.toString()===i});n&&o&&n(o.startTime)}}(t,e.pointsOfInterest,e.setStartTime)},dangerouslySetInnerHTML:{__html:n}}),(null===(a=null===(o=e.video.tags)||void 0===o?void 0:o.data)||void 0===a?void 0:a.length)?i.createElement("div",{className:"py-1"},i.createElement(ct,Object.assign({tags:null===(l=null===(u=e.video)||void 0===u?void 0:u.tags)||void 0===l?void 0:l.data,themeColours:c},rt.getTagActionProps(e.getTagAppLink,null,e.suppressInteractivity)))):i.createElement(i.Fragment,null),i.createElement("div",{className:"mt-2"},f&&i.createElement(nt.L,{onClick:e.onClickShowCurriculumLinks,className:"cursor-pointer d-inline-block fw-semibold text-info"},i.createElement(et.x,{namespace:Nt,phrase:"seeCurriculumLinks"}))))),function(){var t,n,r,o=null!==(r=null===(n=null===(t=e.theme)||void 0===t?void 0:t.data)||void 0===n?void 0:n.images)&&void 0!==r?r:{};return tt.t.keys(o).filter(function(e){return!tt.t.isEmpty(o[e])}).map(function(e){var t,n,r=ft.j.createUrl(null===(t=o[e])||void 0===t?void 0:t.url,{size:st.h2.Medium});return i.createElement("div",{key:null===(n=o[e])||void 0===n?void 0:n.fileId,className:"".concat(gt[e]," ").concat(gt.background," d-none d-lg-block"),style:{backgroundImage:"url('".concat(r,"')")}})})}())}var Tt=n(42648),Et=n(110),_t=n(78259),Rt=n(29014),It=n(91967),xt=n(67575),Mt=n(92582);const Lt={button:"nckQw"};function Bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Dt=null,At=!1,Ft="shared.immersiveReader";function zt(e){var t,n,r=(t=i.useState(Dt),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Bt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bt(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=r[0],a=r[1];return Dt||At||(At=!0,(0,xt.ajaxRequest)({resource:"/api/integrations/token/immersive-reader",type:B.k.GET,success:function(e){Dt=e,a(e),window.setTimeout(function(){Dt=null,At=!1},9e5)},error:function(){}})),o?(e.title||(e.title=u.T.getPhrase(Ft,"titleFallback")),i.createElement("span",{className:"".concat(Lt.button," ").concat(e.className||""),onClick:function(){It.q.isFunction(e.onLaunch)&&e.onLaunch(),Mt.k.logUserAction(e.analyticsData,e.analyticsOptions);var t={title:e.title,chunks:[{content:e.text,mimeType:e.html?"text/html":"text/plain"}]},n=o.subdomain,r=o.token,i={uiZIndex:5e3,onExit:function(){It.q.isFunction(e.onExit)&&e.onExit()}};Rt.launchAsync(r,n,t,i)}},i.createElement("svg",{viewBox:"0 0 40 37"},i.createElement("path",{d:"M37.4,0.9 L37.4,9.6 L35.4,9.6 L35.4,2.9 L24.4,2.9 C22.9,3.3 20,4.5 20,6 L20,17.2 L18,17.2 L18,6 C18,5 15.6,3.6 13.8,2.9 L2,2.9 L2,29 L12.4,29 L12.4,31 L0,31 L0,0.9 L14.1,0.9 L14.3,1 C15,1.2 17.5,2.2 18.9,3.7 C20.5,1.9 23.5,1.1 23.9,1 L24.1,1 L37.4,1 L37.4,0.9 Z",fill:"#000000"}),i.createElement("path",{d:"M27.4,37 L25.8,37 L18.4,29.4 L14,29.4 L14,21 L18.4,20.9 L26.1,13 L27.4,13 L27.4,37 Z M16,27.4 L19.2,27.4 L25.3,33.7 L25.3,16.6 L19.2,22.9 L15.9,22.9 L15.9,27.4 L16,27.4 Z",fill:"#0197F2"}),i.createElement("path",{d:"M31.3,32.7 L29.6,31.7 C29.6,31.7 31.7,28.3 31.7,25.2 C31.7,21.9 29.6,18.5 29.6,18.4 L31.3,17.4 C31.4,17.6 33.7,21.3 33.7,25.2 C33.7,28.8 31.4,32.6 31.3,32.7 Z",fill:"#0197F2"}),i.createElement("path",{d:"M36.4,36.2 L34.8,35 C34.8,35 38,30.8 38,25.2 C38,19.6 34.8,15.4 34.8,15.4 L36.4,14.2 C36.5,14.4 40,19 40,25.3 C40,31.5 36.5,36 36.4,36.2 Z",fill:"#0197F2"})))):i.createElement(i.Fragment,null)}var Vt=368,Zt=n(66090);function Ut(e){return function(e){if(Array.isArray(e))return Gt(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 Gt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gt(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 Gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Kt(e){var t=e.page,n=e.totalPages,r=Zt.O.isNumber(t)&&t>0&&t<n&&t+1,i=Zt.O.isNumber(t)&&t>1&&t-1,o={};if(r&&r<=n&&(o.next=r.toString()),i&&(o.previous=i.toString()),!tt.t.isEmpty(o))return o}var qt={isEmpty:function(e){return e&&!(e.data&&e.data.length)},length:function(e){return e&&e.data&&e.data.length},at:function(e,t){if(e&&e.data&&e.data.length&&!(t>e.data.length))return e.data[t]},get:function(e,t){if(e&&e.data&&e.data.length)return e.data.find(function(e){return e.id&&e.id.toString()===t})},flattenCollections:function(e){if(e&&e.length){var t=[];return e.forEach(function(e){t=[].concat(Ut(t),Ut(e.data))}),t}},getNextCursor:function(e){return e.pagination&&e.pagination.cursors&&e.pagination.cursors.next},convertLegacyPaginatedCollection:function(e){if(e)return{data:e.data,pagination:{cursors:Kt(e.pagination),limit:e.pagination.pageSize}}},hasData:function(e){return!qt.isEmpty(e)}};const Ht={closeButton:"ZwHXo",descriptionBorder:"J_Z5i"};var Wt="shared.videoDetails",Qt=u.T.encloseNamespace(Wt);function Yt(e){var t=e.label,n=e.items,r=e.className;if(!(n&&n.data&&n.data.length))return i.createElement(i.Fragment,null);var o=n.data.map(function(e){return e.name}).join(", ");return i.createElement("div",{className:r},t,": ",o)}function $t(e){var t,n,r,o,a,u,l,c,s=e.video;if(!O.M.isVideo(s)&&!O.M.isClip(s))return i.createElement(i.Fragment,null);var f=O.M.getParentVideo(s);return i.createElement("div",{className:s.description?"col-md-5 ps-md-3 pt-3 pt-md-0":"col-12"},i.createElement("h2",{className:"h6 mb-1"},i.createElement(et.x,{phrase:"details"})),!!f.productionYear&&i.createElement("div",{className:"mb-1"},i.createElement(et.x,{phrase:"productionYear",options:{year:f.productionYear}})),i.createElement(Yt,{label:Qt("productionCompanies",{smartCount:null===(n=null===(t=f.productionCompanies)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length}),items:f.productionCompanies,className:"mb-1"}),i.createElement(Yt,{label:Qt("distributors",{smartCount:null===(o=null===(r=f.distributors)||void 0===r?void 0:r.data)||void 0===o?void 0:o.length}),items:f.distributors,className:"mb-1"}),i.createElement(Yt,{label:Qt("producers",{smartCount:null===(u=null===(a=f.producers)||void 0===a?void 0:a.data)||void 0===u?void 0:u.length}),items:f.producers,className:"mb-1"}),i.createElement(Yt,{label:Qt("directors",{smartCount:null===(c=null===(l=f.directors)||void 0===l?void 0:l.data)||void 0===c?void 0:c.length}),items:f.directors,className:"mb-1"}),!!f.dateBroadcast&&i.createElement("div",{className:"mb-1"},i.createElement(et.x,{phrase:"dateBroadcast",options:{date:Et.O.format(f.dateBroadcast,"DD/MM/YYYY")}})),!!f.channel&&i.createElement("div",{className:"mb-1"},i.createElement(et.x,{phrase:"channel",options:{channel:f.channel.name}})),O.M.canViewUploadDate(e.video)&&i.createElement("div",{className:"mb-1"},i.createElement(et.x,{phrase:"dateUploaded",options:{date:Et.O.format(s.dateCreated,"DD/MM/YYYY")}})))}function Jt(e){var t,n,r=e.video,o=e.maxHeight,a=void 0===o?Vt:o,u=O.M.getParentVideo(r),l=!!e.video.description,c=function(e){var t=qt.hasData,n=function(e){return O.M.isVideo(e)?e:O.M.isClip(e)?e._parentVideo:null}(e);return!!n&&(t(n.productionCompanies)||t(n.producers)||t(n.distributors)||t(n.directors))}(e.video)||!!u.productionYear||!!u.dateBroadcast||!!u.channel||O.M.canViewUploadDate(e.video),s="function"==typeof e.onClickClose,f="function"==typeof e.onClickShowCurriculumLinks;return l||c?i.createElement(et.D.Provider,{value:Wt},i.createElement("div",{className:"rounded border p-3 mb-3 position-relative"},i.createElement(Tt.$B,{autoHeight:!0,autoHeightMax:a},i.createElement("div",{className:"row g-0"},l&&i.createElement("div",{className:c?"".concat(Ht.descriptionBorder," pe-3 col-md-7"):"col-12"},i.createElement("div",{className:"d-flex align-items-center"},i.createElement("h2",{className:"h6 mb-1"},i.createElement(et.x,{phrase:"description"})),i.createElement(zt,{text:r.description,title:r.name,className:"ps-2",onLaunch:e.onLaunchImmersiveReader,onExit:e.onExitImmersiveReader,analyticsOptions:{location:Xe.LZ.PlayPage,entity:Xe.py.Video,actionType:Xe.Vw.Click,descriptor:Xe._S.LaunchImmersiveReader},analyticsData:{id:r.id,type:"description"}})),i.createElement("p",{className:"mb-0",dangerouslySetInnerHTML:{__html:_t.O.linkifyText(e.video.description,{nl2br:!0})}}),i.createElement(ct,Object.assign({tags:e.hideTags||O.M.isInteractive(e.video)||!(null===(n=null===(t=e.video.tags)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)?null:e.video.tags.data},rt.getTagActionProps(e.getTagAppLink,null,e.suppressInteractivity),{className:"mt-1"})),f&&i.createElement(nt.L,{onClick:e.onClickShowCurriculumLinks,className:"cursor-pointer d-inline-block fw-semibold text-info mt-2 mb-1"},i.createElement(et.x,{namespace:Wt,phrase:"seeCurriculumLinks"}))),c&&i.createElement($t,Object.assign({},e)))),s&&i.createElement("button",{type:"button",className:"btn-close ".concat(Ht.closeButton),"aria-label":"Close",onClick:e.onClickClose}))):i.createElement(i.Fragment,null)}function Xt(){return i.createElement("div",{className:"p-3 mb-3 border rounded"},i.createElement("div",{className:"row"},i.createElement("div",{className:"pe-3 col-md-7 border-right"},i.createElement("div",{className:"partial-loading-background mb-2",style:{height:"1.5rem",width:"12rem"}}),i.createElement("div",{className:"partial-loading-background mb-2",style:{height:"4.5rem"}}),i.createElement("div",{className:"partial-loading-background",style:{height:"1.5rem",width:"15rem"}})),i.createElement("div",{className:"col-md-5 ps-md-3 pt-3 pt-md-0"},i.createElement("div",{className:"partial-loading-background mb-2",style:{height:"1.5rem",width:"7rem"}}),i.createElement("div",{className:"partial-loading-background mb-2",style:{height:"1.5rem",width:"10rem"}}),i.createElement("div",{className:"partial-loading-background mb-2",style:{height:"1.5rem",width:"12rem"}}),i.createElement("div",{className:"partial-loading-background mb-2 me-2 d-inline-block",style:{height:"1.5rem",width:"3rem"}}),i.createElement("div",{className:"partial-loading-background mb-2 me-2 d-inline-block",style:{height:"1.5rem",width:"4rem"}}),i.createElement("div",{className:"partial-loading-background mb-2 me-2 d-inline-block",style:{height:"1.5rem",width:"3.5rem"}}),i.createElement("div",{className:"partial-loading-background mb-2 me-2 d-inline-block",style:{height:"1.5rem",width:"4.5rem"}}))))}var en=n(11518),tn=n(47198),nn=n(58704),rn=n(99742),on=n(65751),an=n(83914),un=n(35223),ln="shared.playPage";function cn(){var e=u.T.encloseNamespace(ln);return i.createElement("div",{className:"alert bg-light-blue p-3 rounded-3 d-flex justify-content-between align-items-center"},i.createElement(an.x,{svgName:un.vn.Archive,size:an.S.Standard,className:"me-2 svg-container"}),i.createElement("div",{className:"w-100"},i.createElement("p",{className:"fw-semibold mb-0"},e("archivedInfoTitle")),i.createElement("p",{className:"mb-1"},e("archivedInfo"))))}var sn=n(75154),fn=n(17464),pn=n(59908),yn=n(80143);const hn={series:"nJzXt"};function vn(e){var t,n=(0,yn.n)(null===(t=e.video.subjectPresentationAudiences)||void 0===t?void 0:t.data,e.audiences);return i.createElement("section",{className:"position-relative"},i.createElement("div",{className:"d-inline-block"},i.createElement(pn.$,{type:"productionCompany",video:e.video,appLink:e.getSubTextAppLink(e.video),className:"".concat(hn.series," text-truncate mw-100"),analyticsOptions:{location:Xe.LZ.PlayPage}}),i.createElement("h1",{className:"h4 d-inline-flex align-items-center mb-2 mt-n1 mw-100 mb-0 pt-2"},i.createElement("span",{className:"align-self-center"},e.video.name))),n&&i.createElement(fn.c,{className:"mb-3"},i.createElement(sn.P,{audience:n,className:"bg-white text-dark",border:"dark"})))}var dn=n(28825);const mn={mask:"OW0it",centeredIcon:"S3jve",bgImage:"CZchF",centeredOverlay:"VegN6"};function bn(e){var t,n,r=ft.j.createUrl(null!==(n=null===(t=O.M.getThumbnail(e.video))||void 0===t?void 0:t.url)&&void 0!==n?n:"",{size:st.h2.Large});return i.createElement("div",{className:"position-relative responsive-img ".concat(mn.bgImage),style:{backgroundImage:"url('".concat(r,"')")}},i.createElement(dn.F,{appLink:e.appLink,analyticsOptions:{actionType:Xe.Vw.Click,location:Xe.LZ.PlayPage,entity:Xe.py.AppLink,workflowPhase:Xe.eu.Start,descriptor:Xe.Yu.SignUp},analyticsData:{}},i.createElement(an.x,{svgName:un.vn.PlayCircle,className:mn.centeredIcon}),i.createElement("div",{className:mn.mask})))}function gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var wn=function(){var e,t,n=(e=i.useState(Date.now()),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return gn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gn(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.")}())[1];return function(){n(Date.now())}},On=n(57900);function Sn(e){return Sn="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},Sn(e)}function kn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Pn(r.key),r)}}function Pn(e){var t=function(e){if("object"!=Sn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Sn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Sn(t)?t:t+""}var jn=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hasLogged=!1,this.options=t,this.player=t.player,this.analyticsLocation=t.analyticsLocation,this.onTimeUpdate=this.onTimeUpdate.bind(this),this.initialize()},(t=[{key:"initialize",value:function(){this.bindListeners()}},{key:"bindListeners",value:function(){var e=this;this.player.on("timeupdate",this.onTimeUpdate),this.player.one("dispose",function(){e.player.off("timeupdate",e.onTimeUpdate)})}},{key:"unbindListeners",value:function(){this.player.off("timeupdate",this.onTimeUpdate)}},{key:"setAnalyticsLocation",value:function(e){this.analyticsLocation=e}},{key:"onTimeUpdate",value:function(){if(!(this.player.currentTime()<3||this.hasLogged))try{var e="m:".concat(this.options.video.id);if(this.hasCoolDownTime()&&On.SG.cacheExists(e))return;Mt.k.logUserAction(this.getAnalyticsData(),{actionType:Xe.Vw.Stream,entity:O.M.getAnalyticsEntity(this.options.video),location:this.analyticsLocation}),this.hasCoolDownTime()&&On.SG.cacheSet(e,null,300)}finally{this.hasLogged=!0,this.unbindListeners()}}},{key:"hasCoolDownTime",value:function(){return O.M.isVideo(this.options.video)}},{key:"getAnalyticsData",value:function(){var e,t={name:this.options.video.name};if(this.options.shareId&&(t.shareId=this.options.shareId),O.M.isVideo(this.options.video)&&(t.id=this.options.video.id),O.M.isClip(this.options.video)&&(t.id=null===(e=this.options.video._parentVideo)||void 0===e?void 0:e.id,t.clip={id:this.options.video.id}),O.M.isInteractive(this.options.video)){var n=this.options.video._parentVideo;t.id=null==n?void 0:n.id,t.interactive={id:this.options.video.id}}return t}}])&&kn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),Nn=(n(39682),n(76032));function Cn(e){return Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cn(e)}function Tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function En(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _n(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,In(r.key),r)}}function Rn(e,t,n){return t&&_n(e.prototype,t),n&&_n(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function In(e){var t=function(e){if("object"!=Cn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cn(t)?t:t+""}function xn(e,t,n){return t=Dn(t),function(e,t){if(t&&("object"==Cn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Mn()?Reflect.construct(t,n||[],Dn(e).constructor):t.apply(e,n))}function Mn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Mn=function(){return!!e})()}function Ln(e,t,n,r){var i=Bn(Dn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Bn(){return Bn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.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}},Bn.apply(null,arguments)}function Dn(e){return Dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Dn(e)}function An(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fn(e,t)}function Fn(e,t){return Fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fn(e,t)}var zn=function(e){function t(e,n){return En(this,t),xn(this,t,[e,n])}return An(t,e),Rn(t,[{key:"handleClick",value:function(e){var n=this;Ln(t,"handleClick",this,3)([e]),this.requestAnimationFrame(function(){n.options_.item.showCollapsibleMenu()})}},{key:"createEl",value:function(e,n,r){if(!this.options_.item)return Ln(t,"createEl",this,3)([e,n,r]);var i=this.options_.item.getCollabsibleName(),o=this.options_.item.getCollabsibleValue(),a=this.options_.item.className,u='<span class="vjs-menu-item-text">'.concat(i,"</span>");this.valueHolder_=Nn.Z.dom.createEl("span",{innerHTML:o});var l=Ln(t,"createEl",this,3)([e,{className:"vjs-menu-item cv-cog-menu-item ".concat(o?"cv-has-cog-value":""," ").concat(a||"").trim(),innerHTML:u},r]);return l.appendChild(this.valueHolder_),l}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}])}(Nn.Z.getComponent("MenuItem")),Vn=function(e){function t(e,n){var r;return En(this,t),(r=xn(this,t,[e,n])).controlText("Settings"),r}return An(t,e),Rn(t,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(Ln(t,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(Ln(t,"buildCSSClass",this,3)([]))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach(function(e){e.updateCollapsibleValue&&e.updateCollapsibleValue()}),Ln(t,"pressButton",this,3)([]))}},{key:"createItems",value:function(){for(var e,n=this,r=[],i=0;i<this.options_.items.length;i++){var o=this.options_.items[i];o.isCollabsible&&o.showInCollabsibleMenu()&&o.isCollapsed&&r.push(new zn(this.player_,{item:o}))}var a;return(null===(e=this.additionalItems)||void 0===e?void 0:e.length)&&(a=this.additionalItems,function(e){if(Array.isArray(e))return Tn(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return Tn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tn(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort(function(e,n){var r=t.additionalItemOrder.indexOf(e.name);return t.additionalItemOrder.indexOf(n.name)-r}).forEach(function(e){var t,i=new e.ctor(n.player_,Object.assign(Object.assign({},n.options_),null!==(t=e.options)&&void 0!==t?t:{}));r.splice(0,0,i)}),r}},{key:"update",value:function(){Ln(t,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(e){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some(function(t){return t.name===e.name})||(this.additionalItems.push(e),this.update())}}])}(Nn.Z.getComponent("MenuButton"));function Zn(e){return Zn="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},Zn(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,Gn(r.key),r)}}function Gn(e){var t=function(e){if("object"!=Zn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Zn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Zn(t)?t:t+""}function Kn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Kn=function(){return!!e})()}function qn(){return qn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Hn(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},qn.apply(null,arguments)}function Hn(e){return Hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hn(e)}function Wn(e,t){return Wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wn(e,t)}Vn.additionalItemOrder=["EngagementOverlayMenuItem","PointsOfInterestMenuItem","LoopVideoMenuItem","NextVideoMenuItem"],Nn.Z.registerComponent("cogButton",Vn);var Qn=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Hn(t),function(e,t){if(t&&("object"==Zn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Kn()?Reflect.construct(t,n||[],Hn(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wn(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return Nn.Z.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(e){var n,r,i,o=this;(n=t,r=this,"function"==typeof(i=qn(Hn(1&3?n.prototype:n),"handleClick",r))?function(e){return i.apply(r,e)}:i)([e]),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame(function(){o.player_.getChild("collapserator").getChild("cogButton").pressButton()})}}],r&&Un(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("MenuItem"));function Yn(e){return Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yn(e)}function $n(){return $n="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ir(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},$n.apply(null,arguments)}function Jn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tr(r.key),r)}}function er(e,t,n){return t&&Xn(e.prototype,t),n&&Xn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tr(e){var t=function(e){if("object"!=Yn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Yn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Yn(t)?t:t+""}function nr(e,t,n){return t=ir(t),function(e,t){if(t&&("object"==Yn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rr()?Reflect.construct(t,n||[],ir(e).constructor):t.apply(e,n))}function rr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rr=function(){return!!e})()}function ir(e){return ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ir(e)}function or(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ar(e,t)}function ar(e,t){return ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ar(e,t)}var ur=Nn.Z.getComponent("MenuItem"),lr=Nn.Z.getComponent("MenuButton"),cr=["large","medium","small"],sr=function(e){function t(e,n){return Jn(this,t),nr(this,t,[e,n])}return or(t,e),er(t,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}])}(ur),fr=function(e){function t(e,n){var r;return Jn(this,t),(r=nr(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.player_.ready(function(){r.update()}),r}return or(t,e),er(t,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting(),r=[new Qn(this.player_,{label:"Caption Text Size",onClickBack:function(){e.requestAnimationFrame(function(){e.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()})}})];return cr.map(function(t){r.push(new sr(e.player_,{label:t.charAt(0).toUpperCase()+t.substring(1),selectable:!0,multiSelectable:!1,selected:t===n,value:t}))}),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=$n(ir(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){lr.prototype.handleClick.apply(this)}}])}(lr);function pr(e,t,n,r){if(!e.length)return[];for(var i=[],o=e.length-1;o>=0;o--){var a=e[o];if(a.kind===t){if(n&&a.label!==n)continue;if(r&&a.language!==r)continue;i.push(a)}}return i}function yr(e,t,n,r,i){e.kind===t&&(n&&e.label!==n||i&&e.language!==i||(e.loaded_?r(e):e.one("loadeddata",function(){r(e)})))}function hr(e){if(null==e?void 0:e.cues.length)for(var t=0;t<e.cues.length;t++){var n=e.cues[t];(null==n?void 0:n.text)&&(n.text=c.m.sanitize(n.text))}}function vr(e,t,n,r,i){var o=e.textTracks(),a=pr(o,t,n,i)[0];if(a)yr(a,t,n,r);else{var u=function(e){yr(e.track,t,n,r),o.removeEventListener("addtrack",u)};o.addEventListener("addtrack",u),e.one("dispose",function(){o.removeEventListener("addtrack",u)})}}function dr(e,t,n,r,i){var o=e.textTracks(),a=pr(o,t,n,i);a.length&&a.forEach(function(e){return yr(e,t,n,r,i)});var u=function(e){yr(e.track,t,n,r,i)};o.addEventListener("addtrack",u),e.one("dispose",function(){o.removeEventListener("addtrack",u)})}Nn.Z.registerComponent("SubtitleSizeButton",fr);var mr={getTrack:function(e,t,n,r){return pr(e.textTracks(),t,n,r)[0]},useChapters:function(e,t){vr(e,"chapters",null,t)},useMetadataTrack:function(e,t,n){vr(e,"metadata",t,n,null)},useMetadataTracks:function(e,t,n,r){dr(e,"metadata",t,n,r)},useSubtitles:function(e,t,n){dr(e,"subtitles",null,t,n)},getCurrentTextTrack:function(e){return this.findTrackByPredicate(e,function(e){return"showing"===e.mode})},findTrackByPredicate:function(e,t){if(!e)return null;for(var n=e.textTracks(),r=0;r<n.length;r++){var i=n[r];if(t(i))return i}return null},forEachTrack:function(e,t){if(e)for(var n=e.textTracks(),r=0;r<n.length;r++)t(n[r])},sanitizeTrack:function(e,t){if(e&&t)if(e.loaded)hr(e);else{var n=function(){return hr(e)};e.addEventListener("loadeddata",n),t.one("dispose",function(){e.removeEventListener("loadeddata",n)})}}},br=function(e,t,n){var r,i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];var c=!1,s=function(){r=null,s=null,e.apply(this,u)};return!r&&n&&(e.apply(i,u),c=!0),o.clearTimeout(r),r=o.setTimeout(s,t),c};return a.cancel=function(){o.clearTimeout(r),r=null},a};function gr(e){return gr="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},gr(e)}function wr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kr(r.key),r)}}function Sr(e,t,n){return t&&Or(e.prototype,t),n&&Or(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function kr(e){var t=function(e){if("object"!=gr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gr(t)?t:t+""}function Pr(e,t,n){return t=Tr(t),function(e,t){if(t&&("object"==gr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jr()?Reflect.construct(t,n||[],Tr(e).constructor):t.apply(e,n))}function jr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jr=function(){return!!e})()}function Nr(e,t,n,r){var i=Cr(Tr(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Cr(){return Cr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Tr(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}},Cr.apply(null,arguments)}function Tr(e){return Tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tr(e)}function Er(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&&_r(e,t)}function _r(e,t){return _r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_r(e,t)}var Rr=Nn.Z.getComponent("MenuItem"),Ir=function(e){function t(e,n){var r;return wr(this,t),(r=Pr(this,t,[e,n])).onChange=br(r.onChange,100,!1,r),r.bindEventListeners(),r}return Er(t,e),Sr(t,[{key:"createEl",value:function(){var e=this.localize("Search");return Nr(t,"createEl",this,3)(["li",{className:"vjs-menu-item cv-search-input-menu-item-container ".concat(this.options_.className||"").trim(),innerHTML:'\n <div class="cv-search-input-menu-item">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="'.concat(e,'" type="text" autocomplete="off" spellcheck="false" aria-label="').concat(e,'" />\n </div>\n ')}])}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("input");this.onChange=this.onChange.bind(this),t.addEventListener("keyup",this.onChange),t.addEventListener("blur",function(t){e.options_.menuButton.menu.handleBlur(t)})}},{key:"onChange",value:function(e){var t=e.target;this.options_.search(t.value)}}])}(Rr);Nn.Z.registerComponent("SearchInputMenuItem",Ir);var xr=function(e){function t(){return wr(this,t),Pr(this,t,arguments)}return Er(t,e),Sr(t,[{key:"createEl",value:function(e,n,r){return Nr(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:"vjs-menu-item cv-no-results"}),r])}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}}])}(Rr);function Mr(e){return Mr="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},Mr(e)}function Lr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Br(r.key),r)}}function Br(e){var t=function(e){if("object"!=Mr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Mr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mr(t)?t:t+""}function Dr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dr=function(){return!!e})()}function Ar(e){return Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ar(e)}function Fr(e,t){return Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fr(e,t)}Nn.Z.registerComponent("NoMatchingResultsMenuItem",xr);var zr=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ar(t),function(e,t){if(t&&("object"==Mr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Dr()?Reflect.construct(t,n||[],Ar(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fr(e,t)}(t,e),n=t,(r=[{key:"update",value:function(e,t){var n=this;if(null==e?void 0:e.length){var r=[],i=0;e.forEach(function(e){var o=n.options_.label.substr(i,e);o&&r.push(o),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(e,t)),r.push("</span>"),i=e+t}),r.push(this.options_.label.substring(i,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&Lr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("MenuItem"));function Vr(e){return Vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vr(e)}function Zr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ur(r.key),r)}}function Ur(e){var t=function(e){if("object"!=Vr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vr(t)?t:t+""}function Gr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gr=function(){return!!e})()}function Kr(e,t,n,r){var i=qr(Hr(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function qr(){return qr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Hr(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},qr.apply(null,arguments)}function Hr(e){return Hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hr(e)}function Wr(e,t){return Wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wr(e,t)}var Qr=Nn.Z.getComponent("MenuButton"),Yr=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Hr(t),function(e,t){if(t&&("object"==Vr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Gr()?Reflect.construct(t,n||[],Hr(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(r),r.search=r.search.bind(r),r.player_.textTracks().addEventListener("selectedlanguagechange",r.update),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wr(e,t)}(t,e),n=t,(r=[{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.update),e.addEventListener("loadeddata",this.update),this.player_.one("dispose",function(){e.removeEventListener("loadeddata",t.update)})}},{key:"createItems",value:function(){var e,t=mr.getCurrentTextTrack(this.player_);if(t){if(null===(e=t.cues)||void 0===e?void 0:e.length){for(var n=[new Ir(this.player_,{menuButton:this,search:this.search})],r=0;r<t.cues.length;r++){var i=t.cues[r];n.push(new zr(this.player_,{cue:i,label:i.text,selected:!1,multiSelectable:!1}))}var o=new xr(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return o.hide(),n.push(o),n}this.bindTrackEvents(t)}}},{key:"search",value:function(e){var t;e=e.trim();var n=mr.getCurrentTextTrack(this.player_);if(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length){var r=this.findMatches(e,n);this.toggleItemVisibility(e,r),this.toggleNoResults(e,r)}}},{key:"findMatches",value:function(e,t){var n={};if(!e)return n;for(var r=new RegExp(e,"gi"),i=0;i<t.cues.length;i++){for(var o=t.cues[i].text,a=[],u=void 0;u=r.exec(o);)a.push(u.index);a.length&&(n[i]=a)}return n}},{key:"toggleItemVisibility",value:function(e,t){this.menu.children_.slice(1,this.menu.children_.length-1).forEach(function(n,r){!e||t[r]?n.show():n.hide(),n.update(t[r],e.length)})}},{key:"toggleNoResults",value:function(e,t){var n=this.menu.children_[this.menu.children_.length-1];!e||Object.keys(t).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(Kr(t,"buildWrapperCSSClass",this,3)([]))}},{key:"update",value:function(){Kr(t,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){Kr(t,"pressButton",this,3)([]);var e=this.menu.children_[0];(null==e?void 0:e.focus)&&(null==e||e.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Qr.prototype.handleClick.apply(this)}}])&&Zr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Qr);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 Jr(){return Jr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=oi(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Jr.apply(null,arguments)}function Xr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ei(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ni(r.key),r)}}function ti(e,t,n){return t&&ei(e.prototype,t),n&&ei(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ni(e){var t=function(e){if("object"!=$r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$r(t)?t:t+""}function ri(e,t,n){return t=oi(t),function(e,t){if(t&&("object"==$r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ii()?Reflect.construct(t,n||[],oi(e).constructor):t.apply(e,n))}function ii(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ii=function(){return!!e})()}function oi(e){return oi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oi(e)}function ai(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&&ui(e,t)}function ui(e,t){return ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ui(e,t)}Nn.Z.registerComponent("subtitleSearchButton",Yr);var li=Nn.Z.getComponent("MenuItem"),ci=Nn.Z.getComponent("MenuButton"),si=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"},{label:"Toggle theatre mode",type:"theatre-mode"}],fi=function(e){function t(e,n){return Xr(this,t),ri(this,t,[e,n])}return ai(t,e),ti(t,[{key:"createEl",value:function(){return Nn.Z.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(e){switch(e){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">⇑</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">⇓</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>';case"theatre-mode":return'<span class="cv-keyboard-button cv-single-key">t</span>'}return""}}])}(li),pi=function(e){function t(){var e;return Xr(this,t),(e=ri(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return ai(t,e),ti(t,[{key:"createItems",value:function(){var e=this,t=[];return t.push(new Qn(this.player_,{label:"Keyboard shortcuts"})),si.forEach(function(n){t.push(new fi(e.player_,n))}),t}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat((e=t,n=this,"function"==typeof(r=Jr(oi(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"getCollabsibleName",value:function(){return"Keyboard shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!this.player_.options_.mobile}},{key:"showCollapsibleMenu",value:function(){ci.prototype.handleClick.apply(this)}}])}(ci);function yi(e){return yi="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},yi(e)}function hi(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,vi(r.key),r)}}function vi(e){var t=function(e){if("object"!=yi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yi(t)?t:t+""}function di(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(di=function(){return!!e})()}function mi(e,t,n,r){var i=bi(gi(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function bi(){return bi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=gi(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}},bi.apply(null,arguments)}function gi(e){return gi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gi(e)}function wi(e,t){return wi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wi(e,t)}Nn.Z.registerComponent("KeyboardShortcutsButton",pi);var Oi="cv-collapsed",Si=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=gi(t),function(e,t){if(t&&("object"==yi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,di()?Reflect.construct(t,n||[],gi(e).constructor):t.apply(e,n))}(this,t,[e,n])).addChild("cogButton",{items:r.children_},r.children_.length-1),r.update=r.update.bind(r),r.player_.on("cv-updatecog",r.update),r.player_.on("playerresize",r.update),r.player_.one("play",r.update),r.player_.on("dispose",function(){r.player_.off("cv-updatecog",r.update),r.player_.off("playerresize",r.update),r.player_.off("play",r.update)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wi(e,t)}(t,e),n=t,(r=[{key:"toggleHidden",value:function(e){for(var t=0;t<this.children_.length;t++){var n=this.children_[t];n.isCollabsible&&(n.alwaysCollapsed||e?(n.isCollapsed=!0,n.addClass(Oi)):(n.isCollapsed=!1,n.removeClass(Oi)))}this.getChild("cogButton").update()}},{key:"update",value:function(){var e=this.player_.isFullscreen(),t=this.player_.whiteboardModePlugin().side,n=this.player_.el().getBoundingClientRect(),r=!e||"left"!==t&&"right"!==t?n.width:n.height;if(r){this.addClass("cv-collapsorator-ready");var i=r<(!e||"left"!==t&&"right"!==t&&"top"!==t?600:1200);this.player_.options_.deferMenus&&(i=!0),this.toggleHidden(i)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(mi(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return mi(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&hi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));Nn.Z.registerComponent("collapserator",Si);var ki=["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"],Pi=n(17562),ji=n(50873),Ni=n(870);function Ci(e){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ci(e)}function Ti(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Ei(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Ei(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ei(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Ei(f,"constructor",c),Ei(c,"constructor",l),l.displayName="GeneratorFunction",Ei(c,i,"GeneratorFunction"),Ei(f),Ei(f,i,"Generator"),Ei(f,r,function(){return this}),Ei(f,"toString",function(){return"[object Generator]"}),(Ti=function(){return{w:o,m:p}})()}function Ei(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Ei=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Ei(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Ei(e,t,n,r)}function _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,Ri(r.key),r)}}function Ri(e){var t=function(e){if("object"!=Ci(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ci(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ci(t)?t:t+""}var Ii=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()},(t=[{key:"logStream",value:function(){var e="v:".concat(this.options.videoId);On.SG.cacheExists(e)||(this.collectionApiClient.log({type:Xe.Vw.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:Xe.eq.V3}),On.SG&&On.SG.cacheSet(e,null,300))}},{key:"logVideoProgress",value:function(e){var t=this,n=this.getAnalyticsData();this.collectionApiClient.log(e.map(function(e){return{type:Xe.Vw.StreamProgress,actionContext:t.getActionContext(),data:Object.assign(Object.assign({},n),{progress:e}),eventVersion:Xe.eq.V2}}))}},{key:"logUserAction",value:function(e,t){var n=Object.assign(Object.assign({},this.getAnalyticsData()),e),r=Object.assign(Object.assign({},this.getActionContext()),t);this.collectionApiClient.log({type:t.actionType,data:n,actionContext:r,eventVersion:t.eventVersion||Xe.eq.V2})}},{key:"getAnalyticsData",value:function(){var e=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(e.video.shareId=this.options.shareId);var t=this.getEntityType();return t===Xe.py.Interactive?e.interactive={id:+this.options.mediaId}:t===Xe.py.Clip&&(e.clip={id:+this.options.mediaId}),e}},{key:"initialize",value:function(){this.setupCollectionApiClient(),Ni.Y.lockWindowSession(),this.options.player.one("dispose",function(){return Ni.Y.unlockWindowSession()})}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new Pi.q({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return e.getCurrentUser()},shouldLog:ji.k.shouldLog,formatData:ji.k.formatData})}},{key:"getCurrentUser",value:function(){return e=this,t=void 0,n=void 0,r=Ti().m(function e(){return Ti().w(function(e){for(;;)if(0===e.n)return e.a(2,{id:this.options.userId,customerId:this.options.customerId,sessionId:this.options.authSessionId})},e,this)}),new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())});var e,t,n,r}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?Xe.MC.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return Xe.py.Video;case"MasterInteractive":return Xe.py.Interactive;case"MasterClip":return Xe.py.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return Xe.LZ.Player;case"interactive-player":return Xe.LZ.InteractivePlayer;case"create-clip-player":return Xe.LZ.CreateClipPlayer}}}])&&_i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function xi(e){return xi="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},xi(e)}function Mi(e){var t="function"==typeof Map?new Map:void 0;return Mi=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(Li())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Bi(i,n.prototype),i}(e,arguments,Di(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Bi(n,e)},Mi(e)}function Li(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Li=function(){return!!e})()}function Bi(e,t){return Bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bi(e,t)}function Di(e){return Di=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Di(e)}var Ai=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Di(t),function(e,t){if(t&&("object"==xi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Li()?Reflect.construct(t,n||[],Di(e).constructor):t.apply(e,n))}(this,t,[(null==n?void 0:n.title)||"Ajax error"])).url=e,r.response=n,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bi(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Mi(Error));function Fi(e){return Fi="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},Fi(e)}function zi(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Vi(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Vi(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Vi(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Vi(f,"constructor",c),Vi(c,"constructor",l),l.displayName="GeneratorFunction",Vi(c,i,"GeneratorFunction"),Vi(f),Vi(f,i,"Generator"),Vi(f,r,function(){return this}),Vi(f,"toString",function(){return"[object Generator]"}),(zi=function(){return{w:o,m:p}})()}function Vi(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Vi=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Vi(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Vi(e,t,n,r)}function Zi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ui(r.key),r)}}function Ui(e){var t=function(e){if("object"!=Fi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fi(t)?t:t+""}var Gi,Ki=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},qi=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tokens={gateway:null}},t=[{key:"get",value:function(e,t){return Ki(this,void 0,void 0,zi().m(function n(){var r,i;return zi().w(function(n){for(;;)switch(n.n){case 0:return r=this,n.n=1,fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)});case 1:return i=n.v,n.n=2,r.parseResponse.call(r,i);case 2:return n.a(2,n.v)}},n,this)}))}},{key:"delete",value:function(e,t){return Ki(this,void 0,void 0,zi().m(function n(){return zi().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,fetch(e,{method:"DELETE",headers:this.getHeaders(t)});case 1:return n.a(2)}},n,this)}))}},{key:"post",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Ki(this,void 0,void 0,zi().m(function i(){var o;return zi().w(function(i){for(;;)switch(i.n){case 0:return i.n=1,fetch(e,{method:"POST",headers:this.getHeaders(n),body:t,mode:"cors"});case 1:if(o=i.v,!r){i.n=3;break}return i.n=2,this.parseResponse(o);case 2:return i.a(2,i.v);case 3:return i.a(2)}},i,this)}))}},{key:"put",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Ki(this,void 0,void 0,zi().m(function i(){var o;return zi().w(function(i){for(;;)switch(i.n){case 0:return i.n=1,fetch(e,{method:"PUT",headers:this.getHeaders(n),body:t,mode:"cors"});case 1:if(o=i.v,!r){i.n=3;break}return i.n=2,this.parseResponse(o);case 2:return i.a(2,i.v);case 3:return i.a(2)}},i,this)}))}},{key:"setToken",value:function(e,t){this.tokens[e]=t}},{key:"getHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization="Bearer ".concat(this.tokens[e.tokenName])),t}},{key:"parseResponse",value:function(e){return Ki(this,void 0,void 0,zi().m(function t(){var n,r;return zi().w(function(t){for(;;)switch(t.n){case 0:if(404!==e.status){t.n=1;break}return t.a(2,null);case 1:if(e.ok){t.n=6;break}return t.p=2,t.n=3,e.json();case 3:n=t.v,t.n=5;break;case 4:throw t.p=4,t.v,new Ai(e.url);case 5:throw t.p=5,new Ai(e.url,n);case 6:return t.n=7,e.json();case 7:return r=t.v,t.a(2,r)}},t,null,[[2,4,5,6]])}))}}],t&&Zi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()),Hi=n(19389),Wi=n.n(Hi);function Qi(e){return Qi="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},Qi(e)}function Yi(e,t,n){return(t=function(e){var t=function(e){if("object"!=Qi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qi(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $i(e){e.paused()?e.play():e.pause()}function Ji(e,t){e.currentTime(e.currentTime()+t)}function Xi(e,t){e.volume(e.volume()+t)}var eo,to=(Yi(Yi(Yi(Yi(Yi(Yi(Yi(Yi(Yi(Yi(Gi={},"f",function(e){document[e.fsApi_.fullscreenEnabled]&&(e.isFullscreen()?e.exitFullscreen():e.requestFullscreen())}),"m",function(e){var t=e.volume(),n=e.lastVolume_();if(0===t){var r=n<.1?.1:n;e.volume(r),e.muted(!1)}else e.muted(!e.muted())}),"k",$i),"space",$i),"t",function(e){var t=e.theatreModePlugin().getTheatreMode();e.theatreModePlugin().toggleTheatreMode(!t,{shouldLog:!0})}),"left",function(e){return Ji(e,-5)}),"right",function(e){return Ji(e,5)}),"j",function(e){return Ji(e,-10)}),"l",function(e){return Ji(e,10)}),"up",function(e){return Xi(e,.05)}),Yi(Gi,"down",function(e){return Xi(e,-.05)}));!function(e){e.PhysicallyChapteredVideo="physically-chaptered-video"}(eo||(eo={}));var no=n(83765);function ro(e){return ro="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},ro(e)}function io(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,oo(r.key),r)}}function oo(e){var t=function(e){if("object"!=ro(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ro(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ro(t)?t:t+""}function ao(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ao=function(){return!!e})()}function uo(){return uo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=lo(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}},uo.apply(null,arguments)}function lo(e){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lo(e)}function co(e,t){return co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},co(e,t)}n(65195);var so=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=lo(t),function(e,t){if(t&&("object"==ro(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ao()?Reflect.construct(t,n||[],lo(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.configureMenuDimensions=r.configureMenuDimensions.bind(r),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&co(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.player.ready(this.configureMenuDimensions),this.player.one("play",this.configureMenuDimensions),this.player.on("resize",this.configureMenuDimensions),this.player.on("fullscreenchange",this.configureMenuDimensions),this.player.on("resizemenus",this.configureMenuDimensions),this.player.on("ready",this.configureMenuDimensions)}},{key:"dispose",value:function(){var e,n,r;this.player.off("resize",this.configureMenuDimensions),this.player.off("fullscreenchange",this.configureMenuDimensions),this.player.off("resizemenus",this.configureMenuDimensions),this.player.off("ready",this.configureMenuDimensions),(e=t,n=this,"function"==typeof(r=uo(lo(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"configureMenuDimensions",value:function(){var e=this,t=function(t){if(!e.options.mobile){var n=e.player.getChild("collapserator"),r=n.getChild("volumePanel"),i=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:t},i),e.player.trigger("volumechange")}},n=this.player.isFullscreen();if(n&&!this.options.mobile){var r=this.player.whiteboardModePlugin().side;if(t("top"!==r),"left"===r||"right"===r||"top"===r){var i=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach(function(e){e.style.paddingTop=null,e.style.marginBottom=null,e.style.width="calc(".concat(i,"px - 4em)")})}}n||t(!0);var o=this.player.currentWidth(),a=this.player.currentHeight()/o*100,u=this.player.el().querySelector(".cv-collapsorator"),l=this.player.el().querySelectorAll(".vjs-menu"),c=u&&u.offsetHeight;c?("CreateClipSeekBar"===this.options.seekBarName&&(c+=22),l&&l.length&&l.forEach(function(t){!n&&e.options.overflowControls?t.style.paddingTop="80%":t.style.paddingTop="calc(".concat(a,"% - ").concat(c,"px)"),t.style.marginBottom="".concat(c,"px"),t.style.width=null,t.querySelector(".vjs-menu-content")&&(o<=450?e.player.addClass("cv-player-small"):e.player.removeClass("cv-player-small"))})):this.player.one("play",this.configureMenuDimensions)}}],r&&io(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));Nn.Z.registerPlugin("configureMenuDimensionsPlugin",so);var fo="cv-persisttest",po=function(){try{return window.localStorage.setItem(fo,"cv-player-storage-test"),window.localStorage.removeItem(fo),!0}catch(e){return!1}},yo=function(e){return window.localStorage.getItem(e)},ho=function(e,t){window.localStorage.setItem(e,t)};function vo(e){return vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vo(e)}function mo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bo(r.key),r)}}function bo(e){var t=function(e){if("object"!=vo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vo(t)?t:t+""}function go(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(go=function(){return!!e})()}function wo(){return wo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Oo(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}},wo.apply(null,arguments)}function Oo(e){return Oo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Oo(e)}function So(e,t){return So=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},So(e,t)}var ko=Nn.Z.getPlugin("plugin"),Po="cvplayer-volume",jo="cvplayer-mute",No=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Oo(t),function(e,t){if(t&&("object"==vo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,go()?Reflect.construct(t,n||[],Oo(e).constructor):t.apply(e,n))}(this,t,[e])).enabled=!0,n.player.ready(function(){return n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&So(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.player.options_.mobile?this.removeVolumeControl():po()&&(this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var e=yo(Po),t=yo(jo);e&&this.player.volume(+e),t&&this.player.muted("true"===t)}},{key:"saveVolumeState",value:function(){this.enabled&&(ho(Po,this.player.volume().toString()),ho(jo,this.player.muted().toString()))}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var e=this.player.getChild("collapserator"),t=e.getChild("volumePanel");e.removeChild(t)}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"dispose",value:function(){var e,n,r;this.player.off("volumechange",this.saveVolumeState),(e=t,n=this,"function"==typeof(r=wo(Oo(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&mo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ko);function Co(e){return Co="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},Co(e)}function To(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Eo(r.key),r)}}function Eo(e){var t=function(e){if("object"!=Co(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Co(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Co(t)?t:t+""}function _o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_o=function(){return!!e})()}function Ro(e){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ro(e)}function Io(e,t){return Io=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Io(e,t)}Nn.Z.registerPlugin("persistVolumePlugin",No);var xo=Nn.Z.getPlugin("plugin"),Mo="cvplayer-playback-rate",Lo=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ro(t),function(e,t){if(t&&("object"==Co(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_o()?Reflect.construct(t,n||[],Ro(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.player.dataLoaded(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Io(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){var e,t=this;if(po()){this.savePlaybackRate=this.savePlaybackRate.bind(this),this.player.on("ratechange",this.savePlaybackRate),this.one("dispose",function(){t.player.off("ratechange",t.savePlaybackRate)});var n=+yo(Mo);(null===(e=this.player.options_.playbackRates)||void 0===e?void 0:e.some(function(e){return e===n}))&&(this.player.playbackRate(n),this.player.defaultPlaybackRate(n))}}},{key:"savePlaybackRate",value:function(){var e,t=this.player.playbackRate().toString();ho(Mo,t),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({rate:t},{actionType:Xe.Vw.Select,workflowPhase:Xe.eu.Complete,descriptor:Xe.UX.ChangeSpeed,entity:Xe.py.PlaybackSpeed,eventVersion:Xe.eq.V3})}}])&&To(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(xo);function Bo(e){return Bo="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},Bo(e)}function Do(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ao(r.key),r)}}function Ao(e){var t=function(e){if("object"!=Bo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bo(t)?t:t+""}function Fo(e,t){if(t&&("object"==Bo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function zo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zo=function(){return!!e})()}function Vo(e){return Vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vo(e)}function Zo(e,t){return Zo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zo(e,t)}Nn.Z.registerPlugin("persistPlaybackRatePlugin",Lo);var Uo=function(e){function t(e){var n,r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,o=[e],i=Vo(i=t),(n=Fo(r,zo()?Reflect.construct(i,o||[],Vo(r).constructor):i.apply(r,o))).fullscreenBecauseOfRotate=!1,n.player.supportsFullScreen()?(n.onRotate=n.onRotate.bind(n),n.onFullscreenChange=n.onFullscreenChange.bind(n),n.player.ready(function(){return n.initialize()}),n):Fo(n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zo(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.player.on("fullscreenchange",this.onFullscreenChange),window.addEventListener("orientationchange",this.onRotate)}},{key:"dispose",value:function(){this.player.off("fullscreenchange",this.onFullscreenChange),window.removeEventListener("orientationchange",this.onRotate)}},{key:"onFullscreenChange",value:function(){this.player.isFullscreen()||(this.fullscreenBecauseOfRotate=!1)}},{key:"onRotate",value:function(){var e=this.getAngle();90===e||-90===e||270===e?(this.player.requestFullscreen(),this.fullscreenBecauseOfRotate=!0):this.fullscreenBecauseOfRotate&&this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"getAngle",value:function(){var e,t;return"number"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.angle)?window.screen.orientation.angle:0}}])&&Do(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));Nn.Z.registerPlugin("fullscreenOnRotatePlugin",Uo);var Go="\n <svg viewBox='0 0 434 71'>\n <g>\n <path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/>\n <path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/>\n </g>\n </svg>\n";function Ko(e){return Ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ko(e)}function qo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ho(r.key),r)}}function Ho(e){var t=function(e){if("object"!=Ko(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ko(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ko(t)?t:t+""}function Wo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wo=function(){return!!e})()}function Qo(e){return Qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qo(e)}function Yo(e,t){return Yo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yo(e,t)}var $o=function(e){function t(e,n){var r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Qo(t),function(e,t){if(t&&("object"==Ko(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wo()?Reflect.construct(t,n||[],Qo(e).constructor):t.apply(e,n))}(this,t,[e,n])).update=(i=r.update.bind(r),o=window.performance.now(),function(){var e=window.performance.now();e-o>=1e3&&(i.apply(void 0,arguments),o=e)}),e.on("timeupdate",r.update),e.one("dispose",function(){e.off("timeupdate",r.update),r.el_.removeEventListener("click",r.pause)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yo(e,t)}(t,e),n=t,(r=[{key:"update",value:function(){var e=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(e)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var e={innerHTML:Go,className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=Nn.Z.dom.createEl("a",e,t);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&qo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Button"));function Jo(e){return Jo="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},Jo(e)}function Xo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ea(r.key),r)}}function ea(e){var t=function(e){if("object"!=Jo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Jo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jo(t)?t:t+""}function ta(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ta=function(){return!!e})()}function na(e){return na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},na(e)}function ra(e,t){return ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ra(e,t)}$o.prototype.controlText_="Open in ClickView",Nn.Z.registerComponent("OpenExternallyButton",$o);var ia=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=na(t),function(e,t){if(t&&("object"==Jo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ta()?Reflect.construct(t,n||[],na(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,e.ready(function(){return r.onReady()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ra(e,t)}(t,e),n=t,(r=[{key:"onReady",value:function(){var e=this.player.getChild("collapserator"),t=e.getChild("customControlSpacer"),n=e.children_.indexOf(t);e.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&Xo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function oa(e){return oa="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},oa(e)}function aa(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,ua(r.key),r)}}function ua(e){var t=function(e){if("object"!=oa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oa(t)?t:t+""}function la(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(la=function(){return!!e})()}function ca(e,t,n,r){var i=sa(fa(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function sa(){return sa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=fa(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}},sa.apply(null,arguments)}function fa(e){return fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fa(e)}function pa(e,t){return pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pa(e,t)}Nn.Z.registerPlugin("openExternallyPlugin",ia);var ya=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=fa(t),function(e,t){if(t&&("object"==oa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,la()?Reflect.construct(t,n||[],fa(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pa(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(ca(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return ca(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"setUi",value:function(e,t){var n=this,r=e>0,i=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(i,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*e,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){n.removeText()},t)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&aa(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("component"));function ha(e){return ha="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},ha(e)}function va(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,da(r.key),r)}}function da(e){var t=function(e){if("object"!=ha(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ha(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ha(t)?t:t+""}function ma(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ma=function(){return!!e})()}function ba(){return ba="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ga(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}},ba.apply(null,arguments)}function ga(e){return ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ga(e)}function wa(e,t){return wa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wa(e,t)}Nn.Z.registerComponent("TouchControls",ya);var Oa=Nn.Z.getPlugin("plugin"),Sa=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=ga(t),function(e,t){if(t&&("object"==ha(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ma()?Reflect.construct(t,n||[],ga(e).constructor):t.apply(e,n))}(this,t,[e])).doubleTouchCount=0,n.seekStartTime=0,n.directionModifier=0,n.bindFunctions(),n.player.ready(function(){return n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wa(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this),this.unBindEventListeners=this.unBindEventListeners.bind(this)}},{key:"initialize",value:function(){var e=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",function(){e.player.off("ready",e.reBindEventListeners)}),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.tech.on("touchstart",this.onTouchStart),this.tech.on("touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&"Html5"===this.tech.name()&&(this.tech.off("touchstart",this.onTouchStart),this.tech.off("touchend",this.onTouchEnd))}},{key:"dispose",value:function(){var e,n,r;(e=t,n=this,"function"==typeof(r=ba(ga(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([]),this.unBindEventListeners()}},{key:"onTouchStart",value:function(e){this.touchStartTime=e.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(e){var t=this;if(e.changedTouches.length){if(e.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(e),void(this.lastTouchTime=e.timeStamp);this.resetProperties(),this.lastTouchTime=e.timeStamp,e.timeStamp-this.touchStartTime<300&&window.setTimeout(function(){t.doubleTouchCount||(t.player.paused()?t.player.play():t.userActive&&t.player.pause())},300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(e){var t=this.player.el().getBoundingClientRect(),n=t.left+t.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),e.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}],r&&va(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Oa);function ka(e){return ka="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ka(e)}function Pa(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,ja(r.key),r)}}function ja(e){var t=function(e){if("object"!=ka(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ka(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ka(t)?t:t+""}Nn.Z.registerPlugin("touchControls",Sa);var Na=function(){return e=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=n.id,this.plugin=t,this.source=n,this.enabled=this.enabled.bind(this)},(t=[{key:"enabled",value:function(e){return void 0===e?this.plugin.currentSource===this.source:(e&&this.plugin.setSource(this.source.id),e)}}])&&Pa(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Ca(e){return Ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ca(e)}function Ta(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ea(r.key),r)}}function Ea(e){var t=function(e){if("object"!=Ca(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ca(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ca(t)?t:t+""}function _a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_a=function(){return!!e})()}function Ra(e){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ra(e)}function Ia(e,t){return Ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ia(e,t)}var xa=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ra(t),function(e,t){if(t&&("object"==Ca(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_a()?Reflect.construct(t,n||[],Ra(e).constructor):t.apply(e,n))}(this,t,[e])).options_=n,r.player.ready(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ia(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){var e=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",function(){e.qualityLevels.off("change",e.onQualityChange)})}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var e=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",e.id)}},{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();this._currentSource=n;var o=this.player.hasStarted();return this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",function(){t.player.currentTime()!==r&&t.player.currentTime(r),i&&t.player.play(),o&&t.player.hasStarted(!0)}),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find(function(t){return t.id===e})}},{key:"repopulateSources",value:function(e){for(var t=null;this.qualityLevels.length;)this.qualityLevels[0].enabled&&(t=this.qualityLevels[0].id),this.qualityLevels.removeQualityLevel(this.qualityLevels[0]);this.sources=[],this.populateSources(e,t)}},{key:"sortSources",value:function(e){return e.sort(function(e,t){return e.id===t.id?0:+e.id>+t.id?-1:1})}},{key:"populateSources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=null;(e=this.sortSources(e)).forEach(function(e){t.qualityLevels.addQualityLevel(new Na(t,e)),t.sources.push(e),t.trigger({event:"addsource",source:e}),null===n?e.default&&(r=e):e.id===n&&(r=e)}),null===r&&(r=this.sources[0]),null!==r&&this.setSource(r.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(e){for(var t=this.qualityLevels,n=-1,r=0;r<t.length;r++)if(t[r].id===e.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}}],r&&Ta(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function Ma(e){return Ma="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},Ma(e)}function La(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ba(r.key),r)}}function Ba(e){var t=function(e){if("object"!=Ma(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ma(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ma(t)?t:t+""}Nn.Z.registerPlugin("progressiveFiles",xa);var Da=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(e,t){var n=e.getQualityLevelById(t);if(n||(n=this.getNextBestQuality(e,t)),!n)return null;for(var r=0;r<e.length;r++){var i=e[r];i.enabled=n.id===i.id}return n}},{key:"getNextBestQuality",value:function(e,t){var n=this.getKnownProfiles(),r=n.indexOf(t);if(r>=0){for(var i=r+1;i<n.length;i++){var o=n[i],a=e.getQualityLevelById(o);if(a)return a}for(var u=r-1;u>0;u--){var l=n[u],c=e.getQualityLevelById(l);if(c)return c}}return null}}],null&&La(e.prototype,null),t&&La(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Aa(e){return Aa="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},Aa(e)}function Fa(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return za(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(za(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,za(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,za(f,"constructor",c),za(c,"constructor",l),l.displayName="GeneratorFunction",za(c,i,"GeneratorFunction"),za(f),za(f,i,"Generator"),za(f,r,function(){return this}),za(f,"toString",function(){return"[object Generator]"}),(Fa=function(){return{w:o,m:p}})()}function za(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}za=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){za(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},za(e,t,n,r)}function Va(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,Za(r.key),r)}}function Za(e){var t=function(e){if("object"!=Aa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Aa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Aa(t)?t:t+""}var Ua=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.name,this.playbackProfile=t.playbackProfile,this.address=new URL(t.httpsAddress)},(t=[{key:"getUrl",value:function(e){return e?this.address+"cache?file="+encodeURIComponent(e):null}},{key:"ping",value:function(){return e=this,t=void 0,n=void 0,r=Fa().m(function e(){var t,n,r,i;return Fa().w(function(e){for(;;)switch(e.n){case 0:return t=new AbortController,n=setTimeout(function(){return t.abort()},1e3),e.p=1,e.n=2,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:t.signal});case 2:return r=e.v,e.n=3,r.text();case 3:return i=e.v,clearTimeout(n),e.a(2,"PONG"===i);case 4:return e.p=4,e.v,e.a(2,!1)}},e,this,[[1,4]])}),new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())});var e,t,n,r}}])&&Va(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Ga(e){return Ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ga(e)}function Ka(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return qa(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(qa(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,qa(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,qa(f,"constructor",c),qa(c,"constructor",l),l.displayName="GeneratorFunction",qa(c,i,"GeneratorFunction"),qa(f),qa(f,i,"Generator"),qa(f,r,function(){return this}),qa(f,"toString",function(){return"[object Generator]"}),(Ka=function(){return{w:o,m:p}})()}function qa(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}qa=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){qa(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},qa(e,t,n,r)}function Ha(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,Wa(r.key),r)}}function Wa(e){var t=function(e){if("object"!=Ga(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ga(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ga(t)?t:t+""}var Qa=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.logger=Nn.Z.log.createLogger("localcache")},(t=[{key:"setSource",value:function(e,t){return n=this,r=void 0,i=void 0,o=Ka().m(function n(){var r;return Ka().w(function(n){for(;;)switch(n.n){case 0:if(!this.player.localCache||void 0===(null==e?void 0:e.src)){n.n=2;break}return n.n=1,this.player.localCache().getActiveLocalCache();case 1:null!==(r=n.v)&&(this.logger.debug("Using Local Cache",r),e.src=r.getUrl(e.src));case 2:t(null,e);case 3:return n.a(2)}},n,this)}),new(i||(i=Promise))(function(e,t){function a(e){try{l(o.next(e))}catch(e){t(e)}}function u(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i(function(e){e(n)})).then(a,u)}l((o=o.apply(n,r||[])).next())});var n,r,i,o}}])&&Ha(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Ya(e){return Ya="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},Ya(e)}function $a(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Ja(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Ja(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ja(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Ja(f,"constructor",c),Ja(c,"constructor",l),l.displayName="GeneratorFunction",Ja(c,i,"GeneratorFunction"),Ja(f),Ja(f,i,"Generator"),Ja(f,r,function(){return this}),Ja(f,"toString",function(){return"[object Generator]"}),($a=function(){return{w:o,m:p}})()}function Ja(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Ja=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Ja(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Ja(e,t,n,r)}function Xa(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,eu(r.key),r)}}function eu(e){var t=function(e){if("object"!=Ya(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ya(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ya(t)?t:t+""}function tu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tu=function(){return!!e})()}function nu(){return nu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ru(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}},nu.apply(null,arguments)}function ru(e){return ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ru(e)}function iu(e,t){return iu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},iu(e,t)}Nn.Z.use("*",function(e){return new Qa(e)});var ou='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',au=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ru(t),function(e,t){if(t&&("object"==Ya(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tu()?Reflect.construct(t,n||[],ru(e).constructor):t.apply(e,n))}(this,t,[e,n])).hide(),r.onLocalCacheChange=r.onLocalCacheChange.bind(r),e.ready(function(){r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iu(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=nu(ru(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(ou,"</div>")},{title:"Streaming from ClickView Local Cache"}]);var e,n,r}},{key:"initialize",value:function(){var e=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",function(){e.localCachePlugin.off("localcachechanged",e.onLocalCacheChange)}),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return e=this,t=void 0,n=void 0,r=$a().m(function e(){return $a().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.localCachePlugin.getActiveLocalCache();case 1:e.v?this.show():this.hide();case 2:return e.a(2)}},e,this)}),new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())});var e,t,n,r}}],r&&Xa(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function uu(e){return uu="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},uu(e)}function lu(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return cu(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(cu(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,cu(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,cu(f,"constructor",c),cu(c,"constructor",l),l.displayName="GeneratorFunction",cu(c,i,"GeneratorFunction"),cu(f),cu(f,i,"Generator"),cu(f,r,function(){return this}),cu(f,"toString",function(){return"[object Generator]"}),(lu=function(){return{w:o,m:p}})()}function cu(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}cu=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){cu(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},cu(e,t,n,r)}function su(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fu(r.key),r)}}function fu(e){var t=function(e){if("object"!=uu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=uu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==uu(t)?t:t+""}function pu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pu=function(){return!!e})()}function yu(){return yu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=hu(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}},yu.apply(null,arguments)}function hu(e){return hu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hu(e)}function vu(e,t){return vu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vu(e,t)}Nn.Z.registerComponent("localCacheIndicator",au);var du=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},mu=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=hu(t),function(e,t){if(t&&("object"==uu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pu()?Reflect.construct(t,n||[],hu(e).constructor):t.apply(e,n))}(this,t,[e])).logger_=Nn.Z.log.createLogger("localcache"),void 0===n)throw Error("no options defined");return r.localCaches_=n.localCacheAddresses.map(function(e){return new Ua(e)}),r.player.ready(function(){r.initialize(),n.enabled&&r.enable()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vu(e,t)}(t,e),n=t,r=[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"removeLocalCache",value:function(e){this.localCaches_=this.localCaches_.filter(function(t){return t!==e})}},{key:"dispose",value:function(){var e,n,r;(e=t,n=this,"function"==typeof(r=yu(hu(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"initialize",value:function(){this.player.controlBar.addChild("localCacheIndicator")}},{key:"handleNetworkError",value:function(){return du(this,void 0,void 0,lu().m(function e(){var t;return lu().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getActiveLocalCache();case 1:if(!(t=e.v)){e.n=3;break}return e.n=2,t.ping();case 2:e.v&&this.removeLocalCache(t);case 3:return this.resetActiveLocalCache(),e.n=4,this.getActiveLocalCache();case 4:return this.resetSource(),e.a(2,!0)}},e,this)}))}},{key:"resetSource",value:function(){for(var e=this.player.qualityLevels(),t=0;t<e.length;t++)e[t].enabled&&(e[t].enabled=!0)}},{key:"getActiveLocalCacheInternal",value:function(){return du(this,void 0,void 0,lu().m(function e(){var t,n,r,i=this;return lu().w(function(e){for(;;)switch(e.n){case 0:return t=[],n=function(e){return du(i,void 0,void 0,lu().m(function n(){return lu().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,e.ping();case 1:if(!n.v){n.n=2;break}t.push(e);case 2:return n.a(2)}},n)}))},e.n=1,Promise.all(this.localCaches_.map(function(e){return n(e)}));case 1:if(!(t.length>0)){e.n=2;break}return r=t[0],this.onLocalCacheChange(r),e.a(2,r);case 2:return e.a(2,null)}},e,this)}))}},{key:"onLocalCacheChange",value:function(e){this.logger_.debug("Local Cache changed",e),this.trigger("localcachechanged",{localCache:e});var t=!1;e&&e.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",e.playbackProfile),Da.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}],r&&su(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function bu(e){return bu="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},bu(e)}function gu(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return wu(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(wu(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,wu(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,wu(f,"constructor",c),wu(c,"constructor",l),l.displayName="GeneratorFunction",wu(c,i,"GeneratorFunction"),wu(f),wu(f,i,"Generator"),wu(f,r,function(){return this}),wu(f,"toString",function(){return"[object Generator]"}),(gu=function(){return{w:o,m:p}})()}function wu(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}wu=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){wu(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},wu(e,t,n,r)}function Ou(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,Su(r.key),r)}}function Su(e){var t=function(e){if("object"!=bu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bu(t)?t:t+""}function ku(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ku=function(){return!!e})()}function Pu(){return Pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ju(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}},Pu.apply(null,arguments)}function ju(e){return ju=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ju(e)}function Nu(e,t){return Nu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nu(e,t)}Nn.Z.registerPlugin("localCache",mu);var Cu=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},Tu=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ju(t),function(e,t){if(t&&("object"==bu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ku()?Reflect.construct(t,n||[],ju(e).constructor):t.apply(e,n))}(this,t,[e])).playerApi=n.playerApi,r.fileToken=n.fileToken,r.logger=Nn.Z.log.createLogger("video-signature-expiry-plugin"),r.bindErrorHandlers(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nu(e,t)}(t,e),n=t,r=[{key:"bindErrorHandlers",value:function(){this.onError=this.onError.bind(this),this.player.on("error",this.onError)}},{key:"dispose",value:function(){var e,n,r;this.player.off("error",this.onError),(e=t,n=this,"function"==typeof(r=Pu(ju(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"onError",value:function(){return Cu(this,void 0,void 0,gu().m(function e(){var t,n=this;return gu().w(function(e){for(;;)switch(e.n){case 0:if((t=this.player.error().code)===MediaError.MEDIA_ERR_NETWORK||t===MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED){e.n=1;break}return e.a(2);case 1:return e.n=2,this.player.localCache().getActiveLocalCache();case 2:if(!e.v){e.n=3;break}return this.callErrorHandler(function(){return n.player.localCache().handleNetworkError()}),e.a(2);case 3:this.callErrorHandler(function(){return n.handleVideoSignatureExpiry()});case 4:return e.a(2)}},e,this)}))}},{key:"handleVideoSignatureExpiry",value:function(){return Cu(this,void 0,void 0,gu().m(function e(){var t,n;return gu().w(function(e){for(;;)switch(e.n){case 0:if(this.playerApi&&this.fileToken){e.n=1;break}return e.a(2,!1);case 1:if(!(this.refetchedSourcesTimestamp+9e5>Date.now())){e.n=2;break}return e.a(2,!1);case 2:return this.refetchedSourcesTimestamp=Date.now(),t=null,e.p=3,this.logger.debug("Detected expired mp4 urls, attempting to refetch"),n="".concat(this.playerApi.origin,"/api/files?fileToken=").concat(this.fileToken),e.n=4,qi.get(n);case 4:t=e.v,e.n=6;break;case 5:return e.p=5,e.v,this.logger.error("Failed to refetch expired mp4 urls"),e.a(2,!1);case 6:return this.logger.debug("Mp4 urls successfully refetched"),this.player.progressiveFiles().repopulateSources(t.progressive.map(function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}})),this.fileToken=t.fileToken,e.a(2,!0)}},e,this,[[3,5]])}))}},{key:"callErrorHandler",value:function(e){return Cu(this,void 0,void 0,gu().m(function t(){var n,r,i,o=this;return gu().w(function(t){for(;;)switch(t.n){case 0:return n=this.player.currentTime(),r=!this.player.paused(),i=function(){o.player.currentTime(n),r&&o.player.play(),o.player.error(null)},this.player.one("loadedmetadata",i),t.n=1,e();case 1:if(!t.v){t.n=2;break}return t.a(2);case 2:this.player.off("loadedmetadata",i);case 3:return t.a(2)}},t,this)}))}}],r&&Ou(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function Eu(e){return Eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eu(e)}function _u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ru(r.key),r)}}function Ru(e){var t=function(e){if("object"!=Eu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Eu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Eu(t)?t:t+""}function Iu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Iu=function(){return!!e})()}function xu(e){return xu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xu(e)}function Mu(e,t){return Mu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mu(e,t)}Nn.Z.registerPlugin("handleNetworkErrors",Tu);var Lu=Nn.Z.getPlugin("plugin"),Bu="cvplayer-show-subtitles",Du="cvplayer-selected-language",Au="cvplayer-subtitle-size",Fu=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=xu(t),function(e,t){if(t&&("object"==Eu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Iu()?Reflect.construct(t,n||[],xu(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mu(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.applyUserPreferences=this.applyUserPreferences.bind(this),this.player.textTracks().length&&(this.applyUserPreferences(),this.bindEventListeners())}},{key:"applyUserPreferences",value:function(){var e=!!this.options.showSubtitles,t=this.safeGet(Bu);if("true"===t&&(e=!0),"false"===t&&(e=!1),e){var n=this.guessWhichTrack();n&&(n.mode="showing",this.player.trigger("cv:languageselected"))}else this.hideSubtitles();var r=this.safeGet(Au);r||(r=this.options.subtitleSize),this.player.options_.mobile&&(r="medium"),r&&this.player.textTrackSettings.setSizeSetting(r)}},{key:"safeGet",value:function(e){if(po())return yo(e)}},{key:"onSelectedLanguageChange",value:function(){for(var e,t,n=this.player.textTracks(),r=0;r<n.length;r++){var i=n[r];if("subtitles"===i.kind&&"showing"===i.mode)return ho(Bu,"true"),ho(Du,i.language),void(null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({language:i.language},{actionType:Xe.Vw.Select,entity:Xe.py.Subtitle,workflowPhase:Xe.eu.Complete,descriptor:Xe.DL.On}))}var o;ho(Bu,"false"),o=Du,window.localStorage.removeItem(o),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({language:""},{actionType:Xe.Vw.Select,entity:Xe.py.Subtitle,workflowPhase:Xe.eu.Complete,descriptor:Xe.DL.Off,eventVersion:Xe.eq.V3})}},{key:"bindEventListeners",value:function(){var e=this;po()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",function(){e.player.off("cv:languageselected",e.onSelectedLanguageChange),e.player.off("changesubtitlesize",e.onChangeSubtitleSize)}))}},{key:"onChangeSubtitleSize",value:function(){var e=this.player.textTrackSettings.getSizeSetting();ho(Au,e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet(Du)||window.navigator.language,r=this.getLanguageParts(n),i=r.language,o=r.country,a=this.player.textTracks(),u=0;u<a.length;u++){var l=a[u];if("subtitles"===l.kind){var c=this.getLanguageParts(l.language),s=c.language,f=c.country;if(s===i&&(e=l,f||(t=l),f===o))return e}}return t||e||null}},{key:"getLanguageParts",value:function(e){var t=e.toLowerCase().split("-");return{language:t[0],country:t[1]}}},{key:"hideSubtitles",value:function(){for(var e=this.player.textTracks(),t=0;t<e.length;t++){var n=e[t];if("subtitles"!==n.kind)return;n.mode="disabled"}}},{key:"previewModeSubtitles",value:function(){var e=this.guessWhichTrack();e&&(e.mode="showing"),this.player.off("changesubtitlesize",this.onChangeSubtitleSize),this.player.textTrackSettings.setSizeSetting("large"),this.player.on("changesubtitlesize",this.onChangeSubtitleSize)}}])&&_u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Lu);function zu(e){return zu="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},zu(e)}function Vu(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Zu(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Zu(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Zu(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Zu(f,"constructor",c),Zu(c,"constructor",l),l.displayName="GeneratorFunction",Zu(c,i,"GeneratorFunction"),Zu(f),Zu(f,i,"Generator"),Zu(f,r,function(){return this}),Zu(f,"toString",function(){return"[object Generator]"}),(Vu=function(){return{w:o,m:p}})()}function Zu(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Zu=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Zu(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Zu(e,t,n,r)}function Uu(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,Gu(r.key),r)}}function Gu(e){var t=function(e){if("object"!=zu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zu(t)?t:t+""}function Ku(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ku=function(){return!!e})()}function qu(e){return qu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qu(e)}function Hu(e,t){return Hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hu(e,t)}Nn.Z.registerPlugin("persistSubtitleSettingsPlugin",Fu);var Wu=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},Qu=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=qu(t),function(e,t){if(t&&("object"==zu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ku()?Reflect.construct(t,n||[],qu(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.player.ready(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hu(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){return Wu(this,void 0,void 0,Vu().m(function e(){var t,n,r,i,o=this;return Vu().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getActiveLocalCache();case 1:if(t=e.v,(n=t?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),po()&&(r=yo(this.getStorageKey(!!t)))&&(n=r),i=this.player.qualityLevels(),(null==t?void 0:t.playbackProfile)||Da.enableProfileOrNextBest(i,n),po()){e.n=2;break}return e.a(2);case 2:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),i.on("change",this.onQualityLevelsChange),this.on("dispose",function(){i.off("change",o.onQualityLevelsChange)});case 3:return e.a(2)}},e,this)}))}},{key:"onQualityLevelsChange",value:function(){var e;return Wu(this,void 0,void 0,Vu().m(function t(){var n,r,i;return Vu().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.isLocalCacheActive();case 1:n=t.v,r=this.player.qualityLevels(),i=r[r.selectedIndex],ho(this.getStorageKey(n),i.id),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({quality:i.id},{actionType:Xe.Vw.Select,workflowPhase:Xe.eu.Complete,descriptor:Xe.UX.ChangeResolution,entity:Xe.py.Resolution,eventVersion:Xe.eq.V3});case 2:return t.a(2)}},t,this)}))}},{key:"isLocalCacheActive",value:function(){return Wu(this,void 0,void 0,Vu().m(function e(){return Vu().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.player.localCache().getActiveLocalCache();case 1:return e.a(2,!!e.v)}},e,this)}))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(e){return e?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&Uu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function Yu(e){return Yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yu(e)}function $u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ju(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tl(r.key),r)}}function el(e,t,n){return t&&Xu(e.prototype,t),n&&Xu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tl(e){var t=function(e){if("object"!=Yu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Yu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Yu(t)?t:t+""}function nl(e,t,n){return t=il(t),function(e,t){if(t&&("object"==Yu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rl()?Reflect.construct(t,n||[],il(e).constructor):t.apply(e,n))}function rl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rl=function(){return!!e})()}function il(e){return il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},il(e)}function ol(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&&al(e,t)}function al(e,t){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},al(e,t)}Nn.Z.registerPlugin("persistQualitySettingsPlugin",Qu);var ul=Nn.Z.getComponent("Component"),ll=function(e){function t(e,n){return Ju(this,t),nl(this,t,[e,n])}return ol(t,e),el(t,[{key:"createEl",value:function(){return Nn.Z.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var e=this.options_.event,t=this.player_.duration(),n=(e.end.time-e.start.time)/t;this.el_.style.width=100*n+"%";var r=e.start.time/t;this.el_.style.left=100*r+"%"}}])}(ul),cl=function(e){function t(){var e;return Ju(this,t),(e=nl(this,t,arguments)).events_=[],e}return ol(t,e),el(t,[{key:"update",value:function(){for(var e=this,t=this.children(),n=t.length;n>0;n--)this.removeChild(t[n]);this.events_.forEach(function(t){var n=new ll(e.player(),{event:t});e.addChild(n),n.update()})}},{key:"addEvents",value:function(e){var t,n;(t=this.events_).push.apply(t,function(e){if(Array.isArray(e))return $u(e)}(n=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return $u(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$u(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),this.update()}},{key:"createEl",value:function(){return Nn.Z.dom.createEl("div",{className:"cv-progress-reporter-display"})}}])}(ul);function sl(e){return sl="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},sl(e)}function fl(e,t,n){return(t=yl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pl(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,yl(r.key),r)}}function yl(e){var t=function(e){if("object"!=sl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sl(t)?t:t+""}function hl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hl=function(){return!!e})()}function vl(e){return vl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vl(e)}function dl(e,t){return dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dl(e,t)}var ml=Nn.Z.getPlugin("plugin"),bl="play",gl="playing",wl="pause",Ol="seekstart",Sl="ended",kl="pausedseek",Pl=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=vl(t),function(e,t){if(t&&("object"==sl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hl()?Reflect.construct(t,n||[],vl(e).constructor):t.apply(e,n))}(this,t,[e,n])).eventBuffer=[],r.latestTime=0,r.lastPlayingTime=0,r.isPlaying=!1,r.isSeeking=!1,r.hasEnded=!1,r.shouldLogPlayOnTimeUpdate=!1,r.options=n,r.player.ready(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dl(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var e=this,t=fl(fl(fl(fl(fl(fl({},bl,function(){return e.onPlay()}),wl,function(){return e.onPause()}),"timeupdate",function(){return e.onTimeUpdate()}),"seeking",function(){return e.onSeeking()}),Sl,function(){return e.onEnded()}),gl,function(){return e.onPlaying()}),n=Object.keys(t);n.forEach(function(n){return e.player.on(n,t[n])}),this.one("dispose",function(){n.forEach(function(n){return e.player.off(n,t[n])})})}},{key:"startInterval",value:function(){var e=this,t=this.options.interval||5e3;this.interval=window.setInterval(function(){return e.flushBuffer()},t),this.player.one("dispose",function(){return window.clearInterval(e.interval)})}},{key:"addEasterEgg",value:function(){var e,t,n=this,r="",i=function(t){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=t.key)&&n.addDisplay(),window.clearTimeout(e),e=window.setTimeout(function(){r=""},500)},o=!1,a=function(){o=!0,t=window.setTimeout(function(){o&&n.addDisplay()},1e4)};function u(){o=!1,window.clearTimeout(t)}this.player.el().addEventListener("keyup",i);var l=this.player.getChild("Collapserator").getChild("PlayToggle");l.on("touchstart",a),l.on("touchend",u),this.player.one("dispose",function(){var e,t;null===(t=null===(e=n.player)||void 0===e?void 0:e.el())||void 0===t||t.removeEventListener("keyup",i),l.off("touchstart",a),l.off("touchend",u)})}},{key:"addDisplay",value:function(){var e=this;this.progressReporterDisplay||(this.progressReporterDisplay=new cl(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",function(){e.progressReporterDisplay=void 0}))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent("seekend"),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(bl)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout(function(){e.isPlaying=!1,e.logEvent(wl),delete e.pauseTimeout},50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(bl)),this.isPlaying&&!this.isSeeking&&this.logEvent(gl)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(kl),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(Ol))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(Sl)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===Ol&&(t=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:t,type:e})}}},{key:"shouldUseCarriedOverTime",value:function(e){return this.lastPlayingTime&&(e===gl||e===bl)}},{key:"shouldSaveCarriedOverTime",value:function(e){return e===gl||e===wl}},{key:"shouldClearCarriedOverTime",value:function(e){return e===Sl||e===kl}},{key:"flushBuffer",value:function(){for(var e,t,n=[],r={};this.eventBuffer.length;){var i=this.eventBuffer.shift();this.shouldClearCarriedOverTime(i.type)?delete this.lastPlayingTime:r.start?i.type===gl&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(i.type)&&(this.lastPlayingTime=i.time),r.end=i,n.push(r),r={}):(this.shouldUseCarriedOverTime(i.type)&&(i.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=i)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(e=this.player)||void 0===e||e.trigger("progressflush"),null===(t=this.progressReporterDisplay)||void 0===t||t.addEvents(n))}},{key:"validateEvents",value:function(e){var t=0;e.forEach(function(e){t+=e.end.time-e.start.time});var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),t<n}}],r&&pl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ml);function jl(e){return jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jl(e)}function Nl(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,Cl(r.key),r)}}function Cl(e){var t=function(e){if("object"!=jl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=jl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jl(t)?t:t+""}function Tl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Tl=function(){return!!e})()}function El(e){return El=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},El(e)}function _l(e,t){return _l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_l(e,t)}Nn.Z.registerPlugin("progressReporterPlugin",Pl);var Rl=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=El(t),function(e,t){if(t&&("object"==jl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Tl()?Reflect.construct(t,n||[],El(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_l(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return Nn.Z.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&Nl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component")),Il=["top","left","right","bottom"],xl={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};function Ml(e){return Ml="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},Ml(e)}function Ll(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bl(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,Al(r.key),r)}}function Dl(e,t,n){return t&&Bl(e.prototype,t),n&&Bl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Al(e){var t=function(e){if("object"!=Ml(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ml(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ml(t)?t:t+""}function Fl(e,t,n){return t=Zl(t),function(e,t){if(t&&("object"==Ml(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,zl()?Reflect.construct(t,n||[],Zl(e).constructor):t.apply(e,n))}function zl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zl=function(){return!!e})()}function Vl(){return Vl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Zl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Vl.apply(null,arguments)}function Zl(e){return Zl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zl(e)}function Ul(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&&Gl(e,t)}function Gl(e,t){return Gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gl(e,t)}var Kl=Nn.Z.getComponent("Component"),ql=function(e){function t(e,n){var r;return Ll(this,t),(r=Fl(this,t,[e,n])).bindEventListeners(),r}return Ul(t,e),Dl(t,[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=Vl(Zl(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)}]);var e,n,r}},{key:"bindEventListeners",value:function(){var e=this,t=this.el(),n=function(t){t.preventDefault(),t.dataTransfer.dropEffect="move",e.addClass("cv-drag-over")},r=function(t){t.preventDefault(),e.removeClass("cv-drag-over"),e.player_.whiteboardModePlugin().setWhiteboardMode(e.options_.side)},i=function(){e.removeClass("cv-drag-over")};t.addEventListener("dragover",n),t.addEventListener("drop",r),t.addEventListener("dragleave",i),this.on("dispose",function(){t.removeEventListener("dragover",n),t.removeEventListener("drop",r),t.removeEventListener("dragleave",i)})}}])}(Kl),Hl=function(e){function t(e,n){var r;return Ll(this,t),(r=Fl(this,t,[e,n])).addChildren(),r}return Ul(t,e),Dl(t,[{key:"addChildren",value:function(){var e=this;Il.forEach(function(t){e.addChild(new ql(e.player_,{side:t}))})}}])}(Kl);function Wl(e){return Wl="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},Wl(e)}function Ql(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,Yl(r.key),r)}}function Yl(e){var t=function(e){if("object"!=Wl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Wl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wl(t)?t:t+""}function $l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($l=function(){return!!e})()}function Jl(e){return Jl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jl(e)}function Xl(e,t){return Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xl(e,t)}var ec=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Jl(t),function(e,t){if(t&&("object"==Wl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$l()?Reflect.construct(t,n||[],Jl(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xl(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Ql(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("MenuItem"));function tc(e){return tc="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},tc(e)}function nc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rc(r.key),r)}}function rc(e){var t=function(e){if("object"!=tc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tc(t)?t:t+""}function ic(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ic=function(){return!!e})()}function oc(){return oc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ac(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},oc.apply(null,arguments)}function ac(e){return ac=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ac(e)}function uc(e,t){return uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uc(e,t)}var lc=Nn.Z.getComponent("MenuButton"),cc=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=ac(t),function(e,t){if(t&&("object"==tc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ic()?Reflect.construct(t,n||[],ac(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uc(e,t)}(t,e),n=t,r=[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[new Qn(this.player_,{label:"Video Controls"})];return Il.forEach(function(r){n.push(new ec(e.player_,{side:r,label:xl[r],selectable:!0,multiSelectable:!1,selected:r===t}))}),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=oc(ac(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.whiteboardModePlugin().side;return xl[e]}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.whiteboardModePlugin().isEnabled()&&this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){lc.prototype.handleClick.apply(this)}}],r&&nc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(lc);function sc(e){return sc="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},sc(e)}function fc(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,pc(r.key),r)}}function pc(e){var t=function(e){if("object"!=sc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sc(t)?t:t+""}function yc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yc=function(){return!!e})()}function hc(e){return hc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hc(e)}function vc(e,t){return vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vc(e,t)}var dc="cv-whiteboard-side",mc=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=hc(t),function(e,t){if(t&&("object"==sc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,yc()?Reflect.construct(t,n||[],hc(e).constructor):t.apply(e,n))}(this,t,[e])).side="bottom",n.enabled=!0,n.player.ready(function(){n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vc(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(po()){var e=yo(dc);e&&(this.side=e)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var e,t,n=this;if(!(null===(t=(e=this.player).viewTranscriptPlugin)||void 0===t?void 0:t.call(e).isTranscriptOn())){var r=this.player.getChild("collapserator");this.dragHandle=new Rl(this.player),this.button=new cc(this.player),r.addChild(this.dragHandle),r.addChild(this.button),this.player.trigger("cv-updatecog");var i=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","true")},o=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","false")},a=function(e){n.player.isFullscreen()&&(n.player.addClass("cv-dragging"),e.dataTransfer.setData("text/plain","handle"))},u=function(){n.player.isFullscreen()&&(n.player.removeClass("cv-dragging"),r.el().setAttribute("draggable","false"))};this.dragHandle.el().addEventListener("mousedown",i),this.dragHandle.el().addEventListener("mouseup",o),r.el().addEventListener("dragstart",a),r.el().addEventListener("dragend",u),this.on("dispose",function(){n.dragHandle.el().removeEventListener("mousedown",i),n.dragHandle.el().removeEventListener("mouseup",o),r.el().removeEventListener("dragstart",a),r.el().removeEventListener("dragend",u)})}}},{key:"initDragTargets",value:function(){this.player.addChild(new Hl(this.player))}},{key:"initFullscreenListener",value:function(){var e=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.player.on("cv-transcript-toggle",this.update),this.one("dispose",function(){e.player.off("fullscreenchange",e.update)})}},{key:"setWhiteboardMode",value:function(e){this.side=e,this.button.update(),po()&&ho(dc,e),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"setEnabled",value:function(e){this.enabled=e,this.update()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"getSide",value:function(){return this.isEnabled()?this.side:"bottom"}},{key:"update",value:function(){var e,t;if(this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),Nn.Z.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.trigger("cv-updatecog"),this.isEnabled()){null===(t=this.dragHandle)||void 0===t||t.show();var n=this.getSide();this.player.isFullscreen()&&"bottom"!==n&&(this.player.addClass("cv-whiteboard-".concat(n)),Nn.Z.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}else null===(e=this.dragHandle)||void 0===e||e.hide()}}],r&&fc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function bc(e){return bc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bc(e)}function gc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wc(r.key),r)}}function wc(e){var t=function(e){if("object"!=bc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bc(t)?t:t+""}function Oc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oc=function(){return!!e})()}function Sc(e){return Sc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sc(e)}function kc(e,t){return kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kc(e,t)}Nn.Z.registerPlugin("whiteboardModePlugin",mc);var Pc=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Sc(t),function(e,t){if(t&&("object"==bc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oc()?Reflect.construct(t,n||[],Sc(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kc(e,t)}(t,e),n=t,(r=[{key:"deferMenu",value:function(){var e={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",e)}},{key:"buildSubtitles",value:function(){for(var e=[],t=!1,n=this.player.textTracks(),r=0;r<n.length;r++){var i=n[r],o="showing"===i.mode;e.unshift({id:i.label,name:i.label,selected:o}),o&&(t=!0)}return e.push({id:null,name:"Off",selected:!t}),e}},{key:"buildQualities",value:function(){for(var e=[],t=this.player.qualityLevels(),n=0;n<t.length;n++){var r=t[n];e.push({id:r.id,name:r.id+"p",selected:r.enabled})}return e}},{key:"buildPlaybackSpeeds",value:function(){var e=this.player.playbackRate();return this.player.options_.playbackRates.map(function(t){return{id:t,name:t+"x"+(1===t?" (Normal)":""),selected:e===t}})}}])&&gc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));Nn.Z.registerPlugin("deferMenusPlugin",Pc);var jc="PreventScrubbingTooltip";function Nc(e){return Nc="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},Nc(e)}function Cc(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,Tc(r.key),r)}}function Tc(e){var t=function(e){if("object"!=Nc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Nc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nc(t)?t:t+""}function Ec(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ec=function(){return!!e})()}function _c(e,t,n,r){var i=Rc(Ic(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Rc(){return Rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ic(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}},Rc.apply(null,arguments)}function Ic(e){return Ic=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ic(e)}function xc(e,t){return xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xc(e,t)}var Mc=Nn.Z.getComponent("Component"),Lc="cv-prevent-scrubbing-tooltip-show",Bc="cv-prevent-scrubbing-tooltip-remove-transition",Dc=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Ic(t),function(e,t){if(t&&("object"==Nc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ec()?Reflect.construct(t,n||[],Ic(e).constructor):t.apply(e,n))}(this,t,arguments)).isShowing=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xc(e,t)}(t,e),n=t,r=[{key:"buildCSSClass",value:function(){return"cv-prevent-scrubbing-tooltip ".concat(_c(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return _c(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerText:"No skipping ahead!"}),r])}},{key:"show",value:function(){this.isShowing||(this.player_.userActive(!0),this.addClass(Lc),this.isShowing=!0)}},{key:"hide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isShowing&&(t&&(this.addClass(Bc),window.requestAnimationFrame(function(){e.removeClass(Bc)})),this.player_.userActive(!1),this.removeClass(Lc),this.isShowing=!1)}}],r&&Cc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Mc);function Ac(e){return Ac="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},Ac(e)}function Fc(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,zc(r.key),r)}}function zc(e){var t=function(e){if("object"!=Ac(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ac(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ac(t)?t:t+""}function Vc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vc=function(){return!!e})()}function Zc(){return Zc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Uc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Zc.apply(null,arguments)}function Uc(e){return Uc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Uc(e)}function Gc(e,t){return Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gc(e,t)}Nn.Z.registerComponent(jc,Dc);var Kc=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Uc(t),function(e,t){if(t&&("object"==Ac(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vc()?Reflect.construct(t,n||[],Uc(e).constructor):t.apply(e,n))}(this,t,[e])).isEnabled=!1,r.isPreviewing=!1;var i=null!=n?n:{},o=i.furthestVisitedTime,a=void 0===o?0:o,u=i.isEnabled,l=void 0!==u&&u;return r.playerCurrentTimeFn=r.player.currentTime.bind(e),r.player.currentTime=r.currentTime.bind(r),r.onTimeUpdate=r.onTimeUpdate.bind(r),r.furthestVisitedTime=a,r.isEnabled=l,l&&r.enable(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gc(e,t)}(t,e),n=t,r=[{key:"dispose",value:function(){var e,n,r;this.player.currentTime=this.playerCurrentTimeFn,this.isEnabled&&(this.disable(),(e=t,n=this,"function"==typeof(r=Zc(Uc(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([]))}},{key:"togglePreview",value:function(e){if(e){if(this.configurePreview(),this.isEnabled)return;this.enable(),this.isPreviewing=!0}else this.disable(),this.isPreviewing=!1}},{key:"configurePreview",value:function(){this.player.currentTime(0),this.furthestVisitedTime=0}},{key:"enable",value:function(){this.player.on("timeupdate",this.onTimeUpdate),this.getProgressControl().addChild(jc),this.isEnabled=!0}},{key:"disable",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.getProgressControl().removeChild(this.getPreventScrubbingTooltip()),this.isEnabled=!1}},{key:"getProgressControl",value:function(){return this.player.controlBar.getChild("progressControl")}},{key:"onTimeUpdate",value:function(){var e=this.playerCurrentTimeFn();e>this.furthestVisitedTime&&(this.furthestVisitedTime=e)}},{key:"currentTime",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if("number"!=typeof e)return this.playerCurrentTimeFn.apply(this,[e].concat(r));if(this.isEnabled){var o=this.getPreventScrubbingTooltip(),a=null===(t=this.getSeekBar())||void 0===t?void 0:t.getChild("MouseTimeDisplay");if(e>this.furthestVisitedTime)return o.show(),br(o.hide,1e3,!1,o)(),null==a||a.hide(),void this.playerCurrentTimeFn(this.furthestVisitedTime,r);null==a||a.show(),o.hide(!0),this.playerCurrentTimeFn(e,r)}else this.playerCurrentTimeFn.apply(this,[e].concat(r))}},{key:"getPreventScrubbingTooltip",value:function(){return this.getProgressControl().getChild(jc)}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}}],r&&Fc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function qc(e){return qc="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},qc(e)}function Hc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wc(r.key),r)}}function Wc(e){var t=function(e){if("object"!=qc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qc(t)?t:t+""}function Qc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qc=function(){return!!e})()}function Yc(e){return Yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yc(e)}function $c(e,t){return $c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$c(e,t)}Nn.Z.registerPlugin("preventScrubbingPlugin",Kc);var Jc=Nn.Z.getComponent("Button"),Xc="cv-muted",es=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Yc(t),function(e,t){if(t&&("object"==qc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Qc()?Reflect.construct(t,n||[],Yc(e).constructor):t.apply(e,n))}(this,t,[e])).update(),n.update=n.update.bind(n),e.on("volumechange",n.update),e.on("dispose",function(){return e.off("volumechange",n.update)}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$c(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){this.player_.muted(!this.player_.muted()),this.update()}},{key:"update",value:function(){this.player_.muted()?this.addClass(Xc):this.removeClass(Xc)}},{key:"buildCSSClass",value:function(){return"cv-mute-button cv-muted"}}])&&Hc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Jc);function ts(e){return ts="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},ts(e)}function ns(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,rs(r.key),r)}}function rs(e){var t=function(e){if("object"!=ts(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ts(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ts(t)?t:t+""}function is(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(is=function(){return!!e})()}function os(){return os="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=as(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},os.apply(null,arguments)}function as(e){return as=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},as(e)}function us(e,t){return us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},us(e,t)}Nn.Z.registerComponent("muteButton",es),es.prototype.controlText_="Mute";var ls,cs=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=as(t),function(e,t){if(t&&("object"==ts(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,is()?Reflect.construct(t,n||[],as(e).constructor):t.apply(e,n))}(this,t,[e,n]))._onClickHandler=n.onClickHandler,r.bindEventListeners(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&us(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return Nn.Z.dom.createEl("div",{className:"cv-player-overlay"})}},{key:"handleClick",value:function(e){"function"==typeof this._onClickHandler&&(e.stopImmediatePropagation(),this._onClickHandler())}},{key:"dispose",value:function(){var e,n,r;this.off("click",this.handleClick),(e=t,n=this,"function"==typeof(r=os(as(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"bindEventListeners",value:function(){this.on("click",this.handleClick)}}],r&&ns(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function ss(e){return ss="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},ss(e)}function fs(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,ps(r.key),r)}}function ps(e){var t=function(e){if("object"!=ss(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ss(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ss(t)?t:t+""}function ys(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ys=function(){return!!e})()}function hs(e){return hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hs(e)}function vs(e,t){return vs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vs(e,t)}Nn.Z.registerComponent("playerOverlay",cs),function(e){e.Default="play",e.Hover="hover"}(ls||(ls={}));var ds=Nn.Z.getPlugin("plugin"),ms="cv-preview-mode",bs=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=hs(t),function(e,t){if(t&&("object"==ss(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ys()?Reflect.construct(t,n||[],hs(e).constructor):t.apply(e,n))}(this,t,[e])).buttonAdded=!1,n.mode=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vs(e,t)}(t,e),n=t,(r=[{key:"getMode",value:function(){return this.mode}},{key:"setPlayerMode",value:function(e,t){var n=this.mode;if(this.mode=e,e===ls.Hover)return this.buttonAdded||this.addButtons(t),this.player.addClass(ms),this.enableSubtites(),this.mute(),this.removeActivityTimeout(),void this.player.trigger("resize");n===ls.Hover&&(this.player.removeClass(ms),this.disableSubtitles(),this.unmute(),this.restoreActivityTimeout(),this.player.trigger("resize"))}},{key:"addButtons",value:function(e){var t=new es(this.player),n=new cs(this.player,{onClickHandler:e});this.player.addChild(t),this.player.addChild(n),this.buttonAdded=!0}},{key:"enableSubtites",value:function(){var e=this;this.player.dataLoaded(function(){return e.player.persistSubtitleSettingsPlugin().previewModeSubtitles()})}},{key:"disableSubtitles",value:function(){var e=this;this.player.dataLoaded(function(){return e.player.persistSubtitleSettingsPlugin().applyUserPreferences()})}},{key:"mute",value:function(){var e=this;this.player.ready(function(){e.player.persistVolumePlugin().disable(),e.player.muted(!0)})}},{key:"unmute",value:function(){var e=this;this.player.ready(function(){e.player.persistVolumePlugin().applyUserPreferences(),e.player.persistVolumePlugin().enable()})}},{key:"removeActivityTimeout",value:function(){this.player.cache_.inactivityTimeout=this.player.options_.inactivityTimeout,this.player.options_.inactivityTimeout=0}},{key:"restoreActivityTimeout",value:function(){this.player.options_.inactivityTimeout=this.player.cache_.inactivityTimeout}}])&&fs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ds);function gs(e){return gs="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},gs(e)}function ws(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Os(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,ks(r.key),r)}}function Ss(e,t,n){return t&&Os(e.prototype,t),n&&Os(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ks(e){var t=function(e){if("object"!=gs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gs(t)?t:t+""}function Ps(e,t,n){return t=Ns(t),function(e,t){if(t&&("object"==gs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,js()?Reflect.construct(t,n||[],Ns(e).constructor):t.apply(e,n))}function js(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(js=function(){return!!e})()}function Ns(e){return Ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ns(e)}function Cs(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&&Ts(e,t)}function Ts(e,t){return Ts=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ts(e,t)}Nn.Z.registerPlugin("playerModePlugin",bs);var Es=Nn.Z.getComponent("Component"),_s=Nn.Z.getComponent("ClickableComponent"),Rs=function(e){function t(){return ws(this,t),Ps(this,t,arguments)}return Cs(t,e),Ss(t,[{key:"createEl",value:function(){return Es.prototype.createEl.call(this,"span",{className:"cv-favourite-button-svg",innerHTML:"<span class='cv-favourite-heart'>".concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Heart-Filled" d="m18.833 5.9735c-0.78916-0.95022-1.8839-1.4735-3.0826-1.4735-1.6859 0-2.7532 1.0685-3.3517 1.9648-0.15528 0.2326-0.28738 0.46582-0.39828 0.68529-0.11091-0.21946-0.24297-0.45269-0.39828-0.68529-0.5985-0.89636-1.6658-1.9648-3.3517-1.9648-1.1987 0-2.2935 0.52333-3.0827 1.4735-0.75275 0.90644-1.1673 2.1204-1.1673 3.4183 0 1.4128 0.51978 2.7268 1.6358 4.1353 0.99741 1.2588 2.4323 2.5564 4.0939 4.0589 0.61916 0.5599 1.2594 1.1389 1.9411 1.7718l0.02047 0.01903c0.08837 0.08211 0.19856 0.12313 0.30875 0.12313s0.22038-0.04105 0.30875-0.12313l0.02047-0.01903c0.68166-0.63289 1.3219-1.2119 1.9412-1.7719 1.6615-1.5024 3.0964-2.8 4.0938-4.0588 1.116-1.4085 1.6358-2.7225 1.6358-4.1353 0-1.2979-0.41459-2.5119-1.1674-3.4183z"/>\n </svg>\n',"</span><span class='cv-favourite-outline'>").concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Shape" d="m18.959 5.9741c-0.76992-0.92705-1.9357-1.5351-3.1052-1.5351-1.6448 0-2.8808 0.74937-3.4647 1.6238-0.15149 0.22693-0.28074 0.55125-0.38894 0.76537-0.10821-0.21411-0.23718-0.53844-0.38871-0.76537-0.58391-0.87451-1.8205-1.6238-3.4653-1.6238-1.1695 0-2.2376 0.60808-3.0075 1.5351-0.7344 0.88434-1.1388 1.9712-1.1388 3.2374 0 1.3784 0.50711 3.0509 1.5959 4.4251 0.97309 1.2281 2.373 2.4941 3.9941 3.9599 0.60406 0.54625 1.2285 1.1104 1.8936 1.7278l0.01997 0.01934c0.08622 0.08011 0.38931 0.21727 0.49681 0.21727 0.1075 0 0.40992-0.13796 0.49614-0.21804l0.0201-0.0178c0.66504-0.61746 1.2897-1.1824 1.8939-1.7287 1.621-1.4658 3.0209-2.7317 3.994-3.9598 1.0888-1.3742 1.5955-3.0467 1.5955-4.4251 0-1.2663-0.30646-2.3531-1.0409-3.2374zm-5.337 10.688c-0.51948 0.47226-1.0567 0.95549-1.6218 1.4768-0.56507-0.52124-1.101-1.0059-1.6219-1.4769-3.1725-2.8689-5.2684-4.7641-5.2684-7.2556 0-1.0298 0.32333-1.9863 0.91044-2.6933 0.59385-0.71497 1.4183-1.1088 2.3213-1.1088 1.254 0 2.0645 0.81976 2.5237 1.5074 0.41187 0.61679 0.62678 1.2385 0.70006 1.4772 0.06131 0.19978 0.23683 0.33499 0.43482 0.33499s0.37351-0.1352 0.43482-0.33499c0.07329-0.23867 0.28821-0.86044 0.70006-1.4773 0.45914-0.68766 1.2698-1.5074 2.5237-1.5074 0.90309 0 1.7274 0.39377 2.3213 1.1088 0.58714 0.70695 0.91047 1.6634 0.91047 2.6933 0 2.4914-2.1035 4.3783-5.2685 7.2557z" stroke-width=".97562"/>\n </svg>\n',"</span>")})}}])}(Es),Is=function(e){function t(e,n){var r;return ws(this,t),(r=Ps(this,t,[e,n])).isFavourited=n.isFavourited,r.renderIcon(),r.update(),r}return Cs(t,e),Ss(t,[{key:"renderIcon",value:function(){this.icon&&this.removeChild(this.icon),this.icon=new Rs(this.player_),this.addChild(this.icon)}},{key:"update",value:function(){this.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"createEl",value:function(e,t,n){t=Object.assign({innerHTML:"",className:"cv-favourite-button"},t),n=Object.assign({type:"button"},n);var r=Es.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(r),r}},{key:"handleClick",value:function(){this.isFavourited=!this.isFavourited,this.update(),this.options_.onClick&&this.options_.onClick(this.isFavourited)}}])}(_s);function xs(e){return xs="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},xs(e)}function Ms(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ls(r.key),r)}}function Ls(e){var t=function(e){if("object"!=xs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xs(t)?t:t+""}function Bs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Bs=function(){return!!e})()}function Ds(e){return Ds=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ds(e)}function As(e,t){return As=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},As(e,t)}Is.prototype.controlText_="Favourite";var Fs=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ds(t),function(e,t){if(t&&("object"==xs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Bs()?Reflect.construct(t,n||[],Ds(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&As(e,t)}(t,e),n=t,(r=[{key:"setFavourite",value:function(e,t){if(!this.initialized){var n=new Is(this.player,{isFavourited:e,onClick:t});this.player.addChild(n),this.initialized=!0}}}])&&Ms(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function zs(e){return zs="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},zs(e)}function Vs(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,Zs(r.key),r)}}function Zs(e){var t=function(e){if("object"!=zs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zs(t)?t:t+""}function Us(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Us=function(){return!!e})()}function Gs(e,t,n,r){var i=Ks(qs(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Ks(){return Ks="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=qs(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}},Ks.apply(null,arguments)}function qs(e){return qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qs(e)}function Hs(e,t){return Hs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hs(e,t)}Nn.Z.registerPlugin("favouritePlugin",Fs);var Ws=Nn.Z.getComponent("MenuButton"),Qs="Theatre mode (t)",Ys="Default view (t)",$s="cv-theatre-mode-button",Js=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=qs(t),function(e,t){if(t&&("object"==zs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Us()?Reflect.construct(t,n||[],qs(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.updateControlText(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hs(e,t)}(t,e),n=t,(r=[{key:"getCollabsibleName",value:function(){return""}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!(window.innerWidth<992)}},{key:"showCollapsibleMenu",value:function(){Gs(t,"handleClick",this,3)([null])}},{key:"buildCSSClass",value:function(){return"cv-default-mode-button ".concat(Gs(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Gs(t,"buildWrapperCSSClass",this,3)([]))}},{key:"handleClick",value:function(){this.player_.theatreModePlugin().toggleTheatreMode(void 0,{shouldLog:!0}),this.updateControlText()}},{key:"updateControlText",value:function(){this.player().theatreModePlugin().getTheatreMode()?this.controlText(Ys):this.controlText(Qs)}}])&&Vs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ws);function Xs(e){return Xs="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},Xs(e)}function ef(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,tf(r.key),r)}}function tf(e){var t=function(e){if("object"!=Xs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xs(t)?t:t+""}function nf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nf=function(){return!!e})()}function rf(){return rf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=of(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}},rf.apply(null,arguments)}function of(e){return of=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},of(e)}function af(e,t){return af=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},af(e,t)}Nn.Z.registerComponent("theatreModeButton",Js);var uf=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=of(t),function(e,t){if(t&&("object"==Xs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,nf()?Reflect.construct(t,n||[],of(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,r.bindListeners(),e.ready(function(){return r.onReady()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&af(e,t)}(t,e),n=t,r=[{key:"bindListeners",value:function(){this.onResize=this.onResize.bind(this),this.onFullscreenChange=this.onFullscreenChange.bind(this),this.player.on("playerresize",this.onResize),this.player.on("fullscreenchange",this.onFullscreenChange)}},{key:"onReady",value:function(){if(this.options&&!(window.innerWidth<992)&&this.getCollapserator()){this.button=this.createButton();var e=this.options.theatreMode;e&&(this.toggleButton(!0),this.options.onRequestTheatreMode(e))}}},{key:"dispose",value:function(){var e,n,r;this.player.off("playerresize",this.onResize),this.player.off("fullscreenchange",this.onFullscreenChange),(e=t,n=this,"function"==typeof(r=rf(of(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"toggleTheatreMode",value:function(e,t){var n,r=this;if(this.options){var i=this.options.theatreMode,o=void 0!==e?e:!i;if(this.options.onRequestTheatreMode(o),this.options.theatreMode=o,window.requestAnimationFrame(function(){return r.player.trigger("resize")}),this.button)return i!==o&&(null==t?void 0:t.shouldLog)&&(null===(n=this.analyticsService)||void 0===n||n.logUserAction({id:this.options.playbackObject.videoId,name:this.options.playbackObject.title},{actionType:Xe.Vw.Click,descriptor:o?Xe.UX.EnableTheatreMode:Xe.UX.DisableTheatreMode,entity:Xe.py.Video})),o?(i||this.player.fill(!0),this.toggleButton(!0),o):(i&&this.player.fluid(!0),this.toggleButton(!1),this.player.viewTranscriptPlugin&&this.player.viewTranscriptPlugin().toggleTranscript(!1,{shouldLog:!1}),o)}}},{key:"onResize",value:function(){var e,t;window.innerWidth<992?null===(e=this.button)||void 0===e||e.hide():this.player.isFullscreen()||(this.button||(this.button=this.createButton()),null===(t=this.button)||void 0===t||t.show())}},{key:"createButton",value:function(){var e=this.getCollapserator();return(null==e?void 0:e.getChild("theatreModeButton"))||e.addChild("theatreModeButton",{},e.children_.length-3),null==e?void 0:e.getChild("theatreModeButton")}},{key:"onFullscreenChange",value:function(){var e,t;this.player.isFullscreen()?null===(e=this.button)||void 0===e||e.hide():null===(t=this.button)||void 0===t||t.show()}},{key:"getCollapserator",value:function(){return this.player.getChild("collapserator")}},{key:"getTheatreMode",value:function(){return this.options.theatreMode}},{key:"registerAnalytics",value:function(e){this.analyticsService=e}},{key:"toggleButton",value:function(e){var t;this.button&&(e?(this.button.addClass($s),this.button.updateControlText(Qs),this.button.setActive(!0)):(null===(t=this.button)||void 0===t||t.removeClass($s),this.button.updateControlText(Ys),this.button.setActive(!1)))}}],r&&ef(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));Nn.Z.registerPlugin("theatreModePlugin",uf);var lf=n(18204),cf=Nn.Z.getComponent("Menu"),sf=cf.prototype.createEl;cf.prototype.createEl=function(){var e=sf.call(this);return this.simpleBar=new lf.Z(this.contentEl(),{autoHide:!1}),e};var ff=cf.prototype.contentEl;cf.prototype.contentEl=function(){return this.simpleBar?this.simpleBar.getContentElement():ff.call(this)};var pf=cf.prototype.dispose;cf.prototype.dispose=function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),pf.call(this)};var yf=cf.prototype.addItem;cf.prototype.addItem=function(e){yf.call(this,e),this.simpleBar.recalculate()};var hf=cf.prototype.lockShowing;cf.prototype.lockShowing=function(){hf.call(this),this.simpleBar.recalculate()},cf.prototype.recalculateScrollBar=function(){this.simpleBar.recalculate()};var vf=cf.prototype.handleBlur;function df(e){return df="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},df(e)}function mf(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,bf(r.key),r)}}function bf(e){var t=function(e){if("object"!=df(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=df(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==df(t)?t:t+""}function gf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(gf=function(){return!!e})()}function wf(e){return wf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wf(e)}function Of(e,t){return Of=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Of(e,t)}cf.prototype.handleBlur=function(e){var t=e.relatedTarget||document.activeElement;this.el().contains(t)||vf.call(this,e)};var Sf="cv-active-button",kf=Nn.Z.getComponent("Menu"),Pf=Nn.Z.getComponent("Component"),jf=Nn.Z.getComponent("MenuButton"),Nf=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=wf(t),function(e,t){if(t&&("object"==df(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,gf()?Reflect.construct(t,n||[],wf(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Of(e,t)}(t,e),n=t,(r=[{key:"createMenu",value:function(){var e,t=new kf(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=Nn.Z.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(e=this.options_.title,"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})),tabIndex:-1});this.hideThreshold_+=1;var r=new Pf(this.player_,{el:n});t.addItem(r)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)t.addItem(this.items[i]);return t}}])&&mf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(jf),Cf=jf.prototype.pressButton;jf.prototype.pressButton=function(){Cf.call(this),this.inactivityTimeout=this.player_.cache_.inactivityTimeout,this.player_.cache_.inactivityTimeout=0,this.player_.options_.inactivityTimeout=0};var Tf=jf.prototype.unpressButton;function Ef(e){return Ef="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},Ef(e)}function _f(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,Rf(r.key),r)}}function Rf(e){var t=function(e){if("object"!=Ef(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ef(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ef(t)?t:t+""}function If(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(If=function(){return!!e})()}function xf(e,t,n,r){var i=Mf(Lf(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Mf(){return Mf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Lf(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}},Mf.apply(null,arguments)}function Lf(e){return Lf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lf(e)}function Bf(e,t){return Bf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bf(e,t)}jf.prototype.unpressButton=function(){Tf.call(this),this.player_.cache_.inactivityTimeout=this.inactivityTimeout,this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.player_.reportUserActivity()},jf.prototype.setActive=function(e){e?this.addClass(Sf):this.removeClass(Sf)},Nn.Z.registerComponent("MenuButton",Nf);var Df=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Lf(t),function(e,t){if(t&&("object"==Ef(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,If()?Reflect.construct(t,n||[],Lf(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bf(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(xf(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return xf(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&_f(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function Af(e){return Af="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Af(e)}function Ff(e,t){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,zf(r.key),r)}}function zf(e){var t=function(e){if("object"!=Af(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Af(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Af(t)?t:t+""}function Vf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vf=function(){return!!e})()}function Zf(e){return Zf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zf(e)}function Uf(e,t){return Uf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uf(e,t)}Df.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},Nn.Z.registerComponent("TimeWrapper",Df);var Gf=Nn.Z.getComponent("SeekBar"),Kf=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Zf(t),function(e,t){if(t&&("object"==Af(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vf()?Reflect.construct(t,n||[],Zf(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uf(e,t)}(t,e),n=t,(r=[{key:"handleMouseDown",value:function(e){var t=this.player_.preventScrubbingPlugin();t.isEnabled&&this.getMouseTime(e)>t.furthestVisitedTime||(Gf.prototype.handleMouseDown.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"))}},{key:"handleMouseMove",value:function(e){Gf.prototype.handleMouseMove.call(this,e),this.update()}},{key:"getPercent",value:function(){var e=this.player_.currentTime()/this.player_.duration();return e>=1?1:e}},{key:"handleMouseUp",value:function(e){var t=this;Gf.prototype.handleMouseUp.call(this,e),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){t.player_.removeClass("cv-disable-play-pause-feedback")},500)}},{key:"clamp",value:function(e,t,n){return Math.min(Math.max(e,t),n)}},{key:"getMouseTime",value:function(e){return this.clamp(Gf.prototype.calculateDistance.call(this,e).x,0,1)*this.player_.duration()}}])&&Ff(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Gf);function qf(e){return qf="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},qf(e)}function Hf(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,Wf(r.key),r)}}function Wf(e){var t=function(e){if("object"!=qf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qf(t)?t:t+""}function Qf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qf=function(){return!!e})()}function Yf(e,t,n,r){var i=$f(Jf(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function $f(){return $f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Jf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},$f.apply(null,arguments)}function Jf(e){return Jf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jf(e)}function Xf(e,t){return Xf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xf(e,t)}Nn.Z.registerComponent("SeekBar",Kf);var ep=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Jf(t),function(e,t){if(t&&("object"==qf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Qf()?Reflect.construct(t,n||[],Jf(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xf(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Yf(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Yf(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(e){this.el_.style.width=100*e+"%"}}])&&Hf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function tp(e){return tp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tp(e)}function np(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rp(r.key),r)}}function rp(e){var t=function(e){if("object"!=tp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tp(t)?t:t+""}function ip(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ip=function(){return!!e})()}function op(e,t,n,r){var i=ap(up(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function ap(){return ap="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=up(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ap.apply(null,arguments)}function up(e){return up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},up(e)}function lp(e,t){return lp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lp(e,t)}var cp=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=up(t),function(e,t){if(t&&("object"==tp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ip()?Reflect.construct(t,n||[],up(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lp(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(op(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return op(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(e){e>0&&e<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*e+"%"}}])&&np(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function sp(e){return sp="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},sp(e)}function fp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pp(r.key),r)}}function pp(e){var t=function(e){if("object"!=sp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sp(t)?t:t+""}function yp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yp=function(){return!!e})()}function hp(e,t,n,r){var i=vp(dp(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function vp(){return vp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=dp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},vp.apply(null,arguments)}function dp(e){return dp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dp(e)}function mp(e,t){return mp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mp(e,t)}var bp=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=dp(t),function(e,t){if(t&&("object"==sp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,yp()?Reflect.construct(t,n||[],dp(e).constructor):t.apply(e,n))}(this,t,[e,n])).playProgress=new cp(r.player_),r.addChild(r.playProgress),r.loadProgress=new ep(r.player_),r.addChild(r.loadProgress),r.update(),r.updateBuffered(0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mp(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(hp(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return hp(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var e=this.player_.duration()||3600,t=this.options_.endTime-this.options_.startTime;if(e!==this.duration_){var n=t/e;this.el_.style.width=100*n+"%";var r=this.options_.startTime/e;this.el_.style.left=100*r+"%",this.duration_=e}var i=this.getCurrentTime();i<this.options_.startTime?this.playProgress.update(0):i>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((i-this.options_.startTime)/t)}},{key:"updateBuffered",value:function(e){var t=this.options_.endTime-this.options_.startTime;e<this.options_.startTime?this.loadProgress.update(0):e>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((e-this.options_.startTime)/t)}}])&&fp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function gp(e){for(var t=e.buffered(),n=e.currentTime(),r=0,i=0;i<t.length;i++){var o=t.start(i),a=t.end(i);if(o<=n&&a>=n){r=a;break}}return r}function wp(e){return wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wp(e)}function Op(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,Sp(r.key),r)}}function Sp(e){var t=function(e){if("object"!=wp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wp(t)?t:t+""}function kp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(kp=function(){return!!e})()}function Pp(e,t,n,r){var i=jp(Np(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function jp(){return jp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Np(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}},jp.apply(null,arguments)}function Np(e){return Np=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Np(e)}function Cp(e,t){return Cp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cp(e,t)}var Tp=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Np(t),function(e,t){if(t&&("object"==wp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kp()?Reflect.construct(t,n||[],Np(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cp(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(Pp(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Pp(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(){this.children_.forEach(function(e){e.update()})}},{key:"updateBuffered",value:function(){var e=this;this.children_.forEach(function(t){t.updateBuffered(gp(e.player_))})}}])&&Op(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function Ep(e){return Ep="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},Ep(e)}function _p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Rp(r.key),r)}}function Rp(e){var t=function(e){if("object"!=Ep(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ep(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ep(t)?t:t+""}function Ip(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ip=function(){return!!e})()}function xp(e,t,n,r){var i=Mp(Lp(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Mp(){return Mp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Lp(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}},Mp.apply(null,arguments)}function Lp(e){return Lp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lp(e)}function Bp(e,t){return Bp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bp(e,t)}var Dp=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Lp(t),function(e,t){if(t&&("object"==Ep(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ip()?Reflect.construct(t,n||[],Lp(e).constructor):t.apply(e,n))}(this,t,[e,n])).onDurationChange=r.onDurationChange.bind(r),r.createChapterItems=r.createChapterItems.bind(r),r.updateBuffered=r.updateBuffered.bind(r),mr.useChapters(r.player_,r.createChapterItems),r.player_.on("durationchange",r.onDurationChange),r.player_.on("progress",r.updateBuffered),r.createChapterItems(),r.update(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bp(e,t)}(t,e),n=t,(r=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),xp(t,"dispose",this,3)([])}},{key:"createEl",value:function(){return Nn.Z.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar"),role:"progressbar"})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var e=xp(t,"update",this,3)([]);return this.chapterBarItems&&this.chapterBarItems.update(),e}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"bindUpdateListener",value:function(e){var t=this,n=function(){t.createChapterItems(),t.updateBuffered()};e.addEventListener("cv:cuechange",n),this.player_.one("dispose",function(){return e.removeEventListener("cv:cuechange",n)})}},{key:"createChapterItems",value:function(e){var t,n;e&&(this.track_||this.bindUpdateListener(e),this.track_=e);var r=new Tp(this.player_);if((null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var i=0;i<this.track_.cues.length;i++){var o=this.track_.cues[i],a=o.startTime,u=o.endTime,l=this.player_.duration();l&&(i===this.track_.cues.length-1&&o.endTime<this.player_.duration()&&(u=this.player_.duration()),u>l&&(u=l));var c=new bp(this.player_,{startTime:a,endTime:u});if(r.addChild(c),l&&u===l)break}else r.addChild(new bp(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&_p(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("SeekBar"));function Ap(e){return Ap="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ap(e)}function Fp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zp(r.key),r)}}function zp(e){var t=function(e){if("object"!=Ap(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ap(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ap(t)?t:t+""}function Vp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vp=function(){return!!e})()}function Zp(){return Zp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Up(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Zp.apply(null,arguments)}function Up(e){return Up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Up(e)}function Gp(e,t){return Gp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gp(e,t)}Dp.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Nn.Z.browser.IS_IOS||Nn.Z.browser.IS_ANDROID||Dp.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Nn.Z.registerComponent("ChapterSeekBar",Dp);var Kp=Nn.Z.getComponent("ProgressControl"),qp="seekBar",Hp=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Up(t),function(e,t){if(t&&("object"==Ap(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vp()?Reflect.construct(t,n||[],Up(e).constructor):t.apply(e,n))}(this,t,arguments)).seekBarName_=qp,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gp(e,t)}(t,e),n=t,r=[{key:"setSeekBarName",value:function(e){this.seekBarName_=e}},{key:"getChild",value:function(e){return(null==e?void 0:e.toLowerCase())===qp.toLowerCase()&&(e=this.seekBarName_),(n=t,r=this,"function"==typeof(i=Zp(Up(1&3?n.prototype:n),"getChild",r))?function(e){return i.apply(r,e)}:i)([e]);var n,r,i}}],r&&Fp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Kp);function Wp(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n<10?"0"+n:n)}function Qp(e){return Qp="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},Qp(e)}function Yp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$p(r.key),r)}}function $p(e){var t=function(e){if("object"!=Qp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qp(t)?t:t+""}function Jp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jp=function(){return!!e})()}function Xp(){return Xp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ey(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}},Xp.apply(null,arguments)}function ey(e){return ey=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ey(e)}function ty(e,t){return ty=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ty(e,t)}Hp.prototype.options_={children:[]},Nn.Z.registerComponent("ProgressControl",Hp);var ny=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ey(t),function(e,t){if(t&&("object"==Qp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Jp()?Reflect.construct(t,n||[],ey(e).constructor):t.apply(e,n))}(this,t,[e,n])).hasCustomChapterText=!1,mr.useChapters(r.player_,function(e){r.track_=e}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ty(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){var e,n,r,i=(e=t,n=this,"function"==typeof(r=Xp(ey(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)([]);return this.chapter_=Nn.Z.dom.createEl("div"),i.appendChild(this.chapter_),this.time_=Nn.Z.dom.createEl("div"),i.appendChild(this.time_),i}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(Nn.Z.dom.textContent(this.time_,Wp(e,t)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],i=r.endTime||t;if(r.startTime<=e&&i>=e)return void Nn.Z.dom.textContent(this.chapter_,r.text)}Nn.Z.dom.textContent(this.chapter_,"")}}},{key:"clearChapterContent",value:function(){Nn.Z.dom.textContent(this.chapter_,"")}},{key:"updateText",value:function(e){Nn.Z.dom.textContent(this.time_,e)}},{key:"setCustomChapterText",value:function(e){this.hasCustomChapterText=!!e,Nn.Z.dom.textContent(this.chapter_,null!=e?e:"")}}],r&&Yp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("TimeTooltip"));function ry(e){return ry="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},ry(e)}function iy(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,oy(r.key),r)}}function oy(e){var t=function(e){if("object"!=ry(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ry(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ry(t)?t:t+""}function ay(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ay=function(){return!!e})()}function uy(){return uy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ly(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}},uy.apply(null,arguments)}function ly(e){return ly=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ly(e)}function cy(e,t){return cy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cy(e,t)}Nn.Z.registerComponent("TimeTooltip",ny);var sy=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ly(t),function(e,t){if(t&&("object"==ry(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ay()?Reflect.construct(t,n||[],ly(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cy(e,t)}(t,e),n=t,r=[{key:"setTrack",value:function(e){this.track_=e}},{key:"createEl",value:function(){var e,n,r,i=(e=t,n=this,"function"==typeof(r=uy(ly(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{className:"cv-thumbnail-display"}]);return this.img_=Nn.Z.dom.createEl("img"),i.appendChild(this.img_),i}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(e){var t=e.indexOf("#");if(-1===t)return{src:e,w:0,h:0,x:0,y:0};var n=e.substr(0,t),r=e.substr(t+1);if("xywh="!==r.substr(0,5))return{src:e,w:0,h:0,x:0,y:0};var i=this.getScale(),o=r.substr(5).split(",");return{src:n,w:parseInt(o[2])*i,h:parseInt(o[3])*i,x:parseInt(o[0])*i,y:parseInt(o[1])*i}}},{key:"getScale",value:function(){var e=this.options_.scaleFactor,t=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==t&&(e*=2),e}},{key:"update",value:function(e){var t,n;if(null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length){for(var r,i=e,o=0;o<this.track_.cues.length;){var a=this.track_.cues[o];if(a.startTime<=i&&a.endTime>=i){r=this.parseImageLink(a.text);break}o++}if(null==r?void 0:r.src){this.enable();var u=r,l=u.src,c=u.w,s=u.h,f=u.x,p=u.y,y=this.getScale();this.img_.src=l,this.img_.style.left=-f+"px",this.img_.style.top=-p+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(y,")"),this.el_.style.width=c+"px",this.el_.style.height=s+"px"}else this.disable()}}}],r&&iy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function fy(e){return fy="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},fy(e)}function py(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,yy(r.key),r)}}function yy(e){var t=function(e){if("object"!=fy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fy(t)?t:t+""}function hy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hy=function(){return!!e})()}function vy(e){return vy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vy(e)}function dy(e,t){return dy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dy(e,t)}sy.prototype.options_={scaleFactor:1},Nn.Z.registerComponent("ThumbnailDisplay",sy);var my=Nn.Z.getComponent("MouseTimeDisplay"),by="cv-mouse-time-display-force-show",gy=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=vy(t),function(e,t){if(t&&("object"==fy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hy()?Reflect.construct(t,n||[],vy(e).constructor):t.apply(e,n))}(this,t,[e,n]),mr.useMetadataTrack(r.player_,"thumbnails",function(e){r.getChild("ThumbnailDisplay").setTrack(e)}),r.update=r.update.bind(r),r.player_.on("durationchange",r.update),r.player_.one("dispose",function(){r.player_.off("durationchange",r.update)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dy(e,t)}(t,e),n=t,(r=[{key:"update",value:function(e,t){var n=this;this.requestAnimationFrame(function(){var r=n.getChild("TimeTooltip"),i=n.getChild("ThumbnailDisplay"),o=t*n.player_.duration(),a=n.player_.preventScrubbingPlugin(),u=n.player_.controlBar.getChild("progressControl").getChild(jc),l=!1;a.isEnabled&&(l=o>a.furthestVisitedTime),l?(n.hide(),u.show(),br(u.hide,1e3,!1,u)()):(n.show(),u&&u.hide(!0),i.update(o),r.updateTime(o));var c=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-c.width/2+"px";var s=e.width*t;s<c.width/2?n.el_.style.left=c.width/2+"px":s>e.width-c.width/2?n.el_.style.left=e.width-c.width/2+"px":n.el_.style.left=e.width*t+"px"})}},{key:"forceShow",value:function(){this.addClass(by)}},{key:"removeForceShow",value:function(){this.removeClass(by)}}])&&py(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(my);function wy(e){return wy="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},wy(e)}function Oy(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,Sy(r.key),r)}}function Sy(e){var t=function(e){if("object"!=wy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wy(t)?t:t+""}function ky(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ky=function(){return!!e})()}function Py(){return Py="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=jy(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}},Py.apply(null,arguments)}function jy(e){return jy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jy(e)}function Ny(e,t){return Ny=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ny(e,t)}gy.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},Nn.Z.registerComponent("MouseTimeDisplay",gy);var Cy=Nn.Z.getComponent("ChaptersTrackMenuItem"),Ty=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=jy(t),function(e,t){if(t&&("object"==wy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ky()?Reflect.construct(t,n||[],jy(e).constructor):t.apply(e,n))}(this,t,[e,n])).nonIconControl=!1,r.thumbnailDisplay=new sy(r.player_,{scaleFactor:.5}),r.el().insertBefore(r.thumbnailDisplay.el(),r.el().firstChild),mr.useMetadataTrack(r.player_,"thumbnails",function(e){r.addClass("cv-has-thumbnails"),r.thumbnailDisplay.setTrack(e),r.thumbnailDisplay.update(r.options_.cue.startTime)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ny(e,t)}(t,e),n=t,r=[{key:"update",value:function(){this.player_&&Cy.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(e,n,r){return this.nonIconControl=!0,(i=t,o=this,"function"==typeof(a=Py(jy(1&3?i.prototype:i),"createEl",o))?function(e){return a.apply(o,e)}:a)(["li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},n),r]);var i,o,a}},{key:"getInnerHTML",value:function(){var e=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(Wp(this.options_.cue.startTime,e),")</p>")+"</span>"}}],r&&Oy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Cy);function Ey(e){return Ey="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},Ey(e)}function _y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ry(r.key),r)}}function Ry(e){var t=function(e){if("object"!=Ey(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ey(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ey(t)?t:t+""}function Iy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Iy=function(){return!!e})()}function xy(e,t,n,r){var i=My(Ly(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function My(){return My="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ly(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}},My.apply(null,arguments)}function Ly(e){return Ly=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ly(e)}function By(e,t){return By=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},By(e,t)}var Dy=function(e){function t(e,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=function(e,t,n){return t=Ly(t),function(e,t){if(t&&("object"==Ey(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Iy()?Reflect.construct(t,n||[],Ly(e).constructor):t.apply(e,n))}(this,t,[e,n,r])).alwaysCollapsed=!1,i.isCollapsed=!1,i.isCollabsible=!0,i.update=i.update.bind(i),i.player_.on("cv-whiteboard-change",i.update),i.player_.on("fullscreenchange",i.update),i.player_.on("dispose",function(){i.player_.off("cv-whiteboard-change",i.update),i.player_.off("fullscreenchange",i.update)}),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&By(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(xy(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(xy(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t||t.length<2)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new Ty(this.player_,{track:this.track_,cue:i});e.push(o)}return e}},{key:"setTrack",value:function(e){var n=this;if(xy(t,"setTrack",this,3)([e]),this.track_&&"chapters"===this.track_.kind){e.one("loadeddata",this.update);var r=function(){n.update(),n.player_.trigger("resizemenus")};e.on("cv:cuechange",r),this.player_.one("dispose",function(){return e.off("cv:cueupdate",r)})}}},{key:"update",value:function(e){xy(t,"update",this,3)([e])}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var e=this.track_.activeCues[0];return(null==e?void 0:e.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var e=this.track_.cues;return!(!e||!e.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&_y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("ChaptersButton"));function Ay(e){return Ay="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},Ay(e)}function Fy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zy(r.key),r)}}function zy(e){var t=function(e){if("object"!=Ay(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ay(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ay(t)?t:t+""}function Vy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vy=function(){return!!e})()}function Zy(){return Zy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Uy(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}},Zy.apply(null,arguments)}function Uy(e){return Uy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Uy(e)}function Gy(e,t){return Gy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gy(e,t)}Nn.Z.registerComponent("ChaptersButton",Dy);var Ky=Nn.Z.getComponent("OffTextTrackMenuItem"),qy=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Uy(t),function(e,t){if(t&&("object"==Ay(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vy()?Reflect.construct(t,n||[],Uy(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gy(e,t)}(t,e),n=t,r=[{key:"handleClick",value:function(e){Ky.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(e,n,r){return(i=t,o=this,"function"==typeof(a=Zy(Uy(1&3?i.prototype:i),"createEl",o))?function(e){return a.apply(o,e)}:a)(["li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},n),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),r]);var i,o,a}}],r&&Fy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ky);function Hy(e){return Hy="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},Hy(e)}function Wy(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,Qy(r.key),r)}}function Qy(e){var t=function(e){if("object"!=Hy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Hy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Hy(t)?t:t+""}function Yy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yy=function(){return!!e})()}function $y(e){return $y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$y(e)}function Jy(e,t){return Jy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jy(e,t)}Nn.Z.registerComponent("OffTextTrackMenuItem",qy);var Xy=Nn.Z.getComponent("TextTrackButton"),eh=Nn.Z.getComponent("TextTrackMenuItem"),th=Nn.Z.getComponent("OffTextTrackMenuItem"),nh=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=$y(t),function(e,t){if(t&&("object"==Hy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Yy()?Reflect.construct(t,n||[],$y(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jy(e,t)}(t,e),n=t,r=[{key:"createItems",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eh;this.label_&&(e="".concat(this.label_," off")),t.push(new th(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new n(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(o.kind,"-menu-item")),t.push(a)}}return this.player().trigger("resizemenus"),t}}],r&&Wy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xy);function rh(e){return rh="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},rh(e)}function ih(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,oh(r.key),r)}}function oh(e){var t=function(e){if("object"!=rh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rh(t)?t:t+""}function ah(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ah=function(){return!!e})()}function uh(e){return uh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uh(e)}function lh(e,t){return lh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lh(e,t)}Nn.Z.registerComponent("TextTrackButton",nh);var ch=Nn.Z.getComponent("SubsCapsMenuItem"),sh=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=uh(t),function(e,t){if(t&&("object"==rh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ah()?Reflect.construct(t,n||[],uh(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lh(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(e){ch.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}}])&&ih(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ch);function fh(e){return fh="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},fh(e)}function ph(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,yh(r.key),r)}}function yh(e){var t=function(e){if("object"!=fh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fh(t)?t:t+""}function hh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hh=function(){return!!e})()}function vh(e){return vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vh(e)}function dh(e,t){return dh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dh(e,t)}var mh=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};r.track={player:e,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSearchMenuItem",(n=function(e,t,n){return t=vh(t),function(e,t){if(t&&("object"==fh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hh()?Reflect.construct(t,n||[],vh(e).constructor):t.apply(e,n))}(this,t,[e,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-subtitle-search-menu-item"),n.controlText(", opens subtitle search"),n.toggleEnabled=n.toggleEnabled.bind(n);var i=n.player_.textTracks();return i.addEventListener("selectedlanguagechange",n.toggleEnabled),n.player_.one("dispose",function(){i.removeEventListener("selectedlanguagechange",n.toggleEnabled)}),n.toggleEnabled(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dh(e,t)}(t,e),n=t,(r=[{key:"toggleEnabled",value:function(){var e;if(this.player_){var t=mr.getCurrentTextTrack(this.player_);t?(null===(e=t.cues)||void 0===e?void 0:e.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(t),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.toggleEnabled),e.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",function(){e.removeEventListener("loadeddata",t.toggleEnabled)})}},{key:"handleClick",value:function(){var e,t=this,n=mr.getCurrentTextTrack(this.player_);(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length)&&this.requestAnimationFrame(function(){t.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()})}}])&&ph(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("TextTrackMenuItem"));function bh(e){return bh="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},bh(e)}function gh(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,wh(r.key),r)}}function wh(e){var t=function(e){if("object"!=bh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bh(t)?t:t+""}function Oh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oh=function(){return!!e})()}function Sh(e){return Sh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sh(e)}function kh(e,t){return kh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kh(e,t)}var Ph=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};return r.track={player:e,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSizeMenuItem",(n=function(e,t,n){return t=Sh(t),function(e,t){if(t&&("object"==bh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oh()?Reflect.construct(t,n||[],Sh(e).constructor):t.apply(e,n))}(this,t,[e,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-divider-after-menu-item"),n.addClass("cv-subtitle-size-menu-item"),n.controlText(", opens subtitle size settings"),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kh(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame(function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()})}}])&&gh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("TextTrackMenuItem")),jh=n(16951),Nh=n(83983),Ch=n.n(Nh);function Th(e){return Th="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},Th(e)}function Eh(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){if("object"!=Th(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Th(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Th(t)?t:t+""}function Rh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Rh=function(){return!!e})()}function Ih(e){return Ih=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ih(e)}function xh(e,t){return xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xh(e,t)}var Mh=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ih(t),function(e,t){if(t&&("object"==Th(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Rh()?Reflect.construct(t,n||[],Ih(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xh(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"FormatError"}}])&&Eh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(a.Q._R);const Lh=JSON.parse('{"aa":{"englishName":"Afar","nativeName":"Qafar"},"aa-dj":{"englishName":"Afar (Djibouti)","nativeName":"Qafar (Yabuuti)"},"aa-er":{"englishName":"Afar (Eritrea)","nativeName":"Qafar (Eretria)"},"aa-et":{"englishName":"Afar (Ethiopia)","nativeName":"Qafar (Otobbia)"},"af":{"englishName":"Afrikaans","nativeName":"Afrikaans"},"af-na":{"englishName":"Afrikaans (Namibia)","nativeName":"Afrikaans (Namibië)"},"af-za":{"englishName":"Afrikaans (South Africa)","nativeName":"Afrikaans (Suid-Afrika)"},"agq":{"englishName":"Aghem","nativeName":"Aghem"},"agq-cm":{"englishName":"Aghem (Cameroon)","nativeName":"Aghem (K� m� lûŋ)"},"ak":{"englishName":"Akan","nativeName":"Akan"},"ak-gh":{"englishName":"Akan (Ghana)","nativeName":"Akan (Gaana)"},"am":{"englishName":"Amharic","nativeName":"�� ማáˆáŠ›"},"am-et":{"englishName":"Amharic (Ethiopia)","nativeName":"�� ማáˆáŠ› (ኢትዮጵያ)"},"ar":{"englishName":"Arabic","nativeName":"العربية"},"ar-001":{"englishName":"Arabic (World)","nativeName":"العربية (العالم)"},"ar-ae":{"englishName":"Arabic (United Arab Emirates)","nativeName":"العربية (الإمارات العربية Ø§Ù„Ù…ØªØØ¯Ø©)"},"ar-bh":{"englishName":"Arabic (Bahrain)","nativeName":"العربية (Ø§Ù„Ø¨ØØ±ÙŠÙ†)"},"ar-dj":{"englishName":"Arabic (Djibouti)","nativeName":"العربية (جيبوتي)"},"ar-dz":{"englishName":"Arabic (Algeria)","nativeName":"العربية (الجزائر)"},"ar-eg":{"englishName":"Arabic (Egypt)","nativeName":"العربية (مصر)"},"ar-er":{"englishName":"Arabic (Eritrea)","nativeName":"العربية (إريتريا)"},"ar-il":{"englishName":"Arabic (Israel)","nativeName":"العربية (إسرائيل)"},"ar-iq":{"englishName":"Arabic (Iraq)","nativeName":"العربية (العراق)"},"ar-jo":{"englishName":"Arabic (Jordan)","nativeName":"العربية (الأردن)"},"ar-km":{"englishName":"Arabic (Comoros)","nativeName":"العربية (جزر القمر)"},"ar-kw":{"englishName":"Arabic (Kuwait)","nativeName":"العربية (الكويت)"},"ar-lb":{"englishName":"Arabic (Lebanon)","nativeName":"العربية (لبنان)"},"ar-ly":{"englishName":"Arabic (Libya)","nativeName":"العربية (ليبيا)"},"ar-ma":{"englishName":"Arabic (Morocco)","nativeName":"العربية (المملكة المغربية)"},"ar-mr":{"englishName":"Arabic (Mauritania)","nativeName":"العربية (موريتانيا)"},"ar-om":{"englishName":"Arabic (Oman)","nativeName":"العربية (عمان)"},"ar-ps":{"englishName":"Arabic (Palestinian Authority)","nativeName":"العربية (السلطة الÙلسطينية)"},"ar-qa":{"englishName":"Arabic (Qatar)","nativeName":"العربية (قطر)"},"ar-sa":{"englishName":"Arabic (Saudi Arabia)","nativeName":"العربية (المملكة العربية السعودية)"},"ar-sd":{"englishName":"Arabic (Sudan)","nativeName":"العربية (السودان)"},"ar-so":{"englishName":"Arabic (Somalia)","nativeName":"العربية (الصومال)"},"ar-ss":{"englishName":"Arabic (South Sudan)","nativeName":"العربية (جنوب السودان)"},"ar-sy":{"englishName":"Arabic (Syria)","nativeName":"العربية (سوريا)"},"ar-td":{"englishName":"Arabic (Chad)","nativeName":"العربية (تشاد)"},"ar-tn":{"englishName":"Arabic (Tunisia)","nativeName":"العربية (تونس)"},"ar-ye":{"englishName":"Arabic (Yemen)","nativeName":"العربية (اليمن)"},"arn":{"englishName":"Mapudungun","nativeName":"Mapudungun"},"arn-cl":{"englishName":"Mapudungun (Chile)","nativeName":"Mapudungun (Chile)"},"as":{"englishName":"Assamese","nativeName":"অসমীয়া"},"as-in":{"englishName":"Assamese (India)","nativeName":"অসমীয়া (à¦à¦¾à§°à¦¤)"},"asa":{"englishName":"Asu","nativeName":"Kipare"},"asa-tz":{"englishName":"Asu (Tanzania)","nativeName":"Kipare (Tadhania)"},"ast":{"englishName":"Asturian","nativeName":"asturianu"},"ast-es":{"englishName":"Asturian (Spain)","nativeName":"asturianu (España)"},"az":{"englishName":"Azerbaijani","nativeName":"azÉ™rbaycan dili"},"az-cyrl":{"englishName":"Azerbaijani (Cyrillic)","nativeName":"Ðзәрбајҹан дили"},"az-cyrl-az":{"englishName":"Azerbaijani (Cyrillic, Azerbaijan)","nativeName":"Ðзәрбајҹан дили (Ðзәрбајҹан)"},"az-latn":{"englishName":"Azerbaijani (Latin)","nativeName":"AzÉ™rbaycan dili"},"az-latn-az":{"englishName":"Azerbaijani (Latin, Azerbaijan)","nativeName":"AzÉ™rbaycan dili (AzÉ™rbaycan)"},"ba":{"englishName":"Bashkir","nativeName":"Башҡорт"},"ba-ru":{"englishName":"Bashkir (Russia)","nativeName":"Башҡорт (� Ó™Ñәй)"},"bas":{"englishName":"Basaa","nativeName":"Æï¿½ s� a"},"bas-cm":{"englishName":"Basaa (Cameroon)","nativeName":"Æï¿½ s� a (K� mɛ̀rûn)"},"be":{"englishName":"Belarusian","nativeName":"БеларуÑкаÑ"},"be-by":{"englishName":"Belarusian (Belarus)","nativeName":"БеларуÑÐºÐ°Ñ (БеларуÑÑŒ)"},"bem":{"englishName":"Bemba","nativeName":"Ichibemba"},"bem-zm":{"englishName":"Bemba (Zambia)","nativeName":"Ichibemba (Zambia)"},"bez":{"englishName":"Bena","nativeName":"Hibena"},"bez-tz":{"englishName":"Bena (Tanzania)","nativeName":"Hibena (Hutanzania)"},"bg":{"englishName":"Bulgarian","nativeName":"българÑки"},"bg-bg":{"englishName":"Bulgarian (Bulgaria)","nativeName":"българÑки (БългариÑ)"},"bin":{"englishName":"Edo","nativeName":"Ẹ̀dó"},"bin-ng":{"englishName":"Edo (Nigeria)","nativeName":"Ẹ̀dó (Nigeria)"},"bm":{"englishName":"Bamanankan","nativeName":"bamanakan"},"bm-latn":{"englishName":"Bamanankan (Latin)","nativeName":"bamanakan"},"bm-latn-ml":{"englishName":"Bamanankan (Latin, Mali)","nativeName":"bamanakan (Mali)"},"bn":{"englishName":"Bangla","nativeName":"বাংলা"},"bn-bd":{"englishName":"Bangla (Bangladesh)","nativeName":"বাংলা (বাংলাদেশ)"},"bn-in":{"englishName":"Bangla (India)","nativeName":"বাংলা (à¦à¦¾à¦°à¦¤)"},"bo":{"englishName":"Tibetan","nativeName":"བོད་ཡིག"},"bo-cn":{"englishName":"Tibetan (China)","nativeName":"བོད་ཡིག (ཀྲུང་ཧà¾à¼‹à½˜à½²à¼‹à½‘མངས་སྤྱི་མà½à½´à½“་རྒྱལ་à½à½–à¼)"},"bo-in":{"englishName":"Tibetan (India)","nativeName":"བོད་སà¾à½‘་ (རྒྱ་གར་)"},"br":{"englishName":"Breton","nativeName":"brezhoneg"},"br-fr":{"englishName":"Breton (France)","nativeName":"brezhoneg (Frañs)"},"brx":{"englishName":"Bodo","nativeName":"बड़ो"},"brx-in":{"englishName":"Bodo (India)","nativeName":"बड़ो (à¤à¤¾à¤°à¤¤)"},"bs":{"englishName":"Bosnian","nativeName":"bosanski"},"bs-cyrl":{"englishName":"Bosnian (Cyrillic)","nativeName":"боÑанÑки"},"bs-cyrl-ba":{"englishName":"Bosnian (Cyrillic, Bosnia and Herzegovina)","nativeName":"боÑанÑки (БоÑна и Херцеговина)"},"bs-latn":{"englishName":"Bosnian (Latin)","nativeName":"bosanski"},"bs-latn-ba":{"englishName":"Bosnian (Latin, Bosnia and Herzegovina)","nativeName":"bosanski (Bosna i Hercegovina)"},"byn":{"englishName":"Blin","nativeName":"ብሊን"},"byn-er":{"englishName":"Blin (Eritrea)","nativeName":"ብሊን (ኤáˆá‰µáˆ«)"},"ca":{"englishName":"Catalan","nativeName":"catal� "},"ca-ad":{"englishName":"Catalan (Andorra)","nativeName":"catal� (Andorra)"},"ca-es":{"englishName":"Catalan (Catalan)","nativeName":"catal� (catal� )"},"ca-es-valencia":{"englishName":"Valencian (Spain)","nativeName":"valenci� (Espanya)"},"ca-fr":{"englishName":"Catalan (France)","nativeName":"catal� (França)"},"ca-it":{"englishName":"Catalan (Italy)","nativeName":"catal� (It� lia)"},"ce":{"englishName":"Chechen","nativeName":"нохчийн"},"ce-ru":{"englishName":"Chechen (Russia)","nativeName":"нохчийн (� оÑÑи)"},"cgg":{"englishName":"Chiga","nativeName":"Rukiga"},"cgg-ug":{"englishName":"Chiga (Uganda)","nativeName":"Rukiga (Uganda)"},"chr":{"englishName":"Cherokee","nativeName":"á£áŽ³áŽ©"},"chr-cher":{"englishName":"Cherokee","nativeName":"á£áŽ³áŽ©"},"chr-cher-us":{"englishName":"Cherokee (Cherokee)","nativeName":"á£áŽ³áŽ© (á£áŽ³áŽ©)"},"co":{"englishName":"Corsican","nativeName":"Corsu"},"co-fr":{"englishName":"Corsican (France)","nativeName":"Corsu (Francia)"},"cs":{"englishName":"Czech","nativeName":"ÄeÅ¡tina"},"cs-cz":{"englishName":"Czech (Czech Republic)","nativeName":"ÄeÅ¡tina (ÄŒeská republika)"},"cu":{"englishName":"Church Slavic","nativeName":"церковноÑловеÌнÑкїй"},"cu-ru":{"englishName":"Church Slavic (Russia)","nativeName":"церковноÑловеÌнÑкїй (рѡÑÑÑ–Ìа)"},"cy":{"englishName":"Welsh","nativeName":"Cymraeg"},"cy-gb":{"englishName":"Welsh (United Kingdom)","nativeName":"Cymraeg (Y Deyrnas Unedig)"},"da":{"englishName":"Danish","nativeName":"dansk"},"da-dk":{"englishName":"Danish (Denmark)","nativeName":"dansk (Danmark)"},"da-gl":{"englishName":"Danish (Greenland)","nativeName":"dansk (Grønland)"},"dav":{"englishName":"Taita","nativeName":"Kitaita"},"dav-ke":{"englishName":"Taita (Kenya)","nativeName":"Kitaita (Kenya)"},"de":{"englishName":"German","nativeName":"Deutsch"},"de-at":{"englishName":"German (Austria)","nativeName":"Deutsch (Österreich)"},"de-be":{"englishName":"German (Belgium)","nativeName":"Deutsch (Belgien)"},"de-ch":{"englishName":"German (Switzerland)","nativeName":"Deutsch (Schweiz)"},"de-de":{"englishName":"German (Germany)","nativeName":"Deutsch (Deutschland)"},"de-li":{"englishName":"German (Liechtenstein)","nativeName":"Deutsch (Liechtenstein)"},"de-lu":{"englishName":"German (Luxembourg)","nativeName":"Deutsch (Luxemburg)"},"dje":{"englishName":"Zarma","nativeName":"Zarmaciine"},"dje-ne":{"englishName":"Zarma (Niger)","nativeName":"Zarmaciine (Nižer)"},"dsb":{"englishName":"Lower Sorbian","nativeName":"dolnoserbšćina"},"dsb-de":{"englishName":"Lower Sorbian (Germany)","nativeName":"dolnoserbšćina (Nimska)"},"dua":{"englishName":"Duala","nativeName":"duálá"},"dua-cm":{"englishName":"Duala (Cameroon)","nativeName":"duálá (Cameroun)"},"dv":{"englishName":"Divehi","nativeName":"Þ‹Þ¨ÞˆÞ¬Þ€Þ¨Þ„Þ¦ÞÞ°"},"dv-mv":{"englishName":"Divehi (Maldives)","nativeName":"Þ‹Þ¨ÞˆÞ¬Þ€Þ¨Þ„Þ¦ÞÞ° (Þ‹Þ¨ÞˆÞ¬Þ€Þ¨ ÞƒÞ§Þ‡Þ°Þ–Þ¬)"},"dyo":{"englishName":"Jola-Fonyi","nativeName":"joola"},"dyo-sn":{"englishName":"Jola-Fonyi (Senegal)","nativeName":"joola (Senegal)"},"dz":{"englishName":"Dzongkha","nativeName":"རྫོང་à½"},"dz-bt":{"englishName":"Dzongkha (Bhutan)","nativeName":"རྫོང་འ(�� བྲུག)"},"ebu":{"englishName":"Embu","nativeName":"KÄ©embu"},"ebu-ke":{"englishName":"Embu (Kenya)","nativeName":"KÄ©embu (Kenya)"},"ee":{"englishName":"Ewe","nativeName":"EÊ‹egbe"},"ee-gh":{"englishName":"Ewe (Ghana)","nativeName":"EÊ‹egbe (Ghana nutome)"},"ee-tg":{"englishName":"Ewe (Togo)","nativeName":"EÊ‹egbe (Togo nutome)"},"el":{"englishName":"Greek","nativeName":"Ελληνικά"},"el-cy":{"englishName":"Greek (Cyprus)","nativeName":"Ελληνικά (ΚÏÏ€Ïος)"},"el-gr":{"englishName":"Greek (Greece)","nativeName":"Ελληνικά (Ελλάδα)"},"en":{"englishName":"English","nativeName":"English"},"en-001":{"englishName":"English (World)","nativeName":"English (World)"},"en-029":{"englishName":"English (Caribbean)","nativeName":"English (Caribbean)"},"en-150":{"englishName":"English (Europe)","nativeName":"English (Europe)"},"en-ag":{"englishName":"English (Antigua and Barbuda)","nativeName":"English (Antigua and Barbuda)"},"en-ai":{"englishName":"English (Anguilla)","nativeName":"English (Anguilla)"},"en-as":{"englishName":"English (American Samoa)","nativeName":"English (American Samoa)"},"en-at":{"englishName":"English (Austria)","nativeName":"English (Austria)"},"en-au":{"englishName":"English (Australia)","nativeName":"English (Australia)"},"en-bb":{"englishName":"English (Barbados)","nativeName":"English (Barbados)"},"en-be":{"englishName":"English (Belgium)","nativeName":"English (Belgium)"},"en-bi":{"englishName":"English (Burundi)","nativeName":"English (Burundi)"},"en-bm":{"englishName":"English (Bermuda)","nativeName":"English (Bermuda)"},"en-bs":{"englishName":"English (Bahamas)","nativeName":"English (Bahamas)"},"en-bw":{"englishName":"English (Botswana)","nativeName":"English (Botswana)"},"en-bz":{"englishName":"English (Belize)","nativeName":"English (Belize)"},"en-ca":{"englishName":"English (Canada)","nativeName":"English (Canada)"},"en-cc":{"englishName":"English (Cocos (Keeling) Islands)","nativeName":"English (Cocos (Keeling) Islands)"},"en-ch":{"englishName":"English (Switzerland)","nativeName":"English (Switzerland)"},"en-ck":{"englishName":"English (Cook Islands)","nativeName":"English (Cook Islands)"},"en-cm":{"englishName":"English (Cameroon)","nativeName":"English (Cameroon)"},"en-cx":{"englishName":"English (Christmas Island)","nativeName":"English (Christmas Island)"},"en-cy":{"englishName":"English (Cyprus)","nativeName":"English (Cyprus)"},"en-de":{"englishName":"English (Germany)","nativeName":"English (Germany)"},"en-dk":{"englishName":"English (Denmark)","nativeName":"English (Denmark)"},"en-dm":{"englishName":"English (Dominica)","nativeName":"English (Dominica)"},"en-er":{"englishName":"English (Eritrea)","nativeName":"English (Eritrea)"},"en-fi":{"englishName":"English (Finland)","nativeName":"English (Finland)"},"en-fj":{"englishName":"English (Fiji)","nativeName":"English (Fiji)"},"en-fk":{"englishName":"English (Falkland Islands)","nativeName":"English (Falkland Islands)"},"en-fm":{"englishName":"English (Micronesia)","nativeName":"English (Micronesia)"},"en-gb":{"englishName":"English (United Kingdom)","nativeName":"English (United Kingdom)"},"en-gd":{"englishName":"English (Grenada)","nativeName":"English (Grenada)"},"en-gg":{"englishName":"English (Guernsey)","nativeName":"English (Guernsey)"},"en-gh":{"englishName":"English (Ghana)","nativeName":"English (Ghana)"},"en-gi":{"englishName":"English (Gibraltar)","nativeName":"English (Gibraltar)"},"en-gm":{"englishName":"English (Gambia)","nativeName":"English (Gambia)"},"en-gu":{"englishName":"English (Guam)","nativeName":"English (Guam)"},"en-gy":{"englishName":"English (Guyana)","nativeName":"English (Guyana)"},"en-hk":{"englishName":"English (Hong Kong SAR)","nativeName":"English (Hong Kong SAR)"},"en-id":{"englishName":"English (Indonesia)","nativeName":"English (Indonesia)"},"en-ie":{"englishName":"English (Ireland)","nativeName":"English (Ireland)"},"en-il":{"englishName":"English (Israel)","nativeName":"English (Israel)"},"en-im":{"englishName":"English (Isle of Man)","nativeName":"English (Isle of Man)"},"en-in":{"englishName":"English (India)","nativeName":"English (India)"},"en-io":{"englishName":"English (British Indian Ocean Territory)","nativeName":"English (British Indian Ocean Territory)"},"en-je":{"englishName":"English (Jersey)","nativeName":"English (Jersey)"},"en-jm":{"englishName":"English (Jamaica)","nativeName":"English (Jamaica)"},"en-ke":{"englishName":"English (Kenya)","nativeName":"English (Kenya)"},"en-ki":{"englishName":"English (Kiribati)","nativeName":"English (Kiribati)"},"en-kn":{"englishName":"English (Saint Kitts and Nevis)","nativeName":"English (Saint Kitts and Nevis)"},"en-ky":{"englishName":"English (Cayman Islands)","nativeName":"English (Cayman Islands)"},"en-lc":{"englishName":"English (Saint Lucia)","nativeName":"English (Saint Lucia)"},"en-lr":{"englishName":"English (Liberia)","nativeName":"English (Liberia)"},"en-ls":{"englishName":"English (Lesotho)","nativeName":"English (Lesotho)"},"en-mg":{"englishName":"English (Madagascar)","nativeName":"English (Madagascar)"},"en-mh":{"englishName":"English (Marshall Islands)","nativeName":"English (Marshall Islands)"},"en-mo":{"englishName":"English (Macao SAR)","nativeName":"English (Macao SAR)"},"en-mp":{"englishName":"English (Northern Mariana Islands)","nativeName":"English (Northern Mariana Islands)"},"en-ms":{"englishName":"English (Montserrat)","nativeName":"English (Montserrat)"},"en-mt":{"englishName":"English (Malta)","nativeName":"English (Malta)"},"en-mu":{"englishName":"English (Mauritius)","nativeName":"English (Mauritius)"},"en-mw":{"englishName":"English (Malawi)","nativeName":"English (Malawi)"},"en-my":{"englishName":"English (Malaysia)","nativeName":"English (Malaysia)"},"en-na":{"englishName":"English (Namibia)","nativeName":"English (Namibia)"},"en-nf":{"englishName":"English (Norfolk Island)","nativeName":"English (Norfolk Island)"},"en-ng":{"englishName":"English (Nigeria)","nativeName":"English (Nigeria)"},"en-nl":{"englishName":"English (Netherlands)","nativeName":"English (Netherlands)"},"en-nr":{"englishName":"English (Nauru)","nativeName":"English (Nauru)"},"en-nu":{"englishName":"English (Niue)","nativeName":"English (Niue)"},"en-nz":{"englishName":"English (New Zealand)","nativeName":"English (New Zealand)"},"en-pg":{"englishName":"English (Papua New Guinea)","nativeName":"English (Papua New Guinea)"},"en-ph":{"englishName":"English (Philippines)","nativeName":"English (Philippines)"},"en-pk":{"englishName":"English (Pakistan)","nativeName":"English (Pakistan)"},"en-pn":{"englishName":"English (Pitcairn Islands)","nativeName":"English (Pitcairn Islands)"},"en-pr":{"englishName":"English (Puerto Rico)","nativeName":"English (Puerto Rico)"},"en-pw":{"englishName":"English (Palau)","nativeName":"English (Palau)"},"en-rw":{"englishName":"English (Rwanda)","nativeName":"English (Rwanda)"},"en-sb":{"englishName":"English (Solomon Islands)","nativeName":"English (Solomon Islands)"},"en-sc":{"englishName":"English (Seychelles)","nativeName":"English (Seychelles)"},"en-sd":{"englishName":"English (Sudan)","nativeName":"English (Sudan)"},"en-se":{"englishName":"English (Sweden)","nativeName":"English (Sweden)"},"en-sg":{"englishName":"English (Singapore)","nativeName":"English (Singapore)"},"en-sh":{"englishName":"English (St Helena, Ascension, Tristan da Cunha)","nativeName":"English (St Helena, Ascension, Tristan da Cunha)"},"en-si":{"englishName":"English (Slovenia)","nativeName":"English (Slovenia)"},"en-sl":{"englishName":"English (Sierra Leone)","nativeName":"English (Sierra Leone)"},"en-ss":{"englishName":"English (South Sudan)","nativeName":"English (South Sudan)"},"en-sx":{"englishName":"English (Sint Maarten)","nativeName":"English (Sint Maarten)"},"en-sz":{"englishName":"English (Swaziland)","nativeName":"English (Swaziland)"},"en-tc":{"englishName":"English (Turks and Caicos Islands)","nativeName":"English (Turks and Caicos Islands)"},"en-tk":{"englishName":"English (Tokelau)","nativeName":"English (Tokelau)"},"en-to":{"englishName":"English (Tonga)","nativeName":"English (Tonga)"},"en-tt":{"englishName":"English (Trinidad and Tobago)","nativeName":"English (Trinidad and Tobago)"},"en-tv":{"englishName":"English (Tuvalu)","nativeName":"English (Tuvalu)"},"en-tz":{"englishName":"English (Tanzania)","nativeName":"English (Tanzania)"},"en-ug":{"englishName":"English (Uganda)","nativeName":"English (Uganda)"},"en-um":{"englishName":"English (U.S. Outlying Islands)","nativeName":"English (U.S. Outlying Islands)"},"en-us":{"englishName":"English (United States)","nativeName":"English (United States)"},"en-vc":{"englishName":"English (Saint Vincent and the Grenadines)","nativeName":"English (Saint Vincent and the Grenadines)"},"en-vg":{"englishName":"English (British Virgin Islands)","nativeName":"English (British Virgin Islands)"},"en-vi":{"englishName":"English (U.S. Virgin Islands)","nativeName":"English (U.S. Virgin Islands)"},"en-vu":{"englishName":"English (Vanuatu)","nativeName":"English (Vanuatu)"},"en-ws":{"englishName":"English (Samoa)","nativeName":"English (Samoa)"},"en-za":{"englishName":"English (South Africa)","nativeName":"English (South Africa)"},"en-zm":{"englishName":"English (Zambia)","nativeName":"English (Zambia)"},"en-zw":{"englishName":"English (Zimbabwe)","nativeName":"English (Zimbabwe)"},"eo":{"englishName":"Esperanto","nativeName":"esperanto"},"eo-001":{"englishName":"Esperanto (World)","nativeName":"esperanto (World)"},"es":{"englishName":"Spanish","nativeName":"español"},"es-419":{"englishName":"Spanish (Latin America)","nativeName":"español (Latinoamérica)"},"es-ar":{"englishName":"Spanish (Argentina)","nativeName":"español (Argentina)"},"es-bo":{"englishName":"Spanish (Bolivia)","nativeName":"español (Bolivia)"},"es-cl":{"englishName":"Spanish (Chile)","nativeName":"español (Chile)"},"es-co":{"englishName":"Spanish (Colombia)","nativeName":"español (Colombia)"},"es-cr":{"englishName":"Spanish (Costa Rica)","nativeName":"español (Costa Rica)"},"es-cu":{"englishName":"Spanish (Cuba)","nativeName":"español (Cuba)"},"es-do":{"englishName":"Spanish (Dominican Republic)","nativeName":"español (República Dominicana)"},"es-ec":{"englishName":"Spanish (Ecuador)","nativeName":"español (Ecuador)"},"es-es":{"englishName":"Spanish (Spain, International Sort)","nativeName":"español (España, alfabetización internacional)"},"es-gq":{"englishName":"Spanish (Equatorial Guinea)","nativeName":"español (Guinea Ecuatorial)"},"es-gt":{"englishName":"Spanish (Guatemala)","nativeName":"español (Guatemala)"},"es-hn":{"englishName":"Spanish (Honduras)","nativeName":"español (Honduras)"},"es-mx":{"englishName":"Spanish (Mexico)","nativeName":"español (México)"},"es-ni":{"englishName":"Spanish (Nicaragua)","nativeName":"español (Nicaragua)"},"es-pa":{"englishName":"Spanish (Panama)","nativeName":"español (Panamá)"},"es-pe":{"englishName":"Spanish (Peru)","nativeName":"español (Perú)"},"es-ph":{"englishName":"Spanish (Philippines)","nativeName":"español (Filipinas)"},"es-pr":{"englishName":"Spanish (Puerto Rico)","nativeName":"español (Puerto Rico)"},"es-py":{"englishName":"Spanish (Paraguay)","nativeName":"español (Paraguay)"},"es-sv":{"englishName":"Spanish (El Salvador)","nativeName":"español (El Salvador)"},"es-us":{"englishName":"Spanish (United States)","nativeName":"español (Estados Unidos)"},"es-uy":{"englishName":"Spanish (Uruguay)","nativeName":"español (Uruguay)"},"es-ve":{"englishName":"Spanish (Venezuela)","nativeName":"español (Venezuela)"},"et":{"englishName":"Estonian","nativeName":"eesti"},"et-ee":{"englishName":"Estonian (Estonia)","nativeName":"eesti (Eesti)"},"eu":{"englishName":"Basque","nativeName":"euskara"},"eu-es":{"englishName":"Basque (Basque)","nativeName":"euskara (euskara)"},"ewo":{"englishName":"Ewondo","nativeName":"ewondo"},"ewo-cm":{"englishName":"Ewondo (Cameroon)","nativeName":"ewondo (KamÉ™rún)"},"fa":{"englishName":"Persian","nativeName":"ÙØ§Ø±Ø³Ù‰"},"fa-ir":{"englishName":"Persian (Iran)","nativeName":"ÙØ§Ø±Ø³Ù‰ (ایران)"},"ff":{"englishName":"Fulah","nativeName":"Fulah"},"ff-cm":{"englishName":"Fulah (Cameroon)","nativeName":"Pulaar (Kameruun)"},"ff-gn":{"englishName":"Fulah (Guinea)","nativeName":"Pulaar (Gine)"},"ff-latn":{"englishName":"Fulah","nativeName":"Fulah"},"ff-latn-sn":{"englishName":"Fulah (Latin, Senegal)","nativeName":"Fulah (Sénégal)"},"ff-mr":{"englishName":"Fulah (Mauritania)","nativeName":"Pulaar (Muritani)"},"ff-ng":{"englishName":"Fulah (Nigeria)","nativeName":"Pulaar (Nigeria)"},"fi":{"englishName":"Finnish","nativeName":"suomi"},"fi-fi":{"englishName":"Finnish (Finland)","nativeName":"suomi (Suomi)"},"fil":{"englishName":"Filipino","nativeName":"Filipino"},"fil-ph":{"englishName":"Filipino (Philippines)","nativeName":"Filipino (Pilipinas)"},"fo":{"englishName":"Faroese","nativeName":"føroyskt"},"fo-dk":{"englishName":"Faroese (Denmark)","nativeName":"føroyskt (Danmark)"},"fo-fo":{"englishName":"Faroese (Faroe Islands)","nativeName":"føroyskt (Føroyar)"},"fr":{"englishName":"French","nativeName":"français"},"fr-029":{"englishName":"French (Caribbean)","nativeName":"français (caraïbes)"},"fr-be":{"englishName":"French (Belgium)","nativeName":"français (Belgique)"},"fr-bf":{"englishName":"French (Burkina Faso)","nativeName":"français (Burkina Faso)"},"fr-bi":{"englishName":"French (Burundi)","nativeName":"français (Burundi)"},"fr-bj":{"englishName":"French (Benin)","nativeName":"français (Bénin)"},"fr-bl":{"englishName":"French (Saint Barthélemy)","nativeName":"français (Saint-Barthélemy)"},"fr-ca":{"englishName":"French (Canada)","nativeName":"français (Canada)"},"fr-cd":{"englishName":"French (Congo DRC)","nativeName":"français (Congo, République démocratique du)"},"fr-cf":{"englishName":"French (Central African Republic)","nativeName":"français (République centrafricaine)"},"fr-cg":{"englishName":"French (Congo)","nativeName":"français (Congo)"},"fr-ch":{"englishName":"French (Switzerland)","nativeName":"français (Suisse)"},"fr-ci":{"englishName":"French (Côte d’Ivoire)","nativeName":"français (Côte d’Ivoire)"},"fr-cm":{"englishName":"French (Cameroon)","nativeName":"français (Cameroun)"},"fr-dj":{"englishName":"French (Djibouti)","nativeName":"français (Djibouti)"},"fr-dz":{"englishName":"French (Algeria)","nativeName":"français (Algérie)"},"fr-fr":{"englishName":"French (France)","nativeName":"français (France)"},"fr-ga":{"englishName":"French (Gabon)","nativeName":"français (Gabon)"},"fr-gf":{"englishName":"French (French Guiana)","nativeName":"français (Guyane française)"},"fr-gn":{"englishName":"French (Guinea)","nativeName":"français (Guinée)"},"fr-gp":{"englishName":"French (Guadeloupe)","nativeName":"français (Guadeloupe)"},"fr-gq":{"englishName":"French (Equatorial Guinea)","nativeName":"français (Guinée équatoriale)"},"fr-ht":{"englishName":"French (Haiti)","nativeName":"français (Haïti)"},"fr-km":{"englishName":"French (Comoros)","nativeName":"français (Comores)"},"fr-lu":{"englishName":"French (Luxembourg)","nativeName":"français (Luxembourg)"},"fr-ma":{"englishName":"French (Morocco)","nativeName":"français (Maroc)"},"fr-mc":{"englishName":"French (Monaco)","nativeName":"français (Monaco)"},"fr-mf":{"englishName":"French (Saint Martin)","nativeName":"français (Saint-Martin)"},"fr-mg":{"englishName":"French (Madagascar)","nativeName":"français (Madagascar)"},"fr-ml":{"englishName":"French (Mali)","nativeName":"français (Mali)"},"fr-mq":{"englishName":"French (Martinique)","nativeName":"français (Martinique)"},"fr-mr":{"englishName":"French (Mauritania)","nativeName":"français (Mauritanie)"},"fr-mu":{"englishName":"French (Mauritius)","nativeName":"français (Maurice)"},"fr-nc":{"englishName":"French (New Caledonia)","nativeName":"français (Nouvelle-Calédonie)"},"fr-ne":{"englishName":"French (Niger)","nativeName":"français (Niger)"},"fr-pf":{"englishName":"French (French Polynesia)","nativeName":"français (Polynésie française)"},"fr-pm":{"englishName":"French (Saint Pierre and Miquelon)","nativeName":"français (Saint-Pierre-et-Miquelon)"},"fr-re":{"englishName":"French (Réunion)","nativeName":"français (La Réunion)"},"fr-rw":{"englishName":"French (Rwanda)","nativeName":"français (Rwanda)"},"fr-sc":{"englishName":"French (Seychelles)","nativeName":"français (Seychelles)"},"fr-sn":{"englishName":"French (Senegal)","nativeName":"français (Sénégal)"},"fr-sy":{"englishName":"French (Syria)","nativeName":"français (Syrie)"},"fr-td":{"englishName":"French (Chad)","nativeName":"français (Tchad)"},"fr-tg":{"englishName":"French (Togo)","nativeName":"français (Togo)"},"fr-tn":{"englishName":"French (Tunisia)","nativeName":"français (Tunisie)"},"fr-vu":{"englishName":"French (Vanuatu)","nativeName":"français (Vanuatu)"},"fr-wf":{"englishName":"French (Wallis and Futuna)","nativeName":"français (Wallis-et-Futuna)"},"fr-yt":{"englishName":"French (Mayotte)","nativeName":"français (Mayotte)"},"fur":{"englishName":"Friulian","nativeName":"furlan"},"fur-it":{"englishName":"Friulian (Italy)","nativeName":"furlan (Italie)"},"fy":{"englishName":"Western Frisian","nativeName":"Frysk"},"fy-nl":{"englishName":"Western Frisian (Netherlands)","nativeName":"Frysk (Nederlân)"},"ga":{"englishName":"Irish","nativeName":"Gaeilge"},"ga-ie":{"englishName":"Irish (Ireland)","nativeName":"Gaeilge (Éire)"},"gd":{"englishName":"Scottish Gaelic","nativeName":"G� idhlig"},"gd-gb":{"englishName":"Scottish Gaelic (United Kingdom)","nativeName":"G� idhlig (An Rìoghachd Aonaichte)"},"gl":{"englishName":"Galician","nativeName":"galego"},"gl-es":{"englishName":"Galician (Galician)","nativeName":"galego (galego)"},"gn":{"englishName":"Guarani","nativeName":"Avañe’ẽ"},"gn-py":{"englishName":"Guarani (Paraguay)","nativeName":"Avañe’ẽ (Paraguái)"},"gsw":{"englishName":"Alsatian","nativeName":"Elsässisch"},"gsw-ch":{"englishName":"Alsatian (Switzerland)","nativeName":"Elsässisch (Schwiiz)"},"gsw-fr":{"englishName":"Alsatian (France)","nativeName":"Elsässisch (Fr� nkrisch)"},"gsw-li":{"englishName":"Alsatian (Liechtenstein)","nativeName":"Elsässisch (Liächteschtäi)"},"gu":{"englishName":"Gujarati","nativeName":"ગà«àªœàª°àª¾àª¤à«€"},"gu-in":{"englishName":"Gujarati (India)","nativeName":"ગà«àªœàª°àª¾àª¤à«€ (àªàª¾àª°àª¤)"},"guz":{"englishName":"Gusii","nativeName":"Ekegusii"},"guz-ke":{"englishName":"Gusii (Kenya)","nativeName":"Ekegusii (Kenya)"},"gv":{"englishName":"Manx","nativeName":"Gaelg"},"gv-im":{"englishName":"Manx (Isle of Man)","nativeName":"Gaelg (Ellan Vannin)"},"ha":{"englishName":"Hausa","nativeName":"Hausa"},"ha-latn":{"englishName":"Hausa (Latin)","nativeName":"Hausa"},"ha-latn-gh":{"englishName":"Hausa (Latin, Ghana)","nativeName":"Hausa (Gana)"},"ha-latn-ne":{"englishName":"Hausa (Latin, Niger)","nativeName":"Hausa (Nijar)"},"ha-latn-ng":{"englishName":"Hausa (Latin, Nigeria)","nativeName":"Hausa (Najeriya)"},"haw":{"englishName":"Hawaiian","nativeName":"ʻŌlelo HawaiÊ»i"},"haw-us":{"englishName":"Hawaiian (United States)","nativeName":"ʻŌlelo HawaiÊ»i (Ê»Amelika Hui PÅ« Ê»Ia)"},"he":{"englishName":"Hebrew","nativeName":"עברית"},"he-il":{"englishName":"Hebrew (Israel)","nativeName":"עברית (ישר×ל)"},"hi":{"englishName":"Hindi","nativeName":"हिंदी"},"hi-in":{"englishName":"Hindi (India)","nativeName":"हिंदी (à¤à¤¾à¤°à¤¤)"},"hr":{"englishName":"Croatian","nativeName":"hrvatski"},"hr-ba":{"englishName":"Croatian (Bosnia and Herzegovina)","nativeName":"hrvatski (Bosna i Hercegovina)"},"hr-hr":{"englishName":"Croatian (Croatia)","nativeName":"hrvatski (Hrvatska)"},"hsb":{"englishName":"Upper Sorbian","nativeName":"hornjoserbšćina"},"hsb-de":{"englishName":"Upper Sorbian (Germany)","nativeName":"hornjoserbšćina (NÄ›mska)"},"hu":{"englishName":"Hungarian","nativeName":"magyar"},"hu-hu":{"englishName":"Hungarian (Hungary)","nativeName":"magyar (Magyarország)"},"hy":{"englishName":"Armenian","nativeName":"Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶"},"hy-am":{"englishName":"Armenian (Armenia)","nativeName":"Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶ (Õ€Õ¡ÕµÕ¡Õ½Õ¿Õ¡Õ¶)"},"ia":{"englishName":"Interlingua","nativeName":"interlingua"},"ia-001":{"englishName":"Interlingua (World)","nativeName":"interlingua (World)"},"ia-fr":{"englishName":"Interlingua (France)","nativeName":"interlingua (Francia)"},"ibb":{"englishName":"Ibibio","nativeName":"Ibibio-Efik"},"ibb-ng":{"englishName":"Ibibio (Nigeria)","nativeName":"Ibibio-Efik (Nigeria)"},"id":{"englishName":"Indonesian","nativeName":"Indonesia"},"id-id":{"englishName":"Indonesian (Indonesia)","nativeName":"Indonesia (Indonesia)"},"ig":{"englishName":"Igbo","nativeName":"Igbo"},"ig-ng":{"englishName":"Igbo (Nigeria)","nativeName":"Igbo (Nigeria)"},"ii":{"englishName":"Yi","nativeName":"ꆈ�� ê±ê‚·"},"ii-cn":{"englishName":"Yi (China)","nativeName":"ꆈ�� ê±ê‚· (êꉸê“ꂱê‡ê‰¼ê‡©)"},"is":{"englishName":"Icelandic","nativeName":"Ãslenska"},"is-is":{"englishName":"Icelandic (Iceland)","nativeName":"Ãslenska (Ãsland)"},"it":{"englishName":"Italian","nativeName":"italiano"},"it-ch":{"englishName":"Italian (Switzerland)","nativeName":"italiano (Svizzera)"},"it-it":{"englishName":"Italian (Italy)","nativeName":"italiano (Italia)"},"it-sm":{"englishName":"Italian (San Marino)","nativeName":"italiano (San Marino)"},"iu":{"englishName":"Inuktitut","nativeName":"Inuktitut"},"iu-cans":{"englishName":"Inuktitut (Syllabics)","nativeName":"áƒá“„ᒃᑎá‘ᑦ"},"iu-cans-ca":{"englishName":"Inuktitut (Syllabics, Canada)","nativeName":"áƒá“„ᒃᑎá‘ᑦ (ᑲᓇᑕᒥ)"},"iu-latn":{"englishName":"Inuktitut (Latin)","nativeName":"Inuktitut"},"iu-latn-ca":{"englishName":"Inuktitut (Latin, Canada)","nativeName":"Inuktitut (Kanatami)"},"ja":{"englishName":"Japanese","nativeName":"日本語"},"ja-jp":{"englishName":"Japanese (Japan)","nativeName":"日本語 (日本)"},"jgo":{"englishName":"Ngomba","nativeName":"Ndaꞌa"},"jgo-cm":{"englishName":"Ngomba (Cameroon)","nativeName":"Ndaꞌa (KamÉ›lûn)"},"jmc":{"englishName":"Machame","nativeName":"Kimachame"},"jmc-tz":{"englishName":"Machame (Tanzania)","nativeName":"Kimachame (Tanzania)"},"jv":{"englishName":"Javanese","nativeName":"Basa Jawa"},"jv-java":{"englishName":"Javanese (Javanese)","nativeName":"ꦧꦱꦗꦮ"},"jv-java-id":{"englishName":"Javanese (Javanese, Indonesia)","nativeName":"ꦧꦱꦗꦮ (Indonesia)"},"jv-latn":{"englishName":"Javanese","nativeName":"Basa Jawa"},"jv-latn-id":{"englishName":"Javanese (Indonesia)","nativeName":"Basa Jawa (Indonesia)"},"ka":{"englishName":"Georgian","nativeName":"ქáƒï¿½ï¿½ თული"},"ka-ge":{"englishName":"Georgian (Georgia)","nativeName":"ქáƒï¿½ï¿½ თული (სáƒáƒ¥áƒï¿½ï¿½ თველáƒ)"},"kab":{"englishName":"Kabyle","nativeName":"Taqbaylit"},"kab-dz":{"englishName":"Kabyle (Algeria)","nativeName":"Taqbaylit (Lezzayer)"},"kam":{"englishName":"Kamba","nativeName":"Kikamba"},"kam-ke":{"englishName":"Kamba (Kenya)","nativeName":"Kikamba (Kenya)"},"kde":{"englishName":"Makonde","nativeName":"Chimakonde"},"kde-tz":{"englishName":"Makonde (Tanzania)","nativeName":"Chimakonde (Tanzania)"},"kea":{"englishName":"Kabuverdianu","nativeName":"kabuverdianu"},"kea-cv":{"englishName":"Kabuverdianu (Cabo Verde)","nativeName":"kabuverdianu (Kabu Verdi)"},"khq":{"englishName":"Koyra Chiini","nativeName":"Koyra ciini"},"khq-ml":{"englishName":"Koyra Chiini (Mali)","nativeName":"Koyra ciini (Maali)"},"ki":{"englishName":"Kikuyu","nativeName":"Gikuyu"},"ki-ke":{"englishName":"Kikuyu (Kenya)","nativeName":"Gikuyu (Kenya)"},"kk":{"englishName":"Kazakh","nativeName":"қазақ тілі"},"kk-kz":{"englishName":"Kazakh (Kazakhstan)","nativeName":"қазақ тілі (ҚазақÑтан)"},"kkj":{"englishName":"Kako","nativeName":"kakÉ”"},"kkj-cm":{"englishName":"Kako (Cameroon)","nativeName":"kakÉ” (KamÉ›run)"},"kl":{"englishName":"Greenlandic","nativeName":"kalaallisut"},"kl-gl":{"englishName":"Greenlandic (Greenland)","nativeName":"kalaallisut (Kalaallit Nunaat)"},"kln":{"englishName":"Kalenjin","nativeName":"Kalenjin"},"kln-ke":{"englishName":"Kalenjin (Kenya)","nativeName":"Kalenjin (Emetab Kenya)"},"km":{"englishName":"Khmer","nativeName":"ភាសាážáŸ’មែរ"},"km-kh":{"englishName":"Khmer (Cambodia)","nativeName":"ភាសាážáŸ’មែរ (កម្ពុជា)"},"kn":{"englishName":"Kannada","nativeName":"ಕನà³à²¨à²¡"},"kn-in":{"englishName":"Kannada (India)","nativeName":"ಕನà³à²¨à²¡ (à²à²¾à²°à²¤)"},"ko":{"englishName":"Korean","nativeName":"한êµì–´"},"ko-kp":{"englishName":"Korean (North Korea)","nativeName":"한êµì–´ (조�� 민주주ì˜ì¸ë¯¼ê³µí™”êµ)"},"ko-kr":{"englishName":"Korean (Korea)","nativeName":"한êµì–´(대한민êµ)"},"kok":{"englishName":"Konkani","nativeName":"कोंकणी"},"kok-in":{"englishName":"Konkani (India)","nativeName":"कोंकणी (à¤à¤¾à¤°à¤¤)"},"kr":{"englishName":"Kanuri","nativeName":"Kanuri"},"kr-ng":{"englishName":"Kanuri (Nigeria)","nativeName":"Kanuri (Nigeria)"},"ks":{"englishName":"Kashmiri","nativeName":"Ú©Ù²Ø´ÙØ±"},"ks-arab":{"englishName":"Kashmiri (Perso-Arabic)","nativeName":"Ú©Ù²Ø´ÙØ±"},"ks-arab-in":{"englishName":"Kashmiri (Perso-Arabic)","nativeName":"Ú©Ù²Ø´ÙØ± (اَربی)"},"ks-deva":{"englishName":"Kashmiri (Devanagari)","nativeName":"कॉशà¥à¤°"},"ks-deva-in":{"englishName":"Kashmiri (Devanagari, India)","nativeName":"कॉशà¥à¤° (India)"},"ksb":{"englishName":"Shambala","nativeName":"Kishambaa"},"ksb-tz":{"englishName":"Shambala (Tanzania)","nativeName":"Kishambaa (Tanzania)"},"ksf":{"englishName":"Bafia","nativeName":"rikpa"},"ksf-cm":{"englishName":"Bafia (Cameroon)","nativeName":"rikpa (kamÉ›rún)"},"ksh":{"englishName":"Ripuarian","nativeName":"Kölsch"},"ksh-de":{"englishName":"Ripuarian (Germany)","nativeName":"Kölsch (Doütschland)"},"ku":{"englishName":"Central Kurdish","nativeName":"کوردیی ناوەڕاست"},"ku-arab":{"englishName":"Central Kurdish","nativeName":"کوردیی ناوەڕاست"},"ku-arab-iq":{"englishName":"Central Kurdish (Iraq)","nativeName":"کوردیی ناوەڕاست (کوردستان)"},"ku-arab-ir":{"englishName":"Kurdish (Perso-Arabic, Iran)","nativeName":"کوردی (ئێران)"},"kw":{"englishName":"Cornish","nativeName":"kernewek"},"kw-gb":{"englishName":"Cornish (United Kingdom)","nativeName":"kernewek (Rywvaneth Unys)"},"ky":{"englishName":"Kyrgyz","nativeName":"Кыргыз"},"ky-kg":{"englishName":"Kyrgyz (Kyrgyzstan)","nativeName":"Кыргыз (КыргызÑтан)"},"la":{"englishName":"Latin","nativeName":"lingua latÄ«na"},"la-001":{"englishName":"Latin (World)","nativeName":"lingua latÄ«na (World)"},"lag":{"englishName":"Langi","nativeName":"Kɨlaangi"},"lag-tz":{"englishName":"Langi (Tanzania)","nativeName":"Kɨlaangi (TaansanÃa)"},"lb":{"englishName":"Luxembourgish","nativeName":"Lëtzebuergesch"},"lb-lu":{"englishName":"Luxembourgish (Luxembourg)","nativeName":"Lëtzebuergesch (Lëtzebuerg)"},"lg":{"englishName":"Ganda","nativeName":"Luganda"},"lg-ug":{"englishName":"Ganda (Uganda)","nativeName":"Luganda (Yuganda)"},"lkt":{"englishName":"Lakota","nativeName":"Lakȟólʼiyapi"},"lkt-us":{"englishName":"Lakota (United States)","nativeName":"Lakȟólʼiyapi (MÃlahaÅ‹ska TÈŸamákÈŸoÄhe)"},"ln":{"englishName":"Lingala","nativeName":"lingála"},"ln-ao":{"englishName":"Lingala (Angola)","nativeName":"lingála (Angóla)"},"ln-cd":{"englishName":"Lingala (Congo DRC)","nativeName":"lingála (Repibiki demokratiki ya Kongó)"},"ln-cf":{"englishName":"Lingala (Central African Republic)","nativeName":"lingála (Repibiki ya AfrÃka ya Káti)"},"ln-cg":{"englishName":"Lingala (Congo)","nativeName":"lingála (Kongo)"},"lo":{"englishName":"Lao","nativeName":"ລາວ"},"lo-la":{"englishName":"Lao (Laos)","nativeName":"ລາວ (ລາວ)"},"lrc":{"englishName":"Northern Luri","nativeName":"لۊری شومالی"},"lrc-iq":{"englishName":"Northern Luri (Iraq)","nativeName":"لۊری شومالی (Iraq)"},"lrc-ir":{"englishName":"Northern Luri (Iran)","nativeName":"لۊری شومالی (Iran)"},"lt":{"englishName":"Lithuanian","nativeName":"lietuvių"},"lt-lt":{"englishName":"Lithuanian (Lithuania)","nativeName":"lietuvių (Lietuva)"},"lu":{"englishName":"Luba-Katanga","nativeName":"Tshiluba"},"lu-cd":{"englishName":"Luba-Katanga (Congo DRC)","nativeName":"Tshiluba (Ditunga wa Kongu)"},"luo":{"englishName":"Luo","nativeName":"Dholuo"},"luo-ke":{"englishName":"Luo (Kenya)","nativeName":"Dholuo (Kenya)"},"luy":{"englishName":"Luyia","nativeName":"Luluhia"},"luy-ke":{"englishName":"Luyia (Kenya)","nativeName":"Luluhia (Kenya)"},"lv":{"englishName":"Latvian","nativeName":"latvieÅ¡u"},"lv-lv":{"englishName":"Latvian (Latvia)","nativeName":"latvieÅ¡u (Latvija)"},"mas":{"englishName":"Masai","nativeName":"Maa"},"mas-ke":{"englishName":"Masai (Kenya)","nativeName":"Maa (Kenya)"},"mas-tz":{"englishName":"Masai (Tanzania)","nativeName":"Maa (Tansania)"},"mer":{"englishName":"Meru","nativeName":"KÄ©mÄ©rÅ©"},"mer-ke":{"englishName":"Meru (Kenya)","nativeName":"KÄ©mÄ©rÅ© (Kenya)"},"mfe":{"englishName":"Morisyen","nativeName":"kreol morisien"},"mfe-mu":{"englishName":"Morisyen (Mauritius)","nativeName":"kreol morisien (Moris)"},"mg":{"englishName":"Malagasy","nativeName":"Malagasy"},"mg-mg":{"englishName":"Malagasy (Madagascar)","nativeName":"Malagasy (Madagasikara)"},"mgh":{"englishName":"Makhuwa-Meetto","nativeName":"Makua"},"mgh-mz":{"englishName":"Makhuwa-Meetto (Mozambique)","nativeName":"Makua (Umozambiki)"},"mgo":{"englishName":"Metaʼ","nativeName":"metaʼ"},"mgo-cm":{"englishName":"Metaʼ (Cameroon)","nativeName":"metaʼ (Kamalun)"},"mi":{"englishName":"Maori","nativeName":"Reo MÄori"},"mi-nz":{"englishName":"Maori (New Zealand)","nativeName":"Reo MÄori (Aotearoa)"},"mk":{"englishName":"Macedonian","nativeName":"македонÑки"},"mk-mk":{"englishName":"Macedonian (Macedonia, FYRO)","nativeName":"македонÑки (� епублика Македонија)"},"ml":{"englishName":"Malayalam","nativeName":"മലയാളം"},"ml-in":{"englishName":"Malayalam (India)","nativeName":"മലയാളം (ഇനàµà´¤àµà´¯)"},"mn":{"englishName":"Mongolian","nativeName":"Монгол Ñ…Ñл"},"mn-cyrl":{"englishName":"Mongolian","nativeName":"монгол"},"mn-mn":{"englishName":"Mongolian (Mongolia)","nativeName":"монгол (Монгол)"},"mn-mong":{"englishName":"Mongolian (Traditional Mongolian)","nativeName":"� �� �� �� �� �� �� � � �� �� �� �"},"mn-mong-cn":{"englishName":"Mongolian (Traditional Mongolian, China)","nativeName":"� �� �� �� �� �� �� � � �� �� �� � (� �� �� �� �� �� � � �� � �� �� � �� �� � �� � � �� �� �� �� � �� � � � �� � � � �� �� �� �)"},"mn-mong-mn":{"englishName":"Mongolian (Traditional Mongolian, Mongolia)","nativeName":"� �� �� �� �� �� �� � � �� �� �� � (� �� �� �� �� �� �� � � �� �� �� �)"},"mni":{"englishName":"Manipuri","nativeName":"মৈতৈলোনà§"},"mni-in":{"englishName":"Manipuri (India)","nativeName":"মৈতৈলোনৠ(India)"},"moh":{"englishName":"Mohawk","nativeName":"Kanien’kéha"},"moh-ca":{"englishName":"Mohawk (Mohawk)","nativeName":"Kanien\'kéha"},"mr":{"englishName":"Marathi","nativeName":"मरा�� ी"},"mr-in":{"englishName":"Marathi (India)","nativeName":"मरा�� ी (à¤à¤¾à¤°à¤¤)"},"ms":{"englishName":"Malay","nativeName":"Bahasa Melayu"},"ms-bn":{"englishName":"Malay (Brunei)","nativeName":"Bahasa Melayu (Brunei)"},"ms-my":{"englishName":"Malay (Malaysia)","nativeName":"Bahasa Melayu (Malaysia)"},"ms-sg":{"englishName":"Malay (Singapore)","nativeName":"Bahasa Melayu (Singapura)"},"mt":{"englishName":"Maltese","nativeName":"Malti"},"mt-mt":{"englishName":"Maltese (Malta)","nativeName":"Malti (Malta)"},"mua":{"englishName":"Mundang","nativeName":"MUNDAÅŠ"},"mua-cm":{"englishName":"Mundang (Cameroon)","nativeName":"MUNDAÅŠ (kameruÅ‹)"},"my":{"englishName":"Burmese","nativeName":"ဗမာ"},"my-mm":{"englishName":"Burmese (Myanmar)","nativeName":"ဗမာ (မြန်မာ)"},"mzn":{"englishName":"Mazanderani","nativeName":"مازرونی"},"mzn-ir":{"englishName":"Mazanderani (Iran)","nativeName":"مازرونی (ایران)"},"naq":{"englishName":"Nama","nativeName":"Khoekhoegowab"},"naq-na":{"englishName":"Nama (Namibia)","nativeName":"Khoekhoegowab (Namibiab)"},"nb":{"englishName":"Norwegian BokmÃ¥l","nativeName":"norsk bokmÃ¥l"},"nb-no":{"englishName":"Norwegian BokmÃ¥l (Norway)","nativeName":"norsk bokmÃ¥l (Norge)"},"nb-sj":{"englishName":"Norwegian BokmÃ¥l (Svalbard and Jan Mayen)","nativeName":"norsk bokmÃ¥l (Svalbard og Jan Mayen)"},"nd":{"englishName":"North Ndebele","nativeName":"isiNdebele"},"nd-zw":{"englishName":"North Ndebele (Zimbabwe)","nativeName":"isiNdebele (Zimbabwe)"},"ne":{"englishName":"Nepali","nativeName":"नेपाली"},"ne-in":{"englishName":"Nepali (India)","nativeName":"नेपाली (à¤à¤¾à¤°à¤¤)"},"ne-np":{"englishName":"Nepali (Nepal)","nativeName":"नेपाली (नेपाल)"},"nl":{"englishName":"Dutch","nativeName":"Nederlands"},"nl-aw":{"englishName":"Dutch (Aruba)","nativeName":"Nederlands (Aruba)"},"nl-be":{"englishName":"Dutch (Belgium)","nativeName":"Nederlands (België)"},"nl-bq":{"englishName":"Dutch (Bonaire, Sint Eustatius and Saba)","nativeName":"Nederlands (Bonaire, Sint Eustatius en Saba)"},"nl-cw":{"englishName":"Dutch (Curaçao)","nativeName":"Nederlands (Curaçao)"},"nl-nl":{"englishName":"Dutch (Netherlands)","nativeName":"Nederlands (Nederland)"},"nl-sr":{"englishName":"Dutch (Suriname)","nativeName":"Nederlands (Suriname)"},"nl-sx":{"englishName":"Dutch (Sint Maarten)","nativeName":"Nederlands (Sint-Maarten)"},"nmg":{"englishName":"Kwasio","nativeName":"Kwasio"},"nmg-cm":{"englishName":"Kwasio (Cameroon)","nativeName":"Kwasio (Kamerun)"},"nn":{"englishName":"Norwegian Nynorsk","nativeName":"nynorsk"},"nn-no":{"englishName":"Norwegian Nynorsk (Norway)","nativeName":"nynorsk (Noreg)"},"nnh":{"englishName":"Ngiemboon","nativeName":"Shwóŋò ngiembɔɔn"},"nnh-cm":{"englishName":"Ngiemboon (Cameroon)","nativeName":"Shwóŋò ngiembɔɔn (K� malûm)"},"no":{"englishName":"Norwegian","nativeName":"norsk"},"nqo":{"englishName":"N\'ko","nativeName":"ß’ßžß"},"nqo-gn":{"englishName":"N\'ko (Guinea)","nativeName":"ß’ßžß (ߖߌ߬ߣß߬ ߞߊ߲ߓßß²)"},"nr":{"englishName":"South Ndebele","nativeName":"isiNdebele"},"nr-za":{"englishName":"South Ndebele (South Africa)","nativeName":"isiNdebele (South Africa)"},"nso":{"englishName":"Sesotho sa Leboa","nativeName":"Sesotho sa Leboa"},"nso-za":{"englishName":"Sesotho sa Leboa (South Africa)","nativeName":"Sesotho sa Leboa (Afrika Borwa)"},"nus":{"englishName":"Nuer","nativeName":"Thok Nath"},"nus-ss":{"englishName":"Nuer (South Sudan)","nativeName":"Thok Nath (South Sudan)"},"nyn":{"englishName":"Nyankole","nativeName":"Runyankore"},"nyn-ug":{"englishName":"Nyankole (Uganda)","nativeName":"Runyankore (Uganda)"},"oc":{"englishName":"Occitan","nativeName":"Occitan"},"oc-fr":{"englishName":"Occitan (France)","nativeName":"Occitan (França)"},"om":{"englishName":"Oromo","nativeName":"Oromoo"},"om-et":{"englishName":"Oromo (Ethiopia)","nativeName":"Oromoo (Itoophiyaa)"},"om-ke":{"englishName":"Oromo (Kenya)","nativeName":"Oromoo (Keeniyaa)"},"or":{"englishName":"Odia","nativeName":"ଓàœà¬¿à¬†"},"or-in":{"englishName":"Odia (India)","nativeName":"ଓàœà¬¿à¬† (à¬à¬¾à¬°à¬¤)"},"os":{"englishName":"Ossetian","nativeName":"Ирон æвзаг"},"os-ge":{"englishName":"Ossetian (Georgia)","nativeName":"Ирон æвзаг (ГуырдзыÑтон)"},"os-ru":{"englishName":"Ossetian (Russia)","nativeName":"Ирон æвзаг (УӕрӕÑе)"},"pa":{"englishName":"Punjabi","nativeName":"ਪੰਜਾਬੀ"},"pa-arab":{"englishName":"Punjabi","nativeName":"پنجابی"},"pa-arab-pk":{"englishName":"Punjabi (Pakistan)","nativeName":"پنجابی (پاکستان)"},"pa-in":{"englishName":"Punjabi (India)","nativeName":"ਪੰਜਾਬੀ (à¨à¨¾à¨°à¨¤)"},"pap":{"englishName":"Papiamento","nativeName":"Papiamentu"},"pap-029":{"englishName":"Papiamento (Caribbean)","nativeName":"Papiamentu (Caribbean)"},"pl":{"englishName":"Polish","nativeName":"polski"},"pl-pl":{"englishName":"Polish (Poland)","nativeName":"polski (Polska)"},"prg":{"englishName":"Prussian","nativeName":"prÅ«siskan"},"prg-001":{"englishName":"Prussian (World)","nativeName":"prÅ«siskan (swÄ«tai)"},"prs":{"englishName":"Dari","nativeName":"درى"},"prs-af":{"englishName":"Dari (Afghanistan)","nativeName":"درى (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)"},"ps":{"englishName":"Pashto","nativeName":"پښتو"},"ps-af":{"englishName":"Pashto (Afghanistan)","nativeName":"پښتو (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)"},"pt":{"englishName":"Portuguese","nativeName":"português"},"pt-ao":{"englishName":"Portuguese (Angola)","nativeName":"português (Angola)"},"pt-br":{"englishName":"Portuguese (Brazil)","nativeName":"português (Brasil)"},"pt-cv":{"englishName":"Portuguese (Cabo Verde)","nativeName":"português (Cabo Verde)"},"pt-gw":{"englishName":"Portuguese (Guinea-Bissau)","nativeName":"português (Guiné-Bissau)"},"pt-mo":{"englishName":"Portuguese (Macao SAR)","nativeName":"português (RAE de Macau)"},"pt-mz":{"englishName":"Portuguese (Mozambique)","nativeName":"português (Moçambique)"},"pt-pt":{"englishName":"Portuguese (Portugal)","nativeName":"português (Portugal)"},"pt-st":{"englishName":"Portuguese (São Tomé and PrÃncipe)","nativeName":"português (São Tomé e PrÃncipe)"},"pt-tl":{"englishName":"Portuguese (Timor-Leste)","nativeName":"português (Timor-Leste)"},"quc":{"englishName":"K\'iche\'","nativeName":"K\'iche\'"},"quc-latn":{"englishName":"K\'iche\'","nativeName":"K\'iche\'"},"quc-latn-gt":{"englishName":"K\'iche\' (Guatemala)","nativeName":"K\'iche\' (Guatemala)"},"quz":{"englishName":"Quechua","nativeName":"runasimi"},"quz-bo":{"englishName":"Quechua (Bolivia)","nativeName":"runasimi (Qullasuyu)"},"quz-ec":{"englishName":"Quichua (Ecuador)","nativeName":"runa shimi (Ecuador Suyu)"},"quz-pe":{"englishName":"Quechua (Peru)","nativeName":"runasimi (Peru)"},"rm":{"englishName":"Romansh","nativeName":"rumantsch"},"rm-ch":{"englishName":"Romansh (Switzerland)","nativeName":"rumantsch (Svizra)"},"rn":{"englishName":"Rundi","nativeName":"Ikirundi"},"rn-bi":{"englishName":"Rundi (Burundi)","nativeName":"Ikirundi (Uburundi)"},"ro":{"englishName":"Romanian","nativeName":"română"},"ro-md":{"englishName":"Romanian (Moldova)","nativeName":"română (Republica Moldova)"},"ro-ro":{"englishName":"Romanian (Romania)","nativeName":"română (România)"},"rof":{"englishName":"Rombo","nativeName":"Kihorombo"},"rof-tz":{"englishName":"Rombo (Tanzania)","nativeName":"Kihorombo (Tanzania)"},"ru":{"englishName":"Russian","nativeName":"руÑÑкий"},"ru-by":{"englishName":"Russian (Belarus)","nativeName":"руÑÑкий (БеларуÑÑŒ)"},"ru-kg":{"englishName":"Russian (Kyrgyzstan)","nativeName":"руÑÑкий (КиргизиÑ)"},"ru-kz":{"englishName":"Russian (Kazakhstan)","nativeName":"руÑÑкий (КазахÑтан)"},"ru-md":{"englishName":"Russian (Moldova)","nativeName":"руÑÑкий (Молдова)"},"ru-ru":{"englishName":"Russian (Russia)","nativeName":"руÑÑкий (� оÑÑиÑ)"},"ru-ua":{"englishName":"Russian (Ukraine)","nativeName":"руÑÑкий (Украина)"},"rw":{"englishName":"Kinyarwanda","nativeName":"Kinyarwanda"},"rw-rw":{"englishName":"Kinyarwanda (Rwanda)","nativeName":"Kinyarwanda (Rwanda)"},"rwk":{"englishName":"Rwa","nativeName":"Kiruwa"},"rwk-tz":{"englishName":"Rwa (Tanzania)","nativeName":"Kiruwa (Tanzania)"},"sa":{"englishName":"Sanskrit","nativeName":"संसà¥à¤•ृत"},"sa-in":{"englishName":"Sanskrit (India)","nativeName":"संसà¥à¤•ृत (à¤à¤¾à¤°à¤¤à¤®à¥)"},"sah":{"englishName":"Sakha","nativeName":"Саха"},"sah-ru":{"englishName":"Sakha (Russia)","nativeName":"Саха (� оÑÑиÑ)"},"saq":{"englishName":"Samburu","nativeName":"Kisampur"},"saq-ke":{"englishName":"Samburu (Kenya)","nativeName":"Kisampur (Kenya)"},"sbp":{"englishName":"Sangu","nativeName":"Ishisangu"},"sbp-tz":{"englishName":"Sangu (Tanzania)","nativeName":"Ishisangu (Tansaniya)"},"sd":{"englishName":"Sindhi","nativeName":"سنڌي"},"sd-arab":{"englishName":"Sindhi","nativeName":"سنڌي"},"sd-arab-pk":{"englishName":"Sindhi (Pakistan)","nativeName":"سنڌي (پاکستان)"},"sd-deva":{"englishName":"Sindhi (Devanagari)","nativeName":"सिनà¥à¤§à¥€"},"sd-deva-in":{"englishName":"Sindhi (Devanagari, India)","nativeName":"सिनà¥à¤§à¥€ (India)"},"se":{"englishName":"Northern Sami","nativeName":"davvisámegiella"},"se-fi":{"englishName":"Sami, Northern (Finland)","nativeName":"davvisámegiella (Suopma)"},"se-no":{"englishName":"Sami, Northern (Norway)","nativeName":"davvisámegiella (Norga)"},"se-se":{"englishName":"Sami, Northern (Sweden)","nativeName":"davvisámegiella (Ruoŧŧa)"},"seh":{"englishName":"Sena","nativeName":"sena"},"seh-mz":{"englishName":"Sena (Mozambique)","nativeName":"sena (Moçambique)"},"ses":{"englishName":"Koyraboro Senni","nativeName":"Koyraboro senni"},"ses-ml":{"englishName":"Koyraboro Senni (Mali)","nativeName":"Koyraboro senni (Maali)"},"sg":{"englishName":"Sango","nativeName":"Sängö"},"sg-cf":{"englishName":"Sango (Central African Republic)","nativeName":"Sängö (Ködörösêse tî Bêafrîka)"},"shi":{"englishName":"Tachelhit","nativeName":"ⵜⴰⵛâµâµƒâµ‰âµœ"},"shi-latn":{"englishName":"Tachelhit (Latin)","nativeName":"Tashelḥiyt"},"shi-latn-ma":{"englishName":"Tachelhit (Latin, Morocco)","nativeName":"Tashelḥiyt (lmÉ£rib)"},"shi-tfng":{"englishName":"Tachelhit (Tifinagh)","nativeName":"ⵜⴰⵛâµâµƒâµ‰âµœ"},"shi-tfng-ma":{"englishName":"Tachelhit (Tifinagh, Morocco)","nativeName":"ⵜⴰⵛâµâµƒâµ‰âµœ (âµâµŽâµ–ⵔⵉⴱ)"},"si":{"englishName":"Sinhala","nativeName":"සිංහල"},"si-lk":{"englishName":"Sinhala (Sri Lanka)","nativeName":"සිංහල (à·à·Šâ€à¶»à·“ ලංකà·à·€)"},"sk":{"englishName":"Slovak","nativeName":"slovenÄina"},"sk-sk":{"englishName":"Slovak (Slovakia)","nativeName":"slovenÄina (Slovensko)"},"sl":{"englishName":"Slovenian","nativeName":"slovenÅ¡Äina"},"sl-si":{"englishName":"Slovenian (Slovenia)","nativeName":"slovenÅ¡Äina (Slovenija)"},"sma":{"englishName":"Sami (Southern)","nativeName":"Ã¥arjelsaemiengïele"},"sma-no":{"englishName":"Sami, Southern (Norway)","nativeName":"Ã¥arjelsaemiengïele (Nöörje)"},"sma-se":{"englishName":"Sami, Southern (Sweden)","nativeName":"Ã¥arjelsaemiengïele (Sveerje)"},"smj":{"englishName":"Sami (Lule)","nativeName":"julevusámegiella"},"smj-no":{"englishName":"Sami, Lule (Norway)","nativeName":"julevusámegiella (Vuodna)"},"smj-se":{"englishName":"Sami, Lule (Sweden)","nativeName":"julevusámegiella (Svierik)"},"smn":{"englishName":"Sami (Inari)","nativeName":"anarâškielâ"},"smn-fi":{"englishName":"Sami, Inari (Finland)","nativeName":"anarâškielâ (Suomâ)"},"sms":{"englishName":"Sami (Skolt)","nativeName":"sää´mÇ©iõll"},"sms-fi":{"englishName":"Sami, Skolt (Finland)","nativeName":"sää´mÇ©iõll (Lää´ddjânnam)"},"sn":{"englishName":"Shona","nativeName":"chiShona"},"sn-latn":{"englishName":"Shona (Latin)","nativeName":"chiShona (Latin)"},"sn-latn-zw":{"englishName":"Shona (Latin, Zimbabwe)","nativeName":"chiShona (Zimbabwe)"},"so":{"englishName":"Somali","nativeName":"Soomaali"},"so-dj":{"englishName":"Somali (Djibouti)","nativeName":"Soomaali (Jabuuti)"},"so-et":{"englishName":"Somali (Ethiopia)","nativeName":"Soomaali (Itoobiya)"},"so-ke":{"englishName":"Somali (Kenya)","nativeName":"Soomaali (Kiiniya)"},"so-so":{"englishName":"Somali (Somalia)","nativeName":"Soomaali (Soomaaliya)"},"sq":{"englishName":"Albanian","nativeName":"shqip"},"sq-al":{"englishName":"Albanian (Albania)","nativeName":"shqip (Shqipëri)"},"sq-mk":{"englishName":"Albanian (Macedonia, FYRO)","nativeName":"shqip (Republika e Maqedonisë)"},"sq-xk":{"englishName":"Albanian (Kosovo)","nativeName":"shqip (Kosovë)"},"sr":{"englishName":"Serbian","nativeName":"srpski"},"sr-cyrl":{"englishName":"Serbian (Cyrillic)","nativeName":"ÑрпÑки"},"sr-cyrl-ba":{"englishName":"Serbian (Cyrillic, Bosnia and Herzegovina)","nativeName":"ÑрпÑки (БоÑна и Херцеговина)"},"sr-cyrl-me":{"englishName":"Serbian (Cyrillic, Montenegro)","nativeName":"ÑрпÑки (Црна Гора)"},"sr-cyrl-rs":{"englishName":"Serbian (Cyrillic, Serbia)","nativeName":"ÑрпÑки (Србија)"},"sr-cyrl-xk":{"englishName":"Serbian (Cyrillic, Kosovo)","nativeName":"ÑрпÑки (КоÑово)"},"sr-latn":{"englishName":"Serbian (Latin)","nativeName":"srpski"},"sr-latn-ba":{"englishName":"Serbian (Latin, Bosnia and Herzegovina)","nativeName":"srpski (Bosna i Hercegovina)"},"sr-latn-me":{"englishName":"Serbian (Latin, Montenegro)","nativeName":"srpski (Crna Gora)"},"sr-latn-rs":{"englishName":"Serbian (Latin, Serbia)","nativeName":"srpski (Srbija)"},"sr-latn-xk":{"englishName":"Serbian (Latin, Kosovo)","nativeName":"srpski (Kosovo)"},"ss":{"englishName":"siSwati","nativeName":"Siswati"},"ss-sz":{"englishName":"siSwati (Swaziland)","nativeName":"siSwati (Swaziland)"},"ss-za":{"englishName":"siSwati (South Africa)","nativeName":"siSwati (South Africa)"},"ssy":{"englishName":"Saho","nativeName":"Saho"},"ssy-er":{"englishName":"Saho (Eritrea)","nativeName":"Saho (Eretria)"},"st":{"englishName":"Sesotho","nativeName":"Sesotho"},"st-ls":{"englishName":"Sesotho (Lesotho)","nativeName":"Sesotho (Lesotho)"},"st-za":{"englishName":"Sesotho (South Africa)","nativeName":"Sesotho (South Africa)"},"sv":{"englishName":"Swedish","nativeName":"svenska"},"sv-ax":{"englishName":"Swedish (Ã…land Islands)","nativeName":"svenska (Ã…land)"},"sv-fi":{"englishName":"Swedish (Finland)","nativeName":"svenska (Finland)"},"sv-se":{"englishName":"Swedish (Sweden)","nativeName":"svenska (Sverige)"},"sw":{"englishName":"Kiswahili","nativeName":"Kiswahili"},"sw-cd":{"englishName":"Kiswahili (Congo DRC)","nativeName":"Kiswahili (Jamhuri ya Kidemokrasia ya Kongo)"},"sw-ke":{"englishName":"Kiswahili (Kenya)","nativeName":"Kiswahili (Kenya)"},"sw-tz":{"englishName":"Kiswahili (Tanzania)","nativeName":"Kiswahili (Tanzania)"},"sw-ug":{"englishName":"Kiswahili (Uganda)","nativeName":"Kiswahili (Uganda)"},"syr":{"englishName":"Syriac","nativeName":"ܣܘܪÜÜÜ"},"syr-sy":{"englishName":"Syriac (Syria)","nativeName":"ܣܘܪÜÜÜ (ܣܘܪÜÜ)"},"ta":{"englishName":"Tamil","nativeName":"தமிழà¯"},"ta-in":{"englishName":"Tamil (India)","nativeName":"தமிழ௠(இநà¯à®¤à®¿à®¯à®¾)"},"ta-lk":{"englishName":"Tamil (Sri Lanka)","nativeName":"தமிழ௠(இலஙà¯à®•ை)"},"ta-my":{"englishName":"Tamil (Malaysia)","nativeName":"தமிழ௠(மலேசியா)"},"ta-sg":{"englishName":"Tamil (Singapore)","nativeName":"தமிழ௠(சிஙà¯à®•பà¯à®ªà¯‚à®°à¯)"},"te":{"englishName":"Telugu","nativeName":"తెలà±à°—à±"},"te-in":{"englishName":"Telugu (India)","nativeName":"తెలà±à°—à± (à°à°¾à°°à°¤ దేశం)"},"teo":{"englishName":"Teso","nativeName":"Kiteso"},"teo-ke":{"englishName":"Teso (Kenya)","nativeName":"Kiteso (Kenia)"},"teo-ug":{"englishName":"Teso (Uganda)","nativeName":"Kiteso (Uganda)"},"tg":{"englishName":"Tajik","nativeName":"Тоҷикӣ"},"tg-cyrl":{"englishName":"Tajik (Cyrillic)","nativeName":"Тоҷикӣ"},"tg-cyrl-tj":{"englishName":"Tajik (Cyrillic, Tajikistan)","nativeName":"Тоҷикӣ (ТоҷикиÑтон)"},"th":{"englishName":"Thai","nativeName":"ไทย"},"th-th":{"englishName":"Thai (Thailand)","nativeName":"ไทย (ไทย)"},"ti":{"englishName":"Tigrinya","nativeName":"ትáŒáˆáŠ›"},"ti-er":{"englishName":"Tigrinya (Eritrea)","nativeName":"ትáŒáˆáŠ› (ኤáˆá‰µáˆ«)"},"ti-et":{"englishName":"Tigrinya (Ethiopia)","nativeName":"ትáŒáˆáŠ› (ኢትዮጵያ)"},"tig":{"englishName":"Tigre","nativeName":"ትáŒáˆ¨"},"tig-er":{"englishName":"Tigre (Eritrea)","nativeName":"ትáŒáˆ¨ (ኤáˆá‰µáˆ«)"},"tk":{"englishName":"Turkmen","nativeName":"Türkmen dili"},"tk-tm":{"englishName":"Turkmen (Turkmenistan)","nativeName":"Türkmen dili (Türkmenistan)"},"tn":{"englishName":"Setswana","nativeName":"Setswana"},"tn-bw":{"englishName":"Setswana (Botswana)","nativeName":"Setswana (Botswana)"},"tn-za":{"englishName":"Setswana (South Africa)","nativeName":"Setswana (Aforika Borwa)"},"to":{"englishName":"Tongan","nativeName":"lea fakatonga"},"to-to":{"englishName":"Tongan (Tonga)","nativeName":"lea fakatonga (Tonga)"},"tr":{"englishName":"Turkish","nativeName":"Türkçe"},"tr-cy":{"englishName":"Turkish (Cyprus)","nativeName":"Türkçe (Kıbrıs)"},"tr-tr":{"englishName":"Turkish (Turkey)","nativeName":"Türkçe (Türkiye)"},"ts":{"englishName":"Tsonga","nativeName":"Xitsonga"},"ts-za":{"englishName":"Xitsonga (South Africa)","nativeName":"Xitsonga (South Africa)"},"tt":{"englishName":"Tatar","nativeName":"Татар"},"tt-ru":{"englishName":"Tatar (Russia)","nativeName":"Татар (� оÑÑиÑ)"},"twq":{"englishName":"Tasawaq","nativeName":"Tasawaq senni"},"twq-ne":{"englishName":"Tasawaq (Niger)","nativeName":"Tasawaq senni (Nižer)"},"tzm":{"englishName":"Central Atlas Tamazight","nativeName":"TamaziÉ£t n laá¹laá¹£"},"tzm-arab":{"englishName":"Central Atlas Tamazight (Arabic)","nativeName":"أطلس المركزية التامازيتية"},"tzm-arab-ma":{"englishName":"Central Atlas Tamazight (Arabic, Morocco)","nativeName":"أطلس المركزية التامازيتية (Morocco)"},"tzm-latn":{"englishName":"Central Atlas Tamazight (Latin)","nativeName":"TamaziÉ£t n laá¹laá¹£"},"tzm-latn-dz":{"englishName":"Central Atlas Tamazight (Latin, Algeria)","nativeName":"TamaziÉ£t n laá¹laá¹£ (Djazaïr)"},"tzm-latn-ma":{"englishName":"Central Atlas Tamazight (Latin, Morocco)","nativeName":"TamaziÉ£t n laá¹laá¹£ (Meṛṛuk)"},"tzm-tfng":{"englishName":"Central Atlas Tamazight (Tifinagh)","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ"},"tzm-tfng-ma":{"englishName":"Central Atlas Tamazight (Tifinagh, Morocco)","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ (âµâµŽâµ–ⵔⵉⴱ)"},"ug":{"englishName":"Uyghur","nativeName":"ئۇيغۇرچە"},"ug-cn":{"englishName":"Uyghur (China)","nativeName":"ئۇيغۇرچە (Ø¬Û‡ÚØ®Û‡Ø§ خەلق جۇمھۇرىيىتى)"},"uk":{"englishName":"Ukrainian","nativeName":"українÑька"},"uk-ua":{"englishName":"Ukrainian (Ukraine)","nativeName":"українÑька (Україна)"},"ur":{"englishName":"Urdu","nativeName":"Ø§ÙØ±Ø¯Ùˆ"},"ur-in":{"englishName":"Urdu (India)","nativeName":"اردو (بھارت)"},"ur-pk":{"englishName":"Urdu (Pakistan)","nativeName":"Ø§ÙØ±Ø¯Ùˆ (پاکستان)"},"uz":{"englishName":"Uzbek","nativeName":"o‘zbek"},"uz-arab":{"englishName":"Uzbek (Perso-Arabic)","nativeName":"اوزبیک"},"uz-arab-af":{"englishName":"Uzbek (Perso-Arabic, Afghanistan)","nativeName":"اوزبیک (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)"},"uz-cyrl":{"englishName":"Uzbek (Cyrillic)","nativeName":"Ўзбек"},"uz-cyrl-uz":{"englishName":"Uzbek (Cyrillic, Uzbekistan)","nativeName":"Ўзбек (ЎзбекиÑтон)"},"uz-latn":{"englishName":"Uzbek (Latin)","nativeName":"o‘zbek"},"uz-latn-uz":{"englishName":"Uzbek (Latin, Uzbekistan)","nativeName":"o‘zbek (OÊ»zbekiston)"},"vai":{"englishName":"Vai","nativeName":"ꕙꔤ"},"vai-latn":{"englishName":"Vai (Latin)","nativeName":"Vai"},"vai-latn-lr":{"englishName":"Vai (Latin, Liberia)","nativeName":"Vai (Laibhiya)"},"vai-vaii":{"englishName":"Vai (Vai)","nativeName":"ꕙꔤ"},"vai-vaii-lr":{"englishName":"Vai (Vai, Liberia)","nativeName":"ꕙꔤ (ꕞꔤꔫꕩ)"},"ve":{"englishName":"Venda","nativeName":"Tshivenḓa"},"ve-za":{"englishName":"Venda (South Africa)","nativeName":"Tshivenḓa (South Africa)"},"vi":{"englishName":"Vietnamese","nativeName":"TiêÌng Việt"},"vi-vn":{"englishName":"Vietnamese (Vietnam)","nativeName":"TiêÌng Việt (Việt Nam)"},"vo":{"englishName":"Volapük","nativeName":"Volapük"},"vo-001":{"englishName":"Volapük (World)","nativeName":"Volapük (World)"},"vun":{"englishName":"Vunjo","nativeName":"Kyivunjo"},"vun-tz":{"englishName":"Vunjo (Tanzania)","nativeName":"Kyivunjo (Tanzania)"},"wae":{"englishName":"Walser","nativeName":"Walser"},"wae-ch":{"englishName":"Walser (Switzerland)","nativeName":"Walser (Schwiz)"},"wal":{"englishName":"Wolaytta","nativeName":"ወላá‹á‰³á‰±"},"wal-et":{"englishName":"Wolaytta (Ethiopia)","nativeName":"ወላá‹á‰³á‰± (ኢትዮጵያ)"},"wo":{"englishName":"Wolof","nativeName":"Wolof"},"wo-sn":{"englishName":"Wolof (Senegal)","nativeName":"Wolof (Senegaal)"},"xh":{"englishName":"isiXhosa","nativeName":"isiXhosa"},"xh-za":{"englishName":"isiXhosa (South Africa)","nativeName":"isiXhosa (eMzantsi Afrika)"},"xog":{"englishName":"Soga","nativeName":"Olusoga"},"xog-ug":{"englishName":"Soga (Uganda)","nativeName":"Olusoga (Yuganda)"},"yav":{"englishName":"Yangben","nativeName":"nuasue"},"yav-cm":{"englishName":"Yangben (Cameroon)","nativeName":"nuasue (Kemelún)"},"yi":{"englishName":"Yiddish","nativeName":"ייִדיש"},"yi-001":{"englishName":"Yiddish (World)","nativeName":"ייִדיש (וועלט)"},"yo":{"englishName":"Yoruba","nativeName":"Èdè Yorùbá"},"yo-bj":{"englishName":"Yoruba (Benin)","nativeName":"Èdè Yorùbá (OrÃlÉ›Ìède Bɛ̀nɛ̀)"},"yo-ng":{"englishName":"Yoruba (Nigeria)","nativeName":"Èdè Yorùbá (OrÃlẹÌède N� ìjÃrÃ� )"},"zgh":{"englishName":"Standard Moroccan Tamazight","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ"},"zgh-tfng":{"englishName":"Standard Moroccan Tamazight (Tifinagh)","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ"},"zgh-tfng-ma":{"englishName":"Standard Moroccan Tamazight (Tifinagh, Morocco)","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ (âµâµŽâµ–ⵔⵉⴱ)"},"zh":{"englishName":"Chinese","nativeName":"䏿–‡"},"zh-cn":{"englishName":"Chinese (Simplified, China)","nativeName":"䏿–‡(ä¸å›½)"},"zh-hans":{"englishName":"Chinese (Simplified)","nativeName":"䏿–‡(简体)"},"zh-hans-hk":{"englishName":"Chinese (Simplified Han, Hong Kong SAR)","nativeName":"䏿–‡ (香港特别行政区)"},"zh-hans-mo":{"englishName":"Chinese (Simplified Han, Macao SAR)","nativeName":"䏿–‡ (澳门特别行政区)"},"zh-hant":{"englishName":"Chinese (Traditional)","nativeName":"䏿–‡(ç¹é«”)"},"zh-hk":{"englishName":"Chinese (Traditional, Hong Kong SAR)","nativeName":"䏿–‡(香港特別行政å€)"},"zh-mo":{"englishName":"Chinese (Traditional, Macao SAR)","nativeName":"䏿–‡(澳門特別行政å€)"},"zh-sg":{"englishName":"Chinese (Simplified, Singapore)","nativeName":"䏿–‡(新�� å¡)"},"zh-tw":{"englishName":"Chinese (Traditional, Taiwan)","nativeName":"䏿–‡(å°ç£)"},"zu":{"englishName":"isiZulu","nativeName":"isiZulu"},"zu-za":{"englishName":"isiZulu (South Africa)","nativeName":"isiZulu (i-South Africa)"},"zh-chs":{"englishName":"Chinese (Simplified) Legacy","nativeName":"䏿–‡(简体) 旧版"},"zh-cht":{"englishName":"Chinese (Traditional) Legacy","nativeName":"䏿–‡(ç¹é«”) 舊版"}}');function Bh(e){return Lh[e.toLowerCase()]}var Dh=function(e){var t,n,r;return null===(t=Bh(-1===(r=(n=e).indexOf("-"))?n:n.substring(0,r)))||void 0===t?void 0:t.englishName},Ah=function(e){var t;return null===(t=Bh(e))||void 0===t?void 0:t.englishName},Fh={ALLOWED_TAGS:["i","b","u","ruby","rt"]},zh=new Map,Vh={getLanguagesOptions:function(e){return e?e.map(function(t){return{label:e.length>1?Ah(t.language):Dh(t.language),value:t.language,id:t.id,url:t.src}}).sort(function(e,t){var n=e.value.includes(Uh)?1:0;return(t.value.includes(Uh)?1:0)-n}):[]},transformVtt:function(e){if(!e)return[];var t=[],n=new(Ch().WebVTT.Parser)(window,Ch().WebVTT.StringDecoder()),r=[];if(n.oncue=function(e){r.push(e)},n.onparsingerror=function(e){t.push(e)},n.parse(e),n.flush(),t.length>0){var i=t.map(function(e){return e.message}).join(", ");a.Q.Ry.throw(new Mh("Failed to parse WebVTT format: ".concat(i)))}return r},createTextTrackList:function(e,t){var n=document.createElement("video"),r=n.addTextTrack("subtitles",t?Dh(t):"English",t||"en-US");return e.forEach(function(e){r.addCue(e)}),n.textTracks},transformVttToTextTrackList:function(e,t,n){var r="".concat(n,"-").concat(t);if(zh.has(r))return zh.get(r);if(!e)return null;var i=Vh.transformVtt(e),o=Vh.createTextTrackList(i,t);return zh.set(r,o),o},sanitizeCueText:function(e){return(0,jh.sanitize)(e,Fh)}},Zh="transcript-selected-language",Uh="en";function Gh(e){var t,n;return(null===(t=e.find(function(e){return e.language.includes(Uh)}))||void 0===t?void 0:t.language)||(null===(n=e[0])||void 0===n?void 0:n.language)}var Kh=n(6620),qh=n(74097),Hh=n(75896);function Wh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Qh(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qh(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 Qh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Yh=/\n/g;n(32102);var $h=n(25005);function Jh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Xh=u.T.encloseNamespace("shared.copyContentIconButton");function ev(e){var t,n,r=(t=i.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Jh(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jh(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=r[0],a=r[1];return i.useEffect(function(){if(o){var e=window.setTimeout(function(){a(!1)},1e3);return function(){return window.clearTimeout(e)}}},[o]),i.createElement($h.u,{title:Xh(o?"copied":"copy"),spanHack:!0,spanHackClassName:e.tooltipClassName||""},i.createElement(nt.L,{"aria-label":"Copy to clipboard",className:e.visible?"QzREy":"_LaKg",onClick:function(t){t.stopPropagation(),navigator.clipboard.writeText(e.copyableContent).then(function(){var t;a(!0),null===(t=e.onClick)||void 0===t||t.call(e)})}},i.createElement(an.x,{svgName:un.vn.Copy,size:an.S.Small})))}var tv=n(37963);const nv={timePoint:"VOCS4",wide:"ewc3a",item:"sbTZM",inPlayer:"ZSsXf"};function rv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function iv(e){var t,n,r=e.currentTimePoint===e.timePoint,o=(t=(0,tv.X)(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return rv(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rv(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],u=o[1],l=bt.T.ToDisplayDuration(1e3*e.timePoint);return i.createElement("section",Object.assign({},e.isAuthenticated&&{role:"button"},{className:"d-flex p-2 align-items-center cursor-pointer rounded text-dark ".concat(e.inPlayer?nv.inPlayer:""," ").concat(e.isAuthenticated?"cursor-pointer":""," ").concat(nv.item," ").concat(r?"bg-gray-100":""),id:e.timePoint.toString(),onClick:function(){e.onClick(),Mt.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{cueIndex:e.cueIndex}),Object.assign(Object.assign({},e.analyticsOptions),{descriptor:Xe.XX.TranscriptTimepoint,actionType:Xe.Vw.Click}))},ref:a}),i.createElement("p",{className:"mb-0 d-flex flex-column align-items-center"},i.createElement("time",{dateTime:"PT".concat(e.timePoint,"S"),"aria-label":"time-stamp-".concat(l),className:"bg-light-blue text-info rounded-pill d-inline py-1 text-center ".concat(nv.timePoint," ").concat(e.wideTimeTag?nv.wide:""," ").concat(r?"bg-white":"")},l)),i.createElement("p",{className:"ms-3 w-100 mb-0"},e.nodes.map(function(t,n){var r=Vh.sanitizeCueText(t.text);return null===t.searchResultIndex?i.createElement("span",{key:n,dangerouslySetInnerHTML:{__html:r}}):i.createElement("mark",{className:"".concat(nv.mark," ").concat(t.searchResultIndex===e.currentSearchResultIndex?"bg-orange":"bg-yellow"),key:n,dangerouslySetInnerHTML:{__html:r}})})),i.createElement(ev,{copyableContent:e.transcript,visible:u,onClick:function(){Mt.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{cueIndex:e.cueIndex}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:Xe.Vw.Copy}))}}))}function ov(e){var t,n,r=e.cuesToDisplay.some(function(e){return e.startTime>=3600}),o=new Map;return e.chapters.forEach(function(t,n){var r=e.cuesToDisplay.findIndex(function(e){return e.startTime>t.startTime});o.set(r,n)}),i.createElement("article",{"aria-label":"transcript",className:"w-100 position-relative",style:{height:e.virtualizer.getTotalSize()}},i.createElement("div",{className:"w-100 position-absolute top-0 start-0",style:{transform:"translateY(".concat(null!==(n=null===(t=e.items[0])||void 0===t?void 0:t.start)&&void 0!==n?n:0,"px)")}},e.items.map(function(t){var n,a=t.index,u=e.cuesToDisplay[a],l=!1,c="";return o.has(a)&&(l=!0,c=e.chapters[o.get(a)].name),i.createElement("section",{className:e.inPlayer?"":"px-3",key:u.startTime,ref:e.virtualizer.measureElement,"data-index":a},l&&i.createElement("h3",{className:"".concat(0!==o.get(a)?"mt-2":""," my-2 h6 ").concat(e.inPlayer?"px-2":"")},i.createElement("span",null,c)),i.createElement(iv,{timePoint:u.startTime,transcript:u.text,nodes:u.nodes,onClick:function(){return e.onClickTranscriptionItem(u)},currentTimePoint:null===(n=e.timepoint)||void 0===n?void 0:n.startTime,currentSearchResultIndex:e.currentSearchResultIndex,wideTimeTag:!!r,inPlayer:e.inPlayer,analyticsOptions:e.analyticsOptions,analyticsData:e.analyticsData,cueIndex:a,isAuthenticated:e.isAuthenticated}))})))}var av=n(31453);function uv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var lv=u.T.encloseNamespace("playPage.transcriptSearchBar");function cv(e){var t,n,r=i.useRef(null),o=(t=i.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return uv(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uv(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],u=o[1];function l(t){Mt.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:t}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:Xe.Vw.Search,descriptor:t?Xe.uG.SearchTranscript:Xe.uG.ResetResults}))}var c=i.useCallback(It.q.debounce(function(e){return l(e)},500),[]);function s(){Mt.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:e.query}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:Xe.Vw.Search,descriptor:Xe.uG.NextResult})),e.currentSearchResultIndex===e.totalSearchResults-1?e.jumpToSearchResult(0):e.jumpToSearchResult(e.currentSearchResultIndex+1)}function f(){Mt.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:e.query}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:Xe.Vw.Search,descriptor:Xe.uG.PreviousResult})),0===e.currentSearchResultIndex?e.jumpToSearchResult(e.totalSearchResults-1):e.jumpToSearchResult(e.currentSearchResultIndex-1)}function p(e){var t;e.keepFocus||null===(t=r.current)||void 0===t||t.focus(),s()}function y(e){var t;e.keepFocus||null===(t=r.current)||void 0===t||t.focus(),f()}function h(e){u("focus"===e)}return i.createElement("div",{className:(0,av.A)("form-control py-0 px-1 d-flex align-items-center",a?"KFd6d":"QBjyt","XfIEh"),onClick:function(){var e;return null===(e=r.current)||void 0===e?void 0:e.focus()},role:"search"},i.createElement("div",{"aria-hidden":"true"},i.createElement(an.x,{svgName:un.vn.Search})),i.createElement("input",{className:"form-control border-0 px-1 ".concat("MAoRJ"),value:e.query,onChange:function(t){c(t.target.value),e.onSearch(t.target.value)},autoComplete:"off",placeholder:lv("searchPlaceholder"),ref:r,onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),e.shiftKey?f():s())},onFocus:function(){return h("focus")},onBlur:function(){return h("blur")}}),!!e.query&&i.createElement("div",{className:"d-flex align-items-center"},i.createElement("div",null,e.totalSearchResults?"".concat(e.currentSearchResultIndex+1,"/").concat(e.totalSearchResults):"0/0"),i.createElement(nt.L,{"aria-label":lv("previousResult"),onClick:function(){return y({keepFocus:!1})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||y({keepFocus:!0})}},i.createElement(an.x,{svgName:un.vn.ChevronUp})),i.createElement(nt.L,{"aria-label":lv("nextResult"),onClick:function(){return p({keepFocus:!1})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||p({keepFocus:!0})}},i.createElement(an.x,{svgName:un.vn.ChevronDown})),i.createElement(nt.L,{"aria-label":lv("clearSearch"),onClick:function(){var t;l(""),null===(t=r.current)||void 0===t||t.focus(),e.onSearch("")}},i.createElement(an.x,{svgName:un.vn.Close}))))}var sv,fv,pv=n(69883),yv=(n(79967),n(74237));n(62400),(fv=sv||(sv={})).Resources="resources",fv.Interactives="interactives",fv.Video="video",fv.Clips="clips",fv.CurriculumLinks="curriculum-links",fv.VideoDetails="video-details",fv.RelatedVideos="related-videos",fv.ClippedFrom="clipped-from",fv.Transcript="transcript",u.T.encloseNamespace("shared.playPageTranscription");var hv=n(8935);const vv={languageSelect:"rHbhp",inputWithoutHighlight:"nJvbl"};function dv(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return mv(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(mv(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,mv(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,mv(f,"constructor",c),mv(c,"constructor",l),l.displayName="GeneratorFunction",mv(c,i,"GeneratorFunction"),mv(f),mv(f,i,"Generator"),mv(f,r,function(){return this}),mv(f,"toString",function(){return"[object Generator]"}),(dv=function(){return{w:o,m:p}})()}function mv(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}mv=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){mv(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},mv(e,t,n,r)}function bv(e){var t,n,r=null===(t=e.languageOptions[0])||void 0===t?void 0:t.label,o=e.track.src,a=(0,pv.Z)();return i.createElement("div",{className:"d-flex px-1 mb-3"},i.createElement(cv,{query:e.searchQuery,currentSearchResultIndex:e.currentSearchResultIndex,onSearch:e.onSearch,totalSearchResults:e.totalSearchResults,jumpToSearchResult:e.jumpToSearchResult,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions}),i.createElement($h.u,{spanHack:!0,title:e.languageOptions.length>1?"":"Only available in ".concat(r)},i.createElement(hv.Z,null,i.createElement(hv.Z.Toggle,{className:"text-dark ".concat(vv.languageSelect),id:"language-select",disabled:(null===(n=e.languageOptions)||void 0===n?void 0:n.length)<=1,variant:"outline-dark"},i.createElement(an.x,{svgName:un.vn.Globe})),i.createElement(hv.Z.Menu,{className:vv.menu,"aria-labelledby":"language-select"},e.languageOptions.map(function(t,n){return i.createElement(hv.Z.Item,{key:n,onClick:function(){var n;null===(n=e.onChangeLanguage)||void 0===n||n.call(e,t.value),Mt.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{language:t.value,previousLanguageName:e.selectedLanguage}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:Xe.Vw.Select}))},className:"cursor-pointer",active:t.value===e.selectedLanguage},t.label)})))),i.createElement(qh.h,{svgName:un.vn.Download,onClick:function(){return t=this,n=void 0,r=void 0,i=dv().m(function t(){return dv().w(function(t){for(;;)switch(t.n){case 0:return Mt.k.logUserAction(e.analyticsData,Object.assign(Object.assign({},e.analyticsOptions),{actionType:Xe.Vw.Download})),t.p=1,t.n=2,yv.T.downloadBlob(o,"Subtitles-".concat(e.selectedLanguage,".vtt"));case 2:t.n=4;break;case 3:t.p=3,t.v,a.error("Error downloading transcript");case 4:return t.a(2)}},t,null,[[1,3]])}),new(r||(r=Promise))(function(e,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function u(e){try{l(i.throw(e))}catch(e){o(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r(function(e){e(n)})).then(a,u)}l((i=i.apply(t,n||[])).next())});var t,n,r,i},className:"position-relative d-flex align-items-center text-dark"}))}var gv=n(44645);function wv(e){return wv="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},wv(e)}function Ov(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Pv(r.key),r)}}function kv(e,t,n){return t&&Sv(e.prototype,t),n&&Sv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pv(e){var t=function(e){if("object"!=wv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wv(t)?t:t+""}function jv(e,t,n){return t=Tv(t),function(e,t){if(t&&("object"==wv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Nv()?Reflect.construct(t,n||[],Tv(e).constructor):t.apply(e,n))}function Nv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Nv=function(){return!!e})()}function Cv(){return Cv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Tv(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}},Cv.apply(null,arguments)}function Tv(e){return Tv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tv(e)}function Ev(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)}function _v(e,t){return _v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_v(e,t)}var Rv=function(e){function t(e,n){return Ov(this,t),jv(this,t,[e,n])}return Ev(t,e),kv(t,[{key:"dispose",value:function(){var e,n,r,i=this;setImmediate(function(){var e;null===(e=i.root)||void 0===e||e.unmount()}),(e=t,n=this,"function"==typeof(r=Cv(Tv(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}])}(Nn.Z.getComponent("Component")),Iv={tagName:"div"};function xv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Iv;if(!e)throw new Error("componentCtor is required");var n=function(n){function r(){return Ov(this,r),jv(this,r,arguments)}return Ev(r,n),kv(r,[{key:"createEl",value:function(){var n=Nn.Z.dom.createEl(t.tagName,t.properties,t.attributes),r=(0,gv.s)(n);return r.render(e(this.player_,this.options_)),this.root=r,n}}])}(Rv);return n}function Mv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Lv(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lv(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 Lv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Bv(e){var t=yo(Zh)||Gh(e.allTracks),n=i.useState(function(){return e.allTracks.find(function(e){return e.language===t})||e.allTracks.find(function(t){return t.language===Gh(e.allTracks)})}),r=Mv(n,2),o=r[0],a=r[1],u=Mv(i.useState(t),2),l=u[0],c=u[1],s=Mv(i.useState(-1),2),f=s[0],p=s[1],y=Mv(i.useState(!0),2),h=y[0],v=y[1],d=Mv(i.useState([]),2),m=d[0],b=d[1],g=i.useMemo(function(){return Array.from((null==o?void 0:o.cues)||[])},[l]),w={videoId:e.playbackObject.videoId,videoName:e.playbackObject.title,language:l},O={location:Xe.LZ.Player,entity:Xe.py.Transcript},S=e.player.hasStarted();!function(e){function t(t){var n=Array.from((null==t?void 0:t.activeCues)||[]);if(n.length){var r=e.cuesToDisplay.findIndex(function(e){return e.startTime===Hh.m.last(n).startTime});-1!==r?e.setCurrentCueIndex(r):e.setCurrentCueIndex(null)}}function n(){t(e.currentTranscriptTrack)}i.useEffect(function(){e.hasStarted&&t(e.currentTranscriptTrack)},[e.hasStarted]),i.useEffect(function(){return e.currentTranscriptTrack&&e.currentTranscriptTrack.addEventListener("cuechange",n),function(){var t;return null===(t=e.currentTranscriptTrack)||void 0===t?void 0:t.removeEventListener("cuechange",n)}},[e.currentTranscriptTrack])}({currentTranscriptTrack:o,cuesToDisplay:g,setCurrentCueIndex:p,hasStarted:S});var k=i.useRef(),P=(0,Kh.MG)({count:m.length,getScrollElement:function(){var e;return null===(e=k.current)||void 0===e?void 0:e.view},estimateSize:function(){return 40},enabled:m.length>0}),j=P.getVirtualItems(),N=function(e,t,n){function r(e){n&&n.scrollToIndex(e,{align:"start"})}return i.useEffect(function(){t&&"number"==typeof e&&r(e)},[e,t,n]),r}(f,h,P),C=function(e){var t=e.cuesToDisplay,n=e.resetHighlightedCues,r=e.setHighlightedCues,o=e.scrollToCue,a=Wh(i.useState(""),2),u=a[0],l=a[1],c=Wh(i.useState(null),2),s=c[0],f=c[1],p=Wh(i.useState(0),2),y=p[0],h=p[1],v=Wh(i.useTransition(),2)[1];return{isSearching:null!==s,searchQuery:u,onSearch:function(e){l(e),0!==y&&h(0),v(function(){!function(e){if(!e.length)return f(null),void n();var i=new RegExp(e.replace(Yh," "),"gi"),a=[],u=0,l=t.map(function(e,t){var n=e.text,r=n.replace(Yh," ").matchAll(i);if(0===r.length)return Object.assign(e,{nodes:[{text:n,searchResultIndex:null}]});var o=[],l=0;return r.forEach(function(e,r){var i=e[0],c=e.index;c>l&&o.push({text:n.substring(l,c),searchResultIndex:null}),o.push({text:i,searchResultIndex:u}),u++,a.push({cueIndex:t,cueMatchIndex:r}),l=c+i.length}),l<n.length&&o.push({text:n.substring(l),searchResultIndex:null}),Object.assign(e,{nodes:o})});f(a),r(l),a.length&&o(a[0].cueIndex)}(e)})},jumpToSearchResult:function(e){var t=s[e];t&&(h(e),o(t.cueIndex))},totalSearchResults:null==s?void 0:s.length,currentSearchResultIndex:y,resetSearchResults:function(){f(null),l(""),h(0),n()}}}({cuesToDisplay:g,resetHighlightedCues:F,setHighlightedCues:b,scrollToCue:N}),T=C.isSearching,E=C.searchQuery,_=C.totalSearchResults,R=C.jumpToSearchResult,I=C.onSearch,x=C.currentSearchResultIndex,M=C.resetSearchResults,L=e.player.paused(),B=Mv((0,tv.X)(),2),D=B[0],A=B[1];function F(){b(g.map(function(e){return Object.assign(e,{nodes:[{text:e.text,searchResultIndex:null}]})}))}return i.useEffect(function(){v(!A&&!T&&S&&!L)},[A,T,S,L]),i.useEffect(function(){F()},[g]),o&&g.length?i.createElement("div",{ref:D,className:"cv-transcript py-3 px-2 ".concat(e.showTranscript?"cv-open":"")},i.createElement("div",{className:"text-dark d-flex justify-content-between px-1"},i.createElement("h3",null,"Transcript"),i.createElement(qh.h,{svgName:un.vn.Close,onClick:function(){e.toggleTranscript(!1)},ariaLabel:"Close transcript"})),i.createElement(bv,{selectedLanguage:l,languageOptions:e.languageOptions,onChangeLanguage:function(t){a(e.allTracks.find(function(e){return e.language===t})),c(t),ho(Zh,t),M()},track:o,onSearch:I,searchQuery:E,currentSearchResultIndex:x,totalSearchResults:_,jumpToSearchResult:R,analyticsData:w,analyticsOptions:O}),i.createElement("div",{className:"cv-transcript-list-wrapper text-dark"},i.createElement(Tt.ZP,{ref:k},i.createElement(ov,{timepoint:g[f],onClickTranscriptionItem:function(t){var n;null===(n=e.setStartTime)||void 0===n||n.call(e,t.startTime)},cuesToDisplay:m,chapters:e.chapters,currentSearchResultIndex:x,inPlayer:!0,virtualizer:P,items:j,analyticsOptions:O,analyticsData:w,isAuthenticated:!1})))):i.createElement(i.Fragment,null)}function Dv(e){return Dv="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},Dv(e)}function Av(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,Fv(r.key),r)}}function Fv(e){var t=function(e){if("object"!=Dv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dv(t)?t:t+""}function zv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zv=function(){return!!e})()}function Vv(){return Vv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Zv(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}},Vv.apply(null,arguments)}function Zv(e){return Zv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zv(e)}function Uv(e,t){return Uv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uv(e,t)}Nn.Z.registerComponent("Transcript",xv(function(e,t){return i.createElement(Bv,Object.assign({player:e},t))}));var Gv=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Zv(t),function(e,t){if(t&&("object"==Dv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,zv()?Reflect.construct(t,n||[],Zv(e).constructor):t.apply(e,n))}(this,t,[e])).allClickViewTracks=[],n.player=e,n.bindListeners(),e.ready(function(){return n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uv(e,t)}(t,e),n=t,r=[{key:"bindListeners",value:function(){var e=this;this.onResize=this.onResize.bind(this),mr.useMetadataTracks(this.player,"transcript",function(){return e.player.trigger("resizemenus")}),this.player.on("playerresize",this.onResize)}},{key:"dispose",value:function(){var e,n,r;this.player.off("playerresize",this.onResize),(e=t,n=this,"function"==typeof(r=Vv(Zv(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"initialize",value:function(){mr.useMetadataTracks(this.player,"transcript",this.onTranscriptLoaded.bind(this)),mr.useChapters(this.player,this.onChaptersLoaded.bind(this))}},{key:"onChaptersLoaded",value:function(e){this.chapterTrack=e}},{key:"onTranscriptLoaded",value:function(e){var t=e.isClickViewProduced;!this.allClickViewTracks.find(function(t){return t.language===e.language})&&t&&this.allClickViewTracks.push(e),this.languageOptions=this.buildOptions(this.allClickViewTracks)}},{key:"buildOptions",value:function(e){return e.map(function(e){return{label:Ah(e.language),value:e.language}}).sort(function(e,t){var n=e.value.includes(Uh)?1:0;return(t.value.includes(Uh)?1:0)-n})}},{key:"buildComponentProps",value:function(e,t,n){var r,i=Array.from((null===(r=this.chapterTrack)||void 0===r?void 0:r.cues)||[]).map(function(e){return{endTimestamp:e.endTime,startTime:e.startTime,name:e.text}});return{showTranscript:e,languageOptions:this.languageOptions,toggleTranscript:function(e){return t(e,{shouldLog:!0})},allTracks:this.allClickViewTracks,setStartTime:n,chapters:i,playbackObject:this.playbackObject}}},{key:"addChildren",value:function(e){if(this.component)return this.component.show(),this.component;var t=this.toggleTranscript.bind(this),n=this.setStartTime.bind(this),r=this.buildComponentProps(e,t,n);this.component=this.player.addChild("Transcript",r)}},{key:"toggleTranscript",value:function(e,t){var n,r,i,o=void 0!==e?e:!this.showTranscript;this.showTranscript=o,o?(null===(n=this.player.theatreModePlugin())||void 0===n||n.toggleTheatreMode(!0,{shouldLog:!1}),this.addChildren(!0),this.player.addClass("cv-transcript-plugin")):(null===(r=this.component)||void 0===r||r.hide(),this.player.removeClass("cv-transcript-plugin")),this.player.whiteboardModePlugin&&this.player.whiteboardModePlugin().setEnabled(!o),this.player.trigger("cv-transcript-toggle",o),this.player.trigger("resizemenus"),this.player.trigger("playerresize"),(null==t?void 0:t.shouldLog)&&(null===(i=this.analyticsService)||void 0===i||i.logUserAction({videoId:this.playbackObject.videoId,videoName:this.playbackObject.title},{actionType:Xe.Vw.Click,descriptor:o?Xe.UX.ShowTranscript:Xe.UX.HideTranscript,entity:Xe.py.Transcript}))}},{key:"setStartTime",value:function(e){this.player.currentTime(e)}},{key:"isTranscriptOn",value:function(){return!!this.showTranscript}},{key:"onResize",value:function(){window.innerWidth<992?this.player.addClass("hide-transcript"):this.showTranscript&&this.player.removeClass("hide-transcript")}},{key:"registerAnalytics",value:function(e,t){this.analyticsService=e,this.playbackObject=t}}],r&&Av(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function Kv(e){return Kv="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},Kv(e)}function qv(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,Hv(r.key),r)}}function Hv(e){var t=function(e){if("object"!=Kv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kv(t)?t:t+""}function Wv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wv=function(){return!!e})()}function Qv(e){return Qv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qv(e)}function Yv(e,t){return Yv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yv(e,t)}Nn.Z.registerPlugin("viewTranscriptPlugin",Gv);var $v=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};return r.track={player:e,kind:"subtitle",label:"Video Transcript",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="TranscriptMenuItem",(n=function(e,t,n){return t=Qv(t),function(e,t){if(t&&("object"==Kv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wv()?Reflect.construct(t,n||[],Qv(e).constructor):t.apply(e,n))}(this,t,[e,r])).transcriptOn=n.player_.viewTranscriptPlugin&&n.player_.viewTranscriptPlugin().isTranscriptOn(),n.bindEventListeners(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yv(e,t)}(t,e),n=t,(r=[{key:"bindEventListeners",value:function(){var e=this,t=this.toggleListener.bind(this),n=this.onResize.bind(this);this.player_.on("cv-transcript-toggle",t),this.player_.on("playerresize",n),this.on("dispose",function(){e.player_.off("cv-transcript-toggle",t),e.player_.off("playerresize",n)})}},{key:"onResize",value:function(){var e=window.innerWidth<992;this.item&&(this.item.style.display=e?"none":"block")}},{key:"handleToggleListener",value:function(){this.transcriptOn?this.toggleOff():this.toggleOn()}},{key:"toggleListener",value:function(e,t){var n,r;t?(this.transcriptOn=!0,Nn.Z.dom.addClass(this.toggleEl,"on")):(this.transcriptOn=!1,null===(r=(n=Nn.Z.dom).removeClass)||void 0===r||r.call(n,this.toggleEl,"on"))}},{key:"toggleOn",value:function(){var e,t;this.transcriptOn=!0,Nn.Z.dom.addClass(this.toggleEl,"on"),this.player_.viewTranscriptPlugin&&(null===(t=null===(e=this.player_.viewTranscriptPlugin())||void 0===e?void 0:e.toggleTranscript)||void 0===t||t.call(e,!0,{shouldLog:!0})),this.player_.whiteboardModePlugin&&this.player_.whiteboardModePlugin().setEnabled(!1)}},{key:"toggleOff",value:function(){var e,t,n,r;this.transcriptOn=!1,null===(t=(e=Nn.Z.dom).removeClass)||void 0===t||t.call(e,this.toggleEl,"on"),this.player_.viewTranscriptPlugin&&(null===(r=null===(n=this.player_.viewTranscriptPlugin())||void 0===n?void 0:n.toggleTranscript)||void 0===r||r.call(n,!1,{shouldLog:!0}))}},{key:"createEl",value:function(e,t,n){return this.handlerBound||(this.handleToggleListener=this.handleToggleListener.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggleListener),this.toggleEl=Nn.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggleListener),this.item=Nn.Z.dom.createEl("li",{className:"vjs-menu-item cv-transcript-toggle",innerHTML:'\n <span class="vjs-menu-item-text">Video Transcript</span>\n <span class="cv-toggle-container"></span>\n <span class="vjs-control-text" aria-live="polite">, opens transcript</span>\n ',tabIndex:-1},n),this.item.children[1].appendChild(this.toggleEl),this.item}}])&&qv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("TextTrackMenuItem"));function Jv(e){return Jv="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},Jv(e)}function Xv(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,ed(r.key),r)}}function ed(e){var t=function(e){if("object"!=Jv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Jv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jv(t)?t:t+""}function td(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(td=function(){return!!e})()}function nd(){return nd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=rd(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}},nd.apply(null,arguments)}function rd(e){return rd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rd(e)}function id(e,t){return id=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},id(e,t)}Nn.Z.registerComponent("ToggleTranscriptMenuItem",$v);var od=Nn.Z.getComponent("TextTrackButton"),ad=Nn.Z.getComponent("SubsCapsButton"),ud=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=rd(t),function(e,t){if(t&&("object"==Jv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,td()?Reflect.construct(t,n||[],rd(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-subs-caps-menu-button",r.onSelectedLanguageChange=r.onSelectedLanguageChange.bind(r),r.player_.on("cv:languageselected",r.onSelectedLanguageChange),r.player_.one("dispose",function(){return r.player_.off("cv:languageselected",r.onSelectedLanguageChange)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&id(e,t)}(t,e),n=t,r=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=nd(rd(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"createItems",value:function(){var e=[];if(!this.player_.options_.mobile){var t=this.player().textTracks(),n=Array.from(t||[]).some(function(e){return"subtitles"===e.kind});this.player_.options_.allowTranscript&&!!n&&this.player_.viewTranscriptPlugin&&e.push(new $v(this.player_)),this.player_.options_.allowTranscript||e.push(new mh(this.player_)),e.push(new Ph(this.player_)),this.hideThreshold_=e.length}return this.player().trigger("resizemenus"),od.prototype.createItems.call(this,e,sh)}},{key:"onSelectedLanguageChange",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if("subtitles"===n.kind&&"showing"===n.mode)return void this.setActive(!0)}this.setActive(!1)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){ad.prototype.handleClick.apply(this)}}],r&&Xv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ad);function ld(e){return ld="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},ld(e)}function cd(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return sd(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(sd(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,sd(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,sd(f,"constructor",c),sd(c,"constructor",l),l.displayName="GeneratorFunction",sd(c,i,"GeneratorFunction"),sd(f),sd(f,i,"Generator"),sd(f,r,function(){return this}),sd(f,"toString",function(){return"[object Generator]"}),(cd=function(){return{w:o,m:p}})()}function sd(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}sd=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){sd(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},sd(e,t,n,r)}function fd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pd(r.key),r)}}function pd(e){var t=function(e){if("object"!=ld(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ld(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ld(t)?t:t+""}function yd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yd=function(){return!!e})()}function hd(e){return hd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hd(e)}function vd(e,t){return vd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vd(e,t)}Nn.Z.registerComponent("SubsCapsButton",ud);var dd="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(ou,"</span>"),md=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=hd(t),function(e,t){if(t&&("object"==ld(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,yd()?Reflect.construct(t,n||[],hd(e).constructor):t.apply(e,n))}(this,t,[e,n])).qualityId=n.qualityId;var i=e.qualityLevels(),o=r.handleQualityChange.bind(r);return i.on("change",o),e.one("dispose",function(){i.off("change",o)}),r.handleLocalCacheChange=r.handleLocalCacheChange.bind(r),r.player_.ready(function(){r.player_&&(r.player_.on("localcachechanged",r.handleLocalCacheChange),r.player_.one("dispose",function(){var e;null===(e=r.player_)||void 0===e||e.off("localcachechanged",r.handleLocalCacheChange)}),r.handleLocalCacheChange())}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vd(e,t)}(t,e),n=t,(r=[{key:"handleLocalCacheChange",value:function(){return e=this,t=void 0,n=void 0,r=cd().m(function e(){var t,n;return cd().w(function(e){for(;;)switch(e.n){case 0:return t=this.player_.localCache(),e.n=1,t.getActiveLocalCache();case 1:if(null==(n=e.v)?void 0:n.playbackProfile){e.n=2;break}return this.show(),this.enable(),this.setLabel(this.options_.label),e.a(2);case 2:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+dd);case 3:return e.a(2)}},e,this)}),new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())});var e,t,n,r}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var e=this.player_.qualityLevels(),t=0;t<e.length;t++){var n=e[t];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var e=this.player_.qualityLevels(),t=e[e.selectedIndex],n=t&&t.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&fd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("MenuItem"));function bd(e){return bd="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},bd(e)}function gd(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,wd(r.key),r)}}function wd(e){var t=function(e){if("object"!=bd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bd(t)?t:t+""}function Od(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Od=function(){return!!e})()}function Sd(e,t,n,r){var i=kd(Pd(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function kd(){return kd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Pd(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},kd.apply(null,arguments)}function Pd(e){return Pd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pd(e)}function jd(e,t){return jd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jd(e,t)}var Nd={144:"144p (Preview)",240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},Cd=Nn.Z.getComponent("MenuButton"),Td=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Pd(t),function(e,t){if(t&&("object"==bd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Od()?Reflect.construct(t,n||[],Pd(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-quality-menu-button";var i=r.player_.qualityLevels(),o=r.update.bind(r);return i.on("addqualitylevel",o),i.on("removequalitylevel",o),e.one("dispose",function(){i.removeEventListener("addqualitylevel",o),i.removeEventListener("removequalitylevel",o)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jd(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Sd(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(Sd(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var e=[],t=this.player_.qualityLevels();e.push(new Qn(this.player_,{label:"Quality"}));for(var n=0;n<t.length;n++){var r=t[n];if(r){var i=Nd[r.id];i&&e.push(new md(this.player_,{qualityId:r.id,label:i,selectable:!0,multiSelectable:!1}))}}return e}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.qualityLevels(),t=e[e.selectedIndex];return t?Nd[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){Cd.prototype.handleClick.apply(this)}}])&&gd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Cd);function Ed(e){return Ed="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},Ed(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,Rd(r.key),r)}}function Rd(e){var t=function(e){if("object"!=Ed(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ed(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ed(t)?t:t+""}function Id(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Id=function(){return!!e})()}function xd(){return xd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Md(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}},xd.apply(null,arguments)}function Md(e){return Md=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Md(e)}function Ld(e,t){return Ld=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ld(e,t)}Nn.Z.registerComponent("QualityButton",Td);var Bd=Nn.Z.getComponent("Menu"),Dd=Nn.Z.getComponent("MenuButton"),Ad=Nn.Z.getComponent("PlaybackRateMenuItem"),Fd=Nn.Z.getComponent("PlaybackRateMenuButton"),zd=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Md(t),function(e,t){if(t&&("object"==Ed(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Id()?Reflect.construct(t,n||[],Md(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e.className="cv-playback-rate-menu-button",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ld(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=Dd.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=xd(Md(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"createMenu",value:function(){var e=new Bd(this.player(),{menuButton:this});e.addItem(new Qn(this.player_,{label:"Playback speed"}));var t=this.playbackRates();if(t)for(var n=0;n<t.length;n++){var r=t[n]+"x";1===t[n]&&(r+=" (Normal)"),e.addItem(new Ad(this.player(),{rate:r}))}return e}},{key:"handleClick",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=Dd.prototype.handleClick).apply.apply(e,[this].concat(n))}},{key:"updateLabel",value:function(){var e;this.setupLabelEl();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=Fd.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=Nn.Z.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}],r&&_d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Fd);function Vd(e){return Vd="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},Vd(e)}function Zd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ud(r.key),r)}}function Ud(e){var t=function(e){if("object"!=Vd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vd(t)?t:t+""}function Gd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gd=function(){return!!e})()}function Kd(e){return Kd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kd(e)}function qd(e,t){return qd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qd(e,t)}Nn.Z.registerComponent("PlaybackRateMenuButton",zd);var Hd=Nn.Z.getComponent("TextTrackSettings"),Wd={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},Qd={small:Wd,medium:Object.assign(Object.assign({},Wd),{fontPercent:1.5}),large:Object.assign(Object.assign({},Wd),{fontPercent:2})},Yd=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Kd(t),function(e,t){if(t&&("object"==Vd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Gd()?Reflect.construct(t,n||[],Kd(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qd(e,t)}(t,e),n=t,(r=[{key:"setSizeSetting",value:function(e){var t=this;this.size_=e,this.player_.getChild("textTrackDisplay").updateDisplay();var n=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame(function(){n.update(),t.player_.trigger("resizemenus")})}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return Qd[this.size_]?Qd[this.size_]:Wd}}])&&Zd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Hd);function $d(e){return $d="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},$d(e)}function Jd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xd(r.key),r)}}function Xd(e){var t=function(e){if("object"!=$d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$d(t)?t:t+""}function em(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(em=function(){return!!e})()}function tm(e,t,n,r){var i=nm(rm(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function nm(){return nm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=rm(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}},nm.apply(null,arguments)}function rm(e){return rm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rm(e)}function im(e,t){return im=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},im(e,t)}Nn.Z.registerComponent("TextTrackSettings",Yd);var om=window.navigator&&window.navigator.userAgent||"",am=(/iPod/i.test(om),/Android/i.test(om),Nn.Z.getComponent("Player")),um=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=rm(t),function(e,t){if(t&&("object"==$d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,em()?Reflect.construct(t,n||[],rm(e).constructor):t.apply(e,n))}(this,t,[e,n]))._dataLoaded=!1,n.mobile&&r.addClass("cv-mobile-player");var i=function(){return r._dataLoaded=!0};return r.on("cv-playback-data-loaded",i),r.on("dispose",function(){return r.off("cv-playback-data-loaded",i)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&im(e,t)}(t,e),n=t,r=[{key:"dataLoaded",value:function(e){var t=this;this._dataLoaded?e():(this.one("cv-playback-data-loaded",e),this.one("dispose",function(){t.off("cv-playback-data-loaded",e)}))}},{key:"lock",value:function(e){this.callback_=e}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(e,n){var r=this;if("number"!=typeof e||!this.callback_||n)return tm(t,"currentTime",this,3)([e]);this.callback_(function(){r.unlock(),r.currentTime(e)})}},{key:"play",value:function(){var e=this;if(!this.callback_)return tm(t,"play",this,3)([]);this.callback_(function(){e.unlock(),e.play()})}},{key:"createEl",value:function(){var e=this,n=tm(t,"createEl",this,3)([]);return this.videoContainer||(this.videoContainer=Nn.Z.dom.createEl("div",{className:"cv-video-wrapper"}),n.appendChild(this.videoContainer)),Array.from(n.childNodes).forEach(function(t){return t!==e.videoContainer&&e.videoContainer.appendChild(t)}),n}},{key:"addChild",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,i=tm(t,"addChild",this,3)([e,n,r]),o=i.el();return o&&this.videoContainer.appendChild(o),i}},{key:"updateStyleEl_",value:function(){if(am.prototype.updateStyleEl_.call(this),this.options_.fluid){var e=this.el_.parentNode;if(e&&this.options_.setMaxHeight){var t=this.aspectRatio();if(void 0!==t&&"auto"!==t||(t=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9"),this.player_.playerModePlugin().getMode()===ls.Hover)return e.style.removeProperty("maxWidth"),void e.style.removeProperty("margin");var n=t.split(":"),r=+n[1]/+n[0];e.style.maxWidth=85/r+"vh",e.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var e=this;am.prototype.listenForUserActivity_.call(this);var t=this.getChild("collapserator");t.on("mouseenter",function(){e.player().cache_.inactivityTimeout=e.player().options_.inactivityTimeout,e.player().options_.inactivityTimeout=0}),t.on("mouseleave",function(){e.player().options_.inactivityTimeout=e.player().cache_.inactivityTimeout})}}],r&&Jd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(am);function lm(e){return lm="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},lm(e)}function cm(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,sm(r.key),r)}}function sm(e){var t=function(e){if("object"!=lm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=lm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lm(t)?t:t+""}function fm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(fm=function(){return!!e})()}function pm(e){return pm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pm(e)}function ym(e,t){return ym=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ym(e,t)}um.prototype.options_=Object.assign(Object.assign({},am.prototype.options_),{setMaxHeight:!0}),Nn.Z.registerComponent("player",um);var hm=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=pm(t),function(e,t){if(t&&("object"==lm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fm()?Reflect.construct(t,n||[],pm(e).constructor):t.apply(e,n))}(this,t,[e,n])).player_.addClass("cv-disable-play-pause-feedback"),r.onFirstPlay=r.onFirstPlay.bind(r),r.player_.one("play",r.onFirstPlay),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ym(e,t)}(t,e),n=t,(r=[{key:"dispose",value:function(){this.player_.off("play",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var e=this;window.setTimeout(function(){e.player_.isDisposed()||e.player_.removeClass("cv-disable-play-pause-feedback")},500)}},{key:"createEl",value:function(){return Nn.Z.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&cm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function vm(e){return vm="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},vm(e)}function dm(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,mm(r.key),r)}}function mm(e){var t=function(e){if("object"!=vm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vm(t)?t:t+""}function bm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(bm=function(){return!!e})()}function gm(e){return gm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gm(e)}function wm(e,t){return wm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wm(e,t)}Nn.Z.registerComponent("PlayPauseFeedback",hm);var Om=Nn.Z.getComponent("PlayToggle"),Sm="Play (space)",km=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=gm(t),function(e,t){if(t&&("object"==vm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,bm()?Reflect.construct(t,n||[],gm(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wm(e,t)}(t,e),n=t,(r=[{key:"handlePlay",value:function(){Om.prototype.handlePlay.call(this),this.controlText("Pause (space)")}},{key:"handlePause",value:function(){Om.prototype.handlePause.call(this),this.controlText(Sm)}},{key:"handleClick",value:function(e){var t=this;Om.prototype.handleClick.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(function(){t.player_.removeClass("cv-disable-play-pause-feedback")},500)}}])&&dm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Om);function Pm(e){return Pm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pm(e)}function jm(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,Nm(r.key),r)}}function Nm(e){var t=function(e){if("object"!=Pm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pm(t)?t:t+""}function Cm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Cm=function(){return!!e})()}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tm(e)}function Em(e,t){return Em=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Em(e,t)}Nn.Z.registerComponent("PlayToggle",km),km.prototype.controlText_=Sm;var _m=Nn.Z.getComponent("TextTrackDisplay"),Rm=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Tm(t),function(e,t){if(t&&("object"==Pm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Cm()?Reflect.construct(t,n||[],Tm(e).constructor):t.apply(e,n))}(this,t,[e,n])).bindListeners(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Em(e,t)}(t,e),n=t,(r=[{key:"bindListeners",value:function(){this.onResize=this.onResize.bind(this),this.player_.on("resize",this.onResize)}},{key:"onResize",value:function(){this.updateDisplay()}},{key:"updateDisplayState",value:function(e){_m.prototype.updateDisplayState.call(this,e);for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var i=n[r];if(i){var o=i.displayState;if(t.fontPercent&&1!==t.fontPercent){var a=.025*this.el().getBoundingClientRect().width*100/100;o.style.fontSize=a*t.fontPercent+"px"}}}}}])&&jm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(_m);function Im(e){return Im="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},Im(e)}function xm(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,Mm(r.key),r)}}function Mm(e){var t=function(e){if("object"!=Im(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Im(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Im(t)?t:t+""}function Lm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Lm=function(){return!!e})()}function Bm(e){return Bm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bm(e)}function Dm(e,t){return Dm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dm(e,t)}Nn.Z.registerComponent("TextTrackDisplay",Rm);var Am=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Bm(t),function(e,t){if(t&&("object"==Im(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Lm()?Reflect.construct(t,n||[],Bm(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dm(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return Nn.Z.dom.createEl("div",{className:"cv-control-bar-gradient-container",innerHTML:'<div class="cv-control-bar-gradient"></div>'})}}])&&xm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function Fm(e){return Fm="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},Fm(e)}function zm(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,Vm(r.key),r)}}function Vm(e){var t=function(e){if("object"!=Fm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fm(t)?t:t+""}function Zm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zm=function(){return!!e})()}function Um(e,t,n,r){var i=Gm(Km(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Gm(){return Gm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Km(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}},Gm.apply(null,arguments)}function Km(e){return Km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Km(e)}function qm(e,t){return qm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qm(e,t)}Nn.Z.registerComponent("ControlBarGradient",Am);var Hm=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Km(t),function(e,t){if(t&&("object"==Fm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Zm()?Reflect.construct(t,n||[],Km(e).constructor):t.apply(e,n))}(this,t,[e,n])).options_=n,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qm(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e=this.options_.title;if(!this.options_.seriesName)return Um(t,"createEl",this,3)(["h1",{innerHTML:e}]);var n=this.buildSeasonEpisodeString();return n?(e="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase()," ").concat(n,"</div>")+e,Um(t,"createEl",this,3)(["h1",{innerHTML:e}])):(e="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+e,Um(t,"createEl",this,3)(["h1",{innerHTML:e}]))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var e=this.padNumber(this.options_.seasonNumber,2),t=this.padNumber(this.options_.episodeNumber,2);return"S".concat(e," • E").concat(t)}},{key:"padNumber",value:function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}}])&&zm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function Wm(e){return Wm="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},Wm(e)}function Qm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ym(r.key),r)}}function Ym(e){var t=function(e){if("object"!=Wm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Wm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wm(t)?t:t+""}function $m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($m=function(){return!!e})()}function Jm(){return Jm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Xm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Jm.apply(null,arguments)}function Xm(e){return Xm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xm(e)}function eb(e,t){return eb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},eb(e,t)}var tb=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Xm(t),function(e,t){if(t&&("object"==Wm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$m()?Reflect.construct(t,n||[],Xm(e).constructor):t.apply(e,n))}(this,t,[e,n])).options_=n,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eb(e,t)}(t,e),n=t,r=[{key:"buildCSSClass",value:function(){return"cv-splash-rating ".concat((e=this.options_.ratingValue)?function(e){switch(!0){case e<32:return"cv-rating-purple";case e<48:return"cv-rating-green";case e<80:return"cv-rating-blue";case e<96:return"cv-rating-red";case e<128:return"cv-rating-pink";case e>=128:return"cv-rating-yellow";default:return""}}(e):"");var e}},{key:"createEl",value:function(e,n,r){return this.options_.ratingCode?(i=t,o=this,"function"==typeof(a=Jm(Xm(1&3?i.prototype:i),"createEl",o))?function(e){return a.apply(o,e)}:a)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerHTML:this.options_.ratingCode}),r]):null;var i,o,a}}],r&&Qm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function nb(e){return nb="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},nb(e)}function rb(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,ib(r.key),r)}}function ib(e){var t=function(e){if("object"!=nb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nb(t)?t:t+""}function ob(e,t){if(t&&("object"==nb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ab(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ab=function(){return!!e})()}function ub(e){return ub=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ub(e)}function lb(e,t){return lb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lb(e,t)}var cb=function(e){function t(e,n){var r,i,o,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,a=[e,n],o=ub(o=t),r=ob(i,ab()?Reflect.construct(o,a||[],ub(i).constructor):o.apply(i,a)),n.embed?(r.addChild(new Hm(e,n)),r.addChild(new tb(e,n)),r):ob(r,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lb(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return Nn.Z.dom.createEl("div",{className:"cv-splash-metadata"})}}])&&rb(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function sb(e){return sb="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},sb(e)}function fb(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,pb(r.key),r)}}function pb(e){var t=function(e){if("object"!=sb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sb(t)?t:t+""}function yb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yb=function(){return!!e})()}function hb(e){return hb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hb(e)}function vb(e,t){return vb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vb(e,t)}var db=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=hb(t),function(e,t){if(t&&("object"==sb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,yb()?Reflect.construct(t,n||[],hb(e).constructor):t.apply(e,n))}(this,t,[e,n])).addChild(new cb(e,n)),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vb(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e="<div class='cv-splash-mask'></div>";return this.options_.embed&&(e+="<div class='cv-splash-logo'>".concat(Go,"</div>")),Nn.Z.dom.createEl("div",{className:"vjs-poster cv-embed-splash cv-embed-splash-black",tabIndex:-1,innerHTML:e})}},{key:"setSrc",value:function(e){var t="";e&&(t='url("'.concat(e,'")')),this.el_.style.backgroundImage=t}}])&&fb(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("posterImage"));function mb(e){return mb="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},mb(e)}function bb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gb(r.key),r)}}function gb(e){var t=function(e){if("object"!=mb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mb(t)?t:t+""}function wb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wb=function(){return!!e})()}function Ob(e){return Ob=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ob(e)}function Sb(e,t){return Sb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sb(e,t)}Nn.Z.registerComponent("posterImage",db);var kb=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ob(t),function(e,t){if(t&&("object"==mb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,wb()?Reflect.construct(t,n||[],Ob(e).constructor):t.apply(e,n))}(this,t,[e,n])).el().prepend(r.getErrorImage()),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sb(e,t)}(t,e),n=t,(r=[{key:"getErrorImage",value:function(){return Nn.Z.dom.createEl("div",{className:"cv-error-image",innerHTML:'\n <svg viewBox="0 0 301 185" xmlns="http://www.w3.org/2000/svg">\n <path d="M267.393 36.6514V167.906C267.393 168.182 267.169 168.406 266.893 168.406H32C31.7239 168.406 31.5 168.182 31.5 167.906V36.6514C31.5 36.3752 31.7239 36.1514 32 36.1514H80.5C80.7761 36.1514 81 36.3752 81 36.6514V57.7196C81 58.7622 82.0375 59.4868 83.0164 59.1279L95.7377 54.4634C95.9961 54.3687 96.2825 54.5006 96.3785 54.7585L102.094 70.1194C102.677 71.6866 105 71.2685 105 69.5964V48.4925C105 47.7632 104.475 47.1396 103.757 47.0146L94.2479 45.3609C93.9436 45.308 93.7596 44.9946 93.8616 44.7031L96.7376 36.4862C96.8077 36.2856 96.997 36.1514 97.2095 36.1514H266.893C267.169 36.1514 267.393 36.3752 267.393 36.6514Z" stroke="white"/>\n <path d="M163.296 101.777L149.437 90.1217C148.275 89.1441 146.5 89.9705 146.5 91.4894V113.664C146.5 115.141 148.191 115.98 149.367 115.087L163.226 104.569C164.139 103.876 164.173 102.515 163.296 101.777Z" stroke="white" stroke-linecap="round"/>\n <path d="M295.53 23.0783L277.524 26.2801L283.252 32.7192L274.855 38.9079L292.861 35.7061L287.133 29.2671L295.53 23.0783Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M268.06 2.91764L254.192 14.8403L262.401 17.4661L258.324 27.0679L272.192 15.1453L263.983 12.5194L268.06 2.91764Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n '})}}])&&bb(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("ErrorDisplay"));function Pb(e){return Pb="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},Pb(e)}function jb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nb(r.key),r)}}function Nb(e){var t=function(e){if("object"!=Pb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pb(t)?t:t+""}function Cb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Cb=function(){return!!e})()}function Tb(e){return Tb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tb(e)}function Eb(e,t){return Eb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Eb(e,t)}Nn.Z.registerComponent("ErrorDisplay",kb);var _b=Nn.Z.getComponent("FullscreenToggle"),Rb="Fullscreen (f)",Ib=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Tb(t),function(e,t){if(t&&("object"==Pb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Cb()?Reflect.construct(t,n||[],Tb(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eb(e,t)}(t,e),n=t,(r=[{key:"handleFullscreenChange",value:function(){_b.prototype.handleFullscreenChange.call(this),this.controlText(Rb)}}])&&jb(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(_b);function xb(e){return xb="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},xb(e)}function Mb(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,Lb(r.key),r)}}function Lb(e){var t=function(e){if("object"!=xb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xb(t)?t:t+""}function Bb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Bb=function(){return!!e})()}function Db(e){return Db=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Db(e)}function Ab(e,t){return Ab=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ab(e,t)}Nn.Z.registerComponent("FullscreenToggle",Ib),Ib.prototype.controlText_=Rb;var Fb=Nn.Z.getComponent("MuteToggle"),zb="Mute (m)",Vb=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Db(t),function(e,t){if(t&&("object"==xb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Bb()?Reflect.construct(t,n||[],Db(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ab(e,t)}(t,e),n=t,(r=[{key:"updateControlText_",value:function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute (m)":zb;this.controlText_!==e&&this.controlText(e)}}])&&Mb(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Fb);function Zb(e){return Zb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zb(e)}function Ub(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Gb(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Gb(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Gb(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Gb(f,"constructor",c),Gb(c,"constructor",l),l.displayName="GeneratorFunction",Gb(c,i,"GeneratorFunction"),Gb(f),Gb(f,i,"Generator"),Gb(f,r,function(){return this}),Gb(f,"toString",function(){return"[object Generator]"}),(Ub=function(){return{w:o,m:p}})()}function Gb(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Gb=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Gb(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Gb(e,t,n,r)}function Kb(e){return function(e){if(Array.isArray(e))return qb(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 qb(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qb(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 qb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Hb(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,Wb(r.key),r)}}function Wb(e){var t=function(e){if("object"!=Zb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Zb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Zb(t)?t:t+""}Nn.Z.registerComponent("MuteToggle",Vb),Vb.prototype.controlText_=zb;var Qb,Yb=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},$b=Nn.Z.getComponent("Player"),Jb=function(){return e=function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamLogged=!1,this.options=Nn.Z.obj.merge({},e.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(t),this.buildVideoJs(),this.options.splash&&this.setupSplash(this.options.splash),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready(function(){r._configurePlugins(),r.options.setup&&r.options.setup(r.options,r.player),r.fetch().catch(function(e){return r.handleFetchError(e)})})},(t=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.configureMenuDimensionsPlugin({mobile:this.options.mobile,overflowControls:this.options.overflowControls,seekBarName:this.getSeekBarName()}),this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),!this.options.mobile&&this.options.allowFullscreen&&this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(e){var t;null===(t=this.analyticsService)||void 0===t||t.logVideoProgress(e)}},{key:"buildVideoJs",value:function(){return this.player=(0,Nn.Z)(this.el,this.getPlayerOptions())}},{key:"getInactivityTimeout",value:function(){if("number"==typeof this.options.inactivityTimeout)return this.options.inactivityTimeout;var e=500;return(this.options.mobile||Nn.Z.browser.IS_IOS||Nn.Z.browser.IS_ANDROID)&&(e=3e3),e}},{key:"getFluid",value:function(){return!this.options.theatreMode&&!this.options.embed&&!this.options.mobile}},{key:"getFill",value:function(){return!!this.options.theatreMode||!(!this.options.embed&&!this.options.mobile)}},{key:"getPlayerOptions",value:function(){var e=this,t=$b.prototype.options_.children;return t=t.filter(function(e){return"bigPlayButton"!==e&&"posterImage"!==e}),{controls:this.options.controls,fluid:this.getFluid(),fill:this.getFill(),inactivityTimeout:this.getInactivityTimeout(),controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(Kb(t),[{name:"collapserator",children:ki.filter(function(t){return!("fullscreenToggle"===t&&!e.options.allowFullscreen)})},"playPauseFeedback","controlBarGradient"]),userActions:{hotkeys:function(t){return function(e,t,n){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){var r=Wi()(e);if(("t"!==r||n.allowTheatreMode)&&("f"!==r||n.allowFullscreen)&&to[r]){to[r](t,e);var i=function(e){var t=e.target;return"video"===t.tagName.toLowerCase()||!!["video-js","vjs-tech"].find(function(e){return t.classList.contains(e)})}(e),o=["space"].includes(r);(i||o)&&(e.preventDefault(),e.stopPropagation())}}}(t,e.player,e.options)}},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,allowTheatreMode:this.options.allowTheatreMode,deferMenus:this.options.deferMenus,muted:this.options.muted,devicesConfig:this.options.devicesConfig}}},{key:"getPlaybackObject",value:function(){return Yb(this,void 0,void 0,Ub().m(function e(){var t,n,r=this;return Ub().w(function(e){for(;;)switch(e.n){case 0:if(!this.options.offlinePlaybackObject){e.n=1;break}return e.a(2,this.options.offlinePlaybackObject);case 1:if(t=this.options.fetch,void 0===this.options.fetch&&(t=function(e){var t="".concat(r.options.playerApi.origin,"/api/playback?viewKey=").concat(e);return qi.get(t)}),this.options.viewKey){e.n=2;break}throw new Error("Please specify a viewKey or a fetch function");case 2:return e.n=3,t(this.options.viewKey);case 3:if(n=e.v){e.n=4;break}throw new Error("Error fetching playback object");case 4:return e.a(2,n)}},e,this)}))}},{key:"setChaptersInternal",value:function(e,t){var n=mr.getTrack(this.player,"chapters",null);n||(n=this.player.addTextTrack("chapters")),Kb(n.cues.cues_).forEach(function(e){return n.removeCue(e)}),e.forEach(function(e){n.addCue({startTime:e.timestamp,endTime:e.endTimestamp,text:e.name})}),t&&n.trigger({type:"cv:cuechange",target:n}),n.trigger({type:"loadeddata",target:n})}},{key:"setChapters",value:function(e){this.setChaptersInternal(e,!0)}},{key:"setPlayerMode",value:function(e,t){this.player.playerModePlugin().setPlayerMode(e,t)}},{key:"setFavourite",value:function(e,t){this.player.favouritePlugin().setFavourite(e,t)}},{key:"fetch",value:function(){var e,t,n,r,i;return Yb(this,void 0,void 0,Ub().m(function o(){var a,u,l,c=this;return Ub().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,this.getPlaybackObject();case 1:if(a=o.v,!this.isDisposed()){o.n=2;break}return o.a(2);case 2:u="MasterClip"===a.mediaType,l=null===(e=a.additionalData)||void 0===e?void 0:e.clipData,(null===(n=null===(t=a.chapters)||void 0===t?void 0:t.list)||void 0===n?void 0:n.length)>0&&!u&&!l&&this.setChaptersInternal(a.chapters.list,!1),this.player.localCache({localCacheAddresses:null!==(r=a.localCacheAddresses)&&void 0!==r?r:[],enabled:null===(i=this.options.enableLocalCache)||void 0===i||i}),this.player.progressiveFiles({sources:a.files.progressive.map(function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}})}),this.player.handleNetworkErrors({playerApi:this.options.playerApi,fileToken:a.files.fileToken}),a.subtitles.list.length>0&&a.subtitles.list.forEach(function(e){if("text/vtt"===e.mimeType){var t=c.player.addRemoteTextTrack({kind:"subtitles",src:e.url,language:e.language,label:e.label},!0);if(mr.sanitizeTrack(t.track,c.player),c.options.allowTranscript){var n=c.player.addRemoteTextTrack({kind:"metadata",src:e.url+(e.url.includes("?")?"&":"?")+"fullSentences=true",language:e.language,label:"transcript"},!0);n.track.isClickViewProduced=e.isClickViewProduced,mr.sanitizeTrack(n.track,c.player)}}}),a.posterUrl&&this.player.poster(ft.j.createUrl(a.posterUrl,{size:st.h2.Large})),this.setupSplash({title:a.title,posterUrl:a.posterUrl,episodeNumber:a.episodeNumber,ratingCode:a.ratingCode,seasonNumber:a.seasonNumber,seriesName:a.seriesName}),this.additionalSetup(a),this.handleAutoplay(a),this.options.startTime&&(this.player.currentTime(this.options.startTime),this.player.one("canplay",function(){c.player.currentTime(c.options.startTime)})),this.player.trigger("cv-playback-data-loaded",a);case 3:return o.a(2)}},o,this)}))}},{key:"handleFetchError",value:function(e){var t,n=e.message;e instanceof Ai&&(null===(t=e.response)||void 0===t?void 0:t.type)===eo.PhysicallyChapteredVideo&&(n="Video cannot be played because it is either corrupt or damaged."),this.player.error(n),this.options.onError&&this.options.onError(e)}},{key:"fetchConfig",value:function(){return Yb(this,void 0,void 0,Ub().m(function e(){var t;return Ub().w(function(e){for(;;)switch(e.n){case 0:if(!(Qb||this.options.fetch||this.options.offlinePlaybackObject)){e.n=1;break}return e.a(2);case 1:return t="".concat(this.options.playerApi.origin,"/api/config"),e.n=2,qi.get(t);case 2:if(Qb=e.v,!this.isDisposed()){e.n=3;break}return e.a(2);case 3:this.trigger("config:loaded");case 4:return e.a(2)}},e,this)}))}},{key:"additionalSetup",value:function(e){var t,n=this;this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var r=this.options.enableLocalCache&&!!(null===(t=e.localCacheAddresses)||void 0===t?void 0:t.length);Qb?this.setupAnalyticsService(e,r):this.one("config:loaded",function(){return n.setupAnalyticsService(e,r)}),this.analyticsService||!this.isAnalyticsEnabled()?this.setupAnalyticsDependentPlugins(e):this.one("analytics:loaded",function(){return n.setupAnalyticsDependentPlugins(e)})}},{key:"setupAnalyticsService",value:function(e,t){this.options.eventLogging&&(this.analyticsService=new Ii({player:this.player,collectionApiUrls:Qb.collectionApi.urls,collectionApiClientId:Qb.collectionApi.clientId,productVersion:"1.38.0",authSessionId:e.viewerAuthSessionId,videoId:e.videoId,mediaId:e.mediaId,userId:e.viewerId,shareId:e.shareId,customerId:e.viewerCustomerId,mediaType:e.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:t,additionalAnalyticsData:this.getAdditionalAnalyticsData(e),regionName:e.instanceRegion||this.options.sharerInstanceRegion||no.M.CvApSoutheast1}),this.on("timeupdate",this.logStream),this.trigger("analytics:loaded"))}},{key:"setupAnalyticsDependentPlugins",value:function(e){var t,n,r,i;this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(t=e.settings)||void 0===t?void 0:t.showSubtitles,subtitleSize:null===(n=e.settings)||void 0===n?void 0:n.playbackSubtitleSizeDefault,analyticsService:this.analyticsService}),this.player.persistQualitySettingsPlugin({playbackProfile:null===(r=e.settings)||void 0===r?void 0:r.playbackProfile,playbackProfileLocalCache:null===(i=e.settings)||void 0===i?void 0:i.playbackProfileLocalCache,analyticsService:this.analyticsService}),this.player.persistPlaybackRatePlugin({analyticsService:this.analyticsService})}},{key:"getAdditionalAnalyticsData",value:function(e){return{}}},{key:"isAnalyticsEnabled",value:function(){return!this.options.fetch&&!this.options.offlinePlaybackObject&&this.options.eventLogging}},{key:"handleAutoplay",value:function(e){var t=this;this.options.autoplay&&this.player.ready(function(){t.player.play().catch(function(){t.isDisposed()||t.showSplash()})})}},{key:"logStream",value:function(){this.analyticsService&&(this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream)))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(e){var t;"string"==typeof e?(e=function(e){return 0===e.indexOf("#")?e.slice(1):e}(e),t=Nn.Z.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=Nn.Z.dom.createEl("video",{},{class:n}),t.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(e,t){this.player.on(e,t)}},{key:"one",value:function(e,t){this.player.one(e,t)}},{key:"off",value:function(e,t){this.player.off(e,t)}},{key:"trigger",value:function(e,t){return this.player.trigger(e,t)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(e){this.player.ready(e)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(e){return this.player.currentTime(e)}},{key:"muted",value:function(e){return this.player.muted(e)}},{key:"duration",value:function(){return this.player.duration()}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"requestFullscreen",value:function(){this.player.requestFullscreen()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"playbackRate",value:function(e){return this.player.playbackRate(e)}},{key:"quality",value:function(e){for(var t=this.player.qualityLevels(),n=0;n<t.length;n++){var r=t[n];if(e)r.enabled=r.id===e.toString();else if(r.enabled)return r.id}}},{key:"subtitles",value:function(e){for(var t=this.player.textTracks(),n=0;n<t.length;n++){var r=t[n];if("subtitles"===r.kind)if(void 0===e){if("showing"===r.mode)return r.label}else r.label===e?r.mode="showing":r.mode="disabled"}}},{key:"bindEventListeners",value:function(){var e=this,t=function(e){return e.preventDefault()};if(this.showSplash=this.showSplash.bind(this),this.hideSplash=this.hideSplash.bind(this),this.player.on("ended",this.showSplash),this.player.on("play",this.hideSplash),this.player.tech(!0).on("contextmenu",t),this.player.one("dispose",function(){e.off("ended",e.showSplash),e.off("play",e.hideSplash),e.player.tech(!0).off("contextmenu",t)}),this.options.hotkeyElQuerySelector){var n=Nn.Z.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",function(){e.player.off(n,"keydown",e.player.handleKeyDown)}))}}},{key:"setupSeekBar",value:function(){var e=this.getSeekBarName(),t=this.player.controlBar.getChild("progressControl");t.addChild(e,this.getSeekBarOptions()),t.setSeekBarName(e)}},{key:"setupSplash",value:function(e){this._splashAdded||(this._splashAdded=!0,this.player.addChild("posterImage",Object.assign({embed:this.options.embed},e)),this.player.addChild("bigPlayButton"),this.options.autoplay?this.hideSplash():this.showSplash())}},{key:"showSplash",value:function(){this.player.hasStarted(!1),this.player.getChild("posterImage").show(),this.player.getChild("bigPlayButton").show()}},{key:"hideSplash",value:function(){this.player.getChild("posterImage").hide(),this.player.getChild("bigPlayButton").hide()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}}])&&Hb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Xb(e){return Xb="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},Xb(e)}function eg(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,tg(r.key),r)}}function tg(e){var t=function(e){if("object"!=Xb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xb(t)?t:t+""}function ng(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ng=function(){return!!e})()}function rg(){return rg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ig(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}},rg.apply(null,arguments)}function ig(e){return ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ig(e)}function og(e,t){return og=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},og(e,t)}Jb.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0,eventLogging:!0,allowFullscreen:!0};var ag=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=ig(t),function(e,t){if(t&&("object"==Xb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ng()?Reflect.construct(t,n||[],ig(e).constructor):t.apply(e,n))}(this,t,[e]),void 0===n.startTime)throw Error("Invalid clip start");if(void 0===n.endTime)throw Error("Invalid clip end");if(n.startTime>n.endTime)throw Error("Clip start cannot be greater than clip end");return r._clipStart=parseFloat(n.startTime.toPrecision(4)),r._clipEnd=parseFloat(n.endTime.toPrecision(4)),r.playerEndedFn=r.player.ended.bind(e),r.playerDurationFn=r.player.duration.bind(e),r.playerCurrentTimeFn=r.player.currentTime.bind(e),r.playerbufferedFn=r.player.buffered.bind(e),r.player.ended=r.ended.bind(r),r.player.duration=r.duration.bind(r),r.player.currentTime=r.currentTime.bind(r),r.player.buffered=r.buffered.bind(r),r.initialize(),r.player.ready(function(){r.player.trigger("durationchange")}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&og(e,t)}(t,e),n=t,r=[{key:"clipStart",get:function(){var e=this.playerDurationFn();return this._clipStart>e?e:this._clipStart}},{key:"clipEnd",get:function(){var e=this.playerDurationFn();return e<=0?this._clipEnd:this._clipEnd>e?e:this._clipEnd}},{key:"dispose",value:function(){var e,n,r;this.player.off("timeupdate",this.onTimeUpdate),this.player.off("play",this.onPlay),this.player.ended=this.playerEndedFn,this.player.duration=this.playerDurationFn,this.player.currentTime=this.playerCurrentTimeFn,this.player.buffered=this.playerbufferedFn,this.player.trigger("durationchange"),(e=t,n=this,"function"==typeof(r=rg(ig(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var e=this.getCurrentTime(!1);e>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,e<this.clipStart-10&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(e){return e&&e>0&&(this.playerDurationFn()?console.info("The duration of the player has already been set. This is a no-op."):this.playerDurationFn(e)),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(e){if("number"!=typeof e)return this.getCurrentTime(!0);for(var t=e+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.playerCurrentTimeFn(t,r)}},{key:"getCurrentTime",value:function(e){var t=this.playerCurrentTimeFn(),n=0;return t>=this.clipStart&&(n=t-this.clipStart),this.player.getCache().currentTime=n,e?n:t}},{key:"buffered",value:function(){for(var e=this.playerbufferedFn(),t=[],n=0;n<e.length;n++)t[n]=[Math.max(0,e.start(n)-this.clipStart),Math.min(Math.max(0,e.end(n)-this.clipStart),this.player.duration())];return Nn.Z.createTimeRanges(t)}}],r&&eg(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function ug(e){return ug="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},ug(e)}function lg(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,cg(r.key),r)}}function cg(e){var t=function(e){if("object"!=ug(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ug(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ug(t)?t:t+""}function sg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sg=function(){return!!e})()}function fg(){return fg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=pg(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}},fg.apply(null,arguments)}function pg(e){return pg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pg(e)}function yg(e,t){return yg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yg(e,t)}Nn.Z.registerPlugin("clipPlugin",ag);var hg=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=pg(t),function(e,t){if(t&&("object"==ug(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sg()?Reflect.construct(t,n||[],pg(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yg(e,t)}(t,e),n=t,r=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){var e,n,r;(e=t,n=this,"function"==typeof(r=fg(pg(1&3?e.prototype:e),"handleClick",n))?function(e){return r.apply(n,e)}:r)([null])}}],r&&lg(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Button"));function vg(e){return vg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vg(e)}function dg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mg(r.key),r)}}function mg(e){var t=function(e){if("object"!=vg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vg(t)?t:t+""}function bg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(bg=function(){return!!e})()}function gg(e){return gg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gg(e)}function wg(e,t){return wg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wg(e,t)}hg.prototype.controlText_="Create clip",Nn.Z.registerComponent("CreateClipButton",hg);var Og=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=gg(t),function(e,t){if(t&&("object"==vg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,bg()?Reflect.construct(t,n||[],gg(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,e.ready(function(){return r.onReady()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wg(e,t)}(t,e),n=t,(r=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex(function(e){return"CustomControlSpacer"===e.name()});n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&dg(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function Sg(e){return Sg="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},Sg(e)}function kg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Pg(r.key),r)}}function Pg(e){var t=function(e){if("object"!=Sg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Sg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Sg(t)?t:t+""}function jg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jg=function(){return!!e})()}function Ng(e){return Ng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ng(e)}function Cg(e,t){return Cg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cg(e,t)}Nn.Z.registerPlugin("createClipButtonPlugin",Og);var Tg=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ng(t),function(e,t){if(t&&("object"==Sg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jg()?Reflect.construct(t,n||[],Ng(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cg(e,t)}(t,e),n=t,(r=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&kg(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("PictureInPictureToggle"));function Eg(e){return Eg="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},Eg(e)}function _g(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Rg(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Rg(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Rg(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Rg(f,"constructor",c),Rg(c,"constructor",l),l.displayName="GeneratorFunction",Rg(c,i,"GeneratorFunction"),Rg(f),Rg(f,i,"Generator"),Rg(f,r,function(){return this}),Rg(f,"toString",function(){return"[object Generator]"}),(_g=function(){return{w:o,m:p}})()}function Rg(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Rg=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Rg(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Rg(e,t,n,r)}function Ig(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xg(r.key),r)}}function xg(e){var t=function(e){if("object"!=Eg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Eg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Eg(t)?t:t+""}function Mg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Mg=function(){return!!e})()}function Lg(){return Lg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Bg(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}},Lg.apply(null,arguments)}function Bg(e){return Bg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bg(e)}function Dg(e,t){return Dg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dg(e,t)}Nn.Z.registerComponent("PictureInPictureToggle",Tg);var Ag=Nn.Z.getComponent("PlayToggle"),Fg=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Bg(t),function(e,t){if(t&&("object"==Eg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Mg()?Reflect.construct(t,n||[],Bg(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,r.bindFunctions(),e.ready(function(){return r.initialize()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dg(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"initialize",value:function(){var e=this,t=this.player.getChild("collapserator"),n=t.children().findIndex(function(e){var t;return"fullscreentoggle"===(null===(t=e.name())||void 0===t?void 0:t.toLowerCase())});-1===n&&(n=t.children().length-1),this.toggle=t.addChild("pictureInPictureToggle",{},n),this.toggle.enable(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",function(){var t;null===(t=e.player)||void 0===t||t.off("playerresize",e.onPlayerResize)})}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){var e,t;if(!this.player.isInPictureInPicture()){var n=this.player.el().getBoundingClientRect();0!==n.width&&(n.width<800?null===(e=this.toggle)||void 0===e||e.hide():null===(t=this.toggle)||void 0===t||t.show())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new Ag(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){var e;this.togglePictureInPicture(!0),"function"==typeof(null===(e=this.options)||void 0===e?void 0:e.onRequestPictureInPicture)&&this.options.onRequestPictureInPicture(!0)}},{key:"exitPictureInPicture",value:function(){return e=this,t=void 0,n=void 0,r=_g().m(function e(){return _g().w(function(e){for(;;)switch(e.n){case 0:this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles();case 1:return e.a(2)}},e,this)}),new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())});var e,t,n,r}},{key:"dispose",value:function(){var e,n,r;this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,(e=t,n=this,"function"==typeof(r=Lg(Bg(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&Ig(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function zg(e){return zg="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},zg(e)}function Vg(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,Zg(r.key),r)}}function Zg(e){var t=function(e){if("object"!=zg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zg(t)?t:t+""}function Ug(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ug=function(){return!!e})()}function Gg(e,t,n,r){var i=Kg(qg(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Kg(){return Kg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=qg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Kg.apply(null,arguments)}function qg(e){return qg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qg(e)}function Hg(e,t){return Hg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hg(e,t)}Nn.Z.registerPlugin("pictureInPicture",Fg);var Wg=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=qg(t),function(e,t){if(t&&("object"==zg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ug()?Reflect.construct(t,n||[],qg(e).constructor):t.apply(e,n))}(this,t,[e,n])).hasBuffered=!1,r.hasPlayed=!1,r.eventsService=dt,r.pointOfInterest=n.pointOfInterest,r.onMouseOver=r.onMouseOver.bind(r),r.onMouseLeave=r.onMouseLeave.bind(r),r.onGlancePointOfInterestMouseEnter=r.onGlancePointOfInterestMouseEnter.bind(r),r.onGlancePointOfInterestMouseLeave=r.onGlancePointOfInterestMouseLeave.bind(r),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hg(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(Gg(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Gg(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/e*100+"%"}},{key:"updateBuffered",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasBuffered){this.hasBuffered=t;var n="cv-point-of-interest-indicator-buffered";this.hasBuffered?this.addClass(n):this.removeClass(n)}}},{key:"updatePlaybackProgress",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasPlayed){this.hasPlayed=t;var n="cv-point-of-interest-indicator-played";t?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(e){var t="cv-point-of-interest-indicator-hidden";e?this.removeClass(t):this.addClass(t)}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(e){e.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var e=this.getTimeTooltip();null==e||e.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var e,t,n=null===(e=this.getSeekBar())||void 0===e?void 0:e.el();if(n){var r=Nn.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")}}])&&Vg(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function Qg(e){return Qg="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},Qg(e)}function Yg(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,$g(r.key),r)}}function $g(e){var t=function(e){if("object"!=Qg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qg(t)?t:t+""}function Jg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jg=function(){return!!e})()}function Xg(){return Xg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ew(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}},Xg.apply(null,arguments)}function ew(e){return ew=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ew(e)}function tw(e,t){return tw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tw(e,t)}var nw=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ew(t),function(e,t){if(t&&("object"==Qg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Jg()?Reflect.construct(t,n||[],ew(e).constructor):t.apply(e,n))}(this,t,[e,n])).pointsOfInterestVisible=n.pointsOfInterestVisible,r.toggle(r.pointsOfInterestVisible),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tw(e,t)}(t,e),n=t,r=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){Nn.Z.dom.addClass(this.toggleEl,"on"),Nn.Z.dom.setAttribute(this.toggleEl,"aria-checked","true"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){Nn.Z.dom.removeClass(this.toggleEl,"on"),Nn.Z.dom.setAttribute(this.toggleEl,"aria-checked","false"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,n,r){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=Nn.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),Nn.Z.dom.setAttribute(this.toggleEl,"id","poi-toggle"),Nn.Z.dom.setAttribute(this.toggleEl,"role","switch"),this.toggleEl.addEventListener("click",this.handleToggle);var i,o,a,u=(i=t,o=this,"function"==typeof(a=Xg(ew(1&3?i.prototype:i),"createEl",o))?function(e){return a.apply(o,e)}:a)([e,{className:"vjs-menu-item cv-cog-menu-item cv-poi-toggle",innerHTML:'\n <span for="poi-toggle" class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},r]);return u.children[1].appendChild(this.toggleEl),u}}],r&&Yg(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("MenuItem"));function rw(e){return rw="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},rw(e)}function iw(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,ow(r.key),r)}}function ow(e){var t=function(e){if("object"!=rw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rw(t)?t:t+""}function aw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aw=function(){return!!e})()}function uw(e){return uw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uw(e)}function lw(e,t){return lw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lw(e,t)}Nn.Z.registerComponent("PointsOfInterestMenuItem",nw);var cw,sw=Nn.Z.getPlugin("plugin"),fw="cvplayer-points-of-interest",pw=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=uw(t),function(e,t){if(t&&("object"==rw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,aw()?Reflect.construct(t,n||[],uw(e).constructor):t.apply(e,n))}(this,t,[e])).pointOfInterestIndicators=[],r.enabled=!0,r.pointsOfInterest=null==n?void 0:n.pointsOfInterest,r.initialize=r.initialize.bind(r),r.updateBuffered=r.updateBuffered.bind(r),r.updatePlaybackProgress=r.updatePlaybackProgress.bind(r),r.player.one("loadedmetadata",function(){return r.player.ready(r.initialize)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lw(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.pointsOfInterest&&(po()&&"false"===yo(fw)&&(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){ho(fw,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 Wg(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({ctor:nw,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach(function(t){return t.updateBuffered(gp(e.player))})}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach(function(t){return t.updatePlaybackProgress(e.player.currentTime())})}}])&&iw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(sw);function yw(e){return yw="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},yw(e)}function hw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vw(r.key),r)}}function vw(e){var t=function(e){if("object"!=yw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yw(t)?t:t+""}function dw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dw=function(){return!!e})()}function mw(e){return mw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mw(e)}function bw(e,t){return bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bw(e,t)}Nn.Z.registerPlugin("pointsOfInterestPlugin",pw),function(e){e.None="None",e.Complete="Complete",e.Incomplete="Incomplete"}(cw||(cw={}));var gw=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=mw(t),function(e,t){if(t&&("object"==yw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dw()?Reflect.construct(t,n||[],mw(e).constructor):t.apply(e,n))}(this,t,[e,n])).update(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bw(e,t)}(t,e),n=t,r=[{key:"update",value:function(){this.options_.activityStatus===cw.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.getToggledActivityStatus(),this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}},{key:"getToggledActivityStatus",value:function(){return this.options_.activityStatus===cw.None||this.options_.activityStatus===cw.Incomplete?cw.Complete:this.options_.activityStatus===cw.Complete?cw.Incomplete:void 0}}],r&&hw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Button"));function ww(e){return ww="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},ww(e)}function Ow(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,Sw(r.key),r)}}function Sw(e){var t=function(e){if("object"!=ww(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ww(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ww(t)?t:t+""}function kw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(kw=function(){return!!e})()}function Pw(e){return Pw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pw(e)}function jw(e,t){return jw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jw(e,t)}gw.prototype.controlText_="Complete";var Nw=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Pw(t),function(e,t){if(t&&("object"==ww(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kw()?Reflect.construct(t,n||[],Pw(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jw(e,t)}(t,e),n=t,(r=[{key:"setActivityStatus",value:function(e,t){var n=this;e!==this.activityStatus&&(this.activityStatus=e,this.onToggleStatus=t,this.player.ready(function(){n.renderActivityStatusButton()}))}},{key:"renderActivityStatusButton",value:function(){this.button&&this.player.removeChild(this.button),this.button=new gw(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button)}}])&&Ow(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function Cw(e){return Cw="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},Cw(e)}function Tw(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,Ew(r.key),r)}}function Ew(e){var t=function(e){if("object"!=Cw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cw(t)?t:t+""}function _w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_w=function(){return!!e})()}function Rw(e,t,n,r){var i=Iw(xw(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Iw(){return Iw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=xw(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}},Iw.apply(null,arguments)}function xw(e){return xw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xw(e)}function Mw(e,t){return Mw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mw(e,t)}Nn.Z.registerPlugin("activityStatusPlugin",Nw);var Lw=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=xw(t),function(e,t){if(t&&("object"==Cw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_w()?Reflect.construct(t,n||[],xw(e).constructor):t.apply(e,n))}(this,t,[e,n])).initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mw(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.setPosition()}},{key:"buildCSSClass",value:function(){return"cv-range-indicator ".concat(Rw(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Rw(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.options_.time/e*100+"%"}}])&&Tw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function Bw(e){return Bw="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},Bw(e)}function Dw(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,Aw(r.key),r)}}function Aw(e){var t=function(e){if("object"!=Bw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bw(t)?t:t+""}function Fw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fw=function(){return!!e})()}function zw(e,t,n,r){var i=Vw(Zw(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Vw(){return Vw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Zw(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}},Vw.apply(null,arguments)}function Zw(e){return Zw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zw(e)}function Uw(e,t){return Uw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uw(e,t)}var Gw=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Zw(t),function(e,t){if(t&&("object"==Bw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fw()?Reflect.construct(t,n||[],Zw(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uw(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view-button ".concat(zw(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return zw(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{innerHTML:'<span class="'.concat(this.options_.iconClassName,'"></span><span>').concat(this.options_.label,"</span>"),className:this.buildCSSClass()}),r])}},{key:"handleClick",value:function(){this.options_.onPress()}}])&&Dw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("ClickableComponent"));function Kw(e){return Kw="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},Kw(e)}function qw(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,Hw(r.key),r)}}function Hw(e){var t=function(e){if("object"!=Kw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kw(t)?t:t+""}function Ww(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ww=function(){return!!e})()}function Qw(e,t,n,r){var i=Yw($w(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Yw(){return Yw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=$w(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}},Yw.apply(null,arguments)}function $w(e){return $w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$w(e)}function Jw(e,t){return Jw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jw(e,t)}var Xw=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=$w(t),function(e,t){if(t&&("object"==Kw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ww()?Reflect.construct(t,n||[],$w(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jw(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view ".concat(Qw(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){var i=Qw(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r]),o=Nn.Z.dom.createEl("h5",{innerHTML:this.localize("This clip has finished"),className:"cv-replay-heading"}),a=Nn.Z.dom.createEl("div",{className:"cv-button-container"}),u=new Gw(this.player_,{label:this.localize("Replay clip"),iconClassName:"cv-replay-icon",onPress:this.options_.onReplayPress}),l=new Gw(this.player_,{label:this.localize("Continue watching"),iconClassName:"cv-continue-icon",onPress:this.options_.onContinuePress});return i.appendChild(o),i.appendChild(a),a.appendChild(u.el()),a.appendChild(l.el()),i}}])&&qw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function eO(e){return eO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eO(e)}function tO(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,nO(r.key),r)}}function nO(e){var t=function(e){if("object"!=eO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=eO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eO(t)?t:t+""}function rO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rO=function(){return!!e})()}function iO(){return iO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=oO(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}},iO.apply(null,arguments)}function oO(e){return oO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oO(e)}function aO(e,t){return aO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},aO(e,t)}var uO=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=oO(t),function(e,t){if(t&&("object"==eO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rO()?Reflect.construct(t,n||[],oO(e).constructor):t.apply(e,n))}(this,t,[e,n])).startTime=parseFloat(n.startTime.toPrecision(4)),r.endTime=parseFloat(n.endTime.toPrecision(4)),r.dismissed=!1,r.startTime>r.endTime)throw Error("Range start cannot be greater than range end");return r.bindFunctions(),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aO(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.onReady=this.onReady.bind(this),this.onTimeUpdateOrSeeked=this.onTimeUpdateOrSeeked.bind(this),this.onReplayPress=this.onReplayPress.bind(this),this.onContinuePress=this.onContinuePress.bind(this)}},{key:"initialize",value:function(){var e=this;this.player.one("loadedmetadata",function(){return e.player.ready(e.onReady)}),this.player.on("timeupdate",this.onTimeUpdateOrSeeked),this.player.on("seeked",this.onTimeUpdateOrSeeked)}},{key:"onReady",value:function(){this.addCssClasses(),this.showRangeIndicators(),this.addMaskToProgressBar()}},{key:"onTimeUpdateOrSeeked",value:function(){if(!this.dismissed){var e=this.player.currentTime();if(!(e<this.startTime))return e>this.endTime?(this.showReplayView(),this.disablePlayToggle(),this.player.pause(),void this.player.currentTime(this.endTime)):void 0;this.player.currentTime(this.startTime)}}},{key:"onReplayPress",value:function(){this.player.currentTime(this.startTime),this.player.play(),this.hideReplayView(),this.enablePlayToggle()}},{key:"onContinuePress",value:function(){this.dismissed=!0,this.player.play(),this.hideRangeIndicators(),this.removeMaskFromProgressBar(),this.hideReplayView(),this.enablePlayToggle(),this.removeCssClasses()}},{key:"showRangeIndicators",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.startTimeIndicator||(this.startTimeIndicator=new Lw(this.player,{time:this.startTime}),null==t||t.addChild(this.startTimeIndicator)),this.endTimeIndicator||(this.endTimeIndicator=new Lw(this.player,{time:this.endTime}),null==t||t.addChild(this.endTimeIndicator))}},{key:"hideRangeIndicators",value:function(){var e,t;null===(e=this.startTimeIndicator)||void 0===e||e.hide(),null===(t=this.endTimeIndicator)||void 0===t||t.hide()}},{key:"addMaskToProgressBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar"),n=null==t?void 0:t.el().getElementsByClassName("cv-chapter-bar-items");if(n&&n.length){var r=n[0],i=this.player.duration(),o=this.startTime/i*100,a=100-this.endTime/i*100;r.style.clipPath="inset(".concat(-5,"em ").concat(a,"% ").concat(-5,"em ").concat(o,"%)")}}},{key:"removeMaskFromProgressBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar"),n=null==t?void 0:t.el().getElementsByClassName("cv-chapter-bar-items");n&&n.length&&(n[0].style.clipPath="")}},{key:"showReplayView",value:function(){this.replayView||(this.replayView=new Xw(this.player,{onContinuePress:this.onContinuePress,onReplayPress:this.onReplayPress}),this.player.addChild(this.replayView)),this.replayView.show()}},{key:"hideReplayView",value:function(){var e;null===(e=this.replayView)||void 0===e||e.hide()}},{key:"getPlayToggle",value:function(){var e=this.player.getChild("collapserator");return null==e?void 0:e.getChild("PlayToggle")}},{key:"enablePlayToggle",value:function(){var e=this.getPlayToggle();e&&e.enable()}},{key:"disablePlayToggle",value:function(){var e=this.getPlayToggle();e&&e.disable()}},{key:"addCssClasses",value:function(){this.player.addClass("cv-range-indicator-plugin")}},{key:"removeCssClasses",value:function(){this.player.removeClass("cv-range-indicator-plugin")}},{key:"dispose",value:function(){var e,n,r,i,o,a;this.removeCssClasses(),this.player.off("timeupdate",this.onTimeUpdateOrSeeked),this.player.off("seeked",this.onTimeUpdateOrSeeked),null===(e=this.startTimeIndicator)||void 0===e||e.dispose(),null===(n=this.endTimeIndicator)||void 0===n||n.dispose(),null===(r=this.replayView)||void 0===r||r.dispose(),(i=t,o=this,"function"==typeof(a=iO(oO(1&3?i.prototype:i),"dispose",o))?function(e){return a.apply(o,e)}:a)([])}}],r&&tO(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function lO(e){return lO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lO(e)}function cO(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,sO(r.key),r)}}function sO(e){var t=function(e){if("object"!=lO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=lO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lO(t)?t:t+""}function fO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(fO=function(){return!!e})()}function pO(e,t,n,r){var i=yO(hO(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function yO(){return yO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=hO(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}},yO.apply(null,arguments)}function hO(e){return hO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hO(e)}function vO(e,t){return vO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vO(e,t)}Nn.Z.registerPlugin("rangeIndicatorPlugin",uO);var dO=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=hO(t),function(e,t){if(t&&("object"==lO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fO()?Reflect.construct(t,n||[],hO(e).constructor):t.apply(e,n))}(this,t,[e,n])).onLoopVideoChange=r.onLoopVideoChange.bind(r),r.player_.on("cv:loopvideo",r.onLoopVideoChange),r.onLoopVideoChange(null,r.player_.loopVideoPlugin().loop()),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vO(e,t)}(t,e),n=t,(r=[{key:"onLoopVideoChange",value:function(e,t){t?this.toggleOn():this.toggleOff()}},{key:"handleToggle",value:function(){var e=this.player_.loopVideoPlugin().loop();this.player_.loopVideoPlugin().loop(!e)}},{key:"toggleOn",value:function(){Nn.Z.dom.addClass(this.toggleEl,"on")}},{key:"toggleOff",value:function(){Nn.Z.dom.removeClass(this.toggleEl,"on")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,n,r){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=Nn.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var i=pO(t,"createEl",this,3)([e,{className:"vjs-menu-item cv-cog-menu-item cv-loop-video-toggle",innerHTML:'\n <span class="vjs-menu-item-text">Loop video</span>\n <span class="cv-toggle-container"></span>'},r]);return i.children[1].appendChild(this.toggleEl),i}},{key:"dispose",value:function(){this.player_.off("cv:loopvideo",this.onLoopVideoChange),pO(t,"dispose",this,3)([])}}])&&cO(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("MenuItem"));function mO(e){return mO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mO(e)}function bO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gO(r.key),r)}}function gO(e){var t=function(e){if("object"!=mO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mO(t)?t:t+""}function wO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wO=function(){return!!e})()}function OO(){return OO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=SO(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}},OO.apply(null,arguments)}function SO(e){return SO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},SO(e)}function kO(e,t){return kO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kO(e,t)}Nn.Z.registerComponent("LoopVideoMenuItem",dO);var PO=Nn.Z.getPlugin("plugin"),jO=(Nn.Z.getComponent("MenuItem"),Nn.Z.getComponent("LoopVideoMenuItem")),NO=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=SO(t),function(e,t){if(t&&("object"==mO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,wO()?Reflect.construct(t,n||[],SO(e).constructor):t.apply(e,n))}(this,t,[e]),n.allowLoop&&r.player.ready(function(){return r.addButton()}),r.onEnded=r.onEnded.bind(r),r.player.on("ended",r.onEnded),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kO(e,t)}(t,e),n=t,r=[{key:"addButton",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({ctor:jO,name:"LoopVideoMenuItem"})}},{key:"onEnded",value:function(){this.player.loop()&&this.player.play()}},{key:"loop",value:function(e){var t,n,r;if("boolean"!=typeof e)return this.player.loop();e&&(null===(r=null===(n=(t=this.player).nextVideoPlugin)||void 0===n?void 0:n.call(t))||void 0===r||r.setShouldPlayNext(!1,!1)),this.player.trigger("cv:loopvideo",e),this.player.loop(e)}},{key:"dispose",value:function(){var e,n,r;this.player.off("ended",this.onEnded),(e=t,n=this,"function"==typeof(r=OO(SO(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&bO(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(PO);Nn.Z.registerPlugin("loopVideoPlugin",NO);var CO=function(){var e,t,n;return null!==(n=null===(t=null===(e=window.crypto)||void 0===e?void 0:e.randomUUID)||void 0===t?void 0:t.call(e))&&void 0!==n?n:Math.random().toString()};function TO(e){return TO="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},TO(e)}function EO(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return _O(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(_O(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_O(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,_O(f,"constructor",c),_O(c,"constructor",l),l.displayName="GeneratorFunction",_O(c,i,"GeneratorFunction"),_O(f),_O(f,i,"Generator"),_O(f,r,function(){return this}),_O(f,"toString",function(){return"[object Generator]"}),(EO=function(){return{w:o,m:p}})()}function _O(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_O=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){_O(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},_O(e,t,n,r)}function RO(e){return function(e){if(Array.isArray(e))return IO(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 IO(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?IO(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 IO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,MO(r.key),r)}}function MO(e){var t=function(e){if("object"!=TO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=TO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==TO(t)?t:t+""}function LO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(LO=function(){return!!e})()}function BO(e,t,n,r){var i=DO(AO(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function DO(){return DO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=AO(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}},DO.apply(null,arguments)}function AO(e){return AO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},AO(e)}function FO(e,t){return FO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},FO(e,t)}var zO,VO,ZO=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=AO(t),function(e,t){if(t&&("object"==TO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,LO()?Reflect.construct(t,n||[],AO(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&FO(e,t)}(t,e),n=t,(r=[{key:"getPlayerOptions",value:function(){var e,n=BO(t,"getPlayerOptions",this,3)([]);return this.options.allowTranscript&&(n.allowTranscript=!0),(null===(e=n.devicesConfig)||void 0===e?void 0:e.canUserCastToDevices)?Object.assign(Object.assign({},n),{techOrder:["devices"].concat(RO(n.techOrder)),devices:{instanceId:CO()}}):n}},{key:"configurePlugins",value:function(){var e;try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),(null===(e=this.options.pointsOfInterest)||void 0===e?void 0:e.length)&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest}),this.player.loopVideoPlugin({allowLoop:this.options.allowLoop})}catch(e){console.log("failed to register plugins",e)}}},{key:"setNextVideo",value:function(e,t,n){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(e,t,n)}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"toggleTheatreMode",value:function(e){var t=this.player.theatreModePlugin();t&&t.toggleTheatreMode(e,{shouldLog:!0})}},{key:"toggleTranscript",value:function(e){if(this.player.viewTranscriptPlugin){var t=this.player.viewTranscriptPlugin();t&&t.toggleTranscript(e)}}},{key:"hasStarted",value:function(){return this.player.hasStarted()}},{key:"additionalSetup",value:function(e){var n,r,i,o,a=this,u=Object.create(null,{additionalSetup:{get:function(){return BO(t,"additionalSetup",a,1)}}});return n=this,r=void 0,i=void 0,o=EO().m(function t(){var n;return EO().w(function(t){for(;;)switch(t.n){case 0:if(this.options.onRequestTheatreMode&&this.options.allowTheatreMode&&this.player.theatreModePlugin&&this.player.theatreModePlugin({onRequestTheatreMode:this.options.onRequestTheatreMode,theatreMode:this.options.theatreMode,playbackObject:e}),u.additionalSetup.call(this,e),this.options.showResources&&e.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:e.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==e.mediaType){t.n=2;break}if(null!==(n=e.additionalData)){t.n=1;break}throw Error("Invalid clip data");case 1:this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime});case 2:"MasterVideo"===e.mediaType&&this.options.startTime&&this.options.endTime&&this.player.rangeIndicatorPlugin({startTime:this.options.startTime,endTime:this.options.endTime});case 3:return t.a(2)}},t,this)}),new(i||(i=Promise))(function(e,t){function a(e){try{l(o.next(e))}catch(e){t(e)}}function u(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i(function(e){e(n)})).then(a,u)}l((o=o.apply(n,r||[])).next())})}},{key:"setupAnalyticsDependentPlugins",value:function(e){var n;BO(t,"setupAnalyticsDependentPlugins",this,3)([e]),this.options.allowTranscript&&this.player.viewTranscriptPlugin().registerAnalytics(this.analyticsService,e),this.options.onRequestTheatreMode&&this.options.allowTheatreMode&&this.player.theatreModePlugin&&this.player.theatreModePlugin().registerAnalytics(this.analyticsService),(null===(n=this.options.devicesConfig)||void 0===n?void 0:n.canUserCastToDevices)&&this.player.devicesPlugin&&this.player.devicesPlugin(Object.assign(Object.assign({},this.options.devicesConfig),{userId:parseInt(e.viewerId),title:e.title,analyticsService:this.analyticsService}))}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}},{key:"useCurrentTranscript",value:function(e,t){mr.useMetadataTracks(this.player,"transcript",e,t)}},{key:"useChapters",value:function(e){mr.useChapters(this.player,e)}}])&&xO(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Jb),UO=n(33937);function GO(e){return GO="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},GO(e)}function KO(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,qO(r.key),r)}}function qO(e){var t=function(e){if("object"!=GO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=GO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==GO(t)?t:t+""}!function(e){e.AppleTv="apple-tv",e.Vivi="vivi"}(zO||(zO={})),function(e){e.Available="available",e.Offline="offline",e.Busy="busy"}(VO||(VO={}));var HO=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this[Symbol.toStringTag]=t[Symbol.toStringTag],this.innerPromise=t,this.onTimeout=n,this.bindFunctions()}return t=e,r=[{key:"reject",value:function(t){return new e(Promise.reject(t))}},{key:"fromPromise",value:function(t){return new e(t)}}],(n=[{key:"bindFunctions",value:function(){this.timeout=this.timeout.bind(this),this.then=this.then.bind(this),this.catch=this.catch.bind(this),this.finally=this.finally.bind(this)}},{key:"timeout",value:function(e){var t=this;return new Promise(function(n,r){t.then(n).catch(r).finally(function(){return clearTimeout(i)});var i=setTimeout(function(){var e;null===(e=t.onTimeout)||void 0===e||e.call(t),r(new Error("Promise timed out"))},e)})}},{key:"then",value:function(e,t){return this.innerPromise.then(e,t)}},{key:"catch",value:function(e){return this.innerPromise.catch(e)}},{key:"finally",value:function(e){return this.innerPromise.finally(e)}}])&&KO(t.prototype,n),r&&KO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();function WO(e){return WO="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},WO(e)}function QO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YO(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,JO(r.key),r)}}function $O(e,t,n){return t&&YO(e.prototype,t),n&&YO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function JO(e){var t=function(e){if("object"!=WO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=WO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==WO(t)?t:t+""}Symbol.toStringTag;var XO=function(){return $O(function e(){QO(this,e),this.callbacks=[],this.predicates=[],this.controller=new AbortController,this.signal=this.controller.signal,this.trigger=this.trigger.bind(this),this.on=this.on.bind(this),this.one=this.one.bind(this),this.off=this.off.bind(this),this.dispose=this.dispose.bind(this),this.isDisposed=this.isDisposed.bind(this)},[{key:"trigger",value:function(e){var t=this;this.callbacks.forEach(function(n,r){var i=t.predicates[r];i&&!i(e)||n(e)})}},{key:"on",value:function(e){var t=this;this.isDisposed()&&console.warn("This EventChannel instance been disposed - this is a no-op");var n=this.callbacks.length;this.callbacks[n]=e,this.predicates[n]=function(){return!0};var r=function(){t.off(e)};return{off:r,filter:function(e){return t.predicates[n]=e,r}}}},{key:"one",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return this.isDisposed()?HO.reject(new Error("This EventChannel instance has been disposed")):new HO(new Promise(function(r,i){e=t.on(function(n){t.signal.removeEventListener("abort",o),e(),r(n)}).filter(n);var o=function(){e(),i(new Error("Aborted while waiting for message"))};t.signal.addEventListener("abort",o,{once:!0})}),function(){e()})}},{key:"off",value:function(e){var t=this.callbacks.indexOf(e);-1!==t&&(this.callbacks.splice(t,1),this.predicates.splice(t,1))}},{key:"dispose",value:function(){this.callbacks.length=0,this.predicates.length=0,this.controller.abort()}},{key:"isDisposed",value:function(){return this.signal.aborted}}])}(),eS=function(){return $O(function e(){QO(this,e),this.channels={},this.trigger=this.trigger.bind(this),this.on=this.on.bind(this),this.one=this.one.bind(this),this.off=this.off.bind(this),this.dispose=this.dispose.bind(this),this.getChannel=this.getChannel.bind(this)},[{key:"trigger",value:function(e,t){this.getChannel(e).trigger(t)}},{key:"on",value:function(e,t){return this.getChannel(e).on(t)}},{key:"one",value:function(e,t){return this.getChannel(e).one(t)}},{key:"off",value:function(e,t){this.getChannel(e).off(t)}},{key:"dispose",value:function(){this.trigger("dispose",tS.void),Object.values(this.channels).forEach(function(e){return e.dispose()}),this.channels={}}},{key:"getChannel",value:function(e){return this.channels[e]||(this.channels[e]=new XO),this.channels[e]}}])}(),tS={void:void 0};function nS(e){return nS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nS(e)}function rS(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,iS(r.key),r)}}function iS(e){var t=function(e){if("object"!=nS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nS(t)?t:t+""}var oS,aS,uS,lS=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions()},(t=[{key:"bindFunctions",value:function(){this.schedule=this.schedule.bind(this),this.every=this.every.bind(this),this.trigger=this.trigger.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this)}},{key:"schedule",value:function(e){return this.task=e,this}},{key:"every",value:function(e){return this.intervalInMilliseconds=e,this}},{key:"trigger",value:function(){var e;return null===(e=this.task)||void 0===e||e.call(this,this),this}},{key:"start",value:function(){var e=this;return this.intervalId||(this.intervalId=setInterval(function(){return e.trigger()},this.intervalInMilliseconds)),this}},{key:"stop",value:function(){return this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this}}])&&rS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),cS=function(e,t){return e._lastModified||(e._lastModified={}),new Proxy(e,{set:function(n,r,i,o){var a=e._lastModified[r.toString()];return!!(a&&Date.now()<a+t)||Reflect.set(n,r,i,o)}})},sS=function(e){return e._lastModified||(e._lastModified={}),new Proxy(e,{set:function(t,n,r,i){return e._lastModified[n.toString()]=Date.now(),Reflect.set(t,n,r,i)}})};function fS(e){return fS="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},fS(e)}function pS(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,hS(r.key),r)}}function yS(e,t,n){return t&&pS(e.prototype,t),n&&pS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function hS(e){var t=function(e){if("object"!=fS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fS(t)?t:t+""}!function(e){e[e.Offline=0]="Offline",e[e.Online=1]="Online",e[e.Locked=2]="Locked",e[e.Suspended=3]="Suspended"}(oS||(oS={})),function(e){e[e.PlaybackStatusChange=0]="PlaybackStatusChange",e[e.PositionChange=1]="PositionChange"}(aS||(aS={})),function(e){e.Begin="BEGIN",e.Play="PLAY",e.Pause="PAUSE",e.Load="LOAD",e.Scan="SCAN",e.Stop="STOP"}(uS||(uS={}));var vS=yS(function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.title=t,this.device=n,this.locked=!1,this.position=0,this.playbackStatus=uS.Load,this.debounced=cS(this,2e3),sS(this)});function dS(e){return dS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dS(e)}function mS(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return bS(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(bS(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,bS(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,bS(f,"constructor",c),bS(c,"constructor",l),l.displayName="GeneratorFunction",bS(c,i,"GeneratorFunction"),bS(f),bS(f,i,"Generator"),bS(f,r,function(){return this}),bS(f,"toString",function(){return"[object Generator]"}),(mS=function(){return{w:o,m:p}})()}function bS(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}bS=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){bS(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},bS(e,t,n,r)}function gS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wS(r.key),r)}}function wS(e){var t=function(e){if("object"!=dS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dS(t)?t:t+""}function OS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(OS=function(){return!!e})()}function SS(){return SS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=kS(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},SS.apply(null,arguments)}function kS(e){return kS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kS(e)}function PS(e,t){return PS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},PS(e,t)}var jS=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=kS(t),function(e,t){if(t&&("object"==dS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,OS()?Reflect.construct(t,n||[],kS(e).constructor):t.apply(e,n))}(this,t)).client=e,r.localState=new vS(n.title,n.device),r.bindFunctions(),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PS(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.dispose=this.dispose.bind(this),this.handleDisconnected=this.handleDisconnected.bind(this),this.handleAllVideoMessages=this.handleAllVideoMessages.bind(this),this.handlePlaybackChange=this.handlePlaybackChange.bind(this),this.handlePositionChange=this.handlePositionChange.bind(this),this.loadSource=this.loadSource.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.isPlaying=this.isPlaying.bind(this),this.getPosition=this.getPosition.bind(this),this.getDuration=this.getDuration.bind(this),this.getVolume=this.getVolume.bind(this)}},{key:"initialize",value:function(){this.client.on("dispose",this.dispose),this.client.on("disconnected",this.handleDisconnected),this.client.on("message",this.handleAllVideoMessages)}},{key:"dispose",value:function(){var e,n,r;this.client.off("dispose",this.dispose),this.client.off("disconnected",this.handleDisconnected),this.client.off("message",this.handleAllVideoMessages),this.client.stop(this.getDevice().id).catch(function(e){return console.error(e)}),(e=t,n=this,"function"==typeof(r=SS(kS(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"handleDisconnected",value:function(){this.trigger("error",new Error("The connection to the Apple TV has been lost and cannot be recovered"))}},{key:"handleAllVideoMessages",value:function(e){if(e.deviceId===this.getDevice().id){var t=this.localState.debounced;switch(e.event){case aS.PlaybackStatusChange:this.handlePlaybackChange(t,e);break;case aS.PositionChange:this.handlePositionChange(t,e)}}}},{key:"handlePlaybackChange",value:function(e,t){e.playbackStatus!==t.params.playbackStatus&&(e.playbackStatus=t.params.playbackStatus,this.trigger("playingchange",tS.void),e.playbackStatus===uS.Stop&&this.dispose())}},{key:"handlePositionChange",value:function(e,t){e.position!==t.params.position&&(e.position=t.params.position,this.trigger("positionchange",tS.void))}},{key:"loadSource",value:function(){return e=this,t=void 0,n=void 0,r=mS().m(function e(){var t;return mS().w(function(e){for(;;)switch(e.n){case 0:if(e.p=0,!this.localState.locked){e.n=1;break}return e.a(2);case 1:return e.n=2,this.client.lock(this.getDevice().id);case 2:return this.localState.locked=!0,e.n=3,this.client.loadVideo(this.getDevice().id);case 3:this.trigger("sourceloaded",tS.void),e.n=5;break;case 4:e.p=4,t=e.v,console.error(t),this.trigger("error",new Error("Could not load video on Apple TV device"));case 5:return e.a(2)}},e,this,[[0,4]])}),new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())});var e,t,n,r}},{key:"play",value:function(){this.localState.locked&&this.localState.playbackStatus!==uS.Play&&(this.localState.playbackStatus=uS.Play,this.client.play(this.getDevice().id),this.trigger("playingchange",tS.void))}},{key:"pause",value:function(){this.localState.locked&&this.localState.playbackStatus!==uS.Pause&&(this.localState.playbackStatus=uS.Pause,this.client.pause(this.getDevice().id),this.trigger("playingchange",tS.void))}},{key:"seek",value:function(e){this.localState.locked&&this.localState.position!==e&&(this.localState.position=e,this.client.seek(this.getDevice().id,e),this.trigger("positionchange",tS.void))}},{key:"setVolume",value:function(){console.info("Setting the volume is not supported on Apple TV")}},{key:"setMuted",value:function(){console.info("Muting is not supported on Apple TV")}},{key:"setSubtitles",value:function(){console.info("Subtitles are not supported on Apple TV")}},{key:"isPlaying",value:function(){return this.localState.playbackStatus===uS.Play||this.localState.playbackStatus===uS.Begin||this.localState.playbackStatus===uS.Load}},{key:"isPlaybackFinished",value:function(){return this.localState.playbackStatus===uS.Stop}},{key:"getPosition",value:function(){return this.localState.position}},{key:"getDuration",value:function(){}},{key:"getVolume",value:function(){return 1}},{key:"getMuted",value:function(){return!1}},{key:"getSubtitles",value:function(){}},{key:"getDevice",value:function(){return this.localState.device}},{key:"getTitle",value:function(){return this.localState.title}}],r&&gS(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(eS);function NS(e){return NS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},NS(e)}function CS(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return TS(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(TS(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,TS(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,TS(f,"constructor",c),TS(c,"constructor",l),l.displayName="GeneratorFunction",TS(c,i,"GeneratorFunction"),TS(f),TS(f,i,"Generator"),TS(f,r,function(){return this}),TS(f,"toString",function(){return"[object Generator]"}),(CS=function(){return{w:o,m:p}})()}function TS(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}TS=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){TS(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},TS(e,t,n,r)}function ES(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,_S(r.key),r)}}function _S(e){var t=function(e){if("object"!=NS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=NS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==NS(t)?t:t+""}function RS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(RS=function(){return!!e})()}function IS(){return IS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=xS(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},IS.apply(null,arguments)}function xS(e){return xS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xS(e)}function MS(e,t){return MS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},MS(e,t)}var LS,BS,DS,AS=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})};!function(e){e.DeviceList="DeviceList",e.DeviceStateChange="DeviceStateChange",e.Paired="Paired",e.Unpaired="Unpaired",e.PlayStatusChange="PlayStatusChange",e.TimeSync="TimeSync"}(LS||(LS={})),function(e){e.Command="Command",e.Pair="Pair",e.Unpair="Unpair",e.RenameDevice="Renamedevice",e.Subscribe="Subscribe",e.Lock="Lock"}(BS||(BS={})),function(e){e[e.Connecting=0]="Connecting",e[e.Connected=1]="Connected",e[e.Reconnecting=2]="Reconnecting",e[e.Disconnected=4]="Disconnected"}(DS||(DS={}));var FS=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=xS(t),function(e,t){if(t&&("object"==NS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,RS()?Reflect.construct(t,n||[],xS(e).constructor):t.apply(e,n))}(this,t)).options=e,n.accessToken=void 0,n.devices=[],n.heartbeat=new lS,n.bindFunctions(),n.initialize(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&MS(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.connect=this.connect.bind(this),this.subscribe=this.subscribe.bind(this),this.tryFixConnection=this.tryFixConnection.bind(this),this.invoke=this.invoke.bind(this),this.invokeDebounced=br(this.invoke,500,!0),this.handleDeviceList=this.handleDeviceList.bind(this),this.handleDeviceStateChange=this.handleDeviceStateChange.bind(this),this.handleDevicePaired=this.handleDevicePaired.bind(this),this.handleDeviceUnpaired=this.handleDeviceUnpaired.bind(this),this.handlePlayStatusChange=this.handlePlayStatusChange.bind(this),this.handleTimeSync=this.handleTimeSync.bind(this),this.dispose=this.dispose.bind(this),this.canCastToDevice=this.canCastToDevice.bind(this),this.getDevices=this.getDevices.bind(this),this.startCastSession=this.startCastSession.bind(this),this.lock=this.lock.bind(this),this.loadVideo=this.loadVideo.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.stop=this.stop.bind(this),this.pair=this.pair.bind(this),this.unpair=this.unpair.bind(this),this.renameDevice=this.renameDevice.bind(this)}},{key:"initialize",value:function(){return AS(this,void 0,void 0,CS().m(function e(){var t;return CS().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,this.options.fetchAccessToken();case 1:return this.accessToken=e.v,this.connection=(0,UO.OB)(this.accessToken.host,{logging:!1}),this.hubProxy=this.connection.createHubProxy("DeviceUserHub"),this.hubProxy.on(LS.DeviceList,this.handleDeviceList),this.hubProxy.on(LS.DeviceStateChange,this.handleDeviceStateChange),this.hubProxy.on(LS.Paired,this.handleDevicePaired),this.hubProxy.on(LS.Unpaired,this.handleDeviceUnpaired),this.hubProxy.on(LS.PlayStatusChange,this.handlePlayStatusChange),this.hubProxy.on(LS.TimeSync,this.handleTimeSync),e.n=2,this.connect();case 2:return e.n=3,this.subscribe(this.accessToken.token);case 3:this.heartbeat.schedule(this.tryFixConnection).every(5e3).start(),e.n=5;break;case 4:e.p=4,t=e.v,console.error(t),this.trigger("error",new Error("Could not connect to Online API"));case 5:return e.a(2)}},e,this,[[0,4]])}))}},{key:"connect",value:function(){return AS(this,void 0,void 0,CS().m(function e(){var t=this;return CS().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,n){t.connection.start({jsonp:!1,withCredentials:!1}).done(function(){return e()}).fail(function(){return n(new Error("Could not connect to SignalR hub"))})}))},e)}))}},{key:"subscribe",value:function(e){return AS(this,void 0,void 0,CS().m(function t(){return CS().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(BS.Subscribe,e);case 1:if(t.v){t.n=2;break}throw new Error("The subscription request was rejected by Online API");case 2:return t.a(2)}},t,this)}))}},{key:"tryFixConnection",value:function(){return AS(this,void 0,void 0,CS().m(function e(){var t;return CS().w(function(e){for(;;)switch(e.n){case 0:if(this.connection.state===DS.Disconnected){e.n=1;break}return e.a(2);case 1:return e.p=1,this.heartbeat.stop(),e.n=2,this.options.fetchAccessToken();case 2:return this.accessToken=e.v,e.n=3,this.connect();case 3:return e.n=4,this.subscribe(this.accessToken.token);case 4:e.n=6;break;case 5:e.p=5,t=e.v,console.warn(t),console.warn("Could not reconnect to Online API");case 6:return e.p=6,this.heartbeat.start(),e.f(6);case 7:return e.a(2)}},e,this,[[1,5,6,7]])}))}},{key:"invoke",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return AS(this,void 0,void 0,CS().m(function t(){var r,i=this;return CS().w(function(t){for(;;)if(0===t.n)return r=new Promise(function(t,r){var o,a;(null===(a=i.hubProxy)||void 0===a?void 0:(o=a).invoke.apply(o,[e].concat(n))).done(t).fail(r)}),t.a(2,HO.fromPromise(r).timeout(2e4))},t)}))}},{key:"handleDeviceList",value:function(e){this.devices=e.filter(function(e){return"vivi"!==e.type}).map(t.convertToGenericDevice),this.trigger("deviceschange",tS.void)}},{key:"handleDeviceStateChange",value:function(e){var n=this.devices.findIndex(function(t){return t.id===e.deviceId});n>=0&&(this.devices[n]=t.convertToGenericDevice(e),this.trigger("deviceschange",tS.void))}},{key:"handleDevicePaired",value:function(e){"vivi"!==e.type&&(this.devices.push(t.convertToGenericDevice(e)),this.trigger("deviceschange",tS.void))}},{key:"handleDeviceUnpaired",value:function(e){this.devices=this.devices.filter(function(t){return t.id!==e}),this.trigger("deviceschange",tS.void)}},{key:"handlePlayStatusChange",value:function(e,t){this.trigger("message",{event:aS.PlaybackStatusChange,deviceId:e,params:{playbackStatus:t.commandType}})}},{key:"handleTimeSync",value:function(e,t){this.trigger("message",{event:aS.PositionChange,deviceId:e,params:{position:t}})}},{key:"dispose",value:function(){var e,n,r;this.hubProxy.off(LS.DeviceList,this.handleDeviceList),this.hubProxy.off(LS.DeviceStateChange,this.handleDeviceStateChange),this.hubProxy.off(LS.Paired,this.handleDevicePaired),this.hubProxy.off(LS.Unpaired,this.handleDeviceUnpaired),this.hubProxy.off(LS.PlayStatusChange,this.handlePlayStatusChange),this.hubProxy.off(LS.TimeSync,this.handleTimeSync),this.hubProxy.connection.stop(!1,!0),this.heartbeat.stop(),(e=t,n=this,"function"==typeof(r=IS(xS(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"canCastToDevice",value:function(e){return e===zO.AppleTv}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new jS(this,e)}},{key:"lock",value:function(e){var t;return AS(this,void 0,void 0,CS().m(function n(){return CS().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,this.invoke(BS.Lock,e,this.options.userId,null!==(t=this.options.username)&&void 0!==t?t:"");case 1:if(n.v){n.n=2;break}throw new Error("Could not lock device");case 2:return n.a(2)}},n,this)}))}},{key:"loadVideo",value:function(e){return AS(this,void 0,void 0,CS().m(function t(){return CS().w(function(t){for(;;)switch(t.n){case 0:if(this.options.trackingCode){t.n=1;break}throw new Error("Tracking code must be provided to cast videos");case 1:return t.n=2,this.invoke(BS.Command,{DeviceId:e,CommandType:uS.Play,Data:this.options.trackingCode});case 2:return t.a(2)}},t,this)}))}},{key:"play",value:function(e){return AS(this,void 0,void 0,CS().m(function t(){return CS().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(BS.Command,{DeviceId:e,CommandType:uS.Play});case 1:return t.a(2)}},t,this)}))}},{key:"pause",value:function(e){return AS(this,void 0,void 0,CS().m(function t(){return CS().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(BS.Command,{DeviceId:e,CommandType:uS.Pause});case 1:return t.a(2)}},t,this)}))}},{key:"seek",value:function(e,t){this.invokeDebounced(BS.Command,{DeviceId:e,CommandType:uS.Play,Params:"1,".concat(Math.trunc(t))})}},{key:"stop",value:function(e){return AS(this,void 0,void 0,CS().m(function t(){return CS().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(BS.Command,{DeviceId:e,CommandType:uS.Stop});case 1:return t.a(2)}},t,this)}))}},{key:"pair",value:function(e){return AS(this,void 0,void 0,CS().m(function t(){var n;return CS().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(BS.Pair,e);case 1:if(n=t.v){t.n=2;break}throw new Error("Could not pair device");case 2:return t.a(2,n)}},t,this)}))}},{key:"unpair",value:function(e){return AS(this,void 0,void 0,CS().m(function t(){return CS().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(BS.Unpair,e);case 1:return t.a(2)}},t,this)}))}},{key:"renameDevice",value:function(e){var t=e.deviceId,n=e.deviceName;return AS(this,void 0,void 0,CS().m(function e(){return CS().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.invoke(BS.RenameDevice,t,n);case 1:if(e.v){e.n=2;break}throw new Error("Could not rename device");case 2:return e.a(2)}},e,this)}))}}],i=[{key:"convertToGenericDeviceStatus",value:function(e){switch(e){case oS.Online:return VO.Available;case oS.Locked:return VO.Busy;case oS.Suspended:case oS.Offline:return VO.Offline}}},{key:"convertToGenericDevice",value:function(e){return{id:e.deviceId,name:e.name,type:zO.AppleTv,status:t.convertToGenericDeviceStatus(e.status)}}}],r&&ES(n.prototype,r),i&&ES(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(eS);function zS(e){return zS="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},zS(e)}function VS(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,ZS(r.key),r)}}function ZS(e){var t=function(e){if("object"!=zS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zS(t)?t:t+""}var US={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},GS=function(){return e=function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:US;!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({},US),r),this.webSocket=this.connect(),this.heartbeat=(new lS).schedule(function(){return n.send(n.options.heartbeatMessage)}).every(this.options.heartbeatIntervalInMillseconds)},(t=[{key:"bindFunctions",value:function(){this.cleanup=this.cleanup.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleMessage=this.handleMessage.bind(this),this.handleClose=this.handleClose.bind(this),this.handleError=this.handleError.bind(this),this.connect=this.connect.bind(this),this.send=this.send.bind(this),this.dipose=this.dipose.bind(this)}},{key:"cleanup",value:function(){this.heartbeat.stop(),this.webSocket.removeEventListener("error",this.handleError),this.webSocket.removeEventListener("message",this.handleMessage),this.webSocket.removeEventListener("open",this.handleOpen),this.webSocket.removeEventListener("close",this.handleClose)}},{key:"handleOpen",value:function(e){var t;null===(t=this.onOpen)||void 0===t||t.call(this,e),this.options.heartbeatEnabled&&this.heartbeat.start()}},{key:"handleMessage",value:function(e){var t;null===(t=this.onMessage)||void 0===t||t.call(this,e)}},{key:"handleClose",value:function(e){var t,n=this;null===(t=this.onClose)||void 0===t||t.call(this,e),this.cleanup(),setTimeout(function(){n.webSocket=n.connect()},this.options.reconnectIntervalInMilliseconds)}},{key:"handleError",value:function(e){var t;null===(t=this.onError)||void 0===t||t.call(this,e),this.handleClose()}},{key:"connect",value:function(){var e=new WebSocket(this.url);return e.addEventListener("open",this.handleOpen),e.addEventListener("message",this.handleMessage),e.addEventListener("close",this.handleClose),e.addEventListener("error",this.handleError),e}},{key:"send",value:function(e){this.webSocket.send(e)}},{key:"dipose",value:function(){this.cleanup(),this.webSocket.close()}}])&&VS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function KS(e){return KS="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},KS(e)}function qS(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,HS(r.key),r)}}function HS(e){var t=function(e){if("object"!=KS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=KS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==KS(t)?t:t+""}var WS,QS=function(){return e=function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._timerStartedAt=0,this.position=0,this.duration=void 0,this.playing=!1,this.mute=!1,this.videoSource="",this.subtitleSource="",this.subtitles=!1,this.volume=0,this.title=t,this.device=n,this.ready=!1,this.playbackFinished=!1,this.debounced=cS(this,2e3),sS(this)},(t=[{key:"position",get:function(){return this._position+this.getTimerDurationInSeconds()},set:function(e){this._position=e,this.restartTimer()}},{key:"playing",get:function(){return this._playing},set:function(e){this._playing=e,e?this.restartTimer():(this._position+=this.getTimerDurationInSeconds(),this.stopTimer())}},{key:"restartTimer",value:function(){this._timerStartedAt=Date.now()}},{key:"stopTimer",value:function(){this._timerStartedAt=0}},{key:"getTimerDurationInSeconds",value:function(){return this._timerStartedAt?(Date.now()-this._timerStartedAt)/1e3:0}}])&&qS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function YS(e){return YS="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},YS(e)}function $S(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return JS(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(JS(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,JS(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,JS(f,"constructor",c),JS(c,"constructor",l),l.displayName="GeneratorFunction",JS(c,i,"GeneratorFunction"),JS(f),JS(f,i,"Generator"),JS(f,r,function(){return this}),JS(f,"toString",function(){return"[object Generator]"}),($S=function(){return{w:o,m:p}})()}function JS(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}JS=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){JS(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},JS(e,t,n,r)}function XS(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,ek(r.key),r)}}function ek(e){var t=function(e){if("object"!=YS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=YS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==YS(t)?t:t+""}function tk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tk=function(){return!!e})()}function nk(){return nk="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=rk(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}},nk.apply(null,arguments)}function rk(e){return rk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rk(e)}function ik(e,t){return ik=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ik(e,t)}!function(e){e.Update="update",e.Volume="volume",e.Playing="playing",e.Paused="paused",e.NewChapter="new_chapter",e.Stopped="stopped",e.Ready="ready",e.Mute="mute",e.Finished="finished",e.Subtitles="subtitles"}(WS||(WS={}));var ok=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},ak=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=rk(t),function(e,t){if(t&&("object"==YS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tk()?Reflect.construct(t,n||[],rk(e).constructor):t.apply(e,n))}(this,t)).client=e,r.localState=new QS(n.title,n.device),r.bindFunctions(),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ik(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.dispose=this.dispose.bind(this),this.handleClientConnected=this.handleClientConnected.bind(this),this.handleDisconnectMessage=this.handleDisconnectMessage.bind(this),this.handleAllVideoMessages=this.handleAllVideoMessages.bind(this),this.handleUpdateMessage=this.handleUpdateMessage.bind(this),this.handleVolumeMessage=this.handleVolumeMessage.bind(this),this.handlePlayingMessage=this.handlePlayingMessage.bind(this),this.handlePausedMessage=this.handlePausedMessage.bind(this),this.handleFinishedMessage=this.handleFinishedMessage.bind(this),this.handleNewChapterMessage=this.handleNewChapterMessage.bind(this),this.handleStoppedMessage=this.handleStoppedMessage.bind(this),this.loadSource=this.loadSource.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.isPlaying=this.isPlaying.bind(this),this.getPosition=this.getPosition.bind(this),this.getDuration=this.getDuration.bind(this),this.getVolume=this.getVolume.bind(this)}},{key:"initialize",value:function(){var e=this;this.client.on("dispose",this.dispose),this.client.on("connected",this.handleClientConnected),this.client.on("message",this.handleDisconnectMessage).filter(function(t){return t.source===e.getDevice().id&&"disconnect"===t.message.type}),this.client.on("message",this.handleAllVideoMessages).filter(function(t){return t.source===e.getDevice().id&&"video_event"===t.message.type})}},{key:"dispose",value:function(){var e,n,r;this.client.off("dispose",this.dispose),this.client.off("connected",this.handleClientConnected),this.client.off("message",this.handleDisconnectMessage),this.client.off("message",this.handleAllVideoMessages),this.client.stop(this.getDevice().id).catch(function(e){return console.error(e)}),(e=t,n=this,"function"==typeof(r=nk(rk(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"handleClientConnected",value:function(){return ok(this,void 0,void 0,$S().m(function e(){var t;return $S().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,this.client.joinRoom(this.getDevice().id);case 1:e.n=3;break;case 2:e.p=2,t=e.v,this.trigger("error",t);case 3:return e.a(2)}},e,this,[[0,2]])}))}},{key:"handleDisconnectMessage",value:function(){this.dispose()}},{key:"handleAllVideoMessages",value:function(e){var t=this.localState.debounced,n=e.message.payload.params||{};switch(e.message.payload.event){case WS.Update:this.handleUpdateMessage(t,n);break;case WS.NewChapter:this.handleNewChapterMessage(t,n);break;case WS.Volume:this.handleVolumeMessage(t,n);break;case WS.Playing:this.handlePlayingMessage(t);break;case WS.Paused:this.handlePausedMessage(t);break;case WS.Finished:this.handleFinishedMessage(t);break;case WS.Stopped:this.handleStoppedMessage()}}},{key:"handleUpdateMessage",value:function(e,t){e.duration!==t.duration&&(e.duration=t.duration,this.trigger("durationchange",tS.void)),e.position!==t.position&&(e.position=t.position,this.trigger("positionchange",tS.void)),e.subtitles!==t.subtitles&&(e.subtitles=t.subtitles,this.trigger("subtitleschange",tS.void))}},{key:"handleVolumeMessage",value:function(e,t){e.volume!==t.level&&(e.volume=t.level,e.mute=0===t.level,this.trigger("volumechange",tS.void))}},{key:"handlePlayingMessage",value:function(e){!0!==e.playing&&(e.playing=!0,e.playbackFinished=!1,this.trigger("playingchange",tS.void))}},{key:"handlePausedMessage",value:function(e){!1!==e.playing&&(e.playing=!1,this.trigger("playingchange",tS.void))}},{key:"handleFinishedMessage",value:function(e){!0!==e.playbackFinished&&(e.playing=!1,e.playbackFinished=!0,this.trigger("playingchange",tS.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",tS.void))}},{key:"handleStoppedMessage",value:function(){this.dispose()}},{key:"loadSource",value:function(e,t){return ok(this,void 0,void 0,$S().m(function n(){var r,i,o;return $S().w(function(n){for(;;)switch(n.n){case 0:if(this.localState.videoSource!==e||this.localState.subtitleSource!==t){n.n=1;break}return n.a(2);case 1:return n.p=1,r=this.getDevice().id,i=this.getPosition(),this.localState.videoSource=e,this.localState.subtitleSource=t,this.localState.ready=!1,n.n=2,this.client.joinRoom(r);case 2:return n.n=3,this.client.loadQueue({title:this.getTitle(),roomId:r,videoSource:e,subtitleSource:t});case 3:this.localState.ready=!0,this.trigger("sourceloaded",tS.void),i>0&&this.seek(i),t&&this.setSubtitles(t),n.n=5;break;case 4:n.p=4,o=n.v,console.error(o),this.trigger("error",new Error("Could not load video on Vivi device"));case 5:return n.a(2)}},n,this,[[1,4]])}))}},{key:"play",value:function(){this.localState.ready&&!0!==this.localState.playing&&(this.localState.playing=!0,this.client.play(this.getDevice().id),this.trigger("playingchange",tS.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",tS.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",tS.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",tS.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",tS.void))}},{key:"setSubtitles",value:function(e){return ok(this,void 0,void 0,$S().m(function t(){var n;return $S().w(function(t){for(;;)switch(t.n){case 0:if(this.localState.ready){t.n=1;break}return t.a(2);case 1:if(!e){t.n=2;break}return t.n=2,this.loadSource(this.localState.videoSource,e);case 2:n=!!e,this.localState.subtitles!==n&&(this.localState.subtitles=n,this.client.setSubtitles(this.getDevice().id,n),this.trigger("subtitleschange",tS.void));case 3:return t.a(2)}},t,this)}))}},{key:"isPlaying",value:function(){return this.localState.playing}},{key:"isPlaybackFinished",value:function(){return this.localState.playbackFinished}},{key:"getPosition",value:function(){return this.localState.position}},{key:"getDuration",value:function(){return this.localState.duration}},{key:"getVolume",value:function(){return this.localState.volume}},{key:"getMuted",value:function(){return this.localState.mute}},{key:"getSubtitles",value:function(){if(this.localState.subtitles)return this.localState.subtitleSource}},{key:"getDevice",value:function(){return this.localState.device}},{key:"getTitle",value:function(){return this.localState.title}}],r&&XS(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(eS);function uk(e){return uk="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},uk(e)}function lk(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return ck(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return o=t,u=0,l=e,p.n=n,a}};function y(n,r){for(u=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],y=p.p,h=o[2];n>3?(i=h===r)&&(l=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=y&&((i=n<2&&y<o[1])?(u=0,p.v=r,p.n=o[1]):y<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,h),u=s,l=h;(t=u<2?e:l)||!f;){o||(u?u<3?(u>1&&(p.n=-1),y(u,l)):p.n=l:p.v=l);try{if(c=2,o){if(u||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==a)break}catch(t){o=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(ck(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ck(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,ck(f,"constructor",c),ck(c,"constructor",l),l.displayName="GeneratorFunction",ck(c,i,"GeneratorFunction"),ck(f),ck(f,i,"Generator"),ck(f,r,function(){return this}),ck(f,"toString",function(){return"[object Generator]"}),(lk=function(){return{w:o,m:p}})()}function ck(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}ck=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){ck(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},ck(e,t,n,r)}function sk(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,fk(r.key),r)}}function fk(e){var t=function(e){if("object"!=uk(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=uk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==uk(t)?t:t+""}function pk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pk=function(){return!!e})()}function yk(){return yk="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=hk(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}},yk.apply(null,arguments)}function hk(e){return hk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hk(e)}function vk(e,t){return vk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vk(e,t)}var dk=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},mk=1e4,bk=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=hk(t),function(e,t){if(t&&("object"==uk(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pk()?Reflect.construct(t,n||[],hk(e).constructor):t.apply(e,n))}(this,t)).options=e,n.accessToken="",n.devices=[],n.devicesFingerprint="",n.deviceDiscovery=new lS,n.bindFunctions(),n.initialize(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vk(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.sendMessage=this.sendMessage.bind(this),this.sendMessageDebounced=br(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 GS(this.options.url),this.webSocket.onMessage=function(t){return e.trigger("message",JSON.parse(t.data))},this.webSocket.onOpen=function(){return dk(e,void 0,void 0,lk().m(function e(){var t;return lk().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,this.options.fetchAccessToken();case 1:return this.accessToken=e.v,e.n=2,this.authenticateWithVivi();case 2:this.beginDeviceDiscovery(),this.trigger("connected",tS.void),e.n=4;break;case 3:e.p=3,t=e.v,console.error(t),this.trigger("error",new Error("Could not connect to Vivi"));case 4:return e.a(2)}},e,this,[[0,3]])}))}}},{key:"sendMessage",value:function(e){var t;null===(t=this.webSocket)||void 0===t||t.send(JSON.stringify(e))}},{key:"beginDeviceDiscovery",value:function(){var e=this;this.deviceDiscovery.every(1e4).schedule(function(){return dk(e,void 0,void 0,lk().m(function e(){var n,r,i,o,a;return lk().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,this.getRoomList();case 1:if(n=e.v,(r=t.calculateFingerprint(n))!==this.devicesFingerprint){e.n=2;break}return e.a(2);case 2:i=new Set(n.map(function(e){var t;return null!==(t=e.organisation)&&void 0!==t?t:""})).size,o=new Set(n.map(function(e){var t;return null!==(t=e.location)&&void 0!==t?t:""})).size,this.devices=n.map(function(e){return{id:e.id,name:e.name,schoolName:i>1?e.organisation:"",description:o>1?e.location:"",type:zO.Vivi,status:VO.Available}}),this.devicesFingerprint=r,this.trigger("deviceschange",tS.void),e.n=4;break;case 3:e.p=3,a=e.v,console.warn(a);case 4:return e.a(2)}},e,this,[[0,3]])}))}).trigger().start()}},{key:"dispose",value:function(){var e,n,r,i;this.deviceDiscovery.stop(),null===(e=this.webSocket)||void 0===e||e.dipose(),(n=t,r=this,"function"==typeof(i=yk(hk(1&3?n.prototype:n),"dispose",r))?function(e){return i.apply(r,e)}:i)([])}},{key:"canCastToDevice",value:function(e){return e===zO.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new ak(this,e)}},{key:"authenticateWithVivi",value:function(){return dk(this,void 0,void 0,lk().m(function e(){return lk().w(function(e){for(;;)switch(e.n){case 0:return this.sendMessage({destination:"relay",message:{token:this.accessToken,type:"identify_video_api"}}),e.n=1,this.one("message",function(e){return"video_api_identified"===e.message.type}).timeout(mk).catch(function(){throw new Error("Failed to authenticate with Vivi")});case 1:return e.a(2)}},e,this)}))}},{key:"getRoomList",value:function(){return dk(this,void 0,void 0,lk().m(function e(){var t;return lk().w(function(e){for(;;)switch(e.n){case 0:return this.sendMessage({destination:"relay",message:{type:"video_api_rooms"}}),e.n=1,this.one("message",function(e){return"video_api_rooms"===e.message.type}).timeout(mk).catch(function(){throw new Error("Failed to fetch rooms")});case 1:return t=e.v,e.a(2,t.message.rooms||[])}},e,this)}))}},{key:"joinRoom",value:function(e){return dk(this,void 0,void 0,lk().m(function t(){return lk().w(function(t){for(;;)switch(t.n){case 0:return this.sendMessage({destination:"relay",message:{destination_type:"box",new_destination:e,token:this.accessToken,type:"connect"}}),t.n=1,this.one("message",function(t){return t.source===e&&"connect"===t.message.type||"error"===t.message.type&&"already_connected"===t.message.error_type||void 0}).timeout(mk).catch(function(){throw new Error("Failed to join room")});case 1:return t.a(2)}},t,this)}))}},{key:"query",value:function(e){return dk(this,void 0,void 0,lk().m(function n(){var r;return lk().w(function(n){for(;;)switch(n.n){case 0:return r=t.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:r,name:"query"}}),n.n=1,this.one("message",function(e){return e.message.ack_id===r}).timeout(mk).catch(function(){throw new Error("Failed to fetch query")});case 1:return n.a(2,n.v)}},n,this)}))}},{key:"loadQueue",value:function(e){var n=e.roomId,r=e.title,i=e.videoSource,o=e.subtitleSource;return dk(this,void 0,void 0,lk().m(function e(){return lk().w(function(e){for(;;)switch(e.n){case 0:return this.sendMessage({destination:n,message:{type:"message_with_ack",ack_id:t.createAckId(),name:"queue_load",payload:{urls:[{title:r,url:i,suburl:o}]}}}),e.n=1,this.one("message",function(e){var t;return e.source===n&&"ready"===(null===(t=e.message.payload)||void 0===t?void 0:t.event)}).timeout(mk).catch(function(){throw new Error("Failed to load media")});case 1:return e.a(2)}},e,this)}))}},{key:"play",value:function(e){return dk(this,void 0,void 0,lk().m(function t(){return lk().w(function(t){for(;;)switch(t.n){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_play",payload:{}}}),t.n=1,this.one("message",function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(mk).catch(function(){throw new Error("Failed to play video")});case 1:return t.a(2)}},t,this)}))}},{key:"pause",value:function(e){return dk(this,void 0,void 0,lk().m(function t(){return lk().w(function(t){for(;;)switch(t.n){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_pause"}}),t.n=1,this.one("message",function(t){var n;return t.source===e&&"paused"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(mk).catch(function(){throw new Error("Failed to pause video")});case 1:return t.a(2)}},t,this)}))}},{key:"stop",value:function(e){return dk(this,void 0,void 0,lk().m(function t(){return lk().w(function(t){for(;;)switch(t.n){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_stop"}}),t.n=1,this.one("message",function(t){var n;return t.source===e&&"stopped"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(mk).catch(function(){throw new Error("Failed to stop video")});case 1:return t.a(2)}},t,this)}))}},{key:"seek",value:function(e,t){return dk(this,void 0,void 0,lk().m(function n(){return lk().w(function(n){for(;;)switch(n.n){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"video_seek",payload:{position:t}}})){n.n=1;break}return n.n=1,this.one("message",function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(mk).catch(function(){throw new Error("Failed to seek video")});case 1:return n.a(2)}},n,this)}))}},{key:"setVolume",value:function(e,t){return dk(this,void 0,void 0,lk().m(function n(){return lk().w(function(n){for(;;)switch(n.n){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"set_volume",payload:{volume:t}}})){n.n=1;break}return n.n=1,this.one("message",function(t){var n;return t.source===e&&"volume"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(mk).catch(function(){throw new Error("Failed to set volume")});case 1:return n.a(2)}},n,this)}))}},{key:"setMuted",value:function(e,t){return dk(this,void 0,void 0,lk().m(function n(){return lk().w(function(n){for(;;)switch(n.n){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"set_mute",payload:{mute:t}}}),n.n=1,this.one("message",function(t){var n;return t.source===e&&"mute"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(mk).catch(function(){throw new Error("Failed to set mute")});case 1:return n.a(2)}},n,this)}))}},{key:"setSubtitles",value:function(e,n){return dk(this,void 0,void 0,lk().m(function r(){var i;return lk().w(function(r){for(;;)switch(r.n){case 0:return i=t.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:i,name:"set_subtitles",payload:{subtitles:n}}}),r.n=1,this.one("message",function(t){var n;return t.source===e&&"subtitles"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)}).timeout(mk).catch(function(){throw new Error("Failed to set subtitles")});case 1:return r.a(2)}},r,this)}))}}],i=[{key:"createAckId",value:function(){return CO()}},{key:"calculateFingerprint",value:function(e){return e.map(function(e){return e.id}).sort().join(",")}}],r&&sk(n.prototype,r),i&&sk(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(eS);function gk(e){return gk="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},gk(e)}function wk(e){return function(e){if(Array.isArray(e))return Ok(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 Ok(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ok(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 Ok(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Sk(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,kk(r.key),r)}}function kk(e){var t=function(e){if("object"!=gk(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gk(t)?t:t+""}function Pk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pk=function(){return!!e})()}function jk(){return jk="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Nk(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}},jk.apply(null,arguments)}function Nk(e){return Nk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nk(e)}function Ck(e,t){return Ck=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ck(e,t)}var Tk=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Nk(t),function(e,t){if(t&&("object"==gk(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pk()?Reflect.construct(t,n||[],Nk(e).constructor):t.apply(e,n))}(this,t)).instanceId=e,n.clients=[],n.bindFunctions(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ck(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.addClient=this.addClient.bind(this),this.hasInstanceOfClient=this.hasInstanceOfClient.bind(this),this.startCastSession=this.startCastSession.bind(this),this.gatherAndPublishDevices=this.gatherAndPublishDevices.bind(this),this.dispose=this.dispose.bind(this)}},{key:"addClient",value:function(e){var t=this;e.on("deviceschange",this.gatherAndPublishDevices),e.on("error",function(e){return t.trigger("error",e)}),this.clients.push(e)}},{key:"hasInstanceOfClient",value:function(e){return this.clients.some(function(t){return t instanceof e})}},{key:"startCastSession",value:function(e){var t=this;if(this.castSession){if(this.castSession.getDevice().id===e.device.id)return void console.info("A session with device ".concat(e.device.id," already exists - this is a no-op"));this.castSession.dispose()}var n=this.clients.find(function(t){return t.canCastToDevice(e.device.type)});n&&(this.castSession=n.startCastSession(e),this.castSession.on("error",function(e){t.castSession.dispose(),t.trigger("error",e)}),this.castSession.on("dispose",function(){t.castSession=void 0,t.trigger("castsessionchange",void 0)}),this.trigger("castsessionchange",this.castSession))}},{key:"getCastSession",value:function(){return this.castSession}},{key:"gatherAndPublishDevices",value:function(){var e=this.clients.map(function(e){return e.getDevices()}).reduce(function(e,t){return[].concat(wk(e),wk(t))},[]);this.trigger("deviceschange",e)}},{key:"dispose",value:function(){var e,n,r,i;null===(e=this.castSession)||void 0===e||e.dispose(),this.clients.forEach(function(e){return e.dispose()}),this.castSession=void 0,this.clients=[],(n=t,r=this,"function"==typeof(i=jk(Nk(1&3?n.prototype:n),"dispose",r))?function(e){return i.apply(r,e)}:i)([])}}],i=[{key:"getOrCreateInstance",value:function(e){if(!e)throw new Error("instanceId is required");return this.instances[e]||(this.instances[e]=new t(e)),this.instances[e]}},{key:"disposeAndRemoveInstance",value:function(e){e.dispose(),delete this.instances[e.instanceId]}},{key:"isActive",value:function(){return Object.keys(this.instances).length>0}}],r&&Sk(n.prototype,r),i&&Sk(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(eS);function Ek(e){return Ek="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},Ek(e)}function _k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Rk(r.key),r)}}function Rk(e){var t=function(e){if("object"!=Ek(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ek(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ek(t)?t:t+""}function Ik(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ik=function(){return!!e})()}function xk(e,t,n,r){var i=Mk(Lk(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Mk(){return Mk="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Lk(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}},Mk.apply(null,arguments)}function Lk(e){return Lk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lk(e)}function Bk(e,t){return Bk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bk(e,t)}Tk.instances={};var Dk=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Lk(t),function(e,t){if(t&&("object"==Ek(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ik()?Reflect.construct(t,n||[],Lk(e).constructor):t.apply(e,n))}(this,t,[e,n])).isVisible=r.isVisible.bind(r),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bk(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e,n,r=xk(t,"createEl",this,3)(["li",{className:"vjs-menu-item cv-device-menu-item"}]),i=Nn.Z.dom.createEl("div",{className:"cv-device-menu-item-body",innerHTML:'\n <span class="cv-device-icon '.concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[this.options_.type],'"></span>\n <div>\n <span class="vjs-menu-item-text">').concat(this.options_.label,'</span>\n <span class="vjs-menu-item-text cv-device-truncated-text">').concat(null!==(e=this.options_.schoolName)&&void 0!==e?e:"",'</span>\n <span class="vjs-menu-item-text cv-device-truncated-text cv-device-description">').concat(null!==(n=this.options_.description)&&void 0!==n?n:"","</span>\n </div>\n ")});return r.replaceChildren(i),r}},{key:"handleClick",value:function(){this.options_.onClick()}},{key:"show",value:function(){xk(t,"show",this,3)([])}},{key:"hide",value:function(){xk(t,"hide",this,3)([])}},{key:"isVisible",value:function(){return!xk(t,"hasClass",this,3)(["vjs-hidden"])}}])&&_k(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("MenuItem"));function Ak(e){return Ak="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},Ak(e)}function Fk(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,zk(r.key),r)}}function zk(e){var t=function(e){if("object"!=Ak(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ak(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ak(t)?t:t+""}function Vk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vk=function(){return!!e})()}function Zk(e){return Zk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zk(e)}function Uk(e,t){return Uk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uk(e,t)}var Gk=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Zk(t),function(e,t){if(t&&("object"==Ak(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vk()?Reflect.construct(t,n||[],Zk(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uk(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e=sf.apply(this),t=this.contentEl_;return this.contentWrapper=Nn.Z.dom.createEl("div",{className:"vjs-menu-content"}),e.className="vjs-menu cv-devices-menu",t.className="cv-devices-menu-item-list",e.removeChild(t),e.appendChild(this.contentWrapper),this.contentWrapper.appendChild(t),this.simpleBar=new lf.Z(t,{autoHide:!1}),e}},{key:"addCta",value:function(e){this.ctaElement?console.warn("CTA has already been added to the menu - this is a no-op"):(this.ctaElement=e.el(),this.contentWrapper.prepend(this.ctaElement),this.el().classList.add("has-cta"))}},{key:"removeCta",value:function(){this.ctaElement&&(this.contentWrapper.removeChild(this.ctaElement),this.el().classList.remove("has-cta"))}}])&&Fk(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Menu"));function Kk(e){var t=e.inactiveIntegrations,n=e.canUserManageIntegrations,r=e.player,o=e.onDismiss,a=e.onInstall,u=e.onLearnMore,l=e.onContactSupport;if(0===t.length)return i.createElement(i.Fragment,null);var c,s=function(e){return r.localize(e)},f=function(e){return-1!==t.indexOf(e)};return c=f(zO.AppleTv)&&f(zO.Vivi)?"vivi_and_apple_tv":f(zO.Vivi)?"vivi":"apple_tv",i.createElement("div",{className:"cv-devices-cta",tabIndex:-1},i.createElement(qk,{context:c,localize:s,onDismiss:function(){return o(c)}}),i.createElement(Hk,{context:c}),i.createElement(Wk,{context:c,canUserManageIntegrations:n,localize:s,onContactSupport:function(){return l(c)},onInstall:function(){return a(c)},onLearnMore:function(){return u(c)}}))}function qk(e){var t=e.context,n=e.localize,r=e.onDismiss;return i.createElement("div",{className:"cv-devices-cta-header"},i.createElement("span",{className:"cv-devices-badge"},n("New")),i.createElement("span",{className:"cv-devices-title"},"vivi_and_apple_tv"===t&&n("Cast to Vivi and Apple TV"),"vivi"===t&&n("Cast to Vivi"),"apple_tv"===t&&n("Cast to Apple TV")),i.createElement("span",{className:"cv-devices-close",onClick:r},i.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"white",d:"M11.9588 10.6413L16.3612 6.34478C16.7361 5.97191 17.3439 5.97191 17.7188 6.34478C18.0937 6.71764 18.0937 7.32218 17.7188 7.69505L13.3165 11.9916L17.7188 16.3701C18.0937 16.7429 18.0937 17.3475 17.7188 17.7203C17.3439 18.0932 16.7361 18.0932 16.3612 17.7203L11.9588 13.3419L7.63882 17.7203C7.26392 18.0932 6.65608 18.0932 6.28118 17.7203C5.90627 17.3475 5.90627 16.7429 6.28118 16.3701L10.6012 11.9916L6.28118 7.62993C5.90627 7.25706 5.90627 6.65252 6.28118 6.27965C6.65608 5.90678 7.26392 5.90678 7.63882 6.27965L11.9588 10.6413Z"}))))}function Hk(e){var t=e.context,n="vivi_and_apple_tv"===t?"bg-vivi-and-apple":"vivi"===t?"bg-vivi":"bg-apple";return i.createElement("div",{className:"cv-devices-cta-body ".concat(n)},("vivi_and_apple_tv"===t||"apple_tv"===t)&&i.createElement("div",{className:"cv-devices-icon-container"},i.createElement("span",{className:"cv-devices-icon apple"})),("vivi_and_apple_tv"===t||"vivi"===t)&&i.createElement("div",{className:"cv-devices-icon-container"},i.createElement("span",{className:"cv-devices-icon vivi"})))}function Wk(e){var t=e.context,n=e.canUserManageIntegrations,r=e.localize,o=e.onInstall,a=e.onLearnMore,u=e.onContactSupport;return n?i.createElement("div",{className:"cv-devices-cta-footer"},i.createElement("span",null,"vivi_and_apple_tv"===t&&r("Discover our new device integrations to make presenting in the classroom easy!"),"vivi"===t&&r("Discover our new Vivi integration."),"apple_tv"===t&&r("Discover our new Apple TV integration.")),i.createElement("br",null),i.createElement("span",{className:"cv-devices-link",onClick:o},r("Click here to install"))):i.createElement("div",{className:"cv-devices-cta-footer"},i.createElement("span",null,"vivi_and_apple_tv"===t&&r("Cast to Vivi and Apple TV is now available! Please contact "),"vivi"===t&&r("Cast to Vivi is now available! Please contact "),"apple_tv"===t&&r("Cast to Apple TV is now available! Please contact ")),i.createElement("span",{className:"cv-devices-link",onClick:u},"ClickView Support"),i.createElement("span",null,"vivi_and_apple_tv"===t&&r(" or your administrator to set up Apple TV and Vivi."),"vivi"===t&&r(" or your administrator to set up Vivi."),"apple_tv"===t&&r(" or your administrator to set up Apple TV.")),i.createElement("br",null),i.createElement("span",{className:"cv-devices-link",onClick:a},"Learn more"))}function Qk(e){return Qk="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},Qk(e)}function Yk(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){if("object"!=Qk(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qk(t)?t:t+""}function Jk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jk=function(){return!!e})()}function Xk(e,t,n,r){var i=eP(tP(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function eP(){return eP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=tP(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}},eP.apply(null,arguments)}function tP(e){return tP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tP(e)}function nP(e,t){return nP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nP(e,t)}Nn.Z.registerComponent("DevicesMenu",Gk),Nn.Z.registerComponent("DevicesCta",xv(function(e,t){return i.createElement(Kk,Object.assign({player:e},t))},{properties:{className:"cv-devices-cta-wrapper"}}));var rP=Nn.Z.getComponent("DevicesCta"),iP=Nn.Z.getComponent("MenuButton"),oP=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=tP(t),function(e,t){if(t&&("object"==Qk(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Jk()?Reflect.construct(t,n||[],tP(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-devices-menu-button",r.searchText="",r.devices=[],r.castSession=void 0,r.bindFunctions(),r.bindEventListeners(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nP(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.setDevices=this.setDevices.bind(this),this.setCastSession=this.setCastSession.bind(this),this.setSearchText=this.setSearchText.bind(this),this.getDeviceMenuItems=this.getDeviceMenuItems.bind(this),this.showNotificationBadge=this.showNotificationBadge.bind(this),this.hideNotificationBadge=this.hideNotificationBadge.bind(this),this.render=this.render.bind(this),this.removeMenuItems=this.removeMenuItems.bind(this),this.addMenuItemsForDevices=this.addMenuItemsForDevices.bind(this),this.shouldShowSearchInput=this.shouldShowSearchInput.bind(this),this.toggleSearchInput=this.toggleSearchInput.bind(this),this.toggleDeviceMenuItems=this.toggleDeviceMenuItems.bind(this),this.toggleEmptyStatePlaceholder=this.toggleEmptyStatePlaceholder.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("button"),n=function(t){e.menu.handleBlur(t)};t.addEventListener("blur",n),this.one("dispose",function(){var r;t.removeEventListener("blur",n),null===(r=e.cta)||void 0===r||r.dispose()})}},{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=iP.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(Xk(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createMenu",value:function(){var e=this,t=new Gk(this.player_,{menuButton:this});if(!this.options_.ctaOptions.hasBeenDismissed&&this.options_.ctaOptions.inactiveIntegrations.length>0){var n=this.options_.ctaOptions,r=n.onDismiss,i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(n,["onDismiss"]);this.cta=new rP(this.player(),Object.assign(Object.assign({},i),{onDismiss:function(n){e.hideNotificationBadge(),t.removeCta(),r(n)}})),this.showNotificationBadge(),t.addCta(this.cta)}return this.createItems().forEach(function(e){return t.addItem(e)}),t}},{key:"createItems",value:function(){var e=this,t=[];return this.headingItem=new Qn(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new Ir(this.player_,{menuButton:this,search:function(t){return e.setSearchText(t)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new xr(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;Xk(t,"pressButton",this,3)([]),this.shouldShowSearchInput()&&(null===(e=this.searchInputItem)||void 0===e||e.focus())}},{key:"setDevices",value:function(e){this.devices=e,this.render()}},{key:"setCastSession",value:function(e){this.castSession=e,this.render()}},{key:"setSearchText",value:function(e){this.searchText=e,this.render()}},{key:"getDeviceMenuItems",value:function(){return this.menu.children_.filter(function(e){return e instanceof Dk})}},{key:"showNotificationBadge",value:function(){this.addClass("notification-badge")}},{key:"hideNotificationBadge",value:function(){this.removeClass("notification-badge")}},{key:"render",value:function(){this.removeMenuItems(this.getDeviceMenuItems()),this.addMenuItemsForDevices(this.devices),this.toggleSearchInput(),this.toggleDeviceMenuItems(),this.toggleEmptyStatePlaceholder()}},{key:"removeMenuItems",value:function(e){var t=this;e.forEach(function(e){t.menu.removeChild(e),e.dispose()})}},{key:"addMenuItemsForDevices",value:function(e){var t=this;e.sort(function(e,t){var n,r,i,o,a="".concat(e.type).concat(null!==(n=e.schoolName)&&void 0!==n?n:"").concat(null!==(r=e.description)&&void 0!==r?r:"").concat(e.name),u="".concat(t.type).concat(null!==(i=t.schoolName)&&void 0!==i?i:"").concat(null!==(o=t.description)&&void 0!==o?o:"").concat(t.name);return a.localeCompare(u)}).forEach(function(e){var n=new Dk(t.player(),{id:e.id,label:e.name,schoolName:e.schoolName,description:e.description,selected:!1,multiSelectable:!1,selectable:!0,available:e.status===VO.Available,type:e.type,onClick:function(){t.options_.onDeviceMenuItemClick(n,e)}});t.menu.addItem(n)})}},{key:"shouldShowSearchInput",value:function(){return this.getDeviceMenuItems().length>=20}},{key:"toggleSearchInput",value:function(){this.shouldShowSearchInput()?(this.searchInputItem.show(),this.menu.addClass("vertical-fill")):(this.searchInputItem.hide(),this.menu.removeClass("vertical-fill"))}},{key:"toggleDeviceMenuItems",value:function(){var e=this,t=this.getDeviceMenuItems(),n=this.shouldShowSearchInput(),r=this.searchText.toLowerCase();t.forEach(function(t){var i,o,a,u=e.devices.find(function(e){return e.id===t.options_.id});if(u){var l=u.status===VO.Available,c=u.id===(null===(i=e.castSession)||void 0===i?void 0:i.getDevice().id),s=!n||-1!=="".concat(u.name," ").concat(null!==(o=u.schoolName)&&void 0!==o?o:""," ").concat(null!==(a=u.description)&&void 0!==a?a:"").trim().toLowerCase().indexOf(r);l?t.enable():t.disable(),s?t.show():t.hide(),c?t.selected(!0):t.selected(!1)}})}},{key:"toggleEmptyStatePlaceholder",value:function(){var e=this.getDeviceMenuItems();e.filter(function(e){return e.isVisible()}).length?this.emptyPlaceholder.hide():this.emptyPlaceholder.show(),e.length?this.emptyPlaceholder.setLabel(this.localize("No matching results")):this.emptyPlaceholder.setLabel(this.localize("No devices found"))}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){var e,t;return null!==(t=null===(e=this.castSession)||void 0===e?void 0:e.getDevice().name)&&void 0!==t?t:" "}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){this.handleClick()}},{key:"handleClick",value:function(){Xk(t,"handleClick",this,3)([null]),this.options_.onClick()}}],r&&Yk(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(iP);function aP(e){return aP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aP(e)}function uP(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,lP(r.key),r)}}function lP(e){var t=function(e){if("object"!=aP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=aP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==aP(t)?t:t+""}function cP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cP=function(){return!!e})()}function sP(){return sP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=fP(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}},sP.apply(null,arguments)}function fP(e){return fP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fP(e)}function pP(e,t){return pP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pP(e,t)}oP.prototype.controlText_="Devices",Nn.Z.registerComponent("DevicesButton",oP);var yP=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=fP(t),function(e,t){if(t&&("object"==aP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cP()?Reflect.construct(t,n||[],fP(e).constructor):t.apply(e,n))}(this,t,[null,e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pP(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=sP(fP(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{className:"cv-devices-tech"}]);var e,n,r}},{key:"setPoster",value:function(e){this.poster=e,this.update()}},{key:"setDevice",value:function(e){this.device=e,this.update()}},{key:"update",value:function(){var e,t,n,r,i=this;this.el_.innerHTML='\n <div class="cv-devices-content">\n <p>'.concat(this.localize("Currently playing on"),'</p>\n <h2><span class="cv-device-icon ').concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[null!==(t=null===(e=this.device)||void 0===e?void 0:e.type)&&void 0!==t?t:zO.Vivi],'"></span>').concat(null!==(r=null===(n=this.device)||void 0===n?void 0:n.name)&&void 0!==r?r:"",'</h2>\n </div>\n <div class="cv-devices-background" style="background-image: url(').concat(this.poster,')"></div>\n ');var o=document.createElement("button"),a=function(e){e.stopPropagation(),i.options_.onStopCasting()};o.onclick=a,o.ontouchstart=a,o.className="stop-casting-button",o.innerHTML=this.localize("Stop casting"),this.el_.querySelector(".cv-devices-content").appendChild(o)}},{key:"play",value:function(){}}],r&&uP(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("Component"));function hP(e){return hP="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},hP(e)}function vP(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,dP(r.key),r)}}function dP(e){var t=function(e){if("object"!=hP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hP(t)?t:t+""}function mP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mP=function(){return!!e})()}function bP(e,t,n,r){var i=gP(wP(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function gP(){return gP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=wP(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}},gP.apply(null,arguments)}function wP(e){return wP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wP(e)}function OP(e,t){return OP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},OP(e,t)}var SP=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=wP(t),function(e,t){if(t&&("object"==hP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,mP()?Reflect.construct(t,n||[],wP(e).constructor):t.apply(e,n))}(this,t,[e,n])).featuresVolumeControl=!0,r.featuresPlaybackRate=!1,r.movingMediaElementInDOM=!1,r.featuresFullscreenResize=!0,r.featuresTimeupdateEvents=!0,r.featuresProgressEvents=!1,r.featuresNativeTextTracks=!1,r.featuresNativeAudioTracks=!1,r.featuresNativeVideoTracks=!1,r.featuresMuteControl=!0,r.featuresSourceset=!1,r.videojsPlayer=(0,Nn.Z)(r.options_.playerId),r.bindFunctions(),r.bindEventListeners(),r.ready(function(){r.setSource(r.options_.source)}),r.triggerReady(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OP(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.onTextTrackChanged=this.onTextTrackChanged.bind(this),this.getSelectedTextTrack=this.getSelectedTextTrack.bind(this),this.setSelectedTextTrack=this.setSelectedTextTrack.bind(this),this.showUI=this.showUI.bind(this),this.hideUI=this.hideUI.bind(this),this.dispose=this.dispose.bind(this),this.setSource=this.setSource.bind(this),this.getCastSession=this.getCastSession.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.getCastSession();t&&(this.textTracks().on("change",this.onTextTrackChanged),this.videojsPlayer.one("ended",function(){t.dispose()}),t.on("durationchange",function(){e.trigger("durationchange")}),t.on("dispose",function(){e.trigger("ended"),e.hideUI()}),t.on("playingchange",function(){t.isPlaying()?(e.trigger("play"),e.trigger("playing")):e.trigger("pause")}),t.on("volumechange",function(){e.trigger("volumechange")}),t.on("sourceloaded",function(){e.trigger("loadeddata")}),t.on("subtitleschange",function(){e.setSelectedTextTrack(t.getSubtitles())}))}},{key:"onTextTrackChanged",value:function(){var e,t=this.getSelectedTextTrack();null===(e=this.getCastSession())||void 0===e||e.setSubtitles(null==t?void 0:t.src)}},{key:"getSelectedTextTrack",value:function(){return mr.findTrackByPredicate(this.videojsPlayer.player_,function(e){return"showing"===e.mode&&!!e.src})}},{key:"setSelectedTextTrack",value:function(e){mr.forEachTrack(this.videojsPlayer.player_,function(t){"subtitles"===t.kind&&(t.src===e?t.mode="showing":t.mode="disabled")})}},{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(),bP(t,"cleanupAutoTextTracks",this,3)([]),bP(t,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=this;return this.ui=this.ui||new yP({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 bP(t,"addRemoteTextTrack",this,3)([e,!0])}},{key:"getCastSession",value:function(){var e;return Tk.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 Nn.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(){}}],i=[{key:"canPlayType",value:function(){return""}},{key:"canPlaySource",value:function(e,t){var n;return!!Tk.getOrCreateInstance(null!==(n=null==t?void 0:t.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return Tk.isActive()}}],r&&vP(n.prototype,r),i&&vP(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(Nn.Z.getComponent("Tech"));function kP(e){return kP="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},kP(e)}function PP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jP(r.key),r)}}function jP(e){var t=function(e){if("object"!=kP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kP(t)?t:t+""}function NP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(NP=function(){return!!e})()}function CP(){return CP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=TP(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}},CP.apply(null,arguments)}function TP(e){return TP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},TP(e)}function EP(e,t){return EP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},EP(e,t)}Nn.Z.registerTech("devices",SP);var _P=function(e){function t(e,n){var r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=TP(t),function(e,t){if(t&&("object"==kP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,NP()?Reflect.construct(t,n||[],TP(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,r.instanceId=null!==(o=null===(i=r.player.options_.devices)||void 0===i?void 0:i.instanceId)&&void 0!==o?o:"",r.bindFunctions(),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&EP(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.onReady=this.onReady.bind(this),this.onDevicesChanged=this.onDevicesChanged.bind(this),this.onCastSessionChanged=this.onCastSessionChanged.bind(this),this.onDevicesError=this.onDevicesError.bind(this),this.addViviClient=this.addViviClient.bind(this),this.addAppleTvClient=this.addAppleTvClient.bind(this),this.reloadTech=this.reloadTech.bind(this),this.getSessionManager=this.getSessionManager.bind(this),this.dispose=this.dispose.bind(this)}},{key:"initialize",value:function(){this.player.ready(this.onReady)}},{key:"onReady",value:function(){var e=this,t=this.player.getChild("collapserator"),n=null==t?void 0:t.children().findIndex(function(e){return"CustomControlSpacer"===e.name()}),r=null==t?void 0:t.children().findIndex(function(e){return"OpenExternallyButton"===e.name()}),i=Math.max(n,r)+1,o=this.getSessionManager();if(t&&n&&-1!==n&&o){o.on("deviceschange",this.onDevicesChanged),o.on("castsessionchange",this.onCastSessionChanged),o.on("error",this.onDevicesError);var a=this.options.ctaOptions,u=this.options.vivi,l=[];this.options.appleTv.enabled||l.push(zO.AppleTv),u.enabled&&u.accountConnected||l.push(zO.Vivi);var c={onClick:function(){e.addViviClient(o),e.addAppleTvClient(o)},onDeviceMenuItemClick:function(t,n){var r;o.startCastSession({device:n,title:e.options.title}),null===(r=e.options.analyticsService)||void 0===r||r.logUserAction(n,{actionType:Xe.Vw.Select,workflowPhase:Xe.eu.Complete,descriptor:Xe.UX.ChangeDevice,entity:Xe.py.Device,eventVersion:Xe.eq.V3})},ctaOptions:Object.assign(Object.assign({},a),{inactiveIntegrations:l})};this.devicesButton=t.addChild("DevicesButton",c,i)}}},{key:"onDevicesChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setDevices(e)}},{key:"onCastSessionChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setCastSession(e),this.reloadTech(),e?(this.player.addClass("cv-device-casting"),this.player.addClass("cv-device-".concat(e.getDevice().type)),this.player.isFullscreen()&&this.player.exitFullscreen()):(this.player.removeClass("cv-device-casting"),this.player.removeClass("cv-device-".concat(zO.AppleTv)),this.player.removeClass("cv-device-".concat(zO.Vivi)))}},{key:"onDevicesError",value:function(e){this.player.error(e.message),this.player.pause()}},{key:"addViviClient",value:function(e){if(this.options.vivi.enabled&&this.options.vivi.accountConnected&&this.options.vivi.apiUrl&&!e.hasInstanceOfClient(bk)){var t=new bk({url:this.options.vivi.apiUrl,fetchAccessToken:this.options.vivi.fetchAccessToken});e.addClient(t)}}},{key:"addAppleTvClient",value:function(e){if(this.options.appleTv.enabled&&this.options.trackingCode&&this.options.userId&&!e.hasInstanceOfClient(FS)){var t=new FS({fetchAccessToken:this.options.appleTv.fetchAccessToken,trackingCode:this.options.trackingCode,userId:this.options.userId});e.addClient(t)}}},{key:"reloadTech",value:function(){var e=this.player,t=e.currentSources(),n=e.volume(),r=e.muted(),i=e.currentTime(),o=e.paused();e.src(t),e.one("playing",function(){e.volume(n),e.muted(r),e.currentTime(i),o?e.pause():e.play()})}},{key:"getSessionManager",value:function(){if(this.instanceId)return Tk.getOrCreateInstance(this.instanceId)}},{key:"dispose",value:function(){var e,n,r,i=this.getSessionManager();i&&(i.off("deviceschange",this.onDevicesChanged),i.off("castsessionchange",this.onCastSessionChanged),i.off("error",this.onDevicesError),Tk.disposeAndRemoveInstance(i),(e=t,n=this,"function"==typeof(r=CP(TP(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([]))}}],r&&PP(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));function RP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function IP(e){var t,n,r,o=(n=i.useState(5),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(n,r)||function(e,t){if(e){if("string"==typeof e)return RP(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?RP(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],u=o[1];if(i.useEffect(function(){var e=setInterval(function(){u(function(e){return e-1})},1e3);return function(){clearInterval(e)}},[]),i.useEffect(function(){0===a&&e.onPlayNext()},[a]),!e.nextVideo||!e.onPlayNext)return i.createElement(i.Fragment,null);var l=Math.ceil(a),c=1===l?"second":"seconds";return i.createElement(i.Fragment,null,i.createElement("div",{className:"cv-up-next-container"},i.createElement("div",{className:"cv-cancel-up-next cursor-pointer",role:"button",onClick:e.onCancel},"×"),i.createElement("div",{className:"cv-up-next-heading"},"Up next in ",l," ",c,":"),i.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,")")}}),i.createElement("div",{className:"cv-up-next-title"},e.nextVideo.name)))}function xP(e){return xP="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},xP(e)}function MP(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,LP(r.key),r)}}function LP(e){var t=function(e){if("object"!=xP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xP(t)?t:t+""}function BP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(BP=function(){return!!e})()}function DP(e,t,n,r){var i=AP(FP(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function AP(){return AP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=FP(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}},AP.apply(null,arguments)}function FP(e){return FP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},FP(e)}function zP(e,t){return zP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zP(e,t)}Nn.Z.registerPlugin("devicesPlugin",_P),Nn.Z.registerComponent("UpNext",xv(function(e,t){return i.createElement(IP,Object.assign({player:e},t))}));var VP=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=FP(t),function(e,t){if(t&&("object"==xP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,BP()?Reflect.construct(t,n||[],FP(e).constructor):t.apply(e,n))}(this,t,[e,n])).bindListeners(),r.player_.nextVideoPlugin().getShouldPlayNext()&&r.toggleOn(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zP(e,t)}(t,e),n=t,(r=[{key:"bindListeners",value:function(){this.onPlayNextChange=this.onPlayNextChange.bind(this),this.player_.on("cv:playnext",this.onPlayNextChange)}},{key:"handleToggle",value:function(){var e=this.player_.nextVideoPlugin().getShouldPlayNext();this.player_.nextVideoPlugin().setShouldPlayNext(!e,!0)}},{key:"onPlayNextChange",value:function(e,t){t?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){Nn.Z.dom.addClass(this.toggleEl,"on")}},{key:"toggleOff",value:function(){Nn.Z.dom.removeClass(this.toggleEl,"on")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,n,r){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=Nn.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var i=DP(t,"createEl",this,3)([e,{className:"vjs-menu-item cv-cog-menu-item cv-play-next-toggle",innerHTML:'\n <span class="vjs-menu-item-text">Play next video</span>\n <span class="cv-toggle-container"></span>'},r]);return i.children[1].appendChild(this.toggleEl),i}},{key:"dispose",value:function(){this.player_.off("cv:playnext",this.onPlayNextChange),DP(t,"dispose",this,3)([])}}])&&MP(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("MenuItem"));function ZP(e){return ZP="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},ZP(e)}function UP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,GP(r.key),r)}}function GP(e){var t=function(e){if("object"!=ZP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ZP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ZP(t)?t:t+""}function KP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(KP=function(){return!!e})()}function qP(){return qP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=HP(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}},qP.apply(null,arguments)}function HP(e){return HP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},HP(e)}function WP(e,t){return WP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},WP(e,t)}Nn.Z.registerComponent("NextVideoMenuItem",VP);var QP="cv-persisttest",YP="cv-play-next-video",$P=Nn.Z.getPlugin("plugin"),JP=(Nn.Z.getComponent("MenuItem"),Nn.Z.getComponent("NextVideoMenuItem")),XP=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=HP(t),function(e,t){if(t&&("object"==ZP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,KP()?Reflect.construct(t,n||[],HP(e).constructor):t.apply(e,n))}(this,t,[e])).setShouldPlayNext=n.setShouldPlayNext.bind(n),n.getShouldPlayNext=n.getShouldPlayNext.bind(n),n.getChapterTrack=n.getChapterTrack.bind(n),n.onTimeUpdate=n.onTimeUpdate.bind(n),n.hasLocalStorage=n.testHasLocalStorage(),n.shouldPlayNextVideo=!1,n.hasLocalStorage){var r=window.localStorage.getItem(YP);n.shouldPlayNextVideo="true"===r}return e.ready(function(){n.initialize()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WP(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.player.isDisposed()||this.bindListeners()}},{key:"getChapterTrack",value:function(){return mr.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({ctor:JP,name:"NextVideoMenuItem"})}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.player.trigger("cv:playnext",e),this.hasLocalStorage&&t&&window.localStorage.setItem(YP,e.toString()),e&&this.player.loopVideoPlugin().loop(!1)}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){var e,n,r;this.player.off("timeupdate",this.onTimeUpdate),this.hideUpNext(),(e=t,n=this,"function"==typeof(r=qP(HP(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"onTimeUpdate",value:function(){this.player.pictureInPicture&&this.player.isInPictureInPicture()||(this.getShouldPlayNext()?this.upNextRendered&&this.player.currentTime()<this.player.duration()?this.hideUpNext():this.player.ended()&&this.showUpNext():this.hideUpNext())}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){e.hideUpNext(),e.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1;var e=this.player.getChild("UpNext");e&&(this.player.removeChild(e),e.dispose())}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem(QP,"persistPlayNext"),window.localStorage.removeItem(QP),!0}catch(e){return!1}}}],r&&UP(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}($P);Nn.Z.registerPlugin("nextVideoPlugin",XP);var ej=n(39202);function tj(e){return tj="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},tj(e)}function nj(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,rj(r.key),r)}}function rj(e){var t=function(e){if("object"!=tj(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tj(t)?t:t+""}function ij(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ij=function(){return!!e})()}function oj(){return oj="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=aj(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}},oj.apply(null,arguments)}function aj(e){return aj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},aj(e)}function uj(e,t){return uj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uj(e,t)}function lj(e){return i.createElement("div",{className:"cv-resource-item"},i.createElement(tn.s,{data:e.resource,imageCdnUrl:e.imageCdnUrl,titlePosition:"above",hideTypeBadge:!0}))}var cj=xv(function(e,t){return i.createElement(lj,Object.assign({},t))}),sj=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=aj(t),function(e,t){if(t&&("object"==tj(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ij()?Reflect.construct(t,n||[],aj(e).constructor):t.apply(e,n))}(this,t,[e,n]);var i=new cj(e,{resource:n.resource,imageCdnUrl:n.imageCdnUrl});return r.addChild(i),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uj(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(e){var n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;return(n=t,r=this,"function"==typeof(i=oj(aj(1&3?n.prototype:n),"createEl",r))?function(e){return i.apply(r,e)}:i)([e,Object.assign(Object.assign({},o),{className:"".concat(o.className," cv-resource-menu-item")}),a])}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}],r&&nj(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("MenuItem"));function fj(e){return fj="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},fj(e)}function pj(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,yj(r.key),r)}}function yj(e){var t=function(e){if("object"!=fj(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fj(t)?t:t+""}function hj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hj=function(){return!!e})()}function vj(e,t,n,r){var i=dj(mj(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function dj(){return dj="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=mj(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}},dj.apply(null,arguments)}function mj(e){return mj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mj(e)}function bj(e,t){return bj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bj(e,t)}var gj=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=mj(t),function(e,t){if(t&&("object"==fj(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hj()?Reflect.construct(t,n||[],mj(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bj(e,t)}(t,e),n=t,(r=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-resources-button-wrapper ".concat(vj(t,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(vj(t,"buildCSSClass",this,3)([]))}},{key:"update",value:function(){vj(t,"update",this,3)([])}},{key:"createItems",value:function(){var e=this,t=[];return t.push(new Qn(this.player_,{label:"Resources"})),this.options_.resources.forEach(function(n){var r=new sj(e.player(),{resource:n,imageCdnUrl:e.options_.imageCdnUrl,downloadResource:function(t){return e.downloadResource(t)},label:n.name});t.push(r)}),t}},{key:"downloadResource",value:function(e){"link"!==e.type?this.getDownloadIframe().src=e.url:ej.Ab.PageLoad(e.url,!0)}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=Nn.Z.dom.createEl("iframe"),this.downloadIframe.style.display="none",Nn.Z.dom.appendContent(Nn.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(){vj(t,"handleClick",this,3)([null])}}])&&pj(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getComponent("MenuButton"));function wj(e){return wj="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},wj(e)}function Oj(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,Sj(r.key),r)}}function Sj(e){var t=function(e){if("object"!=wj(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wj(t)?t:t+""}function kj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(kj=function(){return!!e})()}function Pj(e){return Pj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pj(e)}function jj(e,t){return jj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jj(e,t)}gj.prototype.controlText_="Resources",Nn.Z.registerComponent("ResourcesButton",gj);var Nj=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Pj(t),function(e,t){if(t&&("object"==wj(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kj()?Reflect.construct(t,n||[],Pj(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,e.ready(function(){return r.onReady()}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jj(e,t)}(t,e),n=t,(r=[{key:"onReady",value:function(){if(this.options.resources.length){var e=this.player.getChild("collapserator");e.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},e.children_.length-4)}}}])&&Oj(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn.Z.getPlugin("plugin"));Nn.Z.registerPlugin("resourcesPlugin",Nj);var Cj=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 Tj(e){var t=e.className,n=void 0===t?"":t,r=e.playerApi,o=e.onReady,a=e.onDispose,u=Cj(e,["className","playerApi","onReady","onDispose"]),l=i.useRef(null);return i.useEffect(function(){if(l){var e=new ZO(l.current,Object.assign(Object.assign({},u),{playerApi:r}));return o&&e.ready(function(){o(function(e){return new Proxy(e,{get:function(e,t,n){if("off"===t||!e.isDisposed())return Reflect.get(e,t,n)}})}(e))}),a&&e.one("dispose",a),function(){null==e||e.dispose()}}},[e.viewKey]),i.createElement("div",{ref:l,className:n})}function Ej(e){return function(e){if(Array.isArray(e))return _j(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 _j(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_j(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 _j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Rj(e,t){if(Number.isInteger(+e))return+e;var n=O.M.getVideoProgress(t);return n?n>=t.duration/1e3-We.L.VIDEO_START_TIME_CUTOFF?0:n:0}var Ij=function(){function e(e){if(38===e.keyCode||40===e.keyCode)return e.preventDefault(),!1}i.useEffect(function(){return window.addEventListener("keydown",e,!1),function(){window.removeEventListener("keydown",e,!1)}},[])};const xj={embeddedPlayer:"nFnLE",placeholder:"VurQp"};function Mj(e){var t=i.useRef(null),n=i.useRef(null);Ij();var r=wn();return i.createElement(Tj,{className:e.embed?xj.embeddedPlayer:"",pointsOfInterest:e.pointsOfInterest,onReady:function(i){t.current=i,r(),e.onReady&&e.onReady(i),function(t){n.current=new jn({player:t,video:e.video,analyticsLocation:e.embed?Xe.LZ.EmbeddedPlayer:Xe.LZ.PlayPage})}(i)},viewKey:e.viewKey.viewKey,playerApi:new URL(e.config.playerApiUrl),imageCdnUrl:e.config.imageCdnUrl,autoplay:e.autoplay,startTime:Rj(e.params.t,e.video),hotkeyElQuerySelector:"body"})}var Lj=n(91053),Bj=n(46279);const Dj={closeButton:"cGnwF",dropdown:"BSdpV"};var Aj="shared.curriculumLinks";function Fj(e){var t=e.curriculums,n=t.preferredCurriculum,r=t.availableCurriculums,o=t.curriculumLinks,a=t.updateCurriculum;function u(t){a(t,{shouldLog:!0,locationContext:Xe.LZ.PlayPage,video:e.video})}return(null==o?void 0:o.length)||e.curriculums.mappedCurriculums.length?i.createElement("div",{className:"rounded border position-relative"},i.createElement(Tt.$B,{autoHeight:!0,autoHeightMax:e.height},i.createElement("div",{className:"p-3"},i.createElement("h2",{className:"h6 h-100"},i.createElement(et.x,{namespace:Aj,phrase:"heading"})),i.createElement(Lj.B,{availableCurriculums:r,onChangeCurriculum:u,selectedCurriculum:n,className:Dj.dropdown}),i.createElement(Bj.h,{curriculumLinks:e.curriculums.curriculumLinks,onChangeCurriculum:u,hasCompleted:e.curriculums.hasCompleted,mappedCurriculums:e.curriculums.mappedCurriculums,isFetching:e.curriculums.isFetching,locationContext:Xe.LZ.PlayPage}),!!e.onClickClose&&i.createElement("button",{type:"button",className:"btn-close ".concat(Dj.closeButton),"aria-label":"Close",onClick:e.onClickClose})))):i.createElement(i.Fragment,null)}function zj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Vj(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vj(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 Vj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Zj="shared.playPage",Uj=u.T.encloseNamespace(Zj);function Gj(e){var t=zj(i.useState(),2),n=t[0],r=t[1],o=O.M.getCanBeConsumed(e.video).canConsume,a=O.M.isVideoTypeArchived(e.video),u=jt(e.video,e.glanceTheme),l=i.useRef(!1),c=zj(i.useState({view:"loading",referrer:null}),2),s=c[0],f=c[1];i.useEffect(function(){e.glanceLoaded&&f({view:e.glanceTheme?"v@g":"details",referrer:null})},[e.glanceLoaded,e.glanceTheme]);var p,y,h,v,d,m,b,g=(m=null!==(h=null===(y=(p=e.video).resources)||void 0===y?void 0:y.data)&&void 0!==h?h:[],b=null!==(d=null===(v=p.links)||void 0===v?void 0:v.data)&&void 0!==d?d:[],[].concat(Ej(m),Ej(b))),w=!e.currentUser.isAuthenticated;return i.createElement(et.D.Provider,{value:Zj},a&&i.createElement(cn,null),i.createElement("section",{className:"mb-2"},o&&i.createElement(Mj,{video:e.video,config:e.config,pointsOfInterest:e.pointsOfInterest,viewKey:e.viewKey,onReady:function(e){r(e)},params:e.params,autoplay:!0}),i.createElement("div",{className:w?"":"d-none"},i.createElement(bn,{video:e.video,appLink:{application:Qe.O.VIDEOS,action:He.e.Videos.SIGN_IN_POPUP}}))),i.createElement(vn,{video:e.video,audiences:e.audiences,getSubTextAppLink:e.commonVideoProps.getSubTextAppLink}),i.createElement("section",{className:"".concat("v@g"===s.view?"d-block":"d-none")},i.createElement(Ct,{theme:e.glanceTheme,video:e.video,pointsOfInterest:e.pointsOfInterest,onClickShowDescription:function(){return f({view:"details",referrer:"v@g"})},onClickShowCurriculumLinks:e.curriculums.mappedCurriculums.length&&function(){return f({view:"curriculumLinks",referrer:"v@g"})},setStartTime:function(e){return n.currentTime(e)},getTagAppLink:on.y.tag,suppressInteractivity:!e.currentUser.isAuthenticated})),i.createElement("section",{className:"".concat("details"===s.view?"d-block":"d-none")},i.createElement(Jt,{video:e.video,onLaunchImmersiveReader:function(){l.current=!(null==n?void 0:n.isPaused()),null==n||n.pause()},onExitImmersiveReader:function(){l.current&&(null==n||n.play())},onClickClose:u&&function(){return f({view:"v@g",referrer:"details"})},onClickShowCurriculumLinks:e.curriculums.mappedCurriculums.length&&function(){return f({view:"curriculumLinks",referrer:"details"})},getTagAppLink:on.y.tag,suppressInteractivity:!e.currentUser.isAuthenticated})),i.createElement("section",{className:"".concat("curriculumLinks"===s.view?"d-block pb-3":"d-none")},i.createElement(Fj,{height:We.L.MINIMUM_GLANCE_HEIGHT,curriculums:e.curriculums,onClickClose:function(){return f({view:s.referrer,referrer:"curriculumLinks"})},video:e.video})),i.createElement("section",{className:"".concat("loading"===s.view?"d-block":"d-none")},i.createElement(Xt,null)),!!(null==g?void 0:g.length)&&i.createElement("section",{className:"pb-3"},i.createElement(en.kM,{name:Uj("resources",{count:g.length}),contents:nn.z.PlayPageResources,collection:g,prefetched:!0,childComponent:tn.R,extraChildComponentProps:{imageCdnUrl:e.config.imageCdnUrl,imageErrorFallbackUrl:rn.W.Fallbacks.RESOURCE_THUMBNAIL,actionBehaviour:e.currentUser.isAuthenticated?"normal":"public",location:"play-page",titlePosition:"above",hideTypeBadge:!0},getChildAppLink:w?function(){return{application:Qe.O.VIDEOS,action:He.e.Videos.SIGN_IN_POPUP}}:function(t){var n;return on.y.resource(t,null===(n=e.video)||void 0===n?void 0:n.id)},analyticsOptions:e.currentUser.isAuthenticated?{}:{workflowPhase:Xe.eu.Start,descriptor:Xe.Yu.SignUp},analyticsData:{widgetId:"resources"}})))}var Kj=n(89758),qj=n(45719);var Hj=u.T.encloseNamespace("streamableVideos.play"),Wj={notFound:w,forbidden:{privacy:I}};function Qj(e){var t,n,u,p,y,h,v=(0,$e.U)().commonVideoProps,d=l.a.useBasicFetch(V.R.video(e.id)),m=l.a.useBasicFetch(z.N.currentUser()),b=l.a.useBasicFetch((null===(t=m.data)||void 0===t?void 0:t.isAuthenticated)&&D.createViewKey(e.id,r.MasterObject)),g=l.a.useBasicFetch(M.L.config()),w=l.a.useBasicFetch(L.D.streamableLearning()),O=l.a.useBasicFetch(Ye.g.streamablePresentation()),S=l.a.useBasicFetch(O.data&&x.O.audiencesByPresentationId(O.data.id)),k=!!(null===(u=null===(n=d.data)||void 0===n?void 0:n.glance)||void 0===u?void 0:u.theme),P=l.a.useBasicFetch(k&&F.themeImages(d.data.glance.theme,d.data.glance.type)),j=l.a.useBasicFetch(d.statusCode===o.o.Forbidden&&V.R.video(e.id,s.r.StripMetadata)),N=(0,Kj.M)(e.id),C=function(e){var t=l.a.useGetFetch();function n(t){return V.R.pointsOfInterest(e,t)}return function(e,t){var n=e,r=t,o=(0,qj.P)(e&&function(e){return n(e).key});(0,i.useEffect)(function(){o&&o.shouldInitialFetch&&t&&r()},[null==o?void 0:o.shouldInitialFetch,t]),(0,i.useEffect)(function(){o&&o.nextCursor&&!o.isFetching&&t&&r(o.nextCursor)},[null==o?void 0:o.nextCursor,null==o?void 0:o.isFetching,t])}(!!e&&n,!!e&&function(e){t(n(e))}),(0,qj.P)(!!e&&function(e){return n(e).key})}(e.id);(0,Ke.M)(qe.CG.getVideoMetadata({content:d.data,phraseContext:{phraseHandler:Hj,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:Je.f.getCanonicalLink({customAppLink:{application:Qe.O.VIDEOS,action:He.e.Videos.PLAY_VIDEO,args:[null===(p=d.data)||void 0===p?void 0:p.id,c.m.slugify(null===(y=d.data)||void 0===y?void 0:y.name)]}}),allowIndexing:!0,product:We.L.PRODUCT_NAME})),(0,Ge.v)(d,Wj,{forbidden:!0}),Ue(j);var T=d.data&&(!(null===(h=m.data)||void 0===h?void 0:h.isAuthenticated)||b.data)&&m.hasCompleted&&g.hasCompleted&&C.hasCompleted;return i.useEffect(function(){var e;d.data&&w.data&&((null===(e=d.data.libraries)||void 0===e?void 0:e.data.find(function(e){return e.id===w.data.objectId}))||a.Q.Ry.throw(new f.d))},[d.hasCompleted,w.hasCompleted]),T?i.createElement("div",{className:"px-4"},i.createElement(Gj,{video:d.data,viewKey:b.data,config:g.data,glanceTheme:P.data,glanceLoaded:!k||P.hasCompleted,curriculums:N,currentUser:m.data,pointsOfInterest:C.items,audiences:S.data,params:e.params,commonVideoProps:v})):i.createElement(i.Fragment,null)}},58421:()=>{}}]);
|