Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@titaniumnetwork-dev/ultraviolet

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@titaniumnetwork-dev/ultraviolet - npm Package Compare versions

Comparing version 1.0.4-beta.2 to 1.0.4-beta.3

2

dist/uv.handler.js

@@ -1,2 +0,2 @@

(()=>{"use strict";const e=globalThis.Ultraviolet;function t(a,r={},o="/bare/"){if("__uv"in a&&a.__uv instanceof e)return!1;a.document&&a.window&&a.document.querySelectorAll("script[__uv-script]").forEach((e=>e.remove()));const n=!a.window,i="__uv",s="__uv$",l=new e({...r,window:a});"function"==typeof r.construct&&r.construct(l,n?"worker":"window");const{client:c}=l,{HTMLMediaElement:d,HTMLScriptElement:u,HTMLAudioElement:h,HTMLVideoElement:m,HTMLInputElement:v,HTMLEmbedElement:p,HTMLTrackElement:g,HTMLAnchorElement:b,HTMLIFrameElement:f,HTMLAreaElement:y,HTMLLinkElement:_,HTMLBaseElement:w,HTMLFormElement:S,HTMLImageElement:k,HTMLSourceElement:P}=a;c.nativeMethods.defineProperty(a,"__uv",{value:l,enumerable:!1}),l.meta.origin=location.origin,l.location=c.location.emulate((e=>"about:srcdoc"===e?new URL(e):(e.startsWith("blob:")&&(e=e.slice("blob:".length)),new URL(l.sourceUrl(e)))),(e=>l.rewriteUrl(e))),l.bareData=a.__uv$bareData,l.cookieStr=a.__uv$cookies||"",l.meta.url=l.location,l.domain=l.meta.url.host,l.blobUrls=new a.Map,l.referrer="",l.cookies=[],l.localStorageObj={},l.sessionStorageObj={};try{l.bare=new URL(o,a.location.href)}catch(e){l.bare=a.parent.__uv.bare}const U=new e.BareClient(l.bare,l.bareData);if("about:srcdoc"===l.location.href&&(l.meta=a.parent.__uv.meta),a.EventTarget&&(l.addEventListener=a.EventTarget.prototype.addEventListener,l.removeListener=a.EventTarget.prototype.removeListener,l.dispatchEvent=a.EventTarget.prototype.dispatchEvent),c.nativeMethods.defineProperty(c.storage.storeProto,"__uv$storageObj",{get(){return this===c.storage.sessionStorage?l.sessionStorageObj:this===c.storage.localStorage?l.localStorageObj:void 0},enumerable:!1}),a.localStorage){for(const e in a.localStorage)e.startsWith(s+l.location.origin+"@")&&(l.localStorageObj[e.slice((s+l.location.origin+"@").length)]=a.localStorage.getItem(e));l.lsWrap=c.storage.emulate(c.storage.localStorage,l.localStorageObj)}if(a.sessionStorage){for(const e in a.sessionStorage)e.startsWith(s+l.location.origin+"@")&&(l.sessionStorageObj[e.slice((s+l.location.origin+"@").length)]=a.sessionStorage.getItem(e));l.ssWrap=c.storage.emulate(c.storage.sessionStorage,l.sessionStorageObj)}let M=a.document?c.node.baseURI.get.call(a.document):a.location.href,x=l.sourceUrl(M);function E(e,t){const a=`on${t}`,r=new WeakMap;Reflect.defineProperty(e,a,{enumerable:!0,configurable:!0,get(){return r.has(this)?r.get(this):null},set(e){return"function"==typeof e&&(r.has(this)&&this.removeEventListener(t,r.get(this)),r.set(this,e),this.addEventListener(t,e)),e}})}c.nativeMethods.defineProperty(l.meta,"base",{get:()=>a.document?(c.node.baseURI.get.call(a.document)!==M&&(M=c.node.baseURI.get.call(a.document),x=l.sourceUrl(M)),x):l.meta.url.href}),l.methods={setSource:"__uv$setSource",source:"__uv$source",location:"__uv$location",function:"__uv$function",string:"__uv$string",eval:"__uv$eval",parent:"__uv$parent",top:"__uv$top"},l.filterKeys=[i,l.methods.setSource,l.methods.source,l.methods.location,l.methods.function,l.methods.string,l.methods.eval,l.methods.parent,l.methods.top,"__uv$protocol","__uv$storageObj","__uv$url","__uv$modifiedStyle","__uv$config","__uv$dispatched","Ultraviolet","__uvHook"],c.on("wrap",((e,t)=>{c.nativeMethods.defineProperty(t,"name",c.nativeMethods.getOwnPropertyDescriptor(e,"name")),c.nativeMethods.defineProperty(t,"length",c.nativeMethods.getOwnPropertyDescriptor(e,"length")),c.nativeMethods.defineProperty(t,l.methods.string,{enumerable:!1,value:c.nativeMethods.fnToString.call(e)}),c.nativeMethods.defineProperty(t,l.methods.function,{enumerable:!1,value:e})})),c.fetch.on("request",(e=>{e.data.input=l.rewriteUrl(e.data.input)})),c.fetch.on("requestUrl",(e=>{e.data.value=l.sourceUrl(e.data.value)})),c.fetch.on("responseUrl",(e=>{e.data.value=l.sourceUrl(e.data.value)})),c.xhr.on("open",(e=>{e.data.input=l.rewriteUrl(e.data.input)})),c.xhr.on("responseUrl",(e=>{e.data.value=l.sourceUrl(e.data.value)})),c.workers.on("worker",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.workers.on("addModule",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.workers.on("importScripts",(e=>{for(const t in e.data.scripts)e.data.scripts[t]=l.rewriteUrl(e.data.scripts[t])})),c.workers.on("postMessage",(e=>{let t=e.data.origin;e.data.origin="*",e.data.message={__data:e.data.message,__origin:l.meta.url.origin,__to:t}})),c.navigator.on("sendBeacon",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.document.on("getCookie",(e=>{e.data.value=l.cookieStr})),c.document.on("setCookie",(e=>{Promise.resolve(l.cookie.setCookies(e.data.value,l.db,l.meta)).then((()=>{l.cookie.db().then((e=>{l.cookie.getCookies(e).then((e=>{l.cookieStr=l.cookie.serialize(e,l.meta,!0)}))}))}));const t=l.cookie.setCookie(e.data.value)[0];t.path||(t.path="/"),t.domain||(t.domain=l.meta.url.hostname),l.cookie.validateCookie(t,l.meta,!0)&&(l.cookieStr.length&&(l.cookieStr+="; "),l.cookieStr+=`${t.name}=${t.value}`),e.respondWith(e.data.value)})),c.element.on("setInnerHTML",(e=>{switch(e.that.tagName){case"SCRIPT":e.data.value=l.js.rewrite(e.data.value);break;case"STYLE":e.data.value=l.rewriteCSS(e.data.value);break;default:e.data.value=l.rewriteHtml(e.data.value)}})),c.element.on("getInnerHTML",(e=>{if("SCRIPT"===e.that.tagName)e.data.value=l.js.source(e.data.value);else e.data.value=l.sourceHtml(e.data.value)})),c.element.on("setOuterHTML",(e=>{e.data.value=l.rewriteHtml(e.data.value,{document:"HTML"===e.that.tagName})})),c.element.on("getOuterHTML",(e=>{switch(e.that.tagName){case"HEAD":e.data.value=l.sourceHtml(e.data.value.replace(/<head(.*)>(.*)<\/head>/s,"<op-head$1>$2</op-head>")).replace(/<op-head(.*)>(.*)<\/op-head>/s,"<head$1>$2</head>");break;case"BODY":e.data.value=l.sourceHtml(e.data.value.replace(/<body(.*)>(.*)<\/body>/s,"<op-body$1>$2</op-body>")).replace(/<op-body(.*)>(.*)<\/op-body>/s,"<body$1>$2</body>");break;default:e.data.value=l.sourceHtml(e.data.value,{document:"HTML"===e.that.tagName})}})),c.document.on("write",(e=>{if(!e.data.html.length)return!1;e.data.html=[l.rewriteHtml(e.data.html.join(""))]})),c.document.on("writeln",(e=>{if(!e.data.html.length)return!1;e.data.html=[l.rewriteHtml(e.data.html.join(""))]})),c.element.on("insertAdjacentHTML",(e=>{e.data.html=l.rewriteHtml(e.data.html)})),c.eventSource.on("construct",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.eventSource.on("url",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.history.on("replaceState",(e=>{e.data.url&&(e.data.url=l.rewriteUrl(e.data.url,"__uv"in e.that?e.that.__uv.meta:l.meta))})),c.history.on("pushState",(e=>{e.data.url&&(e.data.url=l.rewriteUrl(e.data.url,"__uv"in e.that?e.that.__uv.meta:l.meta))})),c.element.on("getAttribute",(e=>{c.element.hasAttribute.call(e.that,l.attributePrefix+"-attr-"+e.data.name)&&e.respondWith(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name))})),c.message.on("postMessage",(e=>{let t=e.data.origin,a=l.call;e.that&&(a=e.that.__uv$source.call),e.data.origin="*",e.data.message={__data:e.data.message,__origin:(e.that||e.target).__uv$source.location.origin,__to:t},e.respondWith(a(e.target,n?[e.data.message,e.data.transfer]:[e.data.message,e.data.origin,e.data.transfer],e.that))})),c.message.on("data",(e=>{const{value:t}=e.data;"object"==typeof t&&"__data"in t&&"__origin"in t&&e.respondWith(t.__data)})),c.message.on("origin",(e=>{const t=c.message.messageData.get.call(e.that);"object"==typeof t&&t.__data&&t.__origin&&e.respondWith(t.__origin)})),c.overrideDescriptor(a,"origin",{get:(e,t)=>l.location.origin}),c.node.on("baseURI",(e=>{e.data.value.startsWith(a.location.origin)&&(e.data.value=l.sourceUrl(e.data.value))})),c.element.on("setAttribute",(e=>{if(e.that instanceof d&&"src"===e.data.name&&e.data.value.startsWith("blob:"))return e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),void(e.data.value=l.blobUrls.get(e.data.value));l.attrs.isUrl(e.data.name)&&(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteUrl(e.data.value)),l.attrs.isStyle(e.data.name)&&(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteCSS(e.data.value,{context:"declarationList"})),l.attrs.isHtml(e.data.name)&&(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteHtml(e.data.value,{...l.meta,document:!0,injectHead:l.createHtmlInject(l.handlerScript,l.bundleScript,l.configScript,l.bareData,l.cookieStr,a.location.href)})),l.attrs.isSrcset(e.data.name)&&(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.html.wrapSrcset(e.data.value)),l.attrs.isForbidden(e.data.name)&&(e.data.name=l.attributePrefix+"-attr-"+e.data.name)})),c.element.on("audio",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.element.hookProperty([b,y,_,w],"href",{get:(e,t)=>l.sourceUrl(e.call(t)),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-href",a),e.call(t,l.rewriteUrl(a))}}),c.element.hookProperty([u,h,m,d,k,v,p,f,g,P],"src",{get:(e,t)=>l.sourceUrl(e.call(t)),set:(e,t,[a])=>{if(new String(a).toString().trim().startsWith("blob:")&&t instanceof d)return c.element.setAttribute.call(t,l.attributePrefix+"-attr-src",a),e.call(t,l.blobUrls.get(a)||a);c.element.setAttribute.call(t,l.attributePrefix+"-attr-src",a),e.call(t,l.rewriteUrl(a))}}),c.element.hookProperty([S],"action",{get:(e,t)=>l.sourceUrl(e.call(t)),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-action",a),e.call(t,l.rewriteUrl(a))}}),c.element.hookProperty([k],"srcset",{get:(e,t)=>c.element.getAttribute.call(t,l.attributePrefix+"-attr-srcset")||e.call(t),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-srcset",a),e.call(t,l.html.wrapSrcset(a))}}),c.element.hookProperty(u,"integrity",{get:(e,t)=>c.element.getAttribute.call(t,l.attributePrefix+"-attr-integrity"),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-integrity",a)}}),c.element.hookProperty(f,"sandbox",{get:(e,t)=>c.element.getAttribute.call(t,l.attributePrefix+"-attr-sandbox")||e.call(t),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-sandbox",a)}}),c.element.hookProperty(f,"contentWindow",{get:(e,a)=>{const n=e.call(a);try{return n.__uv||t(n,r,o),n}catch(e){return n}}}),c.element.hookProperty(f,"contentDocument",{get:(e,a)=>{const n=e.call(a);try{const e=n.defaultView;return e.__uv||t(e,r,o),n}catch(e){return win}}}),c.element.hookProperty(f,"srcdoc",{get:(e,t)=>c.element.getAttribute.call(t,l.attributePrefix+"-attr-srcdoc")||e.call(t),set:(e,t,[r])=>{e.call(t,l.rewriteHtml(r,{document:!0,injectHead:l.createHtmlInject(l.handlerScript,l.bundleScript,l.configScript,l.bareData,l.cookieStr,a.location.href)}))}}),c.node.on("getTextContent",(e=>{"SCRIPT"===e.that.tagName&&(e.data.value=l.js.source(e.data.value))})),c.node.on("setTextContent",(e=>{"SCRIPT"===e.that.tagName&&(e.data.value=l.js.rewrite(e.data.value))})),"serviceWorker"in a.navigator&&delete a.Navigator.prototype.serviceWorker,c.document.on("getDomain",(e=>{e.data.value=l.domain})),c.document.on("setDomain",(e=>{if(!e.data.value.toString().endsWith(l.meta.url.hostname.split(".").slice(-2).join(".")))return e.respondWith("");e.respondWith(l.domain=e.data.value)})),c.document.on("url",(e=>{e.data.value=l.location.href})),c.document.on("documentURI",(e=>{e.data.value=l.location.href})),c.document.on("referrer",(e=>{e.data.value=l.referrer||l.sourceUrl(e.data.value)})),c.document.on("parseFromString",(e=>{if("text/html"!==e.data.type)return!1;e.data.string=l.rewriteHtml(e.data.string,{...l.meta,document:!0})})),c.attribute.on("getValue",(e=>{c.element.hasAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name)&&(e.data.value=c.element.getAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name))})),c.attribute.on("setValue",(e=>{l.attrs.isUrl(e.data.name)&&(c.element.setAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteUrl(e.data.value)),l.attrs.isStyle(e.data.name)&&(c.element.setAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteCSS(e.data.value,{context:"declarationList"})),l.attrs.isHtml(e.data.name)&&(c.element.setAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteHtml(e.data.value,{...l.meta,document:!0,injectHead:l.createHtmlInject(l.handlerScript,l.bundleScript,l.configScript,l.bareData,l.cookieStr,a.location.href)})),l.attrs.isSrcset(e.data.name)&&(c.element.setAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.html.wrapSrcset(e.data.value))})),c.url.on("createObjectURL",(e=>{let t=e.target.call(e.that,e.data.object);if(t.startsWith("blob:"+location.origin)){let r="blob:"+("about:blank"!==l.meta.url.href?l.meta.url.origin:a.parent.__uv.meta.url.origin)+t.slice("blob:".length+location.origin.length);l.blobUrls.set(r,t),e.respondWith(r)}else e.respondWith(t)})),c.url.on("revokeObjectURL",(e=>{if(l.blobUrls.has(e.data.url)){const t=e.data.url;e.data.url=l.blobUrls.get(e.data.url),l.blobUrls.delete(t)}})),c.storage.on("get",(e=>{e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("set",(e=>{e.that.__uv$storageObj&&(e.that.__uv$storageObj[e.data.name]=e.data.value),e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("delete",(e=>{e.that.__uv$storageObj&&delete e.that.__uv$storageObj[e.data.name],e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("getItem",(e=>{e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("setItem",(e=>{e.that.__uv$storageObj&&(e.that.__uv$storageObj[e.data.name]=e.data.value),e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("removeItem",(e=>{e.that.__uv$storageObj&&delete e.that.__uv$storageObj[e.data.name],e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("clear",(e=>{if(e.that.__uv$storageObj)for(const t of c.nativeMethods.keys.call(null,e.that.__uv$storageObj))delete e.that.__uv$storageObj[t],c.storage.removeItem.call(e.that,s+l.meta.url.origin+"@"+t),e.respondWith()})),c.storage.on("length",(e=>{e.that.__uv$storageObj&&e.respondWith(c.nativeMethods.keys.call(null,e.that.__uv$storageObj).length)})),c.storage.on("key",(e=>{e.that.__uv$storageObj&&e.respondWith(c.nativeMethods.keys.call(null,e.that.__uv$storageObj)[e.data.index]||null)}));const T=["ws:","wss:"];class $ extends EventTarget{#e;#t;#a="blob";#r="";#o="";#n="";async#i(e,t){const a={};Reflect.setPrototypeOf(a,null),a.Origin=l.meta.url.origin,a["User-Agent"]=navigator.userAgent,""!==l.cookieStr&&(a.Cookie=l.cookieStr.toString()),this.#e=await U.createWebSocket(e,a,t),this.#e.binaryType=this.#a,this.#e.addEventListener("message",(e=>{this.dispatchEvent(new MessageEvent("message",e))})),this.#e.addEventListener("open",(async e=>{this.dispatchEvent(new Event("open",e))})),this.#e.addEventListener("error",(e=>{this.dispatchEvent(new ErrorEvent("error",e))})),this.#e.addEventListener("close",(e=>{this.dispatchEvent(new Event("close",e))}));const r=await this.#e.meta;r.headers.has("sec-websocket-protocol")&&(this.#r=r.headers.get("sec-websocket-protocol")),r.headers.has("sec-websocket-extensions")&&(this.#o=r.headers.get("sec-websocket-extensions"));let o=r.rawHeaders["set-cookie"]||[];Array.isArray(o)||(o=[]);for(const e of o)document.cookie=e}get url(){return this.#n}constructor(...e){if(super(),!e.length)throw new DOMException("Failed to construct 'WebSocket': 1 argument required, but only 0 present.");const[t,a]=e;let r;try{r=new URL(t)}catch(e){throw new DOMException(`Faiiled to construct 'WebSocket': The URL '${t}' is invalid.`)}if(!T.includes(r.protocol))throw new DOMException(`Failed to construct 'WebSocket': The URL's scheme must be either 'ws' or 'wss'. '${r.protocol}' is not allowed.`);this.#t=this.#i(r,a)}get protocol(){return this.#r}get extensions(){return this.#o}get readyState(){return this.#e?this.#e.readyState:$.CONNECTING}get binaryType(){return this.#a}set binaryType(e){return this.#a=e,this.#e&&(this.#e.binaryType=e),e}send(e){if(!this.#e)throw new DOMException("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.");this.#e.send(e)}close(e,t){if(void 0!==e&&("number"!=typeof e&&(e=0),1e3!==e&&(e<3e3||e>4999)))throw new DOMException(`Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. ${e} is neither.`);this.#t.then((()=>this.#e.close(e,t)))}}E($.prototype,"close"),E($.prototype,"open"),E($.prototype,"message"),E($.prototype,"error");for(const e of["url","protocol","extensions","readyState","binaryType"]){const t=Object.getOwnPropertyDescriptor(WebSocket.prototype,e),a=Object.getOwnPropertyDescriptor($.prototype,e);a?.get&&t?.get&&c.emit("wrap",a.get,t.get),a?.set&&t?.set&&c.emit("wrap",a.get,t.get)}if(c.emit("wrap",WebSocket.prototype.send,$.prototype.send),c.emit("wrap",WebSocket.prototype.close,$.prototype.close),c.override(a,"WebSocket",((e,t,a)=>new $(...a)),!0),$.prototype.constructor=a.WebSocket,c.function.on("function",(e=>{e.data.script=l.rewriteJS(e.data.script)})),c.function.on("toString",(e=>{l.methods.string in e.that&&e.respondWith(e.that[l.methods.string])})),c.object.on("getOwnPropertyNames",(e=>{e.data.names=e.data.names.filter((e=>!l.filterKeys.includes(e)))})),c.object.on("getOwnPropertyDescriptors",(e=>{for(const t of l.filterKeys)delete e.data.descriptors[t]})),c.style.on("setProperty",(e=>{c.style.dashedUrlProps.includes(e.data.property)&&(e.data.value=l.rewriteCSS(e.data.value,{context:"value",...l.meta}))})),c.style.on("getPropertyValue",(e=>{c.style.dashedUrlProps.includes(e.data.property)&&e.respondWith(l.sourceCSS(e.target.call(e.that,e.data.property),{context:"value",...l.meta}))})),"CSS2Properties"in a)for(const e of c.style.urlProps)c.overrideDescriptor(a.CSS2Properties.prototype,e,{get:(e,t)=>l.sourceCSS(e.call(t),{context:"value",...l.meta}),set:(e,t,a)=>{e.call(t,l.rewriteCSS(a,{context:"value",...l.meta}))}});else"HTMLElement"in a&&c.overrideDescriptor(a.HTMLElement.prototype,"style",{get:(e,t)=>{const a=e.call(t);if(!a.__uv$modifiedStyle)for(const e of c.style.urlProps)c.nativeMethods.defineProperty(a,e,{enumerable:!0,configurable:!0,get(){const t=c.style.getPropertyValue.call(this,e)||"";return l.sourceCSS(t,{context:"value",...l.meta})},set(t){c.style.setProperty.call(this,c.style.propToDashed[e]||e,l.rewriteCSS(t,{context:"value",...l.meta}))}}),c.nativeMethods.defineProperty(a,"__uv$modifiedStyle",{enumerable:!1,value:!0});return a}});c.style.on("setCssText",(e=>{e.data.value=l.rewriteCSS(e.data.value,{context:"declarationList",...l.meta})})),c.style.on("getCssText",(e=>{e.data.value=l.sourceCSS(e.data.value,{context:"declarationList",...l.meta})})),a.window&&l.addEventListener.call(a,"hashchange",(e=>{if(e.__uv$dispatched)return!1;e.stopImmediatePropagation();const t=a.location.hash;c.history.replaceState.call(a.history,"","",e.oldURL),l.location.hash=t})),c.location.on("hashchange",((e,t,r)=>{if(r.HashChangeEvent&&c.history.replaceState){c.history.replaceState.call(a.history,"","",l.rewriteUrl(t));const o=new r.HashChangeEvent("hashchange",{newURL:t,oldURL:e});c.nativeMethods.defineProperty(o,"__uv$dispatched",{value:!0,enumerable:!1}),l.dispatchEvent.call(a,o)}})),c.fetch.overrideRequest(),c.fetch.overrideUrl(),c.xhr.overrideOpen(),c.xhr.overrideResponseUrl(),c.element.overrideHtml(),c.element.overrideAttribute(),c.element.overrideInsertAdjacentHTML(),c.element.overrideAudio(),c.node.overrideBaseURI(),c.node.overrideTextContent(),c.attribute.overrideNameValue(),c.document.overrideDomain(),c.document.overrideURL(),c.document.overrideDocumentURI(),c.document.overrideWrite(),c.document.overrideReferrer(),c.document.overrideParseFromString(),c.storage.overrideMethods(),c.storage.overrideLength(),c.object.overrideGetPropertyNames(),c.object.overrideGetOwnPropertyDescriptors(),c.history.overridePushState(),c.history.overrideReplaceState(),c.eventSource.overrideConstruct(),c.eventSource.overrideUrl(),c.url.overrideObjectURL(),c.document.overrideCookie(),c.message.overridePostMessage(),c.message.overrideMessageOrigin(),c.message.overrideMessageData(),c.workers.overrideWorker(),c.workers.overrideAddModule(),c.workers.overrideImportScripts(),c.workers.overridePostMessage(),c.style.overrideSetGetProperty(),c.style.overrideCssText(),c.navigator.overrideSendBeacon(),c.function.overrideFunction(),c.function.overrideToString(),c.location.overrideWorkerLocation((e=>new URL(l.sourceUrl(e)))),c.overrideDescriptor(a,"localStorage",{get:(e,t)=>(t||a).__uv.lsWrap}),c.overrideDescriptor(a,"sessionStorage",{get:(e,t)=>(t||a).__uv.ssWrap}),c.override(a,"open",((e,t,a)=>{if(!a.length)return e.apply(t,a);let[r]=a;return r=l.rewriteUrl(r),e.call(t,r)})),l.$wrap=function(e){return"location"===e?l.methods.location:"eval"===e?l.methods.eval:e},l.$get=function(e){return e===a.location?l.location:e===a.eval?l.eval:e===a.parent?a.__uv$parent:e===a.top?a.__uv$top:e},l.eval=c.wrap(a,"eval",((e,t,a)=>{if(!a.length||"string"!=typeof a[0])return e.apply(t,a);let[r]=a;return r=l.rewriteJS(r),e.call(t,r)})),l.call=function(e,t,a){return a?e.apply(a,t):e(...t)},l.call$=function(e,t,a=[]){return e[t].apply(e,a)},c.nativeMethods.defineProperty(a.Object.prototype,i,{get:()=>l,enumerable:!1}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.setSource,{value:function(e){return c.nativeMethods.isExtensible(this)?(c.nativeMethods.defineProperty(this,l.methods.source,{value:e,writable:!0,enumerable:!1}),this):this},enumerable:!1}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.source,{value:l,writable:!0,enumerable:!1}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.location,{configurable:!0,get(){return this===a.document||this===a?l.location:this.location},set(e){this===a.document||this===a?l.location.href=e:this.location=e}}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.parent,{configurable:!0,get(){const e=this.parent;if(this===a)try{return"__uv"in e?e:this}catch(e){return this}return e},set(e){this.parent=e}}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.top,{configurable:!0,get(){const e=this.top;if(this===a){if(e===this.parent)return this[l.methods.parent];try{if("__uv"in e)return e;{let t=this;for(;t.parent!==e;)t=t.parent;return"__uv"in t?t:this}}catch(e){return this}}return e},set(e){this.top=e}}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.eval,{configurable:!0,get(){return this===a?l.eval:this.eval},set(e){this.eval=e}})}self.__uv||t(self,self.__uv$config,self.__uv$config.bare),self.__uvHook=t})();
(()=>{"use strict";const e=globalThis.Ultraviolet;function t(a,r={},o="/bare/"){if("__uv"in a&&a.__uv instanceof e)return!1;a.document&&a.window&&a.document.querySelectorAll("script[__uv-script]").forEach((e=>e.remove()));const n=!a.window,i="__uv",s="__uv$",l=new e({...r,window:a});"function"==typeof r.construct&&r.construct(l,n?"worker":"window");const{client:c}=l,{HTMLMediaElement:d,HTMLScriptElement:u,HTMLAudioElement:h,HTMLVideoElement:m,HTMLInputElement:v,HTMLEmbedElement:p,HTMLTrackElement:g,HTMLAnchorElement:b,HTMLIFrameElement:f,HTMLAreaElement:y,HTMLLinkElement:_,HTMLBaseElement:w,HTMLFormElement:S,HTMLImageElement:k,HTMLSourceElement:P}=a;c.nativeMethods.defineProperty(a,"__uv",{value:l,enumerable:!1}),l.meta.origin=location.origin,l.location=c.location.emulate((e=>"about:srcdoc"===e?new URL(e):(e.startsWith("blob:")&&(e=e.slice("blob:".length)),new URL(l.sourceUrl(e)))),(e=>l.rewriteUrl(e))),l.bareData=a.__uv$bareData,l.cookieStr=a.__uv$cookies||"",l.meta.url=l.location,l.domain=l.meta.url.host,l.blobUrls=new a.Map,l.referrer="",l.cookies=[],l.localStorageObj={},l.sessionStorageObj={};try{l.bare=new URL(o,a.location.href)}catch(e){l.bare=a.parent.__uv.bare}const U=new e.BareClient(l.bare,l.bareData);if("about:srcdoc"===l.location.href&&(l.meta=a.parent.__uv.meta),a.EventTarget&&(l.addEventListener=a.EventTarget.prototype.addEventListener,l.removeListener=a.EventTarget.prototype.removeListener,l.dispatchEvent=a.EventTarget.prototype.dispatchEvent),c.nativeMethods.defineProperty(c.storage.storeProto,"__uv$storageObj",{get(){return this===c.storage.sessionStorage?l.sessionStorageObj:this===c.storage.localStorage?l.localStorageObj:void 0},enumerable:!1}),a.localStorage){for(const e in a.localStorage)e.startsWith(s+l.location.origin+"@")&&(l.localStorageObj[e.slice((s+l.location.origin+"@").length)]=a.localStorage.getItem(e));l.lsWrap=c.storage.emulate(c.storage.localStorage,l.localStorageObj)}if(a.sessionStorage){for(const e in a.sessionStorage)e.startsWith(s+l.location.origin+"@")&&(l.sessionStorageObj[e.slice((s+l.location.origin+"@").length)]=a.sessionStorage.getItem(e));l.ssWrap=c.storage.emulate(c.storage.sessionStorage,l.sessionStorageObj)}let M=a.document?c.node.baseURI.get.call(a.document):a.location.href,x=l.sourceUrl(M);c.nativeMethods.defineProperty(l.meta,"base",{get:()=>a.document?(c.node.baseURI.get.call(a.document)!==M&&(M=c.node.baseURI.get.call(a.document),x=l.sourceUrl(M)),x):l.meta.url.href}),l.methods={setSource:"__uv$setSource",source:"__uv$source",location:"__uv$location",function:"__uv$function",string:"__uv$string",eval:"__uv$eval",parent:"__uv$parent",top:"__uv$top"},l.filterKeys=[i,l.methods.setSource,l.methods.source,l.methods.location,l.methods.function,l.methods.string,l.methods.eval,l.methods.parent,l.methods.top,"__uv$protocol","__uv$storageObj","__uv$url","__uv$modifiedStyle","__uv$config","__uv$dispatched","Ultraviolet","__uvHook"],c.on("wrap",((e,t)=>{c.nativeMethods.defineProperty(t,"name",c.nativeMethods.getOwnPropertyDescriptor(e,"name")),c.nativeMethods.defineProperty(t,"length",c.nativeMethods.getOwnPropertyDescriptor(e,"length")),c.nativeMethods.defineProperty(t,l.methods.string,{enumerable:!1,value:c.nativeMethods.fnToString.call(e)}),c.nativeMethods.defineProperty(t,l.methods.function,{enumerable:!1,value:e})})),c.fetch.on("request",(e=>{e.data.input=l.rewriteUrl(e.data.input)})),c.fetch.on("requestUrl",(e=>{e.data.value=l.sourceUrl(e.data.value)})),c.fetch.on("responseUrl",(e=>{e.data.value=l.sourceUrl(e.data.value)})),c.xhr.on("open",(e=>{e.data.input=l.rewriteUrl(e.data.input)})),c.xhr.on("responseUrl",(e=>{e.data.value=l.sourceUrl(e.data.value)})),c.workers.on("worker",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.workers.on("addModule",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.workers.on("importScripts",(e=>{for(const t in e.data.scripts)e.data.scripts[t]=l.rewriteUrl(e.data.scripts[t])})),c.workers.on("postMessage",(e=>{let t=e.data.origin;e.data.origin="*",e.data.message={__data:e.data.message,__origin:l.meta.url.origin,__to:t}})),c.navigator.on("sendBeacon",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.document.on("getCookie",(e=>{e.data.value=l.cookieStr})),c.document.on("setCookie",(e=>{Promise.resolve(l.cookie.setCookies(e.data.value,l.db,l.meta)).then((()=>{l.cookie.db().then((e=>{l.cookie.getCookies(e).then((e=>{l.cookieStr=l.cookie.serialize(e,l.meta,!0)}))}))}));const t=l.cookie.setCookie(e.data.value)[0];t.path||(t.path="/"),t.domain||(t.domain=l.meta.url.hostname),l.cookie.validateCookie(t,l.meta,!0)&&(l.cookieStr.length&&(l.cookieStr+="; "),l.cookieStr+=`${t.name}=${t.value}`),e.respondWith(e.data.value)})),c.element.on("setInnerHTML",(e=>{switch(e.that.tagName){case"SCRIPT":e.data.value=l.js.rewrite(e.data.value);break;case"STYLE":e.data.value=l.rewriteCSS(e.data.value);break;default:e.data.value=l.rewriteHtml(e.data.value)}})),c.element.on("getInnerHTML",(e=>{if("SCRIPT"===e.that.tagName)e.data.value=l.js.source(e.data.value);else e.data.value=l.sourceHtml(e.data.value)})),c.element.on("setOuterHTML",(e=>{e.data.value=l.rewriteHtml(e.data.value,{document:"HTML"===e.that.tagName})})),c.element.on("getOuterHTML",(e=>{switch(e.that.tagName){case"HEAD":e.data.value=l.sourceHtml(e.data.value.replace(/<head(.*)>(.*)<\/head>/s,"<op-head$1>$2</op-head>")).replace(/<op-head(.*)>(.*)<\/op-head>/s,"<head$1>$2</head>");break;case"BODY":e.data.value=l.sourceHtml(e.data.value.replace(/<body(.*)>(.*)<\/body>/s,"<op-body$1>$2</op-body>")).replace(/<op-body(.*)>(.*)<\/op-body>/s,"<body$1>$2</body>");break;default:e.data.value=l.sourceHtml(e.data.value,{document:"HTML"===e.that.tagName})}})),c.document.on("write",(e=>{if(!e.data.html.length)return!1;e.data.html=[l.rewriteHtml(e.data.html.join(""))]})),c.document.on("writeln",(e=>{if(!e.data.html.length)return!1;e.data.html=[l.rewriteHtml(e.data.html.join(""))]})),c.element.on("insertAdjacentHTML",(e=>{e.data.html=l.rewriteHtml(e.data.html)})),c.eventSource.on("construct",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.eventSource.on("url",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.history.on("replaceState",(e=>{e.data.url&&(e.data.url=l.rewriteUrl(e.data.url,"__uv"in e.that?e.that.__uv.meta:l.meta))})),c.history.on("pushState",(e=>{e.data.url&&(e.data.url=l.rewriteUrl(e.data.url,"__uv"in e.that?e.that.__uv.meta:l.meta))})),c.element.on("getAttribute",(e=>{c.element.hasAttribute.call(e.that,l.attributePrefix+"-attr-"+e.data.name)&&e.respondWith(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name))})),c.message.on("postMessage",(e=>{let t=e.data.origin,a=l.call;e.that&&(a=e.that.__uv$source.call),e.data.origin="*",e.data.message={__data:e.data.message,__origin:(e.that||e.target).__uv$source.location.origin,__to:t},e.respondWith(a(e.target,n?[e.data.message,e.data.transfer]:[e.data.message,e.data.origin,e.data.transfer],e.that))})),c.message.on("data",(e=>{const{value:t}=e.data;"object"==typeof t&&"__data"in t&&"__origin"in t&&e.respondWith(t.__data)})),c.message.on("origin",(e=>{const t=c.message.messageData.get.call(e.that);"object"==typeof t&&t.__data&&t.__origin&&e.respondWith(t.__origin)})),c.overrideDescriptor(a,"origin",{get:(e,t)=>l.location.origin}),c.node.on("baseURI",(e=>{e.data.value.startsWith(a.location.origin)&&(e.data.value=l.sourceUrl(e.data.value))})),c.element.on("setAttribute",(e=>{if(e.that instanceof d&&"src"===e.data.name&&e.data.value.startsWith("blob:"))return e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),void(e.data.value=l.blobUrls.get(e.data.value));l.attrs.isUrl(e.data.name)&&(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteUrl(e.data.value)),l.attrs.isStyle(e.data.name)&&(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteCSS(e.data.value,{context:"declarationList"})),l.attrs.isHtml(e.data.name)&&(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteHtml(e.data.value,{...l.meta,document:!0,injectHead:l.createHtmlInject(l.handlerScript,l.bundleScript,l.configScript,l.bareData,l.cookieStr,a.location.href)})),l.attrs.isSrcset(e.data.name)&&(e.target.call(e.that,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.html.wrapSrcset(e.data.value)),l.attrs.isForbidden(e.data.name)&&(e.data.name=l.attributePrefix+"-attr-"+e.data.name)})),c.element.on("audio",(e=>{e.data.url=l.rewriteUrl(e.data.url)})),c.element.hookProperty([b,y,_,w],"href",{get:(e,t)=>l.sourceUrl(e.call(t)),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-href",a),e.call(t,l.rewriteUrl(a))}}),c.element.hookProperty([u,h,m,d,k,v,p,f,g,P],"src",{get:(e,t)=>l.sourceUrl(e.call(t)),set:(e,t,[a])=>{if(new String(a).toString().trim().startsWith("blob:")&&t instanceof d)return c.element.setAttribute.call(t,l.attributePrefix+"-attr-src",a),e.call(t,l.blobUrls.get(a)||a);c.element.setAttribute.call(t,l.attributePrefix+"-attr-src",a),e.call(t,l.rewriteUrl(a))}}),c.element.hookProperty([S],"action",{get:(e,t)=>l.sourceUrl(e.call(t)),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-action",a),e.call(t,l.rewriteUrl(a))}}),c.element.hookProperty([k],"srcset",{get:(e,t)=>c.element.getAttribute.call(t,l.attributePrefix+"-attr-srcset")||e.call(t),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-srcset",a),e.call(t,l.html.wrapSrcset(a))}}),c.element.hookProperty(u,"integrity",{get:(e,t)=>c.element.getAttribute.call(t,l.attributePrefix+"-attr-integrity"),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-integrity",a)}}),c.element.hookProperty(f,"sandbox",{get:(e,t)=>c.element.getAttribute.call(t,l.attributePrefix+"-attr-sandbox")||e.call(t),set:(e,t,[a])=>{c.element.setAttribute.call(t,l.attributePrefix+"-attr-sandbox",a)}});const E=Object.getOwnPropertyDescriptor(f.prototype,"contentWindow").get;function $(e){const a=E.call(e);try{a.__uv$bareData=l.bareData,a.__uv$cookies=l.cookieStr,a.__uv||t(a,r,o)}catch(e){console.error("catastrophic failure"),console.error(e)}}function j(e,t){const a=`on${t}`,r=new WeakMap;Reflect.defineProperty(e,a,{enumerable:!0,configurable:!0,get(){return r.has(this)?r.get(this):null},set(e){return"function"==typeof e&&(r.has(this)&&this.removeEventListener(t,r.get(this)),r.set(this,e),this.addEventListener(t,e)),e}})}c.element.hookProperty(f,"contentWindow",{get:(e,t)=>($(t),e.call(t))}),c.element.hookProperty(f,"contentDocument",{get:(e,t)=>($(t),e.call(t))}),c.element.hookProperty(f,"srcdoc",{get:(e,t)=>c.element.getAttribute.call(t,l.attributePrefix+"-attr-srcdoc")||e.call(t),set:(e,t,[r])=>{e.call(t,l.rewriteHtml(r,{document:!0,injectHead:l.createHtmlInject(l.handlerScript,l.bundleScript,l.configScript,l.bareData,l.cookieStr,a.location.href)}))}}),c.node.on("getTextContent",(e=>{"SCRIPT"===e.that.tagName&&(e.data.value=l.js.source(e.data.value))})),c.node.on("setTextContent",(e=>{"SCRIPT"===e.that.tagName&&(e.data.value=l.js.rewrite(e.data.value))})),"serviceWorker"in a.navigator&&delete a.Navigator.prototype.serviceWorker,c.document.on("getDomain",(e=>{e.data.value=l.domain})),c.document.on("setDomain",(e=>{if(!e.data.value.toString().endsWith(l.meta.url.hostname.split(".").slice(-2).join(".")))return e.respondWith("");e.respondWith(l.domain=e.data.value)})),c.document.on("url",(e=>{e.data.value=l.location.href})),c.document.on("documentURI",(e=>{e.data.value=l.location.href})),c.document.on("referrer",(e=>{e.data.value=l.referrer||l.sourceUrl(e.data.value)})),c.document.on("parseFromString",(e=>{if("text/html"!==e.data.type)return!1;e.data.string=l.rewriteHtml(e.data.string,{...l.meta,document:!0})})),c.attribute.on("getValue",(e=>{c.element.hasAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name)&&(e.data.value=c.element.getAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name))})),c.attribute.on("setValue",(e=>{l.attrs.isUrl(e.data.name)&&(c.element.setAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteUrl(e.data.value)),l.attrs.isStyle(e.data.name)&&(c.element.setAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteCSS(e.data.value,{context:"declarationList"})),l.attrs.isHtml(e.data.name)&&(c.element.setAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.rewriteHtml(e.data.value,{...l.meta,document:!0,injectHead:l.createHtmlInject(l.handlerScript,l.bundleScript,l.configScript,l.bareData,l.cookieStr,a.location.href)})),l.attrs.isSrcset(e.data.name)&&(c.element.setAttribute.call(e.that.ownerElement,l.attributePrefix+"-attr-"+e.data.name,e.data.value),e.data.value=l.html.wrapSrcset(e.data.value))})),c.url.on("createObjectURL",(e=>{let t=e.target.call(e.that,e.data.object);if(t.startsWith("blob:"+location.origin)){let r="blob:"+("about:blank"!==l.meta.url.href?l.meta.url.origin:a.parent.__uv.meta.url.origin)+t.slice("blob:".length+location.origin.length);l.blobUrls.set(r,t),e.respondWith(r)}else e.respondWith(t)})),c.url.on("revokeObjectURL",(e=>{if(l.blobUrls.has(e.data.url)){const t=e.data.url;e.data.url=l.blobUrls.get(e.data.url),l.blobUrls.delete(t)}})),c.storage.on("get",(e=>{e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("set",(e=>{e.that.__uv$storageObj&&(e.that.__uv$storageObj[e.data.name]=e.data.value),e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("delete",(e=>{e.that.__uv$storageObj&&delete e.that.__uv$storageObj[e.data.name],e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("getItem",(e=>{e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("setItem",(e=>{e.that.__uv$storageObj&&(e.that.__uv$storageObj[e.data.name]=e.data.value),e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("removeItem",(e=>{e.that.__uv$storageObj&&delete e.that.__uv$storageObj[e.data.name],e.data.name=s+l.meta.url.origin+"@"+e.data.name})),c.storage.on("clear",(e=>{if(e.that.__uv$storageObj)for(const t of c.nativeMethods.keys.call(null,e.that.__uv$storageObj))delete e.that.__uv$storageObj[t],c.storage.removeItem.call(e.that,s+l.meta.url.origin+"@"+t),e.respondWith()})),c.storage.on("length",(e=>{e.that.__uv$storageObj&&e.respondWith(c.nativeMethods.keys.call(null,e.that.__uv$storageObj).length)})),c.storage.on("key",(e=>{e.that.__uv$storageObj&&e.respondWith(c.nativeMethods.keys.call(null,e.that.__uv$storageObj)[e.data.index]||null)}));const O=["ws:","wss:"];class T extends EventTarget{#e;#t;#a="blob";#r="";#o="";#n="";async#i(e,t){const a={};Reflect.setPrototypeOf(a,null),a.Origin=l.meta.url.origin,a["User-Agent"]=navigator.userAgent,""!==l.cookieStr&&(a.Cookie=l.cookieStr.toString()),this.#e=await U.createWebSocket(e,a,t),this.#e.binaryType=this.#a,this.#e.addEventListener("message",(e=>{this.dispatchEvent(new MessageEvent("message",e))})),this.#e.addEventListener("open",(async e=>{this.dispatchEvent(new Event("open",e))})),this.#e.addEventListener("error",(e=>{this.dispatchEvent(new ErrorEvent("error",e))})),this.#e.addEventListener("close",(e=>{this.dispatchEvent(new Event("close",e))}));const r=await this.#e.meta;r.headers.has("sec-websocket-protocol")&&(this.#r=r.headers.get("sec-websocket-protocol")),r.headers.has("sec-websocket-extensions")&&(this.#o=r.headers.get("sec-websocket-extensions"));let o=r.rawHeaders["set-cookie"]||[];Array.isArray(o)||(o=[]);for(const e of o)document.cookie=e}get url(){return this.#n}constructor(...e){if(super(),!e.length)throw new DOMException("Failed to construct 'WebSocket': 1 argument required, but only 0 present.");const[t,a]=e;let r;try{r=new URL(t)}catch(e){throw new DOMException(`Faiiled to construct 'WebSocket': The URL '${t}' is invalid.`)}if(!O.includes(r.protocol))throw new DOMException(`Failed to construct 'WebSocket': The URL's scheme must be either 'ws' or 'wss'. '${r.protocol}' is not allowed.`);this.#t=this.#i(r,a)}get protocol(){return this.#r}get extensions(){return this.#o}get readyState(){return this.#e?this.#e.readyState:T.CONNECTING}get binaryType(){return this.#a}set binaryType(e){return this.#a=e,this.#e&&(this.#e.binaryType=e),e}send(e){if(!this.#e)throw new DOMException("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.");this.#e.send(e)}close(e,t){if(void 0!==e&&("number"!=typeof e&&(e=0),1e3!==e&&(e<3e3||e>4999)))throw new DOMException(`Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. ${e} is neither.`);this.#t.then((()=>this.#e.close(e,t)))}}j(T.prototype,"close"),j(T.prototype,"open"),j(T.prototype,"message"),j(T.prototype,"error");for(const e of["url","protocol","extensions","readyState","binaryType"]){const t=Object.getOwnPropertyDescriptor(a.WebSocket.prototype,e),r=Object.getOwnPropertyDescriptor(T.prototype,e);r?.get&&t?.get&&c.emit("wrap",r.get,t.get),r?.set&&t?.set&&c.emit("wrap",r.get,t.get)}if(c.emit("wrap",a.WebSocket.prototype.send,T.prototype.send),c.emit("wrap",a.WebSocket.prototype.close,T.prototype.close),c.override(a,"WebSocket",((e,t,a)=>new T(...a)),!0),T.prototype.constructor=a.WebSocket,c.function.on("function",(e=>{e.data.script=l.rewriteJS(e.data.script)})),c.function.on("toString",(e=>{l.methods.string in e.that&&e.respondWith(e.that[l.methods.string])})),c.object.on("getOwnPropertyNames",(e=>{e.data.names=e.data.names.filter((e=>!l.filterKeys.includes(e)))})),c.object.on("getOwnPropertyDescriptors",(e=>{for(const t of l.filterKeys)delete e.data.descriptors[t]})),c.style.on("setProperty",(e=>{c.style.dashedUrlProps.includes(e.data.property)&&(e.data.value=l.rewriteCSS(e.data.value,{context:"value",...l.meta}))})),c.style.on("getPropertyValue",(e=>{c.style.dashedUrlProps.includes(e.data.property)&&e.respondWith(l.sourceCSS(e.target.call(e.that,e.data.property),{context:"value",...l.meta}))})),"CSS2Properties"in a)for(const e of c.style.urlProps)c.overrideDescriptor(a.CSS2Properties.prototype,e,{get:(e,t)=>l.sourceCSS(e.call(t),{context:"value",...l.meta}),set:(e,t,a)=>{e.call(t,l.rewriteCSS(a,{context:"value",...l.meta}))}});else"HTMLElement"in a&&c.overrideDescriptor(a.HTMLElement.prototype,"style",{get:(e,t)=>{const a=e.call(t);if(!a.__uv$modifiedStyle)for(const e of c.style.urlProps)c.nativeMethods.defineProperty(a,e,{enumerable:!0,configurable:!0,get(){const t=c.style.getPropertyValue.call(this,e)||"";return l.sourceCSS(t,{context:"value",...l.meta})},set(t){c.style.setProperty.call(this,c.style.propToDashed[e]||e,l.rewriteCSS(t,{context:"value",...l.meta}))}}),c.nativeMethods.defineProperty(a,"__uv$modifiedStyle",{enumerable:!1,value:!0});return a}});c.style.on("setCssText",(e=>{e.data.value=l.rewriteCSS(e.data.value,{context:"declarationList",...l.meta})})),c.style.on("getCssText",(e=>{e.data.value=l.sourceCSS(e.data.value,{context:"declarationList",...l.meta})})),a.window&&l.addEventListener.call(a,"hashchange",(e=>{if(e.__uv$dispatched)return!1;e.stopImmediatePropagation();const t=a.location.hash;c.history.replaceState.call(a.history,"","",e.oldURL),l.location.hash=t})),c.location.on("hashchange",((e,t,r)=>{if(r.HashChangeEvent&&c.history.replaceState){c.history.replaceState.call(a.history,"","",l.rewriteUrl(t));const o=new r.HashChangeEvent("hashchange",{newURL:t,oldURL:e});c.nativeMethods.defineProperty(o,"__uv$dispatched",{value:!0,enumerable:!1}),l.dispatchEvent.call(a,o)}})),c.fetch.overrideRequest(),c.fetch.overrideUrl(),c.xhr.overrideOpen(),c.xhr.overrideResponseUrl(),c.element.overrideHtml(),c.element.overrideAttribute(),c.element.overrideInsertAdjacentHTML(),c.element.overrideAudio(),c.node.overrideBaseURI(),c.node.overrideTextContent(),c.attribute.overrideNameValue(),c.document.overrideDomain(),c.document.overrideURL(),c.document.overrideDocumentURI(),c.document.overrideWrite(),c.document.overrideReferrer(),c.document.overrideParseFromString(),c.storage.overrideMethods(),c.storage.overrideLength(),c.object.overrideGetPropertyNames(),c.object.overrideGetOwnPropertyDescriptors(),c.history.overridePushState(),c.history.overrideReplaceState(),c.eventSource.overrideConstruct(),c.eventSource.overrideUrl(),c.url.overrideObjectURL(),c.document.overrideCookie(),c.message.overridePostMessage(),c.message.overrideMessageOrigin(),c.message.overrideMessageData(),c.workers.overrideWorker(),c.workers.overrideAddModule(),c.workers.overrideImportScripts(),c.workers.overridePostMessage(),c.style.overrideSetGetProperty(),c.style.overrideCssText(),c.navigator.overrideSendBeacon(),c.function.overrideFunction(),c.function.overrideToString(),c.location.overrideWorkerLocation((e=>new URL(l.sourceUrl(e)))),c.overrideDescriptor(a,"localStorage",{get:(e,t)=>(t||a).__uv.lsWrap}),c.overrideDescriptor(a,"sessionStorage",{get:(e,t)=>(t||a).__uv.ssWrap}),c.override(a,"open",((e,t,a)=>{if(!a.length)return e.apply(t,a);let[r]=a;return r=l.rewriteUrl(r),e.call(t,r)})),l.$wrap=function(e){return"location"===e?l.methods.location:"eval"===e?l.methods.eval:e},l.$get=function(e){return e===a.location?l.location:e===a.eval?l.eval:e===a.parent?a.__uv$parent:e===a.top?a.__uv$top:e},l.eval=c.wrap(a,"eval",((e,t,a)=>{if(!a.length||"string"!=typeof a[0])return e.apply(t,a);let[r]=a;return r=l.rewriteJS(r),e.call(t,r)})),l.call=function(e,t,a){return a?e.apply(a,t):e(...t)},l.call$=function(e,t,a=[]){return e[t].apply(e,a)},c.nativeMethods.defineProperty(a.Object.prototype,i,{get:()=>l,enumerable:!1}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.setSource,{value:function(e){return c.nativeMethods.isExtensible(this)?(c.nativeMethods.defineProperty(this,l.methods.source,{value:e,writable:!0,enumerable:!1}),this):this},enumerable:!1}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.source,{value:l,writable:!0,enumerable:!1}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.location,{configurable:!0,get(){return this===a.document||this===a?l.location:this.location},set(e){this===a.document||this===a?l.location.href=e:this.location=e}}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.parent,{configurable:!0,get(){const e=this.parent;if(this===a)try{return"__uv"in e?e:this}catch(e){return this}return e},set(e){this.parent=e}}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.top,{configurable:!0,get(){const e=this.top;if(this===a){if(e===this.parent)return this[l.methods.parent];try{if("__uv"in e)return e;{let t=this;for(;t.parent!==e;)t=t.parent;return"__uv"in t?t:this}}catch(e){return this}}return e},set(e){this.top=e}}),c.nativeMethods.defineProperty(a.Object.prototype,l.methods.eval,{configurable:!0,get(){return this===a?l.eval:this.eval},set(e){this.eval=e}})}self.__uv||t(self,self.__uv$config,self.__uv$config.bare),self.__uvHook=t})();
//# sourceMappingURL=uv.handler.js.map

@@ -1,2 +0,2 @@

(()=>{"use strict";const e=globalThis.Ultraviolet,t=["cross-origin-embedder-policy","cross-origin-opener-policy","cross-origin-resource-policy","content-security-policy","content-security-policy-report-only","expect-ct","feature-policy","origin-isolation","strict-transport-security","upgrade-insecure-requests","x-content-type-options","x-download-options","x-frame-options","x-permitted-cross-domain-policies","x-powered-by","x-xss-protection"],r=["GET","HEAD"];self.UVServiceWorker=class extends l{constructor(t=__uv$config){super(),t.bare||(t.bare="/bare/"),t.prefix||(t.prefix="/service/"),this.addresses="string"==typeof t.bare?[new URL(t.bare,location)]:t.bare.map((e=>new URL(e,location))),this.config=t,this.bareClient=new e.BareClient(this.address),this.browser=e.Bowser.getParser(self.navigator.userAgent).getBrowserName()}async fetch({request:o}){if(!o.url.startsWith(location.origin+this.config.prefix))return fetch(o);try{const a=new e(this.config);"function"==typeof this.config.construct&&this.config.construct(a,"service");const u=await a.cookie.db();a.meta.origin=location.origin,a.meta.base=a.meta.url=new URL(a.sourceUrl(o.url));const c=new i(o,this,a,r.includes(o.method.toUpperCase())?null:await o.blob());if("blob:"===a.meta.url.protocol&&(c.blob=!0,c.base=c.url=new URL(c.url.pathname)),o.referrer&&o.referrer.startsWith(location.origin)){const e=new URL(a.sourceUrl(o.referrer));(c.headers.origin||a.meta.url.origin!==e.origin&&"cors"===o.mode)&&(c.headers.origin=e.origin),c.headers.referer=e.href}const l=await a.cookie.getCookies(u)||[],h=a.cookie.serialize(l,a.meta,!1);c.headers["user-agent"]=navigator.userAgent,h&&(c.headers.cookie=h),c.headers.Host=c.url.host;const f=new s(c,null,null);if(this.emit("request",f),f.intercepted)return f.returnValue;const d=await this.bareClient.fetch(c.blob?"blob:"+location.origin+c.url.pathname:c.url,{headers:c.headers,method:c.method,body:c.body,credentials:c.credentials,mode:location.origin!==c.address.origin?"cors":c.mode,redirect:c.redirect});if(500===d.status)return Promise.reject("");const p=new n(c,d),v=new s(p,null,null);if(this.emit("beforemod",v),v.intercepted)return v.returnValue;for(const e of t)p.headers[e]&&delete p.headers[e];if(p.headers.location&&(p.headers.location=a.rewriteUrl(p.headers.location)),p.headers["set-cookie"]&&(Promise.resolve(a.cookie.setCookies(p.headers["set-cookie"],u,a.meta)).then((()=>{self.clients.matchAll().then((function(e){e.forEach((function(e){e.postMessage({msg:"updateCookies",url:a.meta.url.href})}))}))})),delete p.headers["set-cookie"]),p.body)switch(o.destination){case"script":case"worker":p.body=`if (!self.__uv && self.importScripts) importScripts('${__uv$config.bundle}', '${__uv$config.config}', '${__uv$config.handler}');\n`,p.body+=a.js.rewrite(await d.text());break;case"style":p.body=a.rewriteCSS(await d.text());break;case"iframe":case"document":(function(t,r=""){return"text/html"===(e.mime.contentType(r||t.pathname)||"text/html").split(";")[0]})(a.meta.url,p.headers["content-type"]||"")&&(p.body=a.rewriteHtml(await d.text(),{document:!0,injectHead:a.createHtmlInject(this.config.handler,this.config.bundle,this.config.config,this.bareClient.data,a.cookie.serialize(l,a.meta,!0),o.referrer)}))}return"text/event-stream"===c.headers.accept&&(p.headers["content-type"]="text/event-stream"),this.emit("response",v),v.intercepted?v.returnValue:new Response(p.body,{headers:p.headers,status:p.status,statusText:p.statusText})}catch(e){return new Response(e.toString(),{status:500})}}get address(){return this.addresses[Math.floor(Math.random()*this.addresses.length)]}static Ultraviolet=e};class n{constructor(e,t){this.request=e,this.raw=t,this.ultraviolet=e.ultraviolet,this.headers=Object.fromEntries(t.headers.entries()),this.status=t.status,this.statusText=t.statusText,this.body=t.body}get url(){return this.request.url}get base(){return this.request.base}set base(e){this.request.base=e}}class i{constructor(e,t,r,n=null){this.ultraviolet=r,this.request=e,this.headers=Object.fromEntries(e.headers.entries()),this.method=e.method,this.address=t.address,this.body=n||null,this.redirect=e.redirect,this.credentials="omit",this.mode="cors"===e.mode?e.mode:"same-origin",this.blob=!1}get url(){return this.ultraviolet.meta.url}set url(e){this.ultraviolet.meta.url=e}get base(){return this.ultraviolet.meta.base}set base(e){this.ultraviolet.meta.base=e}}class s{#e;#t;constructor(e={},t=null,r=null){this.#e=!1,this.#t=null,this.data=e,this.target=t,this.that=r}get intercepted(){return this.#e}get returnValue(){return this.#t}respondWith(e){this.#t=e,this.#e=!0}}var o,a="object"==typeof Reflect?Reflect:null,u=a&&"function"==typeof a.apply?a.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};o=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var c=Number.isNaN||function(e){return e!=e};function l(){l.init.call(this)}l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var h=10;function f(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function d(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function p(e,t,r,n){var i,s,o,a;if(f(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),o=s[t]),void 0===o)o=s[t]=r,++e._eventsCount;else if("function"==typeof o?o=s[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=d(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,a=u,console&&console.warn&&console.warn(a)}return e}function v(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=v.bind(n);return i.listener=r,n.wrapFn=i,i}function g(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):b(i,i.length)}function y(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function b(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");h=e}}),l.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)u(a,this,t);else{var c=a.length,l=b(a,c);for(r=0;r<c;++r)u(l[r],this,t)}return!0},l.prototype.addListener=function(e,t){return p(this,e,t,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(e,t){return p(this,e,t,!0)},l.prototype.once=function(e,t){return f(t),this.on(e,m(this,e,t)),this},l.prototype.prependOnceListener=function(e,t){return f(t),this.prependListener(e,m(this,e,t)),this},l.prototype.removeListener=function(e,t){var r,n,i,s,o;if(f(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){o=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,s=Object.keys(r);for(n=0;n<s.length;++n)"removeListener"!==(i=s[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},l.prototype.listeners=function(e){return g(this,e,!0)},l.prototype.rawListeners=function(e){return g(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):y.call(e,t)},l.prototype.listenerCount=y,l.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]}})();
(()=>{"use strict";const e=globalThis.Ultraviolet,t=["cross-origin-embedder-policy","cross-origin-opener-policy","cross-origin-resource-policy","content-security-policy","content-security-policy-report-only","expect-ct","feature-policy","origin-isolation","strict-transport-security","upgrade-insecure-requests","x-content-type-options","x-download-options","x-frame-options","x-permitted-cross-domain-policies","x-powered-by","x-xss-protection"],r=["GET","HEAD"];class s extends e.EventEmitter{constructor(t=__uv$config){super(),t.bare||(t.bare="/bare/"),t.prefix||(t.prefix="/service/"),this.addresses="string"==typeof t.bare?[new URL(t.bare,location)]:t.bare.map((e=>new URL(e,location))),this.config=t,this.bareClient=new e.BareClient(this.address),this.browser=e.Bowser.getParser(self.navigator.userAgent).getBrowserName()}async fetch({request:s}){try{if(!s.url.startsWith(location.origin+this.config.prefix))return await fetch(s);const n=new e(this.config);"function"==typeof this.config.construct&&this.config.construct(n,"service");const c=await n.cookie.db();n.meta.origin=location.origin,n.meta.base=n.meta.url=new URL(n.sourceUrl(s.url));const l=new o(s,this,n,r.includes(s.method.toUpperCase())?null:await s.blob());if("blob:"===n.meta.url.protocol&&(l.blob=!0,l.base=l.url=new URL(l.url.pathname)),s.referrer&&s.referrer.startsWith(location.origin)){const e=new URL(n.sourceUrl(s.referrer));(l.headers.origin||n.meta.url.origin!==e.origin&&"cors"===s.mode)&&(l.headers.origin=e.origin),l.headers.referer=e.href}const u=await n.cookie.getCookies(c)||[],h=n.cookie.serialize(u,n.meta,!1);l.headers["user-agent"]=navigator.userAgent,h&&(l.headers.cookie=h),l.headers.Host=l.url.host;const d=new a(l,null,null);if(this.emit("request",d),d.intercepted)return d.returnValue;const m=await this.bareClient.fetch(l.blob?"blob:"+location.origin+l.url.pathname:l.url,{headers:l.headers,method:l.method,body:l.body,credentials:l.credentials,mode:location.origin!==l.address.origin?"cors":l.mode,redirect:l.redirect}),p=new i(l,m),b=new a(p,null,null);if(this.emit("beforemod",b),b.intercepted)return b.returnValue;for(const e of t)p.headers[e]&&delete p.headers[e];if(p.headers.location&&(p.headers.location=n.rewriteUrl(p.headers.location)),p.headers["set-cookie"]&&(Promise.resolve(n.cookie.setCookies(p.headers["set-cookie"],c,n.meta)).then((()=>{self.clients.matchAll().then((function(e){e.forEach((function(e){e.postMessage({msg:"updateCookies",url:n.meta.url.href})}))}))})),delete p.headers["set-cookie"]),p.body)switch(s.destination){case"script":case"worker":p.body=`if (!self.__uv && self.importScripts) importScripts('${__uv$config.bundle}', '${__uv$config.config}', '${__uv$config.handler}');\n`,p.body+=n.js.rewrite(await m.text());break;case"style":p.body=n.rewriteCSS(await m.text());break;case"iframe":case"document":(function(t,r=""){return"text/html"===(e.mime.contentType(r||t.pathname)||"text/html").split(";")[0]})(n.meta.url,p.headers["content-type"]||"")&&(p.body=n.rewriteHtml(await m.text(),{document:!0,injectHead:n.createHtmlInject(this.config.handler,this.config.bundle,this.config.config,this.bareClient.data,n.cookie.serialize(u,n.meta,!0),s.referrer)}))}return"text/event-stream"===l.headers.accept&&(p.headers["content-type"]="text/event-stream"),this.emit("response",b),b.intercepted?b.returnValue:new Response(p.body,{headers:p.headers,status:p.status,statusText:p.statusText})}catch(e){return console.error(e),new Response(e.toString(),{status:500})}}get address(){return this.addresses[Math.floor(Math.random()*this.addresses.length)]}static Ultraviolet=e}self.UVServiceWorker=s;class i{constructor(e,t){this.request=e,this.raw=t,this.ultraviolet=e.ultraviolet,this.headers=Object.fromEntries(t.headers.entries()),this.status=t.status,this.statusText=t.statusText,this.body=t.body}get url(){return this.request.url}get base(){return this.request.base}set base(e){this.request.base=e}}class o{constructor(e,t,r,s=null){this.ultraviolet=r,this.request=e,this.headers=Object.fromEntries(e.headers.entries()),this.method=e.method,this.address=t.address,this.body=s||null,this.redirect=e.redirect,this.credentials="omit",this.mode="cors"===e.mode?e.mode:"same-origin",this.blob=!1}get url(){return this.ultraviolet.meta.url}set url(e){this.ultraviolet.meta.url=e}get base(){return this.ultraviolet.meta.base}set base(e){this.ultraviolet.meta.base=e}}class a{#e;#t;constructor(e={},t=null,r=null){this.#e=!1,this.#t=null,this.data=e,this.target=t,this.that=r}get intercepted(){return this.#e}get returnValue(){return this.#t}respondWith(e){this.#t=e,this.#e=!0}}})();
//# sourceMappingURL=uv.sw.js.map
{
"name": "@titaniumnetwork-dev/ultraviolet",
"version": "1.0.4-beta.2",
"version": "1.0.4-beta.3",
"description": "Highly sophisticated proxy used for evading internet censorship or accessing websites in a controlled sandbox using the power of service-workers and more!",

@@ -26,2 +26,3 @@ "main": "lib/index.cjs",

"esotope-hammerhead": "^0.6.1",
"events": "^3.3.0",
"idb": "^7.0.0",

@@ -28,0 +29,0 @@ "meriyah": "^4.2.0",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc