diff --git a/public/asset-manifest.json b/public/asset-manifest.json index 766a75d..d1e4eff 100644 --- a/public/asset-manifest.json +++ b/public/asset-manifest.json @@ -1,6 +1,6 @@ { "core.min.js": "core.d23af1c652.min.js", - "vendor.min.js": "vendor.e58ffb4f39.min.js", + "vendor.min.js": "vendor.eb55aee141.min.js", "mermaid.min.js": "mermaid.a7356d5ed1.min.js", "all.min.css": "all.4ee5a5bea6.min.css", "markdown.min.js": "markdown.6c8dfb7b1d.min.js", diff --git a/public/i18n/locale-en.json b/public/i18n/locale-en.json index a7f0666..88c13fc 100644 --- a/public/i18n/locale-en.json +++ b/public/i18n/locale-en.json @@ -9,6 +9,7 @@ }, "ERRORS": { "cache_busy": "Downloads are busy. Please try again shortly.", + "cache_miss": "This file is not cached yet. Please try again.", "invalid_sort": "The selected sort order is invalid.", "invalid_cursor": "This project page is no longer valid. Reload the list.", "repository_changed": "The repository changed while processing. Please retry.", @@ -143,6 +144,8 @@ "storage_write_size_mismatch": "The downloaded file was smaller than expected. The upstream source may have returned an incomplete response — please try again.", "storage_read_error": "An error occurred while reading the file from storage — please try again.", "upstream_error": "A temporary error occurred while fetching from GitHub — please try again.", + "streamer_upstream_error": "The file server received an unexpected response — please try again.", + "streamer_unreachable": "The file server is temporarily unreachable — please try again.", "token_expired": "The repository owner needs to renew their GitHub connection before this content can be loaded.", "job_is_active": "This job is currently running — wait for it to finish or remove it first.", "github_app_access_required": "Allow this repository on GitHub using the read-only access button, then retry. Organization access may require administrator approval.", diff --git a/public/script/vendor.min.js b/public/script/vendor.min.js index e1d198c..67d31f4 100644 --- a/public/script/vendor.min.js +++ b/public/script/vendor.min.js @@ -18,7 +18,7 @@ while being at `)},_a=class{constructor(t){nt(this,"gen");nt(this,"threads",[]);nt(this,"match",!1);nt(this,"runs",[]);nt(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},gc=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((s,i)=>s!==t.ids[i])?!1:e.runs.every(s=>t.runs.some(i=>i.neg===s.neg&&gc(i.state,s.state))),dc=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),mo,jn,$a,Fa,Hs=class{constructor(t,s,i){$e(this,jn);nt(this,"dots");nt(this,"dotStart");$e(this,mo);this.dots=t,this.dotStart=s,ze(this,mo,i)}state(){return new _a(++re(this,mo).gen)}done(t){return t.ids=t.threads.map(s=>s.id).sort((s,i)=>s-i),t.match&&t.ids.unshift(La.id),t}restricted(t,s){return s&&(this.dots||this.dotStart&&t===0)}add(t,s,i,o){switch(s.t){case"split":if(!Fe(this,jn,$a).call(this,t,s))return;for(let u of s.out)this.add(t,u,i,o);return;case"neg":if(!Fe(this,jn,$a).call(this,t,s))return;let r=this.state();return this.add(r,s.sub,i,!1),this.done(r),this.addRun(t,{t:"run",neg:s,state:r},i,o);case"star":if(this.restricted(i,o))return;Fe(this,jn,Fa).call(this,t,s)&&this.add(t,s.next,i,o);return;case"match":t.match=!0;return;default:Fe(this,jn,Fa).call(this,t,s)}}addRun(t,s,i,o){for(let r of t.runs)if(r.neg===s.neg&&gc(r.state,s.state))return;t.runs.push(s),s.state.match||this.add(t,s.neg.next,i,o)}step(t,s,i,o){let r=this.state();for(let u of t.threads)switch(u.t){case"lit":za(u,s)&&this.add(r,u.next,i+1,o);break;case"any":this.restricted(i,o)||this.add(r,u.next,i+1,o);break;case"class":!this.restricted(i,o)&&u.re.test(s)&&this.add(r,u.next,i+1,o);break;case"star":this.restricted(i,o)||this.add(r,u,i+1,o)}if(!this.restricted(i,o))for(let u of t.runs){if(u.state.dead){this.addRun(r,u,i+1,o);continue}let p=this.step(u.state,s,i,!1);this.addRun(r,{t:"run",neg:u.neg,state:p},i+1,o)}return this.done(r)}};mo=new WeakMap,jn=new WeakSet,$a=function(t,s){let{seen:i}=re(this,mo);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,!0)},Fa=function(t,s){let{has:i}=re(this,mo);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,t.threads.push(s),!0)};var vc=e=>{let t=e.ids.join();if(!e.runs.length)return t;let s=e.runs.map(i=>`${i.neg.id}(${vc(i.state)})`);return`${t}|${s.sort().join("|")}`},dv=1<<18,jo,Go,Fn,ho,Un,Bn,zn,sn,Ba,ar,yc,Ua=class{constructor(t,s){$e(this,sn);$e(this,jo);$e(this,Go,new Map);$e(this,Fn,0);$e(this,ho);$e(this,Un);$e(this,Bn);$e(this,zn);ze(this,jo,t),ze(this,Bn,new Hs(!1,!1,s)),ze(this,zn,new Hs(!1,!0,s))}start(t){if(t){if(re(this,Un))return re(this,Un);let i=re(this,zn).state();return re(this,zn).add(i,re(this,jo),0,!0),ze(this,Un,Fe(this,sn,Ba).call(this,re(this,zn).done(i)))}if(re(this,ho))return re(this,ho);let s=re(this,Bn).state();return re(this,Bn).add(s,re(this,jo),0,!0),ze(this,ho,Fe(this,sn,ar).call(this,re(this,Bn).done(s)))}next(t,s){let i=s.charCodeAt(0),o=i<128?void 0:t.next.get(s);if(o)return o;let r=t===re(this,Un)?Fe(this,sn,ar).call(this,re(this,zn).step(t.state,s,0,!0)):Fe(this,sn,ar).call(this,re(this,Bn).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),ze(this,Fn,re(this,Fn)+128)),t.ascii[i]=r):t.next.set(s,r),cl(this,Fn)._++,r}};jo=new WeakMap,Go=new WeakMap,Fn=new WeakMap,ho=new WeakMap,Un=new WeakMap,Bn=new WeakMap,zn=new WeakMap,sn=new WeakSet,Ba=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},ar=function(t){let s=vc(t),i=re(this,Go).get(s);if(i)return i;re(this,Fn)>dv&&Fe(this,sn,yc).call(this);let o=Fe(this,sn,Ba).call(this,t);return re(this,Go).set(s,o),ze(this,Fn,re(this,Fn)+(s.length+1)),o},yc=function(){re(this,Go).clear(),ze(this,Fn,0),ze(this,ho,void 0),ze(this,Un,void 0)};var uv=e=>{let t=[];for(let s=e;s.t!=="match";s=s.next){if(s.t==="split"||s.t==="neg")return;t.push(s)}return t},cv=(e,t,s,i)=>{let o=0,r=s,u=-1,p=0;for(;r{let t=0,s=0;for(let i of e){let[o,r]=pv(i);t+=o,s+=r}return[t,s]},pv=e=>{if(e.t==="star")return[0,1/0];if(e.t!=="ext")return[1,1];if(e.type==="!")return[0,1/0];let t=e.alts.map(bc),s=Math.min(...t.map(r=>r[0])),i=Math.max(...t.map(r=>r[1])),o=i===0?0:1/0;return e.type==="@"?[s,i]:e.type==="?"?[0,i]:e.type==="*"?[0,o]:[s,o]},uc=(e,t,s)=>{for(let i=0;imv.test(e)?[...e]:e,cc=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},Hn,Wo,go,lr,vo,Gs,dr,yo,Ws,Ks,Ys,An,wn,Ko,Yo,Js,ur,on,bo,zs,js=class{constructor(t,s={}){$e(this,bo);nt(this,"pattern");nt(this,"options");$e(this,Hn);$e(this,Wo);$e(this,go);$e(this,lr);$e(this,vo);$e(this,Gs,!1);$e(this,dr);$e(this,yo);$e(this,Ws,!1);$e(this,Ks,0);$e(this,Ys,1/0);$e(this,An,[]);$e(this,wn,[]);$e(this,Ko);$e(this,Yo);$e(this,Js,!1);$e(this,ur);$e(this,on);if(t.includes("/"))throw new Error("can only match a single path portion, got pattern: "+t);this.pattern=t,this.options=s;let{nocase:i=!1,noext:o=!1,normalize:r}=s;ze(this,on,r===!0?"NFC":r||void 0);let u=/^[?*+@]\(\)$/.test(t),p=iv(t,i,o||u,re(this,on)),[c]=mc(p,rv(p),0,p.length,!0);re(this,on)&&(c=hc(c,re(this,on)));let[v,h]=av(c,i);if(ze(this,Hn,v),ze(this,Wo,h),c.every(y=>y.t==="lit"))ze(this,vo,c.map(y=>y.ch).join("")),ze(this,Gs,i);else{let y=w=>w.t!=="lit"?void 0:i?{ch:w.ch,re:fc(w.ch)}:{ch:w.ch};for(let w of c){let C=y(w);if(!C)break;re(this,An).push(C)}for(let w=c.length-1;w>=0;w--){let C=y(c[w]);if(!C)break;re(this,wn).unshift(C)}ze(this,Js,!!(re(this,An).length||re(this,wn).length)),i||(ze(this,Ko,re(this,An).map(w=>w.ch).join("")),ze(this,Yo,re(this,wn).map(w=>w.ch).join(""))),ze(this,yo,uv(re(this,Hn))?.slice(re(this,An).length,-re(this,wn).length||void 0)),ze(this,Ws,!!re(this,yo)?.every(w=>w.t==="star"||w.t==="any"));let[g,k]=bc(c);ze(this,Ks,g),ze(this,Ys,k)}}test(t){return re(this,on)?(cc(t),Fe(this,bo,zs).call(this,t.normalize(re(this,on)))):fv.test(t)?(cc(t),Fe(this,bo,zs).call(this,t,[...t])):Fe(this,bo,zs).call(this,t,t)}testUnchecked(t){return Fe(this,bo,zs).call(this,re(this,on)?t.normalize(re(this,on)):t)}toString(){return lv(re(this,Hn))}};Hn=new WeakMap,Wo=new WeakMap,go=new WeakMap,lr=new WeakMap,vo=new WeakMap,Gs=new WeakMap,dr=new WeakMap,yo=new WeakMap,Ws=new WeakMap,Ks=new WeakMap,Ys=new WeakMap,An=new WeakMap,wn=new WeakMap,Ko=new WeakMap,Yo=new WeakMap,Js=new WeakMap,ur=new WeakMap,on=new WeakMap,bo=new WeakSet,zs=function(t,s){if(re(this,vo)!==void 0)return re(this,Gs)?(re(this,dr)??ze(this,dr,pc(re(this,vo)))).test(t):t===re(this,vo);let i=re(this,Ks),o=re(this,Ys);if(s===void 0){let h=t.length,y=h+1>>1;if(ho)return!1;(yo)&&(s=rr(t))}if(s!==void 0&&(s.lengtho))return!1;let r=re(this,An).length;if(re(this,Js))if(re(this,Ko)!==void 0&&re(this,Yo)!==void 0){if(!t.startsWith(re(this,Ko))||!t.endsWith(re(this,Yo)))return!1}else{s??(s=rr(t));let h=s.length-re(this,wn).length;if(!uc(re(this,An),s,0)||!uc(re(this,wn),s,h))return!1}let u=!this.options.dot&&t.startsWith(".");if(re(this,yo)){if(t==="."||t===".."||u&&!r)return!1;if(re(this,Ws))return!0;s??(s=rr(t));let h=s.length-re(this,wn).length;return cv(re(this,yo),s,r,h)}if(s??(s=rr(t)),t==="."||t===".."){re(this,go)??ze(this,go,dc(re(this,Wo)));let h=re(this,lr)??ze(this,lr,new Hs(!0,!1,re(this,go))),y=h.state();h.add(y,re(this,Hn),0,!0);let g=h.done(y);for(let k=0;k{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};var Gn=(e,{windowsPathsNoEscape:t=!1,magicalBraces:s=!1}={})=>s?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");var wo=(e,{windowsPathsNoEscape:t=!1,magicalBraces:s=!0}={})=>s?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var zt=(e,t,s={})=>(Xs(t),!s.nocomment&&t.charAt(0)==="#"?!1:gv(t,s).match(e)),Jo=new Map,hv=256,gv=(e,t)=>{let s=e+"\0"+JSON.stringify(t),i=Jo.get(s);return i?Jo.delete(s):(i=new ko(e,{...t}),Jo.size>=hv&&Jo.delete(Jo.keys().next().value)),Jo.set(s,i),i},Nc=typeof process=="object"&&process?process.env?.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",wc={win32:{sep:"\\"},posix:{sep:"/"}},vv=Nc==="win32"?wc.win32.sep:wc.posix.sep;zt.sep=vv;var vt=Symbol("globstar **");zt.GLOBSTAR=vt;var yv=(e,t={})=>s=>zt(s,e,t);zt.filter=yv;var In=(e,t={})=>Object.assign({},e,t),bv=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return zt;let t=zt;return Object.assign((i,o,r={})=>t(i,o,In(e,r)),{Minimatch:class extends t.Minimatch{constructor(o,r={}){super(o,In(e,r))}static defaults(o){return t.defaults(In(e,o)).Minimatch}},unescape:(i,o={})=>t.unescape(i,In(e,o)),escape:(i,o={})=>t.escape(i,In(e,o)),filter:(i,o={})=>t.filter(i,In(e,o)),defaults:i=>t.defaults(In(e,i)),braceExpand:(i,o={})=>t.braceExpand(i,In(e,o)),match:(i,o,r={})=>t.match(i,o,In(e,r)),sep:t.sep,GLOBSTAR:vt})};zt.defaults=bv;var Rc=(e,t={})=>(Xs(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:ac(e,{max:t.braceExpandMax}));zt.braceExpand=Rc;var wv=(e,t,s={})=>{let i=new ko(t,s);return e=e.filter(o=>i.match(o)),i.options.nonull&&!e.length&&e.push(t),e};zt.match=wv;var kc=/[?*]|[+@!]\(.*?\)|\[|\]/,Tc=(e,t)=>{let s=t+1;(e.charAt(s)==="!"||e.charAt(s)==="^")&&s++;let i=!1;for(;s{if(!t&&(e==="+()"||e==="@()"))return e;let s="";for(let i=0;i{if(/^[?*+@]\(\)$/.test(e)||e.includes("[:"))return!1;let t=0;for(let s=0;stypeof e=="string"?t===e:t!==""&&e.testUnchecked(t),Sc=(e,t,s,i,o)=>Wn(e,t)?s:i!==void 0&&Wn(e,i)?o:-1,Ka=e=>e==="."||e==="..",ja=e=>typeof e=="string"&&/^[a-z]:$/i.test(e),pr=e=>typeof e=="string"&&/^unc$/i.test(e),Ga=e=>{if(e[0]!==""||e[1]!=="")return-1;let t=e[2]!=="?"?2:pr(e[3])?4:-1,s=e[t],i=e[t+1];return t!==-1&&s!==void 0&&s!==""&&s!==vt&&i!==void 0&&i!==""&&i!==vt?t:-1},cr=(e,t)=>!Ka(e)&&(t||!e.startsWith(".")),Qs=(e,t,s,i,o)=>{for(let r=t;r=s||mr(e.charCodeAt(p),o))return!0}let u=Ya(e,r,o);if(u===-1)return!1;for(r=u+1;rt==="/"?e===47:t==="\\"?e===92:e===47||e===92,Ya=(e,t,s)=>{if(s!=="both")return e.indexOf(s,t);let i=e.indexOf("/",t),o=e.indexOf("\\",t);return i===-1?o:o===-1?i:Math.min(i,o)},Ec=(e,t,s)=>s!=="both"?e.lastIndexOf(s,t):Math.max(e.lastIndexOf("/",t),e.lastIndexOf("\\",t)),Wa={},Kn,Qo,Yn,On,Zo,xo,Jn,xs,es,ei,Ue,fr,Zs,Pc,Dc,Ac,Ic,Oc,Mc,Ja,Vc,qc,Xa,Xo,Qa,ko=class{constructor(t,s={}){$e(this,Ue);nt(this,"options");nt(this,"set");nt(this,"pattern");nt(this,"windowsPathsNoEscape");nt(this,"nonegate");nt(this,"negate");nt(this,"comment");nt(this,"empty");nt(this,"preserveMultipleSlashes");nt(this,"partial");nt(this,"globSet");nt(this,"globParts");nt(this,"nocase");nt(this,"isWindows");nt(this,"platform");nt(this,"windowsNoMagicRoot");nt(this,"maxGlobstarRecursion");$e(this,Kn);$e(this,Qo);$e(this,Yn);$e(this,On);$e(this,Zo,[]);$e(this,xo,[]);$e(this,Jn,[]);$e(this,xs,new Map);$e(this,es,!1);$e(this,ei,new WeakMap);Xs(t),s=s||{},this.options=s,this.maxGlobstarRecursion=s.maxGlobstarRecursion??200,this.pattern=t,this.platform=s.platform||Nc,this.isWindows=this.platform==="win32";let i="allowWindowsEscape";this.windowsPathsNoEscape=!!s.windowsPathsNoEscape||s[i]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!s.preserveMultipleSlashes,this.negate=!1,this.nonegate=!!s.nonegate,this.comment=!1,this.empty=!1,this.partial=!!s.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=s.windowsNoMagicRoot!==void 0?s.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],ze(this,Kn,!this.preserveMultipleSlashes),ze(this,Yn,(s.optimizationLevel??1)>=2);let o=s.normalize;ze(this,On,o===!0?"NFC":o||void 0),this.make();let r=this.set.map(u=>Fe(this,Ue,Zs).call(this,u));ze(this,Jn,this.set.map((u,p)=>re(this,Kn)&&u.length-1>r[p])),ze(this,Zo,this.set.map((u,p)=>{let c=re(this,Jn)[p]?u.length-1:u.length,v=u.slice(r[p]+1,c).filter(h=>typeof h=="string"&&!!h);return[...new Set(v)]})),ze(this,Qo,re(this,Zo).some(u=>u.length)),ze(this,xo,this.set.map((u,p)=>{let[c,v,h]=u;if(re(this,Jn)[p]&&u.length===2&&c===vt&&v!==vt)return"tail";if(re(this,Jn)[p]&&s.matchBase&&u.length===1&&c!==vt&&c!=="")return"base";if(!(!re(this,Kn)||r[p]!==-1)){if(u.length===3&&c===vt&&h===vt&&v!==vt&&v!==""&&this.maxGlobstarRecursion>0)return"mid";if(u.length===2&&v===vt&&c!==vt&&c!=="")return"head"}}))}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let s of t)if(typeof s!="string")return!0;return!1}make(){let t=this.pattern,s=this.options;if(!s.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())];let i=this.globSet.map(r=>Fe(this,Ue,Qa).call(this,r));this.globParts=this.preprocess(i),ze(this,es,!0);let o=this.globParts.map((r,u,p)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=r[2]==="?"&&pr(r[3])?6:4,v=r[0]===""&&r[1]===""&&(r[2]==="?"||!kc.test(r[2]))&&r.slice(3,c).every(y=>!kc.test(y)),h=/^[a-z]:/i.test(r[0]);if(v)return[...r.slice(0,c).map(y=>Fe(this,Ue,fr).call(this,y)),...r.slice(c).map(y=>this.parse(y))];if(h)return[Fe(this,Ue,fr).call(this,r[0]),...r.slice(1).map(y=>this.parse(y))]}return r.map(c=>this.parse(c))});if(this.set=o.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r{for(let p=0;pi.length));for(let i=0;i{if(!(u[i]instanceof js||u[i]===Wa)||!Cv(this.globParts[p][i]))return;let c=[...this.globParts[p]];c[i]="";let v=`${u.length}/${c.join("/")}`,h=o.get(v);h?h.push(p):o.set(v,[p])});let r=new Set;for(let u of o.values()){if(u.length<2)continue;let[p,...c]=u,h=`@(${u.map(y=>this.globParts[y][i]).join("|")})`;this.globParts[p][i]=h,this.set[p][i]=this.parse(h);for(let y of c)r.add(y)}r.size&&(t=!0,this.set=this.set.filter((u,p)=>!r.has(p)),this.globParts=this.globParts.filter((u,p)=>!r.has(p)))}}}preprocess(t){if(this.options.noglobstar)for(let i of t)for(let o=0;o=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):s>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(s=>{let i=-1;for(;(i=s.indexOf("**",i+1))!==-1;){let o=i;for(;s[o+1]==="**";)o++;o!==i&&s.splice(i,o-i)}return s})}levelOneOptimize(t){return t.map(s=>{let i=Fe(this,Ue,Zs).call(this,s)+1;return s=s.reduce((o,r)=>{let u=o[o.length-1];return r==="**"&&u==="**"?o:r===".."&&o.length>i&&u&&u!==".."&&u!=="."&&u!=="**"?(o.pop(),o):(o.push(r),o)},[]),s.length===0?[""]:s})}firstPhasePreProcess(t){let{braceExpandMax:s=1e5}=this.options,i=!1;do{i=!1;for(let o of t){let r=-1;for(;(r=o.indexOf("**",r+1))!==-1;){let c=r;for(;o[c+1]==="**";)c++;c>r&&o.splice(r+1,c-r);let v=o[r+1],h=o[r+2],y=o[r+3];if(v!==".."||!h||h==="."||h===".."||!y||y==="."||y===".."||t.length>=s)continue;i=!0,o.splice(r,1);let g=o.slice(0);g[r]="**",t.push(g),r--}if(!this.preserveMultipleSlashes){for(let c=1;c1e3)return t;for(let s=0;ss.length)}partsMatch(t,s,i=!1){let o=0,r=0,u=[],p="";for(;o=0;v--)c=r[v];for(let v=0;v=0){let b=C;for(;b>0&&mr(t.charCodeAt(b-1),s);)b--;p=b===0?0:Ec(t,b-1,s)+1,u=t.slice(p,b)}let N=re(this,Yn)&&(Ka(o)||o===""&&u!==void 0&&Ka(u));i=N?-1:1,g=!N}let k=-1;if(g&&typeof y=="string"&&(k=Sc(y,o,r,u,p),k===-1))continue;if(re(this,Qo)){for(let C of re(this,Zo)[v])if(!t.includes(C))continue e}if(g&&typeof y=="object"&&(k=Sc(y,o,r,u,p),k===-1))continue;let w=re(this,xo)[v];if(w==="base"&&g)return"yes";if(w==="tail"&&g){if(re(this,Yn)&&Qs(t,0,k,!0,s))return"maybe";if(!Qs(t,0,k,c,s))return"yes";continue}if(w==="mid"||w==="head"){let C=Fe(this,Ue,Ac).call(this,t,h,w==="head",c,s);if(C!=="no")return C;continue}return"maybe"}return"no"},Dc=function(t,s,i){let o=!!this.options.dot,r=t.length;if(i==="head"){if(r<2||!Wn(s[0],t[0]))return!1;for(let p=1;pp&&u.testUnchecked(t.slice(p,c)))&&!Qs(t,v,t.length,o,r))return"yes";if(i||Qs(t,p,v,o,r))return"no";p=v}return"no"},Ic=function(t){let s=Ha;return s?.f===t&&s.isWindows===this.isWindows&&s.preserveMultipleSlashes===this.preserveMultipleSlashes&&s.normalize===re(this,On)?s:void 0},Oc=function(t){let{isWindows:s,preserveMultipleSlashes:i}=this,o=Fe(this,Ue,Qa).call(this,s?t.split("\\").join("/"):t),r=re(this,On);return r&&(o=o.map(u=>u.normalize(r))),Ha={f:t,isWindows:s,preserveMultipleSlashes:i,normalize:r,parts:o},Ha},Mc=function(t){let s=[...t],i=!1;do{if(i=!1,!this.preserveMultipleSlashes){for(let u=1;ut.length)return!1;let y=t.length-c.length;if(Fe(this,Ue,Xo).call(this,t,c,i,y,0))h=c.length;else{if(t[t.length-1]!==""||o+c.length===t.length||(y--,!Fe(this,Ue,Xo).call(this,t,c,i,y,0)))return!1;h=c.length+1}}if(!p.length){let y=!!h;for(let g=o;g{b[1]=w-C[T]});let N={head:v,body:h,tail:y,segments:g};return o[r]=N,N},Xa=function(t,s,i,o,r,u,p,c,v){let h=s[r];if(!h){if(u)return o>=i||o===i-1&&t[o]==="";for(let w=o;we.lastIndexOf(t)===s)}function xa(e){let t=(e||[]).filter(s=>typeof s=="string"&&s.length>0).map(s=>{let{negated:i,anchored:o,directoryOnly:r,body:u}=Sv(s);return{negated:i,directoryOnly:r,matcher:new ko(u,{dot:!0,nonegate:!0,nocomment:!0,matchBase:!o&&!u.includes("/")})}});return(s,i=!1)=>{let o=(s||"").replace(/^\/+/,"");if(!o)return!1;let r=o.split("/"),u=r.slice(0,-1).map((c,v)=>r.slice(0,v+1).join("/")),p=i;for(let c of t){if(c.negated?!p:p)continue;(c.directoryOnly?u:[...u,o]).some(h=>c.matcher.match(h))&&(p=!c.negated)}return p}}var cse=new Set("^$\\.*+?()[]{}|/dDsSwWbBnrtvf0cxupP".split(""));function el(e){let t=e.indexOf("=>");if(t<0)return{term:e,replacement:null};let s=e.slice(0,t).replace(/\s+$/,""),i=e.slice(t+2).replace(/^\s+/,"");return s?{term:s,replacement:i}:{term:e,replacement:null}}var Lc=new Set(["*","+","?","(",")","[","]","{","}","|","^","$"]);function _c(e){let t=[];return String(e||"").split(` `).forEach((s,i)=>{let{term:o}=el(s.trim());if(!o)return;let r=[];for(let u=0;u{let t=e.target;if(!t||t.tagName!=="IMG"||t.dataset.failed||!t.closest?.(".markdown-body, .anonymize-preview-body"))return;t.dataset.failed="1";let s=window.document.createElement("span"),i=parseInt(t.getAttribute("width"),10)||0,o=parseInt(t.getAttribute("height"),10)||0;s.className=i>=200||o>=120?"img-unavailable is-large":"img-unavailable",s.textContent="Image unavailable",s.title=t.alt?"Image unavailable: "+t.alt.replace(/\bXXXX-(\d+)\b/g,"[redacted term $1]"):"Image unavailable",s.setAttribute("role","img"),s.setAttribute("aria-label",s.title),t.replaceWith(s)},!0);function hr(e){let t=e?.data;if(typeof t=="string")try{t=JSON.parse(t)}catch{t=null}return typeof t?.error=="string"&&Object.prototype.hasOwnProperty.call(Xn.ERRORS,t.error)?t.error:e?.status===-1||e?.status===0?"request_error":[502,503,504].includes(e?.status)?"unreachable":"unknown_error"}var gr="XXXX",Nv=e=>{gr=e||"XXXX"},Rv=(e=gr)=>{if(!e)return null;let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(t+"(?:-\\d+)?","g")},Fc=(e,t=gr)=>{let s=Rv(t);if(!s||!e||!e.textContent.includes(t))return;let i=e.ownerDocument,o=i.createTreeWalker(e,NodeFilter.SHOW_TEXT),r=[];for(;o.nextNode();)r.push(o.currentNode);for(let u of r){let p=u.nodeValue,c=u.parentElement;if(!p.includes(t)||!c||c.closest("script, style, mark.redaction, .mermaid"))continue;let v=c.closest('code[class*="language-"]');if(v&&!v.contains(e))continue;let h=i.createDocumentFragment(),y=0;for(let g of p.matchAll(s)){h.append(p.slice(y,g.index));let k=i.createElement("mark");k.className="redaction",k.title="Redacted by Anonymous GitHub",k.textContent=g[0],h.append(k),y=g.index+g[0].length}h.append(p.slice(y)),u.replaceWith(h)}},ti=/\bXXXX-\d+\b/g,Fs=function(e){if(!e||e.indexOf("XXXX-")===-1||typeof window.DOMParser!="function")return e;let t=new window.DOMParser().parseFromString("
"+e+"
","text/html"),s=t.createTreeWalker(t.body,4),i=[];for(;s.nextNode();)ti.lastIndex=0,!s.currentNode.parentElement?.closest("pre code")&&ti.test(s.currentNode.nodeValue)&&i.push(s.currentNode);for(let o of i){ti.lastIndex=0;let r=t.createDocumentFragment(),u=0,p,c=o.nodeValue;for(;p=ti.exec(c);){r.appendChild(t.createTextNode(c.slice(u,p.index)));let v=t.createElement("mark");v.className="redact-chip",v.setAttribute("title","Redacted term "+p[0].slice(5)+" \u2014 the same term everywhere in this snapshot");let h=p[0].slice(5);v.textContent="";let y=t.createElement("i");y.textContent=h,v.appendChild(y),v.dataset.term=p[0],v.setAttribute("aria-label","Redacted term "+h);let g=/^[.,;:!?)\]]+/.exec(c.slice(p.index+p[0].length));if(g){let k=t.createElement("span");k.className="redact-glue",k.appendChild(v),k.appendChild(t.createTextNode(g[0])),r.appendChild(k),u=p.index+p[0].length+g[0].length}else r.appendChild(v),u=p.index+p[0].length}r.appendChild(t.createTextNode(c.slice(u))),o.parentNode.replaceChild(r,o)}return t.body.firstChild.innerHTML},Uc=()=>{window.Prism?.hooks&&!window.Prism.redactionHook&&(window.Prism.hooks.add("complete",e=>{Fc(e.element),e.element.querySelectorAll?.("mark.redaction").forEach(t=>{let s=/^XXXX-(\d+)$/.exec(t.textContent);if(!s)return;t.className="redact-chip",t.setAttribute("title","Redacted term "+s[1]+" \u2014 the same term everywhere in this snapshot"),t.setAttribute("aria-label","Redacted term "+s[1]),t.dataset.term=s[0],t.style.setProperty("--slot-ch",s[0].length+"ch"),t.textContent="";let i=t.ownerDocument.createElement("span");i.className="redact-src",i.textContent=s[0].slice(0,s[0].length-s[1].length),t.appendChild(i);let o=t.ownerDocument.createElement("i");o.textContent=s[1],t.appendChild(o)})}),window.Prism.redactionHook=!0)},Bc=(e,t=gr)=>{if(!e||!t||!e.includes(t))return e;let s=new DOMParser().parseFromString(""+e+"","text/html");return Fc(s.body,t),s.body.innerHTML};async function tl(e){if(window.navigator.clipboard?.writeText){await window.navigator.clipboard.writeText(e);return}let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0";let s=document.activeElement;document.body.appendChild(t);try{if(t.select(),!document.execCommand?.("copy"))throw Error("Copy unavailable")}finally{t.remove(),s?.focus()}}function Tv(e){if(!["ArrowLeft","ArrowRight","Home","End"].includes(e.key))return;let t=[...e.currentTarget.closest('[role="tablist"]').querySelectorAll('[role="tab"]')],s=t.indexOf(e.currentTarget),i=e.key==="Home"?0:e.key==="End"?t.length-1:(s+(e.key==="ArrowRight"?1:-1)+t.length)%t.length;e.preventDefault(),t[i]?.focus(),t[i]?.click()}var zc=function(e,t,s,i){e.previewTabKeydown=Tv,e.headerCanUpgrade=!1,e.headerShowSupport=!1,e.headerBillingPending=new URLSearchParams(window.location.search).get("billing")==="success";let o=N=>{e.headerShowSupport=!(N?.grants||[]).some(T=>["active","paid","past_due"].includes(T.status)&&new Date(T.until).getTime()>Date.now());let b=(N?.grants||[]).some(T=>["author_monthly","author_annual"].includes(T.planId)&&["active","paid","past_due"].includes(T.status)&&new Date(T.until).getTime()>Date.now());e.headerCanUpgrade=!!N?.enabled&&N.checkoutEnabled!==!1&&!b&&(N.plans||[]).some(T=>["author_monthly","author_annual"].includes(T.id))};e.on("billing:updated",(N,b)=>o(b)),e.on("billing:pending",(N,b)=>{e.headerBillingPending=b}),e.openHeaderUpgrade=()=>{s.path()==="/profile"?e.emit("settings:upgrade"):s.url("/profile?upgrade=1")};let r=Bt(),u=bt(),p=!1,c=()=>{p=!1;let N=document.querySelector("nav.navbar.navbar-expand-lg");if(!N||(N.classList.remove("nav-fit-1","nav-fit-2"),window.innerWidth<992))return;let b=N.querySelector(".navbar-collapse"),T=()=>N.scrollWidth>N.clientWidth+1||!!b&&b.scrollWidth>b.clientWidth+1;T()&&N.classList.add("nav-fit-1"),T()&&N.classList.add("nav-fit-2")},v=()=>{p||(p=!0,We(()=>u.timeout(c,0)))};r(window,"resize",v),e.on("routeChange",v),e.on("billing:updated",v),document.fonts?.ready&&document.fonts.ready.then(v).catch(()=>{}),e.title="Main",e.user={status:"connection"},e.site_options,e.toasts=[],e.removeToast=function(N){let b=e.toasts.indexOf(N);b!==-1&&e.toasts.splice(b,1)},e.addToast=function(N){return e.toasts.push(N),i(function(){e.removeToast(N)},8e3),N};let h=/^\/(r|repository|pr|gist)\//;e.path=s.url(),e.paths=s.path().substring(1).split("/"),e.isReviewerRoute=h.test(s.path()),e.darkMode=function(N){localStorage.setItem("darkMode",N),e.isDarkMode=N;let b="/css/prism.css";if($("link[href='/css/prism-okaidia.css']").remove(),N)$("body").addClass("dark-mode"),$(`link[href='${b}']`).remove();else if($("body").removeClass("dark-mode"),!document.querySelector(`link[href='${b}']`)){let T=document.createElement("link");T.href=b,T.rel="stylesheet",document.head.append(T)}e.emit("dark-mode",N)},e.darkMode(localStorage.getItem("darkMode")=="true"),e.emailPromptOpen=!1,e.emailPromptAddress="",e.emailPromptBusy=!1,e.emailPromptError="";let y;e.respondToEmailPrompt=async N=>{if(!e.emailPromptBusy){e.emailPromptBusy=!0,e.emailPromptError="";try{let b=await t.post("/github/connections/email",{action:N,email:e.emailPromptAddress},{headers:{"X-CSRF-Token":e.user.emailPromptCSRF}});N==="save"&&(e.user.notificationEmail=b.data.notificationEmail),e.emailPromptOpen=!1,e.user.showEmailPrompt=!1,y?.focus()}catch(b){e.emailPromptError=b.data?.error||"Unable to save your preference. Please try again."}finally{e.emailPromptBusy=!1}}};function g(){t.get("/api/user").then(N=>{N&&(e.user=N.data),v(),e.user?.username?Zi(t).then(b=>o(b.data)).catch(()=>{}):e.headerShowSupport=!0,e.user?.emailNotificationsEnabled&&e.user.showEmailPrompt&&!e.user.notificationEmail&&(y=document.activeElement,e.emailPromptOpen=!0,i(()=>{let b=document.getElementById("email-prompt");b?.showModal?b.showModal():b?.setAttribute("open",""),document.getElementById("email-prompt-address")?.focus()},0))},()=>{e.user=null,e.headerShowSupport=!0})}g();function k(){t.get("/api/options").then(N=>{N&&(e.site_options=N.data),Nv(N?.data?.ANONYMIZATION_MASK),e.emit("site-options")},()=>{e.site_options=null})}k();function w(){t.get("/api/message").then(N=>{N&&(e.generalMessage=N.data)},()=>{e.generalMessage=null})}w();function C(N,b){b&&(e.title=b.title),e.path=s.url(),e.paths=s.path().substring(1).split("/"),e.isReviewerRoute=h.test(s.path())}e.on("routeChange",C),e.on("routeUpdate",C)},Hc=function(e,t){let s=Bt(),i=bt();e.faqQuery="",e.faqResults=0;let o=u=>(u||"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ");e.filterFaq=()=>{let u=o(e.faqQuery).trim().split(" ").filter(Boolean),p=0;document.querySelectorAll(".faq-section .panel-group").forEach(c=>{let v=0;c.querySelectorAll(":scope > .panel").forEach(g=>{let k=g.dataset.faqText||(g.dataset.faqText=o(g.textContent)),w=u.every(C=>k.includes(C));g.classList.toggle("faq-hit",u.length>0&&w),g.hidden=u.length>0&&!w,w&&v++});let h=u.length>0&&v===0;c.hidden=h;let y=c.previousElementSibling;y?.classList.contains("faq-cat")&&(y.hidden=h),p+=v}),e.faqResults=u.length?p:0},e.clearFaqSearch=()=>{e.faqQuery="",e.filterFaq(),document.getElementById("faq-search-input")?.focus()};let r=()=>{let u=window.location.hash.slice(1),p=document.getElementById(u);if(!p?.classList.contains("panel-collapse"))return;$(p).collapse("show");let c=document.getElementById(p.getAttribute("aria-labelledby"));c?.setAttribute("tabindex","-1"),c?.focus({preventScroll:!0}),c?.scrollIntoView?.({block:"start"})};e.on("routeUpdate",()=>i.timeout(r,0)),s(window,"hashchange",r),i.timeout(r,0)},jc=function(e,t,s,i,o){e.settingsTab=/(?:billing|upgrade)=/.test(window.location.search)?"billing":"defaults",e.confirmDeleteAccount=!1,e.deleteUsername="",e.profilePastSubscription=()=>!e.profileAuthorGrant()&&(e.billing?.grants||[]).some(h=>["author_monthly","author_annual"].includes(h.planId)),e.showAuthorPlans=new URLSearchParams(window.location.search).get("upgrade")==="1",e.showRepositoryPass=!1,e.profilePlan="author_annual",e.openProfileUpgrade=()=>{e.settingsTab="billing",e.showAuthorPlans=!0,We(()=>document.getElementById("settings-plan-comparison")?.focus())},e.on("settings:upgrade",()=>e.openProfileUpgrade()),e.profileAuthorPlans=()=>(e.billing?.plans||[]).filter(h=>["author_monthly","author_annual"].includes(h.id)),e.profileSelectedPlan=()=>e.profileAuthorPlans().find(h=>h.id===e.profilePlan)||e.profileAuthorPlans()[0],e.profilePassPlan=()=>(e.billing?.plans||[]).find(h=>h.id==="author_pass"),e.profileAddonPlans=()=>(e.billing?.plans||[]).filter(h=>Qi(h.id)).sort((h,y)=>+(y.id==="repo_pack")-+(h.id==="repo_pack")),e.profileAddonId="repo_pack",e.profilePackPlan=()=>(e.billing?.plans||[]).find(h=>h.id==="repo_pack"),e.profileSlotPlan=()=>(e.billing?.plans||[]).find(h=>h.id==="repo_slot"),e.profileRepositories=()=>(e.billing?.repositories||[]).filter(h=>h.status!=="removed"),e.openProfileAddon=h=>{h&&(e.profileAddonId=h),e.showRepositoryPass=!0,e.billingRepository="",We(()=>{let y=document.getElementById("settings-addons-title");y?.scrollIntoView?.({block:"nearest",behavior:"smooth"}),y?.focus?.({preventScroll:!0})})};let r=["repo_slot","author_pass","repo_extend","repo_never"];e.profileSingleAddons=()=>e.profileAddonPlans().filter(h=>h.id!=="repo_pack").sort((h,y)=>r.indexOf(h.id)-r.indexOf(y.id)),e.profileSingleId="repo_slot",e.profileSingleAddon=()=>e.profileSingleAddons().find(h=>h.id===e.profileSingleId)||e.profileSingleAddons()[0],e.profileCheapestAddon=()=>[...e.profileSingleAddons()].sort((h,y)=>(h.amount??1/0)-(y.amount??1/0))[0],e.profileAuthorPlansByValue=()=>[...e.profileAuthorPlans()].sort((h,y)=>+(h.interval==="year")-+(y.interval==="year")),e.profilePackSummary=h=>h.parts.map(y=>y.planId==="repo_slot"?"Extra repository":`${e.profileGrantName(y)} until ${e.billingDate(y.until)}`).join(" \xB7 "),e.profileAddonFeatures=h=>({repo_pack:["One more repository, outside your free ones",`Its own ${e.billingBytes(e.profileSlotPlan()?.storage||e.profilePassPlan()?.storage)} of storage`,"Automatic updates for 180 days","Online for up to a year","No subscription"],repo_slot:["One more repository, outside your free ones",`Its own ${e.billingBytes(e.profileSlotPlan()?.storage)} of storage`,"Valid while the repository exists","Refresh it by hand"],author_pass:["Automatic updates for 180 days",`Its own ${e.billingBytes(e.profilePassPlan()?.storage)} of storage`,"No subscription"],repo_extend:["Online for up to one more year","Buy again to add another year","No subscription"],repo_never:["The link never expires","No subscription","Ends only if the payment is refunded"]})[h]||[],e.profileAddonBlurb=h=>({repo_slot:"One more repository",author_pass:"Auto-updates for 180 days",repo_extend:"Online one more year",repo_never:"The link never expires"})[h]||"",e.profileAuthorPurchase=()=>(e.billing?.purchases||[]).find(h=>h.recurring&&["active","overdue"].includes(h.status)),e.profileRepositoryExpiry=h=>h.status==="expired"?"expired":h.expirationMode==="never"?"never expires":h.expirationDate?"expires "+e.billingDate(h.expirationDate):"no date",e.profileAnnualSavings=()=>{let h=e.profileAuthorPlans().find(g=>g.interval==="month")?.amount,y=e.profileAuthorPlans().find(g=>g.interval==="year")?.amount;return h&&y&&y(e.billing?.purchases||[]).filter(y=>["active","overdue"].includes(y.status)===h),e.profilePurchaseStatus=h=>({active:"Active",overdue:"Payment overdue",ended:"Ended",refunded:"Refunded",disputed:"Disputed"})[h.status]||h.status,e.profilePurchaseTerm=h=>{let y=h.status&&!["active","overdue"].includes(h.status);if(h.recurring)return y?h.until?"Ended "+e.billingDate(h.until):"":(h.cancelAtPeriodEnd?"Ends ":"Renews ")+e.billingDate(h.until);if(h.planId==="repo_pack"){let g=h.parts.map(k=>k.until).filter(Boolean).map(k=>new Date(k).getTime());return y||!g.length?"":"Until "+e.billingDate(new Date(Math.max(...g)))}return h.until?(y||new Date(h.until).getTime()e.profileAddonPlans().find(h=>h.id===e.profileAddonId)||e.profileAddonPlans()[0],e.profileAuthorGrant=()=>(e.billing?.grants||[]).find(h=>["author_monthly","author_annual"].includes(h.planId)&&["active","paid","past_due"].includes(h.status)&&new Date(h.until).getTime()>Date.now()),e.profileConferencePlan=()=>(e.billing?.plans||[]).filter(h=>["conference_workshop","conference","conference_large"].includes(h.id)&&h.amount!=null).sort((h,y)=>h.amount-y.amount)[0],e.profileGrantName=h=>({author_monthly:"Author monthly",author_annual:"Author annual",author_pass:"Live updates",repo_extend:"Extended expiration",repo_never:"Never expire",repo_slot:"Extra repository",repo_pack:"Paper pack",conference:"Conference package",conference_workshop:"Workshop package",conference_large:"Large conference package"})[h.planId]||h.planId,xi(e,t,()=>o.load().then(h=>{e.quota=h},console.error),{portalMessage:()=>{let h=e.profileAuthorGrant();return h?h.cancelAtPeriodEnd?`Renewal cancelled. Your access continues until ${e.billingDate(h.until)}.`:`Your subscription renews on ${e.billingDate(h.until)}.`:"Your billing details are up to date."}}),e.terms="",e.options={expirationMode:"remove",update:!1,image:!0,pdf:!0,notebook:!0,loc:!0,link:!0},e.saving=!1,e.message=null,e.error=null,e.accountEmail="",e.emailLoading=!0,e.emailCSRFReady=!1,e.emailSaving=!1,e.emailSaved=!1,e.emailError="";let u="";e.loadAccountEmail=async()=>{e.emailLoading=!0,e.emailError="";try{let h=await t.get("/github/connections/email");e.accountEmail=h.data.notificationEmail||"",u=h.data.csrf,e.emailCSRFReady=!!u}catch{e.emailError="Unable to load your email address. Please try again."}finally{e.emailLoading=!1}},e.saveAccountEmail=async()=>{if(!(e.emailSaving||e.emailLoading||!u)){e.emailSaving=!0,e.emailSaved=!1,e.emailError="";try{let h=await t.post("/github/connections/email",{email:e.accountEmail},{headers:{"X-CSRF-Token":u}});e.accountEmail=h.data.notificationEmail,e.user&&(e.user.notificationEmail=h.data.notificationEmail),e.emailSaved=!0}catch{e.emailError="Unable to save your email address. Check the address and try again."}finally{e.emailSaving=!1}}},e.loadAccountEmail(),o.load().then(h=>{e.quota=h},console.error);let p=Ea(e,["terms","options"],"profile");e.discardDraft=()=>p.discard();function c(){t.get("/api/user/default").then(h=>{let y=h.data||{};y.terms&&(e.terms=y.terms.join(` +`)}var Xn={VIEWER_ERRORS:{title:"Content could not be loaded",access_title:"GitHub access needs attention",reader_help:"Reading this repository? You do not need to sign in. Try again after the owner restores access, or let them know this anonymous link is unavailable.",owner_help:"Own this repository? If your GitHub account was suspended or recently recovered, sign in to Anonymous GitHub again and check the GitHub connection and repository permissions in your dashboard. Then retry this page. Keep the existing anonymous URL; do not delete the repository to restore access.",retry:"Try again",dashboard:"Open owner dashboard"},ERRORS:{cache_busy:"Downloads are busy. Please try again shortly.",cache_miss:"This file is not cached yet. Please try again.",invalid_sort:"The selected sort order is invalid.",invalid_cursor:"This project page is no longer valid. Reload the list.",repository_changed:"The repository changed while processing. Please retry.",repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"We could not load this content. Try again. If it still fails, contact support with the anonymous URL and the time of the error.",unreachable:"The service could not complete this request. Wait a moment and try again.",request_error:"The connection was interrupted. Check your internet connection and try again.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"Anonymous GitHub cannot access the source repository on GitHub. It may be private, unavailable, or require the owner to reconnect GitHub.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_not_ready:"This pull request is still being prepared. Please try again shortly.",pull_request_not_available:"This pull request is currently not available.",invalid_pullRequestId:"The pull request ID is invalid.",pullRequestId_already_used:"This pull request ID is already in use. Please choose a different one.",repository_not_specified:"A repository must be specified for this pull request.",pullRequestId_not_specified:"A pull request ID must be specified.",pullRequestId_is_not_a_number:"The source pull request ID must be a number.",options_not_provided:"Anonymization options are mandatory.",terms_not_specified:"Anonymization terms must be specified.",invalid_terms_format:"Terms are in an invalid format.",invalid_preserve_files_format:"Unredacted files must be repository paths or patterns, at most 200 of them.",missing_content:"No content was provided to the anonymization preview.",unable_to_anonymize:"An error happened during the anonymization process. Please try later or report the issue.",non_supported_mode:"The selected anonymization mode is invalid, only download and stream are supported.",invalid_path:"The provided path is invalid or missing.",path_not_specified:"A file path must be specified.",path_not_defined:"The file path has not been resolved yet.",zip_unsafe_entry_path:"This repository contains a filename that cannot be safely included in a ZIP archive. Rename filenames containing backslashes or unsafe path components in the source repository and update the anonymization.",invalid_file_path:"The requested file path is not valid.",invalid_request:"The request is missing required fields or is malformed.",invalid_project_name:"Use a project name of up to 100 characters without line breaks or control characters.",no_file_selected:"Please select a file.",submodule_not_available:"This public submodule file is no longer available at its recorded commit.",file_not_found:"The requested file is not found.",file_not_accessible:"The requested file is not accessible.",file_not_supported:"The file type is not supported. Anonymous GitHub cannot handle it.",repository_tree_too_large:"The repository has too many pending folders to process safely. Share a smaller repository.",file_listing_too_large:"This folder has too many entries to list. Open a more specific folder or use file search.",file_too_big:"The file size exceeds the limit of Anonymous GitHub.",is_folder:"The path points to a folder.",folder_not_supported:"The path points to a folder. Please select a file.",unable_to_write_file:"Unable to write file on disk.",download_not_enabled:"Repository downloads are not enabled on this server.",unable_to_download:"The repository could not be downloaded. Please try again later.",s3_config_not_provided:"Object storage has not been configured on this server.",stats_unsupported:"Statistics are only supported in download mode.",branches_not_found:"The requested branch is not found.",readme_not_available:"No README for the repository is found.",page_not_supported_on_different_branch:"GitHub Pages is served from a different branch than the one selected. Pick the branch that GitHub Pages is configured to use.",page_not_activated:"GitHub Pages is not enabled on this repository. Enable it in the repository settings on GitHub before anonymizing.",is_removed:"This resource has been removed. If you own it, open My work and select Removed to review its settings and available recovery options.",conf_name_missing:"A conference name is required.",conf_id_missing:"A conference ID is required.",conf_id_used:"This conference ID is already in use. Please choose a different one.",conf_start_date_missing:"A start date is required for the conference.",conf_end_date_missing:"An end date is required for the conference.",conf_start_date_invalid:"The start date must be before the end date.",conf_end_date_invalid:"The end date must be in the future.",invalid_plan:"The selected plan is not valid.",conference_not_found:"The requested conference could not be found.",conf_not_found:"The requested conference could not be found.",conf_not_activated:"The conference is not activated.",conference_payment_required:"This conference's review package is full or not paid. Ask the organizer, or host the repository yourself.",billing_plan_change_not_supported:"This conference plan cannot be changed.",billing_invalid_review_window:"Conference packages cover up to 180 days and must end in the future. Check the review dates.",billing_missing:"Billing information is required for this plan.",billing_name_missing:"A billing name is required.",billing_email_missing:"A billing email is required.",billing_address_missing:"A billing address is required.",billing_city_missing:"A billing city is required.",billing_zip_missing:"A billing ZIP/postal code is required.",billing_country_missing:"A billing country is required.",queue_not_found:"The specified queue could not be found.",job_not_found:"The specified job could not be found in the queue.",error_retrying_job:"An error occurred while retrying the job.",gist_expired:"The gist is expired.",gist_not_ready:"Anonymous GitHub is still processing the gist, it can take several minutes.",gist_not_found:"The requested gist could not be found.",gist_not_available:"This gist is currently not available.",invalid_gistId:"The format of the gist ID is invalid.",gistId_not_specified:"A gist ID must be provided.",gistId_already_used:"The gist ID is already used.",missing_token:"An authentication token is required.",token_attempts_rate_limited:"Too many token authentication attempts. Wait before trying again.",refresh_rate_limited:"A refresh was already requested for this repository. Wait one minute before trying again.",session_required:"Sign in through your browser to manage maintenance tokens.",invalid_token_options:"Provide a token name, 1 to 20 repository IDs, and an expiration of 1 to 90 days.",token_limit_reached:"You have reached the limit of 50 API tokens. Revoke an unused token before creating another.",invalid_token_id:"The token ID is invalid.",invalid_settings:"Provide supported settings with boolean values, or a list of anonymization terms.",token_scope_forbidden:"This token does not allow this operation or repository.",authentication_unavailable:"Authentication is temporarily unavailable. Try again later.",invalid_token:"The provided authentication token is invalid.",login_failed:"Login failed. Please try again.",server_error:"An unexpected server error occurred. Please try again later.",username_not_defined:"A username must be provided.",github_user_not_found:"The specified GitHub user could not be found.",cannot_coauthor_self:"You cannot add yourself as a co-author.",storage_write_size_mismatch:"The downloaded file was smaller than expected. The upstream source may have returned an incomplete response \u2014 please try again.",storage_read_error:"An error occurred while reading the file from storage \u2014 please try again.",upstream_error:"A temporary error occurred while fetching from GitHub \u2014 please try again.",streamer_upstream_error:"The file server received an unexpected response \u2014 please try again.",streamer_unreachable:"The file server is temporarily unreachable \u2014 please try again.",token_expired:"The repository owner needs to renew their GitHub connection before this content can be loaded.",job_is_active:"This job is currently running \u2014 wait for it to finish or remove it first.",github_app_access_required:"Allow this repository on GitHub using the read-only access button, then retry. Organization access may require administrator approval.",github_app_reconnect_required:"Reconnect your GitHub App account to restore read-only access.",github_app_disabled:"New GitHub App connections are currently unavailable.",github_oauth_required:"Connect legacy GitHub OAuth to use this feature.",github_identity_mismatch:"Use the same GitHub account that you are signed in with here.",github_app_permissions_invalid:"The GitHub App must be configured with read-only permissions.",github_unavailable:"GitHub is temporarily unavailable. Please retry.",connection_changed:"The repository connection changed. Reload and try again.",repository_busy:"Wait for the repository operation to finish before changing its connection.",invalid_connection:"Select a supported GitHub connection.",github_oauth_disabled:"Legacy OAuth sign-in is currently disabled.",invalid_auth_state:"The authorization session expired. Please start again from Anonymous GitHub.",invalid_webhook_signature:"The webhook signature is invalid.",webhook_processing_failed:"Webhook processing failed. Retry the delivery.",github_app_authorization_cancelled:"GitHub authorization was cancelled.",github_account_link_required:"Verify your existing account with your previous GitHub connection. Future sign-ins will use the GitHub App.",github_app_refresh_busy:"GitHub credentials are being renewed. Please retry shortly.",github_grant_revocation_failed:"Unable to revoke the GitHub grant. Please retry.",another_login_required:"Connect and verify another sign-in method before disconnecting OAuth.",oauth_resources_remaining:"Some resources still require OAuth. Migrate or remove them before disconnecting.",invalid_github_path:"The GitHub repository path is invalid.",repository_tree_incomplete:"The repository file tree is incomplete. Reduce its size and refresh before downloading.",billing_environment_mismatch:"The payment event does not match this billing environment.",billing_unavailable:"Payments are not available. Please try again later.",invalid_billing_signature:"The payment notification could not be verified.",billing_webhook_failed:"The payment notification could not be processed.",billing_customer_not_found:"No billing account was found.",subscription_required_for_never_expiration:"Never-expiring repositories require the owner\u2019s active monthly or annual author subscription. Choose a dated expiration or upgrade in Plans and billing.",invalid_billing_expiration:"Choose an earlier expiration date. Free repositories can be scheduled 5 months ahead. Buy Extended expiration or Never expire for this repository in Plans and billing to keep it longer.",quota_exceeded:"This repository exceeds the hosting allowance. Check repository and storage usage in your account, then retry.",quota_repository_limit:"The repository-count limit for this hosting allowance has been reached. Remove a repository you no longer need or choose a plan with more capacity.",quota_storage_limit:"This repository would exceed the total source-file storage allowance. Updating an existing repository can increase storage usage. Reduce the source size, remove unused repositories, or choose a plan with more storage.",expiration_limit_reached:"This repository is already at its latest allowed expiration date. Buy Extended expiration or Never expire for it in Plans and billing to keep it longer.",pending_payment:"Awaiting payment"},WARNINGS:{page_not_enabled_on_repo:"GitHub Pages is not enabled on this repository. Enable it in the repository's Settings \u2192 Pages on GitHub, then refresh.",page_branch_mismatch:"GitHub Pages on this repository is served from the '{{pageBranch}}' branch, but you selected '{{selectedBranch}}'. Switch the branch above to '{{pageBranch}}' to anonymize the Pages site.",folder_truncated:"This folder has more than 10,000 entries; only a partial listing is shown.",repo_truncated:"Some folders in this repository have too many files to be fully listed. Affected folders are marked with a warning icon.",submodules_not_included:"Some submodule contents could not be included. Only direct public GitHub submodules within the size limits are supported. Private, external, nested, or unavailable submodules appear as empty folders."},VIEWER_LOADING:{loading:"Loading file\u2026",receiving:"Receiving file\u2026",slow:"Still loading. You can select another file while you wait."}};typeof window<"u"&&window.document?.addEventListener&&window.document.addEventListener("error",e=>{let t=e.target;if(!t||t.tagName!=="IMG"||t.dataset.failed||!t.closest?.(".markdown-body, .anonymize-preview-body"))return;t.dataset.failed="1";let s=window.document.createElement("span"),i=parseInt(t.getAttribute("width"),10)||0,o=parseInt(t.getAttribute("height"),10)||0;s.className=i>=200||o>=120?"img-unavailable is-large":"img-unavailable",s.textContent="Image unavailable",s.title=t.alt?"Image unavailable: "+t.alt.replace(/\bXXXX-(\d+)\b/g,"[redacted term $1]"):"Image unavailable",s.setAttribute("role","img"),s.setAttribute("aria-label",s.title),t.replaceWith(s)},!0);function hr(e){let t=e?.data;if(typeof t=="string")try{t=JSON.parse(t)}catch{t=null}return typeof t?.error=="string"&&Object.prototype.hasOwnProperty.call(Xn.ERRORS,t.error)?t.error:e?.status===-1||e?.status===0?"request_error":[502,503,504].includes(e?.status)?"unreachable":"unknown_error"}var gr="XXXX",Nv=e=>{gr=e||"XXXX"},Rv=(e=gr)=>{if(!e)return null;let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(t+"(?:-\\d+)?","g")},Fc=(e,t=gr)=>{let s=Rv(t);if(!s||!e||!e.textContent.includes(t))return;let i=e.ownerDocument,o=i.createTreeWalker(e,NodeFilter.SHOW_TEXT),r=[];for(;o.nextNode();)r.push(o.currentNode);for(let u of r){let p=u.nodeValue,c=u.parentElement;if(!p.includes(t)||!c||c.closest("script, style, mark.redaction, .mermaid"))continue;let v=c.closest('code[class*="language-"]');if(v&&!v.contains(e))continue;let h=i.createDocumentFragment(),y=0;for(let g of p.matchAll(s)){h.append(p.slice(y,g.index));let k=i.createElement("mark");k.className="redaction",k.title="Redacted by Anonymous GitHub",k.textContent=g[0],h.append(k),y=g.index+g[0].length}h.append(p.slice(y)),u.replaceWith(h)}},ti=/\bXXXX-\d+\b/g,Fs=function(e){if(!e||e.indexOf("XXXX-")===-1||typeof window.DOMParser!="function")return e;let t=new window.DOMParser().parseFromString("
"+e+"
","text/html"),s=t.createTreeWalker(t.body,4),i=[];for(;s.nextNode();)ti.lastIndex=0,!s.currentNode.parentElement?.closest("pre code")&&ti.test(s.currentNode.nodeValue)&&i.push(s.currentNode);for(let o of i){ti.lastIndex=0;let r=t.createDocumentFragment(),u=0,p,c=o.nodeValue;for(;p=ti.exec(c);){r.appendChild(t.createTextNode(c.slice(u,p.index)));let v=t.createElement("mark");v.className="redact-chip",v.setAttribute("title","Redacted term "+p[0].slice(5)+" \u2014 the same term everywhere in this snapshot");let h=p[0].slice(5);v.textContent="";let y=t.createElement("i");y.textContent=h,v.appendChild(y),v.dataset.term=p[0],v.setAttribute("aria-label","Redacted term "+h);let g=/^[.,;:!?)\]]+/.exec(c.slice(p.index+p[0].length));if(g){let k=t.createElement("span");k.className="redact-glue",k.appendChild(v),k.appendChild(t.createTextNode(g[0])),r.appendChild(k),u=p.index+p[0].length+g[0].length}else r.appendChild(v),u=p.index+p[0].length}r.appendChild(t.createTextNode(c.slice(u))),o.parentNode.replaceChild(r,o)}return t.body.firstChild.innerHTML},Uc=()=>{window.Prism?.hooks&&!window.Prism.redactionHook&&(window.Prism.hooks.add("complete",e=>{Fc(e.element),e.element.querySelectorAll?.("mark.redaction").forEach(t=>{let s=/^XXXX-(\d+)$/.exec(t.textContent);if(!s)return;t.className="redact-chip",t.setAttribute("title","Redacted term "+s[1]+" \u2014 the same term everywhere in this snapshot"),t.setAttribute("aria-label","Redacted term "+s[1]),t.dataset.term=s[0],t.style.setProperty("--slot-ch",s[0].length+"ch"),t.textContent="";let i=t.ownerDocument.createElement("span");i.className="redact-src",i.textContent=s[0].slice(0,s[0].length-s[1].length),t.appendChild(i);let o=t.ownerDocument.createElement("i");o.textContent=s[1],t.appendChild(o)})}),window.Prism.redactionHook=!0)},Bc=(e,t=gr)=>{if(!e||!t||!e.includes(t))return e;let s=new DOMParser().parseFromString(""+e+"","text/html");return Fc(s.body,t),s.body.innerHTML};async function tl(e){if(window.navigator.clipboard?.writeText){await window.navigator.clipboard.writeText(e);return}let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0";let s=document.activeElement;document.body.appendChild(t);try{if(t.select(),!document.execCommand?.("copy"))throw Error("Copy unavailable")}finally{t.remove(),s?.focus()}}function Tv(e){if(!["ArrowLeft","ArrowRight","Home","End"].includes(e.key))return;let t=[...e.currentTarget.closest('[role="tablist"]').querySelectorAll('[role="tab"]')],s=t.indexOf(e.currentTarget),i=e.key==="Home"?0:e.key==="End"?t.length-1:(s+(e.key==="ArrowRight"?1:-1)+t.length)%t.length;e.preventDefault(),t[i]?.focus(),t[i]?.click()}var zc=function(e,t,s,i){e.previewTabKeydown=Tv,e.headerCanUpgrade=!1,e.headerShowSupport=!1,e.headerBillingPending=new URLSearchParams(window.location.search).get("billing")==="success";let o=N=>{e.headerShowSupport=!(N?.grants||[]).some(T=>["active","paid","past_due"].includes(T.status)&&new Date(T.until).getTime()>Date.now());let b=(N?.grants||[]).some(T=>["author_monthly","author_annual"].includes(T.planId)&&["active","paid","past_due"].includes(T.status)&&new Date(T.until).getTime()>Date.now());e.headerCanUpgrade=!!N?.enabled&&N.checkoutEnabled!==!1&&!b&&(N.plans||[]).some(T=>["author_monthly","author_annual"].includes(T.id))};e.on("billing:updated",(N,b)=>o(b)),e.on("billing:pending",(N,b)=>{e.headerBillingPending=b}),e.openHeaderUpgrade=()=>{s.path()==="/profile"?e.emit("settings:upgrade"):s.url("/profile?upgrade=1")};let r=Bt(),u=bt(),p=!1,c=()=>{p=!1;let N=document.querySelector("nav.navbar.navbar-expand-lg");if(!N||(N.classList.remove("nav-fit-1","nav-fit-2"),window.innerWidth<992))return;let b=N.querySelector(".navbar-collapse"),T=()=>N.scrollWidth>N.clientWidth+1||!!b&&b.scrollWidth>b.clientWidth+1;T()&&N.classList.add("nav-fit-1"),T()&&N.classList.add("nav-fit-2")},v=()=>{p||(p=!0,We(()=>u.timeout(c,0)))};r(window,"resize",v),e.on("routeChange",v),e.on("billing:updated",v),document.fonts?.ready&&document.fonts.ready.then(v).catch(()=>{}),e.title="Main",e.user={status:"connection"},e.site_options,e.toasts=[],e.removeToast=function(N){let b=e.toasts.indexOf(N);b!==-1&&e.toasts.splice(b,1)},e.addToast=function(N){return e.toasts.push(N),i(function(){e.removeToast(N)},8e3),N};let h=/^\/(r|repository|pr|gist)\//;e.path=s.url(),e.paths=s.path().substring(1).split("/"),e.isReviewerRoute=h.test(s.path()),e.darkMode=function(N){localStorage.setItem("darkMode",N),e.isDarkMode=N;let b="/css/prism.css";if($("link[href='/css/prism-okaidia.css']").remove(),N)$("body").addClass("dark-mode"),$(`link[href='${b}']`).remove();else if($("body").removeClass("dark-mode"),!document.querySelector(`link[href='${b}']`)){let T=document.createElement("link");T.href=b,T.rel="stylesheet",document.head.append(T)}e.emit("dark-mode",N)},e.darkMode(localStorage.getItem("darkMode")=="true"),e.emailPromptOpen=!1,e.emailPromptAddress="",e.emailPromptBusy=!1,e.emailPromptError="";let y;e.respondToEmailPrompt=async N=>{if(!e.emailPromptBusy){e.emailPromptBusy=!0,e.emailPromptError="";try{let b=await t.post("/github/connections/email",{action:N,email:e.emailPromptAddress},{headers:{"X-CSRF-Token":e.user.emailPromptCSRF}});N==="save"&&(e.user.notificationEmail=b.data.notificationEmail),e.emailPromptOpen=!1,e.user.showEmailPrompt=!1,y?.focus()}catch(b){e.emailPromptError=b.data?.error||"Unable to save your preference. Please try again."}finally{e.emailPromptBusy=!1}}};function g(){t.get("/api/user").then(N=>{N&&(e.user=N.data),v(),e.user?.username?Zi(t).then(b=>o(b.data)).catch(()=>{}):e.headerShowSupport=!0,e.user?.emailNotificationsEnabled&&e.user.showEmailPrompt&&!e.user.notificationEmail&&(y=document.activeElement,e.emailPromptOpen=!0,i(()=>{let b=document.getElementById("email-prompt");b?.showModal?b.showModal():b?.setAttribute("open",""),document.getElementById("email-prompt-address")?.focus()},0))},()=>{e.user=null,e.headerShowSupport=!0})}g();function k(){t.get("/api/options").then(N=>{N&&(e.site_options=N.data),Nv(N?.data?.ANONYMIZATION_MASK),e.emit("site-options")},()=>{e.site_options=null})}k();function w(){t.get("/api/message").then(N=>{N&&(e.generalMessage=N.data)},()=>{e.generalMessage=null})}w();function C(N,b){b&&(e.title=b.title),e.path=s.url(),e.paths=s.path().substring(1).split("/"),e.isReviewerRoute=h.test(s.path())}e.on("routeChange",C),e.on("routeUpdate",C)},Hc=function(e,t){let s=Bt(),i=bt();e.faqQuery="",e.faqResults=0;let o=u=>(u||"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ");e.filterFaq=()=>{let u=o(e.faqQuery).trim().split(" ").filter(Boolean),p=0;document.querySelectorAll(".faq-section .panel-group").forEach(c=>{let v=0;c.querySelectorAll(":scope > .panel").forEach(g=>{let k=g.dataset.faqText||(g.dataset.faqText=o(g.textContent)),w=u.every(C=>k.includes(C));g.classList.toggle("faq-hit",u.length>0&&w),g.hidden=u.length>0&&!w,w&&v++});let h=u.length>0&&v===0;c.hidden=h;let y=c.previousElementSibling;y?.classList.contains("faq-cat")&&(y.hidden=h),p+=v}),e.faqResults=u.length?p:0},e.clearFaqSearch=()=>{e.faqQuery="",e.filterFaq(),document.getElementById("faq-search-input")?.focus()};let r=()=>{let u=window.location.hash.slice(1),p=document.getElementById(u);if(!p?.classList.contains("panel-collapse"))return;$(p).collapse("show");let c=document.getElementById(p.getAttribute("aria-labelledby"));c?.setAttribute("tabindex","-1"),c?.focus({preventScroll:!0}),c?.scrollIntoView?.({block:"start"})};e.on("routeUpdate",()=>i.timeout(r,0)),s(window,"hashchange",r),i.timeout(r,0)},jc=function(e,t,s,i,o){e.settingsTab=/(?:billing|upgrade)=/.test(window.location.search)?"billing":"defaults",e.confirmDeleteAccount=!1,e.deleteUsername="",e.profilePastSubscription=()=>!e.profileAuthorGrant()&&(e.billing?.grants||[]).some(h=>["author_monthly","author_annual"].includes(h.planId)),e.showAuthorPlans=new URLSearchParams(window.location.search).get("upgrade")==="1",e.showRepositoryPass=!1,e.profilePlan="author_annual",e.openProfileUpgrade=()=>{e.settingsTab="billing",e.showAuthorPlans=!0,We(()=>document.getElementById("settings-plan-comparison")?.focus())},e.on("settings:upgrade",()=>e.openProfileUpgrade()),e.profileAuthorPlans=()=>(e.billing?.plans||[]).filter(h=>["author_monthly","author_annual"].includes(h.id)),e.profileSelectedPlan=()=>e.profileAuthorPlans().find(h=>h.id===e.profilePlan)||e.profileAuthorPlans()[0],e.profilePassPlan=()=>(e.billing?.plans||[]).find(h=>h.id==="author_pass"),e.profileAddonPlans=()=>(e.billing?.plans||[]).filter(h=>Qi(h.id)).sort((h,y)=>+(y.id==="repo_pack")-+(h.id==="repo_pack")),e.profileAddonId="repo_pack",e.profilePackPlan=()=>(e.billing?.plans||[]).find(h=>h.id==="repo_pack"),e.profileSlotPlan=()=>(e.billing?.plans||[]).find(h=>h.id==="repo_slot"),e.profileRepositories=()=>(e.billing?.repositories||[]).filter(h=>h.status!=="removed"),e.openProfileAddon=h=>{h&&(e.profileAddonId=h),e.showRepositoryPass=!0,e.billingRepository="",We(()=>{let y=document.getElementById("settings-addons-title");y?.scrollIntoView?.({block:"nearest",behavior:"smooth"}),y?.focus?.({preventScroll:!0})})};let r=["repo_slot","author_pass","repo_extend","repo_never"];e.profileSingleAddons=()=>e.profileAddonPlans().filter(h=>h.id!=="repo_pack").sort((h,y)=>r.indexOf(h.id)-r.indexOf(y.id)),e.profileSingleId="repo_slot",e.profileSingleAddon=()=>e.profileSingleAddons().find(h=>h.id===e.profileSingleId)||e.profileSingleAddons()[0],e.profileCheapestAddon=()=>[...e.profileSingleAddons()].sort((h,y)=>(h.amount??1/0)-(y.amount??1/0))[0],e.profileAuthorPlansByValue=()=>[...e.profileAuthorPlans()].sort((h,y)=>+(h.interval==="year")-+(y.interval==="year")),e.profilePackSummary=h=>h.parts.map(y=>y.planId==="repo_slot"?"Extra repository":`${e.profileGrantName(y)} until ${e.billingDate(y.until)}`).join(" \xB7 "),e.profileAddonFeatures=h=>({repo_pack:["One more repository, outside your free ones",`Its own ${e.billingBytes(e.profileSlotPlan()?.storage||e.profilePassPlan()?.storage)} of storage`,"Automatic updates for 180 days","Online for up to a year","No subscription"],repo_slot:["One more repository, outside your free ones",`Its own ${e.billingBytes(e.profileSlotPlan()?.storage)} of storage`,"Valid while the repository exists","Refresh it by hand"],author_pass:["Automatic updates for 180 days",`Its own ${e.billingBytes(e.profilePassPlan()?.storage)} of storage`,"No subscription"],repo_extend:["Online for up to one more year","Buy again to add another year","No subscription"],repo_never:["The link never expires","No subscription","Ends only if the payment is refunded"]})[h]||[],e.profileAddonBlurb=h=>({repo_slot:"One more repository",author_pass:"Auto-updates for 180 days",repo_extend:"Online one more year",repo_never:"The link never expires"})[h]||"",e.profileAuthorPurchase=()=>(e.billing?.purchases||[]).find(h=>h.recurring&&["active","overdue"].includes(h.status)),e.profileRepositoryExpiry=h=>h.status==="expired"?"expired":h.expirationMode==="never"?"never expires":h.expirationDate?"expires "+e.billingDate(h.expirationDate):"no date",e.profileAnnualSavings=()=>{let h=e.profileAuthorPlans().find(g=>g.interval==="month")?.amount,y=e.profileAuthorPlans().find(g=>g.interval==="year")?.amount;return h&&y&&y(e.billing?.purchases||[]).filter(y=>["active","overdue"].includes(y.status)===h),e.profilePurchaseStatus=h=>({active:"Active",overdue:"Payment overdue",ended:"Ended",refunded:"Refunded",disputed:"Disputed"})[h.status]||h.status,e.profilePurchaseTerm=h=>{let y=h.status&&!["active","overdue"].includes(h.status);if(h.recurring)return y?h.until?"Ended "+e.billingDate(h.until):"":(h.cancelAtPeriodEnd?"Ends ":"Renews ")+e.billingDate(h.until);if(h.planId==="repo_pack"){let g=h.parts.map(k=>k.until).filter(Boolean).map(k=>new Date(k).getTime());return y||!g.length?"":"Until "+e.billingDate(new Date(Math.max(...g)))}return h.until?(y||new Date(h.until).getTime()e.profileAddonPlans().find(h=>h.id===e.profileAddonId)||e.profileAddonPlans()[0],e.profileAuthorGrant=()=>(e.billing?.grants||[]).find(h=>["author_monthly","author_annual"].includes(h.planId)&&["active","paid","past_due"].includes(h.status)&&new Date(h.until).getTime()>Date.now()),e.profileConferencePlan=()=>(e.billing?.plans||[]).filter(h=>["conference_workshop","conference","conference_large"].includes(h.id)&&h.amount!=null).sort((h,y)=>h.amount-y.amount)[0],e.profileGrantName=h=>({author_monthly:"Author monthly",author_annual:"Author annual",author_pass:"Live updates",repo_extend:"Extended expiration",repo_never:"Never expire",repo_slot:"Extra repository",repo_pack:"Paper pack",conference:"Conference package",conference_workshop:"Workshop package",conference_large:"Large conference package"})[h.planId]||h.planId,xi(e,t,()=>o.load().then(h=>{e.quota=h},console.error),{portalMessage:()=>{let h=e.profileAuthorGrant();return h?h.cancelAtPeriodEnd?`Renewal cancelled. Your access continues until ${e.billingDate(h.until)}.`:`Your subscription renews on ${e.billingDate(h.until)}.`:"Your billing details are up to date."}}),e.terms="",e.options={expirationMode:"remove",update:!1,image:!0,pdf:!0,notebook:!0,loc:!0,link:!0},e.saving=!1,e.message=null,e.error=null,e.accountEmail="",e.emailLoading=!0,e.emailCSRFReady=!1,e.emailSaving=!1,e.emailSaved=!1,e.emailError="";let u="";e.loadAccountEmail=async()=>{e.emailLoading=!0,e.emailError="";try{let h=await t.get("/github/connections/email");e.accountEmail=h.data.notificationEmail||"",u=h.data.csrf,e.emailCSRFReady=!!u}catch{e.emailError="Unable to load your email address. Please try again."}finally{e.emailLoading=!1}},e.saveAccountEmail=async()=>{if(!(e.emailSaving||e.emailLoading||!u)){e.emailSaving=!0,e.emailSaved=!1,e.emailError="";try{let h=await t.post("/github/connections/email",{email:e.accountEmail},{headers:{"X-CSRF-Token":u}});e.accountEmail=h.data.notificationEmail,e.user&&(e.user.notificationEmail=h.data.notificationEmail),e.emailSaved=!0}catch{e.emailError="Unable to save your email address. Check the address and try again."}finally{e.emailSaving=!1}}},e.loadAccountEmail(),o.load().then(h=>{e.quota=h},console.error);let p=Ea(e,["terms","options"],"profile");e.discardDraft=()=>p.discard();function c(){t.get("/api/user/default").then(h=>{let y=h.data||{};y.terms&&(e.terms=y.terms.join(` `)),e.options=Object.assign({},e.options,y.options),p.restore()})}c();let v=null;e.saveDefault=h=>{if(h&&h.preventDefault&&h.preventDefault(),e.saving)return;let y=p.checkpoint(),g={terms:e.terms.split(` `).map(k=>k.trim()).filter(k=>k.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",g).then(()=>{p.accept(y),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",v&&i.cancel(v),v=i(()=>{e.message=null},2500)},k=>{e.saving=!1;let w=k&&k.data&&k.data.error,C="Unable to save your defaults. Please try again.";Promise.all([s("ERRORS."+w),s("ERRORS.unknown_error")]).then(([N,b])=>{e.error=w&&N!==b?N:C},()=>{e.error=C})})},e.deleteAccount=()=>{e.deletingAccount||!e.confirmDeleteAccount||e.deleteUsername!==e.user?.username||(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},Gc=function(e,t,s){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(i=>{s.url("/dashboard")},i=>{e.error=i.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},Wc=function(e,t,s,i,o){e.user&&!e.user.status&&s.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&s.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(p){e.feature=p},e.featureHref=function(p){return p.needsUser&&!e.user?"/signin":p.href},e.featureTarget=function(p){return p.needsUser&&!e.user?"_self":p.target||void 0},e.featureKeydown=function(p,c){let v={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[p.key];if(v===void 0)return;p.preventDefault();let h=e.features.length,y=v==="first"?0:v==="last"?h-1:(c+v+h)%h;e.feature=e.features[y].key,o(()=>{let g=i.document.getElementById("feature-tab-"+e.feature);g&&g.focus()})},e.demoText=`# DeepLearnUtils Developed by Jane Smith at MIT CSAIL.