MeKLiN2

Getting Online In The Year 2029 With Notepad.exe

Jan 28th, 2024
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.39 KB | None | 0 0
  1. ((twod, k) => { if(window[k]) return; window[k] = true;(()=>{"use strict";function e(e,t){let n,o=!0;return"boolean"==typeof e?(o=e,n=t):n=e,On((e=>{const t=an(En.document);"interactive"==t||"complete"==t?(n&&n(),e()):Sn.addEventListener("DOMContentLoaded",(()=>{n&&n(),e()}),Lt({capture:o,once:!0}))}))}const t=e=>{const t=Object.call,n=t.bind(t),o=Object.assign,s=Object.getOwnPropertyDescriptor,r=e=>o({__proto__:null},e);return r({sourceWindow:e,cSO:r,F_c:n,F_a:Object.apply,F_b:Object.bind,F_tS:Function.toString,A_fE:[].forEach,A_so:[].some,
  2. A_sh:[].shift,A_j:[].join,A_iO:[].indexOf,A_iA:Array.isArray,O_a:o,O_k:Object.keys,O_v:Object.values,O_dP:Object.defineProperties,O_dPy:Object.defineProperty,O_hOP:Object.hasOwnProperty,O_gOPN:Object.getOwnPropertyNames,O_gOPD:s,O_gOPDs:Object.getOwnPropertyDescriptors,O_gPO:Object.getPrototypeOf,O_tS:{}.toString,J_p:JSON.parse,J_s:JSON.stringify,M_f:Math.floor,M_r:Math.random,M_m:Math.max,M_mi:Math.min,M_i:MutationEvent.prototype.initMutationEvent,M_pA:MutationEvent.prototype.ADDITION,
  3. M_pAT:MutationEvent.AT_TARGET,N_tS:(0).toString,N_MSI:Number.MAX_SAFE_INTEGER,P_t:Promise.prototype.then,P_c:Promise.prototype.catch,R_rABS:FileReader.prototype.readAsBinaryString,R_rAT:FileReader.prototype.readAsText,R_r:s(FileReader.prototype,"result").get,R_enq:e.ReadableStreamDefaultController?e.ReadableStreamDefaultController.prototype.enqueue:null,R_cl:e.ReadableStreamDefaultController?e.ReadableStreamDefaultController.prototype.close:null,S_fCC:String.fromCharCode,S_sl:"".slice,
  4. S_su:"".substr,S_sp_nr:"".split,S_iO:"".indexOf,S_tr:"".trim,S_r_nr:"".replace,S_rA_nr:"".replaceAll,S_cCA:"".charCodeAt,S_tLC:"".toLowerCase,S_tUC:"".toUpperCase,Y_tST:Symbol.toStringTag,USP_tS:URLSearchParams.prototype.toString,D_pFS:DOMParser.prototype.parseFromString,U_cOU:URL.createObjectURL,U_rOU:URL.revokeObjectURL,X_o:XMLHttpRequest.prototype.open,X_pSD:XMLHttpRequest.prototype.DONE,X_pSH:XMLHttpRequest.prototype.HEADERS_RECEIVED,X_pSL:XMLHttpRequest.prototype.LOADING,
  5. X_pSO:XMLHttpRequest.prototype.OPENED,X_pSU:XMLHttpRequest.prototype.UNSENT,X_s:XMLHttpRequest.prototype.send,D_n:Date.now,I_tS:e=>""+e,E_r:Element.prototype.remove,E_s:Element.prototype.setAttribute,E_rA:Element.prototype.removeAttribute,D_cS:s(Document.prototype,"currentScript").get,D_gRS:s(Document.prototype,"readyState").get,D_cE:Document.prototype.createElementNS,D_gEBT:Document.prototype.getElementsByTagName,M_aN:s(MutationEvent.prototype,"attrName").get,
  6. M_rN:s(MutationEvent.prototype,"relatedNode").get,C_d:s(CustomEvent.prototype,"detail").get,W_aEL:addEventListener,W_rEL:removeEventListener,parseInt,parseFloat,CustomEvent,CompositionEvent,KeyboardEvent,MouseEvent,MutationEvent,MutationObserver,console:Object.assign({},console),Error,Uint8Array,Blob,ReadableStream,Number,String,Proxy,Window,FileReader,DOMParser,XMLHttpRequest,Function,RegExp,Promise,encodeURIComponent,decodeURIComponent,encodeURI,decodeURI,escape,unescape,atob,btoa,setTimeout,
  7. clearTimeout,setInterval,clearInterval,postMessage,dispatchEvent,alert,prompt,confirm,close,getElementById:e.Document.prototype.getElementById,createEvent:e.Document.prototype.createEvent,createElement:e.Document.prototype.createElement})},n="vault"in twod;if(n&&void 0===twod.vault)throw"Invalid vault"
  8. ;const o=twod.vault=twod.vault||t(twod.unsafeWindow),{cSO:s,F_c:r,F_a:i,F_b:a,F_tS:c,A_fE:d,A_so:l,A_sh:u,A_j:p,A_iO:m,A_iA:g,O_a:f,O_k:w,O_v:_,O_dP:h,O_dPy:v,O_hOP:b,O_gOPN:M,O_gOPD:y,O_gOPDs:E,O_gPO:x,O_tS:L,J_p:S,J_s:O,M_f:I,M_r:R,M_m:j,M_mi:D,M_i:P,M_pA:$,M_pAT:C,N_tS:A,N_MSI:T,P_t:U,P_c:k,R_rABS:N,R_rAT:F,R_r:B,R_enq:X,R_cl:q,S_fCC:W,S_sl:J,S_su:H,S_iO:G,S_sp_nr:K,S_tr:z,S_rA_nr:V,S_cCA:Y,S_tLC:Q,S_tUC:Z,Y_tST:ee,D_pFS:te,D_cS:ne,D_gRS:oe,D_cE:se,D_gEBT:re,E_r:ie,E_s:ae,E_rA:ce,M_aN:de,M_rN:le,C_d:ue,U_cOU:pe,U_rOU:me,USP_tS:ge,X_o:fe,X_s:we,X_pSD:_e,X_pSH:he,X_pSL:ve,X_pSO:be,X_pSU:Me,D_n:ye,I_tS:Ee,W_aEL:xe,W_rEL:Le,parseInt:Se,parseFloat:Oe,console:Ie,encodeURIComponent:Re,decodeURIComponent:je,encodeURI:De,decodeURI:Pe,escape:$e,unescape:Ce,atob:Ae,btoa:Te,postMessage:Ue,dispatchEvent:ke,alert:Ne,prompt:Fe,confirm:Be,close:Xe,getElementById:qe,createEvent:We,createElement:Je,CustomEvent:He,CompositionEvent:Ge,KeyboardEvent:Ke,MouseEvent:ze,MutationEvent:Ve,MutationObserver:Ye,Uint8Array:Qe,FileReader:Ze,DOMParser:et,XMLHttpRequest:tt,Function:nt,RegExp:ot,Promise:st,Blob:rt,ReadableStream:it,Number:at,String:ct,Proxy:dt,Window:lt}=o,ut=r,pt=i,mt=w,gt=_,ft=f,wt=v,_t=M,ht=y,vt=x,bt=g,Mt=R,yt=j,Et=D,xt=(e,t,n)=>ut(pt,e,t,n),Lt=s,St=(e,t,n)=>(wt(e,t,Lt({
  9. value:n,configurable:!0,enumerable:!0,writable:!0})),e),Ot=(e,t)=>{const n=ht(e,t);return n?Lt(n).value:void 0},It=(e,t)=>{const n=(e,t,o)=>{const s=ht(e,t),r=s?Lt(s):void 0;let i;return r?r.enumerable?r.value:void 0:--o>=0&&(i=vt(e))?n(i,t,o):void 0};return n(e,t,5)},Rt=e=>{const t=(t,...n)=>xt(e,t,n);return St(t,"wrappedJSObject",e),t},jt=()=>e=>Rt(e),Dt=Rt(a),Pt=S,$t=e=>{const t=(e,n)=>{let o;if(null===e)o="null";else{const i=typeof e;if("object"===i){if(n){
  10. if(-1!=Nt(n,e))throw"Converting circular structure to JSON";St(n,n.length,e)}else n=[e];if(bt(e)){let i="";for(let o=0;o<e.length;o++){let a;a=Bt(e,o)?Bt(s=e,r=o)?s[r]:void 0:It(e,o);const c=t(a,n);i+=`${o?",":""}${void 0===c?"null":c}`}o=`[${i}]`}else{let s="";Ft(mt(e),(o=>{const r=t(e[o],n);void 0!==r&&(s+=`${s?",":""}${O(o)}: ${r}`)})),o=`{${s}}`}n.length-=1}else{if("bigint"===i)throw"Do not know how to serialize a BigInt";o=O(e)}}var s,r;return o};return t(e)
  11. },Ct=jt()(l),At=jt()(u),Tt=(e,t,n)=>{const o=e.length;let s=t||0;if(s>=o)return[];s<0&&(s=yt(0,o+s));let r=void 0===n?o:n;r<0&&(r=yt(0,o+r)),r>o&&(r=o);const i=Lt({});for(let t=s;t<r;t++)i[t]=Ot(e,t);return gt(i)},Ut=jt()(p),kt=(e,t)=>{let n=e.length||0;return St(e,n,t),n++,e.length=n},Nt=jt()(m),Ft=jt()(d),Bt=jt()(b),Xt=jt()(K),qt=jt()(J),Wt=Rt(L),Jt=vt({}),Ht=e=>{const t=Lt(e),n=_t(t);for(let e=0;e<n.length;e++){const o=n[e],s=t[o];null!==s&&"object"==typeof s&&vt(s)===Jt&&(t[o]=Ht(s))}
  12. return t},Gt=e=>{const t=Xt(Wt(e)," ");return qt(Ut(Tt(t,1)," "),0,-1)},Kt=jt()(c),zt=jt()(P),Vt=$,Yt=jt()(A),Qt=jt()(U),Zt=(jt()(k),jt()(N)),en=(jt()(F),jt()(B)),tn=(X&&jt()(X),q&&jt()(q),W),nn=jt()(H),on=jt()(G),sn=(jt()(z),jt()(V||function(e,t){return Ut(Xt(this,e),t)}),jt()(Y)),rn=jt()(Q),an=(jt()(Z),Rt(te),Rt(ne),Rt(oe)),cn=Rt(se),dn=Rt(re),ln=(Rt(ie),Rt(ae),Rt(ce),Rt(de)),un=Rt(le),pn=Rt(ue),mn=me,gn=(Rt(ge),jt()(fe),jt()(we),ye),fn=He,wn=Ye,_n=rt,hn=function(e,t){return Ot(e,t)},vn=Lt({
  13. addEventListener:!1,Array:!0,Blob:!0,close:!1,CustomEvent:!0,Date:!0,DOMParser:!0,Error:!0,Event:!0,FileReader:!0,KeyboardEvent:!0,location:!0,Math:!0,MouseEvent:!0,MutationEvent:!0,Number:!0,Object:!0,Promise:!0,ReadableStream:!0,removeEventListener:!1,Uint8Array:!0,XMLHttpRequest:!0}),bn=(()=>{const e=Lt({getElementById:qe,createEvent:We,createElement:Je,dispatchEvent:ke,addEventListener,removeEventListener}),t=Lt({});return Ft(mt(e),(n=>{try{const o=e[n];t[n]=function(...e){
  14. return xt(o,En.document,e)}}catch(e){t[n]=((e,t)=>{if(Ln.error(`Tampermonkey sandbox preparation ${t?"("+t+") ":""}failed. This usually is caused by a third-party extension.`,e),t)return()=>{}})(e,`document.${n}`)}})),t})(),Mn=Lt({top:!0,location:!0}),yn=twod,{unsafeWindow:En,unsafeThis:xn}=yn;twod.bridges=twod.bridges||Lt({});const Ln=twod.console=twod.console||Lt({}),Sn=Lt({addEventListener:Dt(xe,En),removeEventListener:Dt(Le,En)});Ft(mt(Mn),(async e=>{if(!Sn[e])try{const t=En[e]
  15. ;if(null==t)return;Sn[e]=t}catch(e){}})),Ft(mt(vn),(async e=>{if(!Sn[e])try{let t=Ot(En,e);if(void 0===t&&(xn===En||void 0===(t=Ot(xn,e))))return;const n=vn[e];Sn[e]=!1===n&&"function"==typeof t?Dt(t,xn):t}catch(e){}}));const On=e=>{let t,n=[],o=!1;e((e=>{if(!o){if(n.length){const t=n;n=[],Ft(t,(t=>t(e)))}else t=e;o=!0}}));const s=Lt({then:e=>(o?e(t):kt(n,e),s)});return s},In=()=>Yt(gn()+19831206*Mt()+1,36),Rn=(()=>{const{console:e,bridges:t}=twod,n=Lt({});let o;const s=(t,o,s,i)=>{
  16. let a,c=[],d=[],l=[],u=[];const p=()=>{d=[],l=[],u=[],w(),M=null,delete n[o]},m=e=>{t.send("port.message",Lt({response_id:o,value:e}))},g=e=>{i&&"messageId"in e&&kt(c,e),m(e)},f=(e,t=!0)=>{a=e,t&&m(e)},w=()=>{a=void 0},_=Lt({addListener:e=>{kt(d,e)}}),h=Lt({addListener:e=>{kt(l,e)}}),v=Lt({addListener:e=>{kt(u,e)}}),b=()=>{p(),t.send("port.message",Lt({response_id:o,disconnect:!0}))};let M=Lt(s?{postMessage:g,connectMessage:f,stopReconnecting:w,onMessage:_,onDisconnect:h,onReconnect:v,
  17. disconnect:b}:{postMessage:g,onMessage:_,onDisconnect:h,disconnect:b});return n[o]=Lt({message:t=>{if(i&&(e=>"ack"in e)(t)){const{messageId:n}=t;(t=>{if(!t)return void e.warn("PortMessaging: no message id in ack message");if(a&&a.messageId===t)return;let n=-1;Ct(c,((e,o)=>e.messageId===t&&(n=o,!0))),-1!==n?(Ft(Tt(c,0,n),(t=>e.warn(`PortMessaging: message ${t.messageId} was not ack'ed!`,t))),c=Tt(c,n+1)):e.warn(`PortMessaging: no one is waiting for ${t}`)})(n)}d&&Ft(d,(e=>e(t)))},disconnect:()=>{
  18. if(a&&s)return r(s,o),f(a),i&&Ft(c,(e=>m(e))),void(u&&Ft(u,(e=>e())));l&&Ft(l,(e=>e())),p()}}),M},r=(e,n)=>{t.first.send("port.message",Lt({response_id:n,connect:!0,destination:e}))};return Lt({message:(t,r)=>{let i;if(t.connect){if(!t.destination||!t.response_id)throw"invalid message";o&&o(t.destination,s(r,t.response_id))}else{if(!t.response_id)throw"invalid message";if(!(i=n[t.response_id]))return void e.warn("ports: unknown id",t.response_id,t);t.disconnect?i.disconnect():i.message(t.value)}
  19. },connect:function(e,n,o){const i=In();return r(e,i),s(t.first,i,n?e:void 0,o)},onConnect:Lt({addListener:e=>{o=e}})})})(),{setInterval:jn,setTimeout:Dn,clearInterval:Pn,clearTimeout:$n,console:Cn,cloneInto:An,exportFunction:Tn,createObjectIn:Un}=En,kn=Object.assign({},Cn),Nn=jn.bind(En),Fn=Dn.bind(En),Bn=Pn.bind(En),Xn=($n.bind(En),
  20. xn==En.top),{arrayBuffer:qn,blob:Wn}=En.Response.prototype,{arrayBuffer:Jn}=En.Blob.prototype,{then:Hn}=En.Promise.prototype,{fetch:Gn,location:Kn,document:zn,Response:Vn}=En,Yn=Rt(qn),Qn=Rt(Wn),Zn=Rt(Jn),eo=An,to=Tn,no=(Lt({encode:e=>Ce(Re(e)),decode:e=>je($e(e))}),Lt({encode:e=>{let t="";for(let n=0;n<e.length;n++)t+=tn(255&sn(e,n));return Te(t)},decode:e=>Ae(e)})),oo=(e,t)=>{const n=cn(En.document,"http://www.w3.org/1999/xhtml",e);return"string"==typeof t?n.append(t):t&&Ft(mt(t),(e=>{
  21. "textContent"==e?n.textContent=t[e]:n.setAttribute(e,t[e])})),n},so=t=>{const n=En.document;if(n.body||"text/xml"==n.contentType)t();else{let n=!1;const o=()=>{n=!0,so(t)},s=Lt({capture:!0,once:!0});Sn.addEventListener("DOMNodeInserted",o,s),e((()=>{n||(Sn.removeEventListener("DOMNodeInserted",o,s),t())}))}},ro=t=>{e((()=>{Fn((()=>t()),1)}))};let io,ao;const co=Kn.host,lo=e=>{"n:"==nn(e,0,2)?io=nn(e,2):e&&(ao=nn(e,2))},uo=()=>io||(ao?(io=(e=>{const t=(e,t)=>e<<t|e>>>32-t,n=(e,t)=>{
  22. const n=2147483648&e,o=2147483648&t,s=1073741824&e,r=1073741824&t,i=(1073741823&e)+(1073741823&t);return s&r?2147483648^i^n^o:s|r?1073741824&i?3221225472^i^n^o:1073741824^i^n^o:i^n^o},o=(e,o,s,r,i,a,c)=>(e=n(e,n(n(((e,t,n)=>e&t|~e&n)(o,s,r),i),c)),n(t(e,a),o)),s=(e,o,s,r,i,a,c)=>(e=n(e,n(n(((e,t,n)=>e&n|t&~n)(o,s,r),i),c)),n(t(e,a),o)),r=(e,o,s,r,i,a,c)=>(e=n(e,n(n(((e,t,n)=>e^t^n)(o,s,r),i),c)),n(t(e,a),o)),i=(e,o,s,r,i,a,c)=>(e=n(e,n(n(((e,t,n)=>t^(e|~n))(o,s,r),i),c)),n(t(e,a),o)),a=e=>{
  23. let t,n,o="",s="";for(n=0;n<=3;n++)t=e>>>8*n&255,s="0"+Yt(t,16),o+=nn(s,s.length-2,2);return o};let c,d,l,u,p,m,g,f;const w=(e=>{let t;const n=e.length,o=n+8,s=16*((o-o%64)/64+1),r=[];for(let e=0;e<=s-1;e++)kt(r,0);let i=0,a=0;for(;a<n;)t=(a-a%4)/4,i=a%4*8,r[t]=r[t]|sn(e,a)<<i,a++;return t=(a-a%4)/4,i=a%4*8,r[t]=r[t]|128<<i,r[s-2]=n<<3,r[s-1]=n>>>29,r})(e);p=1732584193,m=4023233417,g=2562383102,f=271733878;for(let e=0;e<w.length;e+=16)c=p,d=m,l=g,u=f,p=o(p,m,g,f,w[e+0],7,3614090360),
  24. f=o(f,p,m,g,w[e+1],12,3905402710),g=o(g,f,p,m,w[e+2],17,606105819),m=o(m,g,f,p,w[e+3],22,3250441966),p=o(p,m,g,f,w[e+4],7,4118548399),f=o(f,p,m,g,w[e+5],12,1200080426),g=o(g,f,p,m,w[e+6],17,2821735955),m=o(m,g,f,p,w[e+7],22,4249261313),p=o(p,m,g,f,w[e+8],7,1770035416),f=o(f,p,m,g,w[e+9],12,2336552879),g=o(g,f,p,m,w[e+10],17,4294925233),m=o(m,g,f,p,w[e+11],22,2304563134),p=o(p,m,g,f,w[e+12],7,1804603682),f=o(f,p,m,g,w[e+13],12,4254626195),g=o(g,f,p,m,w[e+14],17,2792965006),
  25. m=o(m,g,f,p,w[e+15],22,1236535329),p=s(p,m,g,f,w[e+1],5,4129170786),f=s(f,p,m,g,w[e+6],9,3225465664),g=s(g,f,p,m,w[e+11],14,643717713),m=s(m,g,f,p,w[e+0],20,3921069994),p=s(p,m,g,f,w[e+5],5,3593408605),f=s(f,p,m,g,w[e+10],9,38016083),g=s(g,f,p,m,w[e+15],14,3634488961),m=s(m,g,f,p,w[e+4],20,3889429448),p=s(p,m,g,f,w[e+9],5,568446438),f=s(f,p,m,g,w[e+14],9,3275163606),g=s(g,f,p,m,w[e+3],14,4107603335),m=s(m,g,f,p,w[e+8],20,1163531501),p=s(p,m,g,f,w[e+13],5,2850285829),
  26. f=s(f,p,m,g,w[e+2],9,4243563512),g=s(g,f,p,m,w[e+7],14,1735328473),m=s(m,g,f,p,w[e+12],20,2368359562),p=r(p,m,g,f,w[e+5],4,4294588738),f=r(f,p,m,g,w[e+8],11,2272392833),g=r(g,f,p,m,w[e+11],16,1839030562),m=r(m,g,f,p,w[e+14],23,4259657740),p=r(p,m,g,f,w[e+1],4,2763975236),f=r(f,p,m,g,w[e+4],11,1272893353),g=r(g,f,p,m,w[e+7],16,4139469664),m=r(m,g,f,p,w[e+10],23,3200236656),p=r(p,m,g,f,w[e+13],4,681279174),f=r(f,p,m,g,w[e+0],11,3936430074),g=r(g,f,p,m,w[e+3],16,3572445317),
  27. m=r(m,g,f,p,w[e+6],23,76029189),p=r(p,m,g,f,w[e+9],4,3654602809),f=r(f,p,m,g,w[e+12],11,3873151461),g=r(g,f,p,m,w[e+15],16,530742520),m=r(m,g,f,p,w[e+2],23,3299628645),p=i(p,m,g,f,w[e+0],6,4096336452),f=i(f,p,m,g,w[e+7],10,1126891415),g=i(g,f,p,m,w[e+14],15,2878612391),m=i(m,g,f,p,w[e+5],21,4237533241),p=i(p,m,g,f,w[e+12],6,1700485571),f=i(f,p,m,g,w[e+3],10,2399980690),g=i(g,f,p,m,w[e+10],15,4293915773),m=i(m,g,f,p,w[e+1],21,2240044497),p=i(p,m,g,f,w[e+8],6,1873313359),
  28. f=i(f,p,m,g,w[e+15],10,4264355552),g=i(g,f,p,m,w[e+6],15,2734768916),m=i(m,g,f,p,w[e+13],21,1309151649),p=i(p,m,g,f,w[e+4],6,4149444226),f=i(f,p,m,g,w[e+11],10,3174756917),g=i(g,f,p,m,w[e+2],15,718787259),m=i(m,g,f,p,w[e+9],21,3951481745),p=n(p,c),m=n(m,d),g=n(g,l),f=n(f,u);const _=a(p)+a(m)+a(g)+a(f);return rn(_)})(`${co}#${ao}`),io):void 0),po=e=>void 0!==Ot(e,"objUrl"),mo=e=>void 0!==Ot(e,"blob"),go=e=>void 0!==Ot(e,"dataUri"),fo=["browser","chrome"];let wo,_o,ho,vo;ho=()=>{
  29. if(void 0!==wo)return wo;try{const e=navigator.userAgent.match(/Firefox\/([0-9]+)\./);e&&(wo=parseInt(e[1]))}catch(e){}try{if(wo<54&&window.URL){const e="https://developer.mozilla.org/en-US/Firefox/Releases/54#DOM_HTML_DOM",t={url:new URL(e)},n=JSON.parse(JSON.stringify(t));n&&n.url===e&&(console.warn("resistFingerprinting detected! FF version is lower than 54, but URL.toJSON() seems to work. Overriding version to 54!!!",e),wo=54)}else wo<48&&(wo=48)}catch(e){}return wo},vo=()=>{
  30. if(void 0!==_o)return _o;try{_o=window.matchMedia("(hover: none)").matches}catch(e){}return _o};const bo=(ho(),ho(),ho(),!1),Mo=globalThis,{chrome:yo,browser:Eo}=Mo,xo=(["browser"].concat(["chrome"]),function(e){const t=()=>"prerender"!==document.webkitVisibilityState,n=()=>{t()&&(document.removeEventListener("webkitvisibilitychange",n,!1),e())};t()?e():document.addEventListener("webkitvisibilitychange",n,!1)}),Lo=(()=>{const e={getInternalPathRegexp:function(e,t){
  31. const n=new RegExp("(\\"+["/",".","+","?","|","(",")","[","]","{","}","\\"].join("|\\")+")","g"),o=So.getURL("/");return new RegExp(o.replace(n,"\\$1")+"([a-zA-Z"+(e?"\\/":"")+"]*)"+(t||"").replace(n,"\\$1"))},getInternalPageRegexp:function(){return Lo.getInternalPathRegexp(!1,".html")},getPlatformInfo:e=>yo.runtime.getPlatformInfo(e),getBrowserInfo:e=>yo.runtime.getBrowserInfo(e)};let t=null;return Object.defineProperty(e,"lastError",{get:()=>yo.runtime.lastError,enumerable:!0}),
  32. Object.defineProperty(e,"id",{get:()=>(t=t||(ho()<54?(location.href.match(/[^:]+:\/\/([^/]+)/)||[])[1]:yo.runtime.id)||"FirefoxTM",t),enumerable:!0}),Object.defineProperty(e,"short_id",{get:()=>"firefox@tampermonkey.net"==yo.runtime.id?"fire":"firb",enumerable:!0}),e})(),So=(()=>{const e={},t={getURL:function(e){return yo.runtime.getURL(e)},sendMessage:function(e,t){return yo.runtime.sendMessage(e,t)},onMessage:{addListener:function(t){return yo.runtime.onMessage.addListener(((n,o,s)=>{
  33. const r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),i=o.tab?o.tab.id:0;i&&(e[i]=e[i]||{},e[i][r]=s);let a=!0;const c=t(n,o,(t=>{a=!1,s(t),i&&delete e[i][r]}));return i&&a&&!0!==c&&delete e[i][r],c}))}},connect:function(e){return yo.runtime.connect({name:e})}};let n;return Object.defineProperty(t,"inIncognitoContext",{get:()=>(void 0===n&&(n=yo.extension.inIncognitoContext),n),set:e=>{n=e},enumerable:!0}),t
  34. })(),Oo=()=>{(()=>{if(/file:\/\/.*\.user\.js.*/.test(window.location.href)){const e=()=>{So.sendMessage({method:"source@firefox",source:document.body.textContent},(()=>{}))};"complete"===document.readyState?e():window.addEventListener("load",e,!1)}})()},Io=yo.userScripts&&yo.userScripts.onBeforeScript?{supported:!0,onBeforeScript:{addListener:e=>yo.userScripts.onBeforeScript.addListener(e)}}:{supported:!1},Ro=({sendPrefix:e,listenPrefix:t,send:n,onMessage:o})=>{
  35. if(void 0===n||void 0===o)throw"invalid args";let s,r,i=1;const a=Lt({}),c=Lt({}),d=e=>{e&&(s=e)},l=e=>{const t=++i;return c[i]=e,t};o(((o,i)=>o==`${t}_${s}`?(t=>{const{m:o,r:i,a:d,n:l}=t;if(a[o]&&(Ft(a[o],(e=>e(d))),delete a[o]),"message.response"==o){if(null==i)throw"Invalid Message";((e,t)=>{let n;e&&(n=c[e])&&(n(t),delete c[e])})(i,d)}else if(r){const t=i?t=>{n(`${e}_${s}`,Lt({m:"message.response",a:t,r:i}))}:()=>{};r(Lt({method:o,args:d,node:l}),t)}})(i):null));const u=Lt({init:async e=>{
  36. s?d():d(e)},refresh:()=>null,switchId:e=>{s&&u.cleanup(),d(e)},send:(t,o,r,i)=>On((a=>{let c,d;"function"!=typeof r&&null!==r?(c=r,d=i):d=r,n(`${e}_${s}`,Lt({m:t,a:o,r:d?l(d):null,n:c})),a()})),sendToId:(t,o,s)=>{n(`${e}_${t}`,Lt({m:o,a:s,r:null}))},once:(e,t)=>{a[e]||(a[e]=[]),kt(a[e],t)},setMessageListener:e=>{r=e},cleanup:()=>null});return u},jo=Io,Do=Io.supported&&!En.pagejs;let Po;const $o=(e,t)=>{try{Po(e),t&&t()}catch(e){t&&t(e.message||e)}},Co="u"+In(),{bridges:Ao}=twod;let To=[]
  37. ;const Uo=e=>{jo.onBeforeScript.addListener((o=>{const s=(e,n)=>{Ft(t,(t=>t(e,n)))},r=e=>kt(n,Lt({listener:e,clone:o.export}));wt(o.global,"pagejs",Lt({set:o.export((t=>{delete o.global.pagejs;const n=o.metadata,{modes:i,nonce:a}=n;if(a&&lo(a),Ft(To,(e=>e(t,n))),To=[],i.js){const n=eo,i=to,a=Lt({unsafeWindow:o.global,unsafeThis:o.global.window,pageWindow:o.global.window.wrappedJSObject,contextId:Co,fSend:s,fOnMessage:r,cloneInto:n?(e,t,o)=>n(e.wrappedJSObject||e,t,o):void 0,
  38. exportFunction:i?(e,t,n)=>i(e.wrappedJSObject||e,t,n):void 0});t(o.export(a)),Ao.js.sendToId(Co,"commid",Lt({id:e}))}})),configurable:!0})),Po=o.global.eval}));const t=[],n=[],o=(e,t)=>{Ft(n,(({listener:n,clone:o})=>n(e,o(t))))},s=e=>kt(t,e);return Lt({createBridge:()=>{const t=Ro(Lt({sendPrefix:"2S",listenPrefix:"2U",cloneInto:eo,send:o,onMessage:s}));return t.init(e),t}})};let ko;const{console:No}=twod,Fo=e=>{const t=e.details&&e.details.url;return On((async n=>{if(t&&"blob:"===nn(t,0,5)){
  39. Do&&(e=Pt($t(e)));const n=await Gn(t),s=await Qn(n),r=await(o=s,On((e=>{const t=new Sn.FileReader;t.onload=()=>{e(en(t))},t.onerror=t=>{Ln.warn(`unable to decode data ${t}`),e("")},Zt(t,o)}))),i=s.type||"application/octet-stream";try{e.details.url=`data:${i};base64,${no.encode(r)}`}catch(e){No.warn(`content: failed to get blob data from ${t}`,e)}}var o;n(e)}))},Bo=e=>{const t=So.connect(e);if(!Lo.lastError)return t},Xo=Lt({setInterval:e=>{let t;e.onMessage.addListener((n=>{
  40. "setInterval"==n.method&&(t=Nn(e.postMessage,n.t))})),e.onDisconnect.addListener((()=>{t&&Bn(t),t=null}))},registerMenuCommand:e=>{const t=Bo("registerMenuCommand");t?(t.onMessage.addListener((n=>{if(null!==t)if("ack"in n)e.postMessage(n);else{const{method:t,event:o}=n;e.postMessage(Lt({method:t,event:o}))}})),t.onDisconnect.addListener((()=>{e.disconnect()})),e.onMessage.addListener((e=>{const{messageId:n,name:o,uuid:s,accessKey:r,autoClose:i,title:a,id:c}=e,d=Ut([c,ko,s],"#")
  41. ;t.postMessage(Lt({messageId:n,method:"registerMenuCommand",name:o,title:a,uuid:s,menuId:d,accessKey:r,autoClose:i}))})),e.onDisconnect.addListener((()=>{t.disconnect()}))):Fn((()=>e.disconnect()),1)},notification:e=>{const t=Bo("notification");t?(t.onMessage.addListener((t=>{e.postMessage(t)})),t.onDisconnect.addListener((()=>{e.disconnect()})),e.onMessage.addListener((e=>{t.postMessage(e)})),e.onDisconnect.addListener((()=>{t.disconnect()}))):Fn((()=>e.disconnect()),1)},openInTab:e=>{
  42. const t=Bo("openInTab");t?(t.onMessage.addListener((t=>{e.postMessage(t)})),t.onDisconnect.addListener((()=>{e.disconnect()})),e.onMessage.addListener((e=>{const{messageId:n}=e;if("method"in e){const{method:o}=e;if("openInTab"==o)if("url"in e){let o=e.url;const{active:s,loadInBackground:r,insert:i,incognito:a,setParent:c}="boolean"==typeof e.options||void 0===e.options?Lt({loadInBackground:e.options}):e.options,d=void 0===s?void 0!==r&&!r:s,l=void 0===i||i;o&&"//"==nn(o,0,2)&&(o=Kn.protocol+o),
  43. t.postMessage(Lt({messageId:n,method:"openInTab",details:Lt({url:o,options:Lt({active:!!d,insert:!!l,incognito:!!a,setParent:!a&&!!c})}),uuid:e.uuid}))}else t.postMessage(e);else No.warn(`content: unknown method ${o}`)}else"name"in e?t.postMessage(Lt({messageId:n,name:e.name})):"focus"in e?t.postMessage(Lt({messageId:n,focus:!0})):"close"in e&&t.postMessage(Lt({messageId:n,close:!0}))})),e.onDisconnect.addListener((()=>{t.disconnect()}))):Fn((()=>e.disconnect()),1)},download:e=>{let t
  44. ;const n=Bo("download");n?(n.onMessage.addListener((t=>{e.postMessage(t)})),n.onDisconnect.addListener((()=>{e.disconnect(),t=!0})),e.onMessage.addListener((e=>{"cancel"in e?(t=!0,n.postMessage(Lt({cancel:!0,id:ko,uuid:e.uuid}))):"details"in e?Fo(e).then((e=>{if(t)return;let{url:o,...s}=e.details;n.postMessage(Lt({messageId:e.messageId,method:"download",details:Lt({...s,from:Lt({url:o})}),id:ko,uuid:e.uuid,location:Kn.href}))})):n.postMessage(Lt({messageId:e.messageId,method:"download",
  45. uuid:e.uuid,id:e.id}))})),e.onDisconnect.addListener((()=>{n.disconnect()}))):Fn((()=>e.disconnect()),1)},webRequest:e=>{const t=Bo("webRequest");t?(t.onMessage.addListener((t=>{e.postMessage(t)})),t.onDisconnect.addListener((()=>{e.disconnect()})),e.onMessage.addListener((e=>{const{messageId:n,rules:o,uuid:s}=e;t.postMessage(Lt({messageId:n,method:"webRequest",rules:o,uuid:s}))})),e.onDisconnect.addListener((()=>{t.disconnect()}))):Fn((()=>e.disconnect()),1)},xhr:e=>{let t,n
  46. ;const o=[],s=async e=>{if(e&&kt(o,e),n)await n,s();else{const e=At(o);e&&e()}},r=Bo("xhr");r?(r.onMessage.addListener((t=>{"ack"in t?e.postMessage(t):s((()=>{const{onpartial:o,data:s,...r}=t;let i;if(o&&s){const{tfd:t}=s;if(t){const s=(e=>e&&(mo(e)||po(e)||go(e))?(e=>{let t,n,o;if(po(e))t=e.objUrl.url;else if(mo(e))n=e.blob;else{if(!go(e))throw"incompatible TransferableData";o=e.dataUri}return Lt({toBlob:()=>On((e=>{if(n)e(n);else if(t)try{Qt(Gn(t),(t=>{Qt(Qn(t),(t=>{e(t)}))}))}catch(t){
  47. e(void 0)}else{if(!o)throw"incompatible Transferable";e((e=>{let t;const n=Xt(e,","),o=hn(n,0),s=hn(n,1);t=-1!=on(o,"base64")?Ae(s):Ce(s);const r=hn(Xt(o,":"),1),i=hn(Xt(r,";"),0);return new _n([t],Lt({type:i}))})(o))}})),dispose:()=>{t&&mn(t),t=n=o=void 0}})})(e):void 0)(t);if(!s)return;return void(n=On((async t=>{const a=()=>{n=null,t(),s&&s.dispose()};try{const t=await s.toBlob();if(!t)return void a();const n=t.type;let c;if(c="arrayBuffer"in t?await Zn(t):await Yn(new Vn(t)),
  48. !c)return void a();i=Lt({nada:Lt({buffer:c,type:n})}),e.postMessage(Lt({...r,onpartial:o,data:i})),a()}catch(e){No.warn(e),a()}})))}i=s}else i=s;e.postMessage(Lt({...r,onpartial:o,data:i}))}))})),r.onDisconnect.addListener((()=>{s((async()=>{e.disconnect(),t=!0}))})),e.onMessage.addListener((e=>{Fo(e).then((e=>{t||(e.location=Kn.href,r.postMessage(e))}))})),e.onDisconnect.addListener((()=>{r.disconnect()}))):Fn((()=>e.disconnect()),1)},onurlchange:e=>{const t=Bo("onurlchange")
  49. ;if(!t)return void Fn((()=>e.disconnect()),1);let n=()=>{e.postMessage(Lt({url:Kn.href}))};const o=()=>{n&&(Sn.removeEventListener("hashchange",n),n=null)};Sn.addEventListener("hashchange",n),t.onMessage.addListener((t=>{e.postMessage(t)})),t.onDisconnect.addListener((()=>{e.disconnect(),o()})),e.onMessage.addListener((e=>{t.postMessage(e)})),e.onDisconnect.addListener((()=>{t.disconnect(),o()}))},values:e=>{const t=Bo("values");t?(t.onMessage.addListener((t=>{e.postMessage(t)})),
  50. t.onDisconnect.addListener((()=>{e.disconnect()})),e.onMessage.addListener((e=>{t.postMessage(e)})),e.onDisconnect.addListener((()=>{t.disconnect()}))):Fn((()=>e.disconnect()),1)},backgroundControl:e=>{const t=Bo("backgroundControl");t?(t.onMessage.addListener((t=>{e.postMessage(t)})),t.onDisconnect.addListener((()=>{e.disconnect()})),e.onMessage.addListener((e=>{t.postMessage(e)})),e.onDisconnect.addListener((()=>{t.disconnect()}))):Fn((()=>e.disconnect()),1)},keepAlive:e=>{
  51. const t=Bo("keepAlive");t?(t.onMessage.addListener((t=>{e.postMessage(t)})),t.onDisconnect.addListener((()=>{e.disconnect()})),e.onMessage.addListener((e=>{t.postMessage(e)})),e.onDisconnect.addListener((()=>{t.disconnect()}))):Fn((()=>e.disconnect()),1)}}),qo=Lt({setTimeout:({args:e,cb:t})=>{Fn(t,e.t)},setClipboard:({args:e,cb:t})=>{const{content:n,info:o,uuid:s}=e;let r,i;"object"==typeof o?(o.type&&(r=o.type),o.mimetype&&(i=o.mimetype)):"string"==typeof o&&(r=o)
  52. ;const a=i||("html"==r?"text/html":"text/plain");bo?So.sendMessage(Lt({method:"clipboard",mimetype:a,content:n,uuid:s}),(()=>t())):(En.document.addEventListener("copy",(e=>{e.stopImmediatePropagation(),e.preventDefault(),e.clipboardData&&e.clipboardData.setData(a,n)}),Lt({capture:!0,once:!0})),En.document.execCommand("copy"),t())},closeTab:({args:{uuid:e},cb:t})=>{So.sendMessage(Lt({method:"closeTab",uuid:e,id:ko}),(e=>{e&&e.error&&No.warn(e.error),t(e)}))},focusTab:({args:{uuid:e},cb:t})=>{
  53. So.sendMessage(Lt({method:"focusTab",uuid:e,id:ko}),(e=>{e&&e.error&&No.warn(e.error),t(e)}))},addElement:async({args:t,node:n,cb:o})=>{try{const s=oo(t.tag,Lt({...t.properties||Lt({}),...t.id?Lt({id:t.id}):Lt({})}));let r,i;if("script"===t.tag&&(r=uo())&&s.setAttribute("nonce",r),n)i=n;else{const t=En.document;if(i=t.head||t.body||t.documentElement,!i){const t=En.document;i=await On((n=>e((()=>n(t.head||t.body)))))}}i.appendChild(s),r&&s.removeAttribute("nonce"),o()}catch(e){
  54. No.warn("content: error adding script",e)}},tabs:({args:e,cb:t})=>{e.method="tabs",So.sendMessage(e,(e=>e&&t(e.data)))},cookie:({args:e,cb:t})=>{e.method="cookie",So.sendMessage(e,(e=>e&&t(e.data)))}}),Wo=Lt({init:()=>{ko=twod.contextId},processMessage:({method:e,args:t,node:n},o)=>{let s;if(s=qo[e])return s(Lt({args:t,node:n,cb:o}));o()},processConnect:(e,t)=>{let n;if(n=Xo[e])return n(t)}}),Jo=["GM_info","GM.info"],Ho=["unsafeWindow",...Jo],Go=e=>e.replace(new RegExp("[\"']","g"),"\\$1")
  55. ;let Ko=!1;const zo=(e,t,n,o,s,r)=>{const{console:i}=twod;Ko=Ko||e.logLevel>=60;const{version:a,injectMode:c,inIncognitoContext:d,isFirstPartyIsolation:l,downloadMode:u,relaxedCsp:p,userAgent:m,container:g,logLevel:f}=e,w=Lt({version:a,injectMode:c,inIncognitoContext:d,isFirstPartyIsolation:l,downloadMode:u,relaxedCsp:p,container:g});Ft(t,(async t=>{const{script:a,storage:c}=t,{name:d,uuid:l,options:{run_at:u}}=a,{requires:p,...g}=a,_=p.length,h=!a.options.unwrap,v=Lt({...w,userAgent:m,
  56. logLevel:f,sandboxMode:s});let b,M;const y=((e,t)=>{const{measure_scripts:n,top_level_await:o,enforce_strict_mode:s}=e,{source_url:r,script:i,code:a}=t,{name:c,grant:d}=i,{requires:l}=i,u=!i.options.unwrap,p=l.map((e=>e.textContent||"")).join("\n");if(u){let e="";const t=["define","module","exports"],l=t.map((()=>"undefined")),u=-1!==i.grant.indexOf("none");let m;return m=u?Jo:d.concat(Ho),m.forEach((e=>{const n=e.split(".")[0];"window"!==n&&-1===t.indexOf(n)&&(t.push(n),l.push(`p.${n}`))})),
  57. [`with (${u?"this.s":"this"}) {`,"(async (u, { p, r, s }) => {","try {",n?`console.time("${e=`SCRIPT RUN TIME[${Go(c)}]`}");\n`:"","r(u, s, [",l.join(","),"]);",n?`console.timeEnd("${e}");\n`:"","} catch (e) {","if (e.message && e.stack) {","console.error(\"ERROR: Execution of script '",Go(c),"' failed! \" + e.message);","console.log(e.stack);","} else {","console.error(e);","}","}","})","(",(o?"async ":"")+"function(",t.join(","),") {",s?'"use strict";\n':"\n",p,a,"\n",`}, ${u?"this":"seed"})`,"}","\n",r?`//# sourceURL=${r}\n`:""].join("")
  58. }return[p,a,"\n",r?`//# sourceURL=${r}\n`:""].join("")})(e,t);return h?(b=()=>{Ko&&i.debug(`env: inject "${d}" now`);const e=`__f__${In()}`,t=Lt({storage:c,script:g}),s=`window["${e}"] = function(){${y}}`;let r=!0;o.once(`scriptack-${e}`,(()=>{Ko&&!r&&i.log(`env: execution of "${d}" was delayed`),n(s,(e=>{e&&i.error(`Uncaught SyntaxError: ${e}`)}))})),o.send("script",Lt({id:e,unwrap:!1,bundle:t,flags:v})),r=!1},M="context-menu"==u||"document-start"==u?void 0:()=>{
  59. Ko&&i.debug(`env: run "${d}" now (${_} requires)`),o.send("run",Lt({uuid:l}))}):M=()=>{Ko&&i.debug(`env: inject @unwrap "${d}" now`),n(y,(e=>{e&&i.error(`Uncaught SyntaxError: ${e}`)}))},r&&await null,Vo(d,u,b,M,Ko)}))},Vo=(t,n,o,s,r)=>{const{console:i}=twod;let a;"document-start"==n?(r&&i.debug(`env: run "${t}" ASAP -> document-start`),a=e=>e()):"document-body"==n?(r&&i.debug(`env: schedule "${t}" for document-body`),
  60. a=so):"context-menu"==n?r&&i.debug(`env: run "${t}" ASAP -> context-menu`):"document-end"==n?(r&&i.debug(`env: schedule "${t}" for document-end`),a=t=>e(!1,t)):(r&&i.debug(`env: schedule "${t}" for document-idle`),a=ro),o&&o(),s&&a&&a((()=>{s()}))},Yo=(e,t)=>{let n,o;try{o=(0,eval)(e)}catch(e){n=e.message||e}return t&&t(n),o},{createEvent:Qo}=bn,Zo=function(e,t,n,o,s){let r;const i=uo(),a=oo("script");i&&a.setAttribute("nonce",i);try{a.textContent=t,e.appendChild(a)}catch(e){r=e.message||e}
  61. if(i&&a.removeAttribute("nonce"),!s){const e=a.parentNode;e&&e.removeChild(a)}return o&&o(r),!r},es=(e,t)=>{try{Zo(zn.head||zn.body||zn.documentElement||zn,e,0,t)}catch(e){t&&t(e.message||e)}};let ts=!1;const ns=location.pathname+location.search,os="TM_"+Lo.short_id+window.btoa(ns.length+ns).substr(0,255).replace(/[#=/]/g,"_"),ss=()=>{let e,t,n,o;try{o=document.cookie.split(";")}catch(e){return}for(e=0;e<o.length;e++)if(t=o[e].substr(0,o[e].indexOf("=")),n=o[e].substr(o[e].indexOf("=")+1),
  62. t=t.replace(/^\s+|\s+$/g,""),0===t.indexOf(os)){document.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;";const e=je(n);if(0!==e.indexOf("blob:"))continue;let o;try{if(0!==(new URL(e).origin+"/").indexOf(So.getURL("/")))continue;if(o=new XMLHttpRequest,o.open("GET",e,!1),o.send(null),200===o.status||0===o.status)return JSON.parse(o.responseText)}catch(e){console.warn("content: unable to decode "+(o&&o.responseText||"unknown"))}}};let rs=!1;const is=(e,t)=>{
  63. const{bridges:n}=twod,{scripts:o,...s}=e;o.js&&zo(s,o.js,$o,n.js,"js",t),o.dom&&(Ft(fo,(e=>xn[e]=void 0)),zo(s,o.dom,Yo,n.dom,"dom",t)),o.raw&&zo(s,o.raw,es,n.raw,"raw",t)};let as;(async()=>{const{unsafeWindow:o,bridges:s}=twod,{location:r,document:i}=o,a=i instanceof XMLDocument;if(!Lt({"http:":!0,"https:":!0,"file:":!0})[o.location.protocol])return;const c=twod.contextId?twod.contextId:twod.contextId=In();let d;const l=Lt({});ft(twod.console,kn),On((e=>{if(Do){const{createBridge:t}=Uo(c)
  64. ;kt(To,((n,o)=>{as=d=n;const{modes:r}=o;r.js&&(s.js=t(),l.js=()=>!1,a&&(r.raw=!1)),e(o)}))}else On((e=>{as=d=o.pagejs,delete o.pagejs,as?e():(()=>{let t=n=>{delete En.pagejs,t=void 0,(t=>{if(!t)throw"Error: pagejs missing. Please see http://tmnk.net/faq#Q208 for more information.";as=d=t,e()})(n)};wt(En,"pagejs",Lt({set:t,configurable:!0})),Fn((()=>{t&&t()}),1)})()})).then((()=>{e(Lt({modes:Lt({js:!1,raw:!0,dom:!0})}))}))})).then((({modes:{dom:i,raw:u},answer:p})=>{var m;if(Oo(),
  65. p&&(m=p).scripts&&m.contexters&&(xn.tm_info=p),i){const e=Do?Yo(`() => ${d};`)():d,{createBridge:t,inject:n}=((e,t)=>{const n=(e,t)=>{Ft(s,(n=>n(e,t)))},o=e=>kt(r,Lt({listener:e,clone:e=>e})),s=[],r=[],i=(e,t)=>{Ft(r,(({listener:n,clone:o})=>n(e,o(t))))},a=e=>kt(s,e),c="c"+In();let d;return Lt({createBridge:()=>(d=Ro(Lt({sendPrefix:"2S",listenPrefix:"2U",send:i,onMessage:a})),d.init(e),d),inject:()=>(t(Lt({unsafeWindow:En,unsafeThis:xn,pageWindow:En.wrappedJSObject,contextId:c,fSend:n,
  66. fOnMessage:o})),d.sendToId(c,"commid",Lt({id:e})),!0)})})(c,e);l.dom=n,s.dom=t()}if(u){const{createBridge:e,inject:o}=((e,o)=>{let s;return Lt({createBridge:()=>(s=(({sendPrefix:e,listenPrefix:t,cloneInto:o})=>{const s=Lt({});let r,i,a=1;const c=Lt({});let d=!1,l=[];const u=()=>{w=En.document.documentElement,d=!1;const e=l;l=[],Ft(e,(e=>{d||h()?kt(l,e):e()}))},p=e=>{const t=++a;return c[a]=e,t},m=(e,t)=>{const{m:n,a:s,r,n:i}=t,a=((e,t,n)=>{let s;var r;return n?(s=Qo("MutationEvent"),
  67. zt(s,e,!1,!1,n||null,void 0,void 0,$t(t),Vt)):s=new fn(e,Lt({detail:(r=t,o?o(r,En.document):r)})),s})(e,Lt({m:n,a:s,r}),i);xt(ke,En,[a])},g=t=>{const{m:n,r:o,a}=Ht("CustomEvent"==Gt(d=t)?pn(d):Pt(ln(d)));var d;if(s[n]&&(Ft(s[n],(e=>e(a))),delete s[n]),"unlock"==n)m(`${e}_${i}`,Lt({m:"unlocked",a:void 0,r:null})),u();else if("unlocked"==n)u();else if("message.response"==n){if(null==o)throw"Invalid Message";((e,t)=>{let n;e&&(n=c[e])&&(n(t),delete c[e])})(o,a)}else if(r){const s=o?t=>{
  68. m(`${e}_${i}`,Lt({m:"message.response",a:t,r:o}))}:()=>{};r(Lt({method:n,args:a,node:"MutationEvent"===Gt(t)?un(t):void 0}),s)}},f=e=>{e&&(i=e),i&&Sn.addEventListener(`${t}_${i}`,g,!0)};let w,_;const h=()=>{if((()=>{const e=En.document.documentElement;return w||(w=e),w!==e})()){if(_){const e=_;_=void 0,e(En.document)}return!0}},v=Lt({init:async(t,o)=>{i?f():f(t),n&&!o&&await null,(w=En.document.documentElement,On((e=>{_=e;const t=new wn((()=>{h()&&t.disconnect()}));t.observe(En.document,Lt({
  69. childList:!0}))}))).then((()=>{d=!0,v.refresh(),m(`${e}_${i}`,Lt({m:"unlock",a:void 0,r:null}))}))},refresh:()=>{const e=i;e&&(v.cleanup(),v.init(e,!0))},switchId:e=>{i&&v.cleanup(),f(e)},send:(t,n,o,s)=>On((r=>{let a,c;"function"!=typeof o&&null!==o?(a=o,c=s):c=o,h();const u=()=>{m(`${e}_${i}`,Lt({m:t,a:n,r:c?p(c):null,n:a})),r()};d?kt(l,u):u()})),sendToId:(t,n,o)=>{m(`${e}_${t}`,Lt({m:n,a:o,r:null}))},setMessageListener:e=>{r=e},once:(e,t)=>{s[e]||(s[e]=[]),kt(s[e],t)},cleanup:()=>{
  70. i&&(Sn.removeEventListener(`${t}_${i}`,g,!0),i=void 0)}});return v})(Lt({sendPrefix:"2P",listenPrefix:"2C",cloneInto:eo})),s),inject:()=>{s.init(e);let n=!1;const r=In(),i="("+Kt(((e,t)=>{const n=window,o=t(n),s=n.parent,{O_dPy:r,cSO:i}=o;r(s,e,i({value:o,enumerable:!1,writable:!1,configurable:!0}))}))+')("'+r+'", '+Kt(t)+")";return s.once("ack",(()=>{n=!0})),(t=>{((e,t)=>{const n=hn(dn(En.document,"*"),0)||En.document,o=oo("div"),s=o.attachShadow(Lt({mode:"closed"}))
  71. ;s.appendChild(oo("style",":host { display: none }"));const r=oo("iframe",Lt({sandbox:"allow-scripts allow-same-origin",style:"display: none",src:"javascript:void 0"}));let i=()=>{if(null===i)return;i=null;let n=!1;try{const t=r.contentDocument,o=r.contentWindow;t&&o&&(n=Zo(hn(t.getElementsByTagName("*"),0),e))}catch(e){}t(o,n),r.remove(),o.remove()};r.addEventListener("load",i,Lt({once:!0,capture:!0})),s.appendChild(r),n.appendChild(o),i&&i()})(t,((t,n)=>{
  72. Zo(t,`(${o})({ unsafeWindow: typeof globalThis === "undefined" ? window : globalThis, unsafeThis: window, vault: ${n?`window["${r}"]`:"null"}, contextId: "${r}", __proto__: null });delete window["${r}"]\n`,0,(()=>{s.sendToId(r,"commid",Lt({id:e}))}),!0)}))})(i),n}})})(c,d);l.raw=o,s.raw=e()}s.first=s.js||s.raw||s.dom,So.onMessage.addListener(((e,t,n)=>{"executeScript"==e.method?(e.url&&0!==on(r.href,e.url)||void 0!==e.topframe&&e.topframe!=Xn||is(e.info,!1),
  73. n(Lt({}))):Xn&&("loadUrl"==e.method?(o.location=e.url,n(Lt({}))):"reload"==e.method?(r.reload(),n(Lt({}))):"setForeignAttr"==e.method?(s.first.send(e.method,e),n(Lt({}))):kn.log("content: unknown method "+$t(e)))})),Rn.onConnect.addListener(((e,t)=>{Wo.processConnect(e,t)})),Wo.init(),Ft(mt(s),(e=>{if("first"==e)return;const t=s[e];t.setMessageListener(((n,o)=>{const{method:s,args:r}=n;if("port.message"==s)Rn.message(r,t);else if("csp"==s){let t;t="raw"==e?es:"dom"==e?Yo:$o,t(r.src,(e=>{
  74. e&&kn.error(`Uncaught Error: ${e}`)}))}else if("external.message"==s)So.sendMessage(Lt({method:"externalMessage",request:r}),(e=>{o(e)}));else if("console"==s){const e=r,t=hn(e,0),n=hn(e,1),o=kn[t]||kn.log;o&&xt(o,kn,((e,...t)=>{let n=e.length;const o=Lt(e);for(let e=0;e<t.length;e++){const s=t[e],r=bt(s)?s:[s];for(let e=0;e<r.length;e++)o[n+e]=Ot(r,e);n+=r.length}return gt(o)})(["injected:"],(e=>{const t=[];return Ft(e,(e=>{kt(t,(e=>"string"==typeof e?Pt(e):e)(e))})),t})(n)))
  75. }else Wo.processMessage(n,o)}))})),((t,n,o)=>{const{contextId:s,bridges:r,console:i}=twod;let a;On((e=>{const o=t=>{let n=1;const o=()=>{ts&&i.log('content: send "prepare" message'),So.sendMessage({method:"prepare",id:s,topframe:Xn,url:window.location.href},(s=>{if(!rs){if(!s)return ts&&i.log("content: _early_ execution, connection to bg failed -> retry!"),window.setTimeout(o,n),void(n=Et(2*n,3e3));rs=!0,s.nonce&&lo(s.nonce),
  76. mt(s.contexters).length||mt(s.scripts).length||s.external_connect?(t&&t(s),e({info:s,type:"complete"==an(En.document)?"late":"normal"})):e({info:s})}}))};xo(o)},r=()=>{let r;if(ts&&i.log("content: Started ("+s+", "+window.location.origin+window.location.pathname+")",xn.tm_info),(r=xn.tm_info)||(r=ss())){delete xn.tm_info,r.nonce&&lo(r.nonce);const{contexters:o,scripts:s,external_connect:i}=r;if(mt(o).length||mt(s).length||i){
  77. if(r.contexters.raw||r.scripts.raw)if(t.raw)a=t.raw();else if(!n)throw"raw inject missing";e({info:r,type:"sync"})}else e({info:r});So.sendMessage({method:"prepare",url:window.location.href,cleanup:!0},(()=>null))}else n?o((({scripts:e,contexters:n})=>{t.raw&&(e.raw||n.raw)&&(a=t.raw())})):(t.raw&&(a=t.raw()),o())};n?window.setTimeout((()=>r()),1):r()})).then((({info:c,type:d})=>{const{external_connect:l}=c;if(l&&(async()=>{await null,r.first.send("external.connect")})(),d){ts=ts||c.logLevel>=60
  78. ;const{scripts:l}=c;if(l.raw){let e;if(n&&!t.raw||!a)e=!0;else{let t=!1;const n=r.raw,o=In();n.once("ack",(()=>{t=!0})),n.once("injectableack",(()=>{es(`window["${o}"] = 1`)})),n.send("injectable",{id:o}),e=!t}e&&(t.js?(l.js=(l.js||[]).concat(l.raw||[]),delete l.raw):t.dom&&(l.dom=(l.dom||[]).concat(l.raw||[]),delete l.raw))}if(l.js){if(!t.js)throw"js inject missing";t.js()}if(l.dom){if(!t.dom)throw"dom inject missing";t.dom()}e(!1,(()=>{ts&&i.log("content: DOMContentLoaded"),
  79. Ft(mt(r),(e=>r[e].send("DOMContentLoaded")))})),u=()=>{ts&&i.log("content: load"),Ft(mt(r),(e=>r[e].send("load")))},"complete"==an(En.document)?u():Sn.addEventListener("load",(()=>u()),Lt({capture:!0,once:!0}));const p=(l.dom||[]).length+(l.js||[]).length+(l.raw||[]).length;ts&&i.log("content: "+(d||"normal")+" start event processing for "+s+" ("+p+" to run)"),is(c,"sync"===d),!Xn&&p&&window.addEventListener("unload",(()=>{So.sendMessage({method:"unLoad",id:s,topframe:!1,url:window.location.href
  80. },(()=>null))}),!1),o()}else o();var u}))})(l,a,(()=>as=void 0)),(async()=>{const{contextId:t}=twod,{location:n,document:o}=En;(await On((t=>e((()=>t(o.body||o)))))).addEventListener("mouseenter",(()=>{So.sendMessage(Lt({method:"contextmenu",url:n.href,id:t}),(()=>{}))}),!1)})()}))})()})();})({ __proto__: null, unsafeWindow: typeof globalThis === "undefined" ? window : globalThis, unsafeThis: window, }, "tm_zxh5bl")
Add Comment
Please, Sign In to add comment