var n;String.prototype.includes||(String.prototype.includes=function(a,b){return 0<=this.indexOf(a,b)});Array.prototype.includes||(Array.prototype.includes=function(a,b){return 0<=this.indexOf(a,b)});var q=Array.prototype.includes,r=Function.call.bind(Array.prototype.slice),aa=Function.apply.bind(Array.prototype.push);function ba(a){return a instanceof Object}var ca=Function.bind.bind(function(a){return this[a]}),da=Function.bind.bind(function(a){return a[this]}),t="undefined"==typeof browser;
t&&(browser=chrome);
var v=navigator.userAgent.includes("Edge/"),w=navigator.userAgent.includes("Firefox/"),ea=navigator.userAgent.includes("OPR/"),C,fa,ga,ha,ia=w?69:v?77:66,ja=w?220:150,D=["127.0.0.1:1001","0.1.0.1:1001"],ka=/(?!)/,la=/(?:chrome|about|chrome-extension|ms-browser-extension|moz-extension):/,ma=["main_frame","sub_frame"],na=["image","object"],E="main_frame sub_frame image object xmlhttprequest other".split(" "),oa=["image","object","xmlhttprequest","other"],pa=["*://*/*","ftp://*/*","file:///*"],qa=["*://*/*"],
ra=["*://*/*"],sa=/\.([^.\\/]*?)(?:\.[0-9.]+)?$/,ta=/^v(\d+)\.(\d+)(?:b(\d+))?\b/,ua=browser.runtime.getURL("captured.html"),va=browser.runtime.getURL("").slice(0,-1),wa=browser.extension.getBackgroundPage().location.href,xa=!1,ya=q.bind("origin referer dnt cookie user-agent accept-encoding sec-fetch-site sec-fetch-mode".split(" ")),za=q.bind([301,302,303,307,308]),Aa=q.bind([301,302,303]),Ba=q.bind(["http","https","socks4","socks5"]),Ca={direct:2,none:2,auto_detect:3,autoDetect:3,system:4,pac_script:5,
autoConfig:5,fixed_servers:7,manual:7},Da=[null,[115,111,112,113,114],[111,112],[112]],Ea=[null,[-115,116,117,122,118,119,120,121],[113],[113]],Fa={16:1,17:2,18:4,45:8,46:16},Ga={http:1,https:129,ftp:2,ftps:130,rtmp:3,rtmpt:3,rtmpe:3,mms:4,idmreg:159},Ha={"text/html":"HTML|HTM","text/css":"CSS","text/javascript":"JS|JSON","text/mspg-legacyinfo":"MSI|MSP","text/plain":"TXT|VTT|SRT|M3U8|F4M","text/srt":"SRT","text/vtt":"VTT|SRT","text/xml":"XML|F4M|TTML","text/x-javascript":"JS|JSON","text/x-json":"JSON",
"application/f4m+xml":"F4M","application/gzip":"GZ","application/javascript":"JS","application/json":"JSON","application/msword":"DOC|DOCX|DOT|DOTX","application/pdf":"PDF","application/ttaf+xml":"DFXP","application/vnd.apple.mpegurl":"M3U8","application/zip":"ZIP","application/x-7z-compressed":"7Z","application/x-aim":"PLJ","application/x-compress":"Z","application/x-compress-7z":"7Z","application/x-compressed":"ARJ","application/x-dosexec":"EXE","application/x-gtar":"TAR","application/x-gzip":"GZ",
"application/x-gzip-compressed":"GZ","application/x-javascript":"JS","application/x-mpegurl":"M3U8","application/x-msdos-program":"EXE|DLL","application/x-msi":"MSI","application/x-msp":"MSP","application/x-ole-storage":"MSI|MSP","application/x-rar":"RAR","application/x-rar-compressed":"RAR","application/x-sdlc":"EXE|SDLC","application/x-shockwave-flash":"SWF","application/x-silverlight-app":"XAP","application/x-subrip":"SRT","application/x-tar":"TAR","application/x-zip":"ZIP","application/x-zip-compressed":"ZIP",
"video/3gpp":"3GP|3GPP","video/3gpp2":"3GP|3GPP","video/avi":"AVI","video/f4f":"F4F","video/f4m":"F4M","video/flv":"FLV","video/mp2t":"TS|M3U8","video/mp4":"MP4|M4V","video/mpeg":"MPG|MPEG","video/mpegurl":"M3U|M3U8","video/mpg4":"MP4|M4V","video/msvideo":"AVI","video/quicktime":"MOV|QT","video/webm":"WEBM","video/x-flash-video":"FLV","video/x-flv":"FLV","video/x-mp4":"MP4|M4V","video/x-mpegurl":"M3U|M3U8","video/x-mpg4":"MP4|M4V","video/x-ms-asf":"ASF","video/x-ms-wmv":"WMV","video/x-msvideo":"AVI",
"audio/3gpp":"3GP|3GPP","audio/3gpp2":"3GP|3GPP","audio/mp3":"MP3","audio/mp4":"M4A|MP4","audio/mp4a-latm":"M4A|MP4","audio/mpeg":"MP3","audio/mpeg4-generic":"M4A|MP4","audio/mpegurl":"M3U|M3U8","audio/webm":"WEBM","audio/wav":"WAV","audio/x-mpeg":"MP3","audio/x-mpegurl":"M3U|M3U8","audio/x-ms-wma":"WMA","audio/x-wav":"WAV","ilm/tm":"MP3","image/gif":"GIF|GFA","image/icon":"ICO|CUR","image/jpg":"JPG|JPEG","image/jpeg":"JPG|JPEG","image/png":"PNG|APNG","image/tiff":"TIF|TIFF","image/vnd.microsoft.icon":"ICO|CUR",
"image/webp":"WEBP","image/x-icon":"ICO|CUR","flv-application/octet-stream":"FLV"};
function G(a,b,c,d,e,f){if(a){var g=["MSG#",a,"#",b,"#",c,"#",d];this.u=a;this.w=b;this.G=c;this.m=d;this.b=e||[];this.o=g;if(e)for(a=0;a<e.length;a++)g.push(":",e[a]||0);if(f)for(var h in f)if(e=f[h],null!=e)if(g.push(",",h,"="),"string"==typeof e){b=a=e.length;for(c=0;c<b;)d=e.charCodeAt(c++),128<=d&&(2048<=d?(a+=2,d-55296&56320||c++):a++);g.push(a,":",e)}else e instanceof Blob?g.push(e.size,":",e):g.push(e)}else this.s=new FileReader}function Ia(){this.g=this.constructor.prototype.B++}
Ia.prototype.B=1;function Ja(a,b,c,d){this.id=a;this.port=b;c&&(this.c=c.toLowerCase());d&&(this.b=d)}Ja.prototype.a=0;function Ka(a,b,c){this.id=[a,b].toString();this.a=0>c?null:[a,c].toString()}function La(a){a.h||(a.o.push(";"),a.h=!0);return a.o.join("")}function Ma(a){a.h||(a.o.push(";"),a.h=!0);return new Blob(a.o)}function Na(a,b,c){a.h?a.c(a):(b.a=c||0,b.b=0,a.s.onload=a.X.bind(a,b),H(a,b,0,50))}
G.prototype.X=function(a){for(var b=this.s.result;;)switch(a.b){case 0:var c=b.split(",",2),d=c.shift().split(":",2),e=d.shift();if(!d.length){if(!c.length)return this.c(this);a.b=1}var f=e.length+1,d=e.split("#",6);if(5!=d.length||"MSG"!=d[0])return this.c(this);this.u=parseInt(d[1]);this.w=parseInt(d[2]);this.G=parseInt(d[3]);this.m=parseInt(d[4]);b=b.slice(f);a.a+=f;a.b++;break;case 1:d=b.split(",",2);e=d.shift();if(!d.length){d=b.split(";",2);if(2>d.length)return H(this,a,b.length,100);a.b=4}f=
e.length+1;this.b=d=e.split(":");for(e=0;e<d.length;e++)c=d[e],d[e]=c.includes(".")?parseFloat(c):parseInt(c);b=b.slice(f);a.a+=f;a.b++;break;case 2:c=b.split(",",2);2>c.length&&(c=b.split(";",2));var d=c.shift().split(":",2),g=d.shift(),f=g.length,e=!1;if(d.length)f++;else{if(!c.length)return H(this,a,b.length,25);e=!0}d=g.split("=",3);if(2!=d.length)return this.c(this);c=parseInt(d[0]);d=parseInt(d[1]);a.a+=f;a.b++;if(e){this[c]=d;b=b.slice(f);a.b++;break}a.f=c;a.c=d;b=a.c;f=a.a;a=a.slice(f,f+b);
a.size==b?this.s.readAsText(a):this.c(this);return;case 3:return this[a.f]=b,a.a+=a.c,a.b++,H(this,a,0,21);case 4:switch(b[0]){case ",":a.b=2;b=b.slice(1);break;case ";":a.b++;break;default:return this.c(this)}a.a++;break;case 5:this.h=!0;this.i(this);a.size>a.a&&(b=new G,b.i=this.i,b.c=this.c,Na(b,a,a.a));return}};function H(a,b,c,d){var e=b.a;c=e+c;b.size>c?a.s.readAsBinaryString(b.slice(e,c+d)):a.c(a)}
function J(){if(C){var a=this.constructor.prototype,b;for(b in a)b.startsWith("_")||"constructor"==b||(this[b]=a[b].bind(this));this.za=[];this.N=!1;this.V=this.w=null;this.c={};this.s={};this.a={};this.h={};this.b={};this.o={};this.g={};this.f={};this.H={};this.Ca=0;this.Ba=!1;this.X=!0;this.Ra=this.ka=this.Qa=1;this.C={};this.l=null;this.W=1;this.m=!1;this.I=0;this.J=this.G=this.i=this.u=null;this.fa=ka;this.B=[null,{},{},{}];this.M=0;this.ga=null;this.Aa=this.ea=!1;t&&browser.browserAction.disable();
w&&browser.runtime.onInstalled.addListener(this.Ua);w||pa.push("about:blank");w||qa.push("about:blank");browser.windows.onCreated.addListener(this.Ja);browser.windows.onRemoved.addListener(this.Ka);browser.windows.onFocusChanged.addListener(this.lb);browser.tabs.onActivated.addListener(this.ab);browser.tabs.onUpdated.addListener(this.eb);browser.tabs.onRemoved.addListener(this.cb);browser.tabs.onAttached&&browser.tabs.onAttached.addListener(this.bb);this.ya();this.na();Oa(this,!0)}}n=J.prototype;
n.Ua=function(a){var b=browser.runtime.getManifest().version;a.version=b;this.Pa=a};
n.ja=function(a){var b=a.value,c;if(w)if(a=Ca[b.proxyType],5==a)c=b.autoConfigUrl,c.startsWith("data:text/")&&(c=c.substr(c.indexOf(",")+1).trimLeft(),++a);else{if(7==a){c=K(b.http);if(!c||!b.httpProxyAll){var d=K(b.ssl),e=K(b.ftp),f=K(b.socks,b);if(c!=d||c!=e||f)!f||c||d||e?(c=(c||"")+";"+(d||"")+";"+(e||"")+";"+(f||""),++a):c=f}b.passthrough&&(c+=";"+b.passthrough)}}else(a=Ca[b.mode],5==a)?c=b.pacScript.url||++a&&b.pacScript.data:7==a&&(f=b.rules,b=f.bypassList,c=K(f.singleProxy),!c&&(c=K(f.proxyForHttp),
d=K(f.proxyForHttps),e=K(f.proxyForFtp),f=K(f.fallbackProxy),c!=d||c!=e||c!=f&&f)&&(c=(c||"")+";"+(d||"")+";"+(e||"")+";"+(f||""),++a),b&&b.length&&(c+=";"+b.join(",")));6==a&&c&&(c=c.replace(/\blet\b/g,"var").replace(/,(?=(?:\s*\/\/.*?\n)*\s*[\]}])/g,""));b=5>a?a.toString():c?a+":"+c:null;b!=this.i&&(this.i&&this.la(),this.i=b)};
n.la=function(a){if(void 0===a){if(t&&this.m){a=new XMLHttpRequest;var b=this.u||"http://"+(this.w?(new URL(this.w.url)).host:D[0])+"/status/204+IDM";a.url=b;a.timeout=1E3;a.onreadystatechange=this.la.bind(this,a);a.open("GET",b,!0);a.send()}}else 4==a.readyState&&(this.u=204==a.status?a.url:null)};
function Oa(a,b){var c=a.c,d=a.C={};browser.contextMenus.removeAll();for(var e=0;e<Pa.length;e++){var f=Pa[e];f[0]&&(w?b||c[f[1]]:1)&&(d[e]=browser.contextMenus.create({title:Qa(f[2]),contexts:f[3].split(","),onclick:f[4].bind(a),documentUrlPatterns:f[5]||pa,enabled:!0}))}}function Ra(a,b,c,d,e){a=a.g;return b in a?a[b]:a[b]=new Ja(b,c,d,e)}function Sa(a,b,c,d){var e=[b,c].toString();a=a.h;return e in a?a[e]:a[e]=new Ka(b,c,d)}function Ta(a){var b=new Ia;return a.o[b.g]=b}
function M(a,b){var c=a.o[b];c&&delete a.o[b];return c}function Ua(a,b){for(var c=a.B,d=1;d<c.length;d++){var e=c[d][101];if(e&&e.test(b))return d}return 0}
n.na=function(){var a=this.I%(D.length+1);if(a<D.length)this.w=a=new WebSocket("ws://"+D[a]+"/?cid="+Math.random().toString().substr(2,9),"plugin.v3.internetdownloadmanager.com"),a.onopen=this.sa,a.onclose=this.O,a.onmessage=this.$a,1==a.readyState?this.sa():3==a.readyState&&this.O();else{this.V=a=browser.runtime.connectNative("com.tonec.idm");try{a.postMessage("")}catch(b){a=null}a?(a.onDisconnect.addListener(this.O),a.onMessage.addListener(this.Wa),this.sa()):this.O()}};
n.sa=function(){this.m=!0;this.ka=1;var a={};a[112]=ga;a[113]=fa;a[114]="Chrome_RenderWidgetHostHWND";a[125]=JSON.stringify(this.Pa);if(587202560<=C){var b=browser.i18n.getUILanguage().replace("_","-");"sr"==b&&(b+="-Cyrl-CS");a[116]=b}N(this,2,1,0,[8,20,6,0],a)};
n.O=function(){browser.runtime.lastError;this.w=this.V=null;if(this.m){this.m=!1;this.H={};for(var a=this.za,b=0;b<a.length;b++){var c=a.splice(b--,1).pop(),d=c.splice(0,2).pop();v&&c.splice(1);d.removeListener.apply(d,c)}this.N=!1;this.i=this.u=null;this.J&&(window.clearInterval(this.J),this.J=null);t&&browser.browserAction.disable()}a=++this.I;b=D.length+1;c=a/b;120>c&&(1==c&&this.X&&this.ma(),!a||a%b?this.na():window.setTimeout(this.na,5E3*c))};
n.$a=function(a){var b=new G;b.i=this.Ha;b.c=this.O;Na(b,a.data)};n.Wa=function(a){var b=new G;b.i=this.Ha;b.c=this.O;Na(b,new Blob([a]))};function N(a,b,c,d,e,f){if(!a.m)return!1;var g=a.ka++;b=new G(g,b,c,d,e,f);if(c=a.w)c.send(Ma(b));else try{a.V.postMessage(La(b))}catch(h){return a.O(),!1}d&1&&(a.H[g]=b);return!0}
function Ya(a,b){var c=a.f;if(b.b){var d=b.b[6],e=c[d];if(e){var f=e.type;return!f||"image"==f||e.b?(b.a=e.port.id,b.ea=d,!0):!1}}var g=a.a,h=a.g,k=b[6],l=b[17],m=b[50],x=b[7],y,u;for(d in c){var e=c[d],p=e.url;if(p){if(p==k||p==l)if(f=e.type,!f||"image"==f||e.b)return b.a=e.port.id,b.ea=parseInt(d),!0;p==m&&(u=e.port.id)}}for(d in h)if(c=h[d],p=c.b){if(p==k||p==l||p==m)if(e=c.port,x&&(f=g[e.tabId])&&f.j!=x&&(e=null),e)return b.a=e.id,!0;p==x&&(y=c.port.id)}return null!=u?(b.a=u,!0):null!=y?(b.a=
y,!0):!1}n.Ea=function(a,b,c,d){if(b)return d?(b=(c=d.shift())&&this.a[c.id])?a.a=b.id:null:null;if(null!=a.a)return a.a;if(a.b){var e=a.b[7];if(e&&this.s[e])return a.a=e}if(Ya(this,a))return a.a;d=this.s;var f=a[50],g=a[7];for(e in d){b=d[e];if(b.j==f){a.a=e;break}null==a.a&&b.j==g&&(a.a=e)}if(null!=a.a)return a.a;g&&browser.tabs.query({url:g},O(this,a,!0,c));return null};
n.pa=function(a,b,c,d,e,f){var g=a.tabId,h=a.Z,k=a.A,l=a.b,m;if(void 0===b){if(f=new P(this,a,!0),null==k&&(a.a?(browser.tabs.get(g,Q(f,2)),browser.windows.getLastFocused(Q(f,3))):(k=this.a[g],a.A=k&&k.A)),null==h&&a.j?browser.webNavigation.getAllFrames({tabId:g},Q(f,5)):h&&null==l&&browser.webNavigation.getFrame({frameId:h,tabId:g},Q(f,4)),R(f))return}else if(b&&(c&&0<=c.index?a.A=c.windowId:d&&(a.A=d.id),e&&(m=e.parentFrameId),f))for(c=a.j,d=c.includes("#")&&Za(c),e=f.length-1;0<=e;e--)if(k=f[e],
b=k.j,!k.qb&&k.frameId&&(b==c||d&&b==d)){h=a.Z=k.frameId;m=k.parentFrameId;break}if(null==h)a.j||a.postMessage([11,g,null,!0]);else{f=[g,h].toString();0<=m&&(l=a.b=[g,m].toString());if(k=this.h[f])a.i=k.b,a.c=k.c,(b=k.P)&&a.j!=b&&(a.P=b),!l&&k.a&&(a.b=k.a);this.a[f]=a;g=[11,g,h,!a.j,a.c];(h=a.m)&&a.c&&(l=this.B[h],m=Ea[h],g.push(h),aa(g,m.map(ca(l))));a.postMessage(g)}};
n.ca=function(a,b,c,d,e,f,g,h){var k=$a(a,!0);if(!k)return 0;if(1==k){if(!g)return S(a,O(this,a,b,c,d,e,f,!0)),-1;"object"==typeof h&&(h=T(h))}g=[k];k={};k[6]="idmfc"+a;k[50]=b;k[7]=c;k[8]=d;k[100]=e;k[102]=f;k[51]=h;k[54]=navigator.userAgent;k[121]=this.i;N(this,14,1,0,g,k);return 3};
n.Na=function(a,b,c,d,e){if(!d){if(!a||!a.length)return;c||(c={});var f=new P(this,a,b,c,!0);c.Y&&!c.La&&S(c.Y,Q(f,4));for(var g=0;g<a.length;g++)S(a[g][0],Q(f,5+g));if(R(f))return}e&&(c.La=T(e));for(g=0;g<a.length;g++)a[g][5]=T(arguments[g+5]);var f=0,g=[a.length],h={8:4};h[54]=navigator.userAgent;h[7]=c.Y;h[110]=c.R;h[111]=c.La;h[121]=this.i;1<a.length&&(N(this,15,1,f,g,h),f=16,h={});for(var g=[0],k;k=a.shift();)h[6]=k[0],h[100]=k[2],h[102]=k[3],h[50]=k[4],h[51]=k[5],N(this,14,1,f,g,h)};
function S(a,b){if(v&&a.startsWith("ftp:"))b([]);else{var c={url:a};ha&&(c.firstPartyDomain=null);browser.cookies.getAll(c,b)}}function U(a,b,c,d){if(b=b[c])try{b=b.replace(/^\|+|\|+(?=\||$)/g,"").replace(/\./g,"\\.").replace(/\?/g,".").replace(/\*/g,".*?"),d&&(b=b.replace(/~/g,"(?:\\b[^.]+\\.)?")),b=RegExp("^(?:"+b+")$","i")}catch(e){b=null}a[c]=b||ka}
function ab(a,b,c,d,e){a=a.c;b=b[c];var f=[],g=[],h=[],k=[];if(b)try{b=b.replace(/^\|+|\|+(?=\||$)/g,"").replace(/[.?+(){}[\]]/g,"\\$&").replace(/\*(?=[^:/|&]*:\/\/)/g,"\\w%%").replace(/(:\/\/[^:/]*?)~/g,"$1(?:\\b[^./]+\\.)?").replace(/\\\?(?=\||$)/g,"(?:$&.%%)?");if(d){for(var l=b.replace(/(^|\|)(?:([A-Z]+)?(?:#(\w+))?!)?[^|]+/g,"$1$2|$3").split("|");l.length;)f.push(l.shift()),g.push(l.shift());b=b.replace(/(^|\|)[\w#]+!/g,"$1")}if(e){for(var l=b.replace(/(^|\|)(?:(?=[^|]+?<[A-Z]:.*?>)|[^|]+)/g,
"$1").split("|"),m=/<([A-Z]):(.*?)>/g,x={F:"[^/\\?#&;]%%",T:"[^/\\?#&;.]%%"},y,u=0;l.length;++u)if(y=l.shift()){for(var p={},A=["^"],F="",B,L=1;B=m.exec(y);++L)p[B[1]]=L++,F=RegExp.rightContext,A.push(RegExp.leftContext,"(",B[2].replace(/\*/g,x[B[1]]||".%%?"),")");A.push(F,"$");h[u]=p;k[u]=RegExp(A.join("").replace(/\*/g,".*?").replace(/%%/g,"*"))}b=b.replace(m,"(?:$2)")}b=b.replace(/\*/g,".*?").replace(/%%/g,"*");b=d||e?RegExp("^(?:("+b.replace(/\|/g,")|(")+"))$"):RegExp("^(?:"+b+")$")}catch(I){b=
null}a[c]=b||(b=/(?!)/);d&&(b.mb=f,b.ob=g);e&&(b.nb=h,b.pb=k)}function bb(a,b,c,d,e,f,g,h){if(!d||a.c[-8]){var k=a.a[b];if(k){var l=Ta(a),m=l.g;l.tabId=b;l.port=k;l.M=c;l.l=0;l.V=[];if(k=d&&!!e)l.ga=!0,l.ka=e,l.H=f,l.I=g,l.N=h,e.a||cb(a,e);e="^(?:http|https|ftp|ftps|rtmp|rtmpt|rtmpe|mms)://";d&&(d=a.c[12])&&(d=d.replace(/\./g,"\\."),d=d.replace(/\*/g,".*"),d=d.replace(/\~/g,"(?:.*\\.)?"),e=e+"(?:[^\\/]*@)?(?:"+d+")(?::\\d+)?(?:\\W|$)");l.C=db(a,b,[12,m,c,k,e]);l.W=0;l.C||M(a,m)}}}
n.U=function(a,b,c){if(4294967295==a)this.l=null,c=!0;else{var d=this.g[a];if(d){c=d.a;if(!c)return;if(b)switch(c){case 3:return;case 2:break;default:d.a=3;window.setTimeout(this.U.bind(this,a,!1,!0),1E3);return}d.a=0;c=!0}}c&&N(this,8,1,32,[a])};function eb(a,b){var c=a.b[b];if(c&&c.$){var d=c.border,e=c.scale;N(a,7,1,0,[b,Math.round((c.ia+d)*e),Math.round((c.wa+d)*e),Math.round((c.width-d-c.ta)*e),Math.round((c.height-d)*e)])}}
function fb(a,b,c,d){var e=a.g[b],f=256;2==e.a&&(d?(f|=128,e.a=1):f|=64);var g,h,k,l,m;c&&(g=c[0],h=c[1],k=c[2]||g+1,l=c[3]||h+1,m=c[4],c=e.port.h)&&(g+=c[0],h+=c[1],k=Math.min(k+c[0],c[2]),l=Math.min(l+c[1],c[3]));N(a,9,1,f,[b,g,h,k,l,m])}
n.da=function(a){var b=this.b,c=[];if(a)(a=b[a])&&(a.K||a.L||c.push(a.v));else for(var d in b)a=b[d],a.K||a.L||c.push(a.v);if(c.length){b=[15,null,null];a={};var e=this.g;for(d in e){var f=e[d];f.a&&c.includes(f.port.tabId)&&(f.c?(f=f.port,f.a||cb(this,f,null,a),b[2]=d,f.postMessage(b)):fb(this,d,null,!0))}}};function gb(a,b){var c=a.b[b];c&&!c.L&&V(a,c.v,void 0)}function V(a,b,c){var d=c?0:2;c=c?32:64;var e=a.g,f;for(f in e){var g=e[f];g.a&&g.port.tabId==b&&g.a!=d&&(g.a=d,N(a,8,1,c,[f]))}}
function W(a,b,c,d){var e=a.M,f=(e&b)!=((c?63:32)&b);a.M=c?e|=b:e&=~b;f&&(c=a.c[-1],b=a.c[-2],c=a.ea=0!=c&&(e&c)==c,e=a.Aa=0!=b&&(e&b)==b,a.ga=(c||e)&&d||null)}
n.xa=function(a,b,c,d){var e=this.b[a];if(e)if(d)e.L&&window.clearTimeout(e.L),e.L=window.setTimeout(this.xa.bind(this,a,b,c),d);else if(e.L=null,b&&(browser.windows.get(a,this.S),browser.tabs.query({windowId:a,active:!0},this.S)),c){if((a=this.b[a])&&!a.L){a=a.v;b=this.g;for(var f in b)c=b[f],c.a&&c.port.tabId==a&&1==c.a&&N(this,8,1,1152,[f])}}else this.da(a)};
n.S=function(a,b){a instanceof Array&&(a=a.shift());if(a){var c=a.windowId||a.id,d=this.b[c];if(d){if(a.windowId){if(d.ra&&la.test(a.url))return;d.v=a.id;a.width&&(d.va=a.width);a.height&&(d.ua=a.height)}else{var e=b?d.scale=this.W:d.scale,f="fullscreen"==a.state,g=!b&&f!=d.K;d.K=f;d.Ga="maximized"==a.state;d.qa="minimized"==a.state;v?(d.width=Math.round(a.width/e),d.height=Math.round(a.height/e),d.left=Math.round(a.left/e),d.top=Math.round(a.top/e)):(d.width=a.width,d.height=a.height,d.left=a.left,
d.top=a.top);g&&(f?gb(this,c):this.da(c))}g=d.va;e=d.ua;if(g&&e){var h=d.width,f=d.height;if(!d.ra&&!d.qa){if(g>h||e>f)return browser.windows.get(c,this.S);d.ra=!0}g=h-g;h=g/2;0<=h&&20>=h?(d.border=h,d.ia=d.ta=0):(h=d.border,w||ea?d.ia=g-2*h:d.ta=g-2*h);e=f-e-2*h;e<=ja&&(d.wa=e)}b||eb(this,c);return d}}};
function cb(a,b,c,d){a=a.a;c=[16,c];for(var e=[b],f;f=a[b.b];b=f){if(d)if(d[b.id])break;else d[b.id]=!0;e.push(f)}for(f=e.pop();b=e.pop();f=b)d=b.Ta,c[2]=d,c[3]=b.Z,c[4]=d?null:b.j,c[5]=d?null:b.P,f.postMessage(c)}function db(a,b,c){a=a.a;b=[b,null].toString();var d=0,e;for(e in a)e.startsWith(b)&&(a[e].postMessage(c),d++);return d}
n.ha=function(a,b){var c={file:"content.js",runAt:"document_start",allFrames:!0};620756992<=C&&(c.matchAboutBlank=!0);654311424<=C&&!v&&b&&(c.frameId=b,w&&(c.allFrames=!1));if(a instanceof Array)for(;a.length;)try{browser.tabs.executeScript(a.shift().id,c,hb)}catch(d){}else try{browser.tabs.executeScript(a.id||a,c,hb)}catch(d){}};
function ib(a,b,c,d){var e=17,f=[b.A,b.$,b.width,b.height,b.left,b.top,b.scale],g={};b.Ga&&(e|=256);b.qa&&(e|=512);null!=c&&(e|=c?2048:1024);d&&(g[117]=d);N(a,6,2,e,f,g)}n.ya=function(a,b){if(b)for(;b.length;){var c=b.shift(),d=this.S(c,!0)||this.Ja(c);ib(this,d,c.focused,c.title)}else if(!a){c=this.ya.bind(this,!0);try{browser.windows.getAll({windowTypes:["normal","popup"]},c)}catch(e){browser.windows.getAll(c)}}};
n.oa=function(a,b){if(!this.m)return jb(b.id,"cannot_contact_idm");var c=a.linkUrl,d=a.pageUrl,e=d;if(a.menuItemId==this.C[4])return browser.downloads.search({query:[c]},this.Sa.bind(this,c));if(a.menuItemId==this.C[1])c=a.frameUrl,c&&"about:blank"!=c||(c=d,e=null);else if(!c){var c=a.srcUrl,f=this.a[[b.id,a.frameId].toString()];if(f){var g=Ta(this);g.tabId=b.id;g.port=f;g.J=c;g.fa=e;g.Y=d;g.m=4;return f.postMessage([18,g.g,c])}}c&&this.ca(c,e,d,4)};
n.Da=function(a,b){if(!this.m)return jb(b.id,"cannot_contact_idm");bb(this,b.id,a.menuItemId==this.C[2])};n.Sa=function(a,b){for(var c,d,e;c=b.pop();)c.exists&&"complete"==c.state?d||e||(e=c.referrer):(d||(d=c.referrer),browser.downloads.erase({id:c.id}));this.ca(a,d||e,null,4)};
n.Xa=function(a){var b=a.sender.tab;if(b&&!(0>b.id)){a.name=a.name.split(":").shift();var c=a.id;null==c&&(c=a.id=a.portId_||this.Qa++);var d=b.id,e="top"==a.name;a.tabId=d;a.A=0>b.index?null:b.windowId;a.f=!0;a.g=!1;a.a=e;a.Z=e?0:a.sender.frameId;a.l=0;a.j=a.sender.url||e&&b.url||null;a.P=null;this.s[c]=a;e&&(this.a[d]=a);a.j&&(a.m=Ua(this,(new URL(a.j)).hostname));a.onMessage.addListener(this.Ya.bind(this,a));a.onDisconnect.addListener(this.ba);this.pa(a)}};
n.ba=function(a,b,c){browser.runtime.lastError;if(a.f){c||(a.f=!1);var d=this.g,e=this.f,f=this.o,g,h,k;for(k in d)if(g=d[k],g.port===a)g.a&&this.U(k),delete d[k];for(k in e)(h=e[k],h.port!==a||h.f)||(delete e[k],v&&delete e[h.id]);for(k in f)f[k].port===a&&delete f[k];this.ga===a&&W(this,63,!1);if(!c)if(c=a.tabId,d=a.Z,a.a&&delete this.a[c],delete this.a[[c,d]],delete this.s[a.id],v&&!b)browser.tabs.executeScript(a.tabId,{code:"__idm_connect__ && __idm_connect__(); true;"},hb);else for(k in a=[c,
d].toString(),b=this.h,b)a==b[k].a&&delete b[k]}};
n.Ya=function(a,b){switch(b[0]){case 21:var c=b[1];c&&(a.j=c,null==a.Z&&this.pa(a));break;case 22:var d=this.a,e=d[[a.tabId,b[2]]];e&&(e.Ta=b[3],c=e.h=b[4],d=d[e.b])&&(d=d.h)&&(c[0]+=d[0],c[1]+=d[1],c[2]=Math.min(c[2]+d[0],d[2]),c[3]=Math.min(c[3]+d[1],d[3]));break;case 23:var c=a.A,f=a.tabId,g=b[1],d=b[2],e=b[4],h=this.b[c];if(g){if(g=M(this,g)){var h=f==h.v&&!h.K,k=!d||!e;k&&(d=f);if(f=b[7])g[101]||g.f&&g.R&&g.f!=g.R||(g.f=f),g.R=f;var f=Ra(this,d,a,k?null:b[5],k?null:b[6]),l=h&&!f.a;f.a=h?1:2;
g instanceof G&&X(this,g,2,(h?128:64)|(k?512:0),c,d,g.f);k||(fb(this,d,e),l&&window.setTimeout(this.da.bind(this,c),3E3))}}else b[3]?(this.U(d,!0),delete this.g[d]):e&&f==h.v&&!h.K&&fb(this,d,e,!0);break;case 24:c=b[2];(d=this.o[b[1]])&&c&&(d[101]||d.f&&d.R&&d.f!=d.R||(d.f=c),d.R=c);break;case 25:Ra(this,b[1],a,b[2],b[3]);break;case 26:bb(this,a.tabId,!0,!0,a,b[1],b[2],b[3]);break;case 27:if(c=this.o[b[1]]){d=c.V;if(e=b[4])if("string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(g=b[5])for(h=
0;h<e.length;h++)e[h][4]=g;aa(d,e)}b[3]&&(c.l+=b[3]);b[6]&&(c.Y=b[6]);b[7]&&(c.R=b[7]);++c.W<c.C||(M(this,c.g),c.ga?(d=this.b[c.port.A])&&d.v==c.tabId&&c.l&&(e=c.N,g=d.border,h=d.scale,N(this,10,1,0,[4294967295,d.A,Math.round(c.H*e+(d.ia+g)*h),Math.round(c.I*e+(d.wa+g)*h),0,c.l]),this.l=c.tabId,db(this,c.tabId,[13,!0])):d.length?this.Na(d,c.M,c):jb(c.tabId,"cannot_find_links"))}break;case 28:this.U(4294967295);break;case 29:kb(this,a.A,a.tabId);break;case 30:kb(this,a.A,a.tabId,b[1],b[2]);break;case 31:(c=
Fa[b[1]])&&W(this,c,b[2],a);break;case 32:0==b[1]&&W(this,32,b[2],a);break;case 33:W(this,63,!1);break;case 34:c=b[2];d=b[3];e=b[4];b[1]&&(g=a.i)&&(g=[g,d||0],h={},k=32,h[110]=c,h[115]=e,-2==d&&(k|=16),N(this,16,1,k,g,h));break;case 35:c=b[2];d=b[3];(e=M(this,b[1]))&&this.ca(e.J,e.fa,e.Y,e.m,c,d);break;case 36:e=b[1];c=b[2];if(d=this.f[e])e=[e,0],g={},g[115]=c,N(this,16,1,48,e,g),d.l=!1,d.u&&Y(this,d);break;case 37:N(this,19,1,0,[b[1],b[2],a.tabId],b[3])}};
n.Ha=function(a){var b=a.w,c=a.G,d=a.m,e=a.b,f;if(1==b){var g=e[0];if(f=this.H[g])b=f.w,delete this.H[g]}switch(b){case 3:0<=this.I&&(this.I=-1,this.la());if(d=e[4])d/=96,t&&(d=620756992>C?1:620756992<=C&&621284967>C?d:637534208<=C&&638078312>C?d:1.24<d?d:1),this.W=d,this.ya();lb(this,e[6],a);this.X&&this.ma();break;case 4:var h=this.c;h[-9]=0<(d&64);h[-8]=0<(d&32);h[-4]=0<(d&2);h[-11]=0<(d&256)||2>c;h[-12]=0<(d&512)||2>c;h[-1]=e[0];h[-2]=e[1];h[12]=a[12];h[17]=a[17];U(h,a,1);U(h,a,2);U(h,a,3);U(h,
a,4);U(h,a,10);U(h,a,9,!0);U(h,a,11,!0);ab(this,a,19);ab(this,a,18,!0,!0);lb(this,e[2],a);Oa(this);this.N||(this.N=!0,t&&browser.browserAction.enable(),this.D(1,browser.runtime.onConnect,this.Xa),this.D(1,browser.webNavigation.onCommitted,this.Ia),this.D(1,browser.webNavigation.onHistoryStateUpdated,this.Va),browser.proxy.settings&&(browser.proxy.settings.onChange?this.D(1,browser.proxy.settings.onChange,this.ja):this.J=window.setInterval(browser.proxy.settings.get.bind(null,{},this.ja),6E4),browser.proxy.settings.get({},
this.ja)),a=xa?void 0:E,d=["requestHeaders","blocking"],t&&1207959552<=C&&d.push("extraHeaders"),this.D(2,browser.webRequest.onBeforeRequest,this.gb,{urls:["*://*/*"],types:a},["requestBody","blocking"]),this.D(2,browser.webRequest.onBeforeSendHeaders,this.hb,{urls:["*://*/*"],types:a},d),this.D(2,browser.webRequest.onHeadersReceived,this.jb,{urls:["*://*/*"],types:a},["responseHeaders","blocking"]),this.D(3,browser.webRequest.onResponseStarted,this.kb,{urls:["*://*/*"],types:a}),this.D(3,browser.webRequest.onErrorOccurred,
this.ib,{urls:["*://*/*"],types:a}),(a=this.c[17])&&this.D(3,browser.webRequest.onBeforeRequest,this.fb,{urls:a.split("|"),types:ma},["blocking"]),browser.tabs.query({url:ra[0]},this.ha));break;case 18:d=e[0];if(3<d)break;c=Da[d];e=this.B[d];for(h in a)(h=parseInt(h))&&(102==h||110<h&&150>h)&&(e[h]=c.includes(h)?RegExp(a[h]):a[h]);U(e,a,101,!0);h=this.B.filter(ba).map(da(102));this.fa=RegExp("^https?://(?:"+h.join("|")+")","i");1==d&&(e[-115]=a[115],e[122]||(e[122]="yt"));break;case 5:a=e[0];(e=this.b[a])?
(d=0!=(d&128),e.K!=d&&(e.K=d)&&gb(this,a)):this.Ka(a);break;case 6:if(d&4)break;a=f.b[0];d=e[1];if(e=this.b[a])e.$=d,eb(this,a);break;case 8:a=e[0];d&=32;if(4294967295==a)db(this,this.l,[13,!1]),this.l=null;else if(a=this.g[a])a.a=d?0:2;break;case 11:a=e[0];4294967295==a&&(bb(this,this.l,!0,!0),this.l=null);break;case 12:try{var k=a.b[5],l=a[4],d=4==k?2:3;if((1==k||2==k)&&Ya(this,a)){if(this.c[3].test(l))1==k?d=4:k=4;else if(this.c[-4]||this.c[4].test(l))d=4;a[8]|=256}if(4==k){switch(a.b[4]){case 1:a[7]||
(a[7]=a[50]);break;case 3:a[7]||(a[7]=a[32]),a[50]||(a[50]=a[31])}this.Ma(a)}else X(this,a,d)}catch(m){X(this,a,0)}break;case 13:a=f.b[0];d=f.b[5];e=e[1];if(1==d||2==d)Y(this,a,null,3==e);else if(5==d)if(e){if(a=(h=this.f[a])&&h.g){c=h.method;d=h.requestHeaders;if(e=h.c)(e=mb(e,Z(d,"Content-Type")))||(c="GET");a.timeout=1E4;a.onreadystatechange=this.Za.bind(this,a,h.id);a.open(c,h.url,!0);for(h=0;h<d.length;h++)c=d[h],f=c.name,ya(f.toLowerCase())&&(f="X-IDM-"+f),a.setRequestHeader(f,c.value);a.send(e)}}else nb(this,
a);break;case 20:this.Fa(a);break;case 1:break;default:!f&&d&1&&N(this,1,1,0,[a.u,0,0,0])}};
n.Ma=function(a,b,c){try{if(null==a.a)if(!b){var d=new P(this,a,!0);this.Ea(a,null,d)||browser.windows.getLastFocused(Q(d,2));if(R(d))return}else if(c){var e=this.b[c.id],f=this.a[e&&e.v];f&&(a.a=f.id)}f=this.s[a.a];if(!f)return X(this,a,0);var g;var h=a.g;h||(h=Ia.prototype.B++,a.g=h,this.o[h]=a);g=h;if(!f.a){var k=this.a[f.tabId];k&&k.postMessage([14,g])}var l=[15,g,null,a[6],a[17],a[50],a[31]];f.a||cb(this,f,g);f.postMessage(l)}catch(m){X(this,a,0)}};
function X(a,b,c,d,e,f,g){-1!=c&&(e=[b.u,c,e,f],f={},f[8]=b[8],g&&(f[110]=g),N(a,1,1,d|(0==c?4:2),e,f))}n.Fa=function(a,b){var c=this.G;if(w&&1006632960<=C){if(void 0===b&&!c)return browser.proxy.settings.get({},O(this,a));b&&this.ja(b)}var d=[a.u,0,0,0],e={},f=a[123],f=!f||c&&c[0].endsWith(f);c?e[122]=c[0]+(c[1]?";"+c[1]:""):e[121]=this.i;N(this,1,1,f?2:4,d,e)};
n.Ia=function(a,b){var c=a.tabId,d=a.frameId,e=a.url,f=a.rb,f=f&&f.endsWith("_subframe"),g=this.a[[c,d]];g?b?e!=g.j&&(this.ba(g,!1,!0),g.j=e,g.l++,g.postMessage([17,!1,g.c])):(this.ba(g,!0),f&&"about:blank"==g.j&&this.ha(c,d)):f&&"about:blank"==e&&(Sa(this,c,d,a.parentFrameId),this.ha(c,d))};n.Va=function(a){return this.Ia(a,!0)};
n.Ja=function(a){var b=a.id;a={A:b,width:a.width,height:a.height,left:a.left,top:a.top,scale:this.W,border:8,wa:ia,ia:0,ta:0,Ga:"maximized"==a.state,qa:"minimized"==a.state,K:"fullscreen"==a.state,ua:0,va:0,v:0,ra:!w,$:null,L:null};this.b[b]=a;browser.tabs.query({windowId:b,active:!0},this.S);browser.tabs.query({windowId:b,url:ra[0]},this.ha);return a};n.Ka=function(a){N(this,5,1,32,[a]);delete this.b[a]};n.lb=function(a){if(0<a){var b=this.b[a];b&&(b.$||ib(this,b,!0),v&&this.xa(a,!1,!0,500))}};
n.eb=function(a,b,c){var d=c.windowId,e=this.b[d];e&&(e.$||ib(this,e),e.v||this.S(c));"complete"==b.status&&(a=this.a[a])&&!a.g&&(a.g=!0,this.da(d))};n.cb=function(a){var b=this.a,c=a.toString()+",";(a=b[a])&&this.ba(a,!0);for(var d in b)d.startsWith(c)&&this.ba(b[d],!0)};n.ab=function(a){this.M=0;this.l&&this.U(4294967295);var b=a.windowId;a=a.tabId;var c=this.a[a];c&&!c.windowId&&(c.windowId=b);if(c=this.b[b])V(this,c.v),c.v=a,browser.tabs.get(a,this.S),this.da(b)};
n.bb=function(a,b){var c=b.newWindowId,d=this.s,e;for(e in d)(e=d[e])&&e.tabId==a&&(e.A=c);V(this,a,!0)};function kb(a,b,c,d,e){a.l&&a.U(4294967295);var f=a.b[b];f&&f.v==c&&(d&&(f.va=d),e&&(f.ua=e),V(a,c),a.xa(b,d||e,!1,250))}function nb(a,b){var c=a.f[b];if(c){var d=c.g;c.l=!1;c.g=null;c.u&&Y(a,c);d&&d.abort()}}n.Za=function(a,b){if(4==a.readyState){var c=[b,0],d={};200==a.status&&(d[115]=a.response);N(this,16,1,48,c,d);nb(this,b)}};
function ob(a,b){var c=a.c;if(!c[-9]||b.o)return 1;if(b.s)return b.i=3,b.a|=2052,3;var d=b.B,e=b.b;if(e&&c[-4]||c[9].test(d.hostname)||c[19].test(d.href))return 1;var f=b.I=pb(d.pathname),g=d.search?null:f,h=na.includes(b.type),k=c[18],l=!h&&k.exec(d.href);if(l)for(var m=k.mb,x=k.ob,y=k.nb,u=k.pb,k=1;k<l.length;++k)if(l[k]){var m=m[--k],p,l=0;if(e&&!m.includes("S"))return 1;m.includes("G")&&(p=!0,l|="GET"==b.method);m.includes("P")&&(p=!0,l|="POST"==b.method);if(p&&!l)break;var l=u[k],A,F,B;if(l){l=
l.exec(d.href);if(!l)break;d=y[k];if(y=d.F)B=!0,F=l[y];if(y=d.T)B=!0,A=l[y]}A||(A=pb(F)||m.includes("T")&&(B=!0,f)||x[k]);if(A?!c[1].test(A):B)break;b.i=3;b.a|=16777224;return 3}return g&&(h&&c[2].test(g)||e&&c[4].test(g))?1:4}
function qb(a,b){if(b.N)return a.aa(6,b),4;var c=b.statusCode;if(200!=c&&206!=c)return 1;var c=b.b,d=Z(b.responseHeaders,"Content-Type"),e=Z(b.responseHeaders,"Content-Disposition"),f=rb(d).toLowerCase(),g="attachment"==rb(e).toLowerCase();if(b.M&&!g&&"text/html"==f){if(b.f){var h=a.h[[b.tabId,b.frameId]];h&&(h.c=!0);a.aa(5,b)}return 1}if(c?b.o:b.m)return 1;var k,l,m,x,y,u,p,A,F=a.c,B=b.B,L=B.hostname,I=B.pathname,e=(d=sb(e,"filename")||sb(d,"name"))&&pb(d);if(d)if(e)p=A=!0,b.G=d;else if(!c)return 1;
A||(d=I.split("/").pop(),(e=b.I||pb(d))&&e.toLowerCase()==f.split("/").pop()&&(p=!0));if(!p){var z=Ha[f];if(z)if(z=z.split("|"),e&&z.includes(e))p=!0;else if(c||!e)e=z.shift(),p=!0;!e||p||!g&&f&&!F[10].test(f)||(p=!0)}if(c){var Va=Ua(a,L),z=a.B[Va];switch(Va){case 1:if(z[111].test(I))k=p=!0;else if(z[112].test(I)&&"text/xml"==f)l=!0;else if(z[115].test(I+B.search)&&"application/json"==f)y=!0;else if(z[113].test(I)&&"application/x-www-form-urlencoded"==f||z[114].test(I)&&"video/vnd.mpeg.dash.mpd"==
f)m=!0;break;case 2:(L=z[111].exec(I))&&"application/x-javascript"==f?(f=z[112].exec(b.port.j))&&L[1]!=f[1]||(m=!0):g&&"image"==b.type&&"MP4"==e&&(u=!0);break;case 3:"M4S"==e&&(p=!0),L==z[111]&&z[112].test(I)&&"application/json"==f&&(m=!0)}p&&("M3U8"==e||"F4M"==e?m=!0:"F4F"==e&&(d.endsWith("Seg1-Frag1")||d.endsWith("Seg1-Frag2")||d.includes("Seg1-Frag2_"))&&(x=!0));"ASF"==e&&((f=Z(b.responseHeaders,"Content-Length"))&&102400>=parseInt(f)&&(u=!0),"DCLK-AdSvr"==Z(b.responseHeaders,"Server")&&(u=!0))}if(u)return 1;
p&&(c&&F[3].test(e)?k=!0:c&&F[4].test(e)?b.m=!0:!b.m&&F[1].test(e)&&(h=!0));if(k){var Wa,Xa;if(u=F[11])u.test(B.hostname)?k=!1:(Wa=b.frameId?a.a[b.tabId]:b.port)&&(Xa=Wa.j)&&u.test((new URL(Xa)).hostname)&&(k=!1)}m||x?"POST"!=b.method||b.c?(l=new XMLHttpRequest,l.responseType=x?"blob":"text",b.g=l,l=!0):l=!1:y&&(l=b.l=!0);if(!h&&!k&&!l)return 1;p&&(b.J=e);A&&(b.G=d);b.f|=l;b.i=h?2:k?4:5;b.a|=k||l?256:16|(c?4096:0)|(A||g?0:8388608);return h?3:k?2:4}
n.aa=function(a,b,c,d,e){var f=b.h,g=b.requestHeaders;if(null==d&&1==(f&31)&&(e=Z(g,"Cookie"),null==e))return S(b.url,O(this,a,b,c,!0)),!0;"object"==typeof e&&(e=T(e));null==a&&(a=b.i);var h=b.id,k=b.port&&b.port.id,l=b.timeStamp,m=b.a;d=0;f&64&&(m|=2097152);"POST"==b.method&&(m|=512);c&&c.ip&&(m|=c.ip.includes(":")?4194304:33554432);w&&4>a&&(d|=1);b.f&&b.g&&(d|=1);b.f&&5!=a&&(d|=16);b.b&&(d|=16);c=[h,k,Math.floor(l/1E3),Math.floor(l%1E3*1E3),f&31,a];f={};k=Za(b.url);l=b.responseHeaders;h=b.C;f[6]=
4>a?"idmfc"+k:k;f[17]=b.P;f[4]=b.J;f[100]=b.G;f[8]=m;f[121]=this.i;f[11]=tb(g);f[13]=tb(l);f[18]=tb(h);b.c&&(f[14]=mb(b.c,Z(g,"Content-Type")));b.w&&(f[19]=mb(b.w,Z(h,"Content-Type")));if(null==g){a=this.h;m=[b.tabId,b.frameId];do m=(k=a[m])&&k.a,k=k&&k.j,"about:blank"==k&&(k=null);while(!k&&m);f[50]=k;f[51]=e;f[54]=navigator.userAgent}w&&(f[122]=ub(b.proxyInfo,Z(g,"Proxy-Authorization")||this.G),f[55]=ub(b.H,Z(h,"Proxy-Authorization")||this.G));if(b=this.a[b.tabId])f[7]=b.j,f[110]=b.title;return N(this,
13,1,d,c,f)};n.Oa=function(a,b,c,d){a.resolve=c;a.reject=d;this.aa(null,a,b)};
function Y(a,b,c,d){var e=a.f,f,g;if("object"==typeof b)f=b.requestId;else if(!(b=e[f=b]))return;d&&(g=0<b.statusCode,0>b.tabId?g={cancel:!0}:t&&g&&587202560>C?(g=[{name:"Connection",value:"close"},{name:"Content-Type",value:"multipart/related"},{name:"Content-Length",value:"0"}],g={responseHeaders:g}):t||(w?g&&939524096>C:g)?(g=a.u,g||(g=(g=a.h[[b.tabId,b.frameId]])&&!g.f?ua+"?back=1":ua),g={redirectUrl:g}):g={cancel:!0});var h=b.resolve;h&&void 0!==d&&(b.resolve=b.reject=null,h(g||{}));if(d=b.reject)b.resolve=
b.reject=null,d();!b.i||b.u||h||d||a.aa(null,b,c);if(b.g||b.l)return b.u=!0,g;delete e[f];v&&delete e[b.id];b.b&&(e[b.id]={url:b.url,port:b.port});return g}n.fb=function(a){var b=new URL(a.url);if(b.search.startsWith("?d="))return a=this.a[a.tabId],this.ca("idmreg:"+b.href.substr(b.protocol.length),null,a&&a.j),{redirectUrl:ua+"?register=1"}};
n.gb=function(a){if(!xa||E.includes(a.type)){var b=a.tabId,c=a.frameId;if(!(0>b||0>c)){var d=a.url,e=a.method,f=$a(d);if(f&&("GET"==e||"POST"==e)&&d!=this.u){var g=a.requestId,h=this.f[g],k=this.a[[b,c]],l=a.type.endsWith("_frame"),m="POST"==e,e=this.Aa;w&&m&&h&&Aa(h.statusCode)&&(a.method="GET",m=!1);l&&(c=Sa(this,b,c,a.parentFrameId),c.b!=g&&(c.b=g,c.g=d,c.c=!1),c.f=m);if(k||l||h){if(!e&&m&&a.requestBody){c=a.requestBody;if(m=c.raw)for(var x=0;x<m.length&&(m[x].bytes||(m=null));x++);if(!(m||c.formData||
t&&c.error))return Y(this,g)}d.includes("#")&&(d=a.url=Za(d));a.B=new URL(d);a.f=this.fa.test(d);a.s=this.ea;a.o=e;a.h=f;a.M=l;a.b=0<b&&oa.includes(a.type);a.c=a.requestBody;a.port=k;h&&(a.id=h.id,a.port=h.port,a.s=h.s,a.o=h.o,a.P=h.P||h.url,a.C=h.C||h.requestHeaders,a.w=h.w||h.c,w&&(a.H=h.H||h.proxyInfo));switch(ob(this,a)){case 3:return Y(this,a,null,!0);case 1:a.m=!0;case 4:if(d=this.f,f=a.requestId,d[f]!==a&&(d[f]=a,b=a.id,b||(b=a.id=v?String(this.Ra++):f),b!=f&&(d[b]=a,a=this.h[[a.tabId,a.frameId]])))a.b=
b}}}}}};
n.hb=function(a){var b=this.f[a.requestId];if(b){a=b.requestHeaders=a.requestHeaders;if(w&&b.proxyInfo){var c=ub(b.proxyInfo),d=Z(a,"Proxy-Authorization");c&&(this.G=[c,d])}if("POST"==b.method&&(!b.c||b.c.error&&0<Z(a,"Content-Length")))return Y(this,b);a:{if(w){if(b.m||b.b){a=4;break a}a=this.c;c=b.B;if((d=b.I)&&!c.search&&a[1].test(d)){b.i=1;b.a|=8;a=5;break a}}a=4}switch(a){case 5:return new Promise(this.Oa.bind(this,b,null))}}else if(0>a.tabId&&"xmlhttprequest"==a.type&&(a.initiator?a.initiator==va:
a.originUrl?a.originUrl==wa:1)){b=a.requestHeaders;a={};c=!1;for(d=0;d<b.length;d++){var e=b[d],f=e.name.toLowerCase();f.startsWith("x-idm-")?a[f.substr(6)]=c=!0:"origin"==f&&e.value==va&&(a[f]=c=!0)}if(c){for(d=0;d<b.length;d++)e=b[d],f=e.name.toLowerCase(),a[f]?b.splice(d--,1):f.startsWith("x-idm-")&&(e.name=e.name.substr(6));return{requestHeaders:b}}}};
n.jb=function(a){var b=this.f[a.requestId];if(b){var c=a.responseHeaders;if("image"==b.type){var d=Z(c,"Content-Type");if(d&&d.toLowerCase().startsWith("image/"))return Y(this,b)}"quic"==Z(c,"Client-Protocol")?b.h|=64:(d=Z(c,"Alternate-Protocol"))&&d.endsWith(":quic,p=0")&&"chunked"!=Z(c,"Transfer-Encoding")&&(b.h|=64);d=b.statusLine=a.statusLine;d=b.statusCode=a.statusCode||parseInt(d.split(" ",2).pop());b.N=za(d);b.responseHeaders=c;switch(qb(this,b)){case 1:return Y(this,b,a);case 3:return w?new Promise(this.Oa.bind(this,
b,a)):Y(this,b,a,!0)}if(b.l)return c.push({name:"X-IDM-Request-ID",value:b.id.toString()}),{responseHeaders:c}}};n.kb=function(a){if(a.type.endsWith("_frame")&&(200==a.statusCode||304==a.statusCode)){var b=this.h[[a.tabId,a.frameId]];b&&(b.j=a.url,b.P=b.g)}(b=this.f[a.requestId])&&Y(this,b,a)};n.ib=function(a){Y(this,a.requestId)};
n.ma=function(a,b,c,d,e){if(void 0===a&&(this.X=!1,a=new P(this,!0),browser.storage.local.get("version",Q(a,1)),(w?1124073472<=C:v?1073741824<=C:1)&&browser.extension.isAllowedIncognitoAccess(Q(a,2)),t&&browser.management.get("jeaohhlajejodfjadcponpnjgkiikocn",Q(a,3)),ea&&"ngpampappnmepgilojfohadhhmbhlaek"!=browser.runtime.id&&browser.management.get("ngpampappnmepgilojfohadhhmbhlaek",Q(a,4)),R(a)))return;a=browser.runtime.getManifest();a=a.version||"";"object"==typeof b&&(b=b.version||"");c=null!=
c&&!c;"object"==typeof d&&(d=d.enabled&&d.id);d&&browser.management.setEnabled(d,!1);"object"==typeof e&&(e=e.enabled&&e.id);e&&browser.management.setEnabled(e,!1);d=this.Ca;e=this.Ba;a&&a!=b&&null!=b&&(browser.storage.local.set({version:a}),b&&d&&!e||(a="current="+escape(a),b&&(a+="&previous="+escape(b)),d&&(a+="&manager="+(d?[d>>24&255,d>>16&255,d>>8&255,d&255].join("."):"")),e&&(a+="&update=1"),c&&(a+="&incognito=1"),v&&(a+="&msedge=1"),w&&(a+="&mzffox=1"),ea&&(a+="&opera=1"),browser.tabs.create({url:browser.runtime.getURL("welcome.html?"+
a)})))};function lb(a,b,c){b||(b=(b=ta.exec(c[13]))?b[1]<<24|b[2]<<16|b[3]<<8:0);a.Ca=b;a.Ba=102826752>b}function jb(a,b){var c=browser.i18n.getMessage(b);w?browser.tabs.executeScript(a,{code:'window.alert(unescape("'+escape(c)+'")); true;'},hb):window.alert(c)}n.D=function(a,b,c){var d=r(arguments);if(w||v)d[2]=function(){return c.apply(null,arguments)};this.za.push(d);b.addListener.apply(b,d.slice(2))};
function P(a,b){this.caller=arguments.callee.caller;this.c=a;this.b=r(arguments,1);this.a=0;this.g=this.f=!1}function Q(a,b){a.a++;return a.i.bind(a,b)}function R(a){return a.a?a.f=!0:a.g?(a.caller.apply(a.c,a.b),!0):!1}P.prototype.i=function(a,b){browser.runtime.lastError;this.b[a]=b;0==--this.a&&(this.f?this.caller.apply(this.c,this.b):this.g=!0)};P.prototype.h=function(a,b,c){var d=r(arguments,3);c&&(d=c.concat(d));a.apply(b,d);this&&0==--this.a&&this.caller.apply(this.c,this.b)};
function O(a){var b=r(arguments,1),c=b[b.length-1];c instanceof P?c.a++:c=null;return P.prototype.h.bind(c,arguments.callee.caller,a,b)}function Qa(a){return browser.i18n.getMessage(a)||a}function Za(a){var b=a.lastIndexOf("#");return 0>b||b<a.indexOf("?")?a:a.substr(0,b)}function ub(a,b){if(a){var c=a.type;if("direct"==c)return"0";"socks"==c&&(c="socks5");if(Ba(c))return c="1:"+c+"://"+a.host+":"+a.port,b&&(c+="string"==typeof b?";"+b:b[0]==c&&b[1]?";"+b[1]:""),c}}
function K(a,b){if(a){if("string"==typeof a)return a.startsWith(":")?void 0:b?"socks"+(b.socksVersion||4)+"://"+a+(4<b.socksVersion&&b.proxyDNS?"#":""):"http://"+a;var c=a.scheme||"http";if(Ba(c))return c+"://"+a.host+(a.port?":"+a.port:"")}}function T(a){var b="";if(a&&a.length)for(var c=0;c<a.length;c++)b&&(b+="; "),b+=a[c].name,b+="=",b+=a[c].value;return b}function tb(a){if(!a||!a.length)return null;for(var b="",c=0;c<a.length;c++)b+=a[c].name,b+=": ",b+=a[c].value,b+="\n";return b}
function Z(a,b){if(!a)return null;b=b.toLowerCase();for(var c=0;c<a.length;c++)if(a[c].name.toLowerCase()==b)return a[c].value;return null}
function sb(a,b){if(!a)return null;var c,d,e=a.split(";");for(b=b.toLowerCase();e.length;){var f=e.shift(),g=f.indexOf("=");if(0<g){var h=f.substr(0,g).trim().toLowerCase(),k="*"==h[h.length-1];if(k)h=h.substr(0,h.length-1).trimRight();else if(d)continue;if(h==b)if(f=f.substr(g+1).trim(),g=f.length-1,'"'==f[0]&&'"'==f[g]&&(f=f.substring(1,g)),k){if(f=f.split("'",3),k=f.shift().toLowerCase(),(g="utf-8"==k||"utf8"==k)||!d)if(c=unescape(f.pop()),d=k,g)break}else c=unescape(f)}else 0>g&&null==c&&f.trim().toLowerCase()==
b&&(c="")}return c}function rb(a){var b=/[;,]/;return a&&(a=a.split(b,1).shift().trim())&&!a.includes("=")&&unescape(a)||""}
function mb(a,b){var c=a.raw;if(c){for(var d=String.fromCharCode,e="",f=0;f<c.length;f++){var g=c[f].bytes;if(!g)return null;for(var g=new Uint8Array(g),h=g.length,k=0;k<h;k++)e+=d(g[k])}return e}c=a.formData;if(!c)return null;f=rb(b).toLowerCase();e=[];if(f&&"application/x-www-form-urlencoded"!=f)if("multipart/form-data"==f){(g=sb(b,"boundary"))||(g="----WebKitFormBoundary"+Math.random().toString(36).substr(2));for(d in c)for(h=c[d],f=0;f<h.length;f++)e.push("--",g,'\r\nContent-Disposition: form-data; name="',
d,'"\r\n\r\n',h[f],"\r\n");e.push("--",g,"--\r\n")}else return null;else for(d in c)for(h=c[d],d=d.split(" ").map(encodeURIComponent).join("+"),f=0;f<h.length;f++)e.length&&e.push("&"),e.push(d,"=",h[f].split(" ").map(encodeURIComponent).join("+"));return e.join("")}function pb(a){return(a=sa.exec(a))?a.pop().toUpperCase():""}function $a(a,b){var c=a.split(":",1).shift().toLowerCase(),c=Ga[c]||0;return b?c&31:c}
function vb(a){if(void 0===a){var b=navigator.userAgent;a=b.match(/\b(?!(?:Safari|Chrome|Gecko)\/)\w+\/(\d+)(?:.(\d+))?(?:.(\d+))?(?:.(\d+))?\b(?!.*[()])/);if(b=w?a:b.match(/\bChrome\/(\d+)\.(\d+)\.(\d+)\.(\d+)\b/)){C=b[1]<<24|b[2]<<22|b[3]<<8|b[4];fa=b[0];ga=a?a[0]:b[0];browser.runtime.getBrowserInfo&&browser.runtime.getBrowserInfo(vb);try{w&&browser.privacy.websites.firstPartyIsolate.get({},vb)}catch(c){}if(a=browser.webRequest.ResourceType)if(a.MEDIA&&(E.push("media"),oa.push("media")),a.OBJECT_SUBREQUEST||
(xa=w&&922746880>C))E.push("object_subrequest"),oa.push("object_subrequest")}}else"version"in a?(b=a.version.split(/\D+/),C=b[0]<<24|b[1]<<22|b[2]<<8|b[3],fa=ga=a.name+"/"+a.version):"value"in a&&(ha=a.value)}function hb(a){browser.runtime.lastError;a;!0}
var Pa=[[!0,-11,"menu_download_link","link,image",J.prototype.oa],[!0,-11,"menu_download_link","page,frame,editable",J.prototype.oa,qa],[!0,-11,"menu_download_selected","selection",J.prototype.Da],[!0,-12,"menu_download_all","page,frame,editable",J.prototype.Da],[t,-11,"menu_download_item","link",J.prototype.oa,["chrome://downloads/*"]]];String.prototype.startsWith||(String.prototype.startsWith=function(a,b){return this.substr(b||0,a.length)===a});
String.prototype.endsWith||(String.prototype.endsWith=function(a,b){b=(null==b||b>this.length?this.length:b)-a.length;return 0<=b&&this.lastIndexOf(a,b)==b});vb();new J;
