Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

7.1 KB
Raw Blame
/*! Video.js | https://videojs.org/help */
import{c as e}from"./predicate-DSCS8XT4.js";import{a as t,c as n,i as r,l as i,n as a,o,r as s,s as c,t as l}from"./i18n-BdP2ANgX.js";import{t as u}from"./resolve-text-lYzRwXIu.js";import{n as d,t as f}from"./translate-text-BRTkqA4G.js";var p={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}`,unknown:`Media not loaded, unknown time.`},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`,customRate:`Custom, {rate}`,back:`Back`,off:`Off`,auto:`Auto`,autoWithLabel:`Auto ({label})`,subtitles:`Subtitles`}};const m=/\{([^{}]+)\}/g,h=/\{\s*(\d+)\s*\}/g;function g(e){let t=[];return{masked:e.replace(m,(e,n)=>(t.push(n),`{${t.length-1}}`)),slots:t}}function _(e,t){return e.replace(h,(e,n)=>{let r=t[Number(n)];return r===void 0?e:`{${r}}`})}async function v(e,t){let{masked:n,slots:r}=g(t);return r.length===0?e.translate(t):_(await e.translate(n),r)}const y=/* @__PURE__ */ new Map;function b(){if(`Translator`in globalThis)return globalThis.Translator}function x(e){for(let t of l(e))if(!n(t))return t}function S(e,t,i){return x(e)?t.some(e=>!n(e))?i!==void 0&&C(i):!l(e).some(e=>!n(e)&&r(e)):!1}function C(e){let t=i(p);return Object.keys(t).some(t=>e[t]===void 0)}async function w(e,t){let n=x(e);if(!n)return{};let r=y.get(n);if(r)return r;let a=b();if(!a)return{};let o=t?.downloadIfNeeded??!1,s=await a.availability({sourceLanguage:`en`,targetLanguage:n});if(s===`unavailable`||!o&&s!==`available`)return{};let c=o&&(s===`downloadable`||s===`downloading`),l=!1,u=()=>{c&&!l&&(l=!0,t?.onModelDownload?.start?.(n))};u();let d=i(p),f=Object.keys(d),m=await a.create({sourceLanguage:`en`,targetLanguage:n,...o?{monitor(e){e.addEventListener(`downloadprogress`,u)}}:{}});l&&t?.onModelDownload?.finish?.(n);let h=await Promise.all(f.map(async e=>{let t=d[e];return t?[e,await v(m,t)]:[e,``]})),g=Object.fromEntries(h);return y.set(n,g),g}const T={ar:()=>import(`./ar-DSzxkdZl.js`).then(e=>e.n),az:()=>import(`./az-Bh-MRbxR.js`).then(e=>e.n),bs:()=>import(`./bs-R86wqyla.js`).then(e=>e.n),bg:()=>import(`./bg-CzRvM4TU.js`).then(e=>e.n),bn:()=>import(`./bn-CvaQUPyH.js`).then(e=>e.n),ca:()=>import(`./ca-Cc4h22dY.js`).then(e=>e.n),cs:()=>import(`./cs-D5FhIZVr.js`).then(e=>e.n),cy:()=>import(`./cy-Lzm29vHo.js`).then(e=>e.n),da:()=>import(`./da-Cvs0Ohly.js`).then(e=>e.n),de:()=>import(`./de-CP0k7mPa.js`).then(e=>e.n),el:()=>import(`./el-Bt08mk-E.js`).then(e=>e.n),es:()=>import(`./es-zgGex7yf.js`).then(e=>e.n),et:()=>import(`./et-Ddz8iUei.js`).then(e=>e.n),eu:()=>import(`./eu-BBG8Jaae.js`).then(e=>e.n),fa:()=>import(`./fa-CzU643lO.js`).then(e=>e.n),fi:()=>import(`./fi-DsaY6bOr.js`).then(e=>e.n),fr:()=>import(`./fr-BN632pmN.js`).then(e=>e.n),gd:()=>import(`./gd-CwEq1hrN.js`).then(e=>e.n),gl:()=>import(`./gl-B-s4VMTy.js`).then(e=>e.n),he:()=>import(`./he-PzF5SQzh.js`).then(e=>e.n),hi:()=>import(`./hi-8aH58Ai2.js`).then(e=>e.n),hr:()=>import(`./hr-BB0OacCV.js`).then(e=>e.n),hu:()=>import(`./hu-DcAlgufr.js`).then(e=>e.n),id:()=>import(`./id-CHmxapzD.js`).then(e=>e.n),it:()=>import(`./it-CJ_aWfLO.js`).then(e=>e.n),ja:()=>import(`./ja-Dr5FSmi4.js`).then(e=>e.n),ko:()=>import(`./ko-DdMqG0AY.js`).then(e=>e.n),lt:()=>import(`./lt-CbOJ99QV.js`).then(e=>e.n),lv:()=>import(`./lv-DCJMAoN1.js`).then(e=>e.n),mr:()=>import(`./mr-BV7RSsxy.js`).then(e=>e.n),nb:()=>import(`./nb-C-iNMbVB.js`).then(e=>e.n),nl:()=>import(`./nl-BbUGXqtL.js`).then(e=>e.n),nn:()=>import(`./nn-DUG0qUFw.js`).then(e=>e.n),ne:()=>import(`./ne-BZtC1Pti.js`).then(e=>e.n),oc:()=>import(`./oc-Bdfc6mv2.js`).then(e=>e.n),pl:()=>import(`./pl-DutvvwFw.js`).then(e=>e.n),"pt-br":()=>import(`./pt-BR-CTlMdNSj.js`).then(e=>e.n),"pt-pt":()=>import(`./pt-PT-f4unb7d2.js`).then(e=>e.n),ro:()=>import(`./ro-BeuVB3XC.js`).then(e=>e.n),ru:()=>import(`./ru-X5wnOwNZ.js`).then(e=>e.n),sk:()=>import(`./sk-DWFLzREk.js`).then(e=>e.n),sl:()=>import(`./sl--TRKkT56.js`).then(e=>e.n),sr:()=>import(`./sr-CXyA2zeZ.js`).then(e=>e.n),sv:()=>import(`./sv-CgvN2VmN.js`).then(e=>e.n),te:()=>import(`./te-YK5Nwxj_.js`).then(e=>e.n),th:()=>import(`./th-DoPO4d50.js`).then(e=>e.n),tr:()=>import(`./tr-DXAqZq0j.js`).then(e=>e.n),uk:()=>import(`./uk-BScSkVw2.js`).then(e=>e.n),vi:()=>import(`./vi-ChrLMwc7.js`).then(e=>e.n),"zh-cn":()=>import(`./zh-CN-w3TRl8-q.js`).then(e=>e.n),"zh-tw":()=>import(`./zh-TW-tpkP9kH2.js`).then(e=>e.n),pt:()=>import(`./pt-BvoqQDrN.js`).then(e=>e.t),zh:()=>import(`./zh-1P3ErJe9.js`).then(e=>e.t)};async function E(e){if(!r(e))for(let t of l(e)){if(r(t))return;let e=T[s(t)];if(e)return i((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;c&&delete c.default;let l=o??(i?t.text:s)??String(a);return d(l,c)}}export{c as DEFAULT_LOCALE,k as createTranslator,l as findLocaleKeys,w as getBrowserTranslations,a as getI18nTranslations,r as hasRegisteredLocale,O as isText,E as loadLocale,t as onI18nRegistryChange,o as registerI18n,x as resolveBrowserTranslationTarget,u as resolveText,D as resolveTranslation,S as shouldAttemptBrowserTranslation,f as translateText};
//# sourceMappingURL=i18n.js.map