diff --git a/README-EN.md b/README-EN.md index 1f01acee..d5ba6954 100644 --- a/README-EN.md +++ b/README-EN.md @@ -37,6 +37,10 @@ You can see all the restrictions related to site support in [wiki](https://githu - **[TikTok](https://tiktok.com/)** - **[Rumble](https://rumble.com/)** - **[EPorner](https://www.eporner.com/)** +- **[Peertube](https://tube.shanti.cafe/)** +- **[Dailymotion](https://www.dailymotion.com/)** +- **[Trovo](https://trovo.live/)** +- **[Yandex Disk](https://disk.yandex.ru/)** - **[ProxiTok](https://proxitok.pabloferreiro.es/)** - **[[⚠️] Invidious](https://yewtu.be)** - **[[⚠️] Piped](https://piped.video)** @@ -154,12 +158,14 @@ Example of changing styles: | Status | Browser | Extension |---|---|--- | ⠀✅ | Any | Tampermonkey -| ⠀[Download](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Safari | Userscripts -| ⠀[Download](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Any | Violetmonkey -| ⠀[Download](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Any | [AdGuard Usercripts](https://kb.adguard.com/en/general/userscripts#supported-apps) -| ⠀[Download](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Firefox | Firemonkey -| ⠀[Download](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Any | Greasemonkey -| ⠀[Download](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Any | OrangeMonkey +| ⠀[⚠️ Download](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Safari | Userscripts +| ⠀[⚠️ Download](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Any | Violetmonkey +| ⠀[⚠️ Download](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Any | [AdGuard Usercripts](https://kb.adguard.com/en/general/userscripts#supported-apps) +| ⠀[⚠️ Download](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Firefox | Firemonkey +| ⠀[⚠️ Download](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Any | Greasemonkey +| ⠀[⚠️ Download](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Any | OrangeMonkey + +⚠️ - They are not priority extensions. These extensions, due to the "cloudflare" version of the user script, do not have cross-site synchronization of settings, and are also (practically) not tested before the release of a new version of the user script. ![example btn](https://github.com/ilyhalight/voice-over-translation/blob/master/img/example_en.jpg "btn") diff --git a/README.md b/README.md index efc6cef7..d1c3ebe3 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,10 @@ - **[TikTok](https://tiktok.com/)** - **[Rumble](https://rumble.com/)** - **[EPorner](https://www.eporner.com/)** +- **[Peertube](https://tube.shanti.cafe/)** +- **[Dailymotion](https://www.dailymotion.com/)** +- **[Trovo](https://trovo.live/)** +- **[Yandex Disk](https://disk.yandex.ru/)** - **[ProxiTok](https://proxitok.pabloferreiro.es/)** - **[[⚠️] Invidious](https://yewtu.be)** - **[[⚠️] Piped](https://piped.video)** @@ -152,19 +156,21 @@ npm i | ⠀✅ | Opera GX | LVL4 (core: 91.0.4516.36) | Windows | Tampermonkey | ⠀✅ | Opera | v92.0.4561.43 | Windows | Tampermonkey | ⠀✅ | Vivaldi | 5.7.2921.63 | Windows, Linux | Tampermonkey -| ⠀❔ | Safari | v15.6.1 | MacOS, iOS | Userscripts +| ⠀✅ | Safari | v15.6.1 | MacOS, iOS | Userscripts | ⠀✅ | Kiwi Browser | v116.0.5845.61 | Android | Tampermonkey ## Протестировано в следующих расширениях для юзерскриптов: | Статус | Браузер | Расширение |---|---|--- | ⠀✅ | Любой | Tampermonkey -| ⠀[Загрузить](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Safari | Userscripts -| ⠀[Загрузить](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Любой | Violetmonkey -| ⠀[Загрузить](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Любой | [AdGuard Usercripts](https://kb.adguard.com/en/general/userscripts#supported-apps) -| ⠀[Загрузить](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Firefox | Firemonkey -| ⠀[Загрузить](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Любой | Greasemonkey -| ⠀[Загрузить](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Любой | OrangeMonkey +| ⠀[⚠️ Загрузить](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Safari | Userscripts +| ⠀[⚠️ Загрузить](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Любой | Violetmonkey +| ⠀[⚠️ Загрузить](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Любой | [AdGuard Usercripts](https://kb.adguard.com/en/general/userscripts#supported-apps) +| ⠀[⚠️ Загрузить](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Firefox | Firemonkey +| ⠀[⚠️ Загрузить](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Любой | Greasemonkey +| ⠀[⚠️ Загрузить](https://raw.githubusercontent.com/ilyhalight/voice-over-translation/master/dist/vot-cloudflare.user.js) | Любой | OrangeMonkey + +⚠️ - Не являются приоритетными расширениями. Эти расширения из-за "cloudflare" версии юзерскрипта не имеют межсайтовой синхронизации настроек, а так же (практически) не тестируются перед выходом новой версии юзерскрипта. ![example btn](https://github.com/ilyhalight/voice-over-translation/blob/master/img/example.jpg "btn") diff --git a/changelog.md b/changelog.md index 12d27d51..30cfdd12 100644 --- a/changelog.md +++ b/changelog.md @@ -18,7 +18,7 @@ - tube.la-dina.net - peertube.tmp.rcp.tf - Для VK, Piped, Invidious, Bitchute, Rumble, Peertube, DailyMotion, Trovo, и Yandex Disk стандартный язык перевода изменен на "Auto" -- Добавлен слайдер регулировки авто устанавливаемой громкости видео при включение перевода (#418) +- Добавлен слайдер регулировки автоматически устанавливаемой громкости видео при включение перевода (#418) - Внесены правки в стили для правильного отображения svg иконок на некоторых сайтах - Добавлена опция включающая перевод ошибок возвращаемых с сервера. Работает на базе [Яндекс переводчика](https://github.com/FOSWLY/translate-backend) (#429, #309) - Добавлен выбора сервиса для определения языка видео: @@ -32,6 +32,7 @@ - Добавлены доп. проверки на существование методов для YouTube player - Фикс ошибки Hls в Safari (#423) - Убраны некоторые дебаг логи и закомментированный код для тестирования Hls и переводов стримов +- Исправлена ошибка из-за которой в Greasymonkey не работала установка громкости # 1.5.0-beta9 - Добавлена поддержка EPorner (#409) diff --git a/dist/vot-cloudflare-min.user.js b/dist/vot-cloudflare-min.user.js index ea843e33..0d8c77c7 100644 --- a/dist/vot-cloudflare-min.user.js +++ b/dist/vot-cloudflare-min.user.js @@ -121,4 +121,4 @@ // ==/UserScript== /*! For license information please see vot-cloudflare-min.js.LICENSE.txt */ -(()=>{var t={"./node_modules/bowser/es5.js":function(t){t.exports=function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=90)}({17:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n=o(18),i=function(){function t(){}return t.getFirstMatch=function(t,e){var o=e.match(t);return o&&o.length>0&&o[1]||""},t.getSecondMatch=function(t,e){var o=e.match(t);return o&&o.length>1&&o[2]||""},t.matchAndReturnConst=function(t,e,o){if(t.test(e))return o},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,o,n){void 0===n&&(n=!1);var i=t.getVersionPrecision(e),a=t.getVersionPrecision(o),r=Math.max(i,a),s=0,l=t.map([e,o],(function(e){var o=r-t.getVersionPrecision(e),n=e+new Array(o+1).join(".0");return t.map(n.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(n&&(s=r-Math.min(i,a)),r-=1;r>=s;){if(l[0][r]>l[1][r])return 1;if(l[0][r]===l[1][r]){if(r===s)return 0;r-=1}else if(l[0][r]1?i-1:0),r=1;r0){var r=Object.keys(o),l=s.default.find(r,(function(t){return e.isOS(t)}));if(l){var d=this.satisfies(o[l]);if(void 0!==d)return d}var c=s.default.find(r,(function(t){return e.isPlatform(t)}));if(c){var u=this.satisfies(o[c]);if(void 0!==u)return u}}if(a>0){var h=Object.keys(i),p=s.default.find(h,(function(t){return e.isBrowser(t,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var o=this.getBrowserName().toLowerCase(),n=t.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return e&&i&&(n=i.toLowerCase()),n===o},e.compareVersion=function(t){var e=[0],o=t,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(o=t.substr(1),"="===t[1]?(n=!0,o=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?o=t.substr(1):"~"===t[0]&&(n=!0,o=t.substr(1)),e.indexOf(s.default.compareVersions(i,o,n))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=d,t.exports=e.default},92:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=/version\/(\d+(\.?_?\d+)+)/i,r=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},o=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},o=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},o=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},o=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},o=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},o=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},o=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},o=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},o=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},o=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},o=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},o=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return o&&(e.version=o),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},o=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},o=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},o=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},o=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},o=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},o=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},o=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},o=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},o=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},o=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},o=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},o=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e={name:"Android Browser"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(e,t),version:i.default.getSecondMatch(e,t)}}}];e.default=r,t.exports=e.default},93:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/Roku\/DVP/],describe:function(t){var e=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:a.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),o=i.default.getWindowsVersionName(e);return{name:a.OS_MAP.Windows,version:e,versionName:o}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:a.OS_MAP.iOS},o=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return o&&(e.version=o),e}},{test:[/macintosh/i],describe:function(t){var e=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),o=i.default.getMacOSVersionName(e),n={name:a.OS_MAP.MacOS,version:e};return o&&(n.versionName=o),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),o=i.default.getAndroidVersionName(e),n={name:a.OS_MAP.Android,version:e};return o&&(n.versionName=o),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),o={name:a.OS_MAP.WebOS};return e&&e.length&&(o.version=e),o}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:a.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.PlayStation4,version:e}}}];e.default=r,t.exports=e.default},94:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",o={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(o.model=e),o}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),o=t.test(/like (ipod|iphone)/i);return e&&!o},describe:function(t){var e=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];e.default=r,t.exports=e.default},95:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:a.ENGINE_MAP.Blink};var e=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:a.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:a.ENGINE_MAP.Trident},o=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:a.ENGINE_MAP.Presto},o=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=t.test(/gecko/i),o=t.test(/like gecko/i);return e&&!o},describe:function(t){var e={name:a.ENGINE_MAP.Gecko},o=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:a.ENGINE_MAP.WebKit},o=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}}];e.default=r,t.exports=e.default}})},"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss":(t,e,o)=>{"use strict";o.d(e,{Z:()=>s});var n=o("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=o.n(n),a=o("./node_modules/css-loader/dist/runtime/api.js"),r=o.n(a)()(i());r.push([t.id,'.vot-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:none;border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-ontheme));background-color:rgb(var(--vot-helper-theme));box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer;transition:box-shadow .2s}.vot-button[hidden]{display:none !important}.vot-button::-moz-focus-inner{border:none}.vot-button::before,.vot-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-button::before{background-color:rgb(var(--vot-helper-ontheme));transition:opacity .2s}.vot-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-button:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.vot-button:hover::before{opacity:.08}.vot-button:active{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.vot-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s}.vot-button:disabled{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.12);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);box-shadow:none;cursor:initial}.vot-button:disabled::before,.vot-button:disabled::after{opacity:0}.vot-outlined-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:solid 1px;border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.24);border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:34px;outline:none;cursor:pointer}.vot-outlined-button[hidden]{display:none !important}.vot-outlined-button::-moz-focus-inner{border:none}.vot-outlined-button::before,.vot-outlined-button::after{content:"";position:absolute;border-radius:3px;top:0;right:0;bottom:0;left:0;opacity:0}.vot-outlined-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-outlined-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-outlined-button:hover::before{opacity:.04}.vot-outlined-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-outlined-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-outlined-button:disabled::before,.vot-outlined-button:disabled::after{opacity:0}.vot-text-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:4px;padding:0 8px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-text-button[hidden]{display:none !important}.vot-text-button::-moz-focus-inner{border:none}.vot-text-button::before,.vot-text-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-text-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-text-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-text-button:hover::before{opacity:.04}.vot-text-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-text-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-text-button:disabled::before,.vot-text-button:disabled::after{opacity:0}.vot-icon-button{--vot-helper-onsurface: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:50%;padding:0;width:36px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;fill:var(--vot-helper-onsurface);color:var(--vot-helper-onsurface);background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-icon-button[hidden]{display:none !important}.vot-icon-button::-moz-focus-inner{border:none}.vot-icon-button::before,.vot-icon-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-icon-button::before{background-color:var(--vot-helper-onsurface);transition:opacity .2s}.vot-icon-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity .3s,background-size .4s}.vot-icon-button:hover::before{opacity:.04}.vot-icon-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s,opacity 0s}.vot-icon-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);fill:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-icon-button:disabled::before,.vot-icon-button:disabled::after{opacity:0}.vot-icon-button svg{width:fit-content}.vot-textfield{--vot-helper-theme: rgb( var(--vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243)) ) !important;--vot-helper-safari1: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.38 ) !important;--vot-helper-safari2: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari3: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;position:relative !important;display:inline-block;padding-top:6px !important;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-textfield[hidden]{display:none !important}.vot-textfield>input,.vot-textfield>textarea{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:0 !important;border-style:solid !important;border-width:1px !important;border-color:rgba(0,0,0,0) var(--vot-helper-safari2) var(--vot-helper-safari2) !important;border-radius:4px !important;padding:15px 13px 15px !important;width:100% !important;height:inherit !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;-webkit-text-fill-color:currentColor !important;background-color:rgba(0,0,0,0) !important;box-shadow:inset 1px 0 rgba(0,0,0,0),inset -1px 0 rgba(0,0,0,0),inset 0 -1px rgba(0,0,0,0) !important;font-family:inherit !important;font-size:inherit !important;line-height:inherit !important;caret-color:var(--vot-helper-theme) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input:not(:focus):placeholder-shown,.vot-textfield>textarea:not(:focus):placeholder-shown{border-top-color:var(--vot-helper-safari2) !important}.vot-textfield>input+span,.vot-textfield>textarea+span{position:absolute !important;top:0 !important;left:0 !important;display:flex !important;width:100% !important;max-height:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;font-size:75% !important;line-height:15px !important;cursor:text !important;transition:color .2s,font-size .2s,line-height .2s !important;pointer-events:none !important}.vot-textfield>input:not(:focus):placeholder-shown+span,.vot-textfield>textarea:not(:focus):placeholder-shown+span{font-size:inherit !important;line-height:68px !important}.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{content:"" !important;display:block !important;-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin-top:6px !important;border-top:solid 1px var(--vot-helper-safari2) !important;min-width:10px !important;height:8px !important;pointer-events:none !important;box-shadow:inset 0 1px rgba(0,0,0,0) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input+span::before,.vot-textfield>textarea+span::before{margin-right:4px !important;border-left:solid 1px rgba(0,0,0,0) !important;border-radius:4px 0 !important}.vot-textfield>input+span::after,.vot-textfield>textarea+span::after{flex-grow:1 !important;margin-left:4px !important;border-right:solid 1px rgba(0,0,0,0) !important;border-radius:0 4px !important}.vot-textfield>input:not(:focus):placeholder-shown+span::before,.vot-textfield>input:not(:focus):placeholder-shown+span::after,.vot-textfield>textarea:not(:focus):placeholder-shown+span::before,.vot-textfield>textarea:not(:focus):placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}.vot-textfield:hover>input,.vot-textfield:hover>textarea{border-color:rgba(0,0,0,0) var(--vot-helper-safari3) var(--vot-helper-safari3) !important}.vot-textfield:hover>input+span::before,.vot-textfield:hover>input+span::after,.vot-textfield:hover>textarea+span::before,.vot-textfield:hover>textarea+span::after{border-top-color:var(--vot-helper-safari3) !important}.vot-textfield:hover>input:not(:focus):placeholder-shown,.vot-textfield:hover>textarea:not(:focus):placeholder-shown{border-color:var(--vot-helper-safari3) !important}.vot-textfield>input:focus,.vot-textfield>textarea:focus{border-color:rgba(0,0,0,0) var(--vot-helper-theme) var(--vot-helper-theme) !important;box-shadow:inset 1px 0 var(--vot-helper-theme),inset -1px 0 var(--vot-helper-theme),inset 0 -1px var(--vot-helper-theme) !important;outline:none !important}.vot-textfield>input:focus+span,.vot-textfield>textarea:focus+span{color:var(--vot-helper-theme) !important}.vot-textfield>input:focus+span::before,.vot-textfield>input:focus+span::after,.vot-textfield>textarea:focus+span::before,.vot-textfield>textarea:focus+span::after{border-top-color:var(--vot-helper-theme) !important;box-shadow:inset 0 1px var(--vot-helper-theme) !important}.vot-textfield>input:disabled,.vot-textfield>input:disabled+span,.vot-textfield>textarea:disabled,.vot-textfield>textarea:disabled+span{border-color:rgba(0,0,0,0) var(--vot-helper-safari1) var(--vot-helper-safari1) !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;pointer-events:none !important}.vot-textfield>input:disabled+span::before,.vot-textfield>input:disabled+span::after,.vot-textfield>textarea:disabled+span::before,.vot-textfield>textarea:disabled+span::after{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown,.vot-textfield>input:disabled:placeholder-shown+span,.vot-textfield>textarea:disabled:placeholder-shown,.vot-textfield>textarea:disabled:placeholder-shown+span{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown+span::before,.vot-textfield>input:disabled:placeholder-shown+span::after,.vot-textfield>textarea:disabled:placeholder-shown+span::before,.vot-textfield>textarea:disabled:placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}@media not all and (min-resolution: 0.001dpcm){@supports(-webkit-appearance: none){.vot-textfield>input,.vot-textfield>input+span,.vot-textfield>textarea,.vot-textfield>textarea+span,.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{transition-duration:.1s !important}}}.vot-checkbox{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );z-index:0;position:relative;display:inline-block;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-checkbox[hidden]{display:none !important}.vot-checkbox>input{appearance:none;-moz-appearance:none;-webkit-appearance:none;z-index:1;position:absolute;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:3px 1px;border:solid 2px;background:rgba(0,0,0,0);border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6);border-radius:2px;width:18px;height:18px;outline:none;cursor:pointer;transition:border-color .2s,background-color .2s}.vot-checkbox>input+span{display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding-left:30px;width:inherit;cursor:pointer}.vot-checkbox>input+span::before{content:"";position:absolute;left:-10px;top:-8px;display:block;border-radius:50%;width:40px;height:40px;background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0));opacity:0;transform:scale(1);pointer-events:none;transition:opacity .3s,transform .2s}.vot-checkbox>input+span::after{content:"";z-index:1;display:block;position:absolute;top:3px;left:1px;-webkit-box-sizing:content-box !important;-moz-box-sizing:content-box !important;box-sizing:content-box !important;width:10px;height:5px;border:solid 2px rgba(0,0,0,0);border-right-width:0;border-top-width:0;pointer-events:none;transform:translate(3px, 4px) rotate(-45deg);transition:border-color .2s}.vot-checkbox>input:checked,.vot-checkbox>input:indeterminate{border-color:rgb(var(--vot-helper-theme));background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::before,.vot-checkbox>input:indeterminate+span::before{background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::after,.vot-checkbox>input:indeterminate+span::after{border-color:rgb(var(--vot-helper-ontheme, 255, 255, 255))}.vot-checkbox>input:indeterminate+span::after{border-left-width:0;transform:translate(4px, 3px)}.vot-checkbox:hover>input+span::before{opacity:.04}.vot-checkbox:active>input,.vot-checkbox:active:hover>input{border-color:rgb(var(--vot-helper-theme))}.vot-checkbox:active>input:checked{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6)}.vot-checkbox:active>input+span::before{opacity:1;transform:scale(0);transition:transform 0s,opacity 0s}.vot-checkbox>input:disabled{border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled:checked,.vot-checkbox>input:disabled:indeterminate{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38)}.vot-checkbox>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled+span::before{opacity:0;transform:scale(0)}.vot-slider{--vot-safari-helper1: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.04 ) !important;--vot-safari-helper2: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.12 ) !important;--vot-safari-helper3: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.16 ) !important;--vot-safari-helper4: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.24 ) !important;display:inline-block;width:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;font-family:var(--vot-font, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-slider[hidden]{display:none !important}.vot-slider>input{-webkit-appearance:none !important;appearance:none !important;position:relative !important;top:24px !important;display:block !important;margin:0 0 -36px !important;width:100% !important;height:36px !important;background-color:rgba(0,0,0,0) !important;cursor:pointer !important}.vot-slider>input:last-child{position:static !important;margin:0 !important}.vot-slider>span{display:inline-block !important;margin-bottom:36px !important}.vot-slider>input:disabled{cursor:default !important;opacity:.38 !important}.vot-slider>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input::-webkit-slider-runnable-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-webkit-slider-thumb{margin:0 !important;appearance:none !important;-webkit-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper1) !important}.vot-slider>input:active::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper4) !important}.vot-slider>input:disabled::-webkit-slider-runnable-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-webkit-slider-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;color:rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-range-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-moz-range-thumb{appearance:none !important;-moz-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider>input::-moz-range-progress{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider:hover>input:hover::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-moz-range-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-moz-range-progress{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important}.vot-slider>input:disabled::-moz-range-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-focus-outer{border:none !important}.vot-slider>input::-ms-track{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:17px 0 !important;border:none !important;border-radius:1px !important;padding:0 17px !important;width:100% !important;height:2px !important;background-color:rgba(0,0,0,0) !important}.vot-slider>input::-ms-fill-lower{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider>input::-ms-fill-upper{border-radius:1px !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-ms-thumb{appearance:none !important;margin:0 17px !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-ms-fill-lower{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-ms-fill-upper{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;opacity:.38 !important}.vot-slider>input:disabled::-ms-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::before{content:"" !important;display:block !important;position:absolute !important;width:calc(100%*var(--vot-progress, 0)) !important;height:2px !important;top:calc(50% - 1px) !important;background:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0) !important;--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87) !important;--vot-helper-safari1: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari2: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;display:flex;align-items:center;justify-content:space-between;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;line-height:1.5;text-align:start;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-select[hidden]{display:none !important}.vot-select-label{font-size:16px}.vot-select-outer{display:flex;align-items:center;justify-content:space-between;max-width:120px;width:120px;padding:0 5px;border-style:solid !important;border-width:1px !important;border-color:var(--vot-helper-safari1) !important;border-radius:4px !important;cursor:pointer;transition:border .2s !important}.vot-select-outer:hover{border-color:var(--vot-helper-safari2) !important}.vot-select-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vot-select-arrow-icon{width:20px;height:32px;display:flex;justify-content:center;align-items:center}.vot-select-content-list{display:flex;flex-direction:column}.vot-select-content-list .vot-select-content-item{padding:5px 10px;border-radius:8px;cursor:pointer}.vot-select-content-list .vot-select-content-item:not([inert]):hover{background-color:#2a2c31}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]{color:rgb(var(--vot-primary-rgb, 33, 150, 243));background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.2)}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]:hover{background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.1) !important}.vot-select-content-list .vot-select-content-item[data-vot-disabled=true]{cursor:default}.vot-select-content-list .vot-select-content-item[hidden]{display:none !important}.vot-header{color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-weight:bold;line-height:1.5;text-align:start}.vot-header[hidden]{display:none !important}.vot-header:not(:first-child){padding-top:8px}.vot-header-level-1{font-size:2em}.vot-header-level-2{font-size:1.5em}.vot-header-level-3{font-size:1.17em}.vot-header-level-4{font-size:1em}.vot-header-level-5{font-size:.83em}.vot-header-level-6{font-size:.67em}.vot-info{display:flex;color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-info[hidden]{display:none !important}.vot-info>:not(:first-child){color:rgba(var(--vot-helper-onsurface-rgb), 0.5);flex:1;margin-left:8px}.vot-lang-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);display:flex;align-items:center;justify-content:space-between;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-lang-select[hidden]{display:none !important}.vot-lang-select-icon{width:32px;height:32px;display:flex;justify-content:center;align-items:center}.vot-segmented-button{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:5rem;transform:translate(-50%);user-select:none;display:flex;align-items:center;height:32px;max-width:100vw;background:rgb(var(--vot-surface-rgb, 255, 255, 255));color:var(--vot-helper-theme);fill:var(--vot-helper-theme);border-radius:4px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;cursor:default;transition:opacity .5s;z-index:100}.vot-segmented-button[hidden]{display:none !important}.vot-segmented-button *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-segmented-button .vot-separator{width:1px;height:50%;background:rgba(var(--vot-helper-theme-rgb), 0.1)}.vot-segmented-button .vot-separator[hidden]{display:none !important}.vot-segmented-button .vot-segment,.vot-segmented-button .vot-segment-only-icon{position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;height:100%;padding:0 8px;background-color:rgba(0,0,0,0);color:inherit;transition:background-color 100ms ease-in-out;border:none}.vot-segmented-button .vot-segment[hidden],.vot-segmented-button [hidden].vot-segment-only-icon{display:none !important}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before,.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before{background-color:rgb(var(--vot-helper-theme-rgb));transition:opacity .2s}.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-segmented-button .vot-segment:hover::before,.vot-segmented-button .vot-segment-only-icon:hover::before{opacity:.04}.vot-segmented-button .vot-segment:active::after,.vot-segmented-button .vot-segment-only-icon:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-segmented-button .vot-segment-only-icon{min-width:32px;padding:0}.vot-segmented-button .vot-segment-label{margin-left:8px;white-space:nowrap}.vot-segmented-button[data-status=success] .vot-translate-button{color:rgb(var(--vot-primary-rgb, 33, 150, 243));fill:rgb(var(--vot-primary-rgb, 33, 150, 243))}.vot-segmented-button[data-status=error] .vot-translate-button{color:#f28b82;fill:#f28b82}.vot-segmented-button svg{width:fit-content}.vot-menu{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:calc(5rem + 32px + 16px);user-select:none;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);border-radius:8px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;min-width:300px;cursor:default;z-index:100;visibility:visible;opacity:1;transform-origin:top;transform:translate(-50%) scale(1);transition:opacity .3s,transform .1s}.vot-menu *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-menu[hidden]{pointer-events:none;display:block !important;pointer-events:none;visibility:hidden;opacity:0;transform:translate(-50%) scale(0)}.vot-menu-content-wrapper{display:flex;flex-direction:column;min-height:100px;max-height:calc(var(--vot-container-height, 75vh) - (5rem + 32px + 16px)*2);overflow:auto}.vot-menu-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-menu-header-container:empty{padding:0 0 16px 0}.vot-menu-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-menu-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0;text-align:start}.vot-menu-title{flex:1;font-size:16px;line-height:1;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 16px;gap:8px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar,.vot-menu-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-menu-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-footer-container:empty{padding:16px 0 0 0}.vot-dialog-container{visibility:visible;position:absolute;z-index:10000}.vot-dialog-container[hidden]{display:block !important;pointer-events:none;visibility:hidden}.vot-dialog-container *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-dialog-backdrop{background-color:rgba(0,0,0,.6);position:fixed;top:0;right:0;bottom:0;left:0;opacity:1;transition:opacity .3s}[hidden]>.vot-dialog-backdrop{pointer-events:none;opacity:0}.vot-dialog{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);display:block;position:fixed;top:50%;bottom:50%;max-width:initial;max-height:initial;width:min(var(--vot-dialog-width, 512px),100%);height:fit-content;inset-inline-start:0px;inset-inline-end:0px;inset-block-start:0px;inset-block-end:0px;border-radius:8px;margin:auto;padding:0;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);box-shadow:0 0 16px rgba(0,0,0,.12),0 16px 16px rgba(0,0,0,.24);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;user-select:none;visibility:visible;overflow:auto;overflow-y:hidden;opacity:1;transform-origin:center;transform:scale(1);transition:opacity .3s,transform .1s}[hidden]>.vot-dialog{pointer-events:none;opacity:0;transform:scale(0.5);transition:opacity .1s,transform .2s}.vot-dialog-content-wrapper{display:flex;flex-direction:column;max-height:75vh;overflow:auto}.vot-dialog-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-dialog-header-container:empty{padding:0 0 20px 0}.vot-dialog-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-dialog-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0}.vot-dialog-title{flex:1;font-size:115.3846153846%;font-weight:bold;line-height:1;padding-bottom:16px;padding-inline-end:20px;padding-inline-start:20px;padding-top:20px}.vot-dialog-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 20px;gap:16px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar,.vot-dialog-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-dialog-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-dialog-footer-container:empty{padding:20px 0 0 0}.vot-subtitles-widget{display:flex;justify-content:center;align-items:center;position:absolute;width:50%;max-height:100%;min-height:20%;z-index:100;left:25%;top:75%;pointer-events:none}.vot-subtitles{position:relative;max-width:100%;max-height:100%;width:max-content;background:var(--vot-subtitles-background, rgba(46, 47, 52, 0.8));color:var(--vot-subtitles-color, rgb(227, 227, 227));border-radius:1rem;pointer-events:all;padding:1rem;font-size:2rem;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vot-subtitles .passed{color:var(--vot-subtitles-passed-color, rgb(33, 150, 243))}:root{--vot-font-family: "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system;--vot-primary-rgb: 139, 180, 245;--vot-onprimary-rgb: 32, 33, 36;--vot-surface-rgb: 32, 33, 36;--vot-onsurface-rgb: 227, 227, 227;--vot-subtitles-background: rgba(var(--vot-surface-rgb, 46, 47, 52), 0.8);--vot-subtitles-color: rgb(var(--vot-onsurface-rgb, 227, 227, 227));--vot-subtitles-passed-color: rgb(var(--vot-primary-rgb, 33, 150, 243))}vot-block{display:block}',""]);const s=r},"./node_modules/css-loader/dist/runtime/api.js":t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,i,a){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var s=0;s0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js":t=>{"use strict";t.exports=function(t){return t[1]}},"./node_modules/requestidlecallback-polyfill/index.js":()=>{window.requestIdleCallback=window.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)},window.cancelIdleCallback=window.cancelIdleCallback||function(t){clearTimeout(t)}},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},"./node_modules/style-loader/dist/runtime/insertStyleElement.js":t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":(t,e,o)=>{"use strict";t.exports=function(t){var e=o.nc;e&&t.setAttribute("nonce",e)}},"./node_modules/style-loader/dist/runtime/styleDomAPI.js":t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(o){!function(t,e,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,i&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,o)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},"./node_modules/style-loader/dist/runtime/styleTagTransform.js":t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},"./src/config/config-cloudflare.js":(t,e,o)=>{"use strict";o.d(e,{I:()=>i,i:()=>n});const n="vot-new.toil-dump.workers.dev",i="xtGCyGdTY2Jy6OMEKdTuXev3Twhkamgm"},"./src/config/config.js":(t,e,o)=>{"use strict";o.d(e,{EY:()=>s,Rr:()=>i,e6:()=>n,jm:()=>l,kF:()=>r,rm:()=>d,sN:()=>a});const n="m3u8proxy.toil-dump.workers.dev",i="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 YaBrowser/23.7.1.1140 Yowser/2.5 Safari/537.36",a=.15,r="yandex",s="yandex",l={yandex:"https://translate.toil.cc/detect",rustServer:"https://rust-server-531j.onrender.com/detect"},d={yandex:"https://translate.toil.cc/translate"}},"./src/utils/debug.js":(t,e,o)=>{"use strict";o.d(e,{Z:()=>n});const n={log:(...t)=>{}}},"./src/yandexRequest-cloudflare.js":(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>r});var n=o("./src/config/config-cloudflare.js"),i=o("./src/config/config.js"),a=o("./src/utils/debug.js");const r=async function(t,e,o,r){let s,l;try{a.Z.log("yandexRequest:",t);const r={method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify({headers:{Accept:"application/x-protobuf","Accept-Language":"en","Content-Type":"application/x-protobuf","User-Agent":i.Rr,Pragma:"no-cache","Cache-Control":"no-cache","Sec-Fetch-Mode":"no-cors",...o},body:Array.from(e)})};s=await fetch(`https://${n.i}${t}`,r),a.Z.log("yandexRequest:",s.status,s),l=await s.arrayBuffer()}catch(t){console.error("[VOT]",t),s={status:-1},l=t}r(200==s.status,l)}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,exports:{}};return t[n].call(a.exports,a,a.exports,o),a.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nc=void 0,(()=>{"use strict";var t=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),e=o.n(t),n=o("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),i=o.n(n),a=o("./node_modules/style-loader/dist/runtime/insertBySelector.js"),r=o.n(a),s=o("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),l=o.n(s),d=o("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),c=o.n(d),u=o("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),h=o.n(u),p=o("./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss"),g={};g.styleTagTransform=h(),g.setAttributes=l(),g.insert=r().bind(null,"head"),g.domAPI=i(),g.insertStyleElement=c(),e()(p.Z,g),p.Z&&p.Z.locals&&p.Z.locals;const v=JSON.parse('{"__version__":2,"recommended":"recommended","translateVideo":"Translate video","disableTranslate":"Turn off","translationSettings":"Translation settings","subtitlesSettings":"Subtitles settings","about":"About extension","resetSettings":"Reset settings","videoBeingTranslated":"The video is being translated","videoLanguage":"Video language","translationLanguage":"Translation language","translationTake":"The translation will take","translationTakeMoreThanHour":"The translation will take more than an hour","translationTakeAboutMinute":"The translation will take about a minute","translationTakeFewMinutes":"The translation will take a few minutes","translationTakeApproximatelyMinutes":"The translation will take approximately {0} minutes","translationTakeApproximatelyMinute":"The translation will take approximately {0} minutes","unSupportedExtensionError":"Error! {0} is not supported by this version of the extension!\\n\\nPlease use the cloudflare version of the VOT extension.","requestTranslationFailed":"Failed to request video translation","audioNotReceived":"Audio link not received","grantPermissionToAutoPlay":"Grant permission to autoplay","neededAdditionalExtension":"An additional extension is needed to support this site","audioFormatNotSupported":"The audio format is not supported","VOTAutoTranslate":"Translate on open","VOTDontTranslateYourLang":"Do not translate from my language","VOTVolume":"Video volume","VOTVolumeTranslation":"Translation Volume","VOTAutoSetVolume":"Reduce video volume to ","VOTShowVideoSlider":"Video volume slider","VOTSyncVolume":"Link translation and video volume","VOTAudioProxy":"Proxy received audio","VOTDisableFromYourLang":"You have disabled the translation of the video in your language","VOTLiveNotSupported":"Translation of live streams is not supported","VOTPremiere":"Wait for the premiere to end before translating","VOTVideoIsTooLong":"Video is too long","VOTNoVideoIDFound":"No video ID found","VOTFailedInitDB":"Failed to initialize database","VOTDBNeedUpdate":"The database needs an update, please reload the page","VOTDisabledForDBUpdating":"VOT is disabled due to an error when updating the Database. Close all open tabs with {0} and try again","VOTFailedWriteToDB":"Data could not be written to the database","VOTFailedReadFromDB":"Data could not be retrieved from the database","VOTSubtitles":"Subtitles","VOTSubtitlesDisabled":"Disabled","VOTSubtitlesMaxLength":"Subtitles max length","VOTHighlightWords":"Highlight words","VOTTranslatedFrom":"translated from","VOTAutogenerated":"autogenerated","VOTSettings":"VOT Settings","VOTMenuLanguage":"Menu language","VOTAuthors":"Authors","VOTVersion":"Version","VOTLoader":"Loader","VOTBrowser":"Browser","VOTShowPiPButton":"Show PiP button","langs":{"auto":"Auto","af":"Afrikaans","ak":"Akan","sq":"Albanian","am":"Amharic","ar":"Arabic","hy":"Armenian","as":"Assamese","ay":"Aymara","az":"Azerbaijani","bn":"Bangla","eu":"Basque","be":"Belarusian","bho":"Bhojpuri","bs":"Bosnian","bg":"Bulgarian","my":"Burmese","ca":"Catalan","ceb":"Cebuano","zh":"Chinese","zh-Hans":"Chinese (Simplified)","zh-Hant":"Chinese (Traditional)","co":"Corsican","hr":"Croatian","cs":"Czech","da":"Danish","dv":"Divehi","nl":"Dutch","en":"English","eo":"Esperanto","et":"Estonian","ee":"Ewe","fil":"Filipino","fi":"Finnish","fr":"French","gl":"Galician","lg":"Ganda","ka":"Georgian","de":"German","el":"Greek","gn":"Guarani","gu":"Gujarati","ht":"Haitian Creole","ha":"Hausa","haw":"Hawaiian","iw":"Hebrew","hi":"Hindi","hmn":"Hmong","hu":"Hungarian","is":"Icelandic","ig":"Igbo","id":"Indonesian","ga":"Irish","it":"Italian","ja":"Japanese","jv":"Javanese","kn":"Kannada","kk":"Kazakh","km":"Khmer","rw":"Kinyarwanda","ko":"Korean","kri":"Krio","ku":"Kurdish","ky":"Kyrgyz","lo":"Lao","la":"Latin","lv":"Latvian","ln":"Lingala","lt":"Lithuanian","lb":"Luxembourgish","mk":"Macedonian","mg":"Malagasy","ms":"Malay","ml":"Malayalam","mt":"Maltese","mi":"Māori","mr":"Marathi","mn":"Mongolian","ne":"Nepali","nso":"Northern Sotho","no":"Norwegian","ny":"Nyanja","or":"Odia","om":"Oromo","ps":"Pashto","fa":"Persian","pl":"Polish","pt":"Portuguese","pa":"Punjabi","qu":"Quechua","ro":"Romanian","ru":"Russian","sm":"Samoan","sa":"Sanskrit","gd":"Scottish Gaelic","sr":"Serbian","sn":"Shona","sd":"Sindhi","si":"Sinhala","sk":"Slovak","sl":"Slovenian","so":"Somali","st":"Southern Sotho","es":"Spanish","su":"Sundanese","sw":"Swahili","sv":"Swedish","tg":"Tajik","ta":"Tamil","tt":"Tatar","te":"Telugu","th":"Thai","ti":"Tigrinya","ts":"Tsonga","tr":"Turkish","tk":"Turkmen","uk":"Ukrainian","ur":"Urdu","ug":"Uyghur","uz":"Uzbek","vi":"Vietnamese","cy":"Welsh","fy":"Western Frisian","xh":"Xhosa","yi":"Yiddish","yo":"Yoruba","zu":"Zulu"},"udemyAccessTokenExpired":"Your entered Udemy Access Token has expired","udemyModuleArgsNotFound":"Could not get udemy module data due to the fact that ModuleArgs was not found","VOTTranslationHelpNull":"Could not get the data required for the translate","enterUdemyAccessToken":"Enter Udemy Access Token","VOTUdemyData":"Udemy Data","streamNoConnectionToServer":"There is no connection to the server","VOTCloudflareDoesntSupportStreams":"The Cloudflare version of the script does not support stream translation","searchField":"Search...","VOTTranslateAPIErrors":"Translate errors from the API","VOTTranslationService":"Translation Service","VOTDetectService":"Detect Service","VOTTranslatingError":"Translating the error"}');var m=o("./src/utils/debug.js");const b=new class{constructor(){this.gmSupport="function"==typeof GM_getValue,m.Z.log(`GM Storage Status: ${this.gmSupport}`)}syncGet(t,e=void 0,o=!1){if(this.gmSupport)return GM_getValue(t,e);let n=window.localStorage.getItem(t);if("udemyData"===t&&"string"==typeof n)try{n=JSON.parse(n)}catch{n=e}return o?Number(n)??Number(e):n??e}async get(t,e=void 0,o=!1){return this.gmSupport?await GM_getValue(t,e):new Promise((n=>{n(this.syncGet(t,e,o))}))}syncSet(t,e){return this.gmSupport?GM_setValue(t,e):("udemyData"===t&&(e=JSON.stringify(e)),window.localStorage.setItem(t,e))}async set(t,e){return this.gmSupport?await GM_setValue(t,e):new Promise((o=>{o(this.syncSet(t,e))}))}syncDelete(t){return this.gmSupport?GM_deleteValue(t):window.localStorage.removeItem(t)}async delete(t){return this.gmSupport?await GM_deleteValue(t):new Promise((e=>{e(this.syncDelete(t))}))}syncList(){return this.gmSupport?GM_listValues():["autoTranslate","dontTranslateLanguage","dontTranslateYourLang","autoSetVolumeYandexStyle","showVideoSlider","syncVolume","subtitlesMaxLength","highlightWords","responseLanguage","defaultVolume","udemyData","audioProxy","showPiPButton","locale-version","locale-lang","locale-phrases"]}async list(){return this.gmSupport?await GM_listValues():new Promise((t=>{t(this.syncList())}))}},f=["auto","en","ru","af","am","ar","az","bg","bn","bs","ca","cs","cy","da","de","el","es","et","eu","fa","fi","fr","gl","hi","hr","hu","hy","id","it","ja","jv","kk","km","kn","ko","lo","mk","ml","mn","ms","mt","my","ne","nl","pa","pl","pt","ro","si","sk","sl","sq","sr","su","sv","sw","tr","uk","ur","uz","vi","zh","zu"],y=new class{lang="en";locale={};gmValues=["locale-phrases","locale-lang","locale-version","locale-lang-override"];constructor(){const t=b.syncGet("locale-lang-override","auto");this.lang=t&&"auto"!==t?t:(navigator.language||navigator.userLanguage)?.substr(0,2)?.toLowerCase()??"en",this.setLocaleFromJsonString(b.syncGet("locale-phrases",""))}reset(){this.gmValues.forEach((t=>b.syncDelete(t)))}async update(t=!1){(t||2!==await b.get("locale-version",0,!0)||await b.get("locale-lang")!==this.lang)&&(m.Z.log("Updating locale..."),await fetch(`https://raw.githubusercontent.com/ilyhalight/voice-over-translation/dev/src/localization/locales/${this.lang}.json`).then((t=>{if(200===t.status)return t.text();throw t.status})).then((async t=>{await b.set("locale-phrases",t),this.setLocaleFromJsonString(t);const e=this.getFromLocale(this.locale,"__version__");"number"==typeof e&&await b.set("locale-version",e),await b.set("locale-lang",this.lang)})).catch((async t=>{console.error("[VOT] [localizationProvider] failed get locale, cause:",t),this.setLocaleFromJsonString(await b.get("locale-phrases",""))})))}setLocaleFromJsonString(t){try{this.locale=JSON.parse(t)??{}}catch(t){console.error("[VOT] [localizationProvider]",t),this.locale={}}}getFromLocale(t,e){const o=e.split(".").reduce(((t,e)=>{if("object"==typeof t&&t)return t[e]}),t);return void 0===o&&console.warn("[VOT] [localizationProvider] locale",t,"doesn't contain key",e),o}getDefault(t){return this.getFromLocale(v,t)??t}get(t){return this.getFromLocale(this.locale,t)??this.getFromLocale(v,t)??t}};class w extends Error{constructor(t){super(y.getDefault(t)),this.name="VOTLocalizedError",this.unlocalizedMessage=t,this.localizedMessage=y.get(t)}}const x=["ru","en","zh","ko","lt","lv","ar","fr","it","es","de","ja"],S=["kk","bn","pt","cs","hi","mr","te","tr","ms","vi","ta","jv","ur","fa","gu","id","uk","da","fi","uz","pl","sv","az","sq","am","hy","af","eu","my","bg","bs","cy","hu","gl","el","zu","kn","ca","km","lo","mk","ml","mt","mn","ne","nl","pa","ro","sr","si","sk","sl","sw","su","hr","et"],T=["ru","en","kk"],k=navigator.language||navigator.userLanguage,V=k?.substr(0,2)?.toLowerCase()??"en";String.prototype.format||(String.prototype.format=function(){var t=arguments;return this.replace(/{(\d+)}/g,(function(e,o){return void 0!==t[o]?t[o]:e}))});const M=t=>new Promise((e=>setTimeout(e,t))),L=(t,e)=>{const o=new URL(window.location.href);switch(t){case"piped":case"invidious":case"youtube":return o.pathname.match(/(?:watch|embed|shorts)\/([^/]+)/)?.[1]||o.searchParams.get("v");case"vk":return o.pathname.match(/^\/video-?[0-9]{8,9}_[0-9]{9}$/)?o.pathname.match(/^\/video-?[0-9]{8,9}_[0-9]{9}$/)[0].slice(1):o.searchParams.get("z")?o.searchParams.get("z").split("/")[0]:!(!o.searchParams.get("oid")||!o.searchParams.get("id"))&&`video-${Math.abs(o.searchParams.get("oid"))}_${o.searchParams.get("id")}`;case"nine_gag":case"9gag":case"gag":return o.pathname.match(/gag\/([^/]+)/)?.[1];case"twitch":if(/^m\.twitch\.tv$/.test(window.location.hostname)){const t=document.head.querySelector('link[rel="canonical"]');return t?.href.match(/videos\/([^/]+)/)?.[0]||o.pathname.slice(1)}if(/^player\.twitch\.tv$/.test(window.location.hostname))return`videos/${o.searchParams.get("video")}`;if(/^clips\.twitch\.tv$/.test(window.location.hostname)){const t=document.querySelector(".tw-link[data-test-selector='stream-info-card-component__stream-avatar-link']");return!!t&&`${t.href.replace("https://www.twitch.tv/","")}/clip/${o.searchParams.get("clip")}`}return o.pathname.match(/([^/]+)\/(?:clip)\/([^/]+)/)?o.pathname.match(/([^/]+)\/(?:clip)\/([^/]+)/)[0]:o.pathname.match(/(?:videos)\/([^/]+)/)?.[0];case"proxytok":return o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];case"tiktok":{let t=o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];if(!t){const o=e.closest(".xgplayer-playing, .tiktok-web-player"),n=o?.closest('div[data-e2e="recommend-list-item-container"]'),i=n?.querySelector('a[data-e2e="video-author-avatar"]');if(o&&i){const e=o.id?.match(/^xgwrapper-[0-9]+-(.*)$/)?.at(1),n=i.href?.match(/.*(@.*)$/)?.at(1);e&&n&&(t=`${n}/video/${e}`)}}return t}case"vimeo":return o.pathname.match(/[^/]+\/[^/]+$/)?.[0]||o.pathname.match(/[^/]+$/)?.[0];case"xvideos":return o.pathname.match(/[^/]+\/[^/]+$/)?.[0];case"pornhub":return o.searchParams.get("viewkey")||o.pathname.match(/embed\/([^/]+)/)?.[1];case"twitter":return o.pathname.match(/status\/([^/]+)/)?.[1];case"udemy":case"rumble":return o.pathname;case"facebook":return!!o.searchParams.get("v")&&o.searchParams.get("v");case"rutube":return o.pathname.match(/(?:video|embed)\/([^/]+)/)?.[1];case"coub":return o.pathname.includes("/view")?o.pathname.match(/view\/([^/]+)/)?.[1]:o.pathname.includes("/embed")?o.pathname.match(/embed\/([^/]+)/)?.[1]:document.querySelector(".coub.active")?.dataset?.permalink;case"bilibili":{const t=o.searchParams.get("bvid");if(t)return t;{let t=o.pathname.match(/video\/([^/]+)/)?.[1];return t&&o.search&&null!==o.searchParams.get("p")&&(t+=`/?p=${o.searchParams.get("p")}`),t}}case"mail_ru":if(o.pathname.startsWith("/v/")||o.pathname.startsWith("/mail/"))return o.pathname;if(o.pathname.match(/video\/embed\/([^/]+)/)){const t=document.querySelector(".b-video-controls__mymail-link");return!!t&&t?.href.split("my.mail.ru")?.[1]}return!1;case"bitchute":return o.pathname.match(/video\/([^/]+)/)?.[1];case"coursera":return o.pathname.match(/learn\/([^/]+)\/lecture\/([^/]+)/)?.[0];case"eporner":return o.pathname.match(/video-([^/]+)\/([^/]+)/)?.[0];case"peertube":return o.pathname.match(/\/w\/([^/]+)/)?.[0];case"dailymotion":{const t=Array.from(document.scripts).filter((t=>t.innerText.trim().includes("window.__PLAYER_CONFIG__ = {")));if(!t.length)return!1;try{let e=t[0].innerText.trim().replace("window.__PLAYER_CONFIG__ = ","");e.endsWith("};")&&(e=e.substring(0,e.length-1));const o=JSON.parse(e),n=o.context.embedder??o.context.http_referer;return console.log(n,o),n.match(/\/video\/([^/]+)/)?.[1]}catch(t){return console.error("[VOT]",t),!1}}case"trovo":{if(!o.pathname.startsWith("/s/"))return!1;const t=o.searchParams.get("vid");if(!t)return!1;const e=o.pathname.match(/([^/]+)\/([\d]+)/)?.[0];return!!e&&`${e}?vid=${t}`}case"yandexdisk":return o.pathname.match(/\/i\/([^/]+)/)?.[1];default:return!1}};function O(t){return t.toLowerCase().split(";")[0].trim().split("-")[0].split("_")[0]}function E(){return"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}function P(){return"undefined"!=typeof Hls&&Hls?.isSupported()?new Hls({debug:!1,lowLatencyMode:!0,backBufferLength:90}):void 0}var C=o("./src/config/config.js");const A={async translate(t,e){try{const o=await fetch(C.rm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})}),n=await o.json();if(200!==n.code)throw o.message;return n.text[0]}catch(e){return console.error("Error translating text:",e),t}},async detect(t,e){try{const o=await fetch(C.jm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})}),n=await o.json();if(200!==n.code)throw o.message;return n.lang??"en"}catch(t){return console.error("Error translating text:",t),"en"}}},B={async detect(t){try{const e=await fetch(C.jm.rustServer,{method:"POST",body:t});return await e.text()}catch(t){return console.error("Error getting lang from text:",t),"en"}}};async function F(t,e="",o="ru"){if("yandex"===await b.get("translationService",C.kF)){const n=e&&o?`${e}-${o}`:o;return await A.translate(t,n)}return t}const _=["yandex"],R=["yandex","rust-server"];function q(){return/^m\.youtube\.com$/.test(window.location.hostname)}function z(){return window.location.pathname.startsWith("/shorts/")?q()?document.querySelector("#movie_player"):document.querySelector("#shorts-player"):document.querySelector("#movie_player")}function D(){const t=z();return t?.getPlayerResponse?t?.getPlayerResponse?.call()??null:t?.data?.playerResponse??null}function I(){const t=z();return t?.getVideoData?t?.getVideoData?.call()??null:t?.data?.playerResponse?.videoDetails??null}const N=function(){const t=z();return t?.getVolume?t.getVolume.call()/100:1},j=function(){const t=D();let e=t?.captions?.playerCaptionsTracklistRenderer?.captionTracks??[];return e=e.reduce(((t,e)=>{if("languageCode"in e){const o=e?.languageCode?O(e?.languageCode):void 0,n=e?.url||e?.baseUrl;o&&n&&t.push({source:"youtube",language:o,isAutoGenerated:"asr"===e?.kind,url:`${n.startsWith("http")?n:`${window.location.origin}/${n}`}&fmt=json3`})}return t}),[]),m.Z.log("youtube subtitles:",e),e},$=async function(){const t=z(),e=D(),o=I(),{author:n,title:i}=o??{},{shortDescription:a,isLive:r,isLiveContent:s,isUpcoming:l}=e?.videoDetails??{},d=!(!r&&!l||s);let c=await async function(t,e,o,n){if(!window.location.hostname.includes("m.youtube.com")&&t?.getAudioTrack){const e=t.getAudioTrack(),o=e?.getLanguageInfo();if("und"!==o?.id)return O(o.id.split(".")[0])}const i=e?.captions?.playerCaptionsTracklistRenderer?.captionTracks;if(i?.length){const t=i.find((t=>"asr"===t.kind));if(t&&t.languageCode)return O(t.languageCode)}if(!n||!o)return"en";const a=[n.split("\n").filter((t=>!t.match(/https?:\/\/\S+/))).join("\n").replace(/#\S+/g,"").replace(/[^\p{L}\s]/gu,"").replace(/\s+/g," ").trim().slice(0,250),o].join("");return await async function(t){switch(await b.get("detectService",C.EY)){case"yandex":return await A.detect(t);case"rust-server":return await B.detect(t);default:return"en"}}(a)}(t,e,i,a);x.includes(c)||(c="en");const u={isLive:!!r,isPremiere:d,title:i,description:a,author:n,detectedLanguage:c};return m.Z.log("youtube video data:",u),console.log("[VOT] Detected language: ",u.detectedLanguage),u},Z=function(t){return z()?.setVolume(Math.round(100*t))},H=function(t,e){m.Z.log("videoSeek",e);const o=(z()?.getProgressState()?.seekableEnd||t.currentTime)-e;t.currentTime=o},U=new protobuf.Type("VideoTranslationHelpObject").add(new protobuf.Field("target",1,"string")).add(new protobuf.Field("targetUrl",2,"string")),W=new protobuf.Type("VideoTranslationRequest").add(new protobuf.Field("url",3,"string")).add(new protobuf.Field("deviceId",4,"string")).add(new protobuf.Field("firstRequest",5,"bool")).add(new protobuf.Field("duration",6,"double")).add(new protobuf.Field("unknown2",7,"int32")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("unknown3",9,"int32")).add(new protobuf.Field("unknown4",10,"int32")).add(new protobuf.Field("translationHelp",11,"VideoTranslationHelpObject","repeated")).add(new protobuf.Field("responseLanguage",14,"string")).add(new protobuf.Field("unknown5",15,"int32")),G=new protobuf.Type("VideoSubtitlesRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")),Y=new protobuf.Type("VideoStreamRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")).add(new protobuf.Field("responseLanguage",3,"string")),J=new protobuf.Type("VideoStreamPingRequest").add(new protobuf.Field("pingId",1,"int32")),K=new protobuf.Type("VideoTranslationResponse").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("duration",2,"double")).add(new protobuf.Field("status",4,"int32")).add(new protobuf.Field("remainingTime",5,"int32")).add(new protobuf.Field("unknown0",6,"int32")).add(new protobuf.Field("unknown1",7,"string")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("message",9,"string")),Q=new protobuf.Type("VideoSubtitlesObject").add(new protobuf.Field("language",1,"string")).add(new protobuf.Field("url",2,"string")).add(new protobuf.Field("unknown2",3,"int32")).add(new protobuf.Field("translatedLanguage",4,"string")).add(new protobuf.Field("translatedUrl",5,"string")).add(new protobuf.Field("unknown5",6,"int32")).add(new protobuf.Field("unknown6",7,"int32")),X=new protobuf.Type("VideoSubtitlesResponse").add(new protobuf.Field("unknown0",1,"int32")).add(new protobuf.Field("subtitles",2,"VideoSubtitlesObject","repeated")),tt=new protobuf.Type("VideoStreamObject").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("timestamp",2,"int64")),et=new protobuf.Type("VideoStreamResponse").add(new protobuf.Field("interval",1,"int32")).add(new protobuf.Field("translatedInfo",2,"VideoStreamObject")).add(new protobuf.Field("pingId",3,"int32")),ot=(new protobuf.Root).define("yandex").add(U).add(W).add(K).add(G).add(Q).add(X).add(J).add(Y).add(tt).add(et),nt=(t,e,o,n,i)=>ot.VideoTranslationRequest.encode({url:t,firstRequest:!0,duration:e,unknown2:1,language:o,unknown3:0,unknown4:0,translationHelp:i,responseLanguage:n,unknown5:0}).finish(),it=t=>ot.VideoTranslationResponse.decode(new Uint8Array(t)),at=(t,e)=>ot.VideoSubtitlesRequest.encode({url:t,language:e}).finish(),rt=t=>ot.VideoSubtitlesResponse.decode(new Uint8Array(t)),st=t=>ot.VideoStreamPingRequest.encode({pingId:t}).finish(),lt=(t,e,o)=>ot.VideoStreamRequest.encode({url:t,language:e,responseLanguage:o}).finish(),dt=t=>ot.VideoStreamResponse.decode(new Uint8Array(t)),ct=["invidious.snopyta.org","yewtu.be","invidious.kavin.rocks","vid.puffyan.us","invidious.namazso.eu","inv.riverside.rocks","yt.artemislena.eu","invidious.flokinet.to","invidious.esmailelbob.xyz","y.com.sb","invidious.nerdvpn.de","inv.vern.cc","invidious.slipfox.xyz","invidio.xamh.de","invidious.dhusch.de"],ut=["piped.video","piped.tokhmi.xyz","piped.moomoo.me","piped.syncpundit.io","piped.mha.fi","watch.whatever.social","piped.garudalinux.org","efy.piped.pages.dev","watch.leptons.xyz","piped.lunar.icu","yt.dc09.ru","piped.mint.lgbt","il.ax","piped.privacy.com.de","piped.esmailelbob.xyz","piped.projectsegfau.lt","piped.in.projectsegfau.lt","piped.us.projectsegfau.lt","piped.privacydev.net","piped.palveluntarjoaja.eu","piped.smnz.de","piped.adminforge.de","piped.qdi.fi","piped.hostux.net","piped.chauvet.pro","piped.jotoma.de","piped.pfcd.me","piped.frontendfriendly.xyz"];function ht(t){const e=document.createElement("vot-block");return e.classList.add("vot-icon-button"),e.innerHTML=t,e}function pt(t){const e=parseFloat(t.value),o=""===t.min?0:parseFloat(t.min),n=(e-o)/((""===t.max?100:parseFloat(t.max))-o);t.parentElement.setAttribute("style",`--vot-progress: ${n}`)}function gt(t,e="",o=!1){const n=document.createElement("vot-block");n.classList.add("vot-textfield");const i=document.createElement(o?"textarea":"input");i.placeholder=" ",i.value=e;const a=document.createElement("span");return a.innerHTML=t,n.appendChild(i),n.appendChild(a),{container:n,input:i,label:a}}function vt(t){const e=document.createElement("vot-block");e.classList.add("vot-dialog-container"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-dialog-backdrop");const n=document.createElement("vot-block");n.classList.add("vot-dialog");const i=document.createElement("vot-block");i.classList.add("vot-dialog-content-wrapper");const a=document.createElement("vot-block");a.classList.add("vot-dialog-header-container");const r=document.createElement("vot-block");r.classList.add("vot-dialog-body-container");const s=document.createElement("vot-block");s.classList.add("vot-dialog-footer-container");const l=document.createElement("vot-block");l.classList.add("vot-dialog-title-container");const d=ht('');d.classList.add("vot-dialog-close-button"),o.onclick=d.onclick=()=>{e.hidden=!0};const c=document.createElement("vot-block");return c.classList.add("vot-dialog-title"),c.innerHTML=t,e.appendChild(o),e.appendChild(n),n.appendChild(i),i.appendChild(a),i.appendChild(r),i.appendChild(s),a.appendChild(l),a.appendChild(d),l.appendChild(c),{container:e,backdrop:o,dialog:n,contentWrapper:i,headerContainer:a,bodyContainer:r,footerContainer:s,titleContainer:l,closeButton:d,title:c}}function mt(t,e,o,n={}){const i=n.onSelectCb||function(){},a=n.labelElement||"";let r=[];const s=document.createElement("vot-block");s.classList.add("vot-select"),a&&s.appendChild(a);const l=document.createElement("vot-block");l.classList.add("vot-select-outer");const d=document.createElement("span");d.classList.add("vot-select-title"),d.innerText=t,void 0===t&&(d.innerText=o.find((t=>!0===t.selected))?.label);const c=document.createElement("vot-block");return c.classList.add("vot-select-arrow-icon"),c.innerHTML='',l.append(d,c),l.onclick=()=>{const t=vt(e);t.container.classList.add("vot-dialog-temp"),t.container.hidden=!1,document.documentElement.appendChild(t.container);const n=document.createElement("vot-block");n.classList.add("vot-select-content-list");for(const t of o){const e=document.createElement("vot-block");e.classList.add("vot-select-content-item"),e.innerText=t.label,e.dataset.votSelected=t.selected,e.dataset.votValue=t.value,t.disabled&&(e.inert=!0),e.onclick=async a=>{a.target.inert||(n.childNodes.forEach((t=>t.dataset.votSelected=!1)),o.forEach((e=>e.selected=e.value===t.value)),e.dataset.votSelected=!0,d.innerText=t.label,await i(a))},n.appendChild(e)}const a=gt(y.get("searchField"));a.input.oninput=t=>{const e=t.target.value.toLowerCase();Array.from(r).forEach((t=>t.hidden=!t.innerText.toLowerCase().includes(e)))},t.bodyContainer.append(a.container,n),r=n.childNodes,t.backdrop.onclick=t.closeButton.onclick=()=>{t.container.remove(),r=[]}},s.append(l),{container:s,title:d,arrowIcon:c,labelElement:a,setTitle:t=>{d.innerText=t},setSelected:t=>{Array.from(r).filter((t=>!t.inert)).forEach((e=>e.dataset.votSelected=e.dataset.votValue===t)),o.forEach((e=>e.selected=String(e.value)===t))},updateItems:t=>{o=t}}}const bt={createHeader:function(t,e=4){const o=document.createElement("vot-block");return o.classList.add("vot-header"),o.classList.add(`vot-header-level-${e}`),o.innerHTML=t,o},createInformation:function(t,e){const o=document.createElement("vot-block");o.classList.add("vot-info");const n=document.createElement("vot-block");n.innerHTML=t;const i=document.createElement("vot-block");return i.innerHTML=e,o.appendChild(n),o.appendChild(i),{container:o,header:n,value:i}},createButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-button"),e.innerHTML=t,e},createTextButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-text-button"),e.innerHTML=t,e},createOutlinedButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-outlined-button"),e.innerHTML=t,e},createIconButton:ht,createCheckbox:function(t,e=!1){const o=document.createElement("label");o.classList.add("vot-checkbox");const n=document.createElement("input");n.type="checkbox",n.checked=Boolean(e);const i=document.createElement("span");return i.innerHTML=t,o.appendChild(n),o.appendChild(i),{container:o,input:n,label:i}},createSlider:function(t,e=50,o=0,n=100){const i=document.createElement("vot-block");i.classList.add("vot-slider");const a=document.createElement("input");a.type="range",a.min=o,a.max=n,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),a.addEventListener("input",(t=>pt(t.target))),pt(a),{container:i,input:a,label:r}},createTextfield:gt,createDialog:vt,createVOTButton:function(t){const e=document.createElement("vot-block");e.classList.add("vot-segmented-button");const o=document.createElement("vot-block");o.classList.add("vot-segment"),o.classList.add("vot-translate-button"),o.innerHTML='';const n=document.createElement("vot-block");n.classList.add("vot-separator");const i=document.createElement("vot-block");i.classList.add("vot-segment-only-icon"),i.innerHTML='';const a=document.createElement("vot-block");a.classList.add("vot-separator");const r=document.createElement("vot-block");r.classList.add("vot-segment-only-icon"),r.innerHTML='';const s=document.createElement("span");return s.classList.add("vot-segment-label"),s.innerHTML=t,e.appendChild(o),e.appendChild(n),e.appendChild(i),e.appendChild(a),e.appendChild(r),o.appendChild(s),{container:e,translateButton:o,separator:n,pipButton:i,separator2:a,menuButton:r,label:s}},createVOTMenu:function(t){const e=document.createElement("vot-block");e.classList.add("vot-menu"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-menu-content-wrapper");const n=document.createElement("vot-block");n.classList.add("vot-menu-header-container");const i=document.createElement("vot-block");i.classList.add("vot-menu-body-container");const a=document.createElement("vot-block");a.classList.add("vot-menu-footer-container");const r=document.createElement("vot-block");r.classList.add("vot-menu-title-container");const s=document.createElement("vot-block");return s.classList.add("vot-menu-title"),s.innerHTML=t,e.appendChild(o),o.appendChild(n),o.appendChild(i),o.appendChild(a),n.appendChild(r),r.appendChild(s),{container:e,contentWrapper:o,headerContainer:n,bodyContainer:i,footerContainer:a,titleContainer:r,title:s}},createVOTSelectLabel:function(t){const e=document.createElement("span");return e.classList.add("vot-select-label"),e.innerText=t,e},createVOTSelect:mt,createVOTLanguageSelect:function(t){const e=t.fromTitle||"#UNDEFINED",o=t.fromDialogTitle||"#UNDEFINED",n=t.fromItems||[],i=t.fromOnSelectCB||function(){},a=t.toTitle||"#UNDEFINED",r=t.toDialogTitle||"#UNDEFINED",s=t.toItems||[],l=t.toOnSelectCB||function(){},d=document.createElement("vot-block");d.classList.add("vot-lang-select");const c=mt(e,o,n,{onSelectCb:i}),u=document.createElement("vot-block");u.classList.add("vot-lang-select-icon"),u.innerHTML='';const h=mt(a,r,s,{onSelectCb:l});return d.append(c.container,u,h.container),{container:d,fromSelect:c,icon:u,toSelect:h}},updateSlider:pt};function ft(t,e,o,n){let i=e;return e>n?(i=o+(e-n),i=i>100?100:Math.max(i,0),t.volume=i/100):e100?100:Math.max(i,0),t.volume=i/100),i}var yt=o("./src/config/config-cloudflare.js"),wt=o("./node_modules/bowser/es5.js");function xt(t){const e=([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)));return t?e:e.toUpperCase()}async function St(t){const e=new TextEncoder("utf-8"),o=await window.crypto.subtle.importKey("raw",e.encode(yt.I),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),n=await window.crypto.subtle.sign("HMAC",o,t);return Array.from(new Uint8Array(n),(t=>t.toString(16).padStart(2,"0"))).join("")}function Tt(t){const e=t.startMs+t.durationMs;return t.tokens.reduce(((o,n,i)=>{const a=t.tokens[i+1],r=o[o.length-1],s=r?.alignRange?.end??0,l=s+n.text.length;if(o.push(Object.assign(Object.assign({},n),{alignRange:{start:s,end:l}})),a){const t=n.startMs+n.durationMs,i=a.startMs?a.startMs-t:e-t;o.push({text:" ",startMs:t,durationMs:i,alignRange:{start:l,end:l+1}})}return o}),[])}function kt(t,e){const o=t.text.split(new RegExp("([\n \t])")).reduce(((t,o)=>{if(o.length){const n=t[t.length-1]??e,i=n?.alignRange?.end??0,a=i+o.length;t.push({text:o,alignRange:{start:i,end:a}})}return t}),[]),n=Math.floor(t.durationMs/o.length),i=t.startMs+t.durationMs;return o.map(((e,a)=>{const r=a===o.length-1,s=t.startMs+n*a,l=r?i-s:n;return Object.assign(Object.assign({},e),{startMs:s,durationMs:l})}))}class Vt{dragging=!1;subtitlesContainerRect=null;containerRect=null;offsetX=null;offsetY=null;lastContent=null;highlightWords=!1;subtitles=null;maxLength=300;maxLengthRegexp=/.{1,300}(?:\s|$)/g;constructor(t,e,o){this.site=o,this.video=t,"youtube"===this.site.host&&"mobile"!==this.site.additionalData?this.container=e.parentElement:this.container=e,this.votSubtitlesContainer=document.createElement("vot-block"),this.votSubtitlesContainer.classList.add("vot-subtitles-widget"),this.container.appendChild(this.votSubtitlesContainer),this.onMouseDownBound=this.onMouseDown.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),this.onMouseMoveBound=this.onMouseMove.bind(this),this.onTimeUpdateBound=this.onTimeUpdate.bind(this),document.addEventListener("mousedown",this.onMouseDownBound),document.addEventListener("mouseup",this.onMouseUpBound),document.addEventListener("mousemove",this.onMouseMoveBound),this.video?.addEventListener("timeupdate",this.onTimeUpdateBound)}release(){this.video?.removeEventListener("timeupdate",this.onTimeUpdateBound),document.removeEventListener("mousedown",this.onMouseDownBound),document.removeEventListener("mouseup",this.onMouseUpBound),document.removeEventListener("mousemove",this.onMouseMoveBound),this.votSubtitlesContainer.remove()}onMouseDown(t){this.votSubtitlesContainer.contains(t.target)&&(this.subtitlesContainerRect=this.votSubtitlesContainer.getBoundingClientRect(),this.containerRect=this.container.getBoundingClientRect(),this.offsetX=t.clientX-this.subtitlesContainerRect.x,this.offsetY=t.clientY-this.subtitlesContainerRect.y,this.dragging=!0)}onMouseUp(){this.dragging=!1}onMouseMove(t){if(this.dragging){t.preventDefault();const e=t.clientX-this.offsetX,o=t.clientY-this.offsetY,n=o>=this.containerRect.top,i=o+this.subtitlesContainerRect.height<=this.containerRect.bottom,a=e>=this.containerRect.left,r=e+this.subtitlesContainerRect.width<=this.containerRect.right;this.votSubtitlesContainer.style.top=n&&i?o-this.containerRect.y+"px":n?this.containerRect.height-this.subtitlesContainerRect.height+"px":"0px",this.votSubtitlesContainer.style.left=a&&r?e-this.containerRect.x+"px":a?this.containerRect.width-this.subtitlesContainerRect.width+"px":"0px"}}onTimeUpdate(){this.update()}setContent(t){t&&this.video?(this.subtitles=t,this.update()):(this.subtitles=null,this.votSubtitlesContainer.innerHTML="")}setMaxLength(t){"number"==typeof t&&t&&(this.maxLength=t,this.maxLengthRegexp=new RegExp(`.{1,${t}}(?:\\s|$)`,"g"),this.update())}setHighlightWords(t){this.highlightWords!==!!t&&(this.highlightWords=!!t,this.update())}update(){if(!this.video)return;let t="",e=this.highlightWords&&this.subtitles?.containsTokens;const o=1e3*this.video.currentTime,n=this.subtitles?.subtitles?.findLast((t=>t.startMsthis.maxLength){let t=[],n=0,i=0,a=0;for(let o=0;othis.maxLength){let r=e.slice(n,i+1);r.at(0)&&" "===r.at(0).text&&(r=r.slice(1)),r.at(-1)&&" "===r.at(-1).text&&(r=r.slice(0,r.length-1)),t.push({startMs:e[n].startMs,durationMs:e[i].startMs+e[i].durationMs-e[n].startMs,tokens:r}),n=o,a=0}i=o}for(let n=0;ne||o>n.startMs-100&&e-o<275?'class="passed"':""}>${n.text}`}}else if(n.text.length>this.maxLength){let e=n.text.match(this.maxLengthRegexp),i=n.durationMs/e.length;for(let a=0;a${t.replace("\\n","
")}`:"")}}function Mt(){return Lt()?.player}function Lt(){return document.querySelector("#video_player")}const Ot=async function(t="en"){let e=null;const o=Mt(),{duration:n}=o?.cache_||{},{courseId:i,tracks:a,sources:r}=o?.options_||{},s=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(r),l=await async function(t){const e=await fetch(`https://www.coursera.org/api/onDemandCourses.v1/${t}`),o=await e.json();return o?.elements?.[0]}(i);let d=l?.primaryLanguageCodes?.[0];d=d?O(d):"en",x.includes(d)||(d="en");const c=function(t,e,o){let n=t?.find((t=>O(t.srclang)===e));return n||(n=t?.find((t=>O(t.srclang)===o))||t?.[0]),n?.src}(a,d,t);console.log(`videoURL: ${s}, subtitlesURL: ${c}`),c&&s?e=[{target:"video_file_url",targetUrl:s},{target:"subtitles_file_url",targetUrl:`https://www.coursera.org${c}`}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${s}, subtitlesURL: ${c}`);const u={duration:n,detectedLanguage:d,translationHelp:e};return m.Z.log("coursera video data:",u),console.log("[VOT] Detected language: ",u.detectedLanguage),u},Et="https://www.udemy.com/api-2.0";async function Pt(t){const e=await fetch(`${Et}/courses/${t}/?`+new URLSearchParams({"fields[course]":"locale",use_remote_version:"true",caching_intent:"true"}));return await e.json()}async function Ct(t,e,o){if(!(t.expires+2592e6>(new Date).getTime()&&t.accessToken))return void console.error(y.get("udemyAccessTokenExpired"));const n=`Bearer ${t.accessToken}`,i=await fetch(`${Et}/users/me/subscribed-courses/${e}/lectures/${o}/?`+new URLSearchParams({"fields[lecture]":"asset","fields[asset]":"length,media_sources,captions"}),{headers:{"x-udemy-authorization":n,authorization:n}});return await i.json()}function At(){return Ft()?.player}function Bt(){const t=document.querySelector(".ud-app-loader[data-module-id='course-taking']")?.dataset?.moduleArgs;return t?JSON.parse(t):(console.error(y.get("udemyModuleArgsNotFound")),{})}function Ft(){return document.querySelector(".vjs-v7")}const _t=async function(t,e="en"){let o=null;const n=At();m.Z.log("udemyData",t);const i=Bt();m.Z.log("moduleData: ",i);const a=i.courseId,r=window.location.pathname.match(/learn\/lecture\/([^/]+)/)?.[1];m.Z.log(`CourseId: ${a}, lectureId: ${r}`);const s=await Pt(a);m.Z.log("courseLang Data:",s);const l=await Ct(t,a,r);console.log("lecture Data:",l);let d=s?.locale?.locale;d=d?O(d):"en",x.includes(d)||(d="en");const c=l?.asset?.length||n?.cache_?.duration,u=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(l?.asset?.media_sources)||function(){const t=Ft()?.querySelector("video")?.src;return!t?.startsWith("blob:")&&t}(),h=function(t,e,o){let n=t?.find((t=>O(t.locale_id)===e));return n||(n=t?.find((t=>O(t.locale_id)===o))||t?.[0]),n?.url}(l?.asset?.captions,d,e);console.log(`videoURL: ${u}, subtitlesURL: ${h}`),h&&u?o=[{target:"video_file_url",targetUrl:u},{target:"subtitles_file_url",targetUrl:h}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${u}, subtitlesURL: ${h}`);const p={duration:c,detectedLanguage:d,translationHelp:o};return m.Z.log("udemy video data:",p),console.log("[VOT] Detected language: ",p.detectedLanguage),p};o("./node_modules/requestidlecallback-polyfill/index.js");class Rt{constructor(){this.listeners=new Set}hasListener(t){return this.listeners.has(t)}dispatchToListener(t,...e){try{t(...e)}catch(t){console.error("[VOT]",t)}}addListener(t){if(this.hasListener(t))throw new Error("[VOT] The listener has already been added.");this.listeners.add(t)}removeListener(t){if(!this.hasListener(t))throw new Error("[VOT] The listener has not been added yet.");this.listeners.delete(t)}dispatch(...t){for(const e of Array.from(this.listeners))this.dispatchToListener(e,...t)}}function qt(t){return Array.from(t).map((t=>{const e=[];return t instanceof HTMLVideoElement&&e.push(t),t instanceof HTMLElement&&e.push(...Array.from(t.querySelectorAll("video"))),t?.shadowRoot?.querySelectorAll&&e.push(...Array.from(t.shadowRoot.querySelectorAll("video"))),e})).flat()}const zt=[{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube(-nocookie)?.com$/,selector:"shorts-video #player"},{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube(-nocookie)?.com$/,selector:".player-container"},{host:"youtube",url:"https://youtu.be/",match:/^(www.)?youtube(-nocookie|kids)?.com$/,selector:".html5-video-container:not(#inline-player *)"},{host:"tiktok",url:"https://www.tiktok.com/",match:/^(www.)?tiktok.com$/,selector:null},{host:"proxytok",url:"https://www.tiktok.com/",match:["proxitok.pabloferreiro.es","proxitok.pussthecat.org","tok.habedieeh.re","proxitok.esmailelbob.xyz","proxitok.privacydev.net","tok.artemislena.eu","tok.adminforge.de","tik.hostux.net","tt.vern.cc","cringe.whatever.social","proxitok.lunar.icu","proxitok.privacy.com.de"],selector:".column.has-text-centered"},{additionalData:"mobile",host:"twitch",url:"https://twitch.tv/",match:/^m.twitch.tv$/,selector:"main > div > section > div > div > div"},{host:"twitch",url:"https://twitch.tv/",match:t=>t.host.includes("clips.twitch.tv")||t.host.includes("player.twitch.tv")&&null===t.searchParams.get("channel")||t.host.includes("twitch.tv")&&(t.pathname.startsWith("/videos")||t.pathname.startsWith("/embed")||t.pathname.includes("/clip")),selector:".video-ref"},{host:"xvideos",url:"https://www.xvideos.com/",match:/^www.xvideos.com$/,selector:".video-bg-pic"},{host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:/^[a-z]+.pornhub.com$/,selector:".mainPlayerDiv > .video-element-wrapper-js > div"},{additionalData:"embed",host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:t=>t.host.includes("pornhub.com")&&t.pathname.startsWith("/embed/"),selector:"#player"},{additionalData:"mobile",host:"vk",url:"https://vk.com/video?z=",match:/^m.vk.(com|ru)$/,selector:"vk-video-player",shadowRoot:!0},{host:"vk",url:"https://vk.com/video?z=",match:/^(www.|m.)?vk.(com|ru)$/,selector:".videoplayer_media"},{host:"vimeo",url:"https://vimeo.com/",match:/^(player.)?vimeo.com$/,selector:".player"},{host:"nine_gag",url:"https://9gag.com/gag/",match:/^9gag.com$/,selector:".video-post"},{host:"coub",url:"https://coub.com/view/",match:/^coub.com$/,selector:".viewer__player"},{host:"bitchute",url:"https://www.bitchute.com/video/",match:/^(www.)?bitchute.com$/,selector:".plyr__video-wrapper"},{host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:".video-player > div > div > div:nth-child(2)"},{additionalData:"embed",host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:"#app > div > div"},{host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m|player).bilibili.com$/,selector:".bpx-player-video-wrap"},{additionalData:"old",host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m).bilibili.com$/,selector:null},{host:"twitter",url:"https://twitter.com/i/status/",match:/^twitter.com$/,selector:'div[data-testid="videoComponent"] > div:nth-child(1) > div'},{host:"mail_ru",url:"https://my.mail.ru/",match:/^my.mail.ru$/,selector:"#b-video-wrapper"},{host:"coursera",url:"https://www.coursera.org/",match:/coursera.org$/,selector:"#video_player"},{host:"udemy",url:"https://www.udemy.com",match:/udemy.com$/,selector:'div[data-purpose="curriculum-item-viewer-content"] > section > div > div > div > div:nth-of-type(2)'},{host:"invidious",url:"https://youtu.be/",match:ct,selector:"#player"},{host:"piped",url:"https://youtu.be/",match:ut,selector:".shaka-video-container"},{host:"rumble",url:"https://rumble.com",match:/^rumble.com$/,selector:"#videoPlayer > .videoPlayer-Rumble-cls > div"},{host:"eporner",url:"https://www.eporner.com/",match:/^(www.)?eporner.com$/,selector:".vjs-v7"},{host:"peertube",url:"tube.shanti.cafe",match:["peertube.1312.media","tube.shanti.cafe","bee-tube.fr","video.sadmin.io","dalek.zone","review.peertube.biz","peervideo.club","tube.la-dina.net","peertube.tmp.rcp.tf"],selector:".vjs-v7"},{host:"dailymotion",url:"https://www.dailymotion.com/video/",match:/^geo.dailymotion.com$/,selector:".player"},{host:"trovo",url:"https://trovo.live/s/",match:/^trovo.live$/,selector:".player-video"},{host:"yandexdisk",url:"https://disk.yandex.ru/i/",match:/^disk.yandex.ru$/,selector:"yaplayertag > div:nth-of-type(1)"}],Dt=wt.getParser(window.navigator.userAgent).getResult(),It=[...ct,...ut],Nt=["playing","ratechange","play","waiting","pause"];function jt(t,e,o=!1){return t.map((t=>({label:`${o&&!T.includes(t)?"❌ ":""}${y.get("langs")[t]??t.toUpperCase()}`,value:t,selected:e===t})))}var $t=!1;function Zt(t,e,n,i,a,r){m.Z.log(`Translate video (url: ${t}, duration: ${e}, requestLang: ${n}, responseLang: ${i})`),m.Z.log("translationHelp:",a),$t?m.Z.log("translationPanding return"):($t=!0,async function(t,e,n,i,a,r){try{m.Z.log("requestVideoTranslation");const s=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;m.Z.log("Inited yandexRequest...");const l=nt(t,e,n,i,a);await s("/video-translation/translate",l,{"Vtrans-Signature":await St(l),"Sec-Vtrans-Token":xt(!1)},r)}catch(t){console.error("[VOT]",t),r(!1)}}(t,e,n,i,a,((t,e)=>{if($t=!1,m.Z.log("[exec callback] Requesting video translation"),!t)return void r(!1,y.get("requestTranslationFailed"));const o=it(e);switch(console.log("[VOT] Translation response: ",o),o.status){case 0:r(!1,o.message);break;case 1:r(!!o.url,o.url||y.get("audioNotReceived"));break;case 2:r(!1,o.remainingTime?function(t){const e=Math.floor(t/60),o=Math.floor(t%60);return e>=60?y.get("translationTakeMoreThanHour"):e>=10&&e%10?y.get("translationTakeApproximatelyMinutes").format(e):1==e||0==e&&o>0?y.get("translationTakeAboutMinute"):y.get("translationTakeApproximatelyMinute").format(e)}(o.remainingTime):y.get("translationTakeFewMinutes"));break;case 3:r(!1,y.get("videoBeingTranslated"))}})))}class Ht{translateFromLang="en";translateToLang=V;timer;ytData="";videoData="";firstPlay=!0;audio=new Audio;hls=P();downloadTranslationUrl=null;downloadSubtitlesUrl=null;autoRetry;streamPing;volumeOnStart;tempOriginalVolume;tempVolume;subtitlesList=[];subtitlesListVideoId=null;videoLastSrcObject=null;constructor(t,e,o){m.Z.log("[VideoHandler] add video:",t,"container:",e,this),this.video=t,this.container=e,this.site=o,this.handleSrcChangedBound=this.handleSrcChanged.bind(this),this.srcObserver=new MutationObserver(this.handleSrcChangedBound),this.srcObserver.observe(this.video,{attributeFilter:["src","currentSrc"]}),this.srcObjectInterval=setInterval((async()=>{this.videoLastSrcObject!==this.video.srcObject&&(this.videoLastSrcObject=this.video.srcObject,await this.handleSrcChanged())}),100),this.stopTranslationBound=this.stopTranslation.bind(this),this.handleVideoEventBound=this.handleVideoEvent.bind(this),this.changeOpacityOnEventBound=this.changeOpacityOnEvent.bind(this),this.resetTimerBound=this.resetTimer.bind(this),this.init()}async init(){if(this.initialized)return;this.data={autoTranslate:await b.get("autoTranslate",0,!0),dontTranslateLanguage:await b.get("dontTranslateLanguage",V),dontTranslateYourLang:await b.get("dontTranslateYourLang",1,!0),autoSetVolumeYandexStyle:await b.get("autoSetVolumeYandexStyle",1,!0),autoVolume:await b.get("autoVolume",15,!0)/100,showVideoSlider:await b.get("showVideoSlider",1,!0),syncVolume:await b.get("syncVolume",0,!0),subtitlesMaxLength:await b.get("subtitlesMaxLength",300,!0),highlightWords:await b.get("highlightWords",0,!0),responseLanguage:await b.get("responseLanguage",V),defaultVolume:await b.get("defaultVolume",100,!0),udemyData:await b.get("udemyData",{accessToken:"",expires:0}),audioProxy:await b.get("audioProxy","uk"===V?1:0,!0),showPiPButton:await b.get("showPiPButton",0,!0),translateAPIErrors:await b.get("translateAPIErrors",1,!0),translationService:await b.get("translationService",C.kF),detectService:await b.get("detectService",C.EY)},this.videoData=await this.getVideoData(),console.log("[db] data from db: ",this.data),this.subtitlesWidget=new Vt(this.video,this.container,this.site),this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength),this.subtitlesWidget.setHighlightWords(this.data.highlightWords),this.initUI(),this.initUIEvents();const t=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=t,t&&(this.votMenu.container.hidden=t),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage??"ru"),this.translateToLang=this.data.responseLanguage??"ru",this.initExtraEvents(),this.initialized=!0}transformBtn(t="none",e){this.votButton.container.dataset.status=t,this.votButton.label.innerHTML=e}initUI(){this.votButton=bt.createVOTButton(y.get("translateVideo")),this.container.appendChild(this.votButton.container),this.votButton.pipButton.hidden=!E()||!this.data?.showPiPButton,this.votButton.separator2.hidden=!E()||!this.data?.showPiPButton,this.votButton.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votMenu=bt.createVOTMenu(y.get("VOTSettings")),this.container.appendChild(this.votMenu.container),this.votDownloadButton=bt.createIconButton(''),this.votDownloadButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadButton),this.votDownloadSubtitlesButton=bt.createIconButton(''),this.votDownloadSubtitlesButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadSubtitlesButton),this.votSettingsButton=bt.createIconButton(''),this.votMenu.headerContainer.appendChild(this.votSettingsButton),this.votTranslationLanguageSelect=bt.createVOTLanguageSelect({fromTitle:y.get("langs")[this.video.detectedLanguage],fromDialogTitle:y.get("videoLanguage"),fromItems:[{label:y.get("langs").auto,value:"auto",selected:""},...jt(x,this.videoData.detectedLanguage)],fromOnSelectCB:async t=>{m.Z.log("[fromOnSelectCB] select from language",t.target.dataset.votValue),this.videoData=await this.getVideoData(),this.setSelectMenuValues(t.target.dataset.votValue,this.videoData.responseLanguage)},toTitle:y.get("langs")[this.video.responseLanguage],toDialogTitle:y.get("translationLanguage"),toItems:[...jt(x,this.videoData.responseLanguage,!0),{label:"─────────",value:"separator",disabled:!0},...jt(S,this.videoData.responseLanguage,!0)],toOnSelectCB:async t=>{const e=t.target.dataset.votValue;m.Z.log("[toOnSelectCB] select to language",e),this.data.responseLanguage=this.translateToLang=e,await b.set("responseLanguage",this.data.responseLanguage),m.Z.log("Response Language value changed. New value: ",this.data.responseLanguage),this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage)}}),this.votMenu.bodyContainer.appendChild(this.votTranslationLanguageSelect.container),this.votSubtitlesSelect=bt.createVOTSelect(y.get("VOTSubtitlesDisabled"),y.get("VOTSubtitles"),[{label:y.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1}],{onSelectCb:async t=>{await this.changeSubtitlesLang(t.target.dataset.votValue)},labelElement:bt.createVOTSelectLabel(y.get("VOTSubtitles"))}),this.votMenu.bodyContainer.appendChild(this.votSubtitlesSelect.container),this.votVideoVolumeSlider=bt.createSlider(`${y.get("VOTVolume")}: ${100*this.getVideoVolume()}%`,100*this.getVideoVolume()),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoVolumeSlider.container),this.votVideoTranslationVolumeSlider=bt.createSlider(`${y.get("VOTVolumeTranslation")}: ${this.data?.defaultVolume??100}%`,this.data?.defaultVolume??100),this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoTranslationVolumeSlider.container),this.votMenu.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votSettingsDialog=bt.createDialog(y.get("VOTSettings")),document.documentElement.appendChild(this.votSettingsDialog.container),this.votTranslationHeader=bt.createHeader(y.get("translationSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationHeader),this.votAutoTranslateCheckbox=bt.createCheckbox(y.get("VOTAutoTranslate"),this.data?.autoTranslate??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoTranslateCheckbox.container),this.votDontTranslateYourLangSelect=bt.createVOTSelect(y.get("langs")[b.syncGet("dontTranslateLanguage",V)],y.get("VOTDontTranslateYourLang"),jt(x,b.syncGet("dontTranslateLanguage",V)),{onSelectCb:async t=>{this.data.dontTranslateLanguage=t.target.dataset.votValue,await b.set("dontTranslateLanguage",this.data.dontTranslateLanguage)},labelElement:bt.createCheckbox(y.get("VOTDontTranslateYourLang"),this.data?.dontTranslateYourLang??!0).container}),this.votSettingsDialog.bodyContainer.appendChild(this.votDontTranslateYourLangSelect.container),this.votAutoSetVolumeCheckbox=bt.createCheckbox(`${y.get("VOTAutoSetVolume")}`,this.data?.autoSetVolumeYandexStyle??!0),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeCheckbox.container),this.votAutoSetVolumeSlider=bt.createSlider(`${100*(this.data?.autoVolume??C.sN)}%`,100*(this.data?.autoVolume??C.sN),0,100),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeSlider.container),this.votShowVideoSliderCheckbox=bt.createCheckbox(y.get("VOTShowVideoSlider"),this.data?.showVideoSlider??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votShowVideoSliderCheckbox.container),this.votUdemyDataTextfield=bt.createTextfield(y.get("VOTUdemyData"),this.data?.udemyData?.accessToken??""),this.votUdemyDataTextfield.container.hidden="udemy"!==this.site.host,this.votSettingsDialog.bodyContainer.appendChild(this.votUdemyDataTextfield.container),this.votSyncVolumeCheckbox=bt.createCheckbox(y.get("VOTSyncVolume"),this.data?.syncVolume??!1),this.votSyncVolumeCheckbox.container.hidden="youtube"!==this.site.host||"mobile"===this.site.additionalData,this.votSettingsDialog.bodyContainer.appendChild(this.votSyncVolumeCheckbox.container),this.votAudioProxyCheckbox=bt.createCheckbox(y.get("VOTAudioProxy"),this.data?.audioProxy??!1),this.votAudioProxyCheckbox.container.hidden=!1,this.votSettingsDialog.bodyContainer.appendChild(this.votAudioProxyCheckbox.container),this.votTranslationServiceSelect=bt.createVOTSelect(b.syncGet("translationService",C.kF),y.get("VOTTranslationService"),jt(_,b.syncGet("translationService",C.kF)),{onSelectCb:async t=>{this.data.translationService=t.target.dataset.votValue,await b.set("translationService",this.data.translationService)},labelElement:bt.createCheckbox(y.get("VOTTranslateAPIErrors"),this.data.translateAPIErrors??!0).container}),this.votTranslationServiceSelect.container.hidden="ru"===y.lang,this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationServiceSelect.container),this.votDetectServiceSelect=bt.createVOTSelect(b.syncGet("detectService",C.EY),y.get("VOTDetectService"),jt(R,b.syncGet("detectService",C.EY)),{onSelectCb:async t=>{this.data.detectService=t.target.dataset.votValue,await b.set("detectService",this.data.detectService)},labelElement:bt.createVOTSelectLabel(y.get("VOTDetectService"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votDetectServiceSelect.container),this.votSubtitlesHeader=bt.createHeader(y.get("subtitlesSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHeader),this.votSubtitlesMaxLengthSlider=bt.createSlider(`${y.get("VOTSubtitlesMaxLength")}: ${this.data?.subtitlesMaxLength??300}`,this.data?.subtitlesMaxLength??300,50,300),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesMaxLengthSlider.container),this.votSubtitlesHighlightWordsCheckbox=bt.createCheckbox(y.get("VOTHighlightWords"),this.data?.highlightWords??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHighlightWordsCheckbox.container),this.votAboutHeader=bt.createHeader(y.get("about")),this.votSettingsDialog.bodyContainer.appendChild(this.votAboutHeader),this.votLanguageSelect=bt.createVOTSelect(y.get("langs")[b.syncGet("locale-lang-override","auto")],y.get("VOTMenuLanguage"),jt(f,b.syncGet("locale-lang-override","auto")),{onSelectCb:async t=>{await b.set("locale-lang-override",t.target.dataset.votValue)},labelElement:bt.createVOTSelectLabel(y.get("VOTMenuLanguage"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votLanguageSelect.container),this.votShowPiPButtonCheckbox=bt.createCheckbox(y.get("VOTShowPiPButton"),this.data?.showPiPButton??!1),this.votShowPiPButtonCheckbox.container.hidden=!E(),this.votSettingsDialog.bodyContainer.appendChild(this.votShowPiPButtonCheckbox.container),this.votVersionInfo=bt.createInformation(`${y.get("VOTVersion")}:`,`cloudflare ${GM_info.script.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votVersionInfo.container),this.votAuthorsInfo=bt.createInformation(`${y.get("VOTAuthors")}:`,GM_info.script.author),this.votSettingsDialog.bodyContainer.appendChild(this.votAuthorsInfo.container),this.votLoaderInfo=bt.createInformation(`${y.get("VOTLoader")}:`,`${GM_info.scriptHandler} v${GM_info.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votLoaderInfo.container),this.votBrowserInfo=bt.createInformation(`${y.get("VOTBrowser")}:`,`${Dt.browser.name} ${Dt.browser.version} (${Dt.os.name} ${Dt.os.version})`),this.votSettingsDialog.bodyContainer.appendChild(this.votBrowserInfo.container),this.votResetSettingsButton=bt.createButton(y.get("resetSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votResetSettingsButton)}initUIEvents(){this.votButton.translateButton.addEventListener("click",(async()=>{if(this.audio.src)return m.Z.log("[click translationBtn] audio.src is not empty"),void this.stopTraslate();try{m.Z.log("[click translationBtn] trying execute translation");const t=L(this.site.host,this.video);if(!t)throw new w("VOTNoVideoIDFound");await this.translateExecutor(t)}catch(t){console.error("[VOT]",t),"VOTLocalizedError"===t?.name?this.transformBtn("error",t.localizedMessage):this.transformBtn("error",t)}})),this.votButton.pipButton.addEventListener("click",(async()=>{this.video!==document.pictureInPictureElement?await this.video.requestPictureInPicture():await document.exitPictureInPicture()})),this.votButton.menuButton.addEventListener("click",(()=>{this.votMenu.container.hidden=!this.votMenu.container.hidden})),this.votDownloadButton.addEventListener("click",(()=>{this.downloadTranslationUrl&&window.open(this.downloadTranslationUrl,"_blank").focus()})),this.votDownloadSubtitlesButton.addEventListener("click",(()=>{console.log(this.downloadSubtitlesUrl),this.downloadSubtitlesUrl&&window.open(this.downloadSubtitlesUrl,"_blank").focus()})),this.votSettingsButton.addEventListener("click",(()=>{this.votSettingsDialog.container.hidden=!this.votSettingsDialog.container.hidden,(void 0===document.fullscreen||document.fullscreen)&&(document.webkitExitFullscreen&&document.webkitExitFullscreen(),document.mozCancelFullscreen&&document.mozCancelFullscreen(),document.exitFullscreen&&document.exitFullscreen())})),this.votVideoVolumeSlider.input.addEventListener("input",(t=>{const e=Number(t.target.value);if(this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`,this.setVideoVolume(e/100),1===this.data.syncVolume){const t=Number(this.votVideoTranslationVolumeSlider.input.value),o=ft(this.audio,e,t,this.tempOriginalVolume);this.votVideoTranslationVolumeSlider.input.value=o,this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,bt.updateSlider(this.votVideoTranslationVolumeSlider.input),this.tempVolume=o,this.tempOriginalVolume=e}})),this.votVideoTranslationVolumeSlider.input.addEventListener("input",(async t=>{this.data.defaultVolume=Number(t.target.value),await b.set("defaultVolume",this.data.defaultVolume),this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${this.data.defaultVolume}%`,this.audio.volume=this.data.defaultVolume/100,1===this.data.syncVolume&&this.syncTranslationWithVideo(this.data.defaultVolume)})),this.votAutoTranslateCheckbox.input.addEventListener("change",(async t=>{this.data.autoTranslate=Number(t.target.checked),await b.set("autoTranslate",this.data.autoTranslate),m.Z.log("autoTranslate value changed. New value: ",this.data.autoTranslate)})),this.votDontTranslateYourLangSelect.labelElement.addEventListener("change",(async t=>{this.data.dontTranslateYourLang=Number(t.target.checked),await b.set("dontTranslateYourLang",this.data.dontTranslateYourLang),m.Z.log("dontTranslateYourLang value changed. New value: ",this.data.dontTranslateYourLang)})),this.votAutoSetVolumeCheckbox.input.addEventListener("change",(async t=>{this.data.autoSetVolumeYandexStyle=Number(t.target.checked),await b.set("autoSetVolumeYandexStyle",this.data.autoSetVolumeYandexStyle),m.Z.log("autoSetVolumeYandexStyle value changed. New value: ",this.data.autoSetVolumeYandexStyle)})),this.votAutoSetVolumeSlider.input.addEventListener("input",(async t=>{const e=Number(t.target.value);this.data.autoVolume=e/100,await b.set("autoVolume",e),this.votAutoSetVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`})),this.votShowVideoSliderCheckbox.input.addEventListener("change",(async t=>{this.data.showVideoSlider=Number(t.target.checked),await b.set("showVideoSlider",this.data.showVideoSlider),m.Z.log("showVideoSlider value changed. New value: ",this.data.showVideoSlider),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status})),this.votUdemyDataTextfield.input.addEventListener("change",(async t=>{this.data.udemyData={accessToken:t.target.value,expires:(new Date).getTime()},await b.set("udemyData",this.data.udemyData),m.Z.log("udemyData value changed. New value: ",this.data.udemyData),window.location.reload()})),this.votSyncVolumeCheckbox.input.addEventListener("change",(async t=>{this.data.syncVolume=Number(t.target.checked),await b.set("syncVolume",this.data.syncVolume),m.Z.log("syncVolume value changed. New value: ",this.data.syncVolume)})),this.votAudioProxyCheckbox.input.addEventListener("change",(async t=>{this.data.audioProxy=Number(t.target.checked),await b.set("audioProxy",this.data.audioProxy),m.Z.log("audioProxy value changed. New value: ",this.data.audioProxy)})),this.votTranslationServiceSelect.labelElement.addEventListener("change",(async t=>{this.data.translateAPIErrors=Number(t.target.checked),await b.set("translateAPIErrors",this.data.translateAPIErrors),m.Z.log("translateAPIErrors value changed. New value: ",this.data.translateAPIErrors)})),this.votSubtitlesMaxLengthSlider.input.addEventListener("input",(async t=>{this.data.subtitlesMaxLength=Number(t.target.value),await b.set("subtitlesMaxLength",this.data.subtitlesMaxLength),this.votSubtitlesMaxLengthSlider.label.querySelector("strong").innerHTML=`${this.data.subtitlesMaxLength}`,this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength)})),this.votSubtitlesHighlightWordsCheckbox.input.addEventListener("change",(async t=>{this.data.highlightWords=Number(t.target.checked),await b.set("highlightWords",this.data.highlightWords),m.Z.log("highlightWords value changed. New value: ",this.data.highlightWords),this.subtitlesWidget.setHighlightWords(this.data.highlightWords)})),this.votShowPiPButtonCheckbox.input.addEventListener("change",(async t=>{this.data.showPiPButton=Number(t.target.checked),await b.set("showPiPButton",this.data.showPiPButton),m.Z.log("showPiPButton value changed. New value: ",this.data.showPiPButton),this.votButton.pipButton.hidden=!E()||!this.data.showPiPButton,this.votButton.separator2.hidden=!E()||!this.data.showPiPButton})),this.votResetSettingsButton.addEventListener("click",(async()=>{y.reset(),(await b.list()).filter((t=>!y.gmValues.includes(t))).forEach((t=>b.syncDelete(t))),window.location.reload()}))}releaseExtraEvents(){clearInterval(this.resizeInterval),this.resizeObserver?.disconnect(),"youtube"===this.site.host&&"mobile"!==this.site.additionalData&&this.syncVolumeObserver?.disconnect(),this.extraEvents?.forEach((t=>{t.element.removeEventListener(t.event,t.handler)}))}initExtraEvents(){this.extraEvents=[];const t=(t,e,o)=>{this.extraEvents.push({element:t,event:e,handler:o}),t.addEventListener(e,o)},e=(e,o,n)=>{o.forEach((o=>{t(e,o,n)}))};if(this.resizeObserver=new ResizeObserver((t=>{t.forEach((t=>{this.votMenu.container.setAttribute("style",`--vot-container-height: ${t.contentRect.height}px`)}))})),this.resizeObserver.observe(this.video),this.votMenu.container.setAttribute("style",`--vot-container-height: ${this.video.getBoundingClientRect().height}px`),this.resizeInterval=setInterval((()=>{this.votMenu.container.setAttribute("style",`--vot-container-height: ${this.video.getBoundingClientRect().height}px`)}),500),"youtube"===this.site.host&&"mobile"!==this.site.additionalData){this.syncVolumeObserver=new MutationObserver((t=>{t.forEach((t=>{"attributes"===t.type&&"aria-valuenow"===t.attributeName&&this.syncVideoVolumeSlider()}))}));const t=document.querySelector(".ytp-volume-panel");t&&this.syncVolumeObserver.observe(t,{attributes:!0,childList:!1,subtree:!0,attributeOldValue:!0})}let o;document.addEventListener("click",(t=>{const e=t.target,o=this.votButton.container,n=this.votMenu.container,i=this.container,a=this.votSettingsDialog.container,r=document.querySelector(".vot-dialog-temp"),s=o.contains(e),l=n.contains(e),d=i.contains(e),c=a.contains(e),u=r?.contains(e)??!1;m.Z.log(`[document click] ${s} ${l} ${d} ${c} ${u}`),s||l||c||u||(d||this.logout(0),this.votMenu.container.hidden=!0)})),o="pornhub"===this.site.host?"embed"===this.site.additionalData?document.querySelector("#player"):this.container.querySelector(".video-element-wrapper-js > div"):"twitter"===this.site.host?document.querySelector('div[data-testid="videoPlayer"]'):"yandexdisk"===this.site.host?document.querySelector(".video-player__player"):this.container,o&&e(o,["mousemove","mouseout"],this.resetTimerBound),t(this.votButton.container,"mousemove",this.changeOpacityOnEventBound),t(this.votMenu.container,"mousemove",this.changeOpacityOnEventBound),e(document,["touchstart","touchmove","touchend"],this.changeOpacityOnEventBound),t(this.votButton.container,"mousedown",(t=>{t.stopImmediatePropagation()})),t(this.votMenu.container,"mousedown",(t=>{t.stopImmediatePropagation()})),"youtube"===this.site.host&&(this.container.draggable=!1),t(this.video,"abort",(()=>{m.Z.log("lipsync mode is abort"),this.stopTranslation(),this.videoData=""})),t(this.video,"progress",(async()=>{if(!this.firstPlay||1!==this.data.autoTranslate)return;const t=L(this.site.host,this.video);if(!t)throw new w("VOTNoVideoIDFound");try{await this.translateExecutor(t),this.firstPlay=!1}catch(t){console.error("[VOT]",t),"VOTLocalizedError"===t?.name?this.transformBtn("error",t.localizedMessage):this.transformBtn("error",t),this.firstPlay=!1}}))}logout(t){this.votMenu.container.hidden&&(this.votButton.container.style.opacity=t)}resetTimer(){clearTimeout(this.timer),this.logout(1),this.timer=setTimeout((()=>{this.logout(0)}),2e3)}changeOpacityOnEvent(t){clearTimeout(this.timer),this.logout(1),t.stopPropagation()}async changeSubtitlesLang(t){if(m.Z.log("[onchange] subtitles",t),this.votSubtitlesSelect.setSelected(t),"disabled"===t)this.votSubtitlesSelect.setTitle(y.get("VOTSubtitlesDisabled")),this.subtitlesWidget.setContent(null),this.votDownloadSubtitlesButton.hidden=!0,this.downloadSubtitlesUrl=null;else{const e=await async function(t){let e=!1,o=await Promise.race([new Promise((async t=>{await M(5e3),e||console.error("[VOT] Failed to fetch subtitles. Reason: timeout"),e=!0,t([])})),new Promise((async o=>{m.Z.log("Fetching subtitles:",t),await fetch(t.url).then((t=>t.json())).then((t=>{e=!0,o(t)})).catch((t=>{console.error("[VOT] Failed to fetch subtitles. Reason:",t),e=!0,o({containsTokens:!1,subtitles:[]})}))}))]);return"youtube"===t.source&&(o=function(t){const e={containsTokens:!1,subtitles:[]};if("object"!=typeof t||!("events"in t)||!Array.isArray(t.events))return console.error("[VOT] Failed to format youtube subtitles",t),e;for(let o=0;ot.utf8.replace(/^ +| +$/g,""))).join(" ");let i=t.events[o].dDurationMs;t.events[o+1]&&t.events[o].tStartMs+t.events[o].dDurationMs>t.events[o+1].tStartMs&&(i=t.events[o+1].tStartMs-t.events[o].tStartMs),"\n"!==n&&e.subtitles.push({text:n,startMs:t.events[o].tStartMs,durationMs:i})}return e}(o)),o.subtitles=function(t,e){const o=[];let n;for(const i of t.subtitles){let a;if(i?.tokens?.length){if("yandex"!==e)return console.warn("[VOT] Unsupported subtitles tokens type: ",e),t.containsTokens=!1,null;a=Tt(i)}else a=kt(i,n);n=a[a.length-1],o.push(Object.assign(Object.assign({},i),{tokens:a}))}return t.containsTokens=!0,o}(o,t.source),console.log("[VOT] subtitles:",o),o}(this.subtitlesList.at(parseInt(t)));this.subtitlesWidget.setContent(e),this.votDownloadSubtitlesButton.hidden=!1,this.downloadSubtitlesUrl=this.subtitlesList.at(parseInt(t))?.url}}async updateSubtitlesLangSelect(){const t=[{label:y.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1},...this.subtitlesList.map(((t,e)=>({label:(y.get("langs")[t.language]??t.language.toUpperCase())+(t.translatedFromLanguage?` ${y.get("VOTTranslatedFrom")} ${y.get("langs")[t.translatedFromLanguage]??t.translatedFromLanguage.toUpperCase()}`:"")+("yandex"!==t.source?` ${t.source}`:"")+(t.isAutoGenerated?` (${y.get("VOTAutogenerated")})`:""),value:e,selected:!1,disabled:!1})))];this.votSubtitlesSelect.updateItems(t),await this.changeSubtitlesLang(t[0].value)}async updateSubtitles(){await this.changeSubtitlesLang("disabled");const t=L(this.site.host,this.video);if(!t)return console.error(`[VOT] ${y.getDefault("VOTNoVideoIDFound")}`),this.subtitlesList=[],this.subtitlesListVideoId=null,void await this.updateSubtitlesLangSelect();this.subtitlesListVideoId!==t&&(this.videoData.detectedLanguage||(this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage)),this.subtitlesList=await async function(t,e,n){const i="youtube"===t.host?j():[];let a=!1;const r=[...await Promise.race([new Promise((async t=>{await M(5e3),a||console.error("[VOT] Failed get yandex subtitles. Reason: timeout"),a=!0,t([])})),new Promise((i=>{!async function(t,e,n){try{m.Z.log("requestVideoSubtitles");const i=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;m.Z.log("Inited yandexRequest...");const a=at(t,e);await i("/video-subtitles/get-subtitles",a,{"Vsubs-Signature":await St(a),"Sec-Vsubs-Token":xt(!1)},n)}catch(t){console.error("[VOT]",t),n(!1)}}(`${t.url}${e}`,n,((t,e)=>{m.Z.log("[exec callback] Requesting video subtitles"),t||(console.error("[VOT] Failed get yandex subtitles"),a=!0,i([]));const o=rt(e);console.log("[VOT] Subtitles response: ",o);let n=o.subtitles??[];n=n.reduce(((t,e)=>(e.language&&!t.find((t=>{if("yandex"===t.source&&t.language===e.language&&!t.translatedFromLanguage)return t}))&&t.push({source:"yandex",language:e.language,url:e.url}),e.translatedLanguage&&t.push({source:"yandex",language:e.translatedLanguage,translatedFromLanguage:e.language,url:e.translatedUrl}),t)),[]),a=!0,i(n)}))}))]),...i].sort(((t,e)=>{if(t.source!==e.source)return"yandex"===t.source?-1:1;if(t.language!==e.language&&(t.language===V||e.language===V))return t.language===V?-1:1;if("yandex"===t.source){if(t.translatedFromLanguage!==e.translatedFromLanguage)return t.translatedFromLanguage&&e.translatedFromLanguage?t.translatedFromLanguage===n?-1:1:t.language===e.language?t.translatedFromLanguage?1:-1:t.translatedFromLanguage?-1:1;if(!t.translatedFromLanguage)return t.language===n?-1:1}return"youtube"===t.source&&t.isAutoGenerated!==e.isAutoGenerated?t.isAutoGenerated?1:-1:0}));return console.log("[VOT] subtitles list",r),r}(this.site,t,this.videoData.detectedLanguage),this.subtitlesList?this.subtitlesListVideoId=t:await this.changeSubtitlesLang("disabled"),await this.updateSubtitlesLangSelect())}getVideoVolume(){let t=this.video?.volume;return"youtube"===this.site.host&&(t=N()||t),t}setVideoVolume(t){if("youtube"===this.site.host)return Z(t);this.video.volume=t}syncVideoVolumeSlider(){const t=Math.round(100*this.getVideoVolume());this.votVideoVolumeSlider.input.value=t,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${t}%`,bt.updateSlider(this.votVideoVolumeSlider.input),1===this.data.syncVolume&&(this.tempOriginalVolume=Number(t))}setSelectMenuValues(t,e){this.votTranslationLanguageSelect.fromSelect.setTitle(y.get("langs")[t]),this.votTranslationLanguageSelect.toSelect.setTitle(y.get("langs")[e]),this.votTranslationLanguageSelect.fromSelect.setSelected(t),this.votTranslationLanguageSelect.toSelect.setSelected(e),console.log(`[VOT] Set translation from ${t} to ${e}`),this.videoData.detectedLanguage=t,this.videoData.responseLanguage=e}syncTranslationWithVideo(t){const e=Number(this.votVideoVolumeSlider.input.value),o=ft(this.video,t,e,this.tempVolume);this.votVideoVolumeSlider.input.value=o,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,bt.updateSlider(this.votVideoVolumeSlider.input),this.tempOriginalVolume=o,this.tempVolume=t}async getVideoData(){const t={translationHelp:null,isStream:!1};if(t.duration=this.video?.duration||343,t.videoId=L(this.site.host,this.video),t.detectedLanguage=this.translateFromLang,t.responseLanguage=this.translateToLang,!t.videoId)return this.ytData={},t;if(window.location.hostname.includes("youtube.com"))this.ytData=await $(),t.isStream=this.ytData.isLive,""!==this.ytData.author&&(t.detectedLanguage=this.ytData.detectedLanguage,t.responseLanguage=this.translateToLang);else if(window.location.hostname.includes("rutube")||window.location.hostname.includes("my.mail.ru"))t.detectedLanguage="ru";else if(window.location.hostname.includes("bilibili.com"))t.detectedLanguage="zh";else if(window.location.hostname.includes("coursera.org")){const e=await Ot(this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else if(window.location.hostname.includes("udemy.com")){const e=await _t(this.data.udemyData,this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else"vk"!==this.site.host&&"piped"!==this.site.host&&"invidious"!==this.site.host&&"bitchute"!==this.site.host&&"rumble"!==this.site.host&&"peertube"!==this.site.host&&"dailymotion"!==this.site.host&&"trovo"!==this.site.host&&"yandexdisk"!==this.site.host||(t.detectedLanguage="auto");return t}videoValidator(){if("youtube"===this.site.host){if(m.Z.log("VideoValidator videoData: ",this.videoData),1===this.data.dontTranslateYourLang&&this.videoData.detectedLanguage===this.data.dontTranslateLanguage&&this.videoData.responseLanguage===this.data.dontTranslateLanguage)throw new w("VOTDisableFromYourLang");if(this.videoData.duration>14400)throw new w("VOTVideoIsTooLong")}return!0}lipSync(t=!1){if(m.Z.log("lipsync video",this.video),this.video)if(this.audio.currentTime=this.video.currentTime,this.audio.playbackRate=this.video.playbackRate,t)if("play"!==t)"pause"===t&&(m.Z.log("lipsync mode is pause"),this.audio.pause()),"stop"===t&&(m.Z.log("lipsync mode is stop"),this.audio.pause()),"waiting"===t&&(m.Z.log("lipsync mode is waiting"),this.audio.pause()),"playing"===t&&(m.Z.log("lipsync mode is playing"),this.audio.play());else{m.Z.log("lipsync mode is play");const t=this.audio.play();void 0!==t&&t.catch((t=>{if(console.error("[VOT]",t),"NotAllowedError"===t.name)throw this.transformBtn("error",y.get("grantPermissionToAutoPlay")),new w("grantPermissionToAutoPlay");if("NotSupportedError"===t.name)throw this.transformBtn("error",It.includes(window.location.hostname)?y.get("neededAdditionalExtension"):y.get("audioFormatNotSupported")),It.includes(window.location.hostname)?new w("neededAdditionalExtension"):new w("audioFormatNotSupported")}))}else m.Z.log("lipsync mode is not set")}handleVideoEvent(t){m.Z.log(`video ${t.type}`),this.lipSync(t.type)}stopTraslate(){Nt.forEach((t=>this.video.removeEventListener(t,this.handleVideoEventBound))),this.audio.pause(),this.audio.src="",this.audio.removeAttribute("src"),this.votVideoVolumeSlider.container.hidden=!0,this.votVideoTranslationVolumeSlider.container.hidden=!0,this.votDownloadButton.hidden=!0,this.downloadTranslationUrl=null,this.transformBtn("none",y.get("translateVideo")),this.volumeOnStart&&(m.Z.log(`Volume on start: ${this.volumeOnStart}`),"youtube"===this.site.host?Z(this.volumeOnStart):this.video.volume=this.volumeOnStart),clearInterval(this.streamPing),this.hls?.destroy(),this.hls=P()}async translateExecutor(t){this.videoData.detectedLanguage||(this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage)),m.Z.log("Run videoValidator"),this.videoValidator(),m.Z.log("Run translateFunc"),this.translateFunc(t,this.videoData.isStream,this.videoData.detectedLanguage,this.videoData.responseLanguage,this.videoData.translationHelp)}translateFunc(t,e,n,i,a){console.log("[VOT] Video Data: ",this.videoData);const r=`${this.site.url}${t}`;if(this.videoValidator(),e)return m.Z.log("Executed stream translation"),void function(t,e,n,i){m.Z.log(`Translate stream (url: ${t}, requestLang: ${e}, responseLang: ${n})`),async function(t,e,n,i){try{m.Z.log("requestStreamTranslation");const a=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;m.Z.log("Inited yandexRequest...");const r=lt(t,e,n);await a("/stream-translation/translate-stream",r,{"Vtrans-Signature":await St(r),"Sec-Vtrans-Token":xt(!1)},i)}catch(t){console.error("[VOT]",t),i(!1)}}(t,e,n,((t,e)=>{if(m.Z.log("[exec callback] Requesting stream translation"),!t)return void i(!1,y.get("requestTranslationFailed"));const o=dt(e);switch(console.log("[VOT] Stream Translation response: ",o),o.interval){case 10:i(!1,o.interval,y.get("translationTakeFewMinutes"));break;case 20:i(!0,o.interval,o||y.get("audioNotReceived"));break;case 0:i(!1,o.interval,y.get("streamNoConnectionToServer"))}}))}(r,n,i,(async(r,s,l)=>{if(m.Z.log("[exec callback] translateStream callback"),L(this.site.host,this.video)!==t)return;if(!r||!l.translatedInfo)return"VOTLocalizedError"===l?.name?this.transformBtn("error",l.localizedMessage):1===this.data.translateAPIErrors&&"ru"!==y.lang?(this.transformBtn("error",`${y.get("VOTTranslatingError")}...`),this.transformBtn("error",await F(l,"ru",y.lang))):this.transformBtn("error",l),void(10===s&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),1e3*s)));this.transformBtn("success",y.get("disableTranslate")),console.log(l);const d=l.pingId;m.Z.log(`Stream pingId: ${d}`),this.streamPing=setInterval((async()=>await async function(t,e){try{m.Z.log("requestStreamPing");const n=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;m.Z.log("Inited yandexRequest...");const i=st(t);await n("/stream-translation/ping-stream",i,{"Vtrans-Signature":await St(i),"Sec-Vtrans-Token":xt(!1)},e)}catch(t){console.error("[VOT]",t),e(!1)}}(d,(t=>m.Z.log("Stream ping result: ",t)))),1e3*s),m.Z.log(l.translatedInfo.url);const c=`https://${C.e6}/?all=yes&origin=${encodeURIComponent("https://strm.yandex.ru")}&referer=${encodeURIComponent("https://strm.yandex.ru")}&url=${encodeURIComponent(l.translatedInfo.url)}`;if(m.Z.log(c),m.Z.log("Test hls support"),this.hls)this.hls.on(Hls.Events.MEDIA_ATTACHED,(function(){m.Z.log("audio and hls.js are now bound together !")})),this.hls.on(Hls.Events.MANIFEST_PARSED,(function(t,e){m.Z.log("manifest loaded, found "+e.levels.length+" quality level")})),this.hls.loadSource(c),this.hls.attachMedia(this.audio),this.hls.on(Hls.Events.ERROR,(function(t,e){if(e.fatal)switch(e.type){case Hls.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover"),this.hls.recoverMediaError();break;case Hls.ErrorTypes.NETWORK_ERROR:console.error("fatal network error encountered",e);break;default:this.hls.destroy()}})),m.Z.log(this.hls);else{if(!this.audio.canPlayType("application/vnd.apple.mpegurl"))throw new w("audioFormatNotSupported");this.audio.src=c}H(this.video,10),this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),this.video.src||this.video.currentSrc||this.video.srcObject?(this.video&&!this.video.paused&&this.lipSync("play"),Nt.forEach((t=>this.video.addEventListener(t,this.handleVideoEventBound))),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,1===this.data.autoSetVolumeYandexStyle&&(this.votVideoVolumeSlider.input.value=100*this.data.autoVolume,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=100*this.data.autoVolume+"%",bt.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=c):this.stopTranslation()}));if(["udemy","coursera"].includes(this.site.host)&&!a)throw new w("VOTTranslationHelpNull");Zt(r,this.videoData.duration,n,i,a,(async(o,r)=>{if(m.Z.log("[exec callback] translateVideo callback"),L(this.site.host,this.video)!==t)return;if(!o)return"VOTLocalizedError"===r?.name?this.transformBtn("error",r.localizedMessage):1!==this.data.translateAPIErrors||r.includes(y.get("translationTake"))||"ru"===y.lang?this.transformBtn("error",r):(this.transformBtn("error",y.get("VOTTranslatingError")),this.transformBtn("error",await F(r,"ru",y.lang))),r.includes(y.get("translationTake"))&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),6e4)),void console.error("[VOT]",r);if(this.audio.src=r,1===this.data.audioProxy&&r.startsWith("https://")){const t=r.replace("https://vtrans.s3-private.mds.yandex.net/tts/prod/",""),e=`https://${yt.i}/video-translation/audio-proxy/${t}`;console.log(`[VOT] Audio proxied via ${e}`),this.audio.src=e}if(this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),"twitter"===this.site.host&&document.querySelector('div[data-testid="app-bar-back"][role="button"]').addEventListener("click",this.stopTranslationBound),!this.video.src&&!this.video.currentSrc&&!this.video.srcObject)return void this.stopTranslation();const s=["twitch","vimeo","facebook","rutube","twitter","bilibili","mail_ru","rumble","eporner"];for(let t=0;t{t.forEach((t=>{"attributes"===t.type&&"src"===t.attributeName&&t.target===this.video&&""!==t.target.src&&(this.stopTranslation(),this.firstPlay=!0)}))})).observe(this.container,{attributes:!0,childList:!1,subtree:!0,attributeOldValue:!0});break}this.video&&!this.video.paused&&this.lipSync("play"),Nt.forEach((t=>this.video.addEventListener(t,this.handleVideoEventBound))),this.transformBtn("success",y.get("disableTranslate")),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,1===this.data.autoSetVolumeYandexStyle&&(this.votVideoVolumeSlider.input.value=100*this.data.autoVolume,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=100*this.data.autoVolume+"%",bt.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=r}))}stopTranslation(){this.stopTraslate(),this.syncVideoVolumeSlider()}async waitInitialization(){let t=!1;return await Promise.race([new Promise((async e=>{await M(1e3),t||console.error("[VOT] Initialization timeout"),t=!0,e(!1)})),new Promise((async e=>{for(;!this.initialized;)await M(100);t=!0,e(!0)}))])}async handleSrcChanged(){if(m.Z.log("[VideoHandler] src changed",this),!await this.waitInitialization())return;this.stopTranslation(),this.videoData=await this.getVideoData(),this.firstPlay=!0;const t=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=t,t&&(this.votMenu.container.hidden=t),this.site.selector||(this.container=this.video.parentElement),this.container.contains(this.votButton.container)||(this.container.appendChild(this.votButton.container),this.container.appendChild(this.votMenu.container)),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage??"ru"),this.translateToLang=this.data.responseLanguage??"ru"}async release(){m.Z.log("[VideoHandler] release"),await this.waitInitialization()&&(this.initialized=!1,this.stopTranslation(),this.releaseExtraEvents(),this.subtitlesWidget.release(),this.srcObserver.disconnect(),clearInterval(this.srcObjectInterval),this.votButton.container.remove(),this.votMenu.container.remove())}}const Ut=new class{constructor(){this.onVideoAdded=new Rt,this.onVideoRemoved=new Rt,this.handleVideoAddedBound=this.handleVideoAdded.bind(this),this.handleVideoRemovedBound=this.handleVideoRemoved.bind(this),this.observer=new MutationObserver((t=>{window.requestIdleCallback((()=>{t.forEach((t=>{"childList"===t.type&&(qt(t.addedNodes).forEach(this.handleVideoAddedBound),qt(t.removedNodes).forEach(this.handleVideoRemovedBound))}))}),{timeout:1e3})}))}enable(){this.observer.observe(document,{childList:!0,subtree:!0}),document.querySelectorAll("video").forEach(this.handleVideoAddedBound)}disable(){this.observer.disconnect()}handleVideoAdded(t){this.onVideoAdded.dispatch(t)}handleVideoRemoved(t){document.contains(t)||this.onVideoRemoved.dispatch(t)}},Wt=new WeakMap;(async function(){m.Z.log("Loading extension..."),await y.update(),m.Z.log(`Selected menu language: ${y.lang}`),m.Z.log("Extension compatibility passed..."),Ut.onVideoAdded.addListener((t=>{for(const e of zt.filter((t=>{const e=t=>t instanceof RegExp&&t.test(window.location.hostname)||"string"==typeof t&&window.location.hostname.includes(t)||"function"==typeof t&&t(new URL(window.location));return!!(e(t.match)||t.match instanceof Array&&t.match.some((t=>e(t))))&&t.host&&t.url}))){if(!e)continue;let o;if(e.shadowRoot?(o=e.selector?Object.values(document.querySelectorAll(e.selector)).find((e=>e.shadowRoot.contains(t))):t.parentElement,o=o&&o.shadowRoot?o.parentElement:o):o=e.selector?Object.values(document.querySelectorAll(e.selector)).find((e=>e.contains(t))):t.parentElement,o&&!("rumble"===e.host&&o.querySelector("vot-block")||("peertube"===e.host&&(e.url=window.location.origin),Wt.has(t)))){Wt.set(t,new Ht(t,o,e));break}}})),Ut.onVideoRemoved.addListener((async t=>{Wt.has(t)&&(await Wt.get(t).release(),Wt.delete(t))})),Ut.enable()})().catch((t=>{console.error("[VOT]",t)}))})()})(); \ No newline at end of file +(()=>{var t={"./node_modules/bowser/es5.js":function(t){t.exports=function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=90)}({17:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n=o(18),i=function(){function t(){}return t.getFirstMatch=function(t,e){var o=e.match(t);return o&&o.length>0&&o[1]||""},t.getSecondMatch=function(t,e){var o=e.match(t);return o&&o.length>1&&o[2]||""},t.matchAndReturnConst=function(t,e,o){if(t.test(e))return o},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,o,n){void 0===n&&(n=!1);var i=t.getVersionPrecision(e),a=t.getVersionPrecision(o),r=Math.max(i,a),s=0,l=t.map([e,o],(function(e){var o=r-t.getVersionPrecision(e),n=e+new Array(o+1).join(".0");return t.map(n.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(n&&(s=r-Math.min(i,a)),r-=1;r>=s;){if(l[0][r]>l[1][r])return 1;if(l[0][r]===l[1][r]){if(r===s)return 0;r-=1}else if(l[0][r]1?i-1:0),r=1;r0){var r=Object.keys(o),l=s.default.find(r,(function(t){return e.isOS(t)}));if(l){var d=this.satisfies(o[l]);if(void 0!==d)return d}var c=s.default.find(r,(function(t){return e.isPlatform(t)}));if(c){var u=this.satisfies(o[c]);if(void 0!==u)return u}}if(a>0){var h=Object.keys(i),p=s.default.find(h,(function(t){return e.isBrowser(t,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var o=this.getBrowserName().toLowerCase(),n=t.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return e&&i&&(n=i.toLowerCase()),n===o},e.compareVersion=function(t){var e=[0],o=t,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(o=t.substr(1),"="===t[1]?(n=!0,o=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?o=t.substr(1):"~"===t[0]&&(n=!0,o=t.substr(1)),e.indexOf(s.default.compareVersions(i,o,n))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=d,t.exports=e.default},92:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=/version\/(\d+(\.?_?\d+)+)/i,r=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},o=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},o=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},o=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},o=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},o=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},o=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},o=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},o=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},o=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},o=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},o=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},o=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return o&&(e.version=o),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},o=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},o=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},o=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},o=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},o=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},o=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},o=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},o=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},o=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},o=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},o=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},o=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e={name:"Android Browser"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(e,t),version:i.default.getSecondMatch(e,t)}}}];e.default=r,t.exports=e.default},93:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/Roku\/DVP/],describe:function(t){var e=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:a.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),o=i.default.getWindowsVersionName(e);return{name:a.OS_MAP.Windows,version:e,versionName:o}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:a.OS_MAP.iOS},o=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return o&&(e.version=o),e}},{test:[/macintosh/i],describe:function(t){var e=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),o=i.default.getMacOSVersionName(e),n={name:a.OS_MAP.MacOS,version:e};return o&&(n.versionName=o),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),o=i.default.getAndroidVersionName(e),n={name:a.OS_MAP.Android,version:e};return o&&(n.versionName=o),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),o={name:a.OS_MAP.WebOS};return e&&e.length&&(o.version=e),o}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:a.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.PlayStation4,version:e}}}];e.default=r,t.exports=e.default},94:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",o={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(o.model=e),o}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),o=t.test(/like (ipod|iphone)/i);return e&&!o},describe:function(t){var e=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];e.default=r,t.exports=e.default},95:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:a.ENGINE_MAP.Blink};var e=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:a.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:a.ENGINE_MAP.Trident},o=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:a.ENGINE_MAP.Presto},o=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=t.test(/gecko/i),o=t.test(/like gecko/i);return e&&!o},describe:function(t){var e={name:a.ENGINE_MAP.Gecko},o=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:a.ENGINE_MAP.WebKit},o=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}}];e.default=r,t.exports=e.default}})},"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss":(t,e,o)=>{"use strict";o.d(e,{Z:()=>s});var n=o("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=o.n(n),a=o("./node_modules/css-loader/dist/runtime/api.js"),r=o.n(a)()(i());r.push([t.id,'.vot-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:none;border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-ontheme));background-color:rgb(var(--vot-helper-theme));box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer;transition:box-shadow .2s}.vot-button[hidden]{display:none !important}.vot-button::-moz-focus-inner{border:none}.vot-button::before,.vot-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-button::before{background-color:rgb(var(--vot-helper-ontheme));transition:opacity .2s}.vot-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-button:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.vot-button:hover::before{opacity:.08}.vot-button:active{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.vot-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s}.vot-button:disabled{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.12);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);box-shadow:none;cursor:initial}.vot-button:disabled::before,.vot-button:disabled::after{opacity:0}.vot-outlined-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:solid 1px;border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.24);border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:34px;outline:none;cursor:pointer}.vot-outlined-button[hidden]{display:none !important}.vot-outlined-button::-moz-focus-inner{border:none}.vot-outlined-button::before,.vot-outlined-button::after{content:"";position:absolute;border-radius:3px;top:0;right:0;bottom:0;left:0;opacity:0}.vot-outlined-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-outlined-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-outlined-button:hover::before{opacity:.04}.vot-outlined-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-outlined-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-outlined-button:disabled::before,.vot-outlined-button:disabled::after{opacity:0}.vot-text-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:4px;padding:0 8px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-text-button[hidden]{display:none !important}.vot-text-button::-moz-focus-inner{border:none}.vot-text-button::before,.vot-text-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-text-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-text-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-text-button:hover::before{opacity:.04}.vot-text-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-text-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-text-button:disabled::before,.vot-text-button:disabled::after{opacity:0}.vot-icon-button{--vot-helper-onsurface: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:50%;padding:0;width:36px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;fill:var(--vot-helper-onsurface);color:var(--vot-helper-onsurface);background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-icon-button[hidden]{display:none !important}.vot-icon-button::-moz-focus-inner{border:none}.vot-icon-button::before,.vot-icon-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-icon-button::before{background-color:var(--vot-helper-onsurface);transition:opacity .2s}.vot-icon-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity .3s,background-size .4s}.vot-icon-button:hover::before{opacity:.04}.vot-icon-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s,opacity 0s}.vot-icon-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);fill:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-icon-button:disabled::before,.vot-icon-button:disabled::after{opacity:0}.vot-icon-button svg{width:fit-content}.vot-textfield{--vot-helper-theme: rgb( var(--vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243)) ) !important;--vot-helper-safari1: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.38 ) !important;--vot-helper-safari2: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari3: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;position:relative !important;display:inline-block;padding-top:6px !important;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-textfield[hidden]{display:none !important}.vot-textfield>input,.vot-textfield>textarea{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:0 !important;border-style:solid !important;border-width:1px !important;border-color:rgba(0,0,0,0) var(--vot-helper-safari2) var(--vot-helper-safari2) !important;border-radius:4px !important;padding:15px 13px 15px !important;width:100% !important;height:inherit !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;-webkit-text-fill-color:currentColor !important;background-color:rgba(0,0,0,0) !important;box-shadow:inset 1px 0 rgba(0,0,0,0),inset -1px 0 rgba(0,0,0,0),inset 0 -1px rgba(0,0,0,0) !important;font-family:inherit !important;font-size:inherit !important;line-height:inherit !important;caret-color:var(--vot-helper-theme) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input:not(:focus):placeholder-shown,.vot-textfield>textarea:not(:focus):placeholder-shown{border-top-color:var(--vot-helper-safari2) !important}.vot-textfield>input+span,.vot-textfield>textarea+span{position:absolute !important;top:0 !important;left:0 !important;display:flex !important;width:100% !important;max-height:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;font-size:75% !important;line-height:15px !important;cursor:text !important;transition:color .2s,font-size .2s,line-height .2s !important;pointer-events:none !important}.vot-textfield>input:not(:focus):placeholder-shown+span,.vot-textfield>textarea:not(:focus):placeholder-shown+span{font-size:inherit !important;line-height:68px !important}.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{content:"" !important;display:block !important;-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin-top:6px !important;border-top:solid 1px var(--vot-helper-safari2) !important;min-width:10px !important;height:8px !important;pointer-events:none !important;box-shadow:inset 0 1px rgba(0,0,0,0) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input+span::before,.vot-textfield>textarea+span::before{margin-right:4px !important;border-left:solid 1px rgba(0,0,0,0) !important;border-radius:4px 0 !important}.vot-textfield>input+span::after,.vot-textfield>textarea+span::after{flex-grow:1 !important;margin-left:4px !important;border-right:solid 1px rgba(0,0,0,0) !important;border-radius:0 4px !important}.vot-textfield>input:not(:focus):placeholder-shown+span::before,.vot-textfield>input:not(:focus):placeholder-shown+span::after,.vot-textfield>textarea:not(:focus):placeholder-shown+span::before,.vot-textfield>textarea:not(:focus):placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}.vot-textfield:hover>input,.vot-textfield:hover>textarea{border-color:rgba(0,0,0,0) var(--vot-helper-safari3) var(--vot-helper-safari3) !important}.vot-textfield:hover>input+span::before,.vot-textfield:hover>input+span::after,.vot-textfield:hover>textarea+span::before,.vot-textfield:hover>textarea+span::after{border-top-color:var(--vot-helper-safari3) !important}.vot-textfield:hover>input:not(:focus):placeholder-shown,.vot-textfield:hover>textarea:not(:focus):placeholder-shown{border-color:var(--vot-helper-safari3) !important}.vot-textfield>input:focus,.vot-textfield>textarea:focus{border-color:rgba(0,0,0,0) var(--vot-helper-theme) var(--vot-helper-theme) !important;box-shadow:inset 1px 0 var(--vot-helper-theme),inset -1px 0 var(--vot-helper-theme),inset 0 -1px var(--vot-helper-theme) !important;outline:none !important}.vot-textfield>input:focus+span,.vot-textfield>textarea:focus+span{color:var(--vot-helper-theme) !important}.vot-textfield>input:focus+span::before,.vot-textfield>input:focus+span::after,.vot-textfield>textarea:focus+span::before,.vot-textfield>textarea:focus+span::after{border-top-color:var(--vot-helper-theme) !important;box-shadow:inset 0 1px var(--vot-helper-theme) !important}.vot-textfield>input:disabled,.vot-textfield>input:disabled+span,.vot-textfield>textarea:disabled,.vot-textfield>textarea:disabled+span{border-color:rgba(0,0,0,0) var(--vot-helper-safari1) var(--vot-helper-safari1) !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;pointer-events:none !important}.vot-textfield>input:disabled+span::before,.vot-textfield>input:disabled+span::after,.vot-textfield>textarea:disabled+span::before,.vot-textfield>textarea:disabled+span::after{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown,.vot-textfield>input:disabled:placeholder-shown+span,.vot-textfield>textarea:disabled:placeholder-shown,.vot-textfield>textarea:disabled:placeholder-shown+span{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown+span::before,.vot-textfield>input:disabled:placeholder-shown+span::after,.vot-textfield>textarea:disabled:placeholder-shown+span::before,.vot-textfield>textarea:disabled:placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}@media not all and (min-resolution: 0.001dpcm){@supports(-webkit-appearance: none){.vot-textfield>input,.vot-textfield>input+span,.vot-textfield>textarea,.vot-textfield>textarea+span,.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{transition-duration:.1s !important}}}.vot-checkbox{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );z-index:0;position:relative;display:inline-block;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-checkbox[hidden]{display:none !important}.vot-checkbox>input{appearance:none;-moz-appearance:none;-webkit-appearance:none;z-index:1;position:absolute;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:3px 1px;border:solid 2px;background:rgba(0,0,0,0);border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6);border-radius:2px;width:18px;height:18px;outline:none;cursor:pointer;transition:border-color .2s,background-color .2s}.vot-checkbox>input+span{display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding-left:30px;width:inherit;cursor:pointer}.vot-checkbox>input+span::before{content:"";position:absolute;left:-10px;top:-8px;display:block;border-radius:50%;width:40px;height:40px;background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0));opacity:0;transform:scale(1);pointer-events:none;transition:opacity .3s,transform .2s}.vot-checkbox>input+span::after{content:"";z-index:1;display:block;position:absolute;top:3px;left:1px;-webkit-box-sizing:content-box !important;-moz-box-sizing:content-box !important;box-sizing:content-box !important;width:10px;height:5px;border:solid 2px rgba(0,0,0,0);border-right-width:0;border-top-width:0;pointer-events:none;transform:translate(3px, 4px) rotate(-45deg);transition:border-color .2s}.vot-checkbox>input:checked,.vot-checkbox>input:indeterminate{border-color:rgb(var(--vot-helper-theme));background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::before,.vot-checkbox>input:indeterminate+span::before{background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::after,.vot-checkbox>input:indeterminate+span::after{border-color:rgb(var(--vot-helper-ontheme, 255, 255, 255))}.vot-checkbox>input:indeterminate+span::after{border-left-width:0;transform:translate(4px, 3px)}.vot-checkbox:hover>input+span::before{opacity:.04}.vot-checkbox:active>input,.vot-checkbox:active:hover>input{border-color:rgb(var(--vot-helper-theme))}.vot-checkbox:active>input:checked{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6)}.vot-checkbox:active>input+span::before{opacity:1;transform:scale(0);transition:transform 0s,opacity 0s}.vot-checkbox>input:disabled{border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled:checked,.vot-checkbox>input:disabled:indeterminate{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38)}.vot-checkbox>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled+span::before{opacity:0;transform:scale(0)}.vot-slider{--vot-safari-helper1: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.04 ) !important;--vot-safari-helper2: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.12 ) !important;--vot-safari-helper3: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.16 ) !important;--vot-safari-helper4: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.24 ) !important;display:inline-block;width:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;font-family:var(--vot-font, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-slider[hidden]{display:none !important}.vot-slider>input{-webkit-appearance:none !important;appearance:none !important;position:relative !important;top:24px !important;display:block !important;margin:0 0 -36px !important;width:100% !important;height:36px !important;background-color:rgba(0,0,0,0) !important;cursor:pointer !important}.vot-slider>input:last-child{position:static !important;margin:0 !important}.vot-slider>span{display:inline-block !important;margin-bottom:36px !important}.vot-slider>input:disabled{cursor:default !important;opacity:.38 !important}.vot-slider>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input::-webkit-slider-runnable-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-webkit-slider-thumb{margin:0 !important;appearance:none !important;-webkit-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper1) !important}.vot-slider>input:active::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper4) !important}.vot-slider>input:disabled::-webkit-slider-runnable-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-webkit-slider-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;color:rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-range-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-moz-range-thumb{appearance:none !important;-moz-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider>input::-moz-range-progress{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider:hover>input:hover::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-moz-range-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-moz-range-progress{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important}.vot-slider>input:disabled::-moz-range-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-focus-outer{border:none !important}.vot-slider>input::-ms-track{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:17px 0 !important;border:none !important;border-radius:1px !important;padding:0 17px !important;width:100% !important;height:2px !important;background-color:rgba(0,0,0,0) !important}.vot-slider>input::-ms-fill-lower{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider>input::-ms-fill-upper{border-radius:1px !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-ms-thumb{appearance:none !important;margin:0 17px !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-ms-fill-lower{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-ms-fill-upper{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;opacity:.38 !important}.vot-slider>input:disabled::-ms-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::before{content:"" !important;display:block !important;position:absolute !important;width:calc(100%*var(--vot-progress, 0)) !important;height:2px !important;top:calc(50% - 1px) !important;background:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0) !important;--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87) !important;--vot-helper-safari1: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari2: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;display:flex;align-items:center;justify-content:space-between;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;line-height:1.5;text-align:start;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-select[hidden]{display:none !important}.vot-select-label{font-size:16px}.vot-select-outer{display:flex;align-items:center;justify-content:space-between;max-width:120px;width:120px;padding:0 5px;border-style:solid !important;border-width:1px !important;border-color:var(--vot-helper-safari1) !important;border-radius:4px !important;cursor:pointer;transition:border .2s !important}.vot-select-outer:hover{border-color:var(--vot-helper-safari2) !important}.vot-select-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vot-select-arrow-icon{width:20px;height:32px;display:flex;justify-content:center;align-items:center}.vot-select-content-list{display:flex;flex-direction:column}.vot-select-content-list .vot-select-content-item{padding:5px 10px;border-radius:8px;cursor:pointer}.vot-select-content-list .vot-select-content-item:not([inert]):hover{background-color:#2a2c31}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]{color:rgb(var(--vot-primary-rgb, 33, 150, 243));background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.2)}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]:hover{background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.1) !important}.vot-select-content-list .vot-select-content-item[data-vot-disabled=true]{cursor:default}.vot-select-content-list .vot-select-content-item[hidden]{display:none !important}.vot-header{color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-weight:bold;line-height:1.5;text-align:start}.vot-header[hidden]{display:none !important}.vot-header:not(:first-child){padding-top:8px}.vot-header-level-1{font-size:2em}.vot-header-level-2{font-size:1.5em}.vot-header-level-3{font-size:1.17em}.vot-header-level-4{font-size:1em}.vot-header-level-5{font-size:.83em}.vot-header-level-6{font-size:.67em}.vot-info{display:flex;color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-info[hidden]{display:none !important}.vot-info>:not(:first-child){color:rgba(var(--vot-helper-onsurface-rgb), 0.5);flex:1;margin-left:8px}.vot-lang-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);display:flex;align-items:center;justify-content:space-between;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-lang-select[hidden]{display:none !important}.vot-lang-select-icon{width:32px;height:32px;display:flex;justify-content:center;align-items:center}.vot-segmented-button{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:5rem;transform:translate(-50%);user-select:none;display:flex;align-items:center;height:32px;max-width:100vw;background:rgb(var(--vot-surface-rgb, 255, 255, 255));color:var(--vot-helper-theme);fill:var(--vot-helper-theme);border-radius:4px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;cursor:default;transition:opacity .5s;z-index:100}.vot-segmented-button[hidden]{display:none !important}.vot-segmented-button *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-segmented-button .vot-separator{width:1px;height:50%;background:rgba(var(--vot-helper-theme-rgb), 0.1)}.vot-segmented-button .vot-separator[hidden]{display:none !important}.vot-segmented-button .vot-segment,.vot-segmented-button .vot-segment-only-icon{position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;height:100%;padding:0 8px;background-color:rgba(0,0,0,0);color:inherit;transition:background-color 100ms ease-in-out;border:none}.vot-segmented-button .vot-segment[hidden],.vot-segmented-button [hidden].vot-segment-only-icon{display:none !important}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before,.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before{background-color:rgb(var(--vot-helper-theme-rgb));transition:opacity .2s}.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-segmented-button .vot-segment:hover::before,.vot-segmented-button .vot-segment-only-icon:hover::before{opacity:.04}.vot-segmented-button .vot-segment:active::after,.vot-segmented-button .vot-segment-only-icon:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-segmented-button .vot-segment-only-icon{min-width:32px;padding:0}.vot-segmented-button .vot-segment-label{margin-left:8px;white-space:nowrap}.vot-segmented-button[data-status=success] .vot-translate-button{color:rgb(var(--vot-primary-rgb, 33, 150, 243));fill:rgb(var(--vot-primary-rgb, 33, 150, 243))}.vot-segmented-button[data-status=error] .vot-translate-button{color:#f28b82;fill:#f28b82}.vot-segmented-button svg{width:fit-content}.vot-menu{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:calc(5rem + 32px + 16px);user-select:none;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);border-radius:8px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;min-width:300px;cursor:default;z-index:100;visibility:visible;opacity:1;transform-origin:top;transform:translate(-50%) scale(1);transition:opacity .3s,transform .1s}.vot-menu *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-menu[hidden]{pointer-events:none;display:block !important;pointer-events:none;visibility:hidden;opacity:0;transform:translate(-50%) scale(0)}.vot-menu-content-wrapper{display:flex;flex-direction:column;min-height:100px;max-height:calc(var(--vot-container-height, 75vh) - (5rem + 32px + 16px)*2);overflow:auto}.vot-menu-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-menu-header-container:empty{padding:0 0 16px 0}.vot-menu-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-menu-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0;text-align:start}.vot-menu-title{flex:1;font-size:16px;line-height:1;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 16px;gap:8px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar,.vot-menu-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-menu-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-footer-container:empty{padding:16px 0 0 0}.vot-dialog-container{visibility:visible;position:absolute;z-index:10000}.vot-dialog-container[hidden]{display:block !important;pointer-events:none;visibility:hidden}.vot-dialog-container *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-dialog-backdrop{background-color:rgba(0,0,0,.6);position:fixed;top:0;right:0;bottom:0;left:0;opacity:1;transition:opacity .3s}[hidden]>.vot-dialog-backdrop{pointer-events:none;opacity:0}.vot-dialog{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);display:block;position:fixed;top:50%;bottom:50%;max-width:initial;max-height:initial;width:min(var(--vot-dialog-width, 512px),100%);height:fit-content;inset-inline-start:0px;inset-inline-end:0px;inset-block-start:0px;inset-block-end:0px;border-radius:8px;margin:auto;padding:0;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);box-shadow:0 0 16px rgba(0,0,0,.12),0 16px 16px rgba(0,0,0,.24);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;user-select:none;visibility:visible;overflow:auto;overflow-y:hidden;opacity:1;transform-origin:center;transform:scale(1);transition:opacity .3s,transform .1s}[hidden]>.vot-dialog{pointer-events:none;opacity:0;transform:scale(0.5);transition:opacity .1s,transform .2s}.vot-dialog-content-wrapper{display:flex;flex-direction:column;max-height:75vh;overflow:auto}.vot-dialog-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-dialog-header-container:empty{padding:0 0 20px 0}.vot-dialog-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-dialog-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0}.vot-dialog-title{flex:1;font-size:115.3846153846%;font-weight:bold;line-height:1;padding-bottom:16px;padding-inline-end:20px;padding-inline-start:20px;padding-top:20px}.vot-dialog-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 20px;gap:16px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar,.vot-dialog-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-dialog-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-dialog-footer-container:empty{padding:20px 0 0 0}.vot-subtitles-widget{display:flex;justify-content:center;align-items:center;position:absolute;width:50%;max-height:100%;min-height:20%;z-index:100;left:25%;top:75%;pointer-events:none}.vot-subtitles{position:relative;max-width:100%;max-height:100%;width:max-content;background:var(--vot-subtitles-background, rgba(46, 47, 52, 0.8));color:var(--vot-subtitles-color, rgb(227, 227, 227));border-radius:1rem;pointer-events:all;padding:1rem;font-size:2rem;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vot-subtitles .passed{color:var(--vot-subtitles-passed-color, rgb(33, 150, 243))}:root{--vot-font-family: "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system;--vot-primary-rgb: 139, 180, 245;--vot-onprimary-rgb: 32, 33, 36;--vot-surface-rgb: 32, 33, 36;--vot-onsurface-rgb: 227, 227, 227;--vot-subtitles-background: rgba(var(--vot-surface-rgb, 46, 47, 52), 0.8);--vot-subtitles-color: rgb(var(--vot-onsurface-rgb, 227, 227, 227));--vot-subtitles-passed-color: rgb(var(--vot-primary-rgb, 33, 150, 243))}vot-block{display:block}',""]);const s=r},"./node_modules/css-loader/dist/runtime/api.js":t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,i,a){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var s=0;s0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js":t=>{"use strict";t.exports=function(t){return t[1]}},"./node_modules/requestidlecallback-polyfill/index.js":()=>{window.requestIdleCallback=window.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)},window.cancelIdleCallback=window.cancelIdleCallback||function(t){clearTimeout(t)}},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},"./node_modules/style-loader/dist/runtime/insertStyleElement.js":t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":(t,e,o)=>{"use strict";t.exports=function(t){var e=o.nc;e&&t.setAttribute("nonce",e)}},"./node_modules/style-loader/dist/runtime/styleDomAPI.js":t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(o){!function(t,e,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,i&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,o)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},"./node_modules/style-loader/dist/runtime/styleTagTransform.js":t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},"./src/config/config-cloudflare.js":(t,e,o)=>{"use strict";o.d(e,{I:()=>i,i:()=>n});const n="vot-new.toil-dump.workers.dev",i="xtGCyGdTY2Jy6OMEKdTuXev3Twhkamgm"},"./src/config/config.js":(t,e,o)=>{"use strict";o.d(e,{EY:()=>s,Rr:()=>i,e6:()=>n,jm:()=>l,kF:()=>r,rm:()=>d,sN:()=>a});const n="m3u8proxy.toil-dump.workers.dev",i="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 YaBrowser/23.7.1.1140 Yowser/2.5 Safari/537.36",a=.15,r="yandex",s="yandex",l={yandex:"https://translate.toil.cc/detect",rustServer:"https://rust-server-531j.onrender.com/detect"},d={yandex:"https://translate.toil.cc/translate"}},"./src/utils/debug.js":(t,e,o)=>{"use strict";o.d(e,{Z:()=>n});const n={log:(...t)=>{}}},"./src/yandexRequest-cloudflare.js":(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>r});var n=o("./src/config/config-cloudflare.js"),i=o("./src/config/config.js"),a=o("./src/utils/debug.js");const r=async function(t,e,o,r){let s,l;try{a.Z.log("yandexRequest:",t);const r={method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify({headers:{Accept:"application/x-protobuf","Accept-Language":"en","Content-Type":"application/x-protobuf","User-Agent":i.Rr,Pragma:"no-cache","Cache-Control":"no-cache","Sec-Fetch-Mode":"no-cors",...o},body:Array.from(e)})};s=await fetch(`https://${n.i}${t}`,r),a.Z.log("yandexRequest:",s.status,s),l=await s.arrayBuffer()}catch(t){console.error("[VOT]",t),s={status:-1},l=t}r(200==s.status,l)}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,exports:{}};return t[n].call(a.exports,a,a.exports,o),a.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nc=void 0,(()=>{"use strict";var t=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),e=o.n(t),n=o("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),i=o.n(n),a=o("./node_modules/style-loader/dist/runtime/insertBySelector.js"),r=o.n(a),s=o("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),l=o.n(s),d=o("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),c=o.n(d),u=o("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),h=o.n(u),p=o("./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss"),g={};g.styleTagTransform=h(),g.setAttributes=l(),g.insert=r().bind(null,"head"),g.domAPI=i(),g.insertStyleElement=c(),e()(p.Z,g),p.Z&&p.Z.locals&&p.Z.locals;const v=JSON.parse('{"__version__":2,"recommended":"recommended","translateVideo":"Translate video","disableTranslate":"Turn off","translationSettings":"Translation settings","subtitlesSettings":"Subtitles settings","about":"About extension","resetSettings":"Reset settings","videoBeingTranslated":"The video is being translated","videoLanguage":"Video language","translationLanguage":"Translation language","translationTake":"The translation will take","translationTakeMoreThanHour":"The translation will take more than an hour","translationTakeAboutMinute":"The translation will take about a minute","translationTakeFewMinutes":"The translation will take a few minutes","translationTakeApproximatelyMinutes":"The translation will take approximately {0} minutes","translationTakeApproximatelyMinute":"The translation will take approximately {0} minutes","unSupportedExtensionError":"Error! {0} is not supported by this version of the extension!\\n\\nPlease use the cloudflare version of the VOT extension.","requestTranslationFailed":"Failed to request video translation","audioNotReceived":"Audio link not received","grantPermissionToAutoPlay":"Grant permission to autoplay","neededAdditionalExtension":"An additional extension is needed to support this site","audioFormatNotSupported":"The audio format is not supported","VOTAutoTranslate":"Translate on open","VOTDontTranslateYourLang":"Do not translate from my language","VOTVolume":"Video volume","VOTVolumeTranslation":"Translation Volume","VOTAutoSetVolume":"Reduce video volume to ","VOTShowVideoSlider":"Video volume slider","VOTSyncVolume":"Link translation and video volume","VOTAudioProxy":"Proxy received audio","VOTDisableFromYourLang":"You have disabled the translation of the video in your language","VOTLiveNotSupported":"Translation of live streams is not supported","VOTPremiere":"Wait for the premiere to end before translating","VOTVideoIsTooLong":"Video is too long","VOTNoVideoIDFound":"No video ID found","VOTFailedInitDB":"Failed to initialize database","VOTDBNeedUpdate":"The database needs an update, please reload the page","VOTDisabledForDBUpdating":"VOT is disabled due to an error when updating the Database. Close all open tabs with {0} and try again","VOTFailedWriteToDB":"Data could not be written to the database","VOTFailedReadFromDB":"Data could not be retrieved from the database","VOTSubtitles":"Subtitles","VOTSubtitlesDisabled":"Disabled","VOTSubtitlesMaxLength":"Subtitles max length","VOTHighlightWords":"Highlight words","VOTTranslatedFrom":"translated from","VOTAutogenerated":"autogenerated","VOTSettings":"VOT Settings","VOTMenuLanguage":"Menu language","VOTAuthors":"Authors","VOTVersion":"Version","VOTLoader":"Loader","VOTBrowser":"Browser","VOTShowPiPButton":"Show PiP button","langs":{"auto":"Auto","af":"Afrikaans","ak":"Akan","sq":"Albanian","am":"Amharic","ar":"Arabic","hy":"Armenian","as":"Assamese","ay":"Aymara","az":"Azerbaijani","bn":"Bangla","eu":"Basque","be":"Belarusian","bho":"Bhojpuri","bs":"Bosnian","bg":"Bulgarian","my":"Burmese","ca":"Catalan","ceb":"Cebuano","zh":"Chinese","zh-Hans":"Chinese (Simplified)","zh-Hant":"Chinese (Traditional)","co":"Corsican","hr":"Croatian","cs":"Czech","da":"Danish","dv":"Divehi","nl":"Dutch","en":"English","eo":"Esperanto","et":"Estonian","ee":"Ewe","fil":"Filipino","fi":"Finnish","fr":"French","gl":"Galician","lg":"Ganda","ka":"Georgian","de":"German","el":"Greek","gn":"Guarani","gu":"Gujarati","ht":"Haitian Creole","ha":"Hausa","haw":"Hawaiian","iw":"Hebrew","hi":"Hindi","hmn":"Hmong","hu":"Hungarian","is":"Icelandic","ig":"Igbo","id":"Indonesian","ga":"Irish","it":"Italian","ja":"Japanese","jv":"Javanese","kn":"Kannada","kk":"Kazakh","km":"Khmer","rw":"Kinyarwanda","ko":"Korean","kri":"Krio","ku":"Kurdish","ky":"Kyrgyz","lo":"Lao","la":"Latin","lv":"Latvian","ln":"Lingala","lt":"Lithuanian","lb":"Luxembourgish","mk":"Macedonian","mg":"Malagasy","ms":"Malay","ml":"Malayalam","mt":"Maltese","mi":"Māori","mr":"Marathi","mn":"Mongolian","ne":"Nepali","nso":"Northern Sotho","no":"Norwegian","ny":"Nyanja","or":"Odia","om":"Oromo","ps":"Pashto","fa":"Persian","pl":"Polish","pt":"Portuguese","pa":"Punjabi","qu":"Quechua","ro":"Romanian","ru":"Russian","sm":"Samoan","sa":"Sanskrit","gd":"Scottish Gaelic","sr":"Serbian","sn":"Shona","sd":"Sindhi","si":"Sinhala","sk":"Slovak","sl":"Slovenian","so":"Somali","st":"Southern Sotho","es":"Spanish","su":"Sundanese","sw":"Swahili","sv":"Swedish","tg":"Tajik","ta":"Tamil","tt":"Tatar","te":"Telugu","th":"Thai","ti":"Tigrinya","ts":"Tsonga","tr":"Turkish","tk":"Turkmen","uk":"Ukrainian","ur":"Urdu","ug":"Uyghur","uz":"Uzbek","vi":"Vietnamese","cy":"Welsh","fy":"Western Frisian","xh":"Xhosa","yi":"Yiddish","yo":"Yoruba","zu":"Zulu"},"udemyAccessTokenExpired":"Your entered Udemy Access Token has expired","udemyModuleArgsNotFound":"Could not get udemy module data due to the fact that ModuleArgs was not found","VOTTranslationHelpNull":"Could not get the data required for the translate","enterUdemyAccessToken":"Enter Udemy Access Token","VOTUdemyData":"Udemy Data","streamNoConnectionToServer":"There is no connection to the server","VOTCloudflareDoesntSupportStreams":"The Cloudflare version of the script does not support stream translation","searchField":"Search...","VOTTranslateAPIErrors":"Translate errors from the API","VOTTranslationService":"Translation Service","VOTDetectService":"Detect Service","VOTTranslatingError":"Translating the error"}');var m=o("./src/utils/debug.js");const b=new class{constructor(){this.gmSupport="function"==typeof GM_getValue,m.Z.log(`GM Storage Status: ${this.gmSupport}`)}syncGet(t,e=void 0,o=!1){if(this.gmSupport)return GM_getValue(t,e);let n=window.localStorage.getItem(t);if("udemyData"===t&&"string"==typeof n)try{n=JSON.parse(n)}catch{n=e}return o?Number(n)??Number(e):n??e}async get(t,e=void 0,o=!1){return this.gmSupport?await GM_getValue(t,e):new Promise((n=>{n(this.syncGet(t,e,o))}))}syncSet(t,e){return this.gmSupport?GM_setValue(t,e):("udemyData"===t&&(e=JSON.stringify(e)),window.localStorage.setItem(t,e))}async set(t,e){return this.gmSupport?await GM_setValue(t,e):new Promise((o=>{o(this.syncSet(t,e))}))}syncDelete(t){return this.gmSupport?GM_deleteValue(t):window.localStorage.removeItem(t)}async delete(t){return this.gmSupport?await GM_deleteValue(t):new Promise((e=>{e(this.syncDelete(t))}))}syncList(){return this.gmSupport?GM_listValues():["autoTranslate","dontTranslateLanguage","dontTranslateYourLang","autoSetVolumeYandexStyle","showVideoSlider","syncVolume","subtitlesMaxLength","highlightWords","responseLanguage","defaultVolume","udemyData","audioProxy","showPiPButton","locale-version","locale-lang","locale-phrases"]}async list(){return this.gmSupport?await GM_listValues():new Promise((t=>{t(this.syncList())}))}},f=["auto","en","ru","af","am","ar","az","bg","bn","bs","ca","cs","cy","da","de","el","es","et","eu","fa","fi","fr","gl","hi","hr","hu","hy","id","it","ja","jv","kk","km","kn","ko","lo","mk","ml","mn","ms","mt","my","ne","nl","pa","pl","pt","ro","si","sk","sl","sq","sr","su","sv","sw","tr","uk","ur","uz","vi","zh","zu"],y=new class{lang="en";locale={};gmValues=["locale-phrases","locale-lang","locale-version","locale-lang-override"];constructor(){const t=b.syncGet("locale-lang-override","auto");this.lang=t&&"auto"!==t?t:(navigator.language||navigator.userLanguage)?.substr(0,2)?.toLowerCase()??"en",this.setLocaleFromJsonString(b.syncGet("locale-phrases",""))}reset(){this.gmValues.forEach((t=>b.syncDelete(t)))}async update(t=!1){(t||2!==await b.get("locale-version",0,!0)||await b.get("locale-lang")!==this.lang)&&(m.Z.log("Updating locale..."),await fetch(`https://raw.githubusercontent.com/ilyhalight/voice-over-translation/dev/src/localization/locales/${this.lang}.json`).then((t=>{if(200===t.status)return t.text();throw t.status})).then((async t=>{await b.set("locale-phrases",t),this.setLocaleFromJsonString(t);const e=this.getFromLocale(this.locale,"__version__");"number"==typeof e&&await b.set("locale-version",e),await b.set("locale-lang",this.lang)})).catch((async t=>{console.error("[VOT] [localizationProvider] failed get locale, cause:",t),this.setLocaleFromJsonString(await b.get("locale-phrases",""))})))}setLocaleFromJsonString(t){try{this.locale=JSON.parse(t)??{}}catch(t){console.error("[VOT] [localizationProvider]",t),this.locale={}}}getFromLocale(t,e){const o=e.split(".").reduce(((t,e)=>{if("object"==typeof t&&t)return t[e]}),t);return void 0===o&&console.warn("[VOT] [localizationProvider] locale",t,"doesn't contain key",e),o}getDefault(t){return this.getFromLocale(v,t)??t}get(t){return this.getFromLocale(this.locale,t)??this.getFromLocale(v,t)??t}};class w extends Error{constructor(t){super(y.getDefault(t)),this.name="VOTLocalizedError",this.unlocalizedMessage=t,this.localizedMessage=y.get(t)}}const x=["ru","en","zh","ko","lt","lv","ar","fr","it","es","de","ja"],S=["kk","bn","pt","cs","hi","mr","te","tr","ms","vi","ta","jv","ur","fa","gu","id","uk","da","fi","uz","pl","sv","az","sq","am","hy","af","eu","my","bg","bs","cy","hu","gl","el","zu","kn","ca","km","lo","mk","ml","mt","mn","ne","nl","pa","ro","sr","si","sk","sl","sw","su","hr","et"],T=["ru","en","kk"],k=navigator.language||navigator.userLanguage,V=k?.substr(0,2)?.toLowerCase()??"en";String.prototype.format||(String.prototype.format=function(){var t=arguments;return this.replace(/{(\d+)}/g,(function(e,o){return void 0!==t[o]?t[o]:e}))});const M=t=>new Promise((e=>setTimeout(e,t))),L=(t,e)=>{const o=new URL(window.location.href);switch(t){case"piped":case"invidious":case"youtube":return o.pathname.match(/(?:watch|embed|shorts)\/([^/]+)/)?.[1]||o.searchParams.get("v");case"vk":return o.pathname.match(/^\/video-?[0-9]{8,9}_[0-9]{9}$/)?o.pathname.match(/^\/video-?[0-9]{8,9}_[0-9]{9}$/)[0].slice(1):o.searchParams.get("z")?o.searchParams.get("z").split("/")[0]:!(!o.searchParams.get("oid")||!o.searchParams.get("id"))&&`video-${Math.abs(o.searchParams.get("oid"))}_${o.searchParams.get("id")}`;case"nine_gag":case"9gag":case"gag":return o.pathname.match(/gag\/([^/]+)/)?.[1];case"twitch":if(/^m\.twitch\.tv$/.test(window.location.hostname)){const t=document.head.querySelector('link[rel="canonical"]');return t?.href.match(/videos\/([^/]+)/)?.[0]||o.pathname.slice(1)}if(/^player\.twitch\.tv$/.test(window.location.hostname))return`videos/${o.searchParams.get("video")}`;if(/^clips\.twitch\.tv$/.test(window.location.hostname)){const t=document.querySelector(".tw-link[data-test-selector='stream-info-card-component__stream-avatar-link']");return!!t&&`${t.href.replace("https://www.twitch.tv/","")}/clip/${o.searchParams.get("clip")}`}return o.pathname.match(/([^/]+)\/(?:clip)\/([^/]+)/)?o.pathname.match(/([^/]+)\/(?:clip)\/([^/]+)/)[0]:o.pathname.match(/(?:videos)\/([^/]+)/)?.[0];case"proxytok":return o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];case"tiktok":{let t=o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];if(!t){const o=e.closest(".xgplayer-playing, .tiktok-web-player"),n=o?.closest('div[data-e2e="recommend-list-item-container"]'),i=n?.querySelector('a[data-e2e="video-author-avatar"]');if(o&&i){const e=o.id?.match(/^xgwrapper-[0-9]+-(.*)$/)?.at(1),n=i.href?.match(/.*(@.*)$/)?.at(1);e&&n&&(t=`${n}/video/${e}`)}}return t}case"vimeo":return o.pathname.match(/[^/]+\/[^/]+$/)?.[0]||o.pathname.match(/[^/]+$/)?.[0];case"xvideos":return o.pathname.match(/[^/]+\/[^/]+$/)?.[0];case"pornhub":return o.searchParams.get("viewkey")||o.pathname.match(/embed\/([^/]+)/)?.[1];case"twitter":return o.pathname.match(/status\/([^/]+)/)?.[1];case"udemy":case"rumble":return o.pathname;case"facebook":return!!o.searchParams.get("v")&&o.searchParams.get("v");case"rutube":return o.pathname.match(/(?:video|embed)\/([^/]+)/)?.[1];case"coub":return o.pathname.includes("/view")?o.pathname.match(/view\/([^/]+)/)?.[1]:o.pathname.includes("/embed")?o.pathname.match(/embed\/([^/]+)/)?.[1]:document.querySelector(".coub.active")?.dataset?.permalink;case"bilibili":{const t=o.searchParams.get("bvid");if(t)return t;{let t=o.pathname.match(/video\/([^/]+)/)?.[1];return t&&o.search&&null!==o.searchParams.get("p")&&(t+=`/?p=${o.searchParams.get("p")}`),t}}case"mail_ru":if(o.pathname.startsWith("/v/")||o.pathname.startsWith("/mail/"))return o.pathname;if(o.pathname.match(/video\/embed\/([^/]+)/)){const t=document.querySelector(".b-video-controls__mymail-link");return!!t&&t?.href.split("my.mail.ru")?.[1]}return!1;case"bitchute":return o.pathname.match(/video\/([^/]+)/)?.[1];case"coursera":return o.pathname.match(/learn\/([^/]+)\/lecture\/([^/]+)/)?.[0];case"eporner":return o.pathname.match(/video-([^/]+)\/([^/]+)/)?.[0];case"peertube":return o.pathname.match(/\/w\/([^/]+)/)?.[0];case"dailymotion":{const t=Array.from(document.scripts).filter((t=>t.innerText.trim().includes("window.__PLAYER_CONFIG__ = {")));if(!t.length)return!1;try{let e=t[0].innerText.trim().replace("window.__PLAYER_CONFIG__ = ","");e.endsWith("};")&&(e=e.substring(0,e.length-1));const o=JSON.parse(e),n=o.context.embedder??o.context.http_referer;return console.log(n,o),n.match(/\/video\/([^/]+)/)?.[1]}catch(t){return console.error("[VOT]",t),!1}}case"trovo":{if(!o.pathname.startsWith("/s/"))return!1;const t=o.searchParams.get("vid");if(!t)return!1;const e=o.pathname.match(/([^/]+)\/([\d]+)/)?.[0];return!!e&&`${e}?vid=${t}`}case"yandexdisk":return o.pathname.match(/\/i\/([^/]+)/)?.[1];default:return!1}};function O(t){return t.toLowerCase().split(";")[0].trim().split("-")[0].split("_")[0]}function E(){return"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}function P(){return"undefined"!=typeof Hls&&Hls?.isSupported()?new Hls({debug:!1,lowLatencyMode:!0,backBufferLength:90}):void 0}var C=o("./src/config/config.js");const A={async translate(t,e){try{const o=await fetch(C.rm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})}),n=await o.json();if(200!==n.code)throw o.message;return n.text[0]}catch(e){return console.error("Error translating text:",e),t}},async detect(t,e){try{const o=await fetch(C.jm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})}),n=await o.json();if(200!==n.code)throw o.message;return n.lang??"en"}catch(t){return console.error("Error translating text:",t),"en"}}},B={async detect(t){try{const e=await fetch(C.jm.rustServer,{method:"POST",body:t});return await e.text()}catch(t){return console.error("Error getting lang from text:",t),"en"}}};async function F(t,e="",o="ru"){if("yandex"===await b.get("translationService",C.kF)){const n=e&&o?`${e}-${o}`:o;return await A.translate(t,n)}return t}const _=["yandex"],R=["yandex","rust-server"];function q(){return/^m\.youtube\.com$/.test(window.location.hostname)}function z(){return window.location.pathname.startsWith("/shorts/")?q()?document.querySelector("#movie_player"):document.querySelector("#shorts-player"):document.querySelector("#movie_player")}function D(){const t=z();return t?.getPlayerResponse?t?.getPlayerResponse?.call()??null:t?.data?.playerResponse??null}function I(){const t=z();return t?.getVideoData?t?.getVideoData?.call()??null:t?.data?.playerResponse?.videoDetails??null}const N=function(){const t=z();return t?.getVolume?t.getVolume.call()/100:1},j=function(){const t=D();let e=t?.captions?.playerCaptionsTracklistRenderer?.captionTracks??[];return e=e.reduce(((t,e)=>{if("languageCode"in e){const o=e?.languageCode?O(e?.languageCode):void 0,n=e?.url||e?.baseUrl;o&&n&&t.push({source:"youtube",language:o,isAutoGenerated:"asr"===e?.kind,url:`${n.startsWith("http")?n:`${window.location.origin}/${n}`}&fmt=json3`})}return t}),[]),m.Z.log("youtube subtitles:",e),e},$=async function(){const t=z(),e=D(),o=I(),{author:n,title:i}=o??{},{shortDescription:a,isLive:r,isLiveContent:s,isUpcoming:l}=e?.videoDetails??{},d=!(!r&&!l||s);let c=await async function(t,e,o,n){if(!window.location.hostname.includes("m.youtube.com")&&t?.getAudioTrack){const e=t.getAudioTrack(),o=e?.getLanguageInfo();if("und"!==o?.id)return O(o.id.split(".")[0])}const i=e?.captions?.playerCaptionsTracklistRenderer?.captionTracks;if(i?.length){const t=i.find((t=>"asr"===t.kind));if(t&&t.languageCode)return O(t.languageCode)}if(!n||!o)return"en";const a=[n.split("\n").filter((t=>!t.match(/https?:\/\/\S+/))).join("\n").replace(/#\S+/g,"").replace(/[^\p{L}\s]/gu,"").replace(/\s+/g," ").trim().slice(0,250),o].join("");return await async function(t){switch(await b.get("detectService",C.EY)){case"yandex":return await A.detect(t);case"rust-server":return await B.detect(t);default:return"en"}}(a)}(t,e,i,a);x.includes(c)||(c="en");const u={isLive:!!r,isPremiere:d,title:i,description:a,author:n,detectedLanguage:c};return m.Z.log("youtube video data:",u),console.log("[VOT] Detected language: ",u.detectedLanguage),u},H=function(t){const e=z();if(e?.setVolume)return e.setVolume(Math.round(100*t)),!0},Z=function(t,e){m.Z.log("videoSeek",e);const o=(z()?.getProgressState()?.seekableEnd||t.currentTime)-e;t.currentTime=o},U=new protobuf.Type("VideoTranslationHelpObject").add(new protobuf.Field("target",1,"string")).add(new protobuf.Field("targetUrl",2,"string")),W=new protobuf.Type("VideoTranslationRequest").add(new protobuf.Field("url",3,"string")).add(new protobuf.Field("deviceId",4,"string")).add(new protobuf.Field("firstRequest",5,"bool")).add(new protobuf.Field("duration",6,"double")).add(new protobuf.Field("unknown2",7,"int32")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("unknown3",9,"int32")).add(new protobuf.Field("unknown4",10,"int32")).add(new protobuf.Field("translationHelp",11,"VideoTranslationHelpObject","repeated")).add(new protobuf.Field("responseLanguage",14,"string")).add(new protobuf.Field("unknown5",15,"int32")),G=new protobuf.Type("VideoSubtitlesRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")),Y=new protobuf.Type("VideoStreamRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")).add(new protobuf.Field("responseLanguage",3,"string")),J=new protobuf.Type("VideoStreamPingRequest").add(new protobuf.Field("pingId",1,"int32")),K=new protobuf.Type("VideoTranslationResponse").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("duration",2,"double")).add(new protobuf.Field("status",4,"int32")).add(new protobuf.Field("remainingTime",5,"int32")).add(new protobuf.Field("unknown0",6,"int32")).add(new protobuf.Field("unknown1",7,"string")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("message",9,"string")),Q=new protobuf.Type("VideoSubtitlesObject").add(new protobuf.Field("language",1,"string")).add(new protobuf.Field("url",2,"string")).add(new protobuf.Field("unknown2",3,"int32")).add(new protobuf.Field("translatedLanguage",4,"string")).add(new protobuf.Field("translatedUrl",5,"string")).add(new protobuf.Field("unknown5",6,"int32")).add(new protobuf.Field("unknown6",7,"int32")),X=new protobuf.Type("VideoSubtitlesResponse").add(new protobuf.Field("unknown0",1,"int32")).add(new protobuf.Field("subtitles",2,"VideoSubtitlesObject","repeated")),tt=new protobuf.Type("VideoStreamObject").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("timestamp",2,"int64")),et=new protobuf.Type("VideoStreamResponse").add(new protobuf.Field("interval",1,"int32")).add(new protobuf.Field("translatedInfo",2,"VideoStreamObject")).add(new protobuf.Field("pingId",3,"int32")),ot=(new protobuf.Root).define("yandex").add(U).add(W).add(K).add(G).add(Q).add(X).add(J).add(Y).add(tt).add(et),nt=(t,e,o,n,i)=>ot.VideoTranslationRequest.encode({url:t,firstRequest:!0,duration:e,unknown2:1,language:o,unknown3:0,unknown4:0,translationHelp:i,responseLanguage:n,unknown5:0}).finish(),it=t=>ot.VideoTranslationResponse.decode(new Uint8Array(t)),at=(t,e)=>ot.VideoSubtitlesRequest.encode({url:t,language:e}).finish(),rt=t=>ot.VideoSubtitlesResponse.decode(new Uint8Array(t)),st=t=>ot.VideoStreamPingRequest.encode({pingId:t}).finish(),lt=(t,e,o)=>ot.VideoStreamRequest.encode({url:t,language:e,responseLanguage:o}).finish(),dt=t=>ot.VideoStreamResponse.decode(new Uint8Array(t)),ct=["invidious.snopyta.org","yewtu.be","invidious.kavin.rocks","vid.puffyan.us","invidious.namazso.eu","inv.riverside.rocks","yt.artemislena.eu","invidious.flokinet.to","invidious.esmailelbob.xyz","y.com.sb","invidious.nerdvpn.de","inv.vern.cc","invidious.slipfox.xyz","invidio.xamh.de","invidious.dhusch.de"],ut=["piped.video","piped.tokhmi.xyz","piped.moomoo.me","piped.syncpundit.io","piped.mha.fi","watch.whatever.social","piped.garudalinux.org","efy.piped.pages.dev","watch.leptons.xyz","piped.lunar.icu","yt.dc09.ru","piped.mint.lgbt","il.ax","piped.privacy.com.de","piped.esmailelbob.xyz","piped.projectsegfau.lt","piped.in.projectsegfau.lt","piped.us.projectsegfau.lt","piped.privacydev.net","piped.palveluntarjoaja.eu","piped.smnz.de","piped.adminforge.de","piped.qdi.fi","piped.hostux.net","piped.chauvet.pro","piped.jotoma.de","piped.pfcd.me","piped.frontendfriendly.xyz"];function ht(t){const e=document.createElement("vot-block");return e.classList.add("vot-icon-button"),e.innerHTML=t,e}function pt(t){const e=parseFloat(t.value),o=""===t.min?0:parseFloat(t.min),n=(e-o)/((""===t.max?100:parseFloat(t.max))-o);t.parentElement.setAttribute("style",`--vot-progress: ${n}`)}function gt(t,e="",o=!1){const n=document.createElement("vot-block");n.classList.add("vot-textfield");const i=document.createElement(o?"textarea":"input");i.placeholder=" ",i.value=e;const a=document.createElement("span");return a.innerHTML=t,n.appendChild(i),n.appendChild(a),{container:n,input:i,label:a}}function vt(t){const e=document.createElement("vot-block");e.classList.add("vot-dialog-container"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-dialog-backdrop");const n=document.createElement("vot-block");n.classList.add("vot-dialog");const i=document.createElement("vot-block");i.classList.add("vot-dialog-content-wrapper");const a=document.createElement("vot-block");a.classList.add("vot-dialog-header-container");const r=document.createElement("vot-block");r.classList.add("vot-dialog-body-container");const s=document.createElement("vot-block");s.classList.add("vot-dialog-footer-container");const l=document.createElement("vot-block");l.classList.add("vot-dialog-title-container");const d=ht('');d.classList.add("vot-dialog-close-button"),o.onclick=d.onclick=()=>{e.hidden=!0};const c=document.createElement("vot-block");return c.classList.add("vot-dialog-title"),c.innerHTML=t,e.appendChild(o),e.appendChild(n),n.appendChild(i),i.appendChild(a),i.appendChild(r),i.appendChild(s),a.appendChild(l),a.appendChild(d),l.appendChild(c),{container:e,backdrop:o,dialog:n,contentWrapper:i,headerContainer:a,bodyContainer:r,footerContainer:s,titleContainer:l,closeButton:d,title:c}}function mt(t,e,o,n={}){const i=n.onSelectCb||function(){},a=n.labelElement||"";let r=[];const s=document.createElement("vot-block");s.classList.add("vot-select"),a&&s.appendChild(a);const l=document.createElement("vot-block");l.classList.add("vot-select-outer");const d=document.createElement("span");d.classList.add("vot-select-title"),d.innerText=t,void 0===t&&(d.innerText=o.find((t=>!0===t.selected))?.label);const c=document.createElement("vot-block");return c.classList.add("vot-select-arrow-icon"),c.innerHTML='',l.append(d,c),l.onclick=()=>{const t=vt(e);t.container.classList.add("vot-dialog-temp"),t.container.hidden=!1,document.documentElement.appendChild(t.container);const n=document.createElement("vot-block");n.classList.add("vot-select-content-list");for(const t of o){const e=document.createElement("vot-block");e.classList.add("vot-select-content-item"),e.innerText=t.label,e.dataset.votSelected=t.selected,e.dataset.votValue=t.value,t.disabled&&(e.inert=!0),e.onclick=async a=>{a.target.inert||(n.childNodes.forEach((t=>t.dataset.votSelected=!1)),o.forEach((e=>e.selected=e.value===t.value)),e.dataset.votSelected=!0,d.innerText=t.label,await i(a))},n.appendChild(e)}const a=gt(y.get("searchField"));a.input.oninput=t=>{const e=t.target.value.toLowerCase();Array.from(r).forEach((t=>t.hidden=!t.innerText.toLowerCase().includes(e)))},t.bodyContainer.append(a.container,n),r=n.childNodes,t.backdrop.onclick=t.closeButton.onclick=()=>{t.container.remove(),r=[]}},s.append(l),{container:s,title:d,arrowIcon:c,labelElement:a,setTitle:t=>{d.innerText=t},setSelected:t=>{Array.from(r).filter((t=>!t.inert)).forEach((e=>e.dataset.votSelected=e.dataset.votValue===t)),o.forEach((e=>e.selected=String(e.value)===t))},updateItems:t=>{o=t}}}const bt={createHeader:function(t,e=4){const o=document.createElement("vot-block");return o.classList.add("vot-header"),o.classList.add(`vot-header-level-${e}`),o.innerHTML=t,o},createInformation:function(t,e){const o=document.createElement("vot-block");o.classList.add("vot-info");const n=document.createElement("vot-block");n.innerHTML=t;const i=document.createElement("vot-block");return i.innerHTML=e,o.appendChild(n),o.appendChild(i),{container:o,header:n,value:i}},createButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-button"),e.innerHTML=t,e},createTextButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-text-button"),e.innerHTML=t,e},createOutlinedButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-outlined-button"),e.innerHTML=t,e},createIconButton:ht,createCheckbox:function(t,e=!1){const o=document.createElement("label");o.classList.add("vot-checkbox");const n=document.createElement("input");n.type="checkbox",n.checked=Boolean(e);const i=document.createElement("span");return i.innerHTML=t,o.appendChild(n),o.appendChild(i),{container:o,input:n,label:i}},createSlider:function(t,e=50,o=0,n=100){const i=document.createElement("vot-block");i.classList.add("vot-slider");const a=document.createElement("input");a.type="range",a.min=o,a.max=n,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),a.addEventListener("input",(t=>pt(t.target))),pt(a),{container:i,input:a,label:r}},createTextfield:gt,createDialog:vt,createVOTButton:function(t){const e=document.createElement("vot-block");e.classList.add("vot-segmented-button");const o=document.createElement("vot-block");o.classList.add("vot-segment"),o.classList.add("vot-translate-button"),o.innerHTML='';const n=document.createElement("vot-block");n.classList.add("vot-separator");const i=document.createElement("vot-block");i.classList.add("vot-segment-only-icon"),i.innerHTML='';const a=document.createElement("vot-block");a.classList.add("vot-separator");const r=document.createElement("vot-block");r.classList.add("vot-segment-only-icon"),r.innerHTML='';const s=document.createElement("span");return s.classList.add("vot-segment-label"),s.innerHTML=t,e.appendChild(o),e.appendChild(n),e.appendChild(i),e.appendChild(a),e.appendChild(r),o.appendChild(s),{container:e,translateButton:o,separator:n,pipButton:i,separator2:a,menuButton:r,label:s}},createVOTMenu:function(t){const e=document.createElement("vot-block");e.classList.add("vot-menu"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-menu-content-wrapper");const n=document.createElement("vot-block");n.classList.add("vot-menu-header-container");const i=document.createElement("vot-block");i.classList.add("vot-menu-body-container");const a=document.createElement("vot-block");a.classList.add("vot-menu-footer-container");const r=document.createElement("vot-block");r.classList.add("vot-menu-title-container");const s=document.createElement("vot-block");return s.classList.add("vot-menu-title"),s.innerHTML=t,e.appendChild(o),o.appendChild(n),o.appendChild(i),o.appendChild(a),n.appendChild(r),r.appendChild(s),{container:e,contentWrapper:o,headerContainer:n,bodyContainer:i,footerContainer:a,titleContainer:r,title:s}},createVOTSelectLabel:function(t){const e=document.createElement("span");return e.classList.add("vot-select-label"),e.innerText=t,e},createVOTSelect:mt,createVOTLanguageSelect:function(t){const e=t.fromTitle||"#UNDEFINED",o=t.fromDialogTitle||"#UNDEFINED",n=t.fromItems||[],i=t.fromOnSelectCB||function(){},a=t.toTitle||"#UNDEFINED",r=t.toDialogTitle||"#UNDEFINED",s=t.toItems||[],l=t.toOnSelectCB||function(){},d=document.createElement("vot-block");d.classList.add("vot-lang-select");const c=mt(e,o,n,{onSelectCb:i}),u=document.createElement("vot-block");u.classList.add("vot-lang-select-icon"),u.innerHTML='';const h=mt(a,r,s,{onSelectCb:l});return d.append(c.container,u,h.container),{container:d,fromSelect:c,icon:u,toSelect:h}},updateSlider:pt};function ft(t,e,o,n){let i=e;return e>n?(i=o+(e-n),i=i>100?100:Math.max(i,0),t.volume=i/100):e100?100:Math.max(i,0),t.volume=i/100),i}var yt=o("./src/config/config-cloudflare.js"),wt=o("./node_modules/bowser/es5.js");function xt(t){const e=([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)));return t?e:e.toUpperCase()}async function St(t){const e=new TextEncoder("utf-8"),o=await window.crypto.subtle.importKey("raw",e.encode(yt.I),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),n=await window.crypto.subtle.sign("HMAC",o,t);return Array.from(new Uint8Array(n),(t=>t.toString(16).padStart(2,"0"))).join("")}function Tt(t){const e=t.startMs+t.durationMs;return t.tokens.reduce(((o,n,i)=>{const a=t.tokens[i+1],r=o[o.length-1],s=r?.alignRange?.end??0,l=s+n.text.length;if(o.push(Object.assign(Object.assign({},n),{alignRange:{start:s,end:l}})),a){const t=n.startMs+n.durationMs,i=a.startMs?a.startMs-t:e-t;o.push({text:" ",startMs:t,durationMs:i,alignRange:{start:l,end:l+1}})}return o}),[])}function kt(t,e){const o=t.text.split(new RegExp("([\n \t])")).reduce(((t,o)=>{if(o.length){const n=t[t.length-1]??e,i=n?.alignRange?.end??0,a=i+o.length;t.push({text:o,alignRange:{start:i,end:a}})}return t}),[]),n=Math.floor(t.durationMs/o.length),i=t.startMs+t.durationMs;return o.map(((e,a)=>{const r=a===o.length-1,s=t.startMs+n*a,l=r?i-s:n;return Object.assign(Object.assign({},e),{startMs:s,durationMs:l})}))}class Vt{dragging=!1;subtitlesContainerRect=null;containerRect=null;offsetX=null;offsetY=null;lastContent=null;highlightWords=!1;subtitles=null;maxLength=300;maxLengthRegexp=/.{1,300}(?:\s|$)/g;constructor(t,e,o){this.site=o,this.video=t,"youtube"===this.site.host&&"mobile"!==this.site.additionalData?this.container=e.parentElement:this.container=e,this.votSubtitlesContainer=document.createElement("vot-block"),this.votSubtitlesContainer.classList.add("vot-subtitles-widget"),this.container.appendChild(this.votSubtitlesContainer),this.onMouseDownBound=this.onMouseDown.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),this.onMouseMoveBound=this.onMouseMove.bind(this),this.onTimeUpdateBound=this.onTimeUpdate.bind(this),document.addEventListener("mousedown",this.onMouseDownBound),document.addEventListener("mouseup",this.onMouseUpBound),document.addEventListener("mousemove",this.onMouseMoveBound),this.video?.addEventListener("timeupdate",this.onTimeUpdateBound)}release(){this.video?.removeEventListener("timeupdate",this.onTimeUpdateBound),document.removeEventListener("mousedown",this.onMouseDownBound),document.removeEventListener("mouseup",this.onMouseUpBound),document.removeEventListener("mousemove",this.onMouseMoveBound),this.votSubtitlesContainer.remove()}onMouseDown(t){this.votSubtitlesContainer.contains(t.target)&&(this.subtitlesContainerRect=this.votSubtitlesContainer.getBoundingClientRect(),this.containerRect=this.container.getBoundingClientRect(),this.offsetX=t.clientX-this.subtitlesContainerRect.x,this.offsetY=t.clientY-this.subtitlesContainerRect.y,this.dragging=!0)}onMouseUp(){this.dragging=!1}onMouseMove(t){if(this.dragging){t.preventDefault();const e=t.clientX-this.offsetX,o=t.clientY-this.offsetY,n=o>=this.containerRect.top,i=o+this.subtitlesContainerRect.height<=this.containerRect.bottom,a=e>=this.containerRect.left,r=e+this.subtitlesContainerRect.width<=this.containerRect.right;this.votSubtitlesContainer.style.top=n&&i?o-this.containerRect.y+"px":n?this.containerRect.height-this.subtitlesContainerRect.height+"px":"0px",this.votSubtitlesContainer.style.left=a&&r?e-this.containerRect.x+"px":a?this.containerRect.width-this.subtitlesContainerRect.width+"px":"0px"}}onTimeUpdate(){this.update()}setContent(t){t&&this.video?(this.subtitles=t,this.update()):(this.subtitles=null,this.votSubtitlesContainer.innerHTML="")}setMaxLength(t){"number"==typeof t&&t&&(this.maxLength=t,this.maxLengthRegexp=new RegExp(`.{1,${t}}(?:\\s|$)`,"g"),this.update())}setHighlightWords(t){this.highlightWords!==!!t&&(this.highlightWords=!!t,this.update())}update(){if(!this.video)return;let t="",e=this.highlightWords&&this.subtitles?.containsTokens;const o=1e3*this.video.currentTime,n=this.subtitles?.subtitles?.findLast((t=>t.startMsthis.maxLength){let t=[],n=0,i=0,a=0;for(let o=0;othis.maxLength){let r=e.slice(n,i+1);r.at(0)&&" "===r.at(0).text&&(r=r.slice(1)),r.at(-1)&&" "===r.at(-1).text&&(r=r.slice(0,r.length-1)),t.push({startMs:e[n].startMs,durationMs:e[i].startMs+e[i].durationMs-e[n].startMs,tokens:r}),n=o,a=0}i=o}for(let n=0;ne||o>n.startMs-100&&e-o<275?'class="passed"':""}>${n.text}`}}else if(n.text.length>this.maxLength){let e=n.text.match(this.maxLengthRegexp),i=n.durationMs/e.length;for(let a=0;a${t.replace("\\n","
")}`:"")}}function Mt(){return Lt()?.player}function Lt(){return document.querySelector("#video_player")}const Ot=async function(t="en"){let e=null;const o=Mt(),{duration:n}=o?.cache_||{},{courseId:i,tracks:a,sources:r}=o?.options_||{},s=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(r),l=await async function(t){const e=await fetch(`https://www.coursera.org/api/onDemandCourses.v1/${t}`),o=await e.json();return o?.elements?.[0]}(i);let d=l?.primaryLanguageCodes?.[0];d=d?O(d):"en",x.includes(d)||(d="en");const c=function(t,e,o){let n=t?.find((t=>O(t.srclang)===e));return n||(n=t?.find((t=>O(t.srclang)===o))||t?.[0]),n?.src}(a,d,t);console.log(`videoURL: ${s}, subtitlesURL: ${c}`),c&&s?e=[{target:"video_file_url",targetUrl:s},{target:"subtitles_file_url",targetUrl:`https://www.coursera.org${c}`}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${s}, subtitlesURL: ${c}`);const u={duration:n,detectedLanguage:d,translationHelp:e};return m.Z.log("coursera video data:",u),console.log("[VOT] Detected language: ",u.detectedLanguage),u},Et="https://www.udemy.com/api-2.0";async function Pt(t){const e=await fetch(`${Et}/courses/${t}/?`+new URLSearchParams({"fields[course]":"locale",use_remote_version:"true",caching_intent:"true"}));return await e.json()}async function Ct(t,e,o){if(!(t.expires+2592e6>(new Date).getTime()&&t.accessToken))return void console.error(y.get("udemyAccessTokenExpired"));const n=`Bearer ${t.accessToken}`,i=await fetch(`${Et}/users/me/subscribed-courses/${e}/lectures/${o}/?`+new URLSearchParams({"fields[lecture]":"asset","fields[asset]":"length,media_sources,captions"}),{headers:{"x-udemy-authorization":n,authorization:n}});return await i.json()}function At(){return Ft()?.player}function Bt(){const t=document.querySelector(".ud-app-loader[data-module-id='course-taking']")?.dataset?.moduleArgs;return t?JSON.parse(t):(console.error(y.get("udemyModuleArgsNotFound")),{})}function Ft(){return document.querySelector(".vjs-v7")}const _t=async function(t,e="en"){let o=null;const n=At();m.Z.log("udemyData",t);const i=Bt();m.Z.log("moduleData: ",i);const a=i.courseId,r=window.location.pathname.match(/learn\/lecture\/([^/]+)/)?.[1];m.Z.log(`CourseId: ${a}, lectureId: ${r}`);const s=await Pt(a);m.Z.log("courseLang Data:",s);const l=await Ct(t,a,r);console.log("lecture Data:",l);let d=s?.locale?.locale;d=d?O(d):"en",x.includes(d)||(d="en");const c=l?.asset?.length||n?.cache_?.duration,u=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(l?.asset?.media_sources)||function(){const t=Ft()?.querySelector("video")?.src;return!t?.startsWith("blob:")&&t}(),h=function(t,e,o){let n=t?.find((t=>O(t.locale_id)===e));return n||(n=t?.find((t=>O(t.locale_id)===o))||t?.[0]),n?.url}(l?.asset?.captions,d,e);console.log(`videoURL: ${u}, subtitlesURL: ${h}`),h&&u?o=[{target:"video_file_url",targetUrl:u},{target:"subtitles_file_url",targetUrl:h}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${u}, subtitlesURL: ${h}`);const p={duration:c,detectedLanguage:d,translationHelp:o};return m.Z.log("udemy video data:",p),console.log("[VOT] Detected language: ",p.detectedLanguage),p};o("./node_modules/requestidlecallback-polyfill/index.js");class Rt{constructor(){this.listeners=new Set}hasListener(t){return this.listeners.has(t)}dispatchToListener(t,...e){try{t(...e)}catch(t){console.error("[VOT]",t)}}addListener(t){if(this.hasListener(t))throw new Error("[VOT] The listener has already been added.");this.listeners.add(t)}removeListener(t){if(!this.hasListener(t))throw new Error("[VOT] The listener has not been added yet.");this.listeners.delete(t)}dispatch(...t){for(const e of Array.from(this.listeners))this.dispatchToListener(e,...t)}}function qt(t){return Array.from(t).map((t=>{const e=[];return t instanceof HTMLVideoElement&&e.push(t),t instanceof HTMLElement&&e.push(...Array.from(t.querySelectorAll("video"))),t?.shadowRoot?.querySelectorAll&&e.push(...Array.from(t.shadowRoot.querySelectorAll("video"))),e})).flat()}const zt=[{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube(-nocookie)?.com$/,selector:"shorts-video #player"},{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube(-nocookie)?.com$/,selector:".player-container"},{host:"youtube",url:"https://youtu.be/",match:/^(www.)?youtube(-nocookie|kids)?.com$/,selector:".html5-video-container:not(#inline-player *)"},{host:"tiktok",url:"https://www.tiktok.com/",match:/^(www.)?tiktok.com$/,selector:null},{host:"proxytok",url:"https://www.tiktok.com/",match:["proxitok.pabloferreiro.es","proxitok.pussthecat.org","tok.habedieeh.re","proxitok.esmailelbob.xyz","proxitok.privacydev.net","tok.artemislena.eu","tok.adminforge.de","tik.hostux.net","tt.vern.cc","cringe.whatever.social","proxitok.lunar.icu","proxitok.privacy.com.de"],selector:".column.has-text-centered"},{additionalData:"mobile",host:"twitch",url:"https://twitch.tv/",match:/^m.twitch.tv$/,selector:"main > div > section > div > div > div"},{host:"twitch",url:"https://twitch.tv/",match:t=>t.host.includes("clips.twitch.tv")||t.host.includes("player.twitch.tv")&&null===t.searchParams.get("channel")||t.host.includes("twitch.tv")&&(t.pathname.startsWith("/videos")||t.pathname.startsWith("/embed")||t.pathname.includes("/clip")),selector:".video-ref"},{host:"xvideos",url:"https://www.xvideos.com/",match:/^www.xvideos.com$/,selector:".video-bg-pic"},{host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:/^[a-z]+.pornhub.com$/,selector:".mainPlayerDiv > .video-element-wrapper-js > div"},{additionalData:"embed",host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:t=>t.host.includes("pornhub.com")&&t.pathname.startsWith("/embed/"),selector:"#player"},{additionalData:"mobile",host:"vk",url:"https://vk.com/video?z=",match:/^m.vk.(com|ru)$/,selector:"vk-video-player",shadowRoot:!0},{host:"vk",url:"https://vk.com/video?z=",match:/^(www.|m.)?vk.(com|ru)$/,selector:".videoplayer_media"},{host:"vimeo",url:"https://vimeo.com/",match:/^(player.)?vimeo.com$/,selector:".player"},{host:"nine_gag",url:"https://9gag.com/gag/",match:/^9gag.com$/,selector:".video-post"},{host:"coub",url:"https://coub.com/view/",match:/^coub.com$/,selector:".viewer__player"},{host:"bitchute",url:"https://www.bitchute.com/video/",match:/^(www.)?bitchute.com$/,selector:".plyr__video-wrapper"},{host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:".video-player > div > div > div:nth-child(2)"},{additionalData:"embed",host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:"#app > div > div"},{host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m|player).bilibili.com$/,selector:".bpx-player-video-wrap"},{additionalData:"old",host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m).bilibili.com$/,selector:null},{host:"twitter",url:"https://twitter.com/i/status/",match:/^twitter.com$/,selector:'div[data-testid="videoComponent"] > div:nth-child(1) > div'},{host:"mail_ru",url:"https://my.mail.ru/",match:/^my.mail.ru$/,selector:"#b-video-wrapper"},{host:"coursera",url:"https://www.coursera.org/",match:/coursera.org$/,selector:"#video_player"},{host:"udemy",url:"https://www.udemy.com",match:/udemy.com$/,selector:'div[data-purpose="curriculum-item-viewer-content"] > section > div > div > div > div:nth-of-type(2)'},{host:"invidious",url:"https://youtu.be/",match:ct,selector:"#player"},{host:"piped",url:"https://youtu.be/",match:ut,selector:".shaka-video-container"},{host:"rumble",url:"https://rumble.com",match:/^rumble.com$/,selector:"#videoPlayer > .videoPlayer-Rumble-cls > div"},{host:"eporner",url:"https://www.eporner.com/",match:/^(www.)?eporner.com$/,selector:".vjs-v7"},{host:"peertube",url:"tube.shanti.cafe",match:["peertube.1312.media","tube.shanti.cafe","bee-tube.fr","video.sadmin.io","dalek.zone","review.peertube.biz","peervideo.club","tube.la-dina.net","peertube.tmp.rcp.tf"],selector:".vjs-v7"},{host:"dailymotion",url:"https://www.dailymotion.com/video/",match:/^geo.dailymotion.com$/,selector:".player"},{host:"trovo",url:"https://trovo.live/s/",match:/^trovo.live$/,selector:".player-video"},{host:"yandexdisk",url:"https://disk.yandex.ru/i/",match:/^disk.yandex.ru$/,selector:"yaplayertag > div:nth-of-type(1)"}],Dt=wt.getParser(window.navigator.userAgent).getResult(),It=[...ct,...ut],Nt=["playing","ratechange","play","waiting","pause"];function jt(t,e,o=!1){return t.map((t=>({label:`${o&&!T.includes(t)?"❌ ":""}${y.get("langs")[t]??t.toUpperCase()}`,value:t,selected:e===t})))}var $t=!1;function Ht(t,e,n,i,a,r){m.Z.log(`Translate video (url: ${t}, duration: ${e}, requestLang: ${n}, responseLang: ${i})`),m.Z.log("translationHelp:",a),$t?m.Z.log("translationPanding return"):($t=!0,async function(t,e,n,i,a,r){try{m.Z.log("requestVideoTranslation");const s=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;m.Z.log("Inited yandexRequest...");const l=nt(t,e,n,i,a);await s("/video-translation/translate",l,{"Vtrans-Signature":await St(l),"Sec-Vtrans-Token":xt(!1)},r)}catch(t){console.error("[VOT]",t),r(!1)}}(t,e,n,i,a,((t,e)=>{if($t=!1,m.Z.log("[exec callback] Requesting video translation"),!t)return void r(!1,y.get("requestTranslationFailed"));const o=it(e);switch(console.log("[VOT] Translation response: ",o),o.status){case 0:r(!1,o.message);break;case 1:r(!!o.url,o.url||y.get("audioNotReceived"));break;case 2:r(!1,o.remainingTime?function(t){const e=Math.floor(t/60),o=Math.floor(t%60);return e>=60?y.get("translationTakeMoreThanHour"):e>=10&&e%10?y.get("translationTakeApproximatelyMinutes").format(e):1==e||0==e&&o>0?y.get("translationTakeAboutMinute"):y.get("translationTakeApproximatelyMinute").format(e)}(o.remainingTime):y.get("translationTakeFewMinutes"));break;case 3:r(!1,y.get("videoBeingTranslated"))}})))}class Zt{translateFromLang="en";translateToLang=V;timer;ytData="";videoData="";firstPlay=!0;audio=new Audio;hls=P();downloadTranslationUrl=null;downloadSubtitlesUrl=null;autoRetry;streamPing;volumeOnStart;tempOriginalVolume;tempVolume;subtitlesList=[];subtitlesListVideoId=null;videoLastSrcObject=null;constructor(t,e,o){m.Z.log("[VideoHandler] add video:",t,"container:",e,this),this.video=t,this.container=e,this.site=o,this.handleSrcChangedBound=this.handleSrcChanged.bind(this),this.srcObserver=new MutationObserver(this.handleSrcChangedBound),this.srcObserver.observe(this.video,{attributeFilter:["src","currentSrc"]}),this.srcObjectInterval=setInterval((async()=>{this.videoLastSrcObject!==this.video.srcObject&&(this.videoLastSrcObject=this.video.srcObject,await this.handleSrcChanged())}),100),this.stopTranslationBound=this.stopTranslation.bind(this),this.handleVideoEventBound=this.handleVideoEvent.bind(this),this.changeOpacityOnEventBound=this.changeOpacityOnEvent.bind(this),this.resetTimerBound=this.resetTimer.bind(this),this.init()}async init(){if(this.initialized)return;this.data={autoTranslate:await b.get("autoTranslate",0,!0),dontTranslateLanguage:await b.get("dontTranslateLanguage",V),dontTranslateYourLang:await b.get("dontTranslateYourLang",1,!0),autoSetVolumeYandexStyle:await b.get("autoSetVolumeYandexStyle",1,!0),autoVolume:await b.get("autoVolume",15,!0)/100,showVideoSlider:await b.get("showVideoSlider",1,!0),syncVolume:await b.get("syncVolume",0,!0),subtitlesMaxLength:await b.get("subtitlesMaxLength",300,!0),highlightWords:await b.get("highlightWords",0,!0),responseLanguage:await b.get("responseLanguage",V),defaultVolume:await b.get("defaultVolume",100,!0),udemyData:await b.get("udemyData",{accessToken:"",expires:0}),audioProxy:await b.get("audioProxy","uk"===V?1:0,!0),showPiPButton:await b.get("showPiPButton",0,!0),translateAPIErrors:await b.get("translateAPIErrors",1,!0),translationService:await b.get("translationService",C.kF),detectService:await b.get("detectService",C.EY)},this.videoData=await this.getVideoData(),console.log("[db] data from db: ",this.data),this.subtitlesWidget=new Vt(this.video,this.container,this.site),this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength),this.subtitlesWidget.setHighlightWords(this.data.highlightWords),this.initUI(),this.initUIEvents();const t=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=t,t&&(this.votMenu.container.hidden=t),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage??"ru"),this.translateToLang=this.data.responseLanguage??"ru",this.initExtraEvents(),this.initialized=!0}transformBtn(t="none",e){this.votButton.container.dataset.status=t,this.votButton.label.innerHTML=e}initUI(){this.votButton=bt.createVOTButton(y.get("translateVideo")),this.container.appendChild(this.votButton.container),this.votButton.pipButton.hidden=!E()||!this.data?.showPiPButton,this.votButton.separator2.hidden=!E()||!this.data?.showPiPButton,this.votButton.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votMenu=bt.createVOTMenu(y.get("VOTSettings")),this.container.appendChild(this.votMenu.container),this.votDownloadButton=bt.createIconButton(''),this.votDownloadButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadButton),this.votDownloadSubtitlesButton=bt.createIconButton(''),this.votDownloadSubtitlesButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadSubtitlesButton),this.votSettingsButton=bt.createIconButton(''),this.votMenu.headerContainer.appendChild(this.votSettingsButton),this.votTranslationLanguageSelect=bt.createVOTLanguageSelect({fromTitle:y.get("langs")[this.video.detectedLanguage],fromDialogTitle:y.get("videoLanguage"),fromItems:[{label:y.get("langs").auto,value:"auto",selected:""},...jt(x,this.videoData.detectedLanguage)],fromOnSelectCB:async t=>{m.Z.log("[fromOnSelectCB] select from language",t.target.dataset.votValue),this.videoData=await this.getVideoData(),this.setSelectMenuValues(t.target.dataset.votValue,this.videoData.responseLanguage)},toTitle:y.get("langs")[this.video.responseLanguage],toDialogTitle:y.get("translationLanguage"),toItems:[...jt(x,this.videoData.responseLanguage,!0),{label:"─────────",value:"separator",disabled:!0},...jt(S,this.videoData.responseLanguage,!0)],toOnSelectCB:async t=>{const e=t.target.dataset.votValue;m.Z.log("[toOnSelectCB] select to language",e),this.data.responseLanguage=this.translateToLang=e,await b.set("responseLanguage",this.data.responseLanguage),m.Z.log("Response Language value changed. New value: ",this.data.responseLanguage),this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage)}}),this.votMenu.bodyContainer.appendChild(this.votTranslationLanguageSelect.container),this.votSubtitlesSelect=bt.createVOTSelect(y.get("VOTSubtitlesDisabled"),y.get("VOTSubtitles"),[{label:y.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1}],{onSelectCb:async t=>{await this.changeSubtitlesLang(t.target.dataset.votValue)},labelElement:bt.createVOTSelectLabel(y.get("VOTSubtitles"))}),this.votMenu.bodyContainer.appendChild(this.votSubtitlesSelect.container),this.votVideoVolumeSlider=bt.createSlider(`${y.get("VOTVolume")}: ${100*this.getVideoVolume()}%`,100*this.getVideoVolume()),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoVolumeSlider.container),this.votVideoTranslationVolumeSlider=bt.createSlider(`${y.get("VOTVolumeTranslation")}: ${this.data?.defaultVolume??100}%`,this.data?.defaultVolume??100),this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoTranslationVolumeSlider.container),this.votMenu.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votSettingsDialog=bt.createDialog(y.get("VOTSettings")),document.documentElement.appendChild(this.votSettingsDialog.container),this.votTranslationHeader=bt.createHeader(y.get("translationSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationHeader),this.votAutoTranslateCheckbox=bt.createCheckbox(y.get("VOTAutoTranslate"),this.data?.autoTranslate??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoTranslateCheckbox.container),this.votDontTranslateYourLangSelect=bt.createVOTSelect(y.get("langs")[b.syncGet("dontTranslateLanguage",V)],y.get("VOTDontTranslateYourLang"),jt(x,b.syncGet("dontTranslateLanguage",V)),{onSelectCb:async t=>{this.data.dontTranslateLanguage=t.target.dataset.votValue,await b.set("dontTranslateLanguage",this.data.dontTranslateLanguage)},labelElement:bt.createCheckbox(y.get("VOTDontTranslateYourLang"),this.data?.dontTranslateYourLang??!0).container}),this.votSettingsDialog.bodyContainer.appendChild(this.votDontTranslateYourLangSelect.container),this.votAutoSetVolumeCheckbox=bt.createCheckbox(`${y.get("VOTAutoSetVolume")}`,this.data?.autoSetVolumeYandexStyle??!0),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeCheckbox.container),this.votAutoSetVolumeSlider=bt.createSlider(`${100*(this.data?.autoVolume??C.sN)}%`,100*(this.data?.autoVolume??C.sN),0,100),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeSlider.container),this.votShowVideoSliderCheckbox=bt.createCheckbox(y.get("VOTShowVideoSlider"),this.data?.showVideoSlider??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votShowVideoSliderCheckbox.container),this.votUdemyDataTextfield=bt.createTextfield(y.get("VOTUdemyData"),this.data?.udemyData?.accessToken??""),this.votUdemyDataTextfield.container.hidden="udemy"!==this.site.host,this.votSettingsDialog.bodyContainer.appendChild(this.votUdemyDataTextfield.container),this.votSyncVolumeCheckbox=bt.createCheckbox(y.get("VOTSyncVolume"),this.data?.syncVolume??!1),this.votSyncVolumeCheckbox.container.hidden="youtube"!==this.site.host||"mobile"===this.site.additionalData,this.votSettingsDialog.bodyContainer.appendChild(this.votSyncVolumeCheckbox.container),this.votAudioProxyCheckbox=bt.createCheckbox(y.get("VOTAudioProxy"),this.data?.audioProxy??!1),this.votAudioProxyCheckbox.container.hidden=!1,this.votSettingsDialog.bodyContainer.appendChild(this.votAudioProxyCheckbox.container),this.votTranslationServiceSelect=bt.createVOTSelect(b.syncGet("translationService",C.kF),y.get("VOTTranslationService"),jt(_,b.syncGet("translationService",C.kF)),{onSelectCb:async t=>{this.data.translationService=t.target.dataset.votValue,await b.set("translationService",this.data.translationService)},labelElement:bt.createCheckbox(y.get("VOTTranslateAPIErrors"),this.data.translateAPIErrors??!0).container}),this.votTranslationServiceSelect.container.hidden="ru"===y.lang,this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationServiceSelect.container),this.votDetectServiceSelect=bt.createVOTSelect(b.syncGet("detectService",C.EY),y.get("VOTDetectService"),jt(R,b.syncGet("detectService",C.EY)),{onSelectCb:async t=>{this.data.detectService=t.target.dataset.votValue,await b.set("detectService",this.data.detectService)},labelElement:bt.createVOTSelectLabel(y.get("VOTDetectService"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votDetectServiceSelect.container),this.votSubtitlesHeader=bt.createHeader(y.get("subtitlesSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHeader),this.votSubtitlesMaxLengthSlider=bt.createSlider(`${y.get("VOTSubtitlesMaxLength")}: ${this.data?.subtitlesMaxLength??300}`,this.data?.subtitlesMaxLength??300,50,300),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesMaxLengthSlider.container),this.votSubtitlesHighlightWordsCheckbox=bt.createCheckbox(y.get("VOTHighlightWords"),this.data?.highlightWords??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHighlightWordsCheckbox.container),this.votAboutHeader=bt.createHeader(y.get("about")),this.votSettingsDialog.bodyContainer.appendChild(this.votAboutHeader),this.votLanguageSelect=bt.createVOTSelect(y.get("langs")[b.syncGet("locale-lang-override","auto")],y.get("VOTMenuLanguage"),jt(f,b.syncGet("locale-lang-override","auto")),{onSelectCb:async t=>{await b.set("locale-lang-override",t.target.dataset.votValue)},labelElement:bt.createVOTSelectLabel(y.get("VOTMenuLanguage"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votLanguageSelect.container),this.votShowPiPButtonCheckbox=bt.createCheckbox(y.get("VOTShowPiPButton"),this.data?.showPiPButton??!1),this.votShowPiPButtonCheckbox.container.hidden=!E(),this.votSettingsDialog.bodyContainer.appendChild(this.votShowPiPButtonCheckbox.container),this.votVersionInfo=bt.createInformation(`${y.get("VOTVersion")}:`,`cloudflare ${GM_info.script.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votVersionInfo.container),this.votAuthorsInfo=bt.createInformation(`${y.get("VOTAuthors")}:`,GM_info.script.author),this.votSettingsDialog.bodyContainer.appendChild(this.votAuthorsInfo.container),this.votLoaderInfo=bt.createInformation(`${y.get("VOTLoader")}:`,`${GM_info.scriptHandler} v${GM_info.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votLoaderInfo.container),this.votBrowserInfo=bt.createInformation(`${y.get("VOTBrowser")}:`,`${Dt.browser.name} ${Dt.browser.version} (${Dt.os.name} ${Dt.os.version})`),this.votSettingsDialog.bodyContainer.appendChild(this.votBrowserInfo.container),this.votResetSettingsButton=bt.createButton(y.get("resetSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votResetSettingsButton)}initUIEvents(){this.votButton.translateButton.addEventListener("click",(async()=>{if(this.audio.src)return m.Z.log("[click translationBtn] audio.src is not empty"),void this.stopTraslate();try{m.Z.log("[click translationBtn] trying execute translation");const t=L(this.site.host,this.video);if(!t)throw new w("VOTNoVideoIDFound");await this.translateExecutor(t)}catch(t){console.error("[VOT]",t),"VOTLocalizedError"===t?.name?this.transformBtn("error",t.localizedMessage):this.transformBtn("error",t)}})),this.votButton.pipButton.addEventListener("click",(async()=>{this.video!==document.pictureInPictureElement?await this.video.requestPictureInPicture():await document.exitPictureInPicture()})),this.votButton.menuButton.addEventListener("click",(()=>{this.votMenu.container.hidden=!this.votMenu.container.hidden})),this.votDownloadButton.addEventListener("click",(()=>{this.downloadTranslationUrl&&window.open(this.downloadTranslationUrl,"_blank").focus()})),this.votDownloadSubtitlesButton.addEventListener("click",(()=>{console.log(this.downloadSubtitlesUrl),this.downloadSubtitlesUrl&&window.open(this.downloadSubtitlesUrl,"_blank").focus()})),this.votSettingsButton.addEventListener("click",(()=>{this.votSettingsDialog.container.hidden=!this.votSettingsDialog.container.hidden,(void 0===document.fullscreen||document.fullscreen)&&(document.webkitExitFullscreen&&document.webkitExitFullscreen(),document.mozCancelFullscreen&&document.mozCancelFullscreen(),document.exitFullscreen&&document.exitFullscreen())})),this.votVideoVolumeSlider.input.addEventListener("input",(t=>{const e=Number(t.target.value);if(this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`,this.setVideoVolume(e/100),1===this.data.syncVolume){const t=Number(this.votVideoTranslationVolumeSlider.input.value),o=ft(this.audio,e,t,this.tempOriginalVolume);this.votVideoTranslationVolumeSlider.input.value=o,this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,bt.updateSlider(this.votVideoTranslationVolumeSlider.input),this.tempVolume=o,this.tempOriginalVolume=e}})),this.votVideoTranslationVolumeSlider.input.addEventListener("input",(async t=>{this.data.defaultVolume=Number(t.target.value),await b.set("defaultVolume",this.data.defaultVolume),this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${this.data.defaultVolume}%`,this.audio.volume=this.data.defaultVolume/100,1===this.data.syncVolume&&this.syncTranslationWithVideo(this.data.defaultVolume)})),this.votAutoTranslateCheckbox.input.addEventListener("change",(async t=>{this.data.autoTranslate=Number(t.target.checked),await b.set("autoTranslate",this.data.autoTranslate),m.Z.log("autoTranslate value changed. New value: ",this.data.autoTranslate)})),this.votDontTranslateYourLangSelect.labelElement.addEventListener("change",(async t=>{this.data.dontTranslateYourLang=Number(t.target.checked),await b.set("dontTranslateYourLang",this.data.dontTranslateYourLang),m.Z.log("dontTranslateYourLang value changed. New value: ",this.data.dontTranslateYourLang)})),this.votAutoSetVolumeCheckbox.input.addEventListener("change",(async t=>{this.data.autoSetVolumeYandexStyle=Number(t.target.checked),await b.set("autoSetVolumeYandexStyle",this.data.autoSetVolumeYandexStyle),m.Z.log("autoSetVolumeYandexStyle value changed. New value: ",this.data.autoSetVolumeYandexStyle)})),this.votAutoSetVolumeSlider.input.addEventListener("input",(async t=>{const e=Number(t.target.value);this.data.autoVolume=e/100,await b.set("autoVolume",e),this.votAutoSetVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`})),this.votShowVideoSliderCheckbox.input.addEventListener("change",(async t=>{this.data.showVideoSlider=Number(t.target.checked),await b.set("showVideoSlider",this.data.showVideoSlider),m.Z.log("showVideoSlider value changed. New value: ",this.data.showVideoSlider),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status})),this.votUdemyDataTextfield.input.addEventListener("change",(async t=>{this.data.udemyData={accessToken:t.target.value,expires:(new Date).getTime()},await b.set("udemyData",this.data.udemyData),m.Z.log("udemyData value changed. New value: ",this.data.udemyData),window.location.reload()})),this.votSyncVolumeCheckbox.input.addEventListener("change",(async t=>{this.data.syncVolume=Number(t.target.checked),await b.set("syncVolume",this.data.syncVolume),m.Z.log("syncVolume value changed. New value: ",this.data.syncVolume)})),this.votAudioProxyCheckbox.input.addEventListener("change",(async t=>{this.data.audioProxy=Number(t.target.checked),await b.set("audioProxy",this.data.audioProxy),m.Z.log("audioProxy value changed. New value: ",this.data.audioProxy)})),this.votTranslationServiceSelect.labelElement.addEventListener("change",(async t=>{this.data.translateAPIErrors=Number(t.target.checked),await b.set("translateAPIErrors",this.data.translateAPIErrors),m.Z.log("translateAPIErrors value changed. New value: ",this.data.translateAPIErrors)})),this.votSubtitlesMaxLengthSlider.input.addEventListener("input",(async t=>{this.data.subtitlesMaxLength=Number(t.target.value),await b.set("subtitlesMaxLength",this.data.subtitlesMaxLength),this.votSubtitlesMaxLengthSlider.label.querySelector("strong").innerHTML=`${this.data.subtitlesMaxLength}`,this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength)})),this.votSubtitlesHighlightWordsCheckbox.input.addEventListener("change",(async t=>{this.data.highlightWords=Number(t.target.checked),await b.set("highlightWords",this.data.highlightWords),m.Z.log("highlightWords value changed. New value: ",this.data.highlightWords),this.subtitlesWidget.setHighlightWords(this.data.highlightWords)})),this.votShowPiPButtonCheckbox.input.addEventListener("change",(async t=>{this.data.showPiPButton=Number(t.target.checked),await b.set("showPiPButton",this.data.showPiPButton),m.Z.log("showPiPButton value changed. New value: ",this.data.showPiPButton),this.votButton.pipButton.hidden=!E()||!this.data.showPiPButton,this.votButton.separator2.hidden=!E()||!this.data.showPiPButton})),this.votResetSettingsButton.addEventListener("click",(async()=>{y.reset(),(await b.list()).filter((t=>!y.gmValues.includes(t))).forEach((t=>b.syncDelete(t))),window.location.reload()}))}releaseExtraEvents(){clearInterval(this.resizeInterval),this.resizeObserver?.disconnect(),"youtube"===this.site.host&&"mobile"!==this.site.additionalData&&this.syncVolumeObserver?.disconnect(),this.extraEvents?.forEach((t=>{t.element.removeEventListener(t.event,t.handler)}))}initExtraEvents(){this.extraEvents=[];const t=(t,e,o)=>{this.extraEvents.push({element:t,event:e,handler:o}),t.addEventListener(e,o)},e=(e,o,n)=>{o.forEach((o=>{t(e,o,n)}))};if(this.resizeObserver=new ResizeObserver((t=>{t.forEach((t=>{this.votMenu.container.setAttribute("style",`--vot-container-height: ${t.contentRect.height}px`)}))})),this.resizeObserver.observe(this.video),this.votMenu.container.setAttribute("style",`--vot-container-height: ${this.video.getBoundingClientRect().height}px`),this.resizeInterval=setInterval((()=>{this.votMenu.container.setAttribute("style",`--vot-container-height: ${this.video.getBoundingClientRect().height}px`)}),500),"youtube"===this.site.host&&"mobile"!==this.site.additionalData){this.syncVolumeObserver=new MutationObserver((t=>{t.forEach((t=>{"attributes"===t.type&&"aria-valuenow"===t.attributeName&&this.syncVideoVolumeSlider()}))}));const t=document.querySelector(".ytp-volume-panel");t&&this.syncVolumeObserver.observe(t,{attributes:!0,childList:!1,subtree:!0,attributeOldValue:!0})}let o;document.addEventListener("click",(t=>{const e=t.target,o=this.votButton.container,n=this.votMenu.container,i=this.container,a=this.votSettingsDialog.container,r=document.querySelector(".vot-dialog-temp"),s=o.contains(e),l=n.contains(e),d=i.contains(e),c=a.contains(e),u=r?.contains(e)??!1;m.Z.log(`[document click] ${s} ${l} ${d} ${c} ${u}`),s||l||c||u||(d||this.logout(0),this.votMenu.container.hidden=!0)})),o="pornhub"===this.site.host?"embed"===this.site.additionalData?document.querySelector("#player"):this.container.querySelector(".video-element-wrapper-js > div"):"twitter"===this.site.host?document.querySelector('div[data-testid="videoPlayer"]'):"yandexdisk"===this.site.host?document.querySelector(".video-player__player"):this.container,o&&e(o,["mousemove","mouseout"],this.resetTimerBound),t(this.votButton.container,"mousemove",this.changeOpacityOnEventBound),t(this.votMenu.container,"mousemove",this.changeOpacityOnEventBound),e(document,["touchstart","touchmove","touchend"],this.changeOpacityOnEventBound),t(this.votButton.container,"mousedown",(t=>{t.stopImmediatePropagation()})),t(this.votMenu.container,"mousedown",(t=>{t.stopImmediatePropagation()})),"youtube"===this.site.host&&(this.container.draggable=!1),t(this.video,"abort",(()=>{m.Z.log("lipsync mode is abort"),this.stopTranslation(),this.videoData=""})),t(this.video,"progress",(async()=>{if(!this.firstPlay||1!==this.data.autoTranslate)return;const t=L(this.site.host,this.video);if(!t)throw new w("VOTNoVideoIDFound");try{await this.translateExecutor(t),this.firstPlay=!1}catch(t){console.error("[VOT]",t),"VOTLocalizedError"===t?.name?this.transformBtn("error",t.localizedMessage):this.transformBtn("error",t),this.firstPlay=!1}}))}logout(t){this.votMenu.container.hidden&&(this.votButton.container.style.opacity=t)}resetTimer(){clearTimeout(this.timer),this.logout(1),this.timer=setTimeout((()=>{this.logout(0)}),2e3)}changeOpacityOnEvent(t){clearTimeout(this.timer),this.logout(1),t.stopPropagation()}async changeSubtitlesLang(t){if(m.Z.log("[onchange] subtitles",t),this.votSubtitlesSelect.setSelected(t),"disabled"===t)this.votSubtitlesSelect.setTitle(y.get("VOTSubtitlesDisabled")),this.subtitlesWidget.setContent(null),this.votDownloadSubtitlesButton.hidden=!0,this.downloadSubtitlesUrl=null;else{const e=await async function(t){let e=!1,o=await Promise.race([new Promise((async t=>{await M(5e3),e||console.error("[VOT] Failed to fetch subtitles. Reason: timeout"),e=!0,t([])})),new Promise((async o=>{m.Z.log("Fetching subtitles:",t),await fetch(t.url).then((t=>t.json())).then((t=>{e=!0,o(t)})).catch((t=>{console.error("[VOT] Failed to fetch subtitles. Reason:",t),e=!0,o({containsTokens:!1,subtitles:[]})}))}))]);return"youtube"===t.source&&(o=function(t){const e={containsTokens:!1,subtitles:[]};if("object"!=typeof t||!("events"in t)||!Array.isArray(t.events))return console.error("[VOT] Failed to format youtube subtitles",t),e;for(let o=0;ot.utf8.replace(/^ +| +$/g,""))).join(" ");let i=t.events[o].dDurationMs;t.events[o+1]&&t.events[o].tStartMs+t.events[o].dDurationMs>t.events[o+1].tStartMs&&(i=t.events[o+1].tStartMs-t.events[o].tStartMs),"\n"!==n&&e.subtitles.push({text:n,startMs:t.events[o].tStartMs,durationMs:i})}return e}(o)),o.subtitles=function(t,e){const o=[];let n;for(const i of t.subtitles){let a;if(i?.tokens?.length){if("yandex"!==e)return console.warn("[VOT] Unsupported subtitles tokens type: ",e),t.containsTokens=!1,null;a=Tt(i)}else a=kt(i,n);n=a[a.length-1],o.push(Object.assign(Object.assign({},i),{tokens:a}))}return t.containsTokens=!0,o}(o,t.source),console.log("[VOT] subtitles:",o),o}(this.subtitlesList.at(parseInt(t)));this.subtitlesWidget.setContent(e),this.votDownloadSubtitlesButton.hidden=!1,this.downloadSubtitlesUrl=this.subtitlesList.at(parseInt(t))?.url}}async updateSubtitlesLangSelect(){const t=[{label:y.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1},...this.subtitlesList.map(((t,e)=>({label:(y.get("langs")[t.language]??t.language.toUpperCase())+(t.translatedFromLanguage?` ${y.get("VOTTranslatedFrom")} ${y.get("langs")[t.translatedFromLanguage]??t.translatedFromLanguage.toUpperCase()}`:"")+("yandex"!==t.source?` ${t.source}`:"")+(t.isAutoGenerated?` (${y.get("VOTAutogenerated")})`:""),value:e,selected:!1,disabled:!1})))];this.votSubtitlesSelect.updateItems(t),await this.changeSubtitlesLang(t[0].value)}async updateSubtitles(){await this.changeSubtitlesLang("disabled");const t=L(this.site.host,this.video);if(!t)return console.error(`[VOT] ${y.getDefault("VOTNoVideoIDFound")}`),this.subtitlesList=[],this.subtitlesListVideoId=null,void await this.updateSubtitlesLangSelect();this.subtitlesListVideoId!==t&&(this.videoData.detectedLanguage||(this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage)),this.subtitlesList=await async function(t,e,n){const i="youtube"===t.host?j():[];let a=!1;const r=[...await Promise.race([new Promise((async t=>{await M(5e3),a||console.error("[VOT] Failed get yandex subtitles. Reason: timeout"),a=!0,t([])})),new Promise((i=>{!async function(t,e,n){try{m.Z.log("requestVideoSubtitles");const i=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;m.Z.log("Inited yandexRequest...");const a=at(t,e);await i("/video-subtitles/get-subtitles",a,{"Vsubs-Signature":await St(a),"Sec-Vsubs-Token":xt(!1)},n)}catch(t){console.error("[VOT]",t),n(!1)}}(`${t.url}${e}`,n,((t,e)=>{m.Z.log("[exec callback] Requesting video subtitles"),t||(console.error("[VOT] Failed get yandex subtitles"),a=!0,i([]));const o=rt(e);console.log("[VOT] Subtitles response: ",o);let n=o.subtitles??[];n=n.reduce(((t,e)=>(e.language&&!t.find((t=>{if("yandex"===t.source&&t.language===e.language&&!t.translatedFromLanguage)return t}))&&t.push({source:"yandex",language:e.language,url:e.url}),e.translatedLanguage&&t.push({source:"yandex",language:e.translatedLanguage,translatedFromLanguage:e.language,url:e.translatedUrl}),t)),[]),a=!0,i(n)}))}))]),...i].sort(((t,e)=>{if(t.source!==e.source)return"yandex"===t.source?-1:1;if(t.language!==e.language&&(t.language===V||e.language===V))return t.language===V?-1:1;if("yandex"===t.source){if(t.translatedFromLanguage!==e.translatedFromLanguage)return t.translatedFromLanguage&&e.translatedFromLanguage?t.translatedFromLanguage===n?-1:1:t.language===e.language?t.translatedFromLanguage?1:-1:t.translatedFromLanguage?-1:1;if(!t.translatedFromLanguage)return t.language===n?-1:1}return"youtube"===t.source&&t.isAutoGenerated!==e.isAutoGenerated?t.isAutoGenerated?1:-1:0}));return console.log("[VOT] subtitles list",r),r}(this.site,t,this.videoData.detectedLanguage),this.subtitlesList?this.subtitlesListVideoId=t:await this.changeSubtitlesLang("disabled"),await this.updateSubtitlesLangSelect())}getVideoVolume(){let t=this.video?.volume;return"youtube"===this.site.host&&(t=N()||t),t}setVideoVolume(t){"youtube"===this.site.host&&H(t)||(this.video.volume=t)}syncVideoVolumeSlider(){const t=Math.round(100*this.getVideoVolume());this.votVideoVolumeSlider.input.value=t,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${t}%`,bt.updateSlider(this.votVideoVolumeSlider.input),1===this.data.syncVolume&&(this.tempOriginalVolume=Number(t))}setSelectMenuValues(t,e){this.votTranslationLanguageSelect.fromSelect.setTitle(y.get("langs")[t]),this.votTranslationLanguageSelect.toSelect.setTitle(y.get("langs")[e]),this.votTranslationLanguageSelect.fromSelect.setSelected(t),this.votTranslationLanguageSelect.toSelect.setSelected(e),console.log(`[VOT] Set translation from ${t} to ${e}`),this.videoData.detectedLanguage=t,this.videoData.responseLanguage=e}syncTranslationWithVideo(t){const e=Number(this.votVideoVolumeSlider.input.value),o=ft(this.video,t,e,this.tempVolume);this.votVideoVolumeSlider.input.value=o,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,bt.updateSlider(this.votVideoVolumeSlider.input),this.tempOriginalVolume=o,this.tempVolume=t}async getVideoData(){const t={translationHelp:null,isStream:!1};if(t.duration=this.video?.duration||343,t.videoId=L(this.site.host,this.video),t.detectedLanguage=this.translateFromLang,t.responseLanguage=this.translateToLang,!t.videoId)return this.ytData={},t;if(window.location.hostname.includes("youtube.com"))this.ytData=await $(),t.isStream=this.ytData.isLive,""!==this.ytData.author&&(t.detectedLanguage=this.ytData.detectedLanguage,t.responseLanguage=this.translateToLang);else if(window.location.hostname.includes("rutube")||window.location.hostname.includes("my.mail.ru"))t.detectedLanguage="ru";else if(window.location.hostname.includes("bilibili.com"))t.detectedLanguage="zh";else if(window.location.hostname.includes("coursera.org")){const e=await Ot(this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else if(window.location.hostname.includes("udemy.com")){const e=await _t(this.data.udemyData,this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else"vk"!==this.site.host&&"piped"!==this.site.host&&"invidious"!==this.site.host&&"bitchute"!==this.site.host&&"rumble"!==this.site.host&&"peertube"!==this.site.host&&"dailymotion"!==this.site.host&&"trovo"!==this.site.host&&"yandexdisk"!==this.site.host||(t.detectedLanguage="auto");return t}videoValidator(){if("youtube"===this.site.host){if(m.Z.log("VideoValidator videoData: ",this.videoData),1===this.data.dontTranslateYourLang&&this.videoData.detectedLanguage===this.data.dontTranslateLanguage&&this.videoData.responseLanguage===this.data.dontTranslateLanguage)throw new w("VOTDisableFromYourLang");if(this.videoData.duration>14400)throw new w("VOTVideoIsTooLong")}return!0}lipSync(t=!1){if(m.Z.log("lipsync video",this.video),this.video)if(this.audio.currentTime=this.video.currentTime,this.audio.playbackRate=this.video.playbackRate,t)if("play"!==t)"pause"===t&&(m.Z.log("lipsync mode is pause"),this.audio.pause()),"stop"===t&&(m.Z.log("lipsync mode is stop"),this.audio.pause()),"waiting"===t&&(m.Z.log("lipsync mode is waiting"),this.audio.pause()),"playing"===t&&(m.Z.log("lipsync mode is playing"),this.audio.play());else{m.Z.log("lipsync mode is play");const t=this.audio.play();void 0!==t&&t.catch((t=>{if(console.error("[VOT]",t),"NotAllowedError"===t.name)throw this.transformBtn("error",y.get("grantPermissionToAutoPlay")),new w("grantPermissionToAutoPlay");if("NotSupportedError"===t.name)throw this.transformBtn("error",It.includes(window.location.hostname)?y.get("neededAdditionalExtension"):y.get("audioFormatNotSupported")),It.includes(window.location.hostname)?new w("neededAdditionalExtension"):new w("audioFormatNotSupported")}))}else m.Z.log("lipsync mode is not set")}handleVideoEvent(t){m.Z.log(`video ${t.type}`),this.lipSync(t.type)}stopTraslate(){Nt.forEach((t=>this.video.removeEventListener(t,this.handleVideoEventBound))),this.audio.pause(),this.audio.src="",this.audio.removeAttribute("src"),this.votVideoVolumeSlider.container.hidden=!0,this.votVideoTranslationVolumeSlider.container.hidden=!0,this.votDownloadButton.hidden=!0,this.downloadTranslationUrl=null,this.transformBtn("none",y.get("translateVideo")),this.volumeOnStart&&(m.Z.log(`Volume on start: ${this.volumeOnStart}`),"youtube"===this.site.host?H(this.volumeOnStart):this.video.volume=this.volumeOnStart),clearInterval(this.streamPing),this.hls?.destroy(),this.hls=P()}async translateExecutor(t){this.videoData.detectedLanguage||(this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage)),m.Z.log("Run videoValidator"),this.videoValidator(),m.Z.log("Run translateFunc"),this.translateFunc(t,this.videoData.isStream,this.videoData.detectedLanguage,this.videoData.responseLanguage,this.videoData.translationHelp)}translateFunc(t,e,n,i,a){console.log("[VOT] Video Data: ",this.videoData);const r=`${this.site.url}${t}`;if(this.videoValidator(),e)return m.Z.log("Executed stream translation"),void function(t,e,n,i){m.Z.log(`Translate stream (url: ${t}, requestLang: ${e}, responseLang: ${n})`),async function(t,e,n,i){try{m.Z.log("requestStreamTranslation");const a=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;m.Z.log("Inited yandexRequest...");const r=lt(t,e,n);await a("/stream-translation/translate-stream",r,{"Vtrans-Signature":await St(r),"Sec-Vtrans-Token":xt(!1)},i)}catch(t){console.error("[VOT]",t),i(!1)}}(t,e,n,((t,e)=>{if(m.Z.log("[exec callback] Requesting stream translation"),!t)return void i(!1,y.get("requestTranslationFailed"));const o=dt(e);switch(console.log("[VOT] Stream Translation response: ",o),o.interval){case 10:i(!1,o.interval,y.get("translationTakeFewMinutes"));break;case 20:i(!0,o.interval,o||y.get("audioNotReceived"));break;case 0:i(!1,o.interval,y.get("streamNoConnectionToServer"))}}))}(r,n,i,(async(r,s,l)=>{if(m.Z.log("[exec callback] translateStream callback"),L(this.site.host,this.video)!==t)return;if(!r||!l.translatedInfo)return"VOTLocalizedError"===l?.name?this.transformBtn("error",l.localizedMessage):1===this.data.translateAPIErrors&&"ru"!==y.lang?(this.transformBtn("error",`${y.get("VOTTranslatingError")}...`),this.transformBtn("error",await F(l,"ru",y.lang))):this.transformBtn("error",l),void(10===s&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),1e3*s)));this.transformBtn("success",y.get("disableTranslate")),console.log(l);const d=l.pingId;m.Z.log(`Stream pingId: ${d}`),this.streamPing=setInterval((async()=>await async function(t,e){try{m.Z.log("requestStreamPing");const n=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;m.Z.log("Inited yandexRequest...");const i=st(t);await n("/stream-translation/ping-stream",i,{"Vtrans-Signature":await St(i),"Sec-Vtrans-Token":xt(!1)},e)}catch(t){console.error("[VOT]",t),e(!1)}}(d,(t=>m.Z.log("Stream ping result: ",t)))),1e3*s),m.Z.log(l.translatedInfo.url);const c=`https://${C.e6}/?all=yes&origin=${encodeURIComponent("https://strm.yandex.ru")}&referer=${encodeURIComponent("https://strm.yandex.ru")}&url=${encodeURIComponent(l.translatedInfo.url)}`;if(m.Z.log(c),this.hls)this.hls.on(Hls.Events.MEDIA_ATTACHED,(function(){m.Z.log("audio and hls.js are now bound together !")})),this.hls.on(Hls.Events.MANIFEST_PARSED,(function(t,e){m.Z.log("manifest loaded, found "+e.levels.length+" quality level")})),this.hls.loadSource(c),this.hls.attachMedia(this.audio),this.hls.on(Hls.Events.ERROR,(function(t,e){if(e.fatal)switch(e.type){case Hls.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover"),this.hls.recoverMediaError();break;case Hls.ErrorTypes.NETWORK_ERROR:console.error("fatal network error encountered",e);break;default:this.hls.destroy()}})),m.Z.log(this.hls);else{if(!this.audio.canPlayType("application/vnd.apple.mpegurl"))throw new w("audioFormatNotSupported");this.audio.src=c}Z(this.video,10),this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),this.video.src||this.video.currentSrc||this.video.srcObject?(this.video&&!this.video.paused&&this.lipSync("play"),Nt.forEach((t=>this.video.addEventListener(t,this.handleVideoEventBound))),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,1===this.data.autoSetVolumeYandexStyle&&(this.votVideoVolumeSlider.input.value=100*this.data.autoVolume,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=100*this.data.autoVolume+"%",bt.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=c):this.stopTranslation()}));if(["udemy","coursera"].includes(this.site.host)&&!a)throw new w("VOTTranslationHelpNull");Ht(r,this.videoData.duration,n,i,a,(async(o,r)=>{if(m.Z.log("[exec callback] translateVideo callback"),L(this.site.host,this.video)!==t)return;if(!o)return"VOTLocalizedError"===r?.name?this.transformBtn("error",r.localizedMessage):1!==this.data.translateAPIErrors||r.includes(y.get("translationTake"))||"ru"===y.lang?this.transformBtn("error",r):(this.transformBtn("error",y.get("VOTTranslatingError")),this.transformBtn("error",await F(r,"ru",y.lang))),r.includes(y.get("translationTake"))&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),6e4)),void console.error("[VOT]",r);if(this.audio.src=r,1===this.data.audioProxy&&r.startsWith("https://")){const t=r.replace("https://vtrans.s3-private.mds.yandex.net/tts/prod/",""),e=`https://${yt.i}/video-translation/audio-proxy/${t}`;console.log(`[VOT] Audio proxied via ${e}`),this.audio.src=e}if(this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),"twitter"===this.site.host&&document.querySelector('div[data-testid="app-bar-back"][role="button"]').addEventListener("click",this.stopTranslationBound),!this.video.src&&!this.video.currentSrc&&!this.video.srcObject)return void this.stopTranslation();const s=["twitch","vimeo","facebook","rutube","twitter","bilibili","mail_ru","rumble","eporner"];for(let t=0;t{t.forEach((t=>{"attributes"===t.type&&"src"===t.attributeName&&t.target===this.video&&""!==t.target.src&&(this.stopTranslation(),this.firstPlay=!0)}))})).observe(this.container,{attributes:!0,childList:!1,subtree:!0,attributeOldValue:!0});break}this.video&&!this.video.paused&&this.lipSync("play"),Nt.forEach((t=>this.video.addEventListener(t,this.handleVideoEventBound))),this.transformBtn("success",y.get("disableTranslate")),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,1===this.data.autoSetVolumeYandexStyle&&(this.votVideoVolumeSlider.input.value=100*this.data.autoVolume,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=100*this.data.autoVolume+"%",bt.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=r}))}stopTranslation(){this.stopTraslate(),this.syncVideoVolumeSlider()}async waitInitialization(){let t=!1;return await Promise.race([new Promise((async e=>{await M(1e3),t||console.error("[VOT] Initialization timeout"),t=!0,e(!1)})),new Promise((async e=>{for(;!this.initialized;)await M(100);t=!0,e(!0)}))])}async handleSrcChanged(){if(m.Z.log("[VideoHandler] src changed",this),!await this.waitInitialization())return;this.stopTranslation(),this.videoData=await this.getVideoData(),this.firstPlay=!0;const t=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=t,t&&(this.votMenu.container.hidden=t),this.site.selector||(this.container=this.video.parentElement),this.container.contains(this.votButton.container)||(this.container.appendChild(this.votButton.container),this.container.appendChild(this.votMenu.container)),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage??"ru"),this.translateToLang=this.data.responseLanguage??"ru"}async release(){m.Z.log("[VideoHandler] release"),await this.waitInitialization()&&(this.initialized=!1,this.stopTranslation(),this.releaseExtraEvents(),this.subtitlesWidget.release(),this.srcObserver.disconnect(),clearInterval(this.srcObjectInterval),this.votButton.container.remove(),this.votMenu.container.remove())}}const Ut=new class{constructor(){this.onVideoAdded=new Rt,this.onVideoRemoved=new Rt,this.handleVideoAddedBound=this.handleVideoAdded.bind(this),this.handleVideoRemovedBound=this.handleVideoRemoved.bind(this),this.observer=new MutationObserver((t=>{window.requestIdleCallback((()=>{t.forEach((t=>{"childList"===t.type&&(qt(t.addedNodes).forEach(this.handleVideoAddedBound),qt(t.removedNodes).forEach(this.handleVideoRemovedBound))}))}),{timeout:1e3})}))}enable(){this.observer.observe(document,{childList:!0,subtree:!0}),document.querySelectorAll("video").forEach(this.handleVideoAddedBound)}disable(){this.observer.disconnect()}handleVideoAdded(t){this.onVideoAdded.dispatch(t)}handleVideoRemoved(t){document.contains(t)||this.onVideoRemoved.dispatch(t)}},Wt=new WeakMap;(async function(){m.Z.log("Loading extension..."),await y.update(),m.Z.log(`Selected menu language: ${y.lang}`),m.Z.log("Extension compatibility passed..."),Ut.onVideoAdded.addListener((t=>{for(const e of zt.filter((t=>{const e=t=>t instanceof RegExp&&t.test(window.location.hostname)||"string"==typeof t&&window.location.hostname.includes(t)||"function"==typeof t&&t(new URL(window.location));return!!(e(t.match)||t.match instanceof Array&&t.match.some((t=>e(t))))&&t.host&&t.url}))){if(!e)continue;let o;if(e.shadowRoot?(o=e.selector?Object.values(document.querySelectorAll(e.selector)).find((e=>e.shadowRoot.contains(t))):t.parentElement,o=o&&o.shadowRoot?o.parentElement:o):o=e.selector?Object.values(document.querySelectorAll(e.selector)).find((e=>e.contains(t))):t.parentElement,o&&!("rumble"===e.host&&o.querySelector("vot-block")||("peertube"===e.host&&(e.url=window.location.origin),Wt.has(t)))){Wt.set(t,new Zt(t,o,e));break}}})),Ut.onVideoRemoved.addListener((async t=>{Wt.has(t)&&(await Wt.get(t).release(),Wt.delete(t))})),Ut.enable()})().catch((t=>{console.error("[VOT]",t)}))})()})(); \ No newline at end of file diff --git a/dist/vot-cloudflare.user.js b/dist/vot-cloudflare.user.js index 63d5f382..b16c8573 100644 --- a/dist/vot-cloudflare.user.js +++ b/dist/vot-cloudflare.user.js @@ -1309,10 +1309,8 @@ const getVideoId = (service, video) => { return url.pathname.match(/(?:videos)\/([^/]+)/)?.[0]; } case "proxytok": - // return url.pathname.match(/video\/([^/]+)/)?.[1]; return url.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0]; case "tiktok": { - // let id = url.pathname.match(/video\/([^/]+)/)?.[1]; let id = url.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0]; if (!id) { const playerEl = video.closest(".xgplayer-playing, .tiktok-web-player"); @@ -1707,64 +1705,20 @@ function getVideoVolume() { } function setVideoVolume(volume) { - return getPlayer()?.setVolume(Math.round(volume * 100)); -} - -function checkStreamTime(streamTime) { - // TODO: remove - const absTime = streamTime.absoluteTime; - return ( - !(absTime || !Number.isFinite(absTime) || absTime <= 0) && - Math.abs(Date.now() - 1000 * absTime) < 86400000 && - streamTime.currentTime !== 0 - ); - // return !(void 0 === (t = e.absoluteTime) || !Number.isFinite(t) || t <= 0) && Math.abs(Date.now() - 1e3 * t) < 864e5 && 0 !== e.currentTime; -} - -function getStreamTime(video) { - // TODO: remove const player = getPlayer(); - const progressState = player?.getProgressState?.call(); - let absoluteTime = player?.getMediaReferenceTime - ? player?.getMediaReferenceTime?.call() - : progressState?.ingestionTime; - const currentTime = progressState?.seekableEnd || video.currentTime; - - // getStreamTimes -> ue() - // СЕЙЧАС ВРЕМЯ ТРАНСЛЯЦИИ УСТАНАВЛИВАЕТСЯ НЕПРАВИЛЬНО И ПЕРЕВОД ЗАЛАГИВАЕТ - - const streamTime = { - absoluteTime, - currentTime, - }; - - return checkStreamTime(streamTime), streamTime; + if (player?.setVolume) { + player.setVolume(Math.round(volume * 100)); + return true; + } } function videoSeek(video, time) { // * TIME IN MS debug/* default */.Z.log("videoSeek", time); - // const player = getPlayer(); - // if (!player) { - // console.error("player not found") - // return false; - // } - - // const streamTime = getStreamTime(video); - // console.log("videoSeek", video.currentTime - time ) - // const finalTime = streamTime.currentTime - time - // const finalTime = video.currentTime - time; const preTime = getPlayer()?.getProgressState()?.seekableEnd || video.currentTime; const finalTime = preTime - time; // we always throw it to the end of the stream - time video.currentTime = finalTime; - - // return player.seekTo.call(time, true); -} - -function streamToLive() { - // TODO: remove - return getPlayer()?.seekToStreamTime(); } function getSubtitles() { @@ -1839,9 +1793,7 @@ const youtubeUtils = { getSubtitles, getVideoData, setVideoVolume, - getStreamTime, videoSeek, - streamToLive, }; ;// CONCATENATED MODULE: ./src/yandexProtobuf.js @@ -5199,7 +5151,10 @@ class VideoHandler { // Set video volume in 0.00-1.00 format setVideoVolume(volume) { if (this.site.host === "youtube") { - return youtubeUtils.setVideoVolume(volume); + const videoVolume = youtubeUtils.setVideoVolume(volume); + if (videoVolume) { + return; + } } this.video.volume = volume; } @@ -5538,7 +5493,6 @@ class VideoHandler { reqInterval * 1000, ); - // const streamURL = "https://stream.ram.radio/audio/ram.stream_aac/playlist.m3u8"; debug/* default */.Z.log(resOrError.translatedInfo.url); const streamURL = `https://${config/* m3u8ProxyHost */.e6}/?all=yes&origin=${encodeURIComponent( "https://strm.yandex.ru", @@ -5546,9 +5500,7 @@ class VideoHandler { "https://strm.yandex.ru", )}&url=${encodeURIComponent(resOrError.translatedInfo.url)}`; debug/* default */.Z.log(streamURL); - // const timestamp = Date.now(); // get timestamp - debug/* default */.Z.log("Test hls support"); if (this.hls) { this.hls.on(Hls.Events.MEDIA_ATTACHED, function () { debug/* default */.Z.log("audio and hls.js are now bound together !"); @@ -5594,17 +5546,8 @@ class VideoHandler { throw new VOTLocalizedError("audioFormatNotSupported"); } - // const streamTime = youtubeUtils.getStreamTime(this.video) - - // youtubeUtils.videoSeekTo(this.video, streamTime.absoluteTime - (resOrError.translatedInfo.timestamp / 1000)); - - // console.log("video times", this.video.duration, this.video.currentTime); - // console.log("stream times", streamTime.currentTime, streamTime.absoluteTime); - // console.log("trans info times", resOrError.translatedInfo.timestamp); - youtubeUtils.videoSeek(this.video, 10); // 10 is the most successful number for streaming. With it, the audio is not so far behind the original - // TODO: Remove code repetition this.volumeOnStart = this.getVideoVolume(); if (typeof this.data.defaultVolume === "number") { this.audio.volume = this.data.defaultVolume / 100; @@ -5627,7 +5570,6 @@ class VideoHandler { } if (this.video && !this.video.paused) this.lipSync("play"); - // this.audio.play(); videoLipSyncEvents.forEach((e) => this.video.addEventListener(e, this.handleVideoEventBound), ); diff --git a/dist/vot-min.user.js b/dist/vot-min.user.js index 59a03fb1..2f9d21cd 100644 --- a/dist/vot-min.user.js +++ b/dist/vot-min.user.js @@ -120,4 +120,4 @@ // ==/UserScript== /*! For license information please see vot-min.js.LICENSE.txt */ -(()=>{var t={"./node_modules/bowser/es5.js":function(t){t.exports=function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=90)}({17:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n=o(18),i=function(){function t(){}return t.getFirstMatch=function(t,e){var o=e.match(t);return o&&o.length>0&&o[1]||""},t.getSecondMatch=function(t,e){var o=e.match(t);return o&&o.length>1&&o[2]||""},t.matchAndReturnConst=function(t,e,o){if(t.test(e))return o},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,o,n){void 0===n&&(n=!1);var i=t.getVersionPrecision(e),a=t.getVersionPrecision(o),r=Math.max(i,a),s=0,l=t.map([e,o],(function(e){var o=r-t.getVersionPrecision(e),n=e+new Array(o+1).join(".0");return t.map(n.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(n&&(s=r-Math.min(i,a)),r-=1;r>=s;){if(l[0][r]>l[1][r])return 1;if(l[0][r]===l[1][r]){if(r===s)return 0;r-=1}else if(l[0][r]1?i-1:0),r=1;r0){var r=Object.keys(o),l=s.default.find(r,(function(t){return e.isOS(t)}));if(l){var d=this.satisfies(o[l]);if(void 0!==d)return d}var c=s.default.find(r,(function(t){return e.isPlatform(t)}));if(c){var u=this.satisfies(o[c]);if(void 0!==u)return u}}if(a>0){var h=Object.keys(i),p=s.default.find(h,(function(t){return e.isBrowser(t,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var o=this.getBrowserName().toLowerCase(),n=t.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return e&&i&&(n=i.toLowerCase()),n===o},e.compareVersion=function(t){var e=[0],o=t,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(o=t.substr(1),"="===t[1]?(n=!0,o=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?o=t.substr(1):"~"===t[0]&&(n=!0,o=t.substr(1)),e.indexOf(s.default.compareVersions(i,o,n))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=d,t.exports=e.default},92:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=/version\/(\d+(\.?_?\d+)+)/i,r=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},o=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},o=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},o=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},o=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},o=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},o=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},o=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},o=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},o=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},o=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},o=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},o=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return o&&(e.version=o),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},o=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},o=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},o=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},o=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},o=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},o=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},o=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},o=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},o=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},o=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},o=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},o=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e={name:"Android Browser"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(e,t),version:i.default.getSecondMatch(e,t)}}}];e.default=r,t.exports=e.default},93:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/Roku\/DVP/],describe:function(t){var e=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:a.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),o=i.default.getWindowsVersionName(e);return{name:a.OS_MAP.Windows,version:e,versionName:o}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:a.OS_MAP.iOS},o=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return o&&(e.version=o),e}},{test:[/macintosh/i],describe:function(t){var e=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),o=i.default.getMacOSVersionName(e),n={name:a.OS_MAP.MacOS,version:e};return o&&(n.versionName=o),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),o=i.default.getAndroidVersionName(e),n={name:a.OS_MAP.Android,version:e};return o&&(n.versionName=o),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),o={name:a.OS_MAP.WebOS};return e&&e.length&&(o.version=e),o}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:a.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.PlayStation4,version:e}}}];e.default=r,t.exports=e.default},94:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",o={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(o.model=e),o}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),o=t.test(/like (ipod|iphone)/i);return e&&!o},describe:function(t){var e=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];e.default=r,t.exports=e.default},95:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:a.ENGINE_MAP.Blink};var e=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:a.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:a.ENGINE_MAP.Trident},o=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:a.ENGINE_MAP.Presto},o=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=t.test(/gecko/i),o=t.test(/like gecko/i);return e&&!o},describe:function(t){var e={name:a.ENGINE_MAP.Gecko},o=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:a.ENGINE_MAP.WebKit},o=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}}];e.default=r,t.exports=e.default}})},"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss":(t,e,o)=>{"use strict";o.d(e,{Z:()=>s});var n=o("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=o.n(n),a=o("./node_modules/css-loader/dist/runtime/api.js"),r=o.n(a)()(i());r.push([t.id,'.vot-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:none;border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-ontheme));background-color:rgb(var(--vot-helper-theme));box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer;transition:box-shadow .2s}.vot-button[hidden]{display:none !important}.vot-button::-moz-focus-inner{border:none}.vot-button::before,.vot-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-button::before{background-color:rgb(var(--vot-helper-ontheme));transition:opacity .2s}.vot-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-button:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.vot-button:hover::before{opacity:.08}.vot-button:active{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.vot-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s}.vot-button:disabled{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.12);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);box-shadow:none;cursor:initial}.vot-button:disabled::before,.vot-button:disabled::after{opacity:0}.vot-outlined-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:solid 1px;border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.24);border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:34px;outline:none;cursor:pointer}.vot-outlined-button[hidden]{display:none !important}.vot-outlined-button::-moz-focus-inner{border:none}.vot-outlined-button::before,.vot-outlined-button::after{content:"";position:absolute;border-radius:3px;top:0;right:0;bottom:0;left:0;opacity:0}.vot-outlined-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-outlined-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-outlined-button:hover::before{opacity:.04}.vot-outlined-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-outlined-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-outlined-button:disabled::before,.vot-outlined-button:disabled::after{opacity:0}.vot-text-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:4px;padding:0 8px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-text-button[hidden]{display:none !important}.vot-text-button::-moz-focus-inner{border:none}.vot-text-button::before,.vot-text-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-text-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-text-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-text-button:hover::before{opacity:.04}.vot-text-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-text-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-text-button:disabled::before,.vot-text-button:disabled::after{opacity:0}.vot-icon-button{--vot-helper-onsurface: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:50%;padding:0;width:36px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;fill:var(--vot-helper-onsurface);color:var(--vot-helper-onsurface);background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-icon-button[hidden]{display:none !important}.vot-icon-button::-moz-focus-inner{border:none}.vot-icon-button::before,.vot-icon-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-icon-button::before{background-color:var(--vot-helper-onsurface);transition:opacity .2s}.vot-icon-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity .3s,background-size .4s}.vot-icon-button:hover::before{opacity:.04}.vot-icon-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s,opacity 0s}.vot-icon-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);fill:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-icon-button:disabled::before,.vot-icon-button:disabled::after{opacity:0}.vot-icon-button svg{width:fit-content}.vot-textfield{--vot-helper-theme: rgb( var(--vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243)) ) !important;--vot-helper-safari1: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.38 ) !important;--vot-helper-safari2: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari3: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;position:relative !important;display:inline-block;padding-top:6px !important;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-textfield[hidden]{display:none !important}.vot-textfield>input,.vot-textfield>textarea{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:0 !important;border-style:solid !important;border-width:1px !important;border-color:rgba(0,0,0,0) var(--vot-helper-safari2) var(--vot-helper-safari2) !important;border-radius:4px !important;padding:15px 13px 15px !important;width:100% !important;height:inherit !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;-webkit-text-fill-color:currentColor !important;background-color:rgba(0,0,0,0) !important;box-shadow:inset 1px 0 rgba(0,0,0,0),inset -1px 0 rgba(0,0,0,0),inset 0 -1px rgba(0,0,0,0) !important;font-family:inherit !important;font-size:inherit !important;line-height:inherit !important;caret-color:var(--vot-helper-theme) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input:not(:focus):placeholder-shown,.vot-textfield>textarea:not(:focus):placeholder-shown{border-top-color:var(--vot-helper-safari2) !important}.vot-textfield>input+span,.vot-textfield>textarea+span{position:absolute !important;top:0 !important;left:0 !important;display:flex !important;width:100% !important;max-height:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;font-size:75% !important;line-height:15px !important;cursor:text !important;transition:color .2s,font-size .2s,line-height .2s !important;pointer-events:none !important}.vot-textfield>input:not(:focus):placeholder-shown+span,.vot-textfield>textarea:not(:focus):placeholder-shown+span{font-size:inherit !important;line-height:68px !important}.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{content:"" !important;display:block !important;-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin-top:6px !important;border-top:solid 1px var(--vot-helper-safari2) !important;min-width:10px !important;height:8px !important;pointer-events:none !important;box-shadow:inset 0 1px rgba(0,0,0,0) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input+span::before,.vot-textfield>textarea+span::before{margin-right:4px !important;border-left:solid 1px rgba(0,0,0,0) !important;border-radius:4px 0 !important}.vot-textfield>input+span::after,.vot-textfield>textarea+span::after{flex-grow:1 !important;margin-left:4px !important;border-right:solid 1px rgba(0,0,0,0) !important;border-radius:0 4px !important}.vot-textfield>input:not(:focus):placeholder-shown+span::before,.vot-textfield>input:not(:focus):placeholder-shown+span::after,.vot-textfield>textarea:not(:focus):placeholder-shown+span::before,.vot-textfield>textarea:not(:focus):placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}.vot-textfield:hover>input,.vot-textfield:hover>textarea{border-color:rgba(0,0,0,0) var(--vot-helper-safari3) var(--vot-helper-safari3) !important}.vot-textfield:hover>input+span::before,.vot-textfield:hover>input+span::after,.vot-textfield:hover>textarea+span::before,.vot-textfield:hover>textarea+span::after{border-top-color:var(--vot-helper-safari3) !important}.vot-textfield:hover>input:not(:focus):placeholder-shown,.vot-textfield:hover>textarea:not(:focus):placeholder-shown{border-color:var(--vot-helper-safari3) !important}.vot-textfield>input:focus,.vot-textfield>textarea:focus{border-color:rgba(0,0,0,0) var(--vot-helper-theme) var(--vot-helper-theme) !important;box-shadow:inset 1px 0 var(--vot-helper-theme),inset -1px 0 var(--vot-helper-theme),inset 0 -1px var(--vot-helper-theme) !important;outline:none !important}.vot-textfield>input:focus+span,.vot-textfield>textarea:focus+span{color:var(--vot-helper-theme) !important}.vot-textfield>input:focus+span::before,.vot-textfield>input:focus+span::after,.vot-textfield>textarea:focus+span::before,.vot-textfield>textarea:focus+span::after{border-top-color:var(--vot-helper-theme) !important;box-shadow:inset 0 1px var(--vot-helper-theme) !important}.vot-textfield>input:disabled,.vot-textfield>input:disabled+span,.vot-textfield>textarea:disabled,.vot-textfield>textarea:disabled+span{border-color:rgba(0,0,0,0) var(--vot-helper-safari1) var(--vot-helper-safari1) !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;pointer-events:none !important}.vot-textfield>input:disabled+span::before,.vot-textfield>input:disabled+span::after,.vot-textfield>textarea:disabled+span::before,.vot-textfield>textarea:disabled+span::after{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown,.vot-textfield>input:disabled:placeholder-shown+span,.vot-textfield>textarea:disabled:placeholder-shown,.vot-textfield>textarea:disabled:placeholder-shown+span{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown+span::before,.vot-textfield>input:disabled:placeholder-shown+span::after,.vot-textfield>textarea:disabled:placeholder-shown+span::before,.vot-textfield>textarea:disabled:placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}@media not all and (min-resolution: 0.001dpcm){@supports(-webkit-appearance: none){.vot-textfield>input,.vot-textfield>input+span,.vot-textfield>textarea,.vot-textfield>textarea+span,.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{transition-duration:.1s !important}}}.vot-checkbox{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );z-index:0;position:relative;display:inline-block;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-checkbox[hidden]{display:none !important}.vot-checkbox>input{appearance:none;-moz-appearance:none;-webkit-appearance:none;z-index:1;position:absolute;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:3px 1px;border:solid 2px;background:rgba(0,0,0,0);border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6);border-radius:2px;width:18px;height:18px;outline:none;cursor:pointer;transition:border-color .2s,background-color .2s}.vot-checkbox>input+span{display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding-left:30px;width:inherit;cursor:pointer}.vot-checkbox>input+span::before{content:"";position:absolute;left:-10px;top:-8px;display:block;border-radius:50%;width:40px;height:40px;background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0));opacity:0;transform:scale(1);pointer-events:none;transition:opacity .3s,transform .2s}.vot-checkbox>input+span::after{content:"";z-index:1;display:block;position:absolute;top:3px;left:1px;-webkit-box-sizing:content-box !important;-moz-box-sizing:content-box !important;box-sizing:content-box !important;width:10px;height:5px;border:solid 2px rgba(0,0,0,0);border-right-width:0;border-top-width:0;pointer-events:none;transform:translate(3px, 4px) rotate(-45deg);transition:border-color .2s}.vot-checkbox>input:checked,.vot-checkbox>input:indeterminate{border-color:rgb(var(--vot-helper-theme));background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::before,.vot-checkbox>input:indeterminate+span::before{background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::after,.vot-checkbox>input:indeterminate+span::after{border-color:rgb(var(--vot-helper-ontheme, 255, 255, 255))}.vot-checkbox>input:indeterminate+span::after{border-left-width:0;transform:translate(4px, 3px)}.vot-checkbox:hover>input+span::before{opacity:.04}.vot-checkbox:active>input,.vot-checkbox:active:hover>input{border-color:rgb(var(--vot-helper-theme))}.vot-checkbox:active>input:checked{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6)}.vot-checkbox:active>input+span::before{opacity:1;transform:scale(0);transition:transform 0s,opacity 0s}.vot-checkbox>input:disabled{border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled:checked,.vot-checkbox>input:disabled:indeterminate{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38)}.vot-checkbox>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled+span::before{opacity:0;transform:scale(0)}.vot-slider{--vot-safari-helper1: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.04 ) !important;--vot-safari-helper2: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.12 ) !important;--vot-safari-helper3: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.16 ) !important;--vot-safari-helper4: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.24 ) !important;display:inline-block;width:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;font-family:var(--vot-font, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-slider[hidden]{display:none !important}.vot-slider>input{-webkit-appearance:none !important;appearance:none !important;position:relative !important;top:24px !important;display:block !important;margin:0 0 -36px !important;width:100% !important;height:36px !important;background-color:rgba(0,0,0,0) !important;cursor:pointer !important}.vot-slider>input:last-child{position:static !important;margin:0 !important}.vot-slider>span{display:inline-block !important;margin-bottom:36px !important}.vot-slider>input:disabled{cursor:default !important;opacity:.38 !important}.vot-slider>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input::-webkit-slider-runnable-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-webkit-slider-thumb{margin:0 !important;appearance:none !important;-webkit-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper1) !important}.vot-slider>input:active::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper4) !important}.vot-slider>input:disabled::-webkit-slider-runnable-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-webkit-slider-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;color:rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-range-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-moz-range-thumb{appearance:none !important;-moz-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider>input::-moz-range-progress{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider:hover>input:hover::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-moz-range-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-moz-range-progress{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important}.vot-slider>input:disabled::-moz-range-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-focus-outer{border:none !important}.vot-slider>input::-ms-track{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:17px 0 !important;border:none !important;border-radius:1px !important;padding:0 17px !important;width:100% !important;height:2px !important;background-color:rgba(0,0,0,0) !important}.vot-slider>input::-ms-fill-lower{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider>input::-ms-fill-upper{border-radius:1px !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-ms-thumb{appearance:none !important;margin:0 17px !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-ms-fill-lower{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-ms-fill-upper{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;opacity:.38 !important}.vot-slider>input:disabled::-ms-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::before{content:"" !important;display:block !important;position:absolute !important;width:calc(100%*var(--vot-progress, 0)) !important;height:2px !important;top:calc(50% - 1px) !important;background:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0) !important;--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87) !important;--vot-helper-safari1: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari2: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;display:flex;align-items:center;justify-content:space-between;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;line-height:1.5;text-align:start;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-select[hidden]{display:none !important}.vot-select-label{font-size:16px}.vot-select-outer{display:flex;align-items:center;justify-content:space-between;max-width:120px;width:120px;padding:0 5px;border-style:solid !important;border-width:1px !important;border-color:var(--vot-helper-safari1) !important;border-radius:4px !important;cursor:pointer;transition:border .2s !important}.vot-select-outer:hover{border-color:var(--vot-helper-safari2) !important}.vot-select-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vot-select-arrow-icon{width:20px;height:32px;display:flex;justify-content:center;align-items:center}.vot-select-content-list{display:flex;flex-direction:column}.vot-select-content-list .vot-select-content-item{padding:5px 10px;border-radius:8px;cursor:pointer}.vot-select-content-list .vot-select-content-item:not([inert]):hover{background-color:#2a2c31}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]{color:rgb(var(--vot-primary-rgb, 33, 150, 243));background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.2)}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]:hover{background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.1) !important}.vot-select-content-list .vot-select-content-item[data-vot-disabled=true]{cursor:default}.vot-select-content-list .vot-select-content-item[hidden]{display:none !important}.vot-header{color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-weight:bold;line-height:1.5;text-align:start}.vot-header[hidden]{display:none !important}.vot-header:not(:first-child){padding-top:8px}.vot-header-level-1{font-size:2em}.vot-header-level-2{font-size:1.5em}.vot-header-level-3{font-size:1.17em}.vot-header-level-4{font-size:1em}.vot-header-level-5{font-size:.83em}.vot-header-level-6{font-size:.67em}.vot-info{display:flex;color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-info[hidden]{display:none !important}.vot-info>:not(:first-child){color:rgba(var(--vot-helper-onsurface-rgb), 0.5);flex:1;margin-left:8px}.vot-lang-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);display:flex;align-items:center;justify-content:space-between;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-lang-select[hidden]{display:none !important}.vot-lang-select-icon{width:32px;height:32px;display:flex;justify-content:center;align-items:center}.vot-segmented-button{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:5rem;transform:translate(-50%);user-select:none;display:flex;align-items:center;height:32px;max-width:100vw;background:rgb(var(--vot-surface-rgb, 255, 255, 255));color:var(--vot-helper-theme);fill:var(--vot-helper-theme);border-radius:4px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;cursor:default;transition:opacity .5s;z-index:100}.vot-segmented-button[hidden]{display:none !important}.vot-segmented-button *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-segmented-button .vot-separator{width:1px;height:50%;background:rgba(var(--vot-helper-theme-rgb), 0.1)}.vot-segmented-button .vot-separator[hidden]{display:none !important}.vot-segmented-button .vot-segment,.vot-segmented-button .vot-segment-only-icon{position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;height:100%;padding:0 8px;background-color:rgba(0,0,0,0);color:inherit;transition:background-color 100ms ease-in-out;border:none}.vot-segmented-button .vot-segment[hidden],.vot-segmented-button [hidden].vot-segment-only-icon{display:none !important}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before,.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before{background-color:rgb(var(--vot-helper-theme-rgb));transition:opacity .2s}.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-segmented-button .vot-segment:hover::before,.vot-segmented-button .vot-segment-only-icon:hover::before{opacity:.04}.vot-segmented-button .vot-segment:active::after,.vot-segmented-button .vot-segment-only-icon:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-segmented-button .vot-segment-only-icon{min-width:32px;padding:0}.vot-segmented-button .vot-segment-label{margin-left:8px;white-space:nowrap}.vot-segmented-button[data-status=success] .vot-translate-button{color:rgb(var(--vot-primary-rgb, 33, 150, 243));fill:rgb(var(--vot-primary-rgb, 33, 150, 243))}.vot-segmented-button[data-status=error] .vot-translate-button{color:#f28b82;fill:#f28b82}.vot-segmented-button svg{width:fit-content}.vot-menu{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:calc(5rem + 32px + 16px);user-select:none;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);border-radius:8px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;min-width:300px;cursor:default;z-index:100;visibility:visible;opacity:1;transform-origin:top;transform:translate(-50%) scale(1);transition:opacity .3s,transform .1s}.vot-menu *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-menu[hidden]{pointer-events:none;display:block !important;pointer-events:none;visibility:hidden;opacity:0;transform:translate(-50%) scale(0)}.vot-menu-content-wrapper{display:flex;flex-direction:column;min-height:100px;max-height:calc(var(--vot-container-height, 75vh) - (5rem + 32px + 16px)*2);overflow:auto}.vot-menu-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-menu-header-container:empty{padding:0 0 16px 0}.vot-menu-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-menu-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0;text-align:start}.vot-menu-title{flex:1;font-size:16px;line-height:1;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 16px;gap:8px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar,.vot-menu-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-menu-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-footer-container:empty{padding:16px 0 0 0}.vot-dialog-container{visibility:visible;position:absolute;z-index:10000}.vot-dialog-container[hidden]{display:block !important;pointer-events:none;visibility:hidden}.vot-dialog-container *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-dialog-backdrop{background-color:rgba(0,0,0,.6);position:fixed;top:0;right:0;bottom:0;left:0;opacity:1;transition:opacity .3s}[hidden]>.vot-dialog-backdrop{pointer-events:none;opacity:0}.vot-dialog{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);display:block;position:fixed;top:50%;bottom:50%;max-width:initial;max-height:initial;width:min(var(--vot-dialog-width, 512px),100%);height:fit-content;inset-inline-start:0px;inset-inline-end:0px;inset-block-start:0px;inset-block-end:0px;border-radius:8px;margin:auto;padding:0;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);box-shadow:0 0 16px rgba(0,0,0,.12),0 16px 16px rgba(0,0,0,.24);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;user-select:none;visibility:visible;overflow:auto;overflow-y:hidden;opacity:1;transform-origin:center;transform:scale(1);transition:opacity .3s,transform .1s}[hidden]>.vot-dialog{pointer-events:none;opacity:0;transform:scale(0.5);transition:opacity .1s,transform .2s}.vot-dialog-content-wrapper{display:flex;flex-direction:column;max-height:75vh;overflow:auto}.vot-dialog-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-dialog-header-container:empty{padding:0 0 20px 0}.vot-dialog-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-dialog-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0}.vot-dialog-title{flex:1;font-size:115.3846153846%;font-weight:bold;line-height:1;padding-bottom:16px;padding-inline-end:20px;padding-inline-start:20px;padding-top:20px}.vot-dialog-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 20px;gap:16px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar,.vot-dialog-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-dialog-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-dialog-footer-container:empty{padding:20px 0 0 0}.vot-subtitles-widget{display:flex;justify-content:center;align-items:center;position:absolute;width:50%;max-height:100%;min-height:20%;z-index:100;left:25%;top:75%;pointer-events:none}.vot-subtitles{position:relative;max-width:100%;max-height:100%;width:max-content;background:var(--vot-subtitles-background, rgba(46, 47, 52, 0.8));color:var(--vot-subtitles-color, rgb(227, 227, 227));border-radius:1rem;pointer-events:all;padding:1rem;font-size:2rem;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vot-subtitles .passed{color:var(--vot-subtitles-passed-color, rgb(33, 150, 243))}:root{--vot-font-family: "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system;--vot-primary-rgb: 139, 180, 245;--vot-onprimary-rgb: 32, 33, 36;--vot-surface-rgb: 32, 33, 36;--vot-onsurface-rgb: 227, 227, 227;--vot-subtitles-background: rgba(var(--vot-surface-rgb, 46, 47, 52), 0.8);--vot-subtitles-color: rgb(var(--vot-onsurface-rgb, 227, 227, 227));--vot-subtitles-passed-color: rgb(var(--vot-primary-rgb, 33, 150, 243))}vot-block{display:block}',""]);const s=r},"./node_modules/css-loader/dist/runtime/api.js":t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,i,a){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var s=0;s0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js":t=>{"use strict";t.exports=function(t){return t[1]}},"./node_modules/requestidlecallback-polyfill/index.js":()=>{window.requestIdleCallback=window.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)},window.cancelIdleCallback=window.cancelIdleCallback||function(t){clearTimeout(t)}},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},"./node_modules/style-loader/dist/runtime/insertStyleElement.js":t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":(t,e,o)=>{"use strict";t.exports=function(t){var e=o.nc;e&&t.setAttribute("nonce",e)}},"./node_modules/style-loader/dist/runtime/styleDomAPI.js":t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(o){!function(t,e,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,i&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,o)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},"./node_modules/style-loader/dist/runtime/styleTagTransform.js":t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},"./src/config/config.js":(t,e,o)=>{"use strict";o.d(e,{EY:()=>d,I1:()=>a,Rr:()=>r,e6:()=>i,iF:()=>n,jm:()=>c,kF:()=>l,rm:()=>u,sN:()=>s});const n="api.browser.yandex.ru",i="m3u8proxy.toil-dump.workers.dev",a="xtGCyGdTY2Jy6OMEKdTuXev3Twhkamgm",r="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 YaBrowser/23.7.1.1140 Yowser/2.5 Safari/537.36",s=.15,l="yandex",d="yandex",c={yandex:"https://translate.toil.cc/detect",rustServer:"https://rust-server-531j.onrender.com/detect"},u={yandex:"https://translate.toil.cc/translate"}},"./src/utils/debug.js":(t,e,o)=>{"use strict";o.d(e,{Z:()=>n});const n={log:(...t)=>{}}},"./src/yandexRequest.js":(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>a});var n=o("./src/config/config.js"),i=o("./src/utils/debug.js");const a=async function(t,e,o,a){try{i.Z.log("yandexRequest:",t);const r={url:`https://${n.iF}${t}`,method:"POST",headers:{Accept:"application/x-protobuf","Accept-Language":"en","Content-Type":"application/x-protobuf","User-Agent":n.Rr,Pragma:"no-cache","Cache-Control":"no-cache","Sec-Fetch-Mode":"no-cors","sec-ch-ua":null,"sec-ch-ua-mobile":null,"sec-ch-ua-platform":null,...o},binary:!0,data:new Blob([e]),responseType:"arraybuffer"};GM_xmlhttpRequest({...r,onload:t=>{i.Z.log("yandexRequest:",t.status,t),a(200===t.status,t.response)},onerror:t=>{console.error("[VOT]",t),a(!1)}})}catch(t){console.error("[VOT]",t),a(!1)}}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,exports:{}};return t[n].call(a.exports,a,a.exports,o),a.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nc=void 0,(()=>{"use strict";var t=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),e=o.n(t),n=o("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),i=o.n(n),a=o("./node_modules/style-loader/dist/runtime/insertBySelector.js"),r=o.n(a),s=o("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),l=o.n(s),d=o("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),c=o.n(d),u=o("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),h=o.n(u),p=o("./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss"),g={};g.styleTagTransform=h(),g.setAttributes=l(),g.insert=r().bind(null,"head"),g.domAPI=i(),g.insertStyleElement=c(),e()(p.Z,g),p.Z&&p.Z.locals&&p.Z.locals;const v=JSON.parse('{"__version__":2,"recommended":"recommended","translateVideo":"Translate video","disableTranslate":"Turn off","translationSettings":"Translation settings","subtitlesSettings":"Subtitles settings","about":"About extension","resetSettings":"Reset settings","videoBeingTranslated":"The video is being translated","videoLanguage":"Video language","translationLanguage":"Translation language","translationTake":"The translation will take","translationTakeMoreThanHour":"The translation will take more than an hour","translationTakeAboutMinute":"The translation will take about a minute","translationTakeFewMinutes":"The translation will take a few minutes","translationTakeApproximatelyMinutes":"The translation will take approximately {0} minutes","translationTakeApproximatelyMinute":"The translation will take approximately {0} minutes","unSupportedExtensionError":"Error! {0} is not supported by this version of the extension!\\n\\nPlease use the cloudflare version of the VOT extension.","requestTranslationFailed":"Failed to request video translation","audioNotReceived":"Audio link not received","grantPermissionToAutoPlay":"Grant permission to autoplay","neededAdditionalExtension":"An additional extension is needed to support this site","audioFormatNotSupported":"The audio format is not supported","VOTAutoTranslate":"Translate on open","VOTDontTranslateYourLang":"Do not translate from my language","VOTVolume":"Video volume","VOTVolumeTranslation":"Translation Volume","VOTAutoSetVolume":"Reduce video volume to ","VOTShowVideoSlider":"Video volume slider","VOTSyncVolume":"Link translation and video volume","VOTAudioProxy":"Proxy received audio","VOTDisableFromYourLang":"You have disabled the translation of the video in your language","VOTLiveNotSupported":"Translation of live streams is not supported","VOTPremiere":"Wait for the premiere to end before translating","VOTVideoIsTooLong":"Video is too long","VOTNoVideoIDFound":"No video ID found","VOTFailedInitDB":"Failed to initialize database","VOTDBNeedUpdate":"The database needs an update, please reload the page","VOTDisabledForDBUpdating":"VOT is disabled due to an error when updating the Database. Close all open tabs with {0} and try again","VOTFailedWriteToDB":"Data could not be written to the database","VOTFailedReadFromDB":"Data could not be retrieved from the database","VOTSubtitles":"Subtitles","VOTSubtitlesDisabled":"Disabled","VOTSubtitlesMaxLength":"Subtitles max length","VOTHighlightWords":"Highlight words","VOTTranslatedFrom":"translated from","VOTAutogenerated":"autogenerated","VOTSettings":"VOT Settings","VOTMenuLanguage":"Menu language","VOTAuthors":"Authors","VOTVersion":"Version","VOTLoader":"Loader","VOTBrowser":"Browser","VOTShowPiPButton":"Show PiP button","langs":{"auto":"Auto","af":"Afrikaans","ak":"Akan","sq":"Albanian","am":"Amharic","ar":"Arabic","hy":"Armenian","as":"Assamese","ay":"Aymara","az":"Azerbaijani","bn":"Bangla","eu":"Basque","be":"Belarusian","bho":"Bhojpuri","bs":"Bosnian","bg":"Bulgarian","my":"Burmese","ca":"Catalan","ceb":"Cebuano","zh":"Chinese","zh-Hans":"Chinese (Simplified)","zh-Hant":"Chinese (Traditional)","co":"Corsican","hr":"Croatian","cs":"Czech","da":"Danish","dv":"Divehi","nl":"Dutch","en":"English","eo":"Esperanto","et":"Estonian","ee":"Ewe","fil":"Filipino","fi":"Finnish","fr":"French","gl":"Galician","lg":"Ganda","ka":"Georgian","de":"German","el":"Greek","gn":"Guarani","gu":"Gujarati","ht":"Haitian Creole","ha":"Hausa","haw":"Hawaiian","iw":"Hebrew","hi":"Hindi","hmn":"Hmong","hu":"Hungarian","is":"Icelandic","ig":"Igbo","id":"Indonesian","ga":"Irish","it":"Italian","ja":"Japanese","jv":"Javanese","kn":"Kannada","kk":"Kazakh","km":"Khmer","rw":"Kinyarwanda","ko":"Korean","kri":"Krio","ku":"Kurdish","ky":"Kyrgyz","lo":"Lao","la":"Latin","lv":"Latvian","ln":"Lingala","lt":"Lithuanian","lb":"Luxembourgish","mk":"Macedonian","mg":"Malagasy","ms":"Malay","ml":"Malayalam","mt":"Maltese","mi":"Māori","mr":"Marathi","mn":"Mongolian","ne":"Nepali","nso":"Northern Sotho","no":"Norwegian","ny":"Nyanja","or":"Odia","om":"Oromo","ps":"Pashto","fa":"Persian","pl":"Polish","pt":"Portuguese","pa":"Punjabi","qu":"Quechua","ro":"Romanian","ru":"Russian","sm":"Samoan","sa":"Sanskrit","gd":"Scottish Gaelic","sr":"Serbian","sn":"Shona","sd":"Sindhi","si":"Sinhala","sk":"Slovak","sl":"Slovenian","so":"Somali","st":"Southern Sotho","es":"Spanish","su":"Sundanese","sw":"Swahili","sv":"Swedish","tg":"Tajik","ta":"Tamil","tt":"Tatar","te":"Telugu","th":"Thai","ti":"Tigrinya","ts":"Tsonga","tr":"Turkish","tk":"Turkmen","uk":"Ukrainian","ur":"Urdu","ug":"Uyghur","uz":"Uzbek","vi":"Vietnamese","cy":"Welsh","fy":"Western Frisian","xh":"Xhosa","yi":"Yiddish","yo":"Yoruba","zu":"Zulu"},"udemyAccessTokenExpired":"Your entered Udemy Access Token has expired","udemyModuleArgsNotFound":"Could not get udemy module data due to the fact that ModuleArgs was not found","VOTTranslationHelpNull":"Could not get the data required for the translate","enterUdemyAccessToken":"Enter Udemy Access Token","VOTUdemyData":"Udemy Data","streamNoConnectionToServer":"There is no connection to the server","VOTCloudflareDoesntSupportStreams":"The Cloudflare version of the script does not support stream translation","searchField":"Search...","VOTTranslateAPIErrors":"Translate errors from the API","VOTTranslationService":"Translation Service","VOTDetectService":"Detect Service","VOTTranslatingError":"Translating the error"}');var m=o("./src/utils/debug.js");const b=new class{constructor(){this.gmSupport="function"==typeof GM_getValue,m.Z.log(`GM Storage Status: ${this.gmSupport}`)}syncGet(t,e=void 0,o=!1){if(this.gmSupport)return GM_getValue(t,e);let n=window.localStorage.getItem(t);if("udemyData"===t&&"string"==typeof n)try{n=JSON.parse(n)}catch{n=e}return o?Number(n)??Number(e):n??e}async get(t,e=void 0,o=!1){return this.gmSupport?await GM_getValue(t,e):new Promise((n=>{n(this.syncGet(t,e,o))}))}syncSet(t,e){return this.gmSupport?GM_setValue(t,e):("udemyData"===t&&(e=JSON.stringify(e)),window.localStorage.setItem(t,e))}async set(t,e){return this.gmSupport?await GM_setValue(t,e):new Promise((o=>{o(this.syncSet(t,e))}))}syncDelete(t){return this.gmSupport?GM_deleteValue(t):window.localStorage.removeItem(t)}async delete(t){return this.gmSupport?await GM_deleteValue(t):new Promise((e=>{e(this.syncDelete(t))}))}syncList(){return this.gmSupport?GM_listValues():["autoTranslate","dontTranslateLanguage","dontTranslateYourLang","autoSetVolumeYandexStyle","showVideoSlider","syncVolume","subtitlesMaxLength","highlightWords","responseLanguage","defaultVolume","udemyData","audioProxy","showPiPButton","locale-version","locale-lang","locale-phrases"]}async list(){return this.gmSupport?await GM_listValues():new Promise((t=>{t(this.syncList())}))}},f=["auto","en","ru","af","am","ar","az","bg","bn","bs","ca","cs","cy","da","de","el","es","et","eu","fa","fi","fr","gl","hi","hr","hu","hy","id","it","ja","jv","kk","km","kn","ko","lo","mk","ml","mn","ms","mt","my","ne","nl","pa","pl","pt","ro","si","sk","sl","sq","sr","su","sv","sw","tr","uk","ur","uz","vi","zh","zu"],y=new class{lang="en";locale={};gmValues=["locale-phrases","locale-lang","locale-version","locale-lang-override"];constructor(){const t=b.syncGet("locale-lang-override","auto");this.lang=t&&"auto"!==t?t:(navigator.language||navigator.userLanguage)?.substr(0,2)?.toLowerCase()??"en",this.setLocaleFromJsonString(b.syncGet("locale-phrases",""))}reset(){this.gmValues.forEach((t=>b.syncDelete(t)))}async update(t=!1){(t||2!==await b.get("locale-version",0,!0)||await b.get("locale-lang")!==this.lang)&&(m.Z.log("Updating locale..."),await fetch(`https://raw.githubusercontent.com/ilyhalight/voice-over-translation/dev/src/localization/locales/${this.lang}.json`).then((t=>{if(200===t.status)return t.text();throw t.status})).then((async t=>{await b.set("locale-phrases",t),this.setLocaleFromJsonString(t);const e=this.getFromLocale(this.locale,"__version__");"number"==typeof e&&await b.set("locale-version",e),await b.set("locale-lang",this.lang)})).catch((async t=>{console.error("[VOT] [localizationProvider] failed get locale, cause:",t),this.setLocaleFromJsonString(await b.get("locale-phrases",""))})))}setLocaleFromJsonString(t){try{this.locale=JSON.parse(t)??{}}catch(t){console.error("[VOT] [localizationProvider]",t),this.locale={}}}getFromLocale(t,e){const o=e.split(".").reduce(((t,e)=>{if("object"==typeof t&&t)return t[e]}),t);return void 0===o&&console.warn("[VOT] [localizationProvider] locale",t,"doesn't contain key",e),o}getDefault(t){return this.getFromLocale(v,t)??t}get(t){return this.getFromLocale(this.locale,t)??this.getFromLocale(v,t)??t}};class w extends Error{constructor(t){super(y.getDefault(t)),this.name="VOTLocalizedError",this.unlocalizedMessage=t,this.localizedMessage=y.get(t)}}const x=["ru","en","zh","ko","lt","lv","ar","fr","it","es","de","ja"],S=["kk","bn","pt","cs","hi","mr","te","tr","ms","vi","ta","jv","ur","fa","gu","id","uk","da","fi","uz","pl","sv","az","sq","am","hy","af","eu","my","bg","bs","cy","hu","gl","el","zu","kn","ca","km","lo","mk","ml","mt","mn","ne","nl","pa","ro","sr","si","sk","sl","sw","su","hr","et"],T=["ru","en","kk"],k=["Violentmonkey","FireMonkey","Greasemonkey","AdGuard","OrangeMonkey"],V=navigator.language||navigator.userLanguage,M=V?.substr(0,2)?.toLowerCase()??"en";String.prototype.format||(String.prototype.format=function(){var t=arguments;return this.replace(/{(\d+)}/g,(function(e,o){return void 0!==t[o]?t[o]:e}))});const L=t=>new Promise((e=>setTimeout(e,t))),O=(t,e)=>{const o=new URL(window.location.href);switch(t){case"piped":case"invidious":case"youtube":return o.pathname.match(/(?:watch|embed|shorts)\/([^/]+)/)?.[1]||o.searchParams.get("v");case"vk":return o.pathname.match(/^\/video-?[0-9]{8,9}_[0-9]{9}$/)?o.pathname.match(/^\/video-?[0-9]{8,9}_[0-9]{9}$/)[0].slice(1):o.searchParams.get("z")?o.searchParams.get("z").split("/")[0]:!(!o.searchParams.get("oid")||!o.searchParams.get("id"))&&`video-${Math.abs(o.searchParams.get("oid"))}_${o.searchParams.get("id")}`;case"nine_gag":case"9gag":case"gag":return o.pathname.match(/gag\/([^/]+)/)?.[1];case"twitch":if(/^m\.twitch\.tv$/.test(window.location.hostname)){const t=document.head.querySelector('link[rel="canonical"]');return t?.href.match(/videos\/([^/]+)/)?.[0]||o.pathname.slice(1)}if(/^player\.twitch\.tv$/.test(window.location.hostname))return`videos/${o.searchParams.get("video")}`;if(/^clips\.twitch\.tv$/.test(window.location.hostname)){const t=document.querySelector(".tw-link[data-test-selector='stream-info-card-component__stream-avatar-link']");return!!t&&`${t.href.replace("https://www.twitch.tv/","")}/clip/${o.searchParams.get("clip")}`}return o.pathname.match(/([^/]+)\/(?:clip)\/([^/]+)/)?o.pathname.match(/([^/]+)\/(?:clip)\/([^/]+)/)[0]:o.pathname.match(/(?:videos)\/([^/]+)/)?.[0];case"proxytok":return o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];case"tiktok":{let t=o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];if(!t){const o=e.closest(".xgplayer-playing, .tiktok-web-player"),n=o?.closest('div[data-e2e="recommend-list-item-container"]'),i=n?.querySelector('a[data-e2e="video-author-avatar"]');if(o&&i){const e=o.id?.match(/^xgwrapper-[0-9]+-(.*)$/)?.at(1),n=i.href?.match(/.*(@.*)$/)?.at(1);e&&n&&(t=`${n}/video/${e}`)}}return t}case"vimeo":return o.pathname.match(/[^/]+\/[^/]+$/)?.[0]||o.pathname.match(/[^/]+$/)?.[0];case"xvideos":return o.pathname.match(/[^/]+\/[^/]+$/)?.[0];case"pornhub":return o.searchParams.get("viewkey")||o.pathname.match(/embed\/([^/]+)/)?.[1];case"twitter":return o.pathname.match(/status\/([^/]+)/)?.[1];case"udemy":case"rumble":return o.pathname;case"facebook":return!!o.searchParams.get("v")&&o.searchParams.get("v");case"rutube":return o.pathname.match(/(?:video|embed)\/([^/]+)/)?.[1];case"coub":return o.pathname.includes("/view")?o.pathname.match(/view\/([^/]+)/)?.[1]:o.pathname.includes("/embed")?o.pathname.match(/embed\/([^/]+)/)?.[1]:document.querySelector(".coub.active")?.dataset?.permalink;case"bilibili":{const t=o.searchParams.get("bvid");if(t)return t;{let t=o.pathname.match(/video\/([^/]+)/)?.[1];return t&&o.search&&null!==o.searchParams.get("p")&&(t+=`/?p=${o.searchParams.get("p")}`),t}}case"mail_ru":if(o.pathname.startsWith("/v/")||o.pathname.startsWith("/mail/"))return o.pathname;if(o.pathname.match(/video\/embed\/([^/]+)/)){const t=document.querySelector(".b-video-controls__mymail-link");return!!t&&t?.href.split("my.mail.ru")?.[1]}return!1;case"bitchute":return o.pathname.match(/video\/([^/]+)/)?.[1];case"coursera":return o.pathname.match(/learn\/([^/]+)\/lecture\/([^/]+)/)?.[0];case"eporner":return o.pathname.match(/video-([^/]+)\/([^/]+)/)?.[0];case"peertube":return o.pathname.match(/\/w\/([^/]+)/)?.[0];case"dailymotion":{const t=Array.from(document.scripts).filter((t=>t.innerText.trim().includes("window.__PLAYER_CONFIG__ = {")));if(!t.length)return!1;try{let e=t[0].innerText.trim().replace("window.__PLAYER_CONFIG__ = ","");e.endsWith("};")&&(e=e.substring(0,e.length-1));const o=JSON.parse(e),n=o.context.embedder??o.context.http_referer;return console.log(n,o),n.match(/\/video\/([^/]+)/)?.[1]}catch(t){return console.error("[VOT]",t),!1}}case"trovo":{if(!o.pathname.startsWith("/s/"))return!1;const t=o.searchParams.get("vid");if(!t)return!1;const e=o.pathname.match(/([^/]+)\/([\d]+)/)?.[0];return!!e&&`${e}?vid=${t}`}case"yandexdisk":return o.pathname.match(/\/i\/([^/]+)/)?.[1];default:return!1}};function E(t){return t.toLowerCase().split(";")[0].trim().split("-")[0].split("_")[0]}function P(){return"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}function C(){return"undefined"!=typeof Hls&&Hls?.isSupported()?new Hls({debug:!1,lowLatencyMode:!0,backBufferLength:90}):void 0}var A=o("./src/config/config.js");const B={async translate(t,e){try{const o=await fetch(A.rm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})}),n=await o.json();if(200!==n.code)throw o.message;return n.text[0]}catch(e){return console.error("Error translating text:",e),t}},async detect(t,e){try{const o=await fetch(A.jm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})}),n=await o.json();if(200!==n.code)throw o.message;return n.lang??"en"}catch(t){return console.error("Error translating text:",t),"en"}}},F={async detect(t){try{const e=await fetch(A.jm.rustServer,{method:"POST",body:t});return await e.text()}catch(t){return console.error("Error getting lang from text:",t),"en"}}};async function _(t,e="",o="ru"){if("yandex"===await b.get("translationService",A.kF)){const n=e&&o?`${e}-${o}`:o;return await B.translate(t,n)}return t}const R=["yandex"],q=["yandex","rust-server"];function z(){return/^m\.youtube\.com$/.test(window.location.hostname)}function D(){return window.location.pathname.startsWith("/shorts/")?z()?document.querySelector("#movie_player"):document.querySelector("#shorts-player"):document.querySelector("#movie_player")}function I(){const t=D();return t?.getPlayerResponse?t?.getPlayerResponse?.call()??null:t?.data?.playerResponse??null}function N(){const t=D();return t?.getVideoData?t?.getVideoData?.call()??null:t?.data?.playerResponse?.videoDetails??null}const j=function(){const t=D();return t?.getVolume?t.getVolume.call()/100:1},$=function(){const t=I();let e=t?.captions?.playerCaptionsTracklistRenderer?.captionTracks??[];return e=e.reduce(((t,e)=>{if("languageCode"in e){const o=e?.languageCode?E(e?.languageCode):void 0,n=e?.url||e?.baseUrl;o&&n&&t.push({source:"youtube",language:o,isAutoGenerated:"asr"===e?.kind,url:`${n.startsWith("http")?n:`${window.location.origin}/${n}`}&fmt=json3`})}return t}),[]),m.Z.log("youtube subtitles:",e),e},H=async function(){const t=D(),e=I(),o=N(),{author:n,title:i}=o??{},{shortDescription:a,isLive:r,isLiveContent:s,isUpcoming:l}=e?.videoDetails??{},d=!(!r&&!l||s);let c=await async function(t,e,o,n){if(!window.location.hostname.includes("m.youtube.com")&&t?.getAudioTrack){const e=t.getAudioTrack(),o=e?.getLanguageInfo();if("und"!==o?.id)return E(o.id.split(".")[0])}const i=e?.captions?.playerCaptionsTracklistRenderer?.captionTracks;if(i?.length){const t=i.find((t=>"asr"===t.kind));if(t&&t.languageCode)return E(t.languageCode)}if(!n||!o)return"en";const a=[n.split("\n").filter((t=>!t.match(/https?:\/\/\S+/))).join("\n").replace(/#\S+/g,"").replace(/[^\p{L}\s]/gu,"").replace(/\s+/g," ").trim().slice(0,250),o].join("");return await async function(t){switch(await b.get("detectService",A.EY)){case"yandex":return await B.detect(t);case"rust-server":return await F.detect(t);default:return"en"}}(a)}(t,e,i,a);x.includes(c)||(c="en");const u={isLive:!!r,isPremiere:d,title:i,description:a,author:n,detectedLanguage:c};return m.Z.log("youtube video data:",u),console.log("[VOT] Detected language: ",u.detectedLanguage),u},Z=function(t){return D()?.setVolume(Math.round(100*t))},U=function(t,e){m.Z.log("videoSeek",e);const o=(D()?.getProgressState()?.seekableEnd||t.currentTime)-e;t.currentTime=o},W=new protobuf.Type("VideoTranslationHelpObject").add(new protobuf.Field("target",1,"string")).add(new protobuf.Field("targetUrl",2,"string")),G=new protobuf.Type("VideoTranslationRequest").add(new protobuf.Field("url",3,"string")).add(new protobuf.Field("deviceId",4,"string")).add(new protobuf.Field("firstRequest",5,"bool")).add(new protobuf.Field("duration",6,"double")).add(new protobuf.Field("unknown2",7,"int32")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("unknown3",9,"int32")).add(new protobuf.Field("unknown4",10,"int32")).add(new protobuf.Field("translationHelp",11,"VideoTranslationHelpObject","repeated")).add(new protobuf.Field("responseLanguage",14,"string")).add(new protobuf.Field("unknown5",15,"int32")),Y=new protobuf.Type("VideoSubtitlesRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")),K=new protobuf.Type("VideoStreamRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")).add(new protobuf.Field("responseLanguage",3,"string")),J=new protobuf.Type("VideoStreamPingRequest").add(new protobuf.Field("pingId",1,"int32")),Q=new protobuf.Type("VideoTranslationResponse").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("duration",2,"double")).add(new protobuf.Field("status",4,"int32")).add(new protobuf.Field("remainingTime",5,"int32")).add(new protobuf.Field("unknown0",6,"int32")).add(new protobuf.Field("unknown1",7,"string")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("message",9,"string")),X=new protobuf.Type("VideoSubtitlesObject").add(new protobuf.Field("language",1,"string")).add(new protobuf.Field("url",2,"string")).add(new protobuf.Field("unknown2",3,"int32")).add(new protobuf.Field("translatedLanguage",4,"string")).add(new protobuf.Field("translatedUrl",5,"string")).add(new protobuf.Field("unknown5",6,"int32")).add(new protobuf.Field("unknown6",7,"int32")),tt=new protobuf.Type("VideoSubtitlesResponse").add(new protobuf.Field("unknown0",1,"int32")).add(new protobuf.Field("subtitles",2,"VideoSubtitlesObject","repeated")),et=new protobuf.Type("VideoStreamObject").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("timestamp",2,"int64")),ot=new protobuf.Type("VideoStreamResponse").add(new protobuf.Field("interval",1,"int32")).add(new protobuf.Field("translatedInfo",2,"VideoStreamObject")).add(new protobuf.Field("pingId",3,"int32")),nt=(new protobuf.Root).define("yandex").add(W).add(G).add(Q).add(Y).add(X).add(tt).add(J).add(K).add(et).add(ot),it=(t,e,o,n,i)=>nt.VideoTranslationRequest.encode({url:t,firstRequest:!0,duration:e,unknown2:1,language:o,unknown3:0,unknown4:0,translationHelp:i,responseLanguage:n,unknown5:0}).finish(),at=t=>nt.VideoTranslationResponse.decode(new Uint8Array(t)),rt=(t,e)=>nt.VideoSubtitlesRequest.encode({url:t,language:e}).finish(),st=t=>nt.VideoSubtitlesResponse.decode(new Uint8Array(t)),lt=t=>nt.VideoStreamPingRequest.encode({pingId:t}).finish(),dt=(t,e,o)=>nt.VideoStreamRequest.encode({url:t,language:e,responseLanguage:o}).finish(),ct=t=>nt.VideoStreamResponse.decode(new Uint8Array(t)),ut=["invidious.snopyta.org","yewtu.be","invidious.kavin.rocks","vid.puffyan.us","invidious.namazso.eu","inv.riverside.rocks","yt.artemislena.eu","invidious.flokinet.to","invidious.esmailelbob.xyz","y.com.sb","invidious.nerdvpn.de","inv.vern.cc","invidious.slipfox.xyz","invidio.xamh.de","invidious.dhusch.de"],ht=["piped.video","piped.tokhmi.xyz","piped.moomoo.me","piped.syncpundit.io","piped.mha.fi","watch.whatever.social","piped.garudalinux.org","efy.piped.pages.dev","watch.leptons.xyz","piped.lunar.icu","yt.dc09.ru","piped.mint.lgbt","il.ax","piped.privacy.com.de","piped.esmailelbob.xyz","piped.projectsegfau.lt","piped.in.projectsegfau.lt","piped.us.projectsegfau.lt","piped.privacydev.net","piped.palveluntarjoaja.eu","piped.smnz.de","piped.adminforge.de","piped.qdi.fi","piped.hostux.net","piped.chauvet.pro","piped.jotoma.de","piped.pfcd.me","piped.frontendfriendly.xyz"];function pt(t){const e=document.createElement("vot-block");return e.classList.add("vot-icon-button"),e.innerHTML=t,e}function gt(t){const e=parseFloat(t.value),o=""===t.min?0:parseFloat(t.min),n=(e-o)/((""===t.max?100:parseFloat(t.max))-o);t.parentElement.setAttribute("style",`--vot-progress: ${n}`)}function vt(t,e="",o=!1){const n=document.createElement("vot-block");n.classList.add("vot-textfield");const i=document.createElement(o?"textarea":"input");i.placeholder=" ",i.value=e;const a=document.createElement("span");return a.innerHTML=t,n.appendChild(i),n.appendChild(a),{container:n,input:i,label:a}}function mt(t){const e=document.createElement("vot-block");e.classList.add("vot-dialog-container"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-dialog-backdrop");const n=document.createElement("vot-block");n.classList.add("vot-dialog");const i=document.createElement("vot-block");i.classList.add("vot-dialog-content-wrapper");const a=document.createElement("vot-block");a.classList.add("vot-dialog-header-container");const r=document.createElement("vot-block");r.classList.add("vot-dialog-body-container");const s=document.createElement("vot-block");s.classList.add("vot-dialog-footer-container");const l=document.createElement("vot-block");l.classList.add("vot-dialog-title-container");const d=pt('');d.classList.add("vot-dialog-close-button"),o.onclick=d.onclick=()=>{e.hidden=!0};const c=document.createElement("vot-block");return c.classList.add("vot-dialog-title"),c.innerHTML=t,e.appendChild(o),e.appendChild(n),n.appendChild(i),i.appendChild(a),i.appendChild(r),i.appendChild(s),a.appendChild(l),a.appendChild(d),l.appendChild(c),{container:e,backdrop:o,dialog:n,contentWrapper:i,headerContainer:a,bodyContainer:r,footerContainer:s,titleContainer:l,closeButton:d,title:c}}function bt(t,e,o,n={}){const i=n.onSelectCb||function(){},a=n.labelElement||"";let r=[];const s=document.createElement("vot-block");s.classList.add("vot-select"),a&&s.appendChild(a);const l=document.createElement("vot-block");l.classList.add("vot-select-outer");const d=document.createElement("span");d.classList.add("vot-select-title"),d.innerText=t,void 0===t&&(d.innerText=o.find((t=>!0===t.selected))?.label);const c=document.createElement("vot-block");return c.classList.add("vot-select-arrow-icon"),c.innerHTML='',l.append(d,c),l.onclick=()=>{const t=mt(e);t.container.classList.add("vot-dialog-temp"),t.container.hidden=!1,document.documentElement.appendChild(t.container);const n=document.createElement("vot-block");n.classList.add("vot-select-content-list");for(const t of o){const e=document.createElement("vot-block");e.classList.add("vot-select-content-item"),e.innerText=t.label,e.dataset.votSelected=t.selected,e.dataset.votValue=t.value,t.disabled&&(e.inert=!0),e.onclick=async a=>{a.target.inert||(n.childNodes.forEach((t=>t.dataset.votSelected=!1)),o.forEach((e=>e.selected=e.value===t.value)),e.dataset.votSelected=!0,d.innerText=t.label,await i(a))},n.appendChild(e)}const a=vt(y.get("searchField"));a.input.oninput=t=>{const e=t.target.value.toLowerCase();Array.from(r).forEach((t=>t.hidden=!t.innerText.toLowerCase().includes(e)))},t.bodyContainer.append(a.container,n),r=n.childNodes,t.backdrop.onclick=t.closeButton.onclick=()=>{t.container.remove(),r=[]}},s.append(l),{container:s,title:d,arrowIcon:c,labelElement:a,setTitle:t=>{d.innerText=t},setSelected:t=>{Array.from(r).filter((t=>!t.inert)).forEach((e=>e.dataset.votSelected=e.dataset.votValue===t)),o.forEach((e=>e.selected=String(e.value)===t))},updateItems:t=>{o=t}}}const ft={createHeader:function(t,e=4){const o=document.createElement("vot-block");return o.classList.add("vot-header"),o.classList.add(`vot-header-level-${e}`),o.innerHTML=t,o},createInformation:function(t,e){const o=document.createElement("vot-block");o.classList.add("vot-info");const n=document.createElement("vot-block");n.innerHTML=t;const i=document.createElement("vot-block");return i.innerHTML=e,o.appendChild(n),o.appendChild(i),{container:o,header:n,value:i}},createButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-button"),e.innerHTML=t,e},createTextButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-text-button"),e.innerHTML=t,e},createOutlinedButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-outlined-button"),e.innerHTML=t,e},createIconButton:pt,createCheckbox:function(t,e=!1){const o=document.createElement("label");o.classList.add("vot-checkbox");const n=document.createElement("input");n.type="checkbox",n.checked=Boolean(e);const i=document.createElement("span");return i.innerHTML=t,o.appendChild(n),o.appendChild(i),{container:o,input:n,label:i}},createSlider:function(t,e=50,o=0,n=100){const i=document.createElement("vot-block");i.classList.add("vot-slider");const a=document.createElement("input");a.type="range",a.min=o,a.max=n,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),a.addEventListener("input",(t=>gt(t.target))),gt(a),{container:i,input:a,label:r}},createTextfield:vt,createDialog:mt,createVOTButton:function(t){const e=document.createElement("vot-block");e.classList.add("vot-segmented-button");const o=document.createElement("vot-block");o.classList.add("vot-segment"),o.classList.add("vot-translate-button"),o.innerHTML='';const n=document.createElement("vot-block");n.classList.add("vot-separator");const i=document.createElement("vot-block");i.classList.add("vot-segment-only-icon"),i.innerHTML='';const a=document.createElement("vot-block");a.classList.add("vot-separator");const r=document.createElement("vot-block");r.classList.add("vot-segment-only-icon"),r.innerHTML='';const s=document.createElement("span");return s.classList.add("vot-segment-label"),s.innerHTML=t,e.appendChild(o),e.appendChild(n),e.appendChild(i),e.appendChild(a),e.appendChild(r),o.appendChild(s),{container:e,translateButton:o,separator:n,pipButton:i,separator2:a,menuButton:r,label:s}},createVOTMenu:function(t){const e=document.createElement("vot-block");e.classList.add("vot-menu"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-menu-content-wrapper");const n=document.createElement("vot-block");n.classList.add("vot-menu-header-container");const i=document.createElement("vot-block");i.classList.add("vot-menu-body-container");const a=document.createElement("vot-block");a.classList.add("vot-menu-footer-container");const r=document.createElement("vot-block");r.classList.add("vot-menu-title-container");const s=document.createElement("vot-block");return s.classList.add("vot-menu-title"),s.innerHTML=t,e.appendChild(o),o.appendChild(n),o.appendChild(i),o.appendChild(a),n.appendChild(r),r.appendChild(s),{container:e,contentWrapper:o,headerContainer:n,bodyContainer:i,footerContainer:a,titleContainer:r,title:s}},createVOTSelectLabel:function(t){const e=document.createElement("span");return e.classList.add("vot-select-label"),e.innerText=t,e},createVOTSelect:bt,createVOTLanguageSelect:function(t){const e=t.fromTitle||"#UNDEFINED",o=t.fromDialogTitle||"#UNDEFINED",n=t.fromItems||[],i=t.fromOnSelectCB||function(){},a=t.toTitle||"#UNDEFINED",r=t.toDialogTitle||"#UNDEFINED",s=t.toItems||[],l=t.toOnSelectCB||function(){},d=document.createElement("vot-block");d.classList.add("vot-lang-select");const c=bt(e,o,n,{onSelectCb:i}),u=document.createElement("vot-block");u.classList.add("vot-lang-select-icon"),u.innerHTML='';const h=bt(a,r,s,{onSelectCb:l});return d.append(c.container,u,h.container),{container:d,fromSelect:c,icon:u,toSelect:h}},updateSlider:gt};function yt(t,e,o,n){let i=e;return e>n?(i=o+(e-n),i=i>100?100:Math.max(i,0),t.volume=i/100):e100?100:Math.max(i,0),t.volume=i/100),i}var wt=o("./node_modules/bowser/es5.js");function xt(t){const e=([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)));return t?e:e.toUpperCase()}async function St(t){const e=new TextEncoder("utf-8"),o=await window.crypto.subtle.importKey("raw",e.encode(A.I1),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),n=await window.crypto.subtle.sign("HMAC",o,t);return Array.from(new Uint8Array(n),(t=>t.toString(16).padStart(2,"0"))).join("")}function Tt(t){const e=t.startMs+t.durationMs;return t.tokens.reduce(((o,n,i)=>{const a=t.tokens[i+1],r=o[o.length-1],s=r?.alignRange?.end??0,l=s+n.text.length;if(o.push(Object.assign(Object.assign({},n),{alignRange:{start:s,end:l}})),a){const t=n.startMs+n.durationMs,i=a.startMs?a.startMs-t:e-t;o.push({text:" ",startMs:t,durationMs:i,alignRange:{start:l,end:l+1}})}return o}),[])}function kt(t,e){const o=t.text.split(new RegExp("([\n \t])")).reduce(((t,o)=>{if(o.length){const n=t[t.length-1]??e,i=n?.alignRange?.end??0,a=i+o.length;t.push({text:o,alignRange:{start:i,end:a}})}return t}),[]),n=Math.floor(t.durationMs/o.length),i=t.startMs+t.durationMs;return o.map(((e,a)=>{const r=a===o.length-1,s=t.startMs+n*a,l=r?i-s:n;return Object.assign(Object.assign({},e),{startMs:s,durationMs:l})}))}class Vt{dragging=!1;subtitlesContainerRect=null;containerRect=null;offsetX=null;offsetY=null;lastContent=null;highlightWords=!1;subtitles=null;maxLength=300;maxLengthRegexp=/.{1,300}(?:\s|$)/g;constructor(t,e,o){this.site=o,this.video=t,"youtube"===this.site.host&&"mobile"!==this.site.additionalData?this.container=e.parentElement:this.container=e,this.votSubtitlesContainer=document.createElement("vot-block"),this.votSubtitlesContainer.classList.add("vot-subtitles-widget"),this.container.appendChild(this.votSubtitlesContainer),this.onMouseDownBound=this.onMouseDown.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),this.onMouseMoveBound=this.onMouseMove.bind(this),this.onTimeUpdateBound=this.onTimeUpdate.bind(this),document.addEventListener("mousedown",this.onMouseDownBound),document.addEventListener("mouseup",this.onMouseUpBound),document.addEventListener("mousemove",this.onMouseMoveBound),this.video?.addEventListener("timeupdate",this.onTimeUpdateBound)}release(){this.video?.removeEventListener("timeupdate",this.onTimeUpdateBound),document.removeEventListener("mousedown",this.onMouseDownBound),document.removeEventListener("mouseup",this.onMouseUpBound),document.removeEventListener("mousemove",this.onMouseMoveBound),this.votSubtitlesContainer.remove()}onMouseDown(t){this.votSubtitlesContainer.contains(t.target)&&(this.subtitlesContainerRect=this.votSubtitlesContainer.getBoundingClientRect(),this.containerRect=this.container.getBoundingClientRect(),this.offsetX=t.clientX-this.subtitlesContainerRect.x,this.offsetY=t.clientY-this.subtitlesContainerRect.y,this.dragging=!0)}onMouseUp(){this.dragging=!1}onMouseMove(t){if(this.dragging){t.preventDefault();const e=t.clientX-this.offsetX,o=t.clientY-this.offsetY,n=o>=this.containerRect.top,i=o+this.subtitlesContainerRect.height<=this.containerRect.bottom,a=e>=this.containerRect.left,r=e+this.subtitlesContainerRect.width<=this.containerRect.right;this.votSubtitlesContainer.style.top=n&&i?o-this.containerRect.y+"px":n?this.containerRect.height-this.subtitlesContainerRect.height+"px":"0px",this.votSubtitlesContainer.style.left=a&&r?e-this.containerRect.x+"px":a?this.containerRect.width-this.subtitlesContainerRect.width+"px":"0px"}}onTimeUpdate(){this.update()}setContent(t){t&&this.video?(this.subtitles=t,this.update()):(this.subtitles=null,this.votSubtitlesContainer.innerHTML="")}setMaxLength(t){"number"==typeof t&&t&&(this.maxLength=t,this.maxLengthRegexp=new RegExp(`.{1,${t}}(?:\\s|$)`,"g"),this.update())}setHighlightWords(t){this.highlightWords!==!!t&&(this.highlightWords=!!t,this.update())}update(){if(!this.video)return;let t="",e=this.highlightWords&&this.subtitles?.containsTokens;const o=1e3*this.video.currentTime,n=this.subtitles?.subtitles?.findLast((t=>t.startMsthis.maxLength){let t=[],n=0,i=0,a=0;for(let o=0;othis.maxLength){let r=e.slice(n,i+1);r.at(0)&&" "===r.at(0).text&&(r=r.slice(1)),r.at(-1)&&" "===r.at(-1).text&&(r=r.slice(0,r.length-1)),t.push({startMs:e[n].startMs,durationMs:e[i].startMs+e[i].durationMs-e[n].startMs,tokens:r}),n=o,a=0}i=o}for(let n=0;ne||o>n.startMs-100&&e-o<275?'class="passed"':""}>${n.text}`}}else if(n.text.length>this.maxLength){let e=n.text.match(this.maxLengthRegexp),i=n.durationMs/e.length;for(let a=0;a${t.replace("\\n","
")}`:"")}}function Mt(){return Lt()?.player}function Lt(){return document.querySelector("#video_player")}const Ot=async function(t="en"){let e=null;const o=Mt(),{duration:n}=o?.cache_||{},{courseId:i,tracks:a,sources:r}=o?.options_||{},s=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(r),l=await async function(t){const e=await fetch(`https://www.coursera.org/api/onDemandCourses.v1/${t}`),o=await e.json();return o?.elements?.[0]}(i);let d=l?.primaryLanguageCodes?.[0];d=d?E(d):"en",x.includes(d)||(d="en");const c=function(t,e,o){let n=t?.find((t=>E(t.srclang)===e));return n||(n=t?.find((t=>E(t.srclang)===o))||t?.[0]),n?.src}(a,d,t);console.log(`videoURL: ${s}, subtitlesURL: ${c}`),c&&s?e=[{target:"video_file_url",targetUrl:s},{target:"subtitles_file_url",targetUrl:`https://www.coursera.org${c}`}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${s}, subtitlesURL: ${c}`);const u={duration:n,detectedLanguage:d,translationHelp:e};return m.Z.log("coursera video data:",u),console.log("[VOT] Detected language: ",u.detectedLanguage),u},Et="https://www.udemy.com/api-2.0";async function Pt(t){const e=await fetch(`${Et}/courses/${t}/?`+new URLSearchParams({"fields[course]":"locale",use_remote_version:"true",caching_intent:"true"}));return await e.json()}async function Ct(t,e,o){if(!(t.expires+2592e6>(new Date).getTime()&&t.accessToken))return void console.error(y.get("udemyAccessTokenExpired"));const n=`Bearer ${t.accessToken}`,i=await fetch(`${Et}/users/me/subscribed-courses/${e}/lectures/${o}/?`+new URLSearchParams({"fields[lecture]":"asset","fields[asset]":"length,media_sources,captions"}),{headers:{"x-udemy-authorization":n,authorization:n}});return await i.json()}function At(){return Ft()?.player}function Bt(){const t=document.querySelector(".ud-app-loader[data-module-id='course-taking']")?.dataset?.moduleArgs;return t?JSON.parse(t):(console.error(y.get("udemyModuleArgsNotFound")),{})}function Ft(){return document.querySelector(".vjs-v7")}const _t=async function(t,e="en"){let o=null;const n=At();m.Z.log("udemyData",t);const i=Bt();m.Z.log("moduleData: ",i);const a=i.courseId,r=window.location.pathname.match(/learn\/lecture\/([^/]+)/)?.[1];m.Z.log(`CourseId: ${a}, lectureId: ${r}`);const s=await Pt(a);m.Z.log("courseLang Data:",s);const l=await Ct(t,a,r);console.log("lecture Data:",l);let d=s?.locale?.locale;d=d?E(d):"en",x.includes(d)||(d="en");const c=l?.asset?.length||n?.cache_?.duration,u=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(l?.asset?.media_sources)||function(){const t=Ft()?.querySelector("video")?.src;return!t?.startsWith("blob:")&&t}(),h=function(t,e,o){let n=t?.find((t=>E(t.locale_id)===e));return n||(n=t?.find((t=>E(t.locale_id)===o))||t?.[0]),n?.url}(l?.asset?.captions,d,e);console.log(`videoURL: ${u}, subtitlesURL: ${h}`),h&&u?o=[{target:"video_file_url",targetUrl:u},{target:"subtitles_file_url",targetUrl:h}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${u}, subtitlesURL: ${h}`);const p={duration:c,detectedLanguage:d,translationHelp:o};return m.Z.log("udemy video data:",p),console.log("[VOT] Detected language: ",p.detectedLanguage),p};o("./node_modules/requestidlecallback-polyfill/index.js");class Rt{constructor(){this.listeners=new Set}hasListener(t){return this.listeners.has(t)}dispatchToListener(t,...e){try{t(...e)}catch(t){console.error("[VOT]",t)}}addListener(t){if(this.hasListener(t))throw new Error("[VOT] The listener has already been added.");this.listeners.add(t)}removeListener(t){if(!this.hasListener(t))throw new Error("[VOT] The listener has not been added yet.");this.listeners.delete(t)}dispatch(...t){for(const e of Array.from(this.listeners))this.dispatchToListener(e,...t)}}function qt(t){return Array.from(t).map((t=>{const e=[];return t instanceof HTMLVideoElement&&e.push(t),t instanceof HTMLElement&&e.push(...Array.from(t.querySelectorAll("video"))),t?.shadowRoot?.querySelectorAll&&e.push(...Array.from(t.shadowRoot.querySelectorAll("video"))),e})).flat()}const zt=[{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube(-nocookie)?.com$/,selector:"shorts-video #player"},{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube(-nocookie)?.com$/,selector:".player-container"},{host:"youtube",url:"https://youtu.be/",match:/^(www.)?youtube(-nocookie|kids)?.com$/,selector:".html5-video-container:not(#inline-player *)"},{host:"tiktok",url:"https://www.tiktok.com/",match:/^(www.)?tiktok.com$/,selector:null},{host:"proxytok",url:"https://www.tiktok.com/",match:["proxitok.pabloferreiro.es","proxitok.pussthecat.org","tok.habedieeh.re","proxitok.esmailelbob.xyz","proxitok.privacydev.net","tok.artemislena.eu","tok.adminforge.de","tik.hostux.net","tt.vern.cc","cringe.whatever.social","proxitok.lunar.icu","proxitok.privacy.com.de"],selector:".column.has-text-centered"},{additionalData:"mobile",host:"twitch",url:"https://twitch.tv/",match:/^m.twitch.tv$/,selector:"main > div > section > div > div > div"},{host:"twitch",url:"https://twitch.tv/",match:t=>t.host.includes("clips.twitch.tv")||t.host.includes("player.twitch.tv")&&null===t.searchParams.get("channel")||t.host.includes("twitch.tv")&&(t.pathname.startsWith("/videos")||t.pathname.startsWith("/embed")||t.pathname.includes("/clip")),selector:".video-ref"},{host:"xvideos",url:"https://www.xvideos.com/",match:/^www.xvideos.com$/,selector:".video-bg-pic"},{host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:/^[a-z]+.pornhub.com$/,selector:".mainPlayerDiv > .video-element-wrapper-js > div"},{additionalData:"embed",host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:t=>t.host.includes("pornhub.com")&&t.pathname.startsWith("/embed/"),selector:"#player"},{additionalData:"mobile",host:"vk",url:"https://vk.com/video?z=",match:/^m.vk.(com|ru)$/,selector:"vk-video-player",shadowRoot:!0},{host:"vk",url:"https://vk.com/video?z=",match:/^(www.|m.)?vk.(com|ru)$/,selector:".videoplayer_media"},{host:"vimeo",url:"https://vimeo.com/",match:/^(player.)?vimeo.com$/,selector:".player"},{host:"nine_gag",url:"https://9gag.com/gag/",match:/^9gag.com$/,selector:".video-post"},{host:"coub",url:"https://coub.com/view/",match:/^coub.com$/,selector:".viewer__player"},{host:"bitchute",url:"https://www.bitchute.com/video/",match:/^(www.)?bitchute.com$/,selector:".plyr__video-wrapper"},{host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:".video-player > div > div > div:nth-child(2)"},{additionalData:"embed",host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:"#app > div > div"},{host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m|player).bilibili.com$/,selector:".bpx-player-video-wrap"},{additionalData:"old",host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m).bilibili.com$/,selector:null},{host:"twitter",url:"https://twitter.com/i/status/",match:/^twitter.com$/,selector:'div[data-testid="videoComponent"] > div:nth-child(1) > div'},{host:"mail_ru",url:"https://my.mail.ru/",match:/^my.mail.ru$/,selector:"#b-video-wrapper"},{host:"coursera",url:"https://www.coursera.org/",match:/coursera.org$/,selector:"#video_player"},{host:"udemy",url:"https://www.udemy.com",match:/udemy.com$/,selector:'div[data-purpose="curriculum-item-viewer-content"] > section > div > div > div > div:nth-of-type(2)'},{host:"invidious",url:"https://youtu.be/",match:ut,selector:"#player"},{host:"piped",url:"https://youtu.be/",match:ht,selector:".shaka-video-container"},{host:"rumble",url:"https://rumble.com",match:/^rumble.com$/,selector:"#videoPlayer > .videoPlayer-Rumble-cls > div"},{host:"eporner",url:"https://www.eporner.com/",match:/^(www.)?eporner.com$/,selector:".vjs-v7"},{host:"peertube",url:"tube.shanti.cafe",match:["peertube.1312.media","tube.shanti.cafe","bee-tube.fr","video.sadmin.io","dalek.zone","review.peertube.biz","peervideo.club","tube.la-dina.net","peertube.tmp.rcp.tf"],selector:".vjs-v7"},{host:"dailymotion",url:"https://www.dailymotion.com/video/",match:/^geo.dailymotion.com$/,selector:".player"},{host:"trovo",url:"https://trovo.live/s/",match:/^trovo.live$/,selector:".player-video"},{host:"yandexdisk",url:"https://disk.yandex.ru/i/",match:/^disk.yandex.ru$/,selector:"yaplayertag > div:nth-of-type(1)"}],Dt=wt.getParser(window.navigator.userAgent).getResult(),It=[...ut,...ht],Nt=["playing","ratechange","play","waiting","pause"];function jt(t,e,o=!1){return t.map((t=>({label:`${o&&!T.includes(t)?"❌ ":""}${y.get("langs")[t]??t.toUpperCase()}`,value:t,selected:e===t})))}function $t(t,e,n,i,a,r){m.Z.log(`Translate video (url: ${t}, duration: ${e}, requestLang: ${n}, responseLang: ${i})`),m.Z.log("translationHelp:",a),async function(t,e,n,i,a,r){try{m.Z.log("requestVideoTranslation");const s=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;m.Z.log("Inited yandexRequest...");const l=it(t,e,n,i,a);await s("/video-translation/translate",l,{"Vtrans-Signature":await St(l),"Sec-Vtrans-Token":xt(!1)},r)}catch(t){console.error("[VOT]",t),r(!1)}}(t,e,n,i,a,((t,e)=>{if(m.Z.log("[exec callback] Requesting video translation"),!t)return void r(!1,y.get("requestTranslationFailed"));const o=at(e);switch(console.log("[VOT] Translation response: ",o),o.status){case 0:r(!1,o.message);break;case 1:r(!!o.url,o.url||y.get("audioNotReceived"));break;case 2:r(!1,o.remainingTime?function(t){const e=Math.floor(t/60),o=Math.floor(t%60);return e>=60?y.get("translationTakeMoreThanHour"):e>=10&&e%10?y.get("translationTakeApproximatelyMinutes").format(e):1==e||0==e&&o>0?y.get("translationTakeAboutMinute"):y.get("translationTakeApproximatelyMinute").format(e)}(o.remainingTime):y.get("translationTakeFewMinutes"));break;case 3:r(!1,y.get("videoBeingTranslated"))}}))}class Ht{translateFromLang="en";translateToLang=M;timer;ytData="";videoData="";firstPlay=!0;audio=new Audio;hls=C();downloadTranslationUrl=null;downloadSubtitlesUrl=null;autoRetry;streamPing;volumeOnStart;tempOriginalVolume;tempVolume;subtitlesList=[];subtitlesListVideoId=null;videoLastSrcObject=null;constructor(t,e,o){m.Z.log("[VideoHandler] add video:",t,"container:",e,this),this.video=t,this.container=e,this.site=o,this.handleSrcChangedBound=this.handleSrcChanged.bind(this),this.srcObserver=new MutationObserver(this.handleSrcChangedBound),this.srcObserver.observe(this.video,{attributeFilter:["src","currentSrc"]}),this.srcObjectInterval=setInterval((async()=>{this.videoLastSrcObject!==this.video.srcObject&&(this.videoLastSrcObject=this.video.srcObject,await this.handleSrcChanged())}),100),this.stopTranslationBound=this.stopTranslation.bind(this),this.handleVideoEventBound=this.handleVideoEvent.bind(this),this.changeOpacityOnEventBound=this.changeOpacityOnEvent.bind(this),this.resetTimerBound=this.resetTimer.bind(this),this.init()}async init(){if(this.initialized)return;this.data={autoTranslate:await b.get("autoTranslate",0,!0),dontTranslateLanguage:await b.get("dontTranslateLanguage",M),dontTranslateYourLang:await b.get("dontTranslateYourLang",1,!0),autoSetVolumeYandexStyle:await b.get("autoSetVolumeYandexStyle",1,!0),autoVolume:await b.get("autoVolume",15,!0)/100,showVideoSlider:await b.get("showVideoSlider",1,!0),syncVolume:await b.get("syncVolume",0,!0),subtitlesMaxLength:await b.get("subtitlesMaxLength",300,!0),highlightWords:await b.get("highlightWords",0,!0),responseLanguage:await b.get("responseLanguage",M),defaultVolume:await b.get("defaultVolume",100,!0),udemyData:await b.get("udemyData",{accessToken:"",expires:0}),audioProxy:await b.get("audioProxy",0,!0),showPiPButton:await b.get("showPiPButton",0,!0),translateAPIErrors:await b.get("translateAPIErrors",1,!0),translationService:await b.get("translationService",A.kF),detectService:await b.get("detectService",A.EY)},this.videoData=await this.getVideoData(),console.log("[db] data from db: ",this.data),this.subtitlesWidget=new Vt(this.video,this.container,this.site),this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength),this.subtitlesWidget.setHighlightWords(this.data.highlightWords),this.initUI(),this.initUIEvents();const t=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=t,t&&(this.votMenu.container.hidden=t),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage??"ru"),this.translateToLang=this.data.responseLanguage??"ru",this.initExtraEvents(),this.initialized=!0}transformBtn(t="none",e){this.votButton.container.dataset.status=t,this.votButton.label.innerHTML=e}initUI(){this.votButton=ft.createVOTButton(y.get("translateVideo")),this.container.appendChild(this.votButton.container),this.votButton.pipButton.hidden=!P()||!this.data?.showPiPButton,this.votButton.separator2.hidden=!P()||!this.data?.showPiPButton,this.votButton.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votMenu=ft.createVOTMenu(y.get("VOTSettings")),this.container.appendChild(this.votMenu.container),this.votDownloadButton=ft.createIconButton(''),this.votDownloadButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadButton),this.votDownloadSubtitlesButton=ft.createIconButton(''),this.votDownloadSubtitlesButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadSubtitlesButton),this.votSettingsButton=ft.createIconButton(''),this.votMenu.headerContainer.appendChild(this.votSettingsButton),this.votTranslationLanguageSelect=ft.createVOTLanguageSelect({fromTitle:y.get("langs")[this.video.detectedLanguage],fromDialogTitle:y.get("videoLanguage"),fromItems:[{label:y.get("langs").auto,value:"auto",selected:""},...jt(x,this.videoData.detectedLanguage)],fromOnSelectCB:async t=>{m.Z.log("[fromOnSelectCB] select from language",t.target.dataset.votValue),this.videoData=await this.getVideoData(),this.setSelectMenuValues(t.target.dataset.votValue,this.videoData.responseLanguage)},toTitle:y.get("langs")[this.video.responseLanguage],toDialogTitle:y.get("translationLanguage"),toItems:[...jt(x,this.videoData.responseLanguage,!0),{label:"─────────",value:"separator",disabled:!0},...jt(S,this.videoData.responseLanguage,!0)],toOnSelectCB:async t=>{const e=t.target.dataset.votValue;m.Z.log("[toOnSelectCB] select to language",e),this.data.responseLanguage=this.translateToLang=e,await b.set("responseLanguage",this.data.responseLanguage),m.Z.log("Response Language value changed. New value: ",this.data.responseLanguage),this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage)}}),this.votMenu.bodyContainer.appendChild(this.votTranslationLanguageSelect.container),this.votSubtitlesSelect=ft.createVOTSelect(y.get("VOTSubtitlesDisabled"),y.get("VOTSubtitles"),[{label:y.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1}],{onSelectCb:async t=>{await this.changeSubtitlesLang(t.target.dataset.votValue)},labelElement:ft.createVOTSelectLabel(y.get("VOTSubtitles"))}),this.votMenu.bodyContainer.appendChild(this.votSubtitlesSelect.container),this.votVideoVolumeSlider=ft.createSlider(`${y.get("VOTVolume")}: ${100*this.getVideoVolume()}%`,100*this.getVideoVolume()),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoVolumeSlider.container),this.votVideoTranslationVolumeSlider=ft.createSlider(`${y.get("VOTVolumeTranslation")}: ${this.data?.defaultVolume??100}%`,this.data?.defaultVolume??100),this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoTranslationVolumeSlider.container),this.votMenu.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votSettingsDialog=ft.createDialog(y.get("VOTSettings")),document.documentElement.appendChild(this.votSettingsDialog.container),this.votTranslationHeader=ft.createHeader(y.get("translationSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationHeader),this.votAutoTranslateCheckbox=ft.createCheckbox(y.get("VOTAutoTranslate"),this.data?.autoTranslate??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoTranslateCheckbox.container),this.votDontTranslateYourLangSelect=ft.createVOTSelect(y.get("langs")[b.syncGet("dontTranslateLanguage",M)],y.get("VOTDontTranslateYourLang"),jt(x,b.syncGet("dontTranslateLanguage",M)),{onSelectCb:async t=>{this.data.dontTranslateLanguage=t.target.dataset.votValue,await b.set("dontTranslateLanguage",this.data.dontTranslateLanguage)},labelElement:ft.createCheckbox(y.get("VOTDontTranslateYourLang"),this.data?.dontTranslateYourLang??!0).container}),this.votSettingsDialog.bodyContainer.appendChild(this.votDontTranslateYourLangSelect.container),this.votAutoSetVolumeCheckbox=ft.createCheckbox(`${y.get("VOTAutoSetVolume")}`,this.data?.autoSetVolumeYandexStyle??!0),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeCheckbox.container),this.votAutoSetVolumeSlider=ft.createSlider(`${100*(this.data?.autoVolume??A.sN)}%`,100*(this.data?.autoVolume??A.sN),0,100),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeSlider.container),this.votShowVideoSliderCheckbox=ft.createCheckbox(y.get("VOTShowVideoSlider"),this.data?.showVideoSlider??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votShowVideoSliderCheckbox.container),this.votUdemyDataTextfield=ft.createTextfield(y.get("VOTUdemyData"),this.data?.udemyData?.accessToken??""),this.votUdemyDataTextfield.container.hidden="udemy"!==this.site.host,this.votSettingsDialog.bodyContainer.appendChild(this.votUdemyDataTextfield.container),this.votSyncVolumeCheckbox=ft.createCheckbox(y.get("VOTSyncVolume"),this.data?.syncVolume??!1),this.votSyncVolumeCheckbox.container.hidden="youtube"!==this.site.host||"mobile"===this.site.additionalData,this.votSettingsDialog.bodyContainer.appendChild(this.votSyncVolumeCheckbox.container),this.votAudioProxyCheckbox=ft.createCheckbox(y.get("VOTAudioProxy"),this.data?.audioProxy??!1),this.votAudioProxyCheckbox.container.hidden=!0,this.votSettingsDialog.bodyContainer.appendChild(this.votAudioProxyCheckbox.container),this.votTranslationServiceSelect=ft.createVOTSelect(b.syncGet("translationService",A.kF),y.get("VOTTranslationService"),jt(R,b.syncGet("translationService",A.kF)),{onSelectCb:async t=>{this.data.translationService=t.target.dataset.votValue,await b.set("translationService",this.data.translationService)},labelElement:ft.createCheckbox(y.get("VOTTranslateAPIErrors"),this.data.translateAPIErrors??!0).container}),this.votTranslationServiceSelect.container.hidden="ru"===y.lang,this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationServiceSelect.container),this.votDetectServiceSelect=ft.createVOTSelect(b.syncGet("detectService",A.EY),y.get("VOTDetectService"),jt(q,b.syncGet("detectService",A.EY)),{onSelectCb:async t=>{this.data.detectService=t.target.dataset.votValue,await b.set("detectService",this.data.detectService)},labelElement:ft.createVOTSelectLabel(y.get("VOTDetectService"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votDetectServiceSelect.container),this.votSubtitlesHeader=ft.createHeader(y.get("subtitlesSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHeader),this.votSubtitlesMaxLengthSlider=ft.createSlider(`${y.get("VOTSubtitlesMaxLength")}: ${this.data?.subtitlesMaxLength??300}`,this.data?.subtitlesMaxLength??300,50,300),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesMaxLengthSlider.container),this.votSubtitlesHighlightWordsCheckbox=ft.createCheckbox(y.get("VOTHighlightWords"),this.data?.highlightWords??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHighlightWordsCheckbox.container),this.votAboutHeader=ft.createHeader(y.get("about")),this.votSettingsDialog.bodyContainer.appendChild(this.votAboutHeader),this.votLanguageSelect=ft.createVOTSelect(y.get("langs")[b.syncGet("locale-lang-override","auto")],y.get("VOTMenuLanguage"),jt(f,b.syncGet("locale-lang-override","auto")),{onSelectCb:async t=>{await b.set("locale-lang-override",t.target.dataset.votValue)},labelElement:ft.createVOTSelectLabel(y.get("VOTMenuLanguage"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votLanguageSelect.container),this.votShowPiPButtonCheckbox=ft.createCheckbox(y.get("VOTShowPiPButton"),this.data?.showPiPButton??!1),this.votShowPiPButtonCheckbox.container.hidden=!P(),this.votSettingsDialog.bodyContainer.appendChild(this.votShowPiPButtonCheckbox.container),this.votVersionInfo=ft.createInformation(`${y.get("VOTVersion")}:`,GM_info.script.version),this.votSettingsDialog.bodyContainer.appendChild(this.votVersionInfo.container),this.votAuthorsInfo=ft.createInformation(`${y.get("VOTAuthors")}:`,GM_info.script.author),this.votSettingsDialog.bodyContainer.appendChild(this.votAuthorsInfo.container),this.votLoaderInfo=ft.createInformation(`${y.get("VOTLoader")}:`,`${GM_info.scriptHandler} v${GM_info.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votLoaderInfo.container),this.votBrowserInfo=ft.createInformation(`${y.get("VOTBrowser")}:`,`${Dt.browser.name} ${Dt.browser.version} (${Dt.os.name} ${Dt.os.version})`),this.votSettingsDialog.bodyContainer.appendChild(this.votBrowserInfo.container),this.votResetSettingsButton=ft.createButton(y.get("resetSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votResetSettingsButton)}initUIEvents(){this.votButton.translateButton.addEventListener("click",(async()=>{if(this.audio.src)return m.Z.log("[click translationBtn] audio.src is not empty"),void this.stopTraslate();try{m.Z.log("[click translationBtn] trying execute translation");const t=O(this.site.host,this.video);if(!t)throw new w("VOTNoVideoIDFound");await this.translateExecutor(t)}catch(t){console.error("[VOT]",t),"VOTLocalizedError"===t?.name?this.transformBtn("error",t.localizedMessage):this.transformBtn("error",t)}})),this.votButton.pipButton.addEventListener("click",(async()=>{this.video!==document.pictureInPictureElement?await this.video.requestPictureInPicture():await document.exitPictureInPicture()})),this.votButton.menuButton.addEventListener("click",(()=>{this.votMenu.container.hidden=!this.votMenu.container.hidden})),this.votDownloadButton.addEventListener("click",(()=>{this.downloadTranslationUrl&&window.open(this.downloadTranslationUrl,"_blank").focus()})),this.votDownloadSubtitlesButton.addEventListener("click",(()=>{console.log(this.downloadSubtitlesUrl),this.downloadSubtitlesUrl&&window.open(this.downloadSubtitlesUrl,"_blank").focus()})),this.votSettingsButton.addEventListener("click",(()=>{this.votSettingsDialog.container.hidden=!this.votSettingsDialog.container.hidden,(void 0===document.fullscreen||document.fullscreen)&&(document.webkitExitFullscreen&&document.webkitExitFullscreen(),document.mozCancelFullscreen&&document.mozCancelFullscreen(),document.exitFullscreen&&document.exitFullscreen())})),this.votVideoVolumeSlider.input.addEventListener("input",(t=>{const e=Number(t.target.value);if(this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`,this.setVideoVolume(e/100),1===this.data.syncVolume){const t=Number(this.votVideoTranslationVolumeSlider.input.value),o=yt(this.audio,e,t,this.tempOriginalVolume);this.votVideoTranslationVolumeSlider.input.value=o,this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,ft.updateSlider(this.votVideoTranslationVolumeSlider.input),this.tempVolume=o,this.tempOriginalVolume=e}})),this.votVideoTranslationVolumeSlider.input.addEventListener("input",(async t=>{this.data.defaultVolume=Number(t.target.value),await b.set("defaultVolume",this.data.defaultVolume),this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${this.data.defaultVolume}%`,this.audio.volume=this.data.defaultVolume/100,1===this.data.syncVolume&&this.syncTranslationWithVideo(this.data.defaultVolume)})),this.votAutoTranslateCheckbox.input.addEventListener("change",(async t=>{this.data.autoTranslate=Number(t.target.checked),await b.set("autoTranslate",this.data.autoTranslate),m.Z.log("autoTranslate value changed. New value: ",this.data.autoTranslate)})),this.votDontTranslateYourLangSelect.labelElement.addEventListener("change",(async t=>{this.data.dontTranslateYourLang=Number(t.target.checked),await b.set("dontTranslateYourLang",this.data.dontTranslateYourLang),m.Z.log("dontTranslateYourLang value changed. New value: ",this.data.dontTranslateYourLang)})),this.votAutoSetVolumeCheckbox.input.addEventListener("change",(async t=>{this.data.autoSetVolumeYandexStyle=Number(t.target.checked),await b.set("autoSetVolumeYandexStyle",this.data.autoSetVolumeYandexStyle),m.Z.log("autoSetVolumeYandexStyle value changed. New value: ",this.data.autoSetVolumeYandexStyle)})),this.votAutoSetVolumeSlider.input.addEventListener("input",(async t=>{const e=Number(t.target.value);this.data.autoVolume=e/100,await b.set("autoVolume",e),this.votAutoSetVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`})),this.votShowVideoSliderCheckbox.input.addEventListener("change",(async t=>{this.data.showVideoSlider=Number(t.target.checked),await b.set("showVideoSlider",this.data.showVideoSlider),m.Z.log("showVideoSlider value changed. New value: ",this.data.showVideoSlider),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status})),this.votUdemyDataTextfield.input.addEventListener("change",(async t=>{this.data.udemyData={accessToken:t.target.value,expires:(new Date).getTime()},await b.set("udemyData",this.data.udemyData),m.Z.log("udemyData value changed. New value: ",this.data.udemyData),window.location.reload()})),this.votSyncVolumeCheckbox.input.addEventListener("change",(async t=>{this.data.syncVolume=Number(t.target.checked),await b.set("syncVolume",this.data.syncVolume),m.Z.log("syncVolume value changed. New value: ",this.data.syncVolume)})),this.votAudioProxyCheckbox.input.addEventListener("change",(async t=>{this.data.audioProxy=Number(t.target.checked),await b.set("audioProxy",this.data.audioProxy),m.Z.log("audioProxy value changed. New value: ",this.data.audioProxy)})),this.votTranslationServiceSelect.labelElement.addEventListener("change",(async t=>{this.data.translateAPIErrors=Number(t.target.checked),await b.set("translateAPIErrors",this.data.translateAPIErrors),m.Z.log("translateAPIErrors value changed. New value: ",this.data.translateAPIErrors)})),this.votSubtitlesMaxLengthSlider.input.addEventListener("input",(async t=>{this.data.subtitlesMaxLength=Number(t.target.value),await b.set("subtitlesMaxLength",this.data.subtitlesMaxLength),this.votSubtitlesMaxLengthSlider.label.querySelector("strong").innerHTML=`${this.data.subtitlesMaxLength}`,this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength)})),this.votSubtitlesHighlightWordsCheckbox.input.addEventListener("change",(async t=>{this.data.highlightWords=Number(t.target.checked),await b.set("highlightWords",this.data.highlightWords),m.Z.log("highlightWords value changed. New value: ",this.data.highlightWords),this.subtitlesWidget.setHighlightWords(this.data.highlightWords)})),this.votShowPiPButtonCheckbox.input.addEventListener("change",(async t=>{this.data.showPiPButton=Number(t.target.checked),await b.set("showPiPButton",this.data.showPiPButton),m.Z.log("showPiPButton value changed. New value: ",this.data.showPiPButton),this.votButton.pipButton.hidden=!P()||!this.data.showPiPButton,this.votButton.separator2.hidden=!P()||!this.data.showPiPButton})),this.votResetSettingsButton.addEventListener("click",(async()=>{y.reset(),(await b.list()).filter((t=>!y.gmValues.includes(t))).forEach((t=>b.syncDelete(t))),window.location.reload()}))}releaseExtraEvents(){clearInterval(this.resizeInterval),this.resizeObserver?.disconnect(),"youtube"===this.site.host&&"mobile"!==this.site.additionalData&&this.syncVolumeObserver?.disconnect(),this.extraEvents?.forEach((t=>{t.element.removeEventListener(t.event,t.handler)}))}initExtraEvents(){this.extraEvents=[];const t=(t,e,o)=>{this.extraEvents.push({element:t,event:e,handler:o}),t.addEventListener(e,o)},e=(e,o,n)=>{o.forEach((o=>{t(e,o,n)}))};if(this.resizeObserver=new ResizeObserver((t=>{t.forEach((t=>{this.votMenu.container.setAttribute("style",`--vot-container-height: ${t.contentRect.height}px`)}))})),this.resizeObserver.observe(this.video),this.votMenu.container.setAttribute("style",`--vot-container-height: ${this.video.getBoundingClientRect().height}px`),this.resizeInterval=setInterval((()=>{this.votMenu.container.setAttribute("style",`--vot-container-height: ${this.video.getBoundingClientRect().height}px`)}),500),"youtube"===this.site.host&&"mobile"!==this.site.additionalData){this.syncVolumeObserver=new MutationObserver((t=>{t.forEach((t=>{"attributes"===t.type&&"aria-valuenow"===t.attributeName&&this.syncVideoVolumeSlider()}))}));const t=document.querySelector(".ytp-volume-panel");t&&this.syncVolumeObserver.observe(t,{attributes:!0,childList:!1,subtree:!0,attributeOldValue:!0})}let o;document.addEventListener("click",(t=>{const e=t.target,o=this.votButton.container,n=this.votMenu.container,i=this.container,a=this.votSettingsDialog.container,r=document.querySelector(".vot-dialog-temp"),s=o.contains(e),l=n.contains(e),d=i.contains(e),c=a.contains(e),u=r?.contains(e)??!1;m.Z.log(`[document click] ${s} ${l} ${d} ${c} ${u}`),s||l||c||u||(d||this.logout(0),this.votMenu.container.hidden=!0)})),o="pornhub"===this.site.host?"embed"===this.site.additionalData?document.querySelector("#player"):this.container.querySelector(".video-element-wrapper-js > div"):"twitter"===this.site.host?document.querySelector('div[data-testid="videoPlayer"]'):"yandexdisk"===this.site.host?document.querySelector(".video-player__player"):this.container,o&&e(o,["mousemove","mouseout"],this.resetTimerBound),t(this.votButton.container,"mousemove",this.changeOpacityOnEventBound),t(this.votMenu.container,"mousemove",this.changeOpacityOnEventBound),e(document,["touchstart","touchmove","touchend"],this.changeOpacityOnEventBound),t(this.votButton.container,"mousedown",(t=>{t.stopImmediatePropagation()})),t(this.votMenu.container,"mousedown",(t=>{t.stopImmediatePropagation()})),"youtube"===this.site.host&&(this.container.draggable=!1),t(this.video,"abort",(()=>{m.Z.log("lipsync mode is abort"),this.stopTranslation(),this.videoData=""})),t(this.video,"progress",(async()=>{if(!this.firstPlay||1!==this.data.autoTranslate)return;const t=O(this.site.host,this.video);if(!t)throw new w("VOTNoVideoIDFound");try{await this.translateExecutor(t),this.firstPlay=!1}catch(t){console.error("[VOT]",t),"VOTLocalizedError"===t?.name?this.transformBtn("error",t.localizedMessage):this.transformBtn("error",t),this.firstPlay=!1}}))}logout(t){this.votMenu.container.hidden&&(this.votButton.container.style.opacity=t)}resetTimer(){clearTimeout(this.timer),this.logout(1),this.timer=setTimeout((()=>{this.logout(0)}),2e3)}changeOpacityOnEvent(t){clearTimeout(this.timer),this.logout(1),t.stopPropagation()}async changeSubtitlesLang(t){if(m.Z.log("[onchange] subtitles",t),this.votSubtitlesSelect.setSelected(t),"disabled"===t)this.votSubtitlesSelect.setTitle(y.get("VOTSubtitlesDisabled")),this.subtitlesWidget.setContent(null),this.votDownloadSubtitlesButton.hidden=!0,this.downloadSubtitlesUrl=null;else{const e=await async function(t){let e=!1,o=await Promise.race([new Promise((async t=>{await L(5e3),e||console.error("[VOT] Failed to fetch subtitles. Reason: timeout"),e=!0,t([])})),new Promise((async o=>{m.Z.log("Fetching subtitles:",t),await fetch(t.url).then((t=>t.json())).then((t=>{e=!0,o(t)})).catch((t=>{console.error("[VOT] Failed to fetch subtitles. Reason:",t),e=!0,o({containsTokens:!1,subtitles:[]})}))}))]);return"youtube"===t.source&&(o=function(t){const e={containsTokens:!1,subtitles:[]};if("object"!=typeof t||!("events"in t)||!Array.isArray(t.events))return console.error("[VOT] Failed to format youtube subtitles",t),e;for(let o=0;ot.utf8.replace(/^ +| +$/g,""))).join(" ");let i=t.events[o].dDurationMs;t.events[o+1]&&t.events[o].tStartMs+t.events[o].dDurationMs>t.events[o+1].tStartMs&&(i=t.events[o+1].tStartMs-t.events[o].tStartMs),"\n"!==n&&e.subtitles.push({text:n,startMs:t.events[o].tStartMs,durationMs:i})}return e}(o)),o.subtitles=function(t,e){const o=[];let n;for(const i of t.subtitles){let a;if(i?.tokens?.length){if("yandex"!==e)return console.warn("[VOT] Unsupported subtitles tokens type: ",e),t.containsTokens=!1,null;a=Tt(i)}else a=kt(i,n);n=a[a.length-1],o.push(Object.assign(Object.assign({},i),{tokens:a}))}return t.containsTokens=!0,o}(o,t.source),console.log("[VOT] subtitles:",o),o}(this.subtitlesList.at(parseInt(t)));this.subtitlesWidget.setContent(e),this.votDownloadSubtitlesButton.hidden=!1,this.downloadSubtitlesUrl=this.subtitlesList.at(parseInt(t))?.url}}async updateSubtitlesLangSelect(){const t=[{label:y.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1},...this.subtitlesList.map(((t,e)=>({label:(y.get("langs")[t.language]??t.language.toUpperCase())+(t.translatedFromLanguage?` ${y.get("VOTTranslatedFrom")} ${y.get("langs")[t.translatedFromLanguage]??t.translatedFromLanguage.toUpperCase()}`:"")+("yandex"!==t.source?` ${t.source}`:"")+(t.isAutoGenerated?` (${y.get("VOTAutogenerated")})`:""),value:e,selected:!1,disabled:!1})))];this.votSubtitlesSelect.updateItems(t),await this.changeSubtitlesLang(t[0].value)}async updateSubtitles(){await this.changeSubtitlesLang("disabled");const t=O(this.site.host,this.video);if(!t)return console.error(`[VOT] ${y.getDefault("VOTNoVideoIDFound")}`),this.subtitlesList=[],this.subtitlesListVideoId=null,void await this.updateSubtitlesLangSelect();this.subtitlesListVideoId!==t&&(this.videoData.detectedLanguage||(this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage)),this.subtitlesList=await async function(t,e,n){const i="youtube"===t.host?$():[];let a=!1;const r=[...await Promise.race([new Promise((async t=>{await L(5e3),a||console.error("[VOT] Failed get yandex subtitles. Reason: timeout"),a=!0,t([])})),new Promise((i=>{!async function(t,e,n){try{m.Z.log("requestVideoSubtitles");const i=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;m.Z.log("Inited yandexRequest...");const a=rt(t,e);await i("/video-subtitles/get-subtitles",a,{"Vsubs-Signature":await St(a),"Sec-Vsubs-Token":xt(!1)},n)}catch(t){console.error("[VOT]",t),n(!1)}}(`${t.url}${e}`,n,((t,e)=>{m.Z.log("[exec callback] Requesting video subtitles"),t||(console.error("[VOT] Failed get yandex subtitles"),a=!0,i([]));const o=st(e);console.log("[VOT] Subtitles response: ",o);let n=o.subtitles??[];n=n.reduce(((t,e)=>(e.language&&!t.find((t=>{if("yandex"===t.source&&t.language===e.language&&!t.translatedFromLanguage)return t}))&&t.push({source:"yandex",language:e.language,url:e.url}),e.translatedLanguage&&t.push({source:"yandex",language:e.translatedLanguage,translatedFromLanguage:e.language,url:e.translatedUrl}),t)),[]),a=!0,i(n)}))}))]),...i].sort(((t,e)=>{if(t.source!==e.source)return"yandex"===t.source?-1:1;if(t.language!==e.language&&(t.language===M||e.language===M))return t.language===M?-1:1;if("yandex"===t.source){if(t.translatedFromLanguage!==e.translatedFromLanguage)return t.translatedFromLanguage&&e.translatedFromLanguage?t.translatedFromLanguage===n?-1:1:t.language===e.language?t.translatedFromLanguage?1:-1:t.translatedFromLanguage?-1:1;if(!t.translatedFromLanguage)return t.language===n?-1:1}return"youtube"===t.source&&t.isAutoGenerated!==e.isAutoGenerated?t.isAutoGenerated?1:-1:0}));return console.log("[VOT] subtitles list",r),r}(this.site,t,this.videoData.detectedLanguage),this.subtitlesList?this.subtitlesListVideoId=t:await this.changeSubtitlesLang("disabled"),await this.updateSubtitlesLangSelect())}getVideoVolume(){let t=this.video?.volume;return"youtube"===this.site.host&&(t=j()||t),t}setVideoVolume(t){if("youtube"===this.site.host)return Z(t);this.video.volume=t}syncVideoVolumeSlider(){const t=Math.round(100*this.getVideoVolume());this.votVideoVolumeSlider.input.value=t,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${t}%`,ft.updateSlider(this.votVideoVolumeSlider.input),1===this.data.syncVolume&&(this.tempOriginalVolume=Number(t))}setSelectMenuValues(t,e){this.votTranslationLanguageSelect.fromSelect.setTitle(y.get("langs")[t]),this.votTranslationLanguageSelect.toSelect.setTitle(y.get("langs")[e]),this.votTranslationLanguageSelect.fromSelect.setSelected(t),this.votTranslationLanguageSelect.toSelect.setSelected(e),console.log(`[VOT] Set translation from ${t} to ${e}`),this.videoData.detectedLanguage=t,this.videoData.responseLanguage=e}syncTranslationWithVideo(t){const e=Number(this.votVideoVolumeSlider.input.value),o=yt(this.video,t,e,this.tempVolume);this.votVideoVolumeSlider.input.value=o,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,ft.updateSlider(this.votVideoVolumeSlider.input),this.tempOriginalVolume=o,this.tempVolume=t}async getVideoData(){const t={translationHelp:null,isStream:!1};if(t.duration=this.video?.duration||343,t.videoId=O(this.site.host,this.video),t.detectedLanguage=this.translateFromLang,t.responseLanguage=this.translateToLang,!t.videoId)return this.ytData={},t;if(window.location.hostname.includes("youtube.com"))this.ytData=await H(),t.isStream=this.ytData.isLive,""!==this.ytData.author&&(t.detectedLanguage=this.ytData.detectedLanguage,t.responseLanguage=this.translateToLang);else if(window.location.hostname.includes("rutube")||window.location.hostname.includes("my.mail.ru"))t.detectedLanguage="ru";else if(window.location.hostname.includes("bilibili.com"))t.detectedLanguage="zh";else if(window.location.hostname.includes("coursera.org")){const e=await Ot(this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else if(window.location.hostname.includes("udemy.com")){const e=await _t(this.data.udemyData,this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else"vk"!==this.site.host&&"piped"!==this.site.host&&"invidious"!==this.site.host&&"bitchute"!==this.site.host&&"rumble"!==this.site.host&&"peertube"!==this.site.host&&"dailymotion"!==this.site.host&&"trovo"!==this.site.host&&"yandexdisk"!==this.site.host||(t.detectedLanguage="auto");return t}videoValidator(){if("youtube"===this.site.host){if(m.Z.log("VideoValidator videoData: ",this.videoData),1===this.data.dontTranslateYourLang&&this.videoData.detectedLanguage===this.data.dontTranslateLanguage&&this.videoData.responseLanguage===this.data.dontTranslateLanguage)throw new w("VOTDisableFromYourLang");if(this.videoData.duration>14400)throw new w("VOTVideoIsTooLong")}return!0}lipSync(t=!1){if(m.Z.log("lipsync video",this.video),this.video)if(this.audio.currentTime=this.video.currentTime,this.audio.playbackRate=this.video.playbackRate,t)if("play"!==t)"pause"===t&&(m.Z.log("lipsync mode is pause"),this.audio.pause()),"stop"===t&&(m.Z.log("lipsync mode is stop"),this.audio.pause()),"waiting"===t&&(m.Z.log("lipsync mode is waiting"),this.audio.pause()),"playing"===t&&(m.Z.log("lipsync mode is playing"),this.audio.play());else{m.Z.log("lipsync mode is play");const t=this.audio.play();void 0!==t&&t.catch((t=>{if(console.error("[VOT]",t),"NotAllowedError"===t.name)throw this.transformBtn("error",y.get("grantPermissionToAutoPlay")),new w("grantPermissionToAutoPlay");if("NotSupportedError"===t.name)throw this.transformBtn("error",It.includes(window.location.hostname)?y.get("neededAdditionalExtension"):y.get("audioFormatNotSupported")),It.includes(window.location.hostname)?new w("neededAdditionalExtension"):new w("audioFormatNotSupported")}))}else m.Z.log("lipsync mode is not set")}handleVideoEvent(t){m.Z.log(`video ${t.type}`),this.lipSync(t.type)}stopTraslate(){Nt.forEach((t=>this.video.removeEventListener(t,this.handleVideoEventBound))),this.audio.pause(),this.audio.src="",this.audio.removeAttribute("src"),this.votVideoVolumeSlider.container.hidden=!0,this.votVideoTranslationVolumeSlider.container.hidden=!0,this.votDownloadButton.hidden=!0,this.downloadTranslationUrl=null,this.transformBtn("none",y.get("translateVideo")),this.volumeOnStart&&(m.Z.log(`Volume on start: ${this.volumeOnStart}`),"youtube"===this.site.host?Z(this.volumeOnStart):this.video.volume=this.volumeOnStart),clearInterval(this.streamPing),this.hls?.destroy(),this.hls=C()}async translateExecutor(t){this.videoData.detectedLanguage||(this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage)),m.Z.log("Run videoValidator"),this.videoValidator(),m.Z.log("Run translateFunc"),this.translateFunc(t,this.videoData.isStream,this.videoData.detectedLanguage,this.videoData.responseLanguage,this.videoData.translationHelp)}translateFunc(t,e,n,i,a){console.log("[VOT] Video Data: ",this.videoData);const r=`${this.site.url}${t}`;if(this.videoValidator(),e)return m.Z.log("Executed stream translation"),void function(t,e,n,i){m.Z.log(`Translate stream (url: ${t}, requestLang: ${e}, responseLang: ${n})`),async function(t,e,n,i){try{m.Z.log("requestStreamTranslation");const a=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;m.Z.log("Inited yandexRequest...");const r=dt(t,e,n);await a("/stream-translation/translate-stream",r,{"Vtrans-Signature":await St(r),"Sec-Vtrans-Token":xt(!1)},i)}catch(t){console.error("[VOT]",t),i(!1)}}(t,e,n,((t,e)=>{if(m.Z.log("[exec callback] Requesting stream translation"),!t)return void i(!1,y.get("requestTranslationFailed"));const o=ct(e);switch(console.log("[VOT] Stream Translation response: ",o),o.interval){case 10:i(!1,o.interval,y.get("translationTakeFewMinutes"));break;case 20:i(!0,o.interval,o||y.get("audioNotReceived"));break;case 0:i(!1,o.interval,y.get("streamNoConnectionToServer"))}}))}(r,n,i,(async(r,s,l)=>{if(m.Z.log("[exec callback] translateStream callback"),O(this.site.host,this.video)!==t)return;if(!r||!l.translatedInfo)return"VOTLocalizedError"===l?.name?this.transformBtn("error",l.localizedMessage):1===this.data.translateAPIErrors&&"ru"!==y.lang?(this.transformBtn("error",`${y.get("VOTTranslatingError")}...`),this.transformBtn("error",await _(l,"ru",y.lang))):this.transformBtn("error",l),void(10===s&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),1e3*s)));this.transformBtn("success",y.get("disableTranslate")),console.log(l);const d=l.pingId;m.Z.log(`Stream pingId: ${d}`),this.streamPing=setInterval((async()=>await async function(t,e){try{m.Z.log("requestStreamPing");const n=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;m.Z.log("Inited yandexRequest...");const i=lt(t);await n("/stream-translation/ping-stream",i,{"Vtrans-Signature":await St(i),"Sec-Vtrans-Token":xt(!1)},e)}catch(t){console.error("[VOT]",t),e(!1)}}(d,(t=>m.Z.log("Stream ping result: ",t)))),1e3*s),m.Z.log(l.translatedInfo.url);const c=`https://${A.e6}/?all=yes&origin=${encodeURIComponent("https://strm.yandex.ru")}&referer=${encodeURIComponent("https://strm.yandex.ru")}&url=${encodeURIComponent(l.translatedInfo.url)}`;if(m.Z.log(c),m.Z.log("Test hls support"),this.hls)this.hls.on(Hls.Events.MEDIA_ATTACHED,(function(){m.Z.log("audio and hls.js are now bound together !")})),this.hls.on(Hls.Events.MANIFEST_PARSED,(function(t,e){m.Z.log("manifest loaded, found "+e.levels.length+" quality level")})),this.hls.loadSource(c),this.hls.attachMedia(this.audio),this.hls.on(Hls.Events.ERROR,(function(t,e){if(e.fatal)switch(e.type){case Hls.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover"),this.hls.recoverMediaError();break;case Hls.ErrorTypes.NETWORK_ERROR:console.error("fatal network error encountered",e);break;default:this.hls.destroy()}})),m.Z.log(this.hls);else{if(!this.audio.canPlayType("application/vnd.apple.mpegurl"))throw new w("audioFormatNotSupported");this.audio.src=c}U(this.video,10),this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),this.video.src||this.video.currentSrc||this.video.srcObject?(this.video&&!this.video.paused&&this.lipSync("play"),Nt.forEach((t=>this.video.addEventListener(t,this.handleVideoEventBound))),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,1===this.data.autoSetVolumeYandexStyle&&(this.votVideoVolumeSlider.input.value=100*this.data.autoVolume,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=100*this.data.autoVolume+"%",ft.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=c):this.stopTranslation()}));if(["udemy","coursera"].includes(this.site.host)&&!a)throw new w("VOTTranslationHelpNull");$t(r,this.videoData.duration,n,i,a,(async(o,r)=>{if(m.Z.log("[exec callback] translateVideo callback"),O(this.site.host,this.video)!==t)return;if(!o)return"VOTLocalizedError"===r?.name?this.transformBtn("error",r.localizedMessage):1!==this.data.translateAPIErrors||r.includes(y.get("translationTake"))||"ru"===y.lang?this.transformBtn("error",r):(this.transformBtn("error",y.get("VOTTranslatingError")),this.transformBtn("error",await _(r,"ru",y.lang))),r.includes(y.get("translationTake"))&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),6e4)),void console.error("[VOT]",r);if(this.audio.src=r,this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),"twitter"===this.site.host&&document.querySelector('div[data-testid="app-bar-back"][role="button"]').addEventListener("click",this.stopTranslationBound),!this.video.src&&!this.video.currentSrc&&!this.video.srcObject)return void this.stopTranslation();const s=["twitch","vimeo","facebook","rutube","twitter","bilibili","mail_ru","rumble","eporner"];for(let t=0;t{t.forEach((t=>{"attributes"===t.type&&"src"===t.attributeName&&t.target===this.video&&""!==t.target.src&&(this.stopTranslation(),this.firstPlay=!0)}))})).observe(this.container,{attributes:!0,childList:!1,subtree:!0,attributeOldValue:!0});break}this.video&&!this.video.paused&&this.lipSync("play"),Nt.forEach((t=>this.video.addEventListener(t,this.handleVideoEventBound))),this.transformBtn("success",y.get("disableTranslate")),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,1===this.data.autoSetVolumeYandexStyle&&(this.votVideoVolumeSlider.input.value=100*this.data.autoVolume,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=100*this.data.autoVolume+"%",ft.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=r}))}stopTranslation(){this.stopTraslate(),this.syncVideoVolumeSlider()}async waitInitialization(){let t=!1;return await Promise.race([new Promise((async e=>{await L(1e3),t||console.error("[VOT] Initialization timeout"),t=!0,e(!1)})),new Promise((async e=>{for(;!this.initialized;)await L(100);t=!0,e(!0)}))])}async handleSrcChanged(){if(m.Z.log("[VideoHandler] src changed",this),!await this.waitInitialization())return;this.stopTranslation(),this.videoData=await this.getVideoData(),this.firstPlay=!0;const t=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=t,t&&(this.votMenu.container.hidden=t),this.site.selector||(this.container=this.video.parentElement),this.container.contains(this.votButton.container)||(this.container.appendChild(this.votButton.container),this.container.appendChild(this.votMenu.container)),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage??"ru"),this.translateToLang=this.data.responseLanguage??"ru"}async release(){m.Z.log("[VideoHandler] release"),await this.waitInitialization()&&(this.initialized=!1,this.stopTranslation(),this.releaseExtraEvents(),this.subtitlesWidget.release(),this.srcObserver.disconnect(),clearInterval(this.srcObjectInterval),this.votButton.container.remove(),this.votMenu.container.remove())}}const Zt=new class{constructor(){this.onVideoAdded=new Rt,this.onVideoRemoved=new Rt,this.handleVideoAddedBound=this.handleVideoAdded.bind(this),this.handleVideoRemovedBound=this.handleVideoRemoved.bind(this),this.observer=new MutationObserver((t=>{window.requestIdleCallback((()=>{t.forEach((t=>{"childList"===t.type&&(qt(t.addedNodes).forEach(this.handleVideoAddedBound),qt(t.removedNodes).forEach(this.handleVideoRemovedBound))}))}),{timeout:1e3})}))}enable(){this.observer.observe(document,{childList:!0,subtree:!0}),document.querySelectorAll("video").forEach(this.handleVideoAddedBound)}disable(){this.observer.disconnect()}handleVideoAdded(t){this.onVideoAdded.dispatch(t)}handleVideoRemoved(t){document.contains(t)||this.onVideoRemoved.dispatch(t)}},Ut=new WeakMap;(async function(){if(m.Z.log("Loading extension..."),await y.update(),m.Z.log(`Selected menu language: ${y.lang}`),GM_info?.scriptHandler&&k.includes(GM_info.scriptHandler))return console.error(`[VOT] ${y.getDefault("unSupportedExtensionError").format(GM_info.scriptHandler)}`),alert(`[VOT] ${y.get("unSupportedExtensionError").format(GM_info.scriptHandler)}`);m.Z.log("Extension compatibility passed..."),Zt.onVideoAdded.addListener((t=>{for(const e of zt.filter((t=>{const e=t=>t instanceof RegExp&&t.test(window.location.hostname)||"string"==typeof t&&window.location.hostname.includes(t)||"function"==typeof t&&t(new URL(window.location));return!!(e(t.match)||t.match instanceof Array&&t.match.some((t=>e(t))))&&t.host&&t.url}))){if(!e)continue;let o;if(e.shadowRoot?(o=e.selector?Object.values(document.querySelectorAll(e.selector)).find((e=>e.shadowRoot.contains(t))):t.parentElement,o=o&&o.shadowRoot?o.parentElement:o):o=e.selector?Object.values(document.querySelectorAll(e.selector)).find((e=>e.contains(t))):t.parentElement,o&&!("rumble"===e.host&&o.querySelector("vot-block")||("peertube"===e.host&&(e.url=window.location.origin),Ut.has(t)))){Ut.set(t,new Ht(t,o,e));break}}})),Zt.onVideoRemoved.addListener((async t=>{Ut.has(t)&&(await Ut.get(t).release(),Ut.delete(t))})),Zt.enable()})().catch((t=>{console.error("[VOT]",t)}))})()})(); \ No newline at end of file +(()=>{var t={"./node_modules/bowser/es5.js":function(t){t.exports=function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=90)}({17:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n=o(18),i=function(){function t(){}return t.getFirstMatch=function(t,e){var o=e.match(t);return o&&o.length>0&&o[1]||""},t.getSecondMatch=function(t,e){var o=e.match(t);return o&&o.length>1&&o[2]||""},t.matchAndReturnConst=function(t,e,o){if(t.test(e))return o},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,o,n){void 0===n&&(n=!1);var i=t.getVersionPrecision(e),a=t.getVersionPrecision(o),r=Math.max(i,a),s=0,l=t.map([e,o],(function(e){var o=r-t.getVersionPrecision(e),n=e+new Array(o+1).join(".0");return t.map(n.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(n&&(s=r-Math.min(i,a)),r-=1;r>=s;){if(l[0][r]>l[1][r])return 1;if(l[0][r]===l[1][r]){if(r===s)return 0;r-=1}else if(l[0][r]1?i-1:0),r=1;r0){var r=Object.keys(o),l=s.default.find(r,(function(t){return e.isOS(t)}));if(l){var d=this.satisfies(o[l]);if(void 0!==d)return d}var c=s.default.find(r,(function(t){return e.isPlatform(t)}));if(c){var u=this.satisfies(o[c]);if(void 0!==u)return u}}if(a>0){var h=Object.keys(i),p=s.default.find(h,(function(t){return e.isBrowser(t,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var o=this.getBrowserName().toLowerCase(),n=t.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return e&&i&&(n=i.toLowerCase()),n===o},e.compareVersion=function(t){var e=[0],o=t,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(o=t.substr(1),"="===t[1]?(n=!0,o=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?o=t.substr(1):"~"===t[0]&&(n=!0,o=t.substr(1)),e.indexOf(s.default.compareVersions(i,o,n))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=d,t.exports=e.default},92:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=/version\/(\d+(\.?_?\d+)+)/i,r=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},o=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},o=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},o=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},o=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},o=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},o=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},o=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},o=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},o=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},o=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},o=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},o=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return o&&(e.version=o),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},o=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},o=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},o=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},o=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},o=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},o=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},o=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},o=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},o=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},o=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},o=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},o=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e={name:"Android Browser"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(e,t),version:i.default.getSecondMatch(e,t)}}}];e.default=r,t.exports=e.default},93:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/Roku\/DVP/],describe:function(t){var e=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:a.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),o=i.default.getWindowsVersionName(e);return{name:a.OS_MAP.Windows,version:e,versionName:o}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:a.OS_MAP.iOS},o=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return o&&(e.version=o),e}},{test:[/macintosh/i],describe:function(t){var e=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),o=i.default.getMacOSVersionName(e),n={name:a.OS_MAP.MacOS,version:e};return o&&(n.versionName=o),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),o=i.default.getAndroidVersionName(e),n={name:a.OS_MAP.Android,version:e};return o&&(n.versionName=o),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),o={name:a.OS_MAP.WebOS};return e&&e.length&&(o.version=e),o}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:a.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.PlayStation4,version:e}}}];e.default=r,t.exports=e.default},94:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",o={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(o.model=e),o}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),o=t.test(/like (ipod|iphone)/i);return e&&!o},describe:function(t){var e=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];e.default=r,t.exports=e.default},95:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:a.ENGINE_MAP.Blink};var e=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:a.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:a.ENGINE_MAP.Trident},o=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:a.ENGINE_MAP.Presto},o=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=t.test(/gecko/i),o=t.test(/like gecko/i);return e&&!o},describe:function(t){var e={name:a.ENGINE_MAP.Gecko},o=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:a.ENGINE_MAP.WebKit},o=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}}];e.default=r,t.exports=e.default}})},"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss":(t,e,o)=>{"use strict";o.d(e,{Z:()=>s});var n=o("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=o.n(n),a=o("./node_modules/css-loader/dist/runtime/api.js"),r=o.n(a)()(i());r.push([t.id,'.vot-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:none;border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-ontheme));background-color:rgb(var(--vot-helper-theme));box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer;transition:box-shadow .2s}.vot-button[hidden]{display:none !important}.vot-button::-moz-focus-inner{border:none}.vot-button::before,.vot-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-button::before{background-color:rgb(var(--vot-helper-ontheme));transition:opacity .2s}.vot-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-button:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.vot-button:hover::before{opacity:.08}.vot-button:active{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.vot-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s}.vot-button:disabled{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.12);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);box-shadow:none;cursor:initial}.vot-button:disabled::before,.vot-button:disabled::after{opacity:0}.vot-outlined-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:solid 1px;border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.24);border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:34px;outline:none;cursor:pointer}.vot-outlined-button[hidden]{display:none !important}.vot-outlined-button::-moz-focus-inner{border:none}.vot-outlined-button::before,.vot-outlined-button::after{content:"";position:absolute;border-radius:3px;top:0;right:0;bottom:0;left:0;opacity:0}.vot-outlined-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-outlined-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-outlined-button:hover::before{opacity:.04}.vot-outlined-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-outlined-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-outlined-button:disabled::before,.vot-outlined-button:disabled::after{opacity:0}.vot-text-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:4px;padding:0 8px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-text-button[hidden]{display:none !important}.vot-text-button::-moz-focus-inner{border:none}.vot-text-button::before,.vot-text-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-text-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-text-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-text-button:hover::before{opacity:.04}.vot-text-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-text-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-text-button:disabled::before,.vot-text-button:disabled::after{opacity:0}.vot-icon-button{--vot-helper-onsurface: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:50%;padding:0;width:36px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;fill:var(--vot-helper-onsurface);color:var(--vot-helper-onsurface);background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-icon-button[hidden]{display:none !important}.vot-icon-button::-moz-focus-inner{border:none}.vot-icon-button::before,.vot-icon-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-icon-button::before{background-color:var(--vot-helper-onsurface);transition:opacity .2s}.vot-icon-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity .3s,background-size .4s}.vot-icon-button:hover::before{opacity:.04}.vot-icon-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s,opacity 0s}.vot-icon-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);fill:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-icon-button:disabled::before,.vot-icon-button:disabled::after{opacity:0}.vot-icon-button svg{width:fit-content}.vot-textfield{--vot-helper-theme: rgb( var(--vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243)) ) !important;--vot-helper-safari1: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.38 ) !important;--vot-helper-safari2: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari3: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;position:relative !important;display:inline-block;padding-top:6px !important;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-textfield[hidden]{display:none !important}.vot-textfield>input,.vot-textfield>textarea{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:0 !important;border-style:solid !important;border-width:1px !important;border-color:rgba(0,0,0,0) var(--vot-helper-safari2) var(--vot-helper-safari2) !important;border-radius:4px !important;padding:15px 13px 15px !important;width:100% !important;height:inherit !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;-webkit-text-fill-color:currentColor !important;background-color:rgba(0,0,0,0) !important;box-shadow:inset 1px 0 rgba(0,0,0,0),inset -1px 0 rgba(0,0,0,0),inset 0 -1px rgba(0,0,0,0) !important;font-family:inherit !important;font-size:inherit !important;line-height:inherit !important;caret-color:var(--vot-helper-theme) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input:not(:focus):placeholder-shown,.vot-textfield>textarea:not(:focus):placeholder-shown{border-top-color:var(--vot-helper-safari2) !important}.vot-textfield>input+span,.vot-textfield>textarea+span{position:absolute !important;top:0 !important;left:0 !important;display:flex !important;width:100% !important;max-height:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;font-size:75% !important;line-height:15px !important;cursor:text !important;transition:color .2s,font-size .2s,line-height .2s !important;pointer-events:none !important}.vot-textfield>input:not(:focus):placeholder-shown+span,.vot-textfield>textarea:not(:focus):placeholder-shown+span{font-size:inherit !important;line-height:68px !important}.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{content:"" !important;display:block !important;-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin-top:6px !important;border-top:solid 1px var(--vot-helper-safari2) !important;min-width:10px !important;height:8px !important;pointer-events:none !important;box-shadow:inset 0 1px rgba(0,0,0,0) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input+span::before,.vot-textfield>textarea+span::before{margin-right:4px !important;border-left:solid 1px rgba(0,0,0,0) !important;border-radius:4px 0 !important}.vot-textfield>input+span::after,.vot-textfield>textarea+span::after{flex-grow:1 !important;margin-left:4px !important;border-right:solid 1px rgba(0,0,0,0) !important;border-radius:0 4px !important}.vot-textfield>input:not(:focus):placeholder-shown+span::before,.vot-textfield>input:not(:focus):placeholder-shown+span::after,.vot-textfield>textarea:not(:focus):placeholder-shown+span::before,.vot-textfield>textarea:not(:focus):placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}.vot-textfield:hover>input,.vot-textfield:hover>textarea{border-color:rgba(0,0,0,0) var(--vot-helper-safari3) var(--vot-helper-safari3) !important}.vot-textfield:hover>input+span::before,.vot-textfield:hover>input+span::after,.vot-textfield:hover>textarea+span::before,.vot-textfield:hover>textarea+span::after{border-top-color:var(--vot-helper-safari3) !important}.vot-textfield:hover>input:not(:focus):placeholder-shown,.vot-textfield:hover>textarea:not(:focus):placeholder-shown{border-color:var(--vot-helper-safari3) !important}.vot-textfield>input:focus,.vot-textfield>textarea:focus{border-color:rgba(0,0,0,0) var(--vot-helper-theme) var(--vot-helper-theme) !important;box-shadow:inset 1px 0 var(--vot-helper-theme),inset -1px 0 var(--vot-helper-theme),inset 0 -1px var(--vot-helper-theme) !important;outline:none !important}.vot-textfield>input:focus+span,.vot-textfield>textarea:focus+span{color:var(--vot-helper-theme) !important}.vot-textfield>input:focus+span::before,.vot-textfield>input:focus+span::after,.vot-textfield>textarea:focus+span::before,.vot-textfield>textarea:focus+span::after{border-top-color:var(--vot-helper-theme) !important;box-shadow:inset 0 1px var(--vot-helper-theme) !important}.vot-textfield>input:disabled,.vot-textfield>input:disabled+span,.vot-textfield>textarea:disabled,.vot-textfield>textarea:disabled+span{border-color:rgba(0,0,0,0) var(--vot-helper-safari1) var(--vot-helper-safari1) !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;pointer-events:none !important}.vot-textfield>input:disabled+span::before,.vot-textfield>input:disabled+span::after,.vot-textfield>textarea:disabled+span::before,.vot-textfield>textarea:disabled+span::after{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown,.vot-textfield>input:disabled:placeholder-shown+span,.vot-textfield>textarea:disabled:placeholder-shown,.vot-textfield>textarea:disabled:placeholder-shown+span{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown+span::before,.vot-textfield>input:disabled:placeholder-shown+span::after,.vot-textfield>textarea:disabled:placeholder-shown+span::before,.vot-textfield>textarea:disabled:placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}@media not all and (min-resolution: 0.001dpcm){@supports(-webkit-appearance: none){.vot-textfield>input,.vot-textfield>input+span,.vot-textfield>textarea,.vot-textfield>textarea+span,.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{transition-duration:.1s !important}}}.vot-checkbox{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );z-index:0;position:relative;display:inline-block;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-checkbox[hidden]{display:none !important}.vot-checkbox>input{appearance:none;-moz-appearance:none;-webkit-appearance:none;z-index:1;position:absolute;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:3px 1px;border:solid 2px;background:rgba(0,0,0,0);border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6);border-radius:2px;width:18px;height:18px;outline:none;cursor:pointer;transition:border-color .2s,background-color .2s}.vot-checkbox>input+span{display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding-left:30px;width:inherit;cursor:pointer}.vot-checkbox>input+span::before{content:"";position:absolute;left:-10px;top:-8px;display:block;border-radius:50%;width:40px;height:40px;background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0));opacity:0;transform:scale(1);pointer-events:none;transition:opacity .3s,transform .2s}.vot-checkbox>input+span::after{content:"";z-index:1;display:block;position:absolute;top:3px;left:1px;-webkit-box-sizing:content-box !important;-moz-box-sizing:content-box !important;box-sizing:content-box !important;width:10px;height:5px;border:solid 2px rgba(0,0,0,0);border-right-width:0;border-top-width:0;pointer-events:none;transform:translate(3px, 4px) rotate(-45deg);transition:border-color .2s}.vot-checkbox>input:checked,.vot-checkbox>input:indeterminate{border-color:rgb(var(--vot-helper-theme));background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::before,.vot-checkbox>input:indeterminate+span::before{background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::after,.vot-checkbox>input:indeterminate+span::after{border-color:rgb(var(--vot-helper-ontheme, 255, 255, 255))}.vot-checkbox>input:indeterminate+span::after{border-left-width:0;transform:translate(4px, 3px)}.vot-checkbox:hover>input+span::before{opacity:.04}.vot-checkbox:active>input,.vot-checkbox:active:hover>input{border-color:rgb(var(--vot-helper-theme))}.vot-checkbox:active>input:checked{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6)}.vot-checkbox:active>input+span::before{opacity:1;transform:scale(0);transition:transform 0s,opacity 0s}.vot-checkbox>input:disabled{border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled:checked,.vot-checkbox>input:disabled:indeterminate{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38)}.vot-checkbox>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled+span::before{opacity:0;transform:scale(0)}.vot-slider{--vot-safari-helper1: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.04 ) !important;--vot-safari-helper2: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.12 ) !important;--vot-safari-helper3: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.16 ) !important;--vot-safari-helper4: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.24 ) !important;display:inline-block;width:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;font-family:var(--vot-font, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-slider[hidden]{display:none !important}.vot-slider>input{-webkit-appearance:none !important;appearance:none !important;position:relative !important;top:24px !important;display:block !important;margin:0 0 -36px !important;width:100% !important;height:36px !important;background-color:rgba(0,0,0,0) !important;cursor:pointer !important}.vot-slider>input:last-child{position:static !important;margin:0 !important}.vot-slider>span{display:inline-block !important;margin-bottom:36px !important}.vot-slider>input:disabled{cursor:default !important;opacity:.38 !important}.vot-slider>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input::-webkit-slider-runnable-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-webkit-slider-thumb{margin:0 !important;appearance:none !important;-webkit-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper1) !important}.vot-slider>input:active::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper4) !important}.vot-slider>input:disabled::-webkit-slider-runnable-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-webkit-slider-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;color:rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-range-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-moz-range-thumb{appearance:none !important;-moz-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider>input::-moz-range-progress{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider:hover>input:hover::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-moz-range-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-moz-range-progress{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important}.vot-slider>input:disabled::-moz-range-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-focus-outer{border:none !important}.vot-slider>input::-ms-track{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:17px 0 !important;border:none !important;border-radius:1px !important;padding:0 17px !important;width:100% !important;height:2px !important;background-color:rgba(0,0,0,0) !important}.vot-slider>input::-ms-fill-lower{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider>input::-ms-fill-upper{border-radius:1px !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-ms-thumb{appearance:none !important;margin:0 17px !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-ms-fill-lower{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-ms-fill-upper{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;opacity:.38 !important}.vot-slider>input:disabled::-ms-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::before{content:"" !important;display:block !important;position:absolute !important;width:calc(100%*var(--vot-progress, 0)) !important;height:2px !important;top:calc(50% - 1px) !important;background:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0) !important;--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87) !important;--vot-helper-safari1: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari2: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;display:flex;align-items:center;justify-content:space-between;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;line-height:1.5;text-align:start;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-select[hidden]{display:none !important}.vot-select-label{font-size:16px}.vot-select-outer{display:flex;align-items:center;justify-content:space-between;max-width:120px;width:120px;padding:0 5px;border-style:solid !important;border-width:1px !important;border-color:var(--vot-helper-safari1) !important;border-radius:4px !important;cursor:pointer;transition:border .2s !important}.vot-select-outer:hover{border-color:var(--vot-helper-safari2) !important}.vot-select-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vot-select-arrow-icon{width:20px;height:32px;display:flex;justify-content:center;align-items:center}.vot-select-content-list{display:flex;flex-direction:column}.vot-select-content-list .vot-select-content-item{padding:5px 10px;border-radius:8px;cursor:pointer}.vot-select-content-list .vot-select-content-item:not([inert]):hover{background-color:#2a2c31}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]{color:rgb(var(--vot-primary-rgb, 33, 150, 243));background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.2)}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]:hover{background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.1) !important}.vot-select-content-list .vot-select-content-item[data-vot-disabled=true]{cursor:default}.vot-select-content-list .vot-select-content-item[hidden]{display:none !important}.vot-header{color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-weight:bold;line-height:1.5;text-align:start}.vot-header[hidden]{display:none !important}.vot-header:not(:first-child){padding-top:8px}.vot-header-level-1{font-size:2em}.vot-header-level-2{font-size:1.5em}.vot-header-level-3{font-size:1.17em}.vot-header-level-4{font-size:1em}.vot-header-level-5{font-size:.83em}.vot-header-level-6{font-size:.67em}.vot-info{display:flex;color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-info[hidden]{display:none !important}.vot-info>:not(:first-child){color:rgba(var(--vot-helper-onsurface-rgb), 0.5);flex:1;margin-left:8px}.vot-lang-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);display:flex;align-items:center;justify-content:space-between;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-lang-select[hidden]{display:none !important}.vot-lang-select-icon{width:32px;height:32px;display:flex;justify-content:center;align-items:center}.vot-segmented-button{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:5rem;transform:translate(-50%);user-select:none;display:flex;align-items:center;height:32px;max-width:100vw;background:rgb(var(--vot-surface-rgb, 255, 255, 255));color:var(--vot-helper-theme);fill:var(--vot-helper-theme);border-radius:4px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;cursor:default;transition:opacity .5s;z-index:100}.vot-segmented-button[hidden]{display:none !important}.vot-segmented-button *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-segmented-button .vot-separator{width:1px;height:50%;background:rgba(var(--vot-helper-theme-rgb), 0.1)}.vot-segmented-button .vot-separator[hidden]{display:none !important}.vot-segmented-button .vot-segment,.vot-segmented-button .vot-segment-only-icon{position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;height:100%;padding:0 8px;background-color:rgba(0,0,0,0);color:inherit;transition:background-color 100ms ease-in-out;border:none}.vot-segmented-button .vot-segment[hidden],.vot-segmented-button [hidden].vot-segment-only-icon{display:none !important}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before,.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before{background-color:rgb(var(--vot-helper-theme-rgb));transition:opacity .2s}.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-segmented-button .vot-segment:hover::before,.vot-segmented-button .vot-segment-only-icon:hover::before{opacity:.04}.vot-segmented-button .vot-segment:active::after,.vot-segmented-button .vot-segment-only-icon:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-segmented-button .vot-segment-only-icon{min-width:32px;padding:0}.vot-segmented-button .vot-segment-label{margin-left:8px;white-space:nowrap}.vot-segmented-button[data-status=success] .vot-translate-button{color:rgb(var(--vot-primary-rgb, 33, 150, 243));fill:rgb(var(--vot-primary-rgb, 33, 150, 243))}.vot-segmented-button[data-status=error] .vot-translate-button{color:#f28b82;fill:#f28b82}.vot-segmented-button svg{width:fit-content}.vot-menu{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:calc(5rem + 32px + 16px);user-select:none;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);border-radius:8px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;min-width:300px;cursor:default;z-index:100;visibility:visible;opacity:1;transform-origin:top;transform:translate(-50%) scale(1);transition:opacity .3s,transform .1s}.vot-menu *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-menu[hidden]{pointer-events:none;display:block !important;pointer-events:none;visibility:hidden;opacity:0;transform:translate(-50%) scale(0)}.vot-menu-content-wrapper{display:flex;flex-direction:column;min-height:100px;max-height:calc(var(--vot-container-height, 75vh) - (5rem + 32px + 16px)*2);overflow:auto}.vot-menu-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-menu-header-container:empty{padding:0 0 16px 0}.vot-menu-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-menu-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0;text-align:start}.vot-menu-title{flex:1;font-size:16px;line-height:1;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 16px;gap:8px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar,.vot-menu-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-menu-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-footer-container:empty{padding:16px 0 0 0}.vot-dialog-container{visibility:visible;position:absolute;z-index:10000}.vot-dialog-container[hidden]{display:block !important;pointer-events:none;visibility:hidden}.vot-dialog-container *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-dialog-backdrop{background-color:rgba(0,0,0,.6);position:fixed;top:0;right:0;bottom:0;left:0;opacity:1;transition:opacity .3s}[hidden]>.vot-dialog-backdrop{pointer-events:none;opacity:0}.vot-dialog{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);display:block;position:fixed;top:50%;bottom:50%;max-width:initial;max-height:initial;width:min(var(--vot-dialog-width, 512px),100%);height:fit-content;inset-inline-start:0px;inset-inline-end:0px;inset-block-start:0px;inset-block-end:0px;border-radius:8px;margin:auto;padding:0;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);box-shadow:0 0 16px rgba(0,0,0,.12),0 16px 16px rgba(0,0,0,.24);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;user-select:none;visibility:visible;overflow:auto;overflow-y:hidden;opacity:1;transform-origin:center;transform:scale(1);transition:opacity .3s,transform .1s}[hidden]>.vot-dialog{pointer-events:none;opacity:0;transform:scale(0.5);transition:opacity .1s,transform .2s}.vot-dialog-content-wrapper{display:flex;flex-direction:column;max-height:75vh;overflow:auto}.vot-dialog-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-dialog-header-container:empty{padding:0 0 20px 0}.vot-dialog-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-dialog-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0}.vot-dialog-title{flex:1;font-size:115.3846153846%;font-weight:bold;line-height:1;padding-bottom:16px;padding-inline-end:20px;padding-inline-start:20px;padding-top:20px}.vot-dialog-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 20px;gap:16px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar,.vot-dialog-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-dialog-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-dialog-footer-container:empty{padding:20px 0 0 0}.vot-subtitles-widget{display:flex;justify-content:center;align-items:center;position:absolute;width:50%;max-height:100%;min-height:20%;z-index:100;left:25%;top:75%;pointer-events:none}.vot-subtitles{position:relative;max-width:100%;max-height:100%;width:max-content;background:var(--vot-subtitles-background, rgba(46, 47, 52, 0.8));color:var(--vot-subtitles-color, rgb(227, 227, 227));border-radius:1rem;pointer-events:all;padding:1rem;font-size:2rem;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vot-subtitles .passed{color:var(--vot-subtitles-passed-color, rgb(33, 150, 243))}:root{--vot-font-family: "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system;--vot-primary-rgb: 139, 180, 245;--vot-onprimary-rgb: 32, 33, 36;--vot-surface-rgb: 32, 33, 36;--vot-onsurface-rgb: 227, 227, 227;--vot-subtitles-background: rgba(var(--vot-surface-rgb, 46, 47, 52), 0.8);--vot-subtitles-color: rgb(var(--vot-onsurface-rgb, 227, 227, 227));--vot-subtitles-passed-color: rgb(var(--vot-primary-rgb, 33, 150, 243))}vot-block{display:block}',""]);const s=r},"./node_modules/css-loader/dist/runtime/api.js":t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,i,a){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var s=0;s0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js":t=>{"use strict";t.exports=function(t){return t[1]}},"./node_modules/requestidlecallback-polyfill/index.js":()=>{window.requestIdleCallback=window.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)},window.cancelIdleCallback=window.cancelIdleCallback||function(t){clearTimeout(t)}},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},"./node_modules/style-loader/dist/runtime/insertStyleElement.js":t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":(t,e,o)=>{"use strict";t.exports=function(t){var e=o.nc;e&&t.setAttribute("nonce",e)}},"./node_modules/style-loader/dist/runtime/styleDomAPI.js":t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(o){!function(t,e,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,i&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,o)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},"./node_modules/style-loader/dist/runtime/styleTagTransform.js":t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},"./src/config/config.js":(t,e,o)=>{"use strict";o.d(e,{EY:()=>d,I1:()=>a,Rr:()=>r,e6:()=>i,iF:()=>n,jm:()=>c,kF:()=>l,rm:()=>u,sN:()=>s});const n="api.browser.yandex.ru",i="m3u8proxy.toil-dump.workers.dev",a="xtGCyGdTY2Jy6OMEKdTuXev3Twhkamgm",r="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 YaBrowser/23.7.1.1140 Yowser/2.5 Safari/537.36",s=.15,l="yandex",d="yandex",c={yandex:"https://translate.toil.cc/detect",rustServer:"https://rust-server-531j.onrender.com/detect"},u={yandex:"https://translate.toil.cc/translate"}},"./src/utils/debug.js":(t,e,o)=>{"use strict";o.d(e,{Z:()=>n});const n={log:(...t)=>{}}},"./src/yandexRequest.js":(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>a});var n=o("./src/config/config.js"),i=o("./src/utils/debug.js");const a=async function(t,e,o,a){try{i.Z.log("yandexRequest:",t);const r={url:`https://${n.iF}${t}`,method:"POST",headers:{Accept:"application/x-protobuf","Accept-Language":"en","Content-Type":"application/x-protobuf","User-Agent":n.Rr,Pragma:"no-cache","Cache-Control":"no-cache","Sec-Fetch-Mode":"no-cors","sec-ch-ua":null,"sec-ch-ua-mobile":null,"sec-ch-ua-platform":null,...o},binary:!0,data:new Blob([e]),responseType:"arraybuffer"};GM_xmlhttpRequest({...r,onload:t=>{i.Z.log("yandexRequest:",t.status,t),a(200===t.status,t.response)},onerror:t=>{console.error("[VOT]",t),a(!1)}})}catch(t){console.error("[VOT]",t),a(!1)}}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,exports:{}};return t[n].call(a.exports,a,a.exports,o),a.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nc=void 0,(()=>{"use strict";var t=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),e=o.n(t),n=o("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),i=o.n(n),a=o("./node_modules/style-loader/dist/runtime/insertBySelector.js"),r=o.n(a),s=o("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),l=o.n(s),d=o("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),c=o.n(d),u=o("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),h=o.n(u),p=o("./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss"),g={};g.styleTagTransform=h(),g.setAttributes=l(),g.insert=r().bind(null,"head"),g.domAPI=i(),g.insertStyleElement=c(),e()(p.Z,g),p.Z&&p.Z.locals&&p.Z.locals;const v=JSON.parse('{"__version__":2,"recommended":"recommended","translateVideo":"Translate video","disableTranslate":"Turn off","translationSettings":"Translation settings","subtitlesSettings":"Subtitles settings","about":"About extension","resetSettings":"Reset settings","videoBeingTranslated":"The video is being translated","videoLanguage":"Video language","translationLanguage":"Translation language","translationTake":"The translation will take","translationTakeMoreThanHour":"The translation will take more than an hour","translationTakeAboutMinute":"The translation will take about a minute","translationTakeFewMinutes":"The translation will take a few minutes","translationTakeApproximatelyMinutes":"The translation will take approximately {0} minutes","translationTakeApproximatelyMinute":"The translation will take approximately {0} minutes","unSupportedExtensionError":"Error! {0} is not supported by this version of the extension!\\n\\nPlease use the cloudflare version of the VOT extension.","requestTranslationFailed":"Failed to request video translation","audioNotReceived":"Audio link not received","grantPermissionToAutoPlay":"Grant permission to autoplay","neededAdditionalExtension":"An additional extension is needed to support this site","audioFormatNotSupported":"The audio format is not supported","VOTAutoTranslate":"Translate on open","VOTDontTranslateYourLang":"Do not translate from my language","VOTVolume":"Video volume","VOTVolumeTranslation":"Translation Volume","VOTAutoSetVolume":"Reduce video volume to ","VOTShowVideoSlider":"Video volume slider","VOTSyncVolume":"Link translation and video volume","VOTAudioProxy":"Proxy received audio","VOTDisableFromYourLang":"You have disabled the translation of the video in your language","VOTLiveNotSupported":"Translation of live streams is not supported","VOTPremiere":"Wait for the premiere to end before translating","VOTVideoIsTooLong":"Video is too long","VOTNoVideoIDFound":"No video ID found","VOTFailedInitDB":"Failed to initialize database","VOTDBNeedUpdate":"The database needs an update, please reload the page","VOTDisabledForDBUpdating":"VOT is disabled due to an error when updating the Database. Close all open tabs with {0} and try again","VOTFailedWriteToDB":"Data could not be written to the database","VOTFailedReadFromDB":"Data could not be retrieved from the database","VOTSubtitles":"Subtitles","VOTSubtitlesDisabled":"Disabled","VOTSubtitlesMaxLength":"Subtitles max length","VOTHighlightWords":"Highlight words","VOTTranslatedFrom":"translated from","VOTAutogenerated":"autogenerated","VOTSettings":"VOT Settings","VOTMenuLanguage":"Menu language","VOTAuthors":"Authors","VOTVersion":"Version","VOTLoader":"Loader","VOTBrowser":"Browser","VOTShowPiPButton":"Show PiP button","langs":{"auto":"Auto","af":"Afrikaans","ak":"Akan","sq":"Albanian","am":"Amharic","ar":"Arabic","hy":"Armenian","as":"Assamese","ay":"Aymara","az":"Azerbaijani","bn":"Bangla","eu":"Basque","be":"Belarusian","bho":"Bhojpuri","bs":"Bosnian","bg":"Bulgarian","my":"Burmese","ca":"Catalan","ceb":"Cebuano","zh":"Chinese","zh-Hans":"Chinese (Simplified)","zh-Hant":"Chinese (Traditional)","co":"Corsican","hr":"Croatian","cs":"Czech","da":"Danish","dv":"Divehi","nl":"Dutch","en":"English","eo":"Esperanto","et":"Estonian","ee":"Ewe","fil":"Filipino","fi":"Finnish","fr":"French","gl":"Galician","lg":"Ganda","ka":"Georgian","de":"German","el":"Greek","gn":"Guarani","gu":"Gujarati","ht":"Haitian Creole","ha":"Hausa","haw":"Hawaiian","iw":"Hebrew","hi":"Hindi","hmn":"Hmong","hu":"Hungarian","is":"Icelandic","ig":"Igbo","id":"Indonesian","ga":"Irish","it":"Italian","ja":"Japanese","jv":"Javanese","kn":"Kannada","kk":"Kazakh","km":"Khmer","rw":"Kinyarwanda","ko":"Korean","kri":"Krio","ku":"Kurdish","ky":"Kyrgyz","lo":"Lao","la":"Latin","lv":"Latvian","ln":"Lingala","lt":"Lithuanian","lb":"Luxembourgish","mk":"Macedonian","mg":"Malagasy","ms":"Malay","ml":"Malayalam","mt":"Maltese","mi":"Māori","mr":"Marathi","mn":"Mongolian","ne":"Nepali","nso":"Northern Sotho","no":"Norwegian","ny":"Nyanja","or":"Odia","om":"Oromo","ps":"Pashto","fa":"Persian","pl":"Polish","pt":"Portuguese","pa":"Punjabi","qu":"Quechua","ro":"Romanian","ru":"Russian","sm":"Samoan","sa":"Sanskrit","gd":"Scottish Gaelic","sr":"Serbian","sn":"Shona","sd":"Sindhi","si":"Sinhala","sk":"Slovak","sl":"Slovenian","so":"Somali","st":"Southern Sotho","es":"Spanish","su":"Sundanese","sw":"Swahili","sv":"Swedish","tg":"Tajik","ta":"Tamil","tt":"Tatar","te":"Telugu","th":"Thai","ti":"Tigrinya","ts":"Tsonga","tr":"Turkish","tk":"Turkmen","uk":"Ukrainian","ur":"Urdu","ug":"Uyghur","uz":"Uzbek","vi":"Vietnamese","cy":"Welsh","fy":"Western Frisian","xh":"Xhosa","yi":"Yiddish","yo":"Yoruba","zu":"Zulu"},"udemyAccessTokenExpired":"Your entered Udemy Access Token has expired","udemyModuleArgsNotFound":"Could not get udemy module data due to the fact that ModuleArgs was not found","VOTTranslationHelpNull":"Could not get the data required for the translate","enterUdemyAccessToken":"Enter Udemy Access Token","VOTUdemyData":"Udemy Data","streamNoConnectionToServer":"There is no connection to the server","VOTCloudflareDoesntSupportStreams":"The Cloudflare version of the script does not support stream translation","searchField":"Search...","VOTTranslateAPIErrors":"Translate errors from the API","VOTTranslationService":"Translation Service","VOTDetectService":"Detect Service","VOTTranslatingError":"Translating the error"}');var m=o("./src/utils/debug.js");const b=new class{constructor(){this.gmSupport="function"==typeof GM_getValue,m.Z.log(`GM Storage Status: ${this.gmSupport}`)}syncGet(t,e=void 0,o=!1){if(this.gmSupport)return GM_getValue(t,e);let n=window.localStorage.getItem(t);if("udemyData"===t&&"string"==typeof n)try{n=JSON.parse(n)}catch{n=e}return o?Number(n)??Number(e):n??e}async get(t,e=void 0,o=!1){return this.gmSupport?await GM_getValue(t,e):new Promise((n=>{n(this.syncGet(t,e,o))}))}syncSet(t,e){return this.gmSupport?GM_setValue(t,e):("udemyData"===t&&(e=JSON.stringify(e)),window.localStorage.setItem(t,e))}async set(t,e){return this.gmSupport?await GM_setValue(t,e):new Promise((o=>{o(this.syncSet(t,e))}))}syncDelete(t){return this.gmSupport?GM_deleteValue(t):window.localStorage.removeItem(t)}async delete(t){return this.gmSupport?await GM_deleteValue(t):new Promise((e=>{e(this.syncDelete(t))}))}syncList(){return this.gmSupport?GM_listValues():["autoTranslate","dontTranslateLanguage","dontTranslateYourLang","autoSetVolumeYandexStyle","showVideoSlider","syncVolume","subtitlesMaxLength","highlightWords","responseLanguage","defaultVolume","udemyData","audioProxy","showPiPButton","locale-version","locale-lang","locale-phrases"]}async list(){return this.gmSupport?await GM_listValues():new Promise((t=>{t(this.syncList())}))}},f=["auto","en","ru","af","am","ar","az","bg","bn","bs","ca","cs","cy","da","de","el","es","et","eu","fa","fi","fr","gl","hi","hr","hu","hy","id","it","ja","jv","kk","km","kn","ko","lo","mk","ml","mn","ms","mt","my","ne","nl","pa","pl","pt","ro","si","sk","sl","sq","sr","su","sv","sw","tr","uk","ur","uz","vi","zh","zu"],y=new class{lang="en";locale={};gmValues=["locale-phrases","locale-lang","locale-version","locale-lang-override"];constructor(){const t=b.syncGet("locale-lang-override","auto");this.lang=t&&"auto"!==t?t:(navigator.language||navigator.userLanguage)?.substr(0,2)?.toLowerCase()??"en",this.setLocaleFromJsonString(b.syncGet("locale-phrases",""))}reset(){this.gmValues.forEach((t=>b.syncDelete(t)))}async update(t=!1){(t||2!==await b.get("locale-version",0,!0)||await b.get("locale-lang")!==this.lang)&&(m.Z.log("Updating locale..."),await fetch(`https://raw.githubusercontent.com/ilyhalight/voice-over-translation/dev/src/localization/locales/${this.lang}.json`).then((t=>{if(200===t.status)return t.text();throw t.status})).then((async t=>{await b.set("locale-phrases",t),this.setLocaleFromJsonString(t);const e=this.getFromLocale(this.locale,"__version__");"number"==typeof e&&await b.set("locale-version",e),await b.set("locale-lang",this.lang)})).catch((async t=>{console.error("[VOT] [localizationProvider] failed get locale, cause:",t),this.setLocaleFromJsonString(await b.get("locale-phrases",""))})))}setLocaleFromJsonString(t){try{this.locale=JSON.parse(t)??{}}catch(t){console.error("[VOT] [localizationProvider]",t),this.locale={}}}getFromLocale(t,e){const o=e.split(".").reduce(((t,e)=>{if("object"==typeof t&&t)return t[e]}),t);return void 0===o&&console.warn("[VOT] [localizationProvider] locale",t,"doesn't contain key",e),o}getDefault(t){return this.getFromLocale(v,t)??t}get(t){return this.getFromLocale(this.locale,t)??this.getFromLocale(v,t)??t}};class w extends Error{constructor(t){super(y.getDefault(t)),this.name="VOTLocalizedError",this.unlocalizedMessage=t,this.localizedMessage=y.get(t)}}const x=["ru","en","zh","ko","lt","lv","ar","fr","it","es","de","ja"],S=["kk","bn","pt","cs","hi","mr","te","tr","ms","vi","ta","jv","ur","fa","gu","id","uk","da","fi","uz","pl","sv","az","sq","am","hy","af","eu","my","bg","bs","cy","hu","gl","el","zu","kn","ca","km","lo","mk","ml","mt","mn","ne","nl","pa","ro","sr","si","sk","sl","sw","su","hr","et"],T=["ru","en","kk"],k=["Violentmonkey","FireMonkey","Greasemonkey","AdGuard","OrangeMonkey"],V=navigator.language||navigator.userLanguage,M=V?.substr(0,2)?.toLowerCase()??"en";String.prototype.format||(String.prototype.format=function(){var t=arguments;return this.replace(/{(\d+)}/g,(function(e,o){return void 0!==t[o]?t[o]:e}))});const L=t=>new Promise((e=>setTimeout(e,t))),O=(t,e)=>{const o=new URL(window.location.href);switch(t){case"piped":case"invidious":case"youtube":return o.pathname.match(/(?:watch|embed|shorts)\/([^/]+)/)?.[1]||o.searchParams.get("v");case"vk":return o.pathname.match(/^\/video-?[0-9]{8,9}_[0-9]{9}$/)?o.pathname.match(/^\/video-?[0-9]{8,9}_[0-9]{9}$/)[0].slice(1):o.searchParams.get("z")?o.searchParams.get("z").split("/")[0]:!(!o.searchParams.get("oid")||!o.searchParams.get("id"))&&`video-${Math.abs(o.searchParams.get("oid"))}_${o.searchParams.get("id")}`;case"nine_gag":case"9gag":case"gag":return o.pathname.match(/gag\/([^/]+)/)?.[1];case"twitch":if(/^m\.twitch\.tv$/.test(window.location.hostname)){const t=document.head.querySelector('link[rel="canonical"]');return t?.href.match(/videos\/([^/]+)/)?.[0]||o.pathname.slice(1)}if(/^player\.twitch\.tv$/.test(window.location.hostname))return`videos/${o.searchParams.get("video")}`;if(/^clips\.twitch\.tv$/.test(window.location.hostname)){const t=document.querySelector(".tw-link[data-test-selector='stream-info-card-component__stream-avatar-link']");return!!t&&`${t.href.replace("https://www.twitch.tv/","")}/clip/${o.searchParams.get("clip")}`}return o.pathname.match(/([^/]+)\/(?:clip)\/([^/]+)/)?o.pathname.match(/([^/]+)\/(?:clip)\/([^/]+)/)[0]:o.pathname.match(/(?:videos)\/([^/]+)/)?.[0];case"proxytok":return o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];case"tiktok":{let t=o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];if(!t){const o=e.closest(".xgplayer-playing, .tiktok-web-player"),n=o?.closest('div[data-e2e="recommend-list-item-container"]'),i=n?.querySelector('a[data-e2e="video-author-avatar"]');if(o&&i){const e=o.id?.match(/^xgwrapper-[0-9]+-(.*)$/)?.at(1),n=i.href?.match(/.*(@.*)$/)?.at(1);e&&n&&(t=`${n}/video/${e}`)}}return t}case"vimeo":return o.pathname.match(/[^/]+\/[^/]+$/)?.[0]||o.pathname.match(/[^/]+$/)?.[0];case"xvideos":return o.pathname.match(/[^/]+\/[^/]+$/)?.[0];case"pornhub":return o.searchParams.get("viewkey")||o.pathname.match(/embed\/([^/]+)/)?.[1];case"twitter":return o.pathname.match(/status\/([^/]+)/)?.[1];case"udemy":case"rumble":return o.pathname;case"facebook":return!!o.searchParams.get("v")&&o.searchParams.get("v");case"rutube":return o.pathname.match(/(?:video|embed)\/([^/]+)/)?.[1];case"coub":return o.pathname.includes("/view")?o.pathname.match(/view\/([^/]+)/)?.[1]:o.pathname.includes("/embed")?o.pathname.match(/embed\/([^/]+)/)?.[1]:document.querySelector(".coub.active")?.dataset?.permalink;case"bilibili":{const t=o.searchParams.get("bvid");if(t)return t;{let t=o.pathname.match(/video\/([^/]+)/)?.[1];return t&&o.search&&null!==o.searchParams.get("p")&&(t+=`/?p=${o.searchParams.get("p")}`),t}}case"mail_ru":if(o.pathname.startsWith("/v/")||o.pathname.startsWith("/mail/"))return o.pathname;if(o.pathname.match(/video\/embed\/([^/]+)/)){const t=document.querySelector(".b-video-controls__mymail-link");return!!t&&t?.href.split("my.mail.ru")?.[1]}return!1;case"bitchute":return o.pathname.match(/video\/([^/]+)/)?.[1];case"coursera":return o.pathname.match(/learn\/([^/]+)\/lecture\/([^/]+)/)?.[0];case"eporner":return o.pathname.match(/video-([^/]+)\/([^/]+)/)?.[0];case"peertube":return o.pathname.match(/\/w\/([^/]+)/)?.[0];case"dailymotion":{const t=Array.from(document.scripts).filter((t=>t.innerText.trim().includes("window.__PLAYER_CONFIG__ = {")));if(!t.length)return!1;try{let e=t[0].innerText.trim().replace("window.__PLAYER_CONFIG__ = ","");e.endsWith("};")&&(e=e.substring(0,e.length-1));const o=JSON.parse(e),n=o.context.embedder??o.context.http_referer;return console.log(n,o),n.match(/\/video\/([^/]+)/)?.[1]}catch(t){return console.error("[VOT]",t),!1}}case"trovo":{if(!o.pathname.startsWith("/s/"))return!1;const t=o.searchParams.get("vid");if(!t)return!1;const e=o.pathname.match(/([^/]+)\/([\d]+)/)?.[0];return!!e&&`${e}?vid=${t}`}case"yandexdisk":return o.pathname.match(/\/i\/([^/]+)/)?.[1];default:return!1}};function E(t){return t.toLowerCase().split(";")[0].trim().split("-")[0].split("_")[0]}function P(){return"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}function C(){return"undefined"!=typeof Hls&&Hls?.isSupported()?new Hls({debug:!1,lowLatencyMode:!0,backBufferLength:90}):void 0}var A=o("./src/config/config.js");const B={async translate(t,e){try{const o=await fetch(A.rm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})}),n=await o.json();if(200!==n.code)throw o.message;return n.text[0]}catch(e){return console.error("Error translating text:",e),t}},async detect(t,e){try{const o=await fetch(A.jm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})}),n=await o.json();if(200!==n.code)throw o.message;return n.lang??"en"}catch(t){return console.error("Error translating text:",t),"en"}}},F={async detect(t){try{const e=await fetch(A.jm.rustServer,{method:"POST",body:t});return await e.text()}catch(t){return console.error("Error getting lang from text:",t),"en"}}};async function _(t,e="",o="ru"){if("yandex"===await b.get("translationService",A.kF)){const n=e&&o?`${e}-${o}`:o;return await B.translate(t,n)}return t}const R=["yandex"],q=["yandex","rust-server"];function z(){return/^m\.youtube\.com$/.test(window.location.hostname)}function D(){return window.location.pathname.startsWith("/shorts/")?z()?document.querySelector("#movie_player"):document.querySelector("#shorts-player"):document.querySelector("#movie_player")}function I(){const t=D();return t?.getPlayerResponse?t?.getPlayerResponse?.call()??null:t?.data?.playerResponse??null}function N(){const t=D();return t?.getVideoData?t?.getVideoData?.call()??null:t?.data?.playerResponse?.videoDetails??null}const j=function(){const t=D();return t?.getVolume?t.getVolume.call()/100:1},$=function(){const t=I();let e=t?.captions?.playerCaptionsTracklistRenderer?.captionTracks??[];return e=e.reduce(((t,e)=>{if("languageCode"in e){const o=e?.languageCode?E(e?.languageCode):void 0,n=e?.url||e?.baseUrl;o&&n&&t.push({source:"youtube",language:o,isAutoGenerated:"asr"===e?.kind,url:`${n.startsWith("http")?n:`${window.location.origin}/${n}`}&fmt=json3`})}return t}),[]),m.Z.log("youtube subtitles:",e),e},H=async function(){const t=D(),e=I(),o=N(),{author:n,title:i}=o??{},{shortDescription:a,isLive:r,isLiveContent:s,isUpcoming:l}=e?.videoDetails??{},d=!(!r&&!l||s);let c=await async function(t,e,o,n){if(!window.location.hostname.includes("m.youtube.com")&&t?.getAudioTrack){const e=t.getAudioTrack(),o=e?.getLanguageInfo();if("und"!==o?.id)return E(o.id.split(".")[0])}const i=e?.captions?.playerCaptionsTracklistRenderer?.captionTracks;if(i?.length){const t=i.find((t=>"asr"===t.kind));if(t&&t.languageCode)return E(t.languageCode)}if(!n||!o)return"en";const a=[n.split("\n").filter((t=>!t.match(/https?:\/\/\S+/))).join("\n").replace(/#\S+/g,"").replace(/[^\p{L}\s]/gu,"").replace(/\s+/g," ").trim().slice(0,250),o].join("");return await async function(t){switch(await b.get("detectService",A.EY)){case"yandex":return await B.detect(t);case"rust-server":return await F.detect(t);default:return"en"}}(a)}(t,e,i,a);x.includes(c)||(c="en");const u={isLive:!!r,isPremiere:d,title:i,description:a,author:n,detectedLanguage:c};return m.Z.log("youtube video data:",u),console.log("[VOT] Detected language: ",u.detectedLanguage),u},Z=function(t){const e=D();if(e?.setVolume)return e.setVolume(Math.round(100*t)),!0},U=function(t,e){m.Z.log("videoSeek",e);const o=(D()?.getProgressState()?.seekableEnd||t.currentTime)-e;t.currentTime=o},W=new protobuf.Type("VideoTranslationHelpObject").add(new protobuf.Field("target",1,"string")).add(new protobuf.Field("targetUrl",2,"string")),G=new protobuf.Type("VideoTranslationRequest").add(new protobuf.Field("url",3,"string")).add(new protobuf.Field("deviceId",4,"string")).add(new protobuf.Field("firstRequest",5,"bool")).add(new protobuf.Field("duration",6,"double")).add(new protobuf.Field("unknown2",7,"int32")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("unknown3",9,"int32")).add(new protobuf.Field("unknown4",10,"int32")).add(new protobuf.Field("translationHelp",11,"VideoTranslationHelpObject","repeated")).add(new protobuf.Field("responseLanguage",14,"string")).add(new protobuf.Field("unknown5",15,"int32")),Y=new protobuf.Type("VideoSubtitlesRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")),K=new protobuf.Type("VideoStreamRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")).add(new protobuf.Field("responseLanguage",3,"string")),J=new protobuf.Type("VideoStreamPingRequest").add(new protobuf.Field("pingId",1,"int32")),Q=new protobuf.Type("VideoTranslationResponse").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("duration",2,"double")).add(new protobuf.Field("status",4,"int32")).add(new protobuf.Field("remainingTime",5,"int32")).add(new protobuf.Field("unknown0",6,"int32")).add(new protobuf.Field("unknown1",7,"string")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("message",9,"string")),X=new protobuf.Type("VideoSubtitlesObject").add(new protobuf.Field("language",1,"string")).add(new protobuf.Field("url",2,"string")).add(new protobuf.Field("unknown2",3,"int32")).add(new protobuf.Field("translatedLanguage",4,"string")).add(new protobuf.Field("translatedUrl",5,"string")).add(new protobuf.Field("unknown5",6,"int32")).add(new protobuf.Field("unknown6",7,"int32")),tt=new protobuf.Type("VideoSubtitlesResponse").add(new protobuf.Field("unknown0",1,"int32")).add(new protobuf.Field("subtitles",2,"VideoSubtitlesObject","repeated")),et=new protobuf.Type("VideoStreamObject").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("timestamp",2,"int64")),ot=new protobuf.Type("VideoStreamResponse").add(new protobuf.Field("interval",1,"int32")).add(new protobuf.Field("translatedInfo",2,"VideoStreamObject")).add(new protobuf.Field("pingId",3,"int32")),nt=(new protobuf.Root).define("yandex").add(W).add(G).add(Q).add(Y).add(X).add(tt).add(J).add(K).add(et).add(ot),it=(t,e,o,n,i)=>nt.VideoTranslationRequest.encode({url:t,firstRequest:!0,duration:e,unknown2:1,language:o,unknown3:0,unknown4:0,translationHelp:i,responseLanguage:n,unknown5:0}).finish(),at=t=>nt.VideoTranslationResponse.decode(new Uint8Array(t)),rt=(t,e)=>nt.VideoSubtitlesRequest.encode({url:t,language:e}).finish(),st=t=>nt.VideoSubtitlesResponse.decode(new Uint8Array(t)),lt=t=>nt.VideoStreamPingRequest.encode({pingId:t}).finish(),dt=(t,e,o)=>nt.VideoStreamRequest.encode({url:t,language:e,responseLanguage:o}).finish(),ct=t=>nt.VideoStreamResponse.decode(new Uint8Array(t)),ut=["invidious.snopyta.org","yewtu.be","invidious.kavin.rocks","vid.puffyan.us","invidious.namazso.eu","inv.riverside.rocks","yt.artemislena.eu","invidious.flokinet.to","invidious.esmailelbob.xyz","y.com.sb","invidious.nerdvpn.de","inv.vern.cc","invidious.slipfox.xyz","invidio.xamh.de","invidious.dhusch.de"],ht=["piped.video","piped.tokhmi.xyz","piped.moomoo.me","piped.syncpundit.io","piped.mha.fi","watch.whatever.social","piped.garudalinux.org","efy.piped.pages.dev","watch.leptons.xyz","piped.lunar.icu","yt.dc09.ru","piped.mint.lgbt","il.ax","piped.privacy.com.de","piped.esmailelbob.xyz","piped.projectsegfau.lt","piped.in.projectsegfau.lt","piped.us.projectsegfau.lt","piped.privacydev.net","piped.palveluntarjoaja.eu","piped.smnz.de","piped.adminforge.de","piped.qdi.fi","piped.hostux.net","piped.chauvet.pro","piped.jotoma.de","piped.pfcd.me","piped.frontendfriendly.xyz"];function pt(t){const e=document.createElement("vot-block");return e.classList.add("vot-icon-button"),e.innerHTML=t,e}function gt(t){const e=parseFloat(t.value),o=""===t.min?0:parseFloat(t.min),n=(e-o)/((""===t.max?100:parseFloat(t.max))-o);t.parentElement.setAttribute("style",`--vot-progress: ${n}`)}function vt(t,e="",o=!1){const n=document.createElement("vot-block");n.classList.add("vot-textfield");const i=document.createElement(o?"textarea":"input");i.placeholder=" ",i.value=e;const a=document.createElement("span");return a.innerHTML=t,n.appendChild(i),n.appendChild(a),{container:n,input:i,label:a}}function mt(t){const e=document.createElement("vot-block");e.classList.add("vot-dialog-container"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-dialog-backdrop");const n=document.createElement("vot-block");n.classList.add("vot-dialog");const i=document.createElement("vot-block");i.classList.add("vot-dialog-content-wrapper");const a=document.createElement("vot-block");a.classList.add("vot-dialog-header-container");const r=document.createElement("vot-block");r.classList.add("vot-dialog-body-container");const s=document.createElement("vot-block");s.classList.add("vot-dialog-footer-container");const l=document.createElement("vot-block");l.classList.add("vot-dialog-title-container");const d=pt('');d.classList.add("vot-dialog-close-button"),o.onclick=d.onclick=()=>{e.hidden=!0};const c=document.createElement("vot-block");return c.classList.add("vot-dialog-title"),c.innerHTML=t,e.appendChild(o),e.appendChild(n),n.appendChild(i),i.appendChild(a),i.appendChild(r),i.appendChild(s),a.appendChild(l),a.appendChild(d),l.appendChild(c),{container:e,backdrop:o,dialog:n,contentWrapper:i,headerContainer:a,bodyContainer:r,footerContainer:s,titleContainer:l,closeButton:d,title:c}}function bt(t,e,o,n={}){const i=n.onSelectCb||function(){},a=n.labelElement||"";let r=[];const s=document.createElement("vot-block");s.classList.add("vot-select"),a&&s.appendChild(a);const l=document.createElement("vot-block");l.classList.add("vot-select-outer");const d=document.createElement("span");d.classList.add("vot-select-title"),d.innerText=t,void 0===t&&(d.innerText=o.find((t=>!0===t.selected))?.label);const c=document.createElement("vot-block");return c.classList.add("vot-select-arrow-icon"),c.innerHTML='',l.append(d,c),l.onclick=()=>{const t=mt(e);t.container.classList.add("vot-dialog-temp"),t.container.hidden=!1,document.documentElement.appendChild(t.container);const n=document.createElement("vot-block");n.classList.add("vot-select-content-list");for(const t of o){const e=document.createElement("vot-block");e.classList.add("vot-select-content-item"),e.innerText=t.label,e.dataset.votSelected=t.selected,e.dataset.votValue=t.value,t.disabled&&(e.inert=!0),e.onclick=async a=>{a.target.inert||(n.childNodes.forEach((t=>t.dataset.votSelected=!1)),o.forEach((e=>e.selected=e.value===t.value)),e.dataset.votSelected=!0,d.innerText=t.label,await i(a))},n.appendChild(e)}const a=vt(y.get("searchField"));a.input.oninput=t=>{const e=t.target.value.toLowerCase();Array.from(r).forEach((t=>t.hidden=!t.innerText.toLowerCase().includes(e)))},t.bodyContainer.append(a.container,n),r=n.childNodes,t.backdrop.onclick=t.closeButton.onclick=()=>{t.container.remove(),r=[]}},s.append(l),{container:s,title:d,arrowIcon:c,labelElement:a,setTitle:t=>{d.innerText=t},setSelected:t=>{Array.from(r).filter((t=>!t.inert)).forEach((e=>e.dataset.votSelected=e.dataset.votValue===t)),o.forEach((e=>e.selected=String(e.value)===t))},updateItems:t=>{o=t}}}const ft={createHeader:function(t,e=4){const o=document.createElement("vot-block");return o.classList.add("vot-header"),o.classList.add(`vot-header-level-${e}`),o.innerHTML=t,o},createInformation:function(t,e){const o=document.createElement("vot-block");o.classList.add("vot-info");const n=document.createElement("vot-block");n.innerHTML=t;const i=document.createElement("vot-block");return i.innerHTML=e,o.appendChild(n),o.appendChild(i),{container:o,header:n,value:i}},createButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-button"),e.innerHTML=t,e},createTextButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-text-button"),e.innerHTML=t,e},createOutlinedButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-outlined-button"),e.innerHTML=t,e},createIconButton:pt,createCheckbox:function(t,e=!1){const o=document.createElement("label");o.classList.add("vot-checkbox");const n=document.createElement("input");n.type="checkbox",n.checked=Boolean(e);const i=document.createElement("span");return i.innerHTML=t,o.appendChild(n),o.appendChild(i),{container:o,input:n,label:i}},createSlider:function(t,e=50,o=0,n=100){const i=document.createElement("vot-block");i.classList.add("vot-slider");const a=document.createElement("input");a.type="range",a.min=o,a.max=n,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),a.addEventListener("input",(t=>gt(t.target))),gt(a),{container:i,input:a,label:r}},createTextfield:vt,createDialog:mt,createVOTButton:function(t){const e=document.createElement("vot-block");e.classList.add("vot-segmented-button");const o=document.createElement("vot-block");o.classList.add("vot-segment"),o.classList.add("vot-translate-button"),o.innerHTML='';const n=document.createElement("vot-block");n.classList.add("vot-separator");const i=document.createElement("vot-block");i.classList.add("vot-segment-only-icon"),i.innerHTML='';const a=document.createElement("vot-block");a.classList.add("vot-separator");const r=document.createElement("vot-block");r.classList.add("vot-segment-only-icon"),r.innerHTML='';const s=document.createElement("span");return s.classList.add("vot-segment-label"),s.innerHTML=t,e.appendChild(o),e.appendChild(n),e.appendChild(i),e.appendChild(a),e.appendChild(r),o.appendChild(s),{container:e,translateButton:o,separator:n,pipButton:i,separator2:a,menuButton:r,label:s}},createVOTMenu:function(t){const e=document.createElement("vot-block");e.classList.add("vot-menu"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-menu-content-wrapper");const n=document.createElement("vot-block");n.classList.add("vot-menu-header-container");const i=document.createElement("vot-block");i.classList.add("vot-menu-body-container");const a=document.createElement("vot-block");a.classList.add("vot-menu-footer-container");const r=document.createElement("vot-block");r.classList.add("vot-menu-title-container");const s=document.createElement("vot-block");return s.classList.add("vot-menu-title"),s.innerHTML=t,e.appendChild(o),o.appendChild(n),o.appendChild(i),o.appendChild(a),n.appendChild(r),r.appendChild(s),{container:e,contentWrapper:o,headerContainer:n,bodyContainer:i,footerContainer:a,titleContainer:r,title:s}},createVOTSelectLabel:function(t){const e=document.createElement("span");return e.classList.add("vot-select-label"),e.innerText=t,e},createVOTSelect:bt,createVOTLanguageSelect:function(t){const e=t.fromTitle||"#UNDEFINED",o=t.fromDialogTitle||"#UNDEFINED",n=t.fromItems||[],i=t.fromOnSelectCB||function(){},a=t.toTitle||"#UNDEFINED",r=t.toDialogTitle||"#UNDEFINED",s=t.toItems||[],l=t.toOnSelectCB||function(){},d=document.createElement("vot-block");d.classList.add("vot-lang-select");const c=bt(e,o,n,{onSelectCb:i}),u=document.createElement("vot-block");u.classList.add("vot-lang-select-icon"),u.innerHTML='';const h=bt(a,r,s,{onSelectCb:l});return d.append(c.container,u,h.container),{container:d,fromSelect:c,icon:u,toSelect:h}},updateSlider:gt};function yt(t,e,o,n){let i=e;return e>n?(i=o+(e-n),i=i>100?100:Math.max(i,0),t.volume=i/100):e100?100:Math.max(i,0),t.volume=i/100),i}var wt=o("./node_modules/bowser/es5.js");function xt(t){const e=([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)));return t?e:e.toUpperCase()}async function St(t){const e=new TextEncoder("utf-8"),o=await window.crypto.subtle.importKey("raw",e.encode(A.I1),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),n=await window.crypto.subtle.sign("HMAC",o,t);return Array.from(new Uint8Array(n),(t=>t.toString(16).padStart(2,"0"))).join("")}function Tt(t){const e=t.startMs+t.durationMs;return t.tokens.reduce(((o,n,i)=>{const a=t.tokens[i+1],r=o[o.length-1],s=r?.alignRange?.end??0,l=s+n.text.length;if(o.push(Object.assign(Object.assign({},n),{alignRange:{start:s,end:l}})),a){const t=n.startMs+n.durationMs,i=a.startMs?a.startMs-t:e-t;o.push({text:" ",startMs:t,durationMs:i,alignRange:{start:l,end:l+1}})}return o}),[])}function kt(t,e){const o=t.text.split(new RegExp("([\n \t])")).reduce(((t,o)=>{if(o.length){const n=t[t.length-1]??e,i=n?.alignRange?.end??0,a=i+o.length;t.push({text:o,alignRange:{start:i,end:a}})}return t}),[]),n=Math.floor(t.durationMs/o.length),i=t.startMs+t.durationMs;return o.map(((e,a)=>{const r=a===o.length-1,s=t.startMs+n*a,l=r?i-s:n;return Object.assign(Object.assign({},e),{startMs:s,durationMs:l})}))}class Vt{dragging=!1;subtitlesContainerRect=null;containerRect=null;offsetX=null;offsetY=null;lastContent=null;highlightWords=!1;subtitles=null;maxLength=300;maxLengthRegexp=/.{1,300}(?:\s|$)/g;constructor(t,e,o){this.site=o,this.video=t,"youtube"===this.site.host&&"mobile"!==this.site.additionalData?this.container=e.parentElement:this.container=e,this.votSubtitlesContainer=document.createElement("vot-block"),this.votSubtitlesContainer.classList.add("vot-subtitles-widget"),this.container.appendChild(this.votSubtitlesContainer),this.onMouseDownBound=this.onMouseDown.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),this.onMouseMoveBound=this.onMouseMove.bind(this),this.onTimeUpdateBound=this.onTimeUpdate.bind(this),document.addEventListener("mousedown",this.onMouseDownBound),document.addEventListener("mouseup",this.onMouseUpBound),document.addEventListener("mousemove",this.onMouseMoveBound),this.video?.addEventListener("timeupdate",this.onTimeUpdateBound)}release(){this.video?.removeEventListener("timeupdate",this.onTimeUpdateBound),document.removeEventListener("mousedown",this.onMouseDownBound),document.removeEventListener("mouseup",this.onMouseUpBound),document.removeEventListener("mousemove",this.onMouseMoveBound),this.votSubtitlesContainer.remove()}onMouseDown(t){this.votSubtitlesContainer.contains(t.target)&&(this.subtitlesContainerRect=this.votSubtitlesContainer.getBoundingClientRect(),this.containerRect=this.container.getBoundingClientRect(),this.offsetX=t.clientX-this.subtitlesContainerRect.x,this.offsetY=t.clientY-this.subtitlesContainerRect.y,this.dragging=!0)}onMouseUp(){this.dragging=!1}onMouseMove(t){if(this.dragging){t.preventDefault();const e=t.clientX-this.offsetX,o=t.clientY-this.offsetY,n=o>=this.containerRect.top,i=o+this.subtitlesContainerRect.height<=this.containerRect.bottom,a=e>=this.containerRect.left,r=e+this.subtitlesContainerRect.width<=this.containerRect.right;this.votSubtitlesContainer.style.top=n&&i?o-this.containerRect.y+"px":n?this.containerRect.height-this.subtitlesContainerRect.height+"px":"0px",this.votSubtitlesContainer.style.left=a&&r?e-this.containerRect.x+"px":a?this.containerRect.width-this.subtitlesContainerRect.width+"px":"0px"}}onTimeUpdate(){this.update()}setContent(t){t&&this.video?(this.subtitles=t,this.update()):(this.subtitles=null,this.votSubtitlesContainer.innerHTML="")}setMaxLength(t){"number"==typeof t&&t&&(this.maxLength=t,this.maxLengthRegexp=new RegExp(`.{1,${t}}(?:\\s|$)`,"g"),this.update())}setHighlightWords(t){this.highlightWords!==!!t&&(this.highlightWords=!!t,this.update())}update(){if(!this.video)return;let t="",e=this.highlightWords&&this.subtitles?.containsTokens;const o=1e3*this.video.currentTime,n=this.subtitles?.subtitles?.findLast((t=>t.startMsthis.maxLength){let t=[],n=0,i=0,a=0;for(let o=0;othis.maxLength){let r=e.slice(n,i+1);r.at(0)&&" "===r.at(0).text&&(r=r.slice(1)),r.at(-1)&&" "===r.at(-1).text&&(r=r.slice(0,r.length-1)),t.push({startMs:e[n].startMs,durationMs:e[i].startMs+e[i].durationMs-e[n].startMs,tokens:r}),n=o,a=0}i=o}for(let n=0;ne||o>n.startMs-100&&e-o<275?'class="passed"':""}>${n.text}`}}else if(n.text.length>this.maxLength){let e=n.text.match(this.maxLengthRegexp),i=n.durationMs/e.length;for(let a=0;a${t.replace("\\n","
")}`:"")}}function Mt(){return Lt()?.player}function Lt(){return document.querySelector("#video_player")}const Ot=async function(t="en"){let e=null;const o=Mt(),{duration:n}=o?.cache_||{},{courseId:i,tracks:a,sources:r}=o?.options_||{},s=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(r),l=await async function(t){const e=await fetch(`https://www.coursera.org/api/onDemandCourses.v1/${t}`),o=await e.json();return o?.elements?.[0]}(i);let d=l?.primaryLanguageCodes?.[0];d=d?E(d):"en",x.includes(d)||(d="en");const c=function(t,e,o){let n=t?.find((t=>E(t.srclang)===e));return n||(n=t?.find((t=>E(t.srclang)===o))||t?.[0]),n?.src}(a,d,t);console.log(`videoURL: ${s}, subtitlesURL: ${c}`),c&&s?e=[{target:"video_file_url",targetUrl:s},{target:"subtitles_file_url",targetUrl:`https://www.coursera.org${c}`}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${s}, subtitlesURL: ${c}`);const u={duration:n,detectedLanguage:d,translationHelp:e};return m.Z.log("coursera video data:",u),console.log("[VOT] Detected language: ",u.detectedLanguage),u},Et="https://www.udemy.com/api-2.0";async function Pt(t){const e=await fetch(`${Et}/courses/${t}/?`+new URLSearchParams({"fields[course]":"locale",use_remote_version:"true",caching_intent:"true"}));return await e.json()}async function Ct(t,e,o){if(!(t.expires+2592e6>(new Date).getTime()&&t.accessToken))return void console.error(y.get("udemyAccessTokenExpired"));const n=`Bearer ${t.accessToken}`,i=await fetch(`${Et}/users/me/subscribed-courses/${e}/lectures/${o}/?`+new URLSearchParams({"fields[lecture]":"asset","fields[asset]":"length,media_sources,captions"}),{headers:{"x-udemy-authorization":n,authorization:n}});return await i.json()}function At(){return Ft()?.player}function Bt(){const t=document.querySelector(".ud-app-loader[data-module-id='course-taking']")?.dataset?.moduleArgs;return t?JSON.parse(t):(console.error(y.get("udemyModuleArgsNotFound")),{})}function Ft(){return document.querySelector(".vjs-v7")}const _t=async function(t,e="en"){let o=null;const n=At();m.Z.log("udemyData",t);const i=Bt();m.Z.log("moduleData: ",i);const a=i.courseId,r=window.location.pathname.match(/learn\/lecture\/([^/]+)/)?.[1];m.Z.log(`CourseId: ${a}, lectureId: ${r}`);const s=await Pt(a);m.Z.log("courseLang Data:",s);const l=await Ct(t,a,r);console.log("lecture Data:",l);let d=s?.locale?.locale;d=d?E(d):"en",x.includes(d)||(d="en");const c=l?.asset?.length||n?.cache_?.duration,u=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(l?.asset?.media_sources)||function(){const t=Ft()?.querySelector("video")?.src;return!t?.startsWith("blob:")&&t}(),h=function(t,e,o){let n=t?.find((t=>E(t.locale_id)===e));return n||(n=t?.find((t=>E(t.locale_id)===o))||t?.[0]),n?.url}(l?.asset?.captions,d,e);console.log(`videoURL: ${u}, subtitlesURL: ${h}`),h&&u?o=[{target:"video_file_url",targetUrl:u},{target:"subtitles_file_url",targetUrl:h}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${u}, subtitlesURL: ${h}`);const p={duration:c,detectedLanguage:d,translationHelp:o};return m.Z.log("udemy video data:",p),console.log("[VOT] Detected language: ",p.detectedLanguage),p};o("./node_modules/requestidlecallback-polyfill/index.js");class Rt{constructor(){this.listeners=new Set}hasListener(t){return this.listeners.has(t)}dispatchToListener(t,...e){try{t(...e)}catch(t){console.error("[VOT]",t)}}addListener(t){if(this.hasListener(t))throw new Error("[VOT] The listener has already been added.");this.listeners.add(t)}removeListener(t){if(!this.hasListener(t))throw new Error("[VOT] The listener has not been added yet.");this.listeners.delete(t)}dispatch(...t){for(const e of Array.from(this.listeners))this.dispatchToListener(e,...t)}}function qt(t){return Array.from(t).map((t=>{const e=[];return t instanceof HTMLVideoElement&&e.push(t),t instanceof HTMLElement&&e.push(...Array.from(t.querySelectorAll("video"))),t?.shadowRoot?.querySelectorAll&&e.push(...Array.from(t.shadowRoot.querySelectorAll("video"))),e})).flat()}const zt=[{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube(-nocookie)?.com$/,selector:"shorts-video #player"},{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube(-nocookie)?.com$/,selector:".player-container"},{host:"youtube",url:"https://youtu.be/",match:/^(www.)?youtube(-nocookie|kids)?.com$/,selector:".html5-video-container:not(#inline-player *)"},{host:"tiktok",url:"https://www.tiktok.com/",match:/^(www.)?tiktok.com$/,selector:null},{host:"proxytok",url:"https://www.tiktok.com/",match:["proxitok.pabloferreiro.es","proxitok.pussthecat.org","tok.habedieeh.re","proxitok.esmailelbob.xyz","proxitok.privacydev.net","tok.artemislena.eu","tok.adminforge.de","tik.hostux.net","tt.vern.cc","cringe.whatever.social","proxitok.lunar.icu","proxitok.privacy.com.de"],selector:".column.has-text-centered"},{additionalData:"mobile",host:"twitch",url:"https://twitch.tv/",match:/^m.twitch.tv$/,selector:"main > div > section > div > div > div"},{host:"twitch",url:"https://twitch.tv/",match:t=>t.host.includes("clips.twitch.tv")||t.host.includes("player.twitch.tv")&&null===t.searchParams.get("channel")||t.host.includes("twitch.tv")&&(t.pathname.startsWith("/videos")||t.pathname.startsWith("/embed")||t.pathname.includes("/clip")),selector:".video-ref"},{host:"xvideos",url:"https://www.xvideos.com/",match:/^www.xvideos.com$/,selector:".video-bg-pic"},{host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:/^[a-z]+.pornhub.com$/,selector:".mainPlayerDiv > .video-element-wrapper-js > div"},{additionalData:"embed",host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:t=>t.host.includes("pornhub.com")&&t.pathname.startsWith("/embed/"),selector:"#player"},{additionalData:"mobile",host:"vk",url:"https://vk.com/video?z=",match:/^m.vk.(com|ru)$/,selector:"vk-video-player",shadowRoot:!0},{host:"vk",url:"https://vk.com/video?z=",match:/^(www.|m.)?vk.(com|ru)$/,selector:".videoplayer_media"},{host:"vimeo",url:"https://vimeo.com/",match:/^(player.)?vimeo.com$/,selector:".player"},{host:"nine_gag",url:"https://9gag.com/gag/",match:/^9gag.com$/,selector:".video-post"},{host:"coub",url:"https://coub.com/view/",match:/^coub.com$/,selector:".viewer__player"},{host:"bitchute",url:"https://www.bitchute.com/video/",match:/^(www.)?bitchute.com$/,selector:".plyr__video-wrapper"},{host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:".video-player > div > div > div:nth-child(2)"},{additionalData:"embed",host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:"#app > div > div"},{host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m|player).bilibili.com$/,selector:".bpx-player-video-wrap"},{additionalData:"old",host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m).bilibili.com$/,selector:null},{host:"twitter",url:"https://twitter.com/i/status/",match:/^twitter.com$/,selector:'div[data-testid="videoComponent"] > div:nth-child(1) > div'},{host:"mail_ru",url:"https://my.mail.ru/",match:/^my.mail.ru$/,selector:"#b-video-wrapper"},{host:"coursera",url:"https://www.coursera.org/",match:/coursera.org$/,selector:"#video_player"},{host:"udemy",url:"https://www.udemy.com",match:/udemy.com$/,selector:'div[data-purpose="curriculum-item-viewer-content"] > section > div > div > div > div:nth-of-type(2)'},{host:"invidious",url:"https://youtu.be/",match:ut,selector:"#player"},{host:"piped",url:"https://youtu.be/",match:ht,selector:".shaka-video-container"},{host:"rumble",url:"https://rumble.com",match:/^rumble.com$/,selector:"#videoPlayer > .videoPlayer-Rumble-cls > div"},{host:"eporner",url:"https://www.eporner.com/",match:/^(www.)?eporner.com$/,selector:".vjs-v7"},{host:"peertube",url:"tube.shanti.cafe",match:["peertube.1312.media","tube.shanti.cafe","bee-tube.fr","video.sadmin.io","dalek.zone","review.peertube.biz","peervideo.club","tube.la-dina.net","peertube.tmp.rcp.tf"],selector:".vjs-v7"},{host:"dailymotion",url:"https://www.dailymotion.com/video/",match:/^geo.dailymotion.com$/,selector:".player"},{host:"trovo",url:"https://trovo.live/s/",match:/^trovo.live$/,selector:".player-video"},{host:"yandexdisk",url:"https://disk.yandex.ru/i/",match:/^disk.yandex.ru$/,selector:"yaplayertag > div:nth-of-type(1)"}],Dt=wt.getParser(window.navigator.userAgent).getResult(),It=[...ut,...ht],Nt=["playing","ratechange","play","waiting","pause"];function jt(t,e,o=!1){return t.map((t=>({label:`${o&&!T.includes(t)?"❌ ":""}${y.get("langs")[t]??t.toUpperCase()}`,value:t,selected:e===t})))}function $t(t,e,n,i,a,r){m.Z.log(`Translate video (url: ${t}, duration: ${e}, requestLang: ${n}, responseLang: ${i})`),m.Z.log("translationHelp:",a),async function(t,e,n,i,a,r){try{m.Z.log("requestVideoTranslation");const s=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;m.Z.log("Inited yandexRequest...");const l=it(t,e,n,i,a);await s("/video-translation/translate",l,{"Vtrans-Signature":await St(l),"Sec-Vtrans-Token":xt(!1)},r)}catch(t){console.error("[VOT]",t),r(!1)}}(t,e,n,i,a,((t,e)=>{if(m.Z.log("[exec callback] Requesting video translation"),!t)return void r(!1,y.get("requestTranslationFailed"));const o=at(e);switch(console.log("[VOT] Translation response: ",o),o.status){case 0:r(!1,o.message);break;case 1:r(!!o.url,o.url||y.get("audioNotReceived"));break;case 2:r(!1,o.remainingTime?function(t){const e=Math.floor(t/60),o=Math.floor(t%60);return e>=60?y.get("translationTakeMoreThanHour"):e>=10&&e%10?y.get("translationTakeApproximatelyMinutes").format(e):1==e||0==e&&o>0?y.get("translationTakeAboutMinute"):y.get("translationTakeApproximatelyMinute").format(e)}(o.remainingTime):y.get("translationTakeFewMinutes"));break;case 3:r(!1,y.get("videoBeingTranslated"))}}))}class Ht{translateFromLang="en";translateToLang=M;timer;ytData="";videoData="";firstPlay=!0;audio=new Audio;hls=C();downloadTranslationUrl=null;downloadSubtitlesUrl=null;autoRetry;streamPing;volumeOnStart;tempOriginalVolume;tempVolume;subtitlesList=[];subtitlesListVideoId=null;videoLastSrcObject=null;constructor(t,e,o){m.Z.log("[VideoHandler] add video:",t,"container:",e,this),this.video=t,this.container=e,this.site=o,this.handleSrcChangedBound=this.handleSrcChanged.bind(this),this.srcObserver=new MutationObserver(this.handleSrcChangedBound),this.srcObserver.observe(this.video,{attributeFilter:["src","currentSrc"]}),this.srcObjectInterval=setInterval((async()=>{this.videoLastSrcObject!==this.video.srcObject&&(this.videoLastSrcObject=this.video.srcObject,await this.handleSrcChanged())}),100),this.stopTranslationBound=this.stopTranslation.bind(this),this.handleVideoEventBound=this.handleVideoEvent.bind(this),this.changeOpacityOnEventBound=this.changeOpacityOnEvent.bind(this),this.resetTimerBound=this.resetTimer.bind(this),this.init()}async init(){if(this.initialized)return;this.data={autoTranslate:await b.get("autoTranslate",0,!0),dontTranslateLanguage:await b.get("dontTranslateLanguage",M),dontTranslateYourLang:await b.get("dontTranslateYourLang",1,!0),autoSetVolumeYandexStyle:await b.get("autoSetVolumeYandexStyle",1,!0),autoVolume:await b.get("autoVolume",15,!0)/100,showVideoSlider:await b.get("showVideoSlider",1,!0),syncVolume:await b.get("syncVolume",0,!0),subtitlesMaxLength:await b.get("subtitlesMaxLength",300,!0),highlightWords:await b.get("highlightWords",0,!0),responseLanguage:await b.get("responseLanguage",M),defaultVolume:await b.get("defaultVolume",100,!0),udemyData:await b.get("udemyData",{accessToken:"",expires:0}),audioProxy:await b.get("audioProxy",0,!0),showPiPButton:await b.get("showPiPButton",0,!0),translateAPIErrors:await b.get("translateAPIErrors",1,!0),translationService:await b.get("translationService",A.kF),detectService:await b.get("detectService",A.EY)},this.videoData=await this.getVideoData(),console.log("[db] data from db: ",this.data),this.subtitlesWidget=new Vt(this.video,this.container,this.site),this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength),this.subtitlesWidget.setHighlightWords(this.data.highlightWords),this.initUI(),this.initUIEvents();const t=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=t,t&&(this.votMenu.container.hidden=t),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage??"ru"),this.translateToLang=this.data.responseLanguage??"ru",this.initExtraEvents(),this.initialized=!0}transformBtn(t="none",e){this.votButton.container.dataset.status=t,this.votButton.label.innerHTML=e}initUI(){this.votButton=ft.createVOTButton(y.get("translateVideo")),this.container.appendChild(this.votButton.container),this.votButton.pipButton.hidden=!P()||!this.data?.showPiPButton,this.votButton.separator2.hidden=!P()||!this.data?.showPiPButton,this.votButton.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votMenu=ft.createVOTMenu(y.get("VOTSettings")),this.container.appendChild(this.votMenu.container),this.votDownloadButton=ft.createIconButton(''),this.votDownloadButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadButton),this.votDownloadSubtitlesButton=ft.createIconButton(''),this.votDownloadSubtitlesButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadSubtitlesButton),this.votSettingsButton=ft.createIconButton(''),this.votMenu.headerContainer.appendChild(this.votSettingsButton),this.votTranslationLanguageSelect=ft.createVOTLanguageSelect({fromTitle:y.get("langs")[this.video.detectedLanguage],fromDialogTitle:y.get("videoLanguage"),fromItems:[{label:y.get("langs").auto,value:"auto",selected:""},...jt(x,this.videoData.detectedLanguage)],fromOnSelectCB:async t=>{m.Z.log("[fromOnSelectCB] select from language",t.target.dataset.votValue),this.videoData=await this.getVideoData(),this.setSelectMenuValues(t.target.dataset.votValue,this.videoData.responseLanguage)},toTitle:y.get("langs")[this.video.responseLanguage],toDialogTitle:y.get("translationLanguage"),toItems:[...jt(x,this.videoData.responseLanguage,!0),{label:"─────────",value:"separator",disabled:!0},...jt(S,this.videoData.responseLanguage,!0)],toOnSelectCB:async t=>{const e=t.target.dataset.votValue;m.Z.log("[toOnSelectCB] select to language",e),this.data.responseLanguage=this.translateToLang=e,await b.set("responseLanguage",this.data.responseLanguage),m.Z.log("Response Language value changed. New value: ",this.data.responseLanguage),this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage)}}),this.votMenu.bodyContainer.appendChild(this.votTranslationLanguageSelect.container),this.votSubtitlesSelect=ft.createVOTSelect(y.get("VOTSubtitlesDisabled"),y.get("VOTSubtitles"),[{label:y.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1}],{onSelectCb:async t=>{await this.changeSubtitlesLang(t.target.dataset.votValue)},labelElement:ft.createVOTSelectLabel(y.get("VOTSubtitles"))}),this.votMenu.bodyContainer.appendChild(this.votSubtitlesSelect.container),this.votVideoVolumeSlider=ft.createSlider(`${y.get("VOTVolume")}: ${100*this.getVideoVolume()}%`,100*this.getVideoVolume()),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoVolumeSlider.container),this.votVideoTranslationVolumeSlider=ft.createSlider(`${y.get("VOTVolumeTranslation")}: ${this.data?.defaultVolume??100}%`,this.data?.defaultVolume??100),this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoTranslationVolumeSlider.container),this.votMenu.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votSettingsDialog=ft.createDialog(y.get("VOTSettings")),document.documentElement.appendChild(this.votSettingsDialog.container),this.votTranslationHeader=ft.createHeader(y.get("translationSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationHeader),this.votAutoTranslateCheckbox=ft.createCheckbox(y.get("VOTAutoTranslate"),this.data?.autoTranslate??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoTranslateCheckbox.container),this.votDontTranslateYourLangSelect=ft.createVOTSelect(y.get("langs")[b.syncGet("dontTranslateLanguage",M)],y.get("VOTDontTranslateYourLang"),jt(x,b.syncGet("dontTranslateLanguage",M)),{onSelectCb:async t=>{this.data.dontTranslateLanguage=t.target.dataset.votValue,await b.set("dontTranslateLanguage",this.data.dontTranslateLanguage)},labelElement:ft.createCheckbox(y.get("VOTDontTranslateYourLang"),this.data?.dontTranslateYourLang??!0).container}),this.votSettingsDialog.bodyContainer.appendChild(this.votDontTranslateYourLangSelect.container),this.votAutoSetVolumeCheckbox=ft.createCheckbox(`${y.get("VOTAutoSetVolume")}`,this.data?.autoSetVolumeYandexStyle??!0),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeCheckbox.container),this.votAutoSetVolumeSlider=ft.createSlider(`${100*(this.data?.autoVolume??A.sN)}%`,100*(this.data?.autoVolume??A.sN),0,100),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeSlider.container),this.votShowVideoSliderCheckbox=ft.createCheckbox(y.get("VOTShowVideoSlider"),this.data?.showVideoSlider??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votShowVideoSliderCheckbox.container),this.votUdemyDataTextfield=ft.createTextfield(y.get("VOTUdemyData"),this.data?.udemyData?.accessToken??""),this.votUdemyDataTextfield.container.hidden="udemy"!==this.site.host,this.votSettingsDialog.bodyContainer.appendChild(this.votUdemyDataTextfield.container),this.votSyncVolumeCheckbox=ft.createCheckbox(y.get("VOTSyncVolume"),this.data?.syncVolume??!1),this.votSyncVolumeCheckbox.container.hidden="youtube"!==this.site.host||"mobile"===this.site.additionalData,this.votSettingsDialog.bodyContainer.appendChild(this.votSyncVolumeCheckbox.container),this.votAudioProxyCheckbox=ft.createCheckbox(y.get("VOTAudioProxy"),this.data?.audioProxy??!1),this.votAudioProxyCheckbox.container.hidden=!0,this.votSettingsDialog.bodyContainer.appendChild(this.votAudioProxyCheckbox.container),this.votTranslationServiceSelect=ft.createVOTSelect(b.syncGet("translationService",A.kF),y.get("VOTTranslationService"),jt(R,b.syncGet("translationService",A.kF)),{onSelectCb:async t=>{this.data.translationService=t.target.dataset.votValue,await b.set("translationService",this.data.translationService)},labelElement:ft.createCheckbox(y.get("VOTTranslateAPIErrors"),this.data.translateAPIErrors??!0).container}),this.votTranslationServiceSelect.container.hidden="ru"===y.lang,this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationServiceSelect.container),this.votDetectServiceSelect=ft.createVOTSelect(b.syncGet("detectService",A.EY),y.get("VOTDetectService"),jt(q,b.syncGet("detectService",A.EY)),{onSelectCb:async t=>{this.data.detectService=t.target.dataset.votValue,await b.set("detectService",this.data.detectService)},labelElement:ft.createVOTSelectLabel(y.get("VOTDetectService"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votDetectServiceSelect.container),this.votSubtitlesHeader=ft.createHeader(y.get("subtitlesSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHeader),this.votSubtitlesMaxLengthSlider=ft.createSlider(`${y.get("VOTSubtitlesMaxLength")}: ${this.data?.subtitlesMaxLength??300}`,this.data?.subtitlesMaxLength??300,50,300),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesMaxLengthSlider.container),this.votSubtitlesHighlightWordsCheckbox=ft.createCheckbox(y.get("VOTHighlightWords"),this.data?.highlightWords??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHighlightWordsCheckbox.container),this.votAboutHeader=ft.createHeader(y.get("about")),this.votSettingsDialog.bodyContainer.appendChild(this.votAboutHeader),this.votLanguageSelect=ft.createVOTSelect(y.get("langs")[b.syncGet("locale-lang-override","auto")],y.get("VOTMenuLanguage"),jt(f,b.syncGet("locale-lang-override","auto")),{onSelectCb:async t=>{await b.set("locale-lang-override",t.target.dataset.votValue)},labelElement:ft.createVOTSelectLabel(y.get("VOTMenuLanguage"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votLanguageSelect.container),this.votShowPiPButtonCheckbox=ft.createCheckbox(y.get("VOTShowPiPButton"),this.data?.showPiPButton??!1),this.votShowPiPButtonCheckbox.container.hidden=!P(),this.votSettingsDialog.bodyContainer.appendChild(this.votShowPiPButtonCheckbox.container),this.votVersionInfo=ft.createInformation(`${y.get("VOTVersion")}:`,GM_info.script.version),this.votSettingsDialog.bodyContainer.appendChild(this.votVersionInfo.container),this.votAuthorsInfo=ft.createInformation(`${y.get("VOTAuthors")}:`,GM_info.script.author),this.votSettingsDialog.bodyContainer.appendChild(this.votAuthorsInfo.container),this.votLoaderInfo=ft.createInformation(`${y.get("VOTLoader")}:`,`${GM_info.scriptHandler} v${GM_info.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votLoaderInfo.container),this.votBrowserInfo=ft.createInformation(`${y.get("VOTBrowser")}:`,`${Dt.browser.name} ${Dt.browser.version} (${Dt.os.name} ${Dt.os.version})`),this.votSettingsDialog.bodyContainer.appendChild(this.votBrowserInfo.container),this.votResetSettingsButton=ft.createButton(y.get("resetSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votResetSettingsButton)}initUIEvents(){this.votButton.translateButton.addEventListener("click",(async()=>{if(this.audio.src)return m.Z.log("[click translationBtn] audio.src is not empty"),void this.stopTraslate();try{m.Z.log("[click translationBtn] trying execute translation");const t=O(this.site.host,this.video);if(!t)throw new w("VOTNoVideoIDFound");await this.translateExecutor(t)}catch(t){console.error("[VOT]",t),"VOTLocalizedError"===t?.name?this.transformBtn("error",t.localizedMessage):this.transformBtn("error",t)}})),this.votButton.pipButton.addEventListener("click",(async()=>{this.video!==document.pictureInPictureElement?await this.video.requestPictureInPicture():await document.exitPictureInPicture()})),this.votButton.menuButton.addEventListener("click",(()=>{this.votMenu.container.hidden=!this.votMenu.container.hidden})),this.votDownloadButton.addEventListener("click",(()=>{this.downloadTranslationUrl&&window.open(this.downloadTranslationUrl,"_blank").focus()})),this.votDownloadSubtitlesButton.addEventListener("click",(()=>{console.log(this.downloadSubtitlesUrl),this.downloadSubtitlesUrl&&window.open(this.downloadSubtitlesUrl,"_blank").focus()})),this.votSettingsButton.addEventListener("click",(()=>{this.votSettingsDialog.container.hidden=!this.votSettingsDialog.container.hidden,(void 0===document.fullscreen||document.fullscreen)&&(document.webkitExitFullscreen&&document.webkitExitFullscreen(),document.mozCancelFullscreen&&document.mozCancelFullscreen(),document.exitFullscreen&&document.exitFullscreen())})),this.votVideoVolumeSlider.input.addEventListener("input",(t=>{const e=Number(t.target.value);if(this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`,this.setVideoVolume(e/100),1===this.data.syncVolume){const t=Number(this.votVideoTranslationVolumeSlider.input.value),o=yt(this.audio,e,t,this.tempOriginalVolume);this.votVideoTranslationVolumeSlider.input.value=o,this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,ft.updateSlider(this.votVideoTranslationVolumeSlider.input),this.tempVolume=o,this.tempOriginalVolume=e}})),this.votVideoTranslationVolumeSlider.input.addEventListener("input",(async t=>{this.data.defaultVolume=Number(t.target.value),await b.set("defaultVolume",this.data.defaultVolume),this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${this.data.defaultVolume}%`,this.audio.volume=this.data.defaultVolume/100,1===this.data.syncVolume&&this.syncTranslationWithVideo(this.data.defaultVolume)})),this.votAutoTranslateCheckbox.input.addEventListener("change",(async t=>{this.data.autoTranslate=Number(t.target.checked),await b.set("autoTranslate",this.data.autoTranslate),m.Z.log("autoTranslate value changed. New value: ",this.data.autoTranslate)})),this.votDontTranslateYourLangSelect.labelElement.addEventListener("change",(async t=>{this.data.dontTranslateYourLang=Number(t.target.checked),await b.set("dontTranslateYourLang",this.data.dontTranslateYourLang),m.Z.log("dontTranslateYourLang value changed. New value: ",this.data.dontTranslateYourLang)})),this.votAutoSetVolumeCheckbox.input.addEventListener("change",(async t=>{this.data.autoSetVolumeYandexStyle=Number(t.target.checked),await b.set("autoSetVolumeYandexStyle",this.data.autoSetVolumeYandexStyle),m.Z.log("autoSetVolumeYandexStyle value changed. New value: ",this.data.autoSetVolumeYandexStyle)})),this.votAutoSetVolumeSlider.input.addEventListener("input",(async t=>{const e=Number(t.target.value);this.data.autoVolume=e/100,await b.set("autoVolume",e),this.votAutoSetVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`})),this.votShowVideoSliderCheckbox.input.addEventListener("change",(async t=>{this.data.showVideoSlider=Number(t.target.checked),await b.set("showVideoSlider",this.data.showVideoSlider),m.Z.log("showVideoSlider value changed. New value: ",this.data.showVideoSlider),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status})),this.votUdemyDataTextfield.input.addEventListener("change",(async t=>{this.data.udemyData={accessToken:t.target.value,expires:(new Date).getTime()},await b.set("udemyData",this.data.udemyData),m.Z.log("udemyData value changed. New value: ",this.data.udemyData),window.location.reload()})),this.votSyncVolumeCheckbox.input.addEventListener("change",(async t=>{this.data.syncVolume=Number(t.target.checked),await b.set("syncVolume",this.data.syncVolume),m.Z.log("syncVolume value changed. New value: ",this.data.syncVolume)})),this.votAudioProxyCheckbox.input.addEventListener("change",(async t=>{this.data.audioProxy=Number(t.target.checked),await b.set("audioProxy",this.data.audioProxy),m.Z.log("audioProxy value changed. New value: ",this.data.audioProxy)})),this.votTranslationServiceSelect.labelElement.addEventListener("change",(async t=>{this.data.translateAPIErrors=Number(t.target.checked),await b.set("translateAPIErrors",this.data.translateAPIErrors),m.Z.log("translateAPIErrors value changed. New value: ",this.data.translateAPIErrors)})),this.votSubtitlesMaxLengthSlider.input.addEventListener("input",(async t=>{this.data.subtitlesMaxLength=Number(t.target.value),await b.set("subtitlesMaxLength",this.data.subtitlesMaxLength),this.votSubtitlesMaxLengthSlider.label.querySelector("strong").innerHTML=`${this.data.subtitlesMaxLength}`,this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength)})),this.votSubtitlesHighlightWordsCheckbox.input.addEventListener("change",(async t=>{this.data.highlightWords=Number(t.target.checked),await b.set("highlightWords",this.data.highlightWords),m.Z.log("highlightWords value changed. New value: ",this.data.highlightWords),this.subtitlesWidget.setHighlightWords(this.data.highlightWords)})),this.votShowPiPButtonCheckbox.input.addEventListener("change",(async t=>{this.data.showPiPButton=Number(t.target.checked),await b.set("showPiPButton",this.data.showPiPButton),m.Z.log("showPiPButton value changed. New value: ",this.data.showPiPButton),this.votButton.pipButton.hidden=!P()||!this.data.showPiPButton,this.votButton.separator2.hidden=!P()||!this.data.showPiPButton})),this.votResetSettingsButton.addEventListener("click",(async()=>{y.reset(),(await b.list()).filter((t=>!y.gmValues.includes(t))).forEach((t=>b.syncDelete(t))),window.location.reload()}))}releaseExtraEvents(){clearInterval(this.resizeInterval),this.resizeObserver?.disconnect(),"youtube"===this.site.host&&"mobile"!==this.site.additionalData&&this.syncVolumeObserver?.disconnect(),this.extraEvents?.forEach((t=>{t.element.removeEventListener(t.event,t.handler)}))}initExtraEvents(){this.extraEvents=[];const t=(t,e,o)=>{this.extraEvents.push({element:t,event:e,handler:o}),t.addEventListener(e,o)},e=(e,o,n)=>{o.forEach((o=>{t(e,o,n)}))};if(this.resizeObserver=new ResizeObserver((t=>{t.forEach((t=>{this.votMenu.container.setAttribute("style",`--vot-container-height: ${t.contentRect.height}px`)}))})),this.resizeObserver.observe(this.video),this.votMenu.container.setAttribute("style",`--vot-container-height: ${this.video.getBoundingClientRect().height}px`),this.resizeInterval=setInterval((()=>{this.votMenu.container.setAttribute("style",`--vot-container-height: ${this.video.getBoundingClientRect().height}px`)}),500),"youtube"===this.site.host&&"mobile"!==this.site.additionalData){this.syncVolumeObserver=new MutationObserver((t=>{t.forEach((t=>{"attributes"===t.type&&"aria-valuenow"===t.attributeName&&this.syncVideoVolumeSlider()}))}));const t=document.querySelector(".ytp-volume-panel");t&&this.syncVolumeObserver.observe(t,{attributes:!0,childList:!1,subtree:!0,attributeOldValue:!0})}let o;document.addEventListener("click",(t=>{const e=t.target,o=this.votButton.container,n=this.votMenu.container,i=this.container,a=this.votSettingsDialog.container,r=document.querySelector(".vot-dialog-temp"),s=o.contains(e),l=n.contains(e),d=i.contains(e),c=a.contains(e),u=r?.contains(e)??!1;m.Z.log(`[document click] ${s} ${l} ${d} ${c} ${u}`),s||l||c||u||(d||this.logout(0),this.votMenu.container.hidden=!0)})),o="pornhub"===this.site.host?"embed"===this.site.additionalData?document.querySelector("#player"):this.container.querySelector(".video-element-wrapper-js > div"):"twitter"===this.site.host?document.querySelector('div[data-testid="videoPlayer"]'):"yandexdisk"===this.site.host?document.querySelector(".video-player__player"):this.container,o&&e(o,["mousemove","mouseout"],this.resetTimerBound),t(this.votButton.container,"mousemove",this.changeOpacityOnEventBound),t(this.votMenu.container,"mousemove",this.changeOpacityOnEventBound),e(document,["touchstart","touchmove","touchend"],this.changeOpacityOnEventBound),t(this.votButton.container,"mousedown",(t=>{t.stopImmediatePropagation()})),t(this.votMenu.container,"mousedown",(t=>{t.stopImmediatePropagation()})),"youtube"===this.site.host&&(this.container.draggable=!1),t(this.video,"abort",(()=>{m.Z.log("lipsync mode is abort"),this.stopTranslation(),this.videoData=""})),t(this.video,"progress",(async()=>{if(!this.firstPlay||1!==this.data.autoTranslate)return;const t=O(this.site.host,this.video);if(!t)throw new w("VOTNoVideoIDFound");try{await this.translateExecutor(t),this.firstPlay=!1}catch(t){console.error("[VOT]",t),"VOTLocalizedError"===t?.name?this.transformBtn("error",t.localizedMessage):this.transformBtn("error",t),this.firstPlay=!1}}))}logout(t){this.votMenu.container.hidden&&(this.votButton.container.style.opacity=t)}resetTimer(){clearTimeout(this.timer),this.logout(1),this.timer=setTimeout((()=>{this.logout(0)}),2e3)}changeOpacityOnEvent(t){clearTimeout(this.timer),this.logout(1),t.stopPropagation()}async changeSubtitlesLang(t){if(m.Z.log("[onchange] subtitles",t),this.votSubtitlesSelect.setSelected(t),"disabled"===t)this.votSubtitlesSelect.setTitle(y.get("VOTSubtitlesDisabled")),this.subtitlesWidget.setContent(null),this.votDownloadSubtitlesButton.hidden=!0,this.downloadSubtitlesUrl=null;else{const e=await async function(t){let e=!1,o=await Promise.race([new Promise((async t=>{await L(5e3),e||console.error("[VOT] Failed to fetch subtitles. Reason: timeout"),e=!0,t([])})),new Promise((async o=>{m.Z.log("Fetching subtitles:",t),await fetch(t.url).then((t=>t.json())).then((t=>{e=!0,o(t)})).catch((t=>{console.error("[VOT] Failed to fetch subtitles. Reason:",t),e=!0,o({containsTokens:!1,subtitles:[]})}))}))]);return"youtube"===t.source&&(o=function(t){const e={containsTokens:!1,subtitles:[]};if("object"!=typeof t||!("events"in t)||!Array.isArray(t.events))return console.error("[VOT] Failed to format youtube subtitles",t),e;for(let o=0;ot.utf8.replace(/^ +| +$/g,""))).join(" ");let i=t.events[o].dDurationMs;t.events[o+1]&&t.events[o].tStartMs+t.events[o].dDurationMs>t.events[o+1].tStartMs&&(i=t.events[o+1].tStartMs-t.events[o].tStartMs),"\n"!==n&&e.subtitles.push({text:n,startMs:t.events[o].tStartMs,durationMs:i})}return e}(o)),o.subtitles=function(t,e){const o=[];let n;for(const i of t.subtitles){let a;if(i?.tokens?.length){if("yandex"!==e)return console.warn("[VOT] Unsupported subtitles tokens type: ",e),t.containsTokens=!1,null;a=Tt(i)}else a=kt(i,n);n=a[a.length-1],o.push(Object.assign(Object.assign({},i),{tokens:a}))}return t.containsTokens=!0,o}(o,t.source),console.log("[VOT] subtitles:",o),o}(this.subtitlesList.at(parseInt(t)));this.subtitlesWidget.setContent(e),this.votDownloadSubtitlesButton.hidden=!1,this.downloadSubtitlesUrl=this.subtitlesList.at(parseInt(t))?.url}}async updateSubtitlesLangSelect(){const t=[{label:y.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1},...this.subtitlesList.map(((t,e)=>({label:(y.get("langs")[t.language]??t.language.toUpperCase())+(t.translatedFromLanguage?` ${y.get("VOTTranslatedFrom")} ${y.get("langs")[t.translatedFromLanguage]??t.translatedFromLanguage.toUpperCase()}`:"")+("yandex"!==t.source?` ${t.source}`:"")+(t.isAutoGenerated?` (${y.get("VOTAutogenerated")})`:""),value:e,selected:!1,disabled:!1})))];this.votSubtitlesSelect.updateItems(t),await this.changeSubtitlesLang(t[0].value)}async updateSubtitles(){await this.changeSubtitlesLang("disabled");const t=O(this.site.host,this.video);if(!t)return console.error(`[VOT] ${y.getDefault("VOTNoVideoIDFound")}`),this.subtitlesList=[],this.subtitlesListVideoId=null,void await this.updateSubtitlesLangSelect();this.subtitlesListVideoId!==t&&(this.videoData.detectedLanguage||(this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage)),this.subtitlesList=await async function(t,e,n){const i="youtube"===t.host?$():[];let a=!1;const r=[...await Promise.race([new Promise((async t=>{await L(5e3),a||console.error("[VOT] Failed get yandex subtitles. Reason: timeout"),a=!0,t([])})),new Promise((i=>{!async function(t,e,n){try{m.Z.log("requestVideoSubtitles");const i=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;m.Z.log("Inited yandexRequest...");const a=rt(t,e);await i("/video-subtitles/get-subtitles",a,{"Vsubs-Signature":await St(a),"Sec-Vsubs-Token":xt(!1)},n)}catch(t){console.error("[VOT]",t),n(!1)}}(`${t.url}${e}`,n,((t,e)=>{m.Z.log("[exec callback] Requesting video subtitles"),t||(console.error("[VOT] Failed get yandex subtitles"),a=!0,i([]));const o=st(e);console.log("[VOT] Subtitles response: ",o);let n=o.subtitles??[];n=n.reduce(((t,e)=>(e.language&&!t.find((t=>{if("yandex"===t.source&&t.language===e.language&&!t.translatedFromLanguage)return t}))&&t.push({source:"yandex",language:e.language,url:e.url}),e.translatedLanguage&&t.push({source:"yandex",language:e.translatedLanguage,translatedFromLanguage:e.language,url:e.translatedUrl}),t)),[]),a=!0,i(n)}))}))]),...i].sort(((t,e)=>{if(t.source!==e.source)return"yandex"===t.source?-1:1;if(t.language!==e.language&&(t.language===M||e.language===M))return t.language===M?-1:1;if("yandex"===t.source){if(t.translatedFromLanguage!==e.translatedFromLanguage)return t.translatedFromLanguage&&e.translatedFromLanguage?t.translatedFromLanguage===n?-1:1:t.language===e.language?t.translatedFromLanguage?1:-1:t.translatedFromLanguage?-1:1;if(!t.translatedFromLanguage)return t.language===n?-1:1}return"youtube"===t.source&&t.isAutoGenerated!==e.isAutoGenerated?t.isAutoGenerated?1:-1:0}));return console.log("[VOT] subtitles list",r),r}(this.site,t,this.videoData.detectedLanguage),this.subtitlesList?this.subtitlesListVideoId=t:await this.changeSubtitlesLang("disabled"),await this.updateSubtitlesLangSelect())}getVideoVolume(){let t=this.video?.volume;return"youtube"===this.site.host&&(t=j()||t),t}setVideoVolume(t){"youtube"===this.site.host&&Z(t)||(this.video.volume=t)}syncVideoVolumeSlider(){const t=Math.round(100*this.getVideoVolume());this.votVideoVolumeSlider.input.value=t,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${t}%`,ft.updateSlider(this.votVideoVolumeSlider.input),1===this.data.syncVolume&&(this.tempOriginalVolume=Number(t))}setSelectMenuValues(t,e){this.votTranslationLanguageSelect.fromSelect.setTitle(y.get("langs")[t]),this.votTranslationLanguageSelect.toSelect.setTitle(y.get("langs")[e]),this.votTranslationLanguageSelect.fromSelect.setSelected(t),this.votTranslationLanguageSelect.toSelect.setSelected(e),console.log(`[VOT] Set translation from ${t} to ${e}`),this.videoData.detectedLanguage=t,this.videoData.responseLanguage=e}syncTranslationWithVideo(t){const e=Number(this.votVideoVolumeSlider.input.value),o=yt(this.video,t,e,this.tempVolume);this.votVideoVolumeSlider.input.value=o,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,ft.updateSlider(this.votVideoVolumeSlider.input),this.tempOriginalVolume=o,this.tempVolume=t}async getVideoData(){const t={translationHelp:null,isStream:!1};if(t.duration=this.video?.duration||343,t.videoId=O(this.site.host,this.video),t.detectedLanguage=this.translateFromLang,t.responseLanguage=this.translateToLang,!t.videoId)return this.ytData={},t;if(window.location.hostname.includes("youtube.com"))this.ytData=await H(),t.isStream=this.ytData.isLive,""!==this.ytData.author&&(t.detectedLanguage=this.ytData.detectedLanguage,t.responseLanguage=this.translateToLang);else if(window.location.hostname.includes("rutube")||window.location.hostname.includes("my.mail.ru"))t.detectedLanguage="ru";else if(window.location.hostname.includes("bilibili.com"))t.detectedLanguage="zh";else if(window.location.hostname.includes("coursera.org")){const e=await Ot(this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else if(window.location.hostname.includes("udemy.com")){const e=await _t(this.data.udemyData,this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else"vk"!==this.site.host&&"piped"!==this.site.host&&"invidious"!==this.site.host&&"bitchute"!==this.site.host&&"rumble"!==this.site.host&&"peertube"!==this.site.host&&"dailymotion"!==this.site.host&&"trovo"!==this.site.host&&"yandexdisk"!==this.site.host||(t.detectedLanguage="auto");return t}videoValidator(){if("youtube"===this.site.host){if(m.Z.log("VideoValidator videoData: ",this.videoData),1===this.data.dontTranslateYourLang&&this.videoData.detectedLanguage===this.data.dontTranslateLanguage&&this.videoData.responseLanguage===this.data.dontTranslateLanguage)throw new w("VOTDisableFromYourLang");if(this.videoData.duration>14400)throw new w("VOTVideoIsTooLong")}return!0}lipSync(t=!1){if(m.Z.log("lipsync video",this.video),this.video)if(this.audio.currentTime=this.video.currentTime,this.audio.playbackRate=this.video.playbackRate,t)if("play"!==t)"pause"===t&&(m.Z.log("lipsync mode is pause"),this.audio.pause()),"stop"===t&&(m.Z.log("lipsync mode is stop"),this.audio.pause()),"waiting"===t&&(m.Z.log("lipsync mode is waiting"),this.audio.pause()),"playing"===t&&(m.Z.log("lipsync mode is playing"),this.audio.play());else{m.Z.log("lipsync mode is play");const t=this.audio.play();void 0!==t&&t.catch((t=>{if(console.error("[VOT]",t),"NotAllowedError"===t.name)throw this.transformBtn("error",y.get("grantPermissionToAutoPlay")),new w("grantPermissionToAutoPlay");if("NotSupportedError"===t.name)throw this.transformBtn("error",It.includes(window.location.hostname)?y.get("neededAdditionalExtension"):y.get("audioFormatNotSupported")),It.includes(window.location.hostname)?new w("neededAdditionalExtension"):new w("audioFormatNotSupported")}))}else m.Z.log("lipsync mode is not set")}handleVideoEvent(t){m.Z.log(`video ${t.type}`),this.lipSync(t.type)}stopTraslate(){Nt.forEach((t=>this.video.removeEventListener(t,this.handleVideoEventBound))),this.audio.pause(),this.audio.src="",this.audio.removeAttribute("src"),this.votVideoVolumeSlider.container.hidden=!0,this.votVideoTranslationVolumeSlider.container.hidden=!0,this.votDownloadButton.hidden=!0,this.downloadTranslationUrl=null,this.transformBtn("none",y.get("translateVideo")),this.volumeOnStart&&(m.Z.log(`Volume on start: ${this.volumeOnStart}`),"youtube"===this.site.host?Z(this.volumeOnStart):this.video.volume=this.volumeOnStart),clearInterval(this.streamPing),this.hls?.destroy(),this.hls=C()}async translateExecutor(t){this.videoData.detectedLanguage||(this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage)),m.Z.log("Run videoValidator"),this.videoValidator(),m.Z.log("Run translateFunc"),this.translateFunc(t,this.videoData.isStream,this.videoData.detectedLanguage,this.videoData.responseLanguage,this.videoData.translationHelp)}translateFunc(t,e,n,i,a){console.log("[VOT] Video Data: ",this.videoData);const r=`${this.site.url}${t}`;if(this.videoValidator(),e)return m.Z.log("Executed stream translation"),void function(t,e,n,i){m.Z.log(`Translate stream (url: ${t}, requestLang: ${e}, responseLang: ${n})`),async function(t,e,n,i){try{m.Z.log("requestStreamTranslation");const a=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;m.Z.log("Inited yandexRequest...");const r=dt(t,e,n);await a("/stream-translation/translate-stream",r,{"Vtrans-Signature":await St(r),"Sec-Vtrans-Token":xt(!1)},i)}catch(t){console.error("[VOT]",t),i(!1)}}(t,e,n,((t,e)=>{if(m.Z.log("[exec callback] Requesting stream translation"),!t)return void i(!1,y.get("requestTranslationFailed"));const o=ct(e);switch(console.log("[VOT] Stream Translation response: ",o),o.interval){case 10:i(!1,o.interval,y.get("translationTakeFewMinutes"));break;case 20:i(!0,o.interval,o||y.get("audioNotReceived"));break;case 0:i(!1,o.interval,y.get("streamNoConnectionToServer"))}}))}(r,n,i,(async(r,s,l)=>{if(m.Z.log("[exec callback] translateStream callback"),O(this.site.host,this.video)!==t)return;if(!r||!l.translatedInfo)return"VOTLocalizedError"===l?.name?this.transformBtn("error",l.localizedMessage):1===this.data.translateAPIErrors&&"ru"!==y.lang?(this.transformBtn("error",`${y.get("VOTTranslatingError")}...`),this.transformBtn("error",await _(l,"ru",y.lang))):this.transformBtn("error",l),void(10===s&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),1e3*s)));this.transformBtn("success",y.get("disableTranslate")),console.log(l);const d=l.pingId;m.Z.log(`Stream pingId: ${d}`),this.streamPing=setInterval((async()=>await async function(t,e){try{m.Z.log("requestStreamPing");const n=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;m.Z.log("Inited yandexRequest...");const i=lt(t);await n("/stream-translation/ping-stream",i,{"Vtrans-Signature":await St(i),"Sec-Vtrans-Token":xt(!1)},e)}catch(t){console.error("[VOT]",t),e(!1)}}(d,(t=>m.Z.log("Stream ping result: ",t)))),1e3*s),m.Z.log(l.translatedInfo.url);const c=`https://${A.e6}/?all=yes&origin=${encodeURIComponent("https://strm.yandex.ru")}&referer=${encodeURIComponent("https://strm.yandex.ru")}&url=${encodeURIComponent(l.translatedInfo.url)}`;if(m.Z.log(c),this.hls)this.hls.on(Hls.Events.MEDIA_ATTACHED,(function(){m.Z.log("audio and hls.js are now bound together !")})),this.hls.on(Hls.Events.MANIFEST_PARSED,(function(t,e){m.Z.log("manifest loaded, found "+e.levels.length+" quality level")})),this.hls.loadSource(c),this.hls.attachMedia(this.audio),this.hls.on(Hls.Events.ERROR,(function(t,e){if(e.fatal)switch(e.type){case Hls.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover"),this.hls.recoverMediaError();break;case Hls.ErrorTypes.NETWORK_ERROR:console.error("fatal network error encountered",e);break;default:this.hls.destroy()}})),m.Z.log(this.hls);else{if(!this.audio.canPlayType("application/vnd.apple.mpegurl"))throw new w("audioFormatNotSupported");this.audio.src=c}U(this.video,10),this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),this.video.src||this.video.currentSrc||this.video.srcObject?(this.video&&!this.video.paused&&this.lipSync("play"),Nt.forEach((t=>this.video.addEventListener(t,this.handleVideoEventBound))),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,1===this.data.autoSetVolumeYandexStyle&&(this.votVideoVolumeSlider.input.value=100*this.data.autoVolume,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=100*this.data.autoVolume+"%",ft.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=c):this.stopTranslation()}));if(["udemy","coursera"].includes(this.site.host)&&!a)throw new w("VOTTranslationHelpNull");$t(r,this.videoData.duration,n,i,a,(async(o,r)=>{if(m.Z.log("[exec callback] translateVideo callback"),O(this.site.host,this.video)!==t)return;if(!o)return"VOTLocalizedError"===r?.name?this.transformBtn("error",r.localizedMessage):1!==this.data.translateAPIErrors||r.includes(y.get("translationTake"))||"ru"===y.lang?this.transformBtn("error",r):(this.transformBtn("error",y.get("VOTTranslatingError")),this.transformBtn("error",await _(r,"ru",y.lang))),r.includes(y.get("translationTake"))&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),6e4)),void console.error("[VOT]",r);if(this.audio.src=r,this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),"twitter"===this.site.host&&document.querySelector('div[data-testid="app-bar-back"][role="button"]').addEventListener("click",this.stopTranslationBound),!this.video.src&&!this.video.currentSrc&&!this.video.srcObject)return void this.stopTranslation();const s=["twitch","vimeo","facebook","rutube","twitter","bilibili","mail_ru","rumble","eporner"];for(let t=0;t{t.forEach((t=>{"attributes"===t.type&&"src"===t.attributeName&&t.target===this.video&&""!==t.target.src&&(this.stopTranslation(),this.firstPlay=!0)}))})).observe(this.container,{attributes:!0,childList:!1,subtree:!0,attributeOldValue:!0});break}this.video&&!this.video.paused&&this.lipSync("play"),Nt.forEach((t=>this.video.addEventListener(t,this.handleVideoEventBound))),this.transformBtn("success",y.get("disableTranslate")),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,1===this.data.autoSetVolumeYandexStyle&&(this.votVideoVolumeSlider.input.value=100*this.data.autoVolume,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=100*this.data.autoVolume+"%",ft.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=r}))}stopTranslation(){this.stopTraslate(),this.syncVideoVolumeSlider()}async waitInitialization(){let t=!1;return await Promise.race([new Promise((async e=>{await L(1e3),t||console.error("[VOT] Initialization timeout"),t=!0,e(!1)})),new Promise((async e=>{for(;!this.initialized;)await L(100);t=!0,e(!0)}))])}async handleSrcChanged(){if(m.Z.log("[VideoHandler] src changed",this),!await this.waitInitialization())return;this.stopTranslation(),this.videoData=await this.getVideoData(),this.firstPlay=!0;const t=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=t,t&&(this.votMenu.container.hidden=t),this.site.selector||(this.container=this.video.parentElement),this.container.contains(this.votButton.container)||(this.container.appendChild(this.votButton.container),this.container.appendChild(this.votMenu.container)),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage??"ru"),this.translateToLang=this.data.responseLanguage??"ru"}async release(){m.Z.log("[VideoHandler] release"),await this.waitInitialization()&&(this.initialized=!1,this.stopTranslation(),this.releaseExtraEvents(),this.subtitlesWidget.release(),this.srcObserver.disconnect(),clearInterval(this.srcObjectInterval),this.votButton.container.remove(),this.votMenu.container.remove())}}const Zt=new class{constructor(){this.onVideoAdded=new Rt,this.onVideoRemoved=new Rt,this.handleVideoAddedBound=this.handleVideoAdded.bind(this),this.handleVideoRemovedBound=this.handleVideoRemoved.bind(this),this.observer=new MutationObserver((t=>{window.requestIdleCallback((()=>{t.forEach((t=>{"childList"===t.type&&(qt(t.addedNodes).forEach(this.handleVideoAddedBound),qt(t.removedNodes).forEach(this.handleVideoRemovedBound))}))}),{timeout:1e3})}))}enable(){this.observer.observe(document,{childList:!0,subtree:!0}),document.querySelectorAll("video").forEach(this.handleVideoAddedBound)}disable(){this.observer.disconnect()}handleVideoAdded(t){this.onVideoAdded.dispatch(t)}handleVideoRemoved(t){document.contains(t)||this.onVideoRemoved.dispatch(t)}},Ut=new WeakMap;(async function(){if(m.Z.log("Loading extension..."),await y.update(),m.Z.log(`Selected menu language: ${y.lang}`),GM_info?.scriptHandler&&k.includes(GM_info.scriptHandler))return console.error(`[VOT] ${y.getDefault("unSupportedExtensionError").format(GM_info.scriptHandler)}`),alert(`[VOT] ${y.get("unSupportedExtensionError").format(GM_info.scriptHandler)}`);m.Z.log("Extension compatibility passed..."),Zt.onVideoAdded.addListener((t=>{for(const e of zt.filter((t=>{const e=t=>t instanceof RegExp&&t.test(window.location.hostname)||"string"==typeof t&&window.location.hostname.includes(t)||"function"==typeof t&&t(new URL(window.location));return!!(e(t.match)||t.match instanceof Array&&t.match.some((t=>e(t))))&&t.host&&t.url}))){if(!e)continue;let o;if(e.shadowRoot?(o=e.selector?Object.values(document.querySelectorAll(e.selector)).find((e=>e.shadowRoot.contains(t))):t.parentElement,o=o&&o.shadowRoot?o.parentElement:o):o=e.selector?Object.values(document.querySelectorAll(e.selector)).find((e=>e.contains(t))):t.parentElement,o&&!("rumble"===e.host&&o.querySelector("vot-block")||("peertube"===e.host&&(e.url=window.location.origin),Ut.has(t)))){Ut.set(t,new Ht(t,o,e));break}}})),Zt.onVideoRemoved.addListener((async t=>{Ut.has(t)&&(await Ut.get(t).release(),Ut.delete(t))})),Zt.enable()})().catch((t=>{console.error("[VOT]",t)}))})()})(); \ No newline at end of file diff --git a/dist/vot.user.js b/dist/vot.user.js index 3b70531f..19d47116 100644 --- a/dist/vot.user.js +++ b/dist/vot.user.js @@ -1288,10 +1288,8 @@ const getVideoId = (service, video) => { return url.pathname.match(/(?:videos)\/([^/]+)/)?.[0]; } case "proxytok": - // return url.pathname.match(/video\/([^/]+)/)?.[1]; return url.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0]; case "tiktok": { - // let id = url.pathname.match(/video\/([^/]+)/)?.[1]; let id = url.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0]; if (!id) { const playerEl = video.closest(".xgplayer-playing, .tiktok-web-player"); @@ -1686,64 +1684,20 @@ function getVideoVolume() { } function setVideoVolume(volume) { - return getPlayer()?.setVolume(Math.round(volume * 100)); -} - -function checkStreamTime(streamTime) { - // TODO: remove - const absTime = streamTime.absoluteTime; - return ( - !(absTime || !Number.isFinite(absTime) || absTime <= 0) && - Math.abs(Date.now() - 1000 * absTime) < 86400000 && - streamTime.currentTime !== 0 - ); - // return !(void 0 === (t = e.absoluteTime) || !Number.isFinite(t) || t <= 0) && Math.abs(Date.now() - 1e3 * t) < 864e5 && 0 !== e.currentTime; -} - -function getStreamTime(video) { - // TODO: remove const player = getPlayer(); - const progressState = player?.getProgressState?.call(); - let absoluteTime = player?.getMediaReferenceTime - ? player?.getMediaReferenceTime?.call() - : progressState?.ingestionTime; - const currentTime = progressState?.seekableEnd || video.currentTime; - - // getStreamTimes -> ue() - // СЕЙЧАС ВРЕМЯ ТРАНСЛЯЦИИ УСТАНАВЛИВАЕТСЯ НЕПРАВИЛЬНО И ПЕРЕВОД ЗАЛАГИВАЕТ - - const streamTime = { - absoluteTime, - currentTime, - }; - - return checkStreamTime(streamTime), streamTime; + if (player?.setVolume) { + player.setVolume(Math.round(volume * 100)); + return true; + } } function videoSeek(video, time) { // * TIME IN MS debug/* default */.Z.log("videoSeek", time); - // const player = getPlayer(); - // if (!player) { - // console.error("player not found") - // return false; - // } - - // const streamTime = getStreamTime(video); - // console.log("videoSeek", video.currentTime - time ) - // const finalTime = streamTime.currentTime - time - // const finalTime = video.currentTime - time; const preTime = getPlayer()?.getProgressState()?.seekableEnd || video.currentTime; const finalTime = preTime - time; // we always throw it to the end of the stream - time video.currentTime = finalTime; - - // return player.seekTo.call(time, true); -} - -function streamToLive() { - // TODO: remove - return getPlayer()?.seekToStreamTime(); } function getSubtitles() { @@ -1818,9 +1772,7 @@ const youtubeUtils = { getSubtitles, getVideoData, setVideoVolume, - getStreamTime, videoSeek, - streamToLive, }; ;// CONCATENATED MODULE: ./src/yandexProtobuf.js @@ -5171,7 +5123,10 @@ class VideoHandler { // Set video volume in 0.00-1.00 format setVideoVolume(volume) { if (this.site.host === "youtube") { - return youtubeUtils.setVideoVolume(volume); + const videoVolume = youtubeUtils.setVideoVolume(volume); + if (videoVolume) { + return; + } } this.video.volume = volume; } @@ -5510,7 +5465,6 @@ class VideoHandler { reqInterval * 1000, ); - // const streamURL = "https://stream.ram.radio/audio/ram.stream_aac/playlist.m3u8"; debug/* default */.Z.log(resOrError.translatedInfo.url); const streamURL = `https://${config/* m3u8ProxyHost */.e6}/?all=yes&origin=${encodeURIComponent( "https://strm.yandex.ru", @@ -5518,9 +5472,7 @@ class VideoHandler { "https://strm.yandex.ru", )}&url=${encodeURIComponent(resOrError.translatedInfo.url)}`; debug/* default */.Z.log(streamURL); - // const timestamp = Date.now(); // get timestamp - debug/* default */.Z.log("Test hls support"); if (this.hls) { this.hls.on(Hls.Events.MEDIA_ATTACHED, function () { debug/* default */.Z.log("audio and hls.js are now bound together !"); @@ -5566,17 +5518,8 @@ class VideoHandler { throw new VOTLocalizedError("audioFormatNotSupported"); } - // const streamTime = youtubeUtils.getStreamTime(this.video) - - // youtubeUtils.videoSeekTo(this.video, streamTime.absoluteTime - (resOrError.translatedInfo.timestamp / 1000)); - - // console.log("video times", this.video.duration, this.video.currentTime); - // console.log("stream times", streamTime.currentTime, streamTime.absoluteTime); - // console.log("trans info times", resOrError.translatedInfo.timestamp); - youtubeUtils.videoSeek(this.video, 10); // 10 is the most successful number for streaming. With it, the audio is not so far behind the original - // TODO: Remove code repetition this.volumeOnStart = this.getVideoVolume(); if (typeof this.data.defaultVolume === "number") { this.audio.volume = this.data.defaultVolume / 100; @@ -5599,7 +5542,6 @@ class VideoHandler { } if (this.video && !this.video.paused) this.lipSync("play"); - // this.audio.play(); videoLipSyncEvents.forEach((e) => this.video.addEventListener(e, this.handleVideoEventBound), );