diff --git a/dist/vot-cloudflare-min.user.js b/dist/vot-cloudflare-min.user.js index 80b325e5..6fd70e00 100644 --- a/dist/vot-cloudflare-min.user.js +++ b/dist/vot-cloudflare-min.user.js @@ -108,6 +108,7 @@ // @match *://youtube.googleapis.com/embed/* // @match *://*.banned.video/* // @match *://*.weverse.io/* +// @match *://*.newgrounds.com/* // @connect api.browser.yandex.ru // @downloadURL https://raw.githubusercontent.com/ilyhalight/voice-over-translation/dev/dist/vot-cloudflare-min.user.js // @grant GM_xmlhttpRequest @@ -126,4 +127,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-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;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:()=>c,I1:()=>r,Rr:()=>s,e6:()=>i,ez:()=>a,jm:()=>u,kF:()=>d,rm:()=>h,sN:()=>l});var n=o("./src/utils/utils.js");const i="m3u8proxy.toil-dump.workers.dev",a="uk"===n.KQ?"vot-new.toil-dump.workers.dev":"vot-worker.onrender.com",r="xtGCyGdTY2Jy6OMEKdTuXev3Twhkamgm",s="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",l=.15,d="yandex",c="yandex",u={yandex:"https://translate.toil.cc/detect",rustServer:"https://rust-server-531j.onrender.com/detect"},h={yandex:"https://translate.toil.cc/translate"}},"./src/localization/localizationProvider.js":(t,e,o)=>{"use strict";o.d(e,{Z:()=>r,V:()=>s});const n=JSON.parse('{"__version__":3,"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","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","searchField":"Search...","VOTTranslateAPIErrors":"Translate errors from the API","VOTTranslationService":"Translation Service","VOTDetectService":"Detect Service","VOTTranslatingError":"Translating the error","VOTProxyWorkerHost":"Enter the proxy worker address","VOTM3u8ProxyHost":"Enter the address of the m3u8 proxy worker","proxySettings":"Proxy Settings"}');var i=o("./src/utils/debug.js"),a=o("./src/utils/storage.js");const r=["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"],s=new class{lang="en";locale={};gmValues=["locale-phrases","locale-lang","locale-version","locale-lang-override"];constructor(){const t=a.i.syncGet("locale-lang-override","auto");this.lang=t&&"auto"!==t?t:(navigator.language||navigator.userLanguage)?.substr(0,2)?.toLowerCase()??"en",this.setLocaleFromJsonString(a.i.syncGet("locale-phrases",""))}reset(){this.gmValues.forEach((t=>a.i.syncDelete(t)))}async update(t=!1){(t||2!==await a.i.get("locale-version",0,!0)||await a.i.get("locale-lang")!==this.lang)&&(i.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 a.i.set("locale-phrases",t),this.setLocaleFromJsonString(t);const e=this.getFromLocale(this.locale,"__version__");"number"==typeof e&&await a.i.set("locale-version",e),await a.i.set("locale-lang",this.lang)})).catch((async t=>{console.error("[VOT] [localizationProvider] failed get locale, cause:",t),this.setLocaleFromJsonString(await a.i.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(n,t)??t}get(t){return this.getFromLocale(this.locale,t)??this.getFromLocale(n,t)??t}}},"./src/utils/debug.js":(t,e,o)=>{"use strict";o.d(e,{Z:()=>n});const n={log:(...t)=>{}}},"./src/utils/storage.js":(t,e,o)=>{"use strict";o.d(e,{i:()=>i});var n=o("./src/utils/debug.js");const i=new class{constructor(){this.gmSupport="function"==typeof GM_getValue,n.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):Promise.resolve(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):Promise.resolve(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):Promise.resolve(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():Promise.resolve(this.syncList())}}},"./src/utils/utils.js":(t,e,o)=>{"use strict";o.d(e,{KQ:()=>a,PG:()=>s,QZ:()=>c,eL:()=>l,gJ:()=>r,qq:()=>d});var n=o("./src/localization/localizationProvider.js");const i=navigator.language||navigator.userLanguage,a=i?.substr(0,2)?.toLowerCase()??"en",r=(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":{const t=o.searchParams.get("app_id"),e=o.pathname.match(/[^/]+\/[^/]+$/)?.[0]||o.pathname.match(/[^/]+$/)?.[0];return t?`${e}?app_id=${t}`:e}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":case"facebook":return o.pathname;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.querySelectorAll("*")).filter((t=>t.innerHTML.trim().includes(".m3u8")));try{let e=t[1].lastChild.src;return e.match(/\/video\/(\w+)\.m3u8/)?.[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];case"coursehunter":{const t=o.pathname.match(/\/course\/([^/]+)/)?.[1];return!!t&&t+o.search}case"ok.ru":return o.pathname.match(/\/video\/(\d+)/)?.[0];case"googledrive":return o.searchParams.get("docid");case"bannedvideo":return o.searchParams.get("id");case"weverse":return o.pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[0];default:return!1}};function s(t){const e=Math.floor(t/60),o=Math.floor(t%60);return e>=60?n.V.get("translationTakeMoreThanHour"):e>=10&&e%10?n.V.get("translationTakeApproximatelyMinutes").replace("{0}",e):1==e||0==e&&o>0?n.V.get("translationTakeAboutMinute"):n.V.get("translationTakeApproximatelyMinute").replace("{0}",e)}function l(t){return t.toLowerCase().split(";")[0].trim().split("-")[0].split("_")[0]}function d(){return"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}function c(){return"undefined"!=typeof Hls&&Hls?.isSupported()?new Hls({debug:!1,lowLatencyMode:!0,backBufferLength:90}):void 0}},"./src/yandexRequest-cloudflare.js":(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>r});var n=o("./src/config/config.js"),i=o("./src/utils/debug.js"),a=o("./src/utils/storage.js");const r=async function(t,e,o,r){let s,l;try{i.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":n.Rr,Pragma:"no-cache","Cache-Control":"no-cache","Sec-Fetch-Mode":"no-cors",...o},body:Array.from(e)})},d=await a.i.get("proxyWorkerHost",n.ez);s=await fetch(`https://${d}${t}`,r),i.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";const t=["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"],e=["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"];var n=o("./src/config/config.js");const i=["ru","en","zh","ko","lt","lv","ar","fr","it","es","de","ja"],a=["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"],r=["ru","en","kk"];var s=o("./src/localization/localizationProvider.js"),l=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),d=o.n(l),c=o("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),u=o.n(c),h=o("./node_modules/style-loader/dist/runtime/insertBySelector.js"),p=o.n(h),g=o("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),v=o.n(g),m=o("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),b=o.n(m),f=o("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),y=o.n(f),w=o("./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss"),x={};function S(t){const e=document.createElement("vot-block");return e.classList.add("vot-icon-button"),e.innerHTML=t,e}function k(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 T(t,e="",o=" ",n=!1){const i=document.createElement("vot-block");i.classList.add("vot-textfield");const a=document.createElement(n?"textarea":"input");a.placeholder=o,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),{container:i,input:a,label:r}}function V(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=S('');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 M(t,e,o,n={}){const i=n.onSelectCb||function(){},a=n.labelElement||"";let r=[];const l=document.createElement("vot-block");l.classList.add("vot-select"),a&&l.appendChild(a);const d=document.createElement("vot-block");d.classList.add("vot-select-outer");const c=document.createElement("span");c.classList.add("vot-select-title"),c.innerText=t,void 0===t&&(c.innerText=o.find((t=>!0===t.selected))?.label);const u=document.createElement("vot-block");return u.classList.add("vot-select-arrow-icon"),u.innerHTML='',d.append(c,u),d.onclick=()=>{const t=V(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,c.innerText=t.label,await i(a))},n.appendChild(e)}const a=T(s.V.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=[]}},l.append(d),{container:l,title:c,arrowIcon:u,labelElement:a,setTitle:t=>{c.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}}}x.styleTagTransform=y(),x.setAttributes=v(),x.insert=p().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=b(),d()(w.Z,x),w.Z&&w.Z.locals&&w.Z.locals;const L={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:S,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=>k(t.target))),k(a),{container:i,input:a,label:r}},createTextfield:T,createDialog:V,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:M,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=M(e,o,n,{onSelectCb:i}),u=document.createElement("vot-block");u.classList.add("vot-lang-select-icon"),u.innerHTML='';const h=M(a,r,s,{onSelectCb:l});return d.append(c.container,u,h.container),{container:d,fromSelect:c,icon:u,toSelect:h}},updateSlider:k};class P extends Error{constructor(t){super(s.V.getDefault(t)),this.name="VOTLocalizedError",this.unlocalizedMessage=t,this.localizedMessage=s.V.get(t)}}var O=o("./src/utils/debug.js"),E=o("./src/utils/utils.js");function C(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}const A=new protobuf.Type("VideoTranslationHelpObject").add(new protobuf.Field("target",1,"string")).add(new protobuf.Field("targetUrl",2,"string")),B=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")).add(new protobuf.Field("unknown6",16,"int32")).add(new protobuf.Field("unknown7",17,"int32")),F=new protobuf.Type("VideoSubtitlesRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")),_=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")),q=new protobuf.Type("VideoStreamPingRequest").add(new protobuf.Field("pingId",1,"int32")),R=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")),z=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")),D=new protobuf.Type("VideoSubtitlesResponse").add(new protobuf.Field("unknown0",1,"int32")).add(new protobuf.Field("subtitles",2,"VideoSubtitlesObject","repeated")),I=new protobuf.Type("VideoStreamObject").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("timestamp",2,"int64")),$=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")),N=(new protobuf.Root).define("yandex").add(A).add(B).add(R).add(F).add(z).add(D).add(q).add(_).add(I).add($),j=(t,e,o,n,i)=>N.VideoTranslationRequest.encode({url:t,firstRequest:!0,duration:e,unknown2:1,language:o,unknown3:0,unknown4:0,translationHelp:i,responseLanguage:n,unknown5:0,unknown6:1,unknown7:0}).finish(),H=t=>N.VideoTranslationResponse.decode(new Uint8Array(t)),Z=(t,e)=>N.VideoSubtitlesRequest.encode({url:t,language:e}).finish(),U=t=>N.VideoSubtitlesResponse.decode(new Uint8Array(t)),W=t=>N.VideoStreamPingRequest.encode({pingId:t}).finish(),G=(t,e,o)=>N.VideoStreamRequest.encode({url:t,language:e,responseLanguage:o}).finish(),Y=t=>N.VideoStreamResponse.decode(new Uint8Array(t));var K=o("./node_modules/bowser/es5.js");function J(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 Q(t){const e=new TextEncoder("utf-8"),o=await window.crypto.subtle.importKey("raw",e.encode(n.I1),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await window.crypto.subtle.sign("HMAC",o,t);return Array.from(new Uint8Array(i),(t=>t.toString(16).padStart(2,"0"))).join("")}var X=o("./src/utils/storage.js");async function tt(t,e){const o=new AbortController,n=setTimeout((()=>o.abort()),3e3);try{return await fetch(t,{...e,signal:o.signal})}catch(t){return console.error("Fetch timed-out. Error:",t),t}finally{clearTimeout(n)}}const et={async translate(t,e){try{const o=await tt(n.rm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})});if(o instanceof Error)throw o;const i=await o.json();if(200!==i.code)throw i.message;return i.text[0]}catch(e){return console.error("Error translating text:",e),t}},async detect(t,e){try{const o=await tt(n.jm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})});if(o instanceof Error)throw o;const i=await o.json();if(200!==i.code)throw i.message;return i.lang??"en"}catch(t){return console.error("Error translating text:",t),"en"}}},ot={async detect(t){try{const e=await fetch(n.jm.rustServer,{method:"POST",body:t});if(e instanceof Error)throw e;return await e.text()}catch(t){return console.error("Error getting lang from text:",t),"en"}}};async function nt(t,e="",o="ru"){if("yandex"===await X.i.get("translationService",n.kF)){const n=e&&o?`${e}-${o}`:o;return await et.translate(t,n)}return t}const it=["yandex"],at=["yandex","rust-server"];function rt(){return/^m\.youtube\.com$/.test(window.location.hostname)}function st(){return window.location.pathname.startsWith("/shorts/")?rt()?document.querySelector("#movie_player"):document.querySelector("#shorts-player"):document.querySelector("#movie_player")}function lt(){const t=st();return t?.getPlayerResponse?t?.getPlayerResponse?.call()??null:t?.data?.playerResponse??null}function dt(){const t=st();return t?.getVideoData?t?.getVideoData?.call()??null:t?.data?.playerResponse?.videoDetails??null}const ct=function(){const t=st();return t?.getVolume?t.getVolume.call()/100:1},ut=function(){const t=lt();let e=t?.captions?.playerCaptionsTracklistRenderer?.captionTracks??[];return e=e.reduce(((t,e)=>{if("languageCode"in e){const o=e?.languageCode?(0,E.eL)(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}),[]),O.Z.log("youtube subtitles:",e),e},ht=async function(){const t=st(),e=lt(),o=dt(),{title:a}=o??{},{shortDescription:r,isLive:s,isLiveContent:l,isUpcoming:d}=e?.videoDetails??{},c=!(!s&&!d||l);let u=await async function(t,e,o,i){if(!window.location.hostname.includes("m.youtube.com")&&t?.getAudioTrack){const e=t.getAudioTrack(),o=e?.getLanguageInfo();if("und"!==o?.id)return(0,E.eL)(o.id.split(".")[0])}const a=e?.captions?.playerCaptionsTracklistRenderer?.captionTracks;if(a?.length){const t=a.find((t=>"asr"===t.kind));if(t&&t.languageCode)return(0,E.eL)(t.languageCode)}const r=[/(?:https?|ftp):\/\/[\S]+/g,/https?:\/\/\S+|www\.\S+/gm,/\b\S+\.\S+/gm,/#[^\s#]+/g,/Auto-generated by YouTube/g,/Provided to YouTube by/g,/Released on/g,/Bitcoin/g,/USDT/g,/Paypal/g],s=[o,i.split("\n\n").filter((t=>!r.some((e=>e.test(t))))).join("\n\n")].join(" ").replace(/[^\p{L}\s]/gu," ").trim().replace(/\s+/g," ").slice(0,1e3);return await async function(t){switch(await X.i.get("detectService",n.EY)){case"yandex":return await et.detect(t);case"rust-server":return await ot.detect(t);default:return"en"}}(s)}(t,e,a,r);i.includes(u)||(u="en");const h={isLive:!!s,isPremiere:c,title:a,description:r,detectedLanguage:u};return O.Z.log("youtube video data:",h),console.log("[VOT] Detected language: ",h.detectedLanguage),h},pt=function(t){const e=st();if(e?.setVolume)return e.setVolume(Math.round(100*t)),!0},gt=function(t,e){O.Z.log("videoSeek",e);const o=(st()?.getProgressState()?.seekableEnd||t.currentTime)-e;t.currentTime=o};function vt(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({...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 mt(t,e){const o=t.text.split(/([\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;return{...e,startMs:s,durationMs:r?i-s:n}}))}class bt{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","
")}`:"")}}const ft=async function(){const t=window.course_id??document.querySelector('input[name="course_id"]')?.value,e=window.lessons??await async function(t){const e=await fetch(`https://coursehunter.net/api/v1/course/${t}/lessons`);return await e.json()}(t),o=parseInt(document.querySelector(".lessons-item_active")?.dataset?.index??1),n=e?.[o-1],{file:i,duration:a}=n;return O.Z.log("coursehunter course data:",e),{url:i,duration:a}};function yt(){return wt()?.player}function wt(){return document.querySelector(".vjs-v6")}const xt=async function(t="en"){let e=null;const o=yt(),{duration:n}=o?.cache_||{},{courseId:a,tracks:r,sources:s}=o?.options_||{},l=function(t){const e=t?.find((t=>"video/mp4"===t.type));return e?.src}(s),d=await async function(t){const e=await fetch(`https://www.coursera.org/api/onDemandCourses.v1/${t}`),o=await e.json();return o?.elements?.[0]}(a);let c=d?.primaryLanguageCodes?.[0];c=c?(0,E.eL)(c):"en",i.includes(c)||(c="en");const u=function(t,e,o){let n=t?.find((t=>(0,E.eL)(t.srclang)===e));return n||(n=t?.find((t=>(0,E.eL)(t.srclang)===o))||t?.[0]),n?.src}(r,c,t);console.log(`videoURL: ${l}, subtitlesURL: ${u}`),u&&l?e=[{target:"video_file_url",targetUrl:l},{target:"subtitles_file_url",targetUrl:`https://www.coursera.org${u}`}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${l}, subtitlesURL: ${u}`);const h={duration:n,detectedLanguage:c,translationHelp:e};return O.Z.log("coursera video data:",h),console.log("[VOT] Detected language: ",h.detectedLanguage),h},St="https://www.udemy.com/api-2.0";async function kt(t){const e=await fetch(`${St}/courses/${t}/?`+new URLSearchParams({"fields[course]":"locale",use_remote_version:"true",caching_intent:"true"}));return await e.json()}async function Tt(t,e,o){if(!(t.expires+2592e6>(new Date).getTime()&&t.accessToken))return void console.error(s.V.get("udemyAccessTokenExpired"));const n=`Bearer ${t.accessToken}`,i=await fetch(`${St}/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 Vt(){return Lt()?.player}function Mt(){const t=document.querySelector(".ud-app-loader[data-module-id='course-taking']")?.dataset?.moduleArgs;return t?JSON.parse(t):(console.error(s.V.get("udemyModuleArgsNotFound")),{})}function Lt(){return document.querySelector(".vjs-v7")}const Pt=async function(t,e="en"){let o=null;const n=Vt();O.Z.log("udemyData",t);const a=Mt();O.Z.log("moduleData: ",a);const r=a.courseId,s=window.location.pathname.match(/learn\/lecture\/([^/]+)/)?.[1];O.Z.log(`CourseId: ${r}, lectureId: ${s}`);const l=await kt(r);O.Z.log("courseLang Data:",l);const d=await Tt(t,r,s);console.log("lecture Data:",d);let c=l?.locale?.locale;c=c?(0,E.eL)(c):"en",i.includes(c)||(c="en");const u=d?.asset?.length||n?.cache_?.duration,h=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(d?.asset?.media_sources)||function(){const t=Lt()?.querySelector("video")?.src;return!t?.startsWith("blob:")&&t}(),p=function(t,e,o){let n=t?.find((t=>(0,E.eL)(t.locale_id)===e));return n||(n=t?.find((t=>(0,E.eL)(t.locale_id)===o))||t?.[0]),n?.url}(d?.asset?.captions,c,e);console.log(`videoURL: ${h}, subtitlesURL: ${p}`),p&&h?o=[{target:"video_file_url",targetUrl:h},{target:"subtitles_file_url",targetUrl:p}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${h}, subtitlesURL: ${p}`);const g={duration:u,detectedLanguage:c,translationHelp:o};return O.Z.log("udemy video data:",g),console.log("[VOT] Detected language: ",g.detectedLanguage),g},Ot=async function(t){const e=await async function(t){return await fetch("https://api.banned.video/graphql",{method:"POST",body:JSON.stringify({operationName:"GetVideo",query:"query GetVideo($id: String!) {\n getVideo(id: $id) {\n ...DisplayVideoFields\n videoUrl: directUrl\n live\n }\n }\n\n fragment DisplayVideoFields on Video {\n title\n description: summary\n duration: videoDuration\n }",variables:{id:t}}),headers:{"User-Agent":"bannedVideoFrontEnd","apollographql-client-name":"banned-web","apollographql-client-version":"1.3","content-type":"application/json"}}).then((t=>t.json())).catch((t=>(console.error(t),{data:{getVideo:{}}})))}(t);O.Z.log("banned.video video data:",e);const{videoUrl:o,duration:n,live:i,description:a,title:r}=e.data.getVideo;return{url:o,duration:n,live:i,title:r,description:a}},Et="https://global.apis.naver.com/weverse/wevweb";async function Ct(t){const e=Date.now();let o=t.substring(0,Math.min(255,t.length))+e;const n=await async function(t,e){const o=new TextEncoder("utf-8");return e=o.encode(e),window.crypto.subtle.importKey("raw",o.encode(t),{name:"HMAC",hash:{name:"SHA-1"}},!1,["sign","verify"]).then((t=>window.crypto.subtle.sign("HMAC",t,e))).then((t=>btoa(String.fromCharCode(...new Uint8Array(t))))).catch((t=>(console.error(t),!1)))}("1b9cb6378d959b45714bec49971ade22e6e24e42",o);return{wmsgpad:e,wmd:n}}const At=async function(){const t=new URL(window.location).pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[3],e=await async function(t){const e=`/post/v1.0/post-${t}/preview?`+new URLSearchParams({fieldSet:"postForPreview",appId:"be4d79eb8fc7bd008ee82c8ec4ff6fd4",language:"en",os:"WEB",platform:"WEB",wpf:"pc"}),o=await Ct(e);return await fetch(Et+e+"&"+new URLSearchParams(o)).then((t=>t.json())).catch((t=>(console.error(t),{extension:{video:{}}})))}(t);O.Z.log("weverse video preview data:",e);const{videoId:o,serviceId:n,infraVideoId:i}=e.extension.video;if(!(o&&n&&i))return!1;const{inKey:a}=await async function(t){const e=`/video/v1.1/vod/${t}/inKey?`+new URLSearchParams({gcc:"RU",appId:"be4d79eb8fc7bd008ee82c8ec4ff6fd4",language:"en",os:"WEB",platform:"WEB",wpf:"pc"}),o=await Ct(e);return await fetch(Et+e+"&"+new URLSearchParams(o),{method:"POST"}).then((t=>t.json())).catch((t=>(console.error(t),{})))}(o);if(O.Z.log("weverse video inKey data:",e),!a)return!1;const r=await async function(t,e,o){const n=Date.now();return await fetch(`https://global.apis.naver.com/rmcnmv/rmcnmv/vod/play/v2.0/${t}?`+new URLSearchParams({key:e,sid:o,nonce:n,devt:"html5_pc",prv:"N",aup:"N",stpb:"N",cpl:"en",env:"prod",lc:"en",adi:[{adSystem:null}],adu:"/"})).then((t=>t.json())).catch((t=>(console.error(t),{videos:{list:[]}})))}(i,a,n);O.Z.log("weverse video data:",r);const s=r.videos.list.find((t=>!1===t.useP2P&&t.source.includes(".mp4")));if(!s)return!1;const{source:l,duration:d}=s;return{url:l,duration:d}},Bt=[{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:/^vimeo.com$/,selector:".player"},{additionalData:"embed",host:"vimeo",url:"https://player.vimeo.com/",match:/^player.vimeo.com$/,selector:".player"},{host:"ok.ru",url:"https://ok.ru/",match:/^ok.ru$/,selector:".html5-vpl_vid"},{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:".vjs-v6"},{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:t,selector:"#player"},{host:"piped",url:"https://youtu.be/",match:e,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)"},{host:"coursehunter",url:"https://coursehunter.net/course/",match:/^coursehunter.net$/,selector:"#oframeplayer > pjsdiv:nth-of-type(1)"},{host:"googledrive",url:"https://drive.google.com/file/d/",match:/^youtube.googleapis.com$/,selector:".html5-video-container"},{host:"bannedvideo",url:"https://banned.video/watch?id=",match:/^(www.)?banned.video$/,selector:".vjs-v7"},{host:"facebook",url:"https://facebook.com",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/videos/"),selector:'div[data-pagelet="WatchPermalinkVideo"]'},{additionalData:"reels",host:"facebook",url:"https://facebook.com",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/reel/"),selector:'div[role="main"]'},{host:"weverse",url:"https://weverse.io/",match:/^weverse.io$/,selector:".webplayer-internal-source-wrapper"}];o("./node_modules/requestidlecallback-polyfill/index.js");class Ft{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 _t(t){return Array.from(t).flatMap((t=>t instanceof HTMLVideoElement?[t]:t instanceof HTMLElement?Array.from(t.querySelectorAll("video")):t.shadowRoot?Array.from(t.shadowRoot.querySelectorAll("video")):[]))}const qt=K.getParser(window.navigator.userAgent).getResult(),Rt=[...t,...e],zt=["playing","ratechange","play","waiting","pause"];function Dt(t,e,o=!1){return t.map((t=>({label:`${o&&!r.includes(t)?"❌ ":""}${s.V.get("langs")[t]??t.toUpperCase()}`,value:t,selected:e===t})))}var It=!1;class $t{translateFromLang="en";translateToLang=E.KQ;timer;ytData="";videoData="";firstPlay=!0;audio=new Audio;hls=(0,E.QZ)();downloadTranslationUrl=null;downloadSubtitlesUrl=null;autoRetry;streamPing;volumeOnStart;tempOriginalVolume;tempVolume;subtitlesList=[];subtitlesListVideoId=null;videoLastSrcObject=null;constructor(t,e,o){O.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.video.addEventListener("loadedmetadata",this.handleSrcChangedBound),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 X.i.get("autoTranslate",0,!0),dontTranslateLanguage:await X.i.get("dontTranslateLanguage",E.KQ),dontTranslateYourLang:await X.i.get("dontTranslateYourLang",1,!0),autoSetVolumeYandexStyle:await X.i.get("autoSetVolumeYandexStyle",1,!0),autoVolume:await X.i.get("autoVolume",n.sN,!0),showVideoSlider:await X.i.get("showVideoSlider",1,!0),syncVolume:await X.i.get("syncVolume",0,!0),subtitlesMaxLength:await X.i.get("subtitlesMaxLength",300,!0),highlightWords:await X.i.get("highlightWords",0,!0),responseLanguage:await X.i.get("responseLanguage",E.KQ),defaultVolume:await X.i.get("defaultVolume",100,!0),udemyData:await X.i.get("udemyData",{accessToken:"",expires:0}),audioProxy:await X.i.get("audioProxy","uk"===E.KQ?1:0,!0),showPiPButton:await X.i.get("showPiPButton",0,!0),translateAPIErrors:await X.i.get("translateAPIErrors",1,!0),translationService:await X.i.get("translationService",n.kF),detectService:await X.i.get("detectService",n.EY),m3u8ProxyHost:await X.i.get("m3u8ProxyHost",n.e6),proxyWorkerHost:await X.i.get("proxyWorkerHost",n.ez)},this.videoData=await this.getVideoData(),console.log("[db] data from db: ",this.data),this.subtitlesWidget=new bt(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=L.createVOTButton(s.V.get("translateVideo")),this.container.appendChild(this.votButton.container),this.votButton.pipButton.hidden=!(0,E.qq)()||!this.data?.showPiPButton,this.votButton.separator2.hidden=!(0,E.qq)()||!this.data?.showPiPButton,this.votButton.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votMenu=L.createVOTMenu(s.V.get("VOTSettings")),this.container.appendChild(this.votMenu.container),this.votDownloadButton=L.createIconButton(''),this.votDownloadButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadButton),this.votDownloadSubtitlesButton=L.createIconButton(''),this.votDownloadSubtitlesButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadSubtitlesButton),this.votSettingsButton=L.createIconButton(''),this.votMenu.headerContainer.appendChild(this.votSettingsButton),this.votTranslationLanguageSelect=L.createVOTLanguageSelect({fromTitle:s.V.get("langs")[this.video.detectedLanguage],fromDialogTitle:s.V.get("videoLanguage"),fromItems:[{label:s.V.get("langs").auto,value:"auto",selected:""},...Dt(i,this.videoData.detectedLanguage)],fromOnSelectCB:async t=>{O.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:s.V.get("langs")[this.video.responseLanguage],toDialogTitle:s.V.get("translationLanguage"),toItems:[...Dt(i,this.videoData.responseLanguage,!0),{label:"─────────",value:"separator",disabled:!0},...Dt(a,this.videoData.responseLanguage,!0)],toOnSelectCB:async t=>{const e=t.target.dataset.votValue;O.Z.log("[toOnSelectCB] select to language",e),this.data.responseLanguage=this.translateToLang=e,await X.i.set("responseLanguage",this.data.responseLanguage),O.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=L.createVOTSelect(s.V.get("VOTSubtitlesDisabled"),s.V.get("VOTSubtitles"),[{label:s.V.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1}],{onSelectCb:async t=>{await this.changeSubtitlesLang(t.target.dataset.votValue)},labelElement:L.createVOTSelectLabel(s.V.get("VOTSubtitles"))}),this.votMenu.bodyContainer.appendChild(this.votSubtitlesSelect.container),this.votVideoVolumeSlider=L.createSlider(`${s.V.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=L.createSlider(`${s.V.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=L.createDialog(s.V.get("VOTSettings")),document.documentElement.appendChild(this.votSettingsDialog.container),this.votTranslationHeader=L.createHeader(s.V.get("translationSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationHeader),this.votAutoTranslateCheckbox=L.createCheckbox(s.V.get("VOTAutoTranslate"),this.data?.autoTranslate??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoTranslateCheckbox.container),this.votDontTranslateYourLangSelect=L.createVOTSelect(s.V.get("langs")[X.i.syncGet("dontTranslateLanguage",E.KQ)],s.V.get("VOTDontTranslateYourLang"),Dt(i,X.i.syncGet("dontTranslateLanguage",E.KQ)),{onSelectCb:async t=>{this.data.dontTranslateLanguage=t.target.dataset.votValue,await X.i.set("dontTranslateLanguage",this.data.dontTranslateLanguage)},labelElement:L.createCheckbox(s.V.get("VOTDontTranslateYourLang"),this.data?.dontTranslateYourLang??!0).container}),this.votSettingsDialog.bodyContainer.appendChild(this.votDontTranslateYourLangSelect.container),this.votAutoSetVolumeCheckbox=L.createCheckbox(`${s.V.get("VOTAutoSetVolume")}`,this.data?.autoSetVolumeYandexStyle??!0),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeCheckbox.container),this.votAutoSetVolumeSlider=L.createSlider(`${100*(this.data?.autoVolume??n.sN)}%`,100*(this.data?.autoVolume??n.sN),0,100),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeSlider.container),this.votShowVideoSliderCheckbox=L.createCheckbox(s.V.get("VOTShowVideoSlider"),this.data?.showVideoSlider??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votShowVideoSliderCheckbox.container),this.votUdemyDataTextfield=L.createTextfield(s.V.get("VOTUdemyData"),this.data?.udemyData?.accessToken??""),this.votUdemyDataTextfield.container.hidden="udemy"!==this.site.host,this.votSettingsDialog.bodyContainer.appendChild(this.votUdemyDataTextfield.container),this.votSyncVolumeCheckbox=L.createCheckbox(s.V.get("VOTSyncVolume"),this.data?.syncVolume??!1),this.votSyncVolumeCheckbox.container.hidden=!["youtube","googledrive"].includes(this.site.host)||"mobile"===this.site.additionalData,this.votSettingsDialog.bodyContainer.appendChild(this.votSyncVolumeCheckbox.container),this.votTranslationServiceSelect=L.createVOTSelect(X.i.syncGet("translationService",n.kF),s.V.get("VOTTranslationService"),Dt(it,X.i.syncGet("translationService",n.kF)),{onSelectCb:async t=>{this.data.translationService=t.target.dataset.votValue,await X.i.set("translationService",this.data.translationService)},labelElement:L.createCheckbox(s.V.get("VOTTranslateAPIErrors"),this.data.translateAPIErrors??!0).container}),this.votTranslationServiceSelect.container.hidden="ru"===s.V.lang,this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationServiceSelect.container),this.votDetectServiceSelect=L.createVOTSelect(X.i.syncGet("detectService",n.EY),s.V.get("VOTDetectService"),Dt(at,X.i.syncGet("detectService",n.EY)),{onSelectCb:async t=>{this.data.detectService=t.target.dataset.votValue,await X.i.set("detectService",this.data.detectService)},labelElement:L.createVOTSelectLabel(s.V.get("VOTDetectService"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votDetectServiceSelect.container),this.votSubtitlesHeader=L.createHeader(s.V.get("subtitlesSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHeader),this.votSubtitlesMaxLengthSlider=L.createSlider(`${s.V.get("VOTSubtitlesMaxLength")}: ${this.data?.subtitlesMaxLength??300}`,this.data?.subtitlesMaxLength??300,50,300),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesMaxLengthSlider.container),this.votSubtitlesHighlightWordsCheckbox=L.createCheckbox(s.V.get("VOTHighlightWords"),this.data?.highlightWords??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHighlightWordsCheckbox.container),this.votProxyHeader=L.createHeader(s.V.get("proxySettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votProxyHeader),this.votM3u8ProxyHostTextfield=L.createTextfield(s.V.get("VOTM3u8ProxyHost"),this.data?.m3u8ProxyHost,n.e6),this.votSettingsDialog.bodyContainer.appendChild(this.votM3u8ProxyHostTextfield.container),this.votProxyWorkerHostTextfield=L.createTextfield(s.V.get("VOTProxyWorkerHost"),this.data?.proxyWorkerHost,n.ez),this.votProxyWorkerHostTextfield.container.hidden=!1,this.votSettingsDialog.bodyContainer.appendChild(this.votProxyWorkerHostTextfield.container),this.votAudioProxyCheckbox=L.createCheckbox(s.V.get("VOTAudioProxy"),this.data?.audioProxy??!1),this.votAudioProxyCheckbox.container.hidden=!1,this.votSettingsDialog.bodyContainer.appendChild(this.votAudioProxyCheckbox.container),this.votAboutHeader=L.createHeader(s.V.get("about")),this.votSettingsDialog.bodyContainer.appendChild(this.votAboutHeader),this.votLanguageSelect=L.createVOTSelect(s.V.get("langs")[X.i.syncGet("locale-lang-override","auto")],s.V.get("VOTMenuLanguage"),Dt(s.Z,X.i.syncGet("locale-lang-override","auto")),{onSelectCb:async t=>{await X.i.set("locale-lang-override",t.target.dataset.votValue)},labelElement:L.createVOTSelectLabel(s.V.get("VOTMenuLanguage"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votLanguageSelect.container),this.votShowPiPButtonCheckbox=L.createCheckbox(s.V.get("VOTShowPiPButton"),this.data?.showPiPButton??!1),this.votShowPiPButtonCheckbox.container.hidden=!(0,E.qq)(),this.votSettingsDialog.bodyContainer.appendChild(this.votShowPiPButtonCheckbox.container),this.votVersionInfo=L.createInformation(`${s.V.get("VOTVersion")}:`,`cloudflare ${GM_info.script.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votVersionInfo.container),this.votAuthorsInfo=L.createInformation(`${s.V.get("VOTAuthors")}:`,GM_info.script.author),this.votSettingsDialog.bodyContainer.appendChild(this.votAuthorsInfo.container),this.votLoaderInfo=L.createInformation(`${s.V.get("VOTLoader")}:`,`${GM_info.scriptHandler} v${GM_info.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votLoaderInfo.container),this.votBrowserInfo=L.createInformation(`${s.V.get("VOTBrowser")}:`,`${qt.browser.name} ${qt.browser.version} (${qt.os.name} ${qt.os.version})`),this.votSettingsDialog.bodyContainer.appendChild(this.votBrowserInfo.container),this.votResetSettingsButton=L.createButton(s.V.get("resetSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votResetSettingsButton)}initUIEvents(){this.votButton.translateButton.addEventListener("click",(()=>{(async()=>{if(this.audio.src)return O.Z.log("[click translationBtn] audio.src is not empty"),void this.stopTraslate();if(this.hls.url)return O.Z.log("[click translationBtn] hls is not empty"),void this.stopTraslate();try{O.Z.log("[click translationBtn] trying execute translation");const t=(0,E.gJ)(this.site.host,this.video);if(!t)throw new P("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=C(this.audio,e,t,this.tempOriginalVolume);this.votVideoTranslationVolumeSlider.input.value=o,this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,L.updateSlider(this.votVideoTranslationVolumeSlider.input),this.tempVolume=o,this.tempOriginalVolume=e}})),this.votVideoTranslationVolumeSlider.input.addEventListener("input",(t=>{(async()=>{this.data.defaultVolume=Number(t.target.value),await X.i.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",(t=>{(async()=>{this.data.autoTranslate=Number(t.target.checked),await X.i.set("autoTranslate",this.data.autoTranslate),O.Z.log("autoTranslate value changed. New value: ",this.data.autoTranslate)})()})),this.votDontTranslateYourLangSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.dontTranslateYourLang=Number(t.target.checked),await X.i.set("dontTranslateYourLang",this.data.dontTranslateYourLang),O.Z.log("dontTranslateYourLang value changed. New value: ",this.data.dontTranslateYourLang)})()})),this.votAutoSetVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.autoSetVolumeYandexStyle=Number(t.target.checked),await X.i.set("autoSetVolumeYandexStyle",this.data.autoSetVolumeYandexStyle),O.Z.log("autoSetVolumeYandexStyle value changed. New value: ",this.data.autoSetVolumeYandexStyle)})()})),this.votAutoSetVolumeSlider.input.addEventListener("input",(t=>{(async()=>{const e=Number(t.target.value);this.data.autoVolume=(e/100).toFixed(2),await X.i.set("autoVolume",this.data.autoVolume),this.votAutoSetVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`})()})),this.votShowVideoSliderCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showVideoSlider=Number(t.target.checked),await X.i.set("showVideoSlider",this.data.showVideoSlider),O.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",(t=>{(async()=>{this.data.udemyData={accessToken:t.target.value,expires:(new Date).getTime()},await X.i.set("udemyData",this.data.udemyData),O.Z.log("udemyData value changed. New value: ",this.data.udemyData),window.location.reload()})()})),this.votSyncVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.syncVolume=Number(t.target.checked),await X.i.set("syncVolume",this.data.syncVolume),O.Z.log("syncVolume value changed. New value: ",this.data.syncVolume)})()})),this.votTranslationServiceSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.translateAPIErrors=Number(t.target.checked),await X.i.set("translateAPIErrors",this.data.translateAPIErrors),O.Z.log("translateAPIErrors value changed. New value: ",this.data.translateAPIErrors)})()})),this.votSubtitlesMaxLengthSlider.input.addEventListener("input",(t=>{(async()=>{this.data.subtitlesMaxLength=Number(t.target.value),await X.i.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",(t=>{(async()=>{this.data.highlightWords=Number(t.target.checked),await X.i.set("highlightWords",this.data.highlightWords),O.Z.log("highlightWords value changed. New value: ",this.data.highlightWords),this.subtitlesWidget.setHighlightWords(this.data.highlightWords)})()})),this.votShowPiPButtonCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showPiPButton=Number(t.target.checked),await X.i.set("showPiPButton",this.data.showPiPButton),O.Z.log("showPiPButton value changed. New value: ",this.data.showPiPButton),this.votButton.pipButton.hidden=!(0,E.qq)()||!this.data.showPiPButton,this.votButton.separator2.hidden=!(0,E.qq)()||!this.data.showPiPButton})()})),this.votM3u8ProxyHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.m3u8ProxyHost=t.target.value||n.e6,await X.i.set("m3u8ProxyHost",this.data.m3u8ProxyHost),O.Z.log("m3u8ProxyHost value changed. New value: ",this.data.m3u8ProxyHost)})()})),this.votProxyWorkerHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.proxyWorkerHost=t.target.value||n.ez,await X.i.set("proxyWorkerHost",this.data.proxyWorkerHost),O.Z.log("proxyWorkerHost value changed. New value: ",this.data.proxyWorkerHost),window.location.reload()})()})),this.votAudioProxyCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.audioProxy=Number(t.target.checked),await X.i.set("audioProxy",this.data.audioProxy),O.Z.log("audioProxy value changed. New value: ",this.data.audioProxy)})()})),this.votResetSettingsButton.addEventListener("click",(()=>{(async()=>{s.V.reset(),(await X.i.list()).filter((t=>!s.V.gmValues.includes(t))).forEach((t=>X.i.syncDelete(t))),window.location.reload()})()}))}releaseExtraEvents(){clearInterval(this.resizeInterval),this.resizeObserver?.disconnect(),["youtube","googledrive"].includes(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","googledrive"].includes(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;O.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,"emptied",(()=>{O.Z.log("lipsync mode is emptied"),this.stopTranslation()})),t(this.video,"progress",(async()=>{if(!this.firstPlay||1!==this.data.autoTranslate||(0,E.gJ)(this.site.host,this.video)!==this.videoData.videoId)return;const t=(0,E.gJ)(this.site.host,this.video);if(!t)throw new P("VOTNoVideoIDFound");try{this.firstPlay=!1,await this.translateExecutor(t)}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(O.Z.log("[onchange] subtitles",t),this.votSubtitlesSelect.setSelected(t),"disabled"===t)this.votSubtitlesSelect.setTitle(s.V.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((t=>{setTimeout((()=>{e||(console.error("[VOT] Failed to fetch subtitles. Reason: timeout"),t([]))}),5e3)})),new Promise((o=>{O.Z.log("Fetching subtitles:",t),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=vt(i)}else a=mt(i,n);n=a[a.length-1],o.push({...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:s.V.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1},...this.subtitlesList.map(((t,e)=>({label:(s.V.get("langs")[t.language]??t.language.toUpperCase())+(t.translatedFromLanguage?` ${s.V.get("VOTTranslatedFrom")} ${s.V.get("langs")[t.translatedFromLanguage]??t.translatedFromLanguage.toUpperCase()}`:"")+("yandex"!==t.source?` ${t.source}`:"")+(t.isAutoGenerated?` (${s.V.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=(0,E.gJ)(this.site.host,this.video);if(!t)return console.error(`[VOT] ${s.V.getDefault("VOTNoVideoIDFound")}`),this.subtitlesList=[],this.subtitlesListVideoId=null,void await this.updateSubtitlesLangSelect();this.subtitlesListVideoId!==t&&(this.subtitlesList=await async function(t,e,n){const i="youtube"===t.host?ut():[];let a=!1;const r=[...await Promise.race([new Promise((t=>{setTimeout((()=>{a||(console.error("[VOT] Failed get yandex subtitles. Reason: timeout"),t([]))}),5e3)})),new Promise((i=>{!async function(t,e,n){try{O.Z.log("requestVideoSubtitles");const i=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;O.Z.log("Inited yandexRequest...");const a=Z(t,e);await i("/video-subtitles/get-subtitles",a,{"Vsubs-Signature":await Q(a),"Sec-Vsubs-Token":J(!1)},n)}catch(t){console.error("[VOT]",t),n(!1)}}(`${t.url}${e}`,n,((t,e)=>{O.Z.log("[exec callback] Requesting video subtitles"),t||(console.error("[VOT] Failed get yandex subtitles"),a=!0,i([]));const o=U(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===E.KQ||e.language===E.KQ))return t.language===E.KQ?-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","googledrive"].includes(this.site.host)&&(t=ct()||t),t}setVideoVolume(t){["youtube","googledrive"].includes(this.site.host)&&pt(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}%`,L.updateSlider(this.votVideoVolumeSlider.input),1===this.data.syncVolume&&(this.tempOriginalVolume=Number(t))}setSelectMenuValues(t,e){this.votTranslationLanguageSelect.fromSelect.setTitle(s.V.get("langs")[t]),this.votTranslationLanguageSelect.toSelect.setTitle(s.V.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=C(this.video,t,e,this.tempVolume);this.votVideoVolumeSlider.input.value=o,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,L.updateSlider(this.votVideoVolumeSlider.input),this.tempOriginalVolume=o,this.tempVolume=t}async getVideoData(){const t={translationHelp:null,isStream:!1,duration:this.video?.duration||343,videoId:(0,E.gJ)(this.site.host,this.video),detectedLanguage:this.translateFromLang,responseLanguage:this.translateToLang};if(!t.videoId)return this.ytData={},t;if(window.location.hostname.includes("youtube.com"))this.ytData=await ht(),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("ok.ru")||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 xt(this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else if(window.location.hostname.includes("coursehunter.net")){const e=await ft();t.translationHelp={url:e.url},t.duration=e.duration||t.duration}else if(window.location.hostname.includes("banned.video")){const e=await Ot(t.videoId);t.translationHelp={url:e.url},t.duration=e.duration||t.duration,t.isStream=e.live}else if(window.location.hostname.includes("weverse.io")){const e=await At();t.detectedLanguage="ko",e&&(t.translationHelp={url:e.url},t.duration=e.duration||t.duration)}else if(window.location.hostname.includes("udemy.com")){const e=await Pt(this.data.udemyData,this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else["vk","piped","invidious","bitchute","rumble","peertube","dailymotion","trovo","yandexdisk","coursehunter"].includes(this.site.host)&&(t.detectedLanguage="auto");return t}videoValidator(){if("youtube"===this.site.host||"ok.ru"===this.site.host){if(O.Z.log("VideoValidator videoData: ",this.videoData),1===this.data.dontTranslateYourLang&&this.videoData.detectedLanguage===this.data.dontTranslateLanguage&&this.videoData.responseLanguage===this.data.dontTranslateLanguage)throw new P("VOTDisableFromYourLang");if(!this.videoData.isStream&&this.videoData.duration>14400)throw new P("VOTVideoIsTooLong")}return!0}lipSync(t=!1){if(O.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","stop","waiting"].includes(t)&&(O.Z.log(`lipsync mode is ${t}`),this.audio.pause()),"playing"==t&&(O.Z.log("lipsync mode is playing"),this.audio.play());else{O.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",s.V.get("grantPermissionToAutoPlay")),new P("grantPermissionToAutoPlay");if("NotSupportedError"===t.name)throw this.transformBtn("error",Rt.includes(window.location.hostname)?s.V.get("neededAdditionalExtension"):s.V.get("audioFormatNotSupported")),Rt.includes(window.location.hostname)?new P("neededAdditionalExtension"):new P("audioFormatNotSupported")}))}else O.Z.log("lipsync mode is not set")}handleVideoEvent(t){O.Z.log(`video ${t.type}`),this.lipSync(t.type)}stopTraslate(){zt.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",s.V.get("translateVideo")),O.Z.log(`Volume on start: ${this.volumeOnStart}`),this.volumeOnStart&&(["youtube","googledrive"].includes(this.site.host)?pt(this.volumeOnStart):this.video.volume=this.volumeOnStart),this.volumeOnStart="",clearInterval(this.streamPing),this.hls?.destroy(),this.hls=(0,E.QZ)()}async translateExecutor(t){O.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=a?.url?a.url:`${this.site.url}${t}`;if(O.Z.log("Run videoValidator"),this.videoValidator(),e)return O.Z.log("Executed stream translation"),void function(t,e,n,i){O.Z.log(`Translate stream (url: ${t}, requestLang: ${e}, responseLang: ${n})`),async function(t,e,n,i){try{O.Z.log("requestStreamTranslation");const a=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;O.Z.log("Inited yandexRequest...");const r=G(t,e,n);await a("/stream-translation/translate-stream",r,{"Vtrans-Signature":await Q(r),"Sec-Vtrans-Token":J(!1)},i)}catch(t){console.error("[VOT]",t),i(!1)}}(t,e,n,((t,e)=>{if(O.Z.log("[exec callback] Requesting stream translation"),!t)return void i(!1,s.V.get("requestTranslationFailed"));const o=Y(e);switch(console.log("[VOT] Stream Translation response: ",o),o.interval){case 10:i(!1,o.interval,s.V.get("translationTakeFewMinutes"));break;case 20:i(!0,o.interval,o||s.V.get("audioNotReceived"));break;case 0:i(!1,o.interval,s.V.get("streamNoConnectionToServer"))}}))}(r,n,i,(async(r,l,d)=>{if(O.Z.log("[exec callback] translateStream callback"),(0,E.gJ)(this.site.host,this.video)!==t)return;if(!r||!d.translatedInfo)return"VOTLocalizedError"===d?.name?this.transformBtn("error",d.localizedMessage):1===this.data.translateAPIErrors&&"ru"!==s.V.lang?(this.transformBtn("error",`${s.V.get("VOTTranslatingError")}...`),this.transformBtn("error",await nt(d,"ru",s.V.lang))):this.transformBtn("error",d),void(10===l&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),1e3*l)));this.transformBtn("success",s.V.get("disableTranslate")),console.log(d);const c=d.pingId;O.Z.log(`Stream pingId: ${c}`),this.streamPing=setInterval((async()=>await async function(t,e){try{O.Z.log("requestStreamPing");const n=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;O.Z.log("Inited yandexRequest...");const i=W(t);await n("/stream-translation/ping-stream",i,{"Vtrans-Signature":await Q(i),"Sec-Vtrans-Token":J(!1)},e)}catch(t){console.error("[VOT]",t),e(!1)}}(c,(t=>O.Z.log("Stream ping result: ",t)))),1e3*l),O.Z.log(d.translatedInfo.url);const u=`https://${this.data.m3u8ProxyHost}/?all=yes&origin=${encodeURIComponent("https://strm.yandex.ru")}&referer=${encodeURIComponent("https://strm.yandex.ru")}&url=${encodeURIComponent(d.translatedInfo.url)}`;if(O.Z.log(u),this.hls)this.hls.on(Hls.Events.MEDIA_ATTACHED,(function(){O.Z.log("audio and hls.js are now bound together !")})),this.hls.on(Hls.Events.MANIFEST_PARSED,(function(t){O.Z.log("manifest loaded, found "+t.levels.length+" quality level")})),this.hls.loadSource(u),this.hls.attachMedia(this.audio),this.hls.on(Hls.Events.ERROR,(function(t){if(t.fatal)switch(t.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",t);break;default:this.hls.destroy()}})),O.Z.log(this.hls);else{if(!this.audio.canPlayType("application/vnd.apple.mpegurl"))throw new P("audioFormatNotSupported");this.audio.src=u}gt(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"),zt.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+"%",L.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=u):this.stopTranslation()}));if(["udemy","coursera"].includes(this.site.host)&&!a)throw new P("VOTTranslationHelpNull");!function(t,e,n,i,a,r){O.Z.log(`Translate video (url: ${t}, duration: ${e}, requestLang: ${n}, responseLang: ${i})`),O.Z.log("translationHelp:",a),It?O.Z.log("translationPanding return"):(It=!0,async function(t,e,n,i,a,r){try{O.Z.log("requestVideoTranslation");const s=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;O.Z.log("Inited yandexRequest...");const l=j(t,e,n,i,a);await s("/video-translation/translate",l,{"Vtrans-Signature":await Q(l),"Sec-Vtrans-Token":J(!1)},r)}catch(t){console.error("[VOT]",t),r(!1)}}(t,e,n,i,a,((t,e)=>{if(It=!1,O.Z.log("[exec callback] Requesting video translation"),!t)return void r(!1,s.V.get("requestTranslationFailed"));const o=H(e);switch(console.log("[VOT] Translation response: ",o),o.status){case 0:r(!1,o.message);break;case 1:r(!!o.url,o.url||s.V.get("audioNotReceived"));break;case 2:r(!1,o.remainingTime?(0,E.PG)(o.remainingTime):s.V.get("translationTakeFewMinutes"));break;case 3:case 6:r(!1,s.V.get("videoBeingTranslated"))}})))}(r,this.videoData.duration,n,i,a,(async(o,r)=>{if(O.Z.log("[exec callback] translateVideo callback"),(0,E.gJ)(this.site.host,this.video)===t){if(!o)return"VOTLocalizedError"===r?.name?this.transformBtn("error",r.localizedMessage):1!==this.data.translateAPIErrors||r.includes(s.V.get("translationTake"))||"ru"===s.V.lang?this.transformBtn("error",r):(this.transformBtn("error",s.V.get("VOTTranslatingError")),this.transformBtn("error",await nt(r,"ru",s.V.lang))),r.includes(s.V.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://${this.data.proxyWorkerHost}/video-translation/audio-proxy/${t}`;console.log(`[VOT] Audio proxied via ${e}`),this.audio.src=e}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&&!this.video.paused&&this.lipSync("play"),zt.forEach((t=>this.video.addEventListener(t,this.handleVideoEventBound))),this.transformBtn("success",s.V.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+"%",L.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=r}}))}stopTranslation(){this.stopTraslate(),this.syncVideoVolumeSlider()}async handleSrcChanged(){O.Z.log("[VideoHandler] src changed",this),this.stopTranslation(),this.firstPlay=!0,this.videoData=await this.getVideoData(),this.videoData.detectedLanguage&&this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage);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.translateToLang=this.data.responseLanguage??"ru"}async release(){O.Z.log("[VideoHandler] release"),this.initialized=!1,this.stopTranslation(),this.releaseExtraEvents(),this.subtitlesWidget.release(),this.votButton.container.remove(),this.votMenu.container.remove()}}const Nt=new class{constructor(){this.onVideoAdded=new Ft,this.onVideoRemoved=new Ft,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&&(_t(t.addedNodes).forEach(this.handleVideoAddedBound),_t(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)}},jt=new WeakMap;(async function(){O.Z.log("Loading extension..."),await s.V.update(),O.Z.log(`Selected menu language: ${s.V.lang}`),O.Z.log("Extension compatibility passed..."),Nt.onVideoAdded.addListener((t=>{for(const e of Bt.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;else{const n=qt.browser.version.split(".")?.[0];if(e.selector?.includes(":not")&&e.selector?.includes("*")&&n&&("Chrome"===qt.browser.name&&Number(n)<88||"Firefox"===qt.browser.name&&Number(n)<84)){const n=e.selector?.split(" *")?.[0];o=n?Object.values(document.querySelectorAll(n)).find((e=>e.contains(t))):t.parentElement}else o=e.selector?Object.values(document.querySelectorAll(e.selector)).find((e=>e.contains(t))):t.parentElement}if(o&&!("rumble"===e.host&&o.querySelector("vot-block")||("peertube"===e.host&&(e.url=window.location.origin),jt.has(t)))){jt.set(t,new $t(t,o,e));break}}})),Nt.onVideoRemoved.addListener((async t=>{jt.has(t)&&(await jt.get(t).release(),jt.delete(t))})),Nt.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-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;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:()=>c,I1:()=>r,Rr:()=>s,e6:()=>i,ez:()=>a,jm:()=>u,kF:()=>d,rm:()=>h,sN:()=>l});var n=o("./src/utils/utils.js");const i="m3u8proxy.toil-dump.workers.dev",a="uk"===n.KQ?"vot-new.toil-dump.workers.dev":"vot-worker.onrender.com",r="xtGCyGdTY2Jy6OMEKdTuXev3Twhkamgm",s="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",l=.15,d="yandex",c="yandex",u={yandex:"https://translate.toil.cc/detect",rustServer:"https://rust-server-531j.onrender.com/detect"},h={yandex:"https://translate.toil.cc/translate"}},"./src/localization/localizationProvider.js":(t,e,o)=>{"use strict";o.d(e,{Z:()=>r,V:()=>s});const n=JSON.parse('{"__version__":3,"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","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","searchField":"Search...","VOTTranslateAPIErrors":"Translate errors from the API","VOTTranslationService":"Translation Service","VOTDetectService":"Detect Service","VOTTranslatingError":"Translating the error","VOTProxyWorkerHost":"Enter the proxy worker address","VOTM3u8ProxyHost":"Enter the address of the m3u8 proxy worker","proxySettings":"Proxy Settings"}');var i=o("./src/utils/debug.js"),a=o("./src/utils/storage.js");const r=["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"],s=new class{lang="en";locale={};gmValues=["locale-phrases","locale-lang","locale-version","locale-lang-override"];constructor(){const t=a.i.syncGet("locale-lang-override","auto");this.lang=t&&"auto"!==t?t:(navigator.language||navigator.userLanguage)?.substr(0,2)?.toLowerCase()??"en",this.setLocaleFromJsonString(a.i.syncGet("locale-phrases",""))}reset(){this.gmValues.forEach((t=>a.i.syncDelete(t)))}async update(t=!1){(t||2!==await a.i.get("locale-version",0,!0)||await a.i.get("locale-lang")!==this.lang)&&(i.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 a.i.set("locale-phrases",t),this.setLocaleFromJsonString(t);const e=this.getFromLocale(this.locale,"__version__");"number"==typeof e&&await a.i.set("locale-version",e),await a.i.set("locale-lang",this.lang)})).catch((async t=>{console.error("[VOT] [localizationProvider] failed get locale, cause:",t),this.setLocaleFromJsonString(await a.i.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(n,t)??t}get(t){return this.getFromLocale(this.locale,t)??this.getFromLocale(n,t)??t}}},"./src/utils/debug.js":(t,e,o)=>{"use strict";o.d(e,{Z:()=>n});const n={log:(...t)=>{}}},"./src/utils/storage.js":(t,e,o)=>{"use strict";o.d(e,{i:()=>i});var n=o("./src/utils/debug.js");const i=new class{constructor(){this.gmSupport="function"==typeof GM_getValue,n.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):Promise.resolve(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):Promise.resolve(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):Promise.resolve(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():Promise.resolve(this.syncList())}}},"./src/utils/utils.js":(t,e,o)=>{"use strict";o.d(e,{KQ:()=>a,PG:()=>s,QZ:()=>c,eL:()=>l,gJ:()=>r,qq:()=>d});var n=o("./src/localization/localizationProvider.js");const i=navigator.language||navigator.userLanguage,a=i?.substr(0,2)?.toLowerCase()??"en",r=(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":{const t=o.searchParams.get("app_id"),e=o.pathname.match(/[^/]+\/[^/]+$/)?.[0]||o.pathname.match(/[^/]+$/)?.[0];return t?`${e}?app_id=${t}`:e}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":case"facebook":return o.pathname;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.querySelectorAll("*")).filter((t=>t.innerHTML.trim().includes(".m3u8")));try{let e=t[1].lastChild.src;return e.match(/\/video\/(\w+)\.m3u8/)?.[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];case"coursehunter":{const t=o.pathname.match(/\/course\/([^/]+)/)?.[1];return!!t&&t+o.search}case"ok.ru":return o.pathname.match(/\/video\/(\d+)/)?.[0];case"googledrive":return o.searchParams.get("docid");case"bannedvideo":return o.searchParams.get("id");case"weverse":return o.pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[0];case"newgrounds":return o.pathname.match(/([^/]+)\/(view)\/([^/]+)/)?.[0];default:return!1}};function s(t){const e=Math.floor(t/60),o=Math.floor(t%60);return e>=60?n.V.get("translationTakeMoreThanHour"):e>=10&&e%10?n.V.get("translationTakeApproximatelyMinutes").replace("{0}",e):1==e||0==e&&o>0?n.V.get("translationTakeAboutMinute"):n.V.get("translationTakeApproximatelyMinute").replace("{0}",e)}function l(t){return t.toLowerCase().split(";")[0].trim().split("-")[0].split("_")[0]}function d(){return"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}function c(){return"undefined"!=typeof Hls&&Hls?.isSupported()?new Hls({debug:!1,lowLatencyMode:!0,backBufferLength:90}):void 0}},"./src/yandexRequest-cloudflare.js":(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>r});var n=o("./src/config/config.js"),i=o("./src/utils/debug.js"),a=o("./src/utils/storage.js");const r=async function(t,e,o,r){let s,l;try{i.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":n.Rr,Pragma:"no-cache","Cache-Control":"no-cache","Sec-Fetch-Mode":"no-cors",...o},body:Array.from(e)})},d=await a.i.get("proxyWorkerHost",n.ez);s=await fetch(`https://${d}${t}`,r),i.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";const t=["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"],e=["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"];var n=o("./src/config/config.js");const i=["ru","en","zh","ko","lt","lv","ar","fr","it","es","de","ja"],a=["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"],r=["ru","en","kk"];var s=o("./src/localization/localizationProvider.js"),l=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),d=o.n(l),c=o("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),u=o.n(c),h=o("./node_modules/style-loader/dist/runtime/insertBySelector.js"),p=o.n(h),g=o("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),v=o.n(g),m=o("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),b=o.n(m),f=o("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),y=o.n(f),w=o("./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss"),x={};function S(t){const e=document.createElement("vot-block");return e.classList.add("vot-icon-button"),e.innerHTML=t,e}function k(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 T(t,e="",o=" ",n=!1){const i=document.createElement("vot-block");i.classList.add("vot-textfield");const a=document.createElement(n?"textarea":"input");a.placeholder=o,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),{container:i,input:a,label:r}}function V(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=S('');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 M(t,e,o,n={}){const i=n.onSelectCb||function(){},a=n.labelElement||"";let r=[];const l=document.createElement("vot-block");l.classList.add("vot-select"),a&&l.appendChild(a);const d=document.createElement("vot-block");d.classList.add("vot-select-outer");const c=document.createElement("span");c.classList.add("vot-select-title"),c.innerText=t,void 0===t&&(c.innerText=o.find((t=>!0===t.selected))?.label);const u=document.createElement("vot-block");return u.classList.add("vot-select-arrow-icon"),u.innerHTML='',d.append(c,u),d.onclick=()=>{const t=V(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,c.innerText=t.label,await i(a))},n.appendChild(e)}const a=T(s.V.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=[]}},l.append(d),{container:l,title:c,arrowIcon:u,labelElement:a,setTitle:t=>{c.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}}}x.styleTagTransform=y(),x.setAttributes=v(),x.insert=p().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=b(),d()(w.Z,x),w.Z&&w.Z.locals&&w.Z.locals;const L={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:S,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=>k(t.target))),k(a),{container:i,input:a,label:r}},createTextfield:T,createDialog:V,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:M,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=M(e,o,n,{onSelectCb:i}),u=document.createElement("vot-block");u.classList.add("vot-lang-select-icon"),u.innerHTML='';const h=M(a,r,s,{onSelectCb:l});return d.append(c.container,u,h.container),{container:d,fromSelect:c,icon:u,toSelect:h}},updateSlider:k};class P extends Error{constructor(t){super(s.V.getDefault(t)),this.name="VOTLocalizedError",this.unlocalizedMessage=t,this.localizedMessage=s.V.get(t)}}var O=o("./src/utils/debug.js"),E=o("./src/utils/utils.js");function C(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}const A=new protobuf.Type("VideoTranslationHelpObject").add(new protobuf.Field("target",1,"string")).add(new protobuf.Field("targetUrl",2,"string")),B=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")).add(new protobuf.Field("unknown6",16,"int32")).add(new protobuf.Field("unknown7",17,"int32")),F=new protobuf.Type("VideoSubtitlesRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")),_=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")),q=new protobuf.Type("VideoStreamPingRequest").add(new protobuf.Field("pingId",1,"int32")),R=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")),z=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")),D=new protobuf.Type("VideoSubtitlesResponse").add(new protobuf.Field("unknown0",1,"int32")).add(new protobuf.Field("subtitles",2,"VideoSubtitlesObject","repeated")),I=new protobuf.Type("VideoStreamObject").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("timestamp",2,"int64")),$=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")),N=(new protobuf.Root).define("yandex").add(A).add(B).add(R).add(F).add(z).add(D).add(q).add(_).add(I).add($),j=(t,e,o,n,i)=>N.VideoTranslationRequest.encode({url:t,firstRequest:!0,duration:e,unknown2:1,language:o,unknown3:0,unknown4:0,translationHelp:i,responseLanguage:n,unknown5:0,unknown6:1,unknown7:0}).finish(),H=t=>N.VideoTranslationResponse.decode(new Uint8Array(t)),Z=(t,e)=>N.VideoSubtitlesRequest.encode({url:t,language:e}).finish(),U=t=>N.VideoSubtitlesResponse.decode(new Uint8Array(t)),W=t=>N.VideoStreamPingRequest.encode({pingId:t}).finish(),G=(t,e,o)=>N.VideoStreamRequest.encode({url:t,language:e,responseLanguage:o}).finish(),Y=t=>N.VideoStreamResponse.decode(new Uint8Array(t));var K=o("./node_modules/bowser/es5.js");function Q(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 J(t){const e=new TextEncoder("utf-8"),o=await window.crypto.subtle.importKey("raw",e.encode(n.I1),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await window.crypto.subtle.sign("HMAC",o,t);return Array.from(new Uint8Array(i),(t=>t.toString(16).padStart(2,"0"))).join("")}var X=o("./src/utils/storage.js");async function tt(t,e){const o=new AbortController,n=setTimeout((()=>o.abort()),3e3);try{return await fetch(t,{...e,signal:o.signal})}catch(t){return console.error("Fetch timed-out. Error:",t),t}finally{clearTimeout(n)}}const et={async translate(t,e){try{const o=await tt(n.rm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})});if(o instanceof Error)throw o;const i=await o.json();if(200!==i.code)throw i.message;return i.text[0]}catch(e){return console.error("Error translating text:",e),t}},async detect(t,e){try{const o=await tt(n.jm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})});if(o instanceof Error)throw o;const i=await o.json();if(200!==i.code)throw i.message;return i.lang??"en"}catch(t){return console.error("Error translating text:",t),"en"}}},ot={async detect(t){try{const e=await fetch(n.jm.rustServer,{method:"POST",body:t});if(e instanceof Error)throw e;return await e.text()}catch(t){return console.error("Error getting lang from text:",t),"en"}}};async function nt(t,e="",o="ru"){if("yandex"===await X.i.get("translationService",n.kF)){const n=e&&o?`${e}-${o}`:o;return await et.translate(t,n)}return t}const it=["yandex"],at=["yandex","rust-server"];function rt(){return/^m\.youtube\.com$/.test(window.location.hostname)}function st(){return window.location.pathname.startsWith("/shorts/")?rt()?document.querySelector("#movie_player"):document.querySelector("#shorts-player"):document.querySelector("#movie_player")}function lt(){const t=st();return t?.getPlayerResponse?t?.getPlayerResponse?.call()??null:t?.data?.playerResponse??null}function dt(){const t=st();return t?.getVideoData?t?.getVideoData?.call()??null:t?.data?.playerResponse?.videoDetails??null}const ct=function(){const t=st();return t?.getVolume?t.getVolume.call()/100:1},ut=function(){const t=lt();let e=t?.captions?.playerCaptionsTracklistRenderer?.captionTracks??[];return e=e.reduce(((t,e)=>{if("languageCode"in e){const o=e?.languageCode?(0,E.eL)(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}),[]),O.Z.log("youtube subtitles:",e),e},ht=async function(){const t=st(),e=lt(),o=dt(),{title:a}=o??{},{shortDescription:r,isLive:s,isLiveContent:l,isUpcoming:d}=e?.videoDetails??{},c=!(!s&&!d||l);let u=await async function(t,e,o,i){if(!window.location.hostname.includes("m.youtube.com")&&t?.getAudioTrack){const e=t.getAudioTrack(),o=e?.getLanguageInfo();if("und"!==o?.id)return(0,E.eL)(o.id.split(".")[0])}const a=e?.captions?.playerCaptionsTracklistRenderer?.captionTracks;if(a?.length){const t=a.find((t=>"asr"===t.kind));if(t&&t.languageCode)return(0,E.eL)(t.languageCode)}const r=[/(?:https?|ftp):\/\/[\S]+/g,/https?:\/\/\S+|www\.\S+/gm,/\b\S+\.\S+/gm,/#[^\s#]+/g,/Auto-generated by YouTube/g,/Provided to YouTube by/g,/Released on/g,/Bitcoin/g,/USDT/g,/Paypal/g],s=[o,i.split("\n\n").filter((t=>!r.some((e=>e.test(t))))).join("\n\n")].join(" ").replace(/[^\p{L}\s]/gu," ").trim().replace(/\s+/g," ").slice(0,1e3);return await async function(t){switch(await X.i.get("detectService",n.EY)){case"yandex":return await et.detect(t);case"rust-server":return await ot.detect(t);default:return"en"}}(s)}(t,e,a,r);i.includes(u)||(u="en");const h={isLive:!!s,isPremiere:c,title:a,description:r,detectedLanguage:u};return O.Z.log("youtube video data:",h),console.log("[VOT] Detected language: ",h.detectedLanguage),h},pt=function(t){const e=st();if(e?.setVolume)return e.setVolume(Math.round(100*t)),!0},gt=function(t,e){O.Z.log("videoSeek",e);const o=(st()?.getProgressState()?.seekableEnd||t.currentTime)-e;t.currentTime=o};function vt(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({...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 mt(t,e){const o=t.text.split(/([\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;return{...e,startMs:s,durationMs:r?i-s:n}}))}class bt{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","
")}`:"")}}const ft=async function(){const t=window.course_id??document.querySelector('input[name="course_id"]')?.value,e=window.lessons??await async function(t){const e=await fetch(`https://coursehunter.net/api/v1/course/${t}/lessons`);return await e.json()}(t),o=parseInt(document.querySelector(".lessons-item_active")?.dataset?.index??1),n=e?.[o-1],{file:i,duration:a}=n;return O.Z.log("coursehunter course data:",e),{url:i,duration:a}};function yt(){return wt()?.player}function wt(){return document.querySelector(".vjs-v6")}const xt=async function(t="en"){let e=null;const o=yt(),{duration:n}=o?.cache_||{},{courseId:a,tracks:r,sources:s}=o?.options_||{},l=function(t){const e=t?.find((t=>"video/mp4"===t.type));return e?.src}(s),d=await async function(t){const e=await fetch(`https://www.coursera.org/api/onDemandCourses.v1/${t}`),o=await e.json();return o?.elements?.[0]}(a);let c=d?.primaryLanguageCodes?.[0];c=c?(0,E.eL)(c):"en",i.includes(c)||(c="en");const u=function(t,e,o){let n=t?.find((t=>(0,E.eL)(t.srclang)===e));return n||(n=t?.find((t=>(0,E.eL)(t.srclang)===o))||t?.[0]),n?.src}(r,c,t);console.log(`videoURL: ${l}, subtitlesURL: ${u}`),u&&l?e=[{target:"video_file_url",targetUrl:l},{target:"subtitles_file_url",targetUrl:`https://www.coursera.org${u}`}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${l}, subtitlesURL: ${u}`);const h={duration:n,detectedLanguage:c,translationHelp:e};return O.Z.log("coursera video data:",h),console.log("[VOT] Detected language: ",h.detectedLanguage),h},St="https://www.udemy.com/api-2.0";async function kt(t){const e=await fetch(`${St}/courses/${t}/?`+new URLSearchParams({"fields[course]":"locale",use_remote_version:"true",caching_intent:"true"}));return await e.json()}async function Tt(t,e,o){if(!(t.expires+2592e6>(new Date).getTime()&&t.accessToken))return void console.error(s.V.get("udemyAccessTokenExpired"));const n=`Bearer ${t.accessToken}`,i=await fetch(`${St}/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 Vt(){return Lt()?.player}function Mt(){const t=document.querySelector(".ud-app-loader[data-module-id='course-taking']")?.dataset?.moduleArgs;return t?JSON.parse(t):(console.error(s.V.get("udemyModuleArgsNotFound")),{})}function Lt(){return document.querySelector(".vjs-v7")}const Pt=async function(t,e="en"){let o=null;const n=Vt();O.Z.log("udemyData",t);const a=Mt();O.Z.log("moduleData: ",a);const r=a.courseId,s=window.location.pathname.match(/learn\/lecture\/([^/]+)/)?.[1];O.Z.log(`CourseId: ${r}, lectureId: ${s}`);const l=await kt(r);O.Z.log("courseLang Data:",l);const d=await Tt(t,r,s);console.log("lecture Data:",d);let c=l?.locale?.locale;c=c?(0,E.eL)(c):"en",i.includes(c)||(c="en");const u=d?.asset?.length||n?.cache_?.duration,h=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(d?.asset?.media_sources)||function(){const t=Lt()?.querySelector("video")?.src;return!t?.startsWith("blob:")&&t}(),p=function(t,e,o){let n=t?.find((t=>(0,E.eL)(t.locale_id)===e));return n||(n=t?.find((t=>(0,E.eL)(t.locale_id)===o))||t?.[0]),n?.url}(d?.asset?.captions,c,e);console.log(`videoURL: ${h}, subtitlesURL: ${p}`),p&&h?o=[{target:"video_file_url",targetUrl:h},{target:"subtitles_file_url",targetUrl:p}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${h}, subtitlesURL: ${p}`);const g={duration:u,detectedLanguage:c,translationHelp:o};return O.Z.log("udemy video data:",g),console.log("[VOT] Detected language: ",g.detectedLanguage),g},Ot=async function(t){const e=await async function(t){return await fetch("https://api.banned.video/graphql",{method:"POST",body:JSON.stringify({operationName:"GetVideo",query:"query GetVideo($id: String!) {\n getVideo(id: $id) {\n ...DisplayVideoFields\n videoUrl: directUrl\n live\n }\n }\n\n fragment DisplayVideoFields on Video {\n title\n description: summary\n duration: videoDuration\n }",variables:{id:t}}),headers:{"User-Agent":"bannedVideoFrontEnd","apollographql-client-name":"banned-web","apollographql-client-version":"1.3","content-type":"application/json"}}).then((t=>t.json())).catch((t=>(console.error(t),{data:{getVideo:{}}})))}(t);O.Z.log("banned.video video data:",e);const{videoUrl:o,duration:n,live:i,description:a,title:r}=e.data.getVideo;return{url:o,duration:n,live:i,title:r,description:a}},Et="https://global.apis.naver.com/weverse/wevweb";async function Ct(t){const e=Date.now();let o=t.substring(0,Math.min(255,t.length))+e;const n=await async function(t,e){const o=new TextEncoder("utf-8");return e=o.encode(e),window.crypto.subtle.importKey("raw",o.encode(t),{name:"HMAC",hash:{name:"SHA-1"}},!1,["sign","verify"]).then((t=>window.crypto.subtle.sign("HMAC",t,e))).then((t=>btoa(String.fromCharCode(...new Uint8Array(t))))).catch((t=>(console.error(t),!1)))}("1b9cb6378d959b45714bec49971ade22e6e24e42",o);return{wmsgpad:e,wmd:n}}const At=async function(){const t=new URL(window.location).pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[3],e=await async function(t){const e=`/post/v1.0/post-${t}/preview?`+new URLSearchParams({fieldSet:"postForPreview",appId:"be4d79eb8fc7bd008ee82c8ec4ff6fd4",language:"en",os:"WEB",platform:"WEB",wpf:"pc"}),o=await Ct(e);return await fetch(Et+e+"&"+new URLSearchParams(o)).then((t=>t.json())).catch((t=>(console.error(t),{extension:{video:{}}})))}(t);O.Z.log("weverse video preview data:",e);const{videoId:o,serviceId:n,infraVideoId:i}=e.extension.video;if(!(o&&n&&i))return!1;const{inKey:a}=await async function(t){const e=`/video/v1.1/vod/${t}/inKey?`+new URLSearchParams({gcc:"RU",appId:"be4d79eb8fc7bd008ee82c8ec4ff6fd4",language:"en",os:"WEB",platform:"WEB",wpf:"pc"}),o=await Ct(e);return await fetch(Et+e+"&"+new URLSearchParams(o),{method:"POST"}).then((t=>t.json())).catch((t=>(console.error(t),{})))}(o);if(O.Z.log("weverse video inKey data:",e),!a)return!1;const r=await async function(t,e,o){const n=Date.now();return await fetch(`https://global.apis.naver.com/rmcnmv/rmcnmv/vod/play/v2.0/${t}?`+new URLSearchParams({key:e,sid:o,nonce:n,devt:"html5_pc",prv:"N",aup:"N",stpb:"N",cpl:"en",env:"prod",lc:"en",adi:[{adSystem:null}],adu:"/"})).then((t=>t.json())).catch((t=>(console.error(t),{videos:{list:[]}})))}(i,a,n);O.Z.log("weverse video data:",r);const s=r.videos.list.find((t=>!1===t.useP2P&&t.source.includes(".mp4")));if(!s)return!1;const{source:l,duration:d}=s;return{url:l,duration:d}},Bt=[{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:/^vimeo.com$/,selector:".player"},{additionalData:"embed",host:"vimeo",url:"https://player.vimeo.com/",match:/^player.vimeo.com$/,selector:".player"},{host:"ok.ru",url:"https://ok.ru/",match:/^ok.ru$/,selector:".html5-vpl_vid"},{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:".vjs-v6"},{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:t,selector:"#player"},{host:"piped",url:"https://youtu.be/",match:e,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)"},{host:"coursehunter",url:"https://coursehunter.net/course/",match:/^coursehunter.net$/,selector:"#oframeplayer > pjsdiv:nth-of-type(1)"},{host:"googledrive",url:"https://drive.google.com/file/d/",match:/^youtube.googleapis.com$/,selector:".html5-video-container"},{host:"bannedvideo",url:"https://banned.video/watch?id=",match:/^(www.)?banned.video$/,selector:".vjs-v7"},{host:"facebook",url:"https://facebook.com",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/videos/"),selector:'div[data-pagelet="WatchPermalinkVideo"]'},{additionalData:"reels",host:"facebook",url:"https://facebook.com",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/reel/"),selector:'div[role="main"]'},{host:"weverse",url:"https://weverse.io/",match:/^weverse.io$/,selector:".webplayer-internal-source-wrapper"},{host:"newgrounds",url:"https://www.newgrounds.com/",match:/^www.newgrounds.com$/,selector:".ng-video-player"}];o("./node_modules/requestidlecallback-polyfill/index.js");class Ft{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 _t(t){return Array.from(t).flatMap((t=>t instanceof HTMLVideoElement?[t]:t instanceof HTMLElement?Array.from(t.querySelectorAll("video")):t.shadowRoot?Array.from(t.shadowRoot.querySelectorAll("video")):[]))}const qt=K.getParser(window.navigator.userAgent).getResult(),Rt=[...t,...e],zt=["playing","ratechange","play","waiting","pause"];function Dt(t,e,o=!1){return t.map((t=>({label:`${o&&!r.includes(t)?"❌ ":""}${s.V.get("langs")[t]??t.toUpperCase()}`,value:t,selected:e===t})))}var It=!1;class $t{translateFromLang="en";translateToLang=E.KQ;timer;ytData="";videoData="";firstPlay=!0;audio=new Audio;hls=(0,E.QZ)();downloadTranslationUrl=null;downloadSubtitlesUrl=null;autoRetry;streamPing;volumeOnStart;tempOriginalVolume;tempVolume;subtitlesList=[];subtitlesListVideoId=null;videoLastSrcObject=null;constructor(t,e,o){O.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.video.addEventListener("loadedmetadata",this.handleSrcChangedBound),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 X.i.get("autoTranslate",0,!0),dontTranslateLanguage:await X.i.get("dontTranslateLanguage",E.KQ),dontTranslateYourLang:await X.i.get("dontTranslateYourLang",1,!0),autoSetVolumeYandexStyle:await X.i.get("autoSetVolumeYandexStyle",1,!0),autoVolume:await X.i.get("autoVolume",n.sN,!0),showVideoSlider:await X.i.get("showVideoSlider",1,!0),syncVolume:await X.i.get("syncVolume",0,!0),subtitlesMaxLength:await X.i.get("subtitlesMaxLength",300,!0),highlightWords:await X.i.get("highlightWords",0,!0),responseLanguage:await X.i.get("responseLanguage",E.KQ),defaultVolume:await X.i.get("defaultVolume",100,!0),udemyData:await X.i.get("udemyData",{accessToken:"",expires:0}),audioProxy:await X.i.get("audioProxy","uk"===E.KQ?1:0,!0),showPiPButton:await X.i.get("showPiPButton",0,!0),translateAPIErrors:await X.i.get("translateAPIErrors",1,!0),translationService:await X.i.get("translationService",n.kF),detectService:await X.i.get("detectService",n.EY),m3u8ProxyHost:await X.i.get("m3u8ProxyHost",n.e6),proxyWorkerHost:await X.i.get("proxyWorkerHost",n.ez)},this.videoData=await this.getVideoData(),console.log("[db] data from db: ",this.data),this.subtitlesWidget=new bt(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=L.createVOTButton(s.V.get("translateVideo")),this.container.appendChild(this.votButton.container),this.votButton.pipButton.hidden=!(0,E.qq)()||!this.data?.showPiPButton,this.votButton.separator2.hidden=!(0,E.qq)()||!this.data?.showPiPButton,this.votButton.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votMenu=L.createVOTMenu(s.V.get("VOTSettings")),this.container.appendChild(this.votMenu.container),this.votDownloadButton=L.createIconButton(''),this.votDownloadButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadButton),this.votDownloadSubtitlesButton=L.createIconButton(''),this.votDownloadSubtitlesButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadSubtitlesButton),this.votSettingsButton=L.createIconButton(''),this.votMenu.headerContainer.appendChild(this.votSettingsButton),this.votTranslationLanguageSelect=L.createVOTLanguageSelect({fromTitle:s.V.get("langs")[this.video.detectedLanguage],fromDialogTitle:s.V.get("videoLanguage"),fromItems:[{label:s.V.get("langs").auto,value:"auto",selected:""},...Dt(i,this.videoData.detectedLanguage)],fromOnSelectCB:async t=>{O.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:s.V.get("langs")[this.video.responseLanguage],toDialogTitle:s.V.get("translationLanguage"),toItems:[...Dt(i,this.videoData.responseLanguage,!0),{label:"─────────",value:"separator",disabled:!0},...Dt(a,this.videoData.responseLanguage,!0)],toOnSelectCB:async t=>{const e=t.target.dataset.votValue;O.Z.log("[toOnSelectCB] select to language",e),this.data.responseLanguage=this.translateToLang=e,await X.i.set("responseLanguage",this.data.responseLanguage),O.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=L.createVOTSelect(s.V.get("VOTSubtitlesDisabled"),s.V.get("VOTSubtitles"),[{label:s.V.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1}],{onSelectCb:async t=>{await this.changeSubtitlesLang(t.target.dataset.votValue)},labelElement:L.createVOTSelectLabel(s.V.get("VOTSubtitles"))}),this.votMenu.bodyContainer.appendChild(this.votSubtitlesSelect.container),this.votVideoVolumeSlider=L.createSlider(`${s.V.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=L.createSlider(`${s.V.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=L.createDialog(s.V.get("VOTSettings")),document.documentElement.appendChild(this.votSettingsDialog.container),this.votTranslationHeader=L.createHeader(s.V.get("translationSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationHeader),this.votAutoTranslateCheckbox=L.createCheckbox(s.V.get("VOTAutoTranslate"),this.data?.autoTranslate??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoTranslateCheckbox.container),this.votDontTranslateYourLangSelect=L.createVOTSelect(s.V.get("langs")[X.i.syncGet("dontTranslateLanguage",E.KQ)],s.V.get("VOTDontTranslateYourLang"),Dt(i,X.i.syncGet("dontTranslateLanguage",E.KQ)),{onSelectCb:async t=>{this.data.dontTranslateLanguage=t.target.dataset.votValue,await X.i.set("dontTranslateLanguage",this.data.dontTranslateLanguage)},labelElement:L.createCheckbox(s.V.get("VOTDontTranslateYourLang"),this.data?.dontTranslateYourLang??!0).container}),this.votSettingsDialog.bodyContainer.appendChild(this.votDontTranslateYourLangSelect.container),this.votAutoSetVolumeCheckbox=L.createCheckbox(`${s.V.get("VOTAutoSetVolume")}`,this.data?.autoSetVolumeYandexStyle??!0),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeCheckbox.container),this.votAutoSetVolumeSlider=L.createSlider(`${100*(this.data?.autoVolume??n.sN)}%`,100*(this.data?.autoVolume??n.sN),0,100),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeSlider.container),this.votShowVideoSliderCheckbox=L.createCheckbox(s.V.get("VOTShowVideoSlider"),this.data?.showVideoSlider??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votShowVideoSliderCheckbox.container),this.votUdemyDataTextfield=L.createTextfield(s.V.get("VOTUdemyData"),this.data?.udemyData?.accessToken??""),this.votUdemyDataTextfield.container.hidden="udemy"!==this.site.host,this.votSettingsDialog.bodyContainer.appendChild(this.votUdemyDataTextfield.container),this.votSyncVolumeCheckbox=L.createCheckbox(s.V.get("VOTSyncVolume"),this.data?.syncVolume??!1),this.votSyncVolumeCheckbox.container.hidden=!["youtube","googledrive"].includes(this.site.host)||"mobile"===this.site.additionalData,this.votSettingsDialog.bodyContainer.appendChild(this.votSyncVolumeCheckbox.container),this.votTranslationServiceSelect=L.createVOTSelect(X.i.syncGet("translationService",n.kF),s.V.get("VOTTranslationService"),Dt(it,X.i.syncGet("translationService",n.kF)),{onSelectCb:async t=>{this.data.translationService=t.target.dataset.votValue,await X.i.set("translationService",this.data.translationService)},labelElement:L.createCheckbox(s.V.get("VOTTranslateAPIErrors"),this.data.translateAPIErrors??!0).container}),this.votTranslationServiceSelect.container.hidden="ru"===s.V.lang,this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationServiceSelect.container),this.votDetectServiceSelect=L.createVOTSelect(X.i.syncGet("detectService",n.EY),s.V.get("VOTDetectService"),Dt(at,X.i.syncGet("detectService",n.EY)),{onSelectCb:async t=>{this.data.detectService=t.target.dataset.votValue,await X.i.set("detectService",this.data.detectService)},labelElement:L.createVOTSelectLabel(s.V.get("VOTDetectService"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votDetectServiceSelect.container),this.votSubtitlesHeader=L.createHeader(s.V.get("subtitlesSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHeader),this.votSubtitlesMaxLengthSlider=L.createSlider(`${s.V.get("VOTSubtitlesMaxLength")}: ${this.data?.subtitlesMaxLength??300}`,this.data?.subtitlesMaxLength??300,50,300),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesMaxLengthSlider.container),this.votSubtitlesHighlightWordsCheckbox=L.createCheckbox(s.V.get("VOTHighlightWords"),this.data?.highlightWords??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHighlightWordsCheckbox.container),this.votProxyHeader=L.createHeader(s.V.get("proxySettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votProxyHeader),this.votM3u8ProxyHostTextfield=L.createTextfield(s.V.get("VOTM3u8ProxyHost"),this.data?.m3u8ProxyHost,n.e6),this.votSettingsDialog.bodyContainer.appendChild(this.votM3u8ProxyHostTextfield.container),this.votProxyWorkerHostTextfield=L.createTextfield(s.V.get("VOTProxyWorkerHost"),this.data?.proxyWorkerHost,n.ez),this.votProxyWorkerHostTextfield.container.hidden=!1,this.votSettingsDialog.bodyContainer.appendChild(this.votProxyWorkerHostTextfield.container),this.votAudioProxyCheckbox=L.createCheckbox(s.V.get("VOTAudioProxy"),this.data?.audioProxy??!1),this.votAudioProxyCheckbox.container.hidden=!1,this.votSettingsDialog.bodyContainer.appendChild(this.votAudioProxyCheckbox.container),this.votAboutHeader=L.createHeader(s.V.get("about")),this.votSettingsDialog.bodyContainer.appendChild(this.votAboutHeader),this.votLanguageSelect=L.createVOTSelect(s.V.get("langs")[X.i.syncGet("locale-lang-override","auto")],s.V.get("VOTMenuLanguage"),Dt(s.Z,X.i.syncGet("locale-lang-override","auto")),{onSelectCb:async t=>{await X.i.set("locale-lang-override",t.target.dataset.votValue)},labelElement:L.createVOTSelectLabel(s.V.get("VOTMenuLanguage"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votLanguageSelect.container),this.votShowPiPButtonCheckbox=L.createCheckbox(s.V.get("VOTShowPiPButton"),this.data?.showPiPButton??!1),this.votShowPiPButtonCheckbox.container.hidden=!(0,E.qq)(),this.votSettingsDialog.bodyContainer.appendChild(this.votShowPiPButtonCheckbox.container),this.votVersionInfo=L.createInformation(`${s.V.get("VOTVersion")}:`,`cloudflare ${GM_info.script.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votVersionInfo.container),this.votAuthorsInfo=L.createInformation(`${s.V.get("VOTAuthors")}:`,GM_info.script.author),this.votSettingsDialog.bodyContainer.appendChild(this.votAuthorsInfo.container),this.votLoaderInfo=L.createInformation(`${s.V.get("VOTLoader")}:`,`${GM_info.scriptHandler} v${GM_info.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votLoaderInfo.container),this.votBrowserInfo=L.createInformation(`${s.V.get("VOTBrowser")}:`,`${qt.browser.name} ${qt.browser.version} (${qt.os.name} ${qt.os.version})`),this.votSettingsDialog.bodyContainer.appendChild(this.votBrowserInfo.container),this.votResetSettingsButton=L.createButton(s.V.get("resetSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votResetSettingsButton)}initUIEvents(){this.votButton.translateButton.addEventListener("click",(()=>{(async()=>{if(this.audio.src)return O.Z.log("[click translationBtn] audio.src is not empty"),void this.stopTraslate();if(this.hls.url)return O.Z.log("[click translationBtn] hls is not empty"),void this.stopTraslate();try{if(O.Z.log("[click translationBtn] trying execute translation"),!this.videoData.videoId)throw new P("VOTNoVideoIDFound");await this.translateExecutor(this.videoData.videoId)}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=C(this.audio,e,t,this.tempOriginalVolume);this.votVideoTranslationVolumeSlider.input.value=o,this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,L.updateSlider(this.votVideoTranslationVolumeSlider.input),this.tempVolume=o,this.tempOriginalVolume=e}})),this.votVideoTranslationVolumeSlider.input.addEventListener("input",(t=>{(async()=>{this.data.defaultVolume=Number(t.target.value),await X.i.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",(t=>{(async()=>{this.data.autoTranslate=Number(t.target.checked),await X.i.set("autoTranslate",this.data.autoTranslate),O.Z.log("autoTranslate value changed. New value: ",this.data.autoTranslate)})()})),this.votDontTranslateYourLangSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.dontTranslateYourLang=Number(t.target.checked),await X.i.set("dontTranslateYourLang",this.data.dontTranslateYourLang),O.Z.log("dontTranslateYourLang value changed. New value: ",this.data.dontTranslateYourLang)})()})),this.votAutoSetVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.autoSetVolumeYandexStyle=Number(t.target.checked),await X.i.set("autoSetVolumeYandexStyle",this.data.autoSetVolumeYandexStyle),O.Z.log("autoSetVolumeYandexStyle value changed. New value: ",this.data.autoSetVolumeYandexStyle)})()})),this.votAutoSetVolumeSlider.input.addEventListener("input",(t=>{(async()=>{const e=Number(t.target.value);this.data.autoVolume=(e/100).toFixed(2),await X.i.set("autoVolume",this.data.autoVolume),this.votAutoSetVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`})()})),this.votShowVideoSliderCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showVideoSlider=Number(t.target.checked),await X.i.set("showVideoSlider",this.data.showVideoSlider),O.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",(t=>{(async()=>{this.data.udemyData={accessToken:t.target.value,expires:(new Date).getTime()},await X.i.set("udemyData",this.data.udemyData),O.Z.log("udemyData value changed. New value: ",this.data.udemyData),window.location.reload()})()})),this.votSyncVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.syncVolume=Number(t.target.checked),await X.i.set("syncVolume",this.data.syncVolume),O.Z.log("syncVolume value changed. New value: ",this.data.syncVolume)})()})),this.votTranslationServiceSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.translateAPIErrors=Number(t.target.checked),await X.i.set("translateAPIErrors",this.data.translateAPIErrors),O.Z.log("translateAPIErrors value changed. New value: ",this.data.translateAPIErrors)})()})),this.votSubtitlesMaxLengthSlider.input.addEventListener("input",(t=>{(async()=>{this.data.subtitlesMaxLength=Number(t.target.value),await X.i.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",(t=>{(async()=>{this.data.highlightWords=Number(t.target.checked),await X.i.set("highlightWords",this.data.highlightWords),O.Z.log("highlightWords value changed. New value: ",this.data.highlightWords),this.subtitlesWidget.setHighlightWords(this.data.highlightWords)})()})),this.votShowPiPButtonCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showPiPButton=Number(t.target.checked),await X.i.set("showPiPButton",this.data.showPiPButton),O.Z.log("showPiPButton value changed. New value: ",this.data.showPiPButton),this.votButton.pipButton.hidden=!(0,E.qq)()||!this.data.showPiPButton,this.votButton.separator2.hidden=!(0,E.qq)()||!this.data.showPiPButton})()})),this.votM3u8ProxyHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.m3u8ProxyHost=t.target.value||n.e6,await X.i.set("m3u8ProxyHost",this.data.m3u8ProxyHost),O.Z.log("m3u8ProxyHost value changed. New value: ",this.data.m3u8ProxyHost)})()})),this.votProxyWorkerHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.proxyWorkerHost=t.target.value||n.ez,await X.i.set("proxyWorkerHost",this.data.proxyWorkerHost),O.Z.log("proxyWorkerHost value changed. New value: ",this.data.proxyWorkerHost),window.location.reload()})()})),this.votAudioProxyCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.audioProxy=Number(t.target.checked),await X.i.set("audioProxy",this.data.audioProxy),O.Z.log("audioProxy value changed. New value: ",this.data.audioProxy)})()})),this.votResetSettingsButton.addEventListener("click",(()=>{(async()=>{s.V.reset(),(await X.i.list()).filter((t=>!s.V.gmValues.includes(t))).forEach((t=>X.i.syncDelete(t))),window.location.reload()})()}))}releaseExtraEvents(){clearInterval(this.resizeInterval),this.resizeObserver?.disconnect(),["youtube","googledrive"].includes(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","googledrive"].includes(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;O.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,"emptied",(()=>{O.Z.log("lipsync mode is emptied"),this.stopTranslation()})),t(this.video,"progress",(async()=>{if(this.firstPlay&&1===this.data.autoTranslate&&(0,E.gJ)(this.site.host,this.video)===this.videoData.videoId){if(!this.videoData.videoId)throw new P("VOTNoVideoIDFound");try{this.firstPlay=!1,await this.translateExecutor(this.videoData.videoId)}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(O.Z.log("[onchange] subtitles",t),this.votSubtitlesSelect.setSelected(t),"disabled"===t)this.votSubtitlesSelect.setTitle(s.V.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((t=>{setTimeout((()=>{e||(console.error("[VOT] Failed to fetch subtitles. Reason: timeout"),t([]))}),5e3)})),new Promise((o=>{O.Z.log("Fetching subtitles:",t),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=vt(i)}else a=mt(i,n);n=a[a.length-1],o.push({...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:s.V.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1},...this.subtitlesList.map(((t,e)=>({label:(s.V.get("langs")[t.language]??t.language.toUpperCase())+(t.translatedFromLanguage?` ${s.V.get("VOTTranslatedFrom")} ${s.V.get("langs")[t.translatedFromLanguage]??t.translatedFromLanguage.toUpperCase()}`:"")+("yandex"!==t.source?` ${t.source}`:"")+(t.isAutoGenerated?` (${s.V.get("VOTAutogenerated")})`:""),value:e,selected:!1,disabled:!1})))];this.votSubtitlesSelect.updateItems(t),await this.changeSubtitlesLang(t[0].value)}async updateSubtitles(){if(await this.changeSubtitlesLang("disabled"),!this.videoData.videoId)return console.error(`[VOT] ${s.V.getDefault("VOTNoVideoIDFound")}`),this.subtitlesList=[],this.subtitlesListVideoId=null,void await this.updateSubtitlesLangSelect();this.subtitlesListVideoId!==this.videoData.videoId&&(this.subtitlesList=await async function(t,e,n){const i="youtube"===t.host?ut():[];let a=!1;const r=[...await Promise.race([new Promise((t=>{setTimeout((()=>{a||(console.error("[VOT] Failed get yandex subtitles. Reason: timeout"),t([]))}),5e3)})),new Promise((i=>{!async function(t,e,n){try{O.Z.log("requestVideoSubtitles");const i=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;O.Z.log("Inited yandexRequest...");const a=Z(t,e);await i("/video-subtitles/get-subtitles",a,{"Vsubs-Signature":await J(a),"Sec-Vsubs-Token":Q(!1)},n)}catch(t){console.error("[VOT]",t),n(!1)}}(`${t.url}${e}`,n,((t,e)=>{O.Z.log("[exec callback] Requesting video subtitles"),t||(console.error("[VOT] Failed get yandex subtitles"),a=!0,i([]));const o=U(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===E.KQ||e.language===E.KQ))return t.language===E.KQ?-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,this.videoData.videoId,this.videoData.detectedLanguage),this.subtitlesList?this.subtitlesListVideoId=this.videoData.videoId:await this.changeSubtitlesLang("disabled"),await this.updateSubtitlesLangSelect())}getVideoVolume(){let t=this.video?.volume;return["youtube","googledrive"].includes(this.site.host)&&(t=ct()||t),t}setVideoVolume(t){["youtube","googledrive"].includes(this.site.host)&&pt(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}%`,L.updateSlider(this.votVideoVolumeSlider.input),1===this.data.syncVolume&&(this.tempOriginalVolume=Number(t))}setSelectMenuValues(t,e){this.votTranslationLanguageSelect.fromSelect.setTitle(s.V.get("langs")[t]),this.votTranslationLanguageSelect.toSelect.setTitle(s.V.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=C(this.video,t,e,this.tempVolume);this.votVideoVolumeSlider.input.value=o,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,L.updateSlider(this.votVideoVolumeSlider.input),this.tempOriginalVolume=o,this.tempVolume=t}async getVideoData(){const t={translationHelp:null,isStream:!1,duration:this.video?.duration||343,videoId:(0,E.gJ)(this.site.host,this.video),detectedLanguage:this.translateFromLang,responseLanguage:this.translateToLang};if(!t.videoId)return this.ytData={},t;if(window.location.hostname.includes("youtube.com"))this.ytData=await ht(),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("ok.ru")||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 xt(this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else if(window.location.hostname.includes("coursehunter.net")){const e=await ft();t.translationHelp={url:e.url},t.duration=e.duration||t.duration}else if(window.location.hostname.includes("banned.video")){const e=await Ot(t.videoId);t.translationHelp={url:e.url},t.duration=e.duration||t.duration,t.isStream=e.live}else if(window.location.hostname.includes("weverse.io")){const e=await At();t.detectedLanguage="ko",e&&(t.translationHelp={url:e.url},t.duration=e.duration||t.duration)}else if(window.location.hostname.includes("udemy.com")){const e=await Pt(this.data.udemyData,this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else["vk","piped","invidious","bitchute","rumble","peertube","dailymotion","trovo","yandexdisk","coursehunter"].includes(this.site.host)&&(t.detectedLanguage="auto");return t}videoValidator(){if(["youtube","ok.ru"].includes(this.site.host)){if(O.Z.log("VideoValidator videoData: ",this.videoData),1===this.data.dontTranslateYourLang&&this.videoData.detectedLanguage===this.data.dontTranslateLanguage&&this.videoData.responseLanguage===this.data.dontTranslateLanguage)throw new P("VOTDisableFromYourLang");if(!this.videoData.isStream&&this.videoData.duration>14400)throw new P("VOTVideoIsTooLong")}return!0}lipSync(t=!1){if(O.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","stop","waiting"].includes(t)&&(O.Z.log(`lipsync mode is ${t}`),this.audio.pause()),"playing"==t&&(O.Z.log("lipsync mode is playing"),this.audio.play());else{O.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",s.V.get("grantPermissionToAutoPlay")),new P("grantPermissionToAutoPlay");if("NotSupportedError"===t.name)throw this.transformBtn("error",Rt.includes(window.location.hostname)?s.V.get("neededAdditionalExtension"):s.V.get("audioFormatNotSupported")),Rt.includes(window.location.hostname)?new P("neededAdditionalExtension"):new P("audioFormatNotSupported")}))}else O.Z.log("lipsync mode is not set")}handleVideoEvent(t){O.Z.log(`video ${t.type}`),this.lipSync(t.type)}stopTraslate(){zt.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",s.V.get("translateVideo")),O.Z.log(`Volume on start: ${this.volumeOnStart}`),this.volumeOnStart&&(["youtube","googledrive"].includes(this.site.host)?pt(this.volumeOnStart):this.video.volume=this.volumeOnStart),this.volumeOnStart="",clearInterval(this.streamPing),this.hls?.destroy(),this.hls=(0,E.QZ)()}async translateExecutor(t){O.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=a?.url?a.url:`${this.site.url}${t}`;if(O.Z.log("Run videoValidator"),this.videoValidator(),e)return O.Z.log("Executed stream translation"),void function(t,e,n,i){O.Z.log(`Translate stream (url: ${t}, requestLang: ${e}, responseLang: ${n})`),async function(t,e,n,i){try{O.Z.log("requestStreamTranslation");const a=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;O.Z.log("Inited yandexRequest...");const r=G(t,e,n);await a("/stream-translation/translate-stream",r,{"Vtrans-Signature":await J(r),"Sec-Vtrans-Token":Q(!1)},i)}catch(t){console.error("[VOT]",t),i(!1)}}(t,e,n,((t,e)=>{if(O.Z.log("[exec callback] Requesting stream translation"),!t)return void i(!1,s.V.get("requestTranslationFailed"));const o=Y(e);switch(console.log("[VOT] Stream Translation response: ",o),o.interval){case 10:i(!1,o.interval,s.V.get("translationTakeFewMinutes"));break;case 20:i(!0,o.interval,o||s.V.get("audioNotReceived"));break;case 0:i(!1,o.interval,s.V.get("streamNoConnectionToServer"))}}))}(r,n,i,(async(r,l,d)=>{if(O.Z.log("[exec callback] translateStream callback"),(0,E.gJ)(this.site.host,this.video)!==t)return;if(!r||!d.translatedInfo)return"VOTLocalizedError"===d?.name?this.transformBtn("error",d.localizedMessage):1===this.data.translateAPIErrors&&"ru"!==s.V.lang?(this.transformBtn("error",`${s.V.get("VOTTranslatingError")}...`),this.transformBtn("error",await nt(d,"ru",s.V.lang))):this.transformBtn("error",d),void(10===l&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),1e3*l)));this.transformBtn("success",s.V.get("disableTranslate")),console.log(d);const c=d.pingId;O.Z.log(`Stream pingId: ${c}`),this.streamPing=setInterval((async()=>await async function(t,e){try{O.Z.log("requestStreamPing");const n=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;O.Z.log("Inited yandexRequest...");const i=W(t);await n("/stream-translation/ping-stream",i,{"Vtrans-Signature":await J(i),"Sec-Vtrans-Token":Q(!1)},e)}catch(t){console.error("[VOT]",t),e(!1)}}(c,(t=>O.Z.log("Stream ping result: ",t)))),1e3*l),O.Z.log(d.translatedInfo.url);const u=`https://${this.data.m3u8ProxyHost}/?all=yes&origin=${encodeURIComponent("https://strm.yandex.ru")}&referer=${encodeURIComponent("https://strm.yandex.ru")}&url=${encodeURIComponent(d.translatedInfo.url)}`;if(O.Z.log(u),this.hls)this.hls.on(Hls.Events.MEDIA_ATTACHED,(function(){O.Z.log("audio and hls.js are now bound together !")})),this.hls.on(Hls.Events.MANIFEST_PARSED,(function(t){O.Z.log("manifest loaded, found "+t.levels.length+" quality level")})),this.hls.loadSource(u),this.hls.attachMedia(this.audio),this.hls.on(Hls.Events.ERROR,(function(t){if(t.fatal)switch(t.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",t);break;default:this.hls.destroy()}})),O.Z.log(this.hls);else{if(!this.audio.canPlayType("application/vnd.apple.mpegurl"))throw new P("audioFormatNotSupported");this.audio.src=u}gt(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"),zt.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+"%",L.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=u):this.stopTranslation()}));if(["udemy","coursera"].includes(this.site.host)&&!a)throw new P("VOTTranslationHelpNull");!function(t,e,n,i,a,r){O.Z.log(`Translate video (url: ${t}, duration: ${e}, requestLang: ${n}, responseLang: ${i})`),O.Z.log("translationHelp:",a),It?O.Z.log("translationPanding return"):(It=!0,async function(t,e,n,i,a,r){try{O.Z.log("requestVideoTranslation");const s=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;O.Z.log("Inited yandexRequest...");const l=j(t,e,n,i,a);await s("/video-translation/translate",l,{"Vtrans-Signature":await J(l),"Sec-Vtrans-Token":Q(!1)},r)}catch(t){console.error("[VOT]",t),r(!1)}}(t,e,n,i,a,((t,e)=>{if(It=!1,O.Z.log("[exec callback] Requesting video translation"),!t)return void r(!1,s.V.get("requestTranslationFailed"));const o=H(e);switch(console.log("[VOT] Translation response: ",o),o.status){case 0:r(!1,o.message);break;case 1:r(!!o.url,o.url||s.V.get("audioNotReceived"));break;case 2:r(!1,o.remainingTime?(0,E.PG)(o.remainingTime):s.V.get("translationTakeFewMinutes"));break;case 3:case 6:r(!1,s.V.get("videoBeingTranslated"))}})))}(r,this.videoData.duration,n,i,a,(async(o,r)=>{if(O.Z.log("[exec callback] translateVideo callback"),(0,E.gJ)(this.site.host,this.video)===t){if(!o)return"VOTLocalizedError"===r?.name?this.transformBtn("error",r.localizedMessage):1!==this.data.translateAPIErrors||r.includes(s.V.get("translationTake"))||"ru"===s.V.lang?this.transformBtn("error",r):(this.transformBtn("error",s.V.get("VOTTranslatingError")),this.transformBtn("error",await nt(r,"ru",s.V.lang))),r.includes(s.V.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://${this.data.proxyWorkerHost}/video-translation/audio-proxy/${t}`;console.log(`[VOT] Audio proxied via ${e}`),this.audio.src=e}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&&!this.video.paused&&this.lipSync("play"),zt.forEach((t=>this.video.addEventListener(t,this.handleVideoEventBound))),this.transformBtn("success",s.V.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+"%",L.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=r}}))}stopTranslation(){this.stopTraslate(),this.syncVideoVolumeSlider()}async handleSrcChanged(){O.Z.log("[VideoHandler] src changed",this),this.stopTranslation(),this.firstPlay=!0,this.videoData=await this.getVideoData(),this.videoData.detectedLanguage&&this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage);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.translateToLang=this.data.responseLanguage??"ru"}async release(){O.Z.log("[VideoHandler] release"),this.initialized=!1,this.stopTranslation(),this.releaseExtraEvents(),this.subtitlesWidget.release(),this.votButton.container.remove(),this.votMenu.container.remove()}}const Nt=new class{constructor(){this.onVideoAdded=new Ft,this.onVideoRemoved=new Ft,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&&(_t(t.addedNodes).forEach(this.handleVideoAddedBound),_t(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)}},jt=new WeakMap;(async function(){O.Z.log("Loading extension..."),await s.V.update(),O.Z.log(`Selected menu language: ${s.V.lang}`),O.Z.log("Extension compatibility passed..."),Nt.onVideoAdded.addListener((t=>{for(const e of Bt.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;else{const n=qt.browser.version.split(".")?.[0];if(e.selector?.includes(":not")&&e.selector?.includes("*")&&n&&("Chrome"===qt.browser.name&&Number(n)<88||"Firefox"===qt.browser.name&&Number(n)<84)){const n=e.selector?.split(" *")?.[0];o=n?Object.values(document.querySelectorAll(n)).find((e=>e.contains(t))):t.parentElement}else o=e.selector?Object.values(document.querySelectorAll(e.selector)).find((e=>e.contains(t))):t.parentElement}if(o&&!("rumble"===e.host&&o.querySelector("vot-block")||("peertube"===e.host&&(e.url=window.location.origin),jt.has(t)))){jt.set(t,new $t(t,o,e));break}}})),Nt.onVideoRemoved.addListener((async t=>{jt.has(t)&&(await jt.get(t).release(),jt.delete(t))})),Nt.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 20c27f24..cafd4bb9 100644 --- a/dist/vot-cloudflare.user.js +++ b/dist/vot-cloudflare.user.js @@ -108,6 +108,7 @@ // @match *://youtube.googleapis.com/embed/* // @match *://*.banned.video/* // @match *://*.weverse.io/* +// @match *://*.newgrounds.com/* // @connect api.browser.yandex.ru // @downloadURL https://raw.githubusercontent.com/ilyhalight/voice-over-translation/dev/dist/vot-cloudflare.user.js // @grant GM_xmlhttpRequest @@ -1161,6 +1162,8 @@ const getVideoId = (service, video) => { return url.searchParams.get("id"); case "weverse": return url.pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[0]; + case "newgrounds": + return url.pathname.match(/([^/]+)\/(view)\/([^/]+)/)?.[0]; default: return false; } @@ -3136,25 +3139,22 @@ class SubtitlesWidget { if (top && bottom) { this.votSubtitlesContainer.style.top = `${y - this.containerRect.y}px`; + } else if (!top) { + this.votSubtitlesContainer.style.top = `${0}px`; } else { - if (!top) { - this.votSubtitlesContainer.style.top = `${0}px`; - } else { - this.votSubtitlesContainer.style.top = `${ - this.containerRect.height - this.subtitlesContainerRect.height - }px`; - } + this.votSubtitlesContainer.style.top = `${ + this.containerRect.height - this.subtitlesContainerRect.height + }px`; } + if (left && right) { this.votSubtitlesContainer.style.left = `${x - this.containerRect.x}px`; + } else if (!left) { + this.votSubtitlesContainer.style.left = `${0}px`; } else { - if (!left) { - this.votSubtitlesContainer.style.left = `${0}px`; - } else { - this.votSubtitlesContainer.style.left = `${ - this.containerRect.width - this.subtitlesContainerRect.width - }px`; - } + this.votSubtitlesContainer.style.left = `${ + this.containerRect.width - this.subtitlesContainerRect.width + }px`; } } } @@ -3244,22 +3244,20 @@ class SubtitlesWidget { : "" }>${token.text}`; } - } else { - if (line.text.length > this.maxLength) { - let chunks = line.text.match(this.maxLengthRegexp); - let chunkDurationMs = line.durationMs / chunks.length; - for (let i = 0; i < chunks.length; i++) { - if ( - line.startMs + chunkDurationMs * i < time && - time < line.startMs + chunkDurationMs * (i + 1) - ) { - content = chunks[i].trim(); - break; - } + } else if (line.text.length > this.maxLength) { + let chunks = line.text.match(this.maxLengthRegexp); + let chunkDurationMs = line.durationMs / chunks.length; + for (let i = 0; i < chunks.length; i++) { + if ( + line.startMs + chunkDurationMs * i < time && + time < line.startMs + chunkDurationMs * (i + 1) + ) { + content = chunks[i].trim(); + break; } - } else { - content = line.text; } + } else { + content = line.text; } } if (content !== this.lastContent) { @@ -3698,24 +3696,6 @@ async function createHash(pathname) { }; } -// f = function (e, t, n) { -// let r = "?"; -// -1 !== e.indexOf("?") && (r = "&"); -// const i = (function (e, t) { -// let n = e.substring(0, Math.min(255, e.length)); -// n += t; -// let r = u.createHmac("sha1", c.active).update(n).digest("base64"); -// return (r = encodeURIComponent(r)), { wmsgpad: t, wmd: r }; -// })( -// (e = "" -// .concat(e) -// .concat(r) -// .concat((0, l.stringify)({ ...t, wpf: (0, s.li)() ? "mweb" : "pc" }))), -// n, -// ); -// return e + "&wmsgpad=" + i.wmsgpad + "&wmd=" + i.wmd; -// }; - function getURLData() { return { appId: API_APP_ID, @@ -4120,6 +4100,12 @@ const sites = () => { match: /^weverse.io$/, selector: ".webplayer-internal-source-wrapper", }, + { + host: "newgrounds", + url: "https://www.newgrounds.com/", + match: /^www.newgrounds.com$/, + selector: ".ng-video-player", + }, // Нужно куда-то заливать данные о плейлисте // { // host: "epicgames", @@ -5022,13 +5008,12 @@ class VideoHandler { try { debug/* default */.Z.log("[click translationBtn] trying execute translation"); - const VIDEO_ID = (0,utils/* getVideoId */.gJ)(this.site.host, this.video); - if (!VIDEO_ID) { + if (!this.videoData.videoId) { throw new VOTLocalizedError("VOTNoVideoIDFound"); } - await this.translateExecutor(VIDEO_ID); + await this.translateExecutor(this.videoData.videoId); } catch (err) { console.error("[VOT]", err); if (err?.name === "VOTLocalizedError") { @@ -5502,15 +5487,13 @@ class VideoHandler { return; } - const VIDEO_ID = (0,utils/* getVideoId */.gJ)(this.site.host, this.video); - - if (!VIDEO_ID) { + if (!this.videoData.videoId) { throw new VOTLocalizedError("VOTNoVideoIDFound"); } try { this.firstPlay = false; - await this.translateExecutor(VIDEO_ID); + await this.translateExecutor(this.videoData.videoId); } catch (err) { console.error("[VOT]", err); if (err?.name === "VOTLocalizedError") { @@ -5598,9 +5581,7 @@ class VideoHandler { async updateSubtitles() { await this.changeSubtitlesLang("disabled"); - const VIDEO_ID = (0,utils/* getVideoId */.gJ)(this.site.host, this.video); - - if (!VIDEO_ID) { + if (!this.videoData.videoId) { console.error( `[VOT] ${localizationProvider/* localizationProvider */.V.getDefault("VOTNoVideoIDFound")}`, ); @@ -5610,19 +5591,19 @@ class VideoHandler { return; } - if (this.subtitlesListVideoId === VIDEO_ID) { + if (this.subtitlesListVideoId === this.videoData.videoId) { return; } this.subtitlesList = await subtitles_getSubtitles( this.site, - VIDEO_ID, + this.videoData.videoId, this.videoData.detectedLanguage, ); if (!this.subtitlesList) { await this.changeSubtitlesLang("disabled"); } else { - this.subtitlesListVideoId = VIDEO_ID; + this.subtitlesListVideoId = this.videoData.videoId; } await this.updateSubtitlesLangSelect(); } @@ -5790,9 +5771,8 @@ class VideoHandler { } return videoData; } - videoValidator() { - if (this.site.host === "youtube" || this.site.host === "ok.ru") { + if (["youtube", "ok.ru"].includes(this.site.host)) { debug/* default */.Z.log("VideoValidator videoData: ", this.videoData); if ( this.data.dontTranslateYourLang === 1 && diff --git a/dist/vot-min.user.js b/dist/vot-min.user.js index b7a7c7cd..5d7754b3 100644 --- a/dist/vot-min.user.js +++ b/dist/vot-min.user.js @@ -108,6 +108,7 @@ // @match *://youtube.googleapis.com/embed/* // @match *://*.banned.video/* // @match *://*.weverse.io/* +// @match *://*.newgrounds.com/* // @connect api.browser.yandex.ru // @downloadURL https://raw.githubusercontent.com/ilyhalight/voice-over-translation/dev/dist/vot-min.user.js // @grant GM_xmlhttpRequest @@ -125,4 +126,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-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;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:()=>u,I1:()=>s,Rr:()=>l,e6:()=>a,ez:()=>r,iF:()=>i,jm:()=>h,kF:()=>c,rm:()=>p,sN:()=>d});var n=o("./src/utils/utils.js");const i="api.browser.yandex.ru",a="m3u8proxy.toil-dump.workers.dev",r="uk"===n.KQ?"vot-new.toil-dump.workers.dev":"vot-worker.onrender.com",s="xtGCyGdTY2Jy6OMEKdTuXev3Twhkamgm",l="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",d=.15,c="yandex",u="yandex",h={yandex:"https://translate.toil.cc/detect",rustServer:"https://rust-server-531j.onrender.com/detect"},p={yandex:"https://translate.toil.cc/translate"}},"./src/localization/localizationProvider.js":(t,e,o)=>{"use strict";o.d(e,{Z:()=>r,V:()=>s});const n=JSON.parse('{"__version__":3,"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","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","searchField":"Search...","VOTTranslateAPIErrors":"Translate errors from the API","VOTTranslationService":"Translation Service","VOTDetectService":"Detect Service","VOTTranslatingError":"Translating the error","VOTProxyWorkerHost":"Enter the proxy worker address","VOTM3u8ProxyHost":"Enter the address of the m3u8 proxy worker","proxySettings":"Proxy Settings"}');var i=o("./src/utils/debug.js"),a=o("./src/utils/storage.js");const r=["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"],s=new class{lang="en";locale={};gmValues=["locale-phrases","locale-lang","locale-version","locale-lang-override"];constructor(){const t=a.i.syncGet("locale-lang-override","auto");this.lang=t&&"auto"!==t?t:(navigator.language||navigator.userLanguage)?.substr(0,2)?.toLowerCase()??"en",this.setLocaleFromJsonString(a.i.syncGet("locale-phrases",""))}reset(){this.gmValues.forEach((t=>a.i.syncDelete(t)))}async update(t=!1){(t||2!==await a.i.get("locale-version",0,!0)||await a.i.get("locale-lang")!==this.lang)&&(i.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 a.i.set("locale-phrases",t),this.setLocaleFromJsonString(t);const e=this.getFromLocale(this.locale,"__version__");"number"==typeof e&&await a.i.set("locale-version",e),await a.i.set("locale-lang",this.lang)})).catch((async t=>{console.error("[VOT] [localizationProvider] failed get locale, cause:",t),this.setLocaleFromJsonString(await a.i.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(n,t)??t}get(t){return this.getFromLocale(this.locale,t)??this.getFromLocale(n,t)??t}}},"./src/utils/debug.js":(t,e,o)=>{"use strict";o.d(e,{Z:()=>n});const n={log:(...t)=>{}}},"./src/utils/storage.js":(t,e,o)=>{"use strict";o.d(e,{i:()=>i});var n=o("./src/utils/debug.js");const i=new class{constructor(){this.gmSupport="function"==typeof GM_getValue,n.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):Promise.resolve(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):Promise.resolve(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):Promise.resolve(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():Promise.resolve(this.syncList())}}},"./src/utils/utils.js":(t,e,o)=>{"use strict";o.d(e,{KQ:()=>a,PG:()=>s,QZ:()=>c,eL:()=>l,gJ:()=>r,qq:()=>d});var n=o("./src/localization/localizationProvider.js");const i=navigator.language||navigator.userLanguage,a=i?.substr(0,2)?.toLowerCase()??"en",r=(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":{const t=o.searchParams.get("app_id"),e=o.pathname.match(/[^/]+\/[^/]+$/)?.[0]||o.pathname.match(/[^/]+$/)?.[0];return t?`${e}?app_id=${t}`:e}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":case"facebook":return o.pathname;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.querySelectorAll("*")).filter((t=>t.innerHTML.trim().includes(".m3u8")));try{let e=t[1].lastChild.src;return e.match(/\/video\/(\w+)\.m3u8/)?.[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];case"coursehunter":{const t=o.pathname.match(/\/course\/([^/]+)/)?.[1];return!!t&&t+o.search}case"ok.ru":return o.pathname.match(/\/video\/(\d+)/)?.[0];case"googledrive":return o.searchParams.get("docid");case"bannedvideo":return o.searchParams.get("id");case"weverse":return o.pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[0];default:return!1}};function s(t){const e=Math.floor(t/60),o=Math.floor(t%60);return e>=60?n.V.get("translationTakeMoreThanHour"):e>=10&&e%10?n.V.get("translationTakeApproximatelyMinutes").replace("{0}",e):1==e||0==e&&o>0?n.V.get("translationTakeAboutMinute"):n.V.get("translationTakeApproximatelyMinute").replace("{0}",e)}function l(t){return t.toLowerCase().split(";")[0].trim().split("-")[0].split("_")[0]}function d(){return"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}function c(){return"undefined"!=typeof Hls&&Hls?.isSupported()?new Hls({debug:!1,lowLatencyMode:!0,backBufferLength:90}):void 0}},"./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";const t=["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"],e=["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"];var n=o("./src/config/config.js");const i=["ru","en","zh","ko","lt","lv","ar","fr","it","es","de","ja"],a=["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"],r=["ru","en","kk"],s=["Violentmonkey","FireMonkey","Greasemonkey","AdGuard","OrangeMonkey"];var l=o("./src/localization/localizationProvider.js"),d=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),c=o.n(d),u=o("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),h=o.n(u),p=o("./node_modules/style-loader/dist/runtime/insertBySelector.js"),g=o.n(p),v=o("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),m=o.n(v),b=o("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),f=o.n(b),y=o("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),w=o.n(y),x=o("./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss"),S={};function k(t){const e=document.createElement("vot-block");return e.classList.add("vot-icon-button"),e.innerHTML=t,e}function T(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 V(t,e="",o=" ",n=!1){const i=document.createElement("vot-block");i.classList.add("vot-textfield");const a=document.createElement(n?"textarea":"input");a.placeholder=o,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),{container:i,input:a,label:r}}function M(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=k('');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 L(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 d=document.createElement("vot-block");d.classList.add("vot-select-outer");const c=document.createElement("span");c.classList.add("vot-select-title"),c.innerText=t,void 0===t&&(c.innerText=o.find((t=>!0===t.selected))?.label);const u=document.createElement("vot-block");return u.classList.add("vot-select-arrow-icon"),u.innerHTML='',d.append(c,u),d.onclick=()=>{const t=M(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,c.innerText=t.label,await i(a))},n.appendChild(e)}const a=V(l.V.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(d),{container:s,title:c,arrowIcon:u,labelElement:a,setTitle:t=>{c.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}}}S.styleTagTransform=w(),S.setAttributes=m(),S.insert=g().bind(null,"head"),S.domAPI=h(),S.insertStyleElement=f(),c()(x.Z,S),x.Z&&x.Z.locals&&x.Z.locals;const P={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:k,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=>T(t.target))),T(a),{container:i,input:a,label:r}},createTextfield:V,createDialog:M,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:L,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=L(e,o,n,{onSelectCb:i}),u=document.createElement("vot-block");u.classList.add("vot-lang-select-icon"),u.innerHTML='';const h=L(a,r,s,{onSelectCb:l});return d.append(c.container,u,h.container),{container:d,fromSelect:c,icon:u,toSelect:h}},updateSlider:T};class O extends Error{constructor(t){super(l.V.getDefault(t)),this.name="VOTLocalizedError",this.unlocalizedMessage=t,this.localizedMessage=l.V.get(t)}}var E=o("./src/utils/debug.js"),C=o("./src/utils/utils.js");function A(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}const B=new protobuf.Type("VideoTranslationHelpObject").add(new protobuf.Field("target",1,"string")).add(new protobuf.Field("targetUrl",2,"string")),F=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")).add(new protobuf.Field("unknown6",16,"int32")).add(new protobuf.Field("unknown7",17,"int32")),_=new protobuf.Type("VideoSubtitlesRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")),q=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")),R=new protobuf.Type("VideoStreamPingRequest").add(new protobuf.Field("pingId",1,"int32")),z=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")),D=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")),I=new protobuf.Type("VideoSubtitlesResponse").add(new protobuf.Field("unknown0",1,"int32")).add(new protobuf.Field("subtitles",2,"VideoSubtitlesObject","repeated")),$=new protobuf.Type("VideoStreamObject").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("timestamp",2,"int64")),N=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")),j=(new protobuf.Root).define("yandex").add(B).add(F).add(z).add(_).add(D).add(I).add(R).add(q).add($).add(N),H=(t,e,o,n,i)=>j.VideoTranslationRequest.encode({url:t,firstRequest:!0,duration:e,unknown2:1,language:o,unknown3:0,unknown4:0,translationHelp:i,responseLanguage:n,unknown5:0,unknown6:1,unknown7:0}).finish(),Z=t=>j.VideoTranslationResponse.decode(new Uint8Array(t)),U=(t,e)=>j.VideoSubtitlesRequest.encode({url:t,language:e}).finish(),W=t=>j.VideoSubtitlesResponse.decode(new Uint8Array(t)),G=t=>j.VideoStreamPingRequest.encode({pingId:t}).finish(),Y=(t,e,o)=>j.VideoStreamRequest.encode({url:t,language:e,responseLanguage:o}).finish(),K=t=>j.VideoStreamResponse.decode(new Uint8Array(t));var Q=o("./node_modules/bowser/es5.js");function J(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 X(t){const e=new TextEncoder("utf-8"),o=await window.crypto.subtle.importKey("raw",e.encode(n.I1),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await window.crypto.subtle.sign("HMAC",o,t);return Array.from(new Uint8Array(i),(t=>t.toString(16).padStart(2,"0"))).join("")}var tt=o("./src/utils/storage.js");async function et(t,e){const o=new AbortController,n=setTimeout((()=>o.abort()),3e3);try{return await fetch(t,{...e,signal:o.signal})}catch(t){return console.error("Fetch timed-out. Error:",t),t}finally{clearTimeout(n)}}const ot={async translate(t,e){try{const o=await et(n.rm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})});if(o instanceof Error)throw o;const i=await o.json();if(200!==i.code)throw i.message;return i.text[0]}catch(e){return console.error("Error translating text:",e),t}},async detect(t,e){try{const o=await et(n.jm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})});if(o instanceof Error)throw o;const i=await o.json();if(200!==i.code)throw i.message;return i.lang??"en"}catch(t){return console.error("Error translating text:",t),"en"}}},nt={async detect(t){try{const e=await fetch(n.jm.rustServer,{method:"POST",body:t});if(e instanceof Error)throw e;return await e.text()}catch(t){return console.error("Error getting lang from text:",t),"en"}}};async function it(t,e="",o="ru"){if("yandex"===await tt.i.get("translationService",n.kF)){const n=e&&o?`${e}-${o}`:o;return await ot.translate(t,n)}return t}const at=["yandex"],rt=["yandex","rust-server"];function st(){return/^m\.youtube\.com$/.test(window.location.hostname)}function lt(){return window.location.pathname.startsWith("/shorts/")?st()?document.querySelector("#movie_player"):document.querySelector("#shorts-player"):document.querySelector("#movie_player")}function dt(){const t=lt();return t?.getPlayerResponse?t?.getPlayerResponse?.call()??null:t?.data?.playerResponse??null}function ct(){const t=lt();return t?.getVideoData?t?.getVideoData?.call()??null:t?.data?.playerResponse?.videoDetails??null}const ut=function(){const t=lt();return t?.getVolume?t.getVolume.call()/100:1},ht=function(){const t=dt();let e=t?.captions?.playerCaptionsTracklistRenderer?.captionTracks??[];return e=e.reduce(((t,e)=>{if("languageCode"in e){const o=e?.languageCode?(0,C.eL)(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}),[]),E.Z.log("youtube subtitles:",e),e},pt=async function(){const t=lt(),e=dt(),o=ct(),{title:a}=o??{},{shortDescription:r,isLive:s,isLiveContent:l,isUpcoming:d}=e?.videoDetails??{},c=!(!s&&!d||l);let u=await async function(t,e,o,i){if(!window.location.hostname.includes("m.youtube.com")&&t?.getAudioTrack){const e=t.getAudioTrack(),o=e?.getLanguageInfo();if("und"!==o?.id)return(0,C.eL)(o.id.split(".")[0])}const a=e?.captions?.playerCaptionsTracklistRenderer?.captionTracks;if(a?.length){const t=a.find((t=>"asr"===t.kind));if(t&&t.languageCode)return(0,C.eL)(t.languageCode)}const r=[/(?:https?|ftp):\/\/[\S]+/g,/https?:\/\/\S+|www\.\S+/gm,/\b\S+\.\S+/gm,/#[^\s#]+/g,/Auto-generated by YouTube/g,/Provided to YouTube by/g,/Released on/g,/Bitcoin/g,/USDT/g,/Paypal/g],s=[o,i.split("\n\n").filter((t=>!r.some((e=>e.test(t))))).join("\n\n")].join(" ").replace(/[^\p{L}\s]/gu," ").trim().replace(/\s+/g," ").slice(0,1e3);return await async function(t){switch(await tt.i.get("detectService",n.EY)){case"yandex":return await ot.detect(t);case"rust-server":return await nt.detect(t);default:return"en"}}(s)}(t,e,a,r);i.includes(u)||(u="en");const h={isLive:!!s,isPremiere:c,title:a,description:r,detectedLanguage:u};return E.Z.log("youtube video data:",h),console.log("[VOT] Detected language: ",h.detectedLanguage),h},gt=function(t){const e=lt();if(e?.setVolume)return e.setVolume(Math.round(100*t)),!0},vt=function(t,e){E.Z.log("videoSeek",e);const o=(lt()?.getProgressState()?.seekableEnd||t.currentTime)-e;t.currentTime=o};function mt(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({...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 bt(t,e){const o=t.text.split(/([\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;return{...e,startMs:s,durationMs:r?i-s:n}}))}class ft{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","
")}`:"")}}const yt=async function(){const t=window.course_id??document.querySelector('input[name="course_id"]')?.value,e=window.lessons??await async function(t){const e=await fetch(`https://coursehunter.net/api/v1/course/${t}/lessons`);return await e.json()}(t),o=parseInt(document.querySelector(".lessons-item_active")?.dataset?.index??1),n=e?.[o-1],{file:i,duration:a}=n;return E.Z.log("coursehunter course data:",e),{url:i,duration:a}};function wt(){return xt()?.player}function xt(){return document.querySelector(".vjs-v6")}const St=async function(t="en"){let e=null;const o=wt(),{duration:n}=o?.cache_||{},{courseId:a,tracks:r,sources:s}=o?.options_||{},l=function(t){const e=t?.find((t=>"video/mp4"===t.type));return e?.src}(s),d=await async function(t){const e=await fetch(`https://www.coursera.org/api/onDemandCourses.v1/${t}`),o=await e.json();return o?.elements?.[0]}(a);let c=d?.primaryLanguageCodes?.[0];c=c?(0,C.eL)(c):"en",i.includes(c)||(c="en");const u=function(t,e,o){let n=t?.find((t=>(0,C.eL)(t.srclang)===e));return n||(n=t?.find((t=>(0,C.eL)(t.srclang)===o))||t?.[0]),n?.src}(r,c,t);console.log(`videoURL: ${l}, subtitlesURL: ${u}`),u&&l?e=[{target:"video_file_url",targetUrl:l},{target:"subtitles_file_url",targetUrl:`https://www.coursera.org${u}`}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${l}, subtitlesURL: ${u}`);const h={duration:n,detectedLanguage:c,translationHelp:e};return E.Z.log("coursera video data:",h),console.log("[VOT] Detected language: ",h.detectedLanguage),h},kt="https://www.udemy.com/api-2.0";async function Tt(t){const e=await fetch(`${kt}/courses/${t}/?`+new URLSearchParams({"fields[course]":"locale",use_remote_version:"true",caching_intent:"true"}));return await e.json()}async function Vt(t,e,o){if(!(t.expires+2592e6>(new Date).getTime()&&t.accessToken))return void console.error(l.V.get("udemyAccessTokenExpired"));const n=`Bearer ${t.accessToken}`,i=await fetch(`${kt}/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 Mt(){return Pt()?.player}function Lt(){const t=document.querySelector(".ud-app-loader[data-module-id='course-taking']")?.dataset?.moduleArgs;return t?JSON.parse(t):(console.error(l.V.get("udemyModuleArgsNotFound")),{})}function Pt(){return document.querySelector(".vjs-v7")}const Ot=async function(t,e="en"){let o=null;const n=Mt();E.Z.log("udemyData",t);const a=Lt();E.Z.log("moduleData: ",a);const r=a.courseId,s=window.location.pathname.match(/learn\/lecture\/([^/]+)/)?.[1];E.Z.log(`CourseId: ${r}, lectureId: ${s}`);const l=await Tt(r);E.Z.log("courseLang Data:",l);const d=await Vt(t,r,s);console.log("lecture Data:",d);let c=l?.locale?.locale;c=c?(0,C.eL)(c):"en",i.includes(c)||(c="en");const u=d?.asset?.length||n?.cache_?.duration,h=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(d?.asset?.media_sources)||function(){const t=Pt()?.querySelector("video")?.src;return!t?.startsWith("blob:")&&t}(),p=function(t,e,o){let n=t?.find((t=>(0,C.eL)(t.locale_id)===e));return n||(n=t?.find((t=>(0,C.eL)(t.locale_id)===o))||t?.[0]),n?.url}(d?.asset?.captions,c,e);console.log(`videoURL: ${h}, subtitlesURL: ${p}`),p&&h?o=[{target:"video_file_url",targetUrl:h},{target:"subtitles_file_url",targetUrl:p}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${h}, subtitlesURL: ${p}`);const g={duration:u,detectedLanguage:c,translationHelp:o};return E.Z.log("udemy video data:",g),console.log("[VOT] Detected language: ",g.detectedLanguage),g},Et=async function(t){const e=await async function(t){return await fetch("https://api.banned.video/graphql",{method:"POST",body:JSON.stringify({operationName:"GetVideo",query:"query GetVideo($id: String!) {\n getVideo(id: $id) {\n ...DisplayVideoFields\n videoUrl: directUrl\n live\n }\n }\n\n fragment DisplayVideoFields on Video {\n title\n description: summary\n duration: videoDuration\n }",variables:{id:t}}),headers:{"User-Agent":"bannedVideoFrontEnd","apollographql-client-name":"banned-web","apollographql-client-version":"1.3","content-type":"application/json"}}).then((t=>t.json())).catch((t=>(console.error(t),{data:{getVideo:{}}})))}(t);E.Z.log("banned.video video data:",e);const{videoUrl:o,duration:n,live:i,description:a,title:r}=e.data.getVideo;return{url:o,duration:n,live:i,title:r,description:a}},Ct="https://global.apis.naver.com/weverse/wevweb";async function At(t){const e=Date.now();let o=t.substring(0,Math.min(255,t.length))+e;const n=await async function(t,e){const o=new TextEncoder("utf-8");return e=o.encode(e),window.crypto.subtle.importKey("raw",o.encode(t),{name:"HMAC",hash:{name:"SHA-1"}},!1,["sign","verify"]).then((t=>window.crypto.subtle.sign("HMAC",t,e))).then((t=>btoa(String.fromCharCode(...new Uint8Array(t))))).catch((t=>(console.error(t),!1)))}("1b9cb6378d959b45714bec49971ade22e6e24e42",o);return{wmsgpad:e,wmd:n}}const Bt=async function(){const t=new URL(window.location).pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[3],e=await async function(t){const e=`/post/v1.0/post-${t}/preview?`+new URLSearchParams({fieldSet:"postForPreview",appId:"be4d79eb8fc7bd008ee82c8ec4ff6fd4",language:"en",os:"WEB",platform:"WEB",wpf:"pc"}),o=await At(e);return await fetch(Ct+e+"&"+new URLSearchParams(o)).then((t=>t.json())).catch((t=>(console.error(t),{extension:{video:{}}})))}(t);E.Z.log("weverse video preview data:",e);const{videoId:o,serviceId:n,infraVideoId:i}=e.extension.video;if(!(o&&n&&i))return!1;const{inKey:a}=await async function(t){const e=`/video/v1.1/vod/${t}/inKey?`+new URLSearchParams({gcc:"RU",appId:"be4d79eb8fc7bd008ee82c8ec4ff6fd4",language:"en",os:"WEB",platform:"WEB",wpf:"pc"}),o=await At(e);return await fetch(Ct+e+"&"+new URLSearchParams(o),{method:"POST"}).then((t=>t.json())).catch((t=>(console.error(t),{})))}(o);if(E.Z.log("weverse video inKey data:",e),!a)return!1;const r=await async function(t,e,o){const n=Date.now();return await fetch(`https://global.apis.naver.com/rmcnmv/rmcnmv/vod/play/v2.0/${t}?`+new URLSearchParams({key:e,sid:o,nonce:n,devt:"html5_pc",prv:"N",aup:"N",stpb:"N",cpl:"en",env:"prod",lc:"en",adi:[{adSystem:null}],adu:"/"})).then((t=>t.json())).catch((t=>(console.error(t),{videos:{list:[]}})))}(i,a,n);E.Z.log("weverse video data:",r);const s=r.videos.list.find((t=>!1===t.useP2P&&t.source.includes(".mp4")));if(!s)return!1;const{source:l,duration:d}=s;return{url:l,duration:d}},Ft=[{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:/^vimeo.com$/,selector:".player"},{additionalData:"embed",host:"vimeo",url:"https://player.vimeo.com/",match:/^player.vimeo.com$/,selector:".player"},{host:"ok.ru",url:"https://ok.ru/",match:/^ok.ru$/,selector:".html5-vpl_vid"},{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:".vjs-v6"},{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:t,selector:"#player"},{host:"piped",url:"https://youtu.be/",match:e,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)"},{host:"coursehunter",url:"https://coursehunter.net/course/",match:/^coursehunter.net$/,selector:"#oframeplayer > pjsdiv:nth-of-type(1)"},{host:"googledrive",url:"https://drive.google.com/file/d/",match:/^youtube.googleapis.com$/,selector:".html5-video-container"},{host:"bannedvideo",url:"https://banned.video/watch?id=",match:/^(www.)?banned.video$/,selector:".vjs-v7"},{host:"facebook",url:"https://facebook.com",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/videos/"),selector:'div[data-pagelet="WatchPermalinkVideo"]'},{additionalData:"reels",host:"facebook",url:"https://facebook.com",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/reel/"),selector:'div[role="main"]'},{host:"weverse",url:"https://weverse.io/",match:/^weverse.io$/,selector:".webplayer-internal-source-wrapper"}];o("./node_modules/requestidlecallback-polyfill/index.js");class _t{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).flatMap((t=>t instanceof HTMLVideoElement?[t]:t instanceof HTMLElement?Array.from(t.querySelectorAll("video")):t.shadowRoot?Array.from(t.shadowRoot.querySelectorAll("video")):[]))}const Rt=Q.getParser(window.navigator.userAgent).getResult(),zt=[...t,...e],Dt=["playing","ratechange","play","waiting","pause"];function It(t,e,o=!1){return t.map((t=>({label:`${o&&!r.includes(t)?"❌ ":""}${l.V.get("langs")[t]??t.toUpperCase()}`,value:t,selected:e===t})))}class $t{translateFromLang="en";translateToLang=C.KQ;timer;ytData="";videoData="";firstPlay=!0;audio=new Audio;hls=(0,C.QZ)();downloadTranslationUrl=null;downloadSubtitlesUrl=null;autoRetry;streamPing;volumeOnStart;tempOriginalVolume;tempVolume;subtitlesList=[];subtitlesListVideoId=null;videoLastSrcObject=null;constructor(t,e,o){E.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.video.addEventListener("loadedmetadata",this.handleSrcChangedBound),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 tt.i.get("autoTranslate",0,!0),dontTranslateLanguage:await tt.i.get("dontTranslateLanguage",C.KQ),dontTranslateYourLang:await tt.i.get("dontTranslateYourLang",1,!0),autoSetVolumeYandexStyle:await tt.i.get("autoSetVolumeYandexStyle",1,!0),autoVolume:await tt.i.get("autoVolume",n.sN,!0),showVideoSlider:await tt.i.get("showVideoSlider",1,!0),syncVolume:await tt.i.get("syncVolume",0,!0),subtitlesMaxLength:await tt.i.get("subtitlesMaxLength",300,!0),highlightWords:await tt.i.get("highlightWords",0,!0),responseLanguage:await tt.i.get("responseLanguage",C.KQ),defaultVolume:await tt.i.get("defaultVolume",100,!0),udemyData:await tt.i.get("udemyData",{accessToken:"",expires:0}),audioProxy:await tt.i.get("audioProxy",(C.KQ,0),!0),showPiPButton:await tt.i.get("showPiPButton",0,!0),translateAPIErrors:await tt.i.get("translateAPIErrors",1,!0),translationService:await tt.i.get("translationService",n.kF),detectService:await tt.i.get("detectService",n.EY),m3u8ProxyHost:await tt.i.get("m3u8ProxyHost",n.e6),proxyWorkerHost:await tt.i.get("proxyWorkerHost",n.ez)},this.videoData=await this.getVideoData(),console.log("[db] data from db: ",this.data),this.subtitlesWidget=new ft(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=P.createVOTButton(l.V.get("translateVideo")),this.container.appendChild(this.votButton.container),this.votButton.pipButton.hidden=!(0,C.qq)()||!this.data?.showPiPButton,this.votButton.separator2.hidden=!(0,C.qq)()||!this.data?.showPiPButton,this.votButton.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votMenu=P.createVOTMenu(l.V.get("VOTSettings")),this.container.appendChild(this.votMenu.container),this.votDownloadButton=P.createIconButton(''),this.votDownloadButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadButton),this.votDownloadSubtitlesButton=P.createIconButton(''),this.votDownloadSubtitlesButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadSubtitlesButton),this.votSettingsButton=P.createIconButton(''),this.votMenu.headerContainer.appendChild(this.votSettingsButton),this.votTranslationLanguageSelect=P.createVOTLanguageSelect({fromTitle:l.V.get("langs")[this.video.detectedLanguage],fromDialogTitle:l.V.get("videoLanguage"),fromItems:[{label:l.V.get("langs").auto,value:"auto",selected:""},...It(i,this.videoData.detectedLanguage)],fromOnSelectCB:async t=>{E.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:l.V.get("langs")[this.video.responseLanguage],toDialogTitle:l.V.get("translationLanguage"),toItems:[...It(i,this.videoData.responseLanguage,!0),{label:"─────────",value:"separator",disabled:!0},...It(a,this.videoData.responseLanguage,!0)],toOnSelectCB:async t=>{const e=t.target.dataset.votValue;E.Z.log("[toOnSelectCB] select to language",e),this.data.responseLanguage=this.translateToLang=e,await tt.i.set("responseLanguage",this.data.responseLanguage),E.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=P.createVOTSelect(l.V.get("VOTSubtitlesDisabled"),l.V.get("VOTSubtitles"),[{label:l.V.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1}],{onSelectCb:async t=>{await this.changeSubtitlesLang(t.target.dataset.votValue)},labelElement:P.createVOTSelectLabel(l.V.get("VOTSubtitles"))}),this.votMenu.bodyContainer.appendChild(this.votSubtitlesSelect.container),this.votVideoVolumeSlider=P.createSlider(`${l.V.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=P.createSlider(`${l.V.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=P.createDialog(l.V.get("VOTSettings")),document.documentElement.appendChild(this.votSettingsDialog.container),this.votTranslationHeader=P.createHeader(l.V.get("translationSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationHeader),this.votAutoTranslateCheckbox=P.createCheckbox(l.V.get("VOTAutoTranslate"),this.data?.autoTranslate??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoTranslateCheckbox.container),this.votDontTranslateYourLangSelect=P.createVOTSelect(l.V.get("langs")[tt.i.syncGet("dontTranslateLanguage",C.KQ)],l.V.get("VOTDontTranslateYourLang"),It(i,tt.i.syncGet("dontTranslateLanguage",C.KQ)),{onSelectCb:async t=>{this.data.dontTranslateLanguage=t.target.dataset.votValue,await tt.i.set("dontTranslateLanguage",this.data.dontTranslateLanguage)},labelElement:P.createCheckbox(l.V.get("VOTDontTranslateYourLang"),this.data?.dontTranslateYourLang??!0).container}),this.votSettingsDialog.bodyContainer.appendChild(this.votDontTranslateYourLangSelect.container),this.votAutoSetVolumeCheckbox=P.createCheckbox(`${l.V.get("VOTAutoSetVolume")}`,this.data?.autoSetVolumeYandexStyle??!0),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeCheckbox.container),this.votAutoSetVolumeSlider=P.createSlider(`${100*(this.data?.autoVolume??n.sN)}%`,100*(this.data?.autoVolume??n.sN),0,100),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeSlider.container),this.votShowVideoSliderCheckbox=P.createCheckbox(l.V.get("VOTShowVideoSlider"),this.data?.showVideoSlider??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votShowVideoSliderCheckbox.container),this.votUdemyDataTextfield=P.createTextfield(l.V.get("VOTUdemyData"),this.data?.udemyData?.accessToken??""),this.votUdemyDataTextfield.container.hidden="udemy"!==this.site.host,this.votSettingsDialog.bodyContainer.appendChild(this.votUdemyDataTextfield.container),this.votSyncVolumeCheckbox=P.createCheckbox(l.V.get("VOTSyncVolume"),this.data?.syncVolume??!1),this.votSyncVolumeCheckbox.container.hidden=!["youtube","googledrive"].includes(this.site.host)||"mobile"===this.site.additionalData,this.votSettingsDialog.bodyContainer.appendChild(this.votSyncVolumeCheckbox.container),this.votTranslationServiceSelect=P.createVOTSelect(tt.i.syncGet("translationService",n.kF),l.V.get("VOTTranslationService"),It(at,tt.i.syncGet("translationService",n.kF)),{onSelectCb:async t=>{this.data.translationService=t.target.dataset.votValue,await tt.i.set("translationService",this.data.translationService)},labelElement:P.createCheckbox(l.V.get("VOTTranslateAPIErrors"),this.data.translateAPIErrors??!0).container}),this.votTranslationServiceSelect.container.hidden="ru"===l.V.lang,this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationServiceSelect.container),this.votDetectServiceSelect=P.createVOTSelect(tt.i.syncGet("detectService",n.EY),l.V.get("VOTDetectService"),It(rt,tt.i.syncGet("detectService",n.EY)),{onSelectCb:async t=>{this.data.detectService=t.target.dataset.votValue,await tt.i.set("detectService",this.data.detectService)},labelElement:P.createVOTSelectLabel(l.V.get("VOTDetectService"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votDetectServiceSelect.container),this.votSubtitlesHeader=P.createHeader(l.V.get("subtitlesSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHeader),this.votSubtitlesMaxLengthSlider=P.createSlider(`${l.V.get("VOTSubtitlesMaxLength")}: ${this.data?.subtitlesMaxLength??300}`,this.data?.subtitlesMaxLength??300,50,300),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesMaxLengthSlider.container),this.votSubtitlesHighlightWordsCheckbox=P.createCheckbox(l.V.get("VOTHighlightWords"),this.data?.highlightWords??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHighlightWordsCheckbox.container),this.votProxyHeader=P.createHeader(l.V.get("proxySettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votProxyHeader),this.votM3u8ProxyHostTextfield=P.createTextfield(l.V.get("VOTM3u8ProxyHost"),this.data?.m3u8ProxyHost,n.e6),this.votSettingsDialog.bodyContainer.appendChild(this.votM3u8ProxyHostTextfield.container),this.votProxyWorkerHostTextfield=P.createTextfield(l.V.get("VOTProxyWorkerHost"),this.data?.proxyWorkerHost,n.ez),this.votProxyWorkerHostTextfield.container.hidden=!0,this.votSettingsDialog.bodyContainer.appendChild(this.votProxyWorkerHostTextfield.container),this.votAudioProxyCheckbox=P.createCheckbox(l.V.get("VOTAudioProxy"),this.data?.audioProxy??!1),this.votAudioProxyCheckbox.container.hidden=!0,this.votSettingsDialog.bodyContainer.appendChild(this.votAudioProxyCheckbox.container),this.votAboutHeader=P.createHeader(l.V.get("about")),this.votSettingsDialog.bodyContainer.appendChild(this.votAboutHeader),this.votLanguageSelect=P.createVOTSelect(l.V.get("langs")[tt.i.syncGet("locale-lang-override","auto")],l.V.get("VOTMenuLanguage"),It(l.Z,tt.i.syncGet("locale-lang-override","auto")),{onSelectCb:async t=>{await tt.i.set("locale-lang-override",t.target.dataset.votValue)},labelElement:P.createVOTSelectLabel(l.V.get("VOTMenuLanguage"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votLanguageSelect.container),this.votShowPiPButtonCheckbox=P.createCheckbox(l.V.get("VOTShowPiPButton"),this.data?.showPiPButton??!1),this.votShowPiPButtonCheckbox.container.hidden=!(0,C.qq)(),this.votSettingsDialog.bodyContainer.appendChild(this.votShowPiPButtonCheckbox.container),this.votVersionInfo=P.createInformation(`${l.V.get("VOTVersion")}:`,GM_info.script.version),this.votSettingsDialog.bodyContainer.appendChild(this.votVersionInfo.container),this.votAuthorsInfo=P.createInformation(`${l.V.get("VOTAuthors")}:`,GM_info.script.author),this.votSettingsDialog.bodyContainer.appendChild(this.votAuthorsInfo.container),this.votLoaderInfo=P.createInformation(`${l.V.get("VOTLoader")}:`,`${GM_info.scriptHandler} v${GM_info.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votLoaderInfo.container),this.votBrowserInfo=P.createInformation(`${l.V.get("VOTBrowser")}:`,`${Rt.browser.name} ${Rt.browser.version} (${Rt.os.name} ${Rt.os.version})`),this.votSettingsDialog.bodyContainer.appendChild(this.votBrowserInfo.container),this.votResetSettingsButton=P.createButton(l.V.get("resetSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votResetSettingsButton)}initUIEvents(){this.votButton.translateButton.addEventListener("click",(()=>{(async()=>{if(this.audio.src)return E.Z.log("[click translationBtn] audio.src is not empty"),void this.stopTraslate();if(this.hls.url)return E.Z.log("[click translationBtn] hls is not empty"),void this.stopTraslate();try{E.Z.log("[click translationBtn] trying execute translation");const t=(0,C.gJ)(this.site.host,this.video);if(!t)throw new O("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=A(this.audio,e,t,this.tempOriginalVolume);this.votVideoTranslationVolumeSlider.input.value=o,this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,P.updateSlider(this.votVideoTranslationVolumeSlider.input),this.tempVolume=o,this.tempOriginalVolume=e}})),this.votVideoTranslationVolumeSlider.input.addEventListener("input",(t=>{(async()=>{this.data.defaultVolume=Number(t.target.value),await tt.i.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",(t=>{(async()=>{this.data.autoTranslate=Number(t.target.checked),await tt.i.set("autoTranslate",this.data.autoTranslate),E.Z.log("autoTranslate value changed. New value: ",this.data.autoTranslate)})()})),this.votDontTranslateYourLangSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.dontTranslateYourLang=Number(t.target.checked),await tt.i.set("dontTranslateYourLang",this.data.dontTranslateYourLang),E.Z.log("dontTranslateYourLang value changed. New value: ",this.data.dontTranslateYourLang)})()})),this.votAutoSetVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.autoSetVolumeYandexStyle=Number(t.target.checked),await tt.i.set("autoSetVolumeYandexStyle",this.data.autoSetVolumeYandexStyle),E.Z.log("autoSetVolumeYandexStyle value changed. New value: ",this.data.autoSetVolumeYandexStyle)})()})),this.votAutoSetVolumeSlider.input.addEventListener("input",(t=>{(async()=>{const e=Number(t.target.value);this.data.autoVolume=(e/100).toFixed(2),await tt.i.set("autoVolume",this.data.autoVolume),this.votAutoSetVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`})()})),this.votShowVideoSliderCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showVideoSlider=Number(t.target.checked),await tt.i.set("showVideoSlider",this.data.showVideoSlider),E.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",(t=>{(async()=>{this.data.udemyData={accessToken:t.target.value,expires:(new Date).getTime()},await tt.i.set("udemyData",this.data.udemyData),E.Z.log("udemyData value changed. New value: ",this.data.udemyData),window.location.reload()})()})),this.votSyncVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.syncVolume=Number(t.target.checked),await tt.i.set("syncVolume",this.data.syncVolume),E.Z.log("syncVolume value changed. New value: ",this.data.syncVolume)})()})),this.votTranslationServiceSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.translateAPIErrors=Number(t.target.checked),await tt.i.set("translateAPIErrors",this.data.translateAPIErrors),E.Z.log("translateAPIErrors value changed. New value: ",this.data.translateAPIErrors)})()})),this.votSubtitlesMaxLengthSlider.input.addEventListener("input",(t=>{(async()=>{this.data.subtitlesMaxLength=Number(t.target.value),await tt.i.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",(t=>{(async()=>{this.data.highlightWords=Number(t.target.checked),await tt.i.set("highlightWords",this.data.highlightWords),E.Z.log("highlightWords value changed. New value: ",this.data.highlightWords),this.subtitlesWidget.setHighlightWords(this.data.highlightWords)})()})),this.votShowPiPButtonCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showPiPButton=Number(t.target.checked),await tt.i.set("showPiPButton",this.data.showPiPButton),E.Z.log("showPiPButton value changed. New value: ",this.data.showPiPButton),this.votButton.pipButton.hidden=!(0,C.qq)()||!this.data.showPiPButton,this.votButton.separator2.hidden=!(0,C.qq)()||!this.data.showPiPButton})()})),this.votM3u8ProxyHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.m3u8ProxyHost=t.target.value||n.e6,await tt.i.set("m3u8ProxyHost",this.data.m3u8ProxyHost),E.Z.log("m3u8ProxyHost value changed. New value: ",this.data.m3u8ProxyHost)})()})),this.votProxyWorkerHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.proxyWorkerHost=t.target.value||n.ez,await tt.i.set("proxyWorkerHost",this.data.proxyWorkerHost),E.Z.log("proxyWorkerHost value changed. New value: ",this.data.proxyWorkerHost),window.location.reload()})()})),this.votAudioProxyCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.audioProxy=Number(t.target.checked),await tt.i.set("audioProxy",this.data.audioProxy),E.Z.log("audioProxy value changed. New value: ",this.data.audioProxy)})()})),this.votResetSettingsButton.addEventListener("click",(()=>{(async()=>{l.V.reset(),(await tt.i.list()).filter((t=>!l.V.gmValues.includes(t))).forEach((t=>tt.i.syncDelete(t))),window.location.reload()})()}))}releaseExtraEvents(){clearInterval(this.resizeInterval),this.resizeObserver?.disconnect(),["youtube","googledrive"].includes(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","googledrive"].includes(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;E.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,"emptied",(()=>{E.Z.log("lipsync mode is emptied"),this.stopTranslation()})),t(this.video,"progress",(async()=>{if(!this.firstPlay||1!==this.data.autoTranslate||(0,C.gJ)(this.site.host,this.video)!==this.videoData.videoId)return;const t=(0,C.gJ)(this.site.host,this.video);if(!t)throw new O("VOTNoVideoIDFound");try{this.firstPlay=!1,await this.translateExecutor(t)}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(E.Z.log("[onchange] subtitles",t),this.votSubtitlesSelect.setSelected(t),"disabled"===t)this.votSubtitlesSelect.setTitle(l.V.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((t=>{setTimeout((()=>{e||(console.error("[VOT] Failed to fetch subtitles. Reason: timeout"),t([]))}),5e3)})),new Promise((o=>{E.Z.log("Fetching subtitles:",t),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=mt(i)}else a=bt(i,n);n=a[a.length-1],o.push({...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:l.V.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1},...this.subtitlesList.map(((t,e)=>({label:(l.V.get("langs")[t.language]??t.language.toUpperCase())+(t.translatedFromLanguage?` ${l.V.get("VOTTranslatedFrom")} ${l.V.get("langs")[t.translatedFromLanguage]??t.translatedFromLanguage.toUpperCase()}`:"")+("yandex"!==t.source?` ${t.source}`:"")+(t.isAutoGenerated?` (${l.V.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=(0,C.gJ)(this.site.host,this.video);if(!t)return console.error(`[VOT] ${l.V.getDefault("VOTNoVideoIDFound")}`),this.subtitlesList=[],this.subtitlesListVideoId=null,void await this.updateSubtitlesLangSelect();this.subtitlesListVideoId!==t&&(this.subtitlesList=await async function(t,e,n){const i="youtube"===t.host?ht():[];let a=!1;const r=[...await Promise.race([new Promise((t=>{setTimeout((()=>{a||(console.error("[VOT] Failed get yandex subtitles. Reason: timeout"),t([]))}),5e3)})),new Promise((i=>{!async function(t,e,n){try{E.Z.log("requestVideoSubtitles");const i=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;E.Z.log("Inited yandexRequest...");const a=U(t,e);await i("/video-subtitles/get-subtitles",a,{"Vsubs-Signature":await X(a),"Sec-Vsubs-Token":J(!1)},n)}catch(t){console.error("[VOT]",t),n(!1)}}(`${t.url}${e}`,n,((t,e)=>{E.Z.log("[exec callback] Requesting video subtitles"),t||(console.error("[VOT] Failed get yandex subtitles"),a=!0,i([]));const o=W(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===C.KQ||e.language===C.KQ))return t.language===C.KQ?-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","googledrive"].includes(this.site.host)&&(t=ut()||t),t}setVideoVolume(t){["youtube","googledrive"].includes(this.site.host)&>(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}%`,P.updateSlider(this.votVideoVolumeSlider.input),1===this.data.syncVolume&&(this.tempOriginalVolume=Number(t))}setSelectMenuValues(t,e){this.votTranslationLanguageSelect.fromSelect.setTitle(l.V.get("langs")[t]),this.votTranslationLanguageSelect.toSelect.setTitle(l.V.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=A(this.video,t,e,this.tempVolume);this.votVideoVolumeSlider.input.value=o,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,P.updateSlider(this.votVideoVolumeSlider.input),this.tempOriginalVolume=o,this.tempVolume=t}async getVideoData(){const t={translationHelp:null,isStream:!1,duration:this.video?.duration||343,videoId:(0,C.gJ)(this.site.host,this.video),detectedLanguage:this.translateFromLang,responseLanguage:this.translateToLang};if(!t.videoId)return this.ytData={},t;if(window.location.hostname.includes("youtube.com"))this.ytData=await pt(),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("ok.ru")||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 St(this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else if(window.location.hostname.includes("coursehunter.net")){const e=await yt();t.translationHelp={url:e.url},t.duration=e.duration||t.duration}else if(window.location.hostname.includes("banned.video")){const e=await Et(t.videoId);t.translationHelp={url:e.url},t.duration=e.duration||t.duration,t.isStream=e.live}else if(window.location.hostname.includes("weverse.io")){const e=await Bt();t.detectedLanguage="ko",e&&(t.translationHelp={url:e.url},t.duration=e.duration||t.duration)}else if(window.location.hostname.includes("udemy.com")){const e=await Ot(this.data.udemyData,this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else["vk","piped","invidious","bitchute","rumble","peertube","dailymotion","trovo","yandexdisk","coursehunter"].includes(this.site.host)&&(t.detectedLanguage="auto");return t}videoValidator(){if("youtube"===this.site.host||"ok.ru"===this.site.host){if(E.Z.log("VideoValidator videoData: ",this.videoData),1===this.data.dontTranslateYourLang&&this.videoData.detectedLanguage===this.data.dontTranslateLanguage&&this.videoData.responseLanguage===this.data.dontTranslateLanguage)throw new O("VOTDisableFromYourLang");if(!this.videoData.isStream&&this.videoData.duration>14400)throw new O("VOTVideoIsTooLong")}return!0}lipSync(t=!1){if(E.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","stop","waiting"].includes(t)&&(E.Z.log(`lipsync mode is ${t}`),this.audio.pause()),"playing"==t&&(E.Z.log("lipsync mode is playing"),this.audio.play());else{E.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",l.V.get("grantPermissionToAutoPlay")),new O("grantPermissionToAutoPlay");if("NotSupportedError"===t.name)throw this.transformBtn("error",zt.includes(window.location.hostname)?l.V.get("neededAdditionalExtension"):l.V.get("audioFormatNotSupported")),zt.includes(window.location.hostname)?new O("neededAdditionalExtension"):new O("audioFormatNotSupported")}))}else E.Z.log("lipsync mode is not set")}handleVideoEvent(t){E.Z.log(`video ${t.type}`),this.lipSync(t.type)}stopTraslate(){Dt.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",l.V.get("translateVideo")),E.Z.log(`Volume on start: ${this.volumeOnStart}`),this.volumeOnStart&&(["youtube","googledrive"].includes(this.site.host)?gt(this.volumeOnStart):this.video.volume=this.volumeOnStart),this.volumeOnStart="",clearInterval(this.streamPing),this.hls?.destroy(),this.hls=(0,C.QZ)()}async translateExecutor(t){E.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=a?.url?a.url:`${this.site.url}${t}`;if(E.Z.log("Run videoValidator"),this.videoValidator(),e)return E.Z.log("Executed stream translation"),void function(t,e,n,i){E.Z.log(`Translate stream (url: ${t}, requestLang: ${e}, responseLang: ${n})`),async function(t,e,n,i){try{E.Z.log("requestStreamTranslation");const a=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;E.Z.log("Inited yandexRequest...");const r=Y(t,e,n);await a("/stream-translation/translate-stream",r,{"Vtrans-Signature":await X(r),"Sec-Vtrans-Token":J(!1)},i)}catch(t){console.error("[VOT]",t),i(!1)}}(t,e,n,((t,e)=>{if(E.Z.log("[exec callback] Requesting stream translation"),!t)return void i(!1,l.V.get("requestTranslationFailed"));const o=K(e);switch(console.log("[VOT] Stream Translation response: ",o),o.interval){case 10:i(!1,o.interval,l.V.get("translationTakeFewMinutes"));break;case 20:i(!0,o.interval,o||l.V.get("audioNotReceived"));break;case 0:i(!1,o.interval,l.V.get("streamNoConnectionToServer"))}}))}(r,n,i,(async(r,s,d)=>{if(E.Z.log("[exec callback] translateStream callback"),(0,C.gJ)(this.site.host,this.video)!==t)return;if(!r||!d.translatedInfo)return"VOTLocalizedError"===d?.name?this.transformBtn("error",d.localizedMessage):1===this.data.translateAPIErrors&&"ru"!==l.V.lang?(this.transformBtn("error",`${l.V.get("VOTTranslatingError")}...`),this.transformBtn("error",await it(d,"ru",l.V.lang))):this.transformBtn("error",d),void(10===s&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),1e3*s)));this.transformBtn("success",l.V.get("disableTranslate")),console.log(d);const c=d.pingId;E.Z.log(`Stream pingId: ${c}`),this.streamPing=setInterval((async()=>await async function(t,e){try{E.Z.log("requestStreamPing");const n=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;E.Z.log("Inited yandexRequest...");const i=G(t);await n("/stream-translation/ping-stream",i,{"Vtrans-Signature":await X(i),"Sec-Vtrans-Token":J(!1)},e)}catch(t){console.error("[VOT]",t),e(!1)}}(c,(t=>E.Z.log("Stream ping result: ",t)))),1e3*s),E.Z.log(d.translatedInfo.url);const u=`https://${this.data.m3u8ProxyHost}/?all=yes&origin=${encodeURIComponent("https://strm.yandex.ru")}&referer=${encodeURIComponent("https://strm.yandex.ru")}&url=${encodeURIComponent(d.translatedInfo.url)}`;if(E.Z.log(u),this.hls)this.hls.on(Hls.Events.MEDIA_ATTACHED,(function(){E.Z.log("audio and hls.js are now bound together !")})),this.hls.on(Hls.Events.MANIFEST_PARSED,(function(t){E.Z.log("manifest loaded, found "+t.levels.length+" quality level")})),this.hls.loadSource(u),this.hls.attachMedia(this.audio),this.hls.on(Hls.Events.ERROR,(function(t){if(t.fatal)switch(t.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",t);break;default:this.hls.destroy()}})),E.Z.log(this.hls);else{if(!this.audio.canPlayType("application/vnd.apple.mpegurl"))throw new O("audioFormatNotSupported");this.audio.src=u}vt(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"),Dt.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+"%",P.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=u):this.stopTranslation()}));if(["udemy","coursera"].includes(this.site.host)&&!a)throw new O("VOTTranslationHelpNull");!function(t,e,n,i,a,r){E.Z.log(`Translate video (url: ${t}, duration: ${e}, requestLang: ${n}, responseLang: ${i})`),E.Z.log("translationHelp:",a),async function(t,e,n,i,a,r){try{E.Z.log("requestVideoTranslation");const s=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;E.Z.log("Inited yandexRequest...");const l=H(t,e,n,i,a);await s("/video-translation/translate",l,{"Vtrans-Signature":await X(l),"Sec-Vtrans-Token":J(!1)},r)}catch(t){console.error("[VOT]",t),r(!1)}}(t,e,n,i,a,((t,e)=>{if(E.Z.log("[exec callback] Requesting video translation"),!t)return void r(!1,l.V.get("requestTranslationFailed"));const o=Z(e);switch(console.log("[VOT] Translation response: ",o),o.status){case 0:r(!1,o.message);break;case 1:r(!!o.url,o.url||l.V.get("audioNotReceived"));break;case 2:r(!1,o.remainingTime?(0,C.PG)(o.remainingTime):l.V.get("translationTakeFewMinutes"));break;case 3:case 6:r(!1,l.V.get("videoBeingTranslated"))}}))}(r,this.videoData.duration,n,i,a,(async(o,r)=>{if(E.Z.log("[exec callback] translateVideo callback"),(0,C.gJ)(this.site.host,this.video)===t){if(!o)return"VOTLocalizedError"===r?.name?this.transformBtn("error",r.localizedMessage):1!==this.data.translateAPIErrors||r.includes(l.V.get("translationTake"))||"ru"===l.V.lang?this.transformBtn("error",r):(this.transformBtn("error",l.V.get("VOTTranslatingError")),this.transformBtn("error",await it(r,"ru",l.V.lang))),r.includes(l.V.get("translationTake"))&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),6e4)),void console.error("[VOT]",r);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&&!this.video.paused&&this.lipSync("play"),Dt.forEach((t=>this.video.addEventListener(t,this.handleVideoEventBound))),this.transformBtn("success",l.V.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+"%",P.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=r}}))}stopTranslation(){this.stopTraslate(),this.syncVideoVolumeSlider()}async handleSrcChanged(){E.Z.log("[VideoHandler] src changed",this),this.stopTranslation(),this.firstPlay=!0,this.videoData=await this.getVideoData(),this.videoData.detectedLanguage&&this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage);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.translateToLang=this.data.responseLanguage??"ru"}async release(){E.Z.log("[VideoHandler] release"),this.initialized=!1,this.stopTranslation(),this.releaseExtraEvents(),this.subtitlesWidget.release(),this.votButton.container.remove(),this.votMenu.container.remove()}}const Nt=new class{constructor(){this.onVideoAdded=new _t,this.onVideoRemoved=new _t,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)}},jt=new WeakMap;(async function(){if(E.Z.log("Loading extension..."),await l.V.update(),E.Z.log(`Selected menu language: ${l.V.lang}`),GM_info?.scriptHandler&&s.includes(GM_info.scriptHandler))return console.error(`[VOT] ${l.V.getDefault("unSupportedExtensionError").replace("{0}",GM_info.scriptHandler)}`),alert(`[VOT] ${l.V.get("unSupportedExtensionError").replace("{0}",GM_info.scriptHandler)}`);E.Z.log("Extension compatibility passed..."),Nt.onVideoAdded.addListener((t=>{for(const e of Ft.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;else{const n=Rt.browser.version.split(".")?.[0];if(e.selector?.includes(":not")&&e.selector?.includes("*")&&n&&("Chrome"===Rt.browser.name&&Number(n)<88||"Firefox"===Rt.browser.name&&Number(n)<84)){const n=e.selector?.split(" *")?.[0];o=n?Object.values(document.querySelectorAll(n)).find((e=>e.contains(t))):t.parentElement}else o=e.selector?Object.values(document.querySelectorAll(e.selector)).find((e=>e.contains(t))):t.parentElement}if(o&&!("rumble"===e.host&&o.querySelector("vot-block")||("peertube"===e.host&&(e.url=window.location.origin),jt.has(t)))){jt.set(t,new $t(t,o,e));break}}})),Nt.onVideoRemoved.addListener((async t=>{jt.has(t)&&(await jt.get(t).release(),jt.delete(t))})),Nt.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-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;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:()=>u,I1:()=>s,Rr:()=>l,e6:()=>a,ez:()=>r,iF:()=>i,jm:()=>h,kF:()=>c,rm:()=>p,sN:()=>d});var n=o("./src/utils/utils.js");const i="api.browser.yandex.ru",a="m3u8proxy.toil-dump.workers.dev",r="uk"===n.KQ?"vot-new.toil-dump.workers.dev":"vot-worker.onrender.com",s="xtGCyGdTY2Jy6OMEKdTuXev3Twhkamgm",l="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",d=.15,c="yandex",u="yandex",h={yandex:"https://translate.toil.cc/detect",rustServer:"https://rust-server-531j.onrender.com/detect"},p={yandex:"https://translate.toil.cc/translate"}},"./src/localization/localizationProvider.js":(t,e,o)=>{"use strict";o.d(e,{Z:()=>r,V:()=>s});const n=JSON.parse('{"__version__":3,"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","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","searchField":"Search...","VOTTranslateAPIErrors":"Translate errors from the API","VOTTranslationService":"Translation Service","VOTDetectService":"Detect Service","VOTTranslatingError":"Translating the error","VOTProxyWorkerHost":"Enter the proxy worker address","VOTM3u8ProxyHost":"Enter the address of the m3u8 proxy worker","proxySettings":"Proxy Settings"}');var i=o("./src/utils/debug.js"),a=o("./src/utils/storage.js");const r=["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"],s=new class{lang="en";locale={};gmValues=["locale-phrases","locale-lang","locale-version","locale-lang-override"];constructor(){const t=a.i.syncGet("locale-lang-override","auto");this.lang=t&&"auto"!==t?t:(navigator.language||navigator.userLanguage)?.substr(0,2)?.toLowerCase()??"en",this.setLocaleFromJsonString(a.i.syncGet("locale-phrases",""))}reset(){this.gmValues.forEach((t=>a.i.syncDelete(t)))}async update(t=!1){(t||2!==await a.i.get("locale-version",0,!0)||await a.i.get("locale-lang")!==this.lang)&&(i.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 a.i.set("locale-phrases",t),this.setLocaleFromJsonString(t);const e=this.getFromLocale(this.locale,"__version__");"number"==typeof e&&await a.i.set("locale-version",e),await a.i.set("locale-lang",this.lang)})).catch((async t=>{console.error("[VOT] [localizationProvider] failed get locale, cause:",t),this.setLocaleFromJsonString(await a.i.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(n,t)??t}get(t){return this.getFromLocale(this.locale,t)??this.getFromLocale(n,t)??t}}},"./src/utils/debug.js":(t,e,o)=>{"use strict";o.d(e,{Z:()=>n});const n={log:(...t)=>{}}},"./src/utils/storage.js":(t,e,o)=>{"use strict";o.d(e,{i:()=>i});var n=o("./src/utils/debug.js");const i=new class{constructor(){this.gmSupport="function"==typeof GM_getValue,n.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):Promise.resolve(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):Promise.resolve(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):Promise.resolve(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():Promise.resolve(this.syncList())}}},"./src/utils/utils.js":(t,e,o)=>{"use strict";o.d(e,{KQ:()=>a,PG:()=>s,QZ:()=>c,eL:()=>l,gJ:()=>r,qq:()=>d});var n=o("./src/localization/localizationProvider.js");const i=navigator.language||navigator.userLanguage,a=i?.substr(0,2)?.toLowerCase()??"en",r=(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":{const t=o.searchParams.get("app_id"),e=o.pathname.match(/[^/]+\/[^/]+$/)?.[0]||o.pathname.match(/[^/]+$/)?.[0];return t?`${e}?app_id=${t}`:e}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":case"facebook":return o.pathname;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.querySelectorAll("*")).filter((t=>t.innerHTML.trim().includes(".m3u8")));try{let e=t[1].lastChild.src;return e.match(/\/video\/(\w+)\.m3u8/)?.[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];case"coursehunter":{const t=o.pathname.match(/\/course\/([^/]+)/)?.[1];return!!t&&t+o.search}case"ok.ru":return o.pathname.match(/\/video\/(\d+)/)?.[0];case"googledrive":return o.searchParams.get("docid");case"bannedvideo":return o.searchParams.get("id");case"weverse":return o.pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[0];case"newgrounds":return o.pathname.match(/([^/]+)\/(view)\/([^/]+)/)?.[0];default:return!1}};function s(t){const e=Math.floor(t/60),o=Math.floor(t%60);return e>=60?n.V.get("translationTakeMoreThanHour"):e>=10&&e%10?n.V.get("translationTakeApproximatelyMinutes").replace("{0}",e):1==e||0==e&&o>0?n.V.get("translationTakeAboutMinute"):n.V.get("translationTakeApproximatelyMinute").replace("{0}",e)}function l(t){return t.toLowerCase().split(";")[0].trim().split("-")[0].split("_")[0]}function d(){return"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}function c(){return"undefined"!=typeof Hls&&Hls?.isSupported()?new Hls({debug:!1,lowLatencyMode:!0,backBufferLength:90}):void 0}},"./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";const t=["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"],e=["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"];var n=o("./src/config/config.js");const i=["ru","en","zh","ko","lt","lv","ar","fr","it","es","de","ja"],a=["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"],r=["ru","en","kk"],s=["Violentmonkey","FireMonkey","Greasemonkey","AdGuard","OrangeMonkey"];var l=o("./src/localization/localizationProvider.js"),d=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),c=o.n(d),u=o("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),h=o.n(u),p=o("./node_modules/style-loader/dist/runtime/insertBySelector.js"),g=o.n(p),v=o("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),m=o.n(v),b=o("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),f=o.n(b),y=o("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),w=o.n(y),x=o("./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss"),S={};function k(t){const e=document.createElement("vot-block");return e.classList.add("vot-icon-button"),e.innerHTML=t,e}function T(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 V(t,e="",o=" ",n=!1){const i=document.createElement("vot-block");i.classList.add("vot-textfield");const a=document.createElement(n?"textarea":"input");a.placeholder=o,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),{container:i,input:a,label:r}}function M(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=k('');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 L(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 d=document.createElement("vot-block");d.classList.add("vot-select-outer");const c=document.createElement("span");c.classList.add("vot-select-title"),c.innerText=t,void 0===t&&(c.innerText=o.find((t=>!0===t.selected))?.label);const u=document.createElement("vot-block");return u.classList.add("vot-select-arrow-icon"),u.innerHTML='',d.append(c,u),d.onclick=()=>{const t=M(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,c.innerText=t.label,await i(a))},n.appendChild(e)}const a=V(l.V.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(d),{container:s,title:c,arrowIcon:u,labelElement:a,setTitle:t=>{c.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}}}S.styleTagTransform=w(),S.setAttributes=m(),S.insert=g().bind(null,"head"),S.domAPI=h(),S.insertStyleElement=f(),c()(x.Z,S),x.Z&&x.Z.locals&&x.Z.locals;const P={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:k,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=>T(t.target))),T(a),{container:i,input:a,label:r}},createTextfield:V,createDialog:M,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:L,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=L(e,o,n,{onSelectCb:i}),u=document.createElement("vot-block");u.classList.add("vot-lang-select-icon"),u.innerHTML='';const h=L(a,r,s,{onSelectCb:l});return d.append(c.container,u,h.container),{container:d,fromSelect:c,icon:u,toSelect:h}},updateSlider:T};class O extends Error{constructor(t){super(l.V.getDefault(t)),this.name="VOTLocalizedError",this.unlocalizedMessage=t,this.localizedMessage=l.V.get(t)}}var E=o("./src/utils/debug.js"),C=o("./src/utils/utils.js");function A(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}const B=new protobuf.Type("VideoTranslationHelpObject").add(new protobuf.Field("target",1,"string")).add(new protobuf.Field("targetUrl",2,"string")),F=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")).add(new protobuf.Field("unknown6",16,"int32")).add(new protobuf.Field("unknown7",17,"int32")),_=new protobuf.Type("VideoSubtitlesRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")),q=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")),R=new protobuf.Type("VideoStreamPingRequest").add(new protobuf.Field("pingId",1,"int32")),z=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")),D=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")),I=new protobuf.Type("VideoSubtitlesResponse").add(new protobuf.Field("unknown0",1,"int32")).add(new protobuf.Field("subtitles",2,"VideoSubtitlesObject","repeated")),$=new protobuf.Type("VideoStreamObject").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("timestamp",2,"int64")),N=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")),j=(new protobuf.Root).define("yandex").add(B).add(F).add(z).add(_).add(D).add(I).add(R).add(q).add($).add(N),H=(t,e,o,n,i)=>j.VideoTranslationRequest.encode({url:t,firstRequest:!0,duration:e,unknown2:1,language:o,unknown3:0,unknown4:0,translationHelp:i,responseLanguage:n,unknown5:0,unknown6:1,unknown7:0}).finish(),Z=t=>j.VideoTranslationResponse.decode(new Uint8Array(t)),U=(t,e)=>j.VideoSubtitlesRequest.encode({url:t,language:e}).finish(),W=t=>j.VideoSubtitlesResponse.decode(new Uint8Array(t)),G=t=>j.VideoStreamPingRequest.encode({pingId:t}).finish(),Y=(t,e,o)=>j.VideoStreamRequest.encode({url:t,language:e,responseLanguage:o}).finish(),K=t=>j.VideoStreamResponse.decode(new Uint8Array(t));var Q=o("./node_modules/bowser/es5.js");function J(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 X(t){const e=new TextEncoder("utf-8"),o=await window.crypto.subtle.importKey("raw",e.encode(n.I1),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await window.crypto.subtle.sign("HMAC",o,t);return Array.from(new Uint8Array(i),(t=>t.toString(16).padStart(2,"0"))).join("")}var tt=o("./src/utils/storage.js");async function et(t,e){const o=new AbortController,n=setTimeout((()=>o.abort()),3e3);try{return await fetch(t,{...e,signal:o.signal})}catch(t){return console.error("Fetch timed-out. Error:",t),t}finally{clearTimeout(n)}}const ot={async translate(t,e){try{const o=await et(n.rm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})});if(o instanceof Error)throw o;const i=await o.json();if(200!==i.code)throw i.message;return i.text[0]}catch(e){return console.error("Error translating text:",e),t}},async detect(t,e){try{const o=await et(n.jm.yandex,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:t,lang:e})});if(o instanceof Error)throw o;const i=await o.json();if(200!==i.code)throw i.message;return i.lang??"en"}catch(t){return console.error("Error translating text:",t),"en"}}},nt={async detect(t){try{const e=await fetch(n.jm.rustServer,{method:"POST",body:t});if(e instanceof Error)throw e;return await e.text()}catch(t){return console.error("Error getting lang from text:",t),"en"}}};async function it(t,e="",o="ru"){if("yandex"===await tt.i.get("translationService",n.kF)){const n=e&&o?`${e}-${o}`:o;return await ot.translate(t,n)}return t}const at=["yandex"],rt=["yandex","rust-server"];function st(){return/^m\.youtube\.com$/.test(window.location.hostname)}function lt(){return window.location.pathname.startsWith("/shorts/")?st()?document.querySelector("#movie_player"):document.querySelector("#shorts-player"):document.querySelector("#movie_player")}function dt(){const t=lt();return t?.getPlayerResponse?t?.getPlayerResponse?.call()??null:t?.data?.playerResponse??null}function ct(){const t=lt();return t?.getVideoData?t?.getVideoData?.call()??null:t?.data?.playerResponse?.videoDetails??null}const ut=function(){const t=lt();return t?.getVolume?t.getVolume.call()/100:1},ht=function(){const t=dt();let e=t?.captions?.playerCaptionsTracklistRenderer?.captionTracks??[];return e=e.reduce(((t,e)=>{if("languageCode"in e){const o=e?.languageCode?(0,C.eL)(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}),[]),E.Z.log("youtube subtitles:",e),e},pt=async function(){const t=lt(),e=dt(),o=ct(),{title:a}=o??{},{shortDescription:r,isLive:s,isLiveContent:l,isUpcoming:d}=e?.videoDetails??{},c=!(!s&&!d||l);let u=await async function(t,e,o,i){if(!window.location.hostname.includes("m.youtube.com")&&t?.getAudioTrack){const e=t.getAudioTrack(),o=e?.getLanguageInfo();if("und"!==o?.id)return(0,C.eL)(o.id.split(".")[0])}const a=e?.captions?.playerCaptionsTracklistRenderer?.captionTracks;if(a?.length){const t=a.find((t=>"asr"===t.kind));if(t&&t.languageCode)return(0,C.eL)(t.languageCode)}const r=[/(?:https?|ftp):\/\/[\S]+/g,/https?:\/\/\S+|www\.\S+/gm,/\b\S+\.\S+/gm,/#[^\s#]+/g,/Auto-generated by YouTube/g,/Provided to YouTube by/g,/Released on/g,/Bitcoin/g,/USDT/g,/Paypal/g],s=[o,i.split("\n\n").filter((t=>!r.some((e=>e.test(t))))).join("\n\n")].join(" ").replace(/[^\p{L}\s]/gu," ").trim().replace(/\s+/g," ").slice(0,1e3);return await async function(t){switch(await tt.i.get("detectService",n.EY)){case"yandex":return await ot.detect(t);case"rust-server":return await nt.detect(t);default:return"en"}}(s)}(t,e,a,r);i.includes(u)||(u="en");const h={isLive:!!s,isPremiere:c,title:a,description:r,detectedLanguage:u};return E.Z.log("youtube video data:",h),console.log("[VOT] Detected language: ",h.detectedLanguage),h},gt=function(t){const e=lt();if(e?.setVolume)return e.setVolume(Math.round(100*t)),!0},vt=function(t,e){E.Z.log("videoSeek",e);const o=(lt()?.getProgressState()?.seekableEnd||t.currentTime)-e;t.currentTime=o};function mt(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({...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 bt(t,e){const o=t.text.split(/([\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;return{...e,startMs:s,durationMs:r?i-s:n}}))}class ft{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","
")}`:"")}}const yt=async function(){const t=window.course_id??document.querySelector('input[name="course_id"]')?.value,e=window.lessons??await async function(t){const e=await fetch(`https://coursehunter.net/api/v1/course/${t}/lessons`);return await e.json()}(t),o=parseInt(document.querySelector(".lessons-item_active")?.dataset?.index??1),n=e?.[o-1],{file:i,duration:a}=n;return E.Z.log("coursehunter course data:",e),{url:i,duration:a}};function wt(){return xt()?.player}function xt(){return document.querySelector(".vjs-v6")}const St=async function(t="en"){let e=null;const o=wt(),{duration:n}=o?.cache_||{},{courseId:a,tracks:r,sources:s}=o?.options_||{},l=function(t){const e=t?.find((t=>"video/mp4"===t.type));return e?.src}(s),d=await async function(t){const e=await fetch(`https://www.coursera.org/api/onDemandCourses.v1/${t}`),o=await e.json();return o?.elements?.[0]}(a);let c=d?.primaryLanguageCodes?.[0];c=c?(0,C.eL)(c):"en",i.includes(c)||(c="en");const u=function(t,e,o){let n=t?.find((t=>(0,C.eL)(t.srclang)===e));return n||(n=t?.find((t=>(0,C.eL)(t.srclang)===o))||t?.[0]),n?.src}(r,c,t);console.log(`videoURL: ${l}, subtitlesURL: ${u}`),u&&l?e=[{target:"video_file_url",targetUrl:l},{target:"subtitles_file_url",targetUrl:`https://www.coursera.org${u}`}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${l}, subtitlesURL: ${u}`);const h={duration:n,detectedLanguage:c,translationHelp:e};return E.Z.log("coursera video data:",h),console.log("[VOT] Detected language: ",h.detectedLanguage),h},kt="https://www.udemy.com/api-2.0";async function Tt(t){const e=await fetch(`${kt}/courses/${t}/?`+new URLSearchParams({"fields[course]":"locale",use_remote_version:"true",caching_intent:"true"}));return await e.json()}async function Vt(t,e,o){if(!(t.expires+2592e6>(new Date).getTime()&&t.accessToken))return void console.error(l.V.get("udemyAccessTokenExpired"));const n=`Bearer ${t.accessToken}`,i=await fetch(`${kt}/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 Mt(){return Pt()?.player}function Lt(){const t=document.querySelector(".ud-app-loader[data-module-id='course-taking']")?.dataset?.moduleArgs;return t?JSON.parse(t):(console.error(l.V.get("udemyModuleArgsNotFound")),{})}function Pt(){return document.querySelector(".vjs-v7")}const Ot=async function(t,e="en"){let o=null;const n=Mt();E.Z.log("udemyData",t);const a=Lt();E.Z.log("moduleData: ",a);const r=a.courseId,s=window.location.pathname.match(/learn\/lecture\/([^/]+)/)?.[1];E.Z.log(`CourseId: ${r}, lectureId: ${s}`);const l=await Tt(r);E.Z.log("courseLang Data:",l);const d=await Vt(t,r,s);console.log("lecture Data:",d);let c=l?.locale?.locale;c=c?(0,C.eL)(c):"en",i.includes(c)||(c="en");const u=d?.asset?.length||n?.cache_?.duration,h=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(d?.asset?.media_sources)||function(){const t=Pt()?.querySelector("video")?.src;return!t?.startsWith("blob:")&&t}(),p=function(t,e,o){let n=t?.find((t=>(0,C.eL)(t.locale_id)===e));return n||(n=t?.find((t=>(0,C.eL)(t.locale_id)===o))||t?.[0]),n?.url}(d?.asset?.captions,c,e);console.log(`videoURL: ${h}, subtitlesURL: ${p}`),p&&h?o=[{target:"video_file_url",targetUrl:h},{target:"subtitles_file_url",targetUrl:p}]:console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${h}, subtitlesURL: ${p}`);const g={duration:u,detectedLanguage:c,translationHelp:o};return E.Z.log("udemy video data:",g),console.log("[VOT] Detected language: ",g.detectedLanguage),g},Et=async function(t){const e=await async function(t){return await fetch("https://api.banned.video/graphql",{method:"POST",body:JSON.stringify({operationName:"GetVideo",query:"query GetVideo($id: String!) {\n getVideo(id: $id) {\n ...DisplayVideoFields\n videoUrl: directUrl\n live\n }\n }\n\n fragment DisplayVideoFields on Video {\n title\n description: summary\n duration: videoDuration\n }",variables:{id:t}}),headers:{"User-Agent":"bannedVideoFrontEnd","apollographql-client-name":"banned-web","apollographql-client-version":"1.3","content-type":"application/json"}}).then((t=>t.json())).catch((t=>(console.error(t),{data:{getVideo:{}}})))}(t);E.Z.log("banned.video video data:",e);const{videoUrl:o,duration:n,live:i,description:a,title:r}=e.data.getVideo;return{url:o,duration:n,live:i,title:r,description:a}},Ct="https://global.apis.naver.com/weverse/wevweb";async function At(t){const e=Date.now();let o=t.substring(0,Math.min(255,t.length))+e;const n=await async function(t,e){const o=new TextEncoder("utf-8");return e=o.encode(e),window.crypto.subtle.importKey("raw",o.encode(t),{name:"HMAC",hash:{name:"SHA-1"}},!1,["sign","verify"]).then((t=>window.crypto.subtle.sign("HMAC",t,e))).then((t=>btoa(String.fromCharCode(...new Uint8Array(t))))).catch((t=>(console.error(t),!1)))}("1b9cb6378d959b45714bec49971ade22e6e24e42",o);return{wmsgpad:e,wmd:n}}const Bt=async function(){const t=new URL(window.location).pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[3],e=await async function(t){const e=`/post/v1.0/post-${t}/preview?`+new URLSearchParams({fieldSet:"postForPreview",appId:"be4d79eb8fc7bd008ee82c8ec4ff6fd4",language:"en",os:"WEB",platform:"WEB",wpf:"pc"}),o=await At(e);return await fetch(Ct+e+"&"+new URLSearchParams(o)).then((t=>t.json())).catch((t=>(console.error(t),{extension:{video:{}}})))}(t);E.Z.log("weverse video preview data:",e);const{videoId:o,serviceId:n,infraVideoId:i}=e.extension.video;if(!(o&&n&&i))return!1;const{inKey:a}=await async function(t){const e=`/video/v1.1/vod/${t}/inKey?`+new URLSearchParams({gcc:"RU",appId:"be4d79eb8fc7bd008ee82c8ec4ff6fd4",language:"en",os:"WEB",platform:"WEB",wpf:"pc"}),o=await At(e);return await fetch(Ct+e+"&"+new URLSearchParams(o),{method:"POST"}).then((t=>t.json())).catch((t=>(console.error(t),{})))}(o);if(E.Z.log("weverse video inKey data:",e),!a)return!1;const r=await async function(t,e,o){const n=Date.now();return await fetch(`https://global.apis.naver.com/rmcnmv/rmcnmv/vod/play/v2.0/${t}?`+new URLSearchParams({key:e,sid:o,nonce:n,devt:"html5_pc",prv:"N",aup:"N",stpb:"N",cpl:"en",env:"prod",lc:"en",adi:[{adSystem:null}],adu:"/"})).then((t=>t.json())).catch((t=>(console.error(t),{videos:{list:[]}})))}(i,a,n);E.Z.log("weverse video data:",r);const s=r.videos.list.find((t=>!1===t.useP2P&&t.source.includes(".mp4")));if(!s)return!1;const{source:l,duration:d}=s;return{url:l,duration:d}},Ft=[{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:/^vimeo.com$/,selector:".player"},{additionalData:"embed",host:"vimeo",url:"https://player.vimeo.com/",match:/^player.vimeo.com$/,selector:".player"},{host:"ok.ru",url:"https://ok.ru/",match:/^ok.ru$/,selector:".html5-vpl_vid"},{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:".vjs-v6"},{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:t,selector:"#player"},{host:"piped",url:"https://youtu.be/",match:e,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)"},{host:"coursehunter",url:"https://coursehunter.net/course/",match:/^coursehunter.net$/,selector:"#oframeplayer > pjsdiv:nth-of-type(1)"},{host:"googledrive",url:"https://drive.google.com/file/d/",match:/^youtube.googleapis.com$/,selector:".html5-video-container"},{host:"bannedvideo",url:"https://banned.video/watch?id=",match:/^(www.)?banned.video$/,selector:".vjs-v7"},{host:"facebook",url:"https://facebook.com",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/videos/"),selector:'div[data-pagelet="WatchPermalinkVideo"]'},{additionalData:"reels",host:"facebook",url:"https://facebook.com",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/reel/"),selector:'div[role="main"]'},{host:"weverse",url:"https://weverse.io/",match:/^weverse.io$/,selector:".webplayer-internal-source-wrapper"},{host:"newgrounds",url:"https://www.newgrounds.com/",match:/^www.newgrounds.com$/,selector:".ng-video-player"}];o("./node_modules/requestidlecallback-polyfill/index.js");class _t{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).flatMap((t=>t instanceof HTMLVideoElement?[t]:t instanceof HTMLElement?Array.from(t.querySelectorAll("video")):t.shadowRoot?Array.from(t.shadowRoot.querySelectorAll("video")):[]))}const Rt=Q.getParser(window.navigator.userAgent).getResult(),zt=[...t,...e],Dt=["playing","ratechange","play","waiting","pause"];function It(t,e,o=!1){return t.map((t=>({label:`${o&&!r.includes(t)?"❌ ":""}${l.V.get("langs")[t]??t.toUpperCase()}`,value:t,selected:e===t})))}class $t{translateFromLang="en";translateToLang=C.KQ;timer;ytData="";videoData="";firstPlay=!0;audio=new Audio;hls=(0,C.QZ)();downloadTranslationUrl=null;downloadSubtitlesUrl=null;autoRetry;streamPing;volumeOnStart;tempOriginalVolume;tempVolume;subtitlesList=[];subtitlesListVideoId=null;videoLastSrcObject=null;constructor(t,e,o){E.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.video.addEventListener("loadedmetadata",this.handleSrcChangedBound),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 tt.i.get("autoTranslate",0,!0),dontTranslateLanguage:await tt.i.get("dontTranslateLanguage",C.KQ),dontTranslateYourLang:await tt.i.get("dontTranslateYourLang",1,!0),autoSetVolumeYandexStyle:await tt.i.get("autoSetVolumeYandexStyle",1,!0),autoVolume:await tt.i.get("autoVolume",n.sN,!0),showVideoSlider:await tt.i.get("showVideoSlider",1,!0),syncVolume:await tt.i.get("syncVolume",0,!0),subtitlesMaxLength:await tt.i.get("subtitlesMaxLength",300,!0),highlightWords:await tt.i.get("highlightWords",0,!0),responseLanguage:await tt.i.get("responseLanguage",C.KQ),defaultVolume:await tt.i.get("defaultVolume",100,!0),udemyData:await tt.i.get("udemyData",{accessToken:"",expires:0}),audioProxy:await tt.i.get("audioProxy",(C.KQ,0),!0),showPiPButton:await tt.i.get("showPiPButton",0,!0),translateAPIErrors:await tt.i.get("translateAPIErrors",1,!0),translationService:await tt.i.get("translationService",n.kF),detectService:await tt.i.get("detectService",n.EY),m3u8ProxyHost:await tt.i.get("m3u8ProxyHost",n.e6),proxyWorkerHost:await tt.i.get("proxyWorkerHost",n.ez)},this.videoData=await this.getVideoData(),console.log("[db] data from db: ",this.data),this.subtitlesWidget=new ft(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=P.createVOTButton(l.V.get("translateVideo")),this.container.appendChild(this.votButton.container),this.votButton.pipButton.hidden=!(0,C.qq)()||!this.data?.showPiPButton,this.votButton.separator2.hidden=!(0,C.qq)()||!this.data?.showPiPButton,this.votButton.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votMenu=P.createVOTMenu(l.V.get("VOTSettings")),this.container.appendChild(this.votMenu.container),this.votDownloadButton=P.createIconButton(''),this.votDownloadButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadButton),this.votDownloadSubtitlesButton=P.createIconButton(''),this.votDownloadSubtitlesButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadSubtitlesButton),this.votSettingsButton=P.createIconButton(''),this.votMenu.headerContainer.appendChild(this.votSettingsButton),this.votTranslationLanguageSelect=P.createVOTLanguageSelect({fromTitle:l.V.get("langs")[this.video.detectedLanguage],fromDialogTitle:l.V.get("videoLanguage"),fromItems:[{label:l.V.get("langs").auto,value:"auto",selected:""},...It(i,this.videoData.detectedLanguage)],fromOnSelectCB:async t=>{E.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:l.V.get("langs")[this.video.responseLanguage],toDialogTitle:l.V.get("translationLanguage"),toItems:[...It(i,this.videoData.responseLanguage,!0),{label:"─────────",value:"separator",disabled:!0},...It(a,this.videoData.responseLanguage,!0)],toOnSelectCB:async t=>{const e=t.target.dataset.votValue;E.Z.log("[toOnSelectCB] select to language",e),this.data.responseLanguage=this.translateToLang=e,await tt.i.set("responseLanguage",this.data.responseLanguage),E.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=P.createVOTSelect(l.V.get("VOTSubtitlesDisabled"),l.V.get("VOTSubtitles"),[{label:l.V.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1}],{onSelectCb:async t=>{await this.changeSubtitlesLang(t.target.dataset.votValue)},labelElement:P.createVOTSelectLabel(l.V.get("VOTSubtitles"))}),this.votMenu.bodyContainer.appendChild(this.votSubtitlesSelect.container),this.votVideoVolumeSlider=P.createSlider(`${l.V.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=P.createSlider(`${l.V.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=P.createDialog(l.V.get("VOTSettings")),document.documentElement.appendChild(this.votSettingsDialog.container),this.votTranslationHeader=P.createHeader(l.V.get("translationSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationHeader),this.votAutoTranslateCheckbox=P.createCheckbox(l.V.get("VOTAutoTranslate"),this.data?.autoTranslate??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoTranslateCheckbox.container),this.votDontTranslateYourLangSelect=P.createVOTSelect(l.V.get("langs")[tt.i.syncGet("dontTranslateLanguage",C.KQ)],l.V.get("VOTDontTranslateYourLang"),It(i,tt.i.syncGet("dontTranslateLanguage",C.KQ)),{onSelectCb:async t=>{this.data.dontTranslateLanguage=t.target.dataset.votValue,await tt.i.set("dontTranslateLanguage",this.data.dontTranslateLanguage)},labelElement:P.createCheckbox(l.V.get("VOTDontTranslateYourLang"),this.data?.dontTranslateYourLang??!0).container}),this.votSettingsDialog.bodyContainer.appendChild(this.votDontTranslateYourLangSelect.container),this.votAutoSetVolumeCheckbox=P.createCheckbox(`${l.V.get("VOTAutoSetVolume")}`,this.data?.autoSetVolumeYandexStyle??!0),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeCheckbox.container),this.votAutoSetVolumeSlider=P.createSlider(`${100*(this.data?.autoVolume??n.sN)}%`,100*(this.data?.autoVolume??n.sN),0,100),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeSlider.container),this.votShowVideoSliderCheckbox=P.createCheckbox(l.V.get("VOTShowVideoSlider"),this.data?.showVideoSlider??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votShowVideoSliderCheckbox.container),this.votUdemyDataTextfield=P.createTextfield(l.V.get("VOTUdemyData"),this.data?.udemyData?.accessToken??""),this.votUdemyDataTextfield.container.hidden="udemy"!==this.site.host,this.votSettingsDialog.bodyContainer.appendChild(this.votUdemyDataTextfield.container),this.votSyncVolumeCheckbox=P.createCheckbox(l.V.get("VOTSyncVolume"),this.data?.syncVolume??!1),this.votSyncVolumeCheckbox.container.hidden=!["youtube","googledrive"].includes(this.site.host)||"mobile"===this.site.additionalData,this.votSettingsDialog.bodyContainer.appendChild(this.votSyncVolumeCheckbox.container),this.votTranslationServiceSelect=P.createVOTSelect(tt.i.syncGet("translationService",n.kF),l.V.get("VOTTranslationService"),It(at,tt.i.syncGet("translationService",n.kF)),{onSelectCb:async t=>{this.data.translationService=t.target.dataset.votValue,await tt.i.set("translationService",this.data.translationService)},labelElement:P.createCheckbox(l.V.get("VOTTranslateAPIErrors"),this.data.translateAPIErrors??!0).container}),this.votTranslationServiceSelect.container.hidden="ru"===l.V.lang,this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationServiceSelect.container),this.votDetectServiceSelect=P.createVOTSelect(tt.i.syncGet("detectService",n.EY),l.V.get("VOTDetectService"),It(rt,tt.i.syncGet("detectService",n.EY)),{onSelectCb:async t=>{this.data.detectService=t.target.dataset.votValue,await tt.i.set("detectService",this.data.detectService)},labelElement:P.createVOTSelectLabel(l.V.get("VOTDetectService"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votDetectServiceSelect.container),this.votSubtitlesHeader=P.createHeader(l.V.get("subtitlesSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHeader),this.votSubtitlesMaxLengthSlider=P.createSlider(`${l.V.get("VOTSubtitlesMaxLength")}: ${this.data?.subtitlesMaxLength??300}`,this.data?.subtitlesMaxLength??300,50,300),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesMaxLengthSlider.container),this.votSubtitlesHighlightWordsCheckbox=P.createCheckbox(l.V.get("VOTHighlightWords"),this.data?.highlightWords??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHighlightWordsCheckbox.container),this.votProxyHeader=P.createHeader(l.V.get("proxySettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votProxyHeader),this.votM3u8ProxyHostTextfield=P.createTextfield(l.V.get("VOTM3u8ProxyHost"),this.data?.m3u8ProxyHost,n.e6),this.votSettingsDialog.bodyContainer.appendChild(this.votM3u8ProxyHostTextfield.container),this.votProxyWorkerHostTextfield=P.createTextfield(l.V.get("VOTProxyWorkerHost"),this.data?.proxyWorkerHost,n.ez),this.votProxyWorkerHostTextfield.container.hidden=!0,this.votSettingsDialog.bodyContainer.appendChild(this.votProxyWorkerHostTextfield.container),this.votAudioProxyCheckbox=P.createCheckbox(l.V.get("VOTAudioProxy"),this.data?.audioProxy??!1),this.votAudioProxyCheckbox.container.hidden=!0,this.votSettingsDialog.bodyContainer.appendChild(this.votAudioProxyCheckbox.container),this.votAboutHeader=P.createHeader(l.V.get("about")),this.votSettingsDialog.bodyContainer.appendChild(this.votAboutHeader),this.votLanguageSelect=P.createVOTSelect(l.V.get("langs")[tt.i.syncGet("locale-lang-override","auto")],l.V.get("VOTMenuLanguage"),It(l.Z,tt.i.syncGet("locale-lang-override","auto")),{onSelectCb:async t=>{await tt.i.set("locale-lang-override",t.target.dataset.votValue)},labelElement:P.createVOTSelectLabel(l.V.get("VOTMenuLanguage"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votLanguageSelect.container),this.votShowPiPButtonCheckbox=P.createCheckbox(l.V.get("VOTShowPiPButton"),this.data?.showPiPButton??!1),this.votShowPiPButtonCheckbox.container.hidden=!(0,C.qq)(),this.votSettingsDialog.bodyContainer.appendChild(this.votShowPiPButtonCheckbox.container),this.votVersionInfo=P.createInformation(`${l.V.get("VOTVersion")}:`,GM_info.script.version),this.votSettingsDialog.bodyContainer.appendChild(this.votVersionInfo.container),this.votAuthorsInfo=P.createInformation(`${l.V.get("VOTAuthors")}:`,GM_info.script.author),this.votSettingsDialog.bodyContainer.appendChild(this.votAuthorsInfo.container),this.votLoaderInfo=P.createInformation(`${l.V.get("VOTLoader")}:`,`${GM_info.scriptHandler} v${GM_info.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votLoaderInfo.container),this.votBrowserInfo=P.createInformation(`${l.V.get("VOTBrowser")}:`,`${Rt.browser.name} ${Rt.browser.version} (${Rt.os.name} ${Rt.os.version})`),this.votSettingsDialog.bodyContainer.appendChild(this.votBrowserInfo.container),this.votResetSettingsButton=P.createButton(l.V.get("resetSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votResetSettingsButton)}initUIEvents(){this.votButton.translateButton.addEventListener("click",(()=>{(async()=>{if(this.audio.src)return E.Z.log("[click translationBtn] audio.src is not empty"),void this.stopTraslate();if(this.hls.url)return E.Z.log("[click translationBtn] hls is not empty"),void this.stopTraslate();try{if(E.Z.log("[click translationBtn] trying execute translation"),!this.videoData.videoId)throw new O("VOTNoVideoIDFound");await this.translateExecutor(this.videoData.videoId)}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=A(this.audio,e,t,this.tempOriginalVolume);this.votVideoTranslationVolumeSlider.input.value=o,this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,P.updateSlider(this.votVideoTranslationVolumeSlider.input),this.tempVolume=o,this.tempOriginalVolume=e}})),this.votVideoTranslationVolumeSlider.input.addEventListener("input",(t=>{(async()=>{this.data.defaultVolume=Number(t.target.value),await tt.i.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",(t=>{(async()=>{this.data.autoTranslate=Number(t.target.checked),await tt.i.set("autoTranslate",this.data.autoTranslate),E.Z.log("autoTranslate value changed. New value: ",this.data.autoTranslate)})()})),this.votDontTranslateYourLangSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.dontTranslateYourLang=Number(t.target.checked),await tt.i.set("dontTranslateYourLang",this.data.dontTranslateYourLang),E.Z.log("dontTranslateYourLang value changed. New value: ",this.data.dontTranslateYourLang)})()})),this.votAutoSetVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.autoSetVolumeYandexStyle=Number(t.target.checked),await tt.i.set("autoSetVolumeYandexStyle",this.data.autoSetVolumeYandexStyle),E.Z.log("autoSetVolumeYandexStyle value changed. New value: ",this.data.autoSetVolumeYandexStyle)})()})),this.votAutoSetVolumeSlider.input.addEventListener("input",(t=>{(async()=>{const e=Number(t.target.value);this.data.autoVolume=(e/100).toFixed(2),await tt.i.set("autoVolume",this.data.autoVolume),this.votAutoSetVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`})()})),this.votShowVideoSliderCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showVideoSlider=Number(t.target.checked),await tt.i.set("showVideoSlider",this.data.showVideoSlider),E.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",(t=>{(async()=>{this.data.udemyData={accessToken:t.target.value,expires:(new Date).getTime()},await tt.i.set("udemyData",this.data.udemyData),E.Z.log("udemyData value changed. New value: ",this.data.udemyData),window.location.reload()})()})),this.votSyncVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.syncVolume=Number(t.target.checked),await tt.i.set("syncVolume",this.data.syncVolume),E.Z.log("syncVolume value changed. New value: ",this.data.syncVolume)})()})),this.votTranslationServiceSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.translateAPIErrors=Number(t.target.checked),await tt.i.set("translateAPIErrors",this.data.translateAPIErrors),E.Z.log("translateAPIErrors value changed. New value: ",this.data.translateAPIErrors)})()})),this.votSubtitlesMaxLengthSlider.input.addEventListener("input",(t=>{(async()=>{this.data.subtitlesMaxLength=Number(t.target.value),await tt.i.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",(t=>{(async()=>{this.data.highlightWords=Number(t.target.checked),await tt.i.set("highlightWords",this.data.highlightWords),E.Z.log("highlightWords value changed. New value: ",this.data.highlightWords),this.subtitlesWidget.setHighlightWords(this.data.highlightWords)})()})),this.votShowPiPButtonCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showPiPButton=Number(t.target.checked),await tt.i.set("showPiPButton",this.data.showPiPButton),E.Z.log("showPiPButton value changed. New value: ",this.data.showPiPButton),this.votButton.pipButton.hidden=!(0,C.qq)()||!this.data.showPiPButton,this.votButton.separator2.hidden=!(0,C.qq)()||!this.data.showPiPButton})()})),this.votM3u8ProxyHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.m3u8ProxyHost=t.target.value||n.e6,await tt.i.set("m3u8ProxyHost",this.data.m3u8ProxyHost),E.Z.log("m3u8ProxyHost value changed. New value: ",this.data.m3u8ProxyHost)})()})),this.votProxyWorkerHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.proxyWorkerHost=t.target.value||n.ez,await tt.i.set("proxyWorkerHost",this.data.proxyWorkerHost),E.Z.log("proxyWorkerHost value changed. New value: ",this.data.proxyWorkerHost),window.location.reload()})()})),this.votAudioProxyCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.audioProxy=Number(t.target.checked),await tt.i.set("audioProxy",this.data.audioProxy),E.Z.log("audioProxy value changed. New value: ",this.data.audioProxy)})()})),this.votResetSettingsButton.addEventListener("click",(()=>{(async()=>{l.V.reset(),(await tt.i.list()).filter((t=>!l.V.gmValues.includes(t))).forEach((t=>tt.i.syncDelete(t))),window.location.reload()})()}))}releaseExtraEvents(){clearInterval(this.resizeInterval),this.resizeObserver?.disconnect(),["youtube","googledrive"].includes(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","googledrive"].includes(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;E.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,"emptied",(()=>{E.Z.log("lipsync mode is emptied"),this.stopTranslation()})),t(this.video,"progress",(async()=>{if(this.firstPlay&&1===this.data.autoTranslate&&(0,C.gJ)(this.site.host,this.video)===this.videoData.videoId){if(!this.videoData.videoId)throw new O("VOTNoVideoIDFound");try{this.firstPlay=!1,await this.translateExecutor(this.videoData.videoId)}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(E.Z.log("[onchange] subtitles",t),this.votSubtitlesSelect.setSelected(t),"disabled"===t)this.votSubtitlesSelect.setTitle(l.V.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((t=>{setTimeout((()=>{e||(console.error("[VOT] Failed to fetch subtitles. Reason: timeout"),t([]))}),5e3)})),new Promise((o=>{E.Z.log("Fetching subtitles:",t),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=mt(i)}else a=bt(i,n);n=a[a.length-1],o.push({...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:l.V.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1},...this.subtitlesList.map(((t,e)=>({label:(l.V.get("langs")[t.language]??t.language.toUpperCase())+(t.translatedFromLanguage?` ${l.V.get("VOTTranslatedFrom")} ${l.V.get("langs")[t.translatedFromLanguage]??t.translatedFromLanguage.toUpperCase()}`:"")+("yandex"!==t.source?` ${t.source}`:"")+(t.isAutoGenerated?` (${l.V.get("VOTAutogenerated")})`:""),value:e,selected:!1,disabled:!1})))];this.votSubtitlesSelect.updateItems(t),await this.changeSubtitlesLang(t[0].value)}async updateSubtitles(){if(await this.changeSubtitlesLang("disabled"),!this.videoData.videoId)return console.error(`[VOT] ${l.V.getDefault("VOTNoVideoIDFound")}`),this.subtitlesList=[],this.subtitlesListVideoId=null,void await this.updateSubtitlesLangSelect();this.subtitlesListVideoId!==this.videoData.videoId&&(this.subtitlesList=await async function(t,e,n){const i="youtube"===t.host?ht():[];let a=!1;const r=[...await Promise.race([new Promise((t=>{setTimeout((()=>{a||(console.error("[VOT] Failed get yandex subtitles. Reason: timeout"),t([]))}),5e3)})),new Promise((i=>{!async function(t,e,n){try{E.Z.log("requestVideoSubtitles");const i=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;E.Z.log("Inited yandexRequest...");const a=U(t,e);await i("/video-subtitles/get-subtitles",a,{"Vsubs-Signature":await X(a),"Sec-Vsubs-Token":J(!1)},n)}catch(t){console.error("[VOT]",t),n(!1)}}(`${t.url}${e}`,n,((t,e)=>{E.Z.log("[exec callback] Requesting video subtitles"),t||(console.error("[VOT] Failed get yandex subtitles"),a=!0,i([]));const o=W(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===C.KQ||e.language===C.KQ))return t.language===C.KQ?-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,this.videoData.videoId,this.videoData.detectedLanguage),this.subtitlesList?this.subtitlesListVideoId=this.videoData.videoId:await this.changeSubtitlesLang("disabled"),await this.updateSubtitlesLangSelect())}getVideoVolume(){let t=this.video?.volume;return["youtube","googledrive"].includes(this.site.host)&&(t=ut()||t),t}setVideoVolume(t){["youtube","googledrive"].includes(this.site.host)&>(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}%`,P.updateSlider(this.votVideoVolumeSlider.input),1===this.data.syncVolume&&(this.tempOriginalVolume=Number(t))}setSelectMenuValues(t,e){this.votTranslationLanguageSelect.fromSelect.setTitle(l.V.get("langs")[t]),this.votTranslationLanguageSelect.toSelect.setTitle(l.V.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=A(this.video,t,e,this.tempVolume);this.votVideoVolumeSlider.input.value=o,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${o}%`,P.updateSlider(this.votVideoVolumeSlider.input),this.tempOriginalVolume=o,this.tempVolume=t}async getVideoData(){const t={translationHelp:null,isStream:!1,duration:this.video?.duration||343,videoId:(0,C.gJ)(this.site.host,this.video),detectedLanguage:this.translateFromLang,responseLanguage:this.translateToLang};if(!t.videoId)return this.ytData={},t;if(window.location.hostname.includes("youtube.com"))this.ytData=await pt(),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("ok.ru")||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 St(this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else if(window.location.hostname.includes("coursehunter.net")){const e=await yt();t.translationHelp={url:e.url},t.duration=e.duration||t.duration}else if(window.location.hostname.includes("banned.video")){const e=await Et(t.videoId);t.translationHelp={url:e.url},t.duration=e.duration||t.duration,t.isStream=e.live}else if(window.location.hostname.includes("weverse.io")){const e=await Bt();t.detectedLanguage="ko",e&&(t.translationHelp={url:e.url},t.duration=e.duration||t.duration)}else if(window.location.hostname.includes("udemy.com")){const e=await Ot(this.data.udemyData,this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else["vk","piped","invidious","bitchute","rumble","peertube","dailymotion","trovo","yandexdisk","coursehunter"].includes(this.site.host)&&(t.detectedLanguage="auto");return t}videoValidator(){if(["youtube","ok.ru"].includes(this.site.host)){if(E.Z.log("VideoValidator videoData: ",this.videoData),1===this.data.dontTranslateYourLang&&this.videoData.detectedLanguage===this.data.dontTranslateLanguage&&this.videoData.responseLanguage===this.data.dontTranslateLanguage)throw new O("VOTDisableFromYourLang");if(!this.videoData.isStream&&this.videoData.duration>14400)throw new O("VOTVideoIsTooLong")}return!0}lipSync(t=!1){if(E.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","stop","waiting"].includes(t)&&(E.Z.log(`lipsync mode is ${t}`),this.audio.pause()),"playing"==t&&(E.Z.log("lipsync mode is playing"),this.audio.play());else{E.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",l.V.get("grantPermissionToAutoPlay")),new O("grantPermissionToAutoPlay");if("NotSupportedError"===t.name)throw this.transformBtn("error",zt.includes(window.location.hostname)?l.V.get("neededAdditionalExtension"):l.V.get("audioFormatNotSupported")),zt.includes(window.location.hostname)?new O("neededAdditionalExtension"):new O("audioFormatNotSupported")}))}else E.Z.log("lipsync mode is not set")}handleVideoEvent(t){E.Z.log(`video ${t.type}`),this.lipSync(t.type)}stopTraslate(){Dt.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",l.V.get("translateVideo")),E.Z.log(`Volume on start: ${this.volumeOnStart}`),this.volumeOnStart&&(["youtube","googledrive"].includes(this.site.host)?gt(this.volumeOnStart):this.video.volume=this.volumeOnStart),this.volumeOnStart="",clearInterval(this.streamPing),this.hls?.destroy(),this.hls=(0,C.QZ)()}async translateExecutor(t){E.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=a?.url?a.url:`${this.site.url}${t}`;if(E.Z.log("Run videoValidator"),this.videoValidator(),e)return E.Z.log("Executed stream translation"),void function(t,e,n,i){E.Z.log(`Translate stream (url: ${t}, requestLang: ${e}, responseLang: ${n})`),async function(t,e,n,i){try{E.Z.log("requestStreamTranslation");const a=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;E.Z.log("Inited yandexRequest...");const r=Y(t,e,n);await a("/stream-translation/translate-stream",r,{"Vtrans-Signature":await X(r),"Sec-Vtrans-Token":J(!1)},i)}catch(t){console.error("[VOT]",t),i(!1)}}(t,e,n,((t,e)=>{if(E.Z.log("[exec callback] Requesting stream translation"),!t)return void i(!1,l.V.get("requestTranslationFailed"));const o=K(e);switch(console.log("[VOT] Stream Translation response: ",o),o.interval){case 10:i(!1,o.interval,l.V.get("translationTakeFewMinutes"));break;case 20:i(!0,o.interval,o||l.V.get("audioNotReceived"));break;case 0:i(!1,o.interval,l.V.get("streamNoConnectionToServer"))}}))}(r,n,i,(async(r,s,d)=>{if(E.Z.log("[exec callback] translateStream callback"),(0,C.gJ)(this.site.host,this.video)!==t)return;if(!r||!d.translatedInfo)return"VOTLocalizedError"===d?.name?this.transformBtn("error",d.localizedMessage):1===this.data.translateAPIErrors&&"ru"!==l.V.lang?(this.transformBtn("error",`${l.V.get("VOTTranslatingError")}...`),this.transformBtn("error",await it(d,"ru",l.V.lang))):this.transformBtn("error",d),void(10===s&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),1e3*s)));this.transformBtn("success",l.V.get("disableTranslate")),console.log(d);const c=d.pingId;E.Z.log(`Stream pingId: ${c}`),this.streamPing=setInterval((async()=>await async function(t,e){try{E.Z.log("requestStreamPing");const n=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;E.Z.log("Inited yandexRequest...");const i=G(t);await n("/stream-translation/ping-stream",i,{"Vtrans-Signature":await X(i),"Sec-Vtrans-Token":J(!1)},e)}catch(t){console.error("[VOT]",t),e(!1)}}(c,(t=>E.Z.log("Stream ping result: ",t)))),1e3*s),E.Z.log(d.translatedInfo.url);const u=`https://${this.data.m3u8ProxyHost}/?all=yes&origin=${encodeURIComponent("https://strm.yandex.ru")}&referer=${encodeURIComponent("https://strm.yandex.ru")}&url=${encodeURIComponent(d.translatedInfo.url)}`;if(E.Z.log(u),this.hls)this.hls.on(Hls.Events.MEDIA_ATTACHED,(function(){E.Z.log("audio and hls.js are now bound together !")})),this.hls.on(Hls.Events.MANIFEST_PARSED,(function(t){E.Z.log("manifest loaded, found "+t.levels.length+" quality level")})),this.hls.loadSource(u),this.hls.attachMedia(this.audio),this.hls.on(Hls.Events.ERROR,(function(t){if(t.fatal)switch(t.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",t);break;default:this.hls.destroy()}})),E.Z.log(this.hls);else{if(!this.audio.canPlayType("application/vnd.apple.mpegurl"))throw new O("audioFormatNotSupported");this.audio.src=u}vt(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"),Dt.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+"%",P.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=u):this.stopTranslation()}));if(["udemy","coursera"].includes(this.site.host)&&!a)throw new O("VOTTranslationHelpNull");!function(t,e,n,i,a,r){E.Z.log(`Translate video (url: ${t}, duration: ${e}, requestLang: ${n}, responseLang: ${i})`),E.Z.log("translationHelp:",a),async function(t,e,n,i,a,r){try{E.Z.log("requestVideoTranslation");const s=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;E.Z.log("Inited yandexRequest...");const l=H(t,e,n,i,a);await s("/video-translation/translate",l,{"Vtrans-Signature":await X(l),"Sec-Vtrans-Token":J(!1)},r)}catch(t){console.error("[VOT]",t),r(!1)}}(t,e,n,i,a,((t,e)=>{if(E.Z.log("[exec callback] Requesting video translation"),!t)return void r(!1,l.V.get("requestTranslationFailed"));const o=Z(e);switch(console.log("[VOT] Translation response: ",o),o.status){case 0:r(!1,o.message);break;case 1:r(!!o.url,o.url||l.V.get("audioNotReceived"));break;case 2:r(!1,o.remainingTime?(0,C.PG)(o.remainingTime):l.V.get("translationTakeFewMinutes"));break;case 3:case 6:r(!1,l.V.get("videoBeingTranslated"))}}))}(r,this.videoData.duration,n,i,a,(async(o,r)=>{if(E.Z.log("[exec callback] translateVideo callback"),(0,C.gJ)(this.site.host,this.video)===t){if(!o)return"VOTLocalizedError"===r?.name?this.transformBtn("error",r.localizedMessage):1!==this.data.translateAPIErrors||r.includes(l.V.get("translationTake"))||"ru"===l.V.lang?this.transformBtn("error",r):(this.transformBtn("error",l.V.get("VOTTranslatingError")),this.transformBtn("error",await it(r,"ru",l.V.lang))),r.includes(l.V.get("translationTake"))&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,n,i,a)),6e4)),void console.error("[VOT]",r);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&&!this.video.paused&&this.lipSync("play"),Dt.forEach((t=>this.video.addEventListener(t,this.handleVideoEventBound))),this.transformBtn("success",l.V.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+"%",P.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=r}}))}stopTranslation(){this.stopTraslate(),this.syncVideoVolumeSlider()}async handleSrcChanged(){E.Z.log("[VideoHandler] src changed",this),this.stopTranslation(),this.firstPlay=!0,this.videoData=await this.getVideoData(),this.videoData.detectedLanguage&&this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage);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.translateToLang=this.data.responseLanguage??"ru"}async release(){E.Z.log("[VideoHandler] release"),this.initialized=!1,this.stopTranslation(),this.releaseExtraEvents(),this.subtitlesWidget.release(),this.votButton.container.remove(),this.votMenu.container.remove()}}const Nt=new class{constructor(){this.onVideoAdded=new _t,this.onVideoRemoved=new _t,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)}},jt=new WeakMap;(async function(){if(E.Z.log("Loading extension..."),await l.V.update(),E.Z.log(`Selected menu language: ${l.V.lang}`),GM_info?.scriptHandler&&s.includes(GM_info.scriptHandler))return console.error(`[VOT] ${l.V.getDefault("unSupportedExtensionError").replace("{0}",GM_info.scriptHandler)}`),alert(`[VOT] ${l.V.get("unSupportedExtensionError").replace("{0}",GM_info.scriptHandler)}`);E.Z.log("Extension compatibility passed..."),Nt.onVideoAdded.addListener((t=>{for(const e of Ft.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;else{const n=Rt.browser.version.split(".")?.[0];if(e.selector?.includes(":not")&&e.selector?.includes("*")&&n&&("Chrome"===Rt.browser.name&&Number(n)<88||"Firefox"===Rt.browser.name&&Number(n)<84)){const n=e.selector?.split(" *")?.[0];o=n?Object.values(document.querySelectorAll(n)).find((e=>e.contains(t))):t.parentElement}else o=e.selector?Object.values(document.querySelectorAll(e.selector)).find((e=>e.contains(t))):t.parentElement}if(o&&!("rumble"===e.host&&o.querySelector("vot-block")||("peertube"===e.host&&(e.url=window.location.origin),jt.has(t)))){jt.set(t,new $t(t,o,e));break}}})),Nt.onVideoRemoved.addListener((async t=>{jt.has(t)&&(await jt.get(t).release(),jt.delete(t))})),Nt.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 326863c3..e479b2f3 100644 --- a/dist/vot.user.js +++ b/dist/vot.user.js @@ -108,6 +108,7 @@ // @match *://youtube.googleapis.com/embed/* // @match *://*.banned.video/* // @match *://*.weverse.io/* +// @match *://*.newgrounds.com/* // @connect api.browser.yandex.ru // @downloadURL https://raw.githubusercontent.com/ilyhalight/voice-over-translation/dev/dist/vot.user.js // @grant GM_xmlhttpRequest @@ -1160,6 +1161,8 @@ const getVideoId = (service, video) => { return url.searchParams.get("id"); case "weverse": return url.pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[0]; + case "newgrounds": + return url.pathname.match(/([^/]+)\/(view)\/([^/]+)/)?.[0]; default: return false; } @@ -3130,25 +3133,22 @@ class SubtitlesWidget { if (top && bottom) { this.votSubtitlesContainer.style.top = `${y - this.containerRect.y}px`; + } else if (!top) { + this.votSubtitlesContainer.style.top = `${0}px`; } else { - if (!top) { - this.votSubtitlesContainer.style.top = `${0}px`; - } else { - this.votSubtitlesContainer.style.top = `${ - this.containerRect.height - this.subtitlesContainerRect.height - }px`; - } + this.votSubtitlesContainer.style.top = `${ + this.containerRect.height - this.subtitlesContainerRect.height + }px`; } + if (left && right) { this.votSubtitlesContainer.style.left = `${x - this.containerRect.x}px`; + } else if (!left) { + this.votSubtitlesContainer.style.left = `${0}px`; } else { - if (!left) { - this.votSubtitlesContainer.style.left = `${0}px`; - } else { - this.votSubtitlesContainer.style.left = `${ - this.containerRect.width - this.subtitlesContainerRect.width - }px`; - } + this.votSubtitlesContainer.style.left = `${ + this.containerRect.width - this.subtitlesContainerRect.width + }px`; } } } @@ -3238,22 +3238,20 @@ class SubtitlesWidget { : "" }>${token.text}`; } - } else { - if (line.text.length > this.maxLength) { - let chunks = line.text.match(this.maxLengthRegexp); - let chunkDurationMs = line.durationMs / chunks.length; - for (let i = 0; i < chunks.length; i++) { - if ( - line.startMs + chunkDurationMs * i < time && - time < line.startMs + chunkDurationMs * (i + 1) - ) { - content = chunks[i].trim(); - break; - } + } else if (line.text.length > this.maxLength) { + let chunks = line.text.match(this.maxLengthRegexp); + let chunkDurationMs = line.durationMs / chunks.length; + for (let i = 0; i < chunks.length; i++) { + if ( + line.startMs + chunkDurationMs * i < time && + time < line.startMs + chunkDurationMs * (i + 1) + ) { + content = chunks[i].trim(); + break; } - } else { - content = line.text; } + } else { + content = line.text; } } if (content !== this.lastContent) { @@ -3692,24 +3690,6 @@ async function createHash(pathname) { }; } -// f = function (e, t, n) { -// let r = "?"; -// -1 !== e.indexOf("?") && (r = "&"); -// const i = (function (e, t) { -// let n = e.substring(0, Math.min(255, e.length)); -// n += t; -// let r = u.createHmac("sha1", c.active).update(n).digest("base64"); -// return (r = encodeURIComponent(r)), { wmsgpad: t, wmd: r }; -// })( -// (e = "" -// .concat(e) -// .concat(r) -// .concat((0, l.stringify)({ ...t, wpf: (0, s.li)() ? "mweb" : "pc" }))), -// n, -// ); -// return e + "&wmsgpad=" + i.wmsgpad + "&wmd=" + i.wmd; -// }; - function getURLData() { return { appId: API_APP_ID, @@ -4114,6 +4094,12 @@ const sites = () => { match: /^weverse.io$/, selector: ".webplayer-internal-source-wrapper", }, + { + host: "newgrounds", + url: "https://www.newgrounds.com/", + match: /^www.newgrounds.com$/, + selector: ".ng-video-player", + }, // Нужно куда-то заливать данные о плейлисте // { // host: "epicgames", @@ -5011,13 +4997,12 @@ class VideoHandler { try { debug/* default */.Z.log("[click translationBtn] trying execute translation"); - const VIDEO_ID = (0,utils/* getVideoId */.gJ)(this.site.host, this.video); - if (!VIDEO_ID) { + if (!this.videoData.videoId) { throw new VOTLocalizedError("VOTNoVideoIDFound"); } - await this.translateExecutor(VIDEO_ID); + await this.translateExecutor(this.videoData.videoId); } catch (err) { console.error("[VOT]", err); if (err?.name === "VOTLocalizedError") { @@ -5491,15 +5476,13 @@ class VideoHandler { return; } - const VIDEO_ID = (0,utils/* getVideoId */.gJ)(this.site.host, this.video); - - if (!VIDEO_ID) { + if (!this.videoData.videoId) { throw new VOTLocalizedError("VOTNoVideoIDFound"); } try { this.firstPlay = false; - await this.translateExecutor(VIDEO_ID); + await this.translateExecutor(this.videoData.videoId); } catch (err) { console.error("[VOT]", err); if (err?.name === "VOTLocalizedError") { @@ -5587,9 +5570,7 @@ class VideoHandler { async updateSubtitles() { await this.changeSubtitlesLang("disabled"); - const VIDEO_ID = (0,utils/* getVideoId */.gJ)(this.site.host, this.video); - - if (!VIDEO_ID) { + if (!this.videoData.videoId) { console.error( `[VOT] ${localizationProvider/* localizationProvider */.V.getDefault("VOTNoVideoIDFound")}`, ); @@ -5599,19 +5580,19 @@ class VideoHandler { return; } - if (this.subtitlesListVideoId === VIDEO_ID) { + if (this.subtitlesListVideoId === this.videoData.videoId) { return; } this.subtitlesList = await subtitles_getSubtitles( this.site, - VIDEO_ID, + this.videoData.videoId, this.videoData.detectedLanguage, ); if (!this.subtitlesList) { await this.changeSubtitlesLang("disabled"); } else { - this.subtitlesListVideoId = VIDEO_ID; + this.subtitlesListVideoId = this.videoData.videoId; } await this.updateSubtitlesLangSelect(); } @@ -5779,9 +5760,8 @@ class VideoHandler { } return videoData; } - videoValidator() { - if (this.site.host === "youtube" || this.site.host === "ok.ru") { + if (["youtube", "ok.ru"].includes(this.site.host)) { debug/* default */.Z.log("VideoValidator videoData: ", this.videoData); if ( this.data.dontTranslateYourLang === 1 && diff --git a/src/config/sites.js b/src/config/sites.js index 01fee5fb..6a9bce1c 100644 --- a/src/config/sites.js +++ b/src/config/sites.js @@ -272,6 +272,12 @@ const sites = () => { match: /^weverse.io$/, selector: ".webplayer-internal-source-wrapper", }, + { + host: "newgrounds", + url: "https://www.newgrounds.com/", + match: /^www.newgrounds.com$/, + selector: ".ng-video-player", + }, // Нужно куда-то заливать данные о плейлисте // { // host: "epicgames", diff --git a/src/headers.json b/src/headers.json index 2f1a7f22..c710293d 100644 --- a/src/headers.json +++ b/src/headers.json @@ -101,7 +101,8 @@ "*://coursehunter.net/*", "*://youtube.googleapis.com/embed/*", "*://*.banned.video/*", - "*://*.weverse.io/*" + "*://*.weverse.io/*", + "*://*.newgrounds.com/*" ], "require": [ "https://cdn.jsdelivr.net/npm/protobufjs/dist/light/protobuf.min.js", diff --git a/src/index.js b/src/index.js index 395f9d40..4a8515d0 100644 --- a/src/index.js +++ b/src/index.js @@ -813,13 +813,12 @@ class VideoHandler { try { debug.log("[click translationBtn] trying execute translation"); - const VIDEO_ID = getVideoId(this.site.host, this.video); - if (!VIDEO_ID) { + if (!this.videoData.videoId) { throw new VOTLocalizedError("VOTNoVideoIDFound"); } - await this.translateExecutor(VIDEO_ID); + await this.translateExecutor(this.videoData.videoId); } catch (err) { console.error("[VOT]", err); if (err?.name === "VOTLocalizedError") { @@ -1293,15 +1292,13 @@ class VideoHandler { return; } - const VIDEO_ID = getVideoId(this.site.host, this.video); - - if (!VIDEO_ID) { + if (!this.videoData.videoId) { throw new VOTLocalizedError("VOTNoVideoIDFound"); } try { this.firstPlay = false; - await this.translateExecutor(VIDEO_ID); + await this.translateExecutor(this.videoData.videoId); } catch (err) { console.error("[VOT]", err); if (err?.name === "VOTLocalizedError") { @@ -1389,9 +1386,7 @@ class VideoHandler { async updateSubtitles() { await this.changeSubtitlesLang("disabled"); - const VIDEO_ID = getVideoId(this.site.host, this.video); - - if (!VIDEO_ID) { + if (!this.videoData.videoId) { console.error( `[VOT] ${localizationProvider.getDefault("VOTNoVideoIDFound")}`, ); @@ -1401,19 +1396,19 @@ class VideoHandler { return; } - if (this.subtitlesListVideoId === VIDEO_ID) { + if (this.subtitlesListVideoId === this.videoData.videoId) { return; } this.subtitlesList = await getSubtitles( this.site, - VIDEO_ID, + this.videoData.videoId, this.videoData.detectedLanguage, ); if (!this.subtitlesList) { await this.changeSubtitlesLang("disabled"); } else { - this.subtitlesListVideoId = VIDEO_ID; + this.subtitlesListVideoId = this.videoData.videoId; } await this.updateSubtitlesLangSelect(); } @@ -1581,9 +1576,8 @@ class VideoHandler { } return videoData; } - videoValidator() { - if (this.site.host === "youtube" || this.site.host === "ok.ru") { + if (["youtube", "ok.ru"].includes(this.site.host)) { debug.log("VideoValidator videoData: ", this.videoData); if ( this.data.dontTranslateYourLang === 1 && diff --git a/src/subtitles.js b/src/subtitles.js index 8ad46f0f..2cb7028a 100644 --- a/src/subtitles.js +++ b/src/subtitles.js @@ -351,25 +351,22 @@ export class SubtitlesWidget { if (top && bottom) { this.votSubtitlesContainer.style.top = `${y - this.containerRect.y}px`; + } else if (!top) { + this.votSubtitlesContainer.style.top = `${0}px`; } else { - if (!top) { - this.votSubtitlesContainer.style.top = `${0}px`; - } else { - this.votSubtitlesContainer.style.top = `${ - this.containerRect.height - this.subtitlesContainerRect.height - }px`; - } + this.votSubtitlesContainer.style.top = `${ + this.containerRect.height - this.subtitlesContainerRect.height + }px`; } + if (left && right) { this.votSubtitlesContainer.style.left = `${x - this.containerRect.x}px`; + } else if (!left) { + this.votSubtitlesContainer.style.left = `${0}px`; } else { - if (!left) { - this.votSubtitlesContainer.style.left = `${0}px`; - } else { - this.votSubtitlesContainer.style.left = `${ - this.containerRect.width - this.subtitlesContainerRect.width - }px`; - } + this.votSubtitlesContainer.style.left = `${ + this.containerRect.width - this.subtitlesContainerRect.width + }px`; } } } @@ -459,22 +456,20 @@ export class SubtitlesWidget { : "" }>${token.text}`; } - } else { - if (line.text.length > this.maxLength) { - let chunks = line.text.match(this.maxLengthRegexp); - let chunkDurationMs = line.durationMs / chunks.length; - for (let i = 0; i < chunks.length; i++) { - if ( - line.startMs + chunkDurationMs * i < time && - time < line.startMs + chunkDurationMs * (i + 1) - ) { - content = chunks[i].trim(); - break; - } + } else if (line.text.length > this.maxLength) { + let chunks = line.text.match(this.maxLengthRegexp); + let chunkDurationMs = line.durationMs / chunks.length; + for (let i = 0; i < chunks.length; i++) { + if ( + line.startMs + chunkDurationMs * i < time && + time < line.startMs + chunkDurationMs * (i + 1) + ) { + content = chunks[i].trim(); + break; } - } else { - content = line.text; } + } else { + content = line.text; } } if (content !== this.lastContent) { diff --git a/src/utils/utils.js b/src/utils/utils.js index fb33dde2..b799aad4 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -223,6 +223,8 @@ const getVideoId = (service, video) => { return url.searchParams.get("id"); case "weverse": return url.pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[0]; + case "newgrounds": + return url.pathname.match(/([^/]+)\/(view)\/([^/]+)/)?.[0]; default: return false; }