@clickview/lite 0.32.5-dev.2 → 0.32.6-rc.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/bundles.json +2 -2
- package/dist/css/1316-lite-9ad8b46794.chunk.css +11 -0
- package/dist/css/{1366-lite-7a13bffe4a.chunk.css → 1366-lite-6f12312543.chunk.css} +1 -1
- package/dist/css/{1781-lite-028e7f49eb.chunk.css → 1781-lite-f09d44460a.chunk.css} +1 -1
- package/dist/css/1818-lite-08c053955f.chunk.css +3 -0
- package/dist/css/{1820-lite-2e8b8f3d56.chunk.css → 1820-lite-bfdd587934.chunk.css} +3 -1
- package/dist/css/{2199-lite-77065b1940.chunk.css → 2199-lite-824c77c7cb.chunk.css} +1 -1
- package/dist/css/{2469-lite-8f71b4a46d.chunk.css → 2469-lite-ce3c019eae.chunk.css} +1 -1
- package/dist/css/{275-lite-f1860ca39a.chunk.css → 275-lite-62b59223b1.chunk.css} +1 -1
- package/dist/css/{3091-lite-ea247cd3c7.chunk.css → 3091-lite-3a9ef7f2f7.chunk.css} +1 -1
- package/dist/css/{3446-lite-ded5e413ce.chunk.css → 3446-lite-cd6940eb5a.chunk.css} +1 -1
- package/dist/css/{3755-lite-19658f72e9.chunk.css → 3755-lite-6f3f0f2a8d.chunk.css} +1 -1
- package/dist/css/{4145-lite-419c7a3152.chunk.css → 4145-lite-1cb96b833b.chunk.css} +1 -1
- package/dist/css/{420-lite-898652e17b.chunk.css → 420-lite-7722827119.chunk.css} +1 -1
- package/dist/css/{2066-lite-c31f88668c.chunk.css → 4247-lite-b76d20bd63.chunk.css} +7 -1
- package/dist/css/{4373-lite-975f9b4d75.chunk.css → 4373-lite-f7cda08fb2.chunk.css} +1 -1
- package/dist/css/{8556-lite-1e4722df6b.chunk.css → 4380-lite-e4688ef686.chunk.css} +1 -1
- package/dist/css/{4874-lite-ebe3cdda84.chunk.css → 4405-lite-e41a479008.chunk.css} +4 -2
- package/dist/css/4423-lite-bb4ec49419.chunk.css +2 -0
- package/dist/css/{162-lite-2da1ee274f.chunk.css → 4441-lite-c7934b39ef.chunk.css} +1 -0
- package/dist/css/{4612-lite-3886475291.chunk.css → 4612-lite-b59f3b3265.chunk.css} +1 -1
- package/dist/css/{4705-lite-54b30399d3.chunk.css → 4705-lite-f011571fa4.chunk.css} +1 -1
- package/dist/css/{2729-lite-ebe3cdda84.chunk.css → 5151-lite-e41a479008.chunk.css} +4 -2
- package/dist/css/{5171-lite-bb5871d776.chunk.css → 5171-lite-72725120a3.chunk.css} +1 -1
- package/dist/css/{9133-lite-26e2a668b0.chunk.css → 5313-lite-3b29b667e1.chunk.css} +2 -1
- package/dist/css/{6302-lite-e5fccb8e92.chunk.css → 5406-lite-364b761033.chunk.css} +2 -1
- package/dist/css/{1064-lite-b3840e522e.chunk.css → 5555-lite-a0b3cf04dc.chunk.css} +4 -2
- package/dist/css/5595-lite-c07231bb2e.chunk.css +7 -0
- package/dist/css/5611-lite-a0b3cf04dc.chunk.css +31 -0
- package/dist/css/5659-lite-a0b3cf04dc.chunk.css +31 -0
- package/dist/css/{6154-lite-a0abd6b2f9.chunk.css → 6154-lite-5b46992519.chunk.css} +1 -1
- package/dist/css/{6159-lite-b462e7862d.chunk.css → 6159-lite-19c8fc320e.chunk.css} +1 -1
- package/dist/css/{6407-lite-2a91046512.chunk.css → 6407-lite-720e76a514.chunk.css} +1 -1
- package/dist/css/{6702-lite-285d18c247.chunk.css → 6702-lite-31d475bc5d.chunk.css} +1 -1
- package/dist/css/{6822-lite-c2527edca1.chunk.css → 6822-lite-e6009d7a35.chunk.css} +1 -1
- package/dist/css/{1592-lite-7471086af4.chunk.css → 6863-lite-16904ec0d1.chunk.css} +0 -1
- package/dist/css/{6957-lite-8d71b12aa5.chunk.css → 6957-lite-82cdc84d20.chunk.css} +1 -1
- package/dist/css/{7286-lite-5a6b3f32ab.chunk.css → 7286-lite-140c0a1d94.chunk.css} +1 -1
- package/dist/css/{7484-lite-1a3ccb3597.chunk.css → 7484-lite-ebedea81cd.chunk.css} +1 -1
- package/dist/css/{4052-lite-e96ead7ea1.chunk.css → 7564-lite-74c6e57468.chunk.css} +4 -2
- package/dist/css/{817-lite-665d49932b.chunk.css → 817-lite-b3b6e03570.chunk.css} +1 -1
- package/dist/css/{4380-lite-1e4722df6b.chunk.css → 8556-lite-e4688ef686.chunk.css} +1 -1
- package/dist/css/{9714-lite-72b0f59716.chunk.css → 9714-lite-5e35963ae2.chunk.css} +1 -1
- package/dist/css/{9744-lite-ea247cd3c7.chunk.css → 9744-lite-3a9ef7f2f7.chunk.css} +1 -1
- package/dist/css/{lite-app-3a1c9a1d2b.css → lite-app-855ceef79c.css} +2 -2
- package/dist/languages/en.json +1 -1
- package/dist/scripts/1316-178defa7c7-lite.chunk.js +1 -0
- package/dist/scripts/{1366-666ef709a1-lite.chunk.js → 1366-edb781eea5-lite.chunk.js} +1 -1
- package/dist/scripts/1517-05b0f4350a-lite.chunk.js +1 -0
- package/dist/scripts/{1518-c4881607ce-lite.chunk.js → 1518-7967c2115a-lite.chunk.js} +1 -1
- package/dist/scripts/{1750-4b785132ad-lite.chunk.js → 1750-dfa839cdf2-lite.chunk.js} +1 -1
- package/dist/scripts/1818-aba96da353-lite.chunk.js +1 -0
- package/dist/scripts/1820-6955a417a6-lite.chunk.js +1 -0
- package/dist/scripts/1830-8264488f9e-lite.chunk.js +1 -0
- package/dist/scripts/2199-d9ca47840a-lite.chunk.js +1 -0
- package/dist/scripts/2279-82f2a438b0-lite.chunk.js +1 -0
- package/dist/scripts/{2564-6030f21acd-lite.chunk.js → 2564-ec9dcdc626-lite.chunk.js} +1 -1
- package/dist/scripts/{275-0cd72590c8-lite.chunk.js → 275-b84920fdaa-lite.chunk.js} +1 -1
- package/dist/scripts/3091-2bc7ec2740-lite.chunk.js +1 -0
- package/dist/scripts/3371-18520521a7-lite.chunk.js +1 -0
- package/dist/scripts/3446-069b00d36d-lite.chunk.js +1 -0
- package/dist/scripts/3514-7b6fb85714-lite.chunk.js +1 -0
- package/dist/scripts/355-1eb9c5f791-lite.chunk.js +1 -0
- package/dist/scripts/{3645-86f0ed022f-lite.chunk.js → 3645-2683fa5003-lite.chunk.js} +1 -1
- package/dist/scripts/{3667-c5b8a096c2-lite.chunk.js → 3667-a97793c9f2-lite.chunk.js} +1 -1
- package/dist/scripts/3789-e3924e640f-lite.chunk.js +2 -0
- package/dist/scripts/3966-ea5ccf719b-lite.chunk.js +1 -0
- package/dist/scripts/4145-2759f40615-lite.chunk.js +1 -0
- package/dist/scripts/420-a72d8002a3-lite.chunk.js +1 -0
- package/dist/scripts/4247-0c20b31676-lite.chunk.js +2 -0
- package/dist/scripts/{4373-039b523832-lite.chunk.js → 4373-2c2d309a37-lite.chunk.js} +1 -1
- package/dist/scripts/4423-547e7ba89a-lite.chunk.js +1 -0
- package/dist/scripts/4436-fc7c6e1737-lite.chunk.js +1 -0
- package/dist/scripts/4441-a2d61b085f-lite.chunk.js +2 -0
- package/dist/scripts/{4612-2c0e7977a2-lite.chunk.js → 4612-689eb44d24-lite.chunk.js} +1 -1
- package/dist/scripts/{4617-591aee68e0-lite.chunk.js → 4617-633091c264-lite.chunk.js} +1 -1
- package/dist/scripts/4657-1533b19015-lite.chunk.js +2 -0
- package/dist/scripts/{4705-96be64b79d-lite.chunk.js → 4705-3aa7b071ec-lite.chunk.js} +1 -1
- package/dist/scripts/{5009-9e45034def-lite.chunk.js → 5009-93cd88833d-lite.chunk.js} +1 -1
- package/dist/scripts/{2729-feeb22f8a9-lite.chunk.js → 5151-52804fdb52-lite.chunk.js} +1 -1
- package/dist/scripts/519-bb930f9c4b-lite.chunk.js +1 -0
- package/dist/scripts/{5268-029905c5f0-lite.chunk.js → 5268-be0eb0d561-lite.chunk.js} +1 -1
- package/dist/scripts/5271-1df4d9d742-lite.chunk.js +1 -1
- package/dist/scripts/5313-32533937e5-lite.chunk.js +1 -0
- package/dist/scripts/5406-7771f9c0a4-lite.chunk.js +1 -0
- package/dist/scripts/5512-e7d65d5b6f-lite.chunk.js +1 -0
- package/dist/scripts/5555-985e251ee8-lite.chunk.js +1 -0
- package/dist/scripts/5595-c6cb52f09d-lite.chunk.js +1 -0
- package/dist/scripts/5611-5902f60b7a-lite.chunk.js +1 -0
- package/dist/scripts/5659-279cf2f5ac-lite.chunk.js +1 -0
- package/dist/scripts/5765-bffdda2690-lite.chunk.js +1 -0
- package/dist/scripts/5776-82adf0f1d1-lite.chunk.js +1 -0
- package/dist/scripts/5986-fdd928f458-lite.chunk.js +1 -0
- package/dist/scripts/{6117-fae9185071-lite.chunk.js → 6117-ceca22f598-lite.chunk.js} +1 -1
- package/dist/scripts/{6154-107ea02e45-lite.chunk.js → 6154-23f1a8b802-lite.chunk.js} +1 -1
- package/dist/scripts/6159-fee89fd7ad-lite.chunk.js +1 -0
- package/dist/scripts/{6407-651ccf60e3-lite.chunk.js → 6407-bac161c9bf-lite.chunk.js} +1 -1
- package/dist/scripts/{6480-126763c9bc-lite.chunk.js → 6480-e5afc3e0f1-lite.chunk.js} +1 -1
- package/dist/scripts/{6702-bbebb7030e-lite.chunk.js → 6702-90515cdd67-lite.chunk.js} +1 -1
- package/dist/scripts/{6801-d3cf047fb8-lite.chunk.js → 6801-fb5064f563-lite.chunk.js} +1 -1
- package/dist/scripts/6863-8cd402d9eb-lite.chunk.js +1 -0
- package/dist/scripts/{7030-041896252c-lite.chunk.js → 7030-7a8f86bff3-lite.chunk.js} +1 -1
- package/dist/scripts/7045-2d86063c1c-lite.chunk.js +1 -0
- package/dist/scripts/{7052-0a94f7b10e-lite.chunk.js → 7052-506fac0d7b-lite.chunk.js} +2 -2
- package/dist/scripts/{7112-ec1031994e-lite.chunk.js → 7112-f9195ea3ee-lite.chunk.js} +1 -1
- package/dist/scripts/{7178-7389623a5a-lite.chunk.js → 7178-7c23eb0ac4-lite.chunk.js} +1 -1
- package/dist/scripts/{7288-e945b5adc9-lite.chunk.js → 7288-394b622cce-lite.chunk.js} +1 -1
- package/dist/scripts/{7293-e20274d243-lite.chunk.js → 7293-19e2046720-lite.chunk.js} +1 -1
- package/dist/scripts/7422-b525ec20d3-lite.chunk.js +2 -0
- package/dist/scripts/7422-b525ec20d3-lite.chunk.js.LICENSE.txt +31 -0
- package/dist/scripts/7432-0edd706b57-lite.chunk.js +1 -0
- package/dist/scripts/7506-654a0a14fe-lite.chunk.js +1 -0
- package/dist/scripts/{4052-4548ee2a0c-lite.chunk.js → 7564-2ed47ddbc3-lite.chunk.js} +1 -1
- package/dist/scripts/{7708-f170b2ca80-lite.chunk.js → 7708-28536a9abd-lite.chunk.js} +1 -1
- package/dist/scripts/8056-da72c8b1d7-lite.chunk.js +1 -0
- package/dist/scripts/{817-19c50fb9e7-lite.chunk.js → 817-1373c64ee2-lite.chunk.js} +1 -1
- package/dist/scripts/{8236-06e2326d22-lite.chunk.js → 8236-b1ba6a195c-lite.chunk.js} +1 -1
- package/dist/scripts/{8323-aeb803ba70-lite.chunk.js → 8323-7043434ec0-lite.chunk.js} +1 -1
- package/dist/scripts/{8367-c2e291cfc2-lite.chunk.js → 8367-858b9e6ff8-lite.chunk.js} +1 -1
- package/dist/scripts/8564-d60ac4a886-lite.chunk.js +1 -0
- package/dist/scripts/{8681-da6e12f2d5-lite.chunk.js → 8681-7d0092afe1-lite.chunk.js} +1 -1
- package/dist/scripts/8873-d5bcff1f82-lite.chunk.js +1 -0
- package/dist/scripts/{8935-0d85df691f-lite.chunk.js → 8935-e3549617b8-lite.chunk.js} +1 -1
- package/dist/scripts/8955-93725cfefc-lite.chunk.js +1 -0
- package/dist/scripts/9338-2f21004cd0-lite.chunk.js +1 -0
- package/dist/scripts/{9478-fecaea6d54-lite.chunk.js → 9478-1978074e73-lite.chunk.js} +2 -2
- package/dist/scripts/{9484-312aa1531d-lite.chunk.js → 9484-1544749279-lite.chunk.js} +1 -1
- package/dist/scripts/9744-bdfe4cb49c-lite.chunk.js +1 -0
- package/dist/scripts/9843-137761f2e1-lite.chunk.js +1 -0
- package/dist/scripts/{9894-75159b2fc0-lite.chunk.js → 9894-9f2a3b2e92-lite.chunk.js} +2 -2
- package/dist/scripts/{9931-08cf05b177-lite.chunk.js → 9931-bc6b18ba05-lite.chunk.js} +1 -1
- package/dist/scripts/bundle-310abcca09.min.js +2 -0
- package/dist/scripts/{bundle-f87a30ceaf.min.js.LICENSE.txt → bundle-310abcca09.min.js.LICENSE.txt} +0 -20
- package/jest.config.js +11 -11
- package/package.json +3 -3
- package/typings/libs/CVEvents.d.ts +12 -12
- package/typings/libs/CVLanguages.d.ts +24 -24
- package/typings/libs/cloneDeep.d.ts +4 -4
- package/typings/libs/cookiesjs.d.ts +25 -25
- package/typings/libs/draft-convert.d.ts +3 -3
- package/typings/libs/google-api.d.ts +93 -93
- package/typings/libs/intersection-observer.d.ts +82 -82
- package/typings/libs/microsoft-teams.d.ts +2 -2
- package/typings/libs/react-table-config.d.ts +138 -138
- package/typings/libs/trackjs.d.ts +2 -2
- package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
- package/typings/utils/imports.d.ts +13 -13
- package/dist/css/1818-lite-580340c188.chunk.css +0 -3
- package/dist/css/4423-lite-c96a8d00e8.chunk.css +0 -2
- package/dist/css/5590-lite-b3840e522e.chunk.css +0 -29
- package/dist/css/5595-lite-2e6f96854b.chunk.css +0 -5
- package/dist/css/5659-lite-b3840e522e.chunk.css +0 -29
- package/dist/css/9961-lite-ce6b57f21d.chunk.css +0 -10
- package/dist/scripts/1064-c89603c84c-lite.chunk.js +0 -1
- package/dist/scripts/1517-ba6874eca4-lite.chunk.js +0 -1
- package/dist/scripts/1592-aa2bc45d63-lite.chunk.js +0 -2
- package/dist/scripts/162-51e28f0e8d-lite.chunk.js +0 -2
- package/dist/scripts/1818-6e03769806-lite.chunk.js +0 -1
- package/dist/scripts/1820-8268536e88-lite.chunk.js +0 -1
- package/dist/scripts/1830-565ee5aa0c-lite.chunk.js +0 -1
- package/dist/scripts/2066-f1ee632b62-lite.chunk.js +0 -2
- package/dist/scripts/2199-d8e643d50d-lite.chunk.js +0 -1
- package/dist/scripts/2279-40f438c92d-lite.chunk.js +0 -1
- package/dist/scripts/3091-b372a6e5a8-lite.chunk.js +0 -1
- package/dist/scripts/3371-61857af54b-lite.chunk.js +0 -1
- package/dist/scripts/3446-cb79c1bff9-lite.chunk.js +0 -1
- package/dist/scripts/3514-4c7a73efac-lite.chunk.js +0 -1
- package/dist/scripts/355-43835ac290-lite.chunk.js +0 -1
- package/dist/scripts/3789-4cb6d829f6-lite.chunk.js +0 -2
- package/dist/scripts/3966-ea2b70c705-lite.chunk.js +0 -1
- package/dist/scripts/4145-bc7f5915d7-lite.chunk.js +0 -1
- package/dist/scripts/420-1d548d3b84-lite.chunk.js +0 -1
- package/dist/scripts/4423-3424b647e8-lite.chunk.js +0 -1
- package/dist/scripts/4436-843f23ed17-lite.chunk.js +0 -1
- package/dist/scripts/4657-da41ee610c-lite.chunk.js +0 -2
- package/dist/scripts/519-5dff99c40b-lite.chunk.js +0 -1
- package/dist/scripts/5512-82edf40ee3-lite.chunk.js +0 -1
- package/dist/scripts/5590-f5dbe096c3-lite.chunk.js +0 -1
- package/dist/scripts/5595-99e11127bb-lite.chunk.js +0 -1
- package/dist/scripts/5659-92c6bf622e-lite.chunk.js +0 -1
- package/dist/scripts/5776-27f15a637f-lite.chunk.js +0 -1
- package/dist/scripts/5986-d9b797867b-lite.chunk.js +0 -1
- package/dist/scripts/6159-2111108b27-lite.chunk.js +0 -1
- package/dist/scripts/6302-6690979e80-lite.chunk.js +0 -1
- package/dist/scripts/6532-04ba86364b-lite.chunk.js +0 -1
- package/dist/scripts/6662-0cdefe8716-lite.chunk.js +0 -1
- package/dist/scripts/7045-8f704951d9-lite.chunk.js +0 -1
- package/dist/scripts/7422-8f60c3028d-lite.chunk.js +0 -2
- package/dist/scripts/7422-8f60c3028d-lite.chunk.js.LICENSE.txt +0 -11
- package/dist/scripts/7432-d4e8bef2f4-lite.chunk.js +0 -1
- package/dist/scripts/7506-84f4593d4e-lite.chunk.js +0 -1
- package/dist/scripts/8056-0044639a66-lite.chunk.js +0 -1
- package/dist/scripts/8564-97a9548afd-lite.chunk.js +0 -1
- package/dist/scripts/8873-f8598046db-lite.chunk.js +0 -1
- package/dist/scripts/8955-9823de95f3-lite.chunk.js +0 -1
- package/dist/scripts/9133-1c2f07cd11-lite.chunk.js +0 -1
- package/dist/scripts/9744-49217aba0f-lite.chunk.js +0 -1
- package/dist/scripts/9843-9f510ac1c1-lite.chunk.js +0 -1
- package/dist/scripts/9931-08cf05b177-lite.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/9961-62c9f288a2-lite.chunk.js +0 -1
- package/dist/scripts/bundle-3796712273.min.js +0 -2
- package/dist/scripts/bundle-3796712273.min.js.LICENSE.txt +0 -129
- package/dist/scripts/bundle-88ea810319.min.js +0 -2
- package/dist/scripts/bundle-88ea810319.min.js.LICENSE.txt +0 -129
- package/dist/scripts/bundle-f87a30ceaf.min.js +0 -2
- /package/dist/scripts/{1285-6f221ec83e-lite.chunk.js → 1285-b295383b73-lite.chunk.js} +0 -0
- /package/dist/scripts/{1291-94108fc09a-lite.chunk.js → 1291-77b2beaf96-lite.chunk.js} +0 -0
- /package/dist/scripts/{1366-666ef709a1-lite.chunk.js.LICENSE.txt → 1366-edb781eea5-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{1475-c84cf7b8c7-lite.chunk.js → 1475-c3aad2020e-lite.chunk.js} +0 -0
- /package/dist/scripts/{1526-4b6226c3a3-lite.chunk.js → 1526-7d8b2f1eea-lite.chunk.js} +0 -0
- /package/dist/scripts/{1725-30a5110c8d-lite.chunk.js → 1725-642d830e51-lite.chunk.js} +0 -0
- /package/dist/scripts/{1726-3bd6a64ab2-lite.chunk.js → 1726-b57f78d9ea-lite.chunk.js} +0 -0
- /package/dist/scripts/{1781-40d8e94385-lite.chunk.js → 1781-946f4b8fb3-lite.chunk.js} +0 -0
- /package/dist/scripts/{1837-e6891957ae-lite.chunk.js → 1837-ae071254cb-lite.chunk.js} +0 -0
- /package/dist/scripts/{1863-47eef75488-lite.chunk.js → 1863-264162f8fa-lite.chunk.js} +0 -0
- /package/dist/scripts/{1891-20227a97bd-lite.chunk.js → 1891-4e1fc9cefe-lite.chunk.js} +0 -0
- /package/dist/scripts/{1913-6c98c0a34f-lite.chunk.js → 1913-1079234eae-lite.chunk.js} +0 -0
- /package/dist/scripts/{1943-cf609bd18b-lite.chunk.js → 1943-327b6fc1ce-lite.chunk.js} +0 -0
- /package/dist/scripts/{1958-6de295ac2f-lite.chunk.js → 1958-9e9dd407a4-lite.chunk.js} +0 -0
- /package/dist/scripts/{209-bea4fb3c22-lite.chunk.js → 209-d72934a489-lite.chunk.js} +0 -0
- /package/dist/scripts/{2095-498558805d-lite.chunk.js → 2095-57fb3b1431-lite.chunk.js} +0 -0
- /package/dist/scripts/{2175-1a9cac2654-lite.chunk.js → 2175-b78a706fa9-lite.chunk.js} +0 -0
- /package/dist/scripts/{2208-6320d5c5ec-lite.chunk.js → 2208-972ed3ac26-lite.chunk.js} +0 -0
- /package/dist/scripts/{2235-b9198e9674-lite.chunk.js → 2235-8a43816b16-lite.chunk.js} +0 -0
- /package/dist/scripts/{227-e81fa36f91-lite.chunk.js → 227-718366f73a-lite.chunk.js} +0 -0
- /package/dist/scripts/{2318-204c094444-lite.chunk.js → 2318-8e6a642d06-lite.chunk.js} +0 -0
- /package/dist/scripts/{2452-f96e548d17-lite.chunk.js → 2452-446607a894-lite.chunk.js} +0 -0
- /package/dist/scripts/{2469-8591c7a350-lite.chunk.js → 2469-c40964ecb6-lite.chunk.js} +0 -0
- /package/dist/scripts/{2608-e2b5d4de7a-lite.chunk.js → 2608-ca22e93183-lite.chunk.js} +0 -0
- /package/dist/scripts/{287-223a01d363-lite.chunk.js → 287-023c6d13b7-lite.chunk.js} +0 -0
- /package/dist/scripts/{2966-0a626741f2-lite.chunk.js → 2966-4e5b3e14e1-lite.chunk.js} +0 -0
- /package/dist/scripts/{3012-b64578f4b5-lite.chunk.js → 3012-0682e26229-lite.chunk.js} +0 -0
- /package/dist/scripts/{3020-b0fd4b4978-lite.chunk.js → 3020-f2ded2aebe-lite.chunk.js} +0 -0
- /package/dist/scripts/{3154-25535da78b-lite.chunk.js → 3154-87862ce1c7-lite.chunk.js} +0 -0
- /package/dist/scripts/{3200-3bbafd3e8a-lite.chunk.js → 3200-22b854d2bd-lite.chunk.js} +0 -0
- /package/dist/scripts/{3216-47d94fcff8-lite.chunk.js → 3216-3f6585c52b-lite.chunk.js} +0 -0
- /package/dist/scripts/{3285-85360362bb-lite.chunk.js → 3285-dd1d715265-lite.chunk.js} +0 -0
- /package/dist/scripts/{3378-205ec27cf3-lite.chunk.js → 3378-38ffdcffee-lite.chunk.js} +0 -0
- /package/dist/scripts/{3533-165a400f8a-lite.chunk.js → 3533-96f9230c25-lite.chunk.js} +0 -0
- /package/dist/scripts/{1592-aa2bc45d63-lite.chunk.js.LICENSE.txt → 3645-2683fa5003-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{3654-5344eb1cc5-lite.chunk.js → 3654-61b6155a78-lite.chunk.js} +0 -0
- /package/dist/scripts/{162-51e28f0e8d-lite.chunk.js.LICENSE.txt → 3667-a97793c9f2-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{3754-ad907b38cc-lite.chunk.js → 3754-978fa5935c-lite.chunk.js} +0 -0
- /package/dist/scripts/{3755-51bd37a5c6-lite.chunk.js → 3755-b9477924cc-lite.chunk.js} +0 -0
- /package/dist/scripts/{2066-f1ee632b62-lite.chunk.js.LICENSE.txt → 3789-e3924e640f-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{3849-b0db69d3db-lite.chunk.js → 3849-2304863f99-lite.chunk.js} +0 -0
- /package/dist/scripts/{389-fc8f4fcbf4-lite.chunk.js → 389-7ff8189cc3-lite.chunk.js} +0 -0
- /package/dist/scripts/{4032-279a38c349-lite.chunk.js → 4032-d903795887-lite.chunk.js} +0 -0
- /package/dist/scripts/{3645-86f0ed022f-lite.chunk.js.LICENSE.txt → 4247-0c20b31676-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4326-af6113a1df-lite.chunk.js → 4326-1c0a5b768c-lite.chunk.js} +0 -0
- /package/dist/scripts/{4343-84cca94426-lite.chunk.js → 4343-c463efc266-lite.chunk.js} +0 -0
- /package/dist/scripts/{4380-719146155f-lite.chunk.js → 4380-7788844011-lite.chunk.js} +0 -0
- /package/dist/scripts/{4393-df6aadca06-lite.chunk.js → 4393-5f8b38156b-lite.chunk.js} +0 -0
- /package/dist/scripts/{3667-c5b8a096c2-lite.chunk.js.LICENSE.txt → 4441-a2d61b085f-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4537-9c5fd00b48-lite.chunk.js → 4537-74306e1157-lite.chunk.js} +0 -0
- /package/dist/scripts/{3789-4cb6d829f6-lite.chunk.js.LICENSE.txt → 4657-1533b19015-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4753-31e147c1a9-lite.chunk.js → 4753-4601f0e937-lite.chunk.js} +0 -0
- /package/dist/scripts/{4893-c04f7f4d32-lite.chunk.js → 4893-24a361eb0c-lite.chunk.js} +0 -0
- /package/dist/scripts/{4895-ab469a3b66-lite.chunk.js → 4895-e136f3e815-lite.chunk.js} +0 -0
- /package/dist/scripts/{4657-da41ee610c-lite.chunk.js.LICENSE.txt → 5009-93cd88833d-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5143-d11346cce2-lite.chunk.js → 5143-b6763c5c3e-lite.chunk.js} +0 -0
- /package/dist/scripts/{5171-926c0772a6-lite.chunk.js → 5171-337dac49f0-lite.chunk.js} +0 -0
- /package/dist/scripts/{5009-9e45034def-lite.chunk.js.LICENSE.txt → 5268-be0eb0d561-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{528-bc970ef53c-lite.chunk.js → 528-2ab7c7a75c-lite.chunk.js} +0 -0
- /package/dist/scripts/{5606-486a41d299-lite.chunk.js → 5606-d48ee92b02-lite.chunk.js} +0 -0
- /package/dist/scripts/{5877-e318dacbf1-lite.chunk.js → 5877-0978d5d20d-lite.chunk.js} +0 -0
- /package/dist/scripts/{6057-dd865f2846-lite.chunk.js → 6057-607500eca5-lite.chunk.js} +0 -0
- /package/dist/scripts/{615-50555390cc-lite.chunk.js → 615-05a2f20874-lite.chunk.js} +0 -0
- /package/dist/scripts/{6158-4bdb28b41e-lite.chunk.js → 6158-dfa1d2379d-lite.chunk.js} +0 -0
- /package/dist/scripts/{6285-4808d8e6db-lite.chunk.js → 6285-0899c78c8c-lite.chunk.js} +0 -0
- /package/dist/scripts/{6290-8204f439c2-lite.chunk.js → 6290-40d12a27d7-lite.chunk.js} +0 -0
- /package/dist/scripts/{6368-8532bb9df5-lite.chunk.js → 6368-f3803b36c2-lite.chunk.js} +0 -0
- /package/dist/scripts/{6370-a15bddb981-lite.chunk.js → 6370-3f2b2925e3-lite.chunk.js} +0 -0
- /package/dist/scripts/{6689-bf6b056ced-lite.chunk.js → 6689-c68627805c-lite.chunk.js} +0 -0
- /package/dist/scripts/{6817-bed9ca6833-lite.chunk.js → 6817-965c88fe48-lite.chunk.js} +0 -0
- /package/dist/scripts/{6822-15e9977d1f-lite.chunk.js → 6822-5ca8d9e231-lite.chunk.js} +0 -0
- /package/dist/scripts/{6930-4c28b4f509-lite.chunk.js → 6930-5f0db0b02f-lite.chunk.js} +0 -0
- /package/dist/scripts/{6957-058e2001c4-lite.chunk.js → 6957-d653850dcb-lite.chunk.js} +0 -0
- /package/dist/scripts/{5268-029905c5f0-lite.chunk.js.LICENSE.txt → 7030-7a8f86bff3-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7030-041896252c-lite.chunk.js.LICENSE.txt → 7052-506fac0d7b-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7056-b5cd72d1b8-lite.chunk.js → 7056-9a2e82c180-lite.chunk.js} +0 -0
- /package/dist/scripts/{7108-0f6adbabf0-lite.chunk.js → 7108-2cc9a7b81d-lite.chunk.js} +0 -0
- /package/dist/scripts/{7052-0a94f7b10e-lite.chunk.js.LICENSE.txt → 7112-f9195ea3ee-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7128-1ee42ef21c-lite.chunk.js → 7128-11e4f82a97-lite.chunk.js} +0 -0
- /package/dist/scripts/{714-7d4a73ae45-lite.chunk.js → 714-eaa48dfe1c-lite.chunk.js} +0 -0
- /package/dist/scripts/{7205-4c232d2ac0-lite.chunk.js → 7205-46991f09e4-lite.chunk.js} +0 -0
- /package/dist/scripts/{7286-cb1923e134-lite.chunk.js → 7286-7a854ab523-lite.chunk.js} +0 -0
- /package/dist/scripts/{7332-7bfaeba358-lite.chunk.js → 7332-e864c7f1f2-lite.chunk.js} +0 -0
- /package/dist/scripts/{7484-6bc5cab7dd-lite.chunk.js → 7484-be14810aa6-lite.chunk.js} +0 -0
- /package/dist/scripts/{7540-fabe7ac275-lite.chunk.js → 7540-4eb8dcae09-lite.chunk.js} +0 -0
- /package/dist/scripts/{7555-4d6b6eda04-lite.chunk.js → 7555-bd10f10890-lite.chunk.js} +0 -0
- /package/dist/scripts/{7767-3a6db3d0ec-lite.chunk.js → 7767-606d7f700d-lite.chunk.js} +0 -0
- /package/dist/scripts/{7818-4910db8536-lite.chunk.js → 7818-34eda6078f-lite.chunk.js} +0 -0
- /package/dist/scripts/{7888-e721ba550f-lite.chunk.js → 7888-db27bfa50b-lite.chunk.js} +0 -0
- /package/dist/scripts/{8025-ebb2a6e951-lite.chunk.js → 8025-292febade2-lite.chunk.js} +0 -0
- /package/dist/scripts/{8252-82ab60c504-lite.chunk.js → 8252-413339e753-lite.chunk.js} +0 -0
- /package/dist/scripts/{7112-ec1031994e-lite.chunk.js.LICENSE.txt → 8323-7043434ec0-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8419-8ddf8d53f5-lite.chunk.js → 8419-79cd038e70-lite.chunk.js} +0 -0
- /package/dist/scripts/{8556-f6d1f3fe46-lite.chunk.js → 8556-c96b0b41cf-lite.chunk.js} +0 -0
- /package/dist/scripts/{8323-aeb803ba70-lite.chunk.js.LICENSE.txt → 8681-7d0092afe1-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8763-30018c2eba-lite.chunk.js → 8763-c745ed1ebb-lite.chunk.js} +0 -0
- /package/dist/scripts/{8905-63f31e0b26-lite.chunk.js → 8905-65f92f2dec-lite.chunk.js} +0 -0
- /package/dist/scripts/{8681-da6e12f2d5-lite.chunk.js.LICENSE.txt → 8935-e3549617b8-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8944-fa935f6ed4-lite.chunk.js → 8944-458e677ed3-lite.chunk.js} +0 -0
- /package/dist/scripts/{9005-7329883227-lite.chunk.js → 9005-ba82d0c5db-lite.chunk.js} +0 -0
- /package/dist/scripts/{9038-d071dd25ce-lite.chunk.js → 9038-f604ea49df-lite.chunk.js} +0 -0
- /package/dist/scripts/{9060-5cee4638c6-lite.chunk.js → 9060-c08573cb1a-lite.chunk.js} +0 -0
- /package/dist/scripts/{9118-948d6029d3-lite.chunk.js → 9118-9d165c070a-lite.chunk.js} +0 -0
- /package/dist/scripts/{9242-4b15b572db-lite.chunk.js → 9242-7f8ae811ef-lite.chunk.js} +0 -0
- /package/dist/scripts/{9264-c265dc4e08-lite.chunk.js → 9264-4e228ac39b-lite.chunk.js} +0 -0
- /package/dist/scripts/{9273-535bb6b083-lite.chunk.js → 9273-50b5ba5e78-lite.chunk.js} +0 -0
- /package/dist/scripts/{9455-cde3c093dc-lite.chunk.js → 9455-289e14d711-lite.chunk.js} +0 -0
- /package/dist/scripts/{8935-0d85df691f-lite.chunk.js.LICENSE.txt → 9478-1978074e73-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9478-fecaea6d54-lite.chunk.js.LICENSE.txt → 9484-1544749279-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9714-d0bcd64c24-lite.chunk.js → 9714-480c4a13e8-lite.chunk.js} +0 -0
- /package/dist/scripts/{9484-312aa1531d-lite.chunk.js.LICENSE.txt → 9894-9f2a3b2e92-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9899-e695d8ad4c-lite.chunk.js → 9899-f0463a5a59-lite.chunk.js} +0 -0
- /package/dist/scripts/{9894-75159b2fc0-lite.chunk.js.LICENSE.txt → 9931-bc6b18ba05-lite.chunk.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[355,8960],{36199:(t,e,n)=>{var r;n.d(e,{V:()=>r}),function(t){t[t.Original=0]="Original",t[t.Copy=1]="Copy"}(r||(r={}))},94644:(t,e,n)=>{n.d(e,{r:()=>f});var r=n(50242),i=n(81886),o=n(67058),a=n(14553),c=n(49267),u=n(49075),l={notFound:o.d,forbidden:{rating:a.q,yearLevel:a.q,region:c.a,privacy:a.q},badRequest:u._};function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t){var o;o="number"==typeof t?t:t.status;var a=Object.assign(Object.assign({},l),e);o&&i.Q.Ry.isStatusCodeError(o)&&(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))}}},91286:(t,e,n)=>{n.d(e,{v:()=>a});var r=n(32735),i=n(94644);function o(t){return t.map((function(t){return t.statusCode})).join(":")}function a(t,e,n){var a=Array.isArray(t)?t:[t];(0,r.useEffect)((function(){a.forEach((function(t){(0,i.r)(t.statusCode,e,n)}))}),[o(a),e,n])}},63649:(t,e,n)=>{n.d(e,{X:()=>o});var r=n(32735);const i={video:"ekpg6",notice:"lQs4F",heading:"Gt6uV",interaction:"LEfYX",button:"caHP7",edit:"de4DP",questions:"XelbS"};function o(t){var e=t.isEdit;return r.createElement("div",{className:"px-3 w-100 ".concat(e?i.edit:"")},e?r.createElement("div",{className:"d-flex justify-content-between align-items-center mb-3"},r.createElement("div",{className:"partial-loading-background ".concat(i.heading)}),r.createElement("div",null,r.createElement("div",{className:"partial-loading-background d-inline-block ".concat(i.button)}),r.createElement("div",{className:"partial-loading-background d-inline-block ms-2 ".concat(i.button)}))):r.createElement("div",{className:"partial-loading-background ".concat(i.notice)}),r.createElement("div",{className:"partial-loading-background mb-3 ".concat(i.video)},r.createElement("div",{className:"partial-loading-background ".concat(i.questions)})),r.createElement("div",{className:"partial-loading-background mb-3 ".concat(i.heading)}),r.createElement("div",null,Array(5).fill(null).map((function(t,e){return r.createElement("div",{key:e,className:"partial-loading-background my-2 ".concat(i.interaction)})}))))}},9064:(t,e,n)=>{function r(t){var e,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return null;var a=Object.assign(Object.assign(Object.assign({},t),o),{id:t.id,interactiveId:t.interactiveId,name:t.name});return(null===(e=null==t?void 0:t._parentClip)||void 0===e?void 0:e.id)&&(a.clip={id:null===(n=null==t?void 0:t._parentClip)||void 0===n?void 0:n.id}),(null===(r=null==t?void 0:t._parentVideo)||void 0===r?void 0:r.id)&&(a.video={id:null===(i=null==t?void 0:t._parentVideo)||void 0===i?void 0:i.id}),a}n.d(e,{T:()=>r})},9897:(t,e,n)=>{n.r(e),n.d(e,{EditInteractiveView:()=>G});var r=n(32735),i=n(17082),o=n(81886),a=n(20354),c=n(49985),u=n(65858),l=n(5960),f=n(60051),s=n(61990),d=n(33803),y=n(39151),p=n(20768),b=n(47812),v=n(31949),m=n(91286),g=n(38314),h=n(57052),w=n(14070),E=n(97291),O=n(23481),j=n(64364);function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}function S(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==P(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===P(i)?i:String(i)),r)}var i}function k(t,e){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},k(t,e)}function I(t){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},I(t)}var R="shared.cannotEditPublishedInteractive",T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&k(t,e)}(a,t);var e,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=I(r);if(i){var n=I(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===P(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,O.T.getPhrase(R,"title"))}return e=a,(n=[{key:"name",get:function(){return"CannotEditPublishedInteractiveError"}},{key:"heading",get:function(){return O.T.getPhrase(R,"heading")}},{key:"description",get:function(){return O.T.getPhrase(R,"description")}}])&&S(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(j.H),_=n(44960),A=n(63649),C=n(9064),N=n(70680),F=n(36199);function V(t){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V(t)}function x(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==V(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==V(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===V(i)?i:String(i)),r)}var i}function L(t,e){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},L(t,e)}function Q(t){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Q(t)}var U="shared.cannotEditInteractive",q=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&L(t,e)}(a,t);var e,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Q(r);if(i){var n=Q(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===V(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,O.T.getPhrase(U,"title"))}return e=a,(n=[{key:"name",get:function(){return"CannnotEditInteractiveError"}},{key:"heading",get:function(){return O.T.getPhrase(U,"heading")}},{key:"description",get:function(){return O.T.getPhrase(U,"description")}}])&&x(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(j.H);function B(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,c=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(c.push(r.value),c.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return D(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(t,e):void 0}}(t,e)||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 D(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var M=function(t){var e=(0,N.I0)(),n=B(r.useState(!1),2),i=n[0],c=n[1],u=B(r.useState(!1),2),l=u[0],f=u[1];return r.useEffect((function(){if(t&&!l&&!i)if(t.originType!==F.V.Original){var n=function(){o.Q.Ry.throw(new q)};c(!0),a.a.fetch(e,p.b.copyInteractive(t.interactiveId,(function(r){var i={originType:F.V.Original,interactiveId:r.id};a.a.fetch(e,p.b.updateInteractiveMetadata(t.id,i,(function(){return f(!0)}),n))}),n))}else f(!0)}),[t]),l};function X(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,c=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(c.push(r.value),c.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return $(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$(t,e):void 0}}(t,e)||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 $(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var H={application:E.O.INTERACTIVES,action:w.e.Interactives.EDIT_INTERACTIVE_DETAILS},K={notFound:s.l,forbidden:{privacy:d.G}};function G(t){var e=X(r.useState(!1),2),n=e[0],s=e[1],d=X(r.useState(!1),2),w=d[0],E=d[1],O=r.useRef(),j=a.a.useBasicFetch(y.L.config()),P=a.a.useBasicFetch(v.N.currentUser()),S=a.a.useBasicFetch(!!P.data&&p.b.interactiveMetadata(t.id)),k=M(S.data),I=a.a.useBasicFetch(k?b.k.createViewKey(S.data.id,f.f.MasterObject):null),R=a.a.useBasicFetch(v.N.token()),N=r.useMemo((function(){return(0,i.oD)()}),[]),F=r.useMemo((function(){return(0,i.oD)()}),[]),V=r.useRef();if((0,m.v)(S,K),!(I.data&&j.data&&S.data&&R.data))return r.createElement(A.X,{isEdit:!0});if(!w&&(E(!0),S.data.status!==l.X.Draft))return o.Q.Ry.throw(new T),null;var x=(0,C.T)(S.data),L={entity:u.py.Interactive,location:u.LZ.EditInteractive,workflowPhase:u.eu.Start};return r.createElement(r.Fragment,null,!n&&r.createElement(A.X,{isEdit:!0}),r.createElement("div",{className:"px-3 ".concat(n?"":"d-none")},r.createElement("div",{className:"d-flex justify-content-between align-items-center mb-3"},r.createElement("h1",{className:"h3 text-truncate mb-0 pb-1"},S.data.name),r.createElement("div",{className:"flex-shrink-0"},r.createElement(i.t0,{node:N}))),r.createElement(h.ClickViewInteractivePlayer,{viewKey:I.data.viewKey,imageApi:new URL(j.data.imageCdnUrl),playerApi:new URL(j.data.playerApiUrl),hotkeyElQuerySelector:"body",autoplay:!0,onReady:function(t){O.current=t,s(!0),V.current=new _.M({player:t,video:S.data,analyticsLocation:u.LZ.EditInteractive})},currentUser:P.data,mode:g.A.Create,actionsPortalNode:N,questionListPortalNode:F,authToken:R.data.value,onClickEditDetails:function(){c.k.logUserAction(x,Object.assign({actionType:u.Vw.Edit},L)),o.Q.C$.trigger(Object.assign(Object.assign({},H),{args:[t.id]}))},onClickPublish:function(){c.k.logUserAction(x,Object.assign({actionType:u.Vw.Publish},L)),o.Q.C$.trigger(Object.assign(Object.assign({},H),{args:[t.id],params:{publish:!0}}))},enableImmersiveReader:!0}),r.createElement(i.t0,{node:F})))}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 3789-4cb6d829f6-lite.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3789],{73758:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}n.d(t,{n:()=>o});var o=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}}var t,n;return t=e,n=[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex((function(e){return e.callback===t}));"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[e]){var o=[];this.listeners[e].forEach((function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&o.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))})),o.length&&o.forEach((function(n){return t.deregisterListener(e,n)}))}}}],n&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}())},26733:(e,t,n)=>{n.d(t,{s:()=>P,R:()=>O});var r=n(32735),i=n(39202),o=n(97395),a=n(49985),s=n(65858),u=n(36848),c=n(78276),l=n(76177),f=n(71063),h=n(54610),p=n(4594),y=n(1164),d=n(79967),v=n(67453);const b={imageStyle:"I9E5O",item:"tqUFn",background:"s1dNr",thumbnailContainer:"EDiGi",teacherPack:"_tdVE",text:"g5NWS",hoverState:"xRYhX",atomGuide:"X39wU",studentActivity:"X9pMl",additionalMaterials:"qRVUo",userUploaded:"_18JaV",imageTypeResource:"KYtZL"};var g={width:200,resizeType:h.Nq.Cover};function m(e,t){var n,r,i;if("thumbnail"in t&&(null===(n=t.thumbnail)||void 0===n?void 0:n.url))return v.j.createUrl(null===(r=t.thumbnail)||void 0===r?void 0:r.url,Object.assign({},g));var a=o._.safeUrlConcat(e,"/v1/previews");return"metadata"in t?t.metadata.type===y.L.Pdf?v.j.createResourceImage(a,t.url,g):t.metadata.type===y.L.Image?v.j.createUrl(t.url,{size:h.h2.Medium,resizeType:h.Nq.Cover}):(null===(i=t.pdf)||void 0===i?void 0:i.url)?v.j.createResourceImage(a,t.pdf.url,g):(t.metadata.type,y.L.Zip,"/images/zip-resource.png"):v.j.createResourceImage(a,t.url,Object.assign({},g))}function w(e){var t;return"metadata"in e?e.metadata.type===y.L.Pdf?h.__.Pdf:e.metadata.type===y.L.Image?h.__.Thumbnails:(null===(t=e.pdf)||void 0===t?void 0:t.url)?h.__.Pdf:(e.metadata.type,y.L.Zip,h.__.Thumbnails):h.__.Link}function P(e){var t,n,i,o,a,u,f,h=null,p=0;"metadata"in e.data&&(h=e.data.metadata,p=null!==(i=null===(n=null===(t=e.data.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==i?i:0);var d="".concat(null!==(a=null===(o=e.theme)||void 0===o?void 0:o.containerClass)&&void 0!==a?a:""," pt-3 px-3 rounded-3 d-flex flex-column align-items-center")+" justify-content-end ".concat(function(e){switch(e){case"atom-guide":return b.atomGuide;case"student-activity":return b.studentActivity;case"teacher-pack":return b.teacherPack;case"additional-materials":return b.additionalMaterials;default:return b.userUploaded}}(null==h?void 0:h.resourceType)," ").concat(b.background," ").concat(e.applyHoverState?b.hoverState:""," ");return r.createElement("div",{className:d},!e.hideHeading&&r.createElement(l.u,{title:e.data.name},r.createElement("h3",{className:"text-center text-break h5 mb-3 ".concat(b.text)},r.createElement("span",{className:"clamp-1"},e.data.name))),r.createElement("div",{className:"".concat(null!==(f=null===(u=e.theme)||void 0===u?void 0:u.thumbnailContainerClass)&&void 0!==f?f:""," w-75 overflow-hidden ").concat(b.thumbnailContainer," ").concat(b.imageStyle)},r.createElement(c.Z,{data:m(e.imageCdnUrl,e.data),imageType:w(e.data),imageStyle:{transform:"rotate(".concat(p,"deg)")},alt:e.data.name,analyticsOptions:{location:s.LZ.SlidingListItem},errorFallbackImageSrc:e.imageErrorFallbackUrl,imageClassName:(null==h?void 0:h.type)===y.L.Image?"".concat(b.imageTypeResource," ").concat(b.imageStyle):"",preload:e.preloadImage,preventLoad:!e.preloadImage})))}P.defaultProps={preloadImage:!0,actionBehaviour:"normal"};var O=r.memo((function(e){var t,n,o,c,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,[]),h=(t=e.data,n=e.actionBehaviour,c=(0,d.k)(),"public"===n||!c.xs&&!c.sm&&"resource"===t.type&&"metadata"in t&&(t.metadata.type===y.L.Image||(t.metadata.type===y.L.Pdf?!!t.url:!!(null===(o=t.pdf)||void 0===o?void 0:o.url)))),v=Object.assign(Object.assign({},e.analyticsData),e.data),g=Object.assign(Object.assign({},e.analyticsOptions),{actionType:s.Vw.Click,entity:e.data.typeId===p.E.Resource?s.py.Resource:s.py.Link});function m(){a.k.logUserAction(v,g)}var w,O=!!e.data.url;return l.applyHoverState=h||O,r.createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat(b.item," ").concat(f.M.RESOURCE_ITEM_SELECTOR)},(w="d-block no-decoration","link"===e.data.type?r.createElement("a",{href:e.data.url,target:"_blank",className:w,onClick:m},r.createElement(P,Object.assign({},l))):h?"public"===e.actionBehaviour?r.createElement("div",{className:"".concat(w," cursor-pointer d-inline"),onClick:function(){m(),i.C$.trigger(e.getAppLink(e.data))}},r.createElement(P,Object.assign({},l))):r.createElement(u.F,{appLink:e.getAppLink(e.data),className:w,analyticsData:v,analyticsOptions:g},r.createElement(P,Object.assign({},l))):O?r.createElement("a",{href:e.data.url,className:w,onClick:m},r.createElement(P,Object.assign({},l))):r.createElement("div",{className:w},r.createElement(P,Object.assign({},l)))))}))},36:(e,t,n)=>{n.r(t),n.d(t,{ClickViewPlayer:()=>Cn});var r=n(32735),i=n(2200),o=(n(16852),n(93861));function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===a(i)?i:String(i)),r)}var i}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},u.apply(this,arguments)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(f,e);var t,n,r,i,o=(r=f,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=l(r);if(i){var n=l(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function f(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(e=o.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=f,(n=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){u(l(f.prototype),"handleClick",this).call(this,null)}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Z.getComponent("Button"));function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===h(i)?i:String(i)),r)}var i}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}f.prototype.controlText_="Create Clip",o.Z.registerComponent("CreateClipButton",f);var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(r);if(i){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=a,(n=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(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,(void 0,i=function(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===b(i)?i:String(i)),r)}var i}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}o.Z.registerPlugin("createClipButtonPlugin",v);var P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w(r);if(i){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&g(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("PictureInPictureToggle"));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 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,(void 0,i=function(e,t){if("object"!==O(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===O(i)?i:String(i)),r)}var i}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=E(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},k.apply(this,arguments)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}o.Z.registerComponent("PictureInPictureToggle",P);var C=o.Z.getComponent("PlayToggle"),T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=E(r);if(i){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).pictureInPictureEnabled=!1,n.options=t,n.bindFunctions(),n}return t=a,(n=[{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){var e=this;if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var t=this.getToggleParentComponent();if(t){this.pictureInPictureEnabled=!0;var n=t.children().findIndex((function(e){var t;return"fullscreentoggle"===(null===(t=e.name())||void 0===t?void 0:t.toLowerCase())}));-1===n&&(n=t.children().length-1),t.addChild("pictureInPictureToggle",{},n);var r=t.getChild("pictureInPictureToggle");null==r||r.enable(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var t;null===(t=e.player)||void 0===t||t.off("playerresize",e.onPlayerResize)}))}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var e=this.getToggleParentComponent(),t=null==e?void 0:e.getChild("pictureInPictureToggle");t&&e.removeChild(t),this.player.off("playerresize",this.onPlayerResize)}}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){if(!this.player.isInPictureInPicture()){var e=this.player.el().getBoundingClientRect();0!==e.width&&(e.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new C(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){var e;this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),"function"==typeof(null===(e=this.options)||void 0===e?void 0:e.onRequestPictureInPicture)&&this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,k(E(a.prototype),"dispose",this).call(this)}}])&&S(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("pictureInPicture",T);var x=n(23035),_=n(42892),I=n(73758);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 M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==R(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===R(i)?i:String(i)),r)}var i}function L(){return L="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=B(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},L.apply(this,arguments)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function N(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}var F=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=B(r);if(i){var n=B(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return N(e)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).hasBuffered=!1,n.hasPlayed=!1,n.eventsService=I.n,n.pointOfInterest=t.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(N(n)),n.onMouseLeave=n.onMouseLeave.bind(N(n)),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(N(n)),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(N(n)),n.initialize(),n}return t=s,(n=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(L(B(s.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return L(B(s.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/e*100+"%"}},{key:"updateBuffered",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasBuffered){this.hasBuffered=t;var n="cv-point-of-interest-indicator-buffered";this.hasBuffered?this.addClass(n):this.removeClass(n)}}},{key:"updatePlaybackProgress",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasPlayed){this.hasPlayed=t;var n="cv-point-of-interest-indicator-played";t?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(e){var t="cv-point-of-interest-indicator-hidden";e?this.removeClass(t):this.addClass(t)}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(e){e.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var e=this.getTimeTooltip();null==e||e.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var e,t,n=null===(e=this.getSeekBar())||void 0===e?void 0:e.el();if(n){var r=o.Z.dom.findPosition(n),i=this.getPointOfInterestTime()/this.player().duration();null===(t=this.getMouseTimeDisplay())||void 0===t||t.update(r,i)}}},{key:"showMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.removeForceShow()}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player().controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var e;return null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var e;return null===(e=this.getMouseTimeDisplay())||void 0===e?void 0:e.getChild("TimeTooltip")}}])&&M(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("Component"));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 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,(void 0,i=function(e,t){if("object"!==V(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==V(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===V(i)?i:String(i)),r)}var i}function U(){return U="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=z(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},U.apply(this,arguments)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}var G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=z(r);if(i){var n=z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===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)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).pointsOfInterestVisible=t.pointsOfInterestVisible,n.toggle(n.pointsOfInterestVisible),n}return t=s,(n=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){o.Z.dom.addClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){o.Z.dom.removeClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=o.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=U(z(s.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&A(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuItem"));function q(e){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q(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,(void 0,i=function(e,t){if("object"!==q(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===q(i)?i:String(i)),r)}var i}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function Y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}o.Z.registerComponent("PointsOfInterestMenuItem",G);var Q=o.Z.getPlugin("plugin"),J="cvplayer-points-of-interest",X=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$(r);if(i){var n=$(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Y(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e)).pointOfInterestIndicators=[],n.enabled=!0,n.pointsOfInterest=null==t?void 0:t.pointsOfInterest,n.initialize=n.initialize.bind(Y(n)),n.updateBuffered=n.updateBuffered.bind(Y(n)),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(Y(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return t=a,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(_.S.hasLocalStorage()&&"false"===_.S.get(J)&&(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){_.S.set(J,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 F(t.player,{pointOfInterest:e});t.pointOfInterestIndicators.push(r),n.addChild(r)}))}},{key:"addMenuItem",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({index:0,ctor:G,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered((0,x.b)(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])&&H(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Q);o.Z.registerPlugin("pointsOfInterestPlugin",X),n(93262);var K=n(95569),ee=function(){var e,t;return null!==(t=null===(e=window.crypto)||void 0===e?void 0:e.randomUUID())&&void 0!==t?t:Math.random().toString()};function te(e){var t="function"==typeof Map?new Map:void 0;return te=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 ne(e,arguments,oe(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ie(n,e)},te(e)}function ne(e,t,n){return ne=re()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&ie(i,n.prototype),i},ne.apply(null,arguments)}function re(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ie(e,t){return ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ie(e,t)}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}function ae(e){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ae(e)}function se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==ae(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==ae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===ae(i)?i:String(i)),r)}var i}function ce(e,t,n){return t&&ue(e.prototype,t),n&&ue(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var le=function(){function e(){se(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)}return ce(e,[{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()?fe.reject(new Error("This EventChannel instance has been disposed")):new fe((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}}]),e}(),fe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(i,e);var t,n,r=(t=i,n=re(),function(){var e,r=oe(t);if(n){var i=oe(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return function(e,t){if(t&&("object"===ae(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(e,t){var n;return se(this,i),(n=r.call(this,e)).onTimeout=t,n.bindFunctions(),n}return ce(i,[{key:"bindFunctions",value:function(){this.timeout=this.timeout.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:"reject",value:function(e){return new i((function(t,n){return n(e)}))}}]),i}(te(Promise)),he=function(){function e(){se(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)}return ce(e,[{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",pe.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 le),this.channels[e]}}]),e}(),pe={void:void 0};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 de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==ye(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==ye(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===ye(i)?i:String(i)),r)}var i}var ve=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions()}var t,n;return t=e,(n=[{key:"bindFunctions",value:function(){this.schedule=this.schedule.bind(this),this.every=this.every.bind(this),this.trigger=this.trigger.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this)}},{key:"schedule",value:function(e){return this.task=e,this}},{key:"every",value:function(e){return this.intervalInMilliseconds=e,this}},{key:"trigger",value:function(){var e;return null===(e=this.task)||void 0===e||e.call(this,this),this}},{key:"start",value:function(){var e=this;return this.intervalId||(this.intervalId=setInterval((function(){return e.trigger()}),this.intervalInMilliseconds)),this}},{key:"stop",value:function(){return this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this}}])&&de(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==be(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===be(i)?i:String(i)),r)}var i}var me,we={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},Pe=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:we;!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({},we),r),this.webSocket=this.connect(),this.heartbeat=(new ve).schedule((function(){return n.send(n.options.heartbeatMessage)})).every(this.options.heartbeatIntervalInMillseconds)}var t,n;return t=e,(n=[{key:"bindFunctions",value:function(){this.cleanup=this.cleanup.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleMessage=this.handleMessage.bind(this),this.handleClose=this.handleClose.bind(this),this.handleError=this.handleError.bind(this),this.connect=this.connect.bind(this),this.send=this.send.bind(this),this.dipose=this.dipose.bind(this)}},{key:"cleanup",value:function(){this.heartbeat.stop(),this.webSocket.removeEventListener("error",this.handleError),this.webSocket.removeEventListener("message",this.handleMessage),this.webSocket.removeEventListener("open",this.handleOpen),this.webSocket.removeEventListener("close",this.handleClose)}},{key:"handleOpen",value:function(e){var t;null===(t=this.onOpen)||void 0===t||t.call(this,e),this.options.heartbeatEnabled&&this.heartbeat.start()}},{key:"handleMessage",value:function(e){var t;null===(t=this.onMessage)||void 0===t||t.call(this,e)}},{key:"handleClose",value:function(e){var t,n=this;null===(t=this.onClose)||void 0===t||t.call(this,e),this.cleanup(),setTimeout((function(){n.webSocket=n.connect()}),this.options.reconnectIntervalInMilliseconds)}},{key:"handleError",value:function(e){var t;null===(t=this.onError)||void 0===t||t.call(this,e),this.handleClose()}},{key:"connect",value:function(){var e=new WebSocket(this.url);return e.addEventListener("open",this.handleOpen),e.addEventListener("message",this.handleMessage),e.addEventListener("close",this.handleClose),e.addEventListener("error",this.handleError),e}},{key:"send",value:function(e){this.webSocket.send(e)}},{key:"dipose",value:function(){this.cleanup(),this.webSocket.close()}}])&&ge(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Oe(e){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oe(e)}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==Oe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Oe(i)?i:String(i)),r)}var i}!function(e){e.AppleTv="apple-tv",e.Vivi="vivi"}(me||(me={}));var ke=function(){function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._timerStartedAt=0,this._lastModified={},this.position=0,this.duration=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=this.withDebouncedSetters(),this.withTimestampedSetters()}var t,n;return t=e,(n=[{key:"position",get:function(){return this._position+this.getTimerDurationInSeconds()},set:function(e){this._position=e,this.restartTimer()}},{key:"playing",get:function(){return this._playing},set:function(e){this._playing=e,e?this.restartTimer():(this._position+=this.getTimerDurationInSeconds(),this.stopTimer())}},{key:"restartTimer",value:function(){this._timerStartedAt=Date.now()}},{key:"stopTimer",value:function(){this._timerStartedAt=0}},{key:"getTimerDurationInSeconds",value:function(){return this._timerStartedAt?(Date.now()-this._timerStartedAt)/1e3:0}},{key:"withDebouncedSetters",value:function(){var e=this;return new Proxy(this,{set:function(t,n,r,i){var o=e._lastModified[n.toString()];return!!(o&&Date.now()<o+2e3)||Reflect.set(t,n,r,i)}})}},{key:"withTimestampedSetters",value:function(){var e=this;return new Proxy(this,{set:function(t,n,r,i){return e._lastModified[n.toString()]=Date.now(),Reflect.set(t,n,r,i)}})}}])&&Se(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function je(e){return je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},je(e)}function Ee(){Ee=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:E(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function b(){}function g(){}function m(){}var w={};c(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(I([])));O&&O!==n&&r.call(O,a)&&(w=O);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==je(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function E(t,n,r){var i=h;return function(o,a){if(i===y)throw new Error("Generator is already running");if(i===d){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?d:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=d,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(je(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=c(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),c(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==je(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==je(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===je(i)?i:String(i)),r)}var i}function Te(){return Te="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_e(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}},Te.apply(this,arguments)}function xe(e,t){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xe(e,t)}function _e(e){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_e(e)}var Ie=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xe(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_e(r);if(i){var n=_e(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===je(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this)).client=e,n.localState=new ke(t.title,t.device),n.bindFunctions(),n.initialize(),n}return t=a,(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.dispose=this.dispose.bind(this),this.handleClientConnected=this.handleClientConnected.bind(this),this.handleDisconnectMessage=this.handleDisconnectMessage.bind(this),this.handleAllVideoMessages=this.handleAllVideoMessages.bind(this),this.handleUpdateMessage=this.handleUpdateMessage.bind(this),this.handleVolumeMessage=this.handleVolumeMessage.bind(this),this.handlePlayingMessage=this.handlePlayingMessage.bind(this),this.handlePausedMessage=this.handlePausedMessage.bind(this),this.handleFinishedMessage=this.handleFinishedMessage.bind(this),this.handleNewChapterMessage=this.handleNewChapterMessage.bind(this),this.handleStoppedMessage=this.handleStoppedMessage.bind(this),this.loadSource=this.loadSource.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.isPlaying=this.isPlaying.bind(this),this.getPosition=this.getPosition.bind(this),this.getDuration=this.getDuration.bind(this),this.getVolume=this.getVolume.bind(this)}},{key:"initialize",value:function(){var e=this;this.client.on("dispose",this.dispose),this.client.on("connected",this.handleClientConnected),this.client.on("message",this.handleDisconnectMessage).filter((function(t){return t.source===e.getDevice().id&&"disconnect"===t.message.type})),this.client.on("message",this.handleAllVideoMessages).filter((function(t){return t.source===e.getDevice().id&&"video_event"===t.message.type}))}},{key:"dispose",value:function(){this.client.off("dispose",this.dispose),this.client.off("connected",this.handleClientConnected),this.client.off("message",this.handleDisconnectMessage),this.client.off("message",this.handleAllVideoMessages),this.client.stop(this.getDevice().id).catch(K.ZT),Te(_e(a.prototype),"dispose",this).call(this)}},{key:"handleClientConnected",value:function(){return Ie(this,void 0,void 0,Ee().mark((function e(){return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.client.joinRoom(this.getDevice().id);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),this.trigger("error",e.t0);case 8:case"end":return e.stop()}}),e,this,[[0,5]])})))}},{key:"handleDisconnectMessage",value:function(){this.dispose()}},{key:"handleAllVideoMessages",value:function(e){var t={update:this.handleUpdateMessage,volume:this.handleVolumeMessage,playing:this.handlePlayingMessage,paused:this.handlePausedMessage,finished:this.handleFinishedMessage,new_chapter:this.handleNewChapterMessage,stopped:this.handleStoppedMessage}[e.message.payload.event];t&&t(this.localState.debounced,e.message.payload.params||{})}},{key:"handleUpdateMessage",value:function(e,t){e.duration!==t.duration&&(e.duration=t.duration,this.trigger("durationchange",pe.void)),e.position!==t.position&&(e.position=t.position,this.trigger("positionchange",pe.void)),e.subtitles!==t.subtitles&&(e.subtitles=t.subtitles,this.trigger("subtitleschange",pe.void))}},{key:"handleVolumeMessage",value:function(e,t){e.volume!==t.level&&(e.volume=t.level,e.mute=0===t.level,this.trigger("volumechange",pe.void))}},{key:"handlePlayingMessage",value:function(e){!0!==e.playing&&(e.playing=!0,e.playbackFinished=!1,this.trigger("playingchange",pe.void))}},{key:"handlePausedMessage",value:function(e){!1!==e.playing&&(e.playing=!1,this.trigger("playingchange",pe.void))}},{key:"handleFinishedMessage",value:function(e){!0!==e.playbackFinished&&(e.playing=!1,e.playbackFinished=!0,this.trigger("playingchange",pe.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",pe.void))}},{key:"handleStoppedMessage",value:function(){this.dispose()}},{key:"loadSource",value:function(e,t){return Ie(this,void 0,void 0,Ee().mark((function n(){var r,i;return Ee().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.localState.videoSource!==e||this.localState.subtitleSource!==t){n.next=2;break}return n.abrupt("return");case 2:return n.prev=2,r=this.getDevice().id,i=this.getPosition(),this.localState.videoSource=e,this.localState.subtitleSource=t,this.localState.ready=!1,n.next=10,this.client.joinRoom(r);case 10:return n.next=12,this.client.loadQueue({title:this.getTitle(),roomId:r,videoSource:e,subtitleSource:t});case 12:this.localState.ready=!0,this.trigger("sourceloaded",pe.void),i>0&&this.client.seek(r,i),n.next=20;break;case 17:n.prev=17,n.t0=n.catch(2),this.trigger("error",n.t0);case 20:case"end":return n.stop()}}),n,this,[[2,17]])})))}},{key:"play",value:function(){this.localState.ready&&!0!==this.localState.playing&&(this.localState.playing=!0,this.client.play(this.getDevice().id),this.trigger("playingchange",pe.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",pe.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",pe.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",pe.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",pe.void))}},{key:"setSubtitles",value:function(e){return Ie(this,void 0,void 0,Ee().mark((function t(){var n;return Ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.localState.ready){t.next=2;break}return t.abrupt("return");case 2:if(!e){t.next=5;break}return t.next=5,this.loadSource(this.localState.videoSource,e);case 5:n=!!e,this.localState.subtitles!==n&&(this.localState.subtitles=n,this.client.setSubtitles(this.getDevice().id,n),this.trigger("subtitleschange",pe.void));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"isPlaying",value:function(){return this.localState.playing}},{key:"isPlaybackFinished",value:function(){return this.localState.playbackFinished}},{key:"getPosition",value:function(){return this.localState.position}},{key:"getDuration",value:function(){return this.localState.duration}},{key:"getVolume",value:function(){return this.localState.volume}},{key:"getMuted",value:function(){return this.localState.mute}},{key:"getSubtitles",value:function(){if(this.localState.subtitles)return this.localState.subtitleSource}},{key:"getDevice",value:function(){return this.localState.device}},{key:"getTitle",value:function(){return this.localState.title}}])&&Ce(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(he);function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}function Le(){Le=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:E(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function b(){}function g(){}function m(){}var w={};c(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(I([])));O&&O!==n&&r.call(O,a)&&(w=O);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Me(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function E(t,n,r){var i=h;return function(o,a){if(i===y)throw new Error("Generator is already running");if(i===d){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?d:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=d,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Me(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=c(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),c(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==Me(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Me(i)?i:String(i)),r)}var i}function Ne(){return Ne="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Fe(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}},Ne.apply(this,arguments)}function Be(e,t){return Be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Be(e,t)}function Fe(e){return Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fe(e)}var Ve=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Ae=1e4,Ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Be(e,t)}(s,e);var t,n,r,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Fe(i);if(o){var n=Fe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Me(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).options=e,t.accessToken="",t.devices=[],t.devicesFingerprint="",t.deviceDiscovery=new ve,t.bindFunctions(),t.initialize(),t}return t=s,r=[{key:"createAckId",value:function(){return ee()}},{key:"calculateFingerprint",value:function(e){return e.map((function(e){return e.id})).sort().join(",")}}],(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.beginDeviceDiscovery=this.beginDeviceDiscovery.bind(this),this.dispose=this.dispose.bind(this),this.sendMessage=this.sendMessage.bind(this),this.sendMessageDebounced=(0,K.Ds)(this.sendMessage,500,!0),this.getDevices=this.getDevices.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 Pe(this.options.url.toString()),this.webSocket.onMessage=function(t){return e.trigger("message",JSON.parse(t.data))},this.webSocket.onOpen=function(){return Ve(e,void 0,void 0,Le().mark((function e(){return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.options.fetchAccessToken();case 3:return this.accessToken=e.sent,e.next=6,this.authenticateWithVivi();case 6:this.beginDeviceDiscovery(),this.trigger("connected",pe.void),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),this.trigger("error",e.t0);case 13:case"end":return e.stop()}}),e,this,[[0,10]])})))}}},{key:"beginDeviceDiscovery",value:function(){var e=this;this.deviceDiscovery.every(1e4).schedule((function(){return Ve(e,void 0,void 0,Le().mark((function e(){var t,n;return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getRoomList();case 3:if(t=e.sent,(n=s.calculateFingerprint(t))!==this.devicesFingerprint){e.next=7;break}return e.abrupt("return");case 7:this.devices=t.map((function(e){return{id:e.id,name:e.name,type:me.Vivi,available:!0}})),this.devicesFingerprint=n,this.trigger("deviceschange",pe.void),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.warn(e.t0);case 15:case"end":return e.stop()}}),e,this,[[0,12]])})))})).trigger().start()}},{key:"dispose",value:function(){var e;this.deviceDiscovery.stop(),null===(e=this.webSocket)||void 0===e||e.dipose(),Ne(Fe(s.prototype),"dispose",this).call(this)}},{key:"sendMessage",value:function(e){var t;null===(t=this.webSocket)||void 0===t||t.send(JSON.stringify(e))}},{key:"canCastToDevice",value:function(e){return e===me.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new Re(this,e)}},{key:"authenticateWithVivi",value:function(){return Ve(this,void 0,void 0,Le().mark((function e(){return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:"relay",message:{token:this.accessToken,type:"identify_video_api"}}),e.next=3,this.one("message",(function(e){return"video_api_identified"===e.message.type})).timeout(Ae).catch((function(){throw new Error("Failed to authenticate with Vivi")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getRoomList",value:function(){return Ve(this,void 0,void 0,Le().mark((function e(){var t;return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:"relay",message:{type:"video_api_rooms"}}),e.next=3,this.one("message",(function(e){return"video_api_rooms"===e.message.type})).timeout(Ae).catch((function(){throw new Error("Failed to fetch rooms")}));case 3:return t=e.sent,e.abrupt("return",t.message.rooms||[]);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"joinRoom",value:function(e){return Ve(this,void 0,void 0,Le().mark((function t(){return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:"relay",message:{destination_type:"box",new_destination:e,token:this.accessToken,type:"connect"}}),t.next=3,this.one("message",(function(t){return t.source===e&&"connect"===t.message.type||"error"===t.message.type&&"already_connected"===t.message.error_type||void 0})).timeout(Ae).catch((function(){throw new Error("Failed to join room")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"query",value:function(e){return Ve(this,void 0,void 0,Le().mark((function t(){var n;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:n,name:"query"}}),t.next=4,this.one("message",(function(e){return e.message.ack_id===n})).timeout(Ae).catch((function(){throw new Error("Failed to fetch query")}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"loadQueue",value:function(e){var t=e.roomId,n=e.title,r=e.videoSource,i=e.subtitleSource;return Ve(this,void 0,void 0,Le().mark((function e(){return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:t,message:{type:"message_with_ack",ack_id:s.createAckId(),name:"queue_load",payload:{urls:[{title:n,url:r,suburl:i}]}}}),e.next=3,this.one("message",(function(e){var n;return e.source===t&&"ready"===(null===(n=e.message.payload)||void 0===n?void 0:n.event)})).timeout(Ae).catch((function(){throw new Error("Failed to load media")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"play",value:function(e){return Ve(this,void 0,void 0,Le().mark((function t(){return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_play",payload:{}}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ae).catch((function(){throw new Error("Failed to play video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"pause",value:function(e){return Ve(this,void 0,void 0,Le().mark((function t(){return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_pause"}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"paused"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ae).catch((function(){throw new Error("Failed to pause video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"stop",value:function(e){return Ve(this,void 0,void 0,Le().mark((function t(){return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_stop"}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"stopped"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ae).catch((function(){throw new Error("Failed to stop video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"seek",value:function(e,t){return Ve(this,void 0,void 0,Le().mark((function n(){return Le().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"video_seek",payload:{position:t}}})){n.next=4;break}return n.next=4,this.one("message",(function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ae).catch((function(){throw new Error("Failed to seek video")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setVolume",value:function(e,t){return Ve(this,void 0,void 0,Le().mark((function n(){return Le().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"set_volume",payload:{volume:t}}})){n.next=4;break}return n.next=4,this.one("message",(function(t){var n;return t.source===e&&"volume"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ae).catch((function(){throw new Error("Failed to set volume")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setMuted",value:function(e,t){return Ve(this,void 0,void 0,Le().mark((function n(){return Le().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"set_mute",payload:{mute:t}}}),n.next=3,this.one("message",(function(t){var n;return t.source===e&&"mute"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ae).catch((function(){throw new Error("Failed to set mute")}));case 3:case"end":return n.stop()}}),n,this)})))}},{key:"setSubtitles",value:function(e,t){return Ve(this,void 0,void 0,Le().mark((function n(){var r;return Le().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=s.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:r,name:"set_subtitles",payload:{subtitles:t}}}),n.next=4,this.one("message",(function(t){return t.source===e&&t.message.ack_id===r})).timeout(Ae).catch((function(){throw new Error("Failed to set subtitles")}));case 4:case"end":return n.stop()}}),n,this)})))}}])&&De(t.prototype,n),r&&De(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(he);function Ze(e){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(e)}function ze(e){return function(e){if(Array.isArray(e))return Ge(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 Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ge(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 Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==Ze(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Ze(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Ze(i)?i:String(i)),r)}var i}function He(){return He="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ye(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},He.apply(this,arguments)}function We(e,t){return We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},We(e,t)}function Ye(e){return Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ye(e)}var $e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&We(e,t)}(s,e);var t,n,r,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ye(i);if(o){var n=Ye(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ze(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).instanceId=e,t.clients=[],t.bindFunctions(),t}return t=s,r=[{key:"getOrCreateInstance",value:function(e){if(!e)throw new Error("instanceId is required");return this.instances[e]||(this.instances[e]=new s(e)),this.instances[e]}},{key:"disposeAndRemoveInstance",value:function(e){e.dispose(),delete this.instances[e.instanceId]}},{key:"isActive",value:function(){return Object.keys(this.instances).length>0}}],(n=[{key:"bindFunctions",value:function(){this.addClient=this.addClient.bind(this),this.hasInstanceOfClient=this.hasInstanceOfClient.bind(this),this.startCastSession=this.startCastSession.bind(this),this.gatherAndPublishDevices=this.gatherAndPublishDevices.bind(this),this.dispose=this.dispose.bind(this)}},{key:"addClient",value:function(e){var t=this;e.on("deviceschange",this.gatherAndPublishDevices),e.on("error",(function(e){return t.trigger("error",e)})),this.clients.push(e)}},{key:"hasInstanceOfClient",value:function(e){return this.clients.some((function(t){return t instanceof e}))}},{key:"startCastSession",value:function(e){var t=this;if(this.castSession){if(this.castSession.getDevice().id===e.device.id)return void console.info("A session with device ".concat(e.device.id," already exists - this is a no-op"));this.castSession.dispose()}var n=this.clients.find((function(t){return t.canCastToDevice(e.device.type)}));n&&(this.castSession=n.startCastSession(e),this.castSession.on("error",(function(e){t.castSession.dispose(),t.trigger("error",e)})),this.castSession.on("dispose",(function(){t.castSession=void 0,t.trigger("castsessionchange",void 0)})),this.trigger("castsessionchange",this.castSession))}},{key:"getCastSession",value:function(){return this.castSession}},{key:"gatherAndPublishDevices",value:function(){var e=this.clients.map((function(e){return e.getDevices()})).reduce((function(e,t){return[].concat(ze(e),ze(t))}),[]);this.trigger("deviceschange",e)}},{key:"dispose",value:function(){var e;null===(e=this.castSession)||void 0===e||e.dispose(),this.clients.forEach((function(e){return e.dispose()})),this.castSession=void 0,this.clients=[],He(Ye(s.prototype),"dispose",this).call(this)}}])&&qe(t.prototype,n),r&&qe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(he);$e.instances={};var Qe=n(30050),Je=n(98115);function Xe(e){return Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xe(e)}function 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,(void 0,i=function(e,t){if("object"!==Xe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Xe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Xe(i)?i:String(i)),r)}var i}function et(){return et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},et.apply(this,arguments)}function tt(e,t){return tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tt(e,t)}function nt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rt(e){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rt(e)}var it=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=rt(r);if(i){var n=rt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Xe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return nt(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).isVisible=n.isVisible.bind(nt(n)),n}return t=a,(n=[{key:"createEl",value:function(){return et(rt(a.prototype),"createEl",this).call(this,"li",{className:"vjs-menu-item cv-device-menu-item",innerHTML:'\n <span class="cv-device-icon '.concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[this.options_.type],'"></span>\n <span class="vjs-menu-item-text">').concat(this.options_.label,"</span>\n ")})}},{key:"handleClick",value:function(){this.options_.onClick()}},{key:"show",value:function(){et(rt(a.prototype),"show",this).call(this)}},{key:"hide",value:function(){et(rt(a.prototype),"hide",this).call(this)}},{key:"isVisible",value:function(){return!et(rt(a.prototype),"hasClass",this).call(this,"vjs-hidden")}}])&&Ke(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("MenuItem"));function ot(e){return ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ot(e)}function at(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==ot(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==ot(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===ot(i)?i:String(i)),r)}var i}function st(){return st="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ct(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},st.apply(this,arguments)}function ut(e,t){return ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ut(e,t)}function ct(e){return ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ct(e)}var lt=o.Z.getComponent("MenuButton"),ft=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ut(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ct(r);if(i){var n=ct(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).alwaysCollapsed=!1,n.isCollapsed=!1,n.isCollabsible=!0,n.searchText="",n.devices=[],n.castSession=void 0,n.bindFunctions(),n.bindEventListeners(),n}return t=a,n=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.setDevices=this.setDevices.bind(this),this.setCastSession=this.setCastSession.bind(this),this.setSearchText=this.setSearchText.bind(this),this.getDeviceMenuItems=this.getDeviceMenuItems.bind(this),this.render=this.render.bind(this),this.removeMenuItems=this.removeMenuItems.bind(this),this.addMenuItemsForDevices=this.addMenuItemsForDevices.bind(this),this.shouldShowSearchInput=this.shouldShowSearchInput.bind(this),this.toggleSearchInput=this.toggleSearchInput.bind(this),this.toggleDeviceMenuItems=this.toggleDeviceMenuItems.bind(this),this.toggleEmptyStatePlaceholder=this.toggleEmptyStatePlaceholder.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("button"),n=function(t){e.menu.handleBlur(t)};t.addEventListener("blur",n),this.one("dispose",(function(){t.removeEventListener("blur",n)}))}},{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=lt.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(st(ct(a.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=this,t=[];return this.headingItem=new Qe.Z(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new Je.Z(this.player_,{menuButton:this,search:function(t){return e.setSearchText(t)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new Je.C(this.player_,{label:"No devices found",selected:!1,selectable:!1,multiSelectable:!1}),this.headingItem.show(),this.searchInputItem.hide(),this.emptyPlaceholder.show(),t.push(this.headingItem,this.searchInputItem,this.emptyPlaceholder),t}},{key:"pressButton",value:function(){var e;st(ct(a.prototype),"pressButton",this).call(this),this.shouldShowSearchInput()&&(null===(e=this.searchInputItem)||void 0===e||e.focus())}},{key:"setDevices",value:function(e){this.devices=e,this.render()}},{key:"setCastSession",value:function(e){this.castSession=e,this.render()}},{key:"setSearchText",value:function(e){this.searchText=e,this.render()}},{key:"getDeviceMenuItems",value:function(){return this.menu.children_.filter((function(e){return e instanceof it}))}},{key:"render",value:function(){var e=this.getDeviceMenuItems();this.removeMenuItems(e),this.addMenuItemsForDevices(this.devices),this.toggleSearchInput(),this.toggleDeviceMenuItems(),this.toggleEmptyStatePlaceholder()}},{key:"removeMenuItems",value:function(e){var t=this;e.forEach((function(e){return t.menu.removeChild(e)}))}},{key:"addMenuItemsForDevices",value:function(e){var t=this;e.forEach((function(e){var n=new it(t.player(),{id:e.id,label:e.name,selected:!1,multiSelectable:!1,selectable:e.available,available:e.available,type:e.type,onClick:function(){t.options_.onDeviceMenuItemClick(n,e)}});t.menu.addItem(n)}))}},{key:"shouldShowSearchInput",value:function(){return this.getDeviceMenuItems().length>=20}},{key:"toggleSearchInput",value:function(){this.shouldShowSearchInput()?(this.headingItem.hide(),this.searchInputItem.show(),this.menu.addClass("vertical-fill")):(this.headingItem.show(),this.searchInputItem.hide(),this.menu.removeClass("vertical-fill"))}},{key:"toggleDeviceMenuItems",value:function(){var e=this,t=this.getDeviceMenuItems(),n=this.shouldShowSearchInput(),r=this.searchText.toLowerCase();t.forEach((function(t){var i,o=e.devices.find((function(e){return e.id===t.options_.id}));if(o){var a=o.available,s=!n||-1!==o.name.toLowerCase().indexOf(r),u=o.id===(null===(i=e.castSession)||void 0===i?void 0:i.getDevice().id);a?t.enable():t.disable(),s?t.show():t.hide(),u?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(){st(ct(a.prototype),"handleClick",this).call(this,null),this.options_.onClick()}}],n&&at(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(lt);ft.prototype.controlText_="Devices",o.Z.registerComponent("DevicesButton",ft);var ht=n(10463);function pt(e){return pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pt(e)}function yt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==pt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==pt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===pt(i)?i:String(i)),r)}var i}function dt(){return dt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=bt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},dt.apply(this,arguments)}function vt(e,t){return vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vt(e,t)}function bt(e){return bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bt(e)}var gt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=bt(r);if(i){var n=bt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===pt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,null,e)}return t=a,(n=[{key:"createEl",value:function(){return dt(bt(a.prototype),"createEl",this).call(this,"div",{className:"cv-devices-tech"})}},{key:"setPoster",value:function(e){this.poster=e,this.update()}},{key:"setDevice",value:function(e){this.device=e,this.update()}},{key:"update",value:function(){var e,t,n,r,i=this;this.el_.innerHTML='\n <div class="cv-devices-content">\n <p>'.concat(this.localize("Currently playing on"),'</p>\n <h2><span class="cv-device-icon ').concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[null!==(t=null===(e=this.device)||void 0===e?void 0:e.type)&&void 0!==t?t:me.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(){}}])&&yt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("Component"));function mt(e){return mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mt(e)}function wt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==mt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===mt(i)?i:String(i)),r)}var i}function Pt(){return Pt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=St(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}},Pt.apply(this,arguments)}function Ot(e,t){return Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ot(e,t)}function St(e){return St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},St(e)}var kt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ot(e,t)}(u,e);var t,n,r,i,a,s=(i=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=St(i);if(a){var n=St(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===mt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function u(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=s.call(this,e,t)).featuresVolumeControl=!0,n.featuresPlaybackRate=!1,n.movingMediaElementInDOM=!1,n.featuresFullscreenResize=!0,n.featuresTimeupdateEvents=!0,n.featuresProgressEvents=!1,n.featuresNativeTextTracks=!1,n.featuresNativeAudioTracks=!1,n.featuresNativeVideoTracks=!1,n.featuresMuteControl=!0,n.featuresSourceset=!1,n.videojsPlayer=(0,o.Z)(n.options_.playerId),n.bindFunctions(),n.bindEventListeners(),n.ready((function(){n.setSource(n.options_.source)})),n.triggerReady(),n}return t=u,r=[{key:"canPlayType",value:function(){return""}},{key:"canPlaySource",value:function(e,t){var n;return!!$e.getOrCreateInstance(null!==(n=null==t?void 0:t.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return $e.isActive()}}],(n=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.onTextTrackChanged=this.onTextTrackChanged.bind(this),this.getSelectedTextTrack=this.getSelectedTextTrack.bind(this),this.setSelectedTextTrack=this.setSelectedTextTrack.bind(this),this.showUI=this.showUI.bind(this),this.hideUI=this.hideUI.bind(this),this.dispose=this.dispose.bind(this),this.setSource=this.setSource.bind(this),this.getCastSession=this.getCastSession.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.getCastSession();t&&(this.textTracks().on("change",this.onTextTrackChanged),this.videojsPlayer.one("ended",(function(){t.dispose()})),t.on("durationchange",(function(){e.trigger("durationchange")})),t.on("dispose",(function(){e.trigger("ended"),e.hideUI()})),t.on("playingchange",(function(){t.isPlaying()?(e.trigger("play"),e.trigger("playing")):e.trigger("pause")})),t.on("volumechange",(function(){e.trigger("volumechange")})),t.on("sourceloaded",(function(){e.trigger("loadeddata")})),t.on("subtitleschange",(function(){e.setSelectedTextTrack(t.getSubtitles())})))}},{key:"onTextTrackChanged",value:function(){var e,t=this.getSelectedTextTrack();null===(e=this.getCastSession())||void 0===e||e.setSubtitles(null==t?void 0:t.src)}},{key:"getSelectedTextTrack",value:function(){return ht.O.findTrackByPredicate(this.videojsPlayer.player_,(function(e){return"showing"===e.mode&&!!e.src}))}},{key:"setSelectedTextTrack",value:function(e){ht.O.forEachTrack(this.videojsPlayer.player_,(function(t){t.src===e?t.mode="showing":t.mode="hidden"}))}},{key:"showUI",value:function(e){this.ui&&(this.ui.setPoster(this.options_.poster),this.ui.setDevice(e),this.ui.show())}},{key:"hideUI",value:function(){var e;null===(e=this.ui)||void 0===e||e.hide()}},{key:"dispose",value:function(){this.textTracks().off("change",this.onTextTrackChanged);var e=this.getCastSession();e&&e.dispose(),Pt(St(u.prototype),"cleanupAutoTextTracks",this).call(this),Pt(St(u.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){var e=this;return this.ui=this.ui||new gt({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 Pt(St(u.prototype),"addRemoteTextTrack",this).call(this,e,!0)}},{key:"getCastSession",value:function(){var e;return $e.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:0}},{key:"volume",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getVolume())&&void 0!==t?t:1}},{key:"setVolume",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.setVolume(e)}},{key:"muted",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getMuted())&&void 0!==t&&t}},{key:"setMuted",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.setMuted(e)}},{key:"buffered",value:function(){}},{key:"seekable",value:function(){return o.Z.createTimeRanges(0,this.duration())}},{key:"playbackRate",value:function(){return 1}},{key:"readyState",value:function(){return 4}},{key:"controls",value:function(){return!1}},{key:"playsinline",value:function(){return!0}},{key:"supportsFullScreen",value:function(){return!0}},{key:"setAutoplay",value:function(){}},{key:"preload",value:function(){}},{key:"load",value:function(){}},{key:"setPlaybackRate",value:function(){}}])&&wt(t.prototype,n),r&&wt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.Z.getComponent("Tech"));function jt(e){return jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jt(e)}function Et(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==jt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==jt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===jt(i)?i:String(i)),r)}var i}function Ct(){return Ct="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=xt(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}},Ct.apply(this,arguments)}function Tt(e,t){return Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tt(e,t)}function xt(e){return xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xt(e)}o.Z.registerTech("devices",kt);var _t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=xt(r);if(i){var n=xt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===jt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n,r,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,n.instanceId=null!==(i=null===(r=n.player.options_.devices)||void 0===r?void 0:r.instanceId)&&void 0!==i?i:"",n.bindFunctions(),n.initialize(),n}return t=a,(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.onReady=this.onReady.bind(this),this.onDevicesChanged=this.onDevicesChanged.bind(this),this.onCastSessionChanged=this.onCastSessionChanged.bind(this),this.onDevicesError=this.onDevicesError.bind(this),this.reloadTech=this.reloadTech.bind(this),this.getSessionManager=this.getSessionManager.bind(this),this.dispose=this.dispose.bind(this)}},{key:"initialize",value:function(){this.player.ready(this.onReady)}},{key:"onReady",value:function(){var e=this,t=this.player.getChild("collapserator"),n=null==t?void 0:t.children().findIndex((function(e){return"CustomControlSpacer"===e.name()})),r=this.getSessionManager();if(t&&n&&-1!==n&&r){r.on("deviceschange",this.onDevicesChanged),r.on("castsessionchange",this.onCastSessionChanged),r.on("error",this.onDevicesError);var i={onClick:function(){if(e.options.viviApi&&e.options.fetchViviAccessToken&&!r.hasInstanceOfClient(Ue)){var t=new Ue({url:e.options.viviApi,fetchAccessToken:e.options.fetchViviAccessToken});r.addClient(t)}},onDeviceMenuItemClick:function(t,n){r.startCastSession({device:n,title:e.options.title})}};this.devicesButton=t.addChild("DevicesButton",i,n+1)}}},{key:"onDevicesChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setDevices(e)}},{key:"onCastSessionChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setCastSession(e),this.reloadTech(),e?(this.player.addClass("cv-device-casting"),this.player.isFullscreen()&&this.player.exitFullscreen()):this.player.removeClass("cv-device-casting")}},{key:"onDevicesError",value:function(e){this.player.error(e.message),this.player.pause()}},{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 $e.getOrCreateInstance(this.instanceId)}},{key:"dispose",value:function(){var e=this.getSessionManager();e&&(e.off("deviceschange",this.onDevicesChanged),e.off("castsessionchange",this.onCastSessionChanged),e.off("error",this.onDevicesError),$e.disposeAndRemoveInstance(e),Ct(xt(a.prototype),"dispose",this).call(this))}}])&&Et(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));function It(e){return It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},It(e)}function Rt(){Rt=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:E(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function b(){}function g(){}function m(){}var w={};c(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(I([])));O&&O!==n&&r.call(O,a)&&(w=O);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==It(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function E(t,n,r){var i=h;return function(o,a){if(i===y)throw new Error("Generator is already running");if(i===d){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?d:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=d,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(It(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=c(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),c(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==It(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==It(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===It(i)?i:String(i)),r)}var i}function Dt(){return Dt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Dt.apply(this,arguments)}function Nt(e,t){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nt(e,t)}function Bt(e){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bt(e)}o.Z.registerPlugin("devicesPlugin",_t);var Ft=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Bt(r);if(i){var n=Bt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===It(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e,t)}return t=a,(n=[{key:"getPlayerOptions",value:function(){var e,t=Dt(Bt(a.prototype),"getPlayerOptions",this).call(this);return t.enableDevices?Object.assign(Object.assign({},t),{techOrder:["devices"].concat((e=t.techOrder,function(e){if(Array.isArray(e))return Mt(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 Mt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),devices:{instanceId:ee()}}):t}},{key:"configurePlugins",value:function(){var e;try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),(null===(e=this.options.pointsOfInterest)||void 0===e?void 0:e.length)&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(e){console.log("failed to register plugins",e)}}},{key:"setNextVideo",value:function(e,t,n){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(e,t,n)}},{key:"enablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"additionalSetup",value:function(e){var t,n,r,i,o=this,s=Object.create(null,{additionalSetup:{get:function(){return Dt(Bt(a.prototype),"additionalSetup",o)}}});return t=this,n=void 0,r=void 0,i=Rt().mark((function t(){var n;return Rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s.additionalSetup.call(this,e),this.options.showResources&&e.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:e.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==e.mediaType){t.next=7;break}if(null!==(n=e.additionalData)){t.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime});case 7:this.options.enableDevices&&this.player.devicesPlugin({viviApi:this.options.viviApi,fetchViviAccessToken:this.options.fetchViviAccessToken,title:e.title});case 8:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(e,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}u((i=i.apply(t,n||[])).next())}))}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}}])&&Lt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(i.r),Vt=n(63816),At=n(14735);function Ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zt(e){var t,n,i,o=r.useRef(e.player.duration()-e.player.currentTime()),a=(n=r.useState(o.current),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(n,i)||function(e,t){if(e){if("string"==typeof e)return Ut(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ut(e,t):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],u=a[1];function c(){var t=e.player.duration()-e.player.currentTime();u(t),t>o.current&&(o.current=t)}if(r.useEffect((function(){return e.player.on("timeupdate",c),function(){e.player.off("timeupdate",c)}}),[]),!e.nextVideo||!e.onPlayNext)return r.createElement(r.Fragment,null);var l=Math.ceil(s),f=1===l?"second":"seconds";return r.createElement(r.Fragment,null,r.createElement("div",{className:"cv-up-next-container"},r.createElement("div",{className:"cv-cancel-up-next cursor-pointer",role:"button",onClick:e.onCancel},"×"),r.createElement("div",{className:"cv-up-next-heading"},"Up next in ",l," ",f,":"),r.createElement("div",{className:"cv-up-next-image cursor-pointer",onClick:e.onPlayNext,style:{backgroundImage:"url(".concat(null===(t=e.nextVideo)||void 0===t?void 0:t.thumbnailUrl,")")}}),r.createElement("div",{className:"cv-up-next-title"},e.nextVideo.name)))}function zt(e){return zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zt(e)}function Gt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==zt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==zt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===zt(i)?i:String(i)),r)}var i}function qt(){return qt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Wt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},qt.apply(this,arguments)}function Ht(e,t){return Ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ht(e,t)}function Wt(e){return Wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wt(e)}o.Z.registerComponent("UpNext",(0,At.Z)((function(e,t){return r.createElement(Zt,Object.assign({player:e},t))})));var Yt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ht(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Wt(r);if(i){var n=Wt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===zt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).playNext=e.nextVideoPlugin().getShouldPlayNext(),n.toggle(n.playNext),n}return t=s,(n=[{key:"handleToggle",value:function(){this.toggle(!this.playNext)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){this.playNext=!0,o.Z.dom.addClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"toggleOff",value:function(){this.playNext=!1,o.Z.dom.removeClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=o.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=qt(Wt(s.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Play next video</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&Gt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuItem"));function $t(e){return $t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$t(e)}function Qt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==$t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==$t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===$t(i)?i:String(i)),r)}var i}function Jt(){return Jt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=en(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Jt.apply(this,arguments)}function Xt(e,t){return Xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xt(e,t)}function Kt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function en(e){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},en(e)}o.Z.registerComponent("NextVideoMenuItem",Yt);var tn="cv-persisttest",nn="cv-play-next-video",rn=o.Z.getPlugin("plugin"),on=(o.Z.getComponent("MenuItem"),o.Z.getComponent("NextVideoMenuItem")),an=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=en(r);if(i){var n=en(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===$t(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Kt(e)}(this,e)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).setShouldPlayNext=t.setShouldPlayNext.bind(Kt(t)),t.getShouldPlayNext=t.getShouldPlayNext.bind(Kt(t)),t.getChapterTrack=t.getChapterTrack.bind(Kt(t)),t.onTimeUpdate=t.onTimeUpdate.bind(Kt(t)),t.hasLocalStorage=t.testHasLocalStorage(),t.shouldPlayNextVideo=!1,t.hasLocalStorage){var n=window.localStorage.getItem(nn);t.shouldPlayNextVideo="true"===n}return e.ready((function(){t.initialize()})),t}return t=a,(n=[{key:"initialize",value:function(){this.player.isDisposed()||this.bindListeners()}},{key:"getChapterTrack",value:function(){return ht.O.getTrack(this.player,"chapters",null)}},{key:"setNextVideo",value:function(e,t,n){var r;this.nextVideo=e,this.callback=n,t&&this.setShouldPlayNext(!0),(null===(r=this.player.getChild("collapserator"))||void 0===r?void 0:r.getChild("cogButton")).addItem({index:0,ctor:on,name:"NextVideoMenuItem"})}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.hasLocalStorage&&t&&window.localStorage.setItem(nn,e.toString())}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.hideUpNext(),Jt(en(a.prototype),"dispose",this).call(this)}},{key:"onTimeUpdate",value:function(){var e,t;if(!this.player.pictureInPicture||!this.player.isInPictureInPicture())if(this.getShouldPlayNext()){if(this.player.ended())return this.callback(),void this.hideUpNext();if(!(this.player.duration()<=0||this.upNextRendered&&this.player.currentTime()>this.upNextTimepoint)){var n=this.getChapterTrack(),r=(null===(e=null==n?void 0:n.activeCues)||void 0===e?void 0:e.length)&&n.activeCues[0];"credits"===(null===(t=null==r?void 0:r.text)||void 0===t?void 0:t.toLowerCase())||this.player.currentTime()>=this.player.duration()-5?this.showUpNext():this.hideUpNext()}}else this.hideUpNext()}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.upNextTimepoint=this.player.currentTime(),this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){e.hideUpNext(),e.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1,this.upNextTimepoint=null;var e=this.player.getChild("UpNext");e&&(this.player.removeChild(e),e.dispose())}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem(tn,"persistPlayNext"),window.localStorage.removeItem(tn),!0}catch(e){return!1}}}])&&Qt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(rn);o.Z.registerPlugin("nextVideoPlugin",an);var sn=n(26733);function un(e){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(e)}function cn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==un(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==un(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===un(i)?i:String(i)),r)}var i}function ln(e,t){return ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ln(e,t)}function fn(e){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fn(e)}function hn(e){return r.createElement("div",{className:"cv-resource-item"},r.createElement(sn.s,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var pn=(0,At.Z)((function(e,t){return r.createElement(hn,Object.assign({},t))})),yn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ln(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=fn(r);if(i){var n=fn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===un(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),n=a.call(this,e,t);var r=new pn(e,{resource:t.resource,imageCdnUrl:t.imageCdnUrl});return n.addChild(r),n}return t=s,(n=[{key:"createEl",value:function(){return o.Z.dom.createEl("div")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&cn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("ClickableComponent"));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 vn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==dn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==dn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===dn(i)?i:String(i)),r)}var i}function bn(){return bn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=mn(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},bn.apply(this,arguments)}function gn(e,t){return gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gn(e,t)}function mn(e){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mn(e)}var wn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gn(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=mn(r);if(i){var n=mn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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)}(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=s,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(bn(mn(s.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(bn(mn(s.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){bn(mn(s.prototype),"update",this).call(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",bn(mn(s.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new yn(e.player(),{resource:n,imageCdnUrl:e.options_.imageCdnUrl,downloadResource:function(t){return e.downloadResource(t)}});t.push(r)})),t}},{key:"downloadResource",value:function(e){this.getDownloadIframe().src=e.url}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=o.Z.dom.createEl("iframe"),this.downloadIframe.style.display="none",o.Z.dom.appendContent(o.Z.dom.$("body"),this.downloadIframe)),this.downloadIframe}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){bn(mn(s.prototype),"handleClick",this).call(this,null)}}])&&vn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuButton"));function Pn(e){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(e)}function On(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==Pn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Pn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Pn(i)?i:String(i)),r)}var i}function Sn(e,t){return Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sn(e,t)}function kn(e){return kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kn(e)}wn.prototype.controlText_="Resources",o.Z.registerComponent("ResourcesButton",wn);var jn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sn(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=kn(r);if(i){var n=kn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Pn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=a,(n=[{key:"onReady",value:function(){if(this.options.resources.length){var e=this.player.getChild("collapserator");e.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},e.children_.length-3)}}}])&&On(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("resourcesPlugin",jn);var En=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 Cn(e){var t=e.className,n=void 0===t?"":t,i=e.playerApi,o=e.onReady,a=e.onDispose,s=En(e,["className","playerApi","onReady","onDispose"]),u=r.useRef();return r.useEffect((function(){if(u){var e=new Ft(u.current,Object.assign(Object.assign({},s),{playerApi:i}));return o&&e.ready((function(){o((0,Vt.G)(e))})),a&&e.one("dispose",a),function(){null==e||e.dispose()}}}),[e.viewKey]),r.createElement("div",{ref:u,className:n})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3966],{33966:(t,e,n)=>{n.r(e),n.d(e,{BrazeAnalyticsClient:()=>d});var i=n(63093),o=n(71365),r=n(49985),l=n(41268),a=n(65858),u=n(97291),c=n(57322);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function v(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==s(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===s(o)?o:String(o)),i)}var o}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(E,t);var e,n,l,d,h=(l=E,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=p(l);if(d){var n=p(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}(this,t)});function E(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,E),(t=h.call(this)).client=o.u.getInstance(c.K.BrazeClient,f(t)),t}return e=E,(n=[{key:"name",get:function(){return"BrazeAnalyticsClient"}},{key:"shouldLog",value:function(t){return!(!t||!(this.isStreamEvent(t)||this.isExporeTopicsEvent(t)||this.isSearchClickThrough(t)||this.isBookACallEvent(t)||this.isShareEvent(t)||this.isResourceDownloadEvent(t)||this.isInviteEvent(t)||this.isPageViewEvent(t)))}},{key:"log",value:function(t){var e;if(this.client){var n=t.data;this.isPageViewEvent(t)?this.client.logEvent({type:i.PageEvent.PageView}):this.isStreamEvent(t)?this.client.logEvent({type:i.ProductEvent.Stream,data:{id:null==n?void 0:n.id,entity:t.actionContext.entity,name:null==n?void 0:n.name}}):this.isExporeTopicsEvent(t)?this.client.logEvent({type:i.ProductEvent.ExploreTopics,data:{id:null==n?void 0:n.id,name:null==n?void 0:n.name}}):this.isSearchClickThrough(t)?this.client.logEvent({type:i.ProductEvent.SearchClickthrough,data:{query:null===(e=null==n?void 0:n.search)||void 0===e?void 0:e.query}}):this.isBookACallEvent(t)?this.client.logEvent({type:i.ProductEvent.ClickBookACall}):this.isShareEvent(t)?this.client.logEvent({type:i.ProductEvent.Share,data:{id:null==n?void 0:n.id,entity:t.actionContext.entity,name:null==n?void 0:n.name}}):this.isResourceDownloadEvent(t)?this.client.logEvent({type:i.ProductEvent.DownloadResource,data:{id:null==n?void 0:n.id,name:null==n?void 0:n.name,video_name:null==n?void 0:n.videoName}}):this.isInviteEvent(t)&&this.client.logEvent({type:i.ProductEvent.Invite,data:{user_count:null==n?void 0:n.emailCount}})}}},{key:"isPageViewEvent",value:function(t){var e;return t.type===a.Vw.PageView&&!(null===(e=t.data)||void 0===e?void 0:e.isError)}},{key:"isStreamEvent",value:function(t){return t.type===a.Vw.Stream}},{key:"isBookACallEvent",value:function(t){return t.type===a.Vw.Click&&t.actionContext.entity===a.py.Url&&t.actionContext.descriptor===a.HS.BookACall}},{key:"isExporeTopicsEvent",value:function(t){return t.type===a.Vw.Click&&t.actionContext.entity===a.py.Classification}},{key:"isSearchClickThrough",value:function(t){var e;return t.type===a.Vw.Click&&t.actionContext.productArea===(0,r.c)(u.O.SEARCH)&&!Array.isArray(t.data)&&!!(null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.search)}},{key:"isShareEvent",value:function(t){return t.type===a.Vw.Share&&t.actionContext.workflowPhase!==a.eu.Start}},{key:"isResourceDownloadEvent",value:function(t){return t.type===a.Vw.Download&&t.actionContext.entity===a.py.Resource}},{key:"isInviteEvent",value:function(t){return t.type===a.Vw.SendEmail&&t.actionContext.descriptor===a.Yu.InviteColleague}},{key:"isType",value:function(t){return t===E.type}}])&&v(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),E}(l.z);d.type="BrazeAnalyticsClient"}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4145],{54644:(e,t,n)=>{n.d(t,{v:()=>r});var a=n(97395),r={getContentUpdates:function(e,t,n){return{url:a._.urlBuilder("/api/domain/v1/subjects/content-updates",{from:t,to:n,limit:6,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/subjects/presentations/".concat(e,"/content-updates"),{from:t,to:n,limit:6,query:"(videoCollection)"}),key:"content:updates",normalizeOptions:{namespace:"contentupdates"},formatData:function(e){return e.map((function(e){return{id:e.classificationId,videos:e.videos}}))}}},getClassifications:function(e){return{url:a._.urlBuilder("/api/domain/v1/subjects",{id:e,query:"banner"}),publicUrl:a._.urlBuilder("/api/subjects/classifications",{id:e,query:"banner"}),key:"classifications:".concat(e.join(","))}},getClassification:function(e){return{url:"/api/domain/v1/subjects/".concat(e,"?query=banner"),publicUrl:"/api/subjects/classifications/".concat(e,"?query=banner"),key:"classification:".concat(e)}},getClassificationUpdates:function(e,t,n){return{url:a._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/content-updates"),{from:t,to:n,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/subjects/classifications/".concat(e,"/content-updates"),{from:t,to:n,query:"(videoCollection)"}),key:"classification:update:".concat(e,":").concat(t,":").concat(n)}},getContentUpdateVideos:function(e,t){return{url:a._.urlBuilder("/api/domain/v1/subjects/content-updates/videos",{from:e,to:t,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/subjects/content-updates/videos",{from:e,to:t,query:"(videoCollection)"}),key:"content:update:videos:".concat(e,":").concat(t)}},videos:function(e,t){return{url:"/api/domain/v1/videos?ids=".concat(e.join(","),"&with=(videoCollection)"),key:"videos:by:id:".concat(e.join(",")),success:t}}}},3278:(e,t,n)=>{n.d(t,{z:()=>p});var a=n(32735),r=n(39202),i=n(23481),o=n(65858),l=n(38502),c=n(83345),s=n(98758);const u={pillTab:"bMJM0"};var d="discover.header";function p(e){var t,n,p,f,m,v;if(!e.type)return a.createElement(a.Fragment,null);if(e.type===s.Yv.Learner||e.hasStudentExperience)return a.createElement("div",{className:"py-3"},a.createElement("h1",{className:"h2 mb-0"},a.createElement(c.x,{namespace:d,phrase:"heading"})));var y=[{name:i.T.getPhrase(d,"forYou"),appLink:null===(t=e.appLinks)||void 0===t?void 0:t.forYou,active:"forYou"===e.active,analyticsData:{name:i.T.getPhrase(d,"forYou"),url:r.C$.getHref(null===(n=e.appLinks)||void 0===n?void 0:n.forYou)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}},{name:i.T.getPhrase(d,"whatsNew"),appLink:null===(p=e.appLinks)||void 0===p?void 0:p.whatsNew,active:"whatsNew"===e.active,analyticsData:{name:i.T.getPhrase(d,"whatsNew"),url:r.C$.getHref(null===(f=e.appLinks)||void 0===f?void 0:f.whatsNew)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}}];return e.showCalendar&&y.push({name:i.T.getPhrase(d,"calendar"),appLink:null===(m=e.appLinks)||void 0===m?void 0:m.calendar,active:"calendar"===e.active,analyticsData:{name:i.T.getPhrase(d,"calendar"),url:r.C$.getHref(null===(v=e.appLinks)||void 0===v?void 0:v.calendar)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}}),a.createElement("div",{className:"py-3 text-center"},a.createElement(l.r,{tabs:y,className:u.pillTab}))}},38502:(e,t,n)=>{n.d(t,{r:()=>s});var a=n(32735),r=n(49985),i=n(36848),o=n(76246),l=n(11607),c=n(87432);function s(e){var t;return a.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},a.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(c.Z.pillTabSelector)},e.tabs.map((function(e){return a.createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?a.createElement(i.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"cursor-pointer d-flex justify-content-center text-decoration-none text-reset px-2 ".concat(c.Z.pillItem)},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(o.C,{type:o.g.Count,data:e.count}))):a.createElement(l.L,{className:"".concat(c.Z.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&r.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(o.C,{type:o.g.Count,data:e.count}))))}))))}},74696:(e,t,n)=>{n.d(t,{S:()=>s});var a=n(32735),r=n(68050),i=n(69111),o=n(9977),l=n(79967);const c={partialName:"SicQQ",partialDescription:"dPGMq",partialThumbnail:"vZrnb",partialDragHandle:"iq73R"};function s(e){return a.createElement(a.Fragment,null,Array(e.numVideos).fill(null).map((function(t,n){return a.createElement(u,Object.assign({key:n},e))})))}function u(e){var t=(0,l.k)(),n="sm"===o.O.getSize(t,"md"),s=e.withReordering&&!t.xs;return a.createElement(r.Z,{className:"".concat(n?"":"py-2")},a.createElement(i.Z,Object.assign({},o.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(n?"pb-2 pe-2":"mb-1 px-2")}),a.createElement(r.Z,null,!!s&&a.createElement("div",{className:"d-flex align-items-center justify-content-center col-2"},a.createElement("div",{className:"partial-loading-background ".concat(c.partialDragHandle)})),a.createElement(i.Z,{xs:o.O.getThumbnailColSize(s)},a.createElement("div",{className:"partial-loading-background ".concat(n?"rounded":"rounded-3"," ").concat(c.partialThumbnail)})))),a.createElement(i.Z,Object.assign({},o.O.getDetailsColumns(),{className:n?"pb-2":"px-2"}),a.createElement("div",{className:"partial-loading-background mb-1 ".concat(c.partialName)}),a.createElement("div",{className:"partial-loading-background ".concat(c.partialDescription)})))}s.defaultProps={numVideos:15}},39902:(e,t,n)=>{n.d(t,{f:()=>c});var a=n(32735),r=n(70680),i=n(20354);function o(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function c(e,t){var n,c,s=(n=a.useState([]),c=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(n,c)||o(n,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],d=s[1];a.useEffect((function(){if(null==e?void 0:e.length){var t=function(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(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.")}()}(u);t.push([]),e.forEach((function(e){t.find((function(t){return t.find((function(t){return t===e}))}))||t[t.length-1].push(e)})),d(t.filter((function(e){return e.length})))}}),[e?e.join(","):null]);var p=(0,r.I0)(),f=(0,r.v9)((function(e){return e}));if(a.useEffect((function(){u.forEach((function(e){var n=t(e);i.a.getResponse(f,n.key).shouldFetch&&i.a.fetch(p,n)}))}),[null==u?void 0:u.length]),!(null==u?void 0:u.length))return{items:null,isFetching:!1};var m={},v={};return u.forEach((function(e,n){var a=t(e),r=i.a.getResponse(f,a.key);v[n]=r,r.data&&r.data.forEach((function(e){return m[e.id]=e}))})),{items:Object.keys(v).some((function(e){return!!v[e].data}))?m:null,isFetching:!!Object.keys(v).some((function(e){return v[e].isFetching}))}}},74590:(e,t,n)=>{n.d(t,{N:()=>p});var a=n(32735),r=n(35242),i=n(55171),o=n(25925),l=n(37802),c=n(86698);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var d=[i.e.PresentationIds.US_ELEMENTARY,i.e.PresentationIds.SCOTLAND_PRIMARY,i.e.PresentationIds.ENGLAND_PRIMARY,i.e.PresentationIds.AU_PRIMARY];function p(e){var t=(0,l.r)(null),n=t.hasSpecialEventCalendar,i=t.isLoadingSettings,u=(0,c.y)(o.R.Subject,null,e,!0).presentation,p=!i&&!n,f=(null==u?void 0:u.id)&&!d.includes(+u.id),m=s(a.useState(!p&&!f),2),v=m[0],y=m[1],b=s(a.useState(i||!(null==u?void 0:u.id)),2),h=b[0],g=b[1];return a.useEffect((function(){p||f?y(!1):h||y(!0),g(i||!(null==u?void 0:u.id))}),[n,null==u?void 0:u.id,h]),r.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:v,isLoading:h}}},37808:(e,t,n)=>{n.d(t,{aq:()=>v,YW:()=>b});var a=n(32735),r=n(36848),i=n(83345),o=n(80247),l=n(57900),c=n(2948),s=n(10874),u=n(38143),d=n(35223);const p={banner:"B7jhq"};function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var m="contentUpdates.classificationBanner";function v(e){var t,n,v=e.classification,y=e.backgroundUrl,b=e.followed,h=e.follow,g=e.showFollowSpinner,w=(t=(0,c.D)(u.g.AUDIENCE_FILTER,void 0,{storage:l.Z1.SessionStorage}),n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return a.createElement("div",{className:"banner mb-2 d-flex justify-content-between align-items-center rounded ".concat(p.banner),style:{backgroundImage:"url('".concat(y,"')")}},a.createElement(r.F,{className:"text-white text-shadow",appLink:e.getClassificationAppLink(v,w)},a.createElement("h2",{className:"h3 mb-0"},v.name)),e.canFollow&&a.createElement(s.h,{className:"btn follow-btn ".concat(b?"btn-outline-dark":"btn-dark"),svgName:b?d.vn.Check:d.vn.Bell,onClick:function(){return h(v.id,v.name,!b)}},g?a.createElement(o.Z,{as:"span",animation:"border",role:"status",size:"sm"}):a.createElement(i.x,{namespace:m,phrase:b?"unfollow":"follow"})))}var y="playlists.liteClassificationUpdateBreadcrumbs";function b(e){var t=e.classification;return a.createElement(a.Fragment,null,a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb p-0 mb-0"},a.createElement("li",{className:"breadcrumb-item"},a.createElement(r.F,{appLink:e.dashboardAppLink},a.createElement(i.x,{namespace:y,phrase:"dashboard"}))),a.createElement("li",{className:"breadcrumb-item"},a.createElement(r.F,{appLink:e.contentUpdatesAppLink},a.createElement(i.x,{namespace:y,phrase:"whatsNew"}))),a.createElement("li",{className:"breadcrumb-item active","aria-current":"page"},t.name))))}},80004:(e,t,n)=>{n.r(t),n.d(t,{ContentUpdatesView:()=>K});var a=n(32735),r=n(70680),i=n(53806),o=n(23481),l=n(20354),c=n(49985),s=n(65858),u=n(54644),d=n(3278),p=n(36848),f=n(83345),m=n(51365),v=n(16714),y=n(25925),b=n(39151),h=n(1666),g=n(61699),w=n(31949),E=n(69883),k=n(39902),S=n(97037),C=n(22902),N=n(79612),j=n(98758),A=n(14070),L=n(97291),O=n(65986),T=n(41063),F=n(86698),U=n(44110),I=n(97816),x=n(56017),P=n(33192),D=n(74590),M=n(4632),B=n(54610),Y=n(67453),_=n(37808),R="contentUpdates.contentUpdatesView";function V(e){var t=e.classification,n=e.videos,r=e.imageCdnUrl,i=e.showMore,o=e.followed;if(!t)return a.createElement(a.Fragment,null);var l=Y.j.createBannerUrl(t.banner,{fallbackBaseUrl:r,fallbackCategoryName:t.name,type:B.__.Banners},{size:B.h2.Medium,resizeType:B.Nq.Cover});return a.createElement("div",{className:"mb-3"},a.createElement(_.aq,{classification:t,backgroundUrl:l,getClassificationAppLink:e.appLinks.getClassificationAppLink,followed:o,follow:e.follow,canFollow:e.canFollow,showFollowSpinner:e.showFollowSpinner}),a.createElement(M.E4,{videos:n,yearGroups:e.yearGroups,getVideoAppLink:e.appLinks.getVideoAppLink,getSeriesAppLink:e.appLinks.getSeriesAppLink,setFavourite:e.setFavourite,canFavourite:e.canFavourite,presentationAudiences:e.audiences}),i&&a.createElement("div",{className:"show-more"},a.createElement(p.F,{className:"info-link",appLink:e.appLinks.getClassificationUpdateAppLink(t)},a.createElement(f.x,{namespace:R,phrase:"showMore",options:{classificationName:t.name}}))))}var Z=n(74696);const q={partialBanner:"bxaA6"};function H(){return a.createElement(a.Fragment,null,Array(4).fill(null).map((function(e,t){return a.createElement("div",{key:t,className:"mb-3"},a.createElement("div",{className:"partial-loading-background mb-2 ".concat(q.partialBanner)}),a.createElement(Z.S,null),";")})))}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 G(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==z(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==z(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===z(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var W=5,J="contentUpdates.contentUpdatesView",Q=o.T.encloseNamespace(J);function K(e){var t,n,o,M,B,Y,_,R=(Y=a.useState({}),_=2,function(e){if(Array.isArray(e))return e}(Y)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(Y,_)||function(e,t){if(e){if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$(e,t):void 0}}(Y,_)||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.")}()),Z=R[0],q=R[1],z=(0,r.I0)(),K=(0,E.Z)(),X=(0,C.T)().hasPermissions,ee=X(v.C.FollowSubjects),te=i().subtract(1,"year").endOf("day").format("YYYY-MM-DD"),ne=i().endOf("day").format("YYYY-MM-DD"),ae=l.a.useBasicFetch(b.L.config()),re=l.a.useBasicFetch(w.N.currentUser()),ie=l.a.useBasicFetch((null===(t=re.data)||void 0===t?void 0:t.isAuthenticated)&&h.h.yearGroups(re.data.customerId)),oe=(0,F.y)(y.R.Subject,null,e.presentationSlug,!0).presentation;(0,N.M)(x.C.getDefaultMetadata({title:null==oe?void 0:oe.name,phraseContext:{phraseHandler:Q,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:P.f.getCanonicalLink(),allowIndexing:P.f.allowIndexing(),hrefLang:P.f.getStaticRouteHrefLang(null==oe?void 0:oe.learningLevel,(function(){return{application:L.O.CONTENT_UPDATES,action:A.e.ContentUpdates.CONTENT_UPDATES}}))}));var le=u.v.getContentUpdates(null==oe?void 0:oe.id,te,ne),ce=l.a.useBasicFetch(oe&&le),se=l.a.useBasicFetch(ee&&g.o.mySubjectPreferences()),ue=(0,U.i)(e.presentationSlug),de=[],pe=[];ce.data&&ce.data.forEach((function(e){de.push(e.id),pe=pe.concat(e.videos)}));var fe=(0,k.f)(de,(function(e){return u.v.getClassifications(e)})).items,me=(0,O._)(O.i.VideoItem);(0,I.V)(pe,{hasCurriculumLinks:!0,flightNamespace:null===(n=le.normalizeOptions)||void 0===n?void 0:n.namespace});var ve=(0,S.c)(s.LZ.VideoThumbnail,null===(o=le.normalizeOptions)||void 0===o?void 0:o.namespace),ye=ve.setFavourite,be=ve.canFavourite;function he(e,t,n){q((function(t){return Object.assign(Object.assign({},t),G({},e,!0))}));var a=function(){var a;q((function(t){return Object.assign(Object.assign({},t),G({},e,!1))})),c.k.logUserAction({id:e,name:t},{location:s.LZ.ContentUpdatesClassificationBanner,workflowPhase:s.eu.Complete,descriptor:n?s.DL.On:s.DL.Off,actionType:s.Vw.Follow,entity:s.py.Classification}),K.success(Q(n?"followed":"unfollowed",{classification:null===(a=fe[e])||void 0===a?void 0:a.name,escapeText:!0}))},r=function(){q((function(t){return Object.assign(Object.assign({},t),G({},e,!1))})),K.error(Q("error"))},i=n?g.o.followSubjects([e],a,r):g.o.unfollowSubjects([e],a,r);l.a.fetch(z,i)}var ge=(0,D.N)(e.presentationSlug),we=ge.showCalendar,Ee=ge.isLoading,ke=!(!(ce.hasCompleted&&ae.hasCompleted&&ue.hasCompleted)||ee&&!se.hasCompleted||!fe||Ee),Se=function(e,t){return e&&t?e.map((function(e){return{showMore:e.videos.length>W,classification:t[e.id],videos:e.videos.slice(0,W).map((function(e){return e.classification=t[e.id],e})).filter((function(e){return e}))}})).filter((function(e){return e.classification})):null}(ce.data,fe),Ce=null!==(B=null===(M=se.data)||void 0===M?void 0:M.map((function(e){return e.id})))&&void 0!==B?B:[],Ne=X(v.C.ManageSubjectPreferences),je=(0,T.b)();return a.createElement(m.M.Provider,{value:me},a.createElement("div",{className:"bg-white px-3"},!Ee&&a.createElement(d.z,{type:j.Yv.Staff,appLinks:{forYou:e.appLinks.dashboardAppLink,whatsNew:e.appLinks.whatsNewAppLink,calendar:e.appLinks.calendarAppLink},showCalendar:we,active:"whatsNew"}),a.createElement("h1",null,a.createElement(f.x,{namespace:J,phrase:"heading"})),(Ne||je)&&a.createElement("p",null,Ne&&a.createElement(a.Fragment,null,a.createElement(f.x,{namespace:J,phrase:"onlyRelevant"})," ",a.createElement(p.F,{className:"info-link",appLink:{application:L.O.SETTINGS,action:A.e.Settings.TOPIC_PREFERENCES}},a.createElement(f.x,{namespace:J,phrase:"updatePreferences"}))),je&&a.createElement("span",{className:"d-block"},a.createElement(p.F,{className:"info-link",appLink:{application:L.O.SETTINGS,action:A.e.Settings.CONTENT_REVIEW}},a.createElement(f.x,{namespace:J,phrase:"contentReview"})))),ke?a.createElement(a.Fragment,null,Se.map((function(t,n){var r,i;return a.createElement(V,{key:n,classification:t.classification,videos:t.videos,yearGroups:ie.data,imageCdnUrl:ae.data.imageCdnUrl,showMore:t.showMore,appLinks:e.appLinks,followed:Ce.includes(null===(r=t.classification)||void 0===r?void 0:r.id),follow:he,showFollowSpinner:Z[null===(i=t.classification)||void 0===i?void 0:i.id],canFollow:ee,setFavourite:ye,canFavourite:be,audiences:ue.data})}))):a.createElement(H,null)))}},87821:(e,t,n)=>{n.d(t,{p:()=>r});var a=n(53806),r={userVideoHistory:function(e,t,n,r){var i="video:history",o="{gateway}/v1/users/me/watch-history";return e&&(i+=":".concat(e),o+="?cursor=".concat(e)),{key:i,url:o,formatData:function(e){return{data:e.data.map((function(e){var t=a.utc(e.lastTimeWatched).local().format(),n=a(t).format("YYYY-MM-DD");return Object.assign(Object.assign({},e),{lastTimeWatched:t,lastDateWatched:n})})),pagination:e.pagination}},success:t,error:n,always:r}},videoHistory:function(e,t,n,a,r){var i=e.sort().map((function(e){return"videoId=".concat(e)}));return{key:"video:history:videos:".concat(i.join("&")),url:"{gateway}/v1/videos/history?".concat(i.join("&")),normalizeOptions:{namespace:t},formatData:function(e){return(null==e?void 0:e.length)?e.map((function(e){return{id:e.videoId,lastProgressPoint:e.lastProgressPoint}})):e},success:n,error:a,always:r}}}},41063:(e,t,n)=>{n.d(t,{b:()=>o});var a=n(16714),r=n(22902),i=n(37802);function o(){var e=(0,r.T)().hasPermissions;return(0,i.r)(null).manageVideoAccess&&e(a.C.ManageVideoAccess)}},44110:(e,t,n)=>{n.d(t,{i:()=>l});var a=n(20354),r=n(25925),i=n(89454),o=n(86698),l=function(e){var t=(0,o.y)(r.R.Subject,null,e,!!e).presentation;return a.a.useBasicFetch(!!t&&i.O.presentationAudiences(t.id))}},97816:(e,t,n)=>{n.d(t,{V:()=>f});var a=n(32735),r=n(20354),i=n(21750),o=n(63419),l=n(31949),c=n(1575),s=n(87821);function u(e){return function(e){if(Array.isArray(e))return d(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 d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(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 d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var p={ratings:!1,favourites:!1,watchHistory:!1,hasCurriculumLinks:!1};function f(e){var t,n,d,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=Object.assign(Object.assign({},p),f),v=m.ratings,y=m.favourites,b=m.watchHistory,h=m.hasCurriculumLinks,g=r.a.useBasicFetch(l.N.currentUser()),w=e&&(Array.isArray(e)?e.filter(Boolean).map((function(e){return e.id})):e.data.filter(Boolean).map((function(e){return e.id}))),E=g.data;t=a.useMemo((function(){if(!(null==E?void 0:E.isAuthenticated))return[];var e=[];return v&&(e=[].concat(u(e),[!!(null==w?void 0:w.length)&&c.R.videoRatings(w,f.flightNamespace)])),y&&(e=[].concat(u(e),[!!(null==w?void 0:w.length)&&E&&o.P.isFavourited(E.id,w,f.flightNamespace)])),b&&(e=[].concat(u(e),[!!(null==w?void 0:w.length)&&E&&s.p.videoHistory(w,f.flightNamespace)])),h&&(e=[].concat(u(e),[!!(null==w?void 0:w.length)&&i.x.hasCurriculumLinks(w,null,f.flightNamespace)])),e.filter(Boolean)}),[null==w?void 0:w.length]),n=!!e,d=r.a.useGetFetch(),a.useEffect((function(){n&&t.length&&t.forEach((function(e){d(e)}))}),[t.length])}},87432:(e,t,n)=>{n.d(t,{Z:()=>a});const a={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);
|