@mercuryworkshop/scramjet 2.0.6-alpha → 2.0.67-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scramjet.js +1 -1
- package/dist/scramjet.js.map +1 -1
- package/dist/scramjet.mjs +1 -1
- package/dist/scramjet.mjs.map +1 -1
- package/dist/scramjet_bundled.js +1 -1
- package/dist/scramjet_bundled.js.map +1 -1
- package/dist/scramjet_bundled.mjs +1 -1
- package/dist/scramjet_bundled.mjs.map +1 -1
- package/package.json +1 -1
package/dist/scramjet.mjs
CHANGED
|
@@ -23,7 +23,7 @@ return { apply, construct };
|
|
|
23
23
|
font-weight: bold;
|
|
24
24
|
font-family: monospace;
|
|
25
25
|
font-size: 0.9em;
|
|
26
|
-
`,`${"debug"===e?"color: gray":""}`,...i)},log:function(e,...t){this.fmt("log",e,...t)},warn:function(e,...t){this.fmt("warn",e,...t)},error:function(e,...t){this.fmt("error",e,...t)},debug:function(e,...t){this.fmt("debug",e,...t)},time(e,t,r){let n,s=(0,i.wU)()-t;n=s<1?"BLAZINGLY FAST":s<500?"decent speed":"really slow",this.print("debug","[time]",`${r} was ${n} (${s.toFixed(2)}ms)`)}}},6372(e,t,r){r.d(t,{c:()=>s});var i=r(5994),n=r(2075);class s{cookies={};byDomain=new Map;defaultPath(e){let t=e.pathname;if(!t||!t.startsWith("/"))return"/";let r=t.lastIndexOf("/");return r<=0?"/":t.slice(0,r)}pathMatches(e,t){return e===t||!!e.startsWith(t)&&(!!t.endsWith("/")||"/"===e.charAt(t.length))}indexCookie(e){let t=e.domain.slice(1),r=this.byDomain.get(t);r||(r=[],this.byDomain.set(t,r)),r.push(e)}unindexCookie(e){let t=e.domain.slice(1),r=this.byDomain.get(t);if(!r)return;let i=r.indexOf(e);i>=0&&r.splice(i,1),0===r.length&&this.byDomain.delete(t)}removeById(e){let t=this.cookies[e];t&&this.unindexCookie(t),delete this.cookies[e]}setCookies(e,t){for(let r of(0,n.Ay)(e)){let e=r.name.toLowerCase();if(e.startsWith("__secure-")){if(!r.secure)continue}else if(e.startsWith("__host-")&&(!r.secure||r.domain||"/"!==r.path))continue;let n=!r.domain,s=r.expires?.getTime(),o=Number.isFinite(s)?s:void 0,a={...r,hostOnly:n,expires:o};a.domain||(a.domain=t.hostname),a.domain.startsWith(".")||(a.domain="."+a.domain),a.path&&a.path.startsWith("/")||(a.path=this.defaultPath(t)),a.sameSite||(a.sameSite="lax");let A=`${a.domain}@${a.path}@${a.name}`;if("number"==typeof a.maxAge)if(Number.isFinite(a.maxAge))if(a.maxAge<=0){this.removeById(A);continue}else a.expires=i.mR.now()+1e3*a.maxAge;else delete a.maxAge;let l=this.cookies[A];l&&this.unindexCookie(l),this.cookies[A]=a,this.indexCookie(a)}}getCookies(e,t,r="strict"){let n=i.mR.now(),s=e.hostname,o=e.pathname,a=[],A=s;for(;void 0!==A;){let e=this.byDomain.get(A);if(e)for(let i of e){if(void 0!==i.expires&&i.expires<n||i.hostOnly&&A!==s||i.httpOnly&&t||!this.pathMatches(o,i.path))continue;let e=(i.sameSite??"lax").toLowerCase();if("cross-site"===r){if("none"!==e)continue}else if("lax"===r&&"strict"===e)continue;a.push(i)}let i=A.indexOf(".");A=-1===i?void 0:A.slice(i+1)}return a.map(e=>e.name?`${e.name}=${e.value}`:e.value).join("; ")}load(e){if("object"==typeof e)return void console.error("??");let t=(0,i.P4)(e);this.cookies={},this.byDomain.clear();let r=Object.keys(t);for(let e=0;e<r.length;e++){let i=r[e],n=t[i];if("string"==typeof n.expires){let e=Date.parse(n.expires);n.expires=Number.isFinite(e)?e:void 0}this.cookies[i]=n,this.indexCookie(n)}}clear(){this.cookies={},this.byDomain.clear()}dump(){return(0,i.Xj)(this.cookies)}}},3786(e,t,r){r.d(t,{u:()=>i});class i{headers={};set(e,t){this.headers[e.toLowerCase()]=t}get(e){let t=e.toLowerCase();return t in this.headers?this.headers[t]:null}delete(e){delete this.headers[e.toLowerCase()]}has(e){return e.toLowerCase()in this.headers}toRawHeaders(){let e=[];for(let t in this.headers)e.push([t,this.headers[t]]);return e}toNativeHeaders(){let e=new Headers;for(let t in this.headers)e.set(t,this.headers[t]);return e}static fromRawHeaders(e){let t=new i;for(let[r,i]of e)t.has(r),t.set(r,i);return t}static fromNativeHeaders(e){let t=new i;for(let[r,i]of e.entries())t.set(r,i);return t}clone(){let e=new i;for(let t in this.headers)e.set(t,this.headers[t]);return e}}},1496(e,t,r){r.d(t,{V:()=>a});var i=r(4795),n=r(3515),s=r(5657),o=r(5994);let a=[{fn:(e,t,r)=>(0,s.Oy)(e,t,r,{navigateType:"location"}),src:["embed","img","frame","input","track"],href:["a","area","image"],data:["object"],action:["form"],formaction:["button","input","textarea","submit"],poster:["video"],"xlink:href":["image"]},{fn:(e,t,r,i)=>{let n=i?.type?.toLowerCase()==="module"||i?.rel?.toLowerCase()==="modulepreload";return(0,s.Oy)(e,t,r,{isModule:n})},src:["script"],href:["link"]},{fn:(e,t,r)=>(0,s.Oy)(e,t,r,{topFrame:r.topFrameName,parentFrame:r.parentFrameName,isIframe:"1"}),src:["iframe"]},{fn:(e,t,r)=>null,sandbox:["iframe"]},{fn:(e,t,r)=>e.startsWith("blob:")?(0,s.$n)(e,t,r):(0,s.Oy)(e,t,r),src:["video","audio","source"]},{fn:()=>"",integrity:["script","link"]},{fn:()=>null,nonce:"*",csp:["iframe"],credentialless:["iframe"]},{fn:(e,t,r)=>(0,n.PV)(e,t,r),srcset:["img","source"],imagesrcset:["link"]},{fn:(e,t,r)=>(0,n.Qs)(e,t,{origin:new o.xP(r.origin.origin),base:new o.xP(r.origin.origin),topFrameName:r.topFrameName,parentFrameName:r.parentFrameName,referrerPolicy:r.referrerPolicy},{loadScripts:!0,inline:!0,source:r.origin.href,apisource:"set HTMLIFrameElement.prototype.srcdoc"}),srcdoc:["iframe"]},{fn:(e,t,r)=>(0,i.s)(e,t,r),style:"*"},{fn:(e,t,r)=>"_top"===e||"_unfencedTop"===e?r.topFrameName:"_parent"===e?r.parentFrameName:e,target:["a","base"]},{fn:(e,t,r)=>e.startsWith("#")?e:(0,s.Oy)(e,t,r),href:["use","textPath","mpath","feImage","animate","animateMotion","animateTransform","set","discard","linearGradient","radialGradient","pattern","filter"]}]},4e3(e,t,r){r.d(t,{$H:()=>a.$H,$n:()=>A.$n,Ej:()=>a.Ej,GZ:()=>a.GZ,Gx:()=>a.Gx,IP:()=>A.IP,Kq:()=>A.Kq,Kx:()=>a.Kx,Lw:()=>a.Lw,OV:()=>a.OV,Oy:()=>A.Oy,PV:()=>A.PV,QU:()=>a.QU,Qs:()=>A.Qs,Tc:()=>c,U5:()=>l,UV:()=>a.UV,VP:()=>o.V,cP:()=>n.c,dJ:()=>a.dJ,f9:()=>A.f9,g:()=>a.g,gP:()=>A.gP,ht:()=>A.ht,iP:()=>A.iP,j5:()=>a.j5,nK:()=>A.nK,nb:()=>A.nb,on:()=>A.on,s5:()=>a.s5,sM:()=>A.sM,u3:()=>a.u3,uh:()=>s.u,v2:()=>A.v2});var i=r(5994),n=r(6372),s=r(3786),o=r(1496),a=r(6965),A=r(2348);function l(e,t,r){let n=t.config.flags[e];for(let n in t.config.siteFlags){let s=t.config.siteFlags[n];if(new i.fs(n).test(r.href)&&e in s)return s[e]}return n}let c={version:"2.0.6-alpha",build:"485c623",date:"2026-05-24T14:39:43.903Z"}},6965(e,t,r){r.d(t,{$H:()=>I,Ej:()=>a,GZ:()=>b,Gx:()=>m,Kx:()=>C,Lw:()=>g,OV:()=>S,QU:()=>y,UV:()=>w,dJ:()=>p,g:()=>x,j5:()=>f,s5:()=>d,u3:()=>u});var i=r(5994);let n=/^[\t\n\f\r ]+|[\t\n\f\r ]+$/g;function s(e){return e.replace(n,"")}function o(e){return e.toLowerCase()}function a(e){let t=s(e);if(!t)return null;let r=t.indexOf(";"),i=s(-1===r?t:t.slice(0,r));if(!i)return null;let n=i.indexOf("/");if(n<=0||n===i.length-1)return null;let a=s(i.slice(0,n)),A=s(i.slice(n+1));return a&&A?{type:a,subtype:A,essence:`${o(a)}/${o(A)}`}:null}function A(e){return"string"==typeof e?a(e):e}let l=new i.YG(["application/font-cff","application/font-otf","application/font-sfnt","application/font-ttf","application/font-woff","application/vnd.ms-fontobject","application/vnd.ms-opentype"]),c=new i.YG(["application/x-rar-compressed","application/zip","application/x-gzip"]),h=new i.YG(["application/ecmascript","application/javascript","application/x-ecmascript","application/x-javascript","text/ecmascript","text/javascript","text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-ecmascript","text/x-javascript"]);function u(e){let t=A(e);return null!==t&&"image"===o(t.type)}function g(e){let t=A(e);if(!t)return!1;let r=o(t.type);return"audio"===r||"video"===r||"application/ogg"===t.essence}function d(e){let t=A(e);return!!t&&("font"===o(t.type)||l.has(t.essence))}function p(e){let t=A(e);return!!t&&("application/zip"===t.essence||o(t.subtype).endsWith("+zip"))}function f(e){let t=A(e);return null!==t&&c.has(t.essence)}function m(e){let t=A(e);return!!t&&(!!o(t.subtype).endsWith("+xml")||"text/xml"===t.essence||"application/xml"===t.essence)}function w(e){let t=A(e);return null!==t&&"text/html"===t.essence}function b(e){let t=A(e);return!!t&&(!!(m(t)||w(t))||"application/pdf"===t.essence)}function y(e){let t=A(e);return null!==t&&h.has(t.essence)}function I(e){let t=s(e);return!!t&&h.has(o(t))}function C(e){if(null==e)return!0;let t=s(e);return!t||"module"===o(t)||I(t)}function x(e){if(null==e)return!1;let t=s(e);return""!==t&&"module"===o(t)}function S(e){let t=A(e);return!!t&&(!!("text"===o(t.type)||u(t)||d(t)||g(t)||w(t)||y(t)||m(t))||"application/pdf"===t.essence||"application/json"===t.essence)}},6879(e,t,r){r.d(t,{n:()=>A});var i=r(5994);function n(e){return 9===e||10===e||12===e||13===e||32===e}function s(e,t){for(;t<e.length&&n(e.charCodeAt(t));)t+=1;return t}function o(e){return e>=48&&e<=57}function a(e){return e>=65&&e<=90||e>=97&&e<=122}function A(e){if(0===e.length)return null;let t=0,r=t=s(e,0);for(;t<e.length&&o(e.charCodeAt(t));)t+=1;let A=e.slice(r,t);if(0===A.length&&46!==e.charCodeAt(t))return null;let l=A.length>0?(0,i.dE)(A,10):0;for(;t<e.length;){let r=e.charCodeAt(t);if(o(r)||46===r){t+=1;continue}break}if(t>=e.length)return{time:l,urlStart:-1,urlEnd:-1,url:null};let c=e.charCodeAt(t);if(59!==c&&44!==c&&!n(c))return null;if((t=s(e,t))<e.length){let r=e.charCodeAt(t);(59===r||44===r)&&(t+=1)}if((t=s(e,t))>=e.length)return{time:l,urlStart:-1,urlEnd:-1,url:null};let h=t,u=e.slice(t,t+3);if(3===u.length){let r=e.charCodeAt(t),i=e.charCodeAt(t+1),n=e.charCodeAt(t+2);if(a(r)&&a(i)&&a(n)&&("U"===u[0]||"u"===u[0])&&("R"===u[1]||"r"===u[1])&&("L"===u[2]||"l"===u[2])){let r=t+3;r=s(e,r),61===e.charCodeAt(r)&&(r+=1,h=r=s(e,r))}}let g="";if(h<e.length){let t=e.charCodeAt(h);(34===t||39===t)&&(g=e[h],h+=1)}let d=e.length;if(""!==g){let t=e.indexOf(g,h);-1!==t&&(d=t)}let p=e.slice(h,d);return{time:l,urlStart:h,urlEnd:d,url:p}}},4795(e,t,r){r.d(t,{f:()=>o,s:()=>s});var i=r(5657),n=r(5994);function s(e,t,r){return a("rewrite",e,t,r)}function o(e,t){return a("unrewrite",e,t)}function a(e,t,r,s){return(t=(t=(0,n.Qf)(t)).replace(/(?i:url)\(['"]?(.+?)['"]?\)/gm,(t,n)=>{let o="rewrite"===e?(0,i.Oy)(n.trim(),r,s):(0,i.v2)(n.trim(),r);return t.replace(n,o)})).replace(/@import\s+((?i:url)\s*?\(.{0,9999}?\)|['"].{0,9999}?['"]|.{0,9999}?)($|\s|;)/gm,(t,n)=>t.replace(n,n.replace(/^(url\(['"]?|['"]|)(.+?)(['"]|['"]?\)|)$/gm,(t,n,o,a)=>{if(n.startsWith("url"))return t;let A="rewrite"===e?(0,i.Oy)(o.trim(),r,s):(0,i.v2)(o.trim(),r);return`${n}${A}${a}`})))}},3515(e,t,r){r.d(t,{Kq:()=>b,PV:()=>x,Qs:()=>I,nK:()=>C});var i=r(1894),n=r(5883),s=r(2026),o=r(1258),a=r(5657),A=r(4795),l=r(6549),c=r(1496),h=r(6879),u=r(8254),g=r(3129),d=r(5994),p=r(4e3),f=r(6965),m=r(7742).A;let w={encodeEntities:"utf8",decodeEntities:!1};class b{context;meta;htmlcontext;handler;parser;completedElements=new WeakSet;emittedLengths=new WeakMap;rewrittenNodes=new WeakMap;ended=!1;constructor(e,t,r){this.context=e,this.meta=t,this.htmlcontext=r,this.handler=new s.DV(void 0,void 0,e=>{this.completedElements.add(e)}),this.parser=new n.i(this.handler,{startingForeignContext:r.foreignContext})}write(e){if(this.ended)throw Error("IncrementalHtmlRewriter stream already ended");return this.parser.write(e),this.flush()}end(e=""){return this.ended?"":(e&&this.parser.write(e),this.parser.end(),this.ended=!0,this.flush())}flush(){let e="";for(let t of this.handler.root.childNodes){let r=this.getAvailableOutput(t);if(null===r)break;let i=this.emittedLengths.get(t)??0;r.length>i&&(e+=r.slice(i),this.emittedLengths.set(t,r.length))}return e}getAvailableOutput(e){if(e.type!==i.vw&&e.type!==i.eF&&e.type!==i.OF)return(0,o.A)(e,w);if(!this.completedElements.has(e))return null;let t=this.rewrittenNodes.get(e);return void 0===t&&(t=y(e,this.context,this.meta,this.htmlcontext),this.rewrittenNodes.set(e,t)),t}}function y(e,t,r,p){var b;let y,I,C;"string"!=typeof e&&(b=e,e=(0,o.A)(b,w));let x=new s.DV((e,t)=>t),B=new n.i(x,{startingForeignContext:p.foreignContext});B.write(e),B.end(),g.C.dispatch(t.hooks.rewriter.html.pre,{handler:x,meta:r,htmlcontext:p,origHtml:e},void 0),function e(t,r,i){if("base"===t.name&&void 0!==t.attribs.href&&(i.base=new d.xP(t.attribs.href,i.origin)),t.attribs){for(let e of c.V)for(let n in e){let s=e[n.toLowerCase()];if("function"!=typeof s&&("*"===s||s.includes(t.name))&&void 0!==t.attribs[n]){let s=t.attribs[n],o=e.fn(s,r,i,t.attribs);null===o?delete t.attribs[n]:t.attribs[n]=o,t.attribs[`scramjet-attr-${n}`]=s}}for(let[e,n]of(0,d.nJ)(t.attribs))S.includes(e)&&(t.attribs[`scramjet-attr-${e}`]=n,t.attribs[e]=(0,l.o)(n,`(inline ${e} on element)`,r,i))}if("style"===t.name&&void 0!==t.children[0]&&(t.children[0].data=(0,A.s)(t.children[0].data,r,i)),"script"===t.name&&t.attribs.type?.toLowerCase()==="importmap"&&void 0!==t.children[0]){let e=t.children[0].data;try{let n=(0,d.P4)(e);if(n.imports)for(let e in n.imports){let t=n.imports[e];"string"==typeof t&&(t=(0,a.Oy)(t,r,i,{isModule:!0}),n.imports[e]=t)}t.children[0].data=(0,d.Xj)(n)}catch(e){m.error("Failed to parse importmap JSON:",e)}}if("script"===t.name&&(0,f.Kx)(t.attribs.type)&&void 0!==t.children[0]){let e=t.children[0].data,n=(0,f.g)(t.attribs.type);t.attribs["scramjet-attr-script-source-src"]=(0,u.i)((0,d.vh)(e)),e=e.replace(/<!--[\s\S]*?-->/g,""),t.children[0].data=(0,l.o)(e,"(inline script element)",r,i,n)}if("meta"===t.name&&void 0!==t.attribs["http-equiv"]){if("content-security-policy"===t.attribs["http-equiv"].toLowerCase())t=new s.Mw(t.attribs.content);else if("refresh"===t.attribs["http-equiv"].toLowerCase()){let e=(0,h.n)(t.attribs.content||"");if(e&&null!==e.url&&e.url.length>0){let n=(0,a.Oy)(e.url.trim(),r,i);t.attribs.content=t.attribs.content.slice(0,e.urlStart)+n+t.attribs.content.slice(e.urlEnd)}}}if(t.childNodes)for(let n in t.childNodes)t.childNodes[n]=e(t.childNodes[n],r,i);return t}(x.root,t,r);let E=function(){for(let e of x.root.childNodes)if(e.type!==i.WL&&e.type!==i.Mw&&e.type!==i.EY)if(e.type!==i.vw||"html"!==e.name)return!0;else y=e;if(!y)return!0;for(let e of y.childNodes)if(e.type!==i.WL&&e.type!==i.Mw&&e.type!==i.EY){if(e.type===i.vw&&"head"===e.name){if(C)return!0;I=e}else if(e.type===i.vw&&"body"===e.name)C=e;else if(!I)return!0;return!1}}();if(p.loadScripts){let e=t.interface.getInjectScripts(r,x,p,e=>new s.Hg("script",{src:e,"scramjet-injected":"true"}));E?(m.warn(`detected quirky document structure parsing @ ${r.origin.href}!`),x.root.children.unshift(...e)):(I||(I=new s.Hg("head",{},[]),y.children.unshift(I)),I.children.unshift(...e))}let D={};return(g.C.dispatch(t.hooks.rewriter.html.post,{handler:x,meta:r,htmlcontext:p,origHtml:e},D),void 0!==D.setRawHtml)?D.setRawHtml:(0,o.A)(x.root,w)}function I(e,t,r,i){let n=(0,d.wU)(),s=y(e,t,r,i);return(0,p.U5)("rewriterLogs",t,r.base)&&m.time(r,n,"html rewrite"),s}function C(e,t){let r=new s.DV((e,t)=>t),i=new n.i(r,{startingForeignContext:t});return i.write(e),i.end(),!function e(t){if("attribs"in t)for(let e in t.attribs){if("scramjet-attr-script-source-src"==e){t.children[0]&&"data"in t.children[0]&&(t.children[0].data=(0,d.lw)(t.attribs[e]));continue}e.startsWith("scramjet-attr-")&&(t.attribs[e.slice(14)]=t.attribs[e],delete t.attribs[e])}if("childNodes"in t)for(let r of t.childNodes)e(r)}(r.root),(0,o.A)(r.root,{...w})}function x(e,t,r){return e.split(/ .*,/).map(e=>e.trim()).map(e=>{let[i,...n]=e.split(/\s+/),s=(0,a.Oy)(i.trim(),t,r);return n.length>0?`${s} ${n.join(" ")}`:s}).join(", ")}let S=["onbeforexrselect","onabort","onbeforeinput","onbeforematch","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontentvisibilityautostatechange","oncontextlost","oncontextmenu","oncontextrestored","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel","onauxclick","ongotpointercapture","onlostpointercapture","onpointerdown","onpointermove","onpointerrawupdate","onpointerup","onpointercancel","onpointerover","onpointerout","onpointerenter","onpointerleave","onselectstart","onselectionchange","onanimationend","onanimationiteration","onanimationstart","ontransitionrun","ontransitionstart","ontransitionend","ontransitioncancel","oncopy","oncut","onpaste","onscrollend","onscrollsnapchange","onscrollsnapchanging"]},2348(e,t,r){r.d(t,{$n:()=>o.$n,IP:()=>o.IP,Kq:()=>n.Kq,Oy:()=>o.Oy,PV:()=>n.PV,Qs:()=>n.Qs,f9:()=>i.f,gP:()=>s.g,ht:()=>A.h,iP:()=>a.i,nK:()=>n.nK,nb:()=>A.n,on:()=>s.o,sM:()=>i.s,v2:()=>o.v2});var i=r(4795),n=r(3515),s=r(6549),o=r(5657),a=r(1668),A=r(3430)},6549(e,t,r){r.d(t,{g:()=>a,o:()=>A});var i=r(4e3),n=r(3430),s=r(5994),o=r(7742).A;function a(e,t,r,A,l=!1){return function(e,t,r,a,A){let[l,c]=(0,n.n)(r,a),h={};for(let e of(0,s.BR)(r.config.flags))h[e]=(0,i.U5)(e,r,a.base);try{let n,c=(0,s.wU)();n="string"==typeof e?l.rewrite_js({...r.config.globals,prefix:r.prefix.pathname},h,r.interface.codecEncode,e,a.base.href,t||"(unknown)",A):l.rewrite_js_bytes({...r.config.globals,prefix:r.prefix.pathname},h,r.interface.codecEncode,e,a.base.href,t||"(unknown)",A),(0,i.U5)("rewriterLogs",r,a.base)&&o.time(a,c,`oxc rewrite for "${t||"(unknown)"}"`);let{js:u,map:g,scramtag:d,errors:p}=n;return{js:"string"==typeof e?(0,s.hS)(u):u,tag:d,map:g,errors:p}}finally{c()}}(e,t,r,A,l)}function A(e,t,r,n,l=!1){try{let A=a(e,t,r,n,l),c=A.js;if((0,i.U5)("sourcemaps",r,n.base)){let e=globalThis[r.config.globals.pushsourcemapfn];if(e)e((0,s.Z7)(A.map),A.tag);else{"string"!=typeof c&&(c=(0,s.hS)(c));let e=`${r.config.globals.pushsourcemapfn}([${A.map.join(",")}], "${A.tag}");`,t=new s.fs(/^\s*(['"])use strict\1;?/);c=t.test(c)?c.replace(t,`$&
|
|
26
|
+
`,`${"debug"===e?"color: gray":""}`,...i)},log:function(e,...t){this.fmt("log",e,...t)},warn:function(e,...t){this.fmt("warn",e,...t)},error:function(e,...t){this.fmt("error",e,...t)},debug:function(e,...t){this.fmt("debug",e,...t)},time(e,t,r){let n,s=(0,i.wU)()-t;n=s<1?"BLAZINGLY FAST":s<500?"decent speed":"really slow",this.print("debug","[time]",`${r} was ${n} (${s.toFixed(2)}ms)`)}}},6372(e,t,r){r.d(t,{c:()=>s});var i=r(5994),n=r(2075);class s{cookies={};byDomain=new Map;defaultPath(e){let t=e.pathname;if(!t||!t.startsWith("/"))return"/";let r=t.lastIndexOf("/");return r<=0?"/":t.slice(0,r)}pathMatches(e,t){return e===t||!!e.startsWith(t)&&(!!t.endsWith("/")||"/"===e.charAt(t.length))}indexCookie(e){let t=e.domain.slice(1),r=this.byDomain.get(t);r||(r=[],this.byDomain.set(t,r)),r.push(e)}unindexCookie(e){let t=e.domain.slice(1),r=this.byDomain.get(t);if(!r)return;let i=r.indexOf(e);i>=0&&r.splice(i,1),0===r.length&&this.byDomain.delete(t)}removeById(e){let t=this.cookies[e];t&&this.unindexCookie(t),delete this.cookies[e]}setCookies(e,t){for(let r of(0,n.Ay)(e)){let e=r.name.toLowerCase();if(e.startsWith("__secure-")){if(!r.secure)continue}else if(e.startsWith("__host-")&&(!r.secure||r.domain||"/"!==r.path))continue;let n=!r.domain,s=r.expires?.getTime(),o=Number.isFinite(s)?s:void 0,a={...r,hostOnly:n,expires:o};a.domain||(a.domain=t.hostname),a.domain.startsWith(".")||(a.domain="."+a.domain),a.path&&a.path.startsWith("/")||(a.path=this.defaultPath(t)),a.sameSite||(a.sameSite="lax");let A=`${a.domain}@${a.path}@${a.name}`;if("number"==typeof a.maxAge)if(Number.isFinite(a.maxAge))if(a.maxAge<=0){this.removeById(A);continue}else a.expires=i.mR.now()+1e3*a.maxAge;else delete a.maxAge;let l=this.cookies[A];l&&this.unindexCookie(l),this.cookies[A]=a,this.indexCookie(a)}}getCookies(e,t,r="strict"){let n=i.mR.now(),s=e.hostname,o=e.pathname,a=[],A=s;for(;void 0!==A;){let e=this.byDomain.get(A);if(e)for(let i of e){if(void 0!==i.expires&&i.expires<n||i.hostOnly&&A!==s||i.httpOnly&&t||!this.pathMatches(o,i.path))continue;let e=(i.sameSite??"lax").toLowerCase();if("cross-site"===r){if("none"!==e)continue}else if("lax"===r&&"strict"===e)continue;a.push(i)}let i=A.indexOf(".");A=-1===i?void 0:A.slice(i+1)}return a.map(e=>e.name?`${e.name}=${e.value}`:e.value).join("; ")}load(e){if("object"==typeof e)return void console.error("??");let t=(0,i.P4)(e);this.cookies={},this.byDomain.clear();let r=Object.keys(t);for(let e=0;e<r.length;e++){let i=r[e],n=t[i];if("string"==typeof n.expires){let e=Date.parse(n.expires);n.expires=Number.isFinite(e)?e:void 0}this.cookies[i]=n,this.indexCookie(n)}}clear(){this.cookies={},this.byDomain.clear()}dump(){return(0,i.Xj)(this.cookies)}}},3786(e,t,r){r.d(t,{u:()=>i});class i{headers={};set(e,t){this.headers[e.toLowerCase()]=t}get(e){let t=e.toLowerCase();return t in this.headers?this.headers[t]:null}delete(e){delete this.headers[e.toLowerCase()]}has(e){return e.toLowerCase()in this.headers}toRawHeaders(){let e=[];for(let t in this.headers)e.push([t,this.headers[t]]);return e}toNativeHeaders(){let e=new Headers;for(let t in this.headers)e.set(t,this.headers[t]);return e}static fromRawHeaders(e){let t=new i;for(let[r,i]of e)t.has(r),t.set(r,i);return t}static fromNativeHeaders(e){let t=new i;for(let[r,i]of e.entries())t.set(r,i);return t}clone(){let e=new i;for(let t in this.headers)e.set(t,this.headers[t]);return e}}},1496(e,t,r){r.d(t,{V:()=>a});var i=r(4795),n=r(3515),s=r(5657),o=r(5994);let a=[{fn:(e,t,r)=>(0,s.Oy)(e,t,r,{navigateType:"location"}),src:["embed","img","frame","input","track"],href:["a","area","image"],data:["object"],action:["form"],formaction:["button","input","textarea","submit"],poster:["video"],"xlink:href":["image"]},{fn:(e,t,r,i)=>{let n=i?.type?.toLowerCase()==="module"||i?.rel?.toLowerCase()==="modulepreload";return(0,s.Oy)(e,t,r,{isModule:n})},src:["script"],href:["link"]},{fn:(e,t,r)=>(0,s.Oy)(e,t,r,{topFrame:r.topFrameName,parentFrame:r.parentFrameName,isIframe:"1"}),src:["iframe"]},{fn:(e,t,r)=>null,sandbox:["iframe"]},{fn:(e,t,r)=>e.startsWith("blob:")?(0,s.$n)(e,t,r):(0,s.Oy)(e,t,r),src:["video","audio","source"]},{fn:()=>"",integrity:["script","link"]},{fn:()=>null,nonce:"*",csp:["iframe"],credentialless:["iframe"]},{fn:(e,t,r)=>(0,n.PV)(e,t,r),srcset:["img","source"],imagesrcset:["link"]},{fn:(e,t,r)=>(0,n.Qs)(e,t,{origin:new o.xP(r.origin.origin),base:new o.xP(r.origin.origin),topFrameName:r.topFrameName,parentFrameName:r.parentFrameName,referrerPolicy:r.referrerPolicy},{loadScripts:!0,inline:!0,source:r.origin.href,apisource:"set HTMLIFrameElement.prototype.srcdoc"}),srcdoc:["iframe"]},{fn:(e,t,r)=>(0,i.s)(e,t,r),style:"*"},{fn:(e,t,r)=>"_top"===e||"_unfencedTop"===e?r.topFrameName:"_parent"===e?r.parentFrameName:e,target:["a","base"]},{fn:(e,t,r)=>e.startsWith("#")?e:(0,s.Oy)(e,t,r),href:["use","textPath","mpath","feImage","animate","animateMotion","animateTransform","set","discard","linearGradient","radialGradient","pattern","filter"]}]},4e3(e,t,r){r.d(t,{$H:()=>a.$H,$n:()=>A.$n,Ej:()=>a.Ej,GZ:()=>a.GZ,Gx:()=>a.Gx,IP:()=>A.IP,Kq:()=>A.Kq,Kx:()=>a.Kx,Lw:()=>a.Lw,OV:()=>a.OV,Oy:()=>A.Oy,PV:()=>A.PV,QU:()=>a.QU,Qs:()=>A.Qs,Tc:()=>c,U5:()=>l,UV:()=>a.UV,VP:()=>o.V,cP:()=>n.c,dJ:()=>a.dJ,f9:()=>A.f9,g:()=>a.g,gP:()=>A.gP,ht:()=>A.ht,iP:()=>A.iP,j5:()=>a.j5,nK:()=>A.nK,nb:()=>A.nb,on:()=>A.on,s5:()=>a.s5,sM:()=>A.sM,u3:()=>a.u3,uh:()=>s.u,v2:()=>A.v2});var i=r(5994),n=r(6372),s=r(3786),o=r(1496),a=r(6965),A=r(2348);function l(e,t,r){let n=t.config.flags[e];for(let n in t.config.siteFlags){let s=t.config.siteFlags[n];if(new i.fs(n).test(r.href)&&e in s)return s[e]}return n}let c={version:"2.0.67-alpha",build:"64137c2",date:"2026-05-24T14:59:24.454Z"}},6965(e,t,r){r.d(t,{$H:()=>I,Ej:()=>a,GZ:()=>b,Gx:()=>m,Kx:()=>C,Lw:()=>g,OV:()=>S,QU:()=>y,UV:()=>w,dJ:()=>p,g:()=>x,j5:()=>f,s5:()=>d,u3:()=>u});var i=r(5994);let n=/^[\t\n\f\r ]+|[\t\n\f\r ]+$/g;function s(e){return e.replace(n,"")}function o(e){return e.toLowerCase()}function a(e){let t=s(e);if(!t)return null;let r=t.indexOf(";"),i=s(-1===r?t:t.slice(0,r));if(!i)return null;let n=i.indexOf("/");if(n<=0||n===i.length-1)return null;let a=s(i.slice(0,n)),A=s(i.slice(n+1));return a&&A?{type:a,subtype:A,essence:`${o(a)}/${o(A)}`}:null}function A(e){return"string"==typeof e?a(e):e}let l=new i.YG(["application/font-cff","application/font-otf","application/font-sfnt","application/font-ttf","application/font-woff","application/vnd.ms-fontobject","application/vnd.ms-opentype"]),c=new i.YG(["application/x-rar-compressed","application/zip","application/x-gzip"]),h=new i.YG(["application/ecmascript","application/javascript","application/x-ecmascript","application/x-javascript","text/ecmascript","text/javascript","text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-ecmascript","text/x-javascript"]);function u(e){let t=A(e);return null!==t&&"image"===o(t.type)}function g(e){let t=A(e);if(!t)return!1;let r=o(t.type);return"audio"===r||"video"===r||"application/ogg"===t.essence}function d(e){let t=A(e);return!!t&&("font"===o(t.type)||l.has(t.essence))}function p(e){let t=A(e);return!!t&&("application/zip"===t.essence||o(t.subtype).endsWith("+zip"))}function f(e){let t=A(e);return null!==t&&c.has(t.essence)}function m(e){let t=A(e);return!!t&&(!!o(t.subtype).endsWith("+xml")||"text/xml"===t.essence||"application/xml"===t.essence)}function w(e){let t=A(e);return null!==t&&"text/html"===t.essence}function b(e){let t=A(e);return!!t&&(!!(m(t)||w(t))||"application/pdf"===t.essence)}function y(e){let t=A(e);return null!==t&&h.has(t.essence)}function I(e){let t=s(e);return!!t&&h.has(o(t))}function C(e){if(null==e)return!0;let t=s(e);return!t||"module"===o(t)||I(t)}function x(e){if(null==e)return!1;let t=s(e);return""!==t&&"module"===o(t)}function S(e){let t=A(e);return!!t&&(!!("text"===o(t.type)||u(t)||d(t)||g(t)||w(t)||y(t)||m(t))||"application/pdf"===t.essence||"application/json"===t.essence)}},6879(e,t,r){r.d(t,{n:()=>A});var i=r(5994);function n(e){return 9===e||10===e||12===e||13===e||32===e}function s(e,t){for(;t<e.length&&n(e.charCodeAt(t));)t+=1;return t}function o(e){return e>=48&&e<=57}function a(e){return e>=65&&e<=90||e>=97&&e<=122}function A(e){if(0===e.length)return null;let t=0,r=t=s(e,0);for(;t<e.length&&o(e.charCodeAt(t));)t+=1;let A=e.slice(r,t);if(0===A.length&&46!==e.charCodeAt(t))return null;let l=A.length>0?(0,i.dE)(A,10):0;for(;t<e.length;){let r=e.charCodeAt(t);if(o(r)||46===r){t+=1;continue}break}if(t>=e.length)return{time:l,urlStart:-1,urlEnd:-1,url:null};let c=e.charCodeAt(t);if(59!==c&&44!==c&&!n(c))return null;if((t=s(e,t))<e.length){let r=e.charCodeAt(t);(59===r||44===r)&&(t+=1)}if((t=s(e,t))>=e.length)return{time:l,urlStart:-1,urlEnd:-1,url:null};let h=t,u=e.slice(t,t+3);if(3===u.length){let r=e.charCodeAt(t),i=e.charCodeAt(t+1),n=e.charCodeAt(t+2);if(a(r)&&a(i)&&a(n)&&("U"===u[0]||"u"===u[0])&&("R"===u[1]||"r"===u[1])&&("L"===u[2]||"l"===u[2])){let r=t+3;r=s(e,r),61===e.charCodeAt(r)&&(r+=1,h=r=s(e,r))}}let g="";if(h<e.length){let t=e.charCodeAt(h);(34===t||39===t)&&(g=e[h],h+=1)}let d=e.length;if(""!==g){let t=e.indexOf(g,h);-1!==t&&(d=t)}let p=e.slice(h,d);return{time:l,urlStart:h,urlEnd:d,url:p}}},4795(e,t,r){r.d(t,{f:()=>o,s:()=>s});var i=r(5657),n=r(5994);function s(e,t,r){return a("rewrite",e,t,r)}function o(e,t){return a("unrewrite",e,t)}function a(e,t,r,s){return(t=(t=(0,n.Qf)(t)).replace(/(?i:url)\(['"]?(.+?)['"]?\)/gm,(t,n)=>{let o="rewrite"===e?(0,i.Oy)(n.trim(),r,s):(0,i.v2)(n.trim(),r);return t.replace(n,o)})).replace(/@import\s+((?i:url)\s*?\(.{0,9999}?\)|['"].{0,9999}?['"]|.{0,9999}?)($|\s|;)/gm,(t,n)=>t.replace(n,n.replace(/^(url\(['"]?|['"]|)(.+?)(['"]|['"]?\)|)$/gm,(t,n,o,a)=>{if(n.startsWith("url"))return t;let A="rewrite"===e?(0,i.Oy)(o.trim(),r,s):(0,i.v2)(o.trim(),r);return`${n}${A}${a}`})))}},3515(e,t,r){r.d(t,{Kq:()=>b,PV:()=>x,Qs:()=>I,nK:()=>C});var i=r(1894),n=r(5883),s=r(2026),o=r(1258),a=r(5657),A=r(4795),l=r(6549),c=r(1496),h=r(6879),u=r(8254),g=r(3129),d=r(5994),p=r(4e3),f=r(6965),m=r(7742).A;let w={encodeEntities:"utf8",decodeEntities:!1};class b{context;meta;htmlcontext;handler;parser;completedElements=new WeakSet;emittedLengths=new WeakMap;rewrittenNodes=new WeakMap;ended=!1;constructor(e,t,r){this.context=e,this.meta=t,this.htmlcontext=r,this.handler=new s.DV(void 0,void 0,e=>{this.completedElements.add(e)}),this.parser=new n.i(this.handler,{startingForeignContext:r.foreignContext})}write(e){if(this.ended)throw Error("IncrementalHtmlRewriter stream already ended");return this.parser.write(e),this.flush()}end(e=""){return this.ended?"":(e&&this.parser.write(e),this.parser.end(),this.ended=!0,this.flush())}flush(){let e="";for(let t of this.handler.root.childNodes){let r=this.getAvailableOutput(t);if(null===r)break;let i=this.emittedLengths.get(t)??0;r.length>i&&(e+=r.slice(i),this.emittedLengths.set(t,r.length))}return e}getAvailableOutput(e){if(e.type!==i.vw&&e.type!==i.eF&&e.type!==i.OF)return(0,o.A)(e,w);if(!this.completedElements.has(e))return null;let t=this.rewrittenNodes.get(e);return void 0===t&&(t=y(e,this.context,this.meta,this.htmlcontext),this.rewrittenNodes.set(e,t)),t}}function y(e,t,r,p){var b;let y,I,C;"string"!=typeof e&&(b=e,e=(0,o.A)(b,w));let x=new s.DV((e,t)=>t),B=new n.i(x,{startingForeignContext:p.foreignContext});B.write(e),B.end(),g.C.dispatch(t.hooks.rewriter.html.pre,{handler:x,meta:r,htmlcontext:p,origHtml:e},void 0),function e(t,r,i){if("base"===t.name&&void 0!==t.attribs.href&&(i.base=new d.xP(t.attribs.href,i.origin)),t.attribs){for(let e of c.V)for(let n in e){let s=e[n.toLowerCase()];if("function"!=typeof s&&("*"===s||s.includes(t.name))&&void 0!==t.attribs[n]){let s=t.attribs[n],o=e.fn(s,r,i,t.attribs);null===o?delete t.attribs[n]:t.attribs[n]=o,t.attribs[`scramjet-attr-${n}`]=s}}for(let[e,n]of(0,d.nJ)(t.attribs))S.includes(e)&&(t.attribs[`scramjet-attr-${e}`]=n,t.attribs[e]=(0,l.o)(n,`(inline ${e} on element)`,r,i))}if("style"===t.name&&void 0!==t.children[0]&&(t.children[0].data=(0,A.s)(t.children[0].data,r,i)),"script"===t.name&&t.attribs.type?.toLowerCase()==="importmap"&&void 0!==t.children[0]){let e=t.children[0].data;try{let n=(0,d.P4)(e);if(n.imports)for(let e in n.imports){let t=n.imports[e];"string"==typeof t&&(t=(0,a.Oy)(t,r,i,{isModule:!0}),n.imports[e]=t)}t.children[0].data=(0,d.Xj)(n)}catch(e){m.error("Failed to parse importmap JSON:",e)}}if("script"===t.name&&(0,f.Kx)(t.attribs.type)&&void 0!==t.children[0]){let e=t.children[0].data,n=(0,f.g)(t.attribs.type);t.attribs["scramjet-attr-script-source-src"]=(0,u.i)((0,d.vh)(e)),e=e.replace(/<!--[\s\S]*?-->/g,""),t.children[0].data=(0,l.o)(e,"(inline script element)",r,i,n)}if("meta"===t.name&&void 0!==t.attribs["http-equiv"]){if("content-security-policy"===t.attribs["http-equiv"].toLowerCase())t=new s.Mw(t.attribs.content);else if("refresh"===t.attribs["http-equiv"].toLowerCase()){let e=(0,h.n)(t.attribs.content||"");if(e&&null!==e.url&&e.url.length>0){let n=(0,a.Oy)(e.url.trim(),r,i);t.attribs.content=t.attribs.content.slice(0,e.urlStart)+n+t.attribs.content.slice(e.urlEnd)}}}if(t.childNodes)for(let n in t.childNodes)t.childNodes[n]=e(t.childNodes[n],r,i);return t}(x.root,t,r);let E=function(){for(let e of x.root.childNodes)if(e.type!==i.WL&&e.type!==i.Mw&&e.type!==i.EY)if(e.type!==i.vw||"html"!==e.name)return!0;else y=e;if(!y)return!0;for(let e of y.childNodes)if(e.type!==i.WL&&e.type!==i.Mw&&e.type!==i.EY){if(e.type===i.vw&&"head"===e.name){if(C)return!0;I=e}else if(e.type===i.vw&&"body"===e.name)C=e;else if(!I)return!0;return!1}}();if(p.loadScripts){let e=t.interface.getInjectScripts(r,x,p,e=>new s.Hg("script",{src:e,"scramjet-injected":"true"}));E?(m.warn(`detected quirky document structure parsing @ ${r.origin.href}!`),x.root.children.unshift(...e)):(I||(I=new s.Hg("head",{},[]),y.children.unshift(I)),I.children.unshift(...e))}let D={};return(g.C.dispatch(t.hooks.rewriter.html.post,{handler:x,meta:r,htmlcontext:p,origHtml:e},D),void 0!==D.setRawHtml)?D.setRawHtml:(0,o.A)(x.root,w)}function I(e,t,r,i){let n=(0,d.wU)(),s=y(e,t,r,i);return(0,p.U5)("rewriterLogs",t,r.base)&&m.time(r,n,"html rewrite"),s}function C(e,t){let r=new s.DV((e,t)=>t),i=new n.i(r,{startingForeignContext:t});return i.write(e),i.end(),!function e(t){if("attribs"in t)for(let e in t.attribs){if("scramjet-attr-script-source-src"==e){t.children[0]&&"data"in t.children[0]&&(t.children[0].data=(0,d.lw)(t.attribs[e]));continue}e.startsWith("scramjet-attr-")&&(t.attribs[e.slice(14)]=t.attribs[e],delete t.attribs[e])}if("childNodes"in t)for(let r of t.childNodes)e(r)}(r.root),(0,o.A)(r.root,{...w})}function x(e,t,r){return e.split(/ .*,/).map(e=>e.trim()).map(e=>{let[i,...n]=e.split(/\s+/),s=(0,a.Oy)(i.trim(),t,r);return n.length>0?`${s} ${n.join(" ")}`:s}).join(", ")}let S=["onbeforexrselect","onabort","onbeforeinput","onbeforematch","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontentvisibilityautostatechange","oncontextlost","oncontextmenu","oncontextrestored","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel","onauxclick","ongotpointercapture","onlostpointercapture","onpointerdown","onpointermove","onpointerrawupdate","onpointerup","onpointercancel","onpointerover","onpointerout","onpointerenter","onpointerleave","onselectstart","onselectionchange","onanimationend","onanimationiteration","onanimationstart","ontransitionrun","ontransitionstart","ontransitionend","ontransitioncancel","oncopy","oncut","onpaste","onscrollend","onscrollsnapchange","onscrollsnapchanging"]},2348(e,t,r){r.d(t,{$n:()=>o.$n,IP:()=>o.IP,Kq:()=>n.Kq,Oy:()=>o.Oy,PV:()=>n.PV,Qs:()=>n.Qs,f9:()=>i.f,gP:()=>s.g,ht:()=>A.h,iP:()=>a.i,nK:()=>n.nK,nb:()=>A.n,on:()=>s.o,sM:()=>i.s,v2:()=>o.v2});var i=r(4795),n=r(3515),s=r(6549),o=r(5657),a=r(1668),A=r(3430)},6549(e,t,r){r.d(t,{g:()=>a,o:()=>A});var i=r(4e3),n=r(3430),s=r(5994),o=r(7742).A;function a(e,t,r,A,l=!1){return function(e,t,r,a,A){let[l,c]=(0,n.n)(r,a),h={};for(let e of(0,s.BR)(r.config.flags))h[e]=(0,i.U5)(e,r,a.base);try{let n,c=(0,s.wU)();n="string"==typeof e?l.rewrite_js({...r.config.globals,prefix:r.prefix.pathname},h,r.interface.codecEncode,e,a.base.href,t||"(unknown)",A):l.rewrite_js_bytes({...r.config.globals,prefix:r.prefix.pathname},h,r.interface.codecEncode,e,a.base.href,t||"(unknown)",A),(0,i.U5)("rewriterLogs",r,a.base)&&o.time(a,c,`oxc rewrite for "${t||"(unknown)"}"`);let{js:u,map:g,scramtag:d,errors:p}=n;return{js:"string"==typeof e?(0,s.hS)(u):u,tag:d,map:g,errors:p}}finally{c()}}(e,t,r,A,l)}function A(e,t,r,n,l=!1){try{let A=a(e,t,r,n,l),c=A.js;if((0,i.U5)("sourcemaps",r,n.base)){let e=globalThis[r.config.globals.pushsourcemapfn];if(e)e((0,s.Z7)(A.map),A.tag);else{"string"!=typeof c&&(c=(0,s.hS)(c));let e=`${r.config.globals.pushsourcemapfn}([${A.map.join(",")}], "${A.tag}");`,t=new s.fs(/^\s*(['"])use strict\1;?/);c=t.test(c)?c.replace(t,`$&
|
|
27
27
|
${e}`):`${e}
|
|
28
28
|
${c}`}}if((0,i.U5)("rewriterLogs",r,n.base))for(let e of A.errors)o.error("oxc parse error",e);return c}catch(a){if(o.warn("failed rewriting js for",t||"(unknown)",a.message,"string"!=typeof e?(0,s.hS)(e):e),(0,i.U5)("allowInvalidJs",r,n.base))return e;throw a}}Error.stackTraceLimit=50},5657(e,t,r){r.d(t,{$n:()=>l,IP:()=>A,Oy:()=>c,v2:()=>h});var i=r(6549),n=r(7492),s=r(5994),o=r(7742).A;function a(e,t){try{return new s.xP(e,t)}catch{return null}}function A(e,t,r){let i=new s.xP(e.substring(5));return"blob:"+r.origin.origin+i.pathname}function l(e,t,r){let i=new s.xP(e.substring(5));return"blob:"+t.prefix.origin+i.pathname}function c(e,t,r,o){if((e=(0,s.Qf)(e)).startsWith("javascript:"))return"javascript:"+(0,i.o)(e.slice(11),"(javascript: url)",t,r);if(e.startsWith("blob:"))return t.prefix.href+e;if(e.startsWith("data:")){if(e.length+t.prefix.href.length+1024>2097152){let{objectUrl:i}=function(e){let t,r=e.indexOf(",");if(-1===r)return null;let i=e.slice(5,r),n=e.slice(r+1),o=i.split(";"),a=o.shift()||"",A=o.some(e=>"base64"===e.toLowerCase()),l=o.filter(e=>e&&"base64"!==e.toLowerCase()),c=a||"text/plain";if(!a&&(l.some(e=>e.toLowerCase().startsWith("charset="))||l.push("charset=US-ASCII")),l.length&&(c+=";"+l.join(";")),A){let e=n.replace(/\s/g,"");e=e.replace(/-/g,"+").replace(/_/g,"/");let r=(0,s.lw)(e);t=new Uint8Array(r.length);for(let e=0;e<r.length;e++)t[e]=r.charCodeAt(e)}else{let e=n;try{e=decodeURIComponent(n)}catch{}t=(0,s.vh)(e)}let h=new Blob([t],{type:c}),u=(0,s.FA)(h);return{blob:h,objectUrl:u}}(e);return t.prefix.href+A(i,t,r)+"?"+n.QP.fakeDataURL+"=1"}return t.prefix.href+e}{if(e.startsWith("mailto:")||e.startsWith("about:"))return e;let i=r.base.href;i.startsWith("about:")&&(i=h(self.location.href,t));let A=a(e,i);if(!A||"http:"!=A.protocol&&"https:"!=A.protocol)return e;let l=t.interface.codecEncode(A.hash.slice(1));A.hash="";let c=new s.JE,u=o?.referrerPolicy??r.referrerPolicy;u&&c.set(n.QP.referrerPolicy,u),o?.isModule&&c.set(n.QP.isModule,"module"),o?.topFrame&&c.set(n.QP.topFrame,o.topFrame),o?.parentFrame&&c.set(n.QP.parentFrame,o.parentFrame),o?.isIframe&&c.set(n.QP.isIframe,o.isIframe),o?.mode&&c.set(n.QP.mode,o.mode),o?.credentials&&c.set(n.QP.credentials,o.credentials),o?.destination&&c.set(n.QP.destination,o.destination),r.origin.origin!==t.prefix.origin&&c.set(n.QP.initiatorOrigin,r.origin.origin);let g="";return c.toString()&&(g="?"+c.toString()),t.prefix.href+t.interface.codecEncode(A.href)+g+(l?"#"+l:"")}}function h(e,t){if((e=(0,s.Qf)(e)).startsWith("javascript:")||e.startsWith("blob:"))return e;if(e.startsWith(t.prefix.href+"blob:"))return e.substring(t.prefix.href.length);if(e.startsWith(t.prefix.href+"data:"))return e.substring(t.prefix.href.length);if(e.startsWith("mailto:")||e.startsWith("about:"))return e;else{if(!(e.startsWith("http:")||e.startsWith("https:")))return""==e||o.error("unrewriteurl: unexpected url",e),e;let r=a(e);if(!r||"http:"!=r.protocol&&"https:"!=r.protocol)return e;if(!r.href.startsWith(t.prefix.href))return o.error("unrewriteurl: unexpected url",e),e;let i=t.interface.codecDecode(r.hash.slice(1));return r.hash="",r.search="",t.interface.codecDecode(r.href.slice(t.prefix.href.length))+(i?"#"+i:"")}}},3430(e,t,r){let i;r.d(t,{h:()=>A,n:()=>h});var n=r(5469),s=r(4e3),o=r(5994),a=r(7742).A;function A(e){i=e instanceof Uint8Array?e:new Uint8Array(e)}let l="\0asm".split("").map(e=>e.charCodeAt(0)),c=[];function h(e,t){let r;if(!(i instanceof Uint8Array))throw new o.$D("rewriter wasm not found (was setWasm called?)");if(![...i.slice(0,4)].every((e,t)=>e===l[t]))throw new o.$D("rewriter wasm does not have wasm magic (was it fetched correctly?)\nrewriter wasm contents: "+(0,o.hS)(i));(0,n.QR)({module:new WebAssembly.Module(i)});let A=c.findIndex(e=>!e.inUse),h=c.length;return -1===A?((0,s.U5)("rewriterLogs",e,t.base)&&a.log(`creating new rewriter, ${h} rewriters made already`),r={rewriter:new n.LW,inUse:!1},c.push(r)):r=c[A],r.inUse=!0,[r.rewriter,()=>r.inUse=!1]}},1668(e,t,r){r.d(t,{i:()=>a});var i=r(4e3),n=r(6549),s=r(5994),o=r(8254);function a(e,t,r,a,A){let l="module"===r,c=e=>l?`import "${e}"
|
|
29
29
|
`:`importScripts("${e}");
|