@clickview/streamable-learning 0.33.0 → 0.34.1-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/bundles.json +2 -2
- package/dist/css/B-attovs.chunk.css +9 -0
- package/dist/css/B1NucFMn.chunk.css +1 -0
- package/dist/css/BPdg7JW4.chunk.css +1 -0
- package/dist/css/BPrUSCaY.chunk.css +1 -0
- package/dist/css/BR0fUt9D.chunk.css +1 -0
- package/dist/css/BhYm6SRm.chunk.css +1 -0
- package/dist/css/BiRz4h1c.chunk.css +1 -0
- package/dist/css/Bq1ChJn4.chunk.css +1 -0
- package/dist/css/Bt85j9js.chunk.css +1 -0
- package/dist/css/BuYrqi9E.chunk.css +1 -0
- package/dist/css/BugV1Bpa.chunk.css +1 -0
- package/dist/css/BuuVPl7n.chunk.css +1 -0
- package/dist/css/C1NkrNqQ.chunk.css +1 -0
- package/dist/css/C1qv5jz5.chunk.css +1 -0
- package/dist/css/C7XoyEPr.chunk.css +1 -0
- package/dist/css/C7_MDu56.chunk.css +1 -0
- package/dist/css/CC5F5C8O.chunk.css +1 -0
- package/dist/css/CChSC6Ta.chunk.css +1 -0
- package/dist/css/CCsCPLDG.chunk.css +1 -0
- package/dist/css/CD1qrI1T.chunk.css +1 -0
- package/dist/css/CKqvCBj4.chunk.css +1 -0
- package/dist/css/CLZ0Ycds.chunk.css +1 -0
- package/dist/css/CO7M4rZW.chunk.css +1 -0
- package/dist/css/CY0yvCW4.chunk.css +1 -0
- package/dist/css/CYGsw8FT.chunk.css +1 -0
- package/dist/css/Cbi3KYBa.chunk.css +1 -0
- package/dist/css/CliS8Q8r.chunk.css +1 -0
- package/dist/css/D-kQKsZN.chunk.css +1 -0
- package/dist/css/D2NwUVrK.chunk.css +1 -0
- package/dist/css/D4g1IoUU.chunk.css +1 -0
- package/dist/css/DBgpcO3T.chunk.css +1 -0
- package/dist/css/DDnpOnVB.chunk.css +1 -0
- package/dist/css/DZJSONGP.chunk.css +1 -0
- package/dist/css/Dc0zNt2E.chunk.css +1 -0
- package/dist/css/DeAfaPiD.chunk.css +1 -0
- package/dist/css/Dj731zLm.chunk.css +1 -0
- package/dist/css/DjPPxa0A.chunk.css +1 -0
- package/dist/css/DlOtoSz0.chunk.css +1 -0
- package/dist/css/DwduQat7.chunk.css +1 -0
- package/dist/css/Dzuu2GTx.chunk.css +1 -0
- package/dist/css/JAvsJreH.chunk.css +1 -0
- package/dist/css/NKlFYVOc.chunk.css +1 -0
- package/dist/css/VZd8qGtK.chunk.css +1 -0
- package/dist/css/Y7U--2na.chunk.css +1 -0
- package/dist/css/ir3IcK_l.chunk.css +1 -0
- package/dist/css/jbMisi9r.chunk.css +1 -0
- package/dist/css/kS5aDtIJ.chunk.css +1 -0
- package/dist/css/mqCL1o7m.chunk.css +1 -0
- package/dist/css/qZzkUeZk.chunk.css +1 -0
- package/dist/css/sC_H3yXE.chunk.css +1 -0
- package/dist/css/wR_6C_NV.chunk.css +1 -0
- package/dist/en.json +1 -0
- package/dist/scripts/-Oi3rE3V.chunk.js +5 -0
- package/dist/scripts/-Oi3rE3V.chunk.js.map +1 -0
- package/dist/scripts/-cwk-1Iv.chunk.js +2 -0
- package/dist/scripts/-cwk-1Iv.chunk.js.map +1 -0
- package/dist/scripts/4oi1ldJ4.chunk.js +3 -0
- package/dist/scripts/4oi1ldJ4.chunk.js.map +1 -0
- package/dist/scripts/6UeJLeAd.chunk.js +2 -0
- package/dist/scripts/6UeJLeAd.chunk.js.map +1 -0
- package/dist/scripts/8zar0u1i.chunk.js +2 -0
- package/dist/scripts/8zar0u1i.chunk.js.map +1 -0
- package/dist/scripts/9NIa7Pi_.chunk.js +2 -0
- package/dist/scripts/9NIa7Pi_.chunk.js.map +1 -0
- package/dist/scripts/B5OOLcT3.chunk.js +2 -0
- package/dist/scripts/B5OOLcT3.chunk.js.map +1 -0
- package/dist/scripts/B8XJmK96.chunk.js +8 -0
- package/dist/scripts/B8XJmK96.chunk.js.map +1 -0
- package/dist/scripts/BA6k9XoA.chunk.js +2 -0
- package/dist/scripts/BA6k9XoA.chunk.js.map +1 -0
- package/dist/scripts/BBnDr_iy.chunk.js +2 -0
- package/dist/scripts/BBnDr_iy.chunk.js.map +1 -0
- package/dist/scripts/BEL0opwe.chunk.js +2 -0
- package/dist/scripts/BEL0opwe.chunk.js.map +1 -0
- package/dist/scripts/BHmtLW9C.chunk.js +2 -0
- package/dist/scripts/BHmtLW9C.chunk.js.map +1 -0
- package/dist/scripts/BJ0C6oH6.chunk.js +2 -0
- package/dist/scripts/BJ0C6oH6.chunk.js.map +1 -0
- package/dist/scripts/BPcJv8Nj.chunk.js +2 -0
- package/dist/scripts/BPcJv8Nj.chunk.js.map +1 -0
- package/dist/scripts/BQQ9SPei.chunk.js +10 -0
- package/dist/scripts/BQQ9SPei.chunk.js.map +1 -0
- package/dist/scripts/BQQZ0Zva.chunk.js +2 -0
- package/dist/scripts/BQQZ0Zva.chunk.js.map +1 -0
- package/dist/scripts/BRKKXF-k.chunk.js +2 -0
- package/dist/scripts/BRKKXF-k.chunk.js.map +1 -0
- package/dist/scripts/BUhbk0mt.chunk.js +2 -0
- package/dist/scripts/BUhbk0mt.chunk.js.map +1 -0
- package/dist/scripts/BXKrMYdw.chunk.js +2 -0
- package/dist/scripts/BXKrMYdw.chunk.js.map +1 -0
- package/dist/scripts/B_eK8A25.chunk.js +2 -0
- package/dist/scripts/B_eK8A25.chunk.js.map +1 -0
- package/dist/scripts/BbjveACT.chunk.js +2 -0
- package/dist/scripts/BbjveACT.chunk.js.map +1 -0
- package/dist/scripts/BdHxGaRy.chunk.js +2 -0
- package/dist/scripts/BdHxGaRy.chunk.js.map +1 -0
- package/dist/scripts/BeHz9c4V.chunk.js +2 -0
- package/dist/scripts/BeHz9c4V.chunk.js.map +1 -0
- package/dist/scripts/BexFb8rj.chunk.js +2 -0
- package/dist/scripts/BexFb8rj.chunk.js.map +1 -0
- package/dist/scripts/Bi8YRFeY.chunk.js +2 -0
- package/dist/scripts/Bi8YRFeY.chunk.js.map +1 -0
- package/dist/scripts/Bj3i6I7i.chunk.js +2 -0
- package/dist/scripts/Bj3i6I7i.chunk.js.map +1 -0
- package/dist/scripts/BktU87GA.chunk.js +2 -0
- package/dist/scripts/BktU87GA.chunk.js.map +1 -0
- package/dist/scripts/Bl1HvG0b.chunk.js +2 -0
- package/dist/scripts/Bl1HvG0b.chunk.js.map +1 -0
- package/dist/scripts/BnWlQ7-4.chunk.js +2 -0
- package/dist/scripts/BnWlQ7-4.chunk.js.map +1 -0
- package/dist/scripts/BoqzK1u7.chunk.js +2 -0
- package/dist/scripts/BoqzK1u7.chunk.js.map +1 -0
- package/dist/scripts/Bsa3zcW0.chunk.js +2 -0
- package/dist/scripts/Bsa3zcW0.chunk.js.map +1 -0
- package/dist/scripts/Bt3kaRtU.chunk.js +6 -0
- package/dist/scripts/Bt3kaRtU.chunk.js.map +1 -0
- package/dist/scripts/BtiKTu8r.chunk.js +2 -0
- package/dist/scripts/BtiKTu8r.chunk.js.map +1 -0
- package/dist/scripts/BwOoIPmc.chunk.js +2 -0
- package/dist/scripts/BwOoIPmc.chunk.js.map +1 -0
- package/dist/scripts/BwuSNwcs.chunk.js +2 -0
- package/dist/scripts/BwuSNwcs.chunk.js.map +1 -0
- package/dist/scripts/Byn8R7bs.chunk.js +2 -0
- package/dist/scripts/Byn8R7bs.chunk.js.map +1 -0
- package/dist/scripts/C2Zu5vKc.chunk.js +2 -0
- package/dist/scripts/C2Zu5vKc.chunk.js.map +1 -0
- package/dist/scripts/C2uxO8e2.chunk.js +2 -0
- package/dist/scripts/C2uxO8e2.chunk.js.map +1 -0
- package/dist/scripts/C35NlkUr.chunk.js +2 -0
- package/dist/scripts/C35NlkUr.chunk.js.map +1 -0
- package/dist/scripts/C5QPXJGU.chunk.js +15 -0
- package/dist/scripts/C5QPXJGU.chunk.js.map +1 -0
- package/dist/scripts/C6mGMCz4.chunk.js +2 -0
- package/dist/scripts/C6mGMCz4.chunk.js.map +1 -0
- package/dist/scripts/C8ZuWYfb.chunk.js +2 -0
- package/dist/scripts/C8ZuWYfb.chunk.js.map +1 -0
- package/dist/scripts/CEmtkty-.chunk.js +2 -0
- package/dist/scripts/CEmtkty-.chunk.js.map +1 -0
- package/dist/scripts/CICkmQW6.chunk.js +2 -0
- package/dist/scripts/CICkmQW6.chunk.js.map +1 -0
- package/dist/scripts/CLumRL-T.chunk.js +2 -0
- package/dist/scripts/CLumRL-T.chunk.js.map +1 -0
- package/dist/scripts/CO_D2O4I.chunk.js +2 -0
- package/dist/scripts/CO_D2O4I.chunk.js.map +1 -0
- package/dist/scripts/CPXlV0fg.chunk.js +2 -0
- package/dist/scripts/CPXlV0fg.chunk.js.map +1 -0
- package/dist/scripts/CQZOieOF.chunk.js +2 -0
- package/dist/scripts/CQZOieOF.chunk.js.map +1 -0
- package/dist/scripts/CQoWqq54.chunk.js +2 -0
- package/dist/scripts/CQoWqq54.chunk.js.map +1 -0
- package/dist/scripts/CRT9qru0.chunk.js +2 -0
- package/dist/scripts/CRT9qru0.chunk.js.map +1 -0
- package/dist/scripts/CU6iZ8MR.chunk.js +2 -0
- package/dist/scripts/CU6iZ8MR.chunk.js.map +1 -0
- package/dist/scripts/CUltMbyK.chunk.js +2 -0
- package/dist/scripts/CUltMbyK.chunk.js.map +1 -0
- package/dist/scripts/CW7x8M-z.chunk.js +2 -0
- package/dist/scripts/CW7x8M-z.chunk.js.map +1 -0
- package/dist/scripts/CYlwi5iC.chunk.js +7 -0
- package/dist/scripts/CYlwi5iC.chunk.js.map +1 -0
- package/dist/scripts/CgJckl-g.chunk.js +2 -0
- package/dist/scripts/CgJckl-g.chunk.js.map +1 -0
- package/dist/scripts/Cj5ETNHP.chunk.js +2 -0
- package/dist/scripts/Cj5ETNHP.chunk.js.map +1 -0
- package/dist/scripts/Cmu1J2M7.chunk.js +262 -0
- package/dist/scripts/Cmu1J2M7.chunk.js.map +1 -0
- package/dist/scripts/Cr8fUgj9.chunk.js +2 -0
- package/dist/scripts/Cr8fUgj9.chunk.js.map +1 -0
- package/dist/scripts/CtM_cXum.chunk.js +2 -0
- package/dist/scripts/CtM_cXum.chunk.js.map +1 -0
- package/dist/scripts/Cv1FGdNu.chunk.js +2 -0
- package/dist/scripts/Cv1FGdNu.chunk.js.map +1 -0
- package/dist/scripts/CvPDjx7y.chunk.js +2 -0
- package/dist/scripts/CvPDjx7y.chunk.js.map +1 -0
- package/dist/scripts/D0bydDVL.chunk.js +2 -0
- package/dist/scripts/D0bydDVL.chunk.js.map +1 -0
- package/dist/scripts/D1EE4AEz.chunk.js +356 -0
- package/dist/scripts/D1EE4AEz.chunk.js.map +1 -0
- package/dist/scripts/D84-WY3k.chunk.js +2 -0
- package/dist/scripts/D84-WY3k.chunk.js.map +1 -0
- package/dist/scripts/DAh7Ea13.chunk.js +2 -0
- package/dist/scripts/DAh7Ea13.chunk.js.map +1 -0
- package/dist/scripts/DBIkG3Bu.chunk.js +2 -0
- package/dist/scripts/DBIkG3Bu.chunk.js.map +1 -0
- package/dist/scripts/DCcI7sWt.chunk.js +2 -0
- package/dist/scripts/DCcI7sWt.chunk.js.map +1 -0
- package/dist/scripts/DEP24A-f.chunk.js +2 -0
- package/dist/scripts/DEP24A-f.chunk.js.map +1 -0
- package/dist/scripts/DGFORsAE.chunk.js +2 -0
- package/dist/scripts/DGFORsAE.chunk.js.map +1 -0
- package/dist/scripts/DGaf-Jy9.chunk.js +2 -0
- package/dist/scripts/DGaf-Jy9.chunk.js.map +1 -0
- package/dist/scripts/DJyZ6Hx7.chunk.js +2 -0
- package/dist/scripts/DJyZ6Hx7.chunk.js.map +1 -0
- package/dist/scripts/DOCam-GK.chunk.js +2 -0
- package/dist/scripts/DOCam-GK.chunk.js.map +1 -0
- package/dist/scripts/DSLX3H2r.chunk.js +2 -0
- package/dist/scripts/DSLX3H2r.chunk.js.map +1 -0
- package/dist/scripts/DSq4f4jm.chunk.js +2 -0
- package/dist/scripts/DSq4f4jm.chunk.js.map +1 -0
- package/dist/scripts/DXxBqeLg.chunk.js +2 -0
- package/dist/scripts/DXxBqeLg.chunk.js.map +1 -0
- package/dist/scripts/DZ6Jrm23.chunk.js +2 -0
- package/dist/scripts/DZ6Jrm23.chunk.js.map +1 -0
- package/dist/scripts/Daes5Wgy.chunk.js +2 -0
- package/dist/scripts/Daes5Wgy.chunk.js.map +1 -0
- package/dist/scripts/DeUbJqVo.chunk.js +2 -0
- package/dist/scripts/DeUbJqVo.chunk.js.map +1 -0
- package/dist/scripts/DgEqkZy0.chunk.js +8 -0
- package/dist/scripts/DgEqkZy0.chunk.js.map +1 -0
- package/dist/scripts/DhB-Uugx.chunk.js +2 -0
- package/dist/scripts/DhB-Uugx.chunk.js.map +1 -0
- package/dist/scripts/DhqAA1wT.chunk.js +2 -0
- package/dist/scripts/DhqAA1wT.chunk.js.map +1 -0
- package/dist/scripts/Di5-l4QJ.chunk.js +2 -0
- package/dist/scripts/Di5-l4QJ.chunk.js.map +1 -0
- package/dist/scripts/DiQkAtUx.chunk.js +53 -0
- package/dist/scripts/DiQkAtUx.chunk.js.map +1 -0
- package/dist/scripts/DireiQEp.chunk.js +2 -0
- package/dist/scripts/DireiQEp.chunk.js.map +1 -0
- package/dist/scripts/Dj66TI5y.chunk.js +2 -0
- package/dist/scripts/Dj66TI5y.chunk.js.map +1 -0
- package/dist/scripts/DkFkYS-j.chunk.js +2 -0
- package/dist/scripts/DkFkYS-j.chunk.js.map +1 -0
- package/dist/scripts/Dkq5GtOV.chunk.js +2 -0
- package/dist/scripts/Dkq5GtOV.chunk.js.map +1 -0
- package/dist/scripts/DmSSmUHZ.chunk.js +2 -0
- package/dist/scripts/DmSSmUHZ.chunk.js.map +1 -0
- package/dist/scripts/DoQU9vjn.chunk.js +2 -0
- package/dist/scripts/DoQU9vjn.chunk.js.map +1 -0
- package/dist/scripts/DtHh_hpg.chunk.js +2 -0
- package/dist/scripts/DtHh_hpg.chunk.js.map +1 -0
- package/dist/scripts/DvDdiDQN.chunk.js +7 -0
- package/dist/scripts/DvDdiDQN.chunk.js.map +1 -0
- package/dist/scripts/DwhG2uva.chunk.js +2 -0
- package/dist/scripts/DwhG2uva.chunk.js.map +1 -0
- package/dist/scripts/DxJlWHZr.chunk.js +2 -0
- package/dist/scripts/DxJlWHZr.chunk.js.map +1 -0
- package/dist/scripts/DxmeZ4C9.chunk.js +2 -0
- package/dist/scripts/DxmeZ4C9.chunk.js.map +1 -0
- package/dist/scripts/KuveJuNy.chunk.js +2 -0
- package/dist/scripts/KuveJuNy.chunk.js.map +1 -0
- package/dist/scripts/LKCLmV2A.chunk.js +2 -0
- package/dist/scripts/LKCLmV2A.chunk.js.map +1 -0
- package/dist/scripts/RnuR8yr3.chunk.js +2 -0
- package/dist/scripts/RnuR8yr3.chunk.js.map +1 -0
- package/dist/scripts/XxrnElSv.chunk.js +2 -0
- package/dist/scripts/XxrnElSv.chunk.js.map +1 -0
- package/dist/scripts/YF_QoXEj.chunk.js +3 -0
- package/dist/scripts/YF_QoXEj.chunk.js.map +1 -0
- package/dist/scripts/Z2sDSVPb.chunk.js +2 -0
- package/dist/scripts/Z2sDSVPb.chunk.js.map +1 -0
- package/dist/scripts/Zbze2j9b.chunk.js +2 -0
- package/dist/scripts/Zbze2j9b.chunk.js.map +1 -0
- package/dist/scripts/app-C56EnOMP.js +216 -0
- package/dist/scripts/app-C56EnOMP.js.map +1 -0
- package/dist/scripts/cvX-F_mx.chunk.js +2 -0
- package/dist/scripts/cvX-F_mx.chunk.js.map +1 -0
- package/dist/scripts/h34ZSRKe.chunk.js +2 -0
- package/dist/scripts/h34ZSRKe.chunk.js.map +1 -0
- package/dist/scripts/leubTuJo.chunk.js +2 -0
- package/dist/scripts/leubTuJo.chunk.js.map +1 -0
- package/dist/scripts/m5XtnRaH.chunk.js +2 -0
- package/dist/scripts/m5XtnRaH.chunk.js.map +1 -0
- package/dist/scripts/nay4aGaa.chunk.js +2 -0
- package/dist/scripts/nay4aGaa.chunk.js.map +1 -0
- package/dist/scripts/p61U8kXz.chunk.js +2 -0
- package/dist/scripts/p61U8kXz.chunk.js.map +1 -0
- package/dist/scripts/pkzD5BEm.chunk.js +2 -0
- package/dist/scripts/pkzD5BEm.chunk.js.map +1 -0
- package/dist/scripts/sc9-PV9Y.chunk.js +2 -0
- package/dist/scripts/sc9-PV9Y.chunk.js.map +1 -0
- package/dist/scripts/tAsRziXo.chunk.js +8 -0
- package/dist/scripts/tAsRziXo.chunk.js.map +1 -0
- package/dist/scripts/xrHhD6CF.chunk.js +8 -0
- package/dist/scripts/xrHhD6CF.chunk.js.map +1 -0
- package/dist/scripts/xxo027lm.chunk.js +2 -0
- package/dist/scripts/xxo027lm.chunk.js.map +1 -0
- package/package.json +5 -3
- package/typings/utils/imports.d.ts +2 -1
- package/vite.config.ts +6 -0
- package/dist/css/103-streamable-learning-5060b6cda5.chunk.css +0 -7
- package/dist/css/1269-streamable-learning-a12c4ebc99.chunk.css +0 -2
- package/dist/css/1457-streamable-learning-c8c8b3b9b1.chunk.css +0 -50
- package/dist/css/2334-streamable-learning-de03ae073a.chunk.css +0 -2
- package/dist/css/3322-streamable-learning-510e1aa3f3.chunk.css +0 -34
- package/dist/css/3838-streamable-learning-da10685fe8.chunk.css +0 -22
- package/dist/css/4254-streamable-learning-e493f4a027.chunk.css +0 -2
- package/dist/css/4772-streamable-learning-f83b838d71.chunk.css +0 -9
- package/dist/css/5003-streamable-learning-b38d2ddbbe.chunk.css +0 -98
- package/dist/css/5212-streamable-learning-2605302fc2.chunk.css +0 -90
- package/dist/css/5565-streamable-learning-0caae3809b.chunk.css +0 -13
- package/dist/css/6017-streamable-learning-098a205d01.chunk.css +0 -6
- package/dist/css/6356-streamable-learning-8c5b220bf6.chunk.css +0 -1
- package/dist/css/6987-streamable-learning-8f682301c6.chunk.css +0 -1
- package/dist/css/7317-streamable-learning-b5d226bbb6.chunk.css +0 -5
- package/dist/css/8058-streamable-learning-539cf7be18.chunk.css +0 -12
- package/dist/css/8294-streamable-learning-c797263ac2.chunk.css +0 -1
- package/dist/css/8496-streamable-learning-ce19f6ca52.chunk.css +0 -13
- package/dist/css/8601-streamable-learning-f525210660.chunk.css +0 -6
- package/dist/css/9514-streamable-learning-251703c6d1.chunk.css +0 -2
- package/dist/css/9766-streamable-learning-31650ffe5d.chunk.css +0 -8
- package/dist/css/9842-streamable-learning-24729103f7.chunk.css +0 -4
- package/dist/css/9899-streamable-learning-0338f8d2dc.chunk.css +0 -4
- package/dist/css/streamable-learning-dd0c1095d5.css +0 -23
- package/dist/languages/en.json +0 -1
- package/dist/scripts/103-045fbeec6b-streamable-learning.chunk.js +0 -1
- package/dist/scripts/1097-680a971192-streamable-learning.chunk.js +0 -2
- package/dist/scripts/1097-680a971192-streamable-learning.chunk.js.LICENSE.txt +0 -105
- package/dist/scripts/1269-8170bb766e-streamable-learning.chunk.js +0 -2
- package/dist/scripts/1269-8170bb766e-streamable-learning.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/1457-836d537d71-streamable-learning.chunk.js +0 -1
- package/dist/scripts/1482-b1dd75897c-streamable-learning.chunk.js +0 -1
- package/dist/scripts/1934-fc017df0da-streamable-learning.chunk.js +0 -2
- package/dist/scripts/1934-fc017df0da-streamable-learning.chunk.js.LICENSE.txt +0 -9
- package/dist/scripts/2042-d51622d63e-streamable-learning.chunk.js +0 -1
- package/dist/scripts/2087-eba9033b1c-streamable-learning.chunk.js +0 -1
- package/dist/scripts/2245-8cd3224e1b-streamable-learning.chunk.js +0 -1
- package/dist/scripts/2334-98962067f5-streamable-learning.chunk.js +0 -1
- package/dist/scripts/2676-2e8a501091-streamable-learning.chunk.js +0 -2
- package/dist/scripts/2676-2e8a501091-streamable-learning.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/2877-5ffc9711f6-streamable-learning.chunk.js +0 -1
- package/dist/scripts/2911-9e2725fd22-streamable-learning.chunk.js +0 -1
- package/dist/scripts/3057-58d4e05af1-streamable-learning.chunk.js +0 -1
- package/dist/scripts/3093-efbcc927ea-streamable-learning.chunk.js +0 -1
- package/dist/scripts/3186-d1a6ccffde-streamable-learning.chunk.js +0 -1
- package/dist/scripts/3322-10050fa868-streamable-learning.chunk.js +0 -1
- package/dist/scripts/3472-50ca92bde3-streamable-learning.chunk.js +0 -1
- package/dist/scripts/3838-d64b6c347a-streamable-learning.chunk.js +0 -1
- package/dist/scripts/3941-2ef15ca9ac-streamable-learning.chunk.js +0 -1
- package/dist/scripts/4254-bddb032519-streamable-learning.chunk.js +0 -1
- package/dist/scripts/4772-6540b98896-streamable-learning.chunk.js +0 -2
- package/dist/scripts/4772-6540b98896-streamable-learning.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/4951-df701c6a8d-streamable-learning.chunk.js +0 -1
- package/dist/scripts/5003-b30fdd96e6-streamable-learning.chunk.js +0 -2
- package/dist/scripts/5003-b30fdd96e6-streamable-learning.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/5088-2297cf88f0-streamable-learning.chunk.js +0 -1
- package/dist/scripts/5173-a800a17d0d-streamable-learning.chunk.js +0 -1
- package/dist/scripts/5212-39e4b02cbb-streamable-learning.chunk.js +0 -2
- package/dist/scripts/5212-39e4b02cbb-streamable-learning.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/5446-2cbe9f9d1b-streamable-learning.chunk.js +0 -1
- package/dist/scripts/5543-205aaa36a6-streamable-learning.chunk.js +0 -1
- package/dist/scripts/5565-9f5fa3e04b-streamable-learning.chunk.js +0 -1
- package/dist/scripts/578-2cc99f46f7-streamable-learning.chunk.js +0 -1
- package/dist/scripts/6017-1630c158c2-streamable-learning.chunk.js +0 -2
- package/dist/scripts/6017-1630c158c2-streamable-learning.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/6356-eefa3ff22e-streamable-learning.chunk.js +0 -1
- package/dist/scripts/6979-ef9a3931a2-streamable-learning.chunk.js +0 -2
- package/dist/scripts/6979-ef9a3931a2-streamable-learning.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/6987-e58de31cfe-streamable-learning.chunk.js +0 -1
- package/dist/scripts/7317-6d501d1b82-streamable-learning.chunk.js +0 -1
- package/dist/scripts/7347-49d1a18d3b-streamable-learning.chunk.js +0 -1
- package/dist/scripts/7570-fba1ab7c45-streamable-learning.chunk.js +0 -2
- package/dist/scripts/7570-fba1ab7c45-streamable-learning.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/7904-e07cdef2de-streamable-learning.chunk.js +0 -1
- package/dist/scripts/7925-1e1cfa2a04-streamable-learning.chunk.js +0 -1
- package/dist/scripts/8058-995937c0ad-streamable-learning.chunk.js +0 -1
- package/dist/scripts/8126-9d09959b28-streamable-learning.chunk.js +0 -2
- package/dist/scripts/8126-9d09959b28-streamable-learning.chunk.js.LICENSE.txt +0 -60
- package/dist/scripts/8397-39ce77876d-streamable-learning.chunk.js +0 -1
- package/dist/scripts/8496-9c73c4dcb7-streamable-learning.chunk.js +0 -2
- package/dist/scripts/8496-9c73c4dcb7-streamable-learning.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/8599-b74e1ab6e3-streamable-learning.chunk.js +0 -1
- package/dist/scripts/8601-709123e64a-streamable-learning.chunk.js +0 -1
- package/dist/scripts/8819-2a50dd6a9b-streamable-learning.chunk.js +0 -1
- package/dist/scripts/8937-5103db88d8-streamable-learning.chunk.js +0 -1
- package/dist/scripts/9390-e6641286fe-streamable-learning.chunk.js +0 -1
- package/dist/scripts/9514-a31ca9af06-streamable-learning.chunk.js +0 -1
- package/dist/scripts/9766-f64bf6f003-streamable-learning.chunk.js +0 -2
- package/dist/scripts/9766-f64bf6f003-streamable-learning.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/9842-dd5d85c9e3-streamable-learning.chunk.js +0 -1
- package/dist/scripts/9899-71bc5a6f02-streamable-learning.chunk.js +0 -2
- package/dist/scripts/9899-71bc5a6f02-streamable-learning.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/bundle-68f2acccc5.min.js +0 -2
- package/dist/scripts/bundle-68f2acccc5.min.js.LICENSE.txt +0 -108
- package/dist/scripts/pdf.worker.entry-a2092a6670.min.worker.js +0 -2
- package/dist/scripts/pdf.worker.entry-a2092a6670.min.worker.js.LICENSE.txt +0 -21
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 5212-39e4b02cbb-streamable-learning.chunk.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_clickview_streamable_learning=self.webpackChunk_clickview_streamable_learning||[]).push([[5212],{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}}},71698:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PlayView:()=>Aj});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 _=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),R=n(89454),I=n(39151),x=n(98064),M=n(99940),L={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:M.k.POST,data:o,cacheDuration:28800,success:r,error:i}}},B=n(97395),D={theme:function(e){return{url:"/api/domain/v1/themes/".concat(e),key:"themes:".concat(e)}},themeImages:function(e,t){return{url:B._.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:M.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:M.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:M.k.DELETE,invalidationKeys:"themes",success:t,error:n,always:r}}},A=n(31949),F=n(11565),z=n(49267),V=n(49075);function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(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,G(r.key),r)}}function G(e){var t=function(e){if("object"!=Z(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Z(t)?t:t+""}function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(K=function(){return!!e})()}function q(e){return q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},q(e)}function H(e,t){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},H(e,t)}var W=u.T.encloseNamespace("shared.loginRequired"),Q=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=q(t),function(e,t){if(t&&("object"==Z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,K()?Reflect.construct(t,n||[],q(e).constructor):t.apply(e,n))}(this,t,[W("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&&H(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"LoginRequiredError"}},{key:"heading",get:function(){return W("title")}},{key:"description",get:function(){return e=this.video,O.M.isClip(e)?W("clipDescription"):O.M.isInteractive(e)?W("interactiveDescription"):W("videoDescription");var e}}])&&U(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(a.Q._R);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 $(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,J(r.key),r)}}function J(e){var t=function(e){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 X(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(X=function(){return!!e})()}function ee(e){return ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ee(e)}function te(e,t){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},te(e,t)}var ne=u.T.encloseNamespace("shared.videoNotInSubscriptionError"),re=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=ee(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,X()?Reflect.construct(t,n||[],ee(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&&te(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"VideoNotInSubscriptionError"}},{key:"heading",get:function(){return ne("title")}},{key:"description",get:function(){return ne("description")}}])&&$(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(p.H);function ie(e){return ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ie(e)}function oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ae(r.key),r)}}function ae(e){var t=function(e){if("object"!=ie(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ie(t)?t:t+""}function ue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ue=function(){return!!e})()}function le(e){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(e)}function ce(e,t){return ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ce(e,t)}var se=u.T.encloseNamespace("shared.parentVideoDeletedError");function fe(e){return O.M.isClip(e)?se("clipTitle"):O.M.isInteractive(e)?se("interactiveTitle"):se("videoTitle")}var pe=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=le(t),function(e,t){if(t&&("object"==ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,ue()?Reflect.construct(t,n||[],le(e).constructor):t.apply(e,n))}(this,t,[fe(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&&ce(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"ParentVideoDeletedError"}},{key:"heading",get:function(){return fe(this.video)}},{key:"description",get:function(){return e=this.video,O.M.isClip(e)?se("clipDescription"):O.M.isInteractive(e)?se("interactiveDescription"):se("videoDescription");var e}}])&&oe(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(p.H);function ye(e){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ye(e)}function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ve(r.key),r)}}function ve(e){var t=function(e){if("object"!=ye(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ye(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ye(t)?t:t+""}function de(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(de=function(){return!!e})()}function me(e){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},me(e)}function be(e,t){return be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},be(e,t)}var ge=u.T.encloseNamespace("shared.videoRatingAccess");function we(e){return O.M.isClip(e)?ge("clipTitle"):O.M.isInteractive(e)?ge("interactiveTitle"):ge("videoTitle")}var Oe=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=me(t),function(e,t){if(t&&("object"==ye(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,de()?Reflect.construct(t,n||[],me(e).constructor):t.apply(e,n))}(this,t,[we(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&&be(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"VideoRatingAccessError"}},{key:"heading",get:function(){return we(this.video)}},{key:"description",get:function(){return e=this.video,O.M.isClip(e)?ge("clipDescription"):O.M.isInteractive(e)?ge("interactiveDescription"):ge("videoDescription");var e}}])&&he(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(p.H);function Se(e){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se(e)}function ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Pe(r.key),r)}}function Pe(e){var t=function(e){if("object"!=Se(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Se(t)?t:t+""}function je(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(je=function(){return!!e})()}function Ne(e){return Ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ne(e)}function Ce(e,t){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ce(e,t)}var Te=u.T.encloseNamespace("shared.videoRestrictedError");function Ee(e){return O.M.isClip(e)?Te("clipTitle"):O.M.isInteractive(e)?Te("interactiveTitle"):Te("videoTitle")}var _e={"rating-not-allowed":Oe,"video-deleted":pe,private:_,"clickview-private":re,"login-required":Q,"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=Ne(t),function(e,t){if(t&&("object"==Se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,je()?Reflect.construct(t,n||[],Ne(e).constructor):t.apply(e,n))}(this,t,[Ee(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&&Ce(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"VideoRestrictedError"}},{key:"heading",get:function(){return Ee(this.video)}},{key:"description",get:function(){return e=this.video,O.M.isClip(e)?Te("clipDescription"):O.M.isInteractive(e)?Te("interactiveDescription"):Te("videoDescription");var e}}])&&ke(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(p.H),"content-region-violated":z.a},Re=Object.assign(Object.assign({},_e),{private:Q,"clickview-private":Q}),Ie=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=l.a.useBasicFetch(A.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?_e:Re),t)[null!=l?l:"private"])&&void 0!==r?r:V._;a.Q.Ry.throw(new c(i))}}}},[e.hasCompleted,n.hasCompleted])},xe=n(91286),Me=n(79612),Le=n(25301),Be=n(96359),De=n(41760),Ae=n(41135),Fe=n(31700),ze=n(58321),Ve=n(6117),Ze=n(65858),Ue=n(83345),Ge=n(1048),Ke=n(11607),qe={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}}},He=n(16035),We=n(44829),Qe=n(2096);function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $e(e){var t;switch(null===(t=e.tagType)||void 0===t?void 0:t.toLowerCase()){case We.Q.Pedagogy:return 0;case We.Q.Skill:return 1;default:return 2}}function Je(e){if(!e.tags)return i.createElement(i.Fragment,null);var t,n=(t=e.tags,function(e){if(Array.isArray(e))return Ye(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 Ye(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)?Ye(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort(function(e,t){return $e(e)-$e(t)});return i.createElement("div",{className:"".concat(Qe.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(He.z,{key:t.id||t.name,tag:t,appLink:n,themeColours:e.themeColours,onRemove:r,onClick:o})}))}var Xe=n(54610),et=n(67453),tt=n(38946);function nt(e){return nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nt(e)}function rt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,it(r.key),r)}}function it(e){var t=function(e){if("object"!=nt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nt(t)?t:t+""}var ot=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&&rt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());function at(e,t,n,r){var o=function(){ot.unsubscribe(e,t)};return(0,i.useEffect)(function(){if(r)return n?ot.subscribeOnce(e,t):ot.subscribe(e,t),function(){o()}},[]),o}var ut=n(93264);const lt={container:"BImYH",background:"aAY0j",topLeft:"azcIT",bottomLeft:"mBkCx",topRight:"tcN5n",bottomRight:"sHsOr",detailsBtn:"jyxT7",content:"PeWbM",highlightPoi:"un8Q0"};function ct(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 st=/(\[.*\]\(cv:\/\/poi\?id=[0-9]+\))/g,ft=/[0-9]+/,pt=/\[.*\]/,yt=/[\[\]]/g;function ht(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 vt="shared.videoAtAGlance";function dt(e){var t=ht(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 ct(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)?ct(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(st,function(e){var r=e.match(ft);if(!(null==r?void 0:r.length))return e;var i=t.find(function(e){return e.id.toString()===r[0]}),o=e.match(pt);if(!i||!(null==o?void 0:o.length))return e;var a='<span class="me-2">'.concat(ut.T.ToDisplayDuration(1e3*i.startTime),"</span>"),u=o[0];return u=(u=u.replace(yt,""))||i.description,u="".concat(a," ").concat(u),n?'<span class="d-flex">'.concat(u,"</span>"):e.replace(pt,"[".concat(u,"]"))}):e.content}(e,t,n);return(0,tt.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&&ot.trigger("glance:poi:mouseover",r)}}}function o(){ot.trigger("glance:poi:mouseleave")}function a(){var e;return null===(e=n.current)||void 0===e?void 0:e.querySelectorAll('[href*="cv://poi"]')}return at("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(lt.highlightPoi))},null,t),at("player:poi:mouseleave",function(){var e;null===(e=a())||void 0===e||e.forEach(function(e){return e.classList.remove(lt.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(lt.container),style:{backgroundColor:c.primary}},i.createElement("div",{className:"".concat(lt.content," d-flex align-items-center pt-4 pt-sm-0")},i.createElement("div",null,i.createElement("h2",{className:"h4"},i.createElement(Ue.x,{namespace:vt,phrase:"videoAtAGlance"})),s&&i.createElement(Ke.L,{onClick:e.onClickShowDescription,className:"".concat(lt.detailsBtn," position-absolute cursor-pointer me-4 fw-semibold text-info")},i.createElement(Ue.x,{namespace:vt,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(Je,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},qe.getTagActionProps(e.getTagAppLink,null,e.suppressInteractivity)))):i.createElement(i.Fragment,null),i.createElement("div",{className:"mt-2"},f&&i.createElement(Ke.L,{onClick:e.onClickShowCurriculumLinks,className:"cursor-pointer d-inline-block fw-semibold text-info"},i.createElement(Ue.x,{namespace:vt,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 Ge.t.keys(o).filter(function(e){return!Ge.t.isEmpty(o[e])}).map(function(e){var t,n,r=et.j.createUrl(null===(t=o[e])||void 0===t?void 0:t.url,{size:Xe.h2.Medium});return i.createElement("div",{key:null===(n=o[e])||void 0===n?void 0:n.fileId,className:"".concat(lt[e]," ").concat(lt.background," d-none d-lg-block"),style:{backgroundImage:"url('".concat(r,"')")}})})}())}var mt=n(42648),bt=n(110),gt=n(78259),wt=n(29014),Ot=n(91967),St=n(67575),kt=n(92582);const Pt={button:"nckQw"};function jt(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 Nt=null,Ct=!1,Tt="shared.immersiveReader";function Et(e){var t,n,r=(t=i.useState(Nt),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 jt(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)?jt(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 Nt||Ct||(Ct=!0,(0,St.ajaxRequest)({resource:"/api/integrations/token/immersive-reader",type:M.k.GET,success:function(e){Nt=e,a(e),window.setTimeout(function(){Nt=null,Ct=!1},9e5)},error:function(){}})),o?(e.title||(e.title=u.T.getPhrase(Tt,"titleFallback")),i.createElement("span",{className:"".concat(Pt.button," ").concat(e.className||""),onClick:function(){Ot.q.isFunction(e.onLaunch)&&e.onLaunch(),kt.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(){Ot.q.isFunction(e.onExit)&&e.onExit()}};wt.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 _t=368,Rt=n(66090);function It(e){return function(e){if(Array.isArray(e))return xt(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 xt(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)?xt(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 xt(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 Mt(e){var t=e.page,n=e.totalPages,r=Rt.O.isNumber(t)&&t>0&&t<n&&t+1,i=Rt.O.isNumber(t)&&t>1&&t-1,o={};if(r&&r<=n&&(o.next=r.toString()),i&&(o.previous=i.toString()),!Ge.t.isEmpty(o))return o}var Lt={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(It(t),It(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:Mt(e.pagination),limit:e.pagination.pageSize}}},hasData:function(e){return!Lt.isEmpty(e)}};const Bt={closeButton:"ZwHXo",descriptionBorder:"J_Z5i"};var Dt="shared.videoDetails",At=u.T.encloseNamespace(Dt);function Ft(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 zt(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(Ue.x,{phrase:"details"})),!!f.productionYear&&i.createElement("div",{className:"mb-1"},i.createElement(Ue.x,{phrase:"productionYear",options:{year:f.productionYear}})),i.createElement(Ft,{label:At("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(Ft,{label:At("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(Ft,{label:At("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(Ft,{label:At("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(Ue.x,{phrase:"dateBroadcast",options:{date:bt.O.format(f.dateBroadcast,"DD/MM/YYYY")}})),!!f.channel&&i.createElement("div",{className:"mb-1"},i.createElement(Ue.x,{phrase:"channel",options:{channel:f.channel.name}})),O.M.canViewUploadDate(e.video)&&i.createElement("div",{className:"mb-1"},i.createElement(Ue.x,{phrase:"dateUploaded",options:{date:bt.O.format(s.dateCreated,"DD/MM/YYYY")}})))}function Vt(e){var t,n,r=e.video,o=e.maxHeight,a=void 0===o?_t:o,u=O.M.getParentVideo(r),l=!!e.video.description,c=function(e){var t=Lt.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(Ue.D.Provider,{value:Dt},i.createElement("div",{className:"rounded border p-3 mb-3 position-relative"},i.createElement(mt.$B,{autoHeight:!0,autoHeightMax:a},i.createElement("div",{className:"row g-0"},l&&i.createElement("div",{className:c?"".concat(Bt.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(Ue.x,{phrase:"description"})),i.createElement(Et,{text:r.description,title:r.name,className:"ps-2",onLaunch:e.onLaunchImmersiveReader,onExit:e.onExitImmersiveReader,analyticsOptions:{location:Ze.LZ.PlayPage,entity:Ze.py.Video,actionType:Ze.Vw.Click,descriptor:Ze._S.LaunchImmersiveReader},analyticsData:{id:r.id,type:"description"}})),i.createElement("p",{className:"mb-0",dangerouslySetInnerHTML:{__html:gt.O.linkifyText(e.video.description,{nl2br:!0})}}),i.createElement(Je,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},qe.getTagActionProps(e.getTagAppLink,null,e.suppressInteractivity),{className:"mt-1"})),f&&i.createElement(Ke.L,{onClick:e.onClickShowCurriculumLinks,className:"cursor-pointer d-inline-block fw-semibold text-info mt-2 mb-1"},i.createElement(Ue.x,{namespace:Dt,phrase:"seeCurriculumLinks"}))),c&&i.createElement(zt,Object.assign({},e)))),s&&i.createElement("button",{type:"button",className:"btn-close ".concat(Bt.closeButton),"aria-label":"Close",onClick:e.onClickClose}))):i.createElement(i.Fragment,null)}function Zt(){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 Ut=n(11518),Gt=n(47198),Kt=n(58704),qt=n(99742),Ht=n(65751),Wt=n(83914),Qt=n(35223),Yt="shared.playPage";function $t(){var e=u.T.encloseNamespace(Yt);return i.createElement("div",{className:"alert bg-light-blue p-3 rounded-3 d-flex justify-content-between align-items-center"},i.createElement(Wt.x,{svgName:Qt.vn.Archive,size:Wt.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 Jt=n(75154),Xt=n(17464),en=n(59908),tn=n(80143);const nn={series:"nJzXt"};function rn(e){var t,n=(0,tn.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(en.$,{type:"productionCompany",video:e.video,appLink:e.getSubTextAppLink(e.video),className:"".concat(nn.series," text-truncate mw-100"),analyticsOptions:{location:Ze.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(Xt.c,{className:"mb-3"},i.createElement(Jt.P,{audience:n,className:"bg-white text-dark",border:"dark"})))}var on=n(28825);const an={mask:"OW0it",centeredIcon:"S3jve",bgImage:"CZchF",centeredOverlay:"VegN6"};function un(e){var t,n,r=et.j.createUrl(null!==(n=null===(t=O.M.getThumbnail(e.video))||void 0===t?void 0:t.url)&&void 0!==n?n:"",{size:Xe.h2.Large});return i.createElement("div",{className:"position-relative responsive-img ".concat(an.bgImage),style:{backgroundImage:"url('".concat(r,"')")}},i.createElement(on.F,{appLink:e.appLink,analyticsOptions:{actionType:Ze.Vw.Click,location:Ze.LZ.PlayPage,entity:Ze.py.AppLink,workflowPhase:Ze.eu.Start,descriptor:Ze.Yu.SignUp},analyticsData:{}},i.createElement(Wt.x,{svgName:Qt.vn.PlayCircle,className:an.centeredIcon}),i.createElement("div",{className:an.mask})))}function ln(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 cn=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 ln(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)?ln(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())}},sn=n(57900);function fn(e){return fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fn(e)}function pn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yn(r.key),r)}}function yn(e){var t=function(e){if("object"!=fn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fn(t)?t:t+""}var hn=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()&&sn.SG.cacheExists(e))return;kt.k.logUserAction(this.getAnalyticsData(),{actionType:Ze.Vw.Stream,entity:O.M.getAnalyticsEntity(this.options.video),location:this.analyticsLocation}),this.hasCoolDownTime()&&sn.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}}])&&pn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),vn=(n(39682),n(76032));function dn(e){return dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn(e)}function mn(e,t){(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 bn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,On(r.key),r)}}function wn(e,t,n){return t&&gn(e.prototype,t),n&&gn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function On(e){var t=function(e){if("object"!=dn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dn(t)?t:t+""}function Sn(e,t,n){return t=Nn(t),function(e,t){if(t&&("object"==dn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kn()?Reflect.construct(t,n||[],Nn(e).constructor):t.apply(e,n))}function kn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(kn=function(){return!!e})()}function Pn(e,t,n,r){var i=jn(Nn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function jn(){return jn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Nn(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}},jn.apply(null,arguments)}function Nn(e){return Nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nn(e)}function Cn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tn(e,t)}function Tn(e,t){return Tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tn(e,t)}var En=function(e){function t(e,n){return bn(this,t),Sn(this,t,[e,n])}return Cn(t,e),wn(t,[{key:"handleClick",value:function(e){var n=this;Pn(t,"handleClick",this,3)([e]),this.requestAnimationFrame(function(){n.options_.item.showCollapsibleMenu()})}},{key:"createEl",value:function(e,n,r){if(!this.options_.item)return Pn(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_=vn.Z.dom.createEl("span",{innerHTML:o});var l=Pn(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()}}])}(vn.Z.getComponent("MenuItem")),_n=function(e){function t(e,n){var r;return bn(this,t),(r=Sn(this,t,[e,n])).controlText("Settings"),r}return Cn(t,e),wn(t,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(Pn(t,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(Pn(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()}),Pn(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 En(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 mn(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 mn(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)?mn(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(){Pn(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())}}])}(vn.Z.getComponent("MenuButton"));function Rn(e){return Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rn(e)}function In(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xn(r.key),r)}}function xn(e){var t=function(e){if("object"!=Rn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Rn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Rn(t)?t:t+""}function Mn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Mn=function(){return!!e})()}function Ln(){return Ln="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Bn(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}},Ln.apply(null,arguments)}function Bn(e){return Bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bn(e)}function Dn(e,t){return Dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dn(e,t)}_n.additionalItemOrder=["EngagementOverlayMenuItem","PointsOfInterestMenuItem","LoopVideoMenuItem","NextVideoMenuItem"],vn.Z.registerComponent("cogButton",_n);var An=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=Bn(t),function(e,t){if(t&&("object"==Rn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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||[],Bn(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&&Dn(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return vn.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=Ln(Bn(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&&In(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("MenuItem"));function Fn(e){return Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fn(e)}function zn(){return zn="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}},zn.apply(null,arguments)}function Vn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gn(r.key),r)}}function Un(e,t,n){return t&&Zn(e.prototype,t),n&&Zn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gn(e){var t=function(e){if("object"!=Fn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fn(t)?t:t+""}function Kn(e,t,n){return t=Hn(t),function(e,t){if(t&&("object"==Fn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,qn()?Reflect.construct(t,n||[],Hn(e).constructor):t.apply(e,n))}function qn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qn=function(){return!!e})()}function Hn(e){return Hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hn(e)}function Wn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qn(e,t)}function Qn(e,t){return Qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qn(e,t)}var Yn=vn.Z.getComponent("MenuItem"),$n=vn.Z.getComponent("MenuButton"),Jn=["large","medium","small"],Xn=function(e){function t(e,n){return Vn(this,t),Kn(this,t,[e,n])}return Wn(t,e),Un(t,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}])}(Yn),er=function(e){function t(e,n){var r;return Vn(this,t),(r=Kn(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.player_.ready(function(){r.update()}),r}return Wn(t,e),Un(t,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting(),r=[new An(this.player_,{label:"Caption Text Size",onClickBack:function(){e.requestAnimationFrame(function(){e.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()})}})];return Jn.map(function(t){r.push(new Xn(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=zn(Hn(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(){$n.prototype.handleClick.apply(this)}}])}($n);function tr(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 nr(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 rr(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 ir(e,t,n,r,i){var o=e.textTracks(),a=tr(o,t,n,i)[0];if(a)nr(a,t,n,r);else{var u=function(e){nr(e.track,t,n,r),o.removeEventListener("addtrack",u)};o.addEventListener("addtrack",u),e.one("dispose",function(){o.removeEventListener("addtrack",u)})}}function or(e,t,n,r,i){var o=e.textTracks(),a=tr(o,t,n,i);a.length&&a.forEach(function(e){return nr(e,t,n,r,i)});var u=function(e){nr(e.track,t,n,r,i)};o.addEventListener("addtrack",u),e.one("dispose",function(){o.removeEventListener("addtrack",u)})}vn.Z.registerComponent("SubtitleSizeButton",er);var ar={getTrack:function(e,t,n,r){return tr(e.textTracks(),t,n,r)[0]},useChapters:function(e,t){ir(e,"chapters",null,t)},useMetadataTrack:function(e,t,n){ir(e,"metadata",t,n,null)},useMetadataTracks:function(e,t,n,r){or(e,"metadata",t,n,r)},useSubtitles:function(e,t,n){or(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)rr(e);else{var n=function(){return rr(e)};e.addEventListener("loadeddata",n),t.one("dispose",function(){e.removeEventListener("loadeddata",n)})}}},ur=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 lr(e){return lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lr(e)}function cr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pr(r.key),r)}}function fr(e,t,n){return t&&sr(e.prototype,t),n&&sr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pr(e){var t=function(e){if("object"!=lr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lr(t)?t:t+""}function yr(e,t,n){return t=mr(t),function(e,t){if(t&&("object"==lr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,hr()?Reflect.construct(t,n||[],mr(e).constructor):t.apply(e,n))}function hr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hr=function(){return!!e})()}function vr(e,t,n,r){var i=dr(mr(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function dr(){return dr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=mr(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},dr.apply(null,arguments)}function mr(e){return mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mr(e)}function br(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gr(e,t)}function gr(e,t){return gr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gr(e,t)}var wr=vn.Z.getComponent("MenuItem"),Or=function(e){function t(e,n){var r;return cr(this,t),(r=yr(this,t,[e,n])).onChange=ur(r.onChange,100,!1,r),r.bindEventListeners(),r}return br(t,e),fr(t,[{key:"createEl",value:function(){var e=this.localize("Search");return vr(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)}}])}(wr);vn.Z.registerComponent("SearchInputMenuItem",Or);var Sr=function(e){function t(){return cr(this,t),yr(this,t,arguments)}return br(t,e),fr(t,[{key:"createEl",value:function(e,n,r){return vr(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)}}])}(wr);function kr(e){return kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kr(e)}function Pr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jr(r.key),r)}}function jr(e){var t=function(e){if("object"!=kr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kr(t)?t:t+""}function Nr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Nr=function(){return!!e})()}function Cr(e){return Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cr(e)}function Tr(e,t){return Tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tr(e,t)}vn.Z.registerComponent("NoMatchingResultsMenuItem",Sr);var Er=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=Cr(t),function(e,t){if(t&&("object"==kr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Nr()?Reflect.construct(t,n||[],Cr(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&&Tr(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)}}])&&Pr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("MenuItem"));function _r(e){return _r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_r(e)}function Rr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ir(r.key),r)}}function Ir(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 xr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xr=function(){return!!e})()}function Mr(e,t,n,r){var i=Lr(Br(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Lr(){return Lr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Br(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Lr.apply(null,arguments)}function Br(e){return Br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Br(e)}function Dr(e,t){return Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dr(e,t)}var Ar=vn.Z.getComponent("MenuButton"),Fr=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=Br(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,xr()?Reflect.construct(t,n||[],Br(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&&Dr(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=ar.getCurrentTextTrack(this.player_);if(t){if(null===(e=t.cues)||void 0===e?void 0:e.length){for(var n=[new Or(this.player_,{menuButton:this,search:this.search})],r=0;r<t.cues.length;r++){var i=t.cues[r];n.push(new Er(this.player_,{cue:i,label:i.text,selected:!1,multiSelectable:!1}))}var o=new Sr(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=ar.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(Mr(t,"buildWrapperCSSClass",this,3)([]))}},{key:"update",value:function(){Mr(t,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){Mr(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(){Ar.prototype.handleClick.apply(this)}}])&&Rr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ar);function zr(e){return zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zr(e)}function Vr(){return Vr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Wr(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Vr.apply(null,arguments)}function Zr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ur(e,t){for(var n=0;n<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 Gr(e,t,n){return t&&Ur(e.prototype,t),n&&Ur(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kr(e){var t=function(e){if("object"!=zr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zr(t)?t:t+""}function qr(e,t,n){return t=Wr(t),function(e,t){if(t&&("object"==zr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hr()?Reflect.construct(t,n||[],Wr(e).constructor):t.apply(e,n))}function Hr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hr=function(){return!!e})()}function Wr(e){return Wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wr(e)}function Qr(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yr(e,t)}function Yr(e,t){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yr(e,t)}vn.Z.registerComponent("subtitleSearchButton",Fr);var $r=vn.Z.getComponent("MenuItem"),Jr=vn.Z.getComponent("MenuButton"),Xr=[{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"}],ei=function(e){function t(e,n){return Zr(this,t),qr(this,t,[e,n])}return Qr(t,e),Gr(t,[{key:"createEl",value:function(){return vn.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""}}])}($r),ti=function(e){function t(){var e;return Zr(this,t),(e=qr(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return Qr(t,e),Gr(t,[{key:"createItems",value:function(){var e=this,t=[];return t.push(new An(this.player_,{label:"Keyboard shortcuts"})),Xr.forEach(function(n){t.push(new ei(e.player_,n))}),t}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat((e=t,n=this,"function"==typeof(r=Vr(Wr(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(){Jr.prototype.handleClick.apply(this)}}])}(Jr);function ni(e){return ni="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ni(e)}function ri(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ii(r.key),r)}}function ii(e){var t=function(e){if("object"!=ni(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ni(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ni(t)?t:t+""}function oi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oi=function(){return!!e})()}function ai(e,t,n,r){var i=ui(li(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function ui(){return ui="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=li(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}},ui.apply(null,arguments)}function li(e){return li=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},li(e)}function ci(e,t){return ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ci(e,t)}vn.Z.registerComponent("KeyboardShortcutsButton",ti);var si="cv-collapsed",fi=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=li(t),function(e,t){if(t&&("object"==ni(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,oi()?Reflect.construct(t,n||[],li(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&&ci(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(si)):(n.isCollapsed=!1,n.removeClass(si)))}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(ai(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return ai(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&ri(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));vn.Z.registerComponent("collapserator",fi);var pi=["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"],yi=n(17562),hi=n(50873),vi=n(870);function di(e){return di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},di(e)}function mi(){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 bi(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]())):(bi(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,bi(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,bi(f,"constructor",c),bi(c,"constructor",l),l.displayName="GeneratorFunction",bi(c,i,"GeneratorFunction"),bi(f),bi(f,i,"Generator"),bi(f,r,function(){return this}),bi(f,"toString",function(){return"[object Generator]"}),(mi=function(){return{w:o,m:p}})()}function bi(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}bi=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){bi(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},bi(e,t,n,r)}function gi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wi(r.key),r)}}function wi(e){var t=function(e){if("object"!=di(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=di(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==di(t)?t:t+""}var Oi=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);sn.SG.cacheExists(e)||(this.collectionApiClient.log({type:Ze.Vw.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:Ze.eq.V3}),sn.SG&&sn.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:Ze.Vw.StreamProgress,actionContext:t.getActionContext(),data:Object.assign(Object.assign({},n),{progress:e}),eventVersion:Ze.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||Ze.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===Ze.py.Interactive?e.interactive={id:+this.options.mediaId}:t===Ze.py.Clip&&(e.clip={id:+this.options.mediaId}),e}},{key:"initialize",value:function(){this.setupCollectionApiClient(),vi.Y.lockWindowSession(),this.options.player.one("dispose",function(){return vi.Y.unlockWindowSession()})}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new yi.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:hi.k.shouldLog,formatData:hi.k.formatData})}},{key:"getCurrentUser",value:function(){return e=this,t=void 0,n=void 0,r=mi().m(function e(){return mi().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?Ze.MC.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return Ze.py.Video;case"MasterInteractive":return Ze.py.Interactive;case"MasterClip":return Ze.py.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return Ze.LZ.Player;case"interactive-player":return Ze.LZ.InteractivePlayer;case"create-clip-player":return Ze.LZ.CreateClipPlayer}}}])&&gi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Si(e){return Si="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Si(e)}function ki(e){var t="function"==typeof Map?new Map:void 0;return ki=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(Pi())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&ji(i,n.prototype),i}(e,arguments,Ni(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ji(n,e)},ki(e)}function Pi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pi=function(){return!!e})()}function ji(e,t){return ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ji(e,t)}function Ni(e){return Ni=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ni(e)}var Ci=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=Ni(t),function(e,t){if(t&&("object"==Si(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pi()?Reflect.construct(t,n||[],Ni(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&&ji(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(ki(Error));function Ti(e){return Ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ti(e)}function Ei(){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 _i(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]())):(_i(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,_i(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,_i(f,"constructor",c),_i(c,"constructor",l),l.displayName="GeneratorFunction",_i(c,i,"GeneratorFunction"),_i(f),_i(f,i,"Generator"),_i(f,r,function(){return this}),_i(f,"toString",function(){return"[object Generator]"}),(Ei=function(){return{w:o,m:p}})()}function _i(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_i=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){_i(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},_i(e,t,n,r)}function Ri(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ii(r.key),r)}}function Ii(e){var t=function(e){if("object"!=Ti(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ti(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ti(t)?t:t+""}var xi,Mi=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}l((r=r.apply(e,t||[])).next())})},Li=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 Mi(this,void 0,void 0,Ei().m(function n(){var r,i;return Ei().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 Mi(this,void 0,void 0,Ei().m(function n(){return Ei().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 Mi(this,void 0,void 0,Ei().m(function i(){var o;return Ei().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 Mi(this,void 0,void 0,Ei().m(function i(){var o;return Ei().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 Mi(this,void 0,void 0,Ei().m(function t(){var n,r;return Ei().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 Ci(e.url);case 5:throw t.p=5,new Ci(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&&Ri(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()),Bi=n(19389),Di=n.n(Bi);function Ai(e){return Ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ai(e)}function Fi(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ai(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ai(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ai(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zi(e){e.paused()?e.play():e.pause()}function Vi(e,t){e.currentTime(e.currentTime()+t)}function Zi(e,t){e.volume(e.volume()+t)}var Ui,Gi=(Fi(Fi(Fi(Fi(Fi(Fi(Fi(Fi(Fi(Fi(xi={},"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",zi),"space",zi),"t",function(e){var t=e.theatreModePlugin().getTheatreMode();e.theatreModePlugin().toggleTheatreMode(!t,{shouldLog:!0})}),"left",function(e){return Vi(e,-5)}),"right",function(e){return Vi(e,5)}),"j",function(e){return Vi(e,-10)}),"l",function(e){return Vi(e,10)}),"up",function(e){return Zi(e,.05)}),Fi(xi,"down",function(e){return Zi(e,-.05)}));!function(e){e.PhysicallyChapteredVideo="physically-chaptered-video"}(Ui||(Ui={}));var Ki=n(83765);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 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,Wi(r.key),r)}}function Wi(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+""}function Qi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qi=function(){return!!e})()}function Yi(){return Yi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=$i(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Yi.apply(null,arguments)}function $i(e){return $i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$i(e)}function Ji(e,t){return Ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ji(e,t)}n(65195);var Xi=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=$i(t),function(e,t){if(t&&("object"==qi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Qi()?Reflect.construct(t,n||[],$i(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&&Ji(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=Yi($i(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&&Hi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));vn.Z.registerPlugin("configureMenuDimensionsPlugin",Xi);var eo="cv-persisttest",to=function(){try{return window.localStorage.setItem(eo,"cv-player-storage-test"),window.localStorage.removeItem(eo),!0}catch(e){return!1}},no=function(e){return window.localStorage.getItem(e)},ro=function(e,t){window.localStorage.setItem(e,t)};function io(e){return io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},io(e)}function oo(e,t){for(var n=0;n<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"!=io(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=io(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==io(t)?t:t+""}function uo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(uo=function(){return!!e})()}function lo(){return lo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=co(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}},lo.apply(null,arguments)}function co(e){return co=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},co(e)}function so(e,t){return so=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},so(e,t)}var fo=vn.Z.getPlugin("plugin"),po="cvplayer-volume",yo="cvplayer-mute",ho=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=co(t),function(e,t){if(t&&("object"==io(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,uo()?Reflect.construct(t,n||[],co(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():to()&&(this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var e=no(po),t=no(yo);e&&this.player.volume(+e),t&&this.player.muted("true"===t)}},{key:"saveVolumeState",value:function(){this.enabled&&(ro(po,this.player.volume().toString()),ro(yo,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=lo(co(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&oo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(fo);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(e){return wo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wo(e)}function Oo(e,t){return Oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oo(e,t)}vn.Z.registerPlugin("persistVolumePlugin",ho);var So=vn.Z.getPlugin("plugin"),ko="cvplayer-playback-rate",Po=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=wo(t),function(e,t){if(t&&("object"==vo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,go()?Reflect.construct(t,n||[],wo(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&&Oo(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){var e,t=this;if(to()){this.savePlaybackRate=this.savePlaybackRate.bind(this),this.player.on("ratechange",this.savePlaybackRate),this.one("dispose",function(){t.player.off("ratechange",t.savePlaybackRate)});var n=+no(ko);(null===(e=this.player.options_.playbackRates)||void 0===e?void 0:e.some(function(e){return e===n}))&&this.player.playbackRate(n)}}},{key:"savePlaybackRate",value:function(){var e,t=this.player.playbackRate().toString();ro(ko,t),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({rate:t},{actionType:Ze.Vw.Select,workflowPhase:Ze.eu.Complete,descriptor:Ze.UX.ChangeSpeed,entity:Ze.py.PlaybackSpeed,eventVersion:Ze.eq.V3})}}])&&mo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(So);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 No(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Co(r.key),r)}}function Co(e){var t=function(e){if("object"!=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 To(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)}function Eo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Eo=function(){return!!e})()}function _o(e){return _o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_o(e)}function Ro(e,t){return Ro=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ro(e,t)}vn.Z.registerPlugin("persistPlaybackRatePlugin",Po);var Io=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=_o(i=t),(n=To(r,Eo()?Reflect.construct(i,o||[],_o(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):To(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&&Ro(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}}])&&No(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));vn.Z.registerPlugin("fullscreenOnRotatePlugin",Io);var xo="\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 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 Lo(e,t){for(var n=0;n<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"!=Mo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Mo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mo(t)?t:t+""}function Do(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Do=function(){return!!e})()}function Ao(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=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=Ao(t),function(e,t){if(t&&("object"==Mo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Do()?Reflect.construct(t,n||[],Ao(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&&Fo(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:xo,className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=vn.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()}}])&&Lo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Button"));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 Zo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Uo(r.key),r)}}function Uo(e){var t=function(e){if("object"!=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 Ko(e){return Ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ko(e)}function qo(e,t){return qo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qo(e,t)}zo.prototype.controlText_="Open in ClickView",vn.Z.registerComponent("OpenExternallyButton",zo);var Ho=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=Ko(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||[],Ko(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&&qo(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)}}])&&Zo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));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){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Yo(r.key),r)}}function Yo(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+""}function $o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($o=function(){return!!e})()}function Jo(e,t,n,r){var i=Xo(ea(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Xo(){return Xo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ea(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}},Xo.apply(null,arguments)}function ea(e){return ea=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ea(e)}function ta(e,t){return ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ta(e,t)}vn.Z.registerPlugin("openExternallyPlugin",Ho);var na=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=ea(t),function(e,t){if(t&&("object"==Wo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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||[],ea(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&&ta(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(Jo(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Jo(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=""}}])&&Qo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("component"));function ra(e){return ra="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ra(e)}function ia(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oa(r.key),r)}}function oa(e){var t=function(e){if("object"!=ra(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ra(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ra(t)?t:t+""}function aa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aa=function(){return!!e})()}function ua(){return ua="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=la(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}},ua.apply(null,arguments)}function la(e){return la=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},la(e)}function ca(e,t){return ca=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ca(e,t)}vn.Z.registerComponent("TouchControls",na);var sa=vn.Z.getPlugin("plugin"),fa=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=la(t),function(e,t){if(t&&("object"==ra(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,aa()?Reflect.construct(t,n||[],la(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&&ca(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=ua(la(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&&ia(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(sa);function pa(e){return pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pa(e)}function ya(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ha(r.key),r)}}function ha(e){var t=function(e){if("object"!=pa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pa(t)?t:t+""}vn.Z.registerPlugin("touchControls",fa);var va=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)}}])&&ya(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function da(e){return da="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},da(e)}function ma(e,t){for(var n=0;n<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"!=da(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=da(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==da(t)?t:t+""}function ga(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ga=function(){return!!e})()}function wa(e){return wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wa(e)}function Oa(e,t){return Oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oa(e,t)}var Sa=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=wa(t),function(e,t){if(t&&("object"==da(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,ga()?Reflect.construct(t,n||[],wa(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&&Oa(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){var e=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",function(){e.qualityLevels.off("change",e.onQualityChange)})}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var e=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",e.id)}},{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();this._currentSource=n;var o=this.player.playbackRate(),a=this.player.hasStarted();return this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",function(){t.player.playbackRate(o),t.player.currentTime()!==r&&t.player.currentTime(r),i&&t.player.play(),a&&t.player.hasStarted(!0)}),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find(function(t){return t.id===e})}},{key:"repopulateSources",value:function(e){for(var t=null;this.qualityLevels.length;)this.qualityLevels[0].enabled&&(t=this.qualityLevels[0].id),this.qualityLevels.removeQualityLevel(this.qualityLevels[0]);this.sources=[],this.populateSources(e,t)}},{key:"sortSources",value:function(e){return e.sort(function(e,t){return e.id===t.id?0:+e.id>+t.id?-1:1})}},{key:"populateSources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=null;(e=this.sortSources(e)).forEach(function(e){t.qualityLevels.addQualityLevel(new va(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&&ma(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));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+""}vn.Z.registerPlugin("progressiveFiles",Sa);var Na=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&&Pa(e.prototype,null),t&&Pa(e,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(){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 Ea(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]())):(Ea(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,Ea(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Ea(f,"constructor",c),Ea(c,"constructor",l),l.displayName="GeneratorFunction",Ea(c,i,"GeneratorFunction"),Ea(f),Ea(f,i,"Generator"),Ea(f,r,function(){return this}),Ea(f,"toString",function(){return"[object Generator]"}),(Ta=function(){return{w:o,m:p}})()}function Ea(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Ea=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){Ea(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Ea(e,t,n,r)}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,Ra(r.key),r)}}function Ra(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+""}var Ia=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=Ta().m(function e(){var t,n,r,i;return Ta().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}}])&&_a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function xa(e){return xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xa(e)}function Ma(){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 La(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]())):(La(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,La(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,La(f,"constructor",c),La(c,"constructor",l),l.displayName="GeneratorFunction",La(c,i,"GeneratorFunction"),La(f),La(f,i,"Generator"),La(f,r,function(){return this}),La(f,"toString",function(){return"[object Generator]"}),(Ma=function(){return{w:o,m:p}})()}function La(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}La=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){La(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},La(e,t,n,r)}function Ba(e,t){for(var n=0;n<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"!=xa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xa(t)?t:t+""}var Aa=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=vn.Z.log.createLogger("localcache")},(t=[{key:"setSource",value:function(e,t){return n=this,r=void 0,i=void 0,o=Ma().m(function n(){var r;return Ma().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}}])&&Ba(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Fa(e){return Fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fa(e)}function za(){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 Va(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]())):(Va(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,Va(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Va(f,"constructor",c),Va(c,"constructor",l),l.displayName="GeneratorFunction",Va(c,i,"GeneratorFunction"),Va(f),Va(f,i,"Generator"),Va(f,r,function(){return this}),Va(f,"toString",function(){return"[object Generator]"}),(za=function(){return{w:o,m:p}})()}function Va(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Va=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){Va(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Va(e,t,n,r)}function Za(e,t){for(var n=0;n<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"!=Fa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fa(t)?t:t+""}function Ga(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ga=function(){return!!e})()}function Ka(){return Ka="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=qa(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ka.apply(null,arguments)}function qa(e){return qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qa(e)}function Ha(e,t){return Ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ha(e,t)}vn.Z.use("*",function(e){return new Aa(e)});var Wa='<?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>',Qa=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=qa(t),function(e,t){if(t&&("object"==Fa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Ga()?Reflect.construct(t,n||[],qa(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&&Ha(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=Ka(qa(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(Wa,"</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=za().m(function e(){return za().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&&Za(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));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)}vn.Z.registerComponent("localCacheIndicator",Qa);var ou=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())})},au=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=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])).logger_=vn.Z.log.createLogger("localcache"),void 0===n)throw Error("no options defined");return r.localCaches_=n.localCacheAddresses.map(function(e){return new Ia(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&&iu(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=nu(ru(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 ou(this,void 0,void 0,$a().m(function e(){var t;return $a().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 ou(this,void 0,void 0,$a().m(function e(){var t,n,r,i=this;return $a().w(function(e){for(;;)switch(e.n){case 0:return t=[],n=function(e){return ou(i,void 0,void 0,$a().m(function n(){return $a().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),Na.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}],r&&Xa(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));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)}vn.Z.registerPlugin("localCache",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;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=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])).playerApi=n.playerApi,r.fileToken=n.fileToken,r.logger=vn.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&&vu(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=yu(hu(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"onError",value:function(){return du(this,void 0,void 0,lu().m(function e(){var t,n=this;return lu().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 du(this,void 0,void 0,lu().m(function e(){var t,n;return lu().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,Li.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 du(this,void 0,void 0,lu().m(function t(){var n,r,i,o,a=this;return lu().w(function(t){for(;;)switch(t.n){case 0:return n=this.player.currentTime(),r=!this.player.paused(),i=this.player.playbackRate(),o=function(){a.player.playbackRate(i),a.player.currentTime(n),r&&a.player.play(),a.player.error(null)},this.player.one("loadedmetadata",o),t.n=1,e();case 1:if(!t.v){t.n=2;break}return t.a(2);case 2:this.player.off("loadedmetadata",o);case 3:return t.a(2)}},t,this)}))}}],r&&su(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.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(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wu(r.key),r)}}function wu(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 Ou(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ou=function(){return!!e})()}function Su(e){return Su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Su(e)}function ku(e,t){return ku=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ku(e,t)}vn.Z.registerPlugin("handleNetworkErrors",mu);var Pu=vn.Z.getPlugin("plugin"),ju="cvplayer-show-subtitles",Nu="cvplayer-selected-language",Cu="cvplayer-subtitle-size",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=Su(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,Ou()?Reflect.construct(t,n||[],Su(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&&ku(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(ju);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(Cu);r||(r=this.options.subtitleSize),this.player.options_.mobile&&(r="medium"),r&&this.player.textTrackSettings.setSizeSetting(r)}},{key:"safeGet",value:function(e){if(to())return no(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 ro(ju,"true"),ro(Nu,i.language),void(null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({language:i.language},{actionType:Ze.Vw.Select,entity:Ze.py.Subtitle,workflowPhase:Ze.eu.Complete,descriptor:Ze.DL.On}))}var o;ro(ju,"false"),o=Nu,window.localStorage.removeItem(o),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({language:""},{actionType:Ze.Vw.Select,entity:Ze.py.Subtitle,workflowPhase:Ze.eu.Complete,descriptor:Ze.DL.Off,eventVersion:Ze.eq.V3})}},{key:"bindEventListeners",value:function(){var e=this;to()&&(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();ro(Cu,e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet(Nu)||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)}}])&&gu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Pu);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(){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 Ru(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]())):(Ru(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,Ru(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Ru(f,"constructor",c),Ru(c,"constructor",l),l.displayName="GeneratorFunction",Ru(c,i,"GeneratorFunction"),Ru(f),Ru(f,i,"Generator"),Ru(f,r,function(){return this}),Ru(f,"toString",function(){return"[object Generator]"}),(_u=function(){return{w:o,m:p}})()}function Ru(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Ru=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){Ru(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Ru(e,t,n,r)}function Iu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xu(r.key),r)}}function xu(e){var t=function(e){if("object"!=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 Mu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Mu=function(){return!!e})()}function Lu(e){return Lu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lu(e)}function Bu(e,t){return Bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bu(e,t)}vn.Z.registerPlugin("persistSubtitleSettingsPlugin",Tu);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())})},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=Lu(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,Mu()?Reflect.construct(t,n||[],Lu(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&&Bu(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){return Du(this,void 0,void 0,_u().m(function e(){var t,n,r,i,o=this;return _u().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"),to()&&(r=no(this.getStorageKey(!!t)))&&(n=r),i=this.player.qualityLevels(),(null==t?void 0:t.playbackProfile)||Na.enableProfileOrNextBest(i,n),to()){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 Du(this,void 0,void 0,_u().m(function t(){var n,r,i;return _u().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],ro(this.getStorageKey(n),i.id),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({quality:i.id},{actionType:Ze.Vw.Select,workflowPhase:Ze.eu.Complete,descriptor:Ze.UX.ChangeResolution,entity:Ze.py.Resolution,eventVersion:Ze.eq.V3});case 2:return t.a(2)}},t,this)}))}},{key:"isLocalCacheActive",value:function(){return Du(this,void 0,void 0,_u().m(function e(){return _u().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"}}])&&Iu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));function Fu(e){return Fu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fu(e)}function zu(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 Vu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zu(e,t){for(var n=0;n<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 Uu(e,t,n){return t&&Zu(e.prototype,t),n&&Zu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gu(e){var t=function(e){if("object"!=Fu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fu(t)?t:t+""}function Ku(e,t,n){return t=Hu(t),function(e,t){if(t&&("object"==Fu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,qu()?Reflect.construct(t,n||[],Hu(e).constructor):t.apply(e,n))}function qu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qu=function(){return!!e})()}function Hu(e){return Hu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hu(e)}function Wu(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qu(e,t)}function Qu(e,t){return Qu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qu(e,t)}vn.Z.registerPlugin("persistQualitySettingsPlugin",Au);var Yu=vn.Z.getComponent("Component"),$u=function(e){function t(e,n){return Vu(this,t),Ku(this,t,[e,n])}return Wu(t,e),Uu(t,[{key:"createEl",value:function(){return vn.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+"%"}}])}(Yu),Ju=function(e){function t(){var e;return Vu(this,t),(e=Ku(this,t,arguments)).events_=[],e}return Wu(t,e),Uu(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 $u(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 zu(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 zu(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)?zu(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 vn.Z.dom.createEl("div",{className:"cv-progress-reporter-display"})}}])}(Yu);function Xu(e){return Xu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xu(e)}function el(e,t,n){return(t=nl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nl(r.key),r)}}function nl(e){var t=function(e){if("object"!=Xu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xu(t)?t:t+""}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){return ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ol(e,t)}var al=vn.Z.getPlugin("plugin"),ul="play",ll="playing",cl="pause",sl="seekstart",fl="ended",pl="pausedseek",yl=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=il(t),function(e,t){if(t&&("object"==Xu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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))}(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&&ol(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=el(el(el(el(el(el({},ul,function(){return e.onPlay()}),cl,function(){return e.onPause()}),"timeupdate",function(){return e.onTimeUpdate()}),"seeking",function(){return e.onSeeking()}),fl,function(){return e.onEnded()}),ll,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 Ju(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(ul)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout(function(){e.isPlaying=!1,e.logEvent(cl),delete e.pauseTimeout},50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(ul)),this.isPlaying&&!this.isSeeking&&this.logEvent(ll)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(pl),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(sl))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(fl)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===sl&&(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===ll||e===ul)}},{key:"shouldSaveCarriedOverTime",value:function(e){return e===ll||e===cl}},{key:"shouldClearCarriedOverTime",value:function(e){return e===fl||e===pl}},{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===ll&&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&&tl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(al);function hl(e){return hl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hl(e)}function vl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dl(r.key),r)}}function dl(e){var t=function(e){if("object"!=hl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hl(t)?t:t+""}function ml(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ml=function(){return!!e})()}function bl(e){return bl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bl(e)}function gl(e,t){return gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gl(e,t)}vn.Z.registerPlugin("progressReporterPlugin",yl);var wl=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=bl(t),function(e,t){if(t&&("object"==hl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,ml()?Reflect.construct(t,n||[],bl(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&&gl(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return vn.Z.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&vl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component")),Ol=["top","left","right","bottom"],Sl={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};function kl(e){return kl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kl(e)}function Pl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jl(e,t){for(var n=0;n<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 Nl(e,t,n){return t&&jl(e.prototype,t),n&&jl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cl(e){var t=function(e){if("object"!=kl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kl(t)?t:t+""}function Tl(e,t,n){return t=Rl(t),function(e,t){if(t&&("object"==kl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,El()?Reflect.construct(t,n||[],Rl(e).constructor):t.apply(e,n))}function El(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(El=function(){return!!e})()}function _l(){return _l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Rl(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}},_l.apply(null,arguments)}function Rl(e){return Rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rl(e)}function Il(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null 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)}function xl(e,t){return xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xl(e,t)}var Ml=vn.Z.getComponent("Component"),Ll=function(e){function t(e,n){var r;return Pl(this,t),(r=Tl(this,t,[e,n])).bindEventListeners(),r}return Il(t,e),Nl(t,[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=_l(Rl(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)})}}])}(Ml),Bl=function(e){function t(e,n){var r;return Pl(this,t),(r=Tl(this,t,[e,n])).addChildren(),r}return Il(t,e),Nl(t,[{key:"addChildren",value:function(){var e=this;Ol.forEach(function(t){e.addChild(new Ll(e.player_,{side:t}))})}}])}(Ml);function Dl(e){return Dl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dl(e)}function Al(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fl(r.key),r)}}function Fl(e){var t=function(e){if("object"!=Dl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dl(t)?t:t+""}function zl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zl=function(){return!!e})()}function Vl(e){return Vl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vl(e)}function Zl(e,t){return Zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zl(e,t)}var Ul=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=Vl(t),function(e,t){if(t&&("object"==Dl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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||[],Vl(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&&Zl(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Al(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("MenuItem"));function Gl(e){return Gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gl(e)}function Kl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ql(r.key),r)}}function ql(e){var t=function(e){if("object"!=Gl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gl(t)?t:t+""}function Hl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hl=function(){return!!e})()}function Wl(){return Wl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ql(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}},Wl.apply(null,arguments)}function Ql(e){return Ql=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ql(e)}function Yl(e,t){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yl(e,t)}var $l=vn.Z.getComponent("MenuButton"),Jl=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=Ql(t),function(e,t){if(t&&("object"==Gl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hl()?Reflect.construct(t,n||[],Ql(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&&Yl(e,t)}(t,e),n=t,r=[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[new An(this.player_,{label:"Video Controls"})];return Ol.forEach(function(r){n.push(new Ul(e.player_,{side:r,label:Sl[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=Wl(Ql(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 Sl[e]}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.whiteboardModePlugin().isEnabled()&&this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){$l.prototype.handleClick.apply(this)}}],r&&Kl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}($l);function Xl(e){return Xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xl(e)}function ec(e,t){for(var n=0;n<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"!=Xl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xl(t)?t:t+""}function nc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nc=function(){return!!e})()}function rc(e){return rc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rc(e)}function ic(e,t){return ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ic(e,t)}var oc="cv-whiteboard-side",ac=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=rc(t),function(e,t){if(t&&("object"==Xl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,nc()?Reflect.construct(t,n||[],rc(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&&ic(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(to()){var e=no(oc);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 wl(this.player),this.button=new Jl(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 Bl(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(),to()&&ro(oc,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"),vn.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)),vn.Z.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}else null===(e=this.dragHandle)||void 0===e||e.hide()}}],r&&ec(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));function uc(e){return uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uc(e)}function lc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cc(r.key),r)}}function cc(e){var t=function(e){if("object"!=uc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=uc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==uc(t)?t:t+""}function sc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sc=function(){return!!e})()}function fc(e){return fc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fc(e)}function pc(e,t){return pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pc(e,t)}vn.Z.registerPlugin("whiteboardModePlugin",ac);var yc=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=fc(t),function(e,t){if(t&&("object"==uc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,sc()?Reflect.construct(t,n||[],fc(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&&pc(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}})}}])&&lc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));vn.Z.registerPlugin("deferMenusPlugin",yc);var hc="PreventScrubbingTooltip";function vc(e){return vc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vc(e)}function dc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mc(r.key),r)}}function mc(e){var t=function(e){if("object"!=vc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vc(t)?t:t+""}function bc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(bc=function(){return!!e})()}function gc(e,t,n,r){var i=wc(Oc(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function wc(){return wc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Oc(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}},wc.apply(null,arguments)}function Oc(e){return Oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Oc(e)}function Sc(e,t){return Sc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sc(e,t)}var kc=vn.Z.getComponent("Component"),Pc="cv-prevent-scrubbing-tooltip-show",jc="cv-prevent-scrubbing-tooltip-remove-transition",Nc=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=Oc(t),function(e,t){if(t&&("object"==vc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,bc()?Reflect.construct(t,n||[],Oc(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&&Sc(e,t)}(t,e),n=t,r=[{key:"buildCSSClass",value:function(){return"cv-prevent-scrubbing-tooltip ".concat(gc(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return gc(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(Pc),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(jc),window.requestAnimationFrame(function(){e.removeClass(jc)})),this.player_.userActive(!1),this.removeClass(Pc),this.isShowing=!1)}}],r&&dc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(kc);function Cc(e){return Cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cc(e)}function Tc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ec(r.key),r)}}function Ec(e){var t=function(e){if("object"!=Cc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cc(t)?t:t+""}function _c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_c=function(){return!!e})()}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)}vn.Z.registerComponent(hc,Nc);var Mc=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=Ic(t),function(e,t){if(t&&("object"==Cc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_c()?Reflect.construct(t,n||[],Ic(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&&xc(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=Rc(Ic(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(hc),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(),ur(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(hc)}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}}],r&&Tc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));function Lc(e){return Lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lc(e)}function Bc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dc(r.key),r)}}function Dc(e){var t=function(e){if("object"!=Lc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Lc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Lc(t)?t:t+""}function Ac(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ac=function(){return!!e})()}function Fc(e){return Fc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fc(e)}function zc(e,t){return zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zc(e,t)}vn.Z.registerPlugin("preventScrubbingPlugin",Mc);var Vc=vn.Z.getComponent("Button"),Zc="cv-muted",Uc=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=Fc(t),function(e,t){if(t&&("object"==Lc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Ac()?Reflect.construct(t,n||[],Fc(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&&zc(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(Zc):this.removeClass(Zc)}},{key:"buildCSSClass",value:function(){return"cv-mute-button cv-muted"}}])&&Bc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Vc);function Gc(e){return Gc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gc(e)}function Kc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qc(r.key),r)}}function qc(e){var t=function(e){if("object"!=Gc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gc(t)?t:t+""}function Hc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hc=function(){return!!e})()}function Wc(){return Wc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Qc(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}},Wc.apply(null,arguments)}function Qc(e){return Qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qc(e)}function Yc(e,t){return Yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yc(e,t)}vn.Z.registerComponent("muteButton",Uc),Uc.prototype.controlText_="Mute";var $c,Jc=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Qc(t),function(e,t){if(t&&("object"==Gc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Hc()?Reflect.construct(t,n||[],Qc(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&&Yc(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return vn.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=Wc(Qc(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&&Kc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function Xc(e){return Xc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xc(e)}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,ts(r.key),r)}}function ts(e){var t=function(e){if("object"!=Xc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xc(t)?t:t+""}function ns(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ns=function(){return!!e})()}function rs(e){return rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rs(e)}function is(e,t){return is=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},is(e,t)}vn.Z.registerComponent("playerOverlay",Jc),function(e){e.Default="play",e.Hover="hover"}($c||($c={}));var os=vn.Z.getPlugin("plugin"),as="cv-preview-mode",us=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=rs(t),function(e,t){if(t&&("object"==Xc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,ns()?Reflect.construct(t,n||[],rs(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&&is(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===$c.Hover)return this.buttonAdded||this.addButtons(t),this.player.addClass(as),this.enableSubtites(),this.mute(),this.removeActivityTimeout(),void this.player.trigger("resize");n===$c.Hover&&(this.player.removeClass(as),this.disableSubtitles(),this.unmute(),this.restoreActivityTimeout(),this.player.trigger("resize"))}},{key:"addButtons",value:function(e){var t=new Uc(this.player),n=new Jc(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}}])&&es(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(os);function ls(e){return ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ls(e)}function cs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ss(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ps(r.key),r)}}function fs(e,t,n){return t&&ss(e.prototype,t),n&&ss(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ps(e){var t=function(e){if("object"!=ls(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ls(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ls(t)?t:t+""}function ys(e,t,n){return t=vs(t),function(e,t){if(t&&("object"==ls(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,hs()?Reflect.construct(t,n||[],vs(e).constructor):t.apply(e,n))}function hs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hs=function(){return!!e})()}function vs(e){return vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vs(e)}function ds(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null 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)}function ms(e,t){return ms=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ms(e,t)}vn.Z.registerPlugin("playerModePlugin",us);var bs=vn.Z.getComponent("Component"),gs=vn.Z.getComponent("ClickableComponent"),ws=function(e){function t(){return cs(this,t),ys(this,t,arguments)}return ds(t,e),fs(t,[{key:"createEl",value:function(){return bs.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>")})}}])}(bs),Os=function(e){function t(e,n){var r;return cs(this,t),(r=ys(this,t,[e,n])).isFavourited=n.isFavourited,r.renderIcon(),r.update(),r}return ds(t,e),fs(t,[{key:"renderIcon",value:function(){this.icon&&this.removeChild(this.icon),this.icon=new ws(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=bs.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)}}])}(gs);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 ks(e,t){for(var n=0;n<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 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){return Cs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cs(e,t)}Os.prototype.controlText_="Favourite";var Ts=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=Ns(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,js()?Reflect.construct(t,n||[],Ns(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&&Cs(e,t)}(t,e),n=t,(r=[{key:"setFavourite",value:function(e,t){if(!this.initialized){var n=new Os(this.player,{isFavourited:e,onClick:t});this.player.addChild(n),this.initialized=!0}}}])&&ks(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));function Es(e){return Es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Es(e)}function _s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Rs(r.key),r)}}function Rs(e){var t=function(e){if("object"!=Es(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Es(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Es(t)?t:t+""}function Is(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Is=function(){return!!e})()}function xs(e,t,n,r){var i=Ms(Ls(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Ms(){return Ms="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ls(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}},Ms.apply(null,arguments)}function Ls(e){return Ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ls(e)}function Bs(e,t){return Bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bs(e,t)}vn.Z.registerPlugin("favouritePlugin",Ts);var Ds=vn.Z.getComponent("MenuButton"),As="Theatre mode (t)",Fs="Default view (t)",zs="cv-theatre-mode-button",Vs=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=Ls(t),function(e,t){if(t&&("object"==Es(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Is()?Reflect.construct(t,n||[],Ls(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&&Bs(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(){xs(t,"handleClick",this,3)([null])}},{key:"buildCSSClass",value:function(){return"cv-default-mode-button ".concat(xs(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(xs(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(Fs):this.controlText(As)}}])&&_s(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ds);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 Us(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gs(r.key),r)}}function Gs(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 Ks(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ks=function(){return!!e})()}function qs(){return qs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Hs(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}},qs.apply(null,arguments)}function Hs(e){return Hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hs(e)}function Ws(e,t){return Ws=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ws(e,t)}vn.Z.registerComponent("theatreModeButton",Vs);var Qs=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=Hs(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,Ks()?Reflect.construct(t,n||[],Hs(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&&Ws(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=qs(Hs(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:Ze.Vw.Click,descriptor:o?Ze.UX.EnableTheatreMode:Ze.UX.DisableTheatreMode,entity:Ze.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(zs),this.button.updateControlText(As),this.button.setActive(!0)):(null===(t=this.button)||void 0===t||t.removeClass(zs),this.button.updateControlText(Fs),this.button.setActive(!1)))}}],r&&Us(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));vn.Z.registerPlugin("theatreModePlugin",Qs);var Ys=n(18204),$s=vn.Z.getComponent("Menu"),Js=$s.prototype.createEl;$s.prototype.createEl=function(){var e=Js.call(this);return this.simpleBar=new Ys.Z(this.contentEl(),{autoHide:!1}),e};var Xs=$s.prototype.contentEl;$s.prototype.contentEl=function(){return this.simpleBar?this.simpleBar.getContentElement():Xs.call(this)};var ef=$s.prototype.dispose;$s.prototype.dispose=function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),ef.call(this)};var tf=$s.prototype.addItem;$s.prototype.addItem=function(e){tf.call(this,e),this.simpleBar.recalculate()};var nf=$s.prototype.lockShowing;$s.prototype.lockShowing=function(){nf.call(this),this.simpleBar.recalculate()},$s.prototype.recalculateScrollBar=function(){this.simpleBar.recalculate()};var rf=$s.prototype.handleBlur;function of(e){return of="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},of(e)}function af(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uf(r.key),r)}}function uf(e){var t=function(e){if("object"!=of(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=of(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==of(t)?t:t+""}function lf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lf=function(){return!!e})()}function cf(e){return cf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cf(e)}function sf(e,t){return sf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sf(e,t)}$s.prototype.handleBlur=function(e){var t=e.relatedTarget||document.activeElement;this.el().contains(t)||rf.call(this,e)};var ff="cv-active-button",pf=vn.Z.getComponent("Menu"),yf=vn.Z.getComponent("Component"),hf=vn.Z.getComponent("MenuButton"),vf=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=cf(t),function(e,t){if(t&&("object"==of(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,lf()?Reflect.construct(t,n||[],cf(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&&sf(e,t)}(t,e),n=t,(r=[{key:"createMenu",value:function(){var e,t=new pf(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=vn.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 yf(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}}])&&af(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(hf),df=hf.prototype.pressButton;hf.prototype.pressButton=function(){df.call(this),this.inactivityTimeout=this.player_.cache_.inactivityTimeout,this.player_.cache_.inactivityTimeout=0,this.player_.options_.inactivityTimeout=0};var mf=hf.prototype.unpressButton;function bf(e){return bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bf(e)}function gf(e,t){for(var n=0;n<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"!=bf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bf(t)?t:t+""}function Of(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Of=function(){return!!e})()}function Sf(e,t,n,r){var i=kf(Pf(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function kf(){return kf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Pf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},kf.apply(null,arguments)}function Pf(e){return Pf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pf(e)}function jf(e,t){return jf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jf(e,t)}hf.prototype.unpressButton=function(){mf.call(this),this.player_.cache_.inactivityTimeout=this.inactivityTimeout,this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.player_.reportUserActivity()},hf.prototype.setActive=function(e){e?this.addClass(ff):this.removeClass(ff)},vn.Z.registerComponent("MenuButton",vf);var 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=Pf(t),function(e,t){if(t&&("object"==bf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Of()?Reflect.construct(t,n||[],Pf(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&&jf(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(Sf(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Sf(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&gf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function Cf(e){return Cf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cf(e)}function Tf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ef(r.key),r)}}function Ef(e){var t=function(e){if("object"!=Cf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cf(t)?t:t+""}function _f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_f=function(){return!!e})()}function Rf(e){return Rf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rf(e)}function If(e,t){return If=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},If(e,t)}Nf.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},vn.Z.registerComponent("TimeWrapper",Nf);var xf=vn.Z.getComponent("SeekBar"),Mf=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=Rf(t),function(e,t){if(t&&("object"==Cf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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||[],Rf(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&&If(e,t)}(t,e),n=t,(r=[{key:"handleMouseDown",value:function(e){var t=this.player_.preventScrubbingPlugin();t.isEnabled&&this.getMouseTime(e)>t.furthestVisitedTime||(xf.prototype.handleMouseDown.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"))}},{key:"handleMouseMove",value:function(e){xf.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;xf.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(xf.prototype.calculateDistance.call(this,e).x,0,1)*this.player_.duration()}}])&&Tf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(xf);function Lf(e){return Lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lf(e)}function Bf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Df(r.key),r)}}function Df(e){var t=function(e){if("object"!=Lf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Lf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Lf(t)?t:t+""}function Af(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Af=function(){return!!e})()}function Ff(e,t,n,r){var i=zf(Vf(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function zf(){return zf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Vf(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}},zf.apply(null,arguments)}function Vf(e){return Vf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vf(e)}function Zf(e,t){return Zf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zf(e,t)}vn.Z.registerComponent("SeekBar",Mf);var Uf=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=Vf(t),function(e,t){if(t&&("object"==Lf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Af()?Reflect.construct(t,n||[],Vf(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&&Zf(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Ff(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Ff(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+"%"}}])&&Bf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function Gf(e){return Gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gf(e)}function Kf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qf(r.key),r)}}function qf(e){var t=function(e){if("object"!=Gf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gf(t)?t:t+""}function Hf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hf=function(){return!!e})()}function Wf(e,t,n,r){var i=Qf(Yf(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Qf(){return Qf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Yf(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}},Qf.apply(null,arguments)}function Yf(e){return Yf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yf(e)}function $f(e,t){return $f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$f(e,t)}var Jf=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=Yf(t),function(e,t){if(t&&("object"==Gf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Hf()?Reflect.construct(t,n||[],Yf(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&&$f(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Wf(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Wf(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+"%"}}])&&Kf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function Xf(e){return Xf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xf(e)}function ep(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tp(r.key),r)}}function tp(e){var t=function(e){if("object"!=Xf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xf(t)?t:t+""}function np(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(np=function(){return!!e})()}function rp(e,t,n,r){var i=ip(op(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function ip(){return ip="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=op(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}},ip.apply(null,arguments)}function op(e){return op=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},op(e)}function ap(e,t){return ap=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ap(e,t)}var up=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=op(t),function(e,t){if(t&&("object"==Xf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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||[],op(e).constructor):t.apply(e,n))}(this,t,[e,n])).playProgress=new Jf(r.player_),r.addChild(r.playProgress),r.loadProgress=new Uf(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&&ap(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(rp(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return rp(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)}}])&&ep(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function lp(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 cp(e){return cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cp(e)}function sp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fp(r.key),r)}}function fp(e){var t=function(e){if("object"!=cp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cp(t)?t:t+""}function pp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pp=function(){return!!e})()}function yp(e,t,n,r){var i=hp(vp(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function hp(){return hp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=vp(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}},hp.apply(null,arguments)}function vp(e){return vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vp(e)}function dp(e,t){return dp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dp(e,t)}var mp=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=vp(t),function(e,t){if(t&&("object"==cp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pp()?Reflect.construct(t,n||[],vp(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&&dp(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(yp(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return yp(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(lp(e.player_))})}}])&&sp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function bp(e){return bp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bp(e)}function gp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wp(r.key),r)}}function wp(e){var t=function(e){if("object"!=bp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bp(t)?t:t+""}function Op(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Op=function(){return!!e})()}function Sp(e,t,n,r){var i=kp(Pp(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function kp(){return kp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Pp(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}},kp.apply(null,arguments)}function Pp(e){return Pp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pp(e)}function jp(e,t){return jp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jp(e,t)}var Np=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=Pp(t),function(e,t){if(t&&("object"==bp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Op()?Reflect.construct(t,n||[],Pp(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),ar.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&&jp(e,t)}(t,e),n=t,(r=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),Sp(t,"dispose",this,3)([])}},{key:"createEl",value:function(){return vn.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=Sp(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 mp(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 up(this.player_,{startTime:a,endTime:u});if(r.addChild(c),l&&u===l)break}else r.addChild(new up(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&gp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("SeekBar"));function Cp(e){return Cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cp(e)}function Tp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ep(r.key),r)}}function Ep(e){var t=function(e){if("object"!=Cp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cp(t)?t:t+""}function _p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_p=function(){return!!e})()}function Rp(){return Rp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ip(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}},Rp.apply(null,arguments)}function Ip(e){return Ip=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ip(e)}function xp(e,t){return xp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xp(e,t)}Np.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},vn.Z.browser.IS_IOS||vn.Z.browser.IS_ANDROID||Np.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),vn.Z.registerComponent("ChapterSeekBar",Np);var Mp=vn.Z.getComponent("ProgressControl"),Lp="seekBar",Bp=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=Ip(t),function(e,t){if(t&&("object"==Cp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_p()?Reflect.construct(t,n||[],Ip(e).constructor):t.apply(e,n))}(this,t,arguments)).seekBarName_=Lp,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&&xp(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())===Lp.toLowerCase()&&(e=this.seekBarName_),(n=t,r=this,"function"==typeof(i=Rp(Ip(1&3?n.prototype:n),"getChild",r))?function(e){return i.apply(r,e)}:i)([e]);var n,r,i}}],r&&Tp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Mp);function Dp(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 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)}Bp.prototype.options_={children:[]},vn.Z.registerComponent("ProgressControl",Bp);var Kp=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Up(t),function(e,t){if(t&&("object"==Ap(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vp()?Reflect.construct(t,n||[],Up(e).constructor):t.apply(e,n))}(this,t,[e,n])).hasCustomChapterText=!1,ar.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&&Gp(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){var e,n,r,i=(e=t,n=this,"function"==typeof(r=Zp(Up(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)([]);return this.chapter_=vn.Z.dom.createEl("div"),i.appendChild(this.chapter_),this.time_=vn.Z.dom.createEl("div"),i.appendChild(this.time_),i}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(vn.Z.dom.textContent(this.time_,Dp(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 vn.Z.dom.textContent(this.chapter_,r.text)}vn.Z.dom.textContent(this.chapter_,"")}}},{key:"clearChapterContent",value:function(){vn.Z.dom.textContent(this.chapter_,"")}},{key:"updateText",value:function(e){vn.Z.dom.textContent(this.time_,e)}},{key:"setCustomChapterText",value:function(e){this.hasCustomChapterText=!!e,vn.Z.dom.textContent(this.chapter_,null!=e?e:"")}}],r&&Fp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("TimeTooltip"));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 Hp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wp(r.key),r)}}function Wp(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 Qp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qp=function(){return!!e})()}function Yp(){return Yp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=$p(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Yp.apply(null,arguments)}function $p(e){return $p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$p(e)}function Jp(e,t){return Jp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jp(e,t)}vn.Z.registerComponent("TimeTooltip",Kp);var Xp=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=$p(t),function(e,t){if(t&&("object"==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,Qp()?Reflect.construct(t,n||[],$p(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jp(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=Yp($p(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{className:"cv-thumbnail-display"}]);return this.img_=vn.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&&Hp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));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 ty(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ny(r.key),r)}}function ny(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 ry(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ry=function(){return!!e})()}function iy(e){return iy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},iy(e)}function oy(e,t){return oy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oy(e,t)}Xp.prototype.options_={scaleFactor:1},vn.Z.registerComponent("ThumbnailDisplay",Xp);var ay=vn.Z.getComponent("MouseTimeDisplay"),uy="cv-mouse-time-display-force-show",ly=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=iy(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,ry()?Reflect.construct(t,n||[],iy(e).constructor):t.apply(e,n))}(this,t,[e,n]),ar.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&&oy(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(hc),l=!1;a.isEnabled&&(l=o>a.furthestVisitedTime),l?(n.hide(),u.show(),ur(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(uy)}},{key:"removeForceShow",value:function(){this.removeClass(uy)}}])&&ty(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ay);function cy(e){return cy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cy(e)}function sy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fy(r.key),r)}}function fy(e){var t=function(e){if("object"!=cy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cy(t)?t:t+""}function py(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(py=function(){return!!e})()}function yy(){return yy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=hy(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}},yy.apply(null,arguments)}function hy(e){return hy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hy(e)}function vy(e,t){return vy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vy(e,t)}ly.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},vn.Z.registerComponent("MouseTimeDisplay",ly);var dy=vn.Z.getComponent("ChaptersTrackMenuItem"),my=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=hy(t),function(e,t){if(t&&("object"==cy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,py()?Reflect.construct(t,n||[],hy(e).constructor):t.apply(e,n))}(this,t,[e,n])).nonIconControl=!1,r.thumbnailDisplay=new Xp(r.player_,{scaleFactor:.5}),r.el().insertBefore(r.thumbnailDisplay.el(),r.el().firstChild),ar.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&&vy(e,t)}(t,e),n=t,r=[{key:"update",value:function(){this.player_&&dy.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=yy(hy(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(Dp(this.options_.cue.startTime,e),")</p>")+"</span>"}}],r&&sy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dy);function by(e){return by="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},by(e)}function gy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wy(r.key),r)}}function wy(e){var t=function(e){if("object"!=by(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=by(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==by(t)?t:t+""}function Oy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oy=function(){return!!e})()}function Sy(e,t,n,r){var i=ky(Py(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function ky(){return ky="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Py(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}},ky.apply(null,arguments)}function Py(e){return Py=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Py(e)}function jy(e,t){return jy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jy(e,t)}var Ny=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=Py(t),function(e,t){if(t&&("object"==by(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oy()?Reflect.construct(t,n||[],Py(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&&jy(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(Sy(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Sy(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 my(this.player_,{track:this.track_,cue:i});e.push(o)}return e}},{key:"setTrack",value:function(e){var n=this;if(Sy(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){Sy(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)}}])&&gy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("ChaptersButton"));function Cy(e){return Cy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cy(e)}function Ty(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ey(r.key),r)}}function Ey(e){var t=function(e){if("object"!=Cy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cy(t)?t:t+""}function _y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_y=function(){return!!e})()}function Ry(){return Ry="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Iy(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}},Ry.apply(null,arguments)}function Iy(e){return Iy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Iy(e)}function xy(e,t){return xy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xy(e,t)}vn.Z.registerComponent("ChaptersButton",Ny);var My=vn.Z.getComponent("OffTextTrackMenuItem"),Ly=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=Iy(t),function(e,t){if(t&&("object"==Cy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_y()?Reflect.construct(t,n||[],Iy(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&&xy(e,t)}(t,e),n=t,r=[{key:"handleClick",value:function(e){My.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=Ry(Iy(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&&Ty(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(My);function By(e){return By="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},By(e)}function Dy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ay(r.key),r)}}function Ay(e){var t=function(e){if("object"!=By(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=By(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==By(t)?t:t+""}function Fy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fy=function(){return!!e})()}function zy(e){return zy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zy(e)}function Vy(e,t){return Vy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vy(e,t)}vn.Z.registerComponent("OffTextTrackMenuItem",Ly);var Zy=vn.Z.getComponent("TextTrackButton"),Uy=vn.Z.getComponent("TextTrackMenuItem"),Gy=vn.Z.getComponent("OffTextTrackMenuItem"),Ky=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=zy(t),function(e,t){if(t&&("object"==By(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fy()?Reflect.construct(t,n||[],zy(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&&Vy(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]:Uy;this.label_&&(e="".concat(this.label_," off")),t.push(new Gy(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&&Dy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Zy);function qy(e){return qy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qy(e)}function Hy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wy(r.key),r)}}function Wy(e){var t=function(e){if("object"!=qy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qy(t)?t:t+""}function Qy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qy=function(){return!!e})()}function Yy(e){return Yy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yy(e)}function $y(e,t){return $y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$y(e,t)}vn.Z.registerComponent("TextTrackButton",Ky);var Jy=vn.Z.getComponent("SubsCapsMenuItem"),Xy=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=Yy(t),function(e,t){if(t&&("object"==qy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Qy()?Reflect.construct(t,n||[],Yy(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&&$y(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(e){Jy.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}}])&&Hy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Jy);function eh(e){return eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eh(e)}function th(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nh(r.key),r)}}function nh(e){var t=function(e){if("object"!=eh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=eh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eh(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 oh(e,t){return oh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oh(e,t)}var ah=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=ih(t),function(e,t){if(t&&("object"==eh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,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&&oh(e,t)}(t,e),n=t,(r=[{key:"toggleEnabled",value:function(){var e;if(this.player_){var t=ar.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=ar.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()})}}])&&th(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("TextTrackMenuItem"));function uh(e){return uh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uh(e)}function lh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ch(r.key),r)}}function ch(e){var t=function(e){if("object"!=uh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=uh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==uh(t)?t:t+""}function sh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sh=function(){return!!e})()}function fh(e){return fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fh(e)}function ph(e,t){return ph=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ph(e,t)}var yh=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=fh(t),function(e,t){if(t&&("object"==uh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,sh()?Reflect.construct(t,n||[],fh(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&&ph(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame(function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()})}}])&&lh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("TextTrackMenuItem")),hh=n(16951),vh=n(83983),dh=n.n(vh);function mh(e){return mh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mh(e)}function bh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gh(r.key),r)}}function gh(e){var t=function(e){if("object"!=mh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mh(t)?t:t+""}function wh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wh=function(){return!!e})()}function Oh(e){return Oh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Oh(e)}function Sh(e,t){return Sh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sh(e,t)}var kh=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=Oh(t),function(e,t){if(t&&("object"==mh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,wh()?Reflect.construct(t,n||[],Oh(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&&Sh(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"FormatError"}}])&&bh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(a.Q._R);const Ph=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 jh(e){return Ph[e.toLowerCase()]}var Nh=function(e){var t,n,r;return null===(t=jh(-1===(r=(n=e).indexOf("-"))?n:n.substring(0,r)))||void 0===t?void 0:t.englishName},Ch=function(e){var t;return null===(t=jh(e))||void 0===t?void 0:t.englishName},Th={ALLOWED_TAGS:["i","b","u","ruby","rt"]},Eh=new Map,_h={getLanguagesOptions:function(e){return e?e.map(function(t){return{label:e.length>1?Ch(t.language):Nh(t.language),value:t.language,id:t.id,url:t.src}}).sort(function(e,t){var n=e.value.includes(Ih)?1:0;return(t.value.includes(Ih)?1:0)-n}):[]},transformVtt:function(e){if(!e)return[];var t=[],n=new(dh().WebVTT.Parser)(window,dh().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 kh("Failed to parse WebVTT format: ".concat(i)))}return r},createTextTrackList:function(e,t){var n=document.createElement("video"),r=n.addTextTrack("subtitles",t?Nh(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(Eh.has(r))return Eh.get(r);if(!e)return null;var i=_h.transformVtt(e),o=_h.createTextTrackList(i,t);return Eh.set(r,o),o},sanitizeCueText:function(e){return(0,hh.sanitize)(e,Th)}},Rh="transcript-selected-language",Ih="en";function xh(e){var t,n;return(null===(t=e.find(function(e){return e.language.includes(Ih)}))||void 0===t?void 0:t.language)||(null===(n=e[0])||void 0===n?void 0:n.language)}var Mh=n(6620),Lh=n(74097),Bh=n(75896);function Dh(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 Ah(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)?Ah(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 Ah(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 Fh=/\n/g;n(32102);var zh=n(25005);function Vh(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 Zh=u.T.encloseNamespace("shared.copyContentIconButton");function Uh(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 Vh(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)?Vh(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(zh.u,{title:Zh(o?"copied":"copy"),spanHack:!0,spanHackClassName:e.tooltipClassName||""},i.createElement(Ke.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(Wt.x,{svgName:Qt.vn.Copy,size:Wt.S.Small})))}var Gh=n(37963);const Kh={timePoint:"VOCS4",wide:"ewc3a",item:"sbTZM",inPlayer:"ZSsXf"};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}function Hh(e){var t,n,r=e.currentTimePoint===e.timePoint,o=(t=(0,Gh.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 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}}(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=ut.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?Kh.inPlayer:""," ").concat(e.isAuthenticated?"cursor-pointer":""," ").concat(Kh.item," ").concat(r?"bg-gray-100":""),id:e.timePoint.toString(),onClick:function(){e.onClick(),kt.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{cueIndex:e.cueIndex}),Object.assign(Object.assign({},e.analyticsOptions),{descriptor:Ze.XX.TranscriptTimepoint,actionType:Ze.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(Kh.timePoint," ").concat(e.wideTimeTag?Kh.wide:""," ").concat(r?"bg-white":"")},l)),i.createElement("p",{className:"ms-3 w-100 mb-0"},e.nodes.map(function(t,n){var r=_h.sanitizeCueText(t.text);return null===t.searchResultIndex?i.createElement("span",{key:n,dangerouslySetInnerHTML:{__html:r}}):i.createElement("mark",{className:"".concat(Kh.mark," ").concat(t.searchResultIndex===e.currentSearchResultIndex?"bg-orange":"bg-yellow"),key:n,dangerouslySetInnerHTML:{__html:r}})})),i.createElement(Uh,{copyableContent:e.transcript,visible:u,onClick:function(){kt.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{cueIndex:e.cueIndex}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:Ze.Vw.Copy}))}}))}function Wh(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(Hh,{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 Qh=n(31453);function Yh(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 $h=u.T.encloseNamespace("playPage.transcriptSearchBar");function Jh(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 Yh(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)?Yh(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){kt.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:t}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:Ze.Vw.Search,descriptor:t?Ze.uG.SearchTranscript:Ze.uG.ResetResults}))}var c=i.useCallback(Ot.q.debounce(function(e){return l(e)},500),[]);function s(){kt.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:e.query}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:Ze.Vw.Search,descriptor:Ze.uG.NextResult})),e.currentSearchResultIndex===e.totalSearchResults-1?e.jumpToSearchResult(0):e.jumpToSearchResult(e.currentSearchResultIndex+1)}function f(){kt.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:e.query}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:Ze.Vw.Search,descriptor:Ze.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,Qh.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(Wt.x,{svgName:Qt.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:$h("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(Ke.L,{"aria-label":$h("previousResult"),onClick:function(){return y({keepFocus:!1})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||y({keepFocus:!0})}},i.createElement(Wt.x,{svgName:Qt.vn.ChevronUp})),i.createElement(Ke.L,{"aria-label":$h("nextResult"),onClick:function(){return p({keepFocus:!1})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||p({keepFocus:!0})}},i.createElement(Wt.x,{svgName:Qt.vn.ChevronDown})),i.createElement(Ke.L,{"aria-label":$h("clearSearch"),onClick:function(){var t;l(""),null===(t=r.current)||void 0===t||t.focus(),e.onSearch("")}},i.createElement(Wt.x,{svgName:Qt.vn.Close}))))}var Xh,ev,tv=n(69883),nv=(n(79967),n(74237));n(62400),(ev=Xh||(Xh={})).Resources="resources",ev.Interactives="interactives",ev.Video="video",ev.Clips="clips",ev.CurriculumLinks="curriculum-links",ev.VideoDetails="video-details",ev.RelatedVideos="related-videos",ev.ClippedFrom="clipped-from",ev.Transcript="transcript",u.T.encloseNamespace("shared.playPageTranscription");var rv=n(8935);const iv={languageSelect:"rHbhp",inputWithoutHighlight:"nJvbl"};function ov(){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 av(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]())):(av(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,av(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,av(f,"constructor",c),av(c,"constructor",l),l.displayName="GeneratorFunction",av(c,i,"GeneratorFunction"),av(f),av(f,i,"Generator"),av(f,r,function(){return this}),av(f,"toString",function(){return"[object Generator]"}),(ov=function(){return{w:o,m:p}})()}function av(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}av=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){av(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},av(e,t,n,r)}function uv(e){var t,n,r=null===(t=e.languageOptions[0])||void 0===t?void 0:t.label,o=e.track.src,a=(0,tv.Z)();return i.createElement("div",{className:"d-flex px-1 mb-3"},i.createElement(Jh,{query:e.searchQuery,currentSearchResultIndex:e.currentSearchResultIndex,onSearch:e.onSearch,totalSearchResults:e.totalSearchResults,jumpToSearchResult:e.jumpToSearchResult,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions}),i.createElement(zh.u,{spanHack:!0,title:e.languageOptions.length>1?"":"Only available in ".concat(r)},i.createElement(rv.Z,null,i.createElement(rv.Z.Toggle,{className:"text-dark ".concat(iv.languageSelect),id:"language-select",disabled:(null===(n=e.languageOptions)||void 0===n?void 0:n.length)<=1,variant:"outline-dark"},i.createElement(Wt.x,{svgName:Qt.vn.Globe})),i.createElement(rv.Z.Menu,{className:iv.menu,"aria-labelledby":"language-select"},e.languageOptions.map(function(t,n){return i.createElement(rv.Z.Item,{key:n,onClick:function(){var n;null===(n=e.onChangeLanguage)||void 0===n||n.call(e,t.value),kt.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{language:t.value,previousLanguageName:e.selectedLanguage}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:Ze.Vw.Select}))},className:"cursor-pointer",active:t.value===e.selectedLanguage},t.label)})))),i.createElement(Lh.h,{svgName:Qt.vn.Download,onClick:function(){return t=this,n=void 0,r=void 0,i=ov().m(function t(){return ov().w(function(t){for(;;)switch(t.n){case 0:return kt.k.logUserAction(e.analyticsData,Object.assign(Object.assign({},e.analyticsOptions),{actionType:Ze.Vw.Download})),t.p=1,t.n=2,nv.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 lv=n(44645);function cv(e){return cv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cv(e)}function sv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yv(r.key),r)}}function pv(e,t,n){return t&&fv(e.prototype,t),n&&fv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yv(e){var t=function(e){if("object"!=cv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cv(t)?t:t+""}function hv(e,t,n){return t=mv(t),function(e,t){if(t&&("object"==cv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,vv()?Reflect.construct(t,n||[],mv(e).constructor):t.apply(e,n))}function vv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vv=function(){return!!e})()}function dv(){return dv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=mv(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}},dv.apply(null,arguments)}function mv(e){return mv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mv(e)}function bv(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gv(e,t)}function gv(e,t){return gv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gv(e,t)}var wv=function(e){function t(e,n){return sv(this,t),hv(this,t,[e,n])}return bv(t,e),pv(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=dv(mv(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}])}(vn.Z.getComponent("Component")),Ov={tagName:"div"};function Sv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ov;if(!e)throw new Error("componentCtor is required");var n=function(n){function r(){return sv(this,r),hv(this,r,arguments)}return bv(r,n),pv(r,[{key:"createEl",value:function(){var n=vn.Z.dom.createEl(t.tagName,t.properties,t.attributes),r=(0,lv.s)(n);return r.render(e(this.player_,this.options_)),this.root=r,n}}])}(wv);return n}function kv(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 Pv(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)?Pv(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 Pv(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 jv(e){var t=no(Rh)||xh(e.allTracks),n=i.useState(function(){return e.allTracks.find(function(e){return e.language===t})||e.allTracks.find(function(t){return t.language===xh(e.allTracks)})}),r=kv(n,2),o=r[0],a=r[1],u=kv(i.useState(t),2),l=u[0],c=u[1],s=kv(i.useState(-1),2),f=s[0],p=s[1],y=kv(i.useState(!0),2),h=y[0],v=y[1],d=kv(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:Ze.LZ.Player,entity:Ze.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===Bh.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,Mh.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=Dh(i.useState(""),2),u=a[0],l=a[1],c=Dh(i.useState(null),2),s=c[0],f=c[1],p=Dh(i.useState(0),2),y=p[0],h=p[1],v=Dh(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(Fh," "),"gi"),a=[],u=0,l=t.map(function(e,t){var n=e.text,r=n.replace(Fh," ").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=kv((0,Gh.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(Lh.h,{svgName:Qt.vn.Close,onClick:function(){e.toggleTranscript(!1)},ariaLabel:"Close transcript"})),i.createElement(uv,{selectedLanguage:l,languageOptions:e.languageOptions,onChangeLanguage:function(t){a(e.allTracks.find(function(e){return e.language===t})),c(t),ro(Rh,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(mt.ZP,{ref:k},i.createElement(Wh,{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 Nv(e){return Nv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nv(e)}function Cv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tv(r.key),r)}}function Tv(e){var t=function(e){if("object"!=Nv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Nv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nv(t)?t:t+""}function Ev(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ev=function(){return!!e})()}function _v(){return _v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Rv(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},_v.apply(null,arguments)}function Rv(e){return Rv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rv(e)}function Iv(e,t){return Iv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Iv(e,t)}vn.Z.registerComponent("Transcript",Sv(function(e,t){return i.createElement(jv,Object.assign({player:e},t))}));var xv=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=Rv(t),function(e,t){if(t&&("object"==Nv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Ev()?Reflect.construct(t,n||[],Rv(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&&Iv(e,t)}(t,e),n=t,r=[{key:"bindListeners",value:function(){var e=this;this.onResize=this.onResize.bind(this),ar.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=_v(Rv(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"initialize",value:function(){ar.useMetadataTracks(this.player,"transcript",this.onTranscriptLoaded.bind(this)),ar.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:Ch(e.language),value:e.language}}).sort(function(e,t){var n=e.value.includes(Ih)?1:0;return(t.value.includes(Ih)?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:Ze.Vw.Click,descriptor:o?Ze.UX.ShowTranscript:Ze.UX.HideTranscript,entity:Ze.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&&Cv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));function Mv(e){return Mv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mv(e)}function Lv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bv(r.key),r)}}function Bv(e){var t=function(e){if("object"!=Mv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Mv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mv(t)?t:t+""}function Dv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dv=function(){return!!e})()}function Av(e){return Av=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Av(e)}function Fv(e,t){return Fv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fv(e,t)}vn.Z.registerPlugin("viewTranscriptPlugin",xv);var zv=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=Av(t),function(e,t){if(t&&("object"==Mv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Dv()?Reflect.construct(t,n||[],Av(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&&Fv(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,vn.Z.dom.addClass(this.toggleEl,"on")):(this.transcriptOn=!1,null===(r=(n=vn.Z.dom).removeClass)||void 0===r||r.call(n,this.toggleEl,"on"))}},{key:"toggleOn",value:function(){var e,t;this.transcriptOn=!0,vn.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=vn.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=vn.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=vn.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}}])&&Lv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("TextTrackMenuItem"));function Vv(e){return Vv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vv(e)}function Zv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Uv(r.key),r)}}function Uv(e){var t=function(e){if("object"!=Vv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vv(t)?t:t+""}function Gv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gv=function(){return!!e})()}function Kv(){return Kv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=qv(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Kv.apply(null,arguments)}function qv(e){return qv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qv(e)}function Hv(e,t){return Hv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hv(e,t)}vn.Z.registerComponent("ToggleTranscriptMenuItem",zv);var Wv=vn.Z.getComponent("TextTrackButton"),Qv=vn.Z.getComponent("SubsCapsButton"),Yv=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=qv(t),function(e,t){if(t&&("object"==Vv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Gv()?Reflect.construct(t,n||[],qv(e).constructor):t.apply(e,n))}(this,t,[e,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&&Hv(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=Kv(qv(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 zv(this.player_)),this.player_.options_.allowTranscript||e.push(new ah(this.player_)),e.push(new yh(this.player_)),this.hideThreshold_=e.length}return this.player().trigger("resizemenus"),Wv.prototype.createItems.call(this,e,Xy)}},{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(){Qv.prototype.handleClick.apply(this)}}],r&&Zv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Qv);function $v(e){return $v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$v(e)}function Jv(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return Xv(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a: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]())):(Xv(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Xv(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,Xv(f,"constructor",c),Xv(c,"constructor",l),l.displayName="GeneratorFunction",Xv(c,i,"GeneratorFunction"),Xv(f),Xv(f,i,"Generator"),Xv(f,r,function(){return this}),Xv(f,"toString",function(){return"[object Generator]"}),(Jv=function(){return{w:o,m:p}})()}function Xv(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Xv=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){Xv(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},Xv(e,t,n,r)}function ed(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,td(r.key),r)}}function td(e){var t=function(e){if("object"!=$v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$v(t)?t:t+""}function nd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nd=function(){return!!e})()}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)}vn.Z.registerComponent("SubsCapsButton",Yv);var od="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Wa,"</span>"),ad=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=rd(t),function(e,t){if(t&&("object"==$v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,nd()?Reflect.construct(t,n||[],rd(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&&id(e,t)}(t,e),n=t,(r=[{key:"handleLocalCacheChange",value:function(){return e=this,t=void 0,n=void 0,r=Jv().m(function e(){var t,n;return Jv().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+od);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)}}}])&&ed(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("MenuItem"));function ud(e){return ud="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ud(e)}function ld(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cd(r.key),r)}}function cd(e){var t=function(e){if("object"!=ud(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ud(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ud(t)?t:t+""}function sd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sd=function(){return!!e})()}function fd(e,t,n,r){var i=pd(yd(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function pd(){return pd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=yd(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}},pd.apply(null,arguments)}function yd(e){return yd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yd(e)}function hd(e,t){return hd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hd(e,t)}var vd={144:"144p (Preview)",240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},dd=vn.Z.getComponent("MenuButton"),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=yd(t),function(e,t){if(t&&("object"==ud(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sd()?Reflect.construct(t,n||[],yd(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&&hd(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(fd(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(fd(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var e=[],t=this.player_.qualityLevels();e.push(new An(this.player_,{label:"Quality"}));for(var n=0;n<t.length;n++){var r=t[n];if(r){var i=vd[r.id];i&&e.push(new ad(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?vd[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){dd.prototype.handleClick.apply(this)}}])&&ld(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dd);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(){return Sd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=kd(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}},Sd.apply(null,arguments)}function kd(e){return kd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kd(e)}function Pd(e,t){return Pd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pd(e,t)}vn.Z.registerComponent("QualityButton",md);var jd=vn.Z.getComponent("Menu"),Nd=vn.Z.getComponent("MenuButton"),Cd=vn.Z.getComponent("PlaybackRateMenuItem"),Td=vn.Z.getComponent("PlaybackRateMenuButton"),Ed=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=kd(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||[],kd(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&&Pd(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=Nd.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=Sd(kd(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 jd(this.player(),{menuButton:this});e.addItem(new An(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 Cd(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=Nd.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=Td.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=vn.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&&gd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Td);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 Rd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Id(r.key),r)}}function Id(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 xd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xd=function(){return!!e})()}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)}vn.Z.registerComponent("PlaybackRateMenuButton",Ed);var Bd=vn.Z.getComponent("TextTrackSettings"),Dd={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},Ad={small:Dd,medium:Object.assign(Object.assign({},Dd),{fontPercent:1.5}),large:Object.assign(Object.assign({},Dd),{fontPercent:2})},Fd=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=Md(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,xd()?Reflect.construct(t,n||[],Md(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&&Ld(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 Ad[this.size_]?Ad[this.size_]:Dd}}])&&Rd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Bd);function zd(e){return zd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zd(e)}function Vd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Zd(r.key),r)}}function Zd(e){var t=function(e){if("object"!=zd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zd(t)?t:t+""}function Ud(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ud=function(){return!!e})()}function Gd(e,t,n,r){var i=Kd(qd(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=qd(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Kd.apply(null,arguments)}function qd(e){return qd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qd(e)}function Hd(e,t){return Hd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hd(e,t)}vn.Z.registerComponent("TextTrackSettings",Fd);var Wd=window.navigator&&window.navigator.userAgent||"",Qd=(/iPod/i.test(Wd),/Android/i.test(Wd),vn.Z.getComponent("Player")),Yd=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=qd(t),function(e,t){if(t&&("object"==zd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ud()?Reflect.construct(t,n||[],qd(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&&Hd(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 Gd(t,"currentTime",this,3)([e]);this.callback_(function(){r.unlock(),r.currentTime(e)})}},{key:"play",value:function(){var e=this;if(!this.callback_)return Gd(t,"play",this,3)([]);this.callback_(function(){e.unlock(),e.play()})}},{key:"createEl",value:function(){var e=this,n=Gd(t,"createEl",this,3)([]);return this.videoContainer||(this.videoContainer=vn.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=Gd(t,"addChild",this,3)([e,n,r]),o=i.el();return o&&this.videoContainer.appendChild(o),i}},{key:"updateStyleEl_",value:function(){if(Qd.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()===$c.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;Qd.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&&Vd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Qd);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){return tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tm(e)}function nm(e,t){return nm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nm(e,t)}Yd.prototype.options_=Object.assign(Object.assign({},Qd.prototype.options_),{setMaxHeight:!0}),vn.Z.registerComponent("player",Yd);var 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"==$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||[],tm(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&&nm(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 vn.Z.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Jd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));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 om(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,am(r.key),r)}}function am(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 um(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(um=function(){return!!e})()}function lm(e){return lm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lm(e)}function cm(e,t){return cm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cm(e,t)}vn.Z.registerComponent("PlayPauseFeedback",rm);var sm=vn.Z.getComponent("PlayToggle"),fm="Play (space)",pm=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=lm(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,um()?Reflect.construct(t,n||[],lm(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&&cm(e,t)}(t,e),n=t,(r=[{key:"handlePlay",value:function(){sm.prototype.handlePlay.call(this),this.controlText("Pause (space)")}},{key:"handlePause",value:function(){sm.prototype.handlePause.call(this),this.controlText(fm)}},{key:"handleClick",value:function(e){var t=this;sm.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)}}])&&om(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(sm);function ym(e){return ym="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ym(e)}function hm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vm(r.key),r)}}function vm(e){var t=function(e){if("object"!=ym(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ym(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ym(t)?t:t+""}function dm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dm=function(){return!!e})()}function mm(e){return mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mm(e)}function bm(e,t){return bm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bm(e,t)}vn.Z.registerComponent("PlayToggle",pm),pm.prototype.controlText_=fm;var gm=vn.Z.getComponent("TextTrackDisplay"),wm=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=mm(t),function(e,t){if(t&&("object"==ym(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,dm()?Reflect.construct(t,n||[],mm(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&&bm(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){gm.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"}}}}}])&&hm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(gm);function Om(e){return Om="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Om(e)}function Sm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,km(r.key),r)}}function km(e){var t=function(e){if("object"!=Om(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Om(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Om(t)?t:t+""}function Pm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pm=function(){return!!e})()}function jm(e){return jm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jm(e)}function Nm(e,t){return Nm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nm(e,t)}vn.Z.registerComponent("TextTrackDisplay",wm);var Cm=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=jm(t),function(e,t){if(t&&("object"==Om(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pm()?Reflect.construct(t,n||[],jm(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&&Nm(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return vn.Z.dom.createEl("div",{className:"cv-control-bar-gradient-container",innerHTML:'<div class="cv-control-bar-gradient"></div>'})}}])&&Sm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function Tm(e){return Tm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tm(e)}function Em(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_m(r.key),r)}}function _m(e){var t=function(e){if("object"!=Tm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Tm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Tm(t)?t:t+""}function Rm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Rm=function(){return!!e})()}function Im(e,t,n,r){var i=xm(Mm(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function xm(){return xm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Mm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},xm.apply(null,arguments)}function Mm(e){return Mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mm(e)}function Lm(e,t){return Lm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lm(e,t)}vn.Z.registerComponent("ControlBarGradient",Cm);var Bm=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=Mm(t),function(e,t){if(t&&("object"==Tm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Rm()?Reflect.construct(t,n||[],Mm(e).constructor):t.apply(e,n))}(this,t,[e,n])).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&&Lm(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e=this.options_.title;if(!this.options_.seriesName)return Im(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,Im(t,"createEl",this,3)(["h1",{innerHTML:e}])):(e="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+e,Im(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}}])&&Em(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function Dm(e){return Dm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dm(e)}function Am(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fm(r.key),r)}}function Fm(e){var t=function(e){if("object"!=Dm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dm(t)?t:t+""}function zm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zm=function(){return!!e})()}function Vm(){return Vm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Zm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Vm.apply(null,arguments)}function Zm(e){return Zm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zm(e)}function Um(e,t){return Um=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Um(e,t)}var Gm=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=Zm(t),function(e,t){if(t&&("object"==Dm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,zm()?Reflect.construct(t,n||[],Zm(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&&Um(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=Vm(Zm(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&&Am(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function Km(e){return Km="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Km(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,Hm(r.key),r)}}function Hm(e){var t=function(e){if("object"!=Km(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Km(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Km(t)?t:t+""}function Wm(e,t){if(t&&("object"==Km(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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 Qm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qm=function(){return!!e})()}function Ym(e){return Ym=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ym(e)}function $m(e,t){return $m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$m(e,t)}var Jm=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=Ym(o=t),r=Wm(i,Qm()?Reflect.construct(o,a||[],Ym(i).constructor):o.apply(i,a)),n.embed?(r.addChild(new Bm(e,n)),r.addChild(new Gm(e,n)),r):Wm(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&&$m(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return vn.Z.dom.createEl("div",{className:"cv-splash-metadata"})}}])&&qm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function Xm(e){return Xm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xm(e)}function eb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tb(r.key),r)}}function tb(e){var t=function(e){if("object"!=Xm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xm(t)?t:t+""}function nb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nb=function(){return!!e})()}function rb(e){return rb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rb(e)}function ib(e,t){return ib=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ib(e,t)}var ob=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=rb(t),function(e,t){if(t&&("object"==Xm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,nb()?Reflect.construct(t,n||[],rb(e).constructor):t.apply(e,n))}(this,t,[e,n])).addChild(new Jm(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&&ib(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(xo,"</div>")),vn.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}}])&&eb(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("posterImage"));function ab(e){return ab="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ab(e)}function ub(e,t){for(var n=0;n<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"!=ab(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ab(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ab(t)?t:t+""}function cb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cb=function(){return!!e})()}function sb(e){return sb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sb(e)}function fb(e,t){return fb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fb(e,t)}vn.Z.registerComponent("posterImage",ob);var pb=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=sb(t),function(e,t){if(t&&("object"==ab(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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||[],sb(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&&fb(e,t)}(t,e),n=t,(r=[{key:"getErrorImage",value:function(){return vn.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 '})}}])&&ub(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("ErrorDisplay"));function yb(e){return yb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yb(e)}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,vb(r.key),r)}}function vb(e){var t=function(e){if("object"!=yb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yb(t)?t:t+""}function db(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(db=function(){return!!e})()}function mb(e){return mb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mb(e)}function bb(e,t){return bb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bb(e,t)}vn.Z.registerComponent("ErrorDisplay",pb);var gb=vn.Z.getComponent("FullscreenToggle"),wb="Fullscreen (f)",Ob=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=mb(t),function(e,t){if(t&&("object"==yb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,db()?Reflect.construct(t,n||[],mb(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&&bb(e,t)}(t,e),n=t,(r=[{key:"handleFullscreenChange",value:function(){gb.prototype.handleFullscreenChange.call(this),this.controlText(wb)}}])&&hb(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(gb);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 kb(e,t){for(var n=0;n<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 jb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jb=function(){return!!e})()}function Nb(e){return Nb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nb(e)}function Cb(e,t){return Cb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cb(e,t)}vn.Z.registerComponent("FullscreenToggle",Ob),Ob.prototype.controlText_=wb;var Tb=vn.Z.getComponent("MuteToggle"),Eb="Mute (m)",_b=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=Nb(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,jb()?Reflect.construct(t,n||[],Nb(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&&Cb(e,t)}(t,e),n=t,(r=[{key:"updateControlText_",value:function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute (m)":Eb;this.controlText_!==e&&this.controlText(e)}}])&&kb(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Tb);function Rb(e){return Rb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rb(e)}function Ib(){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 xb(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]())):(xb(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,xb(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,xb(f,"constructor",c),xb(c,"constructor",l),l.displayName="GeneratorFunction",xb(c,i,"GeneratorFunction"),xb(f),xb(f,i,"Generator"),xb(f,r,function(){return this}),xb(f,"toString",function(){return"[object Generator]"}),(Ib=function(){return{w:o,m:p}})()}function xb(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}xb=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){xb(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},xb(e,t,n,r)}function Mb(e){return function(e){if(Array.isArray(e))return Lb(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 Lb(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)?Lb(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 Lb(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 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,Db(r.key),r)}}function Db(e){var t=function(e){if("object"!=Rb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Rb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Rb(t)?t:t+""}vn.Z.registerComponent("MuteToggle",_b),_b.prototype.controlText_=Eb;var Ab,Fb=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())})},zb=vn.Z.getComponent("Player"),Vb=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=vn.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,vn.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||vn.Z.browser.IS_IOS||vn.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=zb.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(Mb(t),[{name:"collapserator",children:pi.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=Di()(e);if(("t"!==r||n.allowTheatreMode)&&("f"!==r||n.allowFullscreen)&&Gi[r]){Gi[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 Fb(this,void 0,void 0,Ib().m(function e(){var t,n,r=this;return Ib().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 Li.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=ar.getTrack(this.player,"chapters",null);n||(n=this.player.addTextTrack("chapters")),Mb(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 Fb(this,void 0,void 0,Ib().m(function o(){var a,u,l,c=this;return Ib().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(ar.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,ar.sanitizeTrack(n.track,c.player)}}}),a.posterUrl&&this.player.poster(et.j.createUrl(a.posterUrl,{size:Xe.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 Ci&&(null===(t=e.response)||void 0===t?void 0:t.type)===Ui.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 Fb(this,void 0,void 0,Ib().m(function e(){var t;return Ib().w(function(e){for(;;)switch(e.n){case 0:if(!(Ab||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,Li.get(t);case 2:if(Ab=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);Ab?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 Oi({player:this.player,collectionApiUrls:Ab.collectionApi.urls,collectionApiClientId:Ab.collectionApi.clientId,productVersion:"1.37.0-rc.2",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||Ki.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=vn.Z.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=vn.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=vn.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"}}])&&Bb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();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(e,t){for(var n=0;n<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"!=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+""}function Kb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Kb=function(){return!!e})()}function qb(){return qb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Hb(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}},qb.apply(null,arguments)}function Hb(e){return Hb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hb(e)}function Wb(e,t){return Wb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wb(e,t)}Vb.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 Qb=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=Hb(t),function(e,t){if(t&&("object"==Zb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Kb()?Reflect.construct(t,n||[],Hb(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&&Wb(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=qb(Hb(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 vn.Z.createTimeRanges(t)}}],r&&Ub(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));function Yb(e){return Yb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yb(e)}function $b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Jb(r.key),r)}}function Jb(e){var t=function(e){if("object"!=Yb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Yb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Yb(t)?t:t+""}function Xb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xb=function(){return!!e})()}function eg(){return eg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=tg(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}},eg.apply(null,arguments)}function tg(e){return tg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tg(e)}function ng(e,t){return ng=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ng(e,t)}vn.Z.registerPlugin("clipPlugin",Qb);var rg=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=tg(t),function(e,t){if(t&&("object"==Yb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Xb()?Reflect.construct(t,n||[],tg(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&&ng(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=eg(tg(1&3?e.prototype:e),"handleClick",n))?function(e){return r.apply(n,e)}:r)([null])}}],r&&$b(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Button"));function ig(e){return ig="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ig(e)}function og(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ag(r.key),r)}}function ag(e){var t=function(e){if("object"!=ig(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ig(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ig(t)?t:t+""}function ug(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ug=function(){return!!e})()}function lg(e){return lg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lg(e)}function cg(e,t){return cg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cg(e,t)}rg.prototype.controlText_="Create clip",vn.Z.registerComponent("CreateClipButton",rg);var sg=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=lg(t),function(e,t){if(t&&("object"==ig(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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||[],lg(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&&cg(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)}}])&&og(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));function fg(e){return fg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fg(e)}function pg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yg(r.key),r)}}function yg(e){var t=function(e){if("object"!=fg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fg(t)?t:t+""}function hg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hg=function(){return!!e})()}function vg(e){return vg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vg(e)}function dg(e,t){return dg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dg(e,t)}vn.Z.registerPlugin("createClipButtonPlugin",sg);var mg=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=vg(t),function(e,t){if(t&&("object"==fg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hg()?Reflect.construct(t,n||[],vg(e).constructor):t.apply(e,n))}(this,t,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&&dg(e,t)}(t,e),n=t,(r=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&pg(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("PictureInPictureToggle"));function bg(e){return bg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bg(e)}function gg(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return wg(c,"_invoke",function(n,r,i){var o,u,l,c=0,s=i||[],f=!1,p={p:0,n:0,v:e,a: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]())):(wg(t={},r,function(){return this}),t),f=c.prototype=u.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,wg(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,wg(f,"constructor",c),wg(c,"constructor",l),l.displayName="GeneratorFunction",wg(c,i,"GeneratorFunction"),wg(f),wg(f,i,"Generator"),wg(f,r,function(){return this}),wg(f,"toString",function(){return"[object Generator]"}),(gg=function(){return{w:o,m:p}})()}function wg(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}wg=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){wg(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},wg(e,t,n,r)}function Og(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sg(r.key),r)}}function Sg(e){var t=function(e){if("object"!=bg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bg(t)?t:t+""}function kg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(kg=function(){return!!e})()}function Pg(){return Pg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=jg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Pg.apply(null,arguments)}function jg(e){return jg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jg(e)}function Ng(e,t){return Ng=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ng(e,t)}vn.Z.registerComponent("PictureInPictureToggle",mg);var Cg=vn.Z.getComponent("PlayToggle"),Tg=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=jg(t),function(e,t){if(t&&("object"==bg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kg()?Reflect.construct(t,n||[],jg(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&&Ng(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 Cg(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=gg().m(function e(){return gg().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=Pg(jg(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&Og(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));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(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Rg(r.key),r)}}function Rg(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 Ig(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ig=function(){return!!e})()}function xg(e,t,n,r){var i=Mg(Lg(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Mg(){return Mg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Lg(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}},Mg.apply(null,arguments)}function Lg(e){return Lg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lg(e)}function Bg(e,t){return Bg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bg(e,t)}vn.Z.registerPlugin("pictureInPicture",Tg);var Dg=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=Lg(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,Ig()?Reflect.construct(t,n||[],Lg(e).constructor):t.apply(e,n))}(this,t,[e,n])).hasBuffered=!1,r.hasPlayed=!1,r.eventsService=ot,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&&Bg(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(xg(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return xg(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=vn.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")}}])&&_g(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function Ag(e){return Ag="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ag(e)}function Fg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zg(r.key),r)}}function zg(e){var t=function(e){if("object"!=Ag(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ag(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ag(t)?t:t+""}function Vg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vg=function(){return!!e})()}function Zg(){return Zg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ug(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}},Zg.apply(null,arguments)}function Ug(e){return Ug=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ug(e)}function Gg(e,t){return Gg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gg(e,t)}var Kg=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=Ug(t),function(e,t){if(t&&("object"==Ag(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Vg()?Reflect.construct(t,n||[],Ug(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&&Gg(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(){vn.Z.dom.addClass(this.toggleEl,"on"),vn.Z.dom.setAttribute(this.toggleEl,"aria-checked","true"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){vn.Z.dom.removeClass(this.toggleEl,"on"),vn.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=vn.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),vn.Z.dom.setAttribute(this.toggleEl,"id","poi-toggle"),vn.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=Zg(Ug(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&&Fg(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("MenuItem"));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 Hg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wg(r.key),r)}}function Wg(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 Qg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qg=function(){return!!e})()}function Yg(e){return Yg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yg(e)}function $g(e,t){return $g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$g(e,t)}vn.Z.registerComponent("PointsOfInterestMenuItem",Kg);var Jg,Xg=vn.Z.getPlugin("plugin"),ew="cvplayer-points-of-interest",tw=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=Yg(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,Qg()?Reflect.construct(t,n||[],Yg(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&&$g(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.pointsOfInterest&&(to()&&"false"===no(ew)&&(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){ro(ew,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 Dg(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:Kg,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach(function(t){return t.updateBuffered(lp(e.player))})}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach(function(t){return t.updatePlaybackProgress(e.player.currentTime())})}}])&&Hg(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xg);function nw(e){return nw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nw(e)}function rw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iw(r.key),r)}}function iw(e){var t=function(e){if("object"!=nw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nw(t)?t:t+""}function ow(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ow=function(){return!!e})()}function aw(e){return aw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},aw(e)}function uw(e,t){return uw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uw(e,t)}vn.Z.registerPlugin("pointsOfInterestPlugin",tw),function(e){e.None="None",e.Complete="Complete",e.Incomplete="Incomplete"}(Jg||(Jg={}));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=aw(t),function(e,t){if(t&&("object"==nw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,ow()?Reflect.construct(t,n||[],aw(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&&uw(e,t)}(t,e),n=t,r=[{key:"update",value:function(){this.options_.activityStatus===Jg.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===Jg.None||this.options_.activityStatus===Jg.Incomplete?Jg.Complete:this.options_.activityStatus===Jg.Complete?Jg.Incomplete:void 0}}],r&&rw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Button"));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 sw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fw(r.key),r)}}function fw(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 pw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pw=function(){return!!e})()}function yw(e){return yw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yw(e)}function hw(e,t){return hw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hw(e,t)}lw.prototype.controlText_="Complete";var vw=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=yw(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,pw()?Reflect.construct(t,n||[],yw(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&&hw(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 lw(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button)}}])&&sw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));function dw(e){return dw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dw(e)}function mw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bw(r.key),r)}}function bw(e){var t=function(e){if("object"!=dw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dw(t)?t:t+""}function gw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(gw=function(){return!!e})()}function ww(e,t,n,r){var i=Ow(Sw(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Ow(){return Ow="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Sw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ow.apply(null,arguments)}function Sw(e){return Sw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sw(e)}function kw(e,t){return kw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kw(e,t)}vn.Z.registerPlugin("activityStatusPlugin",vw);var 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=Sw(t),function(e,t){if(t&&("object"==dw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,gw()?Reflect.construct(t,n||[],Sw(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&&kw(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.setPosition()}},{key:"buildCSSClass",value:function(){return"cv-range-indicator ".concat(ww(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return ww(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+"%"}}])&&mw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function jw(e){return jw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jw(e)}function Nw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Cw(r.key),r)}}function Cw(e){var t=function(e){if("object"!=jw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=jw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jw(t)?t:t+""}function Tw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Tw=function(){return!!e})()}function Ew(e,t,n,r){var i=_w(Rw(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function _w(){return _w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Rw(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}},_w.apply(null,arguments)}function Rw(e){return Rw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rw(e)}function Iw(e,t){return Iw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Iw(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=Rw(t),function(e,t){if(t&&("object"==jw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Tw()?Reflect.construct(t,n||[],Rw(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&&Iw(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view-button ".concat(Ew(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Ew(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()}}])&&Nw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("ClickableComponent"));function Mw(e){return Mw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mw(e)}function Lw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bw(r.key),r)}}function Bw(e){var t=function(e){if("object"!=Mw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Mw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mw(t)?t:t+""}function Dw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dw=function(){return!!e})()}function Aw(e,t,n,r){var i=Fw(zw(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Fw(){return Fw="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}},Fw.apply(null,arguments)}function zw(e){return zw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zw(e)}function Vw(e,t){return Vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vw(e,t)}var Zw=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"==Mw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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||[],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&&Vw(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view ".concat(Aw(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){var i=Aw(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r]),o=vn.Z.dom.createEl("h5",{innerHTML:this.localize("This clip has finished"),className:"cv-replay-heading"}),a=vn.Z.dom.createEl("div",{className:"cv-button-container"}),u=new xw(this.player_,{label:this.localize("Replay clip"),iconClassName:"cv-replay-icon",onPress:this.options_.onReplayPress}),l=new xw(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}}])&&Lw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function Uw(e){return Uw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uw(e)}function Gw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Kw(r.key),r)}}function Kw(e){var t=function(e){if("object"!=Uw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Uw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Uw(t)?t:t+""}function qw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qw=function(){return!!e})()}function Hw(){return Hw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ww(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}},Hw.apply(null,arguments)}function Ww(e){return Ww=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ww(e)}function Qw(e,t){return Qw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qw(e,t)}var Yw=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=Ww(t),function(e,t){if(t&&("object"==Uw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,qw()?Reflect.construct(t,n||[],Ww(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&&Qw(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 Pw(this.player,{time:this.startTime}),null==t||t.addChild(this.startTimeIndicator)),this.endTimeIndicator||(this.endTimeIndicator=new Pw(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 Zw(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=Hw(Ww(1&3?i.prototype:i),"dispose",o))?function(e){return a.apply(o,e)}:a)([])}}],r&&Gw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));function $w(e){return $w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$w(e)}function Jw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xw(r.key),r)}}function Xw(e){var t=function(e){if("object"!=$w(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$w(t)?t:t+""}function eO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eO=function(){return!!e})()}function tO(e,t,n,r){var i=nO(rO(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function nO(){return nO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=rO(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},nO.apply(null,arguments)}function rO(e){return rO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rO(e)}function iO(e,t){return iO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},iO(e,t)}vn.Z.registerPlugin("rangeIndicatorPlugin",Yw);var oO=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"==$w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,eO()?Reflect.construct(t,n||[],rO(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&&iO(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(){vn.Z.dom.addClass(this.toggleEl,"on")}},{key:"toggleOff",value:function(){vn.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=vn.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=tO(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),tO(t,"dispose",this,3)([])}}])&&Jw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("MenuItem"));function aO(e){return aO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aO(e)}function uO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lO(r.key),r)}}function lO(e){var t=function(e){if("object"!=aO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=aO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==aO(t)?t:t+""}function cO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cO=function(){return!!e})()}function sO(){return sO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=fO(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},sO.apply(null,arguments)}function fO(e){return fO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fO(e)}function pO(e,t){return pO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pO(e,t)}vn.Z.registerComponent("LoopVideoMenuItem",oO);var yO=vn.Z.getPlugin("plugin"),hO=(vn.Z.getComponent("MenuItem"),vn.Z.getComponent("LoopVideoMenuItem")),vO=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=fO(t),function(e,t){if(t&&("object"==aO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cO()?Reflect.construct(t,n||[],fO(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&&pO(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:hO,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=sO(fO(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&uO(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(yO);vn.Z.registerPlugin("loopVideoPlugin",vO);var dO=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 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(){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 gO(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]())):(gO(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,gO(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,gO(f,"constructor",c),gO(c,"constructor",l),l.displayName="GeneratorFunction",gO(c,i,"GeneratorFunction"),gO(f),gO(f,i,"Generator"),gO(f,r,function(){return this}),gO(f,"toString",function(){return"[object Generator]"}),(bO=function(){return{w:o,m:p}})()}function gO(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}gO=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){gO(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},gO(e,t,n,r)}function wO(e){return function(e){if(Array.isArray(e))return OO(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 OO(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)?OO(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 OO(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 SO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kO(r.key),r)}}function kO(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 PO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(PO=function(){return!!e})()}function jO(e,t,n,r){var i=NO(CO(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function NO(){return NO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=CO(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},NO.apply(null,arguments)}function CO(e){return CO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},CO(e)}function TO(e,t){return TO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},TO(e,t)}var EO,_O,RO=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=CO(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,PO()?Reflect.construct(t,n||[],CO(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&&TO(e,t)}(t,e),n=t,(r=[{key:"getPlayerOptions",value:function(){var e,n=jO(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(wO(n.techOrder)),devices:{instanceId:dO()}}):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 jO(t,"additionalSetup",a,1)}}});return n=this,r=void 0,i=void 0,o=bO().m(function t(){var n;return bO().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;jO(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){ar.useMetadataTracks(this.player,"transcript",e,t)}},{key:"useChapters",value:function(e){ar.useChapters(this.player,e)}}])&&SO(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Vb),IO=n(33937);function xO(e){return xO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xO(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,LO(r.key),r)}}function LO(e){var t=function(e){if("object"!=xO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xO(t)?t:t+""}!function(e){e.AppleTv="apple-tv",e.Vivi="vivi"}(EO||(EO={})),function(e){e.Available="available",e.Offline="offline",e.Busy="busy"}(_O||(_O={}));var BO=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)}}])&&MO(t.prototype,n),r&&MO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();function DO(e){return DO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},DO(e)}function AO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,VO(r.key),r)}}function zO(e,t,n){return t&&FO(e.prototype,t),n&&FO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function VO(e){var t=function(e){if("object"!=DO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=DO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==DO(t)?t:t+""}Symbol.toStringTag;var ZO=function(){return zO(function e(){AO(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()?BO.reject(new Error("This EventChannel instance has been disposed")):new BO(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}}])}(),UO=function(){return zO(function e(){AO(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",GO.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 ZO),this.channels[e]}}])}(),GO={void:void 0};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+""}var WO,QO,YO,$O=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}}])&&qO(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),JO=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)}})},XO=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 eS(e){return eS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eS(e)}function tS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rS(r.key),r)}}function nS(e,t,n){return t&&tS(e.prototype,t),n&&tS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function rS(e){var t=function(e){if("object"!=eS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=eS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eS(t)?t:t+""}!function(e){e[e.Offline=0]="Offline",e[e.Online=1]="Online",e[e.Locked=2]="Locked",e[e.Suspended=3]="Suspended"}(WO||(WO={})),function(e){e[e.PlaybackStatusChange=0]="PlaybackStatusChange",e[e.PositionChange=1]="PositionChange"}(QO||(QO={})),function(e){e.Begin="BEGIN",e.Play="PLAY",e.Pause="PAUSE",e.Load="LOAD",e.Scan="SCAN",e.Stop="STOP"}(YO||(YO={}));var iS=nS(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=YO.Load,this.debounced=JO(this,2e3),XO(this)});function oS(e){return oS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oS(e)}function aS(){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 uS(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]())):(uS(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,uS(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,uS(f,"constructor",c),uS(c,"constructor",l),l.displayName="GeneratorFunction",uS(c,i,"GeneratorFunction"),uS(f),uS(f,i,"Generator"),uS(f,r,function(){return this}),uS(f,"toString",function(){return"[object Generator]"}),(aS=function(){return{w:o,m:p}})()}function uS(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}uS=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){uS(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},uS(e,t,n,r)}function lS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cS(r.key),r)}}function cS(e){var t=function(e){if("object"!=oS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oS(t)?t:t+""}function sS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sS=function(){return!!e})()}function fS(){return fS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=pS(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}},fS.apply(null,arguments)}function pS(e){return pS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pS(e)}function yS(e,t){return yS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yS(e,t)}var hS=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=pS(t),function(e,t){if(t&&("object"==oS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,sS()?Reflect.construct(t,n||[],pS(e).constructor):t.apply(e,n))}(this,t)).client=e,r.localState=new iS(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&&yS(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=fS(pS(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 QO.PlaybackStatusChange:this.handlePlaybackChange(t,e);break;case QO.PositionChange:this.handlePositionChange(t,e)}}}},{key:"handlePlaybackChange",value:function(e,t){e.playbackStatus!==t.params.playbackStatus&&(e.playbackStatus=t.params.playbackStatus,this.trigger("playingchange",GO.void),e.playbackStatus===YO.Stop&&this.dispose())}},{key:"handlePositionChange",value:function(e,t){e.position!==t.params.position&&(e.position=t.params.position,this.trigger("positionchange",GO.void))}},{key:"loadSource",value:function(){return e=this,t=void 0,n=void 0,r=aS().m(function e(){var t;return aS().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",GO.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!==YO.Play&&(this.localState.playbackStatus=YO.Play,this.client.play(this.getDevice().id),this.trigger("playingchange",GO.void))}},{key:"pause",value:function(){this.localState.locked&&this.localState.playbackStatus!==YO.Pause&&(this.localState.playbackStatus=YO.Pause,this.client.pause(this.getDevice().id),this.trigger("playingchange",GO.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",GO.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===YO.Play||this.localState.playbackStatus===YO.Begin||this.localState.playbackStatus===YO.Load}},{key:"isPlaybackFinished",value:function(){return this.localState.playbackStatus===YO.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&&lS(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(UO);function vS(e){return vS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vS(e)}function dS(){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 mS(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]())):(mS(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,mS(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,mS(f,"constructor",c),mS(c,"constructor",l),l.displayName="GeneratorFunction",mS(c,i,"GeneratorFunction"),mS(f),mS(f,i,"Generator"),mS(f,r,function(){return this}),mS(f,"toString",function(){return"[object Generator]"}),(dS=function(){return{w:o,m:p}})()}function mS(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}mS=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){mS(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},mS(e,t,n,r)}function bS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gS(r.key),r)}}function gS(e){var t=function(e){if("object"!=vS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vS(t)?t:t+""}function wS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wS=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=SS(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},OS.apply(null,arguments)}function SS(e){return SS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},SS(e)}function kS(e,t){return kS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kS(e,t)}var PS,jS,NS,CS=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"}(PS||(PS={})),function(e){e.Command="Command",e.Pair="Pair",e.Unpair="Unpair",e.RenameDevice="Renamedevice",e.Subscribe="Subscribe",e.Lock="Lock"}(jS||(jS={})),function(e){e[e.Connecting=0]="Connecting",e[e.Connected=1]="Connected",e[e.Reconnecting=2]="Reconnecting",e[e.Disconnected=4]="Disconnected"}(NS||(NS={}));var TS=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=SS(t),function(e,t){if(t&&("object"==vS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,wS()?Reflect.construct(t,n||[],SS(e).constructor):t.apply(e,n))}(this,t)).options=e,n.accessToken=void 0,n.devices=[],n.heartbeat=new $O,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&&kS(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=ur(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 CS(this,void 0,void 0,dS().m(function e(){var t;return dS().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,IO.OB)(this.accessToken.host,{logging:!1}),this.hubProxy=this.connection.createHubProxy("DeviceUserHub"),this.hubProxy.on(PS.DeviceList,this.handleDeviceList),this.hubProxy.on(PS.DeviceStateChange,this.handleDeviceStateChange),this.hubProxy.on(PS.Paired,this.handleDevicePaired),this.hubProxy.on(PS.Unpaired,this.handleDeviceUnpaired),this.hubProxy.on(PS.PlayStatusChange,this.handlePlayStatusChange),this.hubProxy.on(PS.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 CS(this,void 0,void 0,dS().m(function e(){var t=this;return dS().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 CS(this,void 0,void 0,dS().m(function t(){return dS().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(jS.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 CS(this,void 0,void 0,dS().m(function e(){var t;return dS().w(function(e){for(;;)switch(e.n){case 0:if(this.connection.state===NS.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 CS(this,void 0,void 0,dS().m(function t(){var r,i=this;return dS().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,BO.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",GO.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",GO.void))}},{key:"handleDevicePaired",value:function(e){"vivi"!==e.type&&(this.devices.push(t.convertToGenericDevice(e)),this.trigger("deviceschange",GO.void))}},{key:"handleDeviceUnpaired",value:function(e){this.devices=this.devices.filter(function(t){return t.id!==e}),this.trigger("deviceschange",GO.void)}},{key:"handlePlayStatusChange",value:function(e,t){this.trigger("message",{event:QO.PlaybackStatusChange,deviceId:e,params:{playbackStatus:t.commandType}})}},{key:"handleTimeSync",value:function(e,t){this.trigger("message",{event:QO.PositionChange,deviceId:e,params:{position:t}})}},{key:"dispose",value:function(){var e,n,r;this.hubProxy.off(PS.DeviceList,this.handleDeviceList),this.hubProxy.off(PS.DeviceStateChange,this.handleDeviceStateChange),this.hubProxy.off(PS.Paired,this.handleDevicePaired),this.hubProxy.off(PS.Unpaired,this.handleDeviceUnpaired),this.hubProxy.off(PS.PlayStatusChange,this.handlePlayStatusChange),this.hubProxy.off(PS.TimeSync,this.handleTimeSync),this.hubProxy.connection.stop(!1,!0),this.heartbeat.stop(),(e=t,n=this,"function"==typeof(r=OS(SS(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"canCastToDevice",value:function(e){return e===EO.AppleTv}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new hS(this,e)}},{key:"lock",value:function(e){var t;return CS(this,void 0,void 0,dS().m(function n(){return dS().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,this.invoke(jS.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 CS(this,void 0,void 0,dS().m(function t(){return dS().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(jS.Command,{DeviceId:e,CommandType:YO.Play,Data:this.options.trackingCode});case 2:return t.a(2)}},t,this)}))}},{key:"play",value:function(e){return CS(this,void 0,void 0,dS().m(function t(){return dS().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(jS.Command,{DeviceId:e,CommandType:YO.Play});case 1:return t.a(2)}},t,this)}))}},{key:"pause",value:function(e){return CS(this,void 0,void 0,dS().m(function t(){return dS().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(jS.Command,{DeviceId:e,CommandType:YO.Pause});case 1:return t.a(2)}},t,this)}))}},{key:"seek",value:function(e,t){this.invokeDebounced(jS.Command,{DeviceId:e,CommandType:YO.Play,Params:"1,".concat(Math.trunc(t))})}},{key:"stop",value:function(e){return CS(this,void 0,void 0,dS().m(function t(){return dS().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(jS.Command,{DeviceId:e,CommandType:YO.Stop});case 1:return t.a(2)}},t,this)}))}},{key:"pair",value:function(e){return CS(this,void 0,void 0,dS().m(function t(){var n;return dS().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(jS.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 CS(this,void 0,void 0,dS().m(function t(){return dS().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.invoke(jS.Unpair,e);case 1:return t.a(2)}},t,this)}))}},{key:"renameDevice",value:function(e){var t=e.deviceId,n=e.deviceName;return CS(this,void 0,void 0,dS().m(function e(){return dS().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.invoke(jS.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 WO.Online:return _O.Available;case WO.Locked:return _O.Busy;case WO.Suspended:case WO.Offline:return _O.Offline}}},{key:"convertToGenericDevice",value:function(e){return{id:e.deviceId,name:e.name,type:EO.AppleTv,status:t.convertToGenericDeviceStatus(e.status)}}}],r&&bS(n.prototype,r),i&&bS(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(UO);function ES(e){return ES="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ES(e)}function _S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RS(r.key),r)}}function RS(e){var t=function(e){if("object"!=ES(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ES(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ES(t)?t:t+""}var IS={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},xS=function(){return e=function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:IS;!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({},IS),r),this.webSocket=this.connect(),this.heartbeat=(new $O).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()}}])&&_S(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function MS(e){return MS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MS(e)}function LS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,BS(r.key),r)}}function BS(e){var t=function(e){if("object"!=MS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=MS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==MS(t)?t:t+""}var DS,AS=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=JO(this,2e3),XO(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}}])&&LS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();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 zS(){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 VS(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]())):(VS(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,VS(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,VS(f,"constructor",c),VS(c,"constructor",l),l.displayName="GeneratorFunction",VS(c,i,"GeneratorFunction"),VS(f),VS(f,i,"Generator"),VS(f,r,function(){return this}),VS(f,"toString",function(){return"[object Generator]"}),(zS=function(){return{w:o,m:p}})()}function VS(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}VS=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){VS(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},VS(e,t,n,r)}function ZS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,US(r.key),r)}}function US(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 GS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(GS=function(){return!!e})()}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)}!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"}(DS||(DS={}));var WS=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())})},QS=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"==FS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,GS()?Reflect.construct(t,n||[],qS(e).constructor):t.apply(e,n))}(this,t)).client=e,r.localState=new AS(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&&HS(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=KS(qS(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"handleClientConnected",value:function(){return WS(this,void 0,void 0,zS().m(function e(){var t;return zS().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 DS.Update:this.handleUpdateMessage(t,n);break;case DS.NewChapter:this.handleNewChapterMessage(t,n);break;case DS.Volume:this.handleVolumeMessage(t,n);break;case DS.Playing:this.handlePlayingMessage(t);break;case DS.Paused:this.handlePausedMessage(t);break;case DS.Finished:this.handleFinishedMessage(t);break;case DS.Stopped:this.handleStoppedMessage()}}},{key:"handleUpdateMessage",value:function(e,t){e.duration!==t.duration&&(e.duration=t.duration,this.trigger("durationchange",GO.void)),e.position!==t.position&&(e.position=t.position,this.trigger("positionchange",GO.void)),e.subtitles!==t.subtitles&&(e.subtitles=t.subtitles,this.trigger("subtitleschange",GO.void))}},{key:"handleVolumeMessage",value:function(e,t){e.volume!==t.level&&(e.volume=t.level,e.mute=0===t.level,this.trigger("volumechange",GO.void))}},{key:"handlePlayingMessage",value:function(e){!0!==e.playing&&(e.playing=!0,e.playbackFinished=!1,this.trigger("playingchange",GO.void))}},{key:"handlePausedMessage",value:function(e){!1!==e.playing&&(e.playing=!1,this.trigger("playingchange",GO.void))}},{key:"handleFinishedMessage",value:function(e){!0!==e.playbackFinished&&(e.playing=!1,e.playbackFinished=!0,this.trigger("playingchange",GO.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",GO.void))}},{key:"handleStoppedMessage",value:function(){this.dispose()}},{key:"loadSource",value:function(e,t){return WS(this,void 0,void 0,zS().m(function n(){var r,i,o;return zS().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",GO.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",GO.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",GO.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",GO.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",GO.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",GO.void))}},{key:"setSubtitles",value:function(e){return WS(this,void 0,void 0,zS().m(function t(){var n;return zS().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",GO.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&&ZS(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(UO);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)}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=1e4,uk=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=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)).options=e,n.accessToken="",n.devices=[],n.devicesFingerprint="",n.deviceDiscovery=new $O,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&&ik(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=ur(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 xS(this.options.url),this.webSocket.onMessage=function(t){return e.trigger("message",JSON.parse(t.data))},this.webSocket.onOpen=function(){return ok(e,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.options.fetchAccessToken();case 1:return this.accessToken=e.v,e.n=2,this.authenticateWithVivi();case 2:this.beginDeviceDiscovery(),this.trigger("connected",GO.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 ok(e,void 0,void 0,$S().m(function e(){var n,r,i,o,a;return $S().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:EO.Vivi,status:_O.Available}}),this.devicesFingerprint=r,this.trigger("deviceschange",GO.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=nk(rk(1&3?n.prototype:n),"dispose",r))?function(e){return i.apply(r,e)}:i)([])}},{key:"canCastToDevice",value:function(e){return e===EO.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new QS(this,e)}},{key:"authenticateWithVivi",value:function(){return ok(this,void 0,void 0,$S().m(function e(){return $S().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(ak).catch(function(){throw new Error("Failed to authenticate with Vivi")});case 1:return e.a(2)}},e,this)}))}},{key:"getRoomList",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 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(ak).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 ok(this,void 0,void 0,$S().m(function t(){return $S().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(ak).catch(function(){throw new Error("Failed to join room")});case 1:return t.a(2)}},t,this)}))}},{key:"query",value:function(e){return ok(this,void 0,void 0,$S().m(function n(){var r;return $S().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(ak).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 ok(this,void 0,void 0,$S().m(function e(){return $S().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(ak).catch(function(){throw new Error("Failed to load media")});case 1:return e.a(2)}},e,this)}))}},{key:"play",value:function(e){return ok(this,void 0,void 0,$S().m(function t(){return $S().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(ak).catch(function(){throw new Error("Failed to play video")});case 1:return t.a(2)}},t,this)}))}},{key:"pause",value:function(e){return ok(this,void 0,void 0,$S().m(function t(){return $S().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(ak).catch(function(){throw new Error("Failed to pause video")});case 1:return t.a(2)}},t,this)}))}},{key:"stop",value:function(e){return ok(this,void 0,void 0,$S().m(function t(){return $S().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(ak).catch(function(){throw new Error("Failed to stop video")});case 1:return t.a(2)}},t,this)}))}},{key:"seek",value:function(e,t){return ok(this,void 0,void 0,$S().m(function n(){return $S().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(ak).catch(function(){throw new Error("Failed to seek video")});case 1:return n.a(2)}},n,this)}))}},{key:"setVolume",value:function(e,t){return ok(this,void 0,void 0,$S().m(function n(){return $S().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(ak).catch(function(){throw new Error("Failed to set volume")});case 1:return n.a(2)}},n,this)}))}},{key:"setMuted",value:function(e,t){return ok(this,void 0,void 0,$S().m(function n(){return $S().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(ak).catch(function(){throw new Error("Failed to set mute")});case 1:return n.a(2)}},n,this)}))}},{key:"setSubtitles",value:function(e,n){return ok(this,void 0,void 0,$S().m(function r(){var i;return $S().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(ak).catch(function(){throw new Error("Failed to set subtitles")});case 1:return r.a(2)}},r,this)}))}}],i=[{key:"createAckId",value:function(){return dO()}},{key:"calculateFingerprint",value:function(e){return e.map(function(e){return e.id}).sort().join(",")}}],r&&XS(n.prototype,r),i&&XS(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(UO);function lk(e){return lk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lk(e)}function ck(e){return function(e){if(Array.isArray(e))return sk(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 sk(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)?sk(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 sk(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 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,pk(r.key),r)}}function pk(e){var t=function(e){if("object"!=lk(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=lk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lk(t)?t:t+""}function yk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yk=function(){return!!e})()}function hk(){return hk="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=vk(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}},hk.apply(null,arguments)}function vk(e){return vk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vk(e)}function dk(e,t){return dk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dk(e,t)}var mk=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=vk(t),function(e,t){if(t&&("object"==lk(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,yk()?Reflect.construct(t,n||[],vk(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&&dk(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(ck(e),ck(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=hk(vk(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&&fk(n.prototype,r),i&&fk(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(UO);function bk(e){return bk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bk(e)}function gk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wk(r.key),r)}}function wk(e){var t=function(e){if("object"!=bk(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bk(t)?t:t+""}function Ok(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ok=function(){return!!e})()}function Sk(e,t,n,r){var i=kk(Pk(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function kk(){return kk="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Pk(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}},kk.apply(null,arguments)}function Pk(e){return Pk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pk(e)}function jk(e,t){return jk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jk(e,t)}mk.instances={};var Nk=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=Pk(t),function(e,t){if(t&&("object"==bk(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,Ok()?Reflect.construct(t,n||[],Pk(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&&jk(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e,n,r=Sk(t,"createEl",this,3)(["li",{className:"vjs-menu-item cv-device-menu-item"}]),i=vn.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(){Sk(t,"show",this,3)([])}},{key:"hide",value:function(){Sk(t,"hide",this,3)([])}},{key:"isVisible",value:function(){return!Sk(t,"hasClass",this,3)(["vjs-hidden"])}}])&&gk(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("MenuItem"));function Ck(e){return Ck="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ck(e)}function Tk(e,t){for(var n=0;n<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"!=Ck(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ck(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ck(t)?t:t+""}function _k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_k=function(){return!!e})()}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)}var xk=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=Rk(t),function(e,t){if(t&&("object"==Ck(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,_k()?Reflect.construct(t,n||[],Rk(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&&Ik(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e=Js.apply(this),t=this.contentEl_;return this.contentWrapper=vn.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 Ys.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"))}}])&&Tk(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Menu"));function Mk(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(EO.AppleTv)&&f(EO.Vivi)?"vivi_and_apple_tv":f(EO.Vivi)?"vivi":"apple_tv",i.createElement("div",{className:"cv-devices-cta",tabIndex:-1},i.createElement(Lk,{context:c,localize:s,onDismiss:function(){return o(c)}}),i.createElement(Bk,{context:c}),i.createElement(Dk,{context:c,canUserManageIntegrations:n,localize:s,onContactSupport:function(){return l(c)},onInstall:function(){return a(c)},onLearnMore:function(){return u(c)}}))}function Lk(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 Bk(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 Dk(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 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,t,n,r){var i=Uk(Gk(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Uk(){return Uk="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Gk(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}},Uk.apply(null,arguments)}function Gk(e){return Gk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gk(e)}function Kk(e,t){return Kk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kk(e,t)}vn.Z.registerComponent("DevicesMenu",xk),vn.Z.registerComponent("DevicesCta",Sv(function(e,t){return i.createElement(Mk,Object.assign({player:e},t))},{properties:{className:"cv-devices-cta-wrapper"}}));var qk=vn.Z.getComponent("DevicesCta"),Hk=vn.Z.getComponent("MenuButton"),Wk=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=Gk(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||[],Gk(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&&Kk(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=Hk.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(Zk(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createMenu",value:function(){var e=this,t=new xk(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 qk(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 An(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new Or(this.player_,{menuButton:this,search:function(t){return e.setSearchText(t)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new Sr(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;Zk(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 Nk})}},{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 Nk(t.player(),{id:e.id,label:e.name,schoolName:e.schoolName,description:e.description,selected:!1,multiSelectable:!1,selectable:!0,available:e.status===_O.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===_O.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(){Zk(t,"handleClick",this,3)([null]),this.options_.onClick()}}],r&&Fk(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Hk);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(){return Xk="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=eP(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}},Xk.apply(null,arguments)}function eP(e){return eP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},eP(e)}function tP(e,t){return tP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tP(e,t)}Wk.prototype.controlText_="Devices",vn.Z.registerComponent("DevicesButton",Wk);var nP=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=eP(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||[],eP(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&&tP(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=Xk(eP(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:EO.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&&Yk(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("Component"));function rP(e){return rP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rP(e)}function iP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oP(r.key),r)}}function oP(e){var t=function(e){if("object"!=rP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rP(t)?t:t+""}function aP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aP=function(){return!!e})()}function uP(e,t,n,r){var i=lP(cP(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function lP(){return lP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=cP(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}},lP.apply(null,arguments)}function cP(e){return cP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cP(e)}function sP(e,t){return sP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sP(e,t)}var fP=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=cP(t),function(e,t){if(t&&("object"==rP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,aP()?Reflect.construct(t,n||[],cP(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,vn.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&&sP(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 ar.findTrackByPredicate(this.videojsPlayer.player_,function(e){return"showing"===e.mode&&!!e.src})}},{key:"setSelectedTextTrack",value:function(e){ar.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(),uP(t,"cleanupAutoTextTracks",this,3)([]),uP(t,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=this;return this.ui=this.ui||new nP({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 uP(t,"addRemoteTextTrack",this,3)([e,!0])}},{key:"getCastSession",value:function(){var e;return mk.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 vn.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!!mk.getOrCreateInstance(null!==(n=null==t?void 0:t.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return mk.isActive()}}],r&&iP(n.prototype,r),i&&iP(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(vn.Z.getComponent("Tech"));function pP(e){return pP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pP(e)}function 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,hP(r.key),r)}}function hP(e){var t=function(e){if("object"!=pP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pP(t)?t:t+""}function vP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vP=function(){return!!e})()}function dP(){return dP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=mP(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}},dP.apply(null,arguments)}function mP(e){return mP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mP(e)}function bP(e,t){return bP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bP(e,t)}vn.Z.registerTech("devices",fP);var gP=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=mP(t),function(e,t){if(t&&("object"==pP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,vP()?Reflect.construct(t,n||[],mP(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&&bP(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(EO.AppleTv),u.enabled&&u.accountConnected||l.push(EO.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:Ze.Vw.Select,workflowPhase:Ze.eu.Complete,descriptor:Ze.UX.ChangeDevice,entity:Ze.py.Device,eventVersion:Ze.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(EO.AppleTv)),this.player.removeClass("cv-device-".concat(EO.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(uk)){var t=new uk({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(TS)){var t=new TS({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 mk.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),mk.disposeAndRemoveInstance(i),(e=t,n=this,"function"==typeof(r=dP(mP(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([]))}}],r&&yP(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));function wP(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 OP(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 wP(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)?wP(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 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 kP(e,t){for(var n=0;n<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 jP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jP=function(){return!!e})()}function NP(e,t,n,r){var i=CP(TP(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}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)}vn.Z.registerPlugin("devicesPlugin",gP),vn.Z.registerComponent("UpNext",Sv(function(e,t){return i.createElement(OP,Object.assign({player:e},t))}));var _P=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=TP(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,jP()?Reflect.construct(t,n||[],TP(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&&EP(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(){vn.Z.dom.addClass(this.toggleEl,"on")}},{key:"toggleOff",value:function(){vn.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=vn.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=NP(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),NP(t,"dispose",this,3)([])}}])&&kP(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("MenuItem"));function RP(e){return RP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},RP(e)}function IP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xP(r.key),r)}}function xP(e){var t=function(e){if("object"!=RP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=RP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==RP(t)?t:t+""}function MP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(MP=function(){return!!e})()}function LP(){return LP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=BP(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}},LP.apply(null,arguments)}function BP(e){return BP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BP(e)}function DP(e,t){return DP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},DP(e,t)}vn.Z.registerComponent("NextVideoMenuItem",_P);var AP="cv-persisttest",FP="cv-play-next-video",zP=vn.Z.getPlugin("plugin"),VP=(vn.Z.getComponent("MenuItem"),vn.Z.getComponent("NextVideoMenuItem")),ZP=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=BP(t),function(e,t){if(t&&("object"==RP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,MP()?Reflect.construct(t,n||[],BP(e).constructor):t.apply(e,n))}(this,t,[e])).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(FP);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&&DP(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.player.isDisposed()||this.bindListeners()}},{key:"getChapterTrack",value:function(){return ar.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:VP,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(FP,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=LP(BP(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(AP,"persistPlayNext"),window.localStorage.removeItem(AP),!0}catch(e){return!1}}}],r&&IP(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(zP);vn.Z.registerPlugin("nextVideoPlugin",ZP);var UP=n(39202);function GP(e){return GP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},GP(e)}function KP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qP(r.key),r)}}function qP(e){var t=function(e){if("object"!=GP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=GP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==GP(t)?t:t+""}function HP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(HP=function(){return!!e})()}function WP(){return WP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=QP(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}},WP.apply(null,arguments)}function QP(e){return QP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},QP(e)}function YP(e,t){return YP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},YP(e,t)}function $P(e){return i.createElement("div",{className:"cv-resource-item"},i.createElement(Gt.s,{data:e.resource,imageCdnUrl:e.imageCdnUrl,titlePosition:"above",hideTypeBadge:!0}))}var JP=Sv(function(e,t){return i.createElement($P,Object.assign({},t))}),XP=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=QP(t),function(e,t){if(t&&("object"==GP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,HP()?Reflect.construct(t,n||[],QP(e).constructor):t.apply(e,n))}(this,t,[e,n]);var i=new JP(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&&YP(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=WP(QP(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&&KP(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("MenuItem"));function ej(e){return ej="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ej(e)}function tj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nj(r.key),r)}}function nj(e){var t=function(e){if("object"!=ej(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ej(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ej(t)?t:t+""}function rj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rj=function(){return!!e})()}function ij(e,t,n,r){var i=oj(aj(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}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)}var lj=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=aj(t),function(e,t){if(t&&("object"==ej(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,rj()?Reflect.construct(t,n||[],aj(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&&uj(e,t)}(t,e),n=t,(r=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-resources-button-wrapper ".concat(ij(t,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(ij(t,"buildCSSClass",this,3)([]))}},{key:"update",value:function(){ij(t,"update",this,3)([])}},{key:"createItems",value:function(){var e=this,t=[];return t.push(new An(this.player_,{label:"Resources"})),this.options_.resources.forEach(function(n){var r=new XP(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:UP.Ab.PageLoad(e.url,!0)}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=vn.Z.dom.createEl("iframe"),this.downloadIframe.style.display="none",vn.Z.dom.appendContent(vn.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(){ij(t,"handleClick",this,3)([null])}}])&&tj(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getComponent("MenuButton"));function cj(e){return cj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cj(e)}function sj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fj(r.key),r)}}function fj(e){var t=function(e){if("object"!=cj(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cj(t)?t:t+""}function pj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pj=function(){return!!e})()}function yj(e){return yj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yj(e)}function hj(e,t){return hj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hj(e,t)}lj.prototype.controlText_="Resources",vn.Z.registerComponent("ResourcesButton",lj);var vj=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=yj(t),function(e,t){if(t&&("object"==cj(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or 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,pj()?Reflect.construct(t,n||[],yj(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&&hj(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)}}}])&&sj(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vn.Z.getPlugin("plugin"));vn.Z.registerPlugin("resourcesPlugin",vj);var dj=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 mj(e){var t=e.className,n=void 0===t?"":t,r=e.playerApi,o=e.onReady,a=e.onDispose,u=dj(e,["className","playerApi","onReady","onDispose"]),l=i.useRef(null);return i.useEffect(function(){if(l){var e=new RO(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 bj(e){return function(e){if(Array.isArray(e))return gj(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 gj(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)?gj(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 gj(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 wj(e,t){if(Number.isInteger(+e))return+e;var n=O.M.getVideoProgress(t);return n?n>=t.duration/1e3-De.L.VIDEO_START_TIME_CUTOFF?0:n:0}var Oj=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 Sj={embeddedPlayer:"nFnLE",placeholder:"VurQp"};function kj(e){var t=i.useRef(null),n=i.useRef(null);Oj();var r=cn();return i.createElement(mj,{className:e.embed?Sj.embeddedPlayer:"",pointsOfInterest:e.pointsOfInterest,onReady:function(i){t.current=i,r(),e.onReady&&e.onReady(i),function(t){n.current=new hn({player:t,video:e.video,analyticsLocation:e.embed?Ze.LZ.EmbeddedPlayer:Ze.LZ.PlayPage})}(i)},viewKey:e.viewKey.viewKey,playerApi:new URL(e.config.playerApiUrl),imageCdnUrl:e.config.imageCdnUrl,autoplay:e.autoplay,startTime:wj(e.params.t,e.video),hotkeyElQuerySelector:"body"})}var Pj=n(91053),jj=n(46279);const Nj={closeButton:"cGnwF",dropdown:"BSdpV"};var Cj="shared.curriculumLinks";function Tj(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:Ze.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(mt.$B,{autoHeight:!0,autoHeightMax:e.height},i.createElement("div",{className:"p-3"},i.createElement("h2",{className:"h6 h-100"},i.createElement(Ue.x,{namespace:Cj,phrase:"heading"})),i.createElement(Pj.B,{availableCurriculums:r,onChangeCurriculum:u,selectedCurriculum:n,className:Nj.dropdown}),i.createElement(jj.h,{curriculumLinks:e.curriculums.curriculumLinks,onChangeCurriculum:u,hasCompleted:e.curriculums.hasCompleted,mappedCurriculums:e.curriculums.mappedCurriculums,isFetching:e.curriculums.isFetching,locationContext:Ze.LZ.PlayPage}),!!e.onClickClose&&i.createElement("button",{type:"button",className:"btn-close ".concat(Nj.closeButton),"aria-label":"Close",onClick:e.onClickClose})))):i.createElement(i.Fragment,null)}function Ej(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 _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,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 _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}var Rj="shared.playPage",Ij=u.T.encloseNamespace(Rj);function xj(e){var t=Ej(i.useState(),2),n=t[0],r=t[1],o=O.M.getCanBeConsumed(e.video).canConsume,a=O.M.isVideoTypeArchived(e.video),u=ht(e.video,e.glanceTheme),l=i.useRef(!1),c=Ej(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(bj(m),bj(b))),w=!e.currentUser.isAuthenticated;return i.createElement(Ue.D.Provider,{value:Rj},a&&i.createElement($t,null),i.createElement("section",{className:"mb-2"},o&&i.createElement(kj,{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(un,{video:e.video,appLink:{application:Ae.O.VIDEOS,action:Be.e.Videos.SIGN_IN_POPUP}}))),i.createElement(rn,{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(dt,{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:Ht.y.tag,suppressInteractivity:!e.currentUser.isAuthenticated})),i.createElement("section",{className:"".concat("details"===s.view?"d-block":"d-none")},i.createElement(Vt,{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:Ht.y.tag,suppressInteractivity:!e.currentUser.isAuthenticated})),i.createElement("section",{className:"".concat("curriculumLinks"===s.view?"d-block pb-3":"d-none")},i.createElement(Tj,{height:De.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(Zt,null)),!!(null==g?void 0:g.length)&&i.createElement("section",{className:"pb-3"},i.createElement(Ut.kM,{name:Ij("resources",{count:g.length}),contents:Kt.z.PlayPageResources,collection:g,prefetched:!0,childComponent:Gt.R,extraChildComponentProps:{imageCdnUrl:e.config.imageCdnUrl,imageErrorFallbackUrl:qt.W.Fallbacks.RESOURCE_THUMBNAIL,actionBehaviour:e.currentUser.isAuthenticated?"normal":"public",location:"play-page",titlePosition:"above",hideTypeBadge:!0},getChildAppLink:w?function(){return{application:Ae.O.VIDEOS,action:Be.e.Videos.SIGN_IN_POPUP}}:function(t){var n;return Ht.y.resource(t,null===(n=e.video)||void 0===n?void 0:n.id)},analyticsOptions:e.currentUser.isAuthenticated?{}:{workflowPhase:Ze.eu.Start,descriptor:Ze.Yu.SignUp},analyticsData:{widgetId:"resources"}})))}var Mj=n(89758),Lj=n(45719);var Bj=u.T.encloseNamespace("streamableVideos.play"),Dj={notFound:w,forbidden:{privacy:_}};function Aj(e){var t,n,u,p,y,h,v=(0,ze.U)().commonVideoProps,d=l.a.useBasicFetch(F.R.video(e.id)),m=l.a.useBasicFetch(A.N.currentUser()),b=l.a.useBasicFetch((null===(t=m.data)||void 0===t?void 0:t.isAuthenticated)&&L.createViewKey(e.id,r.MasterObject)),g=l.a.useBasicFetch(I.L.config()),w=l.a.useBasicFetch(x.D.streamableLearning()),O=l.a.useBasicFetch(Fe.g.streamablePresentation()),S=l.a.useBasicFetch(O.data&&R.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&&D.themeImages(d.data.glance.theme,d.data.glance.type)),j=l.a.useBasicFetch(d.statusCode===o.o.Forbidden&&F.R.video(e.id,s.r.StripMetadata)),N=(0,Mj.M)(e.id),C=function(e){var t=l.a.useGetFetch();function n(t){return F.R.pointsOfInterest(e,t)}return function(e,t){var n=e,r=t,o=(0,Lj.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,Lj.P)(!!e&&function(e){return n(e).key})}(e.id);(0,Me.M)(Le.CG.getVideoMetadata({content:d.data,phraseContext:{phraseHandler:Bj,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:Ve.f.getCanonicalLink({customAppLink:{application:Ae.O.VIDEOS,action:Be.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:De.L.PRODUCT_NAME})),(0,xe.v)(d,Dj,{forbidden:!0}),Ie(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(xj,{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:()=>{}}]);
|