@videojs/html 10.0.0-beta.27 → 10.0.0-beta.28
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/cdn/audio-headless.dev.js +1 -1
- package/cdn/audio-headless.js +1 -1
- package/cdn/audio-minimal-ui.dev.js +1 -1
- package/cdn/audio-minimal-ui.js +1 -1
- package/cdn/audio-minimal.dev.js +4 -4
- package/cdn/audio-minimal.dev.js.map +1 -1
- package/cdn/audio-minimal.js +1 -1
- package/cdn/audio-minimal.js.map +1 -1
- package/cdn/audio-ui.dev.js +1 -1
- package/cdn/audio-ui.js +1 -1
- package/cdn/audio.dev.js +4 -4
- package/cdn/audio.dev.js.map +1 -1
- package/cdn/audio.js +1 -1
- package/cdn/audio.js.map +1 -1
- package/cdn/background-video-WKumpp49.js +59 -0
- package/cdn/background-video-WKumpp49.js.map +1 -0
- package/cdn/background-video-YHY_3-lX.js +2 -0
- package/cdn/background-video-YHY_3-lX.js.map +1 -0
- package/cdn/background.dev.js +3 -56
- package/cdn/background.dev.js.map +1 -1
- package/cdn/background.js +1 -1
- package/cdn/background.js.map +1 -1
- package/cdn/bn-CcLIScl6.js +108 -0
- package/cdn/bn-CcLIScl6.js.map +1 -0
- package/cdn/bn-KcCmQhYd.js +2 -0
- package/cdn/bn-KcCmQhYd.js.map +1 -0
- package/cdn/compounds-BEO1d3ZM.js +8 -0
- package/cdn/compounds-BEO1d3ZM.js.map +1 -0
- package/cdn/{compounds-CCvdpvge.js → compounds-nk9RJtBK.js} +8 -15
- package/cdn/compounds-nk9RJtBK.js.map +1 -0
- package/cdn/container-element-Dd0ZCdhK.js +14 -0
- package/cdn/container-element-Dd0ZCdhK.js.map +1 -0
- package/cdn/container-element-HHK_KZOE.js +376 -0
- package/cdn/container-element-HHK_KZOE.js.map +1 -0
- package/cdn/{create-player-BHFyOnWi.js → create-player-DK9WOywd.js} +19 -379
- package/cdn/create-player-DK9WOywd.js.map +1 -0
- package/cdn/create-player-hSdQMP5p.js +2 -0
- package/cdn/create-player-hSdQMP5p.js.map +1 -0
- package/cdn/embed-params-D2e8u0d4.js +2 -0
- package/cdn/embed-params-D2e8u0d4.js.map +1 -0
- package/cdn/embed-params-W6T88S8x.js +39 -0
- package/cdn/embed-params-W6T88S8x.js.map +1 -0
- package/cdn/{gesture-element-CG-Sx_5t.js → gesture-element-6Ld1YwIL.js} +3 -3
- package/cdn/{gesture-element-CG-Sx_5t.js.map → gesture-element-6Ld1YwIL.js.map} +1 -1
- package/cdn/gesture-element-BC48ucj9.js +2 -0
- package/cdn/{gesture-element-BNfMI8eh.js.map → gesture-element-BC48ucj9.js.map} +1 -1
- package/cdn/{hls-js-g1zdcyvE.js → hls-js-BEuVm0u9.js} +3 -2
- package/cdn/{hls-js-g1zdcyvE.js.map → hls-js-BEuVm0u9.js.map} +1 -1
- package/cdn/hls-js-C4P_b2tT.js +2 -0
- package/cdn/{hls-js-6lW7L4th.js.map → hls-js-C4P_b2tT.js.map} +1 -1
- package/cdn/hls-js-CATW7NBm.js +2 -0
- package/cdn/{hls-js-DCQzjzB5.js.map → hls-js-CATW7NBm.js.map} +1 -1
- package/cdn/{hls-js-Cwj8UBx9.js → hls-js-WCNy9MVh.js} +3 -2
- package/cdn/{hls-js-Cwj8UBx9.js.map → hls-js-WCNy9MVh.js.map} +1 -1
- package/cdn/i18n-CE4KxKuj.js +2 -0
- package/cdn/i18n-CE4KxKuj.js.map +1 -0
- package/cdn/{i18n-Mtlmj1AA.js → i18n-Ch4t6EjV.js} +2 -2
- package/cdn/{i18n-Mtlmj1AA.js.map → i18n-Ch4t6EjV.js.map} +1 -1
- package/cdn/i18n-Dc7WM2xd.js +2 -0
- package/cdn/{i18n-DfKGl5Rh.js.map → i18n-Dc7WM2xd.js.map} +1 -1
- package/cdn/i18n-DyF_NfCk.js +157 -0
- package/cdn/i18n-DyF_NfCk.js.map +1 -0
- package/cdn/i18n.dev.js +3 -152
- package/cdn/i18n.dev.js.map +1 -1
- package/cdn/i18n.js +1 -1
- package/cdn/i18n.js.map +1 -1
- package/cdn/{live-button-element-B_y-ZJBy.js → live-button-element-Bae44kBN.js} +5 -4
- package/cdn/live-button-element-Bae44kBN.js.map +1 -0
- package/cdn/live-button-element-DaHgnYdw.js +2 -0
- package/cdn/{live-button-element-CWfkQUoy.js.map → live-button-element-DaHgnYdw.js.map} +1 -1
- package/cdn/live-video-minimal.dev.js +8 -8
- package/cdn/live-video-minimal.dev.js.map +1 -1
- package/cdn/live-video-minimal.js +1 -1
- package/cdn/live-video-minimal.js.map +1 -1
- package/cdn/live-video.dev.js +9 -9
- package/cdn/live-video.dev.js.map +1 -1
- package/cdn/live-video.js +1 -1
- package/cdn/live-video.js.map +1 -1
- package/cdn/locales/bn.dev.js +1 -1
- package/cdn/locales/bn.js +1 -1
- package/cdn/media/background-video.dev.d.ts +1 -0
- package/cdn/media/background-video.dev.js +3 -0
- package/cdn/media/background-video.js +1 -0
- package/cdn/media/cloudflare-video.dev.d.ts +1 -0
- package/cdn/media/cloudflare-video.dev.js +668 -0
- package/cdn/media/cloudflare-video.dev.js.map +1 -0
- package/cdn/media/cloudflare-video.js +2 -0
- package/cdn/media/cloudflare-video.js.map +1 -0
- package/cdn/media/container.dev.d.ts +1 -0
- package/cdn/media/container.dev.js +8 -0
- package/cdn/media/container.dev.js.map +1 -0
- package/cdn/media/container.js +2 -0
- package/cdn/media/container.js.map +1 -0
- package/cdn/media/dash-video.dev.js +2 -1
- package/cdn/media/dash-video.js +2 -2
- package/cdn/media/dash-video.js.map +1 -1
- package/cdn/media/google-cast.dev.js +2 -31
- package/cdn/media/google-cast.dev.js.map +1 -1
- package/cdn/media/google-cast.js +3 -3
- package/cdn/media/google-cast.js.map +1 -1
- package/cdn/media/hls-audio.dev.js +1 -0
- package/cdn/media/hls-audio.js +1 -1
- package/cdn/media/hls-audio.js.map +1 -1
- package/cdn/media/hls-background-video.dev.js +2 -1
- package/cdn/media/hls-background-video.js +1 -1
- package/cdn/media/hls-background-video.js.map +1 -1
- package/cdn/media/hls-video.dev.js +2 -1
- package/cdn/media/hls-video.js +1 -1
- package/cdn/media/hls-video.js.map +1 -1
- package/cdn/media/hlsjs-video.dev.js +2 -1
- package/cdn/media/hlsjs-video.js +1 -1
- package/cdn/media/hlsjs-video.js.map +1 -1
- package/cdn/media/mux-audio/hls-js.dev.js +3 -1
- package/cdn/media/mux-audio/hls-js.js +1 -1
- package/cdn/media/mux-audio/spf.dev.js +1 -0
- package/cdn/media/mux-audio/spf.js +1 -1
- package/cdn/media/mux-audio/spf.js.map +1 -1
- package/cdn/media/mux-audio.dev.js +3 -1
- package/cdn/media/mux-audio.js +1 -1
- package/cdn/media/mux-background-video.dev.js +2 -1
- package/cdn/media/mux-background-video.js +1 -1
- package/cdn/media/mux-background-video.js.map +1 -1
- package/cdn/media/mux-data.dev.js +2 -1
- package/cdn/media/mux-data.dev.js.map +1 -1
- package/cdn/media/mux-data.js +2 -2
- package/cdn/media/mux-data.js.map +1 -1
- package/cdn/media/mux-video/hls-js.dev.js +3 -1
- package/cdn/media/mux-video/hls-js.js +1 -1
- package/cdn/media/mux-video/spf.dev.js +2 -1
- package/cdn/media/mux-video/spf.js +1 -1
- package/cdn/media/mux-video/spf.js.map +1 -1
- package/cdn/media/mux-video.dev.js +3 -1
- package/cdn/media/mux-video.js +1 -1
- package/cdn/media/native-hls-video.dev.js +1 -0
- package/cdn/media/native-hls-video.js +1 -1
- package/cdn/media/native-hls-video.js.map +1 -1
- package/cdn/media/spotify-audio.dev.d.ts +1 -0
- package/cdn/media/spotify-audio.dev.js +605 -0
- package/cdn/media/spotify-audio.dev.js.map +1 -0
- package/cdn/media/spotify-audio.js +2 -0
- package/cdn/media/spotify-audio.js.map +1 -0
- package/cdn/media/tiktok-video.dev.d.ts +1 -0
- package/cdn/media/tiktok-video.dev.js +636 -0
- package/cdn/media/tiktok-video.dev.js.map +1 -0
- package/cdn/media/tiktok-video.js +2 -0
- package/cdn/media/tiktok-video.js.map +1 -0
- package/cdn/media/twitch-video.dev.d.ts +1 -0
- package/cdn/media/twitch-video.dev.js +627 -0
- package/cdn/media/twitch-video.dev.js.map +1 -0
- package/cdn/media/twitch-video.js +2 -0
- package/cdn/media/twitch-video.js.map +1 -0
- package/cdn/media/vimeo-video.dev.d.ts +1 -0
- package/cdn/media/vimeo-video.dev.js +2989 -0
- package/cdn/media/vimeo-video.dev.js.map +1 -0
- package/cdn/media/vimeo-video.js +16 -0
- package/cdn/media/vimeo-video.js.map +1 -0
- package/cdn/media/youtube-video.dev.d.ts +1 -0
- package/cdn/media/youtube-video.dev.js +713 -0
- package/cdn/media/youtube-video.dev.js.map +1 -0
- package/cdn/media/youtube-video.js +2 -0
- package/cdn/media/youtube-video.js.map +1 -0
- package/cdn/{media-Cp3acYc8.js → media-BavrGKqa.js} +274 -5
- package/cdn/media-BavrGKqa.js.map +1 -0
- package/cdn/media-Bmablv4g.js +2 -0
- package/cdn/media-Bmablv4g.js.map +1 -0
- package/cdn/{media-B_gQXwri.js → media-COIe3uI5.js} +12 -3
- package/cdn/media-COIe3uI5.js.map +1 -0
- package/cdn/{media-CbWsJJhU.js → media-CPVSKLdk.js} +2 -2
- package/cdn/{media-CbWsJJhU.js.map → media-CPVSKLdk.js.map} +1 -1
- package/cdn/media-CanBm0Jh.js +41 -0
- package/cdn/media-CanBm0Jh.js.map +1 -0
- package/cdn/{media-Dq4zmIJa2.js → media-Dq4zmIJa.js} +1 -1
- package/cdn/media-Dq4zmIJa.js.map +1 -0
- package/cdn/{media-DRo3n8tM.js → media-oa3nyL2o.js} +3 -3
- package/cdn/{media-DRo3n8tM.js.map → media-oa3nyL2o.js.map} +1 -1
- package/cdn/media-played-ranges-CM2zeOGr.js +2 -0
- package/cdn/media-played-ranges-CM2zeOGr.js.map +1 -0
- package/cdn/media-played-ranges-Yd9acuMt.js +156 -0
- package/cdn/media-played-ranges-Yd9acuMt.js.map +1 -0
- package/cdn/{media-suYcjCG22.js → media-suYcjCG2.js} +1 -1
- package/cdn/media-suYcjCG2.js.map +1 -0
- package/cdn/minimal-ui-8iRZf_72.js +2 -0
- package/cdn/{minimal-ui-AFk6Ut5f.js.map → minimal-ui-8iRZf_72.js.map} +1 -1
- package/cdn/{minimal-ui--JsmpU2q.js → minimal-ui-BpHxIo4z.js} +5 -5
- package/cdn/{minimal-ui--JsmpU2q.js.map → minimal-ui-BpHxIo4z.js.map} +1 -1
- package/cdn/{minimal-ui-Bxcpf5Mb.js → minimal-ui-CRKvUmB8.js} +9 -9
- package/cdn/{minimal-ui-Bxcpf5Mb.js.map → minimal-ui-CRKvUmB8.js.map} +1 -1
- package/cdn/minimal-ui-Et2Wcn7r.js +2 -0
- package/cdn/{minimal-ui-BVKu9LWj.js.map → minimal-ui-Et2Wcn7r.js.map} +1 -1
- package/cdn/mixin-BqN0V06a.js +2 -0
- package/cdn/{mixin-DiB7dIef.js.map → mixin-BqN0V06a.js.map} +1 -1
- package/cdn/{mixin-CkNZwQXF.js → mixin-C193v40v.js} +67 -67
- package/cdn/mixin-C193v40v.js.map +1 -0
- package/cdn/noop-BxkeRIz9.js +6 -0
- package/cdn/noop-BxkeRIz9.js.map +1 -0
- package/cdn/noop-Ch0IHcOP.js +2 -0
- package/cdn/noop-Ch0IHcOP.js.map +1 -0
- package/cdn/{player-D4fdOLLk.js → player-B2oraRyD.js} +3 -2
- package/cdn/{player-D4fdOLLk.js.map → player-B2oraRyD.js.map} +1 -1
- package/cdn/player-BRQLp5bX.js +2 -0
- package/cdn/{player-srq1RGTj.js.map → player-BRQLp5bX.js.map} +1 -1
- package/cdn/player-BloX4l6F.js +2 -0
- package/cdn/{player-iIewo8Y9.js.map → player-BloX4l6F.js.map} +1 -1
- package/cdn/{player-B0qnepD5.js → player-CKTAtwit.js} +3 -2
- package/cdn/{player-B0qnepD5.js.map → player-CKTAtwit.js.map} +1 -1
- package/cdn/{player-C4ix6TQq.js → player-DM9rUXg-.js} +3 -2
- package/cdn/{player-C4ix6TQq.js.map → player-DM9rUXg-.js.map} +1 -1
- package/cdn/player-rCFqzWrA.js +2 -0
- package/cdn/{player-B0ccW5-n.js.map → player-rCFqzWrA.js.map} +1 -1
- package/cdn/{poster-element-BP1Ypgbf.js → poster-element-BGr1VQJB.js} +16 -4
- package/cdn/poster-element-BGr1VQJB.js.map +1 -0
- package/cdn/poster-element-DBmgOyep.js +2 -0
- package/cdn/poster-element-DBmgOyep.js.map +1 -0
- package/cdn/script-D3ZkiqwO.js +2 -0
- package/cdn/script-D3ZkiqwO.js.map +1 -0
- package/cdn/script-erPJaaTz.js +33 -0
- package/cdn/script-erPJaaTz.js.map +1 -0
- package/cdn/seek-button-element-FlgBVoGM.js +2 -0
- package/cdn/seek-button-element-FlgBVoGM.js.map +1 -0
- package/cdn/{seek-button-element-TErrbilI.js → seek-button-element-XMTLIxZj.js} +6 -5
- package/cdn/seek-button-element-XMTLIxZj.js.map +1 -0
- package/cdn/{skin-element-wPSb4AAs.js → skin-element-DL-Kqa5f.js} +2 -2
- package/cdn/{skin-element-wPSb4AAs.js.map → skin-element-DL-Kqa5f.js.map} +1 -1
- package/cdn/{skin-element-1_MG2zgS.js → skin-element-DNytI-uu.js} +2 -2
- package/cdn/{skin-element-1_MG2zgS.js.map → skin-element-DNytI-uu.js.map} +1 -1
- package/cdn/{text-element-DTB9_2HX.js → text-element-D88ArbZz.js} +3 -3
- package/cdn/{text-element-DTB9_2HX.js.map → text-element-D88ArbZz.js.map} +1 -1
- package/cdn/text-element-DeWBNKXb.js +2 -0
- package/cdn/{text-element-Bsyglab8.js.map → text-element-DeWBNKXb.js.map} +1 -1
- package/cdn/{time-slider-chapters-element-DPgaLdBt.js → time-slider-chapters-element-DJ0abZXI.js} +5 -4
- package/cdn/time-slider-chapters-element-DJ0abZXI.js.map +1 -0
- package/cdn/time-slider-chapters-element-DW8YyJn8.js +2 -0
- package/cdn/{time-slider-chapters-element-MdlcovBu.js.map → time-slider-chapters-element-DW8YyJn8.js.map} +1 -1
- package/cdn/{translate-text-DP0CzUCC.js → translate-text-BWvoW5-r.js} +2 -7
- package/cdn/translate-text-BWvoW5-r.js.map +1 -0
- package/cdn/translate-text-TzSgu_oe.js +2 -0
- package/cdn/translate-text-TzSgu_oe.js.map +1 -0
- package/cdn/{ui-D0AokGxw.js → ui-BU3_2gDQ.js} +8 -8
- package/cdn/{ui-D0AokGxw.js.map → ui-BU3_2gDQ.js.map} +1 -1
- package/cdn/{ui-p36Szn71.js → ui-BsaWWE4y.js} +10 -10
- package/cdn/{ui-p36Szn71.js.map → ui-BsaWWE4y.js.map} +1 -1
- package/cdn/ui-C0isALTQ.js +2 -0
- package/cdn/{ui-CecDxhTX.js.map → ui-C0isALTQ.js.map} +1 -1
- package/cdn/ui-DVpkE1MN.js +2 -0
- package/cdn/{ui-ChWM6Xz2.js.map → ui-DVpkE1MN.js.map} +1 -1
- package/cdn/video-headless.dev.js +1 -1
- package/cdn/video-headless.js +1 -1
- package/cdn/video-minimal-ui.dev.js +1 -1
- package/cdn/video-minimal-ui.js +1 -1
- package/cdn/video-minimal.dev.js +4 -4
- package/cdn/video-minimal.dev.js.map +1 -1
- package/cdn/video-minimal.js +1 -1
- package/cdn/video-minimal.js.map +1 -1
- package/cdn/video-ui.dev.js +1 -1
- package/cdn/video-ui.js +1 -1
- package/cdn/video.dev.js +5 -5
- package/cdn/video.dev.js.map +1 -1
- package/cdn/video.js +1 -1
- package/cdn/video.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/audio/minimal-skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/audio/minimal-skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/audio/skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/audio/skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-audio/minimal-skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-audio/minimal-skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-audio/skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-audio/skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-video/minimal-skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-video/minimal-skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-video/skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-video/skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/video/minimal-skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/video/minimal-skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/video/skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/video/skin.js.map +1 -1
- package/dist/default/define/audio/minimal-skin.css +16 -19
- package/dist/default/define/audio/skin.css +27 -30
- package/dist/default/define/live-audio/minimal-skin.css +16 -19
- package/dist/default/define/live-audio/skin.css +27 -30
- package/dist/default/define/live-video/minimal-skin.css +20 -19
- package/dist/default/define/live-video/skin.css +31 -30
- package/dist/default/define/video/minimal-skin.css +20 -19
- package/dist/default/define/video/skin.css +31 -30
- package/dist/default/media/tiktok-video/media.js +3 -2
- package/dist/default/media/tiktok-video/media.js.map +1 -1
- package/dist/default/skins/dist/default/default/tailwind/components/slider.js +6 -6
- package/dist/default/skins/dist/default/default/tailwind/components/slider.js.map +1 -1
- package/dist/default/skins/dist/default/default/tailwind/video.tailwind.js +1 -1
- package/dist/default/skins/dist/default/default/tailwind/video.tailwind.js.map +1 -1
- package/dist/default/skins/dist/default/minimal/tailwind/components/slider.js +4 -4
- package/dist/default/skins/dist/default/minimal/tailwind/components/slider.js.map +1 -1
- package/dist/default/skins/dist/default/minimal/tailwind/video.tailwind.js +1 -1
- package/dist/default/skins/dist/default/minimal/tailwind/video.tailwind.js.map +1 -1
- package/dist/default/ui/playback-rate-button/playback-rate-button-element.js +1 -2
- package/dist/default/ui/playback-rate-button/playback-rate-button-element.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/audio/minimal-skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/audio/minimal-skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/audio/skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/audio/skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-audio/minimal-skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-audio/minimal-skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-audio/skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-audio/skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-video/minimal-skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-video/minimal-skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-video/skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-video/skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/video/minimal-skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/video/minimal-skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/video/skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/video/skin.js.map +1 -1
- package/dist/dev/define/audio/minimal-skin.css +16 -19
- package/dist/dev/define/audio/skin.css +27 -30
- package/dist/dev/define/live-audio/minimal-skin.css +16 -19
- package/dist/dev/define/live-audio/skin.css +27 -30
- package/dist/dev/define/live-video/minimal-skin.css +20 -19
- package/dist/dev/define/live-video/skin.css +31 -30
- package/dist/dev/define/video/minimal-skin.css +20 -19
- package/dist/dev/define/video/skin.css +31 -30
- package/dist/dev/media/tiktok-video/media.d.ts.map +1 -1
- package/dist/dev/media/tiktok-video/media.js +10 -7
- package/dist/dev/media/tiktok-video/media.js.map +1 -1
- package/dist/dev/packages/skins/dist/default/default/tailwind/components/slider.js +6 -6
- package/dist/dev/packages/skins/dist/default/default/tailwind/components/slider.js.map +1 -1
- package/dist/dev/packages/skins/dist/default/default/tailwind/video.tailwind.js +1 -1
- package/dist/dev/packages/skins/dist/default/default/tailwind/video.tailwind.js.map +1 -1
- package/dist/dev/packages/skins/dist/default/minimal/tailwind/components/slider.js +4 -4
- package/dist/dev/packages/skins/dist/default/minimal/tailwind/components/slider.js.map +1 -1
- package/dist/dev/packages/skins/dist/default/minimal/tailwind/video.tailwind.js +1 -1
- package/dist/dev/packages/skins/dist/default/minimal/tailwind/video.tailwind.js.map +1 -1
- package/dist/dev/ui/playback-rate-button/playback-rate-button-element.d.ts.map +1 -1
- package/dist/dev/ui/playback-rate-button/playback-rate-button-element.js +1 -2
- package/dist/dev/ui/playback-rate-button/playback-rate-button-element.js.map +1 -1
- package/docs/README.md +1 -1
- package/docs/concepts/features.md +2 -2
- package/docs/concepts/media-sources.md +79 -1
- package/docs/concepts/skins.md +31 -30
- package/docs/how-to/build-your-own-component.md +1 -1
- package/docs/how-to/customize-skins.md +94 -98
- package/docs/how-to/migrate-from-media-chrome.md +359 -0
- package/docs/how-to/migrate-from-mux-player.md +535 -0
- package/docs/how-to/migrate-from-plyr.md +394 -0
- package/docs/how-to/migrate-from-video-js-8.md +594 -0
- package/docs/llms.txt +9 -0
- package/docs/reference/feature-volume.md +3 -1
- package/docs/reference/mute-button.md +34 -0
- package/docs/reference/volume-slider.md +1 -1
- package/package.json +10 -9
- package/cdn/bn-DdelKD_n.js +0 -108
- package/cdn/bn-DdelKD_n.js.map +0 -1
- package/cdn/bn-YS8ruMcO.js +0 -2
- package/cdn/bn-YS8ruMcO.js.map +0 -1
- package/cdn/compounds-CCvdpvge.js.map +0 -1
- package/cdn/compounds-CJ6SbYAh.js +0 -8
- package/cdn/compounds-CJ6SbYAh.js.map +0 -1
- package/cdn/create-player-BHFyOnWi.js.map +0 -1
- package/cdn/create-player-CbpxjDaZ.js +0 -14
- package/cdn/create-player-CbpxjDaZ.js.map +0 -1
- package/cdn/gesture-element-BNfMI8eh.js +0 -2
- package/cdn/hls-js-6lW7L4th.js +0 -2
- package/cdn/hls-js-DCQzjzB5.js +0 -2
- package/cdn/i18n-DfKGl5Rh.js +0 -2
- package/cdn/live-button-element-B_y-ZJBy.js.map +0 -1
- package/cdn/live-button-element-CWfkQUoy.js +0 -2
- package/cdn/media-5ODYtX1-.js +0 -2
- package/cdn/media-5ODYtX1-.js.map +0 -1
- package/cdn/media-B_gQXwri.js.map +0 -1
- package/cdn/media-CPWNSZFX.js +0 -41
- package/cdn/media-CPWNSZFX.js.map +0 -1
- package/cdn/media-Cp3acYc8.js.map +0 -1
- package/cdn/media-Dq4zmIJa2.js.map +0 -1
- package/cdn/media-suYcjCG22.js.map +0 -1
- package/cdn/minimal-ui-AFk6Ut5f.js +0 -2
- package/cdn/minimal-ui-BVKu9LWj.js +0 -2
- package/cdn/mixin-CkNZwQXF.js.map +0 -1
- package/cdn/mixin-DiB7dIef.js +0 -2
- package/cdn/player-B0ccW5-n.js +0 -2
- package/cdn/player-iIewo8Y9.js +0 -2
- package/cdn/player-srq1RGTj.js +0 -2
- package/cdn/poster-element-BP1Ypgbf.js.map +0 -1
- package/cdn/poster-element-S-rr412t.js +0 -2
- package/cdn/poster-element-S-rr412t.js.map +0 -1
- package/cdn/seek-button-element-DxLmm58Y.js +0 -2
- package/cdn/seek-button-element-DxLmm58Y.js.map +0 -1
- package/cdn/seek-button-element-TErrbilI.js.map +0 -1
- package/cdn/text-element-Bsyglab8.js +0 -2
- package/cdn/time-slider-chapters-element-DPgaLdBt.js.map +0 -1
- package/cdn/time-slider-chapters-element-MdlcovBu.js +0 -2
- package/cdn/translate-text-BPMWpzFm.js +0 -2
- package/cdn/translate-text-BPMWpzFm.js.map +0 -1
- package/cdn/translate-text-DP0CzUCC.js.map +0 -1
- package/cdn/ui-CecDxhTX.js +0 -2
- package/cdn/ui-ChWM6Xz2.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as CustomMediaElement } from "./custom-media-element-D2JoODKd.js";
|
|
2
2
|
import { i as safeDefine } from "./context-OhQY847V.js";
|
|
3
3
|
import { t as MediaAttachMixin } from "./media-attach-mixin-uThv5NL_.js";
|
|
4
|
-
import { t as MuxMedia } from "./media-
|
|
4
|
+
import { t as MuxMedia } from "./media-COIe3uI5.js";
|
|
5
5
|
import { t as MuxAudioMixin } from "./mixin-Co51mtM6.js";
|
|
6
6
|
|
|
7
7
|
//#region src/media/mux-audio/hls-js.ts
|
|
@@ -18,4 +18,5 @@ var MuxAudioElement = class extends MuxAudio {
|
|
|
18
18
|
safeDefine(MuxAudioElement);
|
|
19
19
|
|
|
20
20
|
//#endregion
|
|
21
|
-
|
|
21
|
+
export { MuxAudioElement as t };
|
|
22
|
+
//# sourceMappingURL=hls-js-WCNy9MVh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hls-js-
|
|
1
|
+
{"version":3,"file":"hls-js-WCNy9MVh.js","names":[],"sources":["../src/media/mux-audio/hls-js.ts","../src/define/media/mux-audio/hls-js.ts"],"sourcesContent":["import { CustomMediaElement } from '@videojs/media/dom/custom-media-element';\nimport { MuxMedia } from '@videojs/media/dom/mux';\nimport { MediaAttachMixin } from '../../store/media-attach-mixin';\nimport { MuxAudioMixin } from './mixin';\n\nconst MuxAudioBase = MuxAudioMixin(MediaAttachMixin(CustomMediaElement('audio', MuxMedia)));\n\nexport class MuxAudio extends MuxAudioBase {}\n","import { MuxAudio } from '../../../media/mux-audio/hls-js';\nimport { safeDefine } from '../../safe-define';\n\nexport class MuxAudioElement extends MuxAudio {\n static readonly tagName = 'mux-audio';\n}\n\nsafeDefine(MuxAudioElement);\n\ndeclare global {\n /** The Mux audio flavors in the build — see `../mux-video/spf` for why. */\n interface MuxAudioFlavors {\n 'hls-js': MuxAudioElement;\n }\n\n interface HTMLElementTagNameMap {\n // Spelled out rather than `[MuxAudioElement.tagName]` — see `../mux-video/hls-js`.\n 'mux-audio': MuxAudioFlavors[keyof MuxAudioFlavors];\n }\n}\n"],"mappings":";;;;;;;AAKA,MAAM,eAAe,cAAc,iBAAiB,mBAAmB,SAAS,QAAQ,CAAC,CAAC;AAE1F,IAAa,WAAb,cAA8B,aAAa,CAAC;;;;ACJ5C,IAAa,kBAAb,cAAqC,SAAS;;iBAClB;;AAC5B;AAEA,WAAW,eAAe"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(t,n={}){let{prefix:r=``}=n,i={};for(let[n,a]of Object.entries(t)){let t=r?`${r}.${n}`:n;typeof a==`object`&&a&&!Array.isArray(a)?Object.assign(i,e(a,{prefix:t})):i[t]=a}return i}function t(t,n={}){return e(t,n)}const n=`en`,r=Symbol.for(`@videojs/i18n-registry`);function i(){let e=globalThis,t=e[r];if(t)return t;let n={layers:new Map,subscribers:new Set};return e[r]=n,n}function a(){for(let e of i().subscribers)e()}function o(e){return e.trim().replaceAll(`_`,`-`).toLowerCase()}function s(e){let t=e.indexOf(`-x-`),n=(t===-1?e:e.slice(0,t)).indexOf(`-u-`);return n===-1?e:e.slice(0,n)+(t===-1?``:e.slice(t))}function c(e){if(e[0]!==`zh`)return;let t=e.find(e=>e===`hant`||e===`hans`);return t===`hant`?`zh-tw`:t===`hans`?`zh-cn`:void 0}function l(e){return s(o(e))}function u(e){let t=l(e);if(!t)return[`en`];let n=t.split(`-`).filter(Boolean),r=[];for(let e=n.length;e>=1;e--)r.push(n.slice(0,e).join(`-`));let i=c(n),a=r.indexOf(`zh`);i&&a!==-1&&r.splice(a,0,i);let o=[],s=new Set;for(let e of r)s.has(e)||(s.add(e),o.push(e));return s.has(`en`)||o.push(`en`),o}function d(e){let{layers:t}=i(),n={};for(let r=e.length-1;r>=0;r--){let i=e[r],a=t.get(i);a&&Object.assign(n,a)}return n}function f(e,n){let{layers:r}=i(),o=l(e),s=r.get(o)??{};r.set(o,{...s,...t(n)}),a()}function p(e){return d(u(e))}function m(e){let{subscribers:t}=i();return t.add(e),()=>{t.delete(e)}}function h(e){return i().layers.has(l(e))}export{m as a,t as c,h as i,l as n,f as o,p as r,n as s,u as t};
|
|
2
|
+
//# sourceMappingURL=i18n-CE4KxKuj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n-CE4KxKuj.js","names":[],"sources":["../../utils/dist/object/flatten.js","../../core/dist/default/core/i18n/utils/flatten.js","../../utils/dist/i18n.js","../../core/dist/default/core/i18n/registry.js"],"sourcesContent":["//#region src/object/flatten.ts\nfunction flatten(object, options = {}) {\n\tconst { prefix = \"\" } = options;\n\tconst result = {};\n\tfor (const [key, value] of Object.entries(object)) {\n\t\tconst fullKey = prefix ? `${prefix}.${key}` : key;\n\t\tif (value !== null && typeof value === \"object\" && !Array.isArray(value)) Object.assign(result, flatten(value, { prefix: fullKey }));\n\t\telse result[fullKey] = value;\n\t}\n\treturn result;\n}\n//#endregion\nexport { flatten };\n\n//# sourceMappingURL=flatten.js.map","import { flatten } from \"@videojs/utils/object\";\n//#region src/core/i18n/utils/flatten.ts\nfunction flattenTranslations(locale, options = {}) {\n\treturn flatten(locale, options);\n}\n//#endregion\nexport { flattenTranslations };\n\n//# sourceMappingURL=flatten.js.map","//#region src/i18n/index.ts\n/** Default locale used when no player or ambient locale is available. */\nconst DEFAULT_LOCALE = \"en\";\n//#endregion\nexport { DEFAULT_LOCALE };\n\n//# sourceMappingURL=i18n.js.map","import { flattenTranslations } from \"./utils/flatten.js\";\nimport { DEFAULT_LOCALE } from \"@videojs/utils/i18n\";\n//#region src/core/i18n/registry.ts\n/**\n* Well-known key for the shared registry. Its name and value shape are a cross-version contract:\n* every copy of this module in a realm must agree on them, so change the key when the shape changes.\n*/\nconst I18N_REGISTRY_KEY = Symbol.for(\"@videojs/i18n-registry\");\n/**\n* The registry is realm-global rather than module-global so duplicate copies of this module\n* converge on one set of translations.\n*\n* Duplication is normal, not a bug to fix upstream: separately loaded CDN bundles, a pinned and an\n* unpinned URL for the same file, and two bundlers' output on one page all yield distinct module\n* instances. With module-scoped state, a `registerI18n` call on one instance is invisible to the\n* player reading from another, and the locale silently falls back to English.\n*/\nfunction getRegistry() {\n\tconst host = globalThis;\n\tconst existing = host[I18N_REGISTRY_KEY];\n\tif (existing) return existing;\n\tconst registry = {\n\t\tlayers: /* @__PURE__ */ new Map(),\n\t\tsubscribers: /* @__PURE__ */ new Set()\n\t};\n\thost[I18N_REGISTRY_KEY] = registry;\n\treturn registry;\n}\nfunction notify() {\n\tfor (const cb of getRegistry().subscribers) cb();\n}\nfunction normalizeLocaleTag(tag) {\n\treturn tag.trim().replaceAll(\"_\", \"-\").toLowerCase();\n}\n/** Strip unicode locale extension sequences (`-u-…`) before any private-use `-x-` block. */\nfunction stripUnicodeExtensions(tag) {\n\tconst xIdx = tag.indexOf(\"-x-\");\n\tconst uIdx = (xIdx === -1 ? tag : tag.slice(0, xIdx)).indexOf(\"-u-\");\n\tif (uIdx === -1) return tag;\n\treturn tag.slice(0, uIdx) + (xIdx === -1 ? \"\" : tag.slice(xIdx));\n}\nfunction chineseFallback(segments) {\n\tif (segments[0] !== \"zh\") return;\n\tconst script = segments.find((segment) => segment === \"hant\" || segment === \"hans\");\n\treturn script === \"hant\" ? \"zh-tw\" : script === \"hans\" ? \"zh-cn\" : void 0;\n}\n/** Registry map key: normalized tag with unicode extensions removed (same base as {@link findLocaleKeys}). */\nfunction getCanonicalLocaleKey(locale) {\n\treturn stripUnicodeExtensions(normalizeLocaleTag(locale));\n}\n/**\n* Most-specific-first BCP 47 lookup tags (normalized). Always ends with `en` when missing from the truncated chain.\n*\n* @example `es-419-u-nu-latn` → `['es-419', 'es', 'en']`\n*/\nfunction findLocaleKeys(locale) {\n\tconst base = getCanonicalLocaleKey(locale);\n\tif (!base) return [DEFAULT_LOCALE];\n\tconst segments = base.split(\"-\").filter(Boolean);\n\tconst chain = [];\n\tfor (let len = segments.length; len >= 1; len--) chain.push(segments.slice(0, len).join(\"-\"));\n\tconst zhFallback = chineseFallback(segments);\n\tconst zhIndex = chain.indexOf(\"zh\");\n\tif (zhFallback && zhIndex !== -1) chain.splice(zhIndex, 0, zhFallback);\n\tconst out = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const tag of chain) if (!seen.has(tag)) {\n\t\tseen.add(tag);\n\t\tout.push(tag);\n\t}\n\tif (!seen.has(DEFAULT_LOCALE)) out.push(DEFAULT_LOCALE);\n\treturn out;\n}\nfunction mergeI18nTranslations(chain) {\n\tconst { layers } = getRegistry();\n\tconst merged = {};\n\tfor (let i = chain.length - 1; i >= 0; i--) {\n\t\tconst tag = chain[i];\n\t\tconst layer = layers.get(tag);\n\t\tif (layer) Object.assign(merged, layer);\n\t}\n\treturn merged;\n}\n/**\n* Register or merge translation strings for a BCP 47 locale tag.\n*\n* @param locale - BCP 47 tag (normalized to lowercase; unicode extensions stripped for the registry key).\n* @param translations - Partial nested locale values; merges with any existing layer for the tag.\n* @public\n*/\nfunction registerI18n(locale, translations) {\n\tconst { layers } = getRegistry();\n\tconst tag = getCanonicalLocaleKey(locale);\n\tconst existing = layers.get(tag) ?? {};\n\tlayers.set(tag, {\n\t\t...existing,\n\t\t...flattenTranslations(translations)\n\t});\n\tnotify();\n}\n/**\n* Return the merged registered translation map for a locale. Built-in English defaults are supplied by text descriptors.\n*\n* @param locale - BCP 47 tag to resolve (e.g. `es-MX`, `zh-Hant-HK`).\n* @public\n*/\nfunction getI18nTranslations(locale) {\n\treturn mergeI18nTranslations(findLocaleKeys(locale));\n}\n/**\n* Subscribe to global registry mutations (for example after `registerI18n` or browser translation prefetch).\n*\n* @param callback - Invoked when any locale layer changes.\n* @public\n*/\nfunction onI18nRegistryChange(callback) {\n\tconst { subscribers } = getRegistry();\n\tsubscribers.add(callback);\n\treturn () => {\n\t\tsubscribers.delete(callback);\n\t};\n}\n/**\n* Whether an exact locale tag has been registered via `registerI18n` (not whether lazy packs exist).\n*\n* @param locale - BCP 47 tag to test.\n* @public\n*/\nfunction hasRegisteredLocale(locale) {\n\treturn getRegistry().layers.has(getCanonicalLocaleKey(locale));\n}\n/** Clears registered locale overlays (test isolation). */\nfunction resetI18nRegistry() {\n\tconst { layers, subscribers } = getRegistry();\n\tlayers.clear();\n\tsubscribers.clear();\n}\n//#endregion\nexport { findLocaleKeys, getCanonicalLocaleK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AAO,IAAI,EAAK,CACf,GAAG,EACH,GAAG,EAAoB,CAAY,CACpC,CAAC,EACD,EAAO,CACR,CAOA,SAAS,EAAoB,EAAQ,CACpC,OAAO,EAAsB,EAAe,CAAM,CAAC,CACpD,CAOA,SAAS,EAAqB,EAAU,CACvC,GAAM,CAAE,eAAgB,EAAY,EAEpC,OADA,EAAY,IAAI,CAAQ,MACX,CACZ,EAAY,OAAO,CAAQ,CAC5B,CACD,CAOA,SAAS,EAAoB,EAAQ,CACpC,OAAO,EAAY,CAAC,CAAC,OAAO,IAAI,EAAsB,CAAM,CAAC,CAC9D"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as safeDefine } from "./context-OhQY847V.js";
|
|
2
|
-
import { n as I18nProviderElement, t as TextElement } from "./text-element-
|
|
2
|
+
import { n as I18nProviderElement, t as TextElement } from "./text-element-D88ArbZz.js";
|
|
3
3
|
|
|
4
4
|
//#region src/define/i18n.ts
|
|
5
5
|
safeDefine(I18nProviderElement);
|
|
6
6
|
safeDefine(TextElement);
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
|
-
//# sourceMappingURL=i18n-
|
|
9
|
+
//# sourceMappingURL=i18n-Ch4t6EjV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-
|
|
1
|
+
{"version":3,"file":"i18n-Ch4t6EjV.js","names":[],"sources":["../src/define/i18n.ts"],"sourcesContent":["import { I18nProviderElement } from '../i18n/provider-element';\nimport { TextElement } from '../ui/text/text-element';\nimport { safeDefine } from './safe-define';\n\nsafeDefine(I18nProviderElement);\nsafeDefine(TextElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [I18nProviderElement.tagName]: I18nProviderElement;\n [TextElement.tagName]: TextElement;\n }\n}\n"],"mappings":";;;;AAIA,WAAW,mBAAmB;AAC9B,WAAW,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-
|
|
1
|
+
{"version":3,"file":"i18n-Dc7WM2xd.js","names":[],"sources":["../src/define/i18n.ts"],"sourcesContent":["import { I18nProviderElement } from '../i18n/provider-element';\nimport { TextElement } from '../ui/text/text-element';\nimport { safeDefine } from './safe-define';\n\nsafeDefine(I18nProviderElement);\nsafeDefine(TextElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [I18nProviderElement.tagName]: I18nProviderElement;\n [TextElement.tagName]: TextElement;\n }\n}\n"],"mappings":"gGAIA,EAAW,CAAmB,EAC9B,EAAW,CAAW"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
//#region ../utils/dist/object/flatten.js
|
|
2
|
+
function flatten(object, options = {}) {
|
|
3
|
+
const { prefix = "" } = options;
|
|
4
|
+
const result = {};
|
|
5
|
+
for (const [key, value] of Object.entries(object)) {
|
|
6
|
+
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
7
|
+
if (value !== null && typeof value === "object" && !Array.isArray(value)) Object.assign(result, flatten(value, { prefix: fullKey }));
|
|
8
|
+
else result[fullKey] = value;
|
|
9
|
+
}
|
|
10
|
+
return result;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region ../core/dist/dev/core/i18n/utils/flatten.js
|
|
15
|
+
function flattenTranslations(locale, options = {}) {
|
|
16
|
+
return flatten(locale, options);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region ../utils/dist/i18n.js
|
|
21
|
+
/** Default locale used when no player or ambient locale is available. */
|
|
22
|
+
const DEFAULT_LOCALE = "en";
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region ../core/dist/dev/core/i18n/registry.js
|
|
26
|
+
/**
|
|
27
|
+
* Well-known key for the shared registry. Its name and value shape are a cross-version contract:
|
|
28
|
+
* every copy of this module in a realm must agree on them, so change the key when the shape changes.
|
|
29
|
+
*/
|
|
30
|
+
const I18N_REGISTRY_KEY = Symbol.for("@videojs/i18n-registry");
|
|
31
|
+
/**
|
|
32
|
+
* The registry is realm-global rather than module-global so duplicate copies of this module
|
|
33
|
+
* converge on one set of translations.
|
|
34
|
+
*
|
|
35
|
+
* Duplication is normal, not a bug to fix upstream: separately loaded CDN bundles, a pinned and an
|
|
36
|
+
* unpinned URL for the same file, and two bundlers' output on one page all yield distinct module
|
|
37
|
+
* instances. With module-scoped state, a `registerI18n` call on one instance is invisible to the
|
|
38
|
+
* player reading from another, and the locale silently falls back to English.
|
|
39
|
+
*/
|
|
40
|
+
function getRegistry() {
|
|
41
|
+
const host = globalThis;
|
|
42
|
+
const existing = host[I18N_REGISTRY_KEY];
|
|
43
|
+
if (existing) return existing;
|
|
44
|
+
const registry = {
|
|
45
|
+
layers: /* @__PURE__ */ new Map(),
|
|
46
|
+
subscribers: /* @__PURE__ */ new Set()
|
|
47
|
+
};
|
|
48
|
+
host[I18N_REGISTRY_KEY] = registry;
|
|
49
|
+
return registry;
|
|
50
|
+
}
|
|
51
|
+
function notify() {
|
|
52
|
+
for (const cb of getRegistry().subscribers) cb();
|
|
53
|
+
}
|
|
54
|
+
function normalizeLocaleTag(tag) {
|
|
55
|
+
return tag.trim().replaceAll("_", "-").toLowerCase();
|
|
56
|
+
}
|
|
57
|
+
/** Strip unicode locale extension sequences (`-u-…`) before any private-use `-x-` block. */
|
|
58
|
+
function stripUnicodeExtensions(tag) {
|
|
59
|
+
const xIdx = tag.indexOf("-x-");
|
|
60
|
+
const uIdx = (xIdx === -1 ? tag : tag.slice(0, xIdx)).indexOf("-u-");
|
|
61
|
+
if (uIdx === -1) return tag;
|
|
62
|
+
return tag.slice(0, uIdx) + (xIdx === -1 ? "" : tag.slice(xIdx));
|
|
63
|
+
}
|
|
64
|
+
function chineseFallback(segments) {
|
|
65
|
+
if (segments[0] !== "zh") return;
|
|
66
|
+
const script = segments.find((segment) => segment === "hant" || segment === "hans");
|
|
67
|
+
return script === "hant" ? "zh-tw" : script === "hans" ? "zh-cn" : void 0;
|
|
68
|
+
}
|
|
69
|
+
/** Registry map key: normalized tag with unicode extensions removed (same base as {@link findLocaleKeys}). */
|
|
70
|
+
function getCanonicalLocaleKey(locale) {
|
|
71
|
+
return stripUnicodeExtensions(normalizeLocaleTag(locale));
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Most-specific-first BCP 47 lookup tags (normalized). Always ends with `en` when missing from the truncated chain.
|
|
75
|
+
*
|
|
76
|
+
* @example `es-419-u-nu-latn` → `['es-419', 'es', 'en']`
|
|
77
|
+
*/
|
|
78
|
+
function findLocaleKeys(locale) {
|
|
79
|
+
const base = getCanonicalLocaleKey(locale);
|
|
80
|
+
if (!base) return ["en"];
|
|
81
|
+
const segments = base.split("-").filter(Boolean);
|
|
82
|
+
const chain = [];
|
|
83
|
+
for (let len = segments.length; len >= 1; len--) chain.push(segments.slice(0, len).join("-"));
|
|
84
|
+
const zhFallback = chineseFallback(segments);
|
|
85
|
+
const zhIndex = chain.indexOf("zh");
|
|
86
|
+
if (zhFallback && zhIndex !== -1) chain.splice(zhIndex, 0, zhFallback);
|
|
87
|
+
const out = [];
|
|
88
|
+
const seen = /* @__PURE__ */ new Set();
|
|
89
|
+
for (const tag of chain) if (!seen.has(tag)) {
|
|
90
|
+
seen.add(tag);
|
|
91
|
+
out.push(tag);
|
|
92
|
+
}
|
|
93
|
+
if (!seen.has("en")) out.push("en");
|
|
94
|
+
return out;
|
|
95
|
+
}
|
|
96
|
+
function mergeI18nTranslations(chain) {
|
|
97
|
+
const { layers } = getRegistry();
|
|
98
|
+
const merged = {};
|
|
99
|
+
for (let i = chain.length - 1; i >= 0; i--) {
|
|
100
|
+
const tag = chain[i];
|
|
101
|
+
const layer = layers.get(tag);
|
|
102
|
+
if (layer) Object.assign(merged, layer);
|
|
103
|
+
}
|
|
104
|
+
return merged;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Register or merge translation strings for a BCP 47 locale tag.
|
|
108
|
+
*
|
|
109
|
+
* @param locale - BCP 47 tag (normalized to lowercase; unicode extensions stripped for the registry key).
|
|
110
|
+
* @param translations - Partial nested locale values; merges with any existing layer for the tag.
|
|
111
|
+
* @public
|
|
112
|
+
*/
|
|
113
|
+
function registerI18n(locale, translations) {
|
|
114
|
+
const { layers } = getRegistry();
|
|
115
|
+
const tag = getCanonicalLocaleKey(locale);
|
|
116
|
+
const existing = layers.get(tag) ?? {};
|
|
117
|
+
layers.set(tag, {
|
|
118
|
+
...existing,
|
|
119
|
+
...flattenTranslations(translations)
|
|
120
|
+
});
|
|
121
|
+
notify();
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Return the merged registered translation map for a locale. Built-in English defaults are supplied by text descriptors.
|
|
125
|
+
*
|
|
126
|
+
* @param locale - BCP 47 tag to resolve (e.g. `es-MX`, `zh-Hant-HK`).
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
function getI18nTranslations(locale) {
|
|
130
|
+
return mergeI18nTranslations(findLocaleKeys(locale));
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Subscribe to global registry mutations (for example after `registerI18n` or browser translation prefetch).
|
|
134
|
+
*
|
|
135
|
+
* @param callback - Invoked when any locale layer changes.
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
function onI18nRegistryChange(callback) {
|
|
139
|
+
const { subscribers } = getRegistry();
|
|
140
|
+
subscribers.add(callback);
|
|
141
|
+
return () => {
|
|
142
|
+
subscribers.delete(callback);
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Whether an exact locale tag has been registered via `registerI18n` (not whether lazy packs exist).
|
|
147
|
+
*
|
|
148
|
+
* @param locale - BCP 47 tag to test.
|
|
149
|
+
* @public
|
|
150
|
+
*/
|
|
151
|
+
function hasRegisteredLocale(locale) {
|
|
152
|
+
return getRegistry().layers.has(getCanonicalLocaleKey(locale));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
//#endregion
|
|
156
|
+
export { onI18nRegistryChange as a, flattenTranslations as c, hasRegisteredLocale as i, getCanonicalLocaleKey as n, registerI18n as o, getI18nTranslations as r, DEFAULT_LOCALE as s, findLocaleKeys as t };
|
|
157
|
+
//# sourceMappingURL=i18n-DyF_NfCk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n-DyF_NfCk.js","names":[],"sources":["../../utils/dist/object/flatten.js","../../core/dist/dev/core/i18n/utils/flatten.js","../../utils/dist/i18n.js","../../core/dist/dev/core/i18n/registry.js"],"sourcesContent":["//#region src/object/flatten.ts\nfunction flatten(object, options = {}) {\n\tconst { prefix = \"\" } = options;\n\tconst result = {};\n\tfor (const [key, value] of Object.entries(object)) {\n\t\tconst fullKey = prefix ? `${prefix}.${key}` : key;\n\t\tif (value !== null && typeof value === \"object\" && !Array.isArray(value)) Object.assign(result, flatten(value, { prefix: fullKey }));\n\t\telse result[fullKey] = value;\n\t}\n\treturn result;\n}\n//#endregion\nexport { flatten };\n\n//# sourceMappingURL=flatten.js.map","import { flatten } from \"@videojs/utils/object\";\n//#region src/core/i18n/utils/flatten.ts\nfunction flattenTranslations(locale, options = {}) {\n\treturn flatten(locale, options);\n}\n//#endregion\nexport { flattenTranslations };\n\n//# sourceMappingURL=flatten.js.map","//#region src/i18n/index.ts\n/** Default locale used when no player or ambient locale is available. */\nconst DEFAULT_LOCALE = \"en\";\n//#endregion\nexport { DEFAULT_LOCALE };\n\n//# sourceMappingURL=i18n.js.map","import { flattenTranslations } from \"./utils/flatten.js\";\nimport { DEFAULT_LOCALE } from \"@videojs/utils/i18n\";\n//#region src/core/i18n/registry.ts\n/**\n* Well-known key for the shared registry. Its name and value shape are a cross-version contract:\n* every copy of this module in a realm must agree on them, so change the key when the shape changes.\n*/\nconst I18N_REGISTRY_KEY = Symbol.for(\"@videojs/i18n-registry\");\n/**\n* The registry is realm-global rather than module-global so duplicate copies of this module\n* converge on one set of translations.\n*\n* Duplication is normal, not a bug to fix upstream: separately loaded CDN bundles, a pinned and an\n* unpinned URL for the same file, and two bundlers' output on one page all yield distinct module\n* instances. With module-scoped state, a `registerI18n` call on one instance is invisible to the\n* player reading from another, and the locale silently falls back to English.\n*/\nfunction getRegistry() {\n\tconst host = globalThis;\n\tconst existing = host[I18N_REGISTRY_KEY];\n\tif (existing) return existing;\n\tconst registry = {\n\t\tlayers: /* @__PURE__ */ new Map(),\n\t\tsubscribers: /* @__PURE__ */ new Set()\n\t};\n\thost[I18N_REGISTRY_KEY] = registry;\n\treturn registry;\n}\nfunction notify() {\n\tfor (const cb of getRegistry().subscribers) cb();\n}\nfunction normalizeLocaleTag(tag) {\n\treturn tag.trim().replaceAll(\"_\", \"-\").toLowerCase();\n}\n/** Strip unicode locale extension sequences (`-u-…`) before any private-use `-x-` block. */\nfunction stripUnicodeExtensions(tag) {\n\tconst xIdx = tag.indexOf(\"-x-\");\n\tconst uIdx = (xIdx === -1 ? tag : tag.slice(0, xIdx)).indexOf(\"-u-\");\n\tif (uIdx === -1) return tag;\n\treturn tag.slice(0, uIdx) + (xIdx === -1 ? \"\" : tag.slice(xIdx));\n}\nfunction chineseFallback(segments) {\n\tif (segments[0] !== \"zh\") return;\n\tconst script = segments.find((segment) => segment === \"hant\" || segment === \"hans\");\n\treturn script === \"hant\" ? \"zh-tw\" : script === \"hans\" ? \"zh-cn\" : void 0;\n}\n/** Registry map key: normalized tag with unicode extensions removed (same base as {@link findLocaleKeys}). */\nfunction getCanonicalLocaleKey(locale) {\n\treturn stripUnicodeExtensions(normalizeLocaleTag(locale));\n}\n/**\n* Most-specific-first BCP 47 lookup tags (normalized). Always ends with `en` when missing from the truncated chain.\n*\n* @example `es-419-u-nu-latn` → `['es-419', 'es', 'en']`\n*/\nfunction findLocaleKeys(locale) {\n\tconst base = getCanonicalLocaleKey(locale);\n\tif (!base) return [DEFAULT_LOCALE];\n\tconst segments = base.split(\"-\").filter(Boolean);\n\tconst chain = [];\n\tfor (let len = segments.length; len >= 1; len--) chain.push(segments.slice(0, len).join(\"-\"));\n\tconst zhFallback = chineseFallback(segments);\n\tconst zhIndex = chain.indexOf(\"zh\");\n\tif (zhFallback && zhIndex !== -1) chain.splice(zhIndex, 0, zhFallback);\n\tconst out = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const tag of chain) if (!seen.has(tag)) {\n\t\tseen.add(tag);\n\t\tout.push(tag);\n\t}\n\tif (!seen.has(DEFAULT_LOCALE)) out.push(DEFAULT_LOCALE);\n\treturn out;\n}\nfunction mergeI18nTranslations(chain) {\n\tconst { layers } = getRegistry();\n\tconst merged = {};\n\tfor (let i = chain.length - 1; i >= 0; i--) {\n\t\tconst tag = chain[i];\n\t\tconst layer = layers.get(tag);\n\t\tif (layer) Object.assign(merged, layer);\n\t}\n\treturn merged;\n}\n/**\n* Register or merge translation strings for a BCP 47 locale tag.\n*\n* @param locale - BCP 47 tag (normalized to lowercase; unicode extensions stripped for the registry key).\n* @param translations - Partial nested locale values; merges with any existing layer for the tag.\n* @public\n*/\nfunction registerI18n(locale, translations) {\n\tconst { layers } = getRegistry();\n\tconst tag = getCanonicalLocaleKey(locale);\n\tconst existing = layers.get(tag) ?? {};\n\tlayers.set(tag, {\n\t\t...existing,\n\t\t...flattenTranslations(translations)\n\t});\n\tnotify();\n}\n/**\n* Return the merged registered translation map for a locale. Built-in English defaults are supplied by text descriptors.\n*\n* @param locale - BCP 47 tag to resolve (e.g. `es-MX`, `zh-Hant-HK`).\n* @public\n*/\nfunction getI18nTranslations(locale) {\n\treturn mergeI18nTranslations(findLocaleKeys(locale));\n}\n/**\n* Subscribe to global registry mutations (for example after `registerI18n` or browser translation prefetch).\n*\n* @param callback - Invoked when any locale layer changes.\n* @public\n*/\nfunction onI18nRegistryChange(callback) {\n\tconst { subscribers } = getRegistry();\n\tsubscribers.add(callback);\n\treturn () => {\n\t\tsubscribers.delete(callback);\n\t};\n}\n/**\n* Whether an exact locale tag has been registered via `registerI18n` (not whether lazy packs exist).\n*\n* @param locale - BCP 47 tag to test.\n* @public\n*/\nfunction hasRegisteredLocale(locale) {\n\treturn getRegistry().layers.has(getCanonicalLocaleKey(locale));\n}\n/** Clears registered locale overlays (test isolation). */\nfunction resetI18nRegistry() {\n\tconst { layers, subscribers } = getRegistry();\n\tlayers.clear();\n\tsubscribers.clear();\n}\n//#endregion\nexport { findLocaleKeys, getCanonicalLocaleKey, getI18nTranslations, hasRegisteredLocale, onI18nRegistryChange, registerI18n, resetI18nRegistry };\n\n//# sourceMappingURL=registry.js.map"],"mappings":";AACA,SAAS,QAAQ,QAAQ,UAAU,CAAC,GAAG;CACtC,MAAM,EAAE,SAAS,OAAO;CACxB,MAAM,SAAS,CAAC;CAChB,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,GAAG;EAClD,MAAM,UAAU,SAAS,GAAG,OAAO,GAAG,QAAQ;EAC9C,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,GAAG,OAAO,OAAO,QAAQ,QAAQ,OAAO,EAAE,QAAQ,QAAQ,CAAC,CAAC;OAC9H,OAAO,WAAW;CACxB;CACA,OAAO;AACR;;;;ACRA,SAAS,oBAAoB,QAAQ,UAAU,CAAC,GAAG;CAClD,OAAO,QAAQ,QAAQ,OAAO;AAC/B;;;;;ACFA,MAAM,iBAAiB;;;;;;;;ACKvB,MAAM,oBAAoB,OAAO,IAAI,wBAAwB;;;;;;;;;;AAU7D,SAAS,cAAc;CACtB,MAAM,OAAO;CACb,MAAM,WAAW,KAAK;CACtB,IAAI,UAAU,OAAO;CACrB,MAAM,WAAW;EAChB,wBAAwB,IAAI,IAAI;EAChC,6BAA6B,IAAI,IAAI;CACtC;CACA,KAAK,qBAAqB;CAC1B,OAAO;AACR;AACA,SAAS,SAAS;CACjB,KAAK,MAAM,MAAM,YAAY,CAAC,CAAC,aAAa,GAAG;AAChD;AACA,SAAS,mBAAmB,KAAK;CAChC,OAAO,IAAI,KAAK,CAAC,CAAC,WAAW,KAAK,GAAG,CAAC,CAAC,YAAY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AAO;CACrC,MAAM,EAAE,WAAW,YAAY;CAC/B,MAAM,SAAS,CAAC;CAChB,KAAK,IAAI,IAAI,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK;EAC3C,MAAM,MAAM,MAAM;EAClB,MAAM,QAAQ,OAAO,IAAI,GAAG;EAC5B,IAAI,OAAO,OAAO,OAAO,QAAQ,KAAK;CACvC;CACA,OAAO;AACR;;;;;;;;AAQA,SAAS,aAAa,QAAQ,cAAc;CAC3C,MAAM,EAAE,WAAW,YAAY;CAC/B,MAAM,MAAM,sBAAsB,MAAM;CACxC,MAAM,WAAW,OAAO,IAAI,GAAG,KAAK,CAAC;CACrC,OAAO,IAAI,KAAK;EACf,GAAG;EACH,GAAG,oBAAoB,YAAY;CACpC,CAAC;CACD,OAAO;AACR;;;;;;;AAOA,SAAS,oBAAoB,QAAQ;CACpC,OAAO,sBAAsB,eAAe,MAAM,CAAC;AACpD;;;;;;;AAOA,SAAS,qBAAqB,UAAU;CACvC,MAAM,EAAE,gBAAgB,YAAY;CACpC,YAAY,IAAI,QAAQ;CACxB,aAAa;EACZ,YAAY,OAAO,QAAQ;CAC5B;AACD;;;;;;;AAOA,SAAS,oBAAoB,QAAQ;CACpC,OAAO,YAAY,CAAC,CAAC,OAAO,IAAI,sBAAsB,MAAM,CAAC;AAC9D"}
|
package/cdn/i18n.dev.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { s as isObject } from "./predicate-faYxAB6Z.js";
|
|
2
|
-
import { i as
|
|
2
|
+
import { a as onI18nRegistryChange, c as flattenTranslations, i as hasRegisteredLocale, n as getCanonicalLocaleKey, o as registerI18n, r as getI18nTranslations, s as DEFAULT_LOCALE, t as findLocaleKeys } from "./i18n-DyF_NfCk.js";
|
|
3
|
+
import { n as interpolate, r as resolveText, t as translateText } from "./translate-text-BWvoW5-r.js";
|
|
3
4
|
|
|
4
5
|
//#region ../core/dist/dev/i18n/locales/en.js
|
|
5
6
|
var en_default = {
|
|
@@ -103,156 +104,6 @@ var en_default = {
|
|
|
103
104
|
}
|
|
104
105
|
};
|
|
105
106
|
|
|
106
|
-
//#endregion
|
|
107
|
-
//#region ../utils/dist/object/flatten.js
|
|
108
|
-
function flatten(object, options = {}) {
|
|
109
|
-
const { prefix = "" } = options;
|
|
110
|
-
const result = {};
|
|
111
|
-
for (const [key, value] of Object.entries(object)) {
|
|
112
|
-
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
113
|
-
if (value !== null && typeof value === "object" && !Array.isArray(value)) Object.assign(result, flatten(value, { prefix: fullKey }));
|
|
114
|
-
else result[fullKey] = value;
|
|
115
|
-
}
|
|
116
|
-
return result;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
//#endregion
|
|
120
|
-
//#region ../core/dist/dev/core/i18n/utils/flatten.js
|
|
121
|
-
function flattenTranslations(locale, options = {}) {
|
|
122
|
-
return flatten(locale, options);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
//#endregion
|
|
126
|
-
//#region ../core/dist/dev/core/i18n/registry.js
|
|
127
|
-
/**
|
|
128
|
-
* Well-known key for the shared registry. Its name and value shape are a cross-version contract:
|
|
129
|
-
* every copy of this module in a realm must agree on them, so change the key when the shape changes.
|
|
130
|
-
*/
|
|
131
|
-
const I18N_REGISTRY_KEY = Symbol.for("@videojs/i18n-registry");
|
|
132
|
-
/**
|
|
133
|
-
* The registry is realm-global rather than module-global so duplicate copies of this module
|
|
134
|
-
* converge on one set of translations.
|
|
135
|
-
*
|
|
136
|
-
* Duplication is normal, not a bug to fix upstream: separately loaded CDN bundles, a pinned and an
|
|
137
|
-
* unpinned URL for the same file, and two bundlers' output on one page all yield distinct module
|
|
138
|
-
* instances. With module-scoped state, a `registerI18n` call on one instance is invisible to the
|
|
139
|
-
* player reading from another, and the locale silently falls back to English.
|
|
140
|
-
*/
|
|
141
|
-
function getRegistry() {
|
|
142
|
-
const host = globalThis;
|
|
143
|
-
const existing = host[I18N_REGISTRY_KEY];
|
|
144
|
-
if (existing) return existing;
|
|
145
|
-
const registry = {
|
|
146
|
-
layers: /* @__PURE__ */ new Map(),
|
|
147
|
-
subscribers: /* @__PURE__ */ new Set()
|
|
148
|
-
};
|
|
149
|
-
host[I18N_REGISTRY_KEY] = registry;
|
|
150
|
-
return registry;
|
|
151
|
-
}
|
|
152
|
-
function notify() {
|
|
153
|
-
for (const cb of getRegistry().subscribers) cb();
|
|
154
|
-
}
|
|
155
|
-
function normalizeLocaleTag(tag) {
|
|
156
|
-
return tag.trim().replaceAll("_", "-").toLowerCase();
|
|
157
|
-
}
|
|
158
|
-
/** Strip unicode locale extension sequences (`-u-…`) before any private-use `-x-` block. */
|
|
159
|
-
function stripUnicodeExtensions(tag) {
|
|
160
|
-
const xIdx = tag.indexOf("-x-");
|
|
161
|
-
const uIdx = (xIdx === -1 ? tag : tag.slice(0, xIdx)).indexOf("-u-");
|
|
162
|
-
if (uIdx === -1) return tag;
|
|
163
|
-
return tag.slice(0, uIdx) + (xIdx === -1 ? "" : tag.slice(xIdx));
|
|
164
|
-
}
|
|
165
|
-
function chineseFallback(segments) {
|
|
166
|
-
if (segments[0] !== "zh") return;
|
|
167
|
-
const script = segments.find((segment) => segment === "hant" || segment === "hans");
|
|
168
|
-
return script === "hant" ? "zh-tw" : script === "hans" ? "zh-cn" : void 0;
|
|
169
|
-
}
|
|
170
|
-
/** Registry map key: normalized tag with unicode extensions removed (same base as {@link findLocaleKeys}). */
|
|
171
|
-
function getCanonicalLocaleKey(locale) {
|
|
172
|
-
return stripUnicodeExtensions(normalizeLocaleTag(locale));
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Most-specific-first BCP 47 lookup tags (normalized). Always ends with `en` when missing from the truncated chain.
|
|
176
|
-
*
|
|
177
|
-
* @example `es-419-u-nu-latn` → `['es-419', 'es', 'en']`
|
|
178
|
-
*/
|
|
179
|
-
function findLocaleKeys(locale) {
|
|
180
|
-
const base = getCanonicalLocaleKey(locale);
|
|
181
|
-
if (!base) return ["en"];
|
|
182
|
-
const segments = base.split("-").filter(Boolean);
|
|
183
|
-
const chain = [];
|
|
184
|
-
for (let len = segments.length; len >= 1; len--) chain.push(segments.slice(0, len).join("-"));
|
|
185
|
-
const zhFallback = chineseFallback(segments);
|
|
186
|
-
const zhIndex = chain.indexOf("zh");
|
|
187
|
-
if (zhFallback && zhIndex !== -1) chain.splice(zhIndex, 0, zhFallback);
|
|
188
|
-
const out = [];
|
|
189
|
-
const seen = /* @__PURE__ */ new Set();
|
|
190
|
-
for (const tag of chain) if (!seen.has(tag)) {
|
|
191
|
-
seen.add(tag);
|
|
192
|
-
out.push(tag);
|
|
193
|
-
}
|
|
194
|
-
if (!seen.has("en")) out.push("en");
|
|
195
|
-
return out;
|
|
196
|
-
}
|
|
197
|
-
function mergeI18nTranslations(chain) {
|
|
198
|
-
const { layers } = getRegistry();
|
|
199
|
-
const merged = {};
|
|
200
|
-
for (let i = chain.length - 1; i >= 0; i--) {
|
|
201
|
-
const tag = chain[i];
|
|
202
|
-
const layer = layers.get(tag);
|
|
203
|
-
if (layer) Object.assign(merged, layer);
|
|
204
|
-
}
|
|
205
|
-
return merged;
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Register or merge translation strings for a BCP 47 locale tag.
|
|
209
|
-
*
|
|
210
|
-
* @param locale - BCP 47 tag (normalized to lowercase; unicode extensions stripped for the registry key).
|
|
211
|
-
* @param translations - Partial nested locale values; merges with any existing layer for the tag.
|
|
212
|
-
* @public
|
|
213
|
-
*/
|
|
214
|
-
function registerI18n(locale, translations) {
|
|
215
|
-
const { layers } = getRegistry();
|
|
216
|
-
const tag = getCanonicalLocaleKey(locale);
|
|
217
|
-
const existing = layers.get(tag) ?? {};
|
|
218
|
-
layers.set(tag, {
|
|
219
|
-
...existing,
|
|
220
|
-
...flattenTranslations(translations)
|
|
221
|
-
});
|
|
222
|
-
notify();
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Return the merged registered translation map for a locale. Built-in English defaults are supplied by text descriptors.
|
|
226
|
-
*
|
|
227
|
-
* @param locale - BCP 47 tag to resolve (e.g. `es-MX`, `zh-Hant-HK`).
|
|
228
|
-
* @public
|
|
229
|
-
*/
|
|
230
|
-
function getI18nTranslations(locale) {
|
|
231
|
-
return mergeI18nTranslations(findLocaleKeys(locale));
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Subscribe to global registry mutations (for example after `registerI18n` or browser translation prefetch).
|
|
235
|
-
*
|
|
236
|
-
* @param callback - Invoked when any locale layer changes.
|
|
237
|
-
* @public
|
|
238
|
-
*/
|
|
239
|
-
function onI18nRegistryChange(callback) {
|
|
240
|
-
const { subscribers } = getRegistry();
|
|
241
|
-
subscribers.add(callback);
|
|
242
|
-
return () => {
|
|
243
|
-
subscribers.delete(callback);
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Whether an exact locale tag has been registered via `registerI18n` (not whether lazy packs exist).
|
|
248
|
-
*
|
|
249
|
-
* @param locale - BCP 47 tag to test.
|
|
250
|
-
* @public
|
|
251
|
-
*/
|
|
252
|
-
function hasRegisteredLocale(locale) {
|
|
253
|
-
return getRegistry().layers.has(getCanonicalLocaleKey(locale));
|
|
254
|
-
}
|
|
255
|
-
|
|
256
107
|
//#endregion
|
|
257
108
|
//#region ../core/dist/dev/core/i18n/browser-translation.js
|
|
258
109
|
const NAMED_PLACEHOLDER = /\{([^{}]+)\}/g;
|
|
@@ -357,7 +208,7 @@ const loaders = {
|
|
|
357
208
|
az: () => import("./az-BXA58gAV.js").then((n) => n.n),
|
|
358
209
|
bs: () => import("./bs-BGd6Lc0X.js").then((n) => n.n),
|
|
359
210
|
bg: () => import("./bg-CNMY77ir.js").then((n) => n.n),
|
|
360
|
-
bn: () => import("./bn-
|
|
211
|
+
bn: () => import("./bn-CcLIScl6.js").then((n) => n.n),
|
|
361
212
|
ca: () => import("./ca-tFUfQ2mI.js").then((n) => n.n),
|
|
362
213
|
cs: () => import("./cs-B9lsmY_k.js").then((n) => n.n),
|
|
363
214
|
cy: () => import("./cy-DW6qAdUj.js").then((n) => n.n),
|
package/cdn/i18n.dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.dev.js","names":[],"sources":["../../core/dist/dev/i18n/locales/en.js","../../utils/dist/object/flatten.js","../../core/dist/dev/core/i18n/utils/flatten.js","../../core/dist/dev/core/i18n/registry.js","../../core/dist/dev/core/i18n/browser-translation.js","../../core/dist/dev/core/i18n/load-locale.js","../../core/dist/dev/core/i18n/resolve-translation.js","../../core/dist/dev/core/i18n/text.js","../../core/dist/dev/core/i18n/translator.js"],"sourcesContent":["//#region src/core/i18n/locales/en.ts\nvar en_default = {\n\tbuttons: {\n\t\tplay: \"Play\",\n\t\tpause: \"Pause\",\n\t\treplay: \"Replay\",\n\t\tmute: \"Mute\",\n\t\tunmute: \"Unmute\"\n\t},\n\tseek: {\n\t\tforward: \"Seek forward {seconds} seconds\",\n\t\tbackward: \"Seek backward {seconds} seconds\"\n\t},\n\tfullscreen: {\n\t\tenter: \"Enter fullscreen\",\n\t\texit: \"Exit fullscreen\"\n\t},\n\tcaptions: {\n\t\tenable: \"Enable captions\",\n\t\tdisable: \"Disable captions\"\n\t},\n\tpip: {\n\t\tenter: \"Enter picture-in-picture\",\n\t\texit: \"Exit picture-in-picture\"\n\t},\n\tlive: {\n\t\tplaying: \"Playing live\",\n\t\tseekToEdge: \"Seek to live edge\",\n\t\tbadge: \"Live\"\n\t},\n\tcast: {\n\t\tstart: \"Start casting\",\n\t\tstop: \"Stop casting\",\n\t\tconnecting: \"Connecting\"\n\t},\n\tairplay: {\n\t\tstart: \"Start AirPlay\",\n\t\tstop: \"Stop AirPlay\"\n\t},\n\tslider: { seek: \"Seek\" },\n\ttime: {\n\t\tcurrent: \"Current time\",\n\t\tduration: \"Duration\",\n\t\tremaining: \"Remaining\",\n\t\telapsedSuffix: \"{duration} elapsed\",\n\t\tdurationSuffix: \"{duration} duration\",\n\t\tremainingSuffix: \"{duration} remaining\",\n\t\tshowElapsed: \"Show elapsed time, {duration}.\",\n\t\tshowDuration: \"Show duration, {duration}.\",\n\t\tshowRemaining: \"Show remaining time, {duration}.\",\n\t\ttoggleElapsed: \"Toggle between elapsed and remaining time.\",\n\t\ttoggleDuration: \"Toggle between duration and remaining time.\",\n\t\tposition: \"{current} of {duration}\"\n\t},\n\tplayback: { rate: \"Playback rate {rate}\" },\n\tvolume: {\n\t\tmutedValue: \"{percent}, muted\",\n\t\tmuted: \"Muted\",\n\t\tlabel: \"Volume\",\n\t\tvalue: \"Volume {value}\"\n\t},\n\tstatus: {\n\t\tcaptionsOn: \"Captions on\",\n\t\tcaptionsOff: \"Captions off\",\n\t\tpaused: \"Paused\",\n\t\tplaying: \"Playing\",\n\t\tfullscreen: \"Fullscreen\",\n\t\tpip: \"Picture in picture\",\n\t\texitPip: \"Exit picture in picture\",\n\t\tseekedTo: \"Seeked to {time}\"\n\t},\n\tcontainer: { label: \"Media player\" },\n\terrors: {\n\t\taborted: \"You stopped media playback before it finished.\",\n\t\tnetwork: \"This media could not be loaded due to a network or server issue.\",\n\t\tdecode: \"This media could not be played. It may be corrupted, or your browser may not support its format.\",\n\t\tsource: \"This media could not be loaded. It may be unavailable, or your browser may not support its format.\",\n\t\tencrypted: \"This media could not be played because it could not be decrypted.\",\n\t\tunplayable: \"This media is unsupported by the player.\",\n\t\ttitle: \"Something went wrong.\",\n\t\tunexpected: \"An unexpected error occurred.\"\n\t},\n\tcommon: {\n\t\tempty: \"\",\n\t\tok: \"OK\"\n\t},\n\tmenu: {\n\t\tsettings: \"Settings\",\n\t\tquality: \"Quality\",\n\t\taudio: \"Audio\",\n\t\tdefault: \"Default\",\n\t\tspeed: \"Speed\",\n\t\tcaptions: \"Captions\",\n\t\tplaybackRate: \"Playback rate\",\n\t\tback: \"Back\",\n\t\toff: \"Off\",\n\t\tauto: \"Auto\",\n\t\tautoWithLabel: \"Auto ({label})\",\n\t\tsubtitles: \"Subtitles\"\n\t}\n};\n//#endregion\nexport { en_default as default };\n\n//# sourceMappingURL=en.js.map","//#region src/object/flatten.ts\nfunction flatten(object, options = {}) {\n\tconst { prefix = \"\" } = options;\n\tconst result = {};\n\tfor (const [key, value] of Object.entries(object)) {\n\t\tconst fullKey = prefix ? `${prefix}.${key}` : key;\n\t\tif (value !== null && typeof value === \"object\" && !Array.isArray(value)) Object.assign(result, flatten(value, { prefix: fullKey }));\n\t\telse result[fullKey] = value;\n\t}\n\treturn result;\n}\n//#endregion\nexport { flatten };\n\n//# sourceMappingURL=flatten.js.map","import { flatten } from \"@videojs/utils/object\";\n//#region src/core/i18n/utils/flatten.ts\nfunction flattenTranslations(locale, options = {}) {\n\treturn flatten(locale, options);\n}\n//#endregion\nexport { flattenTranslations };\n\n//# sourceMappingURL=flatten.js.map","import { flattenTranslations } from \"./utils/flatten.js\";\nimport { DEFAULT_LOCALE } from \"@videojs/utils/i18n\";\n//#region src/core/i18n/registry.ts\n/**\n* Well-known key for the shared registry. Its name and value shape are a cross-version contract:\n* every copy of this module in a realm must agree on them, so change the key when the shape changes.\n*/\nconst I18N_REGISTRY_KEY = Symbol.for(\"@videojs/i18n-registry\");\n/**\n* The registry is realm-global rather than module-global so duplicate copies of this module\n* converge on one set of translations.\n*\n* Duplication is normal, not a bug to fix upstream: separately loaded CDN bundles, a pinned and an\n* unpinned URL for the same file, and two bundlers' output on one page all yield distinct module\n* instances. With module-scoped state, a `registerI18n` call on one instance is invisible to the\n* player reading from another, and the locale silently falls back to English.\n*/\nfunction getRegistry() {\n\tconst host = globalThis;\n\tconst existing = host[I18N_REGISTRY_KEY];\n\tif (existing) return existing;\n\tconst registry = {\n\t\tlayers: /* @__PURE__ */ new Map(),\n\t\tsubscribers: /* @__PURE__ */ new Set()\n\t};\n\thost[I18N_REGISTRY_KEY] = registry;\n\treturn registry;\n}\nfunction notify() {\n\tfor (const cb of getRegistry().subscribers) cb();\n}\nfunction normalizeLocaleTag(tag) {\n\treturn tag.trim().replaceAll(\"_\", \"-\").toLowerCase();\n}\n/** Strip unicode locale extension sequences (`-u-…`) before any private-use `-x-` block. */\nfunction stripUnicodeExtensions(tag) {\n\tconst xIdx = tag.indexOf(\"-x-\");\n\tconst uIdx = (xIdx === -1 ? tag : tag.slice(0, xIdx)).indexOf(\"-u-\");\n\tif (uIdx === -1) return tag;\n\treturn tag.slice(0, uIdx) + (xIdx === -1 ? \"\" : tag.slice(xIdx));\n}\nfunction chineseFallback(segments) {\n\tif (segments[0] !== \"zh\") return;\n\tconst script = segments.find((segment) => segment === \"hant\" || segment === \"hans\");\n\treturn script === \"hant\" ? \"zh-tw\" : script === \"hans\" ? \"zh-cn\" : void 0;\n}\n/** Registry map key: normalized tag with unicode extensions removed (same base as {@link findLocaleKeys}). */\nfunction getCanonicalLocaleKey(locale) {\n\treturn stripUnicodeExtensions(normalizeLocaleTag(locale));\n}\n/**\n* Most-specific-first BCP 47 lookup tags (normalized). Always ends with `en` when missing from the truncated chain.\n*\n* @example `es-419-u-nu-latn` → `['es-419', 'es', 'en']`\n*/\nfunction findLocaleKeys(locale) {\n\tconst base = getCanonicalLocaleKey(locale);\n\tif (!base) return [DEFAULT_LOCALE];\n\tconst segments = base.split(\"-\").filter(Boolean);\n\tconst chain = [];\n\tfor (let len = segments.length; len >= 1; len--) chain.push(segments.slice(0, len).join(\"-\"));\n\tconst zhFallback = chineseFallback(segments);\n\tconst zhIndex = chain.indexOf(\"zh\");\n\tif (zhFallback && zhIndex !== -1) chain.splice(zhIndex, 0, zhFallback);\n\tconst out = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const tag of chain) if (!seen.has(tag)) {\n\t\tseen.add(tag);\n\t\tout.push(tag);\n\t}\n\tif (!seen.has(DEFAULT_LOCALE)) out.push(DEFAULT_LOCALE);\n\treturn out;\n}\nfunction mergeI18nTranslations(chain) {\n\tconst { layers } = getRegistry();\n\tconst merged = {};\n\tfor (let i = chain.length - 1; i >= 0; i--) {\n\t\tconst tag = chain[i];\n\t\tconst layer = layers.get(tag);\n\t\tif (layer) Object.assign(merged, layer);\n\t}\n\treturn merged;\n}\n/**\n* Register or merge translation strings for a BCP 47 locale tag.\n*\n* @param locale - BCP 47 tag (normalized to lowercase; unicode extensions stripped for the registry key).\n* @param translations - Partial nested locale values; merges with any existing layer for the tag.\n* @public\n*/\nfunction registerI18n(locale, translations) {\n\tconst { layers } = getRegistry();\n\tconst tag = getCanonicalLocaleKey(locale);\n\tconst existing = layers.get(tag) ?? {};\n\tlayers.set(tag, {\n\t\t...existing,\n\t\t...flattenTranslations(translations)\n\t});\n\tnotify();\n}\n/**\n* Return the merged registered translation map for a locale. Built-in English defaults are supplied by text descriptors.\n*\n* @param locale - BCP 47 tag to resolve (e.g. `es-MX`, `zh-Hant-HK`).\n* @public\n*/\nfunction getI18nTranslations(locale) {\n\treturn mergeI18nTranslations(findLocaleKeys(locale));\n}\n/**\n* Subscribe to global registry mutations (for example after `registerI18n` or browser translation prefetch).\n*\n* @param callback - Invoked when any locale layer changes.\n* @public\n*/\nfunction onI18nRegistryChange(callback) {\n\tconst { subscribers } = getRegistry();\n\tsubscribers.add(callback);\n\treturn () => {\n\t\tsubscribers.delete(callback);\n\t};\n}\n/**\n* Whether an exact locale tag has been registered via `registerI18n` (not whether lazy packs exist).\n*\n* @param locale - BCP 47 tag to test.\n* @public\n*/\nfunction hasRegisteredLocale(locale) {\n\treturn getRegistry().layers.has(getCanonicalLocaleKey(locale));\n}\n/** Clears registered locale overlays (test isolation). */\nfunction resetI18nRegistry() {\n\tconst { layers, subscribers } = getRegistry();\n\tlayers.clear();\n\tsubscribers.clear();\n}\n//#endregion\nexport { findLocaleKeys, getCanonicalLocaleKey, getI18nTranslations, hasRegisteredLocale, onI18nRegistryChange, registerI18n, resetI18nRegistry };\n\n//# sourceMappingURL=registry.js.map","import en_default from \"../../i18n/locales/en.js\";\nimport { flattenTranslations } from \"./utils/flatten.js\";\nimport { findLocaleKeys, hasRegisteredLocale } from \"./registry.js\";\nimport { DEFAULT_LOCALE } from \"@videojs/utils/i18n\";\n//#region src/core/i18n/browser-translation.ts\nconst NAMED_PLACEHOLDER = /\\{([^{}]+)\\}/g;\nconst INDEX_PLACEHOLDER = /\\{\\s*(\\d+)\\s*\\}/g;\n/**\n* Replaces `{seconds}` with `{0}`, `{1}`, … so the Browser Translation API sees one full\n* sentence (grammar/word order preserved) while opaque numeric slots are left alone.\n*/\nfunction maskNamedPlaceholders(source) {\n\tconst slots = [];\n\treturn {\n\t\tmasked: source.replace(NAMED_PLACEHOLDER, (_, name) => {\n\t\t\tslots.push(name);\n\t\t\treturn `{${slots.length - 1}}`;\n\t\t}),\n\t\tslots\n\t};\n}\nfunction restoreNamedPlaceholders(translated, slots) {\n\treturn translated.replace(INDEX_PLACEHOLDER, (match, index) => {\n\t\tconst name = slots[Number(index)];\n\t\treturn name !== void 0 ? `{${name}}` : match;\n\t});\n}\nasync function translateProtectingPlaceholders(translator, value) {\n\tconst { masked, slots } = maskNamedPlaceholders(value);\n\tif (slots.length === 0) return translator.translate(value);\n\treturn restoreNamedPlaceholders(await translator.translate(masked), slots);\n}\nconst cache = /* @__PURE__ */ new Map();\nfunction isEnglishLocaleTag(tag) {\n\treturn tag === DEFAULT_LOCALE || tag.startsWith(`${DEFAULT_LOCALE}-`);\n}\nfunction getBrowserTranslator() {\n\tif (!(\"Translator\" in globalThis)) return void 0;\n\treturn globalThis.Translator;\n}\n/** First non-English tag in the lookup chain used as the browser translation target. */\nfunction resolveBrowserTranslationTarget(locale) {\n\tfor (const tag of findLocaleKeys(locale)) if (!isEnglishLocaleTag(tag)) return tag;\n}\n/** Whether to invoke the Browser Translation API for this locale after lazy built-in loading. */\nfunction shouldAttemptBrowserTranslation(locale, loadedLazyTags, translations) {\n\tif (!resolveBrowserTranslationTarget(locale)) return false;\n\tif (loadedLazyTags.some((tag) => !isEnglishLocaleTag(tag))) return translations !== void 0 && hasMissingEnglishTranslations(translations);\n\treturn !findLocaleKeys(locale).some((tag) => !isEnglishLocaleTag(tag) && hasRegisteredLocale(tag));\n}\nfunction hasMissingEnglishTranslations(translations) {\n\tconst english = flattenTranslations(en_default);\n\treturn Object.keys(english).some((key) => translations[key] === void 0);\n}\n/**\n* Translates English registry values via the on-device Browser Translation API when a pre-installed\n* model is available. Results are cached per target language tag.\n*/\nasync function getBrowserTranslations(locale, options) {\n\tconst target = resolveBrowserTranslationTarget(locale);\n\tif (!target) return {};\n\tconst cached = cache.get(target);\n\tif (cached) return cached;\n\tconst Translator = getBrowserTranslator();\n\tif (!Translator) return {};\n\tconst downloadIfNeeded = options?.downloadIfNeeded ?? false;\n\tconst availability = await Translator.availability({\n\t\tsourceLanguage: DEFAULT_LOCALE,\n\t\ttargetLanguage: target\n\t});\n\tif (availability === \"unavailable\") return {};\n\tif (!downloadIfNeeded && availability !== \"available\") return {};\n\tconst needsDownload = downloadIfNeeded && (availability === \"downloadable\" || availability === \"downloading\");\n\tlet downloadStarted = false;\n\tconst notifyDownloadStart = () => {\n\t\tif (!needsDownload || downloadStarted) return;\n\t\tdownloadStarted = true;\n\t\toptions?.onModelDownload?.start?.(target);\n\t};\n\tnotifyDownloadStart();\n\tconst english = flattenTranslations(en_default);\n\tconst keys = Object.keys(english);\n\tconst translator = await Translator.create({\n\t\tsourceLanguage: DEFAULT_LOCALE,\n\t\ttargetLanguage: target,\n\t\t...downloadIfNeeded ? { monitor(monitor) {\n\t\t\tmonitor.addEventListener(\"downloadprogress\", notifyDownloadStart);\n\t\t} } : {}\n\t});\n\tif (downloadStarted) options?.onModelDownload?.finish?.(target);\n\tconst entries = await Promise.all(keys.map(async (key) => {\n\t\tconst value = english[key];\n\t\tif (!value) return [key, \"\"];\n\t\treturn [key, await translateProtectingPlaceholders(translator, value)];\n\t}));\n\tconst result = Object.fromEntries(entries);\n\tcache.set(target, result);\n\treturn result;\n}\n/** Clears the browser translation cache (test isolation). */\nfunction resetBrowserTranslationCacheForTesting() {\n\tcache.clear();\n}\n//#endregion\nexport { getBrowserTranslations, resetBrowserTranslationCacheForTesting, resolveBrowserTranslationTarget, shouldAttemptBrowserTranslation };\n\n//# sourceMappingURL=browser-translation.js.map","import { flattenTranslations } from \"./utils/flatten.js\";\nimport { findLocaleKeys, getCanonicalLocaleKey, hasRegisteredLocale } from \"./registry.js\";\n//#region src/core/i18n/load-locale.ts\nconst loaders = {\n\tar: () => import(\"../../i18n/locales/ar.js\"),\n\taz: () => import(\"../../i18n/locales/az.js\"),\n\tbs: () => import(\"../../i18n/locales/bs.js\"),\n\tbg: () => import(\"../../i18n/locales/bg.js\"),\n\tbn: () => import(\"../../i18n/locales/bn.js\"),\n\tca: () => import(\"../../i18n/locales/ca.js\"),\n\tcs: () => import(\"../../i18n/locales/cs.js\"),\n\tcy: () => import(\"../../i18n/locales/cy.js\"),\n\tda: () => import(\"../../i18n/locales/da.js\"),\n\tde: () => import(\"../../i18n/locales/de.js\"),\n\tel: () => import(\"../../i18n/locales/el.js\"),\n\tes: () => import(\"../../i18n/locales/es.js\"),\n\tet: () => import(\"../../i18n/locales/et.js\"),\n\teu: () => import(\"../../i18n/locales/eu.js\"),\n\tfa: () => import(\"../../i18n/locales/fa.js\"),\n\tfi: () => import(\"../../i18n/locales/fi.js\"),\n\tfr: () => import(\"../../i18n/locales/fr.js\"),\n\tgd: () => import(\"../../i18n/locales/gd.js\"),\n\tgl: () => import(\"../../i18n/locales/gl.js\"),\n\the: () => import(\"../../i18n/locales/he.js\"),\n\thi: () => import(\"../../i18n/locales/hi.js\"),\n\thr: () => import(\"../../i18n/locales/hr.js\"),\n\thu: () => import(\"../../i18n/locales/hu.js\"),\n\tid: () => import(\"../../i18n/locales/id.js\"),\n\tit: () => import(\"../../i18n/locales/it.js\"),\n\tja: () => import(\"../../i18n/locales/ja.js\"),\n\tko: () => import(\"../../i18n/locales/ko.js\"),\n\tlt: () => import(\"../../i18n/locales/lt.js\"),\n\tlv: () => import(\"../../i18n/locales/lv.js\"),\n\tmr: () => import(\"../../i18n/locales/mr.js\"),\n\tnb: () => import(\"../../i18n/locales/nb.js\"),\n\tnl: () => import(\"../../i18n/locales/nl.js\"),\n\tnn: () => import(\"../../i18n/locales/nn.js\"),\n\tne: () => import(\"../../i18n/locales/ne.js\"),\n\toc: () => import(\"../../i18n/locales/oc.js\"),\n\tpl: () => import(\"../../i18n/locales/pl.js\"),\n\t\"pt-br\": () => import(\"../../i18n/locales/pt-BR.js\"),\n\t\"pt-pt\": () => import(\"../../i18n/locales/pt-PT.js\"),\n\tro: () => import(\"../../i18n/locales/ro.js\"),\n\tru: () => import(\"../../i18n/locales/ru.js\"),\n\tsk: () => import(\"../../i18n/locales/sk.js\"),\n\tsl: () => import(\"../../i18n/locales/sl.js\"),\n\tsr: () => import(\"../../i18n/locales/sr.js\"),\n\tsv: () => import(\"../../i18n/locales/sv.js\"),\n\tte: () => import(\"../../i18n/locales/te.js\"),\n\tth: () => import(\"../../i18n/locales/th.js\"),\n\ttr: () => import(\"../../i18n/locales/tr.js\"),\n\tuk: () => import(\"../../i18n/locales/uk.js\"),\n\tvi: () => import(\"../../i18n/locales/vi.js\"),\n\t\"zh-cn\": () => import(\"../../i18n/locales/zh-CN.js\"),\n\t\"zh-tw\": () => import(\"../../i18n/locales/zh-TW.js\"),\n\tpt: () => import(\"../../i18n/locales/pt.js\"),\n\tzh: () => import(\"../../i18n/locales/zh.js\")\n};\n/** Lazy-import a shipped locale pack when the tag is not already in the registry. */\nasync function loadLocale(tag) {\n\tif (hasRegisteredLocale(tag)) return void 0;\n\tfor (const chainTag of findLocaleKeys(tag)) {\n\t\tif (hasRegisteredLocale(chainTag)) return void 0;\n\t\tconst load = loaders[getCanonicalLocaleKey(chainTag)];\n\t\tif (load) return flattenTranslations((await load()).default);\n\t}\n}\n//#endregion\nexport { loadLocale };\n\n//# sourceMappingURL=load-locale.js.map","//#region src/core/i18n/resolve-translation.ts\n/** Resolves a semantic key with optional template params via a translator. */\nfunction resolveTranslation(translator, key, ...args) {\n\tconst [params] = args;\n\tconst translate = translator;\n\treturn params !== void 0 ? translate(key, params) : translate(key);\n}\n//#endregion\nexport { resolveTranslation };\n\n//# sourceMappingURL=resolve-translation.js.map","import { isObject } from \"@videojs/utils/predicate\";\n//#region src/core/i18n/text.ts\nfunction isText(value) {\n\treturn isObject(value) && \"key\" in value && \"text\" in value;\n}\n//#endregion\nexport { isText };\n\n//# sourceMappingURL=text.js.map","import { interpolate } from \"./utils/interpolate.js\";\n//#region src/core/i18n/translator.ts\n/**\n* Builds a typed translator from a resolved translation map (typically from `getI18nTranslations`).\n*\n* @param translations - Merged translation map for the active locale.\n* @param locale - BCP 47 tag associated with the map (reserved for future locale-aware behavior).\n* @public\n*/\nfunction createTranslator(translations, locale) {\n\tconst translate = (input, params) => {\n\t\tconst options = params;\n\t\tconst isDescriptor = typeof input !== \"string\";\n\t\tconst key = isDescriptor ? input.key : input;\n\t\tconst translation = translations[key];\n\t\tif (translation === void 0 && !isDescriptor && options?.default === void 0) console.warn(`[videojs] Missing translation for \"${key}\".`);\n\t\tconst fallback = options?.default;\n\t\tconst values = options ? { ...options } : void 0;\n\t\tif (values) delete values.default;\n\t\treturn interpolate(translation ?? (isDescriptor ? input.text : fallback) ?? String(key), values);\n\t};\n\treturn translate;\n}\n//#endregion\nexport { createTranslator };\n\n//# sourceMappingURL=translator.js.map"],"mappings":";;;;AACA,IAAI,aAAa;CAChB,SAAS;EACR,MAAM;EACN,OAAO;EACP,QAAQ;EACR,MAAM;EACN,QAAQ;CACT;CACA,MAAM;EACL,SAAS;EACT,UAAU;CACX;CACA,YAAY;EACX,OAAO;EACP,MAAM;CACP;CACA,UAAU;EACT,QAAQ;EACR,SAAS;CACV;CACA,KAAK;EACJ,OAAO;EACP,MAAM;CACP;CACA,MAAM;EACL,SAAS;EACT,YAAY;EACZ,OAAO;CACR;CACA,MAAM;EACL,OAAO;EACP,MAAM;EACN,YAAY;CACb;CACA,SAAS;EACR,OAAO;EACP,MAAM;CACP;CACA,QAAQ,EAAE,MAAM,OAAO;CACvB,MAAM;E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AI,QAAQ,OAAO,OAAO;EAC1B,OAAO,YAAY,gBAAgB,eAAe,MAAM,OAAO,aAAa,OAAO,GAAG,GAAG,MAAM;CAChG;CACA,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"i18n.dev.js","names":[],"sources":["../../core/dist/dev/i18n/locales/en.js","../../core/dist/dev/core/i18n/browser-translation.js","../../core/dist/dev/core/i18n/load-locale.js","../../core/dist/dev/core/i18n/resolve-translation.js","../../core/dist/dev/core/i18n/text.js","../../core/dist/dev/core/i18n/translator.js"],"sourcesContent":["//#region src/core/i18n/locales/en.ts\nvar en_default = {\n\tbuttons: {\n\t\tplay: \"Play\",\n\t\tpause: \"Pause\",\n\t\treplay: \"Replay\",\n\t\tmute: \"Mute\",\n\t\tunmute: \"Unmute\"\n\t},\n\tseek: {\n\t\tforward: \"Seek forward {seconds} seconds\",\n\t\tbackward: \"Seek backward {seconds} seconds\"\n\t},\n\tfullscreen: {\n\t\tenter: \"Enter fullscreen\",\n\t\texit: \"Exit fullscreen\"\n\t},\n\tcaptions: {\n\t\tenable: \"Enable captions\",\n\t\tdisable: \"Disable captions\"\n\t},\n\tpip: {\n\t\tenter: \"Enter picture-in-picture\",\n\t\texit: \"Exit picture-in-picture\"\n\t},\n\tlive: {\n\t\tplaying: \"Playing live\",\n\t\tseekToEdge: \"Seek to live edge\",\n\t\tbadge: \"Live\"\n\t},\n\tcast: {\n\t\tstart: \"Start casting\",\n\t\tstop: \"Stop casting\",\n\t\tconnecting: \"Connecting\"\n\t},\n\tairplay: {\n\t\tstart: \"Start AirPlay\",\n\t\tstop: \"Stop AirPlay\"\n\t},\n\tslider: { seek: \"Seek\" },\n\ttime: {\n\t\tcurrent: \"Current time\",\n\t\tduration: \"Duration\",\n\t\tremaining: \"Remaining\",\n\t\telapsedSuffix: \"{duration} elapsed\",\n\t\tdurationSuffix: \"{duration} duration\",\n\t\tremainingSuffix: \"{duration} remaining\",\n\t\tshowElapsed: \"Show elapsed time, {duration}.\",\n\t\tshowDuration: \"Show duration, {duration}.\",\n\t\tshowRemaining: \"Show remaining time, {duration}.\",\n\t\ttoggleElapsed: \"Toggle between elapsed and remaining time.\",\n\t\ttoggleDuration: \"Toggle between duration and remaining time.\",\n\t\tposition: \"{current} of {duration}\"\n\t},\n\tplayback: { rate: \"Playback rate {rate}\" },\n\tvolume: {\n\t\tmutedValue: \"{percent}, muted\",\n\t\tmuted: \"Muted\",\n\t\tlabel: \"Volume\",\n\t\tvalue: \"Volume {value}\"\n\t},\n\tstatus: {\n\t\tcaptionsOn: \"Captions on\",\n\t\tcaptionsOff: \"Captions off\",\n\t\tpaused: \"Paused\",\n\t\tplaying: \"Playing\",\n\t\tfullscreen: \"Fullscreen\",\n\t\tpip: \"Picture in picture\",\n\t\texitPip: \"Exit picture in picture\",\n\t\tseekedTo: \"Seeked to {time}\"\n\t},\n\tcontainer: { label: \"Media player\" },\n\terrors: {\n\t\taborted: \"You stopped media playback before it finished.\",\n\t\tnetwork: \"This media could not be loaded due to a network or server issue.\",\n\t\tdecode: \"This media could not be played. It may be corrupted, or your browser may not support its format.\",\n\t\tsource: \"This media could not be loaded. It may be unavailable, or your browser may not support its format.\",\n\t\tencrypted: \"This media could not be played because it could not be decrypted.\",\n\t\tunplayable: \"This media is unsupported by the player.\",\n\t\ttitle: \"Something went wrong.\",\n\t\tunexpected: \"An unexpected error occurred.\"\n\t},\n\tcommon: {\n\t\tempty: \"\",\n\t\tok: \"OK\"\n\t},\n\tmenu: {\n\t\tsettings: \"Settings\",\n\t\tquality: \"Quality\",\n\t\taudio: \"Audio\",\n\t\tdefault: \"Default\",\n\t\tspeed: \"Speed\",\n\t\tcaptions: \"Captions\",\n\t\tplaybackRate: \"Playback rate\",\n\t\tback: \"Back\",\n\t\toff: \"Off\",\n\t\tauto: \"Auto\",\n\t\tautoWithLabel: \"Auto ({label})\",\n\t\tsubtitles: \"Subtitles\"\n\t}\n};\n//#endregion\nexport { en_default as default };\n\n//# sourceMappingURL=en.js.map","import en_default from \"../../i18n/locales/en.js\";\nimport { flattenTranslations } from \"./utils/flatten.js\";\nimport { findLocaleKeys, hasRegisteredLocale } from \"./registry.js\";\nimport { DEFAULT_LOCALE } from \"@videojs/utils/i18n\";\n//#region src/core/i18n/browser-translation.ts\nconst NAMED_PLACEHOLDER = /\\{([^{}]+)\\}/g;\nconst INDEX_PLACEHOLDER = /\\{\\s*(\\d+)\\s*\\}/g;\n/**\n* Replaces `{seconds}` with `{0}`, `{1}`, … so the Browser Translation API sees one full\n* sentence (grammar/word order preserved) while opaque numeric slots are left alone.\n*/\nfunction maskNamedPlaceholders(source) {\n\tconst slots = [];\n\treturn {\n\t\tmasked: source.replace(NAMED_PLACEHOLDER, (_, name) => {\n\t\t\tslots.push(name);\n\t\t\treturn `{${slots.length - 1}}`;\n\t\t}),\n\t\tslots\n\t};\n}\nfunction restoreNamedPlaceholders(translated, slots) {\n\treturn translated.replace(INDEX_PLACEHOLDER, (match, index) => {\n\t\tconst name = slots[Number(index)];\n\t\treturn name !== void 0 ? `{${name}}` : match;\n\t});\n}\nasync function translateProtectingPlaceholders(translator, value) {\n\tconst { masked, slots } = maskNamedPlaceholders(value);\n\tif (slots.length === 0) return translator.translate(value);\n\treturn restoreNamedPlaceholders(await translator.translate(masked), slots);\n}\nconst cache = /* @__PURE__ */ new Map();\nfunction isEnglishLocaleTag(tag) {\n\treturn tag === DEFAULT_LOCALE || tag.startsWith(`${DEFAULT_LOCALE}-`);\n}\nfunction getBrowserTranslator() {\n\tif (!(\"Translator\" in globalThis)) return void 0;\n\treturn globalThis.Translator;\n}\n/** First non-English tag in the lookup chain used as the browser translation target. */\nfunction resolveBrowserTranslationTarget(locale) {\n\tfor (const tag of findLocaleKeys(locale)) if (!isEnglishLocaleTag(tag)) return tag;\n}\n/** Whether to invoke the Browser Translation API for this locale after lazy built-in loading. */\nfunction shouldAttemptBrowserTranslation(locale, loadedLazyTags, translations) {\n\tif (!resolveBrowserTranslationTarget(locale)) return false;\n\tif (loadedLazyTags.some((tag) => !isEnglishLocaleTag(tag))) return translations !== void 0 && hasMissingEnglishTranslations(translations);\n\treturn !findLocaleKeys(locale).some((tag) => !isEnglishLocaleTag(tag) && hasRegisteredLocale(tag));\n}\nfunction hasMissingEnglishTranslations(translations) {\n\tconst english = flattenTranslations(en_default);\n\treturn Object.keys(english).some((key) => translations[key] === void 0);\n}\n/**\n* Translates English registry values via the on-device Browser Translation API when a pre-installed\n* model is available. Results are cached per target language tag.\n*/\nasync function getBrowserTranslations(locale, options) {\n\tconst target = resolveBrowserTranslationTarget(locale);\n\tif (!target) return {};\n\tconst cached = cache.get(target);\n\tif (cached) return cached;\n\tconst Translator = getBrowserTranslator();\n\tif (!Translator) return {};\n\tconst downloadIfNeeded = options?.downloadIfNeeded ?? false;\n\tconst availability = await Translator.availability({\n\t\tsourceLanguage: DEFAULT_LOCALE,\n\t\ttargetLanguage: target\n\t});\n\tif (availability === \"unavailable\") return {};\n\tif (!downloadIfNeeded && availability !== \"available\") return {};\n\tconst needsDownload = downloadIfNeeded && (availability === \"downloadable\" || availability === \"downloading\");\n\tlet downloadStarted = false;\n\tconst notifyDownloadStart = () => {\n\t\tif (!needsDownload || downloadStarted) return;\n\t\tdownloadStarted = true;\n\t\toptions?.onModelDownload?.start?.(target);\n\t};\n\tnotifyDownloadStart();\n\tconst english = flattenTranslations(en_default);\n\tconst keys = Object.keys(english);\n\tconst translator = await Translator.create({\n\t\tsourceLanguage: DEFAULT_LOCALE,\n\t\ttargetLanguage: target,\n\t\t...downloadIfNeeded ? { monitor(monitor) {\n\t\t\tmonitor.addEventListener(\"downloadprogress\", notifyDownloadStart);\n\t\t} } : {}\n\t});\n\tif (downloadStarted) options?.onModelDownload?.finish?.(target);\n\tconst entries = await Promise.all(keys.map(async (key) => {\n\t\tconst value = english[key];\n\t\tif (!value) return [key, \"\"];\n\t\treturn [key, await translateProtectingPlaceholders(translator, value)];\n\t}));\n\tconst result = Object.fromEntries(entries);\n\tcache.set(target, result);\n\treturn result;\n}\n/** Clears the browser translation cache (test isolation). */\nfunction resetBrowserTranslationCacheForTesting() {\n\tcache.clear();\n}\n//#endregion\nexport { getBrowserTranslations, resetBrowserTranslationCacheForTesting, resolveBrowserTranslationTarget, shouldAttemptBrowserTranslation };\n\n//# sourceMappingURL=browser-translation.js.map","import { flattenTranslations } from \"./utils/flatten.js\";\nimport { findLocaleKeys, getCanonicalLocaleKey, hasRegisteredLocale } from \"./registry.js\";\n//#region src/core/i18n/load-locale.ts\nconst loaders = {\n\tar: () => import(\"../../i18n/locales/ar.js\"),\n\taz: () => import(\"../../i18n/locales/az.js\"),\n\tbs: () => import(\"../../i18n/locales/bs.js\"),\n\tbg: () => import(\"../../i18n/locales/bg.js\"),\n\tbn: () => import(\"../../i18n/locales/bn.js\"),\n\tca: () => import(\"../../i18n/locales/ca.js\"),\n\tcs: () => import(\"../../i18n/locales/cs.js\"),\n\tcy: () => import(\"../../i18n/locales/cy.js\"),\n\tda: () => import(\"../../i18n/locales/da.js\"),\n\tde: () => import(\"../../i18n/locales/de.js\"),\n\tel: () => import(\"../../i18n/locales/el.js\"),\n\tes: () => import(\"../../i18n/locales/es.js\"),\n\tet: () => import(\"../../i18n/locales/et.js\"),\n\teu: () => import(\"../../i18n/locales/eu.js\"),\n\tfa: () => import(\"../../i18n/locales/fa.js\"),\n\tfi: () => import(\"../../i18n/locales/fi.js\"),\n\tfr: () => import(\"../../i18n/locales/fr.js\"),\n\tgd: () => import(\"../../i18n/locales/gd.js\"),\n\tgl: () => import(\"../../i18n/locales/gl.js\"),\n\the: () => import(\"../../i18n/locales/he.js\"),\n\thi: () => import(\"../../i18n/locales/hi.js\"),\n\thr: () => import(\"../../i18n/locales/hr.js\"),\n\thu: () => import(\"../../i18n/locales/hu.js\"),\n\tid: () => import(\"../../i18n/locales/id.js\"),\n\tit: () => import(\"../../i18n/locales/it.js\"),\n\tja: () => import(\"../../i18n/locales/ja.js\"),\n\tko: () => import(\"../../i18n/locales/ko.js\"),\n\tlt: () => import(\"../../i18n/locales/lt.js\"),\n\tlv: () => import(\"../../i18n/locales/lv.js\"),\n\tmr: () => import(\"../../i18n/locales/mr.js\"),\n\tnb: () => import(\"../../i18n/locales/nb.js\"),\n\tnl: () => import(\"../../i18n/locales/nl.js\"),\n\tnn: () => import(\"../../i18n/locales/nn.js\"),\n\tne: () => import(\"../../i18n/locales/ne.js\"),\n\toc: () => import(\"../../i18n/locales/oc.js\"),\n\tpl: () => import(\"../../i18n/locales/pl.js\"),\n\t\"pt-br\": () => import(\"../../i18n/locales/pt-BR.js\"),\n\t\"pt-pt\": () => import(\"../../i18n/locales/pt-PT.js\"),\n\tro: () => import(\"../../i18n/locales/ro.js\"),\n\tru: () => import(\"../../i18n/locales/ru.js\"),\n\tsk: () => import(\"../../i18n/locales/sk.js\"),\n\tsl: () => import(\"../../i18n/locales/sl.js\"),\n\tsr: () => import(\"../../i18n/locales/sr.js\"),\n\tsv: () => import(\"../../i18n/locales/sv.js\"),\n\tte: () => import(\"../../i18n/locales/te.js\"),\n\tth: () => import(\"../../i18n/locales/th.js\"),\n\ttr: () => import(\"../../i18n/locales/tr.js\"),\n\tuk: () => import(\"../../i18n/locales/uk.js\"),\n\tvi: () => import(\"../../i18n/locales/vi.js\"),\n\t\"zh-cn\": () => import(\"../../i18n/locales/zh-CN.js\"),\n\t\"zh-tw\": () => import(\"../../i18n/locales/zh-TW.js\"),\n\tpt: () => import(\"../../i18n/locales/pt.js\"),\n\tzh: () => import(\"../../i18n/locales/zh.js\")\n};\n/** Lazy-import a shipped locale pack when the tag is not already in the registry. */\nasync function loadLocale(tag) {\n\tif (hasRegisteredLocale(tag)) return void 0;\n\tfor (const chainTag of findLocaleKeys(tag)) {\n\t\tif (hasRegisteredLocale(chainTag)) return void 0;\n\t\tconst load = loaders[getCanonicalLocaleKey(chainTag)];\n\t\tif (load) return flattenTranslations((await load()).default);\n\t}\n}\n//#endregion\nexport { loadLocale };\n\n//# sourceMappingURL=load-locale.js.map","//#region src/core/i18n/resolve-translation.ts\n/** Resolves a semantic key with optional template params via a translator. */\nfunction resolveTranslation(translator, key, ...args) {\n\tconst [params] = args;\n\tconst translate = translator;\n\treturn params !== void 0 ? translate(key, params) : translate(key);\n}\n//#endregion\nexport { resolveTranslation };\n\n//# sourceMappingURL=resolve-translation.js.map","import { isObject } from \"@videojs/utils/predicate\";\n//#region src/core/i18n/text.ts\nfunction isText(value) {\n\treturn isObject(value) && \"key\" in value && \"text\" in value;\n}\n//#endregion\nexport { isText };\n\n//# sourceMappingURL=text.js.map","import { interpolate } from \"./utils/interpolate.js\";\n//#region src/core/i18n/translator.ts\n/**\n* Builds a typed translator from a resolved translation map (typically from `getI18nTranslations`).\n*\n* @param translations - Merged translation map for the active locale.\n* @param locale - BCP 47 tag associated with the map (reserved for future locale-aware behavior).\n* @public\n*/\nfunction createTranslator(translations, locale) {\n\tconst translate = (input, params) => {\n\t\tconst options = params;\n\t\tconst isDescriptor = typeof input !== \"string\";\n\t\tconst key = isDescriptor ? input.key : input;\n\t\tconst translation = translations[key];\n\t\tif (translation === void 0 && !isDescriptor && options?.default === void 0) console.warn(`[videojs] Missing translation for \"${key}\".`);\n\t\tconst fallback = options?.default;\n\t\tconst values = options ? { ...options } : void 0;\n\t\tif (values) delete values.default;\n\t\treturn interpolate(translation ?? (isDescriptor ? input.text : fallback) ?? String(key), values);\n\t};\n\treturn translate;\n}\n//#endregion\nexport { createTranslator };\n\n//# sourceMappingURL=translator.js.map"],"mappings":";;;;;AACA,IAAI,aAAa;CAChB,SAAS;EACR,MAAM;EACN,OAAO;EACP,QAAQ;EACR,MAAM;EACN,QAAQ;CACT;CACA,MAAM;EACL,SAAS;EACT,UAAU;CACX;CACA,YAAY;EACX,OAAO;EACP,MAAM;CACP;CACA,UAAU;EACT,QAAQ;EACR,SAAS;CACV;CACA,KAAK;EACJ,OAAO;EACP,MAAM;CACP;CACA,MAAM;EACL,SAAS;EACT,YAAY;EACZ,OAAO;CACR;CACA,MAAM;EACL,OAAO;EACP,MAAM;EACN,YA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K,MAAM,YAAY,eAAe,GAAG,GAAG;EAC3C,IAAI,oBAAoB,QAAQ,GAAG,OAAO,KAAK;EAC/C,MAAM,OAAO,QAAQ,sBAAsB,QAAQ;EACnD,IAAI,MAAM,OAAO,qBAAqB,MAAM,KAAK,EAAC,CAAE,OAAO;CAC5D;AACD;;;;;AChEA,SAAS,mBAAmB,YAAY,KAAK,GAAG,MAAM;CACrD,MAAM,CAAC,UAAU;CACjB,MAAM,YAAY;CAClB,OAAO,WAAW,KAAK,IAAI,UAAU,KAAK,MAAM,IAAI,UAAU,GAAG;AAClE;;;;ACJA,SAAS,OAAO,OAAO;CACtB,OAAO,SAAS,KAAK,KAAK,SAAS,SAAS,UAAU;AACvD;;;;;;;;;;;ACKA,SAAS,iBAAiB,cAAc,QAAQ;CAC/C,MAAM,aAAa,OAAO,WAAW;EACpC,MAAM,UAAU;EAChB,MAAM,eAAe,OAAO,UAAU;EACtC,MAAM,MAAM,eAAe,MAAM,MAAM;EACvC,MAAM,cAAc,aAAa;EACjC,IAAI,gBAAgB,KAAK,KAAK,CAAC,gBAAgB,SAAS,YAAY,KAAK,GAAG,QAAQ,KAAK,sCAAsC,IAAI,GAAG;EACtI,MAAM,WAAW,SAAS;EAC1B,MAAM,SAAS,UAAU,EAAE,GAAG,QAAQ,IAAI,KAAK;EAC/C,IAAI,QAAQ,OAAO,OAAO;EAC1B,OAAO,YAAY,gBAAgB,eAAe,MAAM,OAAO,aAAa,OAAO,GAAG,GAAG,MAAM;CAChG;CACA,OAAO;AACR"}
|
package/cdn/i18n.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./predicate-LbFu-fPH.js";import{
|
|
1
|
+
import{s as e}from"./predicate-LbFu-fPH.js";import{a as t,c as n,i as r,n as i,o as a,r as o,s,t as c}from"./i18n-CE4KxKuj.js";import{n as l,r as u,t as d}from"./translate-text-TzSgu_oe.js";var f={buttons:{play:`Play`,pause:`Pause`,replay:`Replay`,mute:`Mute`,unmute:`Unmute`},seek:{forward:`Seek forward {seconds} seconds`,backward:`Seek backward {seconds} seconds`},fullscreen:{enter:`Enter fullscreen`,exit:`Exit fullscreen`},captions:{enable:`Enable captions`,disable:`Disable captions`},pip:{enter:`Enter picture-in-picture`,exit:`Exit picture-in-picture`},live:{playing:`Playing live`,seekToEdge:`Seek to live edge`,badge:`Live`},cast:{start:`Start casting`,stop:`Stop casting`,connecting:`Connecting`},airplay:{start:`Start AirPlay`,stop:`Stop AirPlay`},slider:{seek:`Seek`},time:{current:`Current time`,duration:`Duration`,remaining:`Remaining`,elapsedSuffix:`{duration} elapsed`,durationSuffix:`{duration} duration`,remainingSuffix:`{duration} remaining`,showElapsed:`Show elapsed time, {duration}.`,showDuration:`Show duration, {duration}.`,showRemaining:`Show remaining time, {duration}.`,toggleElapsed:`Toggle between elapsed and remaining time.`,toggleDuration:`Toggle between duration and remaining time.`,position:`{current} of {duration}`},playback:{rate:`Playback rate {rate}`},volume:{mutedValue:`{percent}, muted`,muted:`Muted`,label:`Volume`,value:`Volume {value}`},status:{captionsOn:`Captions on`,captionsOff:`Captions off`,paused:`Paused`,playing:`Playing`,fullscreen:`Fullscreen`,pip:`Picture in picture`,exitPip:`Exit picture in picture`,seekedTo:`Seeked to {time}`},container:{label:`Media player`},errors:{aborted:`You stopped media playback before it finished.`,network:`This media could not be loaded due to a network or server issue.`,decode:`This media could not be played. It may be corrupted, or your browser may not support its format.`,source:`This media could not be loaded. It may be unavailable, or your browser may not support its format.`,encrypted:`This media could not be played because it could not be decrypted.`,unplayable:`This media is unsupported by the player.`,title:`Something went wrong.`,unexpected:`An unexpected error occurred.`},common:{empty:``,ok:`OK`},menu:{settings:`Settings`,quality:`Quality`,audio:`Audio`,default:`Default`,speed:`Speed`,captions:`Captions`,playbackRate:`Playback rate`,back:`Back`,off:`Off`,auto:`Auto`,autoWithLabel:`Auto ({label})`,subtitles:`Subtitles`}};const p=/\{([^{}]+)\}/g,m=/\{\s*(\d+)\s*\}/g;function h(e){let t=[];return{masked:e.replace(p,(e,n)=>(t.push(n),`{${t.length-1}}`)),slots:t}}function g(e,t){return e.replace(m,(e,n)=>{let r=t[Number(n)];return r===void 0?e:`{${r}}`})}async function _(e,t){let{masked:n,slots:r}=h(t);return r.length===0?e.translate(t):g(await e.translate(n),r)}const v=new Map;function y(e){return e===`en`||e.startsWith(`en-`)}function b(){if(`Translator`in globalThis)return globalThis.Translator}function x(e){for(let t of c(e))if(!y(t))return t}function S(e,t,n){return x(e)?t.some(e=>!y(e))?n!==void 0&&C(n):!c(e).some(e=>!y(e)&&r(e)):!1}function C(e){let t=n(f);return Object.keys(t).some(t=>e[t]===void 0)}async function w(e,t){let r=x(e);if(!r)return{};let i=v.get(r);if(i)return i;let a=b();if(!a)return{};let o=t?.downloadIfNeeded??!1,s=await a.availability({sourceLanguage:`en`,targetLanguage:r});if(s===`unavailable`||!o&&s!==`available`)return{};let c=o&&(s===`downloadable`||s===`downloading`),l=!1,u=()=>{!c||l||(l=!0,t?.onModelDownload?.start?.(r))};u();let d=n(f),p=Object.keys(d),m=await a.create({sourceLanguage:`en`,targetLanguage:r,...o?{monitor(e){e.addEventListener(`downloadprogress`,u)}}:{}});l&&t?.onModelDownload?.finish?.(r);let h=await Promise.all(p.map(async e=>{let t=d[e];return t?[e,await _(m,t)]:[e,``]})),g=Object.fromEntries(h);return v.set(r,g),g}const T={ar:()=>import(`./ar-BgO-vdw6.js`).then(e=>e.n),az:()=>import(`./az-BT93Xmvh.js`).then(e=>e.n),bs:()=>import(`./bs-CS5F7Fa6.js`).then(e=>e.n),bg:()=>import(`./bg-B3I4SlRq.js`).then(e=>e.n),bn:()=>import(`./bn-KcCmQhYd.js`).then(e=>e.n),ca:()=>import(`./ca-BIdQJZV-.js`).then(e=>e.n),cs:()=>import(`./cs-CGi94LND.js`).then(e=>e.n),cy:()=>import(`./cy-m5eMZq7d.js`).then(e=>e.n),da:()=>import(`./da-B5RntG8L.js`).then(e=>e.n),de:()=>import(`./de-B1BbfHoj.js`).then(e=>e.n),el:()=>import(`./el-B0opiKbz.js`).then(e=>e.n),es:()=>import(`./es-R4DSKG7w.js`).then(e=>e.n),et:()=>import(`./et-Ba6ZgMTe.js`).then(e=>e.n),eu:()=>import(`./eu-DXctohCN.js`).then(e=>e.n),fa:()=>import(`./fa-BSekhYli.js`).then(e=>e.n),fi:()=>import(`./fi-CFpiNsK2.js`).then(e=>e.n),fr:()=>import(`./fr-V1tRQlCS.js`).then(e=>e.n),gd:()=>import(`./gd-qpj49Ajf.js`).then(e=>e.n),gl:()=>import(`./gl-9SEblv-S.js`).then(e=>e.n),he:()=>import(`./he-1PXxurjR.js`).then(e=>e.n),hi:()=>import(`./hi-qm1t0A8G.js`).then(e=>e.n),hr:()=>import(`./hr-BlnRGxrs.js`).then(e=>e.n),hu:()=>import(`./hu-Cpl4civp.js`).then(e=>e.n),id:()=>import(`./id-COi2HloV.js`).then(e=>e.n),it:()=>import(`./it-DKKYDPD1.js`).then(e=>e.n),ja:()=>import(`./ja-Bk6dXsfM.js`).then(e=>e.n),ko:()=>import(`./ko-DpALhNiw.js`).then(e=>e.n),lt:()=>import(`./lt-CJC2CVhF.js`).then(e=>e.n),lv:()=>import(`./lv-CfdIbjKR.js`).then(e=>e.n),mr:()=>import(`./mr-C4OijKV_.js`).then(e=>e.n),nb:()=>import(`./nb-DQ3Nq1ZC.js`).then(e=>e.n),nl:()=>import(`./nl-DMt-nkiN.js`).then(e=>e.n),nn:()=>import(`./nn-CT846E14.js`).then(e=>e.n),ne:()=>import(`./ne-DTL8Y04V.js`).then(e=>e.n),oc:()=>import(`./oc-ClJwr9d0.js`).then(e=>e.n),pl:()=>import(`./pl-B7SFuF8C.js`).then(e=>e.n),"pt-br":()=>import(`./pt-BR-BweixWSY.js`).then(e=>e.n),"pt-pt":()=>import(`./pt-PT-Di4o8ntw.js`).then(e=>e.n),ro:()=>import(`./ro-BB4KBp_W.js`).then(e=>e.n),ru:()=>import(`./ru-BrWt8VXI.js`).then(e=>e.n),sk:()=>import(`./sk-XGkesNm5.js`).then(e=>e.n),sl:()=>import(`./sl-CuZgo3JI.js`).then(e=>e.n),sr:()=>import(`./sr-BsZrd40u.js`).then(e=>e.n),sv:()=>import(`./sv-CsISpTMM.js`).then(e=>e.n),te:()=>import(`./te-CG0NRKuG.js`).then(e=>e.n),th:()=>import(`./th-Bx_CvtvC.js`).then(e=>e.n),tr:()=>import(`./tr-BV5YcpOy.js`).then(e=>e.n),uk:()=>import(`./uk-D2WGhYFz.js`).then(e=>e.n),vi:()=>import(`./vi-CORn5e7t.js`).then(e=>e.n),"zh-cn":()=>import(`./zh-CN-xq6taoBE.js`).then(e=>e.n),"zh-tw":()=>import(`./zh-TW-DWI1-WUt.js`).then(e=>e.n),pt:()=>import(`./pt-ohZp6iM5.js`).then(e=>e.t),zh:()=>import(`./zh-CtBcRYRs.js`).then(e=>e.t)};async function E(e){if(!r(e))for(let t of c(e)){if(r(t))return;let e=T[i(t)];if(e)return n((await e()).default)}}function D(e,t,...n){let[r]=n,i=e;return r===void 0?i(t):i(t,r)}function O(t){return e(t)&&`key`in t&&`text`in t}function k(e,t){return(t,n)=>{let r=n,i=typeof t!=`string`,a=i?t.key:t,o=e[a],s=r?.default,c=r?{...r}:void 0;return c&&delete c.default,l(o??(i?t.text:s)??String(a),c)}}export{s as DEFAULT_LOCALE,k as createTranslator,c as findLocaleKeys,w as getBrowserTranslations,o as getI18nTranslations,r as hasRegisteredLocale,O as isText,E as loadLocale,t as onI18nRegistryChange,a as registerI18n,x as resolveBrowserTranslationTarget,u as resolveText,D as resolveTranslation,S as shouldAttemptBrowserTranslation,d as translateText};
|
|
2
2
|
//# sourceMappingURL=i18n.js.map
|