Merge pull request #812 from tdurieux/fix/anonymization-submit-validation

fix: unblock gist and pull request form submissions
This commit is contained in:
Thomas Durieux authored and GitHub committed 2026-09-09 13:43:11 +02:00
commit e81b04c6e7
5 files changed
+79 -9

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"core.min.js": "core.c5bd53363a.min.js",
"vendor.min.js": "vendor.af902bc3b4.min.js",
"vendor.min.js": "vendor.741a424da5.min.js",
"mermaid.min.js": "mermaid.f848a72d16.min.js",
"all.min.css": "all.076c089579.min.css",
"markdown.min.js": "markdown.ad7b1d71c3.min.js",
+1 -1
View File
@@ -63,7 +63,7 @@
</div>
</div>
<div class="form-grid-2" v-show="detectedType === &#x27;repo&#x27;">
<div class="form-grid-2" v-if="detectedType === &#x27;repo&#x27;">
<div class="form-group">
<label class="paper-field-label" for="branch">Branch</label>
<div class="input-group">
+7 -1
View File
@@ -91,6 +91,12 @@ export function submitForm(event, callback) {
if (el._field?.timer) el._field.commit();
if (el._field) validate(el);
});
if (form && !form.checkValidity()) return;
if (form && !form.checkValidity()) {
const invalid = form.querySelector(":invalid");
invalid?.scrollIntoView?.({ block: "center" });
invalid?.focus();
form.reportValidity();
return;
}
return callback();
}
+6 -6
View File
@@ -1,4 +1,4 @@
"use strict";(()=>{var $l=Object.defineProperty;var Fl=(e,t)=>{for(var o in t)$l(e,o,{get:t[o],enumerable:!0})};var ye={notebook:"/script/notebook.8844e2735f.min.js",pdf:"/script/pdf.eaa7573247.min.js",markdown:"/script/markdown.ad7b1d71c3.min.js",org:"/script/org.f4e2a3f59f.min.js",editor:"/script/editor.e243722d87.min.js"};var rn=new Map,Ul=ye;function Wt(e){if(!rn.has(e)){let t=document.createElement("script");t.src=Ul[e];let o=new Promise((r,n)=>{t.onload=r,t.onerror=()=>{rn.delete(e),t.remove(),n(new Error(`Unable to load ${e}. Please retry.`))}});rn.set(e,o),document.head.appendChild(t)}return rn.get(e)}async function tr(){await Wt("editor"),ace.config.set("basePath","/script/external/ace/")}function ds(e){let t=Object.create(null);for(let o of e.split(","))t[o]=1;return o=>o in t}var Ve={},Kt=[],rt=()=>{},Qn=()=>!1,us=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cs=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Ss=(e,t)=>{let o=e.indexOf(t);o>-1&&e.splice(o,1)},zl=Object.prototype.hasOwnProperty,Re=(e,t)=>zl.call(e,t),_e=Array.isArray,Pt=e=>Ds(e)==="[object Map]",ls=e=>Ds(e)==="[object Set]",sr=e=>Ds(e)==="[object Date]";var ke=e=>typeof e=="function",Le=e=>typeof e=="string",ct=e=>typeof e=="symbol",Oe=e=>e!==null&&typeof e=="object",Xn=e=>(Oe(e)||ke(e))&&ke(e.then)&&ke(e.catch),rr=Object.prototype.toString,Ds=e=>rr.call(e),Zn=e=>Ds(e).slice(8,-1),an=e=>Ds(e)==="[object Object]",ln=e=>Le(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ps=ds(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var dn=e=>{let t=Object.create(null);return(o=>t[o]||(t[o]=e(o)))},Hl=/-\w/g,Ke=dn(e=>e.replace(Hl,t=>t.slice(1).toUpperCase())),Bl=/\B([A-Z])/g,qt=dn(e=>e.replace(Bl,"-$1").toLowerCase()),Yt=dn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rs=dn(e=>e?`on${Yt(e)}`:""),ht=(e,t)=>!Object.is(e,t),Ts=(e,...t)=>{for(let o=0;o<e.length;o++)e[o](...t)},un=(e,t,o,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:o})},eo=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var nr,Os=()=>nr||(nr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ae(e){if(_e(e)){let t={};for(let o=0;o<e.length;o++){let r=e[o],n=Le(r)?Kl(r):Ae(r);if(n)for(let i in n)t[i]=n[i]}return t}else if(Le(e)||Oe(e))return e}var Gl=/;(?![^(]*\))/g,jl=/:([^]+)/,Wl=/\/\*[^]*?\*\//g;function Kl(e){let t={};return e.replace(Wl,"").split(Gl).forEach(o=>{if(o){let r=o.split(jl);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function T(e){let t="";if(Le(e))t=e;else if(_e(e))for(let o=0;o<e.length;o++){let r=T(e[o]);r&&(t+=r+" ")}else if(Oe(e))for(let o in e)e[o]&&(t+=o+" ");return t.trim()}var ir="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ar=ds(ir),Yl=ds(ir+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function cn(e){return!!e||e===""}function xl(e,t){if(e.length!==t.length)return!1;let o=!0;for(let r=0;o&&r<e.length;r++)o=fs(e[r],t[r]);return o}function or(e,t){if(e.size!==t.size)return!1;let o=Array.from(t),r=new Uint8Array(o.length);for(let n of e){let i=-1;for(let a=0;a<o.length;a++)if(!r[a]&&fs(n,o[a])){i=a;break}if(i<0)return!1;r[i]=1}return!0}function fs(e,t){if(e===t)return!0;let o=sr(e),r=sr(t);if(o||r)return o&&r?e.getTime()===t.getTime():!1;if(o=ct(e),r=ct(t),o||r)return e===t;if(o=_e(e),r=_e(t),o||r)return o&&r?xl(e,t):!1;if(o=Oe(e),r=Oe(t),o||r){if(!o||!r)return!1;if(o=Pt(e),r=Pt(t),o||r||(o=ls(e),r=ls(t),o||r))return o&&r?or(e,t):!1;let n=Object.keys(e).length,i=Object.keys(t).length;if(n!==i)return!1;for(let a in e){let u=e.hasOwnProperty(a),p=t.hasOwnProperty(a);if(u&&!p||!u&&p||!fs(e[a],t[a]))return!1}}return String(e)===String(t)}var lr=e=>!!(e&&e.__v_isRef===!0),c=e=>Le(e)?e:e==null?"":_e(e)||Oe(e)&&(e.toString===rr||!ke(e.toString))?lr(e)?c(e.value):JSON.stringify(e,dr,2):String(e),dr=(e,t)=>lr(t)?dr(e,t.value):Pt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[r,n],i)=>(o[Jn(r,i)+" =>"]=n,o),{})}:ls(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>Jn(o))}:ct(t)?Jn(t):Oe(t)&&!_e(t)&&!an(t)?String(t):t,Jn=(e,t="")=>{var o;return ct(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};function Jl(e,...t){console.warn(`[Vue warn] ${e}`,...t)}var Ye,Ps=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ye&&(Ye.active?(this.parent=Ye,this.index=(Ye.scopes||(Ye.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,o;if(this.scopes){let r=this.scopes.slice();for(t=0,o=r.length;t<o;t++)r[t].pause()}for(t=0,o=this.effects.length;t<o;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!Line truncated
"use strict";(()=>{var $l=Object.defineProperty;var Fl=(e,t)=>{for(var o in t)$l(e,o,{get:t[o],enumerable:!0})};var ye={notebook:"/script/notebook.8844e2735f.min.js",markdown:"/script/markdown.ad7b1d71c3.min.js",org:"/script/org.f4e2a3f59f.min.js",pdf:"/script/pdf.eaa7573247.min.js",editor:"/script/editor.e243722d87.min.js"};var rn=new Map,Ul=ye;function Wt(e){if(!rn.has(e)){let t=document.createElement("script");t.src=Ul[e];let o=new Promise((r,n)=>{t.onload=r,t.onerror=()=>{rn.delete(e),t.remove(),n(new Error(`Unable to load ${e}. Please retry.`))}});rn.set(e,o),document.head.appendChild(t)}return rn.get(e)}async function tr(){await Wt("editor"),ace.config.set("basePath","/script/external/ace/")}function ds(e){let t=Object.create(null);for(let o of e.split(","))t[o]=1;return o=>o in t}var Ve={},Kt=[],rt=()=>{},Qn=()=>!1,us=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cs=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Ss=(e,t)=>{let o=e.indexOf(t);o>-1&&e.splice(o,1)},zl=Object.prototype.hasOwnProperty,Re=(e,t)=>zl.call(e,t),_e=Array.isArray,Pt=e=>Ds(e)==="[object Map]",ls=e=>Ds(e)==="[object Set]",sr=e=>Ds(e)==="[object Date]";var ke=e=>typeof e=="function",Le=e=>typeof e=="string",ct=e=>typeof e=="symbol",Oe=e=>e!==null&&typeof e=="object",Xn=e=>(Oe(e)||ke(e))&&ke(e.then)&&ke(e.catch),rr=Object.prototype.toString,Ds=e=>rr.call(e),Zn=e=>Ds(e).slice(8,-1),an=e=>Ds(e)==="[object Object]",ln=e=>Le(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ps=ds(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var dn=e=>{let t=Object.create(null);return(o=>t[o]||(t[o]=e(o)))},Hl=/-\w/g,Ke=dn(e=>e.replace(Hl,t=>t.slice(1).toUpperCase())),Bl=/\B([A-Z])/g,qt=dn(e=>e.replace(Bl,"-$1").toLowerCase()),Yt=dn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rs=dn(e=>e?`on${Yt(e)}`:""),ht=(e,t)=>!Object.is(e,t),Ts=(e,...t)=>{for(let o=0;o<e.length;o++)e[o](...t)},un=(e,t,o,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:o})},eo=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var nr,Os=()=>nr||(nr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ae(e){if(_e(e)){let t={};for(let o=0;o<e.length;o++){let r=e[o],n=Le(r)?Kl(r):Ae(r);if(n)for(let i in n)t[i]=n[i]}return t}else if(Le(e)||Oe(e))return e}var Gl=/;(?![^(]*\))/g,jl=/:([^]+)/,Wl=/\/\*[^]*?\*\//g;function Kl(e){let t={};return e.replace(Wl,"").split(Gl).forEach(o=>{if(o){let r=o.split(jl);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function T(e){let t="";if(Le(e))t=e;else if(_e(e))for(let o=0;o<e.length;o++){let r=T(e[o]);r&&(t+=r+" ")}else if(Oe(e))for(let o in e)e[o]&&(t+=o+" ");return t.trim()}var ir="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ar=ds(ir),Yl=ds(ir+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function cn(e){return!!e||e===""}function xl(e,t){if(e.length!==t.length)return!1;let o=!0;for(let r=0;o&&r<e.length;r++)o=fs(e[r],t[r]);return o}function or(e,t){if(e.size!==t.size)return!1;let o=Array.from(t),r=new Uint8Array(o.length);for(let n of e){let i=-1;for(let a=0;a<o.length;a++)if(!r[a]&&fs(n,o[a])){i=a;break}if(i<0)return!1;r[i]=1}return!0}function fs(e,t){if(e===t)return!0;let o=sr(e),r=sr(t);if(o||r)return o&&r?e.getTime()===t.getTime():!1;if(o=ct(e),r=ct(t),o||r)return e===t;if(o=_e(e),r=_e(t),o||r)return o&&r?xl(e,t):!1;if(o=Oe(e),r=Oe(t),o||r){if(!o||!r)return!1;if(o=Pt(e),r=Pt(t),o||r||(o=ls(e),r=ls(t),o||r))return o&&r?or(e,t):!1;let n=Object.keys(e).length,i=Object.keys(t).length;if(n!==i)return!1;for(let a in e){let u=e.hasOwnProperty(a),p=t.hasOwnProperty(a);if(u&&!p||!u&&p||!fs(e[a],t[a]))return!1}}return String(e)===String(t)}var lr=e=>!!(e&&e.__v_isRef===!0),c=e=>Le(e)?e:e==null?"":_e(e)||Oe(e)&&(e.toString===rr||!ke(e.toString))?lr(e)?c(e.value):JSON.stringify(e,dr,2):String(e),dr=(e,t)=>lr(t)?dr(e,t.value):Pt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[r,n],i)=>(o[Jn(r,i)+" =>"]=n,o),{})}:ls(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>Jn(o))}:ct(t)?Jn(t):Oe(t)&&!_e(t)&&!an(t)?String(t):t,Jn=(e,t="")=>{var o;return ct(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};function Jl(e,...t){console.warn(`[Vue warn] ${e}`,...t)}var Ye,Ps=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ye&&(Ye.active?(this.parent=Ye,this.index=(Ye.scopes||(Ye.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,o;if(this.scopes){let r=this.scopes.slice();for(t=0,o=r.length;t<o;t++)r[t].pause()}for(t=0,o=this.effects.length;t<o;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!Line truncated
${JSON.stringify(e)}${t?`
while being at
`+JSON.stringify(t):""}`},[Be.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${pc(t)}" via a navigation guard.`},[Be.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[Be.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[Be.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function os(e,t){return Ie(new Error,{type:e,[na]:!0},t)}function Vt(e,t){return e instanceof Error&&na in e&&(t==null||!!(e.type&t))}var cc=["params","query","hash"];function pc(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let o of cc)o in e&&(t[o]=e[o]);return JSON.stringify(t,null,2)}function oa(e){let t={};if(e===""||e==="?")return t;let o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<o.length;++r){let n=o[r].replace(Gi," "),i=n.indexOf("="),a=_s(i<0?n:n.slice(0,i)),u=i<0?null:_s(n.slice(i+1));if(a in t){let p=t[a];gt(p)||(p=t[a]=[p]),p.push(u)}else t[a]=u}return t}function Go(e){let t="";for(let o in e){let r=e[o];if(o=sc(o),r==null){r!==void 0&&(t+=(t.length?"&":"")+o);continue}(gt(r)?r.map(n=>n&&Mo(n)):[r&&Mo(r)]).forEach(n=>{n!==void 0&&(t+=(t.length?"&":"")+o,n!=null&&(t+="="+n))})}return t}function ra(e){let t={};for(let o in e){let r=e[o];r!==void 0&&(t[o]=gt(r)?r.map(n=>n==null?null:""+n):r==null?r:""+r)}return t}var ia=Symbol(""),jo=Symbol(""),Gn=Symbol(""),jn=Symbol(""),Wn=Symbol("");function Cs(){let e=[];function t(r){return e.push(r),()=>{let n=e.indexOf(r);n>-1&&e.splice(n,1)}}function o(){e=[]}return{add:t,list:()=>e.slice(),reset:o}}function Bt(e,t,o,r,n,i=a=>a()){let a=r&&(r.enterCallbacks[n]=r.enterCallbacks[n]||[]);return()=>new Promise((u,p)=>{let h=f=>{f===!1?p(os(Be.NAVIGATION_ABORTED,{from:o,to:t})):f instanceof Error?p(f):uc(f)?p(os(Be.NAVIGATION_GUARD_REDIRECT,{from:t,to:f})):(a&&r.enterCallbacks[n]===a&&typeof f=="function"&&a.push(f),u())},v=i(()=>e.call(r&&r.instances[n],t,o,h)),g=Promise.resolve(v);e.length<3&&(g=g.then(h)),g.catch(f=>p(f))})}function Kn(e,t,o,r,n=i=>i()){let i=[];for(let a of e)for(let u in a.components){let p=a.components[u];if(!(t!=="beforeRouteEnter"&&!a.instances[u]))if(Hi(p)){let h=(p.__vccOpts||p)[t];h&&i.push(Bt(h,o,r,a,u,n))}else{let h=p();i.push(()=>h.then(v=>{if(!v)throw new Error(`Couldn't resolve component "${u}" at "${a.path}"`);let g=Wu(v)?v.default:v;a.mods[u]=v,a.components[u]=g;let f=(g.__vccOpts||g)[t];return f&&Bt(f,o,r,a,u,n)()}))}}return i}function aa(e,t){let o=[],r=[],n=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;a<i;a++){let u=t.matched[a];u&&(e.matched.find(h=>ns(h,u))?r.push(u):o.push(u));let p=e.matched[a];p&&(t.matched.find(h=>ns(h,p))||n.push(p))}return[o,r,n]}var fc=()=>location.protocol+"//"+location.host;function ga(e,t){let{pathname:o,search:r,hash:n}=t,i=e.indexOf("#");if(i>-1){let a=n.includes(e.slice(i))?e.slice(i).length:1,u=n.slice(a);return u[0]!=="/"&&(u="/"+u),Uo(u,"")}return Uo(o,e)+r+n}function mc(e,t,o,r){let n=[],i=[],a=null,u=({state:f})=>{let w=ga(e,location),k=o.value,b=t.value,R=0;if(f){if(o.value=w,t.value=f,a&&a===k){a=null;return}R=b?f.position-b.position:0}else r(w);n.forEach(N=>{N(o.value,k,{delta:R,type:Hn.pop,direction:R?R>0?Bn.forward:Bn.back:Bn.unknown})})};function p(){a=o.value}function h(f){n.push(f);let w=()=>{let k=n.indexOf(f);k>-1&&n.splice(k,1)};return i.push(w),w}function v(){if(document.visibilityState==="hidden"){let{history:f}=window;if(!f.state)return;f.replaceState(Ie({},f.state,{scroll:on()}),"")}}function g(){for(let f of i)f();i=[],window.removeEventListener("popstate",u),window.removeEventListener("pagehide",v),document.removeEventListener("visibilitychange",v)}return window.addEventListener("popstate",u),window.addEventListener("pagehide",v),document.addEventListener("visibilitychange",v),{pauseListeners:p,listen:h,destroy:g}}function la(e,t,o,r=!1,n=!1){return{back:e,current:t,forward:o,replaced:r,position:window.history.length,scroll:n?on():null}}function hc(e){let{history:t,location:o}=window,r={value:ga(e,o)},n={value:t.state};n.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(p,h,v){let g=e.indexOf("#"),f=g>-1?(o.host&&document.querySelector("base")?e:e.slice(g))+p:fc()+e+p;try{t[v?"replaceState":"pushState"](h,"",f),n.value=h}catch(w){console.error(w),o[v?"replace":"assign"](f)}}function a(p,h){i(p,Ie({},t.state,la(n.value.back,p,n.value.forward,!0),h,{position:n.value.position}),!0),r.value=p}function u(p,h){let v=Ie({},n.value,t.state,{forward:p,scroll:on()});i(v.current,v,!0),i(p,Ie({},la(r.value,p,null),{position:v.position+1},h),!1),r.value=p}return{location:r,state:n,push:u,replace:a}}function ba(e){e=Xi(e);let t=hc(e),o=mc(e,t.state,t.location,t.replace);function r(i,a=!0){a||o.pauseListeners(),history.go(i)}let n=Ie({locatLine truncated
@@ -13,17 +13,17 @@ while being at
`).filter(oe=>oe),source:{gistId:V.gistId},options:e.options,conference:e.conference};he();let Z=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(Z,j,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/gist/"+e.gistId},oe=>{oe.data&&(i("ERRORS."+oe.data.error).then(qe=>{e.error=qe},console.error),ae(oe.data.error))}).finally(()=>{A.target.disabled=!1})},e.anonymizePullRequest=A=>{if(me())return;A.target.disabled=!0;let V=parseGithubUrl(e.sourceUrl),j={pullRequestId:e.pullRequestId,terms:e.terms.trim().split(`
`).filter(oe=>oe),source:{repositoryFullName:`${V.owner}/${V.repo}`,pullRequestId:V.pullRequestId},options:e.options,conference:e.conference};he();let Z=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(Z,j,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/pr/"+e.pullRequestId},oe=>{oe.data&&(i("ERRORS."+oe.data.error).then(qe=>{e.error=qe},console.error),ae(oe.data.error))}).finally(()=>{A.target.disabled=!1})},e.watch("conference",()=>{we()}),e.watch("terms",()=>{e.detectedType==="repo"&&I(),e.detectedType==="pr"&&J(),e.detectedType==="gist"&&ie()}),e.watch("options.image",()=>{e.detectedType==="repo"&&I(),e.detectedType==="pr"&&J(),e.detectedType==="gist"&&ie()}),e.watch("options.link",()=>{e.detectedType==="repo"&&I(),e.detectedType==="pr"&&J(),e.detectedType==="gist"&&ie()}),e.watch("details",()=>{e.detectedType==="pr"&&J(),e.detectedType==="gist"&&ie()},!0)},Yo=function(e,t,o,r,n,i){let a=mt(),u=as(),p=0,h=!1;e.on("dispose",()=>{h=!0,p++,v&&v.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,u(document,"keydown",function(U){if((U.metaKey||U.ctrlKey)&&U.key==="k"){U.preventDefault();var de=document.querySelector(".tree-search-input");de&&(de.focus(),de.select())}});var v=null;e.onFileSearchChange=function(){v&&(v.resolve(),v=null);let U=e.fileSearchQuery;if(!U||U.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let de=i.defer();v=de,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(U)}`,{timeout:de.promise}).then(function(se){if(!(h||v!==de)){v=null,e.fileSearchLoading=!1;var ie={};e.files.forEach(function(F){ie[(F.path||"")+"/"+F.name]=!0});for(var ce=[],we={},he=0;he<se.data.length;he++){var me=se.data[he];if(me.path)for(var ae=me.path.split("/"),A="",V=0;V<ae.length;V++){var j=A;A=A?A+"/"+ae[V]:ae[V];var Z=j+"/"+ae[V];!ie[Z]&&!we[Z]&&(we[Z]=!0,ce.push({name:ae[V],path:j}))}}ce.sort(function(F,ne){return(F.path||"").split("/").length-(ne.path||"").split("/").length}),ce.length>0&&e.files.push.apply(e.files,ce);for(var oe=[],qe=0;qe<se.data.length;qe++){var ze=se.data[qe],Fe=(ze.path||"")+"/"+ze.name;!ie[Fe]&&ze.size!=null&&(oe.push(ze),ie[Fe]=!0)}oe.length>0&&e.files.push.apply(e.files,oe),e.fileSearchResults=se.data}},function(){!h&&v===de&&(v=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let g={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},f=["license","txt"],w=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],k=["wav","mp3","ogg","wma","flac","aac","m4a"],b=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(U,de){if(e.repoId!=r.repoId)return K();if((r.path||"")!=e.filePath){e.filePath=r.path||"",e.paths=e.filePath.split("/").filter(se=>se&&se.trim().length>0),J();for(let se=0;se<e.paths.length-1;se++){let ie=se>0?e.paths.slice(0,se).join("/"):"";e.files.some(we=>we.path===ie)||e.getFiles(ie)}}});function R(){if(e.paths[0]!="")return;let U=["readme.md","readme.txt","readme.org","readme.1st","readme"],de={};for(let ie of e.files)ie.name.toLowerCase().indexOf("readme")>-1&&(de[ie.name.toLowerCase()]=ie.name);let se=null;for(let ie of U)if(de[ie]){se=ie;break}if(!se&&Object.keys(de).length>0&&(se=Object.keys(de)[0]),se){let ie=o.url();ie[ie.length-1]!="/"&&(ie+="/"),o.url(ie+encodePathForUrl(de[se]))}}e.fileCounts=null,e.getFiles=function(U){let de=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(U)}&v=${e.options.lastUpdateDate}`).then(function(se){if(h||de!==e.repoId)return[];let ie=U||"";return e.files=e.files.filter(ce=>ce.path!==ie),e.files.push(...se.data),se.data},function(se){if(h||de!==e.repoId)return[];e.type="error",e.content=se&&se.data&&se.data.error||"unknown_error",e.files=[]})};function N(){let U=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(de){h||U!==e.repoId||(e.fileCounts=de.data)},function(){e.fileCounts={}})}function D(){return e.files.filter(U=>U.name==e.paths[e.paths.length-1]&&U.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var I=null;e.on("dispose",function(){I&&a.interval.cancel(I)});function C(U){if(h)return;let de=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(se=>{if(!(h||de!==e.repoId)){if(e.options=se.data,e.options.url){window.location=e.options.url;return}U&&U(se.data)}},se=>{if(!(h||de!==e.repoId)){var ie=se.data||{};if(ie.error==="rate_limited"&&ie.resetAt){let we=function(){var he=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(he<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,I&&(a.interval.cancel(I),I=null),C(U);else{var me=Math.floor(he/60),ae=he%60;e.rateLimitCountdown=me>0?me+"m "+ae+"s":ae+"s"}};var ce=we;e.type="rate_limited",e.rateLimitResetAt=ie.resetAt,I&&a.interval.cancel(I),we(),I=a.interval(we,1e3)}else ie.error==="repository_no Line truncated
`+b.join(`
`)],{type:"text/csv"}),N=document.createElement("a");N.href=URL.createObjectURL(R),N.download=r.username+"-repositories.csv",N.click()},e.showStatusMessage=f=>{let w=f.statusMessage||"(no message)";window.prompt(`Status message for ${f.repoId} (${f.status}):`,w)},e.fetchGithubInfo=f=>{let w=window.open("","_blank");w&&w.document.write("<pre>Loading GitHub info for "+f.repoId+"...</pre>"),t.get("/api/admin/repos/"+f.repoId+"/github").then(k=>{w&&(w.document.open(),w.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(k.data,null,2).replace(/[<>]/g,b=>b==="<"?"&lt;":"&gt;")+"</pre>"),w.document.close())},k=>{let b=k&&k.data?JSON.stringify(k.data,null,2):String(k);w&&(w.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+b+"</pre>")})};function p(f){t.get("/api/admin/users/"+f+"/repos",{}).then(w=>{e.repositories=w.data},w=>{console.error(w)})}function h(f){t.get("/api/admin/users/"+f,{}).then(w=>{e.userInfo=w.data},w=>{console.error(w)})}h(r.username),p(r.username),e.banUser=()=>{confirm(`Ban user ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/ban`).then(()=>h(r.username),f=>console.error(f))},e.activateUser=()=>{t.post(`/api/admin/users/${r.username}/activate`).then(()=>h(r.username),f=>console.error(f))},e.promoteUser=()=>{confirm(`Promote ${r.username} to admin?`)&&t.post(`/api/admin/users/${r.username}/promote`).then(()=>h(r.username),f=>console.error(f))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/demote`).then(()=>h(r.username),f=>console.error(f))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function v(){t.get("/api/admin/tokens").then(f=>{e.tokens=f.data||[]},f=>{f.status!==401&&f.status!==403&&console.error(f)})}v(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(f=>{e.tokenForm.plaintext=f.data.token,e.tokenForm.name="",v()},f=>console.error(f))},e.revokeToken=f=>{confirm(`Revoke token "${f.name}"?`)&&t.delete("/api/admin/tokens/"+f.id).then(()=>v(),w=>console.error(w))},e.removeCache=f=>{confirm("Remove cached files for "+f.repoId+"?")&&t.delete("/api/admin/repos/"+f.repoId).then(()=>p(r.username),w=>console.error(w))},e.removeRepository=f=>{confirm("Remove repository "+f.repoId+"?")&&t.delete("/api/repo/"+f.repoId+"/").then(()=>p(r.username),w=>console.error(w))},e.updateRepository=f=>{let w=Ue({title:`Refreshing ${f.repoId}...`,date:new Date,body:`The repository ${f.repoId} is going to be refreshed.`});e.toasts.push(w),t.post(`/api/repo/${f.repoId}/refresh`).then(k=>{k.data.status=="ready"?w.title=`${f.repoId} is refreshed.`:w.title=`Refreshing of ${f.repoId}.`},k=>{w.title=`Error during the refresh of ${f.repoId}.`,w.body=k.body})},e.getGitHubRepositories=f=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(w=>{e.userInfo.repositories=w.data})};let g=null;e.watch("query",()=>{n.timeout.cancel(g),g=n.timeout(()=>{p(r.username)},500)},!0)},La=function(e,t,o){let r=mt(),n=as();e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let i=k=>{if(k.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){k.preventDefault();let b=document.querySelector('.admin-filter-toolbar input[type="search"]');b&&b.focus()}};n(document,"keydown",i),e.on("dispose",()=>document.removeEventListener("keydown",i)),e.clearFilter=k=>{k==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[k]="",e.query.page=1},e.chips=[];let a=()=>{let k=[];(e.query.dateFrom||e.query.dateTo)&&k.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=k};e.statusCountFor=k=>{let b=(e.statusCounts||[]).find(R=>R._id===k);return b?b.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=k=>{e.query.sort===k?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=k,e.query.direction="desc"),e.query.page=1},e.sortIcon=k=>e.query.sort===k?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let u="admin.conferences.filterPrefs",p={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},h=loadFilterPrefs(u)||{};e.query=Object.assign({},p,h,{page:1,search:""});let v=o.search();v.search&&(e.query.search=v.search);let g="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(g)||"[]"),e.savePreset=()=>{let k=window.prompt("Preset name:");if(!k)return;let b=Object.assign({},e.query);delete b.page,e.presets=(e.presets||[]).filter(R=>R.name!==k),e.presets.push({name:k,query:b}),localStorage.setItem(g,JSON.stringify(e.presets))},e.applyPreset=k=>{Object.assign(e.query,k.query,{page:1})},e.deletePreset=k=>{e.presets=(e.presets||[]).filter(b=>b.name!==k.name),localStorage.setItem(g,JS Line truncated
`)],{type:"text/csv"}),N=document.createElement("a");N.href=URL.createObjectURL(R),N.download=r.username+"-repositories.csv",N.click()},e.showStatusMessage=f=>{let w=f.statusMessage||"(no message)";window.prompt(`Status message for ${f.repoId} (${f.status}):`,w)},e.fetchGithubInfo=f=>{let w=window.open("","_blank");w&&w.document.write("<pre>Loading GitHub info for "+f.repoId+"...</pre>"),t.get("/api/admin/repos/"+f.repoId+"/github").then(k=>{w&&(w.document.open(),w.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(k.data,null,2).replace(/[<>]/g,b=>b==="<"?"&lt;":"&gt;")+"</pre>"),w.document.close())},k=>{let b=k&&k.data?JSON.stringify(k.data,null,2):String(k);w&&(w.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+b+"</pre>")})};function p(f){t.get("/api/admin/users/"+f+"/repos",{}).then(w=>{e.repositories=w.data},w=>{console.error(w)})}function h(f){t.get("/api/admin/users/"+f,{}).then(w=>{e.userInfo=w.data},w=>{console.error(w)})}h(r.username),p(r.username),e.banUser=()=>{confirm(`Ban user ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/ban`).then(()=>h(r.username),f=>console.error(f))},e.activateUser=()=>{t.post(`/api/admin/users/${r.username}/activate`).then(()=>h(r.username),f=>console.error(f))},e.promoteUser=()=>{confirm(`Promote ${r.username} to admin?`)&&t.post(`/api/admin/users/${r.username}/promote`).then(()=>h(r.username),f=>console.error(f))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/demote`).then(()=>h(r.username),f=>console.error(f))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function v(){t.get("/api/admin/tokens").then(f=>{e.tokens=f.data||[]},f=>{f.status!==401&&f.status!==403&&console.error(f)})}v(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(f=>{e.tokenForm.plaintext=f.data.token,e.tokenForm.name="",v()},f=>console.error(f))},e.revokeToken=f=>{confirm(`Revoke token "${f.name}"?`)&&t.delete("/api/admin/tokens/"+f.id).then(()=>v(),w=>console.error(w))},e.removeCache=f=>{confirm("Remove cached files for "+f.repoId+"?")&&t.delete("/api/admin/repos/"+f.repoId).then(()=>p(r.username),w=>console.error(w))},e.removeRepository=f=>{confirm("Remove repository "+f.repoId+"?")&&t.delete("/api/repo/"+f.repoId+"/").then(()=>p(r.username),w=>console.error(w))},e.updateRepository=f=>{let w=Ue({title:`Refreshing ${f.repoId}...`,date:new Date,body:`The repository ${f.repoId} is going to be refreshed.`});e.toasts.push(w),t.post(`/api/repo/${f.repoId}/refresh`).then(k=>{k.data.status=="ready"?w.title=`${f.repoId} is refreshed.`:w.title=`Refreshing of ${f.repoId}.`},k=>{w.title=`Error during the refresh of ${f.repoId}.`,w.body=k.body})},e.getGitHubRepositories=f=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(w=>{e.userInfo.repositories=w.data})};let g=null;e.watch("query",()=>{n.timeout.cancel(g),g=n.timeout(()=>{p(r.username)},500)},!0)},La=function(e,t,o){let r=mt(),n=as();e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let i=k=>{if(k.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){k.preventDefault();let b=document.querySelector('.admin-filter-toolbar input[type="search"]');b&&b.focus()}};n(document,"keydown",i),e.on("dispose",()=>document.removeEventListener("keydown",i)),e.clearFilter=k=>{k==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[k]="",e.query.page=1},e.chips=[];let a=()=>{let k=[];(e.query.dateFrom||e.query.dateTo)&&k.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=k};e.statusCountFor=k=>{let b=(e.statusCounts||[]).find(R=>R._id===k);return b?b.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=k=>{e.query.sort===k?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=k,e.query.direction="desc"),e.query.page=1},e.sortIcon=k=>e.query.sort===k?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let u="admin.conferences.filterPrefs",p={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},h=loadFilterPrefs(u)||{};e.query=Object.assign({},p,h,{page:1,search:""});let v=o.search();v.search&&(e.query.search=v.search);let g="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(g)||"[]"),e.savePreset=()=>{let k=window.prompt("Preset name:");if(!k)return;let b=Object.assign({},e.query);delete b.page,e.presets=(e.presets||[]).filter(R=>R.name!==k),e.presets.push({name:k,query:b}),localStorage.setItem(g,JSON.stringify(e.presets))},e.applyPreset=k=>{Object.assign(e.query,k.query,{page:1})},e.deletePreset=k=>{e.presets=(e.presets||[]).filter(b=>b.name!==k.name),localStorage.setItem(g,JS Line truncated
`).map((he,me)=>me===0?he:we+he).join(`
`)}else typeof K=="number"||typeof K=="boolean"?ce=String(K):ce=JSON.stringify(K);ee.push(`${se}${ce}${ie}`)}),ee.push("}"),ee.join(`
`)}function h(N){let D=[],I="",C=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,O=0,P;for(;P=C.exec(N);)I+=N.slice(O,P.index),O=C.lastIndex,D.push({key:P[1],op:P[2]||"=",val:P[3]});return I+=N.slice(O),{filters:D,free:I.trim().toLowerCase()}}function v(N,D){for(let I of D.filters){let C=(P,ee,J)=>{let K=parseFloat(P),U=parseFloat(ee);return J==="="?String(P)===String(ee):J==="!="?String(P)!==String(ee):J===">="?K>=U:J==="<="?K<=U:J===">"?K>U:J==="<"?K<U:!0},O;if(I.key==="code")O=N.displayMessage;else if(I.key==="module")O=N.module;else if(I.key==="status")O=N._status;else if(I.key==="url")O=N._url;else if(I.key==="repo")O=N._repoId;else if(I.key==="level")O=N.level;else continue;if(O==null||!C(O,I.val,I.op))return!1}return!(D.free&&((N.displayMessage||"")+" "+(N.module||"")+" "+(N._url||"")+" "+JSON.stringify(N.raw||[])).toLowerCase().indexOf(D.free)===-1)}function g(){let N=h(e.query.search||"");e.parsedFilterCount=N.filters.length;let D=e.query.bucket,I=e.entries.filter(O=>D&&O._bucket!==D?!1:v(O,N)),C=e.query.group;if(C){let O=J=>C==="module"?J.module:J.displayMessage||J.message||"_",P=new Map;for(let J of I){let K=O(J);if(P.has(K)){let U=P.get(K);U.count++,U._related.push(J),new Date(J.ts)>new Date(U.ts)&&(U.ts=J.ts,U._url=J._url,U._status=J._status),new Date(J.ts)<new Date(U._firstSeen)&&(U._firstSeen=J.ts)}else{let U=Object.assign({},J);U._key=`${C}:${K}`,U._related=[J],U._firstSeen=J.ts,U._lastHourCount=0,U.count=1,P.set(K,U)}}let ee=Date.now()-3600*1e3;for(let J of P.values())J._lastHourCount=J._related.filter(K=>new Date(K.ts).getTime()>=ee).length;I=Array.from(P.values())}else I=I.map((O,P)=>(O._key="row:"+P+":"+O.ts,O._related=[O],O._firstSeen=O.ts,O._lastHourCount=0,O.count=1,O));e.query.sort==="count"?I.sort((O,P)=>P.count-O.count||new Date(P.ts)-new Date(O.ts)):I.sort((O,P)=>new Date(P.ts)-new Date(O.ts)),e.visible=I}function f(N){let D=N?e.entries.length:0,I=N?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:D,limit:I}}).then(C=>{let O=(C.data.entries||[]).map(u);e.entries=N?e.entries.concat(O):O,e.available=!!C.data.available,e.cap=C.data.max||e.cap,e.total=C.data.total||e.entries.length,g()},C=>console.error(C))}e.loadMore=()=>f(!0),e.canLoadMore=()=>e.entries.length<e.total;function w(){t.get("/api/admin/errors/stats").then(N=>{let D=N.data||{},I=D.prev24h?Math.round((D.last24h-D.prev24h)/D.prev24h*100):0;e.stats={last24h:D.last24h||0,prev24h:D.prev24h||0,delta:I,severity:D.severity||{error:0,warn:0,info:0},unique:D.unique||{error:0,warn:0,info:0},buckets:D.buckets||[],dropped:D.dropped||0}},N=>console.error(N))}function k(){f(),w()}e.barPx=(N,D)=>{let I=e.stats.buckets||[],C=0;for(let J of I)C=Math.max(C,(J.error||0)+(J.warn||0)+(J.info||0));if(!C)return 0;let O=(N.error||0)+(N.warn||0)+(N.info||0);if(!O)return 0;let P=Math.round(O/C*60),ee=N[D]||0;return Math.round(ee/O*P)},e.bucketTitle=N=>`${new Date(N.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${N.error||0} err \xB7 ${N.warn||0} warn \xB7 ${N.info||0} info`,e.toggle=N=>{e.expanded[N._key]=!e.expanded[N._key]},e.setBucket=N=>{e.query.bucket=N},e.refreshNow=k,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(k,N=>console.error(N))},e.exportCsv=()=>{let N=["ts","level","module","displayMessage","_status","_url","_repoId"],D=[N.join(",")];for(let P of e.visible)D.push(N.map(ee=>{let J=P[ee]==null?"":String(P[ee]);return/[",\n]/.test(J)?`"${J.replace(/"/g,'""')}"`:J}).join(","));let I=new Blob([D.join(`
`)],{type:"text/csv;charset=utf-8"}),C=URL.createObjectURL(I),O=document.createElement("a");O.href=C,O.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(O),O.click(),document.body.removeChild(O),URL.revokeObjectURL(C)};function b(N){e.copyHint=`${N} copied`,n.timeout(()=>{e.copyHint=""},1500)}e.copyJson=N=>{navigator.clipboard.writeText(N._detailJson).then(()=>b("JSON"))},e.copyCurl=N=>{if(!N._url)return;let I=`curl -X ${N._method||"GET"} '${window.location.origin}${N._url}'`;navigator.clipboard.writeText(I).then(()=>b("curl"))},k();let R=r(()=>{e.query.autoRefresh&&k()},15e3);e.on("dispose",()=>r.cancel(R)),e.watch("query.search",g),e.watch("query.bucket",g),e.watch("query.sort",g),e.watch("query.group",g)},Ha=function(e,t,o,r){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null){o.url("/");return}e.data=null,e.loading=!0,e.error=null;function n(f){if(f==null)return"\u2014";for(var w=["B","KB","MB","GB","TB"],k=0,b=f;b>=1024&&k<w.length-1;)b/=1024,k++;return b.toFixed(k>0?1:0)+" "+w[k]}e.humanBytes=n;function i(f){if(!f)return"\u2014";var w=Math.floor(f/86400),k=Math.floor(f%86400/3600),b=Math.floor(f%3600/60);return w>0?w+"d "+(k<10?"0":"")+k+"h":k>0?k+"h "+(b<10?"0":"")+b+"m":b+"m"}e.humanDuration=i;function a(f){return f==null?"\u2014":f>=1e6?(f/1e6).toFixed(1)+"M":f>=1e3?(f/1e3).toFixed(1)+"K":String(f)}e.humanNum=a,e.queueTotal=function(f){return f?(f.waiting||0)+(f.active||0)+(f.delayed||0)+(f.failed||0):0},e.statusCount=function(f){if(!e.data||!e.data.repos)return 0;for(var w=e.data.repos.statusBreakdown||[],k=0;k<w.length;k++)if(w[k]._id===f)return w[k].count;return 0},e.barPct=function(f){var w=e.data&&e.data.repos?e.data.repos.total:0;if(!w)return 0;var k=[f];f==="expired"&&k.push("expiring"),f==="removed"&&k.push("removing"),f==="preparing"&&k.push("download");var b=0;return k.forEach(function(R){b+=e.statusCount(R)}),Math.max(.4,b/w*100)},e.errPct=function(f){if(!e.data||!e.data.errors)return 0;var w=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[f]/w*100};function u(f){var w=f||[];return w.map(function(k,b){var R=w[b-1]||{},N=Object.assign({},k);return N.dailyRepositories=b?Math.max(0,(k.nbRepositories||0)-(R.nbRepositories||0)):0,N.dailyUsers=b?Math.max(0,(k.nbUsers||0)-(R.nbUsers||0)):0,N.dailyPageViews=b?Math.max(0,(k.nbPageViews||0)-(R.nbPageViews||0)):0,N})}function p(f){var w=f&&f.length?f[f.length-1]:{};return{repositories:w.dailyRepositories||0,users:w.dailyUsers||0,pageViews:w.dailyPageViews||0}}var h={};e.historyBarH=function(f,w){return!f||!h[w]?0:Math.max(1,Math.round(f[w]/h[w]*140))},e.historyLabel=function(f){if(!f||!f.date)return"";var w=new Date(f.date);return w.getUTCMonth()+1+"/"+w.getUTCDate()};function v(){t.get("/api/admin/overview").then(function(f){f.data.history=u(f.data.history),f.data.daily={today:p(f.data.history)},e.data=f.data,e.loading=!1,e.error=null,h={},(f.data.history||[]).forEach(function(w){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(k){(!h[k]||w[k]>h[k])&&(h[k]=w[k])})})},function(f){e.loading=!1,e.error=f.data&&f.data.error||"Failed to load overview"})}v();var g=r(v,3e4);e.on("dispose",function(){r.cancel(g)})};var Ba=[{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>Ta(e,t.http,t.location,t.window,t.timeout)},{path:"/dashboard",template:"partials/dashboard.htm",title:"Your anonymizations \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Oa(e,t.http,t.location,t.promises,t.window,t.quotaService)},{path:"/pr-dashboard",redirect:"/dashboard"},{path:"/anonymize/:repoId?",template:"partials/anonymize.htm",title:"New anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/pull-request-anonymize/:pullRequestId?",template:"partials/anonymize.htm",title:"Anonymize a pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/gist-anonymize/:gistId?",template:"partials/anonymize.htm",title:"Anonymize a gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/status/:repoId",template:"partials/status.htm",title:"Repository status \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Aa(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Pa(e,t.http,t.location)},{path:"/conference/new",template:"partials/newConference.htm",title:"New conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>xo(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId/edit",template:"partials/newConference.htm",title:"Edit conference \u2013 Anon Line truncated
`)],{type:"text/csv;charset=utf-8"}),C=URL.createObjectURL(I),O=document.createElement("a");O.href=C,O.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(O),O.click(),document.body.removeChild(O),URL.revokeObjectURL(C)};function b(N){e.copyHint=`${N} copied`,n.timeout(()=>{e.copyHint=""},1500)}e.copyJson=N=>{navigator.clipboard.writeText(N._detailJson).then(()=>b("JSON"))},e.copyCurl=N=>{if(!N._url)return;let I=`curl -X ${N._method||"GET"} '${window.location.origin}${N._url}'`;navigator.clipboard.writeText(I).then(()=>b("curl"))},k();let R=r(()=>{e.query.autoRefresh&&k()},15e3);e.on("dispose",()=>r.cancel(R)),e.watch("query.search",g),e.watch("query.bucket",g),e.watch("query.sort",g),e.watch("query.group",g)},Ha=function(e,t,o,r){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null){o.url("/");return}e.data=null,e.loading=!0,e.error=null;function n(f){if(f==null)return"\u2014";for(var w=["B","KB","MB","GB","TB"],k=0,b=f;b>=1024&&k<w.length-1;)b/=1024,k++;return b.toFixed(k>0?1:0)+" "+w[k]}e.humanBytes=n;function i(f){if(!f)return"\u2014";var w=Math.floor(f/86400),k=Math.floor(f%86400/3600),b=Math.floor(f%3600/60);return w>0?w+"d "+(k<10?"0":"")+k+"h":k>0?k+"h "+(b<10?"0":"")+b+"m":b+"m"}e.humanDuration=i;function a(f){return f==null?"\u2014":f>=1e6?(f/1e6).toFixed(1)+"M":f>=1e3?(f/1e3).toFixed(1)+"K":String(f)}e.humanNum=a,e.queueTotal=function(f){return f?(f.waiting||0)+(f.active||0)+(f.delayed||0)+(f.failed||0):0},e.statusCount=function(f){if(!e.data||!e.data.repos)return 0;for(var w=e.data.repos.statusBreakdown||[],k=0;k<w.length;k++)if(w[k]._id===f)return w[k].count;return 0},e.barPct=function(f){var w=e.data&&e.data.repos?e.data.repos.total:0;if(!w)return 0;var k=[f];f==="expired"&&k.push("expiring"),f==="removed"&&k.push("removing"),f==="preparing"&&k.push("download");var b=0;return k.forEach(function(R){b+=e.statusCount(R)}),Math.max(.4,b/w*100)},e.errPct=function(f){if(!e.data||!e.data.errors)return 0;var w=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[f]/w*100};function u(f){var w=f||[];return w.map(function(k,b){var R=w[b-1]||{},N=Object.assign({},k);return N.dailyRepositories=b?Math.max(0,(k.nbRepositories||0)-(R.nbRepositories||0)):0,N.dailyUsers=b?Math.max(0,(k.nbUsers||0)-(R.nbUsers||0)):0,N.dailyPageViews=b?Math.max(0,(k.nbPageViews||0)-(R.nbPageViews||0)):0,N})}function p(f){var w=f&&f.length?f[f.length-1]:{};return{repositories:w.dailyRepositories||0,users:w.dailyUsers||0,pageViews:w.dailyPageViews||0}}var h={};e.historyBarH=function(f,w){return!f||!h[w]?0:Math.max(1,Math.round(f[w]/h[w]*140))},e.historyLabel=function(f){if(!f||!f.date)return"";var w=new Date(f.date);return w.getUTCMonth()+1+"/"+w.getUTCDate()};function v(){t.get("/api/admin/overview").then(function(f){f.data.history=u(f.data.history),f.data.daily={today:p(f.data.history)},e.data=f.data,e.loading=!1,e.error=null,h={},(f.data.history||[]).forEach(function(w){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(k){(!h[k]||w[k]>h[k])&&(h[k]=w[k])})})},function(f){e.loading=!1,e.error=f.data&&f.data.error||"Failed to load overview"})}v();var g=r(v,3e4);e.on("dispose",function(){r.cancel(g)})};var Ba=[{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>Ta(e,t.http,t.location,t.window,t.timeout)},{path:"/dashboard",template:"partials/dashboard.htm",title:"Your anonymizations \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Oa(e,t.http,t.location,t.promises,t.window,t.quotaService)},{path:"/pr-dashboard",redirect:"/dashboard"},{path:"/anonymize/:repoId?",template:"partials/anonymize.htm",title:"New anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/pull-request-anonymize/:pullRequestId?",template:"partials/anonymize.htm",title:"Anonymize a pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/gist-anonymize/:gistId?",template:"partials/anonymize.htm",title:"Anonymize a gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/status/:repoId",template:"partials/status.htm",title:"Repository status \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Aa(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Pa(e,t.http,t.location)},{path:"/conference/new",template:"partials/newConference.htm",title:"New conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>xo(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId/edit",template:"partials/newConference.htm",title:"Edit conference \u2013 Anon Line truncated
anonymous_github`)])])])])]),m(" Limitations "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-exclamation-triangle mr-2"}),y("Limitations ")]),s("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-limitations",href:"#limitation","aria-expanded":"false","aria-controls":"limitation"}," What are the limitations of Anonymous GitHub? ")])]),s("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[s("div",{class:"panel-body p-3"},[s("ul",null,[s("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),s("li",null," Files larger than 8 MB are not supported. "),s("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),s("li",null," The anonymization of terms within source code may change the behavior of the program (e.g., if a replaced term appears in a string literal or identifier). ")])])])])]),m(" Privacy & Security "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-shield-alt mr-2"}),y("Privacy & Security ")]),s("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),s("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[s("div",{class:"panel-body p-3"},[s("p",null," Data stored on Anonymous GitHub is never shared or used for any purpose beyond providing the anonymization service. When a repository is removed or expires, only its configuration is retained \u2014 this makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#permissions","aria-expanded":"false","aria-controls":"permissions"}," Why does GitHub say Anonymous GitHub asks for write access? ")])]),s("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub only reads your repositories \u2014 it never pushes commits, opens issues, modifies settings, or deletes anything. From your perspective as a user, the service is read-only. "),s("p",null,[y(" However, GitHub's OAuth scopes do not offer a read-only option for private repositories: the only scope that grants access to private repos is "),s("code",null,"repo"),y(", which is documented as full read/write access. To support users who want to anonymize a private repository, Anonymous GitHub must request that scope, and GitHub then displays the broader permission text at sign-in. The application itself only ever performs read operations against the GitHub API. ")]),s("p",null,[y(" If you only anonymize public repositories, the source code is open and can be audited on the "),s("a",{href:"https://github.com/tdurieux/anonymous_github/",target:"_blank"},"GitHub repository"),y(", or you can self-host your own instance. ")])])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#viewer","aria-expanded":"false","aria-controls":"viewer"}," Can repository owners see who viewed their anonymized repository? ")])]),s("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[s("div",{class:"panel-body p-3"},[s("p",null," No. Only the total number of views is tracked as an incremental counter. It is not possible for the repository owner or for Anonymous GitHub to identify individual viewers. Reviewer anonymity is fully preserved. ")])])])]),m(" Self-Hosting "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-server mr-2"}),y("Self-Hosting ")]),s("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-ho Line truncated
anonymized repository often think it is about the paper, so the
label names the service and the tooltip says who to contact. `),t[12]||(t[12]=s("li",{class:"nav-item d-none d-lg-block"},[s("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[s("i",{class:"fas fa-bug d-lg-none mr-1","aria-hidden":"true"}),y("Report a bug ")])],-1)),e.isDarkMode?m("v-if",!0):(l(),d("li",IT,[s("a",{class:"nav-link nav-icon",href:"#",title:"Switch to dark mode","aria-label":"Switch to dark mode",role:"button",onClick:t[0]||(t[0]=be(o=>{e.darkMode(!0)},["prevent"]))},[...t[7]||(t[7]=[s("i",{class:"fas fa-moon","aria-hidden":"true"},null,-1)])])])),e.isDarkMode?(l(),d("li",VT,[s("a",{class:"nav-link nav-icon",href:"#",title:"Switch to light mode","aria-label":"Switch to light mode",role:"button",onClick:t[1]||(t[1]=be(o=>{e.darkMode(!1)},["prevent"]))},[...t[8]||(t[8]=[s("i",{class:"fas fa-sun","aria-hidden":"true"},null,-1)])])])):m("v-if",!0),e.user?m("v-if",!0):(l(),d("li",PT,[...t[9]||(t[9]=[s("a",{class:"nav-link btn-signin",target:"_self",href:"/github/login","data-offset":"30"},[s("i",{class:"fab fa-github mr-1"}),y(" Sign in ")],-1)])])),e.user?(l(),d("li",qT,[s("a",MT,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,$T)):m("v-if",!0),s("span",FT,c(e.user?.username),1)]),s("div",LT,[s("h6",UT,"Signed in as @"+c(e.user?.username),1),t[10]||(t[10]=Ee('<a class="dropdown-item" href="/profile"><i class="fas fa-sliders-h" aria-hidden="true"></i><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/claim"><i class="fas fa-link" aria-hidden="true"></i><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><i class="fas fa-bug" aria-hidden="true"></i><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="/api/user/logout" target="_self"><i class="fas fa-sign-out-alt" aria-hidden="true"></i><span>Sign out</span></a>',7))])])):m("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,zT)):m("v-if",!0)],64)}var HT={class:"paper-landing"},BT={class:"paper-hero"},GT={class:"paper-hero-copy"},jT={class:"paper-cta-row"},WT={key:0,href:"/github/login",target:"_self",class:"btn-hero"},KT={key:1,href:"/anonymize",class:"btn-hero"},YT={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},xT={class:"paper-stats-grid"},JT={class:"paper-stat-value"},QT={class:"paper-stat-label"},XT=["viewBox"],ZT=["x","y","width","height"],eO={key:1,class:"paper-stat-delta"},tO={class:"paper-features paper-wrap","aria-label":"Product features"},sO={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},nO=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],oO={class:"paper-eyebrow"},rO={class:"paper-feature-title"},iO={class:"paper-feature-more"},aO={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},lO=["href","target"],dO={class:"paper-features-stage"},uO=["id","aria-labelledby"],cO={class:"paper-frame"},pO={class:"paper-frame-bar","aria-hidden":"true"},fO={class:"url"},mO=["src","alt"],hO={class:"paper-footer"},vO={class:"paper-footer-inner"},yO={class:"paper-footer-col"},gO={key:0,href:"/dashboard"},bO={key:1,href:"/conferences"},wO={class:"paper-footer-foot"};function ll(e,t){return l(),d("div",HT,[m(" Hero: copy on the left, the product on the right "),s("section",BT,[s("div",GT,[t[2]||(t[2]=s("div",{class:"paper-eyebrow"},"For double-blind peer review",-1)),t[3]||(t[3]=s("h1",{class:"hero-title"},[y(" Share the code,"),s("br"),s("span",{class:"accent"},"not the author.")],-1)),t[4]||(t[4]=s("p",{class:"hero-subtitle"}," Anonymous GitHub makes a read-only mirror of your repository, pull request, or gist with every trace of identity removed, so you can attach a link to your submission without breaking anonymity. ",-1)),s("div",jT,[e.user?m("v-if",!0):(l(),d("a",WT,[...t[0]||(t[0]=[s("i",{class:"fab fa-github mr-2","aria-hidden":"true"},null,-1),y("Sign in with GitHub ",-1)])])),e.user?(l(),d("a",KT," Anonymize a repository \u2192 ")):m("v-if",!0),t[1]||(t[1]=s("a",{class:"paper-link-arrow",target:"_self",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389 Line truncated
label names the service and the tooltip says who to contact. `),t[12]||(t[12]=s("li",{class:"nav-item d-none d-lg-block"},[s("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[s("i",{class:"fas fa-bug d-lg-none mr-1","aria-hidden":"true"}),y("Report a bug ")])],-1)),e.isDarkMode?m("v-if",!0):(l(),d("li",IT,[s("a",{class:"nav-link nav-icon",href:"#",title:"Switch to dark mode","aria-label":"Switch to dark mode",role:"button",onClick:t[0]||(t[0]=be(o=>{e.darkMode(!0)},["prevent"]))},[...t[7]||(t[7]=[s("i",{class:"fas fa-moon","aria-hidden":"true"},null,-1)])])])),e.isDarkMode?(l(),d("li",VT,[s("a",{class:"nav-link nav-icon",href:"#",title:"Switch to light mode","aria-label":"Switch to light mode",role:"button",onClick:t[1]||(t[1]=be(o=>{e.darkMode(!1)},["prevent"]))},[...t[8]||(t[8]=[s("i",{class:"fas fa-sun","aria-hidden":"true"},null,-1)])])])):m("v-if",!0),e.user?m("v-if",!0):(l(),d("li",PT,[...t[9]||(t[9]=[s("a",{class:"nav-link btn-signin",target:"_self",href:"/github/login","data-offset":"30"},[s("i",{class:"fab fa-github mr-1"}),y(" Sign in ")],-1)])])),e.user?(l(),d("li",qT,[s("a",MT,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,$T)):m("v-if",!0),s("span",FT,c(e.user?.username),1)]),s("div",LT,[s("h6",UT,"Signed in as @"+c(e.user?.username),1),t[10]||(t[10]=Ee('<a class="dropdown-item" href="/profile"><i class="fas fa-sliders-h" aria-hidden="true"></i><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/claim"><i class="fas fa-link" aria-hidden="true"></i><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><i class="fas fa-bug" aria-hidden="true"></i><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="/api/user/logout" target="_self"><i class="fas fa-sign-out-alt" aria-hidden="true"></i><span>Sign out</span></a>',7))])])):m("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,zT)):m("v-if",!0)],64)}var HT={class:"paper-landing"},BT={class:"paper-hero"},GT={class:"paper-hero-copy"},jT={class:"paper-cta-row"},WT={key:0,href:"/github/login",target:"_self",class:"btn-hero"},KT={key:1,href:"/anonymize",class:"btn-hero"},YT={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},xT={class:"paper-stats-grid"},JT={class:"paper-stat-value"},QT={class:"paper-stat-label"},XT=["viewBox"],ZT=["x","y","width","height"],eO={key:1,class:"paper-stat-delta"},tO={class:"paper-features paper-wrap","aria-label":"Product features"},sO={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},nO=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],oO={class:"paper-eyebrow"},rO={class:"paper-feature-title"},iO={class:"paper-feature-more"},aO={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},lO=["href","target"],dO={class:"paper-features-stage"},uO=["id","aria-labelledby"],cO={class:"paper-frame"},pO={class:"paper-frame-bar","aria-hidden":"true"},fO={class:"url"},mO=["src","alt"],hO={class:"paper-footer"},vO={class:"paper-footer-inner"},yO={class:"paper-footer-col"},gO={key:0,href:"/dashboard"},bO={key:1,href:"/conferences"},wO={class:"paper-footer-foot"};function ll(e,t){return l(),d("div",HT,[m(" Hero: copy on the left, the product on the right "),s("section",BT,[s("div",GT,[t[2]||(t[2]=s("div",{class:"paper-eyebrow"},"For double-blind peer review",-1)),t[3]||(t[3]=s("h1",{class:"hero-title"},[y(" Share the code,"),s("br"),s("span",{class:"accent"},"not the author.")],-1)),t[4]||(t[4]=s("p",{class:"hero-subtitle"}," Anonymous GitHub makes a read-only mirror of your repository, pull request, or gist with every trace of identity removed, so you can attach a link to your submission without breaking anonymity. ",-1)),s("div",jT,[e.user?m("v-if",!0):(l(),d("a",WT,[...t[0]||(t[0]=[s("i",{class:"fab fa-github mr-2","aria-hidden":"true"},null,-1),y("Sign in with GitHub ",-1)])])),e.user?(l(),d("a",KT," Anonymize a repository \u2192 ")):m("v-if",!0),t[1]||(t[1]=s("a",{class:"paper-link-arrow",target:"_self",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389 Line truncated
MIT CSAIL
jane.smith@example.org`},wV={id:"termsHelp",class:"form-text text-muted"},kV={class:"invalid-feedback"},_V={id:"settings-display",class:"paper-settings-section"},EV={class:"form-group paper-check-list"},CV={class:"form-check"},NV={class:"form-check-input",type:"checkbox",id:"link",name:"link"},SV={class:"form-check"},DV={class:"form-check-input",type:"checkbox",id:"image",name:"image"},RV={class:"form-check"},TV={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},OV={class:"form-check"},AV={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},IV={id:"settings-features",class:"paper-settings-section"},VV={class:"form-group paper-check-list"},PV={class:"form-check"},qV={class:"form-check-input",type:"checkbox",id:"page",name:"page"},MV={class:"form-check"},$V={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},FV={class:"form-check"},LV={class:"form-check-input",type:"checkbox",id:"update",name:"update"},UV={class:"form-group"},zV={class:"form-control",id:"mode",name:"mode"},HV={class:"form-text text-muted"},BV={id:"settings-expiration",class:"paper-settings-section"},GV={class:"form-group"},jV={class:"form-control",id:"expiration",name:"expiration"},WV={class:"paper-settings-footer"},KV={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},YV=["textContent"],xV={class:"paper-settings-actions"},JV=["disabled"],QV={key:0,class:"fas fa-check mr-1","aria-hidden":"true"},XV={id:"settings-account",class:"paper-settings-section"},ZV={class:"paper-account-card"},eP=["src"],tP={class:"paper-account-identity"},sP={class:"paper-account-name"},nP={class:"paper-danger-zone"},oP={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},rP=["textContent"],iP=["disabled"];function fl(e,t){let o=ge("paper-scrollspy"),r=ge("field"),n=ge("form");return l(),d("div",ZI,[t[47]||(t[47]=Ee('<div class="paper-crumbs"><a href="/dashboard">My work</a> \xA0/\xA0 <span class="here">Settings</span></div><h1 class="paper-page-title">Your <em>settings</em></h1><p class="paper-page-lede">Defaults applied to every new anonymization, your quotas, and your account.</p>',3)),s("div",eV,[E((l(),d("aside",tV,[...t[2]||(t[2]=[Ee('<div class="paper-settings-toc-head">On this page</div><nav><a href="#settings-quota">Quota</a><a href="#settings-terms">Terms to redact</a><a href="#settings-display">Display</a><a href="#settings-features">Features</a><a href="#settings-expiration">Expiration</a><a href="#settings-account">Account</a></nav>',2)])])),[[o]]),s("div",sV,[m(" Quota: same markup as the dashboard, driven by quotaService "),s("section",nV,[t[4]||(t[4]=s("div",{class:"paper-section-eyebrow"},"Quota",-1)),t[5]||(t[5]=s("p",{class:"paper-section-copy"},"What you are using across all your anonymizations. Conferences can lift these limits during a review window.",-1)),e.quota?(l(),d("div",oV,[(l(),d(x,null,re([{key:"repository",label:"Repositories",kind:"count"},{key:"storage",label:"Storage",kind:"bytes"},{key:"file",label:"Files",kind:"count"}],(i,a)=>s("div",rV,[s("div",iV,[s("span",aV,c(i?.label),1),i?.kind==="count"?(l(),d("span",lV,[y(c(e.fmt?.number(e.quota[i?.key].used)),1),e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("span",dV," / "+c(e.fmt?.number(e.quota[i?.key].total)),1)),e.quota[i?.key].unlimited?(l(),d("span",uV,"Unlimited")):m("v-if",!0)])):m("v-if",!0),i?.kind==="bytes"?(l(),d("span",cV,[y(c(e.fmt?.humanFileSize(e.quota[i?.key].used)),1),e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("span",pV," / "+c(e.fmt?.humanFileSize(e.quota[i?.key].total)),1)),e.quota[i?.key].unlimited?(l(),d("span",fV,"Unlimited")):m("v-if",!0)])):m("v-if",!0)]),s("div",{class:T(["quota-track","quota-"+e.quota[i?.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":i?.label+" quota","aria-valuenow":e.quota[i?.key].used,"aria-valuemax":e.quota[i?.key].unlimited?e.quota[i?.key].used:e.quota[i?.key].total,"aria-valuetext":e.quota[i?.key].unlimited?"unlimited":e.fmt.number(e.quota[i?.key].percent,0)+"% used"},[e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("div",{key:0,class:"quota-fill",style:Ae({width:e.quota[i?.key].percent+"%"})},null,4))],10,mV)])),64))])):m("v-if",!0),e.quota?m("v-if",!0):(l(),d("div",hV,[(l(),d(x,null,re([1,2,3],(i,a)=>s("div",vV,[...t[3]||(t[3]=[s("div",{class:"quota-header"},[s("span",{class:"skeleton skeleton-line",style:{width:"40%"}}),s("span",{class:"skeleton skeleton-line",style:{width:"25%"}})],-1),s("div",{class:"quota-track"},null,-1)])])),64))]))]),E((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[0]||(t[0]=be(i=>e.submitForm(i,()=>{e.saveDefault(i)}),["prevent"]))},[s("section",yV,[t[11]||(t[11]=s("div",{class:"paper-section-eyebrow"},"Terms to redact",-1)),t[12]||(t[12]=s("p",{class:"paper-section-copy"},"Pre-filled in every new anonymization. You can still edit the list per anonymization.",-1)),s("div",gV,[t[10]||(t[10]=s("label",{class:"paper-field-label",for:"terms"},"Default terms",-1)),E(s("tex Line truncated
`);for(let g=0;g<v.length;g++){let f=v[g];if(f.startsWith("diff --git")){h(),p();continue}if(f.startsWith("--- ")){i&&i.lines.length&&h(),p().oldPath=f.replace(/^--- (a\/)?/,"").trim();continue}if(f.startsWith("+++ ")){p().newPath=f.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(f.startsWith("index ")||f.startsWith("similarity index")||f.startsWith("rename ")||f.startsWith("new file mode")||f.startsWith("deleted file mode")||f.startsWith("Binary files"))){if(f.startsWith("@@")){let w=f.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);w&&(a=parseInt(w[1],10),u=parseInt(w[2],10)),p().lines.push({kind:"hunk",oldNo:"",newNo:"",text:f});continue}i&&(f.startsWith("+")?(i.lines.push({kind:"add",oldNo:"",newNo:u,text:f.slice(1)}),u++):f.startsWith("-")?(i.lines.push({kind:"remove",oldNo:a,newNo:"",text:f.slice(1)}),a++):(i.lines.push({kind:"ctx",oldNo:a,newNo:u,text:f.startsWith(" ")?f.slice(1):f}),a++,u++))}}return o(n,i),n.join("")}})({trustAsHtml:e=>e});function y3(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function g3(e){return String(e??"").toUpperCase()}function b3(e,t,o=0){return(e||[]).slice(o,o+t)}function w3(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function k3(e,t){if(!t)return e||[];let o=Array.isArray(t)?t:[t];return[...e||[]].sort((r,n)=>{for(let i of o){let a=i[0]==="-"?-1:1;i=i.replace(/^[+-]/,"");let u=i.split(".").reduce((h,v)=>h?.[v],r),p=i.split(".").reduce((h,v)=>h?.[v],n);if(typeof u=="string"&&(u=u.toLowerCase()),typeof p=="string"&&(p=p.toLowerCase()),u!==p)return(u==null?-1:p==null?1:u<p?-1:1)*a}return 0})}function _3(e,t){if(!e)return"";let o=new Date(e);if(isNaN(o))return String(e);if(!t||t==="mediumDate")return o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let r={yyyy:o.getFullYear(),MMM:o.toLocaleDateString(void 0,{month:"short"}),MM:String(o.getMonth()+1).padStart(2,"0"),dd:String(o.getDate()).padStart(2,"0"),d:o.getDate(),HH:String(o.getHours()).padStart(2,"0"),mm:String(o.getMinutes()).padStart(2,"0"),ss:String(o.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,n=>r[n])}function E3(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var wl={ERRORS:{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:"Unknown error, contact the admin.",unreachable:"Anonymous GitHub is unreachable, contact the admin.",request_error:"Unable to download the file, check your connection or contact the admin.",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:"The repository was not found on GitHub. Check the URL and spelling, make sure you are signed in to the account that can see it, and confirm the repo isn't hidden under an org that restricts third-party app access.",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 Line truncated
jane.smith@example.org`},wV={id:"termsHelp",class:"form-text text-muted"},kV={class:"invalid-feedback"},_V={id:"settings-display",class:"paper-settings-section"},EV={class:"form-group paper-check-list"},CV={class:"form-check"},NV={class:"form-check-input",type:"checkbox",id:"link",name:"link"},SV={class:"form-check"},DV={class:"form-check-input",type:"checkbox",id:"image",name:"image"},RV={class:"form-check"},TV={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},OV={class:"form-check"},AV={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},IV={id:"settings-features",class:"paper-settings-section"},VV={class:"form-group paper-check-list"},PV={class:"form-check"},qV={class:"form-check-input",type:"checkbox",id:"page",name:"page"},MV={class:"form-check"},$V={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},FV={class:"form-check"},LV={class:"form-check-input",type:"checkbox",id:"update",name:"update"},UV={class:"form-group"},zV={class:"form-control",id:"mode",name:"mode"},HV={class:"form-text text-muted"},BV={id:"settings-expiration",class:"paper-settings-section"},GV={class:"form-group"},jV={class:"form-control",id:"expiration",name:"expiration"},WV={class:"paper-settings-footer"},KV={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},YV=["textContent"],xV={class:"paper-settings-actions"},JV=["disabled"],QV={key:0,class:"fas fa-check mr-1","aria-hidden":"true"},XV={id:"settings-account",class:"paper-settings-section"},ZV={class:"paper-account-card"},eP=["src"],tP={class:"paper-account-identity"},sP={class:"paper-account-name"},nP={class:"paper-danger-zone"},oP={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},rP=["textContent"],iP=["disabled"];function fl(e,t){let o=ge("paper-scrollspy"),r=ge("field"),n=ge("form");return l(),d("div",ZI,[t[47]||(t[47]=Ee('<div class="paper-crumbs"><a href="/dashboard">My work</a> \xA0/\xA0 <span class="here">Settings</span></div><h1 class="paper-page-title">Your <em>settings</em></h1><p class="paper-page-lede">Defaults applied to every new anonymization, your quotas, and your account.</p>',3)),s("div",eV,[E((l(),d("aside",tV,[...t[2]||(t[2]=[Ee('<div class="paper-settings-toc-head">On this page</div><nav><a href="#settings-quota">Quota</a><a href="#settings-terms">Terms to redact</a><a href="#settings-display">Display</a><a href="#settings-features">Features</a><a href="#settings-expiration">Expiration</a><a href="#settings-account">Account</a></nav>',2)])])),[[o]]),s("div",sV,[m(" Quota: same markup as the dashboard, driven by quotaService "),s("section",nV,[t[4]||(t[4]=s("div",{class:"paper-section-eyebrow"},"Quota",-1)),t[5]||(t[5]=s("p",{class:"paper-section-copy"},"What you are using across all your anonymizations. Conferences can lift these limits during a review window.",-1)),e.quota?(l(),d("div",oV,[(l(),d(x,null,re([{key:"repository",label:"Repositories",kind:"count"},{key:"storage",label:"Storage",kind:"bytes"},{key:"file",label:"Files",kind:"count"}],(i,a)=>s("div",rV,[s("div",iV,[s("span",aV,c(i?.label),1),i?.kind==="count"?(l(),d("span",lV,[y(c(e.fmt?.number(e.quota[i?.key].used)),1),e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("span",dV," / "+c(e.fmt?.number(e.quota[i?.key].total)),1)),e.quota[i?.key].unlimited?(l(),d("span",uV,"Unlimited")):m("v-if",!0)])):m("v-if",!0),i?.kind==="bytes"?(l(),d("span",cV,[y(c(e.fmt?.humanFileSize(e.quota[i?.key].used)),1),e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("span",pV," / "+c(e.fmt?.humanFileSize(e.quota[i?.key].total)),1)),e.quota[i?.key].unlimited?(l(),d("span",fV,"Unlimited")):m("v-if",!0)])):m("v-if",!0)]),s("div",{class:T(["quota-track","quota-"+e.quota[i?.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":i?.label+" quota","aria-valuenow":e.quota[i?.key].used,"aria-valuemax":e.quota[i?.key].unlimited?e.quota[i?.key].used:e.quota[i?.key].total,"aria-valuetext":e.quota[i?.key].unlimited?"unlimited":e.fmt.number(e.quota[i?.key].percent,0)+"% used"},[e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("div",{key:0,class:"quota-fill",style:Ae({width:e.quota[i?.key].percent+"%"})},null,4))],10,mV)])),64))])):m("v-if",!0),e.quota?m("v-if",!0):(l(),d("div",hV,[(l(),d(x,null,re([1,2,3],(i,a)=>s("div",vV,[...t[3]||(t[3]=[s("div",{class:"quota-header"},[s("span",{class:"skeleton skeleton-line",style:{width:"40%"}}),s("span",{class:"skeleton skeleton-line",style:{width:"25%"}})],-1),s("div",{class:"quota-track"},null,-1)])])),64))]))]),E((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[0]||(t[0]=be(i=>e.submitForm(i,()=>{e.saveDefault(i)}),["prevent"]))},[s("section",yV,[t[11]||(t[11]=s("div",{class:"paper-section-eyebrow"},"Terms to redact",-1)),t[12]||(t[12]=s("p",{class:"paper-section-copy"},"Pre-filled in every new anonymization. You can still edit the list per anonymization.",-1)),s("div",gV,[t[10]||(t[10]=s("label",{class:"paper-field-label",for:"terms"},"Default terms",-1)),E(s("tex Line truncated
`);for(let g=0;g<v.length;g++){let f=v[g];if(f.startsWith("diff --git")){h(),p();continue}if(f.startsWith("--- ")){i&&i.lines.length&&h(),p().oldPath=f.replace(/^--- (a\/)?/,"").trim();continue}if(f.startsWith("+++ ")){p().newPath=f.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(f.startsWith("index ")||f.startsWith("similarity index")||f.startsWith("rename ")||f.startsWith("new file mode")||f.startsWith("deleted file mode")||f.startsWith("Binary files"))){if(f.startsWith("@@")){let w=f.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);w&&(a=parseInt(w[1],10),u=parseInt(w[2],10)),p().lines.push({kind:"hunk",oldNo:"",newNo:"",text:f});continue}i&&(f.startsWith("+")?(i.lines.push({kind:"add",oldNo:"",newNo:u,text:f.slice(1)}),u++):f.startsWith("-")?(i.lines.push({kind:"remove",oldNo:a,newNo:"",text:f.slice(1)}),a++):(i.lines.push({kind:"ctx",oldNo:a,newNo:u,text:f.startsWith(" ")?f.slice(1):f}),a++,u++))}}return o(n,i),n.join("")}})({trustAsHtml:e=>e});function y3(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function g3(e){return String(e??"").toUpperCase()}function b3(e,t,o=0){return(e||[]).slice(o,o+t)}function w3(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function k3(e,t){if(!t)return e||[];let o=Array.isArray(t)?t:[t];return[...e||[]].sort((r,n)=>{for(let i of o){let a=i[0]==="-"?-1:1;i=i.replace(/^[+-]/,"");let u=i.split(".").reduce((h,v)=>h?.[v],r),p=i.split(".").reduce((h,v)=>h?.[v],n);if(typeof u=="string"&&(u=u.toLowerCase()),typeof p=="string"&&(p=p.toLowerCase()),u!==p)return(u==null?-1:p==null?1:u<p?-1:1)*a}return 0})}function _3(e,t){if(!e)return"";let o=new Date(e);if(isNaN(o))return String(e);if(!t||t==="mediumDate")return o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let r={yyyy:o.getFullYear(),MMM:o.toLocaleDateString(void 0,{month:"short"}),MM:String(o.getMonth()+1).padStart(2,"0"),dd:String(o.getDate()).padStart(2,"0"),d:o.getDate(),HH:String(o.getHours()).padStart(2,"0"),mm:String(o.getMinutes()).padStart(2,"0"),ss:String(o.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,n=>r[n])}function E3(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var wl={ERRORS:{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:"Unknown error, contact the admin.",unreachable:"Anonymous GitHub is unreachable, contact the admin.",request_error:"Unable to download the file, check your connection or contact the admin.",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:"The repository was not found on GitHub. Check the URL and spelling, make sure you are signed in to the account that can see it, and confirm the repo isn't hidden under an org that restricts third-party app access.",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 Line truncated
/*! Bundled license information:
@vue/shared/dist/shared.esm-bundler.js:
+64
View File
@@ -88,6 +88,70 @@ describe("Vue 3 UI", function () {
expect(ui.errors).to.deep.equal([]);
});
for (const type of ["gist", "pr", "repo"]) {
for (const status of ["removed", "expired", "error", "ready"]) {
it(`submits ${status} ${type} edits and exposes invalid expiration dates`, async function () {
const route = { gist: "gist-anonymize", pr: "pull-request-anonymize", repo: "anonymize" }[type];
const source = { gist: { gistId: "311fc9" }, pr: { repositoryFullName: "owner/repo", pullRequestId: 1 }, repo: { fullName: "owner/repo", branch: "main", commit: "abcdef123" } }[type];
const endpoint = `/api/${type}/test`;
ui = await browser(`/${route}/test`, {
[endpoint]: request => request.method === "POST" ? {} : { status, source, options: { terms: [], update: false, expirationDate: "2000-01-01" } },
"/api/gist/source/311fc9": { files: [], comments: [] },
"/api/pr/owner/repo/1": { pullRequest: { title: "Test", body: "", comments: [] } },
"/api/repo/owner/repo/": { defaultBranch: "main" },
"/api/repo/owner/repo/branches": [{ name: "main", commit: "abcdef123" }],
"/api/repo/owner/repo/readme": "",
});
const button = [...ui.window.document.querySelectorAll("button")].find(b => b.textContent.includes("Update "));
const posts = () => ui.requests.filter(r => r.method === "POST" && r.url.pathname === endpoint);
button.click();
await delay(10);
expect(posts()).to.have.length(0);
expect(ui.window.document.activeElement.id).to.equal("expirationDate");
const future = new Date();
future.setDate(future.getDate() + 30);
await ui.input("#expirationDate", future.toISOString().slice(0, 10), "change");
button.click();
await delay(20);
expect(posts()).to.have.length(1);
expect(ui.window.document.querySelector("#commit") === null).to.equal(type !== "repo");
expect(ui.errors).to.deep.equal([]);
});
}
}
for (const type of ["gist", "pr"]) {
it(`creates a new ${type} with auto-update disabled`, async function () {
const sourceUrl = type === "gist" ? "https://gist.github.com/311fc9" : "https://github.com/owner/repo/pull/1";
ui = await browser("/anonymize", {
"/api/gist/source/311fc9": { files: [], comments: [] },
"/api/pr/owner/repo/1": { pullRequest: { title: "Test", body: "", comments: [] } },
});
const input = await ui.input("#sourceUrl", sourceUrl);
input.dispatchEvent(new ui.window.Event("blur"));
await delay(40);
expect(ui.window.document.querySelector("#update").checked).to.equal(false);
const button = [...ui.window.document.querySelectorAll("button[type=submit]")][0];
button.click();
await delay(20);
expect(ui.requests.filter(r => r.method === "POST" && r.url.pathname === `/api/${type}/`)).to.have.length(1);
expect(ui.errors).to.deep.equal([]);
});
}
it("still rejects a missing commit for a repository with auto-update disabled", async function () {
ui = await browser("/anonymize/test", {
"/api/repo/test": { source: { fullName: "owner/repo", branch: "main", commit: "abcdef123" }, options: { terms: [], update: false } },
"/api/repo/owner/repo/": { defaultBranch: "main" },
"/api/repo/owner/repo/branches": [{ name: "main", commit: "abcdef123" }],
"/api/repo/owner/repo/readme": "",
});
await ui.input("#commit", "");
ui.window.document.querySelector("button[type=submit]").click();
expect(ui.requests.filter(r => r.method === "POST" && r.url.pathname === "/api/repo/test")).to.have.length(0);
expect(ui.window.document.activeElement.id).to.equal("commit");
});
it("loads document libraries on demand and reuses them across navigation", async function () {
ui = await browser("/dashboard");
expect(ui.assets.filter(url => url.endsWith(".js"))).to.deep.equal([]);