perf: bound request work and resource usage (#866)

* perf: bound request work and resource usage

* fix: address performance review regressions

* fix: guard content expiration and dashboard state

* fix: tolerate cache outages and retire derived paths

* fix: revalidate expiration claims and status pagination

* fix: retry interrupted repository metadata cleanup

* fix: retire obsolete content cache storage

* fix: activate tree metadata and recheck expiration claims

* fix: fence cache publication across expiration

* fix: recover staged trees and enforce cache lifecycle cleanup

* fix: prune expired transforms during database outages

* fix: finish conference removals and reload expiration candidates
This commit is contained in:
Thomas Durieux authored and GitHub committed 2026-10-08 03:38:19 +01:00
1 parent 32722169a2
commit 6434337923
74 files changed
+4752 -553

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"core.min.js": "core.3b07189932.min.js",
"vendor.min.js": "vendor.7e58c2ba4a.min.js",
"vendor.min.js": "vendor.9e4516e8b9.min.js",
"mermaid.min.js": "mermaid.f848a72d16.min.js",
"all.min.css": "all.947ab87f1c.min.css",
"markdown.min.js": "markdown.44f2e93820.min.js",
+4
View File
@@ -1,5 +1,9 @@
{
"ERRORS": {
"cache_busy": "Downloads are busy. Please try again shortly.",
"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": "Unknown error, contact the admin.",
+11 -5
View File
@@ -94,8 +94,8 @@
<button type="button" :aria-pressed="projectView === 'attention'" @click="setProjectView('attention')" :aria-label="'Needs attention ' + attentionCount()"><span class="dashboard-attention-prefix">Needs </span><span>attention</span> <span class="attention-count" :class="{'has-attention': attentionCount() > 0}">{{ attentionCount() }}</span></button>
</div>
<span class="dashboard-count">
<span v-if="filteredItems?.length === items?.length">{{ fmt?.number(items?.length) }} project<span v-if="items?.length !== 1">s</span></span>
<span v-if="filteredItems?.length !== items?.length">{{ fmt?.number(filteredItems?.length) }} of {{ fmt?.number(items?.length) }} shown</span>
<span v-if="(dashboardTotals?.filtered ?? filteredItems?.length) === (dashboardTotals?.total ?? items?.length)">{{ fmt?.number(dashboardTotals?.total ?? items?.length) }} project<span v-if="(dashboardTotals?.total ?? items?.length) !== 1">s</span></span>
<span v-else>{{ fmt?.number(dashboardTotals?.filtered ?? filteredItems?.length) }} of {{ fmt?.number(dashboardTotals?.total ?? items?.length) }} shown</span>
</span>
<div class="dashboard-active-filters">
<template v-for="(v, f, index) in filters?.status"><button type="button" class="filter-chip" v-if="v === false" @click="filters.status[f] = true" :aria-label="'Show ' + statusKeyLabels[f] + ' again'" :title="'Show ' + statusKeyLabels[f] + ' again'">{{ statusKeyLabels[f] }} hidden<svg class="project-type-svg" aria-hidden="true"><use href="#project-icon-close"></use></svg></button></template>
@@ -246,13 +246,19 @@
<div class="paper-table-empty" v-if="!loading &amp;&amp; filteredItems?.length == 0">
<svg class="project-type-svg project-empty-icon" aria-hidden="true"><use href="#project-icon-inbox"></use></svg>
<span v-if="items?.length == 0">You have no anonymizations yet.</span>
<span v-if="items?.length &gt; 0">Nothing matches the current filters.</span>
<span v-if="!hasProjects()">You have no anonymizations yet.</span>
<span v-if="hasProjects()">Nothing matches the current filters.</span>
<div class="paper-table-empty-actions">
<button type="button" class="btn btn-outline-ink" v-if="hasActiveFilters()" @click="clearFilters()">Clear filters</button>
<a href="/anonymize" class="btn btn-ink" v-if="items?.length == 0"><svg class="project-type-svg" aria-hidden="true"><use href="#project-icon-plus"></use></svg> New anonymization</a>
<a href="/anonymize" class="btn btn-ink" v-if="!hasProjects()"><svg class="project-type-svg" aria-hidden="true"><use href="#project-icon-plus"></use></svg> New anonymization</a>
</div>
</div>
</div>
</div>
<div class="dashboard-pagination" v-if="dashboardCursor || dashboardError">
<p role="alert" v-if="dashboardError">{{ dashboardError }}</p>
<button type="button" class="btn" v-if="dashboardCursor" @click="loadMoreProjects()" :disabled="loadingMore">
{{ loadingMore ? 'Loading…' : 'Load more projects' }}
</button>
</div>
</div>
+90 -16
View File
@@ -461,7 +461,8 @@ export const unifiedDashboardController = function (state, http, location, promi
state.nameMessage = "";
state.needsAttention = item => item.status === "error" || item._broken
|| (statusKey(item.status) === "progress" && item._stale);
state.attentionCount = () => state.items.filter(state.needsAttention).length;
state.attentionCount = () => state.dashboardTotals?.attention ?? state.items.filter(state.needsAttention).length;
state.hasProjects = () => (state.dashboardTotals?.total ?? state.items.length) > 0;
state.setProjectView = view => {
state.projectView = view;
if (view === "attention") {
@@ -496,6 +497,13 @@ export const unifiedDashboardController = function (state, http, location, promi
item.projectName = res.data.name;
item._label = item.projectName || item._fallbackLabel;
if (state.selectedProject === item) state.nameMessage = name ? "Project name saved." : "Default project name restored.";
if (!legacyDashboard) {
state.dashboardCursor = null;
await loadAll();
if (state.selectedProject === item) {
state.selectedProject = state.items.find(current => current._type === item._type && current._id === item._id) || null;
}
}
} catch (_) {
if (state.selectedProject === item) state.nameError = "The project name could not be saved. Try again.";
} finally { state.nameSaving = false; }
@@ -681,7 +689,7 @@ export const unifiedDashboardController = function (state, http, location, promi
// All three lists load in parallel and are merged once, so the table
// does not re-sort three times while it fills in.
function loadAll() {
function loadLegacy() {
state.loading = true;
return promises
.all([
@@ -740,6 +748,55 @@ export const unifiedDashboardController = function (state, http, location, promi
state.loading = false;
});
}
let dashboardGeneration = 0;
let legacyDashboard = false;
state.dashboardCursor = null;
state.dashboardError = "";
function decorateSummary(item) {
const src = item.source || {};
if (item._type === "repo") return decorateItem(item, item.repoId, item.repoId, src.fullName, "/anonymize/" + item.repoId, "/r/" + item.repoId + "/");
if (item._type === "pr") return decorateItem(item, item.pullRequestId, item.pullRequestId,
src.repositoryFullName ? src.repositoryFullName + "#" + src.pullRequestId : undefined,
"/pull-request-anonymize/" + item.pullRequestId, "/pr/" + item.pullRequestId + "/");
return decorateItem(item, item.gistId, item.gistId, src.gistId, "/gist-anonymize/" + item.gistId, "/gist/" + item.gistId + "/");
}
function loadAll(append = false) {
if (legacyDashboard) return loadLegacy();
const generation = ++dashboardGeneration;
state.loading = !append;
state.loadingMore = append;
state.dashboardError = "";
return http.get("/api/user/dashboard", { params: {
q: state.search, type: state.typeFilter, sort: state.orderBy,
statuses: Object.keys(state.filters.status).filter(key => state.filters.status[key] !== false).join(",") || "none",
attention: String(state.projectView === "attention"),
cursor: append ? state.dashboardCursor : undefined,
} }).then(response => {
if (generation !== dashboardGeneration) return;
// Compatibility with servers that have not gained the summary API.
if (!Array.isArray(response.data?.items)) { legacyDashboard = true; return loadLegacy(); }
state.items = (append ? state.items : []).concat(response.data.items.map(decorateSummary));
state.dashboardCursor = response.data.cursor;
state.dashboardTotals = response.data;
}, error => {
if (generation !== dashboardGeneration) return;
if (error.status === 404) { legacyDashboard = true; return loadLegacy(); }
state.dashboardError = "Projects could not be loaded. Please try again.";
}).finally(() => {
if (generation === dashboardGeneration) { state.loading = false; state.loadingMore = false; }
});
}
state.loadMoreProjects = () => loadAll(true);
let reloadTimer;
state.watchGroup(["search", "typeFilter", "orderBy", "projectView"], () => {
if (legacyDashboard) return;
if (reloadTimer) timers.timeout.cancel(reloadTimer);
reloadTimer = timers.timeout(() => loadAll(), 150);
}, false);
state.watch("filters", () => {
if (!legacyDashboard) loadAll();
}, true, false);
state.on("dispose", () => { dashboardGeneration++; });
loadAll();
// Whole row opens the anonymized view; clicks on links, buttons and the
@@ -773,17 +830,32 @@ export const unifiedDashboardController = function (state, http, location, promi
});
};
function waitRepoToBeReady(repoId, callback, onError) {
http.get("/api/repo/" + repoId).then((res) => {
function waitRepoToBeReady(repoId, callback, onError, previousStatus) {
http.get("/api/repo/" + repoId).then(async (res) => {
let statusChanged = previousStatus !== undefined && previousStatus !== res.data.status;
for (const item of state.items) {
if (item._type === "repo" && item.repoId == repoId) {
statusChanged = statusChanged || item.status !== res.data.status;
const neededAttention = state.needsAttention(item);
item.status = res.data.status;
item.statusMessage = res.data.statusMessage;
item._statusKey = statusKey(item.status);
if (item._statusKey !== "progress") item._stale = false;
const needsAttention = state.needsAttention(item);
if (state.dashboardTotals && neededAttention !== needsAttention) {
state.dashboardTotals.attention = Math.max(0, state.dashboardTotals.attention + (needsAttention ? 1 : -1));
}
break;
}
}
if (statusChanged && !legacyDashboard) {
state.dashboardCursor = null;
const selected = state.selectedProject;
await loadAll();
if (selected && state.selectedProject === selected) {
state.selectedProject = state.items.find(item => item._type === selected._type && item._id === selected._id) || null;
}
}
if (
res.data.status == "ready" ||
res.data.status == "error" ||
@@ -793,7 +865,7 @@ export const unifiedDashboardController = function (state, http, location, promi
callback(res.data);
return;
}
timers.timeout(() => waitRepoToBeReady(repoId, callback, onError), 2500);
timers.timeout(() => waitRepoToBeReady(repoId, callback, onError, res.data.status), 2500);
}, onError);
}
@@ -819,7 +891,7 @@ export const unifiedDashboardController = function (state, http, location, promi
toast.title = `${item._id} is removed.`;
toast.body = `The ${label} ${item._id} is removed.`;
});
}, undefined, item.status);
} else {
toast.title = `${item._id} is removed.`;
toast.body = `The ${label} ${item._id} is removed.`;
@@ -860,7 +932,7 @@ export const unifiedDashboardController = function (state, http, location, promi
toast.title = `${item._id} is refreshed.`;
toast.body = `The ${label} ${item._id} is refreshed.`;
}, onError);
}, onError, item.status);
} else {
toast.title = `${item._id} is refreshed.`;
toast.body = `The ${label} ${item._id} is refreshed.`;
@@ -887,7 +959,7 @@ export const unifiedDashboardController = function (state, http, location, promi
toast.title = `${item._id} is extended.`;
toast.body = `The expiration of ${label} ${item._id} is extended by 6 months.`;
});
}, undefined, item.status);
} else {
toast.title = `${item._id} is extended.`;
toast.body = `The expiration of ${label} ${item._id} is extended by 6 months.`;
@@ -2065,6 +2137,14 @@ export const anonymizeController = function (state, http, html, params, location
export const exploreController = function (state, http, location, params, html, promises) {
const timers = createTimers();
const listen = createListeners();
state.on("dark-mode", (event, on) => {
if (!state.aceOption) return;
if (on) {
state.aceOption.theme = "nord_dark";
} else {
state.aceOption.theme = "chrome";
}
});
let contentGeneration = 0;
let destroyed = false;
state.on("dispose", () => {
@@ -2618,7 +2698,7 @@ export const exploreController = function (state, http, location, params, html,
e.stop();
});
listen(window, "hashchange", () => applyHashFromUrl(false));
const removeHashListener = listen(window, "hashchange", () => applyHashFromUrl(false));
_editor.setFontSize(state.aceOption.fontSize);
_editor.setReadOnly(state.aceOption.readOnly);
@@ -2649,15 +2729,9 @@ export const exploreController = function (state, http, location, params, html,
_editor.session.setTabSize(state.aceOption.tabSize);
_editor.setBehavioursEnabled(state.aceOption.enableBehaviours);
_editor.setFadeFoldWidgets(state.aceOption.fadeFoldWidgets);
return removeHashListener;
},
};
state.on("dark-mode", (event, on) => {
if (on) {
state.aceOption.theme = "nord_dark";
} else {
state.aceOption.theme = "chrome";
}
});
if (state.isDarkMode) {
state.aceOption.theme = "nord_dark";
}
+2 -2
View File
@@ -95,7 +95,7 @@ export const codeEditor = {
el._editor = editor;
editor.setValue(String(latest.content ?? ""), -1);
applyEditorOptions(el, latest.options);
latest.options?.onLoad?.(editor);
el._editorCleanup = latest.options?.onLoad?.(editor);
} catch (error) {
if (!el._editorDisposed) el.textContent = error.message;
}
@@ -106,7 +106,7 @@ export const codeEditor = {
if (el._editor.getValue() !== String(value.content ?? "")) el._editor.setValue(String(value.content ?? ""), -1);
applyEditorOptions(el, value.options);
},
beforeUnmount(el) { el._editorDisposed = true; el._editor?.destroy(); },
beforeUnmount(el) { el._editorDisposed = true; el._editorCleanup?.(); el._editor?.destroy(); },
};
function applyEditorOptions(el, options = {}) {
const mode = editorModes.has(options.mode) ? options.mode : "text";
+57 -39
View File
@@ -33,6 +33,21 @@ export default {
// Bumped on every load so pages still resolving from a previous
// document are dropped instead of appended to the new one.
let generation = 0;
let loadingTask = null;
const renders = new Map();
let rendering = 0;
function releaseSlot(slot) {
const record = renders.get(slot);
if (record) {
record.cancelled = true;
record.task?.cancel?.();
renders.delete(slot);
}
const canvas = slot.querySelector("canvas");
if (canvas) { canvas.width = 0; canvas.height = 0; }
slot.innerHTML = "";
delete slot.dataset.state;
}
// ---------------------------------------------------------------
// Toolbar
@@ -183,6 +198,8 @@ export default {
// ---------------------------------------------------------------
function teardown() {
generation++;
slots.forEach(releaseSlot);
if (loadingTask) { Promise.resolve(loadingTask.destroy?.()).catch(() => {}); loadingTask = null; }
if (resizeTimer) {
clearTimeout(resizeTimer);
resizeTimer = null;
@@ -214,7 +231,7 @@ export default {
// Match the canvas backing store to the device pixel ratio, else text
// is visibly soft on HiDPI screens.
function renderPage(page, slot) {
function renderPage(page, slot, record) {
const ratio = window.devicePixelRatio || 1;
const unscaled = page.getViewport({ scale: 1 });
const cssWidth = parseFloat(slot.style.width);
@@ -231,11 +248,12 @@ export default {
slot.appendChild(canvas);
// The placeholder height was an estimate; the canvas is now the
// authority on how tall this page is.
slot.style.height = "";
return page.render({
slot.style.height = canvas.style.height;
record.task = page.render({
canvasContext: canvas.getContext("2d"),
viewport: viewport,
}).promise;
});
return record.task.promise;
}
function renderVisible() {
@@ -249,36 +267,35 @@ export default {
const view = pages.getBoundingClientRect();
const top = view.top - PRERENDER_MARGIN;
const bottom = view.top + pages.clientHeight + PRERENDER_MARGIN;
slots.forEach(function (slot, i) {
if (slot.dataset.state) return;
const rect = slot.getBoundingClientRect();
if (rect.top > bottom || rect.bottom < top) return;
const visible = slots.map((slot, i) => ({ slot, i, rect: slot.getBoundingClientRect() }))
.filter(item => item.rect.top <= bottom && item.rect.bottom >= top)
.sort((a, b) => Math.abs(a.rect.top - view.top) - Math.abs(b.rect.top - view.top)).slice(0, 6);
const keep = new Set(visible.map(item => item.slot));
for (const slot of renders.keys()) if (!keep.has(slot)) releaseSlot(slot);
for (const { slot, i } of visible) {
if (slot.dataset.state || rendering >= 2) continue;
const record = { cancelled: false, task: null };
renders.set(slot, record);
rendering++;
slot.dataset.state = "rendering";
doc
.getPage(i + 1)
.then(function (page) {
if (myGeneration !== generation) return;
return renderPage(page, slot);
})
.then(function () {
if (myGeneration !== generation) return;
slot.dataset.state = "done";
// A real page height replaces an estimate, moving everything
// below it — re-pin the page the reader asked for.
if (anchorPage && Date.now() < anchorUntil) {
scrollToPage(anchorPage);
}
// The shift can also bring further pages into view. Called
// directly rather than through schedule() so this doesn't
// depend on a frame callback firing.
renderVisible();
})
.catch(function () {
// A single unrenderable page shouldn't blank the whole
// document — leave the placeholder empty and move on.
slot.dataset.state = "failed";
});
});
let page;
doc.getPage(i + 1).then(value => {
page = value;
if (record.cancelled || myGeneration !== generation) return;
return renderPage(page, slot, record);
}).then(() => {
if (record.cancelled || myGeneration !== generation) return;
slot.dataset.state = "done";
if (anchorPage && Date.now() < anchorUntil) scrollToPage(anchorPage);
}).catch(() => {
if (!record.cancelled && myGeneration === generation) slot.dataset.state = "failed";
}).finally(() => {
rendering--;
page?.cleanup?.();
if (doc) renderVisible();
});
}
}
function schedule() {
@@ -309,6 +326,8 @@ export default {
// whatever is on screen. Used for zoom changes and window resizes,
// both of which invalidate canvases rasterised at the old width.
function relayout() {
generation++;
slots.forEach(releaseSlot);
const width = pageWidth();
slots.forEach(function (slot) {
delete slot.dataset.state;
@@ -320,7 +339,7 @@ export default {
}
function setZoom(value) {
if (!doc || value === zoom) return;
if (!doc || !slots.length || value === zoom) return;
const anchor = currentPage;
zoom = value;
syncToolbar();
@@ -333,7 +352,7 @@ export default {
if (resizeTimer) clearTimeout(resizeTimer);
resizeTimer = setTimeout(function () {
resizeTimer = null;
if (doc) relayout();
if (doc && slots.length) relayout();
}, 250);
}
@@ -342,8 +361,7 @@ export default {
if (!url) return;
const myGeneration = generation;
pdfjsLib
.getDocument({
loadingTask = pdfjsLib.getDocument({
url: url,
isEvalSupported: false,
// Needed for PDFs that reference the 14 standard fonts without
@@ -352,8 +370,8 @@ export default {
standardFontDataUrl: "/script/external/pdf-standard-fonts/",
cMapUrl: "/script/external/pdf-cmaps/",
cMapPacked: true,
})
.promise.then(function (_doc) {
});
loadingTask.promise.then(function (_doc) {
if (myGeneration !== generation) {
_doc.destroy();
return;
+11 -6
View File
@@ -19,14 +19,14 @@ export function createPageState(parent = null, events = new Map()) {
});
Object.defineProperty(own, "parent", { value: parent, configurable: true });
Object.defineProperty(own, "viewState", { get: () => state });
state.watch = (source, callback, deep = false) => {
state.watch = (source, callback, deep = false, immediate = true) => {
const read = typeof source === "function" ? () => source(state) : () => getPath(state, source);
const stop = watch(read, callback, { deep, flush: "post" });
cleanups.push(stop);
nextTick(() => { if (!disposed) callback(read(), read()); });
if (immediate) nextTick(() => { if (!disposed) callback(read(), read()); });
return stop;
};
state.watchGroup = (sources, callback) => state.watch(() => sources.map(s => getPath(state, s)), callback, true);
state.watchGroup = (sources, callback, immediate = true) => state.watch(() => sources.map(s => getPath(state, s)), callback, true, immediate);
state.on = (name, callback) => {
if (name === "dispose") { cleanups.push(callback); return () => {}; }
if (!events.has(name)) events.set(name, new Set());
@@ -69,10 +69,15 @@ export function createTimers() {
}
export function createListeners() {
const cleanups = [];
onScopeDispose(() => cleanups.forEach(fn => fn()));
const cleanups = new Set();
onScopeDispose(() => { cleanups.forEach(fn => fn()); cleanups.clear(); });
return (target, type, callback, options) => {
target.addEventListener(type, callback, options);
cleanups.push(() => target.removeEventListener(type, callback, options));
const off = () => {
target.removeEventListener(type, callback, options);
cleanups.delete(off);
};
cleanups.add(off);
return off;
};
}
+22 -22
View File
@@ -1,30 +1,30 @@
"use strict";(()=>{var xl=Object.defineProperty;var ed=(e,t)=>{for(var n in t)xl(e,n,{get:t[n],enumerable:!0})};var pe=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var fe={notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",markdown:"/script/markdown.44f2e93820.min.js",editor:"/script/editor.4f142d3adc.min.js"};var us=new Map,sd=fe;function Jt(e){if(!us.has(e)){let t=document.createElement("script");t.src=sd[e];let n=new Promise((r,s)=>{t.onload=r,t.onerror=()=>{us.delete(e),t.remove(),s(new Error(`Unable to load ${e}. Please retry.`))}});us.set(e,n),document.head.appendChild(t)}return us.get(e)}async function lr(){await Jt("editor"),ace.config.set("basePath","/script/external/ace/")}function po(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return n=>n in t}var Ie={},Qt=[],at=()=>{},sn=()=>!1,fo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),mo=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Oo=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},nd=Object.prototype.hasOwnProperty,De=(e,t)=>nd.call(e,t),be=Array.isArray,$t=e=>Io(e)==="[object Map]",co=e=>Io(e)==="[object Set]",dr=e=>Io(e)==="[object Date]";var we=e=>typeof e=="function",ze=e=>typeof e=="string",mt=e=>typeof e=="symbol",Ae=e=>e!==null&&typeof e=="object",nn=e=>(Ae(e)||we(e))&&we(e.then)&&we(e.catch),pr=Object.prototype.toString,Io=e=>pr.call(e),rn=e=>Io(e).slice(8,-1),cs=e=>Io(e)==="[object Object]",ps=e=>ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ho=po(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var fs=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},rd=/-\w/g,Je=fs(e=>e.replace(rd,t=>t.slice(1).toUpperCase())),id=/\B([A-Z])/g,St=fs(e=>e.replace(id,"-$1").toLowerCase()),Xt=fs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Po=fs(e=>e?`on${Xt(e)}`:""),gt=(e,t)=>!Object.is(e,t),vo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ms=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Vo=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var ur,qo=()=>ur||(ur=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Me(e){if(be(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],s=ze(r)?ud(r):Me(r);if(s)for(let i in s)t[i]=s[i]}return t}else if(ze(e)||Ae(e))return e}var ad=/;(?![^(]*\))/g,ld=/:([^]+)/,dd=/\/\*[^]*?\*\//g;function ud(e){let t={};return e.replace(dd,"").split(ad).forEach(n=>{if(n){let r=n.split(ld);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function A(e){let t="";if(ze(e))t=e;else if(be(e))for(let n=0;n<e.length;n++){let r=A(e[n]);r&&(t+=r+" ")}else if(Ae(e))for(let n in e)e[n]&&(t+=n+" ");return t.trim()}var fr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",mr=po(fr),cd=po(fr+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function hs(e){return!!e||e===""}function pd(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=go(e[r],t[r]);return n}function cr(e,t){if(e.size!==t.size)return!1;let n=Array.from(t),r=new Uint8Array(n.length);for(let s of e){let i=-1;for(let a=0;a<n.length;a++)if(!r[a]&&go(s,n[a])){i=a;break}if(i<0)return!1;r[i]=1}return!0}function go(e,t){if(e===t)return!0;let n=dr(e),r=dr(t);if(n||r)returLine truncated
`))),e[Bs]=ji(s);let i=r||s.props&&s.props.type==="number";So(e,t?"change":"input",a=>{a.target.composing||e[Bs](Fn(e.value,n,i))}),(n||i)&&So(e,"change",()=>{e.value=Fn(e.value,n,i)}),t||(So(e,"compositionstart",oc),So(e,"compositionend",Gi),So(e,"change",Gi))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let s=t??"",i=e[js];delete e[js],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[Bs](Fn(e.value,n,r)):e.value=s},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},a){if(e[Bs]=ji(a),e.composing)return;let u=(i||e.type==="number")&&!/^0\d/.test(e.value)?Vo(e.value):e.value,m=t??"";if(u===m)return;let h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===m)||(e.value=m)}};var sc=["ctrl","shift","alt","meta"],nc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>sc.some(n=>e[`${n}Key`]&&!t.includes(n))},ce=(e,t)=>{if(!e)return e;let n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=((s,...i)=>{for(let a=0;a<t.length;a++){let u=nc[t[a]];if(u&&u(s,t))return}return e(s,...i)}))},rc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},No=(e,t)=>{let n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=(s=>{if(!("key"in s))return;let i=St(s.key);if(t.some(a=>a===i||rc[a]===i))return e(s)}))},ic=Ge({patchProp:xu},$u),Wi;function ac(){return Wi||(Wi=Ni(ic))}var Qi=((...e)=>{let t=ac().createApp(...e),{mount:n}=t;return t.mount=r=>{let s=dc(r);if(!s)return;let i=t._component;!we(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");let a=n(s,!1,lc(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},t});function lc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function dc(e){return ze(e)?document.querySelector(e):e}var lo=typeof document<"u";function Zi(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function uc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Zi(e.default)}var Oe=Object.assign;function Ws(e,t){let n={};for(let r in t){let s=t[r];n[r]=wt(s)?s.map(e):e(s)}return n}var Ro=()=>{},wt=Array.isArray;function jn(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var xi=/#/g,cc=/&/g,pc=/\//g,fc=/=/g,mc=/\?/g,ea=/\+/g,hc=/%5B/g,vc=/%5D/g,ta=/%5E/g,gc=/%60/g,oa=/%7B/g,yc=/%7C/g,sa=/%7D/g,bc=/%20/g;function Gn(e){return e==null?"":encodeURI(""+e).replace(yc,"|").replace(hc,"[").replace(vc,"]")}function na(e){return Gn(e).replace(oa,"{").replace(sa,"}").replace(ta,"^")}function Hn(e){return Gn(e).replace(ea,"%2B").replace(bc,"+").replace(xi,"%23").replace(cc,"%26").replace(gc,"`").replace(oa,"{").replace(sa,"}").replace(ta,"^")}function wc(e){return Hn(e).replace(fc,"%3D")}function kc(e){return Gn(e).replace(xi,"%23").replace(mc,"%3F")}function ra(e){return kc(e).replace(pc,"%2F")}function Do(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var Ec=/\/$/,Cc=e=>e.replace(Ec,"");function Ks(e,t,n="/"){let r,s={},i="",a="",u=t.indexOf("#"),m=t.indexOf("?");return m=u>=0&&m>u?-1:m,m>=0&&(r=t.slice(0,m),i=t.slice(m,u>0?u:t.length),s=e(i.slice(1))),u>=0&&(r=r||t.slice(0,u),a=t.slice(u,t.length)),r=Sc(r??t,n),{fullPath:r+i+a,path:r,query:s,hash:Do(a)}}function ia(e,t){let n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Wn(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function aa(e,t,n){let r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&io(t.matched[r],n.matched[s])&&Kn(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function io(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Kn(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!_c(e[n],t[n]))return!1;return!0}function _c(e,t){return wt(e)?Xi(e,t):wt(t)?Xi(t,e):e?.valueOf()===t?.valueOf()}function Xi(e,t){return wt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Sc(e,t){if(e.startsWith("/"))return e;if(!e)return t;let n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let i=n.length-1,a,u;for(a=0;a<r.length;a++)if(u=r[a],u!==".")if(u==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(a).join("/")}var Wt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Ys=(function(e){return e.pop="pop",e.push="push",e})({}),Js=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function la(e){if(!e)if(lo){let t=document.querLine truncated
"use strict";(()=>{var xl=Object.defineProperty;var ed=(e,t)=>{for(var n in t)xl(e,n,{get:t[n],enumerable:!0})};var me=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var ve={notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",markdown:"/script/markdown.44f2e93820.min.js",editor:"/script/editor.4f142d3adc.min.js"};var us=new Map,sd=ve;function Jt(e){if(!us.has(e)){let t=document.createElement("script");t.src=sd[e];let n=new Promise((r,s)=>{t.onload=r,t.onerror=()=>{us.delete(e),t.remove(),s(new Error(`Unable to load ${e}. Please retry.`))}});us.set(e,n),document.head.appendChild(t)}return us.get(e)}async function lr(){await Jt("editor"),ace.config.set("basePath","/script/external/ace/")}function po(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return n=>n in t}var Pe={},Qt=[],at=()=>{},sn=()=>!1,fo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ho=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Oo=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},nd=Object.prototype.hasOwnProperty,De=(e,t)=>nd.call(e,t),be=Array.isArray,$t=e=>Io(e)==="[object Map]",co=e=>Io(e)==="[object Set]",dr=e=>Io(e)==="[object Date]";var we=e=>typeof e=="function",ze=e=>typeof e=="string",ht=e=>typeof e=="symbol",Te=e=>e!==null&&typeof e=="object",nn=e=>(Te(e)||we(e))&&we(e.then)&&we(e.catch),pr=Object.prototype.toString,Io=e=>pr.call(e),rn=e=>Io(e).slice(8,-1),cs=e=>Io(e)==="[object Object]",ps=e=>ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,mo=po(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var fs=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},rd=/-\w/g,Je=fs(e=>e.replace(rd,t=>t.slice(1).toUpperCase())),id=/\B([A-Z])/g,St=fs(e=>e.replace(id,"-$1").toLowerCase()),Xt=fs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Po=fs(e=>e?`on${Xt(e)}`:""),gt=(e,t)=>!Object.is(e,t),vo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},hs=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Vo=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var ur,qo=()=>ur||(ur=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Me(e){if(be(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],s=ze(r)?ud(r):Me(r);if(s)for(let i in s)t[i]=s[i]}return t}else if(ze(e)||Te(e))return e}var ad=/;(?![^(]*\))/g,ld=/:([^]+)/,dd=/\/\*[^]*?\*\//g;function ud(e){let t={};return e.replace(dd,"").split(ad).forEach(n=>{if(n){let r=n.split(ld);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function A(e){let t="";if(ze(e))t=e;else if(be(e))for(let n=0;n<e.length;n++){let r=A(e[n]);r&&(t+=r+" ")}else if(Te(e))for(let n in e)e[n]&&(t+=n+" ");return t.trim()}var fr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",hr=po(fr),cd=po(fr+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function ms(e){return!!e||e===""}function pd(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=go(e[r],t[r]);return n}function cr(e,t){if(e.size!==t.size)return!1;let n=Array.from(t),r=new Uint8Array(n.length);for(let s of e){let i=-1;for(let a=0;a<n.length;a++)if(!r[a]&&go(s,n[a])){i=a;break}if(i<0)return!1;r[i]=1}return!0}function go(e,t){if(e===t)return!0;let n=dr(e),r=dr(t);if(n||r)returLine truncated
`))),e[js]=Bi(s);let i=r||s.props&&s.props.type==="number";So(e,t?"change":"input",a=>{a.target.composing||e[js](Fn(e.value,n,i))}),(n||i)&&So(e,"change",()=>{e.value=Fn(e.value,n,i)}),t||(So(e,"compositionstart",oc),So(e,"compositionend",Gi),So(e,"change",Gi))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let s=t??"",i=e[Bs];delete e[Bs],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[js](Fn(e.value,n,r)):e.value=s},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},a){if(e[js]=Bi(a),e.composing)return;let u=(i||e.type==="number")&&!/^0\d/.test(e.value)?Vo(e.value):e.value,f=t??"";if(u===f)return;let m=e.getRootNode();(m instanceof Document||m instanceof ShadowRoot)&&m.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===f)||(e.value=f)}};var sc=["ctrl","shift","alt","meta"],nc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>sc.some(n=>e[`${n}Key`]&&!t.includes(n))},he=(e,t)=>{if(!e)return e;let n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=((s,...i)=>{for(let a=0;a<t.length;a++){let u=nc[t[a]];if(u&&u(s,t))return}return e(s,...i)}))},rc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},No=(e,t)=>{let n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=(s=>{if(!("key"in s))return;let i=St(s.key);if(t.some(a=>a===i||rc[a]===i))return e(s)}))},ic=Ge({patchProp:xu},$u),Wi;function ac(){return Wi||(Wi=Ni(ic))}var Qi=((...e)=>{let t=ac().createApp(...e),{mount:n}=t;return t.mount=r=>{let s=dc(r);if(!s)return;let i=t._component;!we(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");let a=n(s,!1,lc(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},t});function lc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function dc(e){return ze(e)?document.querySelector(e):e}var lo=typeof document<"u";function Zi(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function uc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Zi(e.default)}var Oe=Object.assign;function Ws(e,t){let n={};for(let r in t){let s=t[r];n[r]=wt(s)?s.map(e):e(s)}return n}var Ro=()=>{},wt=Array.isArray;function Bn(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var xi=/#/g,cc=/&/g,pc=/\//g,fc=/=/g,hc=/\?/g,ea=/\+/g,mc=/%5B/g,vc=/%5D/g,ta=/%5E/g,gc=/%60/g,oa=/%7B/g,yc=/%7C/g,sa=/%7D/g,bc=/%20/g;function Gn(e){return e==null?"":encodeURI(""+e).replace(yc,"|").replace(mc,"[").replace(vc,"]")}function na(e){return Gn(e).replace(oa,"{").replace(sa,"}").replace(ta,"^")}function Hn(e){return Gn(e).replace(ea,"%2B").replace(bc,"+").replace(xi,"%23").replace(cc,"%26").replace(gc,"`").replace(oa,"{").replace(sa,"}").replace(ta,"^")}function wc(e){return Hn(e).replace(fc,"%3D")}function kc(e){return Gn(e).replace(xi,"%23").replace(hc,"%3F")}function ra(e){return kc(e).replace(pc,"%2F")}function Do(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var Ec=/\/$/,Cc=e=>e.replace(Ec,"");function Ks(e,t,n="/"){let r,s={},i="",a="",u=t.indexOf("#"),f=t.indexOf("?");return f=u>=0&&f>u?-1:f,f>=0&&(r=t.slice(0,f),i=t.slice(f,u>0?u:t.length),s=e(i.slice(1))),u>=0&&(r=r||t.slice(0,u),a=t.slice(u,t.length)),r=Sc(r??t,n),{fullPath:r+i+a,path:r,query:s,hash:Do(a)}}function ia(e,t){let n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Wn(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function aa(e,t,n){let r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&io(t.matched[r],n.matched[s])&&Kn(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function io(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Kn(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!_c(e[n],t[n]))return!1;return!0}function _c(e,t){return wt(e)?Xi(e,t):wt(t)?Xi(t,e):e?.valueOf()===t?.valueOf()}function Xi(e,t){return wt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Sc(e,t){if(e.startsWith("/"))return e;if(!e)return t;let n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let i=n.length-1,a,u;for(a=0;a<r.length;a++)if(u=r[a],u!==".")if(u==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(a).join("/")}var Wt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Ys=(function(e){return e.pop="pop",e.push="push",e})({}),Js=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function la(e){if(!e)if(lo){let t=document.querLine truncated
${JSON.stringify(e)}${t?`
while being at
`+JSON.stringify(t):""}`},[je.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Ac(t)}" via a navigation guard.`},[je.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[je.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[je.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ao(e,t){return Oe(new Error,{type:e,[fa]:!0},t)}function Mt(e,t){return e instanceof Error&&fa in e&&(t==null||!!(e.type&t))}var Tc=["params","query","hash"];function Ac(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let n of Tc)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function ma(e){let t={};if(e===""||e==="?")return t;let n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){let s=n[r].replace(ea," "),i=s.indexOf("="),a=Do(i<0?s:s.slice(0,i)),u=i<0?null:Do(s.slice(i+1));if(a in t){let m=t[a];wt(m)||(m=t[a]=[m]),m.push(u)}else t[a]=u}return t}function Qn(e){let t="";for(let n in e){let r=e[n];if(n=wc(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(wt(r)?r.map(s=>s&&Hn(s)):[r&&Hn(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function ha(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=wt(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}var va=Symbol(""),Xn=Symbol(""),Qs=Symbol(""),Xs=Symbol(""),Zs=Symbol("");function To(){let e=[];function t(r){return e.push(r),()=>{let s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Gt(e,t,n,r,s,i=a=>a()){let a=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((u,m)=>{let h=f=>{f===!1?m(ao(je.NAVIGATION_ABORTED,{from:n,to:t})):f instanceof Error?m(f):Rc(f)?m(ao(je.NAVIGATION_GUARD_REDIRECT,{from:t,to:f})):(a&&r.enterCallbacks[s]===a&&typeof f=="function"&&a.push(f),u())},v=i(()=>e.call(r&&r.instances[s],t,n,h)),w=Promise.resolve(v);e.length<3&&(w=w.then(h)),w.catch(f=>m(f))})}function xs(e,t,n,r,s=i=>i()){let i=[];for(let a of e)for(let u in a.components){let m=a.components[u];if(!(t!=="beforeRouteEnter"&&!a.instances[u]))if(Zi(m)){let h=(m.__vccOpts||m)[t];h&&i.push(Gt(h,n,r,a,u,s))}else{let h=m();i.push(()=>h.then(v=>{if(!v)throw new Error(`Couldn't resolve component "${u}" at "${a.path}"`);let w=uc(v)?v.default:v;a.mods[u]=v,a.components[u]=w;let f=(w.__vccOpts||w)[t];return f&&Gt(f,n,r,a,u,s)()}))}}return i}function ga(e,t){let n=[],r=[],s=[],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=>io(h,u))?r.push(u):n.push(u));let m=e.matched[a];m&&(t.matched.find(h=>io(h,m))||s.push(m))}return[n,r,s]}var Oc=()=>location.protocol+"//"+location.host;function Ra(e,t){let{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let a=s.includes(e.slice(i))?e.slice(i).length:1,u=s.slice(a);return u[0]!=="/"&&(u="/"+u),Wn(u,"")}return Wn(n,e)+r+s}function Ic(e,t,n,r){let s=[],i=[],a=null,u=({state:f})=>{let b=Ra(e,location),C=n.value,k=t.value,R=0;if(f){if(n.value=b,t.value=f,a&&a===C){a=null;return}R=k?f.position-k.position:0}else r(b);s.forEach(D=>{D(n.value,C,{delta:R,type:Ys.pop,direction:R?R>0?Js.forward:Js.back:Js.unknown})})};function m(){a=n.value}function h(f){s.push(f);let b=()=>{let C=s.indexOf(f);C>-1&&s.splice(C,1)};return i.push(b),b}function v(){if(document.visibilityState==="hidden"){let{history:f}=window;if(!f.state)return;f.replaceState(Oe({},f.state,{scroll:ds()}),"")}}function w(){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:m,listen:h,destroy:w}}function ya(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?ds():null}}function Pc(e){let{history:t,location:n}=window,r={value:Ra(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(m,h,v){let w=e.indexOf("#"),f=w>-1?(n.host&&document.querySelector("base")?e:e.slice(w))+m:Oc()+e+m;try{t[v?"replaceState":"pushState"](h,"",f),s.value=h}catch(b){console.error(b),n[v?"replace":"assign"](f)}}function a(m,h){i(m,Oe({},t.state,ya(s.value.back,m,s.value.forward,!0),h,{position:s.value.position}),!0),r.value=m}function u(m,h){let v=Oe({},s.value,t.state,{forward:m,scroll:ds()});i(v.current,v,!0),i(m,Oe({},ya(r.value,m,null),{position:v.position+1},h),!1),r.value=m}return{location:r,state:s,push:u,replace:a}}function Ta(e){e=la(e);let t=Pc(e),n=Ic(e,t.state,t.location,t.replace);function r(i,a=!0){a||n.pauseListeners(),history.go(i)}let s=Oe({locatLine truncated
`)),e.options=Object.assign({},e.options,h.options),i.restore()})}a();let u=null;e.saveDefault=m=>{if(m&&m.preventDefault&&m.preventDefault(),e.saving)return;let h=i.checkpoint(),v={terms:e.terms.split(`
`).map(w=>w.trim()).filter(w=>w.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",v).then(()=>{i.accept(h),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",u&&r.cancel(u),u=r(()=>{e.message=null},2500)},w=>{e.saving=!1;let b="ERRORS."+(w&&w.data&&w.data.error);n(b).then(C=>{e.error=C&&C!==b?C:"Unable to save your defaults. Please try again."},()=>{e.error="Unable to save your defaults. Please try again."})})},e.deleteAccount=()=>{confirm("Delete your account? All your anonymized repositories, gists, and pull requests will be removed, and your personal data will be erased. This cannot be undone.")&&(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},La=function(e,t,n){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(r=>{n.url("/dashboard")},r=>{e.error=r.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},Ua=function(e,t,n,r,s){e.user&&!e.user.status&&n.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&n.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(u){e.feature=u},e.featureHref=function(u){return u.needsUser&&!e.user?"/signin":u.href},e.featureTarget=function(u){return u.needsUser&&!e.user?"_self":u.target||void 0},e.featureKeydown=function(u,m){let h={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[u.key];if(h===void 0)return;u.preventDefault();let v=e.features.length,w=h==="first"?0:h==="last"?v-1:(m+h+v)%v;e.feature=e.features[w].key,s(()=>{let f=r.document.getElementById("feature-tab-"+e.feature);f&&f.focus()})},e.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}];function i(){t.get("/api/stat/").then(u=>{e.stat=u.data,e.cards[0].total=u.data.nbRepositories,e.cards[1].total=u.data.nbUsers,e.cards[2].total=u.data.nbPageViews,e.cards[3].total=u.data.nbPullRequests})}i();function a(u){let m={series:u,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!u||u.length<2)return m;let h=new Array(u.length-1);for(let k=1;k<u.length;k++)h[k-1]=u[k]-u[k-1];let v=h.length,w=Math.max.apply(null,h),f=Math.min.apply(null,h),b=Math.min(0,f),C=w-b||1;m.viewW=v*2,m.bars=new Array(v);for(let k=0;k<v;k++){let R=(h[k]-b)/C,D=Math.max(1.5,R*34);m.bars[k]={x:(k*2+.25).toFixed(2),y:(36-D).toFixed(2),w:"1.5",h:D.toFixed(2)}}if(m.deltaToday=h[v-1],v>=2){let k=h[v-2];k&&(m.pctChange=(m.deltaToday-k)/k*100)}return m.pctAbs=Math.round(Math.abs(m.pctChange)),m.isUp=m.pctChange>=0,m}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(u=>{let m=u.data||[];e.history={repositories:a(m.map(h=>h.nbRepositories||0)),users:a(m.map(h=>h.nbUsers||0)),pageViews:a(m.map(h=>h.nbPageViews||0)),pullRequests:a(m.map(h=>h.nbPullRequests||0))}})},Fa=function(e,t,n,r,s,i){let a=ct();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.url("/"),a.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,rt(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Kt()(document,"click",_=>{e.quotaExpanded&&!_.target.closest?.(".dashboard-quota")&& Line truncated
`)),e.options=Object.assign({},e.options,M.options),e.options.expirationDate=M.options&&M.options.expirationDate?new Date(M.options.expirationDate):T(),!r.repoId&&!r.pullRequestId&&!r.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),E&&E()})}function I(E,P,M){e.anonymize&&e.anonymize[E]&&e.anonymize[E].setValidity(P,M)}function J(E){try{let P=parseGithubUrl(E);if(P&&P.owner&&P.repo)return P.owner+"/"+P.repo}catch{}return null}e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await ae()}catch{}}};function Y(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:J(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function K(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function B(){let E;try{E=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!E||E.path!==s.path()||Date.now()-E.savedAt>=30*6e4)return R.restore()?(e.sourceUrl&&await K(),!0):!1;R.restore();for(let P of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(E.draft,P)&&(e[P]=E.draft[P]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await K(),sessionStorage.removeItem("github-access-draft"),!0}O(()=>{!r.repoId&&!r.pullRequestId&&!r.gistId&&a(B,0),r.repoId&&r.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=r.repoId,t.get("/api/repo/"+e.repoId).then(async E=>{e.githubConnection=E.data.connection||"oauth",e.sourceUrl="https://github.com/"+E.data.source.fullName,e._originalFullName=E.data.source.fullName,e.terms=E.data.options.terms.filter(P=>P).join(`
`),e.source=E.data.source,e.role=E.data.role||"owner",e.coauthors=E.data.coauthors||[],e._originalBranch=E.data.source.branch,e.options=Object.assign({},e.options,E.data.options),e.conference=E.data.conference,e._originalConference=E.data.conference,e.repositoryID=E.data.source.repositoryID,e._originalRepositoryID=E.data.source.repositoryID,E.data.options.expirationDate&&(e.options.expirationDate=new Date(E.data.options.expirationDate)),C=k(parseGithubUrl(e.sourceUrl)),!await B()&&(await Promise.all([ae(),oe()]),ve())},()=>{s.url("/404")})),r.pullRequestId&&r.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=r.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async E=>{if(e.githubConnection=E.data.connection||"oauth",e.sourceUrl="https://github.com/"+E.data.source.repositoryFullName+"/pull/"+E.data.source.pullRequestId,e.terms=E.data.options.terms.filter(P=>P).join(`
`),e.source=E.data.source,e.options=Object.assign({},e.options,E.data.options),e.conference=E.data.conference,e._originalConference=E.data.conference,E.data.options.expirationDate&&(e.options.expirationDate=new Date(E.data.options.expirationDate)),C=k(parseGithubUrl(e.sourceUrl)),!await B())try{await me()}catch{}},()=>{s.url("/404")})),r.gistId&&r.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=r.gistId,t.get("/api/gist/"+e.gistId).then(async E=>{e.sourceUrl="https://gist.github.com/"+E.data.source.gistId,e.terms=E.data.options.terms.filter(P=>P).join(`
`),e.source=E.data.source,e.options=Object.assign({},e.options,E.data.options),e.conference=E.data.conference,e._originalConference=E.data.conference,E.data.options.expirationDate&&(e.options.expirationDate=new Date(E.data.options.expirationDate)),C=k(parseGithubUrl(e.sourceUrl)),!await B()&&await Se()},()=>{s.url("/404")}))}),t.get("/github/connections").then(E=>{e.githubConnections=E.data,!r.repoId&&!r.pullRequestId&&!r.gistId&&e.githubConnection===void 0&&E.data.appEnabled&&E.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&K())}).catch(()=>{}),e.urlSelected=async(E=!1)=>{let P=++m,M;try{M=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,he.cancel(),Ee.cancel(),Ve.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",I("sourceUrl","github",!1);return}let z=k(M),y=E||C===z;C=z,e.sourceUrlError="",I("sourceUrl","github",!0);let S=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,S&&a(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!y&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],y||(e.source={type:"GitHubStream",branch:"",commit:""}),he.cancel(),Ee.cancel(),Ve.cancel(),ie.clear(),Ce.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null,e.gistOAuthRequired=!1,e._preservingDraft=y;try{M.gistId&&!M.repo?(e.detectedType="gist",e.source={gistId:M.gistId},await Se()):M.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:M.owner+"/"+M.repo,pullRequestId:M.pullRequestId},await me()):(e.detectedType="repo",await Promise.all([ae(),oe()]),ve())}catch{}finally{P===m&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let E=e.branches.filter(M=>M.name==e.source.branch)[0];if(!E)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&!!e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=E.commit),e.readme=E.readme,await oe(),ve()}),e.getBranches=async E=>{let P=parseGithubUrl(e.sourceUrl),M=f();try{let z=await t.get(`/api/repo/${P.owner}/${P.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&r.repoId&&J(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,force:E===!0||e.reconnectingSource?"1":"0",repositoryID:Y()}});if(!w(M))return;e.branches=z.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let y=e.branches.filter(S=>S.name==e.source.branch);y.length>0&&(!(!e.reconnectingSource&&!E&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=y[0].commit),e.readme=y[0].readme,await oe(E))}catch(z){if(!w(M))return;e.branches=[],e.sourceUnreachable=z&&(z.status===404||z.data&&z.data.error==="repo_not_found");let y=z&&z.data&&z.data.error||(z&&z.status===404?"repo_not_found":"unknown_error");i("ERRORS."+y).then(S=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:S}),e.error=S},console.error),typeof I=="function"&&I("sourceUrl","missing",!1)}finally{b(M)}};async function ae(){let E=parseGithubUrl(e.sourceUrl),P=f();try{U();let M=await t.get(`/api/repo/${E.owner}/${E.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&r.repoId&&J(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,repositoryID:Y(),force:"1"}});if(!w(P))return;e.details=M.data,e.reconnectingSource&&(e.reconnectRepositoryId=e.details.externalId),e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches(e.reconnectingSource)}catch(M){if(!w(P))return;throw M.data&&(i("ERRORS."+M.data.error).then(z=>{e.addToast({title:"Error",date:new Date,body:z}),e.error=z},console.error),F(M.data.error)),I("sourceUrl","missing",!1),M}finally{b(P)}}async function oe(E){if(e.readme&&!E)return e.readme;let P=parseGithubUrl(e.sourceUrl),M=f();try{let z=await t.get(`/api/repo/${P.owner}/${P.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&r.repoId&&J(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,force:E===!0?"1":"0",branch:e.source.branch,repositoryID:Y()}});w(M,!0)&&(e.readme=z.data)}catch{w(M,!0)&&(e.readme="")}finally{b(M)}}function ne(){let E={terms:e.terms?e.terms.split(`
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(E.branchName=e.source.branch);try{let P=parseGithubUrl(e.sourceUrl);E.repoName=`${P.owner}/${P.repo}`}catch{}return E}function ue(E,P,M){let z=null,y=0,S=()=>{if(e.detectedType!==E)return;z&&a.cancel(z);let q=++y;e.previewStatus="loading",z=a(()=>{z=null;let H=P();if(!H){e.previewStatus="idle";return}t.post("/api/anonymize-preview",H).then(j=>{q===y&&(M(j.data,H),e.previewStatus="ready")}).catch(()=>{q===y&&(e.previewStatus="error")})},200)};return S.cancel=()=>{y++,z&&a.cancel(z),z=null},e.on("dispose",S.cancel),S}e.retryPreview=()=>{e.detectedType==="repo"&&he(),e.detectedType==="pr"&&Ee(),e.detectedType==="gist"&&Ve()};let he=ue("repo",()=>e.readme?{content:e.readme,options:ne()}:null,E=>{if(typeof E?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=E.content;let P="";try{let z=parseGithubUrl(e.sourceUrl),y=e.source.branch||e.details&&e.details.defaultBranch||"main";P=`https://github.com/${z.owner}/${z.repo}/raw/${y}/`}catch{}let M=renderMD(e.anonymize_readme,P);e.html_readme=M,a(Prism.highlightAll,150)});function ve(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),he())}async function me(){let E=parseGithubUrl(e.sourceUrl),P=f();try{U();let M=await t.get(`/api/pr/${E.owner}/${E.repo}/${E.pullRequestId}`,{params:{connection:e.githubConnection}});if(!w(P))return;e.details=M.data,e.pullRequestId||(e.pullRequestId=E.repo+"-PR"+E.pullRequestId+"-"+generateRandomId(4))}catch(M){if(!w(P))return;throw M.data&&(i("ERRORS."+M.data.error).then(z=>{e.addToast({title:"Error",date:new Date,body:z}),e.error=z},console.error),F(M.data.error)),I("sourceUrl","missing",!1),M}finally{b(P)}}let ie=He(new Map);function Pe(){let E=new Set,P=e.details&&e.details.pullRequest;if(!P)return E;typeof P.title=="string"&&E.add(P.title),typeof P.body=="string"&&E.add(P.body),typeof P.diff=="string"&&E.add(P.diff);let M=P.comments||[];for(let z of M)typeof z.author=="string"&&E.add(z.author),typeof z.body=="string"&&E.add(z.body);return E}let Ee=ue("pr",()=>{let E=Pe(),P=Array.from(E);return P.length===0?null:{contents:P,options:ne()}},(E,P)=>{if(!Array.isArray(E?.contents)||E.contents.length!==P.contents.length||E.contents.some(y=>typeof y!="string"))throw Error("Invalid preview response");let M=P.contents,z=new Map;for(let y=0;y<M.length&&y<E.contents.length;y++)z.set(M[y],E.contents[y]);ie.clear(),z.forEach((y,S)=>ie.set(S,y))});e.anonymizePrContent=function(E){return E&&(ie.has(E)?ie.get(E):"")};async function Se(){let E=parseGithubUrl(e.sourceUrl),P=f();try{if(U(),e.gistOAuthRequired=!1,e.githubConnections?.oauthConnected===!1){e.gistOAuthRequired=!0,I("sourceUrl","missing",!1);return}let M=await t.get(`/api/gist/source/${E.gistId}`);if(!w(P))return;e.details=M.data,e.gistId||(e.gistId="gist-"+E.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(M){if(!w(P))return;if(M.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,I("sourceUrl","missing",!1);return}throw M.data&&(i("ERRORS."+M.data.error).then(z=>{e.addToast({title:"Error",date:new Date,body:z}),e.error=z},console.error),F(M.data.error)),I("sourceUrl","missing",!1),M}finally{b(P)}}let Ce=He(new Map);function Te(){let E=new Set,P=e.details&&e.details.gist;if(!P)return E;typeof P.description=="string"&&E.add(P.description),typeof P.ownerLogin=="string"&&E.add(P.ownerLogin);let M=P.files||[];for(let y of M)typeof y.filename=="string"&&E.add(y.filename),typeof y.content=="string"&&E.add(y.content);let z=P.comments||[];for(let y of z)typeof y.author=="string"&&E.add(y.author),typeof y.body=="string"&&E.add(y.body);return E}let Ve=ue("gist",()=>{let E=Te(),P=Array.from(E);return P.length===0?null:{contents:P,options:ne()}},(E,P)=>{if(!Array.isArray(E?.contents)||E.contents.length!==P.contents.length||E.contents.some(y=>typeof y!="string"))throw Error("Invalid preview response");let M=P.contents,z=new Map;for(let y=0;y<M.length&&y<E.contents.length;y++)z.set(M[y],E.contents[y]);Ce.clear(),z.forEach((y,S)=>Ce.set(S,y)),Ue()});e.anonymizeGistContent=function(E){return E&&(Ce.has(E)?Ce.get(E):"")},e.previewGistFiles=[];function Ue(){let E=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=E.map(P=>({filename:e.anonymizeGistContent(P.filename),content:e.anonymizeGistContent(P.content),language:P.language}))}e.watch("details.gist.files",Ue,!0),e.watch("terms",Ue);function Fe(){let E=e.conference;if(e.conference_data=null,!E)return;let P=e.isUpdate&&E===e._originalConference;t.get("/api/conferences/"+E).then(M=>{e.conference===E&&(e.conference_data=M.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!P&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.conference_data.options.ima Line truncated
`).filter(S=>S),connection:e.githubConnection,fullName:`${M.owner}/${M.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(z.options.pageSource=e.details.pageSource),U();let y=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(y,z,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/status/"+e.repoId},S=>{S.data&&(i("ERRORS."+S.data.error).then(q=>{e.error=q},console.error),F(S.data.error))}).finally(()=>{P.disabled=!1})},e.anonymizeGist=E=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(te())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let P=E.currentTarget||E.target.closest?.("button")||E.target;P.disabled=!0;let M=parseGithubUrl(e.sourceUrl),z={gistId:e.gistId,terms:e.terms.trim().split(`
`).filter(S=>S),source:{gistId:M.gistId},options:e.options,conference:e.conference};U();let y=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(y,z,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/gist/"+e.gistId},S=>{S.data&&(i("ERRORS."+S.data.error).then(q=>{e.error=q},console.error),F(S.data.error))}).finally(()=>{P.disabled=!1})},e.anonymizePullRequest=E=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(te())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let P=E.currentTarget||E.target.closest?.("button")||E.target;P.disabled=!0;let M=parseGithubUrl(e.sourceUrl),z={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
`).filter(S=>S),source:{repositoryFullName:`${M.owner}/${M.repo}`,pullRequestId:M.pullRequestId},options:e.options,conference:e.conference};U();let y=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(y,z,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/pr/"+e.pullRequestId},S=>{S.data&&(i("ERRORS."+S.data.error).then(q=>{e.error=q},console.error),F(S.data.error))}).finally(()=>{P.disabled=!1})},e.watch("conference",()=>{Fe()}),e.watch("terms",()=>{e.detectedType==="repo"&&ve(),e.detectedType==="pr"&&Ee(),e.detectedType==="gist"&&Ve()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ve(),e.detectedType==="pr"&&Ee(),e.detectedType==="gist"&&Ve()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ve(),e.detectedType==="pr"&&Ee(),e.detectedType==="gist"&&Ve()}),e.watch("details",()=>{e.detectedType==="pr"&&Ee(),e.detectedType==="gist"&&Ve()},!0)},tr=function(e,t,n,r,s,i){let a=ct(),u=Kt(),m=0,h=!1;e.on("dispose",()=>{h=!0,m++,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(B){if((B.metaKey||B.ctrlKey)&&B.key==="k"){B.preventDefault();var ae=document.querySelector(".tree-search-input");ae&&(ae.focus(),ae.select())}});var v=null;e.onFileSearchChange=function(){v&&(v.resolve(),v=null);let B=e.fileSearchQuery;if(!B||B.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let ae=i.defer();v=ae,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(B)}`,{timeout:ae.promise}).then(function(oe){if(!(h||v!==ae)){v=null,e.fileSearchLoading=!1;var ne={};e.files.forEach(function(U){ne[(U.path||"")+"/"+U.name]=!0});for(var ue=[],he={},ve=0;ve<oe.data.length;ve++){var me=oe.data[ve];if(me.path)for(var ie=me.path.split("/"),Pe="",Ee=0;Ee<ie.length;Ee++){var Se=Pe;Pe=Pe?Pe+"/"+ie[Ee]:ie[Ee];var Ce=Se+"/"+ie[Ee];!ne[Ce]&&!he[Ce]&&(he[Ce]=!0,ue.push({name:ie[Ee],path:Se}))}}ue.sort(function(U,te){return(U.path||"").split("/").length-(te.path||"").split("/").length}),ue.length>0&&e.files.push.apply(e.files,ue);for(var Te=[],Ve=0;Ve<oe.data.length;Ve++){var Ue=oe.data[Ve],Fe=(Ue.path||"")+"/"+Ue.name;!ne[Fe]&&Ue.size!=null&&(Te.push(Ue),ne[Fe]=!0)}Te.length>0&&e.files.push.apply(e.files,Te),e.fileSearchResults=oe.data}},function(){!h&&v===ae&&(v=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let w={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},f=["license","txt"],b=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],C=["wav","mp3","ogg","wma","flac","aac","m4a"],k=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(B,ae){if(e.repoId!=r.repoId)return K();if((r.path||"")!=e.filePath){e.filePath=r.path||"",e.paths=e.filePath.split("/").filter(oe=>oe&&oe.trim().length>0),Y();for(let oe=0;oe<e.paths.length-1;oe++){let ne=oe>0?e.paths.slice(0,oe).join("/"):"";e.files.some(he=>he.path===ne)||e.getFiles(ne)}}});function R(){if(e.paths[0]!="")return;let B=["readme.md","readme.txt","readme.org","readme.1st","readme"],ae={};for(let ne of e.files)ne.name.toLowerCase().indexOf("readme")>-1&&(ae[ne.name.toLowerCase()]=ne.name);let oe=null;for(let ne of B)if(ae[ne]){oe=ne;break}if(!oe&&Object.keys(ae).length>0&&(oe=Object.keys(ae)[0]),oe){let ne=n.url();ne[ne.length-1]!="/"&&(ne+="/"),n.url(ne+encodePathForUrl(ae[oe]))}}e.fileCounts=null,e.getFiles=function(B){let ae=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(B)}&v=${e.options.lastUpdateDate}`).then(function(oe){if(h||ae!==e.repoId)return[];let ne=B||"";return e.files=e.files.filter(ue=>ue.path!==ne),e.files.push(...oe.data),oe.data},function(oe){if(h||ae!==e.repoId)return[];e.type="error",e.content=oe&&oe.data&&oe.data.error||"unknown_error",e.files=[]})};function D(){let B=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(ae){h||B!==e.repoId||(e.fileCounts=ae.data)},function(){e.fileCounts={}})}function T(){return e.files.filter(B=>B.name==e.paths[e.paths.length-1]&&B.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var V=null;e.on("dispose",function(){V&&a.interval.cancel(V)});function _(B){if(h)return;let ae=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(oe=>{if(!(h||ae!==e.repoId)){if(e.options=oe.data,e.options.url){window.location=e.options.url;return}B&&B(oe.data)}},oe=>{if(!(h||ae!==e.repoId)){var ne=oe.data||{};if(ne.error==="rate_limited"&&ne.resetAt){let he=function(){var ve=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(ve<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,V&&(a.interval.cancel(V),V=null),_(B);else{var me=Math.floor(ve/60),ie=ve%60;e.rateLimitCountdown=me>0?me+"m "+ie+"s":ie+"s"}};var ue=he;e.type="rate_limited",e.rateLimitResetAt=ne.resetAt,V&&a.interval.cancel(V),he(),V=a.interval(he,1e3)}else ne.err Line truncated
`+JSON.stringify(t):""}`},[Be.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Ac(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 ao(e,t){return Oe(new Error,{type:e,[fa]:!0},t)}function Mt(e,t){return e instanceof Error&&fa in e&&(t==null||!!(e.type&t))}var Tc=["params","query","hash"];function Ac(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let n of Tc)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function ha(e){let t={};if(e===""||e==="?")return t;let n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){let s=n[r].replace(ea," "),i=s.indexOf("="),a=Do(i<0?s:s.slice(0,i)),u=i<0?null:Do(s.slice(i+1));if(a in t){let f=t[a];wt(f)||(f=t[a]=[f]),f.push(u)}else t[a]=u}return t}function Qn(e){let t="";for(let n in e){let r=e[n];if(n=wc(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(wt(r)?r.map(s=>s&&Hn(s)):[r&&Hn(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function ma(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=wt(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}var va=Symbol(""),Xn=Symbol(""),Qs=Symbol(""),Xs=Symbol(""),Zs=Symbol("");function To(){let e=[];function t(r){return e.push(r),()=>{let s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Gt(e,t,n,r,s,i=a=>a()){let a=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((u,f)=>{let m=h=>{h===!1?f(ao(Be.NAVIGATION_ABORTED,{from:n,to:t})):h instanceof Error?f(h):Rc(h)?f(ao(Be.NAVIGATION_GUARD_REDIRECT,{from:t,to:h})):(a&&r.enterCallbacks[s]===a&&typeof h=="function"&&a.push(h),u())},g=i(()=>e.call(r&&r.instances[s],t,n,m)),w=Promise.resolve(g);e.length<3&&(w=w.then(m)),w.catch(h=>f(h))})}function xs(e,t,n,r,s=i=>i()){let i=[];for(let a of e)for(let u in a.components){let f=a.components[u];if(!(t!=="beforeRouteEnter"&&!a.instances[u]))if(Zi(f)){let m=(f.__vccOpts||f)[t];m&&i.push(Gt(m,n,r,a,u,s))}else{let m=f();i.push(()=>m.then(g=>{if(!g)throw new Error(`Couldn't resolve component "${u}" at "${a.path}"`);let w=uc(g)?g.default:g;a.mods[u]=g,a.components[u]=w;let h=(w.__vccOpts||w)[t];return h&&Gt(h,n,r,a,u,s)()}))}}return i}function ga(e,t){let n=[],r=[],s=[],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(m=>io(m,u))?r.push(u):n.push(u));let f=e.matched[a];f&&(t.matched.find(m=>io(m,f))||s.push(f))}return[n,r,s]}var Oc=()=>location.protocol+"//"+location.host;function Ra(e,t){let{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let a=s.includes(e.slice(i))?e.slice(i).length:1,u=s.slice(a);return u[0]!=="/"&&(u="/"+u),Wn(u,"")}return Wn(n,e)+r+s}function Ic(e,t,n,r){let s=[],i=[],a=null,u=({state:h})=>{let b=Ra(e,location),E=n.value,k=t.value,R=0;if(h){if(n.value=b,t.value=h,a&&a===E){a=null;return}R=k?h.position-k.position:0}else r(b);s.forEach(D=>{D(n.value,E,{delta:R,type:Ys.pop,direction:R?R>0?Js.forward:Js.back:Js.unknown})})};function f(){a=n.value}function m(h){s.push(h);let b=()=>{let E=s.indexOf(h);E>-1&&s.splice(E,1)};return i.push(b),b}function g(){if(document.visibilityState==="hidden"){let{history:h}=window;if(!h.state)return;h.replaceState(Oe({},h.state,{scroll:ds()}),"")}}function w(){for(let h of i)h();i=[],window.removeEventListener("popstate",u),window.removeEventListener("pagehide",g),document.removeEventListener("visibilitychange",g)}return window.addEventListener("popstate",u),window.addEventListener("pagehide",g),document.addEventListener("visibilitychange",g),{pauseListeners:f,listen:m,destroy:w}}function ya(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?ds():null}}function Pc(e){let{history:t,location:n}=window,r={value:Ra(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(f,m,g){let w=e.indexOf("#"),h=w>-1?(n.host&&document.querySelector("base")?e:e.slice(w))+f:Oc()+e+f;try{t[g?"replaceState":"pushState"](m,"",h),s.value=m}catch(b){console.error(b),n[g?"replace":"assign"](h)}}function a(f,m){i(f,Oe({},t.state,ya(s.value.back,f,s.value.forward,!0),m,{position:s.value.position}),!0),r.value=f}function u(f,m){let g=Oe({},s.value,t.state,{forward:f,scroll:ds()});i(g.current,g,!0),i(f,Oe({},ya(r.value,f,null),{position:g.position+1},m),!1),r.value=f}return{location:r,state:s,push:u,replace:a}}function Ta(e){e=la(e);let t=Pc(e),n=Ic(e,t.state,t.location,t.replace);function r(i,a=!0){a||n.pauseListeners(),history.go(i)}let s=Oe({locatLine truncated
`)),e.options=Object.assign({},e.options,m.options),i.restore()})}a();let u=null;e.saveDefault=f=>{if(f&&f.preventDefault&&f.preventDefault(),e.saving)return;let m=i.checkpoint(),g={terms:e.terms.split(`
`).map(w=>w.trim()).filter(w=>w.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",g).then(()=>{i.accept(m),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",u&&r.cancel(u),u=r(()=>{e.message=null},2500)},w=>{e.saving=!1;let b="ERRORS."+(w&&w.data&&w.data.error);n(b).then(E=>{e.error=E&&E!==b?E:"Unable to save your defaults. Please try again."},()=>{e.error="Unable to save your defaults. Please try again."})})},e.deleteAccount=()=>{confirm("Delete your account? All your anonymized repositories, gists, and pull requests will be removed, and your personal data will be erased. This cannot be undone.")&&(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},La=function(e,t,n){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(r=>{n.url("/dashboard")},r=>{e.error=r.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},Ua=function(e,t,n,r,s){e.user&&!e.user.status&&n.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&n.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(u){e.feature=u},e.featureHref=function(u){return u.needsUser&&!e.user?"/signin":u.href},e.featureTarget=function(u){return u.needsUser&&!e.user?"_self":u.target||void 0},e.featureKeydown=function(u,f){let m={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[u.key];if(m===void 0)return;u.preventDefault();let g=e.features.length,w=m==="first"?0:m==="last"?g-1:(f+m+g)%g;e.feature=e.features[w].key,s(()=>{let h=r.document.getElementById("feature-tab-"+e.feature);h&&h.focus()})},e.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}];function i(){t.get("/api/stat/").then(u=>{e.stat=u.data,e.cards[0].total=u.data.nbRepositories,e.cards[1].total=u.data.nbUsers,e.cards[2].total=u.data.nbPageViews,e.cards[3].total=u.data.nbPullRequests})}i();function a(u){let f={series:u,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!u||u.length<2)return f;let m=new Array(u.length-1);for(let k=1;k<u.length;k++)m[k-1]=u[k]-u[k-1];let g=m.length,w=Math.max.apply(null,m),h=Math.min.apply(null,m),b=Math.min(0,h),E=w-b||1;f.viewW=g*2,f.bars=new Array(g);for(let k=0;k<g;k++){let R=(m[k]-b)/E,D=Math.max(1.5,R*34);f.bars[k]={x:(k*2+.25).toFixed(2),y:(36-D).toFixed(2),w:"1.5",h:D.toFixed(2)}}if(f.deltaToday=m[g-1],g>=2){let k=m[g-2];k&&(f.pctChange=(f.deltaToday-k)/k*100)}return f.pctAbs=Math.round(Math.abs(f.pctChange)),f.isUp=f.pctChange>=0,f}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(u=>{let f=u.data||[];e.history={repositories:a(f.map(m=>m.nbRepositories||0)),users:a(f.map(m=>m.nbUsers||0)),pageViews:a(f.map(m=>m.nbPageViews||0)),pullRequests:a(f.map(m=>m.nbPullRequests||0))}})},Fa=function(e,t,n,r,s,i){let a=ct();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.url("/"),a.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,rt(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Kt()(document,"click",C=>{e.quotaExpanded&&!C.target.closest?.(".dashboard-quota")&& Line truncated
`)),e.options=Object.assign({},e.options,j.options),e.options.expirationDate=j.options&&j.options.expirationDate?new Date(j.options.expirationDate):T(),!r.repoId&&!r.pullRequestId&&!r.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),_&&_()})}function U(_,I,j){e.anonymize&&e.anonymize[_]&&e.anonymize[_].setValidity(I,j)}function ie(_){try{let I=parseGithubUrl(_);if(I&&I.owner&&I.repo)return I.owner+"/"+I.repo}catch{}return null}e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await G()}catch{}}};function re(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:ie(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function C(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function O(){let _;try{_=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!_||_.path!==s.path()||Date.now()-_.savedAt>=30*6e4)return R.restore()?(e.sourceUrl&&await C(),!0):!1;R.restore();for(let I of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(_.draft,I)&&(e[I]=_.draft[I]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await C(),sessionStorage.removeItem("github-access-draft"),!0}q(()=>{!r.repoId&&!r.pullRequestId&&!r.gistId&&a(O,0),r.repoId&&r.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=r.repoId,t.get("/api/repo/"+e.repoId).then(async _=>{e.githubConnection=_.data.connection||"oauth",e.sourceUrl="https://github.com/"+_.data.source.fullName,e._originalFullName=_.data.source.fullName,e.terms=_.data.options.terms.filter(I=>I).join(`
`),e.source=_.data.source,e.role=_.data.role||"owner",e.coauthors=_.data.coauthors||[],e._originalBranch=_.data.source.branch,e.options=Object.assign({},e.options,_.data.options),e.conference=_.data.conference,e._originalConference=_.data.conference,e.repositoryID=_.data.source.repositoryID,e._originalRepositoryID=_.data.source.repositoryID,_.data.options.expirationDate&&(e.options.expirationDate=new Date(_.data.options.expirationDate)),E=k(parseGithubUrl(e.sourceUrl)),!await O()&&(await Promise.all([G(),J()]),ue())},()=>{s.url("/404")})),r.pullRequestId&&r.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=r.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async _=>{if(e.githubConnection=_.data.connection||"oauth",e.sourceUrl="https://github.com/"+_.data.source.repositoryFullName+"/pull/"+_.data.source.pullRequestId,e.terms=_.data.options.terms.filter(I=>I).join(`
`),e.source=_.data.source,e.options=Object.assign({},e.options,_.data.options),e.conference=_.data.conference,e._originalConference=_.data.conference,_.data.options.expirationDate&&(e.options.expirationDate=new Date(_.data.options.expirationDate)),E=k(parseGithubUrl(e.sourceUrl)),!await O())try{await pe()}catch{}},()=>{s.url("/404")})),r.gistId&&r.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=r.gistId,t.get("/api/gist/"+e.gistId).then(async _=>{e.sourceUrl="https://gist.github.com/"+_.data.source.gistId,e.terms=_.data.options.terms.filter(I=>I).join(`
`),e.source=_.data.source,e.options=Object.assign({},e.options,_.data.options),e.conference=_.data.conference,e._originalConference=_.data.conference,_.data.options.expirationDate&&(e.options.expirationDate=new Date(_.data.options.expirationDate)),E=k(parseGithubUrl(e.sourceUrl)),!await O()&&await Ae()},()=>{s.url("/404")}))}),t.get("/github/connections").then(_=>{e.githubConnections=_.data,!r.repoId&&!r.pullRequestId&&!r.gistId&&e.githubConnection===void 0&&_.data.appEnabled&&_.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&C())}).catch(()=>{}),e.urlSelected=async(_=!1)=>{let I=++f,j;try{j=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,oe.cancel(),_e.cancel(),Se.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",U("sourceUrl","github",!1);return}let M=k(j),v=_||E===M;E=M,e.sourceUrlError="",U("sourceUrl","github",!0);let S=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,S&&a(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!v&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],v||(e.source={type:"GitHubStream",branch:"",commit:""}),oe.cancel(),_e.cancel(),Se.cancel(),le.clear(),Ee.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null,e.gistOAuthRequired=!1,e._preservingDraft=v;try{j.gistId&&!j.repo?(e.detectedType="gist",e.source={gistId:j.gistId},await Ae()):j.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:j.owner+"/"+j.repo,pullRequestId:j.pullRequestId},await pe()):(e.detectedType="repo",await Promise.all([G(),J()]),ue())}catch{}finally{I===f&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let _=e.branches.filter(j=>j.name==e.source.branch)[0];if(!_)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&!!e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=_.commit),e.readme=_.readme,await J(),ue()}),e.getBranches=async _=>{let I=parseGithubUrl(e.sourceUrl),j=h();try{let M=await t.get(`/api/repo/${I.owner}/${I.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&r.repoId&&ie(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,force:_===!0||e.reconnectingSource?"1":"0",repositoryID:re()}});if(!w(j))return;e.branches=M.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let v=e.branches.filter(S=>S.name==e.source.branch);v.length>0&&(!(!e.reconnectingSource&&!_&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=v[0].commit),e.readme=v[0].readme,await J(_))}catch(M){if(!w(j))return;e.branches=[],e.sourceUnreachable=M&&(M.status===404||M.data&&M.data.error==="repo_not_found");let v=M&&M.data&&M.data.error||(M&&M.status===404?"repo_not_found":"unknown_error");i("ERRORS."+v).then(S=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:S}),e.error=S},console.error),typeof U=="function"&&U("sourceUrl","missing",!1)}finally{b(j)}};async function G(){let _=parseGithubUrl(e.sourceUrl),I=h();try{z();let j=await t.get(`/api/repo/${_.owner}/${_.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&r.repoId&&ie(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,repositoryID:re(),force:"1"}});if(!w(I))return;e.details=j.data,e.reconnectingSource&&(e.reconnectRepositoryId=e.details.externalId),e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches(e.reconnectingSource)}catch(j){if(!w(I))return;throw j.data&&(i("ERRORS."+j.data.error).then(M=>{e.addToast({title:"Error",date:new Date,body:M}),e.error=M},console.error),te(j.data.error)),U("sourceUrl","missing",!1),j}finally{b(I)}}async function J(_){if(e.readme&&!_)return e.readme;let I=parseGithubUrl(e.sourceUrl),j=h();try{let M=await t.get(`/api/repo/${I.owner}/${I.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&r.repoId&&ie(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,force:_===!0?"1":"0",branch:e.source.branch,repositoryID:re()}});w(j,!0)&&(e.readme=M.data)}catch{w(j,!0)&&(e.readme="")}finally{b(j)}}function ee(){let _={terms:e.terms?e.terms.split(`
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(_.branchName=e.source.branch);try{let I=parseGithubUrl(e.sourceUrl);_.repoName=`${I.owner}/${I.repo}`}catch{}return _}function Q(_,I,j){let M=null,v=0,S=()=>{if(e.detectedType!==_)return;M&&a.cancel(M);let V=++v;e.previewStatus="loading",M=a(()=>{M=null;let F=I();if(!F){e.previewStatus="idle";return}t.post("/api/anonymize-preview",F).then(B=>{V===v&&(j(B.data,F),e.previewStatus="ready")}).catch(()=>{V===v&&(e.previewStatus="error")})},200)};return S.cancel=()=>{v++,M&&a.cancel(M),M=null},e.on("dispose",S.cancel),S}e.retryPreview=()=>{e.detectedType==="repo"&&oe(),e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()};let oe=Q("repo",()=>e.readme?{content:e.readme,options:ee()}:null,_=>{if(typeof _?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=_.content;let I="";try{let M=parseGithubUrl(e.sourceUrl),v=e.source.branch||e.details&&e.details.defaultBranch||"main";I=`https://github.com/${M.owner}/${M.repo}/raw/${v}/`}catch{}let j=renderMD(e.anonymize_readme,I);e.html_readme=j,a(Prism.highlightAll,150)});function ue(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),oe())}async function pe(){let _=parseGithubUrl(e.sourceUrl),I=h();try{z();let j=await t.get(`/api/pr/${_.owner}/${_.repo}/${_.pullRequestId}`,{params:{connection:e.githubConnection}});if(!w(I))return;e.details=j.data,e.pullRequestId||(e.pullRequestId=_.repo+"-PR"+_.pullRequestId+"-"+generateRandomId(4))}catch(j){if(!w(I))return;throw j.data&&(i("ERRORS."+j.data.error).then(M=>{e.addToast({title:"Error",date:new Date,body:M}),e.error=M},console.error),te(j.data.error)),U("sourceUrl","missing",!1),j}finally{b(I)}}let le=He(new Map);function Ie(){let _=new Set,I=e.details&&e.details.pullRequest;if(!I)return _;typeof I.title=="string"&&_.add(I.title),typeof I.body=="string"&&_.add(I.body),typeof I.diff=="string"&&_.add(I.diff);let j=I.comments||[];for(let M of j)typeof M.author=="string"&&_.add(M.author),typeof M.body=="string"&&_.add(M.body);return _}let _e=Q("pr",()=>{let _=Ie(),I=Array.from(_);return I.length===0?null:{contents:I,options:ee()}},(_,I)=>{if(!Array.isArray(_?.contents)||_.contents.length!==I.contents.length||_.contents.some(v=>typeof v!="string"))throw Error("Invalid preview response");let j=I.contents,M=new Map;for(let v=0;v<j.length&&v<_.contents.length;v++)M.set(j[v],_.contents[v]);le.clear(),M.forEach((v,S)=>le.set(S,v))});e.anonymizePrContent=function(_){return _&&(le.has(_)?le.get(_):"")};async function Ae(){let _=parseGithubUrl(e.sourceUrl),I=h();try{if(z(),e.gistOAuthRequired=!1,e.githubConnections?.oauthConnected===!1){e.gistOAuthRequired=!0,U("sourceUrl","missing",!1);return}let j=await t.get(`/api/gist/source/${_.gistId}`);if(!w(I))return;e.details=j.data,e.gistId||(e.gistId="gist-"+_.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(j){if(!w(I))return;if(j.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,U("sourceUrl","missing",!1);return}throw j.data&&(i("ERRORS."+j.data.error).then(M=>{e.addToast({title:"Error",date:new Date,body:M}),e.error=M},console.error),te(j.data.error)),U("sourceUrl","missing",!1),j}finally{b(I)}}let Ee=He(new Map);function Ve(){let _=new Set,I=e.details&&e.details.gist;if(!I)return _;typeof I.description=="string"&&_.add(I.description),typeof I.ownerLogin=="string"&&_.add(I.ownerLogin);let j=I.files||[];for(let v of j)typeof v.filename=="string"&&_.add(v.filename),typeof v.content=="string"&&_.add(v.content);let M=I.comments||[];for(let v of M)typeof v.author=="string"&&_.add(v.author),typeof v.body=="string"&&_.add(v.body);return _}let Se=Q("gist",()=>{let _=Ve(),I=Array.from(_);return I.length===0?null:{contents:I,options:ee()}},(_,I)=>{if(!Array.isArray(_?.contents)||_.contents.length!==I.contents.length||_.contents.some(v=>typeof v!="string"))throw Error("Invalid preview response");let j=I.contents,M=new Map;for(let v=0;v<j.length&&v<_.contents.length;v++)M.set(j[v],_.contents[v]);Ee.clear(),M.forEach((v,S)=>Ee.set(S,v)),Le()});e.anonymizeGistContent=function(_){return _&&(Ee.has(_)?Ee.get(_):"")},e.previewGistFiles=[];function Le(){let _=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=_.map(I=>({filename:e.anonymizeGistContent(I.filename),content:e.anonymizeGistContent(I.content),language:I.language}))}e.watch("details.gist.files",Le,!0),e.watch("terms",Le);function Ue(){let _=e.conference;if(e.conference_data=null,!_)return;let I=e.isUpdate&&_===e._originalConference;t.get("/api/conferences/"+_).then(j=>{e.conference===_&&(e.conference_data=j.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!I&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.conference_data.options.image Line truncated
`).filter(S=>S),connection:e.githubConnection,fullName:`${j.owner}/${j.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(M.options.pageSource=e.details.pageSource),z();let v=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(v,M,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/status/"+e.repoId},S=>{S.data&&(i("ERRORS."+S.data.error).then(V=>{e.error=V},console.error),te(S.data.error))}).finally(()=>{I.disabled=!1})},e.anonymizeGist=_=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ne())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=_.currentTarget||_.target.closest?.("button")||_.target;I.disabled=!0;let j=parseGithubUrl(e.sourceUrl),M={gistId:e.gistId,terms:e.terms.trim().split(`
`).filter(S=>S),source:{gistId:j.gistId},options:e.options,conference:e.conference};z();let v=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(v,M,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/gist/"+e.gistId},S=>{S.data&&(i("ERRORS."+S.data.error).then(V=>{e.error=V},console.error),te(S.data.error))}).finally(()=>{I.disabled=!1})},e.anonymizePullRequest=_=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ne())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=_.currentTarget||_.target.closest?.("button")||_.target;I.disabled=!0;let j=parseGithubUrl(e.sourceUrl),M={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
`).filter(S=>S),source:{repositoryFullName:`${j.owner}/${j.repo}`,pullRequestId:j.pullRequestId},options:e.options,conference:e.conference};z();let v=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(v,M,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/pr/"+e.pullRequestId},S=>{S.data&&(i("ERRORS."+S.data.error).then(V=>{e.error=V},console.error),te(S.data.error))}).finally(()=>{I.disabled=!1})},e.watch("conference",()=>{Ue()}),e.watch("terms",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()}),e.watch("details",()=>{e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()},!0)},tr=function(e,t,n,r,s,i){let a=ct(),u=Kt();e.on("dark-mode",(O,G)=>{e.aceOption&&(G?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome")});let f=0,m=!1;e.on("dispose",()=>{m=!0,f++,g&&g.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(O){if((O.metaKey||O.ctrlKey)&&O.key==="k"){O.preventDefault();var G=document.querySelector(".tree-search-input");G&&(G.focus(),G.select())}});var g=null;e.onFileSearchChange=function(){g&&(g.resolve(),g=null);let O=e.fileSearchQuery;if(!O||O.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let G=i.defer();g=G,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(O)}`,{timeout:G.promise}).then(function(J){if(!(m||g!==G)){g=null,e.fileSearchLoading=!1;var ee={};e.files.forEach(function(z){ee[(z.path||"")+"/"+z.name]=!0});for(var Q=[],oe={},ue=0;ue<J.data.length;ue++){var pe=J.data[ue];if(pe.path)for(var le=pe.path.split("/"),Ie="",_e=0;_e<le.length;_e++){var Ae=Ie;Ie=Ie?Ie+"/"+le[_e]:le[_e];var Ee=Ae+"/"+le[_e];!ee[Ee]&&!oe[Ee]&&(oe[Ee]=!0,Q.push({name:le[_e],path:Ae}))}}Q.sort(function(z,ne){return(z.path||"").split("/").length-(ne.path||"").split("/").length}),Q.length>0&&e.files.push.apply(e.files,Q);for(var Ve=[],Se=0;Se<J.data.length;Se++){var Le=J.data[Se],Ue=(Le.path||"")+"/"+Le.name;!ee[Ue]&&Le.size!=null&&(Ve.push(Le),ee[Ue]=!0)}Ve.length>0&&e.files.push.apply(e.files,Ve),e.fileSearchResults=J.data}},function(){!m&&g===G&&(g=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let w={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},h=["license","txt"],b=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],E=["wav","mp3","ogg","wma","flac","aac","m4a"],k=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(O,G){if(e.repoId!=r.repoId)return C();if((r.path||"")!=e.filePath){e.filePath=r.path||"",e.paths=e.filePath.split("/").filter(J=>J&&J.trim().length>0),re();for(let J=0;J<e.paths.length-1;J++){let ee=J>0?e.paths.slice(0,J).join("/"):"";e.files.some(oe=>oe.path===ee)||e.getFiles(ee)}}});function R(){if(e.paths[0]!="")return;let O=["readme.md","readme.txt","readme.org","readme.1st","readme"],G={};for(let ee of e.files)ee.name.toLowerCase().indexOf("readme")>-1&&(G[ee.name.toLowerCase()]=ee.name);let J=null;for(let ee of O)if(G[ee]){J=ee;break}if(!J&&Object.keys(G).length>0&&(J=Object.keys(G)[0]),J){let ee=n.url();ee[ee.length-1]!="/"&&(ee+="/"),n.url(ee+encodePathForUrl(G[J]))}}e.fileCounts=null,e.getFiles=function(O){let G=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(O)}&v=${e.options.lastUpdateDate}`).then(function(J){if(m||G!==e.repoId)return[];let ee=O||"";return e.files=e.files.filter(Q=>Q.path!==ee),e.files.push(...J.data),J.data},function(J){if(m||G!==e.repoId)return[];e.type="error",e.content=J&&J.data&&J.data.error||"unknown_error",e.files=[]})};function D(){let O=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(G){m||O!==e.repoId||(e.fileCounts=G.data)},function(){e.fileCounts={}})}function T(){return e.files.filter(O=>O.name==e.paths[e.paths.length-1]&&O.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var P=null;e.on("dispose",function(){P&&a.interval.cancel(P)});function H(O){if(m)return;let G=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(J=>{if(!(m||G!==e.repoId)){if(e.options=J.data,e.options.url){window.location=e.options.url;return}O&&O(J.data)}},J=>{if(!(m||G!==e.repoId)){var ee=J.data||{};if(ee.error==="rate_limited"&&ee.resetAt){let oe=function(){var ue=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(ue<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,P&&(a.interval.cancel(P),P=null),H(O);else{var pe=Math.floor(ue/60),le=ue%60;e.rateLimitCountdown=pe>0?pe+"m "+le+"s":le+"s"}};var Q=oe;e.type="rate_limited",e.rateLimitResetAt=ee.resetAt,P&&a.interval.canc Line truncated
`+k.join(`
`)],{type:"text/csv"}),D=document.createElement("a");D.href=URL.createObjectURL(R),D.download=r.username+"-repositories.csv",D.click()},e.showStatusMessage=f=>{let b=f.statusMessage||"(no message)";window.prompt(`Status message for ${f.repoId} (${f.status}):`,b)},e.fetchGithubInfo=f=>{let b=window.open("","_blank");b&&b.document.write("<pre>Loading GitHub info for "+f.repoId+"...</pre>"),t.get("/api/admin/repos/"+f.repoId+"/github").then(C=>{b&&(b.document.open(),b.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(C.data,null,2).replace(/[<>]/g,k=>k==="<"?"&lt;":"&gt;")+"</pre>"),b.document.close())},C=>{let k=C&&C.data?JSON.stringify(C.data,null,2):String(C);b&&(b.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+k+"</pre>")})};function m(f){t.get("/api/admin/users/"+f+"/repos",{}).then(b=>{e.repositories=b.data},b=>{console.error(b)})}function h(f){t.get("/api/admin/users/"+f,{}).then(b=>{e.userInfo=b.data},b=>{console.error(b)})}h(r.username),m(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(),b=>console.error(b))},e.removeCache=f=>{confirm("Remove cached files for "+f.repoId+"?")&&t.delete("/api/admin/repos/"+f.repoId).then(()=>m(r.username),b=>console.error(b))},e.removeRepository=f=>{confirm("Remove repository "+f.repoId+"?")&&t.delete("/api/repo/"+f.repoId+"/").then(()=>m(r.username),b=>console.error(b))},e.updateRepository=f=>{let b=He({title:`Refreshing ${f.repoId}...`,date:new Date,body:`The repository ${f.repoId} is going to be refreshed.`});e.toasts.push(b),t.post(`/api/repo/${f.repoId}/refresh`).then(C=>{C.data.status=="ready"?b.title=`${f.repoId} is refreshed.`:b.title=`Refreshing of ${f.repoId}.`},C=>{b.title=`Error during the refresh of ${f.repoId}.`,b.body=C.body})},e.getGitHubRepositories=f=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(b=>{e.userInfo.repositories=b.data})};let w=null;e.watch("query",()=>{s.timeout.cancel(w),w=s.timeout(()=>{m(r.username)},500)},!0)},Xa=function(e,t,n){let r=ct(),s=Kt();e.Math=Math,e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let i=C=>{if(C.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){C.preventDefault();let k=document.querySelector('.admin-filter-toolbar input[type="search"]');k&&k.focus()}};s(document,"keydown",i),e.on("dispose",()=>document.removeEventListener("keydown",i)),e.clearFilter=C=>{C==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[C]="",e.query.page=1},e.chips=[];let a=()=>{let C=[];(e.query.dateFrom||e.query.dateTo)&&C.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=C};e.statusCountFor=C=>{let k=(e.statusCounts||[]).find(R=>R._id===C);return k?k.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=C=>{e.query.sort===C?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=C,e.query.direction="desc"),e.query.page=1},e.sortIcon=C=>e.query.sort===C?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let u="admin.conferences.filterPrefs",m={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({},m,h,{page:1,search:""});let v=n.search();v.search&&(e.query.search=v.search);let w="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(w)||"[]"),e.savePreset=()=>{let C=window.prompt("Preset name:");if(!C)return;let k=Object.assign({},e.query);delete k.page,e.presets=(e.presets||[]).filter(R=>R.name!==C),e.presets.push({name:C,query:k}),localStorage.setItem(w,JSON.stringify(e.presets))},e.applyPreset=C=>{Object.assign(e.query,C.query,{page:1})},e.deletePreset=C=>{e.presets=(e.presets||[]).filter(k=>k.name!==C.name),localStorage.setItem(w,JS Line truncated
`).map((ve,me)=>me===0?ve:he+ve).join(`
`)}else typeof K=="number"||typeof K=="boolean"?ue=String(K):ue=JSON.stringify(K);J.push(`${oe}${ue}${ne}`)}),J.push("}"),J.join(`
`)}function h(D){let T=[],V="",_=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,O=0,I;for(;I=_.exec(D);)V+=D.slice(O,I.index),O=_.lastIndex,T.push({key:I[1],op:I[2]||"=",val:I[3]});return V+=D.slice(O),{filters:T,free:V.trim().toLowerCase()}}function v(D,T){for(let V of T.filters){let _=(I,J,Y)=>{let K=parseFloat(I),B=parseFloat(J);return Y==="="?String(I)===String(J):Y==="!="?String(I)!==String(J):Y===">="?K>=B:Y==="<="?K<=B:Y===">"?K>B:Y==="<"?K<B:!0},O;if(V.key==="code")O=D.displayMessage;else if(V.key==="module")O=D.module;else if(V.key==="status")O=D._status;else if(V.key==="url")O=D._url;else if(V.key==="repo")O=D._repoId;else if(V.key==="level")O=D.level;else continue;if(O==null||!_(O,V.val,V.op))return!1}return!(T.free&&((D.displayMessage||"")+" "+(D.module||"")+" "+(D._url||"")+" "+JSON.stringify(D.raw||[])).toLowerCase().indexOf(T.free)===-1)}function w(){let D=h(e.query.search||"");e.parsedFilterCount=D.filters.length;let T=e.query.bucket,V=e.entries.filter(O=>T&&O._bucket!==T?!1:v(O,D)),_=e.query.group;if(_){let O=Y=>_==="module"?Y.module:Y.displayMessage||Y.message||"_",I=new Map;for(let Y of V){let K=O(Y);if(I.has(K)){let B=I.get(K);B.count++,B._related.push(Y),new Date(Y.ts)>new Date(B.ts)&&(B.ts=Y.ts,B._url=Y._url,B._status=Y._status),new Date(Y.ts)<new Date(B._firstSeen)&&(B._firstSeen=Y.ts)}else{let B=Object.assign({},Y);B._key=`${_}:${K}`,B._related=[Y],B._firstSeen=Y.ts,B._lastHourCount=0,B.count=1,I.set(K,B)}}let J=Date.now()-3600*1e3;for(let Y of I.values())Y._lastHourCount=Y._related.filter(K=>new Date(K.ts).getTime()>=J).length;V=Array.from(I.values())}else V=V.map((O,I)=>(O._key="row:"+I+":"+O.ts,O._related=[O],O._firstSeen=O.ts,O._lastHourCount=0,O.count=1,O));e.query.sort==="count"?V.sort((O,I)=>I.count-O.count||new Date(I.ts)-new Date(O.ts)):V.sort((O,I)=>new Date(I.ts)-new Date(O.ts)),e.visible=V}function f(D){let T=D?e.entries.length:0,V=D?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:T,limit:V}}).then(_=>{let O=(_.data.entries||[]).map(u);e.entries=D?e.entries.concat(O):O,e.available=!!_.data.available,e.cap=_.data.max||e.cap,e.total=_.data.total||e.entries.length,w()},_=>console.error(_))}e.loadMore=()=>f(!0),e.canLoadMore=()=>e.entries.length<e.total;function b(){t.get("/api/admin/errors/stats").then(D=>{let T=D.data||{},V=T.prev24h?Math.round((T.last24h-T.prev24h)/T.prev24h*100):0;e.stats={last24h:T.last24h||0,prev24h:T.prev24h||0,delta:V,severity:T.severity||{error:0,warn:0,info:0},unique:T.unique||{error:0,warn:0,info:0},buckets:T.buckets||[],dropped:T.dropped||0}},D=>console.error(D))}function C(){f(),b()}e.barPx=(D,T)=>{let V=e.stats.buckets||[],_=0;for(let Y of V)_=Math.max(_,(Y.error||0)+(Y.warn||0)+(Y.info||0));if(!_)return 0;let O=(D.error||0)+(D.warn||0)+(D.info||0);if(!O)return 0;let I=Math.round(O/_*60),J=D[T]||0;return Math.round(J/O*I)},e.bucketTitle=D=>`${new Date(D.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${D.error||0} err \xB7 ${D.warn||0} warn \xB7 ${D.info||0} info`,e.toggle=D=>{e.expanded[D._key]=!e.expanded[D._key]},e.setBucket=D=>{e.query.bucket=D},e.refreshNow=C,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(C,D=>console.error(D))},e.exportCsv=()=>{let D=["ts","level","module","displayMessage","_status","_url","_repoId"],T=[D.join(",")];for(let I of e.visible)T.push(D.map(J=>{let Y=I[J]==null?"":String(I[J]);return/[",\n]/.test(Y)?`"${Y.replace(/"/g,'""')}"`:Y}).join(","));let V=new Blob([T.join(`
`)],{type:"text/csv;charset=utf-8"}),_=URL.createObjectURL(V),O=document.createElement("a");O.href=_,O.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(O),O.click(),document.body.removeChild(O),URL.revokeObjectURL(_)};function k(D){e.copyHint=`${D} copied`,s.timeout(()=>{e.copyHint=""},1500)}e.copyJson=D=>{navigator.clipboard.writeText(D._detailJson).then(()=>k("JSON"))},e.copyCurl=D=>{if(!D._url)return;let V=`curl -X ${D._method||"GET"} '${window.location.origin}${D._url}'`;navigator.clipboard.writeText(V).then(()=>k("curl"))},C();let R=r(()=>{e.query.autoRefresh&&C()},15e3);e.on("dispose",()=>r.cancel(R)),e.watch("query.search",w),e.watch("query.bucket",w),e.watch("query.sort",w),e.watch("query.group",w)},el=function(e,t,n,r){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null){n.url("/");return}e.data=null,e.loading=!0,e.error=null;function s(f){if(f==null)return"\u2014";for(var b=["B","KB","MB","GB","TB"],C=0,k=f;k>=1024&&C<b.length-1;)k/=1024,C++;return k.toFixed(C>0?1:0)+" "+b[C]}e.humanBytes=s;function i(f){if(!f)return"\u2014";var b=Math.floor(f/86400),C=Math.floor(f%86400/3600),k=Math.floor(f%3600/60);return b>0?b+"d "+(C<10?"0":"")+C+"h":C>0?C+"h "+(k<10?"0":"")+k+"m":k+"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 b=e.data.repos.statusBreakdown||[],C=0;C<b.length;C++)if(b[C]._id===f)return b[C].count;return 0},e.barPct=function(f){var b=e.data&&e.data.repos?e.data.repos.total:0;if(!b)return 0;var C=[f];f==="expired"&&C.push("expiring"),f==="removed"&&C.push("removing"),f==="preparing"&&C.push("download");var k=0;return C.forEach(function(R){k+=e.statusCount(R)}),Math.max(.4,k/b*100)},e.errPct=function(f){if(!e.data||!e.data.errors)return 0;var b=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[f]/b*100};function u(f){var b=f||[];return b.map(function(C,k){var R=b[k-1]||{},D=Object.assign({},C);return D.dailyRepositories=k?Math.max(0,(C.nbRepositories||0)-(R.nbRepositories||0)):0,D.dailyUsers=k?Math.max(0,(C.nbUsers||0)-(R.nbUsers||0)):0,D.dailyPageViews=k?Math.max(0,(C.nbPageViews||0)-(R.nbPageViews||0)):0,D})}function m(f){var b=f&&f.length?f[f.length-1]:{};return{repositories:b.dailyRepositories||0,users:b.dailyUsers||0,pageViews:b.dailyPageViews||0}}var h={};e.historyBarH=function(f,b){return!f||!h[b]?0:Math.max(1,Math.round(f[b]/h[b]*140))},e.historyLabel=function(f){if(!f||!f.date)return"";var b=new Date(f.date);return b.getUTCMonth()+1+"/"+b.getUTCDate()};function v(){t.get("/api/admin/overview").then(function(f){f.data.history=u(f.data.history),f.data.daily={today:m(f.data.history)},e.data=f.data,e.loading=!1,e.error=null,h={},(f.data.history||[]).forEach(function(b){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(C){(!h[C]||b[C]>h[C])&&(h[C]=b[C])})})},function(f){e.loading=!1,e.error=f.data&&f.data.error||"Failed to load overview"})}v();var w=r(v,3e4);e.on("dispose",function(){r.cancel(w)})};var tl=[{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Wa(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ka(e,t.http)},{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>Ua(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)=>Fa(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)=>en(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)=>en(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)=>en(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)=>za(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>ja(e,t.http,t.location) Line truncated
anonymous_github`)])])])])]),p(" Limitations "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})]),g("Limitations ")]),o("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[o("div",{class:"panel-body p-3"},[o("ul",null,[o("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),o("li",null," Files larger than 8 MB are not supported. "),o("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),o("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). ")])])])])]),p(" Privacy & Security "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})]),g("Privacy & Security ")]),o("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[o("div",{class:"panel-body p-3"},[o("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. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[o("div",{class:"panel-body p-3"},[o("p",null,[g("The GitHub App has read-only access to the repositories you choose. You can change repository access on your "),o("a",{href:"/connections"},"GitHub connections"),g(" page.")]),o("p",null,"Legacy GitHub OAuth includes write access to private repositories because GitHub's OAuth scopes do not offer a read-only option for them. Existing OAuth anonymizations and gists can still use this connection."),o("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[o("div",{class:"panel-body p-3"},[o("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. ")])])])]),p(" Self-Hosting "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#project-icon-storage"})]),g("Self-Hosting ")]),o("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),o("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[o("div",{class:"panel-body p-3"},[o("p",null,[g(" Yes. Anonymous Git Line truncated
`)],{type:"text/csv"}),D=document.createElement("a");D.href=URL.createObjectURL(R),D.download=r.username+"-repositories.csv",D.click()},e.showStatusMessage=h=>{let b=h.statusMessage||"(no message)";window.prompt(`Status message for ${h.repoId} (${h.status}):`,b)},e.fetchGithubInfo=h=>{let b=window.open("","_blank");b&&b.document.write("<pre>Loading GitHub info for "+h.repoId+"...</pre>"),t.get("/api/admin/repos/"+h.repoId+"/github").then(E=>{b&&(b.document.open(),b.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(E.data,null,2).replace(/[<>]/g,k=>k==="<"?"&lt;":"&gt;")+"</pre>"),b.document.close())},E=>{let k=E&&E.data?JSON.stringify(E.data,null,2):String(E);b&&(b.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+k+"</pre>")})};function f(h){t.get("/api/admin/users/"+h+"/repos",{}).then(b=>{e.repositories=b.data},b=>{console.error(b)})}function m(h){t.get("/api/admin/users/"+h,{}).then(b=>{e.userInfo=b.data},b=>{console.error(b)})}m(r.username),f(r.username),e.banUser=()=>{confirm(`Ban user ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/ban`).then(()=>m(r.username),h=>console.error(h))},e.activateUser=()=>{t.post(`/api/admin/users/${r.username}/activate`).then(()=>m(r.username),h=>console.error(h))},e.promoteUser=()=>{confirm(`Promote ${r.username} to admin?`)&&t.post(`/api/admin/users/${r.username}/promote`).then(()=>m(r.username),h=>console.error(h))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/demote`).then(()=>m(r.username),h=>console.error(h))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function g(){t.get("/api/admin/tokens").then(h=>{e.tokens=h.data||[]},h=>{h.status!==401&&h.status!==403&&console.error(h)})}g(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(h=>{e.tokenForm.plaintext=h.data.token,e.tokenForm.name="",g()},h=>console.error(h))},e.revokeToken=h=>{confirm(`Revoke token "${h.name}"?`)&&t.delete("/api/admin/tokens/"+h.id).then(()=>g(),b=>console.error(b))},e.removeCache=h=>{confirm("Remove cached files for "+h.repoId+"?")&&t.delete("/api/admin/repos/"+h.repoId).then(()=>f(r.username),b=>console.error(b))},e.removeRepository=h=>{confirm("Remove repository "+h.repoId+"?")&&t.delete("/api/repo/"+h.repoId+"/").then(()=>f(r.username),b=>console.error(b))},e.updateRepository=h=>{let b=He({title:`Refreshing ${h.repoId}...`,date:new Date,body:`The repository ${h.repoId} is going to be refreshed.`});e.toasts.push(b),t.post(`/api/repo/${h.repoId}/refresh`).then(E=>{E.data.status=="ready"?b.title=`${h.repoId} is refreshed.`:b.title=`Refreshing of ${h.repoId}.`},E=>{b.title=`Error during the refresh of ${h.repoId}.`,b.body=E.body})},e.getGitHubRepositories=h=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(b=>{e.userInfo.repositories=b.data})};let w=null;e.watch("query",()=>{s.timeout.cancel(w),w=s.timeout(()=>{f(r.username)},500)},!0)},Xa=function(e,t,n){let r=ct(),s=Kt();e.Math=Math,e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let i=E=>{if(E.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){E.preventDefault();let k=document.querySelector('.admin-filter-toolbar input[type="search"]');k&&k.focus()}};s(document,"keydown",i),e.on("dispose",()=>document.removeEventListener("keydown",i)),e.clearFilter=E=>{E==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[E]="",e.query.page=1},e.chips=[];let a=()=>{let E=[];(e.query.dateFrom||e.query.dateTo)&&E.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=E};e.statusCountFor=E=>{let k=(e.statusCounts||[]).find(R=>R._id===E);return k?k.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=E=>{e.query.sort===E?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=E,e.query.direction="desc"),e.query.page=1},e.sortIcon=E=>e.query.sort===E?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let u="admin.conferences.filterPrefs",f={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},m=loadFilterPrefs(u)||{};e.query=Object.assign({},f,m,{page:1,search:""});let g=n.search();g.search&&(e.query.search=g.search);let w="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(w)||"[]"),e.savePreset=()=>{let E=window.prompt("Preset name:");if(!E)return;let k=Object.assign({},e.query);delete k.page,e.presets=(e.presets||[]).filter(R=>R.name!==E),e.presets.push({name:E,query:k}),localStorage.setItem(w,JSON.stringify(e.presets))},e.applyPreset=E=>{Object.assign(e.query,E.query,{page:1})},e.deletePreset=E=>{e.presets=(e.presets||[]).filter(k=>k.name!==E.name),localStorage.setItem(w,JS Line truncated
`).map((ue,pe)=>pe===0?ue:oe+ue).join(`
`)}else typeof C=="number"||typeof C=="boolean"?Q=String(C):Q=JSON.stringify(C);ie.push(`${J}${Q}${ee}`)}),ie.push("}"),ie.join(`
`)}function m(D){let T=[],P="",H=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,q=0,U;for(;U=H.exec(D);)P+=D.slice(q,U.index),q=H.lastIndex,T.push({key:U[1],op:U[2]||"=",val:U[3]});return P+=D.slice(q),{filters:T,free:P.trim().toLowerCase()}}function g(D,T){for(let P of T.filters){let H=(U,ie,re)=>{let C=parseFloat(U),O=parseFloat(ie);return re==="="?String(U)===String(ie):re==="!="?String(U)!==String(ie):re===">="?C>=O:re==="<="?C<=O:re===">"?C>O:re==="<"?C<O:!0},q;if(P.key==="code")q=D.displayMessage;else if(P.key==="module")q=D.module;else if(P.key==="status")q=D._status;else if(P.key==="url")q=D._url;else if(P.key==="repo")q=D._repoId;else if(P.key==="level")q=D.level;else continue;if(q==null||!H(q,P.val,P.op))return!1}return!(T.free&&((D.displayMessage||"")+" "+(D.module||"")+" "+(D._url||"")+" "+JSON.stringify(D.raw||[])).toLowerCase().indexOf(T.free)===-1)}function w(){let D=m(e.query.search||"");e.parsedFilterCount=D.filters.length;let T=e.query.bucket,P=e.entries.filter(q=>T&&q._bucket!==T?!1:g(q,D)),H=e.query.group;if(H){let q=re=>H==="module"?re.module:re.displayMessage||re.message||"_",U=new Map;for(let re of P){let C=q(re);if(U.has(C)){let O=U.get(C);O.count++,O._related.push(re),new Date(re.ts)>new Date(O.ts)&&(O.ts=re.ts,O._url=re._url,O._status=re._status),new Date(re.ts)<new Date(O._firstSeen)&&(O._firstSeen=re.ts)}else{let O=Object.assign({},re);O._key=`${H}:${C}`,O._related=[re],O._firstSeen=re.ts,O._lastHourCount=0,O.count=1,U.set(C,O)}}let ie=Date.now()-3600*1e3;for(let re of U.values())re._lastHourCount=re._related.filter(C=>new Date(C.ts).getTime()>=ie).length;P=Array.from(U.values())}else P=P.map((q,U)=>(q._key="row:"+U+":"+q.ts,q._related=[q],q._firstSeen=q.ts,q._lastHourCount=0,q.count=1,q));e.query.sort==="count"?P.sort((q,U)=>U.count-q.count||new Date(U.ts)-new Date(q.ts)):P.sort((q,U)=>new Date(U.ts)-new Date(q.ts)),e.visible=P}function h(D){let T=D?e.entries.length:0,P=D?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:T,limit:P}}).then(H=>{let q=(H.data.entries||[]).map(u);e.entries=D?e.entries.concat(q):q,e.available=!!H.data.available,e.cap=H.data.max||e.cap,e.total=H.data.total||e.entries.length,w()},H=>console.error(H))}e.loadMore=()=>h(!0),e.canLoadMore=()=>e.entries.length<e.total;function b(){t.get("/api/admin/errors/stats").then(D=>{let T=D.data||{},P=T.prev24h?Math.round((T.last24h-T.prev24h)/T.prev24h*100):0;e.stats={last24h:T.last24h||0,prev24h:T.prev24h||0,delta:P,severity:T.severity||{error:0,warn:0,info:0},unique:T.unique||{error:0,warn:0,info:0},buckets:T.buckets||[],dropped:T.dropped||0}},D=>console.error(D))}function E(){h(),b()}e.barPx=(D,T)=>{let P=e.stats.buckets||[],H=0;for(let re of P)H=Math.max(H,(re.error||0)+(re.warn||0)+(re.info||0));if(!H)return 0;let q=(D.error||0)+(D.warn||0)+(D.info||0);if(!q)return 0;let U=Math.round(q/H*60),ie=D[T]||0;return Math.round(ie/q*U)},e.bucketTitle=D=>`${new Date(D.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${D.error||0} err \xB7 ${D.warn||0} warn \xB7 ${D.info||0} info`,e.toggle=D=>{e.expanded[D._key]=!e.expanded[D._key]},e.setBucket=D=>{e.query.bucket=D},e.refreshNow=E,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(E,D=>console.error(D))},e.exportCsv=()=>{let D=["ts","level","module","displayMessage","_status","_url","_repoId"],T=[D.join(",")];for(let U of e.visible)T.push(D.map(ie=>{let re=U[ie]==null?"":String(U[ie]);return/[",\n]/.test(re)?`"${re.replace(/"/g,'""')}"`:re}).join(","));let P=new Blob([T.join(`
`)],{type:"text/csv;charset=utf-8"}),H=URL.createObjectURL(P),q=document.createElement("a");q.href=H,q.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(q),q.click(),document.body.removeChild(q),URL.revokeObjectURL(H)};function k(D){e.copyHint=`${D} copied`,s.timeout(()=>{e.copyHint=""},1500)}e.copyJson=D=>{navigator.clipboard.writeText(D._detailJson).then(()=>k("JSON"))},e.copyCurl=D=>{if(!D._url)return;let P=`curl -X ${D._method||"GET"} '${window.location.origin}${D._url}'`;navigator.clipboard.writeText(P).then(()=>k("curl"))},E();let R=r(()=>{e.query.autoRefresh&&E()},15e3);e.on("dispose",()=>r.cancel(R)),e.watch("query.search",w),e.watch("query.bucket",w),e.watch("query.sort",w),e.watch("query.group",w)},el=function(e,t,n,r){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null){n.url("/");return}e.data=null,e.loading=!0,e.error=null;function s(h){if(h==null)return"\u2014";for(var b=["B","KB","MB","GB","TB"],E=0,k=h;k>=1024&&E<b.length-1;)k/=1024,E++;return k.toFixed(E>0?1:0)+" "+b[E]}e.humanBytes=s;function i(h){if(!h)return"\u2014";var b=Math.floor(h/86400),E=Math.floor(h%86400/3600),k=Math.floor(h%3600/60);return b>0?b+"d "+(E<10?"0":"")+E+"h":E>0?E+"h "+(k<10?"0":"")+k+"m":k+"m"}e.humanDuration=i;function a(h){return h==null?"\u2014":h>=1e6?(h/1e6).toFixed(1)+"M":h>=1e3?(h/1e3).toFixed(1)+"K":String(h)}e.humanNum=a,e.queueTotal=function(h){return h?(h.waiting||0)+(h.active||0)+(h.delayed||0)+(h.failed||0):0},e.statusCount=function(h){if(!e.data||!e.data.repos)return 0;for(var b=e.data.repos.statusBreakdown||[],E=0;E<b.length;E++)if(b[E]._id===h)return b[E].count;return 0},e.barPct=function(h){var b=e.data&&e.data.repos?e.data.repos.total:0;if(!b)return 0;var E=[h];h==="expired"&&E.push("expiring"),h==="removed"&&E.push("removing"),h==="preparing"&&E.push("download");var k=0;return E.forEach(function(R){k+=e.statusCount(R)}),Math.max(.4,k/b*100)},e.errPct=function(h){if(!e.data||!e.data.errors)return 0;var b=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[h]/b*100};function u(h){var b=h||[];return b.map(function(E,k){var R=b[k-1]||{},D=Object.assign({},E);return D.dailyRepositories=k?Math.max(0,(E.nbRepositories||0)-(R.nbRepositories||0)):0,D.dailyUsers=k?Math.max(0,(E.nbUsers||0)-(R.nbUsers||0)):0,D.dailyPageViews=k?Math.max(0,(E.nbPageViews||0)-(R.nbPageViews||0)):0,D})}function f(h){var b=h&&h.length?h[h.length-1]:{};return{repositories:b.dailyRepositories||0,users:b.dailyUsers||0,pageViews:b.dailyPageViews||0}}var m={};e.historyBarH=function(h,b){return!h||!m[b]?0:Math.max(1,Math.round(h[b]/m[b]*140))},e.historyLabel=function(h){if(!h||!h.date)return"";var b=new Date(h.date);return b.getUTCMonth()+1+"/"+b.getUTCDate()};function g(){t.get("/api/admin/overview").then(function(h){h.data.history=u(h.data.history),h.data.daily={today:f(h.data.history)},e.data=h.data,e.loading=!1,e.error=null,m={},(h.data.history||[]).forEach(function(b){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(E){(!m[E]||b[E]>m[E])&&(m[E]=b[E])})})},function(h){e.loading=!1,e.error=h.data&&h.data.error||"Failed to load overview"})}g();var w=r(g,3e4);e.on("dispose",function(){r.cancel(w)})};var tl=[{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Wa(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ka(e,t.http)},{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>Ua(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)=>Fa(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)=>en(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)=>en(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)=>en(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)=>za(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ba(e,t.http,t.location) Line truncated
anonymous_github`)])])])])]),p(" Limitations "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})]),y("Limitations ")]),o("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[o("div",{class:"panel-body p-3"},[o("ul",null,[o("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),o("li",null," Files larger than 8 MB are not supported. "),o("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),o("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). ")])])])])]),p(" Privacy & Security "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})]),y("Privacy & Security ")]),o("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[o("div",{class:"panel-body p-3"},[o("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. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[o("div",{class:"panel-body p-3"},[o("p",null,[y("The GitHub App has read-only access to the repositories you choose. You can change repository access on your "),o("a",{href:"/connections"},"GitHub connections"),y(" page.")]),o("p",null,"Legacy GitHub OAuth includes write access to private repositories because GitHub's OAuth scopes do not offer a read-only option for them. Existing OAuth anonymizations and gists can still use this connection."),o("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[o("div",{class:"panel-body p-3"},[o("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. ")])])])]),p(" Self-Hosting "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#project-icon-storage"})]),y("Self-Hosting ")]),o("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),o("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[o("div",{class:"panel-body p-3"},[o("p",null,[y(" Yes. Anonymous Git 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]=o("li",{class:"nav-item d-none d-lg-block"},[o("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"},[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-bug"})]),g("Report a bug ")])],-1)),e.isDarkMode?p("v-if",!0):(l(),d("li",QI,[o("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]=ce(n=>{e.darkMode(!0)},["prevent"]))},[...t[7]||(t[7]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",XI,[o("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]=ce(n=>{e.darkMode(!1)},["prevent"]))},[...t[8]||(t[8]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-sun"})],-1)])])])):p("v-if",!0),e.user?p("v-if",!0):(l(),d("li",ZI,[...t[9]||(t[9]=[o("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[o("i",{class:"fab fa-github mr-1"}),g(" Sign in ")],-1)])])),e.user?(l(),d("li",xI,[o("a",e4,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,t4)):p("v-if",!0),o("span",o4,c(e.user?.username),1)]),o("div",s4,[o("h6",n4,"Signed in as @"+c(e.user?.username),1),t[10]||(t[10]=le('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><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"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><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><a class="dropdown-item" href="https://ko-fi.com/tdurieux" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-heart"></use></svg><span>Support the project</span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="/api/user/logout" target="_self"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-logout"></use></svg><span>Sign out</span></a>',9))])])):p("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,r4)):p("v-if",!0)],64)}var i4={class:"paper-landing"},a4={class:"paper-hero"},l4={class:"paper-hero-copy"},d4={class:"paper-cta-row"},u4={key:0,href:"/signin",target:"_self",class:"btn-hero"},c4={key:1,href:"/anonymize",class:"btn-hero"},p4={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},f4={class:"paper-stats-grid"},m4={class:"paper-stat-value"},h4={class:"paper-stat-label"},v4=["viewBox"],g4=["x","y","width","height"],y4={key:1,class:"paper-stat-delta"},b4={class:"paper-features paper-wrap","aria-label":"Product features"},w4={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},k4=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],E4={class:"paper-eyebrow"},C4={class:"paper-feature-title"},_4={class:"paper-feature-more"},S4={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},N4=["href","target"],D4={class:"paper-features-stage"},R4=["id","aria-labelledby"],T4={class:"paper-frame"},A4={class:"paper-frame-bar","aria-hidden":"true"},O4={class:"url"},I4=["src","alt"],P4={class:"paper-footer"},V4={class:"paper-footer-inner"},q4={class:"paper-footer-col"},M4={key:0,href:"/dashboard"},$4={key:1,href:"/conferences"},L4={class:"paper-footer-foot"};function El(e,t){return l(),d("div",i4,[p(" Hero: copy on the left, the product on the right "),o("section",a4,[o("div",l4,[t[2]||(t[2]=o("div",{class:"paper-eyebrow"},"For double-blind peer review",-1)),t[3]||(t[3]=o("h1",{class:"hero-title"},[g(" Share the code,"),o("br"),o("span",{class:"accent"},"not the author.")],-1)),t[4]||(t[4]=o("p",{class:"hero-subtitle Line truncated
label names the service and the tooltip says who to contact. `),t[12]||(t[12]=o("li",{class:"nav-item d-none d-lg-block"},[o("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"},[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-bug"})]),y("Report a bug ")])],-1)),e.isDarkMode?p("v-if",!0):(l(),d("li",xI,[o("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]=he(n=>{e.darkMode(!0)},["prevent"]))},[...t[7]||(t[7]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",e4,[o("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]=he(n=>{e.darkMode(!1)},["prevent"]))},[...t[8]||(t[8]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-sun"})],-1)])])])):p("v-if",!0),e.user?p("v-if",!0):(l(),d("li",t4,[...t[9]||(t[9]=[o("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[o("i",{class:"fab fa-github mr-1"}),y(" Sign in ")],-1)])])),e.user?(l(),d("li",o4,[o("a",s4,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,n4)):p("v-if",!0),o("span",r4,c(e.user?.username),1)]),o("div",i4,[o("h6",a4,"Signed in as @"+c(e.user?.username),1),t[10]||(t[10]=ce('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><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"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><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><a class="dropdown-item" href="https://ko-fi.com/tdurieux" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-heart"></use></svg><span>Support the project</span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="/api/user/logout" target="_self"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-logout"></use></svg><span>Sign out</span></a>',9))])])):p("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,l4)):p("v-if",!0)],64)}var d4={class:"paper-landing"},u4={class:"paper-hero"},c4={class:"paper-hero-copy"},p4={class:"paper-cta-row"},f4={key:0,href:"/signin",target:"_self",class:"btn-hero"},h4={key:1,href:"/anonymize",class:"btn-hero"},m4={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},v4={class:"paper-stats-grid"},g4={class:"paper-stat-value"},y4={class:"paper-stat-label"},b4=["viewBox"],w4=["x","y","width","height"],k4={key:1,class:"paper-stat-delta"},E4={class:"paper-features paper-wrap","aria-label":"Product features"},C4={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},_4=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],S4={class:"paper-eyebrow"},N4={class:"paper-feature-title"},D4={class:"paper-feature-more"},R4={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},T4=["href","target"],A4={class:"paper-features-stage"},O4=["id","aria-labelledby"],I4={class:"paper-frame"},P4={class:"paper-frame-bar","aria-hidden":"true"},V4={class:"url"},q4=["src","alt"],M4={class:"paper-footer"},$4={class:"paper-footer-inner"},L4={class:"paper-footer-col"},U4={key:0,href:"/dashboard"},F4={key:1,href:"/conferences"},z4={class:"paper-footer-foot"};function El(e,t){return l(),d("div",d4,[p(" Hero: copy on the left, the product on the right "),o("section",u4,[o("div",c4,[t[2]||(t[2]=o("div",{class:"paper-eyebrow"},"For double-blind peer review",-1)),t[3]||(t[3]=o("h1",{class:"hero-title"},[y(" Share the code,"),o("br"),o("span",{class:"accent"},"not the author.")],-1)),t[4]||(t[4]=o("p",{class:"hero-subtitle Line truncated
MIT CSAIL
jane.smith@example.org`},RV={id:"termsHelp",class:"form-text text-muted"},TV={class:"invalid-feedback"},AV={id:"settings-display",class:"paper-settings-section"},OV={class:"form-group paper-check-list"},IV={class:"form-check"},PV={class:"form-check-input",type:"checkbox",id:"link",name:"link"},VV={class:"form-check"},qV={class:"form-check-input",type:"checkbox",id:"image",name:"image"},MV={class:"form-check"},$V={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},LV={class:"form-check"},UV={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},FV={id:"settings-features",class:"paper-settings-section"},zV={class:"form-group paper-check-list"},HV={class:"form-check"},BV={class:"form-check-input",type:"checkbox",id:"page",name:"page"},jV={class:"form-check"},GV={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},WV={class:"form-check"},KV={class:"form-check-input",type:"checkbox",id:"update",name:"update"},YV={class:"form-group"},JV={class:"form-control",id:"mode",name:"mode"},QV={class:"form-text text-muted"},XV={id:"settings-expiration",class:"paper-settings-section"},ZV={class:"form-group"},xV={class:"form-control",id:"expiration",name:"expiration"},e5={key:0,class:"draft-status",role:"status"},t5={key:1,class:"draft-status"},o5={class:"paper-settings-footer"},s5={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},n5=["textContent"],r5={class:"paper-settings-actions"},i5=["disabled"],a5={key:0,class:"ui-icon mr-1","aria-hidden":"true"},l5={id:"settings-account",class:"paper-settings-section"},d5={class:"paper-account-card"},u5=["src"],c5={class:"paper-account-identity"},p5={class:"paper-account-name"},f5={class:"paper-danger-zone"},m5={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},h5=["textContent"],v5=["disabled"];function Dl(e,t){let n=We("quota-usage"),r=ye("paper-scrollspy"),s=ye("field"),i=ye("form");return l(),d("div",yV,[t[52]||(t[52]=le('<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)),o("div",bV,[N((l(),d("aside",wV,[...t[4]||(t[4]=[le('<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)])])),[[r]]),o("div",kV,[p(" Account usage shares the dashboard component. "),o("section",EV,[t[6]||(t[6]=o("div",{class:"paper-section-eyebrow"},"Quota",-1)),t[7]||(t[7]=o("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(),qt(n,{key:0,quota:e.quota,fmt:e.fmt},null,8,["quota","fmt"])):p("v-if",!0),e.quota?p("v-if",!0):(l(),d("div",CV,[(l(),d(Q,null,se([1,2,3],(a,u)=>o("div",_V,[...t[5]||(t[5]=[o("div",{class:"quota-header"},[o("span",{class:"skeleton skeleton-line",style:{width:"40%"}}),o("span",{class:"skeleton skeleton-line",style:{width:"25%"}})],-1),o("div",{class:"quota-track"},null,-1)])])),64))]))]),N((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[2]||(t[2]=ce(a=>e.submitForm(a,()=>{e.saveDefault(a)}),["prevent"]))},[o("section",SV,[t[13]||(t[13]=o("div",{class:"paper-section-eyebrow"},"Terms to redact",-1)),t[14]||(t[14]=o("p",{class:"paper-section-copy"},"Pre-filled in every new anonymization. You can still edit the list per anonymization.",-1)),o("div",NV,[t[12]||(t[12]=o("label",{class:"paper-field-label",for:"terms"},"Default terms",-1)),N(o("textarea",DV,null,512),[[s,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),o("small",RV,[t[8]||(t[8]=g(" One term per line (regex allowed). Each match is replaced by ",-1)),o("code",null,c(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[9]||(t[9]=g(", or use ",-1)),t[10]||(t[10]=o("code",null,"term=>replacement",-1)),t[11]||(t[11]=g(" to pick your own. ",-1))]),N(o("div",TV," Terms are in an invalid format ",512),[[W,e.defaultsForm?.terms?.errors?.format]])])]),o("section",AV,[t[23]||(t[23]=o("div",{class:"paper-section-eyebrow"},"Display",-1)),t[24]||(t[24]=o("p",{class:"paper-section-copy"},"What reviewers can see inside an anonymized repository.",-1)),o("div",OV,[o("div",IV,[N(o("input",PV,null,512),[[s,{state:e.viewState,set:a=>{e.options.link=a},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[15]||(t[15]=o("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[16]||(t[16]=o("small",{class:"form-text text-muted"},"Unchecked, every link in text files is removed.",-1))]),o("div",VV,[N(o("input",qV,null,512),[[s,{state:e.viewState,set:a=>{e.options.image=a},value:e.op Line truncated
`);for(let w=0;w<v.length;w++){let f=v[w];if(f.startsWith("diff --git")){h(),m();continue}if(f.startsWith("--- ")){i&&i.lines.length&&h(),m().oldPath=f.replace(/^--- (a\/)?/,"").trim();continue}if(f.startsWith("+++ ")){m().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 b=f.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);b&&(a=parseInt(b[1],10),u=parseInt(b[2],10)),m().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 n(s,i),s.join("")}})({trustAsHtml:e=>e});function Oq(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function Iq(e){return String(e??"").toUpperCase()}function Pq(e,t,n=0){return(e||[]).slice(n,n+t)}function Vq(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function qq(e,t){if(!t)return e||[];let n=Array.isArray(t)?t:[t];return[...e||[]].sort((r,s)=>{for(let i of n){let a=i[0]==="-"?-1:1;i=i.replace(/^[+-]/,"");let u=i.split(".").reduce((h,v)=>h?.[v],r),m=i.split(".").reduce((h,v)=>h?.[v],s);if(typeof u=="string"&&(u=u.toLowerCase()),typeof m=="string"&&(m=m.toLowerCase()),u!==m)return(u==null?-1:m==null?1:u<m?-1:1)*a}return 0})}function Mq(e,t){if(!e)return"";let n=new Date(e);if(isNaN(n))return String(e);if(!t||t==="mediumDate")return n.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let r={yyyy:n.getFullYear(),MMM:n.toLocaleDateString(void 0,{month:"short"}),MM:String(n.getMonth()+1).padStart(2,"0"),dd:String(n.getDate()).padStart(2,"0"),d:n.getDate(),HH:String(n.getHours()).padStart(2,"0"),mm:String(n.getMinutes()).padStart(2,"0"),ss:String(n.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,s=>r[s])}function $q(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var ql={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`},OV={id:"termsHelp",class:"form-text text-muted"},IV={class:"invalid-feedback"},PV={id:"settings-display",class:"paper-settings-section"},VV={class:"form-group paper-check-list"},qV={class:"form-check"},MV={class:"form-check-input",type:"checkbox",id:"link",name:"link"},$V={class:"form-check"},LV={class:"form-check-input",type:"checkbox",id:"image",name:"image"},UV={class:"form-check"},FV={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},zV={class:"form-check"},HV={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},jV={id:"settings-features",class:"paper-settings-section"},BV={class:"form-group paper-check-list"},GV={class:"form-check"},WV={class:"form-check-input",type:"checkbox",id:"page",name:"page"},KV={class:"form-check"},YV={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},JV={class:"form-check"},QV={class:"form-check-input",type:"checkbox",id:"update",name:"update"},XV={class:"form-group"},ZV={class:"form-control",id:"mode",name:"mode"},xV={class:"form-text text-muted"},e5={id:"settings-expiration",class:"paper-settings-section"},t5={class:"form-group"},o5={class:"form-control",id:"expiration",name:"expiration"},s5={key:0,class:"draft-status",role:"status"},n5={key:1,class:"draft-status"},r5={class:"paper-settings-footer"},i5={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},a5=["textContent"],l5={class:"paper-settings-actions"},d5=["disabled"],u5={key:0,class:"ui-icon mr-1","aria-hidden":"true"},c5={id:"settings-account",class:"paper-settings-section"},p5={class:"paper-account-card"},f5=["src"],h5={class:"paper-account-identity"},m5={class:"paper-account-name"},v5={class:"paper-danger-zone"},g5={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},y5=["textContent"],b5=["disabled"];function Dl(e,t){let n=We("quota-usage"),r=ye("paper-scrollspy"),s=ye("field"),i=ye("form");return l(),d("div",kV,[t[52]||(t[52]=ce('<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)),o("div",EV,[N((l(),d("aside",CV,[...t[4]||(t[4]=[ce('<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)])])),[[r]]),o("div",_V,[p(" Account usage shares the dashboard component. "),o("section",SV,[t[6]||(t[6]=o("div",{class:"paper-section-eyebrow"},"Quota",-1)),t[7]||(t[7]=o("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(),qt(n,{key:0,quota:e.quota,fmt:e.fmt},null,8,["quota","fmt"])):p("v-if",!0),e.quota?p("v-if",!0):(l(),d("div",NV,[(l(),d(X,null,ae([1,2,3],(a,u)=>o("div",DV,[...t[5]||(t[5]=[o("div",{class:"quota-header"},[o("span",{class:"skeleton skeleton-line",style:{width:"40%"}}),o("span",{class:"skeleton skeleton-line",style:{width:"25%"}})],-1),o("div",{class:"quota-track"},null,-1)])])),64))]))]),N((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[2]||(t[2]=he(a=>e.submitForm(a,()=>{e.saveDefault(a)}),["prevent"]))},[o("section",RV,[t[13]||(t[13]=o("div",{class:"paper-section-eyebrow"},"Terms to redact",-1)),t[14]||(t[14]=o("p",{class:"paper-section-copy"},"Pre-filled in every new anonymization. You can still edit the list per anonymization.",-1)),o("div",TV,[t[12]||(t[12]=o("label",{class:"paper-field-label",for:"terms"},"Default terms",-1)),N(o("textarea",AV,null,512),[[s,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),o("small",OV,[t[8]||(t[8]=y(" One term per line (regex allowed). Each match is replaced by ",-1)),o("code",null,c(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[9]||(t[9]=y(", or use ",-1)),t[10]||(t[10]=o("code",null,"term=>replacement",-1)),t[11]||(t[11]=y(" to pick your own. ",-1))]),N(o("div",IV," Terms are in an invalid format ",512),[[Y,e.defaultsForm?.terms?.errors?.format]])])]),o("section",PV,[t[23]||(t[23]=o("div",{class:"paper-section-eyebrow"},"Display",-1)),t[24]||(t[24]=o("p",{class:"paper-section-copy"},"What reviewers can see inside an anonymized repository.",-1)),o("div",VV,[o("div",qV,[N(o("input",MV,null,512),[[s,{state:e.viewState,set:a=>{e.options.link=a},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[15]||(t[15]=o("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[16]||(t[16]=o("small",{class:"form-text text-muted"},"Unchecked, every link in text files is removed.",-1))]),o("div",$V,[N(o("input",LV,null,512),[[s,{state:e.viewState,set:a=>{e.options.image=a},value:e.op Line truncated
`);for(let w=0;w<g.length;w++){let h=g[w];if(h.startsWith("diff --git")){m(),f();continue}if(h.startsWith("--- ")){i&&i.lines.length&&m(),f().oldPath=h.replace(/^--- (a\/)?/,"").trim();continue}if(h.startsWith("+++ ")){f().newPath=h.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(h.startsWith("index ")||h.startsWith("similarity index")||h.startsWith("rename ")||h.startsWith("new file mode")||h.startsWith("deleted file mode")||h.startsWith("Binary files"))){if(h.startsWith("@@")){let b=h.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);b&&(a=parseInt(b[1],10),u=parseInt(b[2],10)),f().lines.push({kind:"hunk",oldNo:"",newNo:"",text:h});continue}i&&(h.startsWith("+")?(i.lines.push({kind:"add",oldNo:"",newNo:u,text:h.slice(1)}),u++):h.startsWith("-")?(i.lines.push({kind:"remove",oldNo:a,newNo:"",text:h.slice(1)}),a++):(i.lines.push({kind:"ctx",oldNo:a,newNo:u,text:h.startsWith(" ")?h.slice(1):h}),a++,u++))}}return n(s,i),s.join("")}})({trustAsHtml:e=>e});function Vq(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function qq(e){return String(e??"").toUpperCase()}function Mq(e,t,n=0){return(e||[]).slice(n,n+t)}function $q(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function Lq(e,t){if(!t)return e||[];let n=Array.isArray(t)?t:[t];return[...e||[]].sort((r,s)=>{for(let i of n){let a=i[0]==="-"?-1:1;i=i.replace(/^[+-]/,"");let u=i.split(".").reduce((m,g)=>m?.[g],r),f=i.split(".").reduce((m,g)=>m?.[g],s);if(typeof u=="string"&&(u=u.toLowerCase()),typeof f=="string"&&(f=f.toLowerCase()),u!==f)return(u==null?-1:f==null?1:u<f?-1:1)*a}return 0})}function Uq(e,t){if(!e)return"";let n=new Date(e);if(isNaN(n))return String(e);if(!t||t==="mediumDate")return n.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let r={yyyy:n.getFullYear(),MMM:n.toLocaleDateString(void 0,{month:"short"}),MM:String(n.getMonth()+1).padStart(2,"0"),dd:String(n.getDate()).padStart(2,"0"),d:n.getDate(),HH:String(n.getHours()).padStart(2,"0"),mm:String(n.getMinutes()).padStart(2,"0"),ss:String(n.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,s=>r[s])}function Fq(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var ql={ERRORS:{cache_busy:"Downloads are busy. Please try again shortly.",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:"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 Line truncated
/*! Bundled license information:
@vue/shared/dist/shared.esm-bundler.js: