Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问哪里可以下载到历史版本 ?android 5.x 系统一来无法更新 二来 就是配置界面弹不出了 谢谢 #646

Open
rick999999 opened this issue Jan 10, 2025 · 5 comments

Comments

@rick999999
Copy link

No description provided.

@rick999999 rick999999 changed the title 请问哪里可以下载到历史版本 ?android 请问哪里可以下载到历史版本 ?android 5.x 系统一来无法更新 二来 就是配置界面弹不出了 谢谢 Jan 10, 2025
@polywock
Copy link
Owner

polywock commented Jan 11, 2025

Hello! Which version and which Android browser? I'll try to provide it.

@rick999999
Copy link
Author

Hello! Which version and which Android browser? I'll try to provide it.

kiwi browser 93.0.4577.22
android 5.1

thx in advace!

@polywock
Copy link
Owner

polywock commented Jan 11, 2025

Here's the Manifest V2 version (from May of 2024). Not sure which version worked last.

old.zip.

Normally you can load old versions through the raw files but Kiwi browser may not support that.

If changing browsers is acceptable, you can try installing the latest version of Global Speed on Edge android or Firefox for android. Both are confirmed to be working.

@rick999999
Copy link
Author

Here's the Manifest V2 version (from May of 2024). Not sure which version worked last.

old.zip.

Normally you can load old versions through the raw files but Kiwi browser may not support that.

If changing browsers is acceptable, you can try installing the latest version of Global Speed on Edge android or Firefox for android. Both are confirmed to be working.

it works ! thx
but it also pops up a following warning
"Unrecognized feature: 'picture-in-picture'.

上下文

_generated_background_page.html

堆叠追踪

background.js:1 (匿名函数)

1

!function(){var e={3465:function(e,t,n){e=n.nmd(e);var a="lodash_hash_undefined",r=9007199254740991,i="[object Arguments]",o="[object Boolean]",s="[object Date]",l="[object Function]",u="[object GeneratorFunction]",d="[object Map]",c="[object Number]",h="[object Object]",f="[object Promise]",p="[object RegExp]",v="[object Set]",m="[object String]",b="[object Symbol]",g="[object WeakMap]",y="[object ArrayBuffer]",w="[object DataView]",S="[object Float32Array]",M="[object Float64Array]",x="[object Int8Array]",I="[object Int16Array]",P="[object Int32Array]",T="[object Uint8Array]",E="[object Uint8ClampedArray]",k="[object Uint16Array]",j="[object Uint32Array]",A=/\w*$/,C=/^[object .+?Constructor]$/,=/^(?:0|[1-9]\d*)$/,F={};F[i]=F["[object Array]"]=F[y]=F[w]=F[o]=F[s]=F[S]=F[M]=F[x]=F[I]=F[P]=F[d]=F[c]=F[h]=F[p]=F[v]=F[m]=F[b]=F[T]=F[E]=F[k]=F[j]=!0,F["[object Error]"]=F[l]=F[g]=!1;var D="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,O="object"==typeof self&&self&&self.Object===Object&&self,N=D||O||Function("return this")(),L=t&&!t.nodeType&&t,G=L&&e&&!e.nodeType&&e,R=G&&G.exports===L;function B(e,t){return e.set(t[0],t[1]),e}function U(e,t){return e.add(t),e}function $(e,t,n,a){var r=-1,i=e?e.length:0;for(a&&i&&(n=e[++r]);++r<i;)n=t(n,e[r],r,e);return n}function V(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e,a){n[++t]=[a,e]})),n}function q(e,t){return function(n){return e(t(n))}}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var z,H=Array.prototype,X=Function.prototype,Y=Object.prototype,J=N["core-js_shared"],Q=(z=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)1."+z:"",Z=X.toString,ee=Y.hasOwnProperty,te=Y.toString,ne=RegExp("^"+Z.call(ee).replace(/[\^$.+?()[]{}|]/g,"\$&").replace(/hasOwnProperty|(function).?(?=\()| for .+?(?=\])/g,"$1.?")+"$"),ae=R?N.Buffer:void 0,re=N.Symbol,ie=N.Uint8Array,oe=q(Object.getPrototypeOf,Object),se=Object.create,le=Y.propertyIsEnumerable,ue=H.splice,de=Object.getOwnPropertySymbols,ce=ae?ae.isBuffer:void 0,he=q(Object.keys,Object),fe=Ne(N,"DataView"),pe=Ne(N,"Map"),ve=Ne(N,"Promise"),me=Ne(N,"Set"),be=Ne(N,"WeakMap"),ge=Ne(Object,"create"),ye=Ue(fe),we=Ue(pe),Se=Ue(ve),Me=Ue(me),xe=Ue(be),Ie=re?re.prototype:void 0,Pe=Ie?Ie.valueOf:void 0;function Te(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}function Ee(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}function ke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}function je(e){this.data=new Ee(e)}function Ae(e,t,n){var a=e[t];ee.call(e,t)&&$e(a,n)&&(void 0!==n||t in e)||(e[t]=n)}function Ce(e,t){for(var n=e.length;n--;)if($e(e[n][0],t))return n;return-1}function _e(e,t,n,a,r,f,g){var C;if(a&&(C=f?a(e,r,f,g):a(e)),void 0!==C)return C;if(!ze(e))return e;var =Ve(e);if(){if(C=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,a=e.length;for(t||(t=Array(a));++n<a;)t[n]=e[n];return t}(e,C)}else{var D=Ge(e),O=D==l||D==u;if(qe(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(D==h||D==i||O&&!f){if(V(e))return f?e:{};if(C=function(e){return"function"!=typeof e.constructor||Be(e)?{}:ze(t=oe(e))?se(t):{};var t}(O?{}:e),!t)return function(e,t){return De(e,Le(e),t)}(e,function(e,t){return e&&De(t,He(t),e)}(C,e))}else{if(!F[D])return f?e:{};C=function(e,t,n,a){var r,i=e.constructor;switch(t){case y:return Fe(e);case o:case s:return new i(+e);case w:return function(e,t){var n=t?Fe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,a);case S:case M:case x:case I:case P:case T:case E:case k:case j:return function(e,t){var n=t?Fe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,a);case d:return function(e,t,n){return $(t?n(K(e),!0):K(e),B,new e.constructor)}(e,a,n);case c:case m:return new i(e);case p:return function(e){var t=new e.constructor(e.source,A.exec(e));return t.lastIndex=e.lastIndex,t}(e);case v:return function(e,t,n){return $(t?n(W(e),!0):W(e),U,new e.constructor)}(e,a,n);case b:return r=e,Pe?Object(Pe.call(r)):{}}}(e,D,e,t)}}g||(g=new je);var N=g.get(e);if(N)return N;if(g.set(e,C),!)var L=n?function(e){return function(e,t,n){var a=t(e);return Ve(e)?a:function(e,t){for(var n=-1,a=t.length,r=e.length;++n<a;)e[r+n]=t[n];return e}(a,n(e))}(e,He,Le)}(e):He(e);return function(e,t){for(var n=-1,a=e?e.length:0;++n<a&&!1!==t(e[n],n););}(L||e,(function(r,i){L&&(r=e[i=r]),Ae(C,i,e(r,t,n,a,i,e,g))})),C}function Fe(e){var t=new e.constructor(e.byteLength);return new ie(t).set(new ie(e)),t}function De(e,t,n,a){n||(n={});for(var r=-1,i=t.length;++r<i;){var o=t[r],s=a?a(n[o],e[o],o,n,e):void 0;Ae(n,o,void 0===s?e[o]:s)}return n}function Oe(e,t){var n,a,r=e.data;return("string"==(a=typeof(n=t))||"number"==a||"symbol"==a||"boolean"==a?"proto"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function Ne(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ze(e)||(t=e,Q&&Q in t))&&(We(e)||V(e)?ne:C).test(Ue(e));var t}(n)?n:void 0}Te.prototype.clear=function(){this.data=ge?ge(null):{}},Te.prototype.delete=function(e){return this.has(e)&&delete this.data[e]},Te.prototype.get=function(e){var t=this.data;if(ge){var n=t[e];return n===a?void 0:n}return ee.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.data;return ge?void 0!==t[e]:ee.call(t,e)},Te.prototype.set=function(e,t){return this.data[e]=ge&&void 0===t?a:t,this},Ee.prototype.clear=function(){this.data=[]},Ee.prototype.delete=function(e){var t=this.data,n=Ce(t,e);return!(n<0||(n==t.length-1?t.pop():ue.call(t,n,1),0))},Ee.prototype.get=function(e){var t=this.data,n=Ce(t,e);return n<0?void 0:t[n][1]},Ee.prototype.has=function(e){return Ce(this.data,e)>-1},Ee.prototype.set=function(e,t){var n=this.data,a=Ce(n,e);return a<0?n.push([e,t]):n[a][1]=t,this},ke.prototype.clear=function(){this.data={hash:new Te,map:new(pe||Ee),string:new Te}},ke.prototype.delete=function(e){return Oe(this,e).delete(e)},ke.prototype.get=function(e){return Oe(this,e).get(e)},ke.prototype.has=function(e){return Oe(this,e).has(e)},ke.prototype.set=function(e,t){return Oe(this,e).set(e,t),this},je.prototype.clear=function(){this.data=new Ee},je.prototype.delete=function(e){return this.data.delete(e)},je.prototype.get=function(e){return this.data.get(e)},je.prototype.has=function(e){return this.data.has(e)},je.prototype.set=function(e,t){var n=this.data;if(n instanceof Ee){var a=n.data;if(!pe||a.length<199)return a.push([e,t]),this;n=this.data=new ke(a)}return n.set(e,t),this};var Le=de?q(de,Object):function(){return[]},Ge=function(e){return te.call(e)};function Re(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||.test(e))&&e>-1&&e%1==0&&e<t}function Be(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function Ue(e){if(null!=e){try{return Z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function $e(e,t){return e===t||e!=e&&t!=t}(fe&&Ge(new fe(new ArrayBuffer(1)))!=w||pe&&Ge(new pe)!=d||ve&&Ge(ve.resolve())!=f||me&&Ge(new me)!=v||be&&Ge(new be)!=g)&&(Ge=function(e){var t=te.call(e),n=t==h?e.constructor:void 0,a=n?Ue(n):void 0;if(a)switch(a){case ye:return w;case we:return d;case Se:return f;case Me:return v;case xe:return g}return t});var Ve=Array.isArray;function Ke(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!We(e)}var qe=ce||function(){return!1};function We(e){var t=ze(e)?te.call(e):"";return t==l||t==u}function ze(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function He(e){return Ke(e)?function(e,t){var n=Ve(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Ke(e)}(e)&&ee.call(e,"callee")&&(!le.call(e,"callee")||te.call(e)==i)}(e)?function(e,t){for(var n=-1,a=Array(e);++n<e;)a[n]=t(n);return a}(e.length,String):[],a=n.length,r=!!a;for(var o in e)!t&&!ee.call(e,o)||r&&("length"==o||Re(o,a))||n.push(o);return n}(e):function(e){if(!Be(e))return he(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return _e(e,!0,!0)}},1296:function(e,t,n){var a=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=l||u||Function("return this")(),c=Object.prototype.toString,h=Math.max,f=Math.min,p=function(){return d.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=i.test(e);return n||o.test(e)?s(e.slice(2),n?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var a,r,i,o,s,l,u=0,d=!1,c=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=a,i=r;return a=r=void 0,u=t,o=e.apply(i,n)}function y(e){var n=e-l;return void 0===l||n>=t||n<0||c&&e-u>=i}function w(){var e=p();if(y(e))return S(e);s=setTimeout(w,function(e){var n=t-(e-l);return c?f(n,i-(e-u)):n}(e))}function S(e){return s=void 0,b&&a?g(e):(a=r=void 0,o)}function M(){var e=p(),n=y(e);if(a=arguments,r=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(w,t),d?g(e):o}(l);if(c)return s=setTimeout(w,t),g(l)}return void 0===s&&(s=setTimeout(w,t)),o}return t=m(t)||0,v(n)&&(d=!!n.leading,i=(c="maxWait"in n)?h(m(n.maxWait)||0,t):i,b="trailing"in n?!!n.trailing:b),M.cancel=function(){void 0!==s&&clearTimeout(s),u=0,a=l=r=s=void 0},M.flush=function(){return void 0===s?o:S(p())},M}}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var i=t[a]={id:a,loaded:!1,exports:{}};return ea,i.loaded=!0,i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";const e={sepia:{min:0,max:1,step:.1,sliderMin:0,sliderMax:1,default:0,format:e=>sepia(${e})},hueRotate:{step:8,sliderMin:-180,sliderMax:180,sliderStep:1,default:0,format:e=>hue-rotate(${e}deg)},grayscale:{min:0,max:1,step:.1,sliderMin:0,sliderMax:1,default:0,format:e=>grayscale(${e})},contrast:{min:0,step:.1,sliderMin:0,sliderMax:5,default:1,format:e=>contrast(${e})},brightness:{min:0,step:.1,sliderMin:0,sliderMax:5,sliderStep:.05,default:1,format:e=>brightness(${e})},saturate:{min:0,step:.1,sliderMin:0,sliderMax:5,sliderStep:.05,default:1,format:e=>saturate(${e})},invert:{min:0,max:1,step:.1,sliderMin:0,sliderMax:1,default:0,format:e=>invert(${e})},blur:{min:0,step:.1,sliderMin:0,sliderMax:10,sliderStep:.1,default:0,format:e=>blur(${e}px)},opacity:{min:0,max:1,step:.1,sliderMin:0,sliderMax:1,default:1,format:e=>opacity(${e})},scaleX:{isTransform:!0,step:.1,sliderMin:-1,sliderMax:3,sliderStep:.04,default:1,format:e=>scaleX(${e})},scaleY:{isTransform:!0,step:.1,sliderMin:-1,sliderMax:3,sliderStep:.04,default:1,format:e=>scaleY(${e})},translateX:{isTransform:!0,step:1,sliderMin:-300,sliderMax:300,sliderStep:5,default:0,format:e=>translateX(${e}px)},translateY:{isTransform:!0,step:1,sliderMin:-300,sliderMax:300,sliderStep:5,default:0,format:e=>translateY(${e}px)},rotateX:{isTransform:!0,step:1,sliderMin:-180,sliderMax:180,sliderStep:1,default:0,format:e=>rotateX(${e}deg)},rotateY:{isTransform:!0,step:1,sliderMin:-180,sliderMax:180,sliderStep:1,default:0,format:e=>rotateY(${e}deg)},rotateZ:{isTransform:!0,step:1,sliderMin:-180,sliderMax:180,sliderStep:1,default:0,format:e=>rotateZ(${e}deg)}};var t,a,r;const i=!(!("requestPictureInPicture"in HTMLVideoElement.prototype)||!("pictureInPictureElement"in Document.prototype)),o=(null===(t=document.featurePolicy)||void 0===t||t.allowsFeature("picture-in-picture"),null===(a=window.CSS)||void 0===a||null===(r=a.supports)||void 0===r?void 0:r.call(a,"backdrop-filter: invert(1)")),s=["speed","lastSpeed","enabled","enabledLatestViaPopup","elementFx","backdropFx","monoOutput","audioFx","audioFxAlt","audioPan"];let l,u,d;function c(e,t,n){let a=n;return null!=e&&(a=Math.max(e,a)),null!=t&&(a=Math.min(t,a)),a}function h(e,t){const n=10**t;return Math.round(en)/n}function f(){return Math.ceil(1e10*Math.random()).toString()}function p(){var e;return d=null!==(e=d)&&void 0!==e?e:navigator.userAgent.includes("Firefox/"),d}!function(e){e[e.SET=1]="SET",e[e.ADD=2]="ADD",e[e.CYCLE=3]="CYCLE"}(l||(l={})),function(e){e[e.FX=1]="FX",e[e.AUDIO_FX=2]="AUDIO_FX",e[e.MEDIA=3]="MEDIA",e[e.MISC=4]="MISC"}(u||(u={}));let v={nothing:{group:u.MISC,generate:()=>({id:f(),command:"nothing",enabled:!0,greedy:!0})},runCode:{group:u.MISC,valueType:"modalString",generate:()=>({id:f(),command:"runCode",enabled:!0,greedy:!0,valueString:"// code here"})},openUrl:{group:u.MISC,valueType:"string",generate:()=>({id:f(),command:"openUrl",enabled:!0,greedy:!0,valueString:"https://www.google.com/"})},adjustSpeed:{valueType:"adjustMode",hasFeedback:!0,valueMin:.07,valueMax:16,valueStep:.1,valueDefault:1,generate:()=>({id:f(),command:"adjustSpeed",enabled:!0,greedy:!0,adjustMode:l.SET})},speedChangesPitch:{valueType:"state",hasFeedback:!0,requiresMedia:!0,generate:()=>({id:f(),command:"speedChangesPitch",enabled:!0,greedy:!0,valueState:"toggle"})},setPin:{valueType:"state",hasFeedback:!0,generate:()=>({id:f(),command:"setPin",enabled:!0,greedy:!0,valueState:"toggle"})},setState:{valueType:"state",hasFeedback:!0,generate:()=>({id:f(),command:"setState",enabled:!0,greedy:!0,valueState:"toggle"})},seek:{group:u.MEDIA,valueType:"number",requiresMedia:!0,noNull:!0,hasFeedback:!0,generate:()=>({id:f(),command:"seek",enabled:!0,greedy:!0,valueNumber:10})},setPause:{group:u.MEDIA,valueType:"state",requiresMedia:!0,hasFeedback:!0,generate:()=>({id:f(),command:"setPause",enabled:!0,greedy:!0,valueState:"toggle"})},setMute:{group:u.MEDIA,hasFeedback:!0,valueType:"state",requiresMedia:!0,generate:()=>({id:f(),command:"setMute",enabled:!0,greedy:!0,valueState:"toggle"})},adjustVolume:{group:u.MEDIA,hasFeedback:!0,valueType:"number",requiresMedia:!0,valueDefault:.05,generate:()=>({id:f(),command:"adjustVolume",enabled:!0,greedy:!0})},setMark:{group:u.MEDIA,hasFeedback:!0,valueType:"string",requiresMedia:!0,generate:()=>({id:f(),command:"setMark",enabled:!0,greedy:!0,valueString:"mark1"})},seekMark:{group:u.MEDIA,hasFeedback:!0,valueType:"string",requiresMedia:!0,generate:()=>({id:f(),command:"seekMark",enabled:!0,greedy:!0,valueString:"mark1"})},toggleLoop:{group:u.MEDIA,hasFeedback:!0,valueType:"string",requiresMedia:!0,generate:()=>({id:f(),command:"toggleLoop",enabled:!0,greedy:!0,valueString:"mark1"})},fullscreen:{group:u.MEDIA,requiresVideo:!0,generate:()=>({id:f(),command:"fullscreen",enabled:!0,greedy:!0})},PiP:{group:u.MEDIA,valueType:"state",requiresVideo:!0,requiresPiPApi:!0,generate:()=>({id:f(),command:"PiP",enabled:!0,greedy:!0,valueState:"toggle"})},setFx:{group:u.FX,hasFeedback:!0,withFilterTarget:!0,valueType:"state",generate:()=>({id:f(),command:"setFx",enabled:!0,greedy:!0,valueState:"toggle",filterTarget:"element"})},resetFx:{group:u.FX,hasFeedback:!0,withFilterTarget:!0,generate:()=>({id:f(),command:"resetFx",enabled:!0,greedy:!0,filterTarget:"element"})},flipFx:{group:u.FX,hasFeedback:!0,generate:()=>({id:f(),command:"flipFx",enabled:!0,greedy:!0})},adjustFilter:{group:u.FX,hasFeedback:!0,valueType:"adjustMode",withFilterOption:!0,withFilterTarget:!0,generate:()=>({id:f(),command:"adjustFilter",filterOption:"hueRotate",enabled:!0,greedy:!0,filterTarget:"element",adjustMode:l.ADD})},adjustGain:{group:u.AUDIO_FX,hasFeedback:!0,valueType:"adjustMode",requiresTabCapture:!0,valueMin:0,valueMax:16,valueStep:.05,valueDefault:1,generate:()=>({id:f(),command:"adjustGain",enabled:!0,greedy:!0,adjustMode:l.ADD})},adjustPitch:{group:u.AUDIO_FX,hasFeedback:!0,valueType:"adjustMode",requiresTabCapture:!0,valueMin:-36,valueMax:36,valueStep:1,valueDefault:0,generate:()=>({id:f(),command:"adjustPitch",enabled:!0,greedy:!0,adjustMode:l.ADD})},adjustDelay:{group:u.AUDIO_FX,hasFeedback:!0,valueType:"adjustMode",requiresTabCapture:!0,valueMin:0,valueMax:60,valueStep:.05,valueDefault:0,generate:()=>({id:f(),command:"adjustDelay",enabled:!0,greedy:!0,adjustMode:l.ADD})},adjustPan:{group:u.AUDIO_FX,hasFeedback:!0,valueType:"adjustMode",requiresTabCapture:!0,valueMin:-1,valueMax:1,valueStep:.05,valueDefault:0,generate:()=>({id:f(),command:"adjustPan",enabled:!0,greedy:!0,adjustMode:l.ADD})},tabCapture:{group:u.AUDIO_FX,hasFeedback:!0,valueType:"state",requiresTabCapture:!0,generate:()=>({id:f(),command:"tabCapture",enabled:!0,greedy:!0,valueState:"toggle",global:!0})}};function m(){let e=[{...v.adjustSpeed.generate(),key:"KeyA",adjustMode:l.ADD,valueNumberAlt:-.1},{...v.adjustSpeed.generate(),key:"KeyS",valueNumber:1,adjustMode:l.SET},{...v.adjustSpeed.generate(),key:"KeyD",adjustMode:l.ADD,valueNumberAlt:.1,spacing:1},{...v.setPin.generate(),key:"KeyQ"},{...v.setState.generate(),key:{code:"KeyQ",shiftKey:!0},spacing:2},{...v.seek.generate(),key:"KeyZ",enabled:!0,valueNumber:-5},{...v.seek.generate(),key:"KeyX",enabled:!0,valueNumber:10,spacing:1},{...v.seek.generate(),key:{shiftKey:!0,code:"KeyZ"},enabled:!0,valueNumber:-.041,valueBool3:!0},{...v.seek.generate(),key:{shiftKey:!0,code:"KeyX"},enabled:!0,valueNumber:.041,spacing:1,valueBool3:!0},{...v.fullscreen.generate(),key:{shiftKey:!0,code:"KeyF"},enabled:!0,valueBool:!0,spacing:2},{...v.setMark.generate(),key:{shiftKey:!0,code:"KeyW"},valueString:"mark1"},{...v.seekMark.generate(),key:"KeyW",valueString:"mark1"},{...v.toggleLoop.generate(),key:"KeyR",valueString:"mark1",spacing:2,enabled:!1}];return o&&e.push({...v.adjustFilter.generate(),key:{code:"KeyE"},filterOption:"invert",filterTarget:"both",adjustMode:l.CYCLE,enabled:!1,valueCycle:[0,1]},{...v.adjustFilter.generate(),key:{code:"KeyE",shiftKey:!0},filterOption:"grayscale",filterTarget:"backdrop",adjustMode:l.CYCLE,enabled:!1,valueCycle:[0,1],spacing:2}),e}const b=function(e,t){let n=[],a=!1;for(let t of e)a&&(n.push(null),a=!1),n=[...n,...t],a=!0;return n}(function(e,t){let n=new Map;for(let r of e){var a;const e=t(r),i=null!==(a=n.get(e))&&void 0!==a?a:[];i.push(r),n.set(e,i)}const r=[];return n.forEach((e=>{r.push(e)})),r}(Object.entries(v).filter((e=>!e[1].requiresTabCapture||chrome.tabCapture)).filter((e=>!e[1].requiresPiPApi||i)).map((e=>{let[t,n]=e;return[t,n.group]})),(e=>e[1])).map((e=>e.map((e=>e[0])))));function g(){return{version:10,firstUse:(new Date).getTime(),keybinds:m(),common:{speed:1,enabled:!0,backdropFx:y(),elementFx:y(),audioFx:w()}}}function y(){const[t,n]=function(e,t){let n=[],a=[];return e.forEach((e=>{(e=>{let[t,n]=e;return n.isTransform})(e)?n.push(e):a.push(e)})),[n,a]}(Object.entries(e));return{filters:n.map((e=>{let[t,n]=e;return{name:t,value:n.default}})),transforms:t.map((e=>{let[t,n]=e;return{name:t,value:n.default}}))}}function w(){return{pitch:0,volume:1,delay:0,eq:{enabled:!1,factor:1,values:Array(10).fill(0)}}}function S(e){var t,n;const a=g();return!e||e.version<7?a:(7===e.version&&(e=function(e){var t;return e.version=8,null===(t=e.rules)||void 0===t||t.forEach((e=>{e.condition={parts:[{type:e.matchType||"CONTAINS",id:f(),value:e.match||""}]},delete e.matchType,delete e.match})),e}(e)),8===e.version&&(e=function(e){var t;return e.version=9,null===(t=e.keybinds)||void 0===t||t.forEach((e=>{"seek"===e.command&&(e.valueBool2=!0)})),e}(e)),9===e.version&&(e=function(e){var t;return e.version=10,null===(t=e.keybinds)||void 0===t||t.forEach((e=>{"preservePitch"===e.command&&(e.command="speedChangesPitch",e.valueState="on"===e.valueState?"off":"off"===e.valueState?"on":"toggle")})),e}(e)),null!==(t=e.keybinds)&&void 0!==t&&t.length&&(e.keybinds=e.keybinds.filter((e=>b.includes(e.command)))),(null===(n=e)||void 0===n?void 0:n.version)!==a.version?a:e)}function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function x(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==M(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==M(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===M(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.freeze([{name:"1965",values:[-6,-17.2,-6,0,-3.6,9.2,1.2,9.2,3.6,-5.2]},{name:"1965 - Part 2",values:[-18,-14.4,0,0,-3.6,9.2,1.2,9.2,3.6,-5.2]},{name:"Lo-Fidelity",values:[-15.1,-9.4,0,2.3,-2,4.3,4.3,-2.3,-4.6,-8.9]},{name:"Musical Presence",values:[0,0,0,0,0,2.5,5,2.5,0,0]},{name:"Notch Every Two Octaves",values:[-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99]},{name:"Rattle The Trunk",values:[17.99,17.99,9,0,0,0,0,0,0,0]},{name:"Simple Bass Cut",values:[-4,-3,-2,-2,-2,0,0,0,0,0]},{name:"Simple Bass Lift",values:[6,6,3,3,3,0,0,0,0,0]},{name:"Simple High Cut",values:[0,0,0,0,0,-2,-2,-3,-3,-3]},{name:"Simple High Lift",values:[0,0,0,0,0,1,2,2,3,4]},{name:"Vocal Presence - Boost",values:[0,0,0,0,0,0,6.5,0,0,0]},{name:"Vocal Presence - Cut",values:[0,0,0,0,0,0,-6.5,0,0,0]}]),Object.freeze([{name:"20 Band Classic V",values:[5,6,3.54,.59,-.48,-2.5,-5,-7,-8,-8,-7,-5,-3,-2.5,-1,2,3,4,5,4.02]},{name:"Bowed String",values:[0,0,-1.2,-1.6,-2.4,-2.8,-1.6,-1.6,-1.6,0,0,0,0,0,2.4,3.6,5.6,0,0,0]},{name:"Bright and Punchy",values:[-3,3,6,4.5,3,1.5,0,0,0,0,0,0,0,1,2,3,4,4,4,4]},{name:"Cymbal Shimmer",values:[0,0,0,0,0,0,0,0,0,0,0,-.1,-.3,-.5,-.4,.2,1.3,2.6,3.6,4]},{name:"Dark and Dull",values:[-6,-4,-2,0,0,0,0,0,0,0,0,0,0,-3,-6,-9,-12,-15,-18,-18]},{name:"Destination - Car Stereo",values:[-4,-2,0,3,4,3,1.5,0,-1,-2,-2,-1,0,1,2,3,4,2,0,-3]},{name:"Heavy Guitar",values:[0,-.2,-.1,1,1.9,1.6,.4,-.5,-1.1,-2.2,-3.6,-3.9,-2.9,-1.6,-.5,.1,.1,0,0,0]},{name:"Liven up dead samples",values:[0,0,0,0,0,0,0,0,0,0,0,.1,.1,-.2,-.6,.5,3,3.9,1.5,-.4]},{name:"Notch Every Octave",values:[-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99]},{name:"Possible Bass",values:[0,0,5.2,6,3.2,0,-11.6,-5.2,-4,-4,0,3.2,4.8,0,0,0,-3.2,-7.2,-10.8,-14]},{name:"Sloping High End Boost",values:[0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,6,7,8,8]},{name:"Sloping Low End Boost",values:[8,8,8,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0]},{name:"Tinny and Brittle",values:[-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,0,0,0,1,3.52,6,6,3,1]},{name:"Vocal Magic (breath)",values:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,.1,-.1,-.5,2,2.5,1]}]),Object.freeze([{name:"Bass - Increased Clarity",values:[-4,-3.4,-1.9,-.3,.6,.6,.2,-.3,-1.2,-1.5,1.4,2.9,.7,.2,.8,.5,0,-2,-.5,-.5,-.4,-.2,0,0,-.2,-.4,-.4,-.3,-.1,0]},{name:"Background Vocal",values:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-.2,-.3,-.4,-.4,-3,-6,-3,0,0,-.1,0,0,0]},{name:"Classic V",values:[3,2.5,1.3,.2,-.4,-.5,-.2,.2,.4,.3,-.3,-1.6,-3.4,-5.7,-8.2,-10.2,-10.9,-9.8,-7.4,-4.5,-2.3,-.9,-.1,0,-.2,-.3,.2,1.3,2.5,3]},{name:"Destination - Home Theater",values:[4.5,6,7.5,7.5,5,3,1.5,.5,0,-.5,-1.5,-3,-5,-3,-1.5,0,1.5,3,3,3,1.5,0,0,3,6,7.5,7.5,6,3,0]},{name:"Drums",values:[0,0,0,0,0,0,0,-.1,.3,.4,-2,-2.8,0,.6,-.2,-.1,0,-.2,-.3,-.5,-.4,-.1,0,0,.2,-.3,-.1,2.5,2.1,0]},{name:"Generic Attack Booster",values:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,-.1,-.1,-.1,.2,.6,1.3,2,2.8,3.1,2.7,1.8,.6,-.2,-.3,-.1,0]},{name:"Generic Mud Removal",values:[0,0,0,0,-.1,-.3,-.7,-1.5,-2.4,-3,-2.8,-2,-.8,0,.4,.3,0,-.1,-.1,0,0,0,0,0,0,0,0,0,0,0]},{name:"Gentle Hi Boost",values:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.5,1.5,3,5,5,3,1.5,.5]},{name:"Gentle Hi Cut",values:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-.5,-1.5,-3,-5,-5,-3,-1.5,-.5]},{name:"Gentle Low Boost",values:[0,.5,1.5,3,5,3,1.5,.5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{name:"Gentle Low Cut",values:[0,-.5,-1.5,-3,-5,-3,-1.5,-.5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{name:"Gentle Mid Boost",values:[0,0,0,0,0,0,0,0,0,0,0,0,0,.5,1.5,3,5,5,3,1.5,.5,0,0,0,0,0,0,0,0,0]},{name:"Gentle Mid Cut",values:[0,0,0,0,0,0,0,0,0,0,0,0,0,-.5,-1.5,-3,-5,-5,-3,-1.5,-.5,0,0,0,0,0,0,0,0,0]},{name:"Guitar - Increases Attack",values:[0,0,0,0,-1.5,-4,-2,0,0,0,0,0,0,0,0,0,0,-.2,-.3,-.4,2,0,-.1,0,0,0,-.1,0,0,0]},{name:"Keyboards - Bright and Clear",values:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-.2,-.3,-.4,-.4,2,5,2.5,0,0,-.1,0,0,0]},{name:"Kick - Less Boxy, more Attack",values:[0,0,0,0,0,0,0,0,0,0,-2.5,-6,-2.5,0,0,0,0,0,0,0,0,2,5,2,0,0,0,0,0,0]},{name:"Lead Vocal - Clarity",values:[0,0,0,0,0,0,0,0,-3,0,0,0,0,0,0,0,0,-.2,-.3,-.4,-.4,0,2,0,0,4,-.1,0,0,0]},{name:"Notch Every 2/3 Octave",values:[-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99,-18,17.99]},{name:"RIAA De-Emphasis",values:[18.3,17.6,16.7,15.6,14.2,12.8,11.3,9.6,8,6.5,5,3.7,2.6,1.6,.7,0,-.7,-1.6,-2.6,-3.7,-5.1,-6.6,-8.2,-10,-11.9,-13.8,-15.7,-17.7,-19.7,-20]},{name:"Snare - Increase Snap",values:[0,-.1,-.2,-.1,.5,1.3,1.9,1.9,1.3,.4,-.1,-.3,-.2,0,.1,0,0,-.1,-.2,-.4,-.6,-.7,-.5,1.5,2,0,0,0,.9,0]},{name:"cymbals sans gong",values:[-8,-6.5,-3.3,-.4,.4,-.5,-2.3,-3.7,-4.5,-4.4,-3.7,-2.3,-.9,.1,.5,.3,0,-.3,-.5,-.5,-.4,-.2,0,.1,0,0,-.1,0,0,0]}]);var I=n(1296),P=n.n(I);function T(e){return new Promise(((t,n)=>{chrome.tabs.query(e,(e=>{chrome.runtime.lastError?n(chrome.runtime.lastError.message):t(e||[])}))}))}async function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;for(let a=0;a<Math.max(0,null!=t?t:3);a++){a&&await new Promise(((e,t)=>setTimeout((()=>e(!0)),null!=n?n:100)));try{return await T(e)}catch(e){}}}function k(e,t){var n,a;return(null==e?void 0:e.tabId)===(null==t?void 0:t.tabId)&&(null!==(n=null==e?void 0:e.frameId)&&void 0!==n?n:null)===(null!==(a=null==t?void 0:t.frameId)&&void 0!==a?a:null)}function j(e){if(e.tab)return{tabId:e.tab.id,frameId:e.frameId,windowId:e.tab.windowId}}function A(e){return e.toFixed(2).slice(0,4)}function C(e){const t={};return"backdrop"!==e&&"both"!==e||(t.backdrop=!0),"element"!==e&&"both"!==e||(t.element=!0),t}function (e,t,n,a){chrome.tabs.sendMessage(n,{type:"APPLY_MEDIA_EVENT",event:e,key:t},null==a?void 0:{frameId:a})}function F(e,t,n){chrome.tabs.sendMessage(t,e,null==n?void 0:{frameId:n})}function D(e,t,n){let a=!1,r=!1;return t.parts.forEach((t=>{if(t.disabled)return;let n=!1;if("STARTS_WITH"===t.type)n=e.startsWith(t.value);else if("CONTAINS"===t.type)n=e.includes(t.value);else{if("REGEX"!==t.type)return;try{n=new RegExp(t.value).test(e)}catch(e){}}(t.inverse?n:!n)?a=!0:r=!0})),r||a?(!t.matchAll||!a)&&r:n}var O=n(3465),N=n.n(O);class L{constructor(e){var t;this.state=e,x(this,"subs",new Set),x(this,"pins",[]),x(this,"frozen",new Set),x(this,"reload",(e=>{try{let t=S(e);t.version===g().version&&(this.state=t,this.pins=[],this.subs.forEach((e=>{e.handleUpdate(this.get(e.selector,e.tabId))})),this.persist())}catch(e){return!1}return!0})),x(this,"get",((e,t)=>{const n={};for(let r in e){const e=r;if("isPinned"===e)n.isPinned=!!this.pins.find((e=>e.tabId===t));else if(s.includes(e)){var a;const r=(null===(a=this.pins.find((e=>e.tabId===t)))||void 0===a?void 0:a.ctx)||this.state.common;n[e]=r[e]}else n[e]=this.state[e]}return e.enabled&&this.get({superDisable:!0}).superDisable&&(n.enabled=!1),n})),x(this,"set",((e,t,n,a)=>{n&&(this.state=g(),this.pins=[]);const r={real:[],contextCommon:[],contextCurrent:[],isPinnedCurrent:!1};let i;const o=e=>{if(!e&&i)return;const n=this.pins.find((e=>e.tabId===t));i={pin:n,ctx:(null==n?void 0:n.ctx)||this.state.common}};if("isPinned"in e&&null!=t){if(o(),e.isPinned&&!i.pin){r.isPinnedCurrent=!0,this.pins=this.pins||[];let e=this.state.common;var l,u;a&&this.state.inheritPreviousContext&&(e=null!==(l=null===(u=this.pins.find((e=>e.tabId===a)))||void 0===u?void 0:u.ctx)&&void 0!==l?l:this.state.common),this.pins.push({tabId:t,ctx:N()(e)}),o(!0)}!e.isPinned&&i.pin&&(r.isPinnedCurrent=!0,this.pins=(this.pins||[]).filter((e=>e.tabId!==t)),o(!0))}for(let[t,n]of Object.entries(e)){let a=t;if("isPinned"!==a)if(s.includes(a)){let n=t;o(),i.ctx[n]!==e[n]&&(i.ctx[n]=e[n],r[i.pin?"contextCurrent":"contextCommon"].push(n))}else n!==this.state[a]&&(this.state[a]=n,r.real.push(a))}return this.persistThrottled(),r})),x(this,"set",((e,t)=>{const n=Array.isArray(e)?e:[e];let a=!1;const r=new Set;for(let e of n){const{override:t,tabId:n,ignoreSub:i,overDefault:o}=e,s=this.set(t,n,o,e.inheritContextFromTabId);(s.contextCommon.includes("speed")||s.real.includes("freePitch"))&&(a=!0);for(let e of this.subs){if(i&&e.id===i)continue;const t=!!this.pins.find((t=>t.tabId===e.tabId));(o||G(e,t,n,s))&&r.add(e)}}if(t?r.forEach((e=>this.frozen.add(e))):r.forEach((e=>{e.handleUpdate(this.get(e.selector,e.tabId))})),a)try{this.updateBackgroundSpeed()}catch(e){}})),x(this,"unfreeze",(()=>{this.frozen.forEach((e=>{e.handleUpdate(this.get(e.selector,e.tabId))})),this.frozen.clear()})),x(this,"updateBackgroundSpeed",(()=>{window.globalMedia.scopes.forEach((e=>{var t,n,a,r;const i=this.get({enabled:!0,speed:!0,isPinned:!0,freePitch:!0},null===(t=e.tabInfo)||void 0===t?void 0:t.tabId);i.enabled&&!i.isPinned&&F({type:"BG_SPEED_OVERRIDE",speed:null!==(n=i.speed)&&void 0!==n?n:1,freePitch:i.freePitch},null===(a=e.tabInfo)||void 0===a?void 0:a.tabId,null===(r=e.tabInfo)||void 0===r?void 0:r.frameId)}))})),x(this,"persist",(()=>{chrome.storage.local.set({config:this.state})})),x(this,"persistThrottled",P()(this.persist,5e3,{trailing:!0,maxWait:15e3})),x(this,"handlePortConnect",(e=>{if(!e.name.startsWith("subscribe "))return;const{selector:t,tabId:n,wait:a,maxWait:r,id:i}=JSON.parse(e.name.slice(10)),o={selector:t,tabId:n,handleUpdate:P()((t=>{e.postMessage(t)}),null!=a?a:0,{leading:!0,trailing:!0,...null==r?{}:{maxWait:r}}),id:i};this.subs.add(o),e.onDisconnect.addListener((e=>{this.subs.delete(o)}))})),x(this,"handleMessage",((e,t,n)=>{"PUSH_VIEW"===e.type?(this.set(e.init),n(!0)):"FETCH_VIEW"===e.type?n(this.get(e.selector,e.tabId)):"GET_STATE"===e.type?n(this.state):"RELOAD_STATE"===e.type&&n(this.reload(e.state))})),chrome.runtime.onMessage.addListener(this.handleMessage),chrome.runtime.onConnect.addListener(this.handlePortConnect),null===(t=chrome.runtime.onSuspend)||void 0===t||t.addListener((()=>{this.persistThrottled.flush()}))}}function G(e,t,n,a){const r=e.tabId===n||-1===e.tabId;if(e.selector.enabled&&a.real.includes("superDisable"))return!0;if(e.selector.isPinned&&r&&a.isPinnedCurrent)return!0;for(let n in e.selector){const i=n;if(s.includes(i)){if(r&&a.isPinnedCurrent)return!0;if((t||-1===e.tabId)&&a.contextCurrent.includes(i)&&r)return!0;if((!t||-1===e.tabId)&&a.contextCommon.includes(i))return!0}else if(a.real.includes(i))return!0}}function R(e,t){return window.globalState?Promise.resolve(window.globalState.get(e,t)):new Promise(((n,a)=>{window.globalState?n(window.globalState.get(e,t)):chrome.runtime.sendMessage({type:"FETCH_VIEW",selector:e,tabId:t},(e=>{chrome.runtime.lastError?a(chrome.runtime.lastError):n(e)}))}))}function B(e,t,n,a,r,i){e=function(e){return Object.fromEntries(Object.entries(e).filter((e=>{let[t,n]=e;return n})))}(e);const o={cbs:a?new Set([a]):new Set,subId:f()},s=(e,t)=>{o.view=e,o.cbs.forEach((n=>{n(e,t)}))};if(window.globalState){const n=P()(s,null!=r?r:0,{trailing:!0,leading:!0,...null==i?{}:{maxWait:i}}),a={selector:e,tabId:t,handleUpdate:n,id:o.subId};window.globalState.subs.add(a),o.release=()=>{o.released||(o.released=!0,o.cbs.clear(),window.globalState.subs.delete(a))}}else{const n=chrome.runtime.connect({name:subscribe ${JSON.stringify({selector:e,tabId:t,id:o.subId,wait:r,maxWait:i})}});n.onMessage.addListener((e=>{s(e)})),o.release=()=>{o.released||(o.released=!0,o.cbs.clear(),n.disconnect())}}return o.push=n=>{const a={};var r,i;Object.keys(e).forEach((e=>{a[e]=n[e]})),s(a,!1),r={override:a,tabId:t,ignoreSub:o.subId},null!==(i=window.globalState)&&void 0!==i&&i.set?(window.globalState.set(r),Promise.resolve()):new Promise(((e,t)=>{const n={};for(let[e,t]of Object.entries(r.override||{}))n[e]=null!=t?t:null;r.override=n,chrome.runtime.sendMessage({type:"PUSH_VIEW",init:r},(n=>{chrome.runtime.lastError?t(chrome.runtime.lastError):e()}))}))},n&&R(e,t).then((e=>{s(e,!0)})),o}class U{constructor(){x(this,"client",B({enabled:!0,isPinned:!0,hideBadge:!0},-1,!0,(()=>{this.updateBadgesDeb()}),100)),x(this,"speedClient",B({speed:!0},-1,!0,(()=>{this.updateBadgesDeb()}),1e3)),x(this,"updateBadgesDeb",P()($,500,{trailing:!0,leading:!0})),chrome.tabs.onActivated.addListener((e=>{window.previousTabId=window.currentTabId,window.currentTabId=e.tabId,this.updateBadgesDeb()})),chrome.tabs.onUpdated.addListener(((e,t)=>{t.status&&this.updateBadgesDeb()}))}}async function $(){const e=await E({active:!0,currentWindow:void 0});if(null==e||!e.length)return;const t=e.map((e=>e.id)),n=await R({speed:!0,enabled:!0,hideBadge:!0});n.hideBadge||!n.enabled?chrome.browserAction.setBadgeText({text:"",tabId:null}):(chrome.browserAction.setBadgeBackgroundColor({color:"#a64646"}),chrome.browserAction.setBadgeText({text:A(n.speed),tabId:null})),chrome.browserAction.setIcon({path:n.enabled?V:K});for(let e of t){const t=await R({speed:!0,enabled:!0,isPinned:!0},e);n.hideBadge||!t.enabled?chrome.browserAction.setBadgeText({text:"",tabId:e}):(chrome.browserAction.setBadgeBackgroundColor({color:t.isPinned?"#44a":"#a64646",tabId:e}),chrome.browserAction.setBadgeText({text:A(t.speed),tabId:e})),chrome.browserAction.setIcon({path:t.enabled?V:K,tabId:e})}}const V={128:"icons/128.png"},K={128:"icons/128g.png"};class q{constructor(){x(this,"ports",[]),x(this,"disconnectListeners",new Set),x(this,"handleDisconnect",(e=>{this.ports=this.ports.filter((t=>t!==e)),this.disconnectListeners.forEach((t=>{t(e)}))})),chrome.runtime.onConnect.addListener((async e=>{this.ports.push(e),e.onDisconnect.addListener(this.handleDisconnect)}))}}const W=["en","es","it","ja","ko","pt_BR","ru","tr","vi","zh_CN","zh_TW"];class z{constructor(e){var t=this;this.lang=e,x(this,"gsm",void 0),x(this,"loadedLang",void 0),x(this,"client",B({language:!0},null,!0,(e=>{this.loadLocale(e.language)}))),x(this,"loadLocale",(async function(e){t.loadedLang&&t.loadedLang.lang==e||(t.gsm=await async function(e){let t=await new Promise(((e,t)=>{chrome.i18n.getAcceptLanguages((t=>e(t)))})),n=[e,...navigator.languages,...t,"en"].map((e=>(e||"").replace("-","").toLowerCase()));for(let e of n){const t=W.findIndex((t=>t.toLowerCase()===e));if(!(t<0))try{return H(W[t])}catch(e){}}return H("en")}(e),t.loadedLang={lang:e},window.gsm=t.gsm)})),this.loadLocale(e),chrome.runtime.onMessage.addListener(((e,t,n)=>{"REQUEST_GSM"===e.type&&n(this.gsm)}))}}async function H(e){const t=await fetch(chrome.runtime.getURL(locales/${e}.json));return await t.json()}function X(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Y(e){return!!e&&!!e[Oe]}function J(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Ne}(e)||Array.isArray(e)||!!e[De]||!!(null===(t=e.constructor)||void 0===t?void 0:t[De])||ne(e)||ae(e))}function Q(e,t,n){void 0===n&&(n=!1),0===Z(e)?(n?Object.keys:Le)(e).forEach((function(a){n&&"symbol"==typeof a||t(a,e[a],e)})):e.forEach((function(n,a){return t(a,n,e)}))}function Z(e){var t=e[Oe];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:ne(e)?2:ae(e)?3:0}function ee(e,t){return 2===Z(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function te(e,t,n){var a=Z(e);2===a?e.set(t,n):3===a?(e.delete(t),e.add(n)):e[t]=n}function ne(e){return Ae&&e instanceof Map}function ae(e){return Ce&&e instanceof Set}function re(e){return e.o||e.t}function ie(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Ge(e);delete t[Oe];for(var n=Le(t),a=0;a<n.length;a++){var r=n[a],i=t[r];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[r]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[r]})}return Object.create(Object.getPrototypeOf(e),t)}function oe(e,t){return void 0===t&&(t=!1),le(e)||Y(e)||!J(e)||(Z(e)>1&&(e.set=e.add=e.clear=e.delete=se),Object.freeze(e),t&&Q(e,(function(e,t){return oe(t,!0)}),!0)),e}function se(){X(2)}function le(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function ue(e){var t=Re[e];return t||X(18,e),t}function de(){return ke}function ce(e,t){t&&(ue("Patches"),e.u=[],e.s=[],e.v=t)}function he(e){fe(e),e.p.forEach(ve),e.p=null}function fe(e){e===ke&&(ke=e.l)}function pe(e){return ke={p:[],l:ke,h:e,m:!0,:0}}function ve(e){var t=e[Oe];0===t.i||1===t.i?t.j():t.O=!0}function me(e,t){t.=t.p.length;var n=t.p[0],a=void 0!==e&&e!==n;return t.h.g||ue("ES5").S(t,e,a),a?(n[Oe].P&&(he(t),X(4)),J(e)&&(e=be(t,e),t.l||ye(t,e)),t.u&&ue("Patches").M(n[Oe].t,e,t.u,t.s)):e=be(t,n,[]),he(t),t.u&&t.v(t.u,t.s),e!==Fe?e:void 0}function be(e,t,n){if(le(t))return t;var a=t[Oe];if(!a)return Q(t,(function(r,i){return ge(e,a,t,r,i,n)}),!0),t;if(a.A!==e)return t;if(!a.P)return ye(e,a.t,!0),a.t;if(!a.I){a.I=!0,a.A.--;var r=4===a.i||5===a.i?a.o=ie(a.k):a.o;Q(3===a.i?new Set(r):r,(function(t,i){return ge(e,a,r,t,i,n)})),ye(e,r,!1),n&&e.u&&ue("Patches").R(a,n,e.u,e.s)}return a.o}function ge(e,t,n,a,r,i){if(Y(r)){var o=be(e,r,i&&t&&3!==t.i&&!ee(t.D,a)?i.concat(a):void 0);if(te(n,a,o),!Y(o))return;e.m=!1}if(J(r)&&!le(r)){if(!e.h.F&&e.<1)return;be(e,r),t&&t.A.l||ye(e,r)}}function ye(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&oe(t,n)}function we(e,t){var n=e[Oe];return(n?re(n):e)[t]}function Se(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var a=Object.getOwnPropertyDescriptor(n,t);if(a)return a;n=Object.getPrototypeOf(n)}}function Me(e){e.P||(e.P=!0,e.l&&Me(e.l))}function xe(e){e.o||(e.o=ie(e.t))}function Ie(e,t,n){var a=ne(t)?ue("MapSet").N(t,n):ae(t)?ue("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),a={i:n?1:0,A:t?t.A:de(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},r=a,i=Be;n&&(r=[a],i=Ue);var o=Proxy.revocable(r,i),s=o.revoke,l=o.proxy;return a.k=l,a.j=s,l}(t,n):ue("ES5").J(t,n);return(n?n.A:de()).p.push(a),a}function Pe(e){return Y(e)||X(22,e),function e(t){if(!J(t))return t;var n,a=t[Oe],r=Z(t);if(a){if(!a.P&&(a.i<4||!ue("ES5").K(a)))return a.t;a.I=!0,n=Te(t,r),a.I=!1}else n=Te(t,r);return Q(n,(function(t,r){a&&function(e,t){return 2===Z(e)?e.get(t):e[t]}(a.t,t)===r||te(n,t,e(r))})),3===r?new Set(n):n}(e)}function Te(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ie(e)}var Ee,ke,je="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Ae="undefined"!=typeof Map,Ce="undefined"!=typeof Set,e="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Fe=je?Symbol.for("immer-nothing"):((Ee={})["immer-nothing"]=!0,Ee),De=je?Symbol.for("immer-draftable"):"$immer_draftable",Oe=je?Symbol.for("immer-state"):"$immer_state",Ne=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),Le="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ge=Object.getOwnPropertyDescriptors||function(e){var t={};return Le(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Re={},Be={get:function(e,t){if(t===Oe)return e;var n=re(e);if(!ee(n,t))return function(e,t,n){var a,r=Se(t,n);return r?"value"in r?r.value:null===(a=r.get)||void 0===a?void 0:a.call(e.k):void 0}(e,n,t);var a=n[t];return e.I||!J(a)?a:a===we(e.t,t)?(xe(e),e.o[t]=Ie(e.A.h,a,e)):a},has:function(e,t){return t in re(e)},ownKeys:function(e){return Reflect.ownKeys(re(e))},set:function(e,t,n){var a=Se(re(e),t);if(null==a?void 0:a.set)return a.set.call(e.k,n),!0;if(!e.P){var r=we(re(e),t),i=null==r?void 0:r[Oe];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||ee(e.t,t)))return!0;xe(e),Me(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==we(e.t,t)||t in e.t?(e.D[t]=!1,xe(e),Me(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=re(e),a=Reflect.getOwnPropertyDescriptor(n,t);return a?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:a.enumerable,value:n[t]}:a},defineProperty:function(){X(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){X(12)}},Ue={};Q(Be,(function(e,t){Ue[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Ue.deleteProperty=function(e,t){return Ue.set.call(this,e,t,void 0)},Ue.set=function(e,t,n){return Be.set.call(this,e[0],t,n,e[0])};var $e=function(){function e(e){var t=this;this.g=e,this.F=!0,this.produce=function(e,n,a){if("function"==typeof e&&"function"!=typeof n){var r=n;n=e;var i=t;return function(e){var t=this;void 0===e&&(e=r);for(var a=arguments.length,o=Array(a>1?a-1:0),s=1;s<a;s++)o[s-1]=arguments[s];return i.produce(e,(function(e){var a;return(a=n).call.apply(a,[t,e].concat(o))}))}}var o;if("function"!=typeof n&&X(6),void 0!==a&&"function"!=typeof a&&X(7),J(e)){var s=pe(t),l=Ie(t,e,void 0),u=!0;try{o=n(l),u=!1}finally{u?he(s):fe(s)}return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(e){return ce(s,a),me(e,s)}),(function(e){throw he(s),e})):(ce(s,a),me(o,s))}if(!e||"object"!=typeof e){if(void 0===(o=n(e))&&(o=e),o===Fe&&(o=void 0),t.F&&oe(o,!0),a){var d=[],c=[];ue("Patches").M(e,o,d,c),a(d,c)}return o}X(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var a=arguments.length,r=Array(a>1?a-1:0),i=1;i<a;i++)r[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(r))}))};var a,r,i=t.produce(e,n,(function(e,t){a=e,r=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,a,r]})):[i,a,r]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){J(e)||X(8),Y(e)&&(e=Pe(e));var t=pe(this),n=Ie(this,e,void 0);return n[Oe].C=!0,fe(t),n},t.finishDraft=function(e,t){var n=(e&&e[Oe]).A;return ce(n,t),me(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!e&&X(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var a=t[n];if(0===a.path.length&&"replace"===a.op){e=a.value;break}}n>-1&&(t=t.slice(n+1));var r=ue("Patches").$;return Y(e)?r(e,t):this.produce(e,(function(e){return r(e,t)}))},e}(),Ve=new $e,Ke=Ve.produce,qe=(Ve.produceWithPatches.bind(Ve),Ve.setAutoFreeze.bind(Ve),Ve.setUseProxies.bind(Ve),Ve.applyPatches.bind(Ve),Ve.createDraft.bind(Ve),Ve.finishDraft.bind(Ve),Ke);let We;async function ze(e,t){const n=e=>window.globalState.get(e,null==t?void 0:t.tabId),a=e=>{t&&!n({hideIndicator:!0}).hideIndicator&&F({type:"SHOW_INDICATOR",opts:e,requiresFocus:null==t.frameId},t.tabId,t.frameId)};let r,i=e=>{r&&(e,r.key,r.tabInfo.tabId,r.tabInfo.frameId)};for(let l of e){let e,u=v[l.command];var o;if(u.requiresMedia||u.requiresVideo)if(r&&u.requiresVideo&&!r.isVideo&&(r=void 0),r||(r=null!==(o=window.globalMedia.getAuto(t,u.requiresVideo))&&void 0!==o?o:null),!r)continue;const d=()=>{var t,n;if(e)return e.value;const a=(null!==(t=l.cycleIncrement)&&void 0!==t?t:0)+1;if(!((null===(n=l.valueCycle)||void 0===n?void 0:n.length)>0))throw Error("No items in cycle");return e={value:l.valueCycle[a%l.valueCycle.length],nextIncrement:a},e.value},c=e=>{null!=(null==t?void 0:t.tabId)&&(null==e?void 0:e.toFixed(6))!==u.valueDefault.toFixed(6)&&window.captureMgr.captureTab(t.tabId).catch((e=>{}))},h={};try{if(Hel.command,e){var s;const t=window.globalState.get({keybinds:!0}).keybinds||[];h.keybinds=qe(null!==(s=h.keybinds)&&void 0!==s?s:t,(t=>{t.find((e=>e.id===l.id)).cycleIncrement=e.nextIncrement}))}Object.keys(h).length&&window.globalState.set({override:h,tabId:null==t?void 0:t.tabId},!0)}catch(e){break}}window.globalState.unfreeze()}const He={nothing:async e=>{},runCode:async e=>{const{kb:t,tabInfo:n}=e;n&&F({type:"INJECT_SCRIPT",requiresFocus:null==n.frameId,code:t.valueString},n.tabId,n.frameId)},openUrl:async e=>{const{kb:t}=e;var n;chrome.tabs.create?chrome.tabs.create({url:t.valueString}):chrome.runtime.sendMessage&&(n=t.valueString,new Promise(((e,t)=>{chrome.runtime.sendMessage({type:"REQUEST_CREATE_TAB",url:n},(t=>{e(t)}))})))},setState:async e=>{const{kb:t,show:n,override:a,fetch:r}=e,i=r({enabled:!0});a.enabledLatestViaPopup=!1,"off"===t.valueState||"toggle"===t.valueState&&i.enabled?a.enabled=!1:a.enabled=!0,n({text: ${window.gsm.token[a.enabled?"on":"off"]},icons:["power"]})},setPin:async e=>{const{kb:t,tabInfo:n,override:a,show:r,fetch:i}=e;if(!n)return;const o=i({speed:!0,isPinned:!0});let s=o.speed;"off"===t.valueState||"toggle"===t.valueState&&o.isPinned?(a.isPinned=!1,o.isPinned&&(s=window.globalState.state.common.speed)):a.isPinned=!0,r({text:a.isPinned?"local":"global",small:!0})},adjustSpeed:async e=>{const{kb:t,show:n,fetch:a,override:r,commandInfo:i,getCycleValue:o}=e,s=a({speed:!0,isPinned:!0,keybinds:!0,lastSpeed:!0});let u;if(t.adjustMode===l.CYCLE)u=o();else if(t.adjustMode===l.SET){var d;u=null!==(d=t.valueNumber)&&void 0!==d?d:i.valueDefault}else if(t.adjustMode===l.ADD){var f,p;u=(null!==(f=s.speed)&&void 0!==f?f:1)+(null!==(p=t.valueNumberAlt)&&void 0!==p?p:i.valueStep)}if(null==u||isNaN(u))throw Error("Value not NULL or NaN.");var v;u=c(i.valueMin,i.valueMax,h(u,3)),t.adjustMode===l.SET&&u===s.speed&&null!=s.lastSpeed?r.speed=s.lastSpeed:r.speed=u,r.lastSpeed=s.speed,n({text:(v=r.speed,v.toFixed(2))})},speedChangesPitch:async e=>{const{kb:t,show:n,override:a,fetch:r}=e,i=r({freePitch:!0});"off"===t.valueState||"toggle"===t.valueState&&i.freePitch?a.freePitch=!1:a.freePitch=!0,n({text: ${window.gsm.token[a.freePitch?"on":"off"]},icons:["speedChangesPitch"]})},seek:async e=>{var t;const{kb:n,media:a,applyToMedia:r,show:i,fetch:o}=e;if(n.valueBool4){var s;const e=null!==(s=n.valueNumberAlt)&&void 0!==s?s:50;return i({text:${null==e?void 0:e.toFixed(0)}%}),void r({type:"SEEK",percent:!0,value:e/100,fast:n.valueBool2,autoPause:n.valueBool3})}const{showNetSeek:l}=o({showNetSeek:!0}),u=null!==(t=o({speed:!0}).speed)&&void 0!==t?t:1,d=n.valueBool?n.valueNumberu:n.valueNumber;let c= ${Math.abs(h(d,2))};if(l&&Math.abs(d)>=1){const e=(new Date).getTime();let t=0;We&&We.key===a.key&&We.time+1e3>e&&(t=We.net),t+=d,We={key:a.key,time:e,net:t},c= ${t<0?"-":""}${function(e){const t=e/60,n=t/60;return n>=100?"":n>1?${Math.floor(n)}:${Math.floor(t%60).toString().padStart(2,"0")}:${Math.floor(e%60).toString().padStart(2,"0")}:${Math.floor(t).toString().padStart(1,"0")}:${Math.floor(e%60).toString().padStart(2,"0")}}(Math.abs(t))}}n.valueNumber>=0?i({icons:["forward"],text:c}):i({icons:["backward"],text:c}),r({type:"SEEK",value:d,relative:!0,fast:n.valueBool2,autoPause:n.valueBool3})},setPause:async e=>{const{kb:t,media:n,applyToMedia:a,show:r}=e;"off"===t.valueState||"toggle"===t.valueState&&n.paused?r({icons:["play"]}):r({icons:["pause"]}),a({type:"PAUSE",state:t.valueState})},setMute:async e=>{const{kb:t,media:n,applyToMedia:a,show:r}=e;"off"===t.valueState||"toggle"===t.valueState&&n.muted?r({text:${Math.round(100*n.volume)}%}):r({text:"0%"}),a({type:"MUTE",state:t.valueState})},adjustVolume:async e=>{var t;const{kb:n,media:a,applyToMedia:r,show:i,commandInfo:o}=e,s=null!==(t=n.valueNumber)&&void 0!==t?t:o.valueDefault;i({text:${(100*c(0,1,a.volume+s)).toFixed(Math.abs(s)>=.01?0:1)}%}),r({type:"SET_VOLUME",value:s,relative:!0})},setMark:async e=>{var t;const{kb:n,applyToMedia:a,show:r}=e;let i= ${n.valueString},o=["bookmark"];switch(null===(t=n.valueString)||void 0===t?void 0:t.toLowerCase()){case"::nameless":i=" nameless";break;case"::nameless-prev":i=" prev",o=["arrowLeft"];break;case"::nameless-next":i=" next",o=["arrowRight"]}r({icons:o,text:i,small:!0}),a({type:"SET_MARK",key:n.valueString})},seekMark:async e=>{const{media:t,kb:n,applyToMedia:a,show:r}=e;r({icons:t.marks.includes(n.valueString)?["arrowRight"]:["bookmark"],text: ${n.valueString},small:!0}),a({type:"SEEK_MARK",key:n.valueString,fast:n.valueBool2})},toggleLoop:async e=>{const{media:t,kb:n,applyToMedia:a,show:r}=e;if(t.marks.includes(n.valueString))return r({icons:["loop"],text:" "+(t.inLoop?"off":"on"),small:!0}),void a({type:"TOGGLE_LOOP",key:n.valueString});r({icons:["loop"],text: ${n.valueString}???,small:!0})},fullscreen:async e=>{const{kb:t,applyToMedia:n}=e;n({type:"FULLSCREEN",direct:t.valueBool})},PiP:async e=>{const{kb:t,applyToMedia:n}=e;n({type:"PIP",state:t.valueState})},setFx:async e=>{const{kb:t,fetch:n,override:a,show:r}=e;let i=n({elementFx:!0,backdropFx:!0});const o=C(t.filterTarget);if(o.element){const e="on"===t.valueState||"toggle"===t.valueState&&!i.elementFx.enabled;a.elementFx={...i.elementFx,enabled:e}}if(o.backdrop){const e="on"===t.valueState||"toggle"===t.valueState&&!i.backdropFx.enabled;a.backdropFx={...i.backdropFx,enabled:e}}r({icons:["fx","power"]})},resetFx:async e=>{const{kb:t,show:n,override:a}=e,r=C(t.filterTarget);r.element&&(a.elementFx=y()),r.backdrop&&(a.backdropFx=y()),n({icons:["fx","reset"]})},flipFx:async e=>{const{fetch:t,show:n,override:a}=e,r=t({backdropFx:!0,elementFx:!0});a.elementFx=r.backdropFx,a.backdropFx=r.elementFx,n({icons:["swap"]})},adjustFilter:async t=>{const{kb:n,show:a,fetch:r,override:i,getCycleValue:o}=t,{element:s,backdrop:u}=C(n.filterTarget),d=e[n.filterOption];if(!d)throw Error("No filter type provided.");let h;var f;if(n.adjustMode===l.CYCLE)h={relative:!1,value:null!==(f=o())&&void 0!==f?f:d.default};else if(n.adjustMode===l.SET){var p;h={relative:!1,value:null!==(p=n.valueNumber)&&void 0!==p?p:d.default}}else if(n.adjustMode===l.ADD){var v;h={relative:!0,value:null!==(v=n.valueNumberAlt)&&void 0!==v?v:d.step}}const m=new Set;Object.assign(i,qe(r({elementFx:!0,backdropFx:!0}),(e=>{if(s){e.elementFx.enabled=!0;const t=e.elementFx[d.isTransform?"transforms":"filters"].find((e=>e.name===n.filterOption));t.value=c(d.min,d.max,h.relative?t.value+h.value:h.value),m.add(t.value)}if(u){e.backdropFx.enabled=!0;const t=e.backdropFx[d.isTransform?"transforms":"filters"].find((e=>e.name===n.filterOption));t.value=c(d.min,d.max,h.relative?t.value+h.value:h.value),m.add(t.value)}}))),a({text:Array.from(m).map((e=>e.toFixed(2))).join("\n")})},adjustPitch:async e=>{Xe(e,"pitch",(e=>${e.toFixed(1)}))},adjustGain:async e=>{Xe(e,"volume",(e=>${(100*e).toFixed(0)}%))},adjustDelay:async e=>{Xe(e,"delay",(e=>${e.toFixed(2)}))},adjustPan:async e=>{!function(e){const{kb:t,fetch:n,show:a,override:r,getCycleValue:i,commandInfo:o}=e;let{audioPan:s}=n({audioPan:!0}),u=null!=s?s:0;if(t.adjustMode===l.CYCLE)u=i();else if(t.adjustMode===l.SET){var d;u=null!==(d=t.valueNumber)&&void 0!==d?d:o.valueDefault}else if(t.adjustMode===l.ADD){var f;u+=null!==(f=t.valueNumberAlt)&&void 0!==f?f:o.valueStep}if(u=c(o.valueMin,o.valueMax,h(u,3)),null==u||isNaN(u))throw Error("Value not NULL or NaN.");r.audioPan=u,e.autoCapture(u),a({text: ${u},icons:["pan"]})}(e)},tabCapture:async e=>{const{kb:t,show:n,tabInfo:a}=e;if(!a)return;let r="off";try{"off"===t.valueState?window.captureMgr.releaseTab(a.tabId):"on"===t.valueState?(await window.captureMgr.captureTab(a.tabId),r="on"):(await window.captureMgr.handleToggleTab(a.tabId),window.captureMgr.infos.find((e=>e.tabId===a.tabId))&&(r="on"))}catch(e){return}n({text:r})}};function Xe(e,t,n){const{kb:a,fetch:r,show:i,override:o,getCycleValue:s,commandInfo:u}=e;let d,h,{audioFx:f,audioFxAlt:p}=r({audioFx:!0,audioFxAlt:!0});if(f=f||w(),a.adjustMode===l.CYCLE)d=s(),h=d;else if(a.adjustMode===l.SET){var v;d=null!==(v=a.valueNumber)&&void 0!==v?v:u.valueDefault,h=d}else if(a.adjustMode===l.ADD){var m,b;d=f[t]+(null!==(m=a.valueNumberAlt)&&void 0!==m?m:u.valueStep),h=(p||f)[t]+(null!==(b=a.valueNumberAlt)&&void 0!==b?b:u.valueStep)}let g=new Set;if(null==d||isNaN(d))throw Error("Value not NULL or NaN.");d=c(u.valueMin,u.valueMax,d),o.audioFx={...f,[t]:d},g.add(n(d)),e.autoCapture(o.audioFx[t]),p&&!isNaN(h)&&null!=h&&(h=c(u.valueMin,u.valueMax,h),o.audioFxAlt={...p,[t]:h},g.add(n(h)),e.autoCapture(o.audioFxAlt[t])),i({text:Array.from(g).join(", ")})}class Ye{constructor(){x(this,"scopes",[]),x(this,"watchPorts",new Set),x(this,"canopyPorts",new Set),x(this,"latestPin",void 0),x(this,"pushVolume",void 0),x(this,"handleMessage",((e,t,n)=>{if("MEDIA_SET_PIN"===e.type)this.latestPin=e.value,this.sendUpdate(),n(!0);else if("MEDIA_PUSH_SCOPE"===e.type){const a=e.value;if(a.tabInfo=j(t),!a.tabInfo)return n(!0);a.pushTime=(new Date).getTime();const r=this.scopes.findIndex((e=>k(e.tabInfo,a.tabInfo)));-1===r?this.scopes.push(a):this.scopes.splice(r,1,a),this.sendUpdate(),n(!0)}else"MEDIA_PUSH_SOUND"===e.type&&(this.pushVolume=isNaN(e.volume)?.5:e.volume)})),x(this,"sendUpdate",(()=>{if(this.watchPorts.size){var e;const t={scopes:this.scopes,pinned:null===(e=this.latestPin)||void 0===e?void 0:e.key};this.watchPorts.forEach((e=>{e.postMessage(t)}))}})),x(this,"getAuto",((e,t)=>{var n,a;const r=window.globalState.get({ignorePiP:!0}).ignorePiP;let i=function(e){const t=[];return null==e||e.forEach((e=>{var n;null===(n=e.media)||void 0===n||n.forEach((n=>{t.push({...n,...e})}))})),t}(this.scopes).filter((e=>e.readyState));i=t?i.filter((e=>e.videoSize)):i;const o=i.find((e=>{var t;return e.key===(null===(t=this.latestPin)||void 0===t?void 0:t.key)}));if(o)return o;i.sort(((e,t)=>t.pushTime-e.pushTime));const s=i.find((e=>e.pipMode));if(!r&&s)return s;if(!e)return s||void 0;if(i=i.filter((t=>t.tabInfo.tabId===e.tabId)),!i.length)return s||void 0;let l,u=null===(n=i.filter((e=>null!=e.intersectionRatio)).sort(((e,t)=>t.intersectionRatio-e.intersectionRatio))[0])||void 0===n?void 0:n.intersectionRatio;return i.forEach((t=>{let n=0;k(t.tabInfo,e)&&0!==e.frameId&&(n+=32),t.intersectionRatio>.05&&t.intersectionRatio===u&&(n+=16),(t.infinity||t.duration>=1800)&&(n+=8),t.duration>=600&&(n+=4),t.duration>=180&&(n+=2),t.duration>=60&&(n+=1),t.isVideo&&"www.spotify.com"!==location.hostname&&!t.isConnected&&(n=-1),(!l||n>l.score||n===l.score&&(t.infinity?60:t.duration)>l.info.duration)&&(l={info:t,score:n})})),null===(a=l)||void 0===a?void 0:a.info})),chrome.runtime.onMessage.addListener(this.handleMessage),chrome.runtime.onConnect.addListener((e=>{"MEDIA_WATCH"===e.name?(this.watchPorts.add(e),this.sendUpdate(),e.onDisconnect.addListener((()=>{this.watchPorts.delete(e)}))):"MEDIA_CANOPY"===e.name&&(this.canopyPorts.add(e),e.onDisconnect.addListener((()=>{this.canopyPorts.delete(e),this.scopes=this.scopes.filter((t=>!k(t.tabInfo,j(e.sender)))),this.sendUpdate()})))}))}}class Je{constructor(){x(this,"appliedRules",new Map),x(this,"client",B({rules:!0,superDisable:!0},null,!0,(e=>{this.syncListeners(e)}))),x(this,"addedCommit",!1),x(this,"addedHistory",!1),x(this,"syncListeners",(e=>{const t=e.superDisable?[]:(e.rules||[]).filter((e=>e.enabled));let n=!1,a=!1;t.length&&(n=!0,t.some((e=>!e.initialLoadOnly))&&(a=!0)),n?chrome.webNavigation.onCommitted.addListener(this.handleCommit,{url:[{schemes:["http","https"]}]}):chrome.webNavigation.onCommitted.removeListener(this.handleCommit),a?chrome.webNavigation.onHistoryStateUpdated.addListener(this.handleHistoryUpdate,{url:[{schemes:["http","https"]}]}):chrome.webNavigation.onHistoryStateUpdated.removeListener(this.handleHistoryUpdate)})),x(this,"hasAppliedRule",((e,t)=>{var n;return!(null===(n=this.appliedRules.get(e))||void 0===n||!n.has(t))})),x(this,"setAppliedRule",((e,t)=>{var n;const a=null!==(n=this.appliedRules.get(e))&&void 0!==n?n:new Set;a.add(t),this.appliedRules.set(e,a)})),x(this,"handleCommit",(e=>{this.handleNavigation(e,!0)})),x(this,"handleHistoryUpdate",(e=>{this.handleNavigation(e,!1)})),x(this,"handleNavigation",((e,t)=>{var n,a;if(e.frameId||null==e.tabId)return;const r=[];null===(n=this.client.view)||void 0===n||null===(a=n.rules)||void 0===a||a.forEach((n=>{var a;if(n.enabled&&(!n.initialLoadOnly||t)&&(n.strict||!this.hasAppliedRule(n.id,e.tabId))&&D(e.url,n.condition,!1))if(this.setAppliedRule(n.id,e.tabId),"STATE"!==n.type)if("SPEED"!==n.type)if("FX"!==n.type)"JS"!==n.type||setTimeout((()=>{n.overrideJs&&chrome.tabs.sendMessage(e.tabId,{type:"RUN_JS",value:n.overrideJs},{frameId:e.frameId})}),p()&&t?500:100);else{var i;let e=null!==(i=n.overrideFx)&&void 0!==i?i:{elementFx:y(),backdropFx:y()};r.push({...e,isPinned:!0})}else r.push({speed:null!==(a=n.overrideSpeed)&&void 0!==a?a:1,isPinned:!0});else r.push({enabled:n.overrideEnabled,isPinned:!0})})),r.length&&window.globalState.set(r.map((t=>({override:t,tabId:e.tabId}))))}))}}const Qe=.05,Ze=.1;class et{constructor(e){this.ctx=e,x(this,"input",void 0),x(this,"output",void 0),x(this,"mod1Gain",void 0),x(this,"mod2Gain",void 0),x(this,"mod3Gain",void 0),x(this,"mod4Gain",void 0),x(this,"modGain1",void 0),x(this,"modGain2",void 0),x(this,"mod1",void 0),x(this,"mod2",void 0),x(this,"mod3",void 0),x(this,"mod4",void 0),x(this,"fade1",void 0),x(this,"fade2",void 0),x(this,"release",(()=>{this.fade1.stop(),this.fade1.stop(),this.mod1.stop(),this.mod2.stop(),this.mod3.stop(),this.mod4.stop(),this.input.disconnect(),this.output.disconnect(),et.releaseCached()})),x(this,"setDelay",(e=>{this.modGain1.gain.setTargetAtTime(.5e,this.ctx.currentTime,.01),this.modGain2.gain.setTargetAtTime(.5e,this.ctx.currentTime,.01)})),x(this,"setPitchOffset",(e=>{var t;t=e,(e=Math.pow(2,1+1/12t)-2)>0?(this.mod1Gain.gain.value=0,this.mod2Gain.gain.value=0,this.mod3Gain.gain.value=1,this.mod4Gain.gain.value=1):(this.mod1Gain.gain.value=1,this.mod2Gain.gain.value=1,this.mod3Gain.gain.value=0,this.mod4Gain.gain.value=0),this.setDelay(.1Math.abs(e))}));const t=et.getCache(e);this.input=e.createGain(),this.output=e.createGain(),this.mod1=e.createBufferSource(),this.mod2=e.createBufferSource(),this.mod3=e.createBufferSource(),this.mod4=e.createBufferSource(),this.mod1.buffer=t.down,this.mod2.buffer=t.down,this.mod3.buffer=t.up,this.mod4.buffer=t.up,this.mod1.loop=!0,this.mod2.loop=!0,this.mod3.loop=!0,this.mod4.loop=!0,this.mod1Gain=e.createGain(),this.mod2Gain=e.createGain(),this.mod3Gain=e.createGain(),this.mod3Gain.gain.value=0,this.mod4Gain=e.createGain(),this.mod4Gain.gain.value=0,this.mod1.connect(this.mod1Gain),this.mod2.connect(this.mod2Gain),this.mod3.connect(this.mod3Gain),this.mod4.connect(this.mod4Gain),this.modGain1=e.createGain(),this.modGain2=e.createGain();const n=e.createDelay(5),a=e.createDelay(5);this.mod1Gain.connect(this.modGain1),this.mod2Gain.connect(this.modGain2),this.mod3Gain.connect(this.modGain1),this.mod4Gain.connect(this.modGain2),this.modGain1.connect(n.delayTime),this.modGain2.connect(a.delayTime),this.fade1=e.createBufferSource(),this.fade2=e.createBufferSource();var r=t.fade;this.fade1.buffer=r,this.fade2.buffer=r,this.fade1.loop=!0,this.fade2.loop=!0;const i=e.createGain(),o=e.createGain();i.gain.value=0,o.gain.value=0,this.fade1.connect(i.gain),this.fade2.connect(o.gain),this.input.connect(n),this.input.connect(a),n.connect(i),a.connect(o),i.connect(this.output),o.connect(this.output);var s=e.currentTime+.05,l=s+Ze-Qe;this.mod1.start(s),this.mod2.start(l),this.mod3.start(s),this.mod4.start(l),this.fade1.start(s),this.fade2.start(l),this.setDelay(.1)}static getCache(e){return et.cached||(et.cached={down:nt(e,!1),up:nt(e,!0),fade:tt(e),references:0}),et.cached.references++,et.cached}static releaseCached(){et.cached&&(et.cached.references--,et.cached.references<=0&&delete et.cached)}}function tt(e){for(var t=Zee.sampleRate,n=t+(Ze-2Qe)e.sampleRate,a=e.createBuffer(1,n,e.sampleRate),r=a.getChannelData(0),i=Qee.sampleRate,o=i,s=t-i,l=0;l<t;++l){var u;u=l<o?Math.sqrt(l/i):l>=s?Math.sqrt(1-(l-s)/i):1,r[l]=u}for(l=t;l<n;++l)r[l]=0;return a}function nt(e,t){for(var n=Zee.sampleRate,a=n+(Ze-2*Qe)*e.sampleRate,r=e.createBuffer(1,a,e.sampleRate),i=r.getChannelData(0),o=0;o<n;++o)i[o]=t?(n-o)/a:o/n;for(o=n;o<a;++o)i[o]=0;return r}x(et,"cached",void 0);class at extends AudioWorkletNode{constructor(e){super(e,"sound-touch-processor",{channelCount:2,channelCountMode:"clamped-max"}),this.ctx=e,x(this,"release",(()=>{this.port.postMessage({type:"RELEASE"})})),x(this,"update",(e=>{this.parameters.get("semitone").value=e})),44100!==this.ctx.sampleRate&&console.warn("Audio context sample rate should be 44100.")}}x(at,"triedAddModule",!1),x(at,"addedModule",!1),x(at,"addModule",(async e=>{at.triedAddModule=!0,await e.audioWorklet.addModule("sound-touch-processor.js"),at.addedModule=!0}));class rt extends AudioWorkletNode{constructor(e){super(e,"reverse-sound-processor",{channelCount:1,channelCountMode:"explicit",processorOptions:{maxSize:(arguments.length>1&&void 0!==arguments[1]?arguments[1]:300)*e.sampleRate}}),this.ctx=e,x(this,"endedCb",void 0),x(this,"playingCb",void 0),x(this,"ended",!1),x(this,"forceEnd",(()=>{this.port.postMessage({type:"RELEASE"})})),this.port.onmessage=e=>{let{data:t}=e;var n;if("RELEASED"===t.type)this.ended=!0,null===(n=this.endedCb)||void 0===n||n.call(this);else if("PLAYING"===t.type){var a;null===(a=this.playingCb)||void 0===a||a.call(this)}}}}x(rt,"triedAddModule",!1),x(rt,"addedModule",!1),x(rt,"addModule",(async e=>{rt.triedAddModule=!0,await e.audioWorklet.addModule("reverse-sound-processor.js"),rt.addedModule=!0}));class it{constructor(){x(this,"audioCtx",void 0),x(this,"infos",[]),x(this,"initReverse",(async(e,t)=>{var n;let a=this.infos.find((t=>t.tabId===e));if(null!==(n=a)&&void 0!==n&&n.reverse)return;if(!a)try{await this.captureTab(e)}catch(e){t.disconnect()}if(a=this.infos.find((t=>t.tabId===e)),a||t.disconnect(),!rt.triedAddModule)try{await rt.addModule(this.audioCtx)}catch(e){t.disconnect()}let r=[];const i=new rt(this.audioCtx);i.playingCb=()=>{for(let t of window.globalMedia.scopes)if(t.tabInfo.tabId===e)for(let n of t.media)!n.paused&&n.volume&&(({type:"PAUSE",state:"on"},n.key,e,t.tabInfo.frameId),r.push((()=>{({type:"PAUSE",state:"off"},n.key,e,t.tabInfo.frameId)})));t.postMessage({type:"PLAYING"})},i.endedCb=()=>{t.disconnect(),o()},t.onMessage.addListener((e=>{"PLAY"===e.type&&a.outputNode.disconnect(i)}));const o=()=>{if(a.reverse){delete a.reverse,a.outputNode.connect(this.audioCtx.destination),i.disconnect();try{a.outputNode.disconnect(i)}catch(e){}i.ended||i.forceEnd(),r.forEach((e=>{e()}))}};a.reverse=o,t.onDisconnect.addListener(o),a.outputNode.disconnect(this.audioCtx.destination),a.outputNode.connect(i),i.connect(this.audioCtx.destination)})),x(this,"handleMessage",((e,t,n)=>{if("TAB_CAPTURE"===e.type){if(null==e.tabId)return n(!0);e.on?this.captureTab(e.tabId):!1===e.on?this.releaseTab(e.tabId):this.handleToggleTab(e.tabId),n(!0)}else"REQUEST_CAPTURE_STATUS"===e.type&&(chrome.runtime.sendMessage({type:"CAPTURE_STATUS",tabId:e.tabId,value:this.infos.some((t=>t.tabId===e.tabId))}),n(!0))})),x(this,"handleToggleTab",(e=>this.infos.find((t=>t.tabId===e))?(this.releaseTab(e),Promise.resolve(!0)):this.captureTab(e))),x(this,"captureTab",(async e=>{if(this.infos.find((t=>t.tabId===e)))return;let t;try{t=await new Promise(((e,t)=>{chrome.tabCapture.capture({audio:!0},(n=>{if(chrome.runtime.lastError)return t(chrome.runtime.lastError);e(n)}))}))}catch(e){return}this.audioCtx=this.audioCtx||new AudioContext({sampleRate:44100,latencyHint:0});const n=this.audioCtx.createGain();n.connect(this.audioCtx.destination);let a={tabId:e,stream:t,streamSrc:this.audioCtx.createMediaStreamSource(t),outputNode:n};this.infos.push(a),a.client=B({superDisable:!0,enabled:!0,audioFx:!0,audioFxAlt:!0,monoOutput:!0,audioPan:!0},e,!0,(e=>{this.handleChange(a,e.enabled,e.audioFx,e.audioFxAlt,e.monoOutput,e.audioPan),e.superDisable&&this.releaseTab(a.tabId)})),a.streamSrc.connect(n),chrome.runtime.sendMessage({type:"CAPTURE_STATUS",tabId:e,value:!0}),t.addEventListener("inactive",(t=>{this.releaseTab(e)}))})),x(this,"releaseTab",(e=>{var t,n,a,r;const i=this.infos.findIndex((t=>t.tabId===e));if(i<0)return;const o=this.infos[i];null===(t=o.reverse)||void 0===t||t.call(o),o.client.release(),o.stream.getAudioTracks().forEach((e=>{e.stop()})),delete o.stream,null===(n=o.client)||void 0===n||n.release(),this.infos.splice(i,1),null===(a=o.fx)||void 0===a||a.release(),delete o.fx,null===(r=o.outputNode)||void 0===r||r.disconnect(),delete o.outputNode,o.streamSrc.disconnect(),delete o.streamSrc,chrome.runtime.sendMessage({type:"CAPTURE_STATUS",tabId:e,value:!1})})),x(this,"handleChange",((e,t,n,a,r,i)=>{const{streamSrc:o}=e;o.disconnect(),e.fx=e.fx||new ot(this.audioCtx),e.fx.updateFx(t,n,a,r,i),o.connect(e.fx.input),e.fx.output.connect(e.outputNode)})),chrome.runtime.onMessage.addListener(this.handleMessage),chrome.runtime.onConnect.addListener((e=>{if(e.name.startsWith("REVERSE")){const t=JSON.parse(e.name.slice(8));if(null==(null==t?void 0:t.tabId))return;this.initReverse(t.tabId,e)}}))}}class ot{constructor(e){this.ctx=e,x(this,"input",void 0),x(this,"output",void 0),x(this,"main",void 0),x(this,"alt",void 0),x(this,"splitter",void 0),x(this,"merger",void 0),x(this,"pan",void 0),x(this,"release",(()=>{var e,t;this.estrange(),null===(e=this.main)||void 0===e||e.release(),null===(t=this.alt)||void 0===t||t.release()})),x(this,"updateFx",(async(e,t,n,a,r)=>{let i=this.input;var o,s;this.estrange(),this.main=this.main||new st(this.ctx),this.main.updateFx(e,t,!!n),e&&n?(i.channelCount=2,i.channelCountMode="explicit",this.splitter=this.splitter||this.ctx.createChannelSplitter(2),i.connect(this.splitter),this.alt=this.alt||new st(this.ctx),this.alt.updateFx(e,n),this.splitter.connect(this.main.input,0),this.splitter.connect(this.alt.input,1),this.merger=this.merger||this.ctx.createChannelMerger(2),this.main.output.connect(this.merger,void 0,0),this.alt.output.connect(this.merger,void 0,1),i=this.merger):(i.channelCountMode="max",null===(o=this.alt)||void 0===o||o.release(),delete this.alt,delete this.splitter,delete this.merger,i.connect(this.main.input),i=this.main.output),e&&r?(this.pan=this.pan||this.ctx.createStereoPanner(),this.pan.pan.value=c(-1,1,r||0),i.connect(this.pan),i=this.pan):(null===(s=this.pan)||void 0===s||s.disconnect(),delete this.pan),i.connect(this.output),i=this.output,e&&a?(i.channelCount=1,i.channelCountMode="clamped-max"):i.channelCountMode="max"})),x(this,"estrange",(()=>{var e,t,n,a,r;this.input.disconnect(),null===(e=this.main)||void 0===e||e.output.disconnect(),null===(t=this.alt)||void 0===t||t.output.disconnect(),null===(n=this.splitter)||void 0===n||n.disconnect(),null===(a=this.merger)||void 0===a||a.disconnect(),null===(r=this.pan)||void 0===r||r.disconnect()})),this.input=e.createGain(),this.output=e.createGain()}}class st{constructor(e){this.ctx=e,x(this,"input",void 0),x(this,"output",void 0),x(this,"filterNodes",void 0),x(this,"jungle",void 0),x(this,"soundTouchNode",void 0),x(this,"delayNode",void 0),x(this,"release",(()=>{var e,t;this.estrange(),null===(e=this.jungle)||void 0===e||e.release(),null===(t=this.soundTouchNode)||void 0===t||t.release(),delete this.jungle})),x(this,"prevUpdateFx",void 0),x(this,"updateFx",(async(e,t,n)=>{var a;this.prevUpdateFx=()=>this.updateFx(e,t),this.estrange();let r=this.input;var i,o;e&&t.jungleMode&&null!==t.pitch&&0!==t.pitch?(this.jungle=null!==(i=this.jungle)&&void 0!==i?i:new et(this.ctx),this.jungle.setPitchOffset(t.pitch),r.connect(this.jungle.input),r=this.jungle.output):(null===(o=this.jungle)||void 0===o||o.release(),delete this.jungle);const s=e&&!t.jungleMode&&null!==t.pitch&&0!==t.pitch;if(!at.triedAddModule&&s)try{await at.addModule(this.ctx)}catch(e){}var l;if(at.addedModule&&s?(this.soundTouchNode||(this.soundTouchNode=new at(this.ctx),this.soundTouchNode.onprocessorerror=e=>{var t;console.error("SoundTouchProcessor error: ",e),null===(t=this.soundTouchNode)||void 0===t||t.release(),delete this.soundTouchNode,at.addedModule=!1,at.triedAddModule=!0,this.prevUpdateFx()}),this.soundTouchNode.update(t.pitch),r.connect(this.soundTouchNode),r=this.soundTouchNode):(null===(l=this.soundTouchNode)||void 0===l||l.release(),delete this.soundTouchNode),e&&null!==(a=t.eq)&&void 0!==a&&a.enabled&&t.eq.values.some((e=>0!==e))){const{eq:e}=t;this.filterNodes=this.filterNodes||[];const n=[],a=()=>{var e;return null!==(e=this.filterNodes.shift())&&void 0!==e?e:this.ctx.createBiquadFilter()},i=e.values.length/101.41;t.eq.values.forEach(((t,o)=>{var s;if(0===t)return;t=null!==(s=e.factor)&&void 0!==s?s:1;const l=h(31.252**(o/Math.round(e.values.length/10)),2),u=a();n.push(u),r.connect(u),r=u,u.frequency.value=l,u.gain.value=t,u.Q.value=i,0===o?u.type="lowshelf":o===e.values.length-1?u.type="highshelf":u.type="peaking"})),delete this.filterNodes,this.filterNodes=n}else delete this.filterNodes;let u;var d;e&&t.delay>0?(this.delayNode=null!==(d=this.delayNode)&&void 0!==d?d:this.ctx.createDelay(10),t.delay>this.delayNode.delayTime.maxValue&&(this.delayNode=this.ctx.createDelay(179.99)),this.delayNode.delayTime.value=c(0,this.delayNode.delayTime.maxValue,t.delay),t.delayMerge&&(u=r),r.connect(this.delayNode),r=this.delayNode):delete this.delayNode,r.connect(this.output),u&&u.connect(this.output),e&&null!=t.volume&&1!==t.volume?this.output.gain.value=t.volumet.volume:this.output.gain.value=1})),x(this,"estrange",(()=>{var e,t,n,a,r;this.input.disconnect(),null===(e=this.delayNode)||void 0===e||e.disconnect(),null===(t=this.filterNodes)||void 0===t||t.forEach((e=>{e.disconnect()})),null===(n=this.jungle)||void 0===n||null===(a=n.output)||void 0===a||a.disconnect(),null===(r=this.soundTouchNode)||void 0===r||r.disconnect()})),this.input=e.createGain(),this.output=e.createGain()}}async function lt(e){if(!window.globalState.get({enabled:!0}).enabled)return;const t=window.globalState.get({keybinds:!0,keybindsUrlCondition:!0});let n=(t.keybinds||[]).filter((t=>t.enabled&&t.global&&(t.globalKey||"commandA")===e));if(!n.length)return;const a=await async function(){let e=await E({active:!0,currentWindow:!0},3,75);if(!e.length)return;const[t]=e;return{tabId:t.id,windowId:t.windowId,url:t.url}}(),r=(null==a?void 0:a.url)||"";t.keybindsUrlCondition&&!D(r,t.keybindsUrlCondition,!0)||(n=n.filter((e=>{var t;return!((null===(t=e.condition)||void 0===t?void 0:t.parts.length)>0)||D(r,e.condition,!0)})),ze(n,a))}function ut(e,t,n){"REQUEST_TAB_INFO"===e.type?n({tabId:t.tab.id,frameId:t.frameId}):"REQUEST_CREATE_TAB"===e.type?(chrome.tabs.create({url:e.url}),n(!0)):"REQUEST_SEND_MSG"===e.type?(chrome.tabs.sendMessage(e.tabId,e.msg,null==e.frameId?{}:{frameId:e.frameId}),n(!0)):"TRIGGER_KEYBINDS"===e.type&&(ze(window.globalState.get({keybinds:!0}).keybinds.filter((t=>e.ids.includes(t.id))),{tabId:t.tab.id,frameId:t.frameId,windowId:t.tab.windowId}),n(!0))}p()||chrome.runtime.onInstalled.addListener((async function e(t){chrome.runtime.onInstalled.removeListener(e);const n=await E({url:["https:///","http:///"]});n&&n.forEach((e=>{chrome.tabs.executeScript(e.id,{file:"contentScript.js",allFrames:!0},(()=>{chrome.runtime.lastError}))}))})),async function(){let e;window.isBackground=!0,window.portCapture=new q;try{e=S((await("config",new Promise(((e,t)=>{chrome.storage.local.get("config",(n=>{chrome.runtime.lastError?t(chrome.runtime.lastError):e(n)}))})))).config)}catch(e){}e=e||g(),window.globalMedia=new Ye,window.globalState=new L(e),window.badgeMgr=new U,window.ruleManager=new Je,window.gsmMgr=new z(e.language),chrome.tabCapture&&it&&(window.captureMgr=new it),chrome.runtime.onMessage.addListener(ut),p()||chrome.commands.onCommand.addListener(lt),chrome.tabs.onCreated.addListener((e=>{if(window.globalState.get({pinByDefault:!0}).pinByDefault){var t,n;let a=e.openerTabId;if(a||(a=window.currentTabId,window.currentTabId===(null==e?void 0:e.id)&&(a=window.previousTabId)),window.globalState.unfreeze(),null!==(t=window.globalState.pins)&&void 0!==t&&t.find((t=>t.tabId===e.id)))return;window.globalState.set([{tabId:e.id,inheritContextFromTabId:null!==(n=a)&&void 0!==n?n:null,override:{isPinned:!0}}])}}))}()}()}();

Unrecognized feature: 'picture-in-picture'.

"

@polywock
Copy link
Owner

Should be fine if it's ignorable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants