var n;Array.prototype.includes||(Array.prototype.includes=function(a,b){return 0<=this.indexOf(a,b)});NodeList.prototype[Symbol.iterator]||(NodeList.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator]);HTMLCollection.prototype[Symbol.iterator]||(HTMLCollection.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator]);const aa=Boolean,q=RegExp.prototype.test,ca=RegExp.prototype.exec,da=Array.isArray,ea=Array.from,fa=Array.prototype.includes;Array.prototype.concat.bind([]);
const ha=Function.call.bind(Array.prototype.slice),ia=Function.apply.bind(Array.prototype.push),ja=Function.apply.bind(String.fromCharCode,null),w=Math.floor,z=Math.random,B="undefined"==typeof browser;B&&(browser=chrome);const C=navigator.userAgent.includes("Edge/"),ka=navigator.userAgent.includes("Edg/"),D=navigator.userAgent.includes("Firefox/"),la=navigator.userAgent.includes("OPR/"),ma=navigator.userAgent.includes("YaBrowser/");var F=0,na,G,oa,ra,sa;const ta=D?69:C?77:66,ua=D?220:150,H=browser.runtime.getManifest();
var va=H.permissions.includes("notifications")||null;const wa={16:"images/logo16.png",32:"images/logo32.png"},xa={16:"images/logo16x.png",32:"images/logo32x.png"},ya=["127.0.0.1:1001","0.1.0.1:1001"],za=B?"Chrome_RenderWidgetHostHWND":D?"MozillaWindowClass":C?"Windows.UI.Core.CoreWindow":null,Aa=/(?!)/,Ba=["main_frame","sub_frame"],Ca=["object","image"];var I=Ca.concat("xmlhttprequest",C?"other":[]),Da=Ba.concat(Ca,"xmlhttprequest","other");
const J=["*://*/*"],Ea=["ftp://*/*"],Fa=J.concat(Ea,"file:///*",B?"about:blank":[]),Ga=J.concat(B?"about:blank":[]),Ha=B&&btoa(z().toString().substr(2,9)),Ia=browser.runtime.getURL("captured.html?"+(Ha?"auth="+Ha+"&":"")),Ja=browser.runtime.getURL("welcome.html?"+(Ha?"auth="+Ha+"&":"")),Ka=browser.runtime.getURL("").slice(0,-1),La=location.href,Ma=la||ma,Na=B||C,Oa=!D;var Pa=B;
const Qa=q.bind(/^(?:chrome|about|chrome-extension|chrome-search|ms-browser-extension|ms-appx-web|moz-extension):/),Ra=q.bind(/^(?:Host|Origin|Referer|Cookie|User-Agent|Connection|DNT|Accept-Encoding|Sec-.+)$/i),Sa=q.bind(/^(?:application\/(?:json|x-javascript)|text\/(?:javascript|plain))$/),Ta=q.bind(/^(HTM|HTML|CGI|PHP|ASP|ASPX|JSP|JSPX)$/i),Ua=q.bind(/^(MPD|M3U8|F4M)$/i),Va=q.bind(/^ftp:|^idmreg:|\bidman|\binternetdownloadmanager\b/i),Wa=q.bind(/^[GPTSDVACRHX]*$/);ca.bind(/:\/\/.+\/([^/]+?(?:\.([^./]+?))?)(?=[?#]|$)/);
const Xa=ca.bind(/\.([^.\\/]*?)(?:\.[0-9.]+)?$/),Ya=ca.bind(/^v(\d+)\.(\d+)(?:b(\d+))?\b/),Za=fa.bind([301,302,303,307,308]),$a=fa.bind([301,302,303]),ab=q.bind(/messaging host not found|no such native application|application is not installed/i),bb=q.bind(/^(?:https?|socks[45])$/),cb={direct:2,auto_detect:3,system:4,pac_script:5,fixed_servers:7},db=[],eb={"-1":[2,[111,112],[111]],1:[2,[115,116,117,118,119,120,121,123],[115,111,112,113,114]],2:[2,[114,113,113,115,116,117,118,122,119,121,124,125,120,
123,112],[111,112,114]],3:[null,[113],[112]],4:[2,[111,101,113,112,114,118,119,115,116,117,120,121,122,123],[111]],5:[null,[111,112,113],[111]],6:[null,[],[111]]},fb={16:1,17:2,18:4,45:8,46:16},gb={http:1,https:9,ftp:2,ftps:10,idmreg:12,xup:33},hb={"text/html":"HTML|HTM","text/css":"CSS","text/javascript":"JS|JSON","text/mspg-legacyinfo":"MSI|MSP","text/plain":"TXT|VTT|SRT|M3U|PLS|M3U8|MPD|F4M|TORRENT|BTT","text/srt":"SRT","text/vtt":"VTT|SRT","text/xml":"XML|MPD|F4M|TTML|TTML2","text/x-javascript":"JS|JSON",
"text/x-json":"JSON","application/dash+xml":"MPD","application/f4m+xml":"F4M|MPD","application/gzip":"GZ","application/javascript":"JS","application/json":"JSON","application/json+protobuf":"JSON","application/msword":"DOC|DOCX|DOT|DOTX","application/ocsp-response":"OCSP","application/octet-stream-m3u8":"M3U8","application/pdf":"PDF","application/pkix-crl":"CRL","application/torrent":"TORRENT|BTT","application/ttaf+xml":"DFXP","application/ttml+xml":"TTML|TTML2","application/vnd.apple.mpegurl":"M3U8",
"application/zip":"ZIP","application/x-7z-compressed":"7Z","application/x-aim":"PLJ","application/x-bittorrent":"TORRENT|BTT","application/x-chrome-extension":"CRX","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|TSV|M3U8",
"video/mp4":"MP4|M4V|M4S","video/mpeg":"MPG|MPEG","video/mpegurl":"M3U|M3U8","video/mpg4":"MP4|M4V","video/msvideo":"AVI","video/quicktime":"MOV|QT","video/vnd.mpeg.dash.mpd":"MPD","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/mp2t":"TS|TSA|M3U8","audio/mp3":"MP3","audio/mp4":"M4A|MP4|M4S",
"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/avif":"AVIF","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 ib(a,b,c,d,e,f,h){if(a){var g=["MSG#",a,"#",b,"#",c,"#",d];this.f=a;this.type=b;this.o=c;this.h=d;this.a=e||[];this.j=g;if(e)for(a=0;a<e.length;a++)g.push(":",e[a]||0);if(f)for(var k in f)if(e=f[k],null!=e)if(g.push(",",k,"="),e instanceof Array){a=g.length;b=0;for(var l of e)b=l instanceof Uint8Array?b+(h?jb(l=ja(l)):l.length):b+jb(l=l.toString()),g.push(l);g.splice(a,0,b,":")}else"string"==typeof e||e instanceof String?g.push(jb(e),":",e):e instanceof Blob?g.push(e.size,":",e):g.push(e)}else this.l=
new FileReader}function kb(){this.a=kb.prototype.h++}kb.prototype.h=1;function lb(a,b,c,d){this.id=a;this.port=b;c&&(this.b=c=c.toLowerCase(),this.c="iframe"==c);d&&(this.f=d)}lb.prototype.a=0;function mb(a,b,c){this.id=a+","+b;this.c=null==c||0>c?null:a+","+c}function nb(){}function ob(a){a.g||(a.j.push(";"),a.g=!0);return a.j.join("")}function pb(a){a.g||(a.j.push(";"),a.g=!0);return new Blob(a.j)}function qb(a,b,c){a.g?a.c(a):(b.a=c||0,b.b=0,a.l.onload=a.s.bind(a,b),rb(a,b,0,50))}
ib.prototype.s=function(a){for(var b=this.l.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.f=parseInt(d[1]);this.type=parseInt(d[2]);this.o=parseInt(d[3]);this.h=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 rb(this,a,b.length,100);a.b=
4}f=e.length+1;d=this.a=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));d=c.shift().split(":",2);var h=d.shift();f=h.length;e=!1;if(d.length)f++;else{if(!c.length)return rb(this,a,b.length,25);e=!0}d=h.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.l.readAsText(a):this.c(this);return;case 3:return this[a.f]=b,a.a+=a.c,a.b++,rb(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.g=!0;this.i(this);a.size>a.a&&(b=new ib,b.i=this.i,b.c=this.c,qb(b,a,a.a));return}};function rb(a,b,c,d){var e=b.a;c=e+c;b.size>c?a.l.readAsBinaryString(b.slice(e,c+d)):a.c(a)}
function K(){var a=this.constructor.prototype,b;for(b in a)b.startsWith("_")||"constructor"==b||(this[b]=a[b].bind(this));this.j=0;this.A=null;this.v=this.ga=0;this.Sa=1;this.C=null;this.Da=H.version||"";this.Wa="";this.ha=0;this.wa=this.Z=!1;this.L=null;this.Ka=this.Ta=this.pa=this.o=!1;this.G=!D;this.eb=this.La=!0;this.Ma=this.J=this.M=null;this.Ua=this.Y=this.$=!1;this.Ra=!0;this.hc=this.dc=1;this.sa=this.l=this.R=null;this.xa=1;this.fb=0;this.I=this.H=this.Ba=null;this.Na=Aa;this.N=[];this.va=
0;this.Qa=null;this.ya=this.ua=!1;this.S=this.s=null;this.ia=Array(16);this.c={};this.i={};this.a={};this.u={};this.b={};this.K={};this.g={};this.f={};this.fa={};this.W={};this.h={};this.U={};this.X={};this.X.ac=[];this.Ga=[];browser.browserAction&&(L(this,!1),browser.browserAction.onClicked.addListener(this.ob));D&&1056964608<=F&&browser.contextMenus.onShown.addListener(this.pb);D&&browser.runtime.onInstalled.addListener(this.tb);browser.runtime.onMessage.addListener(this.ub);browser.windows.onCreated.addListener(this.bb);
browser.windows.onRemoved.addListener(this.cb);browser.windows.onFocusChanged.addListener(this.Wb);browser.windows.onBoundsChanged&&browser.windows.onBoundsChanged.addListener(this.Vb);browser.tabs.onActivated.addListener(this.Lb);browser.tabs.onUpdated.addListener(this.Ob);browser.tabs.onRemoved.addListener(this.Nb);browser.tabs.onAttached&&browser.tabs.onAttached.addListener(this.Mb);B&&1056964608<=F&&browser.webRequest.onBeforeRequest.addListener(this.qb,{urls:[browser.runtime.getURL("*")]},["blocking"]);
this.cc();this.gb()}function sb(){}sb.prototype=[];var M=sb.prototype;sb=null;n=K.prototype;n.pb=function(a,b){b&&tb(this,b.id,!0,!1,!0)};n.tb=function(a){this.Da=a.version=H.version;this.bc=a};function ub(a,b){b&&browser.storage.local.set({consent:a.Da});a.J=null;a.za(5);a.G=!0;vb(a)}n.ub=function(a,b){switch(a[0]){case 38:a[1]&&this.Z&&browser.storage.local.set({silent:!0});browser.tabs.remove(b.tab.id);break;case 42:ub(this,!0);break;case 43:browser.management.uninstallSelf({showConfirmDialog:!0})}};
n.ob=function(a){if(this.Ua){if(this.J)return browser.windows.update(this.J,{focused:!0});var b=a.id,c=this.h[b];L(this,c,b,!0);this.Y&&(c?(this.ea(a.windowId),wb(this,b)):xb(this,b))}};function L(a,b,c,d){c?a.h[c]=!b:a.Ua=b||d;yb(b,c,d)}
function yb(a,b,c){if(c||!b||!a){var d=a;D&&!b&&(a||c?browser.browserAction.enable():browser.browserAction.disable(),d=!0);c=a?zb+Ab:b?Bb+Ab:c?Bb:Cb;var e=d?wa:xa,f=D&&b&&989855744<=F;if(C||B&&822083584>F)e=e[16];C||browser.browserAction.setTitle({title:a&&f?null:c,tabId:b});browser.browserAction.setIcon({path:d&&f?null:e,tabId:b});a||browser.browserAction.setBadgeBackgroundColor({color:"#606060"});browser.browserAction.setBadgeText({text:a?f?null:"":"X",tabId:b})}}
function vb(a){var b=a.c,c=a.U={};browser.contextMenus.removeAll();for(var d=0;d<Db.length;d++){var e=Db[d];e[0]&&b[e[1]]&&(c[d]=browser.contextMenus.create({title:Eb(e[2]),contexts:e[3].split(","),onclick:e[4].bind(a),documentUrlPatterns:e[5]||Fa,enabled:!0}))}a.Y||(a.Y=!0,L(a,!0),a.D(1,browser.runtime.onConnect,a.Gb),B&&a.D(1,browser.proxy.settings.onChange,a.$a),B&&browser.proxy.settings.get({},a.$a),a.D(1,browser.webNavigation.onCreatedNavigationTarget,a.Eb),a.D(1,browser.webNavigation.onCommitted,
a.Za),a.D(1,browser.webNavigation.onHistoryStateUpdated,a.wb),(b=a.c[17])&&a.D(2,browser.webRequest.onBeforeRequest,a.Pb,{urls:b.split("|"),types:Ba},["blocking"]),Fb(a,!0),browser.tabs.query({url:J},a.qa))}
function Fb(a,b){B&&a.o&&browser.downloads.setShelfEnabled(!b);if(b){B&&a.o&&a.D(3,browser.downloads.onCreated,a.rb);B&&a.o&&a.D(3,browser.downloads.onDeterminingFilename,a.sb);b=ra?void 0:Da;const c=["blocking"],d=B&&!sa&&1207959552<=F?["extraHeaders"]:[];a.D(4,browser.webRequest.onBeforeRequest,a.ab,{urls:Ea,types:Ba},c);a.D(4,browser.webRequest.onBeforeRequest,a.ab,{urls:J,types:b},["requestBody"]);a.D(4,browser.webRequest.onBeforeSendHeaders,a.Rb,{urls:J,types:b},["requestHeaders"].concat(c,d));
a.D(4,browser.webRequest.onHeadersReceived,a.Tb,{urls:J,types:b},["responseHeaders"].concat(c));a.D(4,browser.webRequest.onResponseStarted,a.Ub,{urls:J,types:b});a.D(4,browser.webRequest.onErrorOccurred,a.Sb,{urls:J,types:b});D&&a.D(4,browser.webRequest.onBeforeRedirect,a.Qb,{urls:J,types:Ba})}else a.za(3,4)}
n.$a=function(a){browser.runtime.lastError;if(a){var b=a.value;a=cb[b.mode];var c,d;this.ia.fill(void 0);if(5==a&&(d=b.pacScript))d.data&&5E4<d.data.length?a=4:(c=d.data)?(a=6,c=c.replace(/\blet\b/g,"var").replace(/,(?=(?:\s*\/\/.*?\n)*\s*[\]}])/g,"")):c=d.url,this.ia.fill(!0);else if(7==a){b=b.rules;d=b.bypassList;c=Gb(this,b.singleProxy);if(!c){c=Gb(this,b.fallbackProxy);var e=Gb(this,b.proxyForHttp,1),f=Gb(this,b.proxyForHttps,9);b=Gb(this,b.proxyForFtp,2);e!=f||e!=b||e!=c&&c?(c=(e||"")+";"+(f||
"")+";"+(b||"")+";"+(c||""),++a):c=e}d&&d.length&&(c+=";"+d.join(","))}b=5>a?a.toString():c?a+":"+c:null;b!=this.s&&(this.s&&this.Ia(),this.s=b)}};function Gb(a,b,c){if(b){var d=b.scheme||"http",e="https"==d;a=a.ia;c?a[c]=e:a.fill(e);if(bb(d))return d+"://"+b.host+(b.port?":"+b.port:"")}}
function Hb(a,b,c,d){if(b){var e=b.type;if("direct"==e)return"0";"socks"==e&&(e="socks5");if(bb(e)){var f="1:"+e+"://"+b.host+":"+b.port;"socks5"==e&&b.proxyDNS&&(f+="#");c||d||!(c=a.S)||(c=c.substr(c.indexOf(";")+1||c.length));c&&(f+=";"+c);d&&f&&(a.S=f);return f}}}
n.Ia=M[M.length]=function Ib(a,b){if(void 0===a){if((Oa||Pa)&&this.j){var d=this.H;d||(b="http://"+(1==this.j?(new URL(this.A.url)).host:ya[0]),d=b+"/status/204+IDM");a=new XMLHttpRequest;a.timeout=1E3;a.onreadystatechange=Ib.bind(this,a,b);a.open("GET",d,!0);a.send()}}else 4==a.readyState&&(204!=a.status?this.H=this.I=null:b&&(this.H=b+"/status/204+IDM",this.I=Oa&&this.C?b+"/client/"+this.C:null))};n.ta=function(a,b,c,d){var e=this.g;return b in e?e[b]:e[b]=new lb(b,a,c,d)};
function Jb(a,b){a=a.f;var c=b.id;a[c]!==b&&(a[c]=b,C&&(a[b.requestId]=b));D&&b.v&&(a[b.v]=b)}function Kb(a,b,c,d,e){if(N(b)){var f=b.frameId||0;var h=b.parentFrameId;var g=b.method&&b.id;d||(d=b.tabId);e||(e=b.url)}else f=b;var k=a.u[d+","+f];k||(k=new mb(d,f,h),a.u[k.id]=k);g?(k.f!=g&&(k.f=g,k.j=e,k.g=!1,k.b&&(k.b=e.startsWith(b.initiator||b.originUrl))),k.h="POST"==b.method):e&&(e.startsWith("about:blank")?f&&(k.b=!0):k.m=e);null!=c&&(k.refresh=c);return k}
function Lb(a,b){return a.u[b.tabId+","+b.frameId]}function Mb(a){var b=new kb;return a.K[b.a]=b}function Nb(a,b){delete a.K[b instanceof kb?b.a:b]}function Ob(a,b){for(var c of a.N)if(c&&c[101].test(b))return c.na;return 0}
n.Aa=function(){var a=this.ga%(ya.length+1);if(a<ya.length){a=ya[a];var b=this.C||0,c=z().toString().substr(2,9);a=this.A=new WebSocket("ws://"+a+"/?cid="+b+"&rnd="+c,"plugin.v3.internetdownloadmanager.com");a.onopen=this.Ea;a.onclose=this.V;a.onmessage=this.Kb;a.onerror=P;1==a.readyState?this.Ea(1):3==a.readyState?this.V():a.timeout=window.setTimeout(this.V,1500,a)}else C?this.V():(a=this.A=browser.runtime.connectNative("com.tonec.idm"),a.onDisconnect.addListener(this.V),a.onMessage.addListener(this.xb),
a.timeout=window.setTimeout(this.Ea,0,2))};n.Ea=function(a){var b=this.A;b&&b.timeout&&(window.clearTimeout(b.timeout),b.timeout=null);this.j=N(a)?1:a;this.Sa=1;this.Z=!1;a=browser.i18n.getUILanguage().replace("_","-");"sr"==a&&(a+="-Cyrl-CS");b=[93,60,Ma?1028:1031,0,16845059,this.C];var c={};c[112]=G;c[113]=na;c[114]=za;c[125]=JSON.stringify(this.bc);c[116]=a;Q(this,2,3,Ma?0:1024,b,c)};
n.V=function(a){var b=browser.runtime.lastError||a&&a.error,c=this.A;c&&c.timeout&&(window.clearTimeout(c.timeout),c.timeout=null);if(c instanceof WebSocket){if(a===c)return c.close()}else c&&ab(b&&b.message)&&(this.Z=!0);this.A=null;this.j&&(this.j=0,this.fa={},Fb(this,!1),this.za(1,2),this.Y=!1,this.s=this.I=this.H=null,L(this,!1));a=++this.ga;b=ya.length+1;c=a/b;120>c&&(1==c&&Pb(this),!a||a%b?this.Aa():window.setTimeout(this.Aa,5E3*c))};
n.Kb=function(a){var b=new ib;b.i=this.Ya;b.c=this.V;qb(b,a.data)};n.xb=function(a){var b=new ib;b.i=this.Ya;b.c=this.V;qb(b,new Blob([a]))};function Q(a,b,c,d,e,f,h){var g=a.j;if(!g)return 0;1==b&&92>a.v&&4>e.length&&(e.length=4);var k=a.Sa++;b=new ib(k,b,c,d,e,f,2==g);if(h)return h.open("POST",a.I+"?seq="+k,!1),h.send(pb(b)),200==h.status?k:0;if(1==g)a.A.send(pb(b));else try{a.A.postMessage(ob(b))}catch(l){return a.V(),0}d&1&&(a.fa[k]=b);return k}
function Sb(a,b){if(b.a){var c=b.a[1]||b.a[6],d=a.f[c];if(d)return d.c?b.b=d.port.id:null;d=a.i;for(var e in d)if(d[e].f==c)return b.b=e}e=b[6];d=b[17];var f=b[50],h=b[7],g=a.X,k=a.g;a=a.a;var l;if((l=g[e])||(l=g[d]))return b.b=l.id;if(l=g[f])var m=l.id;for(c in k){g=k[c];var p=g.f;if(p){if(p==e||p==d||p==f){l=g.port;if(h){var t=a[l.tabId];t&&t.m!=h&&(l=null)}if(l)return b.b=l.id}if(p==h)var r=g.port.id}}return m?b.b=m:r?b.b=r:null}
n.kb=M[M.length]=function Tb(a,b,c,d){var f;a:for(;!c;){if(f=a.b)return f;if(a.a){var h=this.a[a.a[6]+","+a.a[7]];h?f=h.id:(h=a.a[7])&&this.i[h]&&(f=h)}if(f||(f=Sb(this,a)))break;var g=this.i,k=a[50],l=a[7],m;for(m in g){h=g[m];if(h.m==k){f=m;break a}h.m==l&&(f=m)}if(f)break;return l?browser.tabs.query({url:l},Tb.bind(this,a,b,!0)):null}return c?(browser.runtime.lastError,d&&(d=d.shift())&&(h=this.a[d.id])&&(f=a.b=h.id),b&&b(f)):a.b=f};
n.Oa=M[M.length]=function Ub(a,b,c){var e=a.tabId,f=a.ba;if(b)if(da(c))for(var h=a.m,g=h.includes("#")&&Vb(h),k=c.length;k--;){b=c[k];var l=b.frameId;if(l!=f)if(l&&!b.sc&&(b.url==h||g&&b.url==g))f=a.ba=l;else continue;var m=b.parentFrameId;break}else c?m=c.parentFrameId:browser.runtime.lastError;else if(0<f?!a.c:null==f){if(f&&822083584<=F)return browser.webNavigation.getFrame({frameId:f,tabId:e},Ub.bind(this,a,!0));if(f||a.m)return browser.webNavigation.getAllFrames({tabId:e},Ub.bind(this,a,!0))}0<=
m&&(a.c=e+","+m);if(null!=f&&a.i){if(b=this.u[e+","+f])a.f=b.f,a.g|=b.g,a.refresh|=b.refresh,a.l=b.b,(c=b.ca)&&a.m!=c&&(a.ca=c),a.c||(a.c=b.c),(c=this.f[a.f])&&!c.port&&(c.port=a);this.a[e+","+f]=a;m=this.pa?1:null;c=a.na;e=[11,this.v,a.id,e,f,c,a.refresh,a.g,m&&db[m]];c&&a.g&&(f=this.N[c],e.push(db[f.lb]),ia(e,f.ib.map(Wb(f)).map(Xb)));a.postMessage(e)}};
n.la=M[M.length]=function Yb(a,b,c,d,e,f,h,g){var l=Zb(a);if(!l)return 0;var m=0<(l&32),p=1==(l&=7);if(p&&!m){if(!h)return R(a,Yb.bind(this,a,b,c,d,e,f,!0));N(g)&&(g=S(g))}h=[l];l={};l[6]=Vb(a,p,this);l[50]=b;l[7]=c;l[8]=d;l[100]=e;l[102]=f;l[51]=g;l[54]=navigator.userAgent;l[121]=D?this.S:this.s;Q(this,14,1,0,h,l);return 3};
n.ec=M[M.length]=function $b(a,b,c,d,e,f){if(c){var g=c.c;var k=c.L;var l=c.l}if(!d){if(!a||!a.length)return;f=ac();g&&!k&&R(g,e=T());for(var m of a)R(m[0],f[f.length]=T());return U($b,this,a,b,c,!0,e,f)}e&&(k=S(e));for(m of a)m[5]=S(f.shift());b=0;c=[0,0,0];d={8:4};d[54]=navigator.userAgent;d[7]=g;d[110]=l;d[111]=k;d[121]=D?this.S:this.s;1<a.length&&(c[1]=Q(this,15,1,0,[a.length],d),b=16,d={});for(m of a)c[2]++,d[6]=m[0],d[100]=m[2],d[102]=m[3],d[50]=m[4],d[51]=m[5],Q(this,14,2,b,c,d)};
function tb(a,b,c,d,e,f,h,g,k){if(!d||a.c[-5]){var l=a.a[b];if(l){var m=Mb(a);m.tabId=b;m.port=l;m.C=c;m.H=e;m.b=0;m.f=[];if(l=d&&!!f)m.I=!0,m.K=f,m.u=h,m.v=g,m.s=k,f.b||bc(a,f);f=m.a;(d=d&&a.c[12])?(d=d.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/~/g,"(?:.*\\.)?"),d="^(?:http|https|ftp|ftps)://(?:[^\\/]*@)?(?:"+d+")(?::\\d+)?(?:\\W|$)"):d="^(?:http|https|ftp|ftps)://";m.g=cc(a,b,[12,f,c,l||e,d]);m.A=0;m.g||Nb(a,m)}}}
n.Yb=function(a,b,c,d,e,f,h,g){if(a=this.K[b]){d&&(a.b+=d);h&&(a.c=h);g&&(a.l=g);if(e&&("string"==typeof e&&(e=JSON.parse(e)),e instanceof Array)){if(f)for(var k of e)k[4]=f;ia(a.f,e)}++a.A<a.g||(a.I?(d=a.tabId,(e=this.b[a.port.a])&&e.B==d&&a.b&&(f=a.s,h=e.b,g=e.a,Q(this,10,1,0,[4294967295,e.l,Math.round(a.u*f+(e.h+h)*g),Math.round(a.v*f+(e.A+h)*g),0,a.b]),this.l=d,cc(this,d,[13,!0]))):a.H?(d=0<a.b,this.Ra!=d&&(this.Ra=d,browser.contextMenus.update(this.U[2],{visible:d}),browser.contextMenus.refresh())):
(d=a.f,d.length?this.ec(d,a.C,a):dc(a.tabId,"cannot_find_links")),Nb(this,a))}};n.Cb=function(a,b,c,d){if(a=this.K[b])this.la(a.j,a.o,a.c,a.i,c,d),Nb(this,a)};n.Fb=function(a,b,c,d,e,f){this.ta(a,b,c,d);a=[b,a.tabId,a.f,a.na];b={};b[132]=d;b[134]=e;b[133]=f;Q(this,23,1,0,a,b)};
n.aa=M[M.length]=function ec(a,b,c){if(4294967295==a)this.l=null,c=!0;else{var e=this.g[a];if(e){c=e.a;if(!c)return;if(b)switch(c){case 3:return;case 2:break;default:e.a=3;window.setTimeout(ec.bind(this),1E3,a,!1,!0);return}e.a=0;c=!0}}c&&Q(this,8,1,32,[a])};
n.mc=function(a,b,c,d,e,f,h,g,k){var l=a.tabId,m=a.a,p=this.b[m],t=this.h[l];if(b){var r=this.K[b],x=r&&r.G;if(x){if(!c&&a.l){var y=this.a[a.c];if(y)return y.postMessage([15,b,null,x[6],x[17],x[50],x[31],x[133]])}var v;if(!d){if(!c||null==e){if(!a.b){c=a.ma;f="iframe";h=a.m;var u=!!c}if(!u){c=l;f=h=null;var A=!0}}a=this.ta(a,c,f,h);p=l==p.B&&!p.O&&(A||u||e)&&!t;!p||A||a.a||window.setTimeout(this.ea,3E3,m);var O=2;a.a=p?1:2;var E=(p?128:64)|(A?512:0);!g&&(v=this.a[l])&&(g=v.o)}V(this,x,O||1,E||0,m,
l,c,g,k);!O||A||t||fc(this,c,e);Nb(this,r)}}else d?(this.aa(c,!0),delete this.g[c]):l!=p.B||p.O||t||(e?fc(this,c,e,!0):gc(this,c))};function hc(a,b){var c=a.b[b];if(c&&c.ja){var d=c.b,e=c.a;Q(a,7,2,c.O?128:c.o?256:c.g?512:0,[b,Math.round((c.h+d)*e),Math.round((c.A+d)*e),Math.round((c.width-d-c.s)*e),Math.round((c.height-d)*e)])}}
function fc(a,b,c,d){var e=a.g[b];if(e&&e.a){var f=e.port,h,g=256;2==e.a&&(null==d&&(h=a.b[f.a])&&(d=f.tabId==h.B&&!h.O),d?(g|=128,e.a=1):g|=64);(d=e.c)&&!c&&(c=f.h);if(c){var k=c[0];var l=c[1];var m=c[2]||k+1;var p=c[3]||l+1;var t=c[4];if(c=!d&&f.h)k+=c[0],l+=c[1],m=Math.min(m+c[0],c[2]),p=Math.min(p+c[1],c[3]);if(f=a.a[f.tabId])var r=f.u}Q(a,9,1,g,[b,k,l,m,p,t,r])}}
n.ea=function(a){var b=this.h,c=this.a,d=this.b,e=a?[d[a]]:W(d);a=[];d={};for(var f of e)!f||f.O||f.da||b[f.B]||a.push(f.B);if(a.length)for(var h of W(this.g))h.a&&(b=h.port,f=b.tabId,a.includes(f)&&((f=b.b?b:c[f])&&f.update&&(f.update=!1,f.postMessage([14,!1])),h.b?b.b?b.postMessage([15,null,h.id]):bc(this,b,null,d):fc(this,h.id,null,!0)))};function ic(a,b){var c=a.b,d;if(b=null==b?W(c):(d=c[b])?[d]:null)for(d of b)xb(a,d.B,void 0)}
function xb(a,b,c,d){d=0!=d;var e=c?0:2;c=c?32:64;var f=a.g,h;for(h in f){var g=f[h];g.a&&g.port.tabId==b&&g.a!=e&&(d||g.b)&&(g.a=e,Q(a,8,1,c,[h]))}}function gc(a,b){var c=a.g[b];c&&1==c.a&&(c.a=2,Q(a,8,1,64,[b]))}function jc(a,b,c,d){var e=a.va,f=(e&b)!=((c?255:128)&b);a.va=c?e|=b:e&=~b;f&&(c=a.c[-32],b=a.c[-33],c=a.ua=0!=c&&(e&c)==c,e=a.ya=0!=b&&(e&b)==b,a.Qa=(c||e)&&d||null)}
n.Fa=M[M.length]=function kc(a,b,c,d,e){var h=this.b[a];if(h)if(h.da?d&&(window.clearTimeout(h.da),h.da=null):d||(d=-1),0<=d)h.i|=b,h.j|=c,d&&(h.da=window.setTimeout(kc.bind(this),d,a));else{b|=h.i;c|=h.j;h.i=h.j=h.da=null;if(b){for(var g of W(this.i))g.b&&g.a==a&&(g.update=!0);e?this.P(e):browser.windows.get(a,this.P);browser.tabs.query({windowId:a,active:!0},this.P)}if(c){if((a=this.b[a])&&!a.O&&!a.da&&(a=a.B,!this.h[a])){b=this.g;for(var k in b)c=b[k],c.a&&c.port.tabId==a&&1==c.a&&Q(this,8,1,1152,
[k])}}else this.ea(a)}};
n.P=M[M.length]=function lc(a,b){browser.runtime.lastError;a instanceof Array&&(a=a.shift());if(a){var d=a.windowId||a.id,e=this.b[d];if(e){var f=!a.windowId;if(f){var h=b?e.a=this.xa:e.a,g=e.g="minimized"==a.state,k=e.o="maximized"==a.state;g||(C?(e.width=Math.round(a.width/h),e.height=Math.round(a.height/h),e.c=Math.round(a.left/h),e.f=Math.round(a.top/h)):(e.width=a.width,e.height=a.height,e.c=a.left,e.f=a.top),g=e.O,a=e.O="fullscreen"==a.state,h=k&&-e.c,0<h&&16>=h&&h==-e.f&&(e.b=h),a==g||b||(a?
ic(this,d):this.ea(d)))}else{if(e.C&&Qa(a.url))return;a.active&&(e.B=a.id);a.width&&(e.v=a.width);a.height&&(e.u=a.height)}if(!e.g){h=e.width;g=e.v;k=e.height;a=e.u;var l=!D&&(g>h||a>k);if(l||!g||!a){f||l&&browser.windows.get(d,lc.bind(this));return}f=h-g;h=f/2;0<=h&&16>=h?(e.b=h,e.h=e.s=0):(h=e.b,D||la?e.h=f-2*h:e.s=f-2*h);f=k-a-2*h;f>=(e.G?20:50)&&f<=ua&&(e.A=f);e.C=!0}b||hc(this,d);return e}}};function wb(a,b){return a.h[b]?!0:(a=a.a[b])&&a.refresh?(a.refresh=!1,browser.tabs.reload(b),!0):!1}
n.jc=function(a,b,c,d){a.m=b;a.s=c;a.refresh&&!d&&(a.refresh=!1);null==a.ba&&this.Oa(a);this.ea(a.a);a.b&&0<this.L&&mc(this)};n.lc=function(a,b,c,d,e){a.o=b;a.u=e;a=[a.f,a.tabId,a.a,d,e];d={};d[110]=b;d[128]=c;Q(this,21,1,0,a,d)};
n.nc=function(a,b,c,d,e){var f=a.tabId,h=this.a[f+","+c];if(h){var g=h.h;h.ma=d;if(h.h=e){var k=a.h;k&&(e[0]+=k[0],e[1]+=k[1],e[2]=Math.min(e[2]+k[0],k[2]),e[3]=Math.min(e[3]+k[1],k[3]));if(g&&g.join()!=e.join()){g=this.a;a=a.tabId+",";c=a+c;for(var l in g)l.startsWith(a)&&(k=g[l],k.c==c&&h.postMessage([16,b,k.ba,k.ma]))}}if(!this.h[f]){fc(this,d,e);for(var m of W(this.g))m.port==h&&m.a&&m.b&&!m.c&&h.postMessage([15,null,m.id])}}};
function bc(a,b,c,d){a=a.a;c=[16,c];for(var e=[b],f;f=a[b.c];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.ma,c[2]=b.ba,c[3]=d,c[4]=d?null:b.m,c[5]=d?null:b.ca,f.postMessage(c)}function cc(a,b,c){a=a.a;b+=",";var d=0,e;for(e in a)e.startsWith(b)&&(a[e].postMessage(c),d++);return d}
n.qa=function(a,b){var c={file:"content.js",runAt:"document_start",matchAboutBlank:!0};!C&&b?c.frameId=b:c.allFrames=!0;if(a instanceof Array)for(;b=a.shift();)try{b.discarded||browser.tabs.executeScript(b.id,c,P)}catch(d){}else if(b=a)try{browser.tabs.executeScript(b.id||b,c,P)}catch(d){}};function nc(a,b,c,d){null==c&&(c=b.l==a.R);c=17|(c?2048:1024)|(b.o?256:b.g?512:0);b=[b.l,b.ja,b.width,b.height,b.c,b.f,b.a];var e={};e[117]=d;Q(a,6,2,c,b,e)}
n.gb=M[M.length]=function oc(a,b,c){if(b){a={};for(var e of c)a[e.windowId]=e;for(var f of b)e=a[f.id],b=this.P(f,!0)||this.bb(f,!0,e),nc(this,b,f.focused,f.title||e&&e.title)}else{if(!a){try{browser.windows.getAll({windowTypes:["normal","popup"]},b=T())}catch(h){browser.windows.getAll(b)}browser.tabs.query({active:!0},c=T());return U(oc,this,1,b,c)}if(C&&1==a&&c){b=ac();for(f of c)browser.windows.get(f.windowId,b[b.length]=T());return U(oc,this,2,b,c)}}};
n.ic=M[M.length]=function pc(a,b){if(void 0===a)return qc("system.display",pc.bind(this));if(a){if(!b)return browser.system.display.getInfo(null,pc.bind(this,a));this.fb=b[0].displayZoomFactor}};
n.Ca=function(a,b){if(!this.j)return dc(b.id,"cannot_contact_idm");var c=a.linkUrl,d=a.pageUrl,e=d;if(a.menuItemId==this.U[4])return browser.downloads.search({query:[c]},this.jb.bind(this,c));if(a.menuItemId==this.U[1])c=a.frameUrl,c&&"about:blank"!=c||(c=d,e=null);else if(!c&&(c=a.srcUrl,(a=this.a[b.id+","+a.frameId])&&c)){var f=Mb(this);f.tabId=b.id;f.port=a;f.j=c;f.o=e;f.c=d;f.i=4;return a.postMessage([18,f.a,c])}c&&this.la(c,e,d,4)};
n.Ja=function(a,b){if(!this.j)return dc(b.id,"cannot_contact_idm");tb(this,b.id,a.menuItemId==this.U[2])};n.jb=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.la(a,d||e,null,4)};
n.Gb=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=this.dc++);var d=b.id,e="top"==a.name;a.tabId=d;a.a=0>b.index?null:b.windowId;a.i=!0;a.j=!1;a.update=e;a.b=e;a.ba=e?0:a.sender.frameId;a.v=0;a.m=a.sender.url||e&&b.url||null;a.ca=null;this.i[c]=a;e&&(this.a[d]=a);a.m&&(a.na=Ob(this,(new URL(a.m)).hostname));a.onMessage.addListener(this.Hb.bind(this,a));a.onDisconnect.addListener(this.ra);this.Oa(a)}};
n.ra=function(a,b){browser.runtime.lastError;if(a.i){a.i=!1;var c=a.tabId+","+a.ba,d=this.K,e=this.g,f,h=this.X,g=this.f,k,l;for(l in d)d[l].port===a&&delete d[l];for(l in e)if(f=e[l],f.port===a)this.aa(l),delete e[l];for(var m in h)h[m]===a&&delete h[m];for(l in g)(k=g[l],k.port!==a||k.g)||delete g[l];this.Qa===a&&jc(this,255,!1);delete this.i[a.id];delete this.a[c];a.b&&delete this.a[a.tabId];if(C&&!b)browser.tabs.executeScript(a.tabId,{code:"__idm_connect__ && __idm_connect__(); true;"},P);else for(l in a=
this.u,a)c==a[l].c&&delete a[l]}};
n.Hb=function(a,b){var c=b[0];b[0]=a;switch(c){case 21:this.jc.apply(this,b);break;case 24:this.lc.apply(this,b);break;case 22:this.nc.apply(this,b);break;case 23:this.mc.apply(this,b);break;case 41:this.Fb.apply(this,b);break;case 25:this.ta.apply(this,b);break;case 26:tb(this,a.tabId,!0,!0,!1,a,b[1],b[2],b[3]);break;case 27:this.Yb.apply(this,b);break;case 28:this.aa(4294967295);break;case 29:this.Xa.apply(this,b);break;case 30:this.Xa.apply(this,b);break;case 31:this.Ab.apply(this,b);break;case 32:this.Db.apply(this,
b);break;case 39:this.Bb.apply(this,b);break;case 33:this.vb.apply(this,b);break;case 34:this.zb.apply(this,b);break;case 35:this.Cb.apply(this,b);break;case 36:this.Xb.apply(this,b);break;case 37:this.Jb.apply(this,b)}};
n.Ya=function(a){var b=a.type,c=a.o,d=a.h,e=a.a,f;if(1==b){var h=e[0];if(f=this.fa[h])b=f.type,delete this.fa[h]}switch(b){case 3:0<=this.ga&&(this.ga=-1,this.Ia());d=e[0];var g=e[5];f=e[6];c=e[4];e=e[8];this.v=d;this.Ta=9>d;this.Ka=10<=d;rc(this,f);sc(this,g,a);tc(this,!0);if(c||e)e=(c?c/96:1)*(e?e/100:1),this.xa=B&&1.245>e?1:e,this.gb(),B&&this.fb&&this.ic();Pb(this);break;case 4:f=this.c;this.o=!!(e[3]&2147483648);this.pa=!!(e[3]&1073741824);sc(this,e[2],a);tc(this);d&2048&&(globalThis.idm=this);
f[-6]=0<(d&64);f[-10]=0<(d&1024)||Ma;f[-5]=0<(d&32);f[-1]=0<(d&2);f[-8]=0<(d&256)||2>c;f[-9]=0<(d&512)||2>c;f[-32]=e[0];f[-33]=e[1];f[12]=a[12];f[17]=a[17];X(f,a,1);X(f,a,2);X(f,a,3);X(f,a,4);X(f,a,10);X(f,a,9,2);X(f,a,11,2);X(f,a,20);X(f,a,21,1);uc(f,a,19);uc(f,a,18,1,1);(this.G||this.La)&&vb(this);break;case 18:d=e[0];e=e[1];e=eb[e?-e:d];if(!e)break;f=this.N[d]={};c=e[2];f.na=d;f.lb=e[0];f.ib=e[1];for(g in a)(g=parseInt(g))&&(102==g||110<g&&150>g)&&(f[g]=c.includes(g)?RegExp(a[g]):a[g]);15>this.v&&
2==d&&(f[124]="a:not([target])",f[125]="<div >:not(:only-child):not(video:first-child,img:first-child:nth-last-child(2))",f[120]=4);87>this.v&&4==d&&(f[115]="~+"+f[115].slice(1)+"<");for(g of c)f[g]||(f[g]=Aa);e=this.N.map(vc(102)).filter(aa);this.Na=RegExp("^https?://(?:"+e.join("|")+")","i");X(f,a,101,2);break;case 5:a=e[0];e=e[1];wc(this,a,d,e);break;case 6:if(d&4)break;a=f.a[0];g=e[1];e=e[2];wc(this,a,d,e,g);break;case 8:a=e[0];e=d&32;if(4294967295==a)cc(this,this.l,[13,!1]),this.l=null;else if(a=
this.g[a])a.a=e?0:2;break;case 11:a=e[0];4294967295==a&&(tb(this,this.l,!0,!0),this.l=null);break;case 12:try{var k=a.a[5],l=a[4];e=4==k?2:3;if(1==k||2==k){if(Sb(this,a)){if(this.c[3].test(l))1==k?e=6:k=4;else if(this.c[-1]||this.c[4].test(l))e=6;a[8]|=256}if(3==e){var m=this.b[this.R];m&&this.h[m.B]&&(e=1)}}if(4==k)if(!this.Ta||a.a[6]||a.a[7]){switch(a.a[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.Zb(a)}else V(this,a,1);else V(this,a,e)}catch(p){V(this,
a,0)}break;case 13:a=f.a[0];d=f.a[5];e=e[1];g=3==e;if(3>=d)f.h&128?xc(this,a,g):Y(this,a,g);else if(5==d)if(e){if(a=(g=this.f[a])&&g.i){f=g.method;e=g.requestHeaders;if(d=g.f)(d=yc(d,Z(e,"Content-Type")))||(f="GET");a.timeout=1E4;a.onreadystatechange=this.Ib.bind(this,a,g.id);a.open(f,g.url,!0);for(g=0;g<e.length;g++)f=e[g].name,c=f.toLowerCase(),c.startsWith("x-idm-")||(Ra(c)&&(f="X-IDM-"+f),a.setRequestHeader(f,e[g].value));a.send(d)}}else zc(this,a);break;case 20:e=a[123];d=!e;a=[a.f];g={};D&&
(f=this.S)&&(g[122]=f,d||(d=f.substr(2).split(";",1).shift()==e));g[121]=this.s;Q(this,1,2,d?2:4,a,g);break;case 24:this.$b(a);break;case 22:this.hb(e[0],e[1],a[131],a[130]);break;case 1:break;default:!f&&d&1&&Q(this,1,2,0,[a.f])}};
n.hb=M[M.length]=function Ac(a,b,c,d,e){if(!C&&null==va){if(void 0===e)return qc("notifications",Ac.bind(this,a,b,c,d));va=e||!1}va&&(browser.notifications.create(a.toString(),{type:"basic",title:d||"",message:c,iconUrl:"images/logo48.png"},P),b&&window.setTimeout(browser.notifications.clear,1E3*b,a.toString(),P))};
n.$b=M[M.length]=function Bc(a,b,c){if(!b)return c=!!(a.h&16),R(a[6],Bc.bind(this,a,!0),c);b=browser.runtime.lastError||!c;a=[a.f,c?c.length:0];var e={};c&&(e[51]=S(c));Q(this,1,2,b?4:2,a,e)};
n.Zb=M[M.length]=function Cc(a,b,c,d){try{var f=a.b;if(!f)if(c)f=a.b=c;else if(d){var h=this.b[d.id],g=this.a[h&&h.B];g&&(f=a.b=g.id)}else if(!b&&(f=this.kb(a,c=T()),!f))return browser.windows.getLastFocused(d=T()),U(Cc,this,a,!0,c,d);var k=this.i[f];if(!k)return V(this,a,0);h=this.b[k.a];if(!h||!h.ja)return V(this,a,1);(g=this.a[k.tabId])&&g.update&&(g.update=!1,g.postMessage([14,!0]));var l=Mb(this),m=a.a[8],p=[15,l.a,m];l.G=a;m||(k.b||bc(this,k,l.a),p.push(a[6],a[17],a[50],a[31],a[133]));k.postMessage(p)}catch(t){V(this,
a,0)}};function V(a,b,c,d,e,f,h,g,k){-1!=c&&(e=[b.f,c,e,h,f],f={},f[8]=b[8],g&&(f[101]=g,f[128]=k),Q(a,1,2,d|(0==c?4:2),e,f))}n.Eb=function(a){Kb(this,a).a=!0;D&&browser.windows.get(a.windowId,this.P)};
n.Za=function(a,b){var c=a.tabId,d=a.frameId,e=a.url,f=a.transitionType,h=f?f.endsWith("_subframe"):C&&0<d,g=this.u[c+","+d];this.M!=c||Qa(e)||(this.M=null);!h&&this.h[c]&&(g?(f=g.i,f=!(e&&f&&(new URL(e)).hostname==(new URL(f)).hostname)):f=!0,L(this,f,c));g&&(g.i=e);if(f=this.a[c+","+d])if(this.l&&(a=this.b[f.a])&&a.B==this.l&&this.aa(4294967295),b){a:{b=f.m;c=new URL(b);d=new URL(e);if(c.origin==d.origin&&c.pathname==d.pathname)switch(Ob(this,c.hostname)){case 1:if("/watch"==c.pathname&&c.a("v")==
d.a("v")){b=!0;break a}break;case 4:if(c.pathname.startsWith("/p/")||c.pathname.startsWith("/reel/")){b=!0;break a}}b=e==b}if(!b){b=this.g;var k,l;for(l in b)if(k=b[l],k.port===f)2==f.na?gc(this,l):(this.aa(l),delete b[l]);f.v++;f.m=e;f.b&&(f.update=!0);f.postMessage([17,!0])}}else this.ra(f,!0),h&&"about:blank"==f.m&&this.qa(c,d);else h&&"about:blank"==e?(Kb(this,a),this.qa(c,d)):g&&g.a&&(g.m||!b)?g.a=!1:D&&browser.tabs.get(c,this.P)};n.wb=function(a){return this.Za(a,!0)};
n.bb=function(a,b,c){var d=a.id;c={l:d,width:a.width,height:a.height,c:a.left,f:a.top,a:this.xa,b:8,A:ta,h:0,s:0,G:"popup"==a.type,O:"fullscreen"==a.state,o:"maximized"==a.state,g:"minimized"==a.state,B:c&&c.id,u:c&&c.height,v:c&&c.width,C:!D,ja:null,da:null};Object.setPrototypeOf(c,nb.prototype);this.b[d]=c;a.focused&&(this.R=d);b?(browser.tabs.query({windowId:d,active:!0},this.P),browser.tabs.query({windowId:d,url:J},this.kc),browser.tabs.query({windowId:d,url:J},this.qa)):D&&this.Ba==d&&(this.Ba=
null,browser.tabs.query({windowId:d,active:!0},this.P));return c};n.kc=function(a){for(var b of a)Kb(this,0,!0,b.id,b.url)};n.cb=function(a){Q(this,5,1,32,[a]);delete this.b[a];this.J==a&&ub(this)};n.Wb=function(a){if(0<a){this.J&&browser.windows.update(this.J,{drawAttention:!0});var b=this.b[a];b&&(this.R=a,b.ja||nc(this,b,!0),browser.windows.onBoundsChanged||browser.windows.get(a,this.P),wb(this,b.B),C&&this.Fa(a,!1,!0,500))}else this.R=null};n.Vb=function(a){this.Fa(a.id,!0,!1,-1,a)};
function wc(a,b,c,d,e){var f=a.b[b];f?(d&&(f.a=d),e&&(f.ja=e),d=!!(c&128),f.O!=d&&(f.O=d)&&ic(a,b),(e||c&4096)&&hc(a,b)):a.cb(b)}n.Ob=function(a,b,c){var d=c.active;c=c.windowId;var e=d&&this.b[c];e&&(e.ja||nc(this,e));"complete"==b.status&&(a=this.a[a])&&!a.j&&(a.j=!0,d&&this.ea(c))};n.Nb=function(a){var b=this.a,c=this.u,d=a+",";this.M==a&&(this.M=null);var e=b[a];e&&this.ra(e,!0);for(var f in b)f.startsWith(d)&&this.ra(b[f],!0);for(var h in c)h.startsWith(d)&&delete c[h];delete this.h[a]};
n.Lb=function(a){var b=a.tabId;a=a.windowId;this.va=0;this.l&&this.aa(4294967295);var c=this.b[a];c?(xb(this,c.B),c.B=b,(c=this.M)&&b!=c&&(this.J?browser.windows.update(this.J,{drawAttention:!0}):this.j&&this.G&&(this.M=null,window.setTimeout(browser.tabs.remove,250,c))),browser.tabs.get(b,this.P),wb(this,b)||this.ea(a)):D&&(this.Ba=a)};n.Mb=function(a,b){b=b.newWindowId;var c=this.i,d;for(d in c)(d=c[d])&&d.tabId==a&&(d.a=b);xb(this,a,!0)};
n.yb=function(a){this.J&&"idle"==a&&browser.windows.update(this.J,{focused:!0})};n.Xa=function(a,b,c){if(a.b){var d=a.tabId;a=a.a;var e=this.b[a];this.l&&this.aa(4294967295);if(e&&e.B==d){var f=!1;b&&(e.v=b,f=!0);c&&(e.u=c,f=!0);xb(this,d,!1,f);this.Fa(a,f,!1,500)}}else a.ma&&(b=this.a[a.c])&&b.postMessage([16,null,a.ba,a.ma])};n.Ab=function(a,b,c){(b=fb[b])&&jc(this,b,c,a)};n.Db=function(a,b,c){0==b&&jc(this,128,c,a)};n.Bb=function(a,b,c,d){this.sa=a.id;a.mb=b;a.Ha=c;a.nb=d};
n.vb=function(){jc(this,255,!1)};n.zb=function(a,b,c,d){var e=a.f;e&&(a=32,c=[e,null==c?(a|=16,-2):c],e={},e[110]=b,e[115]=d,Q(this,16,1,a,c,e))};n.Xb=function(a,b,c){if(a=this.f[b]){b=[a.id,0];var d={};d[115]=c;Q(this,16,1,48,b,d);a.o=!1;a.X&&Y(this,a)}};n.Jb=function(a,b,c,d){Q(this,19,2,0,[b,c,a.tabId,a.f],d)};function zc(a,b){if(b=a.f[b]){var c=b.i;b.o=!1;b.i=null;b.X&&Y(a,b);c&&c.abort()}}
n.Ib=function(a,b){if(4==a.readyState){var c=[b,0],d={};200==a.status&&(d[115]=a.response);Q(this,16,1,48,c,d);zc(this,b)}};function Dc(a,b){var c=a.c;if(b.s||a.h[b.tabId]||!c[-6])return 1;if(b.h)return 6;if(b.c&&c[-1])return 1;var d=b.u,e=b.U=Ec(d.pathname);return c[9].test(d.hostname)||c[19].test(d.href)?1:2==(b.b&7)&&(b.N||c[-10])?d.pathname.endsWith("/")||c[21].test(d.pathname)?1:c[1].test(e)||a.o&&!c[20].test(e)?4:1:6}
function Fc(a,b){var c=!b.a;if(b.h&&c)return 3;var d=a.c,e=d[18],f=d[1],h=b.u,g=b.U,k=b.j||(h.search?null:g),l=b.c,m=Ca.includes(b.type),p=!b.N,t=!m&&e.exec(h.href);if(t){var r=e.oc,x=e.pc,y=e.qc,v=e.rc;for(e=1;e<t.length;++e)if(t[e]){r=r[--e];if(null===r)break;t=0;if(r.includes("G")){var u=!0;t|="GET"==b.method}r.includes("P")&&(u=!0,t|="POST"==b.method);if(u&&!t)break;u=r.includes("V")|r.includes("A")|r.includes("C");r.includes("H")&&(b.Y=!0);if((u?b.Y:l?!r.includes("S"):r.includes("X"))||p&&r.includes("D"))return 1;
if(t=v[e]){t=t.exec(h.href);if(!t)break;h=x[e];if(x=h.F){var A=!0;var O=t[x]}if(x=h.T){A=!0;var E=t[x]}}E||(E=Ec(O)||r.includes("T")&&(A=!0,g)||y[e]);if(u)return E&&(b.U=E),l||(b.c=!0),b.a=!0,6;if(c&&(E?f.test(E):!A))return b.S=16777216,4;break}}if(!c)return 6;if(k&&(m&&d[2].test(k)||l&&d[4].test(k)))return 1;if((D||a.I)&&(b.N||d[-10])){if(l&&d[3].test(k))return 6;if((!l||a.o)&&k&&f.test(k))return b.S=8,4}return 6}
function Gc(a,b){if(b.ha)return a.ka(6,b),6;var c=b.statusCode;if(200!=c&&206!=c&&304!=c)return 1;var d=Z(b.responseHeaders,"Content-Type"),e=Z(b.responseHeaders,"Content-Disposition"),f=Hc(d).toLowerCase(),h="attachment"==Hc(e).toLowerCase();c=b.c;var g=b.C;if(b.ga=g&&!h&&"text/html"==f){if(b.g){var k=Lb(a,b);k&&(k.g=!0);a.ka(5,b)}return 1}if(c?b.s:b.a)return 1;if(a.o&&g&&h)return 4;var l,m,p,t=a.c,r=b.u,x=r.hostname,y=r.pathname;e=(d=Ic(e,"filename")||Ic(d,"name"))&&Ec(d);if(d){if(!e&&!c)return 1;
if(e&&(!c||5>=e.length)){b.A=d;var v=p=!0}}p||(d=y.split("/").pop(),(e=b.U||Ec(d))&&e.toLowerCase()==f.split("/").pop()&&(v=!0));if(!v){var u=t[10].test(f),A=hb[f];if(A)if(A=A.split("|"),e&&A.includes(e))v=!0;else if(c&&Ua(e))v=!0;else if(c?!u:!e){v=!0;var O=u;e=A[0]}!v&&e&&(h&&g?v=!0:u?v=O=!0:A||Ta(e)||(v=O=!0))}if(c){A=Ob(a,x);g=a.N[A];u=y+r.search;switch(A){case 0:break;case 1:if(g[111].test(u)){var E=v=!0;e=null}else if(g[112].test(u))var ba=!0;else if(g[115].test(u)&&"application/json"==f)var pa=
!0;else if(g[113].test(u)&&"application/x-www-form-urlencoded"==f||g[114].test(u)&&"video/vnd.mpeg.dash.mpd"==f)var qa=!0;break;case 2:(x=g[111].exec(u))&&(Sa(f)||"text/html"==f)?(f=x[1]&&g[112].exec(b.port.m))&&x[1]!=f[1]||(qa=!0):g[114].test(u)?pa=!0:h&&"image"==b.type&&"MP4"==e&&(m=!0);break;case 3:"M4S"==e&&(v=!0);x==g[111]&&g[112].test(y)&&Sa(f)&&(qa=!0);break;case 4:g[111].test(u)&&Sa(f)&&(pa=!0);break;case 5:g[111].test(u)&&"text/html"==f&&(pa=!0);break;case 6:g[111].test(u)&&(qa=!0);break;
default:g[111].test(y)&&(pa=!0)}v&&("M3U8"==e||"F4M"==e||a.Ka&&"MPD"==e?qa=!0:"F4F"==e&&(d.endsWith("Seg1-Frag1")||d.endsWith("Seg1-Frag2")||d.includes("Seg1-Frag2_"))&&(l=!0));"ASF"==e&&((f=Z(b.responseHeaders,"Content-Length"))&&102400>=parseInt(f)&&(m=!0),"DCLK-AdSvr"==Z(b.responseHeaders,"Server")&&(m=!0))}if(m)return 1;v&&(c&&t[3].test(e)?E=!0:c&&t[4].test(e)?b.a=!0:!b.a&&t[1].test(e)&&(k=!0));if(E){var Qb,Rb;if(b.Y)E=!1;else if(m=t[11])m.test(r.hostname)?E=!1:(Qb=a.a[b.tabId])&&(Rb=Qb.m)&&m.test((new URL(Rb)).hostname)&&
(E=!1)}if(pa)ba=b.o=!0;else if(qa||l)"POST"!=b.method||b.f?(a=new XMLHttpRequest,a.responseType=l?"blob":"text",b.i=a,ba=!0):ba=!1;if(!k&&!E&&!ba)return 1;v&&(b.j=e);p&&(b.A=d);b.g|=ba;b.S=E||ba?256:16|(c?4096:0)|(O?8388608:0);return k?4:E?2:5}
n.ka=M[M.length]=function Jc(a,b,c,d,e,f){var g=b.url,k=b.b||Zb(g),l=1==(k&7),m=b.requestHeaders;if(l&&!d&&!e&&(f=Z(m,"Cookie"),null==f))return R(g,Jc.bind(this,a,b,c,d,!0)),!0;N(f)&&(f=S(f));var p=b.id,t=b.port&&b.port.id,r=b.timeStamp,x=c?w(c.timeStamp-r):null,y=b.S,v=b.responseHeaders;e=b.Z;var u=c&&c.ip;c=0;3==(u?u.length-u.replaceAll(".","").length:0)?y|=33554432:2<(u?u.length-u.replaceAll(":","").length:0)&&(y|=4194304);k&16&&(y|=2097152);"POST"==b.method&&(y|=512);4>a&&(D||d)&&(c|=1);b.g&&
b.i&&(c|=1);b.g&&5!=a&&(c|=32);b.c&&(c|=16);b.L&&(c|=8192);b.C&&(c|=b.G?2048:4096);k=[p,t,r.toFixed(),b.statusCode,k&7,a,b.tabId,b.frameId];p={};16>this.v&&(k[2]=w(r/1E3),k[3]=w(r%1E3*1E3));p[6]=Vb(g,l&&4>a,this);p[12]=b.statusLine;p[17]=b.ca;p[4]=b.j;p[100]=b.A;p[127]=b.pa;p[8]=y;p[129]=x;p[122]=this.s;p[11]=Kc(m);p[13]=Kc(v);p[18]=Kc(e);b.f&&(p[14]=yc(b.f,Z(m,"Content-Type")));b.R&&(p[19]=yc(b.R,Z(e,"Content-Type")));if(null==m){a=this.u;g=b.tabId+","+b.frameId;do g=(l=a[g])&&l.c,l=l&&l.m,"about:blank"==
l&&(l=null);while(!l&&g);p[50]=l;p[51]=f;p[54]=navigator.userAgent}D&&(p[122]=Hb(this,b.proxyInfo,Z(m,"Proxy-Authorization")),p[55]=Hb(this,b.$,Z(e,"Proxy-Authorization")));if(!b.ga||!b.G)if(b=this.a[b.tabId])p[7]=b.m;return!!Q(this,13,1,c,k,p,d)};
n.oa=M[M.length]=function Lc(a,b,c,d,e){if(0==a)b.I=d,b.H=e,Jb(this,b);else{this.L&&mc(this,!0);d=this.I?new XMLHttpRequest:null;e=this.ka(a,b,c,d);d&&(e=(d=e&&parseInt(d.getResponseHeader("x-idm-status")))?3==d:this.ka(a,b,c));if(e)return Na&&!c?void(b.K=!0):D?new Promise(Lc.bind(this,0,b,null)):Y(this,b,!0);b.a=!0}};
function Y(a,b,c){var d=a.f,e;if(!N(b))if(b=d[b])void 0;else return;var f=b.id;if(c){if(b.C||b.L){var h=0<b.statusCode||!b.requestHeaders,g=Lb(a,b);g&&g.a&&b.G?browser.tabs.remove(b.tabId):B&&h&&!b.L?e={redirectUrl:"javascript:void(0)"}:C&&h?e={redirectUrl:Mc(b,g)}:Pa&&h&&(e={redirectUrl:a.H||Mc(b,g)})}e||(e={cancel:!0});b.K=!0}(a=b.I)&&void 0!==c&&(b.I=b.H=null,a(e||{}));if(c=b.H)b.I=b.H=null,c();if(b.i||b.o)return b.X=!0,e;delete d[f];D&&delete d[b.v];C&&delete d[b.requestId];b.W&&delete d[b.W];
return e}n.rb=function(a){(this.o||a.byExtensionId)&&!this.ya&&this.c[-6]&&Zb(a.finalUrl||a.url,!0)&&(this.W[a.id]=a,browser.downloads.pause(a.id,P))};
n.sb=function(a,b){var c=a.id,d=this.W;if(!d[c])return!1;var e=this.c,f=a.finalUrl||(a.finalUrl=a.url),h=new URL(f),g=a.b=Zb(f,!0),k=a.j=Ec(a.filename||h.pathname);if(!(a.h=this.ua)&&!this.o&&(!e[1].test(k)||e[9].test(h.hostname)||e[19].test(h.href)))return xc(this,c);a.fc=b;d[c]=a;if(1==g){if(!a.referrer){b=this.i;c=this.b;for(var l in b)if(d=b[l],d.m==f&&(a.referrer=d.s,(e=c[d.a])&&e.B==d.tabId))break}var m;R(f,l=T());a.url==f||R(a.url,m=T());U(this.Va,this,a,l,m);return a.Pa=!0}return this.Va(a)};
n.Va=function(a,b,c){var d=Date.now();d=[a.id,0,w(d/1E3),w(d%1E3*1E3),a.b,2];var e={};e[6]=Vb(a.finalUrl);e[4]=a.j;e[103]=a.totalBytes||null;e[100]=a.filename||null;e[127]=a.mime||null;e[8]=a.h?2048:0;e[50]=a.referrer||null;e[51]=S(b);e[54]=navigator.userAgent;e[122]=this.s;a.finalUrl!=a.url&&(e[17]=Vb(a.url),e[56]=S(c));return!!Q(this,13,1,129,d,e)||xc(this,a.id)};
function xc(a,b,c){var d=a.W[b];if(d){if(c)return browser.downloads.cancel(b,P),!0;d.Pa&&(d.Pa=!1,d.fc());browser.downloads.resume(b,P);delete a.W[b]}return!1}n.qb=function(a){if(!(0>a.tabId||a.initiator==Ka||this.pa||(C||Pa)&&a.url.startsWith(Ia)&&a.type.endsWith("_frame")||a.url.startsWith(Ja)&&"main_frame"==a.type))return{cancel:!0}};
n.Pb=function(a){var b=new URL(a.url);if(b.search.startsWith("?d=")){var c=this.a[a.tabId];this.la("idmreg:"+b.href.substr(b.protocol.length),null,c&&c.m);Y(this,a.requestId);(b=Lb(this,a))&&b.a&&"main_frame"==a.type&&browser.tabs.remove(a.tabId);return{redirectUrl:Ia+"register=1"}}};
n.ab=function(a){var b=a.type,c=a.tabId,d=a.frameId;if(!ra||Da.includes(b))if(!(0>c&&0==d)||D&&a.originUrl!=La){var e=a.url,f=a.method,h=Zb(e);if(h&&("GET"==f||"POST"==f)&&e!=this.H){var g=a.id=C?String(this.hc++):a.requestId,k=this.f[g],l=this.ya,m="POST"==f,p="image"==b,t=B&&0>c&&"other"==b,r=!t&&0>c&&(D||0>d),x=0<c&&b.endsWith("_frame"),y=r?null:this.a[c+","+d];if(y||x||r||t||k){D&&m&&k&&$a(k.statusCode)&&(f=a.method="GET",m=!1);x&&Kb(this,a,!1);if(!l&&m&&a.requestBody){m=a.requestBody;var v=m.raw;
if(v)for(var u=0;u<v.length&&(v[u].bytes||(v=null));u++);if(!(v||m.formData||B&&m.error))return}if((m=this.sa)&&(v=y?y.id==m&&y:this.i[m])&&e==v.Ha){t=v.mb;if(m=v.nb)a.A=m,a.j=Ec(m);y||(y=v);this.sa=null}m=new URL(e);m.hash="";a.u=m;a.b=h;a.h=this.ua;a.s=l;a.G=x&&"main_frame"==b;a.C=x;a.L=t;a.fa=r;a.c=r||I.includes(b);a.a=p;a.g=this.Na.test(e);a.f=a.requestBody;a.port=y;a.N=h&8||(D?a.proxyInfo&&"https"==a.proxyInfo.type:this.ia[h]);0>c&&(a.tabId=null);0>d&&(a.frameId=null);if(k)a.id=k.id,a.port=y=
k.port,a.h=k.h,a.s=k.s,a.ca=k.ca||k.url,a.Z=k.Z||k.requestHeaders,a.R=k.R||k.f,D&&(a.$=k.$||k.proxyInfo);else if(D&&r)for(var A of W(this.f))if(A.ia&&!A.v&&e==A.url&&b==A.type&&f==A.method){a=A;a.v=g;break}if(a.c&&!p){b=this.X;c=b.ac;d=c.indexOf(e);if(0<=d)c.splice(d,1);else for(;30<=c.length;)delete b[c.shift()];b[e]=y;c.push(e)}switch(a.l=Dc(this,a)){case 1:a.a=!0;case 6:Jb(this,a);break;case 4:return this.oa(1,a)}}}}};
n.Rb=function(a){var b=this.f[a.requestId];if(b){var c=b.requestHeaders=a.requestHeaders;b.timeStamp=a.timeStamp;if(!b.K){if(b.fa&&!b.port&&(a=Z(c,"Referer")))for(var d of W(this.i))if(d.m==a){b.port=d;break}D&&b.proxyInfo&&Hb(this,b.proxyInfo,Z(c,"Proxy-Authorization"),!0);d=b.u;if(!("POST"!=b.method||b.f&&!(b.f.error&&0<Z(c,"Content-Length"))||C&&1==Ob(this,d.hostname)&&this.N[1][115].test(d.pathname+d.search)))return Y(this,b);switch(b.l=Fc(this,b)){case 1:b.a=!0;break;case 4:return this.oa(1,
b);case 3:return this.oa(3,b)}if(b.port&&b.port.g&&"xmlhttprequest"==b.type)for(d=0;d<c.length;d++)if(a=c[d],"accept"==a.name.toLowerCase()&&a.value.startsWith("x-idm-request-id/")){var e=a.value,f=e.indexOf(",");0>f&&(f=void 0);var h=e.slice(17,f);e=f&&e.slice(++f).trim();b.W=h;this.f[h]=b;e?a.value=e:c.splice(d--,1);return{requestHeaders:c}}}}else if(0>a.tabId&&"xmlhttprequest"==a.type&&(a.initiator?a.initiator==Ka:a.originUrl?a.originUrl==La:1)){b=a.requestHeaders;c={};e=!1;for(d=0;d<b.length;d++)a=
b[d],f=a.name.toLowerCase(),f.startsWith("x-idm-")?c[f.substr(6)]=e=!0:"origin"==f&&a.value==Ka&&(c[f]=e=!0);if(e){for(d=0;d<b.length;d++)a=b[d],f=a.name.toLowerCase(),c[f]?b.splice(d--,1):f.startsWith("x-idm-")&&(a.name=a.name.substr(6));return{requestHeaders:b}}}};n.Qb=function(a){if(!a.statusCode&&a.redirectUrl==a.url){a=a.requestId;var b=this.f[a],c=b&&Lb(this,b);c&&!b.statusCode&&c.f==a&&(b.ia=!0)}};
n.Tb=function(a){var b=this.f[a.requestId];if(b){var c=b.statusLine=a.statusLine,d=b.statusCode=a.statusCode||parseInt(c.split(" ",2).pop());if(b.K||204==d&&c.includes(" IDM "))return Y(this,b,!0);c=b.responseHeaders=a.responseHeaders;b.ha=Za(d);if("image"==b.type&&(d=Z(c,"Content-Type"))&&d.toLowerCase().startsWith("image"))return Y(this,b);"quic"==Z(c,"Client-Protocol")?b.b|=16:(d=Z(c,"Alternate-Protocol"))&&d.endsWith(":quic,p=0")&&"chunked"!=Z(c,"Transfer-Encoding")&&(b.b|=16);switch(b.l=Gc(this,
b)){case 1:return Y(this,b);case 4:return this.oa(2,b,a);case 3:return this.oa(3,b,a)}if(b.o)return c.push({name:"x-idm-request-id",value:b.id.toString()}),{responseHeaders:c}}};n.Ub=function(a){var b=this.f[a.requestId];if(a.type.endsWith("_frame")&&(200==a.statusCode||304==a.statusCode)){var c=Lb(this,a);c&&(c.m=a.url,c.ca=c.j)}b&&(2==b.l?this.ka(4,b,a):5==b.l&&this.ka(5,b,a),Y(this,b))};n.Sb=function(a){Y(this,a.requestId)};
n.cc=M[M.length]=function Nc(a,b,c,d){if(a){this.Wa=b.version;this.$=b.silent;this.Ma=d;D&&(this.G=!!b.consent);a=b.client;var f;for(f of c)switch(f.name){case "idmwebext_cid":var h=parseInt(f.value);break;case "idmmzcc3_uri":this.La=f.value==Ka}rc(this,null,a,h);this.Aa()}else browser.storage.local.get(null,b=T()),browser.cookies.getAll({url:H.homepage_url},c=T()),(D?1124073472<=F:C?1073741824<=F:1)&&browser.extension.isAllowedIncognitoAccess(d=T()),U(Nc,this,!0,b,c,d)};
function rc(a,b,c,d){a.v&&92>a.v?10<a.C&&(browser.storage.local.remove("client"),browser.cookies.remove({url:H.homepage_url,name:"idmwebext_cid"})):(b||(b=c||d))&&b!=a.C&&(a.C=b,c||browser.storage.local.set({client:b}),d||browser.cookies.set({url:H.homepage_url,name:"idmwebext_cid",value:String(b),expirationDate:2147483647}))}
function Pb(a){function b(l){l&&(this.M=l.id)}a.M&&(browser.tabs.remove(a.M),a.M=null);if(a.eb||!a.G){var c=!a.j,d=!a.Ma,e=!a.G,f=a.wa,h=a.ha,g=a.Wa,k=a.Da;if(c){if(a.Z&&a.$)return}else a.eb=!1,k!=g&&(k&&browser.storage.local.set({version:k}),D&&browser.cookies.set({url:H.homepage_url,name:"idmmzcc3_uri",value:Ka,expirationDate:2147483647})),a.$&&(a.$=!1,browser.storage.local.set({silent:!1}));if(null!=g&&(e=!1,a.G=!0,k!=g?h&&g&&!f&&!e:!e))return;k=Ja+"current="+escape(k);g&&(k+="&previous="+escape(g));
h&&(k+="&manager="+(h?[h>>24&255,h>>16&255,h>>8&255,h&255].join("."):""));c&&(k+="&error=1");d&&(k+="&incognito=1");f&&(k+="&update=1");e&&(k+="&consent=1");D&&(k+="&mzffox=1");la&&(k+="&opera=1");if(C||ka)k+="&msedge=1";if(e&&!c){browser.idle&&a.D(5,browser.idle.onStateChanged,a.yb)&&browser.idle.setDetectionInterval(15);browser.windows.create({type:"popup",width:Math.min(Math.round(.85*screen.availWidth),1100),height:Math.min(Math.round(.85*screen.availHeight),900),url:k},l.bind(a));function l(m){m&&
m.id?(this.J=m.id,this.M=m.tabs[0].id,L(this,!1,null,!0)):ub(this)}}else browser.tabs.create({url:k},b.bind(a))}}function sc(a,b,c){null==b&&(b=(b=Ya(c[13]))?b[1]<<24|b[2]<<16|b[3]<<8:0);a.ha=b||0}function tc(a,b){var c=a.wa=103089920>a.ha,d=103219200>a.ha;c?a.L=null:a.L=d?6E4*w(120*z()+60)*(b?1:2)+Date.now():-1}function mc(a,b){if(b||a.L<Date.now()){a.L=6E4*w(240*z()+120)+Date.now();var c="xup://"+z().toString(36).substr(2);b?a.la(c):window.setTimeout(a.la,w(5E3*z()+5E3),c)}}
function dc(a,b){b=browser.i18n.getMessage(b);D?browser.tabs.executeScript(a,{code:'window.alert(unescape("'+escape(b)+'")); true;'},P):window.alert(b)}n.D=function(a,b,c){if(null==b)return!1;var d=ea(arguments);if(D||C)d[2]=function(){return c.apply(null,arguments)};this.Ga.push(d);b.addListener.apply(b,d.slice(2));return!0};
n.za=function(){for(var a=arguments.length?ea(arguments):null,b=this.Ga,c=0;c<b.length;c++)if(!a||a.includes(b[c][0])){var d=b.splice(c--,1).pop(),e=d.splice(0,2).pop();C&&d.splice(1);e.removeListener.apply(e,d)}};function T(){function a(b){browser.runtime.lastError;a.a?a.a(b):a.c=b;a.b=!0}return a}T.prototype=Object.create(Function.prototype);function ac(){var a=[];Object.setPrototypeOf(a,ac.prototype);return a}ac.prototype=Object.create(Array.prototype);
function U(a,b,c){if(this instanceof U){c instanceof Array||(c=ha(arguments,2));for(var d=0,e=0,f=Function.prototype.bind.bind(this.g,this),h=0;h<c.length;h++){var g=c[h];if(g instanceof Function)g.b?(c[h]=g.c,e++):(g.a=f(h,null),d++);else if(g instanceof ac)for(var k=0;k<g.length;k++){var l=g[k];l.b?(g[k]=l.c,e++):(l.a=f(h,k),d++)}}d?(this.c=a,this.f=b,this.a=c,this.b=d):a.apply(b,c)}else return(new U(a,b,ha(arguments,2))).b}
U.prototype.g=function(a,b,c){var d=this.a;if(null===b)for(var e=2;e<arguments.length;e++)d[a++]=arguments[e];else d[a][b]=c;0==--this.b&&(this.c.apply(this.f,d),delete this.c,delete this.f,delete this.a)};function Eb(a){return browser.i18n.getMessage(a)||a}function Vb(a,b,c){var d=a.lastIndexOf("#");d>a.indexOf("?")&&"!"!=a[d+1]&&(a=a.substr(0,d));b&&!Va(a)&&(c.wa?a="idm0x00000001"+a:a.startsWith("xup")&&(a="idm0x00000002"+a.slice(3)));return a}
function Mc(a,b){var c=a.port;b=b&&!b.h;var d=new URL(c&&c.m||a.url);C&&(c&&a.url==c.Ha||(b=!1));return Ia+(b?"back=1":"host="+d.hostname)}function R(a,b,c){if(C&&a.startsWith("ftp:"))return b([]);a={url:a};c&&(a.session=!1);oa&&(a.firstPartyDomain=null);browser.cookies.getAll(a,b);return-1}function S(a){var b=[];if(a)for(var c of a)b.length&&b.push("; "),b.push(c.name,"=",c.value);return b.join("")}
function Kc(a){if(!a||!a.length)return null;var b=[],c;for(c of a)b.push(c.name,": "),null!=c.value?b.push(c.value):c.binaryValue&&b.push(new Uint8Array(c.binaryValue)),b.push("\r\n");return b}function Z(a,b){if(!a)return null;b=b.toLowerCase();for(var c of a)if(c.name.toLowerCase()==b){if(null!=c.value)return c.value;if(c.binaryValue)return String.fromCharCode.apply(null,c.binaryValue)}return null}
function Ic(a,b){if(!a)return null;a=a.split(";");for(b=b.toLowerCase();a.length;){var c=a.shift(),d=c.indexOf("=");if(0<d){var e=c.slice(0,d).trim().toLowerCase(),f=e.endsWith("*");if(f)e=e.slice(0,-1).trimRight();else if(g)continue;if(e==b){c=c.substr(d+1).trim();d=c.length-1;if('"'==c[0]?'"'==c[d]:"'"==c[0]&&"'"==c[d])c=c.slice(1,d);if(f&&c.includes("'")){if(c=c.split("'",3),f=c.shift().toLowerCase(),(d="utf-8"==f||"utf8"==f)||!g){var h=unescape(c.pop());var g=f;if(d)break}}else h=unescape(c)}}else 0>
d&&null==h&&c.trim().toLowerCase()==b&&(h="")}return h}function Hc(a){const b=/[;,]/;return a&&(a=a.split(b,1).shift().trim())&&!a.includes("=")&&unescape(a)||""}
function yc(a,b){var c,d=[];if(c=a.raw)for(var e of c)if(e.bytes)d.push(Oc(e.bytes));else return null;else if(a=a.formData)if((c=Hc(b).toLowerCase())&&"application/x-www-form-urlencoded"!=c)if("multipart/form-data"==c){(b=Ic(b,"boundary"))||(b="----WebKitFormBoundary"+z().toString(36).substr(2));for(f in a)for(h of a[f])h instanceof ArrayBuffer&&(h=Oc(h)),d.push("--",b,'\r\nContent-Disposition: form-data; name="',f,'"\r\n\r\n',h||"","\r\n");d.push("--",b,"--\r\n")}else return null;else for(var f in a){b=
encodeURIComponent(f).replaceAll("%20","+");for(var h of a[f])h=h instanceof ArrayBuffer?escape(Oc(h)):null==h?"":encodeURIComponent(h),d.length&&d.push("&"),d.push(b,"=",h&&h.replaceAll("%20","+"))}else return null;return d.join("")}function Ec(a){return(a=Xa(a))?a.pop().toUpperCase():""}function Zb(a,b){a=a.split(":",1).shift().toLowerCase();a=gb[a]||0;return b?a&7:a}
function jb(a){for(var b=a.length,c=b,d=0;d<c;){var e=a.charCodeAt(d++);128<=e&&(2048<=e?(b+=2,e-55296&56320||d++):b++)}return b}
function Pc(a,b,c,d,e){browser.runtime.lastError;if(!a){B&&Qc();C||browser.runtime.getPlatformInfo(b=T());navigator.userAgentData?navigator.userAgentData.getHighEntropyValues(["uaFullVersion"]).then(c=T()):browser.runtime.getBrowserInfo&&browser.runtime.getBrowserInfo(c=T());try{browser.privacy&&browser.privacy.websites.firstPartyIsolate.get({},d=T())}catch(h){d=null}B&&browser.management.get("clhiejnehegdfknplplojohghjaklbae",e=T());return U(Pc,null,!0,b,c,d,e)}if(b&&("win"!=b.os||!b.arch.startsWith("x86-")))return yb(!1);
b=navigator.userAgent;a=b.match(/\b(?!(?:Safari|Chrome|Gecko)\/)\w+\/(\d+)(?:.(\d+))?(?:.(\d+))?(?:.(\d+))?\b(?!.*[()])/);na=(b=D?a:b.match(/\bChrome\/(\d+)\.(\d+)\.(\d+)\.(\d+)\b/))?b[0]:"UNKNOWN/0.0";G=a?a[0]:na;b&&b.shift();if(N(c))if(a=c.uaFullVersion)b=a.split(/\D+/),na="Chrome/"+a;else if(a=c.version)b=a.split(/\D+/),53<=b[0]&&(na=G=c.name+"/"+a);b&&(F=b[0]<<24|b[1]<<22|b[2]<<8|b[3]);B&&navigator.brave&&(G=G.replace("Chrome/","Brave/"));B&&e&&(sa=!0,G=G&&G.replace("Chrome/","Epic/"));D&&N(d)&&
(oa=d.value);D&&939524096>F&&(Pa=!0);c=browser.webRequest.ResourceType;if(c){if(c.MEDIA){Da.push("media");I.push("media");var f=!0}if(c.OBJECT_SUBREQUEST||(ra=D&&922746880>F))Da.push("object_subrequest"),I.push("object_subrequest")}B&&(f||I.push("other"));D&&922746880>F&&I.push("other");C&&(Da.push("fetch"),I.push("fetch"));new K;Rc(1,"debug.js");Rc(2,"document.js")}
function Qc(){function a(d){browser.runtime.lastError;N(d)&&d.enabled&&browser.management.setEnabled(d.id,!1)}function b(d){browser.runtime.lastError;N(d)&&d.enabled&&browser.management.setEnabled(c||browser.runtime.id,!1)}var c=ka&&"llbjbkhnmlidjebalopleeepgdfgcpec"==browser.runtime.id&&"ngpampappnmepgilojfohadhhmbhlaek";B&&browser.management.get("jeaohhlajejodfjadcponpnjgkiikocn",a);ka&&browser.management.get(c||"llbjbkhnmlidjebalopleeepgdfgcpec",b)}
function Rc(a,b,c){c?4==c.readyState&&(db[a]=btoa(c.responseText)):(c=new XMLHttpRequest,c.responseType="text",c.onreadystatechange=Rc.bind(null,a,b,c),c.open("GET",browser.runtime.getURL(b)),c.send())}
function X(a,b,c,d){if(b=b[c]||void 0)try{b=b.replace(/^\|+|\|+(?=\||$)/g,"").replace(/\./g,"\\."),b=1==d?b.replace(/\?/g,"[^/\\\\]").replace(/(^|[^*])\*(?!\*)/g,"$1[^/\\\\]*").replace(/\*\*/g,".*?"):b.replace(/\?/g,".").replace(/\*/g,".*?"),2==d&&(b=b.replace(/~/g,"(?:\\b[^.]+\\.)?")),b=RegExp("^(?:"+b+")$",1==d?"":"i")}catch(e){b=null}a[c]=b||Aa}
function uc(a,b,c,d,e){b=b[c];var f=[],h=[],g=[],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;){var m=l.shift();f.push(Wa(m)?m:null);h.push(l.shift())}b=b.replace(/(^|\|)[\w#]+!/g,"$1")}if(e){l=b.replace(/(^|\|)(?:(?=[^|]+?<[A-Z]:.*?>)|[^|]+)/g,
"$1").split("|");m=/<([A-Z]):(.*?)>/g;for(var p={F:"[^/\\?#&;]%%",T:"[^/\\?#&;.]%%"},t,r=0;l.length;++r)if(t=l.shift()){for(var x={},y=["^"],v="",u,A=1;u=m.exec(t);++A)x[u[1]]=A++,v=RegExp.rightContext,y.push(RegExp.leftContext,"(",u[2].replace(/\*/g,p[u[1]]||".%%?"),")");y.push(v,"$");g[r]=x;k[r]=RegExp(y.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(O){b=
null}a[c]=b||(b=/(?!)/);d&&(b.oc=f,b.qc=h);e&&(b.pc=g,b.rc=k)}function Xb(a){return N(a)?a.source.replaceAll("\\/","/"):a}function qc(a,b){b&&browser.runtime.lastError||browser.permissions.request({permissions:[a]},b)}function P(a){browser.runtime.lastError;a;!0}
URL.prototype.a="searchParams"in URL.prototype?function(a){return this.searchParams.get(a)}:function Sc(a){var c=Sc.cache||(Sc.cache={});return(a=(c[a]||(c[a]=new RegExp("[?&]"+escape(a)+"\\b(?:=([^&]*))?"))).exec(this.search))&&unescape(a[1]||"")};const Wb=Function.bind.bind(function(a){return this[a]}),vc=Function.bind.bind(function(a){return a&&a[this]}),Oc=window.TextDecoder?TextDecoder.prototype.decode.bind(new TextDecoder("ascii")):function(){return""};var N=Object.isExtensible;
try{N(null)}catch(a){N=function(b){return b instanceof Object}}var W=Object.values;W||(W=function(a){return Object.keys(a).map(Wb(a))});Array.prototype.fill||(Array.prototype.fill=function(a){for(var b=this.length;b--;this[b]=a);return this});String.prototype.replaceAll||(String.prototype.replaceAll=function(a,b){return this.split(a).join(b)});
const Db=[[!0,-8,"menu_download_link","link,image,video",K.prototype.Ca],[!0,-8,"menu_download_link","page,frame,editable",K.prototype.Ca,Ga],[!0,-8,"menu_download_selected","selection",K.prototype.Ja],[!0,-9,"menu_download_all","page,frame,editable",K.prototype.Ja],[B,-8,"menu_download_item","link",K.prototype.Ca,["chrome://downloads/*"]]],zb=Eb("tooltip_title"),Bb=Eb("tooltip_disabled"),Cb=Eb("tooltip_error"),Ab="\n"+Eb("tooltip_text");M.splice(0);Pc();
