fix(admin): group errors by code and service, list the routes that failed

- An issue is now one error code (or exception type) per service: one cause,
  such as a rate-limit burst, hits many routes. Rows show the most frequent
  route and "+N routes"; the issue page lists them with a count and a bar.
- The request header shows the viewer as a role ("Viewer: owner", "Viewer not
  signed in") beside the owner chip, with a user link only for another user.
- List meta parts no longer leave a lone separator when they wrap.
- The issue page shows the 10 latest occurrences and a "Show all" button
  instead of clipping the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Thomas DurieuxandClaude Opus 5.5 committed 2026-11-29 13:55:02 +00:00
1 parent c91e662034
commit d3860f29ad
11 files changed
+136 -65

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
{
"core.min.js": "core.d23af1c652.min.js",
"vendor.min.js": "vendor.de316c5086.min.js",
"vendor.min.js": "vendor.31d8689594.min.js",
"mermaid.min.js": "mermaid.a7356d5ed1.min.js",
"all.min.css": "all.0437c3c19d.min.css",
"all.min.css": "all.65e547042d.min.css",
"markdown.min.js": "markdown.6c8dfb7b1d.min.js",
"pdf.min.js": "pdf.4d9cc6ff49.min.js",
"notebook.min.js": "notebook.c3144c18ae.min.js",
+1 -1
View File
@@ -6,4 +6,4 @@
*/:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unsLine truncated
* Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/.fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{contentLine truncated
*/.fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{contentLine truncated
+16 -4
View File
@@ -14601,9 +14601,11 @@ body { --errs-ext: #5B4BB7; --errs-ext-bg: #EFEDFB; --errs-ext-bd: #D9D4F5; --er
.errs-title::after { content: ""; position: absolute; inset: 0; }
.errs-row { position: relative; }
.errs-row a:not(.errs-title), .errs-row button { position: relative; z-index: 1; }
.errs-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; font-size: 13px; color: var(--ink-muted); min-width: 0; }
.errs-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; font-size: 13px; color: var(--ink-muted); min-width: 0; }
.errs-meta .errs-code { color: var(--ink-soft); }
.errs-where { min-width: 0; overflow-wrap: anywhere; }
.errs-meta-part { white-space: nowrap; }
.errs-meta .errs-route { white-space: normal; min-width: 0; overflow-wrap: anywhere; }
.errs-more-routes { color: var(--ink-soft); }
.errs-cause-line { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); }
.errs-cause-line > span:last-child { min-width: 0; }
.errs-cell-impact { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--ink-soft); }
@@ -14688,7 +14690,14 @@ code.errs-chip { font-size: 12px; }
.errs-histogram span { flex: 1 1 0; background: var(--status-error); opacity: .8; border-radius: 2px 2px 0 0; }
.errs-histogram span.is-zero { background: var(--border-color); opacity: 1; }
.errs-hist-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--ink-muted); }
.errs-occurrences { list-style: none; margin: 0 -8px; padding: 0; max-height: 520px; overflow-y: auto; }
.errs-occurrences { list-style: none; margin: 0 -8px; padding: 0; }
.errs-show-all { margin-top: 10px; width: 100%; }
.errs-routes { list-style: none; margin: 0; padding: 0; }
.errs-routes li { display: grid; grid-template-columns: minmax(0, 1fr) 120px 48px; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: 13px; }
.errs-routes code { overflow-wrap: anywhere; }
.errs-route-bar { height: 6px; border-radius: 3px; background: var(--paper-bg-alt); overflow: hidden; }
.errs-route-bar span { display: block; height: 100%; border-radius: 3px; background: var(--status-progress); }
.errs-routes .errs-num { text-align: right; font-variant-numeric: tabular-nums; }
.errs-occurrences a { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: 6px; color: var(--color) !important; text-decoration: none; font-size: 13px; }
.errs-occurrences li + li a { border-top: 1px solid var(--border-soft); border-radius: 0; }
.errs-occurrences a:hover, .errs-occurrences a:focus-visible { background: var(--hover-bg-color); }
@@ -14799,7 +14808,10 @@ code.errs-chip { font-size: 12px; }
.errs-fields-head { flex-direction: column; align-items: flex-start; }
.errs-tabs { padding: 0 8px; }
.errs-entity-list li { grid-template-columns: minmax(0, 1fr) auto auto; }
.errs-routes li { grid-template-columns: minmax(0, 1fr) 48px; row-gap: 6px; }
.errs-route-bar { grid-column: 1 / -1; grid-row: 2; }
}
.errs-page code.errs-chip { padding: 2px 9px; }
.errs-page a.errs-mono { color: var(--link-color); }
.errs-meta .errs-code::after { content: " ·"; color: var(--ink-muted); }
.errs-routes.is-error .errs-route-bar span { background: var(--status-error); }
.errs-routes.is-neutral .errs-route-bar span { background: var(--ink-faint); }
+1 -1
View File
@@ -9,7 +9,7 @@
<template v-else-if="entityErrors.data">
<ul class="errs-entity-list" v-if="entityIssues().length || entityExpected().length">
<li v-for="issue in entityIssues()" :key="issue.id">
<span class="errs-entity-main"><a :href="errIssueHref(issue.id)">{{ issue.title }}</a><span class="errs-muted"><code>{{ issue.code }}</code><template v-if="issue.route"> · {{ issue.method }} {{ issue.route }}</template><template v-else-if="issue.queue"> · job {{ issue.queue }}</template></span></span>
<span class="errs-entity-main"><a :href="errIssueHref(issue.id)">{{ issue.title }}</a><span class="errs-muted"><code>{{ issue.code }}</code><template v-if="issue.route"> · {{ issue.method }} {{ issue.route }}<template v-if="issue.routeCount &gt; 1"> +{{ issue.routeCount - 1 }}</template></template><template v-else-if="issue.queue"> · job {{ issue.queue }}</template></span></span>
<span class="errs-entity-count">{{ errNumber(issue.count) }}</span>
<time :datetime="issue.last" :title="errDayTime(issue.last)">{{ issue.failingNow ? 'now' : errRelTime(issue.last) }}</time>
</li>
+20 -4
View File
@@ -79,7 +79,9 @@
<div class="errs-meta">
<span class="errs-status" :class="errStatusClass(issue.status)" v-if="issue.status">{{ issue.status }}</span>
<code class="errs-code">{{ issue.code }}</code>
<span class="errs-where">{{ issue.service || 'unknown service' }}<template v-if="issue.route"> · {{ issue.method }} {{ issue.route }}</template><template v-else-if="issue.queue"> · job {{ issue.queue }}</template></span>
<span class="errs-meta-part">{{ issue.service || 'unknown service' }}</span>
<span class="errs-meta-part errs-route" v-if="issue.route || issue.queue">{{ issue.route ? issue.method + ' ' + issue.route : 'job ' + issue.queue }}</span>
<span class="errs-meta-part errs-more-routes" v-if="issue.routeCount &gt; 1">+{{ issue.routeCount - 1 }} {{ issue.routeCount === 2 ? 'route' : 'routes' }}</span>
<span class="errs-new" v-if="issue.newInRelease">New in release {{ issue.newInRelease.slice(0, 7) }}</span>
</div>
<p class="errs-cause-line"><span class="errs-cause-chip" :class="'cause-' + issue.cause.source">Cause: {{ issue.cause.label }}</span> <span>{{ issue.cause.summary }}</span></p>
@@ -177,7 +179,7 @@
<div class="errs-chips">
<span class="errs-chip errs-status" :class="errStatusClass(selectedIssue.status)" v-if="selectedIssue.status">HTTP {{ selectedIssue.status }}{{ selectedIssue.route ? ' to the visitor' : '' }}</span>
<code class="errs-chip">{{ selectedIssue.code }}</code>
<span class="errs-chip">{{ selectedIssue.service || 'unknown service' }}<template v-if="selectedIssue.route"> · <code>{{ selectedIssue.method }} {{ selectedIssue.route }}</code></template><template v-else-if="selectedIssue.queue"> · job {{ selectedIssue.queue }}</template></span>
<span class="errs-chip">{{ selectedIssue.service || 'unknown service' }}<template v-if="selectedIssue.routeCount &gt; 1"> · {{ selectedIssue.routeCount }} routes</template><template v-else-if="selectedIssue.route"> · <code>{{ selectedIssue.method }} {{ selectedIssue.route }}</code></template><template v-else-if="selectedIssue.queue"> · job {{ selectedIssue.queue }}</template></span>
<span class="errs-chip">First seen {{ errDayTime(selectedIssue.first) }}<template v-if="selectedIssue.firstRelease"> · release <code>{{ selectedIssue.firstRelease.slice(0, 7) }}</code></template></span>
<span class="errs-chip errs-placeholder" v-if="!selectedIssue.firstRelease">release not recorded</span>
<span class="errs-chip errs-new" v-if="selectedIssue.newInRelease">New in release {{ selectedIssue.newInRelease.slice(0, 7) }}</span>
@@ -199,6 +201,19 @@
</div>
</section>
<section class="errs-card" aria-labelledby="errs-routes-title" v-if="selectedIssue.routes?.length">
<div class="errs-card-head"><h2 id="errs-routes-title">Routes that failed</h2><span class="errs-muted">{{ errNumber(selectedIssue.routeCount) }}</span></div>
<ul class="errs-routes" :class="errStatusClass(selectedIssue.status)">
<li v-for="route in selectedIssue.routes.slice(0, 10)" :key="route.method + route.route">
<code>{{ route.method }} {{ route.route }}</code>
<span class="errs-route-bar" aria-hidden="true"><span :style="{ width: Math.max(2, Math.round(route.count / selectedIssue.routes[0].count * 100)) + '%' }"></span></span>
<span class="errs-num">{{ errNumber(route.count) }}<span class="sr-only"> failures</span></span>
</li>
</ul>
<p class="errs-muted errs-more" v-if="selectedIssue.routeCount &gt; 10">+ {{ errNumber(selectedIssue.routeCount - 10) }} more routes</p>
<p class="errs-muted errs-more" v-if="selectedIssue.routeKnown &lt; selectedIssue.count">Route not recorded for {{ errPlural(selectedIssue.count - selectedIssue.routeKnown, 'record') }}.</p>
</section>
<section class="errs-card" aria-labelledby="errs-repos-title">
<div class="errs-card-head"><h2 id="errs-repos-title">Affected repositories</h2><span class="errs-muted" v-if="selectedIssue.repoCount">{{ errNumber(selectedIssue.repoCount) }}</span></div>
<div class="errs-repos" role="table" aria-labelledby="errs-repos-title" v-if="selectedIssue.repos.length">
@@ -230,7 +245,7 @@
<section class="errs-card" aria-labelledby="errs-occ-title">
<div class="errs-card-head"><h2 id="errs-occ-title">Occurrences</h2><span class="errs-muted">{{ selectedIssue.occurrences.length &lt; selectedIssue.count ? 'latest ' + selectedIssue.occurrences.length + ' of ' : '' }}{{ errNumber(selectedIssue.count) }}</span></div>
<ol class="errs-occurrences">
<li v-for="(o, index) in selectedIssue.occurrences" :key="index">
<li v-for="(o, index) in (showAllOccurrences ? selectedIssue.occurrences : selectedIssue.occurrences.slice(0, 10))" :key="index">
<a :href="occurrenceHref(index)" :data-occurrence="index">
<time :datetime="o.timestamp">{{ errClock(o.timestamp, true) }}</time>
<span class="errs-occ-main"><span class="errs-mono" v-if="o.repoId">{{ o.repoId }}</span><span class="errs-placeholder" v-else>no repository</span><span class="errs-occ-sub">{{ o.viewer ? (o.viewer === 'visitor' || o.viewer === 'anonymous' ? 'visitor' : (userName(o.userId) ? '@' + userName(o.userId) : o.viewer)) : 'viewer not recorded' }}<template v-if="o.ms !== undefined"> · {{ errNumber(o.ms) }} ms</template></span></span>
@@ -238,6 +253,7 @@
</a>
</li>
</ol>
<button type="button" class="btn btn-sm errs-show-all" v-if="!showAllOccurrences &amp;&amp; selectedIssue.occurrences.length &gt; 10" @click="showAllOccurrences = true">Show all {{ selectedIssue.occurrences.length }}<template v-if="selectedIssue.occurrences.length &lt; selectedIssue.count"> latest</template></button>
</section>
</aside>
</div>
@@ -259,7 +275,7 @@
<span class="errs-chip"><time :datetime="currentOccurrence().timestamp">{{ errDayTime(currentOccurrence().timestamp) }}</time></span>
<span class="errs-chip" v-if="currentOccurrence().repoId">Repository <a class="errs-mono" :href="errRepoHref(currentOccurrence().repoId)">{{ currentOccurrence().repoId }}</a></span><span class="errs-chip errs-placeholder" v-else>repository not recorded</span>
<span class="errs-chip" v-if="ownerOf(currentOccurrence().repoId)?.ownerId">Owner <a :href="errUserHref(ownerOf(currentOccurrence().repoId).ownerId)">{{ ownerOf(currentOccurrence().repoId).owner ? '@' + ownerOf(currentOccurrence().repoId).owner : ownerOf(currentOccurrence().repoId).ownerId }}</a></span>
<span class="errs-chip" v-if="currentOccurrence().viewer">{{ viewerLabel(currentOccurrence().viewer) }}<template v-if="currentOccurrence().userId"> · <a :href="errUserHref(currentOccurrence().userId)">{{ userName(currentOccurrence().userId) ? '@' + userName(currentOccurrence().userId) : 'user' }}</a></template></span><span class="errs-chip errs-placeholder" v-else>viewer not recorded</span>
<span class="errs-chip" v-if="currentOccurrence().viewer">{{ viewerChip(currentOccurrence().viewer) }}<template v-if="currentOccurrence().userId &amp;&amp; currentOccurrence().userId !== ownerOf(currentOccurrence().repoId)?.ownerId"> · <a :href="errUserHref(currentOccurrence().userId)">{{ userName(currentOccurrence().userId) ? '@' + userName(currentOccurrence().userId) : 'user' }}</a></template></span><span class="errs-chip errs-placeholder" v-else>viewer not recorded</span>
<span class="errs-muted errs-position">{{ occurrenceIndex + 1 }} of {{ selectedIssue.occurrences.length }}</span>
</div>
+10
View File
@@ -80,6 +80,13 @@ export function waterfall(events, issue) {
return { rows, span: Math.round(span) };
}
/** Role-only chip for the request header: the owner is already linked beside it. */
export function viewerChip(viewer) {
if (!viewer) return "";
if (viewer === "visitor" || viewer === "anonymous") return "Viewer not signed in";
return `Viewer: ${(SIGNED_IN[viewer] || viewer).toLowerCase()}`;
}
/** Plain-language viewer label for #991's viewer field. */
export function viewerLabel(viewer) {
if (!viewer) return "";
@@ -132,6 +139,7 @@ function installFormatters(state) {
state.errUserHref = id => `/admin/users/id:${encodeURIComponent(id)}`;
state.errTrendMax = trend => Math.max(1, ...(trend || [0]));
state.viewerLabel = viewerLabel;
state.viewerChip = viewerChip;
}
/**
@@ -182,6 +190,7 @@ export const errorsAdminController = function (state, http, location, interval)
state.errView = "list";
state.selectedIssue = null;
state.missingIssue = "";
state.showAllOccurrences = false;
state.occurrenceIndex = -1;
state.requestTab = "timeline";
state.trace = null;
@@ -266,6 +275,7 @@ export const errorsAdminController = function (state, http, location, interval)
return;
}
const issue = (state.issueData?.issues || []).find(item => item.id === issueId) || null;
if (issue?.id !== state.selectedIssue?.id) state.showAllOccurrences = false;
state.selectedIssue = issue;
state.missingIssue = issue || state.issueLoading ? "" : issueId;
const index = Number.parseInt(q.occurrence, 10);
+39 -39
View File
@@ -1,61 +1,61 @@
"use strict";(()=>{var ud=Object.defineProperty;var cd=e=>{throw TypeError(e)};var Jm=(e,t,s)=>t in e?ud(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Zm=(e,t)=>{for(var s in t)ud(e,s,{get:t[s],enumerable:!0})};var lt=(e,t,s)=>Jm(e,typeof t!="symbol"?t+"":t,s),aa=(e,t,s)=>t.has(e)||cd("Cannot "+s);var ue=(e,t,s)=>(aa(e,t,"read from private field"),s?s.call(e):t.get(e)),He=(e,t,s)=>t.has(e)?cd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Ke=(e,t,s,i)=>(aa(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),ze=(e,t,s)=>(aa(e,t,"access private method"),s);var pd=(e,t,s,i)=>({set _(r){Ke(e,t,r,s)},get _(){return ue(e,t,i)}});var ve=["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 be={markdown:"/script/markdown.6c8dfb7b1d.min.js",notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",editor:"/script/editor.4f142d3adc.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js"};function fd(e){let t=e.location.hash.slice(1);if(e.history.replaceState(null,"","/review-link"),t.length>2048)return null;let s=new URLSearchParams(t);if([...s.keys()].length!==3||[...s.keys()].some(u=>!["clientId","intentId","token"].includes(u)))return null;let i=s.get("clientId"),r=s.get("intentId"),o=s.get("token");return!/^[a-f0-9]{32}$/.test(i||"")||!/^[a-f0-9]{32}$/.test(r||"")||!/^[a-f0-9]{64}$/.test(o||"")?null:{contract:"4open.artifacts/1",clientId:i,intentId:r,token:o}}function md(e,t){let{http:s,promises:i,window:r}=t,o=t.takeReviewHandoff(),u=o?{clientId:o.clientId,intentId:o.intentId}:null,p,d,g,m,v,y=!0,C,k=i.defer(),w=()=>[...r.crypto.getRandomValues(new Uint8Array(16))].map(L=>L.toString(16).padStart(2,"0")).join("");Object.assign(e,{repositoryId:"",handoffEnabled:!1,busy:!1,preview:null,acceptAccess:!1,acceptRetention:!1,uncertain:!1,saved:!1,expired:!1,error:o?"":"Open a new artifact link from your submission. This link is missing or invalid."});let R=()=>y&&e.user?.username===v;function b(){y=!1,o=p=d=void 0,k.resolve(),r.clearTimeout(C)}e.on("dispose",b),e.on("routeLeave",b),e.watch(()=>e.user?.username,L=>{!v&&L?v=L:v&&L!==v&&(b(),e.preview=null,e.repositoryId="",e.busy=!1,e.saved=!1,e.handoffEnabled=!1,e.error="Your account changed. Open a new artifact link from your submission.")});let P=()=>({timeout:k.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":d}}),D=L=>L?.status===404?"Artifact linking is not available on this server.":L?.status===401?"Sign in, then open a new artifact link from your submission.":L?.status===403?"This account cannot approve this repository or this link.":"The request could not be completed. You can retry from this page.";e.loadPreview=async()=>{if(!y||!o||e.busy||e.uncertain||e.saved||!e.user?.username)return;v=e.user.username;let L=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(L)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,p=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,r.clearTimeout(C),m||(m=w());try{let H=(await s.get("/api/review-consent/csrf",{timeout:k.promise})).data;if(!R())return;if(d=H.csrf,e.handoffEnabled=H.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(d||""))throw new Error("invalid_csrf");let _=(await s.post("/api/review-consent/preview",{repositoryId:L,intent:{...o,requestId:m}},P())).data;if(!R())return;if(!_||typeof _.ticket!="string"||!_.ticket||_.ticket.length>8192||typeof _.repositoryName!="string"||!["restricted-review","anonymous-link"].iLine truncated
`))),e[Nn]=Ys(r);let o=i||r.props&&r.props.type==="number";Kn(e,t?"change":"input",u=>{u.target.composing||e[Nn](Ka(e.value,s,o))}),(s||o)&&Kn(e,"change",()=>{e.value=Ka(e.value,s,o)}),t||(Kn(e,"compositionstart",ty),Kn(e,"compositionend",ec),Kn(e,"change",ec))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){let r=t??"",o=e[ar];delete e[ar],o!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==o?e[Nn](Ka(e.value,s,i)):e.value=r},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:r,number:o}},u){if(e[Nn]=Ys(u),e.composing)return;let p=(o||e.type==="number")&&!/^0\d/.test(e.value)?Hs(e.value):e.value,d=t??"";if(p===d)return;let g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(i&&t===s||r&&e.value.trim()===d)||(e.value=d)}},Xa={deep:!0,created(e,t,s){e[Nn]=Ys(s),Kn(e,"change",()=>{let i=e._modelValue,r=Jo(e),o=e.checked,u=e[Nn];if(Ve(i)){let p=qi(i,r),d=p!==-1;if(o&&!d)u(i.concat(r));else if(!o&&d){let g=[...i];g.splice(p,1),u(g)}}else if(rn(i)){let p=new Set(i);o?p.add(r):p.delete(r),u(p)}else u(rc(e,o))})},mounted:tc,beforeUpdate(e,t,s){e[Nn]=Ys(s),tc(e,t,s)}};function tc(e,{value:t,oldValue:s},i){e._modelValue=t;let r;if(Ve(t))r=qi(t,i.props.value)>-1;else if(rn(t))r=t.has(i.props.value);else{if(t===s)return;r=an(t,rc(e,!0))}e.checked!==r&&(e.checked=r)}var qt={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,Kn(e,"change",()=>{let r=Array.prototype.filter.call(e.options,d=>d.selected).map(d=>s?Hs(Jo(d)):Jo(d)),o=e.multiple,u=o?rn(e._modelValue)?new Set(r):r:r[0],p=e._pendingValue=[o,o?Ve(u)?r.slice():r:u];try{e[Nn](u)}finally{Je(()=>{e._pendingValue===p&&(e._pendingValue=void 0)})}}),e[Nn]=Ys(i)},mounted(e,{value:t}){nc(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[Nn]=Ys(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!ny(t,s[1],s[0]))&&nc(e,t)}};function ny(e,t,s){if(!s)return an(e,t);if(Ve(e))return an(e,t);if(rn(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function nc(e,t){let s=e.multiple,i=Ve(t);if(!(s&&!i&&!rn(t))){for(let r=0,o=e.options.length;r<o;r++){let u=e.options[r],p=Jo(u);if(s)if(i){let d=typeof p;d==="string"||d==="number"?u.selected=t.some(g=>String(g)===String(p)):u.selected=qi(t,p)>-1}else u.selected=t.has(p);else if(an(Jo(u),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Jo(e){return"_value"in e?e._value:e.value}function rc(e,t){let s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}var sy=["ctrl","shift","alt","meta"],oy={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)=>sy.some(s=>e[`${s}Key`]&&!t.includes(s))},de=(e,t)=>{if(!e)return e;let s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((r,...o)=>{for(let u=0;u<t.length;u++){let p=oy[t[u]];if(p&&p(r,t))return}return e(r,...o)}))},iy={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Rt=(e,t)=>{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(r=>{if(!("key"in r))return;let o=gn(r.key);if(t.some(u=>u===o||iy[u]===o))return e(r)}))},ry=yt({patchProp:Zg},Lg),sc;function ay(){return sc||(sc=Lu(ry))}var dr=((...e)=>{let t=ay().createApp(...e),{mount:s}=t;return t.mount=i=>{let r=dy(i);if(!r)return;let o=t._component;!Fe(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");let u=s(r,!1,ly(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),u},t});function ly(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function dy(e){return mt(e)?document.querySelector(e):e}var vs=typeof document<"u";function lc(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function uy(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&lc(e.default)}var ot=Object.assign;function ur(e,t){let s={};for(let i in t){let r=t[i];s[i]=on(r)?r.map(e):e(r)}return s}var Qs=()=>{},on=Array.isArray;function Za(e,t){let s={};for(let i in e)s[i]=i in t?t[i]:e[i];return s}var dc=/#/g,cy=/&/g,py=/\//g,fy=/=/g,my=/\?/g,uc=/\+/g,hy=/%5B/g,gy=/%5D/g,cc=/%5E/g,yy=/%60/g,pc=/%7B/g,vy=/%7C/g,fc=/%7D/g,by=/%20/g;function xa(e){return e==null?"":encodeURI(""+e).replace(vy,"|").replace(hy,"[").replace(gy,"]")}function mc(e){return xa(e).replace(pc,"{").replace(fc,"}").replace(cc,"^")}function Qa(e){return xa(e).replace(uc,"%2B").replace(by,"+").replace(dc,"%23").replace(cy,"%26").replace(yy,"`").replace(pc,"{").replace(fc,"}").replace(cc,"^")}function wy(e){return Qa(e).replace(fy,"%3D")}function ky(e){return xLine truncated
"use strict";(()=>{var cd=Object.defineProperty;var pd=e=>{throw TypeError(e)};var Jm=(e,t,s)=>t in e?cd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Zm=(e,t)=>{for(var s in t)cd(e,s,{get:t[s],enumerable:!0})};var lt=(e,t,s)=>Jm(e,typeof t!="symbol"?t+"":t,s),aa=(e,t,s)=>t.has(e)||pd("Cannot "+s);var ue=(e,t,s)=>(aa(e,t,"read from private field"),s?s.call(e):t.get(e)),He=(e,t,s)=>t.has(e)?pd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Ke=(e,t,s,i)=>(aa(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),ze=(e,t,s)=>(aa(e,t,"access private method"),s);var fd=(e,t,s,i)=>({set _(r){Ke(e,t,r,s)},get _(){return ue(e,t,i)}});var ve=["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 be={markdown:"/script/markdown.6c8dfb7b1d.min.js",notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",editor:"/script/editor.4f142d3adc.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js"};function md(e){let t=e.location.hash.slice(1);if(e.history.replaceState(null,"","/review-link"),t.length>2048)return null;let s=new URLSearchParams(t);if([...s.keys()].length!==3||[...s.keys()].some(u=>!["clientId","intentId","token"].includes(u)))return null;let i=s.get("clientId"),r=s.get("intentId"),o=s.get("token");return!/^[a-f0-9]{32}$/.test(i||"")||!/^[a-f0-9]{32}$/.test(r||"")||!/^[a-f0-9]{64}$/.test(o||"")?null:{contract:"4open.artifacts/1",clientId:i,intentId:r,token:o}}function hd(e,t){let{http:s,promises:i,window:r}=t,o=t.takeReviewHandoff(),u=o?{clientId:o.clientId,intentId:o.intentId}:null,p,d,g,m,v,y=!0,C,k=i.defer(),w=()=>[...r.crypto.getRandomValues(new Uint8Array(16))].map(L=>L.toString(16).padStart(2,"0")).join("");Object.assign(e,{repositoryId:"",handoffEnabled:!1,busy:!1,preview:null,acceptAccess:!1,acceptRetention:!1,uncertain:!1,saved:!1,expired:!1,error:o?"":"Open a new artifact link from your submission. This link is missing or invalid."});let R=()=>y&&e.user?.username===v;function b(){y=!1,o=p=d=void 0,k.resolve(),r.clearTimeout(C)}e.on("dispose",b),e.on("routeLeave",b),e.watch(()=>e.user?.username,L=>{!v&&L?v=L:v&&L!==v&&(b(),e.preview=null,e.repositoryId="",e.busy=!1,e.saved=!1,e.handoffEnabled=!1,e.error="Your account changed. Open a new artifact link from your submission.")});let P=()=>({timeout:k.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":d}}),D=L=>L?.status===404?"Artifact linking is not available on this server.":L?.status===401?"Sign in, then open a new artifact link from your submission.":L?.status===403?"This account cannot approve this repository or this link.":"The request could not be completed. You can retry from this page.";e.loadPreview=async()=>{if(!y||!o||e.busy||e.uncertain||e.saved||!e.user?.username)return;v=e.user.username;let L=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(L)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,p=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,r.clearTimeout(C),m||(m=w());try{let H=(await s.get("/api/review-consent/csrf",{timeout:k.promise})).data;if(!R())return;if(d=H.csrf,e.handoffEnabled=H.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(d||""))throw new Error("invalid_csrf");let _=(await s.post("/api/review-consent/preview",{repositoryId:L,intent:{...o,requestId:m}},P())).data;if(!R())return;if(!_||typeof _.ticket!="string"||!_.ticket||_.ticket.length>8192||typeof _.repositoryName!="string"||!["restricted-review","anonymous-link"].iLine truncated
`))),e[Nn]=Ys(r);let o=i||r.props&&r.props.type==="number";Kn(e,t?"change":"input",u=>{u.target.composing||e[Nn](Ka(e.value,s,o))}),(s||o)&&Kn(e,"change",()=>{e.value=Ka(e.value,s,o)}),t||(Kn(e,"compositionstart",ty),Kn(e,"compositionend",tc),Kn(e,"change",tc))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){let r=t??"",o=e[ar];delete e[ar],o!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==o?e[Nn](Ka(e.value,s,i)):e.value=r},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:r,number:o}},u){if(e[Nn]=Ys(u),e.composing)return;let p=(o||e.type==="number")&&!/^0\d/.test(e.value)?Hs(e.value):e.value,d=t??"";if(p===d)return;let g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(i&&t===s||r&&e.value.trim()===d)||(e.value=d)}},Xa={deep:!0,created(e,t,s){e[Nn]=Ys(s),Kn(e,"change",()=>{let i=e._modelValue,r=Jo(e),o=e.checked,u=e[Nn];if(Ve(i)){let p=qi(i,r),d=p!==-1;if(o&&!d)u(i.concat(r));else if(!o&&d){let g=[...i];g.splice(p,1),u(g)}}else if(rn(i)){let p=new Set(i);o?p.add(r):p.delete(r),u(p)}else u(ac(e,o))})},mounted:nc,beforeUpdate(e,t,s){e[Nn]=Ys(s),nc(e,t,s)}};function nc(e,{value:t,oldValue:s},i){e._modelValue=t;let r;if(Ve(t))r=qi(t,i.props.value)>-1;else if(rn(t))r=t.has(i.props.value);else{if(t===s)return;r=an(t,ac(e,!0))}e.checked!==r&&(e.checked=r)}var qt={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,Kn(e,"change",()=>{let r=Array.prototype.filter.call(e.options,d=>d.selected).map(d=>s?Hs(Jo(d)):Jo(d)),o=e.multiple,u=o?rn(e._modelValue)?new Set(r):r:r[0],p=e._pendingValue=[o,o?Ve(u)?r.slice():r:u];try{e[Nn](u)}finally{Je(()=>{e._pendingValue===p&&(e._pendingValue=void 0)})}}),e[Nn]=Ys(i)},mounted(e,{value:t}){sc(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[Nn]=Ys(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!ny(t,s[1],s[0]))&&sc(e,t)}};function ny(e,t,s){if(!s)return an(e,t);if(Ve(e))return an(e,t);if(rn(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function sc(e,t){let s=e.multiple,i=Ve(t);if(!(s&&!i&&!rn(t))){for(let r=0,o=e.options.length;r<o;r++){let u=e.options[r],p=Jo(u);if(s)if(i){let d=typeof p;d==="string"||d==="number"?u.selected=t.some(g=>String(g)===String(p)):u.selected=qi(t,p)>-1}else u.selected=t.has(p);else if(an(Jo(u),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Jo(e){return"_value"in e?e._value:e.value}function ac(e,t){let s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}var sy=["ctrl","shift","alt","meta"],oy={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)=>sy.some(s=>e[`${s}Key`]&&!t.includes(s))},de=(e,t)=>{if(!e)return e;let s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((r,...o)=>{for(let u=0;u<t.length;u++){let p=oy[t[u]];if(p&&p(r,t))return}return e(r,...o)}))},iy={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Rt=(e,t)=>{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(r=>{if(!("key"in r))return;let o=gn(r.key);if(t.some(u=>u===o||iy[u]===o))return e(r)}))},ry=yt({patchProp:Zg},Lg),oc;function ay(){return oc||(oc=$u(ry))}var dr=((...e)=>{let t=ay().createApp(...e),{mount:s}=t;return t.mount=i=>{let r=dy(i);if(!r)return;let o=t._component;!Fe(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");let u=s(r,!1,ly(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),u},t});function ly(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function dy(e){return mt(e)?document.querySelector(e):e}var vs=typeof document<"u";function dc(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function uy(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&dc(e.default)}var ot=Object.assign;function ur(e,t){let s={};for(let i in t){let r=t[i];s[i]=on(r)?r.map(e):e(r)}return s}var Qs=()=>{},on=Array.isArray;function Za(e,t){let s={};for(let i in e)s[i]=i in t?t[i]:e[i];return s}var uc=/#/g,cy=/&/g,py=/\//g,fy=/=/g,my=/\?/g,cc=/\+/g,hy=/%5B/g,gy=/%5D/g,pc=/%5E/g,yy=/%60/g,fc=/%7B/g,vy=/%7C/g,mc=/%7D/g,by=/%20/g;function xa(e){return e==null?"":encodeURI(""+e).replace(vy,"|").replace(hy,"[").replace(gy,"]")}function hc(e){return xa(e).replace(fc,"{").replace(mc,"}").replace(pc,"^")}function Qa(e){return xa(e).replace(cc,"%2B").replace(by,"+").replace(uc,"%23").replace(cy,"%26").replace(yy,"`").replace(fc,"{").replace(mc,"}").replace(pc,"^")}function wy(e){return Qa(e).replace(fy,"%3D")}function ky(e){return xLine truncated
${JSON.stringify(e)}${t?`
while being at
`+JSON.stringify(t):""}`},[gt.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Ay(t)}" via a navigation guard.`},[gt.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[gt.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[gt.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ys(e,t){return ot(new Error,{type:e,[Ec]:!0},t)}function Rn(e,t){return e instanceof Error&&Ec in e&&(t==null||!!(e.type&t))}var Dy=["params","query","hash"];function Ay(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of Dy)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function Sc(e){let t={};if(e===""||e==="?")return t;let s=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<s.length;++i){let r=s[i].replace(uc," "),o=r.indexOf("="),u=Xs(o<0?r:r.slice(0,o)),p=o<0?null:Xs(r.slice(o+1));if(u in t){let d=t[u];on(d)||(d=t[u]=[d]),d.push(p)}else t[u]=p}return t}function ol(e){let t="";for(let s in e){let i=e[s];if(s=wy(s),i==null){i!==void 0&&(t+=(t.length?"&":"")+s);continue}(on(i)?i.map(r=>r&&Qa(r)):[i&&Qa(i)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+s,r!=null&&(t+="="+r))})}return t}function Nc(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=on(i)?i.map(r=>r==null?null:""+r):i==null?i:""+i)}return t}var Rc=Symbol(""),il=Symbol(""),mr=Symbol(""),hr=Symbol(""),gr=Symbol("");function Js(){let e=[];function t(i){return e.push(i),()=>{let r=e.indexOf(i);r>-1&&e.splice(r,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function Bn(e,t,s,i,r,o=u=>u()){let u=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise((p,d)=>{let g=y=>{y===!1?d(ys(gt.NAVIGATION_ABORTED,{from:s,to:t})):y instanceof Error?d(y):Py(y)?d(ys(gt.NAVIGATION_GUARD_REDIRECT,{from:t,to:y})):(u&&i.enterCallbacks[r]===u&&typeof y=="function"&&u.push(y),p())},m=o(()=>e.call(i&&i.instances[r],t,s,g)),v=Promise.resolve(m);e.length<3&&(v=v.then(g)),v.catch(y=>d(y))})}function yr(e,t,s,i,r=o=>o()){let o=[];for(let u of e)for(let p in u.components){let d=u.components[p];if(!(t!=="beforeRouteEnter"&&!u.instances[p]))if(lc(d)){let g=(d.__vccOpts||d)[t];g&&o.push(Bn(g,s,i,u,p,r))}else{let g=d();o.push(()=>g.then(m=>{if(!m)throw new Error(`Couldn't resolve component "${p}" at "${u.path}"`);let v=uy(m)?m.default:m;u.mods[p]=m,u.components[p]=v;let y=(v.__vccOpts||v)[t];return y&&Bn(y,s,i,u,p,r)()}))}}return o}function Tc(e,t){let s=[],i=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let u=0;u<o;u++){let p=t.matched[u];p&&(e.matched.find(g=>gs(g,p))?i.push(p):s.push(p));let d=e.matched[u];d&&(t.matched.find(g=>gs(g,d))||r.push(d))}return[s,i,r]}var Iy=()=>location.protocol+"//"+location.host;function Fc(e,t){let{pathname:s,search:i,hash:r}=t,o=e.indexOf("#");if(o>-1){let u=r.includes(e.slice(o))?e.slice(o).length:1,p=r.slice(u);return p[0]!=="/"&&(p="/"+p),el(p,"")}return el(s,e)+i+r}function Oy(e,t,s,i){let r=[],o=[],u=null,p=({state:y})=>{let C=Fc(e,location),k=s.value,w=t.value,R=0;if(y){if(s.value=C,t.value=y,u&&u===k){u=null;return}R=w?y.position-w.position:0}else i(C);r.forEach(b=>{b(s.value,k,{delta:R,type:pr.pop,direction:R?R>0?fr.forward:fr.back:fr.unknown})})};function d(){u=s.value}function g(y){r.push(y);let C=()=>{let k=r.indexOf(y);k>-1&&r.splice(k,1)};return o.push(C),C}function m(){if(document.visibilityState==="hidden"){let{history:y}=window;if(!y.state)return;y.replaceState(ot({},y.state,{scroll:Zo()}),"")}}function v(){for(let y of o)y();o=[],window.removeEventListener("popstate",p),window.removeEventListener("pagehide",m),document.removeEventListener("visibilitychange",m)}return window.addEventListener("popstate",p),window.addEventListener("pagehide",m),document.addEventListener("visibilitychange",m),{pauseListeners:d,listen:g,destroy:v}}function Pc(e,t,s,i=!1,r=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:r?Zo():null}}function My(e){let{history:t,location:s}=window,i={value:Fc(e,s)},r={value:t.state};r.value||o(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(d,g,m){let v=e.indexOf("#"),y=v>-1?(s.host&&document.querySelector("base")?e:e.slice(v))+d:Iy()+e+d;try{t[m?"replaceState":"pushState"](g,"",y),r.value=g}catch(C){console.error(C),s[m?"replace":"assign"](y)}}function u(d,g){o(d,ot({},t.state,Pc(r.value.back,d,r.value.forward,!0),g,{position:r.value.position}),!0),i.value=d}function p(d,g){let m=ot({},r.value,t.state,{forward:d,scroll:Zo()});o(m.current,m,!0),o(d,ot({},Pc(i.value,d,null),{position:m.position+1},g),!1),i.value=d}return{location:i,state:r,push:p,replace:u}}function Uc(e){e=vc(e);let t=My(e),s=Oy(e,t.state,t.location,t.replace);function i(o,u=!0){u||s.pauseListeners(),history.go(o)}let r=ot({locatLine truncated
`+JSON.stringify(t):""}`},[gt.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Ay(t)}" via a navigation guard.`},[gt.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[gt.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[gt.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ys(e,t){return ot(new Error,{type:e,[Sc]:!0},t)}function Rn(e,t){return e instanceof Error&&Sc in e&&(t==null||!!(e.type&t))}var Dy=["params","query","hash"];function Ay(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of Dy)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function Nc(e){let t={};if(e===""||e==="?")return t;let s=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<s.length;++i){let r=s[i].replace(cc," "),o=r.indexOf("="),u=Xs(o<0?r:r.slice(0,o)),p=o<0?null:Xs(r.slice(o+1));if(u in t){let d=t[u];on(d)||(d=t[u]=[d]),d.push(p)}else t[u]=p}return t}function ol(e){let t="";for(let s in e){let i=e[s];if(s=wy(s),i==null){i!==void 0&&(t+=(t.length?"&":"")+s);continue}(on(i)?i.map(r=>r&&Qa(r)):[i&&Qa(i)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+s,r!=null&&(t+="="+r))})}return t}function Rc(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=on(i)?i.map(r=>r==null?null:""+r):i==null?i:""+i)}return t}var Tc=Symbol(""),il=Symbol(""),mr=Symbol(""),hr=Symbol(""),gr=Symbol("");function Js(){let e=[];function t(i){return e.push(i),()=>{let r=e.indexOf(i);r>-1&&e.splice(r,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function Bn(e,t,s,i,r,o=u=>u()){let u=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise((p,d)=>{let g=y=>{y===!1?d(ys(gt.NAVIGATION_ABORTED,{from:s,to:t})):y instanceof Error?d(y):Py(y)?d(ys(gt.NAVIGATION_GUARD_REDIRECT,{from:t,to:y})):(u&&i.enterCallbacks[r]===u&&typeof y=="function"&&u.push(y),p())},m=o(()=>e.call(i&&i.instances[r],t,s,g)),v=Promise.resolve(m);e.length<3&&(v=v.then(g)),v.catch(y=>d(y))})}function yr(e,t,s,i,r=o=>o()){let o=[];for(let u of e)for(let p in u.components){let d=u.components[p];if(!(t!=="beforeRouteEnter"&&!u.instances[p]))if(dc(d)){let g=(d.__vccOpts||d)[t];g&&o.push(Bn(g,s,i,u,p,r))}else{let g=d();o.push(()=>g.then(m=>{if(!m)throw new Error(`Couldn't resolve component "${p}" at "${u.path}"`);let v=uy(m)?m.default:m;u.mods[p]=m,u.components[p]=v;let y=(v.__vccOpts||v)[t];return y&&Bn(y,s,i,u,p,r)()}))}}return o}function Pc(e,t){let s=[],i=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let u=0;u<o;u++){let p=t.matched[u];p&&(e.matched.find(g=>gs(g,p))?i.push(p):s.push(p));let d=e.matched[u];d&&(t.matched.find(g=>gs(g,d))||r.push(d))}return[s,i,r]}var Iy=()=>location.protocol+"//"+location.host;function Uc(e,t){let{pathname:s,search:i,hash:r}=t,o=e.indexOf("#");if(o>-1){let u=r.includes(e.slice(o))?e.slice(o).length:1,p=r.slice(u);return p[0]!=="/"&&(p="/"+p),el(p,"")}return el(s,e)+i+r}function Oy(e,t,s,i){let r=[],o=[],u=null,p=({state:y})=>{let C=Uc(e,location),k=s.value,w=t.value,R=0;if(y){if(s.value=C,t.value=y,u&&u===k){u=null;return}R=w?y.position-w.position:0}else i(C);r.forEach(b=>{b(s.value,k,{delta:R,type:pr.pop,direction:R?R>0?fr.forward:fr.back:fr.unknown})})};function d(){u=s.value}function g(y){r.push(y);let C=()=>{let k=r.indexOf(y);k>-1&&r.splice(k,1)};return o.push(C),C}function m(){if(document.visibilityState==="hidden"){let{history:y}=window;if(!y.state)return;y.replaceState(ot({},y.state,{scroll:Zo()}),"")}}function v(){for(let y of o)y();o=[],window.removeEventListener("popstate",p),window.removeEventListener("pagehide",m),document.removeEventListener("visibilitychange",m)}return window.addEventListener("popstate",p),window.addEventListener("pagehide",m),document.addEventListener("visibilitychange",m),{pauseListeners:d,listen:g,destroy:v}}function Dc(e,t,s,i=!1,r=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:r?Zo():null}}function My(e){let{history:t,location:s}=window,i={value:Uc(e,s)},r={value:t.state};r.value||o(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(d,g,m){let v=e.indexOf("#"),y=v>-1?(s.host&&document.querySelector("base")?e:e.slice(v))+d:Iy()+e+d;try{t[m?"replaceState":"pushState"](g,"",y),r.value=g}catch(C){console.error(C),s[m?"replace":"assign"](y)}}function u(d,g){o(d,ot({},t.state,Dc(r.value.back,d,r.value.forward,!0),g,{position:r.value.position}),!0),i.value=d}function p(d,g){let m=ot({},r.value,t.state,{forward:d,scroll:Zo()});o(m.current,m,!0),o(d,ot({},Dc(i.value,d,null),{position:m.position+1},g),!1),i.value=d}return{location:i,state:r,push:p,replace:u}}function Bc(e){e=bc(e);let t=My(e),s=Oy(e,t.state,t.location,t.replace);function i(o,u=!0){u||s.pauseListeners(),history.go(o)}let r=ot({locatLine truncated
`);for(let m of g){if(s&&(o>0||u>0)&&/^([-+ ]|$)/.test(m)){m.startsWith("+")?(s.lines.push({kind:"add",oldNo:"",newNo:r++,text:m.slice(1)}),u--):m.startsWith("-")?(s.lines.push({kind:"remove",oldNo:i++,newNo:"",text:m.slice(1)}),o--):(s.lines.push({kind:"ctx",oldNo:i++,newNo:r++,text:m.slice(1)}),o--,u--);continue}if(m.startsWith("diff --git")){p(),d();continue}if(m.startsWith("--- ")){s&&s.lines.length&&p(),d().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){d().newPath=m.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!/^(index |similarity index|rename |new file mode|deleted file mode|Binary files)/.test(m)){if(m.startsWith("@@")){let v=m.match(/@@\s+-(\d+)(?:,(\d+))?\s+\+(\d+)(?:,(\d+))?\s+@@/);v&&(i=parseInt(v[1],10),r=parseInt(v[3],10),o=v[2]==null?1:parseInt(v[2],10),u=v[4]==null?1:parseInt(v[4],10)),d().lines.push({kind:"hunk",oldNo:"",newNo:"",text:m});continue}if(s)if(m.startsWith("+"))s.lines.push({kind:"add",oldNo:"",newNo:r++,text:m.slice(1)});else if(m.startsWith("-"))s.lines.push({kind:"remove",oldNo:i++,newNo:"",text:m.slice(1)});else{if(m.startsWith("\\"))continue;s.lines.push({kind:"ctx",oldNo:i++,newNo:r++,text:m.startsWith(" ")?m.slice(1):m})}}}return p(),t}var xo=(e,t)=>{let s=[],i=[],r="",o=!1;for(let u=0;u<e.length;u++){let p=e[u];o?p==='"'?e[u+1]==='"'?(r+='"',u++):o=!1:r+=p:p==='"'&&r===""?o=!0:p===t?(i.push(r),r=""):p===`
`||p==="\r"?(p==="\r"&&e[u+1]===`
`&&u++,i.push(r),s.push(i),i=[],r=""):r+=p}return(r!==""||i.length)&&(i.push(r),s.push(i)),s.filter(u=>u.length>1||u[0]!=="")},Zs=e=>Math.min(((e||"").match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length+4,24),iv=(function(){let e=s=>s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=s=>{let i=['<div class="diff-file-block">','<div class="diff-file-header"><span class="diff-file-icon"><i class="far fa-file-code"></i></span><span class="diff-file-name">'+e(s.path)+'</span><span class="diff-file-status diff-file-status-'+s.status+'">'+s.status+"</span></div>"];if(s.lines.length){i.push('<table class="diff-file-table"><tbody>');for(let r of s.lines)i.push('<tr class="diff-row diff-row-'+r.kind+'"><td class="diff-gutter diff-gutter-old">'+(r.oldNo||"")+'</td><td class="diff-gutter diff-gutter-new">'+(r.newNo||"")+'</td><td class="diff-sign">'+(r.kind==="add"?"+":r.kind==="remove"?"-":"")+'</td><td class="diff-code" style="--hang:'+Zs(r.text)+'ch">'+e(r.text)+"</td></tr>");i.push("</tbody></table>")}return i.push("</div>"),i.join("")};return s=>s&&Rr(s).map(t).join("")})();function ll(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function rv(e,t="EUR"){let s=Number(e)||0;return new Intl.NumberFormat(void 0,{style:"currency",currency:t,minimumFractionDigits:s%1?2:0,maximumFractionDigits:2}).format(s)}function av(e){return String(e??"").toUpperCase()}function lv(e,t,s=0){return(e||[]).slice(s,s+t)}function dv(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function uv(e,t){if(!t)return e||[];let s=Array.isArray(t)?t:[t];return[...e||[]].sort((i,r)=>{for(let o of s){let u=o[0]==="-"?-1:1;o=o.replace(/^[+-]/,"");let p=o.split(".").reduce((g,m)=>g?.[m],i),d=o.split(".").reduce((g,m)=>g?.[m],r);if(typeof p=="string"&&(p=p.toLowerCase()),typeof d=="string"&&(d=d.toLowerCase()),p!==d)return(p==null?-1:d==null?1:p<d?-1:1)*u}return 0})}function Tr(e,t){if(!e)return"";let s=new Date(e);if(isNaN(s))return String(e);if(!t||t==="mediumDate")return s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let i={yyyy:s.getFullYear(),MMM:s.toLocaleDateString(void 0,{month:"short"}),MM:String(s.getMonth()+1).padStart(2,"0"),dd:String(s.getDate()).padStart(2,"0"),d:s.getDate(),HH:String(s.getHours()).padStart(2,"0"),mm:String(s.getMinutes()).padStart(2,"0"),ss:String(s.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,r=>i[r])}function cv(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function Pr(e){if(!e)return"";let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e)),s=t?new Date(+t[1],+t[2]-1,+t[3]):new Date(e);if(isNaN(s))return"";let i=s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),r=new Date;r.setHours(0,0,0,0);let o=Math.round((s-r)/864e5),u;if(o===0)u="today";else if(o===1)u="tomorrow";else if(o===-1)u="yesterday";else{let p=Math.abs(o),d=Math.round(p/30.44),g=p<14?[p,"day"]:p<60?[Math.round(p/7),"week"]:d<18?[d,"month"]:[Math.round(p/365.25),"year"],m=g[0]+" "+g[1]+(g[0]===1?"":"s");u=o>0?"in "+m:m+" ago"}return i+" \xB7 "+u}function Yn(e){if(e==null||e===""||isNaN(e))return"";e=Number(e);let t="\u202F";if(e<1e3)return+(e<10?e.toFixed(2):e<100?e.toFixed(1):Math.round(e))+t+"ms";let s=e/1e3;if(s<60)return+(s<10?s.toFixed(2):s.toFixed(1))+t+"s";let i=o=>String(o).padStart(2,"0"),r=Math.round(s);return r<3600?Math.floor(r/60)+"m "+i(r%60)+"s":Math.floor(r/3600)+"h "+i(Math.floor(r%3600/60))+"m"}function Dr(e){if(!e)return"";let t=new Date(e);if(isNaN(t))return"";let s={day:"numeric",month:"short"};return t.getFullYear()!==new Date().getFullYear()&&(s.year="numeric"),t.toLocaleDateString(void 0,s)}function _c(e,t){return t?.split(".").reduce((s,i)=>s?.[i],e)}function ei(e=null,t=new Map){let s=ut({}),i=[],r=!1,o=new Proxy(s,{get(u,p){return typeof p=="string"&&p.startsWith("__v_")||Reflect.has(u,p)?Reflect.get(u,p):e?.[p]}});return Object.defineProperty(s,"parent",{value:e,configurable:!0}),Object.defineProperty(s,"viewState",{get:()=>o}),o.watch=(u,p,d=!1,g=!0)=>{let m=typeof u=="function"?()=>u(o):()=>_c(o,u),v=dt(m,p,{deep:d,flush:"post"});return i.push(v),g&&Je(()=>{r||p(m(),m())}),v},o.watchGroup=(u,p,d=!0)=>o.watch(()=>u.map(g=>_c(o,g)),p,!0,d),o.on=(u,p)=>{if(u==="dispose")return i.push(p),()=>{};t.has(u)||t.set(u,new Set),t.get(u).add(p);let d=()=>t.get(u)?.delete(p);return i.push(d),d},o.emit=(u,...p)=>{for(let d of[...t.get(u)||[]])d({},...p)},o.dispose=()=>{r=!0,i.splice(0).reverse().forEach(u=>u())},Vn(o.dispose),o}function Tt(){let e=new Set,t=new Set,s=!1,i=(o,u=0)=>{if(s)return;let p=setTimeout(()=>{e.delete(p),o()},u);return e.add(p),p};i.cancel=o=>{clearTimeout(o),e.delete(o)};let r=(o,u)=>{if(s)return;let p=setInterval(o,u);return t.add(p),p};return r.cancel=o=>{clearInterval(o),t.delete(o)},Vn(()=>{s=!0,e.forEach(clearTimeout),t.forEach(clearInterval)}),{timeout:i,interval:r}}function $t(){let e=new Set;return V Line truncated
`&&u++,i.push(r),s.push(i),i=[],r=""):r+=p}return(r!==""||i.length)&&(i.push(r),s.push(i)),s.filter(u=>u.length>1||u[0]!=="")},Zs=e=>Math.min(((e||"").match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length+4,24),iv=(function(){let e=s=>s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=s=>{let i=['<div class="diff-file-block">','<div class="diff-file-header"><span class="diff-file-icon"><i class="far fa-file-code"></i></span><span class="diff-file-name">'+e(s.path)+'</span><span class="diff-file-status diff-file-status-'+s.status+'">'+s.status+"</span></div>"];if(s.lines.length){i.push('<table class="diff-file-table"><tbody>');for(let r of s.lines)i.push('<tr class="diff-row diff-row-'+r.kind+'"><td class="diff-gutter diff-gutter-old">'+(r.oldNo||"")+'</td><td class="diff-gutter diff-gutter-new">'+(r.newNo||"")+'</td><td class="diff-sign">'+(r.kind==="add"?"+":r.kind==="remove"?"-":"")+'</td><td class="diff-code" style="--hang:'+Zs(r.text)+'ch">'+e(r.text)+"</td></tr>");i.push("</tbody></table>")}return i.push("</div>"),i.join("")};return s=>s&&Rr(s).map(t).join("")})();function ll(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function rv(e,t="EUR"){let s=Number(e)||0;return new Intl.NumberFormat(void 0,{style:"currency",currency:t,minimumFractionDigits:s%1?2:0,maximumFractionDigits:2}).format(s)}function av(e){return String(e??"").toUpperCase()}function lv(e,t,s=0){return(e||[]).slice(s,s+t)}function dv(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function uv(e,t){if(!t)return e||[];let s=Array.isArray(t)?t:[t];return[...e||[]].sort((i,r)=>{for(let o of s){let u=o[0]==="-"?-1:1;o=o.replace(/^[+-]/,"");let p=o.split(".").reduce((g,m)=>g?.[m],i),d=o.split(".").reduce((g,m)=>g?.[m],r);if(typeof p=="string"&&(p=p.toLowerCase()),typeof d=="string"&&(d=d.toLowerCase()),p!==d)return(p==null?-1:d==null?1:p<d?-1:1)*u}return 0})}function Tr(e,t){if(!e)return"";let s=new Date(e);if(isNaN(s))return String(e);if(!t||t==="mediumDate")return s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let i={yyyy:s.getFullYear(),MMM:s.toLocaleDateString(void 0,{month:"short"}),MM:String(s.getMonth()+1).padStart(2,"0"),dd:String(s.getDate()).padStart(2,"0"),d:s.getDate(),HH:String(s.getHours()).padStart(2,"0"),mm:String(s.getMinutes()).padStart(2,"0"),ss:String(s.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,r=>i[r])}function cv(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function Pr(e){if(!e)return"";let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e)),s=t?new Date(+t[1],+t[2]-1,+t[3]):new Date(e);if(isNaN(s))return"";let i=s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),r=new Date;r.setHours(0,0,0,0);let o=Math.round((s-r)/864e5),u;if(o===0)u="today";else if(o===1)u="tomorrow";else if(o===-1)u="yesterday";else{let p=Math.abs(o),d=Math.round(p/30.44),g=p<14?[p,"day"]:p<60?[Math.round(p/7),"week"]:d<18?[d,"month"]:[Math.round(p/365.25),"year"],m=g[0]+" "+g[1]+(g[0]===1?"":"s");u=o>0?"in "+m:m+" ago"}return i+" \xB7 "+u}function Yn(e){if(e==null||e===""||isNaN(e))return"";e=Number(e);let t="\u202F";if(e<1e3)return+(e<10?e.toFixed(2):e<100?e.toFixed(1):Math.round(e))+t+"ms";let s=e/1e3;if(s<60)return+(s<10?s.toFixed(2):s.toFixed(1))+t+"s";let i=o=>String(o).padStart(2,"0"),r=Math.round(s);return r<3600?Math.floor(r/60)+"m "+i(r%60)+"s":Math.floor(r/3600)+"h "+i(Math.floor(r%3600/60))+"m"}function Dr(e){if(!e)return"";let t=new Date(e);if(isNaN(t))return"";let s={day:"numeric",month:"short"};return t.getFullYear()!==new Date().getFullYear()&&(s.year="numeric"),t.toLocaleDateString(void 0,s)}function Gc(e,t){return t?.split(".").reduce((s,i)=>s?.[i],e)}function ei(e=null,t=new Map){let s=ut({}),i=[],r=!1,o=new Proxy(s,{get(u,p){return typeof p=="string"&&p.startsWith("__v_")||Reflect.has(u,p)?Reflect.get(u,p):e?.[p]}});return Object.defineProperty(s,"parent",{value:e,configurable:!0}),Object.defineProperty(s,"viewState",{get:()=>o}),o.watch=(u,p,d=!1,g=!0)=>{let m=typeof u=="function"?()=>u(o):()=>Gc(o,u),v=dt(m,p,{deep:d,flush:"post"});return i.push(v),g&&Je(()=>{r||p(m(),m())}),v},o.watchGroup=(u,p,d=!0)=>o.watch(()=>u.map(g=>Gc(o,g)),p,!0,d),o.on=(u,p)=>{if(u==="dispose")return i.push(p),()=>{};t.has(u)||t.set(u,new Set),t.get(u).add(p);let d=()=>t.get(u)?.delete(p);return i.push(d),d},o.emit=(u,...p)=>{for(let d of[...t.get(u)||[]])d({},...p)},o.dispose=()=>{r=!0,i.splice(0).reverse().forEach(u=>u())},Vn(o.dispose),o}function Tt(){let e=new Set,t=new Set,s=!1,i=(o,u=0)=>{if(s)return;let p=setTimeout(()=>{e.delete(p),o()},u);return e.add(p),p};i.cancel=o=>{clearTimeout(o),e.delete(o)};let r=(o,u)=>{if(s)return;let p=setInterval(o,u);return t.add(p),p};return r.cancel=o=>{clearInterval(o),t.delete(o)},Vn(()=>{s=!0,e.forEach(clearTimeout),t.forEach(clearInterval)}),{timeout:i,interval:r}}function $t(){let e=new Set;return V Line truncated
`)+`
`,Yc=e=>String(e??"").replace(/\\/g,"\\\\").replace(/\|/g,"\\|").replace(/\r?\n/g," ");function tp(e,t,s=[]){return["| "+e.map(Yc).join(" | ")+" |","| "+e.map((r,o)=>s[o]?"---:":"---").join(" | ")+" |",...t.map(r=>"| "+e.map((o,u)=>Yc(r[u])).join(" | ")+" |")].join(`
`,Xc=e=>String(e??"").replace(/\\/g,"\\\\").replace(/\|/g,"\\|").replace(/\r?\n/g," ");function np(e,t,s=[]){return["| "+e.map(Xc).join(" | ")+" |","| "+e.map((r,o)=>s[o]?"---:":"---").join(" | ")+" |",...t.map(r=>"| "+e.map((o,u)=>Xc(r[u])).join(" | ")+" |")].join(`
`)+`
`}var Nv=Object.freeze({view:"table",query:"",sort:null,group:null,agg:"mean",sum:"mean",ranges:{},values:{},sums:{},numeric:[],chart:null,x:null,y:[]});function Rv(e){let t=new URLSearchParams;e.view&&e.view!=="table"&&t.set("view",e.view),e.query&&t.set("q",e.query),e.sort?.column&&t.set("sort",e.sort.column+(e.sort.dir==="desc"?":desc":"")),e.group&&t.set("group",e.group),e.group&&e.agg&&e.agg!=="mean"&&t.set("agg",e.agg);for(let[s,[i,r]]of Object.entries(e.ranges||{}))(i!=null||r!=null)&&t.set("range."+s,(i??"")+"~"+(r??""));for(let[s,i]of Object.entries(e.values||{}))for(let r of i||[])t.append("in."+s,r);e.sum&&e.sum!=="mean"&&t.set("sum",e.sum);for(let[s,i]of Object.entries(e.sums||{}))i&&i!==(e.sum||"mean")&&t.set("sum."+s,i);return e.numeric?.length&&t.set("num",e.numeric.join("|")),e.chart&&t.set("chart",e.chart),e.x&&t.set("x",e.x),e.y?.length&&t.set("y",e.y.join("|")),t.toString()}function Tv(e){var d,g;let t=new URLSearchParams(e||""),s={...Nv,ranges:{},values:{},sums:{},numeric:[],y:[]},i=t.get("view");["table","chart","raw"].includes(i)&&(s.view=i),s.query=t.get("q")||"";let r=t.get("sort");if(r){let m=/^(.*?)(?::(asc|desc))?$/.exec(r);s.sort={column:m[1],dir:m[2]||"asc"}}s.group=t.get("group")||null;let o=t.get("agg");o&&ti[o]&&(s.agg=o);for(let[m,v]of t.entries())if(m.startsWith("range.")){let[y,C]=v.split("~").map(k=>k===""||k==null?null:Number(k));s.ranges[m.slice(6)]=[Number.isFinite(y)?y:null,Number.isFinite(C)?C:null]}else m.startsWith("in.")?((d=s.values)[g=m.slice(3)]||(d[g]=[])).push(v):m.startsWith("sum.")&&ti[v]&&(s.sums[m.slice(4)]=v);let u=t.get("sum");u&&ti[u]&&(s.sum=u),s.numeric=(t.get("num")||"").split("|").filter(Boolean);let p=t.get("chart");return["bar","line","scatter"].includes(p)&&(s.chart=p),s.x=t.get("x")||null,s.y=(t.get("y")||"").split("|").filter(Boolean),s}var fl=e=>"#"+e+":";function eo(e,t){if(!t||typeof e!="string"||!e.startsWith(fl(t)))return null;try{return Tv(e.slice(fl(t).length))}catch{return null}}function np(e,t){let s=Rv(t);return s?fl(e)+s.replace(/%3A/gi,":").replace(/%7C/gi,"|").replace(/%7E/gi,"~").replace(/%2C/gi,","):""}var gl=e=>/^#table(?:-\d+)?:/.test(e||"");var yl=function(e,t=e){let s=/\bXXXX-\d+\b/g;t.on("dark-mode",(V,S)=>{e.aceOption&&(e.aceOption.theme=S?"nord_dark":"chrome")});let i=Tt(),r=$t();e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent);let o={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},u=["license","txt"],p=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],d=["wav","mp3","ogg","wma","flac","aac","m4a"],g=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.toggleSource=function(){e.showSource=!e.showSource},e.toggleAllowScripts=function(){e.allowScripts=!e.allowScripts};let m=(()=>{try{return window.localStorage?.getItem("wrapLines")}catch{return null}})();e.wrapLines=(m??(window.matchMedia?.("(max-width: 767px)").matches?"false":"true"))!=="false",e.toggleWrap=function(){e.wrapLines=!e.wrapLines;try{window.localStorage?.setItem("wrapLines",String(e.wrapLines))}catch{}e.codeEditor?.session.setUseWrapMode(e.wrapLines)};function v(){return window.document.querySelector(".reading-layout .markdown-body")}function y(){let V=v();V&&(V.querySelectorAll("mark.md-find").forEach(S=>{S.replaceWith(window.document.createTextNode(S.textContent))}),V.normalize())}e.runMdFind=function(){y(),e.mdFindTotal=0,e.mdFindIndex=0;let V=(e.mdFindQuery||"").trim(),S=v();if(!V||!S)return;let q=!!e.mdFindCase,G=q?V:V.toLowerCase(),ie=window.document.createTreeWalker(S,4),K=[];for(;ie.nextNode();)(q?ie.currentNode.nodeValue:ie.currentNode.nodeValue.toLowerCase()).includes(G)&&K.push(ie.currentNode);let ne=0;for(let le of K){let ye=le.nodeValue,Ae=q?ye:ye.toLowerCase(),Xe=window.document.createDocumentFragment(),tt=0,Ge;for(;(Ge=Ae.indexOf(G,tt))!==-1;){Xe.appendChild(window.document.createTextNode(ye.slice(tt,Ge)));let We=window.document.createElement("mark");We.className="md-find",We.textContent=ye.slice(Ge,Ge+V.length),Xe.appendChild(We),ne++,tt=Ge+V.length}Xe.appendChild(window.document.createTextNode(ye.slice(tt))),le.parentNode.replaceChild(Xe,le)}e.mdFindTotal=ne,ne&&e.stepMdFind(0)},e.stepMdFind=function(V){let S=v();if(!S||!e.mdFindTotal)return;let q=S.querySelectorAll("mark.md-find");e.mdFindIndex=(e.mdFindIndex+V+q.length)%q.length,q.forEach((G,ie)=>G.classList.toggle("is-current",ie===e.mdFindIndex)),q[e.mdFindIndex]?.scrollIntoView({block:"center",behavior:"smooth"})},e.toggleMdFind=function(V){if(e.mdFindOpen=V===void 0?!e.mdFindOpen:V,!e.mdFindOpen){y(),e.mdFindTotal=0;return}Je(()=>window.document.querySelector(".md-find-input")?.focus())},e.findInFile=function(){let V=e.codeEditor;if(!V)return;V.focus(),V.execCommand("find");let S=()=>{let q=V.searchBox?.element;q&&(V.renderer.setScrollMargin(52,12,0,0),!q._dockObserver&&(q._dockObserver=new MutationObserver(()=>{V.renderer.setScrollMargin(q.style.display!= Line truncated
`}var Nv=Object.freeze({view:"table",query:"",sort:null,group:null,agg:"mean",sum:"mean",ranges:{},values:{},sums:{},numeric:[],chart:null,x:null,y:[]});function Rv(e){let t=new URLSearchParams;e.view&&e.view!=="table"&&t.set("view",e.view),e.query&&t.set("q",e.query),e.sort?.column&&t.set("sort",e.sort.column+(e.sort.dir==="desc"?":desc":"")),e.group&&t.set("group",e.group),e.group&&e.agg&&e.agg!=="mean"&&t.set("agg",e.agg);for(let[s,[i,r]]of Object.entries(e.ranges||{}))(i!=null||r!=null)&&t.set("range."+s,(i??"")+"~"+(r??""));for(let[s,i]of Object.entries(e.values||{}))for(let r of i||[])t.append("in."+s,r);e.sum&&e.sum!=="mean"&&t.set("sum",e.sum);for(let[s,i]of Object.entries(e.sums||{}))i&&i!==(e.sum||"mean")&&t.set("sum."+s,i);return e.numeric?.length&&t.set("num",e.numeric.join("|")),e.chart&&t.set("chart",e.chart),e.x&&t.set("x",e.x),e.y?.length&&t.set("y",e.y.join("|")),t.toString()}function Tv(e){var d,g;let t=new URLSearchParams(e||""),s={...Nv,ranges:{},values:{},sums:{},numeric:[],y:[]},i=t.get("view");["table","chart","raw"].includes(i)&&(s.view=i),s.query=t.get("q")||"";let r=t.get("sort");if(r){let m=/^(.*?)(?::(asc|desc))?$/.exec(r);s.sort={column:m[1],dir:m[2]||"asc"}}s.group=t.get("group")||null;let o=t.get("agg");o&&ti[o]&&(s.agg=o);for(let[m,v]of t.entries())if(m.startsWith("range.")){let[y,C]=v.split("~").map(k=>k===""||k==null?null:Number(k));s.ranges[m.slice(6)]=[Number.isFinite(y)?y:null,Number.isFinite(C)?C:null]}else m.startsWith("in.")?((d=s.values)[g=m.slice(3)]||(d[g]=[])).push(v):m.startsWith("sum.")&&ti[v]&&(s.sums[m.slice(4)]=v);let u=t.get("sum");u&&ti[u]&&(s.sum=u),s.numeric=(t.get("num")||"").split("|").filter(Boolean);let p=t.get("chart");return["bar","line","scatter"].includes(p)&&(s.chart=p),s.x=t.get("x")||null,s.y=(t.get("y")||"").split("|").filter(Boolean),s}var fl=e=>"#"+e+":";function eo(e,t){if(!t||typeof e!="string"||!e.startsWith(fl(t)))return null;try{return Tv(e.slice(fl(t).length))}catch{return null}}function sp(e,t){let s=Rv(t);return s?fl(e)+s.replace(/%3A/gi,":").replace(/%7C/gi,"|").replace(/%7E/gi,"~").replace(/%2C/gi,","):""}var gl=e=>/^#table(?:-\d+)?:/.test(e||"");var yl=function(e,t=e){let s=/\bXXXX-\d+\b/g;t.on("dark-mode",(V,S)=>{e.aceOption&&(e.aceOption.theme=S?"nord_dark":"chrome")});let i=Tt(),r=$t();e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent);let o={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},u=["license","txt"],p=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],d=["wav","mp3","ogg","wma","flac","aac","m4a"],g=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.toggleSource=function(){e.showSource=!e.showSource},e.toggleAllowScripts=function(){e.allowScripts=!e.allowScripts};let m=(()=>{try{return window.localStorage?.getItem("wrapLines")}catch{return null}})();e.wrapLines=(m??(window.matchMedia?.("(max-width: 767px)").matches?"false":"true"))!=="false",e.toggleWrap=function(){e.wrapLines=!e.wrapLines;try{window.localStorage?.setItem("wrapLines",String(e.wrapLines))}catch{}e.codeEditor?.session.setUseWrapMode(e.wrapLines)};function v(){return window.document.querySelector(".reading-layout .markdown-body")}function y(){let V=v();V&&(V.querySelectorAll("mark.md-find").forEach(S=>{S.replaceWith(window.document.createTextNode(S.textContent))}),V.normalize())}e.runMdFind=function(){y(),e.mdFindTotal=0,e.mdFindIndex=0;let V=(e.mdFindQuery||"").trim(),S=v();if(!V||!S)return;let q=!!e.mdFindCase,G=q?V:V.toLowerCase(),ie=window.document.createTreeWalker(S,4),K=[];for(;ie.nextNode();)(q?ie.currentNode.nodeValue:ie.currentNode.nodeValue.toLowerCase()).includes(G)&&K.push(ie.currentNode);let ne=0;for(let le of K){let ye=le.nodeValue,Ae=q?ye:ye.toLowerCase(),Xe=window.document.createDocumentFragment(),tt=0,Ge;for(;(Ge=Ae.indexOf(G,tt))!==-1;){Xe.appendChild(window.document.createTextNode(ye.slice(tt,Ge)));let We=window.document.createElement("mark");We.className="md-find",We.textContent=ye.slice(Ge,Ge+V.length),Xe.appendChild(We),ne++,tt=Ge+V.length}Xe.appendChild(window.document.createTextNode(ye.slice(tt))),le.parentNode.replaceChild(Xe,le)}e.mdFindTotal=ne,ne&&e.stepMdFind(0)},e.stepMdFind=function(V){let S=v();if(!S||!e.mdFindTotal)return;let q=S.querySelectorAll("mark.md-find");e.mdFindIndex=(e.mdFindIndex+V+q.length)%q.length,q.forEach((G,ie)=>G.classList.toggle("is-current",ie===e.mdFindIndex)),q[e.mdFindIndex]?.scrollIntoView({block:"center",behavior:"smooth"})},e.toggleMdFind=function(V){if(e.mdFindOpen=V===void 0?!e.mdFindOpen:V,!e.mdFindOpen){y(),e.mdFindTotal=0;return}Je(()=>window.document.querySelector(".md-find-input")?.focus())},e.findInFile=function(){let V=e.codeEditor;if(!V)return;V.focus(),V.execCommand("find");let S=()=>{let q=V.searchBox?.element;q&&(V.renderer.setScrollMargin(52,12,0,0),!q._dockObserver&&(q._dockObserver=new MutationObserver(()=>{V.renderer.setScrollMargin(q.style.display!= Line truncated
`).forEach((S,q)=>{for(let[G,ie]of C){let K=G.exec(S);if(K&&!/^(if|for|while|switch|return|catch)$/.test(K[1])){V.push({name:K[1],kind:ie,line:q+1});break}}}),k={content:e.content,list:V.slice(0,300)},k.list},e.goToSymbol=function(V){e.symbolsOpen=!1;let S=e.codeEditor;S&&(S.scrollToLine(V-1,!0,!0,()=>{}),S.gotoLine(V,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+V),window.dispatchEvent(new HashChangeEvent("hashchange")))},e.gotoLine=function(){e.codeEditor&&(e.moreOpen=!1,e.gotoError="",e.gotoValue=String(e.codeEditor.getCursorPosition().row+1),e.gotoOpen=!0,setTimeout(()=>{let V=window.document.getElementById("goto-input");V&&(V.focus(),V.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let V=e.codeEditor;if(!V)return;let S=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),q=V.session.getLength();if(!S||+S[1]<1||+S[1]>q){e.gotoError="Enter a line from 1 to "+q;return}V.gotoLine(+S[1],S[2]?Math.max(0,+S[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",V.focus()},e.rootEntries=function(){return[...e.files||[]].sort((V,S)=>{let q=V.size==null,G=S.size==null;return q!==G?q?-1:1:V.name.localeCompare(S.name)})},e.formatSize=function(V){if(V==null)return"";if(V<1024)return V+" B";let S=V/1024,q=G=>G.toFixed(1).replace(/\.0$/,"");return S<1024?q(S)+" KB":S<1024*1024?q(S/1024)+" MB":q(S/1024/1024)+" GB"},e.fileSize=function(V){if(!V)return null;let S=V.replace(/^\/+/,""),q=(e.files||[]).find(G=>(G.path?G.path+"/":"")+G.name===S);return q&&q.size!=null?q.size:null},e.revealFolder=function(V){e.sidebarHidden=!1,e.sidebarCollapsed=!1,Je(()=>{let S=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(V):V)+'"]');S&&(S.closest("li")?.classList.contains("open")||S.click(),S.scrollIntoView({block:"nearest"}),S.focus())})};let w={content:null,n:0},R=V=>{if(w.content===V)return w.n;let S=V;if(typeof S=="string")try{S=JSON.parse(S)}catch{S=null}let q=[],G=K=>{Array.isArray(K)?q.push(K.join("")):typeof K=="string"&&q.push(K)};(S&&(S.cells||(S.worksheets||[]).flatMap(K=>K.cells||[]))||[]).forEach(K=>{G(K?.source??K?.input),(K?.outputs||[]).forEach(ne=>{G(ne?.text),ne?.data&&(G(ne.data["text/plain"]),G(ne.data["text/markdown"]),G(ne.data["text/html"])),G(ne?.traceback)})});let ie=q.reduce((K,ne)=>K+(ne.match(s)||[]).length,0);return w={content:V,n:ie},ie};e.redactionCount=function(){return e.type==="IPython"?R(e.content):typeof e.content!="string"?0:((e.type==="html"?e.content.replace(/<[^>]*>/g," "):e.content).match(s)||[]).length},e.renderRedacted=to;let b=V=>V.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(V){let S=e.renderRedacted(V);if(!S||typeof window.DOMParser!="function")return S;let q=new window.DOMParser().parseFromString("<div>"+S+"</div>","text/html"),G={};return q.querySelectorAll("h1, h2, h3").forEach(ie=>{let K=ie.id||b(ie.textContent);G[K]?K+="-"+ ++G[K]:G[K]=1,ie.id=K}),q.body.firstChild.innerHTML};let P={content:null,list:[],title:null,count:0},D=()=>{if(e.type!=="html"||typeof e.content!="string")return{list:[],title:null,count:0};if(P.content===e.content)return P;let V=Cr(e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)),S=V.length,q=null;if(V[0]?.level===1&&V.filter(G=>G.level===1).length===1){q=V[0],V=V.slice(1);let G=Math.min(...V.map(ie=>ie.level));V=V.map(ie=>({...ie,depth:ie.level-G}))}return P={content:e.content,list:V,title:q,count:S},P};e.readmeToc=()=>D().list,e.tocTitle=()=>D().title,e.tocCount=()=>D().count,e.activeHeading=null,r(window,"scroll",()=>{let V=e.readmeToc?e.readmeToc():[];if(e.tocCount()<3)return;let S=Er(V.map(q=>q.id),{offset:120,scroller:window.document.querySelector(".explorer-content")});e.activeHeading!==S&&(e.activeHeading=S)},{capture:!0,passive:!0}),e.scrollToHeading=function(V){if(!V){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}Sr(V),e.activeHeading=V};let L=()=>!e.preview&&eo(window.location.hash,"table")?.view||"table";e.csvView=L();let H={content:null,rows:[]};e.isCsv=()=>typeof e.content=="string"&&e.type!=="html"&&/\.(csv|tsv)$/i.test(e.filePath||"")&&e.content.length<=1024*1024,e.csvRows=()=>{if(H.content!==e.content){let V=/\.tsv$/i.test(e.filePath||"")?" ":",";H={content:e.content,rows:xo(e.content,V)}}return H.rows},e.redactParts=Jt,e.pathCopied=!1,e.copyPath=async function(){window.navigator.clipboard?.writeText&&(await window.navigator.clipboard.writeText(e.filePath||""),e.pathCopied=!0,setTimeout(()=>{e.pathCopied=!1},1600))},e.contentCopied=!1,e.copyContent=async function(){if(typeof e.content!="string"||!window.navigator.clipboard?.writeText)return;let V=e.content;if(e.type==="html"&&e.url)if(e.preview)V=e.sourceContent;else try{V=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await w Line truncated
`).length:0,Dv=e=>/\.(md|markdown|mdx)$/i.test(e?.filename||"")||e?.language==="Markdown";function op(e,t){let s=$t();e.redactParts=Jt,e.hangIndent=Zs,e.isRedactedName=r=>/^XXXX-\d+$/.test(String(r||"").trim()),e.tocOpen=!1,e.activeAnchor="";let i=()=>{let r=t();if(!r.length)return;let o=Er(r,{offset:64,scroller:window.document.querySelector("main.app-view")});e.activeAnchor!==o&&(e.activeAnchor=o)};return s(window,"scroll",i,{capture:!0,passive:!0}),s(window,"resize",i,{passive:!0}),s(window.document,"click",r=>{e.tocOpen&&!r.target.closest?.(".toc-menu")&&(e.tocOpen=!1)}),s(window.document,"keydown",r=>{r.key==="Escape"&&e.tocOpen&&(e.tocOpen=!1)}),e.jumpToAnchor=r=>{e.tocOpen=!1,Sr(r)&&(e.activeAnchor=r)},i}var qr=e=>(String(e||"").split(".").pop()||"").toLowerCase(),Av={md:"markdown",markdown:"markdown",mdx:"markdown",ipynb:"notebook",csv:"csv",tsv:"csv",svg:"svg",png:"image",jpg:"image",jpeg:"image",gif:"image",webp:"image",bmp:"image",ico:"image",avif:"image",pdf:"pdf",mp4:"video",webm:"video",mov:"video",m4v:"video",ogv:"video",mp3:"audio",wav:"audio",ogg:"audio",oga:"audio",m4a:"audio",flac:"audio",aac:"audio"},Iv={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif",pdf:"application/pdf",mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",m4v:"video/mp4",ogv:"video/ogg",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",m4a:"audio/mp4",flac:"audio/flac",aac:"audio/aac"},Ov=1024*1024;function no(e){if(e?.tooLarge)return"too-large";if(e?.hidden)return"hidden";let t=Av[qr(e?.filename)]||(e?.language==="Markdown"?"markdown":null);return e?.encoding==="base64"?["image","pdf","video","audio"].includes(t)&&e.content?t:"binary":e?.content?t==="csv"&&e.content.length>Ov?"code":["markdown","notebook","csv","svg"].includes(t)?t:"code":"empty"}var Mv=e=>["markdown","notebook","csv","svg"].includes(e),sp={markdown:"Markdown",notebook:"Jupyter notebook",csv:"Table",svg:"SVG",image:"Image",pdf:"PDF",video:"Video",audio:"Audio",binary:"Binary","too-large":"Too large",hidden:"Image"};function Vv(e,t){return t==="markdown"?"markdown":t==="notebook"?"json":t==="svg"?"markup":t==="csv"?"none":e?.language||qr(e?.filename)||"none"}var qv=e=>{let t=window.atob(e||""),s=new Uint8Array(t.length);for(let i=0;i<t.length;i++)s[i]=t.charCodeAt(i);return s};function ip(e){e.gistViews={};let t=/^#table-(\d+):/.exec(window.location.hash||"");if(t){let u=eo(window.location.hash,"table-"+t[1])?.view;(u==="chart"||u==="raw")&&(e.gistViews[+t[1]-1]=u)}e.gistKind=u=>no(e.details?.files?.[u]),e.gistHasRendered=u=>Mv(e.gistKind(u)),e.gistView=u=>!e.gistHasRendered(u)||e.gistViews[u]==="raw"?"raw":e.gistViews[u]==="chart"&&e.gistKind(u)==="csv"?"chart":"rendered",e.setGistView=(u,p)=>{e.gistViews={...e.gistViews,[u]:p}},e.gistSourceFile=u=>{let p=e.details?.files?.[u];return{...p,language:Vv(p,e.gistKind(u)),filename:"source.txt"}};let s=new Map;Vn(()=>{s.forEach(u=>window.URL.revokeObjectURL?.(u)),s.clear()});let i=(u,p)=>{if(!u||!window.URL?.createObjectURL)return null;let d=u.encoding==="base64",g=!p||d?Iv[qr(u.filename)]||(d?"application/octet-stream":"text/plain"):"text/plain",m=(u.filename||"")+"\0"+g+"\0"+(u.content||"").length;if(!s.has(m)){let v=d?qv(u.content):u.content||"";s.set(m,window.URL.createObjectURL(new window.Blob([v],{type:g+(d?"":";charset=utf-8")})))}return s.get(m)};e.gistMediaUrl=u=>i(u,!1),e.gistRawUrl=u=>i(u,!0);let r=new WeakMap;e.gistCsvRows=u=>{if(!u)return[];let p=r.get(u);return(!p||p.content!==u.content||p.filename!==u.filename)&&(p={content:u.content,filename:u.filename,rows:xo(u.content||"",qr(u.filename)==="tsv"?" ":",")},r.set(u,p)),p.rows},e.gistCopied=null,e.copyGistFile=async u=>{let p=e.details?.files?.[u];!p||p.encoding==="base64"||!window.navigator.clipboard?.writeText||(await window.navigator.clipboard.writeText(p.content||""),e.gistCopied=u,window.setTimeout(()=>{e.gistCopied===u&&(e.gistCopied=null)},1600))},e.fileOutlines={},e.gistFileId=u=>"file-"+(u+1),e.setFileOutline=(u,p)=>{let d=e.fileOutlines[u];d&&d.map(g=>g.id).join()===p.map(g=>g.id).join()||(e.fileOutlines={...e.fileOutlines,[u]:p})},e.gistToc=()=>(e.details?.files||[]).map((u,p)=>({id:e.gistFileId(p),index:p,parts:Jt(u.filename),kind:no(u),language:sp[no(u)]&&no(u)!=="csv"?sp[no(u)]:u.language||(no(u)==="csv"?"CSV":"Text"),lines:u.encoding==="base64"?null:Pv(u.content),size:u.size,headings:Dv(u)&&e.gistView(p)==="rendered"?e.fileOutlines[p]||[]:[]}));let o=()=>e.gistToc().flatMap(u=>[u.id,...u.headings.map(p=>p.id)]);e.showGistToc=()=>{let u=e.gistToc();return e.tabState?.active==="files"&&(u.length>=2||(u[0]?.headings.length||0)>=3)},e.activeFileIndex=()=>{let p=e.gistToc().find(d=>d.id===e.activeAnchor||d.headings.some(g=>g.id===e.activeAnchor));return p?p.index:0},op(e,o)}var Lv=e=>e?.merged?"merged":e?.draft&&e?.state==="open"?"draft":e?.state==="closed"?"closed":"open";function rp(e){let t={diff:null,th Line truncated
`).length:0,Dv=e=>/\.(md|markdown|mdx)$/i.test(e?.filename||"")||e?.language==="Markdown";function ip(e,t){let s=$t();e.redactParts=Jt,e.hangIndent=Zs,e.isRedactedName=r=>/^XXXX-\d+$/.test(String(r||"").trim()),e.tocOpen=!1,e.activeAnchor="";let i=()=>{let r=t();if(!r.length)return;let o=Er(r,{offset:64,scroller:window.document.querySelector("main.app-view")});e.activeAnchor!==o&&(e.activeAnchor=o)};return s(window,"scroll",i,{capture:!0,passive:!0}),s(window,"resize",i,{passive:!0}),s(window.document,"click",r=>{e.tocOpen&&!r.target.closest?.(".toc-menu")&&(e.tocOpen=!1)}),s(window.document,"keydown",r=>{r.key==="Escape"&&e.tocOpen&&(e.tocOpen=!1)}),e.jumpToAnchor=r=>{e.tocOpen=!1,Sr(r)&&(e.activeAnchor=r)},i}var qr=e=>(String(e||"").split(".").pop()||"").toLowerCase(),Av={md:"markdown",markdown:"markdown",mdx:"markdown",ipynb:"notebook",csv:"csv",tsv:"csv",svg:"svg",png:"image",jpg:"image",jpeg:"image",gif:"image",webp:"image",bmp:"image",ico:"image",avif:"image",pdf:"pdf",mp4:"video",webm:"video",mov:"video",m4v:"video",ogv:"video",mp3:"audio",wav:"audio",ogg:"audio",oga:"audio",m4a:"audio",flac:"audio",aac:"audio"},Iv={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif",pdf:"application/pdf",mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",m4v:"video/mp4",ogv:"video/ogg",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",m4a:"audio/mp4",flac:"audio/flac",aac:"audio/aac"},Ov=1024*1024;function no(e){if(e?.tooLarge)return"too-large";if(e?.hidden)return"hidden";let t=Av[qr(e?.filename)]||(e?.language==="Markdown"?"markdown":null);return e?.encoding==="base64"?["image","pdf","video","audio"].includes(t)&&e.content?t:"binary":e?.content?t==="csv"&&e.content.length>Ov?"code":["markdown","notebook","csv","svg"].includes(t)?t:"code":"empty"}var Mv=e=>["markdown","notebook","csv","svg"].includes(e),op={markdown:"Markdown",notebook:"Jupyter notebook",csv:"Table",svg:"SVG",image:"Image",pdf:"PDF",video:"Video",audio:"Audio",binary:"Binary","too-large":"Too large",hidden:"Image"};function Vv(e,t){return t==="markdown"?"markdown":t==="notebook"?"json":t==="svg"?"markup":t==="csv"?"none":e?.language||qr(e?.filename)||"none"}var qv=e=>{let t=window.atob(e||""),s=new Uint8Array(t.length);for(let i=0;i<t.length;i++)s[i]=t.charCodeAt(i);return s};function rp(e){e.gistViews={};let t=/^#table-(\d+):/.exec(window.location.hash||"");if(t){let u=eo(window.location.hash,"table-"+t[1])?.view;(u==="chart"||u==="raw")&&(e.gistViews[+t[1]-1]=u)}e.gistKind=u=>no(e.details?.files?.[u]),e.gistHasRendered=u=>Mv(e.gistKind(u)),e.gistView=u=>!e.gistHasRendered(u)||e.gistViews[u]==="raw"?"raw":e.gistViews[u]==="chart"&&e.gistKind(u)==="csv"?"chart":"rendered",e.setGistView=(u,p)=>{e.gistViews={...e.gistViews,[u]:p}},e.gistSourceFile=u=>{let p=e.details?.files?.[u];return{...p,language:Vv(p,e.gistKind(u)),filename:"source.txt"}};let s=new Map;Vn(()=>{s.forEach(u=>window.URL.revokeObjectURL?.(u)),s.clear()});let i=(u,p)=>{if(!u||!window.URL?.createObjectURL)return null;let d=u.encoding==="base64",g=!p||d?Iv[qr(u.filename)]||(d?"application/octet-stream":"text/plain"):"text/plain",m=(u.filename||"")+"\0"+g+"\0"+(u.content||"").length;if(!s.has(m)){let v=d?qv(u.content):u.content||"";s.set(m,window.URL.createObjectURL(new window.Blob([v],{type:g+(d?"":";charset=utf-8")})))}return s.get(m)};e.gistMediaUrl=u=>i(u,!1),e.gistRawUrl=u=>i(u,!0);let r=new WeakMap;e.gistCsvRows=u=>{if(!u)return[];let p=r.get(u);return(!p||p.content!==u.content||p.filename!==u.filename)&&(p={content:u.content,filename:u.filename,rows:xo(u.content||"",qr(u.filename)==="tsv"?" ":",")},r.set(u,p)),p.rows},e.gistCopied=null,e.copyGistFile=async u=>{let p=e.details?.files?.[u];!p||p.encoding==="base64"||!window.navigator.clipboard?.writeText||(await window.navigator.clipboard.writeText(p.content||""),e.gistCopied=u,window.setTimeout(()=>{e.gistCopied===u&&(e.gistCopied=null)},1600))},e.fileOutlines={},e.gistFileId=u=>"file-"+(u+1),e.setFileOutline=(u,p)=>{let d=e.fileOutlines[u];d&&d.map(g=>g.id).join()===p.map(g=>g.id).join()||(e.fileOutlines={...e.fileOutlines,[u]:p})},e.gistToc=()=>(e.details?.files||[]).map((u,p)=>({id:e.gistFileId(p),index:p,parts:Jt(u.filename),kind:no(u),language:op[no(u)]&&no(u)!=="csv"?op[no(u)]:u.language||(no(u)==="csv"?"CSV":"Text"),lines:u.encoding==="base64"?null:Pv(u.content),size:u.size,headings:Dv(u)&&e.gistView(p)==="rendered"?e.fileOutlines[p]||[]:[]}));let o=()=>e.gistToc().flatMap(u=>[u.id,...u.headings.map(p=>p.id)]);e.showGistToc=()=>{let u=e.gistToc();return e.tabState?.active==="files"&&(u.length>=2||(u[0]?.headings.length||0)>=3)},e.activeFileIndex=()=>{let p=e.gistToc().find(d=>d.id===e.activeAnchor||d.headings.some(g=>g.id===e.activeAnchor));return p?p.index:0},ip(e,o)}var Lv=e=>e?.merged?"merged":e?.draft&&e?.state==="open"?"draft":e?.state==="closed"?"closed":"open";function ap(e){let t={diff:null,th Line truncated
`),p=i.date?e.fmt?.date(i.date):"",d=s[s.length-1];(!d||d.day!==p)&&s.push(d={day:p,commits:[]}),d.commits.push({...i,index:r+1,headline:o,detail:u.join(`
`).trim()})}),s},e.showFileToc=()=>e.tabState?.active==="files"&&e.prFiles().length>=2,e.activeFileIndex=()=>{let s=e.prFiles().find(i=>i.id===e.activeAnchor);return s?s.index:0},e.openTab=s=>{e.tabState={active:s},e.tocOpen=!1},e.showInDiff=s=>{s&&(e.openTab("files"),e.collapsedFiles={...e.collapsedFiles,[s.index]:!1},Je(()=>e.jumpToAnchor(s.id)))},e.jumpToFile=s=>{e.collapsedFiles={...e.collapsedFiles,[s.index]:!1},e.jumpToAnchor(s.id)},op(e,()=>e.tabState?.active==="files"?e.prFiles().map(s=>s.id):[])}function ap(e){return e?.body||e?.comments?.length||e?.reviewComments?.length?"conversation":e?.diff?"files":e?.commits?.length?"commits":"conversation"}function vl(e,t,s){let i,r=!1,o="form-draft:"+s,u=()=>Object.fromEntries(t.map(y=>[y,e[y]])),p=()=>JSON.stringify(u()),d=y=>{for(let C of t)Object.prototype.hasOwnProperty.call(y,C)&&(e[C]=y[C]);e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate))},g=()=>{try{window.sessionStorage.removeItem(o)}catch{}},m=(y=!1)=>{if(i!==void 0){if(y&&document.querySelectorAll("input, select, textarea").forEach(C=>{C._field?.binding.state===e&&C._field.timer&&C._field.commit()}),e.unsavedChanges=p()!==i,e.draftSaved=!1,!e.unsavedChanges){g();return}try{window.sessionStorage.setItem(o,JSON.stringify({account:e.user?.username||null,savedAt:Date.now(),values:u()})),e.draftSaved=!0}catch{}}},v=()=>m(!0);return e.on("routeLeave",v),window.addEventListener("beforeunload",v),e.on("dispose",()=>window.removeEventListener("beforeunload",v)),{restore(){i=p();let y;try{y=JSON.parse(window.sessionStorage.getItem(o)||"null")}catch{}let C=y&&y.account===(e.user?.username||null)&&Date.now()-y.savedAt<30*6e4&&y.values;return C&&(d(y.values),e.draftRestored=!0),r||(r=!0,e.watch(()=>u(),()=>m(),!0)),e.unsavedChanges=p()!==i,!!C},checkpoint(){return document.querySelectorAll("input, select, textarea").forEach(y=>{y._field?.binding.state===e&&y._field.timer&&y._field.commit()}),JSON.parse(p())},accept(y){i=JSON.stringify(y),e.draftRestored=!1,m()},discard(){document.querySelectorAll("input, select, textarea").forEach(y=>{y._field?.binding.state!==e||!y._field.timer||(clearTimeout(y._field.timer),y._field.timer=null,y.value=y._field.binding.value??"")}),i!==void 0&&d(JSON.parse(i)),e.draftRestored=!1,m()},clear(){i=p(),e.unsavedChanges=!1,e.draftRestored=!1,e.draftSaved=!1,g()}}}var lp={"15m":"last 15 min","1h":"last hour","6h":"last 6 h","24h":"last 24 h"},Lr=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i,$v=/^[A-Za-z0-9_-]{3,200}$/,Fv=/^[a-f0-9]{24}$/,dp={owner:"Owner",coauthor:"Co-author",admin:"Admin"};function Uv(e){let t={repoId:"",userId:"",free:"",invalid:""},s=[];for(let i of String(e||"").trim().split(/\s+/).filter(Boolean)){let r=i.match(/^(repo|user):(.*)$/i);if(!r){s.push(i);continue}let o=r[2];r[1].toLowerCase()==="repo"&&$v.test(o)?t.repoId=o:r[1].toLowerCase()==="user"&&Fv.test(o)?t.userId=o:t.invalid=i}return t.free=s.join(" ").toLowerCase(),t}function Bv(e,t){if(!t)return!0;let s=[e.title,e.code,e.service,e.route,e.method,e.queue,e.status,e.cause?.label,e.cause?.summary].filter(i=>i!=null).join(" ").toLowerCase();return t.split(" ").every(i=>s.includes(i))}var up=e=>Number(e?.status||e?.httpStatus)||0,bl=e=>Date.parse(e),Hv=e=>e?.event==="external_request",zv=new Set(["mongodb","redis"]);function jv(e,t){let s=(e||[]).filter(u=>Number.isFinite(bl(u.timestamp))).map((u,p)=>{let d=bl(u.timestamp),g=Number(u.ms),m=Number.isFinite(g)&&g>=0?d-g:d,v=Hv(u),y=String(u.upstreamHost||""),C=v?"external":zv.has(u.service)?"data":u.service==="nginx"?"edge":"app",k=v?`${y==="storage"?"Storage":/github/.test(y)?"GitHub":"External"}${u.upstreamMethod?" \xB7 "+u.upstreamMethod:""}`:u.errorCode||u.errorType||String(u.event||"event").replace(/_/g," "),w=v?u.upstreamEndpoint||y||"endpoint not recorded":[u.service,u.route||(u.queue?"job "+u.queue:"")].filter(Boolean).join(" \xB7 "),R=v?Number(u.upstreamStatus)||u.errorCode||"":up(u)||"",b=v?Number(u.upstreamStatus)>=400||!!u.errorCode:up(u)>=500||u.severity==="error",P=!v&&!!t&&!["edge_request","request_completed"].includes(u.event)&&(t.errorCode&&u.errorCode===t.errorCode||!t.errorCode&&t.errorType&&u.errorType===t.errorType);return{key:p,event:u,start:m,end:d,ms:Number.isFinite(g)?g:null,kind:C,label:k,sub:w,status:R,failed:b,failure:P}});if(!s.length)return{rows:s,span:0};s.sort((u,p)=>u.start-p.start||p.end-p.start-(u.end-u.start)),s.forEach((u,p)=>{u.key=p});let i=Math.min(...s.map(u=>u.start)),r=Math.max(...s.map(u=>u.end)),o=Math.max(1,r-i);for(let u of s)u.left=(u.start-i)/o*100,u.width=Math.max(.6,(u.end-u.start)/o*100),u.left+u.width>100&&(u.left=Math.max(0,100-u.width)),u.offset=Math.round(u.start-i);if(!s.some(u=>u.failure)){let u=[...s].reverse().find(p=>p.failed&&p.kind==="app");u&&(u.failure=!0)}return{rows:s,span:Math.round(o)}}function _v(e){return e?dp[e]?`Signed in as ${dp[e].toLowerCase()}`:"Viewer not signed in":""}var Gv=(e,t=Date.now())=>{let s=bl(e);if(!Number.isFinite Line truncated
`)],{type:"text/csv;charset=utf-8"})),G=document.createElement("a");G.href=q,G.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(G),G.click(),G.remove(),URL.revokeObjectURL(q),e.copyStatus="Redis history exported."}catch{e.copyStatus="Could not export the Redis history."}},y().then(()=>{e.errView!=="list"&&P()});let re=i(()=>{e.errView==="list"&&!e.issueLoading&&document.visibilityState!=="hidden"&&y({quiet:!0})},6e4);e.on("dispose",()=>{p=!0,window.clearTimeout(w),r++,o++,u++,i.cancel(re)})};function so(e){e.listLoading=!0,e.listLoaded===void 0&&(e.listLoaded=!1)}function Cl(e){e.listLoading=!1,e.listLoaded=!0}var Fr=e=>["preparing","download","downloading","downloaded","queue","anonymizing"].includes(e)?"preparing":e==="expiring"?"expired":e==="removing"?"removed":e;function Ur(e,{flags:t,keys:s,count:i,onChange:r=()=>{}}){if(e.segView=()=>{let o=t()||{};if(s.every(p=>!!o[p]))return"all";let u=s.filter(p=>!!o[p]);return u.length===1?u[0]:"custom"},e.setSegView=o=>{let u=t();if(u){for(let p of s)u[p]=o==="all"?!0:p===o;r()}},e.segCount=o=>o==="all"?s.reduce((u,p)=>u+i(p),0):i(o),t()&&e.segView()==="custom")for(let o of s)t()[o]=!0}var hp=function(e,t,s){let i=Tt(),r=$t();kp(i,r),e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.repositories=[],e.total=-1,e.listLoaded=!1,e.listLoading=!0,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;let o=w=>{if(w.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){w.preventDefault();let R=document.querySelector('.admin-filter-toolbar input[type="search"]');R&&R.focus()}};r(document,"keydown",o),e.on("dispose",()=>document.removeEventListener("keydown",o)),e.clearFilter=w=>{w==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[w]="",e.query.page=1},e.chips=[];let u=()=>{let w=[];e.query.owner&&w.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&w.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=w};e.showStatusMessage=w=>{let R=w.statusMessage||"(no message)";window.prompt(`Status message for ${w.repoId} (${w.status}):`,R)},e.fetchGithubInfo=w=>{let R=window.open("","_blank");R&&R.document.write("<pre>Loading GitHub info for "+w.repoId+"...</pre>"),t.get("/api/admin/repos/"+w.repoId+"/github").then(b=>{R&&(R.document.open(),R.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(b.data,null,2).replace(/[<>]/g,P=>P==="<"?"&lt;":"&gt;")+"</pre>"),R.document.close())},b=>{let P=b&&b.data?JSON.stringify(b.data,null,2):String(b);R&&(R.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+P+"</pre>")})},e.statusCountFor=w=>{let R=(e.statusCounts||[]).find(b=>b._id===w);return R?R.count:0},e.statusStorageFor=w=>{let R=(e.statusCounts||[]).find(b=>b._id===w);return R?R.storage:0},e.isErrorsOnly=()=>e.query&&e.query.error&&!e.query.ready&&!e.query.preparing&&!e.query.expired&&!e.query.removed,e.toggleErrorsOnly=()=>{e.isErrorsOnly()?Object.assign(e.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(e.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),e.query.page=1},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=w=>{e.query.sort===w?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=w,e.query.direction="desc"),e.query.page=1},e.sortIcon=w=>e.query.sort===w?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.repos.filterPrefs",d={page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},g=loadFilterPrefs(p)||{};e.query=Object.assign({},d,g,{page:1,search:""});let m=s.search();m.owner&&(e.query.owner=m.owner),m.conference&&(e.query.conference=m.conference),m.search&&(e.query.search=m.search);let v="admin.repos.presets";e.presets=JSON.parse(localStorage.getItem(v)||"[]"),e.savePreset=()=>{let w=window.prompt("Preset name:");if(!w)return;let R=Object.assign({},e.query);delete R.page,e.presets=(e.presets||[]).filter(b=>b.name!==w),e.presets.push({name:w,query:R}),localStorage.setItem(v,JSON.stringify(e.presets))},e.applyPreset=w=>{Object.assign(e.query,w.query,{page:1})},e.deletePreset=w=>{e.presets=(e.presets||[]).filter(R=>R.name!==w.name),localStorage.setItem(v,JSON.stringify(e.presets))},e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.repositories.forEach(w=>{e.selected[w.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(w=>e.selected[w.repoId]),e.bulkRefresh=()=>{let w=e.selectedRepos();w.length&&confirm(`Force refresh ${w.length} repositories?`)&&w.forEach(R=>e.updateRepository(R))},e.bulkRemoveCache=()=>{let w=e.selectedRepos();w.length&&confirm(`Purge cache for ${w.length} repositories?`)&&w.forEach(R=>e.r Line truncated
`).trim()})}),s},e.showFileToc=()=>e.tabState?.active==="files"&&e.prFiles().length>=2,e.activeFileIndex=()=>{let s=e.prFiles().find(i=>i.id===e.activeAnchor);return s?s.index:0},e.openTab=s=>{e.tabState={active:s},e.tocOpen=!1},e.showInDiff=s=>{s&&(e.openTab("files"),e.collapsedFiles={...e.collapsedFiles,[s.index]:!1},Je(()=>e.jumpToAnchor(s.id)))},e.jumpToFile=s=>{e.collapsedFiles={...e.collapsedFiles,[s.index]:!1},e.jumpToAnchor(s.id)},ip(e,()=>e.tabState?.active==="files"?e.prFiles().map(s=>s.id):[])}function lp(e){return e?.body||e?.comments?.length||e?.reviewComments?.length?"conversation":e?.diff?"files":e?.commits?.length?"commits":"conversation"}function vl(e,t,s){let i,r=!1,o="form-draft:"+s,u=()=>Object.fromEntries(t.map(y=>[y,e[y]])),p=()=>JSON.stringify(u()),d=y=>{for(let C of t)Object.prototype.hasOwnProperty.call(y,C)&&(e[C]=y[C]);e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate))},g=()=>{try{window.sessionStorage.removeItem(o)}catch{}},m=(y=!1)=>{if(i!==void 0){if(y&&document.querySelectorAll("input, select, textarea").forEach(C=>{C._field?.binding.state===e&&C._field.timer&&C._field.commit()}),e.unsavedChanges=p()!==i,e.draftSaved=!1,!e.unsavedChanges){g();return}try{window.sessionStorage.setItem(o,JSON.stringify({account:e.user?.username||null,savedAt:Date.now(),values:u()})),e.draftSaved=!0}catch{}}},v=()=>m(!0);return e.on("routeLeave",v),window.addEventListener("beforeunload",v),e.on("dispose",()=>window.removeEventListener("beforeunload",v)),{restore(){i=p();let y;try{y=JSON.parse(window.sessionStorage.getItem(o)||"null")}catch{}let C=y&&y.account===(e.user?.username||null)&&Date.now()-y.savedAt<30*6e4&&y.values;return C&&(d(y.values),e.draftRestored=!0),r||(r=!0,e.watch(()=>u(),()=>m(),!0)),e.unsavedChanges=p()!==i,!!C},checkpoint(){return document.querySelectorAll("input, select, textarea").forEach(y=>{y._field?.binding.state===e&&y._field.timer&&y._field.commit()}),JSON.parse(p())},accept(y){i=JSON.stringify(y),e.draftRestored=!1,m()},discard(){document.querySelectorAll("input, select, textarea").forEach(y=>{y._field?.binding.state!==e||!y._field.timer||(clearTimeout(y._field.timer),y._field.timer=null,y.value=y._field.binding.value??"")}),i!==void 0&&d(JSON.parse(i)),e.draftRestored=!1,m()},clear(){i=p(),e.unsavedChanges=!1,e.draftRestored=!1,e.draftSaved=!1,g()}}}var dp={"15m":"last 15 min","1h":"last hour","6h":"last 6 h","24h":"last 24 h"},Lr=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i,$v=/^[A-Za-z0-9_-]{3,200}$/,Fv=/^[a-f0-9]{24}$/,bl={owner:"Owner",coauthor:"Co-author",admin:"Admin"};function Uv(e){let t={repoId:"",userId:"",free:"",invalid:""},s=[];for(let i of String(e||"").trim().split(/\s+/).filter(Boolean)){let r=i.match(/^(repo|user):(.*)$/i);if(!r){s.push(i);continue}let o=r[2];r[1].toLowerCase()==="repo"&&$v.test(o)?t.repoId=o:r[1].toLowerCase()==="user"&&Fv.test(o)?t.userId=o:t.invalid=i}return t.free=s.join(" ").toLowerCase(),t}function Bv(e,t){if(!t)return!0;let s=[e.title,e.code,e.service,e.route,e.method,e.queue,e.status,e.cause?.label,e.cause?.summary].filter(i=>i!=null).join(" ").toLowerCase();return t.split(" ").every(i=>s.includes(i))}var up=e=>Number(e?.status||e?.httpStatus)||0,wl=e=>Date.parse(e),Hv=e=>e?.event==="external_request",zv=new Set(["mongodb","redis"]);function jv(e,t){let s=(e||[]).filter(u=>Number.isFinite(wl(u.timestamp))).map((u,p)=>{let d=wl(u.timestamp),g=Number(u.ms),m=Number.isFinite(g)&&g>=0?d-g:d,v=Hv(u),y=String(u.upstreamHost||""),C=v?"external":zv.has(u.service)?"data":u.service==="nginx"?"edge":"app",k=v?`${y==="storage"?"Storage":/github/.test(y)?"GitHub":"External"}${u.upstreamMethod?" \xB7 "+u.upstreamMethod:""}`:u.errorCode||u.errorType||String(u.event||"event").replace(/_/g," "),w=v?u.upstreamEndpoint||y||"endpoint not recorded":[u.service,u.route||(u.queue?"job "+u.queue:"")].filter(Boolean).join(" \xB7 "),R=v?Number(u.upstreamStatus)||u.errorCode||"":up(u)||"",b=v?Number(u.upstreamStatus)>=400||!!u.errorCode:up(u)>=500||u.severity==="error",P=!v&&!!t&&!["edge_request","request_completed"].includes(u.event)&&(t.errorCode&&u.errorCode===t.errorCode||!t.errorCode&&t.errorType&&u.errorType===t.errorType);return{key:p,event:u,start:m,end:d,ms:Number.isFinite(g)?g:null,kind:C,label:k,sub:w,status:R,failed:b,failure:P}});if(!s.length)return{rows:s,span:0};s.sort((u,p)=>u.start-p.start||p.end-p.start-(u.end-u.start)),s.forEach((u,p)=>{u.key=p});let i=Math.min(...s.map(u=>u.start)),r=Math.max(...s.map(u=>u.end)),o=Math.max(1,r-i);for(let u of s)u.left=(u.start-i)/o*100,u.width=Math.max(.6,(u.end-u.start)/o*100),u.left+u.width>100&&(u.left=Math.max(0,100-u.width)),u.offset=Math.round(u.start-i);if(!s.some(u=>u.failure)){let u=[...s].reverse().find(p=>p.failed&&p.kind==="app");u&&(u.failure=!0)}return{rows:s,span:Math.round(o)}}function _v(e){return e?e==="visitor"||e==="anonymous"?"Viewer not signed in":`Viewer: ${(bl[e]||e).toLowerCase()}`:""}function Gv(e){return e?bl[e]?`SLine truncated
`)],{type:"text/csv;charset=utf-8"})),G=document.createElement("a");G.href=q,G.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(G),G.click(),G.remove(),URL.revokeObjectURL(q),e.copyStatus="Redis history exported."}catch{e.copyStatus="Could not export the Redis history."}},y().then(()=>{e.errView!=="list"&&P()});let re=i(()=>{e.errView==="list"&&!e.issueLoading&&document.visibilityState!=="hidden"&&y({quiet:!0})},6e4);e.on("dispose",()=>{p=!0,window.clearTimeout(w),r++,o++,u++,i.cancel(re)})};function so(e){e.listLoading=!0,e.listLoaded===void 0&&(e.listLoaded=!1)}function El(e){e.listLoading=!1,e.listLoaded=!0}var Fr=e=>["preparing","download","downloading","downloaded","queue","anonymizing"].includes(e)?"preparing":e==="expiring"?"expired":e==="removing"?"removed":e;function Ur(e,{flags:t,keys:s,count:i,onChange:r=()=>{}}){if(e.segView=()=>{let o=t()||{};if(s.every(p=>!!o[p]))return"all";let u=s.filter(p=>!!o[p]);return u.length===1?u[0]:"custom"},e.setSegView=o=>{let u=t();if(u){for(let p of s)u[p]=o==="all"?!0:p===o;r()}},e.segCount=o=>o==="all"?s.reduce((u,p)=>u+i(p),0):i(o),t()&&e.segView()==="custom")for(let o of s)t()[o]=!0}var hp=function(e,t,s){let i=Tt(),r=$t();kp(i,r),e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.repositories=[],e.total=-1,e.listLoaded=!1,e.listLoading=!0,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;let o=w=>{if(w.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){w.preventDefault();let R=document.querySelector('.admin-filter-toolbar input[type="search"]');R&&R.focus()}};r(document,"keydown",o),e.on("dispose",()=>document.removeEventListener("keydown",o)),e.clearFilter=w=>{w==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[w]="",e.query.page=1},e.chips=[];let u=()=>{let w=[];e.query.owner&&w.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&w.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=w};e.showStatusMessage=w=>{let R=w.statusMessage||"(no message)";window.prompt(`Status message for ${w.repoId} (${w.status}):`,R)},e.fetchGithubInfo=w=>{let R=window.open("","_blank");R&&R.document.write("<pre>Loading GitHub info for "+w.repoId+"...</pre>"),t.get("/api/admin/repos/"+w.repoId+"/github").then(b=>{R&&(R.document.open(),R.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(b.data,null,2).replace(/[<>]/g,P=>P==="<"?"&lt;":"&gt;")+"</pre>"),R.document.close())},b=>{let P=b&&b.data?JSON.stringify(b.data,null,2):String(b);R&&(R.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+P+"</pre>")})},e.statusCountFor=w=>{let R=(e.statusCounts||[]).find(b=>b._id===w);return R?R.count:0},e.statusStorageFor=w=>{let R=(e.statusCounts||[]).find(b=>b._id===w);return R?R.storage:0},e.isErrorsOnly=()=>e.query&&e.query.error&&!e.query.ready&&!e.query.preparing&&!e.query.expired&&!e.query.removed,e.toggleErrorsOnly=()=>{e.isErrorsOnly()?Object.assign(e.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(e.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),e.query.page=1},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=w=>{e.query.sort===w?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=w,e.query.direction="desc"),e.query.page=1},e.sortIcon=w=>e.query.sort===w?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.repos.filterPrefs",d={page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},g=loadFilterPrefs(p)||{};e.query=Object.assign({},d,g,{page:1,search:""});let m=s.search();m.owner&&(e.query.owner=m.owner),m.conference&&(e.query.conference=m.conference),m.search&&(e.query.search=m.search);let v="admin.repos.presets";e.presets=JSON.parse(localStorage.getItem(v)||"[]"),e.savePreset=()=>{let w=window.prompt("Preset name:");if(!w)return;let R=Object.assign({},e.query);delete R.page,e.presets=(e.presets||[]).filter(b=>b.name!==w),e.presets.push({name:w,query:R}),localStorage.setItem(v,JSON.stringify(e.presets))},e.applyPreset=w=>{Object.assign(e.query,w.query,{page:1})},e.deletePreset=w=>{e.presets=(e.presets||[]).filter(R=>R.name!==w.name),localStorage.setItem(v,JSON.stringify(e.presets))},e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.repositories.forEach(w=>{e.selected[w.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(w=>e.selected[w.repoId]),e.bulkRefresh=()=>{let w=e.selectedRepos();w.length&&confirm(`Force refresh ${w.length} repositories?`)&&w.forEach(R=>e.updateRepository(R))},e.bulkRemoveCache=()=>{let w=e.selectedRepos();w.length&&confirm(`Purge cache for ${w.length} repositories?`)&&w.forEach(R=>e.r Line truncated
`+w.join(`
`)],{type:"text/csv"}),b=document.createElement("a");b.href=URL.createObjectURL(R),b.download=i.username+"-repositories.csv",b.click()},e.showStatusMessage=y=>{let C=y.statusMessage||"(no message)";window.prompt(`Status message for ${y.repoId} (${y.status}):`,C)},e.fetchGithubInfo=y=>{let C=window.open("","_blank");C&&C.document.write("<pre>Loading GitHub info for "+y.repoId+"...</pre>"),t.get("/api/admin/repos/"+y.repoId+"/github").then(k=>{C&&(C.document.open(),C.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(k.data,null,2).replace(/[<>]/g,w=>w==="<"?"&lt;":"&gt;")+"</pre>"),C.document.close())},k=>{let w=k&&k.data?JSON.stringify(k.data,null,2):String(k);C&&(C.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+w+"</pre>")})};function d(y){t.get("/api/admin/users/"+y+"/repos",{}).then(C=>{e.repositories=C.data},C=>{console.error(C)})}function g(y){t.get("/api/admin/users/"+y,{}).then(C=>{e.userInfo=C.data,e.loadEntityErrors()},C=>{console.error(C)})}wl(e,t,()=>/^[a-f0-9]{24}$/.test(e.userInfo?._id||"")?{userId:e.userInfo._id}:null),g(i.username),d(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>g(i.username),y=>console.error(y))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>g(i.username),y=>console.error(y))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>g(i.username),y=>console.error(y))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>g(i.username),y=>console.error(y))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function m(){t.get("/api/admin/tokens").then(y=>{e.tokens=y.data||[]},y=>{y.status!==401&&y.status!==403&&console.error(y)})}m(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(y=>{e.tokenForm.plaintext=y.data.token,e.tokenForm.name="",m()},y=>console.error(y))},e.revokeToken=y=>{confirm(`Revoke token "${y.name}"?`)&&t.delete("/api/admin/tokens/"+y.id).then(()=>m(),C=>console.error(C))},e.removeCache=y=>{confirm("Remove cached files for "+y.repoId+"?")&&t.delete("/api/admin/repos/"+y.repoId).then(()=>d(i.username),C=>console.error(C))},e.removeRepository=y=>{confirm("Remove repository "+y.repoId+"?")&&t.delete("/api/repo/"+y.repoId+"/").then(()=>d(i.username),C=>console.error(C))},e.updateRepository=y=>{let C=ut({title:`Refreshing ${y.repoId}...`,date:new Date,body:`The repository ${y.repoId} is going to be refreshed.`});e.toasts.push(C),t.post(`/api/repo/${y.repoId}/refresh`).then(k=>{k.data.status=="ready"?C.title=`${y.repoId} is refreshed.`:C.title=`Refreshing of ${y.repoId}.`},k=>{C.title=`Error during the refresh of ${y.repoId}.`,C.body=k.body})},e.getGitHubRepositories=y=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(C=>{e.userInfo.repositories=C.data})};let v=null;e.watch("query",()=>{r.timeout.cancel(v),v=r.timeout(()=>{d(i.username)},500)},!0)},vp=function(e,t,s){let i=Tt(),r=$t();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.total=-1,e.listLoaded=!1,e.listLoading=!0,e.totalPage=0,e.statusCounts=[];let o=k=>{if(k.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){k.preventDefault();let w=document.querySelector('.admin-filter-toolbar input[type="search"]');w&&w.focus()}};r(document,"keydown",o),e.on("dispose",()=>document.removeEventListener("keydown",o)),e.clearFilter=k=>{k==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[k]="",e.query.page=1},e.chips=[];let u=()=>{let k=[];(e.query.dateFrom||e.query.dateTo)&&k.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=k};e.statusCountFor=k=>{let w=(e.statusCounts||[]).find(R=>R._id===k);return w?w.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=k=>{e.query.sort===k?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=k,e.query.direction="desc"),e.query.page=1},e.sortIcon=k=>e.query.sort===k?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.conferences.filterPrefs",d={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},g=loadFilterPrefs(p)||{};e.query=Object.assign({},d,g,{page:1,search:""});let m=s.search();m.search&&(e.query.search=m.search);let v="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(v)||"[]"),e.savePreset=()=>{let k=window.prompt("Preset name:");if(!k)return;let w=Object.assign({},e.query);delete w.page,e.presets=(e.presets||[]).filter(R=>R.name!==k),e.presets.push({name:k,query:w}),localStorage.setItem(v,JSON.stringify(e.presets))},e.applyPreset=k=>{ Line truncated
`)},e.tipSide=k=>{let w=(e.summary?.series||[]).length;return w<3?"":k<w/4?"tip-start":k>=w*3/4?"tip-end":""},e.bucketName=()=>({day:"day",week:"week",month:"month"})[e.summary?.bucket]||"day",e.seriesSales=()=>(e.summary?.series||[]).reduce((k,w)=>k+e.bucketTotal(w),0),e.plansWithActivity=()=>(e.summary?.plans||[]).filter(k=>k.active||k.allTimeSales||k.sales),e.familyLabel=k=>($r.find(w=>w.id===k)||{}).label||"",e.familyPlans=k=>(e.summary?.plans||[]).filter(w=>w.family===k),e.familySum=(k,w)=>e.familyPlans(k).reduce((R,b)=>R+(b[w]||0),0),e.familyMoney=(k,w,R)=>{if(!e.revenueOn())return"\u2014";let b=e.familyPlans(k);return b.some(P=>P[R]===!1)?"Incomplete":e.moneyText(b.reduce((P,D)=>o(P,D[w]),{}))},e.planTotals=()=>{let k=w=>(e.summary?.plans||[]).reduce((R,b)=>R+(b[w]||0),0);return{active:k("active"),sales:k("sales"),allTimeSales:k("allTimeSales")}},e.webhookState=()=>{let k=e.summary?.webhooks;return k?k.failed||k.reconciliationFailed?"bad":k.oldestPendingSeconds>900||k.unreviewedRevocations?"warn":"ok":"ok"},e.age=k=>k?Yn(k*1e3):"\u2014";let u=0;e.loadSummary=()=>{let k=++u;e.summaryLoading=!0,e.summaryError=null,t.get("/api/admin/billing/summary",{params:{period:e.period}}).then(w=>{if(k!==u)return;e.summaryLoading=!1;let R=w.data;if(!R||!R.subscriptions||!R.sales||!Array.isArray(R.plans)){e.summaryError="The billing summary had an unexpected format.";return}e.summary=R},w=>{k===u&&(e.summaryLoading=!1,e.summaryError=w&&w.data&&w.data.error||"Could not load billing figures.")})},e.setPeriod=k=>{if(e.period!==k){e.period=k;try{localStorage.setItem("admin.billing.period",k)}catch{}e.loadSummary()}},e.grants=[],e.total=-1,e.totalPage=0,e.stateCounts={},e.statuses=[],e.grantsError=null,e.filtersOpen=!1,e.query={page:1,limit:25,search:"",plan:"",status:"",state:"",period:"",sort:"purchasedAt",direction:"desc"};let p=s.search();p.search&&(e.query.search=p.search),e.stateView=()=>e.query.state||"all",e.setStateView=k=>{e.query.state=k==="all"?"":k,e.query.page=1},e.stateCount=k=>k==="all"?["active","expired","revoked"].reduce((w,R)=>w+(e.stateCounts[R]||0),0):e.stateCounts[k]||0,e.sortBy=k=>{e.query.sort===k?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=k,e.query.direction="desc"),e.query.page=1},e.sortIcon=k=>e.query.sort===k?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"",e.chips=[];let d=()=>{let k=[];e.query.plan&&k.push({key:"plan",label:"Plan",value:e.planName(e.query.plan)}),e.query.status&&k.push({key:"status",label:"Stripe status",value:e.query.status.replace(/_/g," ")}),e.query.period&&k.push({key:"period",label:"Started",value:"last "+((e.periods.find(w=>w.id===e.query.period)||{}).label||e.query.period)}),e.chips=k};e.clearFilter=k=>{e.query[k]="",e.query.page=1},e.filterPlan=k=>{Object.assign(e.query,{plan:k,page:1});let w=document.getElementById("bl-grants");w&&w.scrollIntoView&&w.scrollIntoView({behavior:"smooth",block:"start"})},e.clearFilters=()=>Object.assign(e.query,{search:"",plan:"",status:"",state:"",period:"",page:1}),e.hasFilters=()=>!!(e.query.search||e.query.plan||e.query.status||e.query.state||e.query.period),e.filterCount=()=>["plan","status","period"].filter(k=>e.query[k]).length,e.amountText=k=>{if(!k.amount)return"\u2014";let w=ws({[k.amount.currency]:k.amount.value})[0]||"\u2014";if(!k.amount.interval)return w;let R=k.amount.intervalCount>1?k.amount.intervalCount+" "+k.amount.interval+"s":k.amount.interval;return w+" / "+R},e.amountTitle=k=>k.amount?"Stripe list price"+(k.pack?" of the whole pack":""):{stripe_not_configured:"Revenue unavailable: Stripe is not configured on this server.",unresolved:"Revenue unavailable: this Stripe price could not be looked up.",unrecorded:"Revenue unavailable: no sale price was recorded for this subscription."}[k.amountMissing]||"Revenue unavailable.",e.endText=k=>{if(k.never)return"Never ends";if(!k.until)return"\u2014";let w=Tr(k.until);return k.state!=="active"?(new Date(k.until)<new Date?"Ended ":"Ends ")+w:k.subscription?(k.cancelAtPeriodEnd?"Ends ":"Renews ")+w:"Until "+w},e.packNote=k=>{let w=(k.parts||[]).find(R=>R.planId==="author_pass");return!k.pack||!w||!w.until?"":(new Date(w.until)<new Date?"Updates ended ":"Updates until ")+Tr(w.until)};let g={repo_slot:"repository",author_pass:"updates",repo_extend:"+1 year"};e.packParts=k=>(k.parts||[]).map(w=>g[w.planId]||e.planName(w.planId)).join(", ").replace(/^./,w=>w.toUpperCase()),e.packPartsTitle=k=>"Paper pack: "+(k.parts||[]).map(w=>e.planName(w.planId)).join(", "),e.statusText=k=>(k.status||"unknown").replace(/_/g," "),e.revocationText=k=>k==="dispute"?"Disputed":k==="full_refund"?"Refunded":"Revoked",e.scopeHref=k=>k?.kind==="repo"?"/admin/repositories?search="+encodeURIComponent(k.id):k?.kind==="conference"?"/conference/"+encodeURIComponent(k.id):null;let m=0;function v(){let k=++m;e.grantsError=null;let w=Object.fromEntries(Object.entries(e.query).filter(([,R])=>R!==""&&R!=null));t.get("/api/admin/billing/grants",{params:w}).then(R=>{k===m&&( Line truncated
`)},Al=class{constructor(t){lt(this,"gen");lt(this,"threads",[]);lt(this,"match",!1);lt(this,"runs",[]);lt(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},Fp=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((s,i)=>s!==t.ids[i])?!1:e.runs.every(s=>t.runs.some(i=>i.neg===s.neg&&Fp(i.state,s.state))),Ip=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),Cs,ts,Il,Ol,ai=class{constructor(t,s,i){He(this,ts);lt(this,"dots");lt(this,"dotStart");He(this,Cs);this.dots=t,this.dotStart=s,Ke(this,Cs,i)}state(){return new Al(++ue(this,Cs).gen)}done(t){return t.ids=t.threads.map(s=>s.id).sort((s,i)=>s-i),t.match&&t.ids.unshift(Dl.id),t}restricted(t,s){return s&&(this.dots||this.dotStart&&t===0)}add(t,s,i,r){switch(s.t){case"split":if(!ze(this,ts,Il).call(this,t,s))return;for(let u of s.out)this.add(t,u,i,r);return;case"neg":if(!ze(this,ts,Il).call(this,t,s))return;let o=this.state();return this.add(o,s.sub,i,!1),this.done(o),this.addRun(t,{t:"run",neg:s,state:o},i,r);case"star":if(this.restricted(i,r))return;ze(this,ts,Ol).call(this,t,s)&&this.add(t,s.next,i,r);return;case"match":t.match=!0;return;default:ze(this,ts,Ol).call(this,t,s)}}addRun(t,s,i,r){for(let o of t.runs)if(o.neg===s.neg&&Fp(o.state,s.state))return;t.runs.push(s),s.state.match||this.add(t,s.neg.next,i,r)}step(t,s,i,r){let o=this.state();for(let u of t.threads)switch(u.t){case"lit":ql(u,s)&&this.add(o,u.next,i+1,r);break;case"any":this.restricted(i,r)||this.add(o,u.next,i+1,r);break;case"class":!this.restricted(i,r)&&u.re.test(s)&&this.add(o,u.next,i+1,r);break;case"star":this.restricted(i,r)||this.add(o,u,i+1,r)}if(!this.restricted(i,r))for(let u of t.runs){if(u.state.dead){this.addRun(o,u,i+1,r);continue}let p=this.step(u.state,s,i,!1);this.addRun(o,{t:"run",neg:u.neg,state:p},i+1,r)}return this.done(o)}};Cs=new WeakMap,ts=new WeakSet,Il=function(t,s){let{seen:i}=ue(this,Cs);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,!0)},Ol=function(t,s){let{has:i}=ue(this,Cs);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,t.threads.push(s),!0)};var Up=e=>{let t=e.ids.join();if(!e.runs.length)return t;let s=e.runs.map(i=>`${i.neg.id}(${Up(i.state)})`);return`${t}|${s.sort().join("|")}`},Pb=1<<18,oo,io,Qn,Es,Jn,Zn,xn,mn,Vl,zr,Bp,Ml=class{constructor(t,s){He(this,mn);He(this,oo);He(this,io,new Map);He(this,Qn,0);He(this,Es);He(this,Jn);He(this,Zn);He(this,xn);Ke(this,oo,t),Ke(this,Zn,new ai(!1,!1,s)),Ke(this,xn,new ai(!1,!0,s))}start(t){if(t){if(ue(this,Jn))return ue(this,Jn);let i=ue(this,xn).state();return ue(this,xn).add(i,ue(this,oo),0,!0),Ke(this,Jn,ze(this,mn,Vl).call(this,ue(this,xn).done(i)))}if(ue(this,Es))return ue(this,Es);let s=ue(this,Zn).state();return ue(this,Zn).add(s,ue(this,oo),0,!0),Ke(this,Es,ze(this,mn,zr).call(this,ue(this,Zn).done(s)))}next(t,s){let i=s.charCodeAt(0),r=i<128?void 0:t.next.get(s);if(r)return r;let o=t===ue(this,Jn)?ze(this,mn,zr).call(this,ue(this,xn).step(t.state,s,0,!0)):ze(this,mn,zr).call(this,ue(this,Zn).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Ke(this,Qn,ue(this,Qn)+128)),t.ascii[i]=o):t.next.set(s,o),pd(this,Qn)._++,o}};oo=new WeakMap,io=new WeakMap,Qn=new WeakMap,Es=new WeakMap,Jn=new WeakMap,Zn=new WeakMap,xn=new WeakMap,mn=new WeakSet,Vl=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},zr=function(t){let s=Up(t),i=ue(this,io).get(s);if(i)return i;ue(this,Qn)>Pb&&ze(this,mn,Bp).call(this);let r=ze(this,mn,Vl).call(this,t);return ue(this,io).set(s,r),Ke(this,Qn,ue(this,Qn)+(s.length+1)),r},Bp=function(){ue(this,io).clear(),Ke(this,Qn,0),Ke(this,Es,void 0),Ke(this,Jn,void 0)};var Db=e=>{let t=[];for(let s=e;s.t!=="match";s=s.next){if(s.t==="split"||s.t==="neg")return;t.push(s)}return t},Ab=(e,t,s,i)=>{let r=0,o=s,u=-1,p=0;for(;o<i;){let d=e[r];if(d?.t==="star"){u=r++,p=o;continue}let g=t[o];if(d&&(d.t==="any"||d.t==="lit"&&ql(d,g)||d.t==="class"&&d.re.test(g))){r++,o++;continue}if(u===-1)return!1;r=u+1,o=++p}for(;e[r]?.t==="star";)r++;return r===e.length},Hp=e=>{let t=0,s=0;for(let i of e){let[r,o]=Ib(i);t+=r,s+=o}return[t,s]},Ib=e=>{if(e.t==="star")return[0,1/0];if(e.t!=="ext")return[1,1];if(e.type==="!")return[0,1/0];let t=e.alts.map(Hp),s=Math.min(...t.map(o=>o[0])),i=Math.max(...t.map(o=>o[1])),r=i===0?0:1/0;return e.type==="@"?[s,i]:e.type==="?"?[0,i]:e.type==="*"?[0,r]:[s,r]},Op=(e,t,s)=>{for(let i=0;i<e.length;i++)if(!ql(e[i],t[s+i]))return!1;return!0},Ob=/[/\ud800-\udfff]/,Mb=/[\ud800-\udfff]/,Hr=e=>Mb.test(e)?[...e]:e,Mp=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},es,ro,Ss,jr,Ns,di,_r,Rs,ui,ci,pi,zn,Tn,ao,lo,fi,Gr,fn,Ts,ri,li=class{constructor(t,s={}){He(this,Ts);lt(this,"pattern");lt(this,"options");He(this,es);He(this,ro);He(this,Ss);He(this,jr);He(this,Ns);He(this,di,!1);He(this,_r);He(this,Rs);He(this,ui,!1);He(this,ci,0);He(this,pi,1/0);He(this,zn,[]);He(this,Tn,[]);He(this,ao);He(this,lo);He(this,fi,!1);He(this,Gr);He(this,fn);if(t.includes Line truncated
`).forEach((s,i)=>{let{term:r}=Kl(s.trim());if(!r)return;let o=[];for(let u=0;u<r.length;u++){if(r[u]==="\\"){u++;continue}of.has(r[u])&&!o.includes(r[u])&&o.push(r[u])}o.length&&t.push({line:i,term:r,symbols:o})}),t}function af(e,t){let s=String(e||"").split(`
`),i=s[t];if(i===void 0)return e;let{term:r}=Kl(i.trim());if(!r)return e;let o="";for(let p=0;p<r.length;p++){if(r[p]==="\\"){o+=r.slice(p,p+2),p++;continue}o+=of.has(r[p])||r[p]==="."?"\\"+r[p]:r[p]}let u=i.indexOf(r);return s[t]=i.slice(0,u)+o+i.slice(u+r.length),s.join(`
`)}var as={VIEWER_ERRORS:{title:"Content could not be loaded",access_title:"GitHub access needs attention",reader_help:"Reading this repository? You do not need to sign in. Try again after the owner restores access, or let them know this anonymous link is unavailable.",owner_help:"Own this repository? If your GitHub account was suspended or recently recovered, sign in to Anonymous GitHub again and check the GitHub connection and repository permissions in your dashboard. Then retry this page. Keep the existing anonymous URL; do not delete the repository to restore access.",retry:"Try again",dashboard:"Open owner dashboard"},ERRORS:{cache_busy:"Downloads are busy. Please try again shortly.",cache_miss:"This file is not cached yet. Please try again.",invalid_sort:"The selected sort order is invalid.",invalid_cursor:"This project page is no longer valid. Reload the list.",repository_changed:"The repository changed while processing. Please retry.",repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"We could not load this content. Try again. If it still fails, contact support with the anonymous URL and the time of the error.",unreachable:"The service could not complete this request. Wait a moment and try again.",request_error:"The connection was interrupted. Check your internet connection and try again.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"Anonymous GitHub cannot access the source repository on GitHub. It may be private, unavailable, or require the owner to reconnect GitHub.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_no Line truncated
`)],{type:"text/csv"}),b=document.createElement("a");b.href=URL.createObjectURL(R),b.download=i.username+"-repositories.csv",b.click()},e.showStatusMessage=y=>{let C=y.statusMessage||"(no message)";window.prompt(`Status message for ${y.repoId} (${y.status}):`,C)},e.fetchGithubInfo=y=>{let C=window.open("","_blank");C&&C.document.write("<pre>Loading GitHub info for "+y.repoId+"...</pre>"),t.get("/api/admin/repos/"+y.repoId+"/github").then(k=>{C&&(C.document.open(),C.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(k.data,null,2).replace(/[<>]/g,w=>w==="<"?"&lt;":"&gt;")+"</pre>"),C.document.close())},k=>{let w=k&&k.data?JSON.stringify(k.data,null,2):String(k);C&&(C.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+w+"</pre>")})};function d(y){t.get("/api/admin/users/"+y+"/repos",{}).then(C=>{e.repositories=C.data},C=>{console.error(C)})}function g(y){t.get("/api/admin/users/"+y,{}).then(C=>{e.userInfo=C.data,e.loadEntityErrors()},C=>{console.error(C)})}kl(e,t,()=>/^[a-f0-9]{24}$/.test(e.userInfo?._id||"")?{userId:e.userInfo._id}:null),g(i.username),d(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>g(i.username),y=>console.error(y))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>g(i.username),y=>console.error(y))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>g(i.username),y=>console.error(y))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>g(i.username),y=>console.error(y))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function m(){t.get("/api/admin/tokens").then(y=>{e.tokens=y.data||[]},y=>{y.status!==401&&y.status!==403&&console.error(y)})}m(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(y=>{e.tokenForm.plaintext=y.data.token,e.tokenForm.name="",m()},y=>console.error(y))},e.revokeToken=y=>{confirm(`Revoke token "${y.name}"?`)&&t.delete("/api/admin/tokens/"+y.id).then(()=>m(),C=>console.error(C))},e.removeCache=y=>{confirm("Remove cached files for "+y.repoId+"?")&&t.delete("/api/admin/repos/"+y.repoId).then(()=>d(i.username),C=>console.error(C))},e.removeRepository=y=>{confirm("Remove repository "+y.repoId+"?")&&t.delete("/api/repo/"+y.repoId+"/").then(()=>d(i.username),C=>console.error(C))},e.updateRepository=y=>{let C=ut({title:`Refreshing ${y.repoId}...`,date:new Date,body:`The repository ${y.repoId} is going to be refreshed.`});e.toasts.push(C),t.post(`/api/repo/${y.repoId}/refresh`).then(k=>{k.data.status=="ready"?C.title=`${y.repoId} is refreshed.`:C.title=`Refreshing of ${y.repoId}.`},k=>{C.title=`Error during the refresh of ${y.repoId}.`,C.body=k.body})},e.getGitHubRepositories=y=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(C=>{e.userInfo.repositories=C.data})};let v=null;e.watch("query",()=>{r.timeout.cancel(v),v=r.timeout(()=>{d(i.username)},500)},!0)},vp=function(e,t,s){let i=Tt(),r=$t();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.total=-1,e.listLoaded=!1,e.listLoading=!0,e.totalPage=0,e.statusCounts=[];let o=k=>{if(k.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){k.preventDefault();let w=document.querySelector('.admin-filter-toolbar input[type="search"]');w&&w.focus()}};r(document,"keydown",o),e.on("dispose",()=>document.removeEventListener("keydown",o)),e.clearFilter=k=>{k==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[k]="",e.query.page=1},e.chips=[];let u=()=>{let k=[];(e.query.dateFrom||e.query.dateTo)&&k.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=k};e.statusCountFor=k=>{let w=(e.statusCounts||[]).find(R=>R._id===k);return w?w.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=k=>{e.query.sort===k?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=k,e.query.direction="desc"),e.query.page=1},e.sortIcon=k=>e.query.sort===k?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.conferences.filterPrefs",d={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},g=loadFilterPrefs(p)||{};e.query=Object.assign({},d,g,{page:1,search:""});let m=s.search();m.search&&(e.query.search=m.search);let v="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(v)||"[]"),e.savePreset=()=>{let k=window.prompt("Preset name:");if(!k)return;let w=Object.assign({},e.query);delete w.page,e.presets=(e.presets||[]).filter(R=>R.name!==k),e.presets.push({name:k,query:w}),localStorage.setItem(v,JSON.stringify(e.presets))},e.applyPreset=k=>{ Line truncated
`)},e.tipSide=k=>{let w=(e.summary?.series||[]).length;return w<3?"":k<w/4?"tip-start":k>=w*3/4?"tip-end":""},e.bucketName=()=>({day:"day",week:"week",month:"month"})[e.summary?.bucket]||"day",e.seriesSales=()=>(e.summary?.series||[]).reduce((k,w)=>k+e.bucketTotal(w),0),e.plansWithActivity=()=>(e.summary?.plans||[]).filter(k=>k.active||k.allTimeSales||k.sales),e.familyLabel=k=>($r.find(w=>w.id===k)||{}).label||"",e.familyPlans=k=>(e.summary?.plans||[]).filter(w=>w.family===k),e.familySum=(k,w)=>e.familyPlans(k).reduce((R,b)=>R+(b[w]||0),0),e.familyMoney=(k,w,R)=>{if(!e.revenueOn())return"\u2014";let b=e.familyPlans(k);return b.some(P=>P[R]===!1)?"Incomplete":e.moneyText(b.reduce((P,D)=>o(P,D[w]),{}))},e.planTotals=()=>{let k=w=>(e.summary?.plans||[]).reduce((R,b)=>R+(b[w]||0),0);return{active:k("active"),sales:k("sales"),allTimeSales:k("allTimeSales")}},e.webhookState=()=>{let k=e.summary?.webhooks;return k?k.failed||k.reconciliationFailed?"bad":k.oldestPendingSeconds>900||k.unreviewedRevocations?"warn":"ok":"ok"},e.age=k=>k?Yn(k*1e3):"\u2014";let u=0;e.loadSummary=()=>{let k=++u;e.summaryLoading=!0,e.summaryError=null,t.get("/api/admin/billing/summary",{params:{period:e.period}}).then(w=>{if(k!==u)return;e.summaryLoading=!1;let R=w.data;if(!R||!R.subscriptions||!R.sales||!Array.isArray(R.plans)){e.summaryError="The billing summary had an unexpected format.";return}e.summary=R},w=>{k===u&&(e.summaryLoading=!1,e.summaryError=w&&w.data&&w.data.error||"Could not load billing figures.")})},e.setPeriod=k=>{if(e.period!==k){e.period=k;try{localStorage.setItem("admin.billing.period",k)}catch{}e.loadSummary()}},e.grants=[],e.total=-1,e.totalPage=0,e.stateCounts={},e.statuses=[],e.grantsError=null,e.filtersOpen=!1,e.query={page:1,limit:25,search:"",plan:"",status:"",state:"",period:"",sort:"purchasedAt",direction:"desc"};let p=s.search();p.search&&(e.query.search=p.search),e.stateView=()=>e.query.state||"all",e.setStateView=k=>{e.query.state=k==="all"?"":k,e.query.page=1},e.stateCount=k=>k==="all"?["active","expired","revoked"].reduce((w,R)=>w+(e.stateCounts[R]||0),0):e.stateCounts[k]||0,e.sortBy=k=>{e.query.sort===k?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=k,e.query.direction="desc"),e.query.page=1},e.sortIcon=k=>e.query.sort===k?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"",e.chips=[];let d=()=>{let k=[];e.query.plan&&k.push({key:"plan",label:"Plan",value:e.planName(e.query.plan)}),e.query.status&&k.push({key:"status",label:"Stripe status",value:e.query.status.replace(/_/g," ")}),e.query.period&&k.push({key:"period",label:"Started",value:"last "+((e.periods.find(w=>w.id===e.query.period)||{}).label||e.query.period)}),e.chips=k};e.clearFilter=k=>{e.query[k]="",e.query.page=1},e.filterPlan=k=>{Object.assign(e.query,{plan:k,page:1});let w=document.getElementById("bl-grants");w&&w.scrollIntoView&&w.scrollIntoView({behavior:"smooth",block:"start"})},e.clearFilters=()=>Object.assign(e.query,{search:"",plan:"",status:"",state:"",period:"",page:1}),e.hasFilters=()=>!!(e.query.search||e.query.plan||e.query.status||e.query.state||e.query.period),e.filterCount=()=>["plan","status","period"].filter(k=>e.query[k]).length,e.amountText=k=>{if(!k.amount)return"\u2014";let w=ws({[k.amount.currency]:k.amount.value})[0]||"\u2014";if(!k.amount.interval)return w;let R=k.amount.intervalCount>1?k.amount.intervalCount+" "+k.amount.interval+"s":k.amount.interval;return w+" / "+R},e.amountTitle=k=>k.amount?"Stripe list price"+(k.pack?" of the whole pack":""):{stripe_not_configured:"Revenue unavailable: Stripe is not configured on this server.",unresolved:"Revenue unavailable: this Stripe price could not be looked up.",unrecorded:"Revenue unavailable: no sale price was recorded for this subscription."}[k.amountMissing]||"Revenue unavailable.",e.endText=k=>{if(k.never)return"Never ends";if(!k.until)return"\u2014";let w=Tr(k.until);return k.state!=="active"?(new Date(k.until)<new Date?"Ended ":"Ends ")+w:k.subscription?(k.cancelAtPeriodEnd?"Ends ":"Renews ")+w:"Until "+w},e.packNote=k=>{let w=(k.parts||[]).find(R=>R.planId==="author_pass");return!k.pack||!w||!w.until?"":(new Date(w.until)<new Date?"Updates ended ":"Updates until ")+Tr(w.until)};let g={repo_slot:"repository",author_pass:"updates",repo_extend:"+1 year"};e.packParts=k=>(k.parts||[]).map(w=>g[w.planId]||e.planName(w.planId)).join(", ").replace(/^./,w=>w.toUpperCase()),e.packPartsTitle=k=>"Paper pack: "+(k.parts||[]).map(w=>e.planName(w.planId)).join(", "),e.statusText=k=>(k.status||"unknown").replace(/_/g," "),e.revocationText=k=>k==="dispute"?"Disputed":k==="full_refund"?"Refunded":"Revoked",e.scopeHref=k=>k?.kind==="repo"?"/admin/repositories?search="+encodeURIComponent(k.id):k?.kind==="conference"?"/conference/"+encodeURIComponent(k.id):null;let m=0;function v(){let k=++m;e.grantsError=null;let w=Object.fromEntries(Object.entries(e.query).filter(([,R])=>R!==""&&R!=null));t.get("/api/admin/billing/grants",{params:w}).then(R=>{k===m&&( Line truncated
`)},Il=class{constructor(t){lt(this,"gen");lt(this,"threads",[]);lt(this,"match",!1);lt(this,"runs",[]);lt(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},Fp=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((s,i)=>s!==t.ids[i])?!1:e.runs.every(s=>t.runs.some(i=>i.neg===s.neg&&Fp(i.state,s.state))),Ip=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),Cs,ts,Ol,Ml,ai=class{constructor(t,s,i){He(this,ts);lt(this,"dots");lt(this,"dotStart");He(this,Cs);this.dots=t,this.dotStart=s,Ke(this,Cs,i)}state(){return new Il(++ue(this,Cs).gen)}done(t){return t.ids=t.threads.map(s=>s.id).sort((s,i)=>s-i),t.match&&t.ids.unshift(Al.id),t}restricted(t,s){return s&&(this.dots||this.dotStart&&t===0)}add(t,s,i,r){switch(s.t){case"split":if(!ze(this,ts,Ol).call(this,t,s))return;for(let u of s.out)this.add(t,u,i,r);return;case"neg":if(!ze(this,ts,Ol).call(this,t,s))return;let o=this.state();return this.add(o,s.sub,i,!1),this.done(o),this.addRun(t,{t:"run",neg:s,state:o},i,r);case"star":if(this.restricted(i,r))return;ze(this,ts,Ml).call(this,t,s)&&this.add(t,s.next,i,r);return;case"match":t.match=!0;return;default:ze(this,ts,Ml).call(this,t,s)}}addRun(t,s,i,r){for(let o of t.runs)if(o.neg===s.neg&&Fp(o.state,s.state))return;t.runs.push(s),s.state.match||this.add(t,s.neg.next,i,r)}step(t,s,i,r){let o=this.state();for(let u of t.threads)switch(u.t){case"lit":Ll(u,s)&&this.add(o,u.next,i+1,r);break;case"any":this.restricted(i,r)||this.add(o,u.next,i+1,r);break;case"class":!this.restricted(i,r)&&u.re.test(s)&&this.add(o,u.next,i+1,r);break;case"star":this.restricted(i,r)||this.add(o,u,i+1,r)}if(!this.restricted(i,r))for(let u of t.runs){if(u.state.dead){this.addRun(o,u,i+1,r);continue}let p=this.step(u.state,s,i,!1);this.addRun(o,{t:"run",neg:u.neg,state:p},i+1,r)}return this.done(o)}};Cs=new WeakMap,ts=new WeakSet,Ol=function(t,s){let{seen:i}=ue(this,Cs);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,!0)},Ml=function(t,s){let{has:i}=ue(this,Cs);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,t.threads.push(s),!0)};var Up=e=>{let t=e.ids.join();if(!e.runs.length)return t;let s=e.runs.map(i=>`${i.neg.id}(${Up(i.state)})`);return`${t}|${s.sort().join("|")}`},Db=1<<18,oo,io,Qn,Es,Jn,Zn,xn,mn,ql,zr,Bp,Vl=class{constructor(t,s){He(this,mn);He(this,oo);He(this,io,new Map);He(this,Qn,0);He(this,Es);He(this,Jn);He(this,Zn);He(this,xn);Ke(this,oo,t),Ke(this,Zn,new ai(!1,!1,s)),Ke(this,xn,new ai(!1,!0,s))}start(t){if(t){if(ue(this,Jn))return ue(this,Jn);let i=ue(this,xn).state();return ue(this,xn).add(i,ue(this,oo),0,!0),Ke(this,Jn,ze(this,mn,ql).call(this,ue(this,xn).done(i)))}if(ue(this,Es))return ue(this,Es);let s=ue(this,Zn).state();return ue(this,Zn).add(s,ue(this,oo),0,!0),Ke(this,Es,ze(this,mn,zr).call(this,ue(this,Zn).done(s)))}next(t,s){let i=s.charCodeAt(0),r=i<128?void 0:t.next.get(s);if(r)return r;let o=t===ue(this,Jn)?ze(this,mn,zr).call(this,ue(this,xn).step(t.state,s,0,!0)):ze(this,mn,zr).call(this,ue(this,Zn).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Ke(this,Qn,ue(this,Qn)+128)),t.ascii[i]=o):t.next.set(s,o),fd(this,Qn)._++,o}};oo=new WeakMap,io=new WeakMap,Qn=new WeakMap,Es=new WeakMap,Jn=new WeakMap,Zn=new WeakMap,xn=new WeakMap,mn=new WeakSet,ql=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},zr=function(t){let s=Up(t),i=ue(this,io).get(s);if(i)return i;ue(this,Qn)>Db&&ze(this,mn,Bp).call(this);let r=ze(this,mn,ql).call(this,t);return ue(this,io).set(s,r),Ke(this,Qn,ue(this,Qn)+(s.length+1)),r},Bp=function(){ue(this,io).clear(),Ke(this,Qn,0),Ke(this,Es,void 0),Ke(this,Jn,void 0)};var Ab=e=>{let t=[];for(let s=e;s.t!=="match";s=s.next){if(s.t==="split"||s.t==="neg")return;t.push(s)}return t},Ib=(e,t,s,i)=>{let r=0,o=s,u=-1,p=0;for(;o<i;){let d=e[r];if(d?.t==="star"){u=r++,p=o;continue}let g=t[o];if(d&&(d.t==="any"||d.t==="lit"&&Ll(d,g)||d.t==="class"&&d.re.test(g))){r++,o++;continue}if(u===-1)return!1;r=u+1,o=++p}for(;e[r]?.t==="star";)r++;return r===e.length},Hp=e=>{let t=0,s=0;for(let i of e){let[r,o]=Ob(i);t+=r,s+=o}return[t,s]},Ob=e=>{if(e.t==="star")return[0,1/0];if(e.t!=="ext")return[1,1];if(e.type==="!")return[0,1/0];let t=e.alts.map(Hp),s=Math.min(...t.map(o=>o[0])),i=Math.max(...t.map(o=>o[1])),r=i===0?0:1/0;return e.type==="@"?[s,i]:e.type==="?"?[0,i]:e.type==="*"?[0,r]:[s,r]},Op=(e,t,s)=>{for(let i=0;i<e.length;i++)if(!Ll(e[i],t[s+i]))return!1;return!0},Mb=/[/\ud800-\udfff]/,Vb=/[\ud800-\udfff]/,Hr=e=>Vb.test(e)?[...e]:e,Mp=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},es,ro,Ss,jr,Ns,di,_r,Rs,ui,ci,pi,zn,Tn,ao,lo,fi,Gr,fn,Ts,ri,li=class{constructor(t,s={}){He(this,Ts);lt(this,"pattern");lt(this,"options");He(this,es);He(this,ro);He(this,Ss);He(this,jr);He(this,Ns);He(this,di,!1);He(this,_r);He(this,Rs);He(this,ui,!1);He(this,ci,0);He(this,pi,1/0);He(this,zn,[]);He(this,Tn,[]);He(this,ao);He(this,lo);He(this,fi,!1);He(this,Gr);He(this,fn);if(t.includes Line truncated
`).forEach((s,i)=>{let{term:r}=Yl(s.trim());if(!r)return;let o=[];for(let u=0;u<r.length;u++){if(r[u]==="\\"){u++;continue}of.has(r[u])&&!o.includes(r[u])&&o.push(r[u])}o.length&&t.push({line:i,term:r,symbols:o})}),t}function af(e,t){let s=String(e||"").split(`
`),i=s[t];if(i===void 0)return e;let{term:r}=Yl(i.trim());if(!r)return e;let o="";for(let p=0;p<r.length;p++){if(r[p]==="\\"){o+=r.slice(p,p+2),p++;continue}o+=of.has(r[p])||r[p]==="."?"\\"+r[p]:r[p]}let u=i.indexOf(r);return s[t]=i.slice(0,u)+o+i.slice(u+r.length),s.join(`
`)}var as={VIEWER_ERRORS:{title:"Content could not be loaded",access_title:"GitHub access needs attention",reader_help:"Reading this repository? You do not need to sign in. Try again after the owner restores access, or let them know this anonymous link is unavailable.",owner_help:"Own this repository? If your GitHub account was suspended or recently recovered, sign in to Anonymous GitHub again and check the GitHub connection and repository permissions in your dashboard. Then retry this page. Keep the existing anonymous URL; do not delete the repository to restore access.",retry:"Try again",dashboard:"Open owner dashboard"},ERRORS:{cache_busy:"Downloads are busy. Please try again shortly.",cache_miss:"This file is not cached yet. Please try again.",invalid_sort:"The selected sort order is invalid.",invalid_cursor:"This project page is no longer valid. Reload the list.",repository_changed:"The repository changed while processing. Please retry.",repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"We could not load this content. Try again. If it still fails, contact support with the anonymous URL and the time of the error.",unreachable:"The service could not complete this request. Wait a moment and try again.",request_error:"The connection was interrupted. Check your internet connection and try again.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"Anonymous GitHub cannot access the source repository on GitHub. It may be private, unavailable, or require the owner to reconnect GitHub.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_no Line truncated
`)),e.options=Object.assign({},e.options,v.options),p.restore()})}d();let g=null;e.saveDefault=m=>{if(m&&m.preventDefault&&m.preventDefault(),e.saving)return;let v=p.checkpoint(),y={terms:e.terms.split(`
`).map(C=>C.trim()).filter(C=>C.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",y).then(()=>{p.accept(v),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",g&&i.cancel(g),g=i(()=>{e.message=null},2500)},C=>{e.saving=!1;let k=C&&C.data&&C.data.error,w="Unable to save your defaults. Please try again.";Promise.all([s("ERRORS."+k),s("ERRORS.unknown_error")]).then(([R,b])=>{e.error=k&&R!==b?R:w},()=>{e.error=w})})},e.deleteAccount=()=>{e.deletingAccount||!e.confirmDeleteAccount||e.deleteUsername!==e.user?.username||(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},ff=function(e,t,s){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(i=>{s.url("/dashboard")},i=>{e.error=i.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},mf=function(e,t,s,i,r){e.user&&!e.user.status&&s.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&s.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(p){e.feature=p},e.featureHref=function(p){return p.needsUser&&!e.user?"/signin":p.href},e.featureTarget=function(p){return p.needsUser&&!e.user?"_self":p.target||void 0},e.featureKeydown=function(p,d){let g={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[p.key];if(g===void 0)return;p.preventDefault();let m=e.features.length,v=g==="first"?0:g==="last"?m-1:(d+g+m)%m;e.feature=e.features[v].key,r(()=>{let y=i.document.getElementById("feature-tab-"+e.feature);y&&y.focus()})},e.demoText=`# DeepLearnUtils
Developed by Jane Smith at MIT CSAIL.
See Smith et al., "Attention That Works," 2026.
Contact: jane.smith@mit.edu`,e.demoTerms="Jane Smith, Smith, MIT CSAIL, jane.smith@mit.edu",e.demoParts=function(){let p=(e.demoTerms||"").split(/[,\n]/).map(y=>y.trim()).filter(Boolean).sort((y,C)=>C.length-y.length),d=y=>y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let g=new RegExp("("+p.map(d).join("|")+")","gi"),m={},v=0;return(e.demoText||"").split(g).filter(y=>y!=="").map(y=>{let C=p.find(k=>k.toLowerCase()===y.toLowerCase());return C?(m[C.toLowerCase()]||(m[C.toLowerCase()]=++v),{text:String(m[C.toLowerCase()]),redacted:!0,original:y}):{text:y}})},e.demoCount=()=>e.demoParts().filter(p=>p.redacted).length,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"}],e.statsEmpty=()=>!!e.stat&&e.cards.every(p=>!p.total);function o(){t.get("/api/stat/").then(p=>{e.stat=p.data,e.cards[0].total=p.data.nbRepositories,e.cards[1].total=p.data.nbUsers,e.cards[2].total=p.data.nbPageViews,e.cards[3].total=p.data.nbPullRequests}).catch(()=>{})}o();function u(p){let d={series:p,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!p||p.length<2)return d;let g=new Array(p.length-1);for(let w=1;w<p.length;w++)g[w-1]=p[w]-p[w-1];let m=g.length,v=Math.max.apply(null,g),y=Math.min.apply(null,g),C=Math.min(0,y),k=v-C||1;d.viewW=m*2,d.bars=new Array(m);for(let w=0;w<m;w++){let R=(g[w]-C)/k,b=Math.max(1.5,R*34);d.bars[w]={x:(w*2+.25).toFixed(2),y:(36-b).toFixed(2),w:"1.5",h:b.toFixed(2)}}if(d.deltaToday=g[m-1],m>=2){let w=g[m-2];w&&(d.pctChange=(d.deltaToday-w)/w*100)}return d.pctAbs=Math.round(Math.abs(d.pctChange)),d.isUp=d.pctChange>=0,d}e.history={repositories:u([]),users:u([]),pageViews:u([]),pullRequests:u([])},t.get("/api/stat/history?days=60").then(p=>{let d=p.data||[];e.history={repositories:u(d.map(g=>g.nbRepositories||0)),users:u(d.map(g=>g.nbUsers||0)),pageViews:u(d.map(g=>g.nbPageViews||0)),pullRequests:u(d.map(g=>g.nbPullRequests||0))}}).catch(()=>{})},hf=function(e,t,s,i,r,o){let u=Tt();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),u.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,Je(()=>document.querySelector(".dashboard-quota > summary")?.focus())},$t()(document,"click",S=>{e.quotaExpanded&&!S.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e.projectName="",e.nameSaving=!1,e.nameError="",e.nameMessage="",e.needsAttention=S=>S.status==="error"||S._broken||d(S.status)==="progress"&&S._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=S=>{e.projectView=S,S==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=S=>{let q=al(S?.anonymizeDate||S?.lastView)||"";return/ ago$/.test(q)?"No activity for "+q.replace(/ ago$/,""):"No activity since "+q.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=S=>"project-details-"+encodeURIComponent(S._type+":"+(S._id||S._source||"unknown")),e.showProjectDetails=async S=>{e.selectedProject=S,e.projectName=S.projectName||"",e.nameError="",e.nameMessage="",await Je();let q=document.getElementById(e.projectDetailsId(S));q?.focus(),q?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=S=>{e.selectedProject=null,Je(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(S._type+":"+S._id)}"]`)?.focus())},e.saveProjectName=async S=>{if(e.nameSaving||!S._id)return;let q=e.projectName.trim();if(q.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let G=await t.post("/api/user/project-name",{type:S._type,id:S._id,name:q});S.projectName=G.data.name,S._label=S.projectName||S._fallbackLabel,e.selectedProject===S&&(e.nameMessage=q?"Project name saved.":"Default project name restored."),P||(e.dashboardCursor=null,await L(),e.selectedProject===S&&(e.selectedProject=e.items.find(ie=>ie._type===S._type&&ie._id===S._id)||null))}catch{e.selectedProject===S&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async S=>{if(!S._viewUrl||e.copyingId)return;let q=new URL(S._viewUrl,r.location.origin).href;e.copyingId=S._type+":"+S._id;try{await Yl(q),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:q})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"Preparing",error:"Error",expired:"Expiring / expired",removed:"Removing / removed"};let p=["queue","download","downloaded","preparing","anonymizing"];functi Line truncated
`)),e.options=Object.assign({},e.options,B.options),e.options.expirationDate=B.options&&B.options.expirationDate?new Date(B.options.expirationDate):W(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),E&&E()})}function ee(E,M,B){e.anonymize&&e.anonymize[E]&&e.anonymize[E].setValidity(M,B)}function ge(E){try{let M=parseGithubUrl(E);if(M&&M.owner&&M.repo)return M.owner+"/"+M.repo}catch{}return null}e.accessRepairAllowed=!1,e.repairingGitHubAccess=!1,e.accessRepairMessage="",e.repairGitHubAccess=async()=>{if(!e.accessRepairAllowed||e.repairingGitHubAccess||!e.githubConnections?.appEnabled||!i.repoId||e.role!=="owner"||e.githubConnection!=="github-app"||ge(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let E=y();try{let M=await t.get("/github/connections");if(e.githubConnections=M.data,!M.data.appEnabled)return;let B=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":M.data.csrf}});if(!v(E))return;e.error=null,B.data.fullName&&(e._originalFullName=B.data.fullName,e.source.fullName=B.data.fullName,e.sourceUrl="https://github.com/"+B.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{v(E)&&(e.accessRepairMessage="Unable to repair GitHub access. Check the App's repository permissions in Manage access, then retry. Your published snapshot has not been replaced.")}finally{e.repairingGitHubAccess=!1,C(E)}},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.details=null,e.source.commit="",e.source.branch="",e.readme="",e.branches=[],xt.cancel(),Dn.cancel(),An.cancel(),e.previewStatus="idle",e.anonymize_readme="",id();try{await I()}catch{}}};function Ee(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:ge(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function Ie(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function A(){let E=new URLSearchParams(window.location.search).get("billingDraft");if(E){R.restore();try{let B=(await t.get("/api/billing/draft/"+encodeURIComponent(E))).data;if(B.path!==r.path())throw new Error("Wrong task");b=B.values.conference||null;for(let Y of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(B.values,Y)&&(e[Y]=B.values[Y]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),P=B.id,D=JSON.stringify(R.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await Ie(),r.replace?.(r.path()),!0}catch{e.billingError="The checkout draft could not be restored. Retry by reloading this page; any local draft is still available."}}let M;try{M=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!M||M.path!==r.path()||Date.now()-M.savedAt>=30*6e4)return R.restore()?(e.sourceUrl&&await Ie(),!0):!1;R.restore();for(let B of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(M.draft,B)&&(e[B]=M.draft[B]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await Ie(),sessionStorage.removeItem("github-access-draft"),!0}he(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&u(A,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async E=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(E.data.status),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(M=>M).join(`
Contact: jane.smith@mit.edu`,e.demoTerms="Jane Smith, Smith, MIT CSAIL, jane.smith@mit.edu",e.demoParts=function(){let p=(e.demoTerms||"").split(/[,\n]/).map(y=>y.trim()).filter(Boolean).sort((y,C)=>C.length-y.length),d=y=>y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let g=new RegExp("("+p.map(d).join("|")+")","gi"),m={},v=0;return(e.demoText||"").split(g).filter(y=>y!=="").map(y=>{let C=p.find(k=>k.toLowerCase()===y.toLowerCase());return C?(m[C.toLowerCase()]||(m[C.toLowerCase()]=++v),{text:String(m[C.toLowerCase()]),redacted:!0,original:y}):{text:y}})},e.demoCount=()=>e.demoParts().filter(p=>p.redacted).length,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"}],e.statsEmpty=()=>!!e.stat&&e.cards.every(p=>!p.total);function o(){t.get("/api/stat/").then(p=>{e.stat=p.data,e.cards[0].total=p.data.nbRepositories,e.cards[1].total=p.data.nbUsers,e.cards[2].total=p.data.nbPageViews,e.cards[3].total=p.data.nbPullRequests}).catch(()=>{})}o();function u(p){let d={series:p,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!p||p.length<2)return d;let g=new Array(p.length-1);for(let w=1;w<p.length;w++)g[w-1]=p[w]-p[w-1];let m=g.length,v=Math.max.apply(null,g),y=Math.min.apply(null,g),C=Math.min(0,y),k=v-C||1;d.viewW=m*2,d.bars=new Array(m);for(let w=0;w<m;w++){let R=(g[w]-C)/k,b=Math.max(1.5,R*34);d.bars[w]={x:(w*2+.25).toFixed(2),y:(36-b).toFixed(2),w:"1.5",h:b.toFixed(2)}}if(d.deltaToday=g[m-1],m>=2){let w=g[m-2];w&&(d.pctChange=(d.deltaToday-w)/w*100)}return d.pctAbs=Math.round(Math.abs(d.pctChange)),d.isUp=d.pctChange>=0,d}e.history={repositories:u([]),users:u([]),pageViews:u([]),pullRequests:u([])},t.get("/api/stat/history?days=60").then(p=>{let d=p.data||[];e.history={repositories:u(d.map(g=>g.nbRepositories||0)),users:u(d.map(g=>g.nbUsers||0)),pageViews:u(d.map(g=>g.nbPageViews||0)),pullRequests:u(d.map(g=>g.nbPullRequests||0))}}).catch(()=>{})},hf=function(e,t,s,i,r,o){let u=Tt();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),u.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,Je(()=>document.querySelector(".dashboard-quota > summary")?.focus())},$t()(document,"click",S=>{e.quotaExpanded&&!S.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e.projectName="",e.nameSaving=!1,e.nameError="",e.nameMessage="",e.needsAttention=S=>S.status==="error"||S._broken||d(S.status)==="progress"&&S._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=S=>{e.projectView=S,S==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=S=>{let q=al(S?.anonymizeDate||S?.lastView)||"";return/ ago$/.test(q)?"No activity for "+q.replace(/ ago$/,""):"No activity since "+q.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=S=>"project-details-"+encodeURIComponent(S._type+":"+(S._id||S._source||"unknown")),e.showProjectDetails=async S=>{e.selectedProject=S,e.projectName=S.projectName||"",e.nameError="",e.nameMessage="",await Je();let q=document.getElementById(e.projectDetailsId(S));q?.focus(),q?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=S=>{e.selectedProject=null,Je(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(S._type+":"+S._id)}"]`)?.focus())},e.saveProjectName=async S=>{if(e.nameSaving||!S._id)return;let q=e.projectName.trim();if(q.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let G=await t.post("/api/user/project-name",{type:S._type,id:S._id,name:q});S.projectName=G.data.name,S._label=S.projectName||S._fallbackLabel,e.selectedProject===S&&(e.nameMessage=q?"Project name saved.":"Default project name restored."),P||(e.dashboardCursor=null,await L(),e.selectedProject===S&&(e.selectedProject=e.items.find(ie=>ie._type===S._type&&ie._id===S._id)||null))}catch{e.selectedProject===S&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async S=>{if(!S._viewUrl||e.copyingId)return;let q=new URL(S._viewUrl,r.location.origin).href;e.copyingId=S._type+":"+S._id;try{await Xl(q),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:q})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"Preparing",error:"Error",expired:"Expiring / expired",removed:"Removing / removed"};let p=["queue","download","downloaded","preparing","anonymizing"];functi Line truncated
`)),e.options=Object.assign({},e.options,B.options),e.options.expirationDate=B.options&&B.options.expirationDate?new Date(B.options.expirationDate):W(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),E&&E()})}function ee(E,M,B){e.anonymize&&e.anonymize[E]&&e.anonymize[E].setValidity(M,B)}function ge(E){try{let M=parseGithubUrl(E);if(M&&M.owner&&M.repo)return M.owner+"/"+M.repo}catch{}return null}e.accessRepairAllowed=!1,e.repairingGitHubAccess=!1,e.accessRepairMessage="",e.repairGitHubAccess=async()=>{if(!e.accessRepairAllowed||e.repairingGitHubAccess||!e.githubConnections?.appEnabled||!i.repoId||e.role!=="owner"||e.githubConnection!=="github-app"||ge(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let E=y();try{let M=await t.get("/github/connections");if(e.githubConnections=M.data,!M.data.appEnabled)return;let B=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":M.data.csrf}});if(!v(E))return;e.error=null,B.data.fullName&&(e._originalFullName=B.data.fullName,e.source.fullName=B.data.fullName,e.sourceUrl="https://github.com/"+B.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{v(E)&&(e.accessRepairMessage="Unable to repair GitHub access. Check the App's repository permissions in Manage access, then retry. Your published snapshot has not been replaced.")}finally{e.repairingGitHubAccess=!1,C(E)}},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.details=null,e.source.commit="",e.source.branch="",e.readme="",e.branches=[],xt.cancel(),Dn.cancel(),An.cancel(),e.previewStatus="idle",e.anonymize_readme="",rd();try{await I()}catch{}}};function Ee(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:ge(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function Ie(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function A(){let E=new URLSearchParams(window.location.search).get("billingDraft");if(E){R.restore();try{let B=(await t.get("/api/billing/draft/"+encodeURIComponent(E))).data;if(B.path!==r.path())throw new Error("Wrong task");b=B.values.conference||null;for(let Y of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(B.values,Y)&&(e[Y]=B.values[Y]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),P=B.id,D=JSON.stringify(R.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await Ie(),r.replace?.(r.path()),!0}catch{e.billingError="The checkout draft could not be restored. Retry by reloading this page; any local draft is still available."}}let M;try{M=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!M||M.path!==r.path()||Date.now()-M.savedAt>=30*6e4)return R.restore()?(e.sourceUrl&&await Ie(),!0):!1;R.restore();for(let B of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(M.draft,B)&&(e[B]=M.draft[B]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await Ie(),sessionStorage.removeItem("github-access-draft"),!0}he(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&u(A,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async E=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(E.data.status),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(M=>M).join(`
`),e.source=E.data.source,e.role=E.data.role||"owner",e._existingNever=E.data.options.expirationMode==="never",e._savedExpirationDate=E.data.options.expirationDate?new Date(E.data.options.expirationDate):null,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)),k=w(parseGithubUrl(e.sourceUrl)),!await A()&&(await Promise.all([I(),z()]),Os())},()=>{r.url("/404")})),i.pullRequestId&&i.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=i.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(M=>M).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)),k=w(parseGithubUrl(e.sourceUrl)),!await A())try{await ld()}catch{}},()=>{r.url("/404")})),i.gistId&&i.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=i.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(M=>M).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)),k=w(parseGithubUrl(e.sourceUrl)),!await A()&&await dd()},()=>{r.url("/404")}))}),t.get("/github/connections").then(E=>{e.githubConnections=E.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&E.data.appEnabled&&E.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&Ie())}).catch(()=>{}).finally(()=>{!g&&!i.repoId&&!i.pullRequestId&&!i.gistId&&e.userReposStatus==="idle"&&e.loadUserRepos()}),e.urlSelected=async(E=!1)=>{let M=++d;e.previousConfigurations=[],e.previousConfigurationId="";let B;try{B=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,e.details=null,it(),xt.cancel(),Dn.cancel(),An.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",ee("sourceUrl","github",!1);return}let Y=w(B),pe=E||k===Y;k=Y,e.sourceUrlError="",ee("sourceUrl","github",!0),it();let Ce=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let xe=window.document.getElementById("sourceUrl");if(xe){try{xe.setSelectionRange(0,0)}catch{}xe.scrollLeft=0}},50),Ce&&u(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!pe&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],pe||(e.source={type:"GitHubStream",branch:"",commit:""}),xt.cancel(),Dn.cancel(),An.cancel(),Ms.clear(),Vs.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",id(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=pe;try{B.gistId&&!B.repo?(e.detectedType="gist",e.source={gistId:B.gistId},await dd()):B.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:B.owner+"/"+B.repo,pullRequestId:B.pullRequestId},await ld()):(e.detectedType="repo",tt(),await Promise.all([I(),z()]),Os())}catch{}finally{M===d&&(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(B=>B.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 z(),Os()}),e.getBranches=async E=>{let M=parseGithubUrl(e.sourceUrl),B=y();try{if(!e.details){await I(E);return}let Y=await t.get(`/api/repo/${M.owner}/${M.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&ge(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:E===!0||e.reconnectingSource?"1":"0",repositoryID:Ee()}});if(!v(B))return;e.branches=Y.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let pe=e.branches.filter(Ce=>Ce.name==e.source.branch);pe.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=pe[0].commit),e.readme=pe[0].readme,await z(E))}catch(Y){if(!v(B))return;e.branches=[],e.sourceUnreachable=Y&&(Y.status===404||Y.data&&Y.data.error==="repo_not_found"),e.details=null,We(Y)}finally{C(B)}};async function I(E=!1){let M=parseGithubUrl(e.sourceUrl),B=y();try{qs(),it();let Y=await t.get(`/api/repo/${M.owner}/${M.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&ge(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:Ee(),force:"1"}});if(!v(B))return;e.details=Y.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||e.reconnectingSource)}catch(Y){if(!v(B))return;throw We(Y),Y}finally{C(B)}}async function z(E){if(e.readme&&!E)return e.readme;let M=parseGithubUrl(e.sourceUrl),B=y();try{let Y=await t.get(`/api/repo/${M.owner}/${M.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&ge(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:E===!0?"1":"0",branch:e.source.branch,repositoryID:Ee()}});v(B,!0)&&(e.readme=Y.data)}catch{v(B,!0)&&(e.readme="")}finally{C(B)}}let x={magicalBraces:!0},X=E=>E.startsWith("/")&&!E.endsWith("/")&&ns(Ps(E.slice(1),x),x)===E.slice(1),se=()=>Object.keys(e.preserve.picked).filter(E=>e.preserve.picked[E]).sort().map(E=>"/"+ns(E,x)),ce=E=>"/"+ns(E,x)+"/**",ae=E=>"!/"+ns(E,x)+"/",oe=()=>String(e.preserve.patterns||"").split(`
`).map(E=>E.trim()).filter(Boolean),Z=null,Ne=null,fe=new Set,Te=0,Me=null,Ue=()=>!1;function Ze(){let E=Te+"\0"+e.preserve.patterns;if(E!==Me){Me=E;try{Ue=Wl(Gl([...se(),...oe()]))}catch{Ue=()=>!1}}return Ue}function Qe(E){let M=new Map([["",{dirs:[],files:[]}]]);for(let B of E){let Y=B.split("/"),pe="";for(let Ce=0;Ce<Y.length-1;Ce++){let xe=Y.slice(0,Ce+1).join("/");M.has(xe)||(M.set(xe,{dirs:[],files:[]}),M.get(pe).dirs.push(xe)),pe=xe}M.get(pe).files.push(B)}for(let B of M.values())B.dirs.sort();return{files:E,dirs:M,descendants:new Map}}function Re(E){return Z.descendants.has(E)||Z.descendants.set(E,Z.files.filter(M=>M.startsWith(E+"/"))),Z.descendants.get(E)}let Be=E=>Ze()(E);function j(E){let M=Re(E),B=0;for(let Y of M)Be(Y)&&B++;return B===0?"none":B===M.length?"all":"some"}e.preserve={open:!1,loading:!1,error:"",truncated:!1,commit:"",search:"",expanded:{},picked:{},patterns:"",patternsOpen:!1},e.preserveSummary=()=>{let E=(e.options?.preserveFiles||[]).map(M=>String(M).trim()).filter(Boolean).map(M=>X(M)?Ps(M.slice(1),x):M);return E.length?E.slice(0,2).join(", ")+(E.length>2?` and ${E.length-2} more`:""):"None. Every file is redacted."};async function J(){let E=e.source?.commit;if(!(Z&&e.preserve.commit===E)){e.preserve.loading=!0,e.preserve.error="",Z=null,Ne=null;try{let M=parseGithubUrl(e.sourceUrl),B=await t.get(`/api/repo/${M.owner}/${M.repo}/tree`,{params:{commit:E,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&ge(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ee()}});if(e.source?.commit!==E)return;let Y=Array.isArray(B.data.binaryFiles)?B.data.binaryFiles:[];Z=kn(Qe(B.data.files||[])),Ne=Y.length?kn(Qe([...B.data.files||[],...Y])):Z,fe=kn(new Set(Y)),e.preserve.commit=E,e.preserve.truncated=!!B.data.truncated,e.previewFile||xt()}catch{e.preserve.error="The file list could not be loaded from GitHub. You can still use patterns.",e.preserve.patternsOpen=!0}finally{e.preserve.loading=!1}}}e.watch("source.commit",E=>{e.previewFile&&e.openPreviewFile(""),e.detectedType==="repo"&&E&&e.sourceUrl&&J().catch(()=>{})}),e.openPreserveFiles=()=>{let E={},M=[];for(let Y of e.options?.preserveFiles||[]){let pe=String(Y).trim();pe&&(!M.length&&X(pe)?E[Ps(pe.slice(1),x)]=!0:M.push(pe))}let B={};for(let Y of Object.keys(E)){let pe=Y.split("/");for(let Ce=1;Ce<pe.length;Ce++)B[pe.slice(0,Ce).join("/")]=!0}Object.assign(e.preserve,{open:!0,search:"",picked:E,expanded:B,patterns:M.join(`
`),patternsOpen:M.length>0}),e.mobileWorkspace&&(e.mobilePane="settings"),Te++,u(()=>{let Y=document.getElementById("preserve-files-dialog");Y?.showModal&&!Y.open&&Y.showModal(),document.getElementById("preserve-files-search")?.focus()},0),J()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=Gl([...se(),...oe()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!Z)return[];let E=Ze(),M=(Ce,xe,Ht)=>{let vt=!!e.preserve.picked[Ce],It=E(Ce);return{kind:"file",path:Ce,label:Ht,depth:xe,state:It?"all":"none",locked:!vt&&It,note:!vt&&It?"matched by a pattern":vt&&!It?"excluded by a pattern":""}},B=String(e.preserve.search||"").trim().toLowerCase();if(B)return Z.files.filter(Ce=>Ce.toLowerCase().includes(B)).slice(0,300).map(Ce=>M(Ce,0,Ce));let Y=[],pe=(Ce,xe)=>{let Ht=Z.dirs.get(Ce);for(let vt of Ht.dirs){let It=!!e.preserve.expanded[vt],en=oe().includes(ce(vt));Y.push({kind:"dir",path:vt,label:vt.slice(Ce?Ce.length+1:0)+"/",depth:xe,open:It,state:j(vt),locked:!1,note:en?"whole folder":""}),It&&pe(vt,xe+1)}for(let vt of Ht.files)Y.push(M(vt,xe,vt.slice(Ce?Ce.length+1:0)))};return pe("",0),Y},e.preserveCount=()=>Z?Z.files.filter(Be).length:0,e.togglePreserveDir=E=>{e.preserve.expanded[E]=!e.preserve.expanded[E]},e.togglePreserveFile=E=>{e.preserve.picked[E]=!e.preserve.picked[E],Te++},e.togglePreserveFolder=E=>{let M=ce(E),B=ae(E),Y=oe().filter(Ce=>Ce!==M&&Ce!==B),pe=j(E)==="all"||oe().includes(M);for(let Ce of Re(E))e.preserve.picked[Ce]=!1;Te++,e.preserve.patterns=(pe?Y:[...Y,M]).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)),k=w(parseGithubUrl(e.sourceUrl)),!await A())try{await dd()}catch{}},()=>{r.url("/404")})),i.gistId&&i.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=i.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(M=>M).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)),k=w(parseGithubUrl(e.sourceUrl)),!await A()&&await ud()},()=>{r.url("/404")}))}),t.get("/github/connections").then(E=>{e.githubConnections=E.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&E.data.appEnabled&&E.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&Ie())}).catch(()=>{}).finally(()=>{!g&&!i.repoId&&!i.pullRequestId&&!i.gistId&&e.userReposStatus==="idle"&&e.loadUserRepos()}),e.urlSelected=async(E=!1)=>{let M=++d;e.previousConfigurations=[],e.previousConfigurationId="";let B;try{B=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,e.details=null,it(),xt.cancel(),Dn.cancel(),An.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",ee("sourceUrl","github",!1);return}let Y=w(B),pe=E||k===Y;k=Y,e.sourceUrlError="",ee("sourceUrl","github",!0),it();let Ce=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let xe=window.document.getElementById("sourceUrl");if(xe){try{xe.setSelectionRange(0,0)}catch{}xe.scrollLeft=0}},50),Ce&&u(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!pe&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],pe||(e.source={type:"GitHubStream",branch:"",commit:""}),xt.cancel(),Dn.cancel(),An.cancel(),Ms.clear(),Vs.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",rd(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=pe;try{B.gistId&&!B.repo?(e.detectedType="gist",e.source={gistId:B.gistId},await ud()):B.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:B.owner+"/"+B.repo,pullRequestId:B.pullRequestId},await dd()):(e.detectedType="repo",tt(),await Promise.all([I(),z()]),Os())}catch{}finally{M===d&&(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(B=>B.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 z(),Os()}),e.getBranches=async E=>{let M=parseGithubUrl(e.sourceUrl),B=y();try{if(!e.details){await I(E);return}let Y=await t.get(`/api/repo/${M.owner}/${M.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&ge(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:E===!0||e.reconnectingSource?"1":"0",repositoryID:Ee()}});if(!v(B))return;e.branches=Y.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let pe=e.branches.filter(Ce=>Ce.name==e.source.branch);pe.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=pe[0].commit),e.readme=pe[0].readme,await z(E))}catch(Y){if(!v(B))return;e.branches=[],e.sourceUnreachable=Y&&(Y.status===404||Y.data&&Y.data.error==="repo_not_found"),e.details=null,We(Y)}finally{C(B)}};async function I(E=!1){let M=parseGithubUrl(e.sourceUrl),B=y();try{qs(),it();let Y=await t.get(`/api/repo/${M.owner}/${M.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&ge(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:Ee(),force:"1"}});if(!v(B))return;e.details=Y.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||e.reconnectingSource)}catch(Y){if(!v(B))return;throw We(Y),Y}finally{C(B)}}async function z(E){if(e.readme&&!E)return e.readme;let M=parseGithubUrl(e.sourceUrl),B=y();try{let Y=await t.get(`/api/repo/${M.owner}/${M.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&ge(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:E===!0?"1":"0",branch:e.source.branch,repositoryID:Ee()}});v(B,!0)&&(e.readme=Y.data)}catch{v(B,!0)&&(e.readme="")}finally{C(B)}}let x={magicalBraces:!0},X=E=>E.startsWith("/")&&!E.endsWith("/")&&ns(Ps(E.slice(1),x),x)===E.slice(1),se=()=>Object.keys(e.preserve.picked).filter(E=>e.preserve.picked[E]).sort().map(E=>"/"+ns(E,x)),ce=E=>"/"+ns(E,x)+"/**",ae=E=>"!/"+ns(E,x)+"/",oe=()=>String(e.preserve.patterns||"").split(`
`).map(E=>E.trim()).filter(Boolean),Z=null,Ne=null,fe=new Set,Te=0,Me=null,Ue=()=>!1;function Ze(){let E=Te+"\0"+e.preserve.patterns;if(E!==Me){Me=E;try{Ue=Kl(Wl([...se(),...oe()]))}catch{Ue=()=>!1}}return Ue}function Qe(E){let M=new Map([["",{dirs:[],files:[]}]]);for(let B of E){let Y=B.split("/"),pe="";for(let Ce=0;Ce<Y.length-1;Ce++){let xe=Y.slice(0,Ce+1).join("/");M.has(xe)||(M.set(xe,{dirs:[],files:[]}),M.get(pe).dirs.push(xe)),pe=xe}M.get(pe).files.push(B)}for(let B of M.values())B.dirs.sort();return{files:E,dirs:M,descendants:new Map}}function Re(E){return Z.descendants.has(E)||Z.descendants.set(E,Z.files.filter(M=>M.startsWith(E+"/"))),Z.descendants.get(E)}let Be=E=>Ze()(E);function j(E){let M=Re(E),B=0;for(let Y of M)Be(Y)&&B++;return B===0?"none":B===M.length?"all":"some"}e.preserve={open:!1,loading:!1,error:"",truncated:!1,commit:"",search:"",expanded:{},picked:{},patterns:"",patternsOpen:!1},e.preserveSummary=()=>{let E=(e.options?.preserveFiles||[]).map(M=>String(M).trim()).filter(Boolean).map(M=>X(M)?Ps(M.slice(1),x):M);return E.length?E.slice(0,2).join(", ")+(E.length>2?` and ${E.length-2} more`:""):"None. Every file is redacted."};async function J(){let E=e.source?.commit;if(!(Z&&e.preserve.commit===E)){e.preserve.loading=!0,e.preserve.error="",Z=null,Ne=null;try{let M=parseGithubUrl(e.sourceUrl),B=await t.get(`/api/repo/${M.owner}/${M.repo}/tree`,{params:{commit:E,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&ge(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ee()}});if(e.source?.commit!==E)return;let Y=Array.isArray(B.data.binaryFiles)?B.data.binaryFiles:[];Z=kn(Qe(B.data.files||[])),Ne=Y.length?kn(Qe([...B.data.files||[],...Y])):Z,fe=kn(new Set(Y)),e.preserve.commit=E,e.preserve.truncated=!!B.data.truncated,e.previewFile||xt()}catch{e.preserve.error="The file list could not be loaded from GitHub. You can still use patterns.",e.preserve.patternsOpen=!0}finally{e.preserve.loading=!1}}}e.watch("source.commit",E=>{e.previewFile&&e.openPreviewFile(""),e.detectedType==="repo"&&E&&e.sourceUrl&&J().catch(()=>{})}),e.openPreserveFiles=()=>{let E={},M=[];for(let Y of e.options?.preserveFiles||[]){let pe=String(Y).trim();pe&&(!M.length&&X(pe)?E[Ps(pe.slice(1),x)]=!0:M.push(pe))}let B={};for(let Y of Object.keys(E)){let pe=Y.split("/");for(let Ce=1;Ce<pe.length;Ce++)B[pe.slice(0,Ce).join("/")]=!0}Object.assign(e.preserve,{open:!0,search:"",picked:E,expanded:B,patterns:M.join(`
`),patternsOpen:M.length>0}),e.mobileWorkspace&&(e.mobilePane="settings"),Te++,u(()=>{let Y=document.getElementById("preserve-files-dialog");Y?.showModal&&!Y.open&&Y.showModal(),document.getElementById("preserve-files-search")?.focus()},0),J()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=Wl([...se(),...oe()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!Z)return[];let E=Ze(),M=(Ce,xe,Ht)=>{let vt=!!e.preserve.picked[Ce],It=E(Ce);return{kind:"file",path:Ce,label:Ht,depth:xe,state:It?"all":"none",locked:!vt&&It,note:!vt&&It?"matched by a pattern":vt&&!It?"excluded by a pattern":""}},B=String(e.preserve.search||"").trim().toLowerCase();if(B)return Z.files.filter(Ce=>Ce.toLowerCase().includes(B)).slice(0,300).map(Ce=>M(Ce,0,Ce));let Y=[],pe=(Ce,xe)=>{let Ht=Z.dirs.get(Ce);for(let vt of Ht.dirs){let It=!!e.preserve.expanded[vt],en=oe().includes(ce(vt));Y.push({kind:"dir",path:vt,label:vt.slice(Ce?Ce.length+1:0)+"/",depth:xe,open:It,state:j(vt),locked:!1,note:en?"whole folder":""}),It&&pe(vt,xe+1)}for(let vt of Ht.files)Y.push(M(vt,xe,vt.slice(Ce?Ce.length+1:0)))};return pe("",0),Y},e.preserveCount=()=>Z?Z.files.filter(Be).length:0,e.togglePreserveDir=E=>{e.preserve.expanded[E]=!e.preserve.expanded[E]},e.togglePreserveFile=E=>{e.preserve.picked[E]=!e.preserve.picked[E],Te++},e.togglePreserveFolder=E=>{let M=ce(E),B=ae(E),Y=oe().filter(Ce=>Ce!==M&&Ce!==B),pe=j(E)==="all"||oe().includes(M);for(let Ce of Re(E))e.preserve.picked[Ce]=!1;Te++,e.preserve.patterns=(pe?Y:[...Y,M]).join(`
`),pe&&Re(E).some(Be)&&(e.preserve.patterns=[...Y,B].join(`
`))};let me=/^readme(\.[^/]*)?$/i,Se=[".md",".markdown",".mdown",".mkdn",".rst",".txt",""],ke=["README.md","README","README.markdown","README.rst","README.txt","readme.md"],qe=E=>{let M=Oe(E),B=M.indexOf("."),Y=Se.indexOf(B===-1?"":M.slice(B).toLowerCase());return Y===-1?Se.length:Y},ct=()=>!!Z&&!!e.preserve.commit&&e.preserve.commit===e.source?.commit;e.readmePath=()=>{if(!ct())return"";for(let E of[".github","","docs"]){let M=(Z.dirs.get(E)?.files||[]).filter(B=>me.test(Oe(B)));if(M.length)return M.sort((B,Y)=>qe(B)-qe(Y)||ht(B,Y))[0]}return""},e.readmeName=()=>Oe(e.readmePath())||"README.md";let At={key:null,fn:()=>!1},Ut=()=>{let E=(e.options?.preserveFiles||[]).map(B=>String(B).trim()).filter(Boolean),M=E.join(`
`);if(M!==At.key){let B=()=>!1;try{E.length&&(B=Wl(E))}catch{}At={key:M,fn:B}}return At.fn};e.pathPreserved=E=>!!E&&Ut()(E),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let E=Ut();if(ct()){let M=e.readmePath();return!!M&&E(M)}return ke.some(M=>E(M))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function Bt(){let E={terms:e.terms?e.terms.split(`
`):[],filePath:e.previewOpenPath()||"README.md",preserveFiles:e.options.preserveFiles||[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(E.branchName=e.source.branch);try{let M=parseGithubUrl(e.sourceUrl);E.repoName=`${M.owner}/${M.repo}`}catch{}return E}function Pn(E,M,B){let Y=null,pe=0,Ce=()=>{if(e.detectedType!==E)return;Y&&u.cancel(Y);let xe=++pe;e.previewStatus="loading",Y=u(()=>{Y=null;let Ht=M();if(!Ht){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Ht).then(vt=>{xe===pe&&(B(vt.data,Ht),e.previewStatus="ready")}).catch(()=>{xe===pe&&(e.previewStatus="error")})},200)};return Ce.cancel=()=>{pe++,Y&&u.cancel(Y),Y=null},e.on("dispose",Ce.cancel),Ce}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof hn!="string"?rd(e.previewFile):xt()),e.detectedType==="pr"&&Dn(),e.detectedType==="gist"&&An()};let at=kn(ei(e));Object.defineProperty(e,"previewViewer",{get:()=>at}),yl(at,e),Object.assign(at,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),at.preview=!0,at.fileSize=E=>E===at.filePath&&typeof hn=="string"?new Blob([hn]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,at.openPreserveFiles=()=>e.openPreserveFiles(),at.previewPreserved=()=>e.previewPreserved(),at.retryContent=()=>e.retryPreview();let _m=E=>fe.has(E)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(E),na=(E="")=>({path:E,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=na();let go=0,hn=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=E=>{if(E=E||"",E&&E===e.readmePath()&&(E=""),go++,hn=null,Si(),xt.cancel(),e.previewFile=E,e.previewDoc=na(E),at.sidebarCollapsed=!0,at.content=null,!E){e.readme?xt():e.previewStatus="idle";return}if(_m(E)){sa("binary"),e.previewStatus="ready";return}rd(E)};function id(){go++,hn=null,e.previewFile="",e.previewDoc=na(),at.sidebarCollapsed=!0,at.content=null}function rd(E){let M=++go;hn=null,Object.assign(e.previewDoc,{loading:!0,loadError:""}),e.previewStatus="loading";let B;try{B=parseGithubUrl(e.sourceUrl)}catch{B=null}if(!B||!e.source?.commit){Object.assign(e.previewDoc,{loading:!1,loadError:"The repository is still loading. Try again in a moment."}),e.previewStatus="error";return}t.get(`/api/repo/${B.owner}/${B.repo}/file`,{params:{commit:e.source.commit,path:E,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&ge(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ee()},transformResponse:Y=>Y}).then(Y=>{if(M!==go)return;e.previewDoc.loading=!1;let pe=typeof Y.headers=="function"&&Y.headers("content-type")||"";if(/json/i.test(pe)){let Ce=null;try{Ce=JSON.parse(Y.data)}catch{}if(Ce&&Ce.binary===!0){sa("binary"),e.previewStatus="ready";return}}hn=typeof Y.data=="string"?Y.data:"",xt()},Y=>{if(M!==go)return;e.previewDoc.loading=!1;let pe=Qr(Y);if(pe==="file_too_big"){sa("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=as.ERRORS[pe]||"GitHub did not return this file.",e.previewStatus="error"})}let Ei;function Si(){Ei&&window.URL.revokeObjectURL(Ei),Ei=void 0,at.url=void 0}e.on("dispose",Si);function sa(E){Si(),e.previewDoc.note=E,at.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),at.type=E==="too_big"?"error":"binary",at.content=E==="too_big"?"file_too_big":"binary"}function Gm(E){try{let M=parseGithubUrl(e.sourceUrl),B=e.source.branch||e.details&&e.details.defaultBranch||"main",Y=E&&E.includes("/")?E.slice(0,E.lastIndexOf("/")+1):"";return`https://github.com/${M.owner}/${M.repo}/raw/${B}/${Y}`}catch{return""}}let ad=Pn("repo",()=>e.previewFile?typeof hn!="string"?null:{content:hn,options:Bt()}:e.readme?{content:e.readme,options:Bt()}:null,E=>{if(typeof E?.content!="string")throw Error("Invalid preview response");Si(),window.URL?.createObjectURL&&(at.url=Ei=window.URL.createObjectURL(new Blob([E.content],{type:"text/plain"})));let M=e.previewOpenPath()||e.readmeName();at.prepareFile(e.previewPathName(M)),at.fileBaseUrl=Gm(M),at.renderFileContent(E.content,at.type,at.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=E.content)}),xt=()=>{e.previewFile&&typeof hn!="string"||ad()};xt.cancel=ad.cancel;let Is=ut(new Map),oa=new Set,ia=new Set,yo="",vo=null,Ni=()=>String(e.terms||"").split(`
`);if(M!==At.key){let B=()=>!1;try{E.length&&(B=Kl(E))}catch{}At={key:M,fn:B}}return At.fn};e.pathPreserved=E=>!!E&&Ut()(E),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let E=Ut();if(ct()){let M=e.readmePath();return!!M&&E(M)}return ke.some(M=>E(M))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function Bt(){let E={terms:e.terms?e.terms.split(`
`):[],filePath:e.previewOpenPath()||"README.md",preserveFiles:e.options.preserveFiles||[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(E.branchName=e.source.branch);try{let M=parseGithubUrl(e.sourceUrl);E.repoName=`${M.owner}/${M.repo}`}catch{}return E}function Pn(E,M,B){let Y=null,pe=0,Ce=()=>{if(e.detectedType!==E)return;Y&&u.cancel(Y);let xe=++pe;e.previewStatus="loading",Y=u(()=>{Y=null;let Ht=M();if(!Ht){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Ht).then(vt=>{xe===pe&&(B(vt.data,Ht),e.previewStatus="ready")}).catch(()=>{xe===pe&&(e.previewStatus="error")})},200)};return Ce.cancel=()=>{pe++,Y&&u.cancel(Y),Y=null},e.on("dispose",Ce.cancel),Ce}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof hn!="string"?ad(e.previewFile):xt()),e.detectedType==="pr"&&Dn(),e.detectedType==="gist"&&An()};let at=kn(ei(e));Object.defineProperty(e,"previewViewer",{get:()=>at}),yl(at,e),Object.assign(at,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),at.preview=!0,at.fileSize=E=>E===at.filePath&&typeof hn=="string"?new Blob([hn]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,at.openPreserveFiles=()=>e.openPreserveFiles(),at.previewPreserved=()=>e.previewPreserved(),at.retryContent=()=>e.retryPreview();let _m=E=>fe.has(E)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(E),na=(E="")=>({path:E,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=na();let go=0,hn=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=E=>{if(E=E||"",E&&E===e.readmePath()&&(E=""),go++,hn=null,Si(),xt.cancel(),e.previewFile=E,e.previewDoc=na(E),at.sidebarCollapsed=!0,at.content=null,!E){e.readme?xt():e.previewStatus="idle";return}if(_m(E)){sa("binary"),e.previewStatus="ready";return}ad(E)};function rd(){go++,hn=null,e.previewFile="",e.previewDoc=na(),at.sidebarCollapsed=!0,at.content=null}function ad(E){let M=++go;hn=null,Object.assign(e.previewDoc,{loading:!0,loadError:""}),e.previewStatus="loading";let B;try{B=parseGithubUrl(e.sourceUrl)}catch{B=null}if(!B||!e.source?.commit){Object.assign(e.previewDoc,{loading:!1,loadError:"The repository is still loading. Try again in a moment."}),e.previewStatus="error";return}t.get(`/api/repo/${B.owner}/${B.repo}/file`,{params:{commit:e.source.commit,path:E,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&ge(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ee()},transformResponse:Y=>Y}).then(Y=>{if(M!==go)return;e.previewDoc.loading=!1;let pe=typeof Y.headers=="function"&&Y.headers("content-type")||"";if(/json/i.test(pe)){let Ce=null;try{Ce=JSON.parse(Y.data)}catch{}if(Ce&&Ce.binary===!0){sa("binary"),e.previewStatus="ready";return}}hn=typeof Y.data=="string"?Y.data:"",xt()},Y=>{if(M!==go)return;e.previewDoc.loading=!1;let pe=Qr(Y);if(pe==="file_too_big"){sa("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=as.ERRORS[pe]||"GitHub did not return this file.",e.previewStatus="error"})}let Ei;function Si(){Ei&&window.URL.revokeObjectURL(Ei),Ei=void 0,at.url=void 0}e.on("dispose",Si);function sa(E){Si(),e.previewDoc.note=E,at.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),at.type=E==="too_big"?"error":"binary",at.content=E==="too_big"?"file_too_big":"binary"}function Gm(E){try{let M=parseGithubUrl(e.sourceUrl),B=e.source.branch||e.details&&e.details.defaultBranch||"main",Y=E&&E.includes("/")?E.slice(0,E.lastIndexOf("/")+1):"";return`https://github.com/${M.owner}/${M.repo}/raw/${B}/${Y}`}catch{return""}}let ld=Pn("repo",()=>e.previewFile?typeof hn!="string"?null:{content:hn,options:Bt()}:e.readme?{content:e.readme,options:Bt()}:null,E=>{if(typeof E?.content!="string")throw Error("Invalid preview response");Si(),window.URL?.createObjectURL&&(at.url=Ei=window.URL.createObjectURL(new Blob([E.content],{type:"text/plain"})));let M=e.previewOpenPath()||e.readmeName();at.prepareFile(e.previewPathName(M)),at.fileBaseUrl=Gm(M),at.renderFileContent(E.content,at.type,at.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=E.content)}),xt=()=>{e.previewFile&&typeof hn!="string"||ld()};xt.cancel=ld.cancel;let Is=ut(new Map),oa=new Set,ia=new Set,yo="",vo=null,Ni=()=>String(e.terms||"").split(`
`).filter(E=>E.trim());function Wm(){vo=null;let E=Ni(),M=E.join(`
`);M!==yo&&(Is.clear(),ia.clear(),yo=M);let B=[...oa].filter(Y=>!Is.has(Y));if(oa.clear(),!(!B.length||!E.length))for(let Y=0;Y<B.length;Y+=400){let pe=B.slice(Y,Y+400);t.post("/api/anonymize-preview",{contents:pe,options:{terms:E,image:!0,link:!0}}).then(Ce=>{if(yo!==M||Ni().join(`
`)!==M)return;let xe=Ce.data?.contents;if(!Array.isArray(xe)||xe.length!==pe.length)throw Error("Invalid preview response");pe.forEach((Ht,vt)=>Is.set(Ht,typeof xe[vt]=="string"?xe[vt]:Ht))}).catch(()=>{yo===M&&pe.forEach(Ce=>ia.add(Ce))})}}e.previewName=E=>{if(!E||!Ni().length)return E;if(yo===Ni().join(`
`)){if(Is.has(E))return Is.get(E);if(ia.has(E))return E}return oa.add(E),vo||(vo=u(Wm,120)),E},e.previewPathName=E=>{E=String(E||"");let M=E.lastIndexOf("/");return M<0?e.previewName(E):e.previewName(E.slice(0,M))+"/"+e.previewName(E.slice(M+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{at.repoId=e.repoId||"repository",at.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),at.paths=at.filePath.split("/"),at.files=e.previewTreeFiles(),at.loadedFolders=Object.fromEntries([...Ne?.dirs.keys()||[]].map(E=>[e.previewName(E),!0]))},!0),e.on("dispose",()=>{vo&&u.cancel(vo)});function Os(){!e.anonymize||!e.anonymize.terms||xt()}async function ld(){let E=parseGithubUrl(e.sourceUrl),M=y();try{qs(),it();let B=await t.get(`/api/pr/${E.owner}/${E.repo}/${E.pullRequestId}`,{params:{connection:e.githubConnection}});if(!v(M))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=E.repo+"-PR"+E.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!v(M))return;throw We(B),B}finally{C(M)}}let Ms=ut(new Map);function Km(){let E=new Set,M=e.details&&e.details.pullRequest;if(!M)return E;typeof M.title=="string"&&E.add(M.title),typeof M.body=="string"&&E.add(M.body),typeof M.diff=="string"&&E.add(M.diff);let B=M.comments||[];for(let Y of B)typeof Y.author=="string"&&E.add(Y.author),typeof Y.body=="string"&&E.add(Y.body);return E}let Dn=Pn("pr",()=>{let E=Km(),M=Array.from(E);return M.length===0?null:{contents:M,options:Bt()}},(E,M)=>{if(!Array.isArray(E?.contents)||E.contents.length!==M.contents.length||E.contents.some(pe=>typeof pe!="string"))throw Error("Invalid preview response");let B=M.contents,Y=new Map;for(let pe=0;pe<B.length&&pe<E.contents.length;pe++)Y.set(B[pe],E.contents[pe]);Ms.clear(),Y.forEach((pe,Ce)=>Ms.set(Ce,pe))});e.anonymizePrContent=function(E){return E&&(Ms.has(E)?Ms.get(E):"")};async function dd(){let E=parseGithubUrl(e.sourceUrl),M=y();try{qs(),it(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${E.gistId}`);if(!v(M))return;e.details=B.data,e.gistId||(e.gistId="gist-"+E.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!v(M))return;if(B.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,ee("sourceUrl","missing",!1);return}if(B.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,ee("sourceUrl","missing",!1);return}throw We(B),B}finally{C(M)}}let Vs=ut(new Map);function Ym(){let E=new Set,M=e.details&&e.details.gist;if(!M)return E;typeof M.description=="string"&&E.add(M.description),typeof M.ownerLogin=="string"&&E.add(M.ownerLogin);let B=M.files||[];for(let pe of B)typeof pe.filename=="string"&&E.add(pe.filename),typeof pe.content=="string"&&E.add(pe.content);let Y=M.comments||[];for(let pe of Y)typeof pe.author=="string"&&E.add(pe.author),typeof pe.body=="string"&&E.add(pe.body);return E}let An=Pn("gist",()=>{let E=Ym(),M=Array.from(E);return M.length===0?null:{contents:M,options:Bt()}},(E,M)=>{if(!Array.isArray(E?.contents)||E.contents.length!==M.contents.length||E.contents.some(pe=>typeof pe!="string"))throw Error("Invalid preview response");let B=M.contents,Y=new Map;for(let pe=0;pe<B.length&&pe<E.contents.length;pe++)Y.set(B[pe],E.contents[pe]);Vs.clear(),Y.forEach((pe,Ce)=>Vs.set(Ce,pe)),ra()});e.anonymizeGistContent=function(E){return E&&(Vs.has(E)?Vs.get(E):"")},e.previewGistFiles=[];function ra(){let E=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=E.map(M=>({filename:e.anonymizeGistContent(M.filename),content:e.anonymizeGistContent(M.content),language:M.language}))}e.watch("details.gist.files",ra,!0),e.watch("terms",ra);function Xm(){let E=e.conference;if(e.conference_data=null,!E)return;let M=E===b||e.isUpdate&&E===e._originalConference;E!==b&&(b=null),t.get("/api/conferences/"+E).then(B=>{e.conference===E&&(e.conference_data=B.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!M&&(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,e.options.pdf=e.conference_data.options.pdf,e.options.notebook=e.conference_data.options.notebook,e.options.link=e.conference_data.options.link))},()=>{e.conference===E&&(e.conference_data=null)})}function qs(){ee("repoId","used",!0),ee("repoId","format",!0),ee("pullRequestId","used",!0),ee("pullRequestId","format",!0),ee("gistId","used",!0),ee("gistId","format",!0),ee("sourceUrl","used",!0),ee("sourceUrl","missing",!0),ee("sourceUrl","access",!0),ee("sourceUrl","github",!0),ee("commit","exists",!0),ee("conference","activated",!0),ee("terms","format",!0),e.termHints=[]}function Ri(){if(e.detectedType==="repo"&&e.options.expirationMode==="never")return!1;let E=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||E&&E.invalid?(E&&E.setDirty&&E.setDirty(),e.error= Line truncated
`)){if(Is.has(E))return Is.get(E);if(ia.has(E))return E}return oa.add(E),vo||(vo=u(Wm,120)),E},e.previewPathName=E=>{E=String(E||"");let M=E.lastIndexOf("/");return M<0?e.previewName(E):e.previewName(E.slice(0,M))+"/"+e.previewName(E.slice(M+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{at.repoId=e.repoId||"repository",at.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),at.paths=at.filePath.split("/"),at.files=e.previewTreeFiles(),at.loadedFolders=Object.fromEntries([...Ne?.dirs.keys()||[]].map(E=>[e.previewName(E),!0]))},!0),e.on("dispose",()=>{vo&&u.cancel(vo)});function Os(){!e.anonymize||!e.anonymize.terms||xt()}async function dd(){let E=parseGithubUrl(e.sourceUrl),M=y();try{qs(),it();let B=await t.get(`/api/pr/${E.owner}/${E.repo}/${E.pullRequestId}`,{params:{connection:e.githubConnection}});if(!v(M))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=E.repo+"-PR"+E.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!v(M))return;throw We(B),B}finally{C(M)}}let Ms=ut(new Map);function Km(){let E=new Set,M=e.details&&e.details.pullRequest;if(!M)return E;typeof M.title=="string"&&E.add(M.title),typeof M.body=="string"&&E.add(M.body),typeof M.diff=="string"&&E.add(M.diff);let B=M.comments||[];for(let Y of B)typeof Y.author=="string"&&E.add(Y.author),typeof Y.body=="string"&&E.add(Y.body);return E}let Dn=Pn("pr",()=>{let E=Km(),M=Array.from(E);return M.length===0?null:{contents:M,options:Bt()}},(E,M)=>{if(!Array.isArray(E?.contents)||E.contents.length!==M.contents.length||E.contents.some(pe=>typeof pe!="string"))throw Error("Invalid preview response");let B=M.contents,Y=new Map;for(let pe=0;pe<B.length&&pe<E.contents.length;pe++)Y.set(B[pe],E.contents[pe]);Ms.clear(),Y.forEach((pe,Ce)=>Ms.set(Ce,pe))});e.anonymizePrContent=function(E){return E&&(Ms.has(E)?Ms.get(E):"")};async function ud(){let E=parseGithubUrl(e.sourceUrl),M=y();try{qs(),it(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${E.gistId}`);if(!v(M))return;e.details=B.data,e.gistId||(e.gistId="gist-"+E.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!v(M))return;if(B.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,ee("sourceUrl","missing",!1);return}if(B.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,ee("sourceUrl","missing",!1);return}throw We(B),B}finally{C(M)}}let Vs=ut(new Map);function Ym(){let E=new Set,M=e.details&&e.details.gist;if(!M)return E;typeof M.description=="string"&&E.add(M.description),typeof M.ownerLogin=="string"&&E.add(M.ownerLogin);let B=M.files||[];for(let pe of B)typeof pe.filename=="string"&&E.add(pe.filename),typeof pe.content=="string"&&E.add(pe.content);let Y=M.comments||[];for(let pe of Y)typeof pe.author=="string"&&E.add(pe.author),typeof pe.body=="string"&&E.add(pe.body);return E}let An=Pn("gist",()=>{let E=Ym(),M=Array.from(E);return M.length===0?null:{contents:M,options:Bt()}},(E,M)=>{if(!Array.isArray(E?.contents)||E.contents.length!==M.contents.length||E.contents.some(pe=>typeof pe!="string"))throw Error("Invalid preview response");let B=M.contents,Y=new Map;for(let pe=0;pe<B.length&&pe<E.contents.length;pe++)Y.set(B[pe],E.contents[pe]);Vs.clear(),Y.forEach((pe,Ce)=>Vs.set(Ce,pe)),ra()});e.anonymizeGistContent=function(E){return E&&(Vs.has(E)?Vs.get(E):"")},e.previewGistFiles=[];function ra(){let E=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=E.map(M=>({filename:e.anonymizeGistContent(M.filename),content:e.anonymizeGistContent(M.content),language:M.language}))}e.watch("details.gist.files",ra,!0),e.watch("terms",ra);function Xm(){let E=e.conference;if(e.conference_data=null,!E)return;let M=E===b||e.isUpdate&&E===e._originalConference;E!==b&&(b=null),t.get("/api/conferences/"+E).then(B=>{e.conference===E&&(e.conference_data=B.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!M&&(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,e.options.pdf=e.conference_data.options.pdf,e.options.notebook=e.conference_data.options.notebook,e.options.link=e.conference_data.options.link))},()=>{e.conference===E&&(e.conference_data=null)})}function qs(){ee("repoId","used",!0),ee("repoId","format",!0),ee("pullRequestId","used",!0),ee("pullRequestId","format",!0),ee("gistId","used",!0),ee("gistId","format",!0),ee("sourceUrl","used",!0),ee("sourceUrl","missing",!0),ee("sourceUrl","access",!0),ee("sourceUrl","github",!0),ee("commit","exists",!0),ee("conference","activated",!0),ee("terms","format",!0),e.termHints=[]}function Ri(){if(e.detectedType==="repo"&&e.options.expirationMode==="never")return!1;let E=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||E&&E.invalid?(E&&E.setDirty&&E.setDirty(),e.error= Line truncated
`).filter(Ce=>Ce),connection:e.githubConnection,fullName:`${B.owner}/${B.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(Y.options.pageSource=e.details.pageSource),qs();let pe=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(pe,Y,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/status/"+e.repoId},Ce=>{if(Ce.data){let xe=["quota_exceeded","quota_repository_limit","quota_storage_limit","subscription_required_for_never_expiration"].includes(Ce.data.error);xe||o("ERRORS."+Ce.data.error).then(Ht=>{e.error=Ht},console.error),Ti(Ce.data.error),xe&&(Ce.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,Je(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{M.disabled=!1})},e.anonymizeGist=E=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(Ri())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let M=E.currentTarget||E.target.closest?.("button")||E.target;M.disabled=!0;let B=parseGithubUrl(e.sourceUrl),Y={gistId:e.gistId,terms:e.terms.trim().split(`
`).filter(Ce=>Ce),source:{gistId:B.gistId},options:e.options,conference:e.conference};qs();let pe=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(pe,Y,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/gist/"+e.gistId},Ce=>{Ce.data&&(o("ERRORS."+Ce.data.error).then(xe=>{e.error=xe},console.error),Ti(Ce.data.error))}).finally(()=>{M.disabled=!1})},e.anonymizePullRequest=E=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(Ri())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let M=E.currentTarget||E.target.closest?.("button")||E.target;M.disabled=!0;let B=parseGithubUrl(e.sourceUrl),Y={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
`).filter(Ce=>Ce),source:{repositoryFullName:`${B.owner}/${B.repo}`,pullRequestId:B.pullRequestId},options:e.options,conference:e.conference};qs();let pe=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(pe,Y,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/pr/"+e.pullRequestId},Ce=>{Ce.data&&(o("ERRORS."+Ce.data.error).then(xe=>{e.error=xe},console.error),Ti(Ce.data.error))}).finally(()=>{M.disabled=!1})},e.watch("conference",()=>{Xm()}),e.termHints=[],e.matchTermAsWritten=E=>{e.terms=af(e.terms,E)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&xt()}),e.watch("terms",()=>{e.termHints=rf(e.terms),e.detectedType==="repo"&&Os(),e.detectedType==="pr"&&Dn(),e.detectedType==="gist"&&An()}),e.watch("options.image",()=>{e.detectedType==="repo"&&Os(),e.detectedType==="pr"&&Dn(),e.detectedType==="gist"&&An()}),e.watch("options.link",()=>{e.detectedType==="repo"&&Os(),e.detectedType==="pr"&&Dn(),e.detectedType==="gist"&&An()}),e.watch("details",()=>{e.detectedType==="pr"&&Dn(),e.detectedType==="gist"&&An()},!0)},Xl=function(e,t,s,i,r,o){yl(e);let u=Tt();Zr();let p=$t(),d=0,g=null,m=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function v(){g&&(g.resolve(),g=null),m&&(u.timeout.cancel(m),m=null)}let y=!1;e.on("dispose",()=>{y=!0,d++,v(),C&&C.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,p(document,"click",F=>{e.symbolsOpen&&!F.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!F.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!F.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&F.target.isConnected&&!F.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!F.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!F.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),p(document,"keydown",F=>{F.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(F.ctrlKey||F.metaKey)&&!F.altKey&&F.key&&F.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(F.preventDefault(),e.toggleMdFind(!0))}),p(document,"keydown",function(F){if((F.metaKey||F.ctrlKey)&&F.key==="k"){F.preventDefault();var V=document.querySelector(".tree-search-input");V&&(V.focus(),V.select())}});var C=null;e.onFileSearchChange=function(){C&&(C.resolve(),C=null);let F=e.fileSearchQuery;if(!F||F.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let V=o.defer();C=V,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(F)}`,{timeout:V.promise}).then(function(S){if(!(y||C!==V)){C=null,e.fileSearchLoading=!1;var q={};e.files.forEach(function(Oe){q[(Oe.path||"")+"/"+Oe.name]=!0});for(var G=[],ie={},K=0;K<S.data.length;K++){var ne=S.data[K];if(ne.path)for(var le=ne.path.split("/"),ye="",Ae=0;Ae<le.length;Ae++){var Xe=ye;ye=ye?ye+"/"+le[Ae]:le[Ae];var tt=Xe+"/"+le[Ae];!q[tt]&&!ie[tt]&&(ie[tt]=!0,G.push({name:le[Ae],path:Xe}))}}G.sort(function(Oe,Q){return(Oe.path||"").split("/").length-(Q.path||"").split("/").length}),G.length>0&&e.files.push.apply(e.files,G);for(var Ge=[],We=0;We<S.data.length;We++){var it=S.data[We],ht=(it.path||"")+"/"+it.name;!q[ht]&&it.size!=null&&(Ge.push(it),q[ht]=!0)}Ge.length>0&&e.files.push.apply(e.files,Ge),e.fileSearchResults=S.data}},function(){!y&&C===V&&(C=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(F,V){if(e.repoId!=i.repoId)return re();if((i.path||"")!=e.filePath){window.matchMedia?.("(max-width: 767px)").matches&&(e.sidebarCollapsed=!0),e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(S=>S&&S.trim().length>0),W();for(let S=0;S<e.paths.length-1;S++){let q=S>0?e.paths.slice(0,S).join("/"):"";e.files.some(ie=>ie.path===q)||e.getFiles(q)}}});function k(){if(e.paths[0]!="")return;let F=["readme.md","readme.txt","readme.org","readme.1st","readme"],V={};for(let q of e.files)q.name.toLowerCase().indexOf("readme")>-1&&(V[q.name.toLowerCase()]=q.name);let S=null;for(let q of F)if(V[q]){S=q;break}if(!S&&Object.keys(V).length>0&&(S=Object.keys(V)[0]),S){let q=s.url();q[q.length-1]!="/"&&(q+="/"),s.url(q+encodePathForUrl(V[S]))}}e.fileCounts=null;let w=0,R=new Set,b=!1;e.getFiles=function(F,V=!1){let S=e.repoId,q=w;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(F)}&v=${e.options.lastUpdateDate}`).then(function(G){if(y||S!==e.repoId||q!==w)return[];let ie=F||"";return e.files=e.files.filter(K=>K.path!==ie),e.files.push(...G.data),e.loadedFolders={...e.loadedFolders,[ie]:!0},P(ie,q),G.data},function(G){if(y||S!==e.repoId||q!==w)return[];V||(e.type="error",e.content=Qr(G),e.files=[])})};function P(F,V){if(b||R.has(F))return;R.add(F);let S=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(F)}`).then(function(q){y||S!==e.repoId||V!==w||(e.fileCounts={...e.fileCounts,...q.data})},f Line truncated
`).filter(Ce=>Ce),source:{repositoryFullName:`${B.owner}/${B.repo}`,pullRequestId:B.pullRequestId},options:e.options,conference:e.conference};qs();let pe=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(pe,Y,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/pr/"+e.pullRequestId},Ce=>{Ce.data&&(o("ERRORS."+Ce.data.error).then(xe=>{e.error=xe},console.error),Ti(Ce.data.error))}).finally(()=>{M.disabled=!1})},e.watch("conference",()=>{Xm()}),e.termHints=[],e.matchTermAsWritten=E=>{e.terms=af(e.terms,E)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&xt()}),e.watch("terms",()=>{e.termHints=rf(e.terms),e.detectedType==="repo"&&Os(),e.detectedType==="pr"&&Dn(),e.detectedType==="gist"&&An()}),e.watch("options.image",()=>{e.detectedType==="repo"&&Os(),e.detectedType==="pr"&&Dn(),e.detectedType==="gist"&&An()}),e.watch("options.link",()=>{e.detectedType==="repo"&&Os(),e.detectedType==="pr"&&Dn(),e.detectedType==="gist"&&An()}),e.watch("details",()=>{e.detectedType==="pr"&&Dn(),e.detectedType==="gist"&&An()},!0)},Ql=function(e,t,s,i,r,o){yl(e);let u=Tt();Zr();let p=$t(),d=0,g=null,m=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function v(){g&&(g.resolve(),g=null),m&&(u.timeout.cancel(m),m=null)}let y=!1;e.on("dispose",()=>{y=!0,d++,v(),C&&C.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,p(document,"click",F=>{e.symbolsOpen&&!F.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!F.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!F.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&F.target.isConnected&&!F.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!F.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!F.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),p(document,"keydown",F=>{F.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(F.ctrlKey||F.metaKey)&&!F.altKey&&F.key&&F.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(F.preventDefault(),e.toggleMdFind(!0))}),p(document,"keydown",function(F){if((F.metaKey||F.ctrlKey)&&F.key==="k"){F.preventDefault();var V=document.querySelector(".tree-search-input");V&&(V.focus(),V.select())}});var C=null;e.onFileSearchChange=function(){C&&(C.resolve(),C=null);let F=e.fileSearchQuery;if(!F||F.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let V=o.defer();C=V,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(F)}`,{timeout:V.promise}).then(function(S){if(!(y||C!==V)){C=null,e.fileSearchLoading=!1;var q={};e.files.forEach(function(Oe){q[(Oe.path||"")+"/"+Oe.name]=!0});for(var G=[],ie={},K=0;K<S.data.length;K++){var ne=S.data[K];if(ne.path)for(var le=ne.path.split("/"),ye="",Ae=0;Ae<le.length;Ae++){var Xe=ye;ye=ye?ye+"/"+le[Ae]:le[Ae];var tt=Xe+"/"+le[Ae];!q[tt]&&!ie[tt]&&(ie[tt]=!0,G.push({name:le[Ae],path:Xe}))}}G.sort(function(Oe,Q){return(Oe.path||"").split("/").length-(Q.path||"").split("/").length}),G.length>0&&e.files.push.apply(e.files,G);for(var Ge=[],We=0;We<S.data.length;We++){var it=S.data[We],ht=(it.path||"")+"/"+it.name;!q[ht]&&it.size!=null&&(Ge.push(it),q[ht]=!0)}Ge.length>0&&e.files.push.apply(e.files,Ge),e.fileSearchResults=S.data}},function(){!y&&C===V&&(C=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(F,V){if(e.repoId!=i.repoId)return re();if((i.path||"")!=e.filePath){window.matchMedia?.("(max-width: 767px)").matches&&(e.sidebarCollapsed=!0),e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(S=>S&&S.trim().length>0),W();for(let S=0;S<e.paths.length-1;S++){let q=S>0?e.paths.slice(0,S).join("/"):"";e.files.some(ie=>ie.path===q)||e.getFiles(q)}}});function k(){if(e.paths[0]!="")return;let F=["readme.md","readme.txt","readme.org","readme.1st","readme"],V={};for(let q of e.files)q.name.toLowerCase().indexOf("readme")>-1&&(V[q.name.toLowerCase()]=q.name);let S=null;for(let q of F)if(V[q]){S=q;break}if(!S&&Object.keys(V).length>0&&(S=Object.keys(V)[0]),S){let q=s.url();q[q.length-1]!="/"&&(q+="/"),s.url(q+encodePathForUrl(V[S]))}}e.fileCounts=null;let w=0,R=new Set,b=!1;e.getFiles=function(F,V=!1){let S=e.repoId,q=w;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(F)}&v=${e.options.lastUpdateDate}`).then(function(G){if(y||S!==e.repoId||q!==w)return[];let ie=F||"";return e.files=e.files.filter(K=>K.path!==ie),e.files.push(...G.data),e.loadedFolders={...e.loadedFolders,[ie]:!0},P(ie,q),G.data},function(G){if(y||S!==e.repoId||q!==w)return[];V||(e.type="error",e.content=Qr(G),e.files=[])})};function P(F,V){if(b||R.has(F))return;R.add(F);let S=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(F)}`).then(function(q){y||S!==e.repoId||V!==w||(e.fileCounts={...e.fileCounts,...q.data})},f Line truncated
`+c(s.event.errorStack),1),s.event.causeType?(a(),l(N,{key:0},[h(`
Caused by `+c(s.event.causeType)+`
`+c(s.event.causeStack||""),1)],64)):f("v-if",!0)])):f("v-if",!0),n("pre",null,c(e.recordJson(s.event)),1)],8,IE)):f("v-if",!0)],2))),128))]),e.trace?.events?.length?(a(),l("p",ME,[h(c(e.errPlural(e.trace.events.length,"record"))+" with this "+c(e.traceKind())+" ID",1),e.trace.state==="partial"?(a(),l(N,{key:0},[h(" (partial)")],64)):f("v-if",!0),t[92]||(t[92]=h(". External calls come from ",-1)),t[93]||(t[93]=n("code",null,"external_request",-1)),t[94]||(t[94]=h(" records; no URLs or tokens are stored. ",-1)),e.trace.grafanaUrl?(a(),l("a",{key:1,href:e.safeUrl(e.trace.grafanaUrl),target:"_blank",rel:"noopener noreferrer"},"Open in Grafana",8,VE)):f("v-if",!0)])):(a(),l("p",qE,[t[95]||(t[95]=n("strong",null,"Timeline not recorded.",-1)),t[96]||(t[96]=h()),e.traceKind()?e.issueData.source!=="central"?(a(),l(N,{key:1},[h("The application history keeps single records; the timeline needs central logs.")],64)):e.trace?.state==="unreachable"?(a(),l(N,{key:2},[h("Central logs did not answer. Retry later.")],64)):(a(),l(N,{key:3},[h("Central logs returned no other record for this "+c(e.traceKind())+".",1)],64)):(a(),l(N,{key:0},[h("This record has no request or job ID, so its other records cannot be found.")],64)),t[97]||(t[97]=h(" Only this record is shown.",-1))]))],64))])):f("v-if",!0),e.requestTab==="request"?(a(),l("div",LE,[n("dl",$E,[n("div",null,[t[98]||(t[98]=n("dt",null,"Method \xB7 route",-1)),n("dd",null,[e.currentOccurrence().route||e.selectedIssue.route?(a(),l("code",FE,c(e.currentOccurrence().method||e.selectedIssue.method)+" "+c(e.currentOccurrence().route||e.selectedIssue.route),1)):(a(),l("span",UE,"not recorded"))])]),n("div",null,[t[99]||(t[99]=n("dt",null,"Path",-1)),n("dd",null,[e.currentOccurrence().requestPath?(a(),l("code",BE,c(e.currentOccurrence().requestPath),1)):(a(),l("span",HE,"not recorded"))])]),t[106]||(t[106]=n("div",null,[n("dt",null,"Query"),n("dd",null,[n("span",{class:"errs-placeholder"},"excluded: query strings are never logged")])],-1)),n("div",null,[t[100]||(t[100]=n("dt",null,"Body",-1)),n("dd",null,[n("span",zE,c(["GET","HEAD"].includes(e.currentOccurrence().method||e.selectedIssue.method)?"none ("+(e.currentOccurrence().method||e.selectedIssue.method)+")":"not recorded"),1)])]),n("div",null,[t[101]||(t[101]=n("dt",null,"Viewer",-1)),n("dd",null,[e.currentOccurrence().viewer?(a(),l(N,{key:0},[h(c(e.viewerLabel(e.currentOccurrence().viewer)),1),e.currentOccurrence().viewer==="visitor"||e.currentOccurrence().viewer==="anonymous"?(a(),l("span",jE," \xB7 reviewers are never identified")):f("v-if",!0)],64)):(a(),l("span",_E,"not recorded"))])]),n("div",null,[t[102]||(t[102]=n("dt",null,"Repository",-1)),n("dd",null,[e.currentOccurrence().repoId?(a(),l("a",{key:0,class:"errs-mono",href:e.errRepoHref(e.currentOccurrence().repoId)},c(e.currentOccurrence().repoId),9,GE)):(a(),l("span",WE,"not recorded")),e.ownerOf(e.currentOccurrence().repoId)?.source?(a(),l("span",KE," \xB7 "+c(e.ownerOf(e.currentOccurrence().repoId).source),1)):f("v-if",!0)])]),n("div",null,[t[103]||(t[103]=n("dt",null,"User",-1)),n("dd",null,[e.currentOccurrence().userId?(a(),l("a",{key:0,href:e.errUserHref(e.currentOccurrence().userId)},c(e.userName(e.currentOccurrence().userId)?"@"+e.userName(e.currentOccurrence().userId):e.currentOccurrence().userId),9,YE)):(a(),l("span",XE,"not recorded"))])]),n("div",null,[t[104]||(t[104]=n("dt",null,"Service \xB7 release",-1)),n("dd",null,[h(c(e.currentOccurrence().service||e.selectedIssue.service||"unknown")+" \xB7 ",1),e.currentOccurrence().release&&e.currentOccurrence().release!=="unknown"?(a(),l("code",QE,c(e.currentOccurrence().release.slice(0,7)),1)):(a(),l("span",JE,"release not recorded"))])]),(a(),l(N,null,U(["requestId","jobId"],s=>n("div",{key:s},[n("dt",null,c(s==="requestId"?"Request ID":"Job ID"),1),n("dd",null,[e.currentOccurrence()[s]?(a(),l(N,{key:0},[n("code",ZE,c(e.currentOccurrence()[s]),1),t[105]||(t[105]=h()),n("button",{type:"button",class:"errs-link-button",onClick:i=>e.copyValue(e.currentOccurrence()[s],s==="requestId"?"Request ID":"Job ID")},"Copy",8,xE)],64)):(a(),l("span",eS,"not recorded"))])])),64))])])):f("v-if",!0),e.requestTab==="exception"?(a(),l("div",tS,[e.exceptionRecord().record?(a(),l(N,{key:0},[e.exceptionRecord().fromSample?(a(),l("p",nS,"This occurrence has no stack of its own; showing the latest occurrence's.")):f("v-if",!0),n("dl",sS,[n("div",null,[t[107]||(t[107]=n("dt",null,"Type",-1)),n("dd",null,[n("code",null,c(e.exceptionRecord().record.errorType||"not recorded"),1)])]),n("div",null,[t[108]||(t[108]=n("dt",null,"Code",-1)),n("dd",null,[e.exceptionRecord().record.errorCode?(a(),l("code",oS,c(e.exceptionRecord().record.errorCode),1)):(a(),l("span",iS,"not recorded"))])]),n("div",null,[t[109]||(t[109]=n("dt",null,"Cause",-1)),n("dd",null,[e.exceptionRecord().record.causeType?(a(),l("code",rS,c(e.exceptionRecord().record.causeType),1)):(a(),l("span",aS,"not recorded"))])])]),t[111]||(t[111]=n("h3",{class:"errs-subhead"},"Stac Line truncated
`+c(s.event.causeStack||""),1)],64)):f("v-if",!0)])):f("v-if",!0),n("pre",null,c(e.recordJson(s.event)),1)],8,HE)):f("v-if",!0)],2))),128))]),e.trace?.events?.length?(a(),l("p",jE,[h(c(e.errPlural(e.trace.events.length,"record"))+" with this "+c(e.traceKind())+" ID",1),e.trace.state==="partial"?(a(),l(N,{key:0},[h(" (partial)")],64)):f("v-if",!0),t[95]||(t[95]=h(". External calls come from ",-1)),t[96]||(t[96]=n("code",null,"external_request",-1)),t[97]||(t[97]=h(" records; no URLs or tokens are stored. ",-1)),e.trace.grafanaUrl?(a(),l("a",{key:1,href:e.safeUrl(e.trace.grafanaUrl),target:"_blank",rel:"noopener noreferrer"},"Open in Grafana",8,_E)):f("v-if",!0)])):(a(),l("p",GE,[t[98]||(t[98]=n("strong",null,"Timeline not recorded.",-1)),t[99]||(t[99]=h()),e.traceKind()?e.issueData.source!=="central"?(a(),l(N,{key:1},[h("The application history keeps single records; the timeline needs central logs.")],64)):e.trace?.state==="unreachable"?(a(),l(N,{key:2},[h("Central logs did not answer. Retry later.")],64)):(a(),l(N,{key:3},[h("Central logs returned no other record for this "+c(e.traceKind())+".",1)],64)):(a(),l(N,{key:0},[h("This record has no request or job ID, so its other records cannot be found.")],64)),t[100]||(t[100]=h(" Only this record is shown.",-1))]))],64))])):f("v-if",!0),e.requestTab==="request"?(a(),l("div",WE,[n("dl",KE,[n("div",null,[t[101]||(t[101]=n("dt",null,"Method \xB7 route",-1)),n("dd",null,[e.currentOccurrence().route||e.selectedIssue.route?(a(),l("code",YE,c(e.currentOccurrence().method||e.selectedIssue.method)+" "+c(e.currentOccurrence().route||e.selectedIssue.route),1)):(a(),l("span",XE,"not recorded"))])]),n("div",null,[t[102]||(t[102]=n("dt",null,"Path",-1)),n("dd",null,[e.currentOccurrence().requestPath?(a(),l("code",QE,c(e.currentOccurrence().requestPath),1)):(a(),l("span",JE,"not recorded"))])]),t[109]||(t[109]=n("div",null,[n("dt",null,"Query"),n("dd",null,[n("span",{class:"errs-placeholder"},"excluded: query strings are never logged")])],-1)),n("div",null,[t[103]||(t[103]=n("dt",null,"Body",-1)),n("dd",null,[n("span",ZE,c(["GET","HEAD"].includes(e.currentOccurrence().method||e.selectedIssue.method)?"none ("+(e.currentOccurrence().method||e.selectedIssue.method)+")":"not recorded"),1)])]),n("div",null,[t[104]||(t[104]=n("dt",null,"Viewer",-1)),n("dd",null,[e.currentOccurrence().viewer?(a(),l(N,{key:0},[h(c(e.viewerLabel(e.currentOccurrence().viewer)),1),e.currentOccurrence().viewer==="visitor"||e.currentOccurrence().viewer==="anonymous"?(a(),l("span",xE," \xB7 reviewers are never identified")):f("v-if",!0)],64)):(a(),l("span",eS,"not recorded"))])]),n("div",null,[t[105]||(t[105]=n("dt",null,"Repository",-1)),n("dd",null,[e.currentOccurrence().repoId?(a(),l("a",{key:0,class:"errs-mono",href:e.errRepoHref(e.currentOccurrence().repoId)},c(e.currentOccurrence().repoId),9,tS)):(a(),l("span",nS,"not recorded")),e.ownerOf(e.currentOccurrence().repoId)?.source?(a(),l("span",sS," \xB7 "+c(e.ownerOf(e.currentOccurrence().repoId).source),1)):f("v-if",!0)])]),n("div",null,[t[106]||(t[106]=n("dt",null,"User",-1)),n("dd",null,[e.currentOccurrence().userId?(a(),l("a",{key:0,href:e.errUserHref(e.currentOccurrence().userId)},c(e.userName(e.currentOccurrence().userId)?"@"+e.userName(e.currentOccurrence().userId):e.currentOccurrence().userId),9,oS)):(a(),l("span",iS,"not recorded"))])]),n("div",null,[t[107]||(t[107]=n("dt",null,"Service \xB7 release",-1)),n("dd",null,[h(c(e.currentOccurrence().service||e.selectedIssue.service||"unknown")+" \xB7 ",1),e.currentOccurrence().release&&e.currentOccurrence().release!=="unknown"?(a(),l("code",rS,c(e.currentOccurrence().release.slice(0,7)),1)):(a(),l("span",aS,"release not recorded"))])]),(a(),l(N,null,U(["requestId","jobId"],s=>n("div",{key:s},[n("dt",null,c(s==="requestId"?"Request ID":"Job ID"),1),n("dd",null,[e.currentOccurrence()[s]?(a(),l(N,{key:0},[n("code",lS,c(e.currentOccurrence()[s]),1),t[108]||(t[108]=h()),n("button",{type:"button",class:"errs-link-button",onClick:i=>e.copyValue(e.currentOccurrence()[s],s==="requestId"?"Request ID":"Job ID")},"Copy",8,dS)],64)):(a(),l("span",uS,"not recorded"))])])),64))])])):f("v-if",!0),e.requestTab==="exception"?(a(),l("div",cS,[e.exceptionRecord().record?(a(),l(N,{key:0},[e.exceptionRecord().fromSample?(a(),l("p",pS,"This occurrence has no stack of its own; showing the latest occurrence's.")):f("v-if",!0),n("dl",fS,[n("div",null,[t[110]||(t[110]=n("dt",null,"Type",-1)),n("dd",null,[n("code",null,c(e.exceptionRecord().record.errorType||"not recorded"),1)])]),n("div",null,[t[111]||(t[111]=n("dt",null,"Code",-1)),n("dd",null,[e.exceptionRecord().record.errorCode?(a(),l("code",mS,c(e.exceptionRecord().record.errorCode),1)):(a(),l("span",hS,"not recorded"))])]),n("div",null,[t[112]||(t[112]=n("dt",null,"Cause",-1)),n("dd",null,[e.exceptionRecord().record.causeType?(a(),l("code",gS,c(e.exceptionRecord().record.causeType),1)):(a(),l("span",yS,"not recorded"))])])]),t[114]||(t[114]=n("h3",{class:"errs-subhead"} Line truncated
`).length+1)),placeholder:`Jane Smith
MIT CSAIL
jane.smith@example.org`},null,10,V6),[[u,{state:e.viewState,set:d=>{e.terms=d},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[132]||(t[132]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",q6,[t[127]||(t[127]=n("summary",null,"Regex & replacement syntax",-1)),t[128]||(t[128]=h()),n("small",L6,[t[121]||(t[121]=h("Regex is supported. Replaced by ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[122]||(t[122]=h(", or use ",-1)),t[123]||(t[123]=n("code",null,"term=>replacement",-1)),t[124]||(t[124]=h(" to pick your own (e.g. ",-1)),t[125]||(t[125]=n("code",null,"Anonymous=>ABC",-1)),t[126]||(t[126]=h(").",-1))])]),(a(!0),l(N,null,U((e.termHints||[]).slice(0,3),d=>(a(),l("div",{class:"term-hint",key:d.line},[n("span",null,[t[129]||(t[129]=h("In ",-1)),n("code",null,c(d.term),1),t[130]||(t[130]=h(", ",-1)),n("code",null,c(d.symbols.join(" ")),1),h(" "+c(d.symbols.length>1?"are regex symbols":"is a regex symbol")+", so it may not match the text as written.",1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm",onClick:g=>e.matchTermAsWritten(d.line)},"Match as written",8,$6)]))),128)),(e.termHints||[]).length>3?(a(),l("div",F6,c(e.termHints.length-3)+" more "+c(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),O(n("div",U6,"Terms are in an invalid format.",512),[[te,e.anonymize?.terms?.errors?.format]])]),O(n("div",B6,[n("div",H6,[t[133]||(t[133]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",z6,c(e.preserveSummary()),1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm","aria-describedby":"preserve-files-label",disabled:!e.source?.commit,onClick:t[26]||(t[26]=d=>e.openPreserveFiles())},c((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,j6)],512),[[te,e.detectedType==="repo"]]),e.preserve?.open?(a(),l("dialog",{key:0,id:"preserve-files-dialog",class:"preserve-dialog","aria-labelledby":"preserve-files-title",onCancel:t[31]||(t[31]=de(d=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[30]||(t[30]=de(d=>e.savePreserveFiles(),["prevent"]))},[t[137]||(t[137]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[138]||(t[138]=n("p",{class:"preserve-intro"},"Checked files are shown exactly as written, for example a bibliography where redacted self-citations would reveal you. File names are still redacted.",-1)),O(n("input",{type:"search",id:"preserve-files-search",class:"form-control",placeholder:"Search files","aria-label":"Search files",autocomplete:"off","onUpdate:modelValue":t[27]||(t[27]=d=>e.preserve.search=d)},null,512),[[ft,e.preserve.search]]),n("div",_6,[e.preserve.loading?(a(),l("p",G6,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",W6,c(e.preserve.error),1)):(a(),l(N,{key:2},[(a(!0),l(N,null,U(e.preserveRows(),(d,g)=>(a(),l("div",{class:"preserve-item",key:d.kind+":"+d.path,style:De({paddingLeft:d.depth*18+6+"px"})},[d.kind==="dir"?(a(),l("button",{key:0,type:"button",class:"preserve-caret","aria-expanded":d.open?"true":"false","aria-label":(d.open?"Collapse ":"Expand ")+d.label,onClick:m=>e.togglePreserveDir(d.path)},c(d.open?"\u25BE":"\u25B8"),9,K6)):(a(),l("span",Y6)),n("input",{type:"checkbox",id:"pf-"+g,"aria-label":d.kind==="dir"?"Leave folder "+d.path+" unredacted":null,checked:d.state==="all",".indeterminate":d.state==="some",disabled:d.locked,onChange:m=>d.kind==="dir"?e.togglePreserveFolder(d.path):e.togglePreserveFile(d.path)},null,40,X6),n("label",{for:d.kind==="file"?"pf-"+g:null,class:"preserve-name",onClick:m=>d.kind==="dir"&&e.togglePreserveDir(d.path)},c(d.label),9,Q6),d.note?(a(),l("span",J6,c(d.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",Z6,c(e.preserve.search?"No file matches your search.":"No text files in this commit."),1)):f("v-if",!0)],64))]),e.preserve.truncated?(a(),l("p",x6,"This repository has too many files to list them all. Use a pattern for files you cannot find.")):f("v-if",!0),n("details",{class:"preserve-patterns",open:e.preserve.patternsOpen},[t[134]||(t[134]=n("summary",null,"Patterns",-1)),O(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib
paper/appendix/**`,"onUpdate:modelValue":t[28]||(t[28]=d=>e.preserve.patterns=d)},null,512),[[ft,e.preserve.patterns]]),t[135]||(t[135]=n("small",{class:"form-text text-muted"},[h("One per line, as in .gitignore: "),n("code",null,"*.bib"),h(" matches in any folder; "),n("code",null,"/refs.bib"),h(" and "),n("code",null,"paper/refs.bib"),h(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),h(" covers everything inside it; "),n("code",null,"!private.bib"),h(" excludes again.")],-1))],8,eM),n("div",tM,[n("span",nM,c(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",sM,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[29]||(t[29]=d=>e.closePreserveFiles())},"Cancel"),t[136]||(t[136]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):f("v-if",!0)],512),[[te,e.detectedType&&e.sourceReady()]]),O(n("section",oM,[t[159]||(t[159]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),O(n("div",null,[n("div",iM,[O(n("input",rM,null,512),[[u,{state:e.viewState,set:d=>{e.options.link=d},value:e.options?.link,form:"anonymize",options:{}}]]),t[140]||(t[140]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",aM,[O(n("input",lM,null,512),[[u,{state:e.viewState,set:d=>{e.options.image=d},value:e.options?.image,form:"anonymize",options:{}}]]),t[141]||(t[141]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",dM,[O(n("input",uM,null,512),[[u,{state:e.viewState,set:d=>{e.options.pdf=d},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[142]||(t[142]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",cM,[O(n("input",pM,null,512),[[u,{state:e.viewState,set:d=>{e.options.notebook=d},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[143]||(t[143]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",fM,[O(n("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,mM),[[u,{state:e.viewState,set:d=>{e.options.page=d},value:e.options?.page,form:"anonymize",options:{}}]]),t[144]||(t[144]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?f("v-if",!0):(a(),l("small",hM,c(e.fmt?.translate("WARNINGS.page_not_enabled_on_repo")),1)),e.details?.hasPage&&e.details?.pageSource?.branch&&e.source?.branch&&e.details.pageSource.branch!==e.source.branch?(a(),l("small",gM,c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[te,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",yM,[...t[145]||(t[145]=[h("Images and PDFs are served unchanged. Review their contents and metadata before sharing. ",-1),n("a",{href:"/faq#formats"},"Supported formats",-1)])])):f("v-if",!0),O(n("div",null,[n("div",vM,[O(n("input",bM,null,512),[[u,{state:e.viewState,set:d=>{e.options.title=d},value:e.options?.title,form:"anonymize",options:{}}]]),t[146]||(t[146]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",wM,[O(n("input",kM,null,512),[[u,{state:e.viewState,set:d=>{e.options.content=d},value:e.options?.content,form:"anonymize",options:{}}]]),t[147]||(t[147]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",CM,[O(n("input",EM,null,512),[[u,{state:e.viewState,set:d=>{e.options.comments=d},value:e.options?.comments,form:"anonymize",options:{}}]]),t[148]||(t[148]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",SM,[O(n("input",NM,null,512),[[u,{state:e.viewState,set:d=>{e.options.username=d},value:e.options?.username,form:"anonymize",options:{}}]]),t[149]||(t[149]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",RM,[O(n("input",TM,null,512),[[u,{state:e.viewState,set:d=>{e.options.date=d},value:e.options?.date,form:"anonymize",options:{}}]]),t[150]||(t[150]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",PM,[O(n("input",DM,null,512),[[u,{state:e.viewState,set:d=>{e.options.origin=d},value:e.options?.origin,form:"anonymize",options:{}}]]),t[151]||(t[151]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[te,e.detectedType==="gist"]]),O(n("div",null,[n("div",AM,[O(n("input",IM,null,512),[[u,{state:e.viewState,set:d=>{e.options.title=d},value:e.options?.title,form:"anonymize",options:{}}]]),t[152]||(t[152]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",OM,[O(n("input",MM,null,512),[[u,{state:e.viewState,set:d=>{e.options.body=d},value:e.options?.body,form:"anonymize",options:{}}]]),t[153]||(t[153]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]) Line truncated
for the rows when a reload (tab, search, filter) has none of the new rows yet `),(a(),l(N,null,U([1,2,3,4],(o,u)=>(a(),l(N,null,[e.loading||e.refreshing&&e.filteredItems?.length==0?(a(),l("div",sB,[...t[63]||(t[63]=[n("div",{class:"cell-anon",role:"cell"},[n("span",{class:"skeleton skeleton-badge"}),n("div",{class:"anon-text"},[n("span",{class:"skeleton skeleton-line",style:{width:"38%"}}),n("span",{class:"skeleton skeleton-line skeleton-line-sm",style:{width:"56%"}})])],-1),n("div",{class:"cell-status",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"60%"}})],-1),n("div",{class:"cell-views num",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"40%"}})],-1),n("div",{class:"cell-expires",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"55%"}})],-1),n("div",{class:"cell-actions",role:"cell"},null,-1)])])):f("v-if",!0)],64))),64)),(a(!0),l(N,null,U(e.filteredItems,(o,u)=>(a(),l(N,{key:o?._type+":"+(o?._id||u)},[e.loading?f("v-if",!0):(a(),l("div",{key:0,class:T(["paper-table-row",{"repo-inactive":o?._statusKey=="expired"||o?._statusKey=="removed","repo-error":o?.status=="error","row-clickable":!!o?._viewUrl}]),role:"row",onClick:p=>e.openItem(o,p)},[n("div",iB,[n("span",{class:"project-type-icon",role:"img","aria-label":o?._type==="repo"?"Repository":o?._type==="pr"?"Pull request":"Gist",title:o?._type==="repo"?"Repository":o?._type==="pr"?"Pull request":"Gist"},[(a(),l("svg",aB,[n("use",{href:"#project-type-"+o._type},null,8,lB)]))],8,rB),n("div",dB,[n("div",uB,[o?._viewUrl?(a(),l("a",{key:0,class:"repo-name",title:o._label,href:e.safeUrl(o?._viewUrl)},[(o?._label||"").indexOf("/")>0?(a(),l(N,{key:0},[n("span",pB,c(o._label.slice(0,o._label.indexOf("/")+1)),1),t[64]||(t[64]=n("wbr",null,null,-1)),n("span",fB,c(o._label.slice(o._label.indexOf("/")+1)),1)],64)):(a(),l(N,{key:1},[h(c(o?._label),1)],64))],8,cB)):f("v-if",!0),o?._viewUrl?f("v-if",!0):(a(),l("span",mB,[(o?._label||"").indexOf("/")>0?(a(),l(N,{key:0},[n("span",hB,c(o._label.slice(0,o._label.indexOf("/")+1)),1),t[65]||(t[65]=n("wbr",null,null,-1)),n("span",gB,c(o._label.slice(o._label.indexOf("/")+1)),1)],64)):(a(),l(N,{key:1},[h(c(o?._label),1)],64))])),o?.role==="coauthor"?(a(),l("span",yB,"Co-author")):f("v-if",!0)]),o?._id||o?._type==="repo"&&o?.source?.commit||o?.conference?(a(),l("div",vB,[o?._id?(a(),l("code",{key:0,class:"anonymous-id",title:o._id},[o._id.length>14?(a(),l(N,{key:0},[n("span",wB,c(o._id.slice(0,-6)),1),n("span",kB,c(o._id.slice(-6)),1)],64)):(a(),l(N,{key:1},[h(c(o._id),1)],64))],8,bB)):f("v-if",!0),o?._type==="repo"&&o?.source?.commit?(a(),l("span",{key:1,class:"commit-hash",title:o.source.commit},c(o.source.commit.substring(0,7)),9,CB)):f("v-if",!0),o?.conference?(a(),l("span",{key:2,class:"cell-conf conf-tag",title:"Conference: "+o.conference},[t[66]||(t[66]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),n("span",{class:"conf-name",textContent:c(o?.conference)},null,8,SB)],8,EB)):f("v-if",!0)])):f("v-if",!0)])]),n("div",NB,[n("div",RB,[n("div",TB,[n("span",{class:T(["status-dot","status-"+o?._statusKey]),"aria-hidden":"true"},null,2),n("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(o?.status))},null,8,PB),o?.status=="removed"?(a(),l(N,{key:0},[t[67]||(t[67]=n("span",{class:"seg-sep status-removed-sep","aria-hidden":"true"},"\xB7",-1)),n("button",{type:"button",class:"project-attention-action status-enable",onClick:de(p=>e.refreshItem(o),["stop"]),title:"Reviewers can no longer open this link"},"Enable again",8,DB)],64)):f("v-if",!0)]),o?.status=="error"&&o?.statusMessage?(a(),l("div",{key:0,class:"status-sub status-sub-error",textContent:c(e.fmt?.statusMsg(o?.statusMessage)),title:o?.statusMessage},null,8,AB)):f("v-if",!0),o?._stale?(a(),l("div",{key:1,class:"status-sub status-sub-warn",title:"Last activity "+e.fmt?.humanTime(o?.anonymizeDate||o?.lastView)},c(e.idleText(o)),9,IB)):f("v-if",!0),o.status==="error"&&o._editUrl?(a(),l("a",{key:2,class:"project-attention-action",href:e.safeUrl(o._editUrl)},"Fix source",8,OB)):f("v-if",!0),o._stale||o._broken?(a(),l("div",MB,[o._stale&&!o._broken?(a(),l("span",VB,[...t[68]||(t[68]=[h("May be stuck",-1),n("span",{"aria-hidden":"true"}," \xB7 ",-1)])])):f("v-if",!0),o._stale||o._broken?(a(),l("button",{key:1,type:"button",class:"project-attention-action",onClick:de(p=>e.showProjectDetails(o),["stop"]),"data-project-actions":o._broken?encodeURIComponent(o._type+":"+o._id):null,"aria-controls":o._broken?e.projectDetailsId(o):null,"aria-expanded":o._broken?e.selectedProject===o:null},c(o._broken?"Review details":"Check progress"),9,qB)):f("v-if",!0)])):f("v-if",!0),o?.status=="expired"?(a(),l("button",{key:4,type:"button",class:"project-attention-action",onClick:de(p=>e.extendItem(o),["stop"]),title:"Reviewers can no longer open this link"},"Extend 6 months",8,LB)):f("v-if",!0),o?.status=="removed"&&o?.anonymizeDate?(a(),l("div",$B,"anonymized Line truncated
anonymous_github`)])])])])]),f(" Limitations "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})]),h("Limitations ")]),n("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[n("h3",{class:"panel-title"},[n("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? ")])]),n("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[n("div",{class:"panel-body p-3"},[n("ul",null,[n("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),n("li",null," Files larger than 8 MB are not supported. "),n("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),n("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). ")])])])])]),f(" Privacy and security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),h("Privacy and security ")]),n("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[n("h3",{class:"panel-title"},[n("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? ")])]),n("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[n("div",{class:"panel-body p-3"},[n("p",null," Repository data is used to provide the anonymization service. If you purchase a plan, Stripe processes payment and billing information. When a repository is removed or expires, only its configuration is retained. This makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[n("h3",{class:"panel-title"},[n("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? ")])]),n("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[n("div",{class:"panel-body p-3"},[n("p",null,[h("The GitHub App has read-only access to the repositories you choose. You can change repository access on your "),n("a",{href:"/connections"},"GitHub connections"),h(" page.")]),n("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."),n("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[n("h3",{class:"panel-title"},[n("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? ")])]),n("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[n("div",{class:"panel-body p-3"},[n("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. ")])])])]),f(" Self-hosting "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-storage"})]),h("Self"),n("span",{class:"serif-hy"},"-"),h("hosting ")]),n("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[n("h3",{class:"panel-title"},[n("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? ")])]),n("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[n("div",{cla Line truncated
jane.smith@example.org`},null,10,_6),[[u,{state:e.viewState,set:d=>{e.terms=d},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[132]||(t[132]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",G6,[t[127]||(t[127]=n("summary",null,"Regex & replacement syntax",-1)),t[128]||(t[128]=h()),n("small",W6,[t[121]||(t[121]=h("Regex is supported. Replaced by ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[122]||(t[122]=h(", or use ",-1)),t[123]||(t[123]=n("code",null,"term=>replacement",-1)),t[124]||(t[124]=h(" to pick your own (e.g. ",-1)),t[125]||(t[125]=n("code",null,"Anonymous=>ABC",-1)),t[126]||(t[126]=h(").",-1))])]),(a(!0),l(N,null,U((e.termHints||[]).slice(0,3),d=>(a(),l("div",{class:"term-hint",key:d.line},[n("span",null,[t[129]||(t[129]=h("In ",-1)),n("code",null,c(d.term),1),t[130]||(t[130]=h(", ",-1)),n("code",null,c(d.symbols.join(" ")),1),h(" "+c(d.symbols.length>1?"are regex symbols":"is a regex symbol")+", so it may not match the text as written.",1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm",onClick:g=>e.matchTermAsWritten(d.line)},"Match as written",8,K6)]))),128)),(e.termHints||[]).length>3?(a(),l("div",Y6,c(e.termHints.length-3)+" more "+c(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),O(n("div",X6,"Terms are in an invalid format.",512),[[te,e.anonymize?.terms?.errors?.format]])]),O(n("div",Q6,[n("div",J6,[t[133]||(t[133]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",Z6,c(e.preserveSummary()),1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm","aria-describedby":"preserve-files-label",disabled:!e.source?.commit,onClick:t[26]||(t[26]=d=>e.openPreserveFiles())},c((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,x6)],512),[[te,e.detectedType==="repo"]]),e.preserve?.open?(a(),l("dialog",{key:0,id:"preserve-files-dialog",class:"preserve-dialog","aria-labelledby":"preserve-files-title",onCancel:t[31]||(t[31]=de(d=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[30]||(t[30]=de(d=>e.savePreserveFiles(),["prevent"]))},[t[137]||(t[137]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[138]||(t[138]=n("p",{class:"preserve-intro"},"Checked files are shown exactly as written, for example a bibliography where redacted self-citations would reveal you. File names are still redacted.",-1)),O(n("input",{type:"search",id:"preserve-files-search",class:"form-control",placeholder:"Search files","aria-label":"Search files",autocomplete:"off","onUpdate:modelValue":t[27]||(t[27]=d=>e.preserve.search=d)},null,512),[[ft,e.preserve.search]]),n("div",eM,[e.preserve.loading?(a(),l("p",tM,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",nM,c(e.preserve.error),1)):(a(),l(N,{key:2},[(a(!0),l(N,null,U(e.preserveRows(),(d,g)=>(a(),l("div",{class:"preserve-item",key:d.kind+":"+d.path,style:De({paddingLeft:d.depth*18+6+"px"})},[d.kind==="dir"?(a(),l("button",{key:0,type:"button",class:"preserve-caret","aria-expanded":d.open?"true":"false","aria-label":(d.open?"Collapse ":"Expand ")+d.label,onClick:m=>e.togglePreserveDir(d.path)},c(d.open?"\u25BE":"\u25B8"),9,sM)):(a(),l("span",oM)),n("input",{type:"checkbox",id:"pf-"+g,"aria-label":d.kind==="dir"?"Leave folder "+d.path+" unredacted":null,checked:d.state==="all",".indeterminate":d.state==="some",disabled:d.locked,onChange:m=>d.kind==="dir"?e.togglePreserveFolder(d.path):e.togglePreserveFile(d.path)},null,40,iM),n("label",{for:d.kind==="file"?"pf-"+g:null,class:"preserve-name",onClick:m=>d.kind==="dir"&&e.togglePreserveDir(d.path)},c(d.label),9,rM),d.note?(a(),l("span",aM,c(d.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",lM,c(e.preserve.search?"No file matches your search.":"No text files in this commit."),1)):f("v-if",!0)],64))]),e.preserve.truncated?(a(),l("p",dM,"This repository has too many files to list them all. Use a pattern for files you cannot find.")):f("v-if",!0),n("details",{class:"preserve-patterns",open:e.preserve.patternsOpen},[t[134]||(t[134]=n("summary",null,"Patterns",-1)),O(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib
paper/appendix/**`,"onUpdate:modelValue":t[28]||(t[28]=d=>e.preserve.patterns=d)},null,512),[[ft,e.preserve.patterns]]),t[135]||(t[135]=n("small",{class:"form-text text-muted"},[h("One per line, as in .gitignore: "),n("code",null,"*.bib"),h(" matches in any folder; "),n("code",null,"/refs.bib"),h(" and "),n("code",null,"paper/refs.bib"),h(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),h(" covers everything inside it; "),n("code",null,"!private.bib"),h(" excludes again.")],-1))],8,uM),n("div",cM,[n("span",pM,c(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",fM,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[29]||(t[29]=d=>e.closePreserveFiles())},"Cancel"),t[136]||(t[136]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):f("v-if",!0)],512),[[te,e.detectedType&&e.sourceReady()]]),O(n("section",mM,[t[159]||(t[159]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),O(n("div",null,[n("div",hM,[O(n("input",gM,null,512),[[u,{state:e.viewState,set:d=>{e.options.link=d},value:e.options?.link,form:"anonymize",options:{}}]]),t[140]||(t[140]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",yM,[O(n("input",vM,null,512),[[u,{state:e.viewState,set:d=>{e.options.image=d},value:e.options?.image,form:"anonymize",options:{}}]]),t[141]||(t[141]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",bM,[O(n("input",wM,null,512),[[u,{state:e.viewState,set:d=>{e.options.pdf=d},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[142]||(t[142]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",kM,[O(n("input",CM,null,512),[[u,{state:e.viewState,set:d=>{e.options.notebook=d},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[143]||(t[143]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",EM,[O(n("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,SM),[[u,{state:e.viewState,set:d=>{e.options.page=d},value:e.options?.page,form:"anonymize",options:{}}]]),t[144]||(t[144]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?f("v-if",!0):(a(),l("small",NM,c(e.fmt?.translate("WARNINGS.page_not_enabled_on_repo")),1)),e.details?.hasPage&&e.details?.pageSource?.branch&&e.source?.branch&&e.details.pageSource.branch!==e.source.branch?(a(),l("small",RM,c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[te,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",TM,[...t[145]||(t[145]=[h("Images and PDFs are served unchanged. Review their contents and metadata before sharing. ",-1),n("a",{href:"/faq#formats"},"Supported formats",-1)])])):f("v-if",!0),O(n("div",null,[n("div",PM,[O(n("input",DM,null,512),[[u,{state:e.viewState,set:d=>{e.options.title=d},value:e.options?.title,form:"anonymize",options:{}}]]),t[146]||(t[146]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",AM,[O(n("input",IM,null,512),[[u,{state:e.viewState,set:d=>{e.options.content=d},value:e.options?.content,form:"anonymize",options:{}}]]),t[147]||(t[147]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",OM,[O(n("input",MM,null,512),[[u,{state:e.viewState,set:d=>{e.options.comments=d},value:e.options?.comments,form:"anonymize",options:{}}]]),t[148]||(t[148]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",VM,[O(n("input",qM,null,512),[[u,{state:e.viewState,set:d=>{e.options.username=d},value:e.options?.username,form:"anonymize",options:{}}]]),t[149]||(t[149]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",LM,[O(n("input",$M,null,512),[[u,{state:e.viewState,set:d=>{e.options.date=d},value:e.options?.date,form:"anonymize",options:{}}]]),t[150]||(t[150]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",FM,[O(n("input",UM,null,512),[[u,{state:e.viewState,set:d=>{e.options.origin=d},value:e.options?.origin,form:"anonymize",options:{}}]]),t[151]||(t[151]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[te,e.detectedType==="gist"]]),O(n("div",null,[n("div",BM,[O(n("input",HM,null,512),[[u,{state:e.viewState,set:d=>{e.options.title=d},value:e.options?.title,form:"anonymize",options:{}}]]),t[152]||(t[152]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",zM,[O(n("input",jM,null,512),[[u,{state:e.viewState,set:d=>{e.options.body=d},value:e.options?.body,form:"anonymize",options:{}}]]),t[153]||(t[153]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]) Line truncated
for the rows when a reload (tab, search, filter) has none of the new rows yet `),(a(),l(N,null,U([1,2,3,4],(o,u)=>(a(),l(N,null,[e.loading||e.refreshing&&e.filteredItems?.length==0?(a(),l("div",fB,[...t[63]||(t[63]=[n("div",{class:"cell-anon",role:"cell"},[n("span",{class:"skeleton skeleton-badge"}),n("div",{class:"anon-text"},[n("span",{class:"skeleton skeleton-line",style:{width:"38%"}}),n("span",{class:"skeleton skeleton-line skeleton-line-sm",style:{width:"56%"}})])],-1),n("div",{class:"cell-status",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"60%"}})],-1),n("div",{class:"cell-views num",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"40%"}})],-1),n("div",{class:"cell-expires",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"55%"}})],-1),n("div",{class:"cell-actions",role:"cell"},null,-1)])])):f("v-if",!0)],64))),64)),(a(!0),l(N,null,U(e.filteredItems,(o,u)=>(a(),l(N,{key:o?._type+":"+(o?._id||u)},[e.loading?f("v-if",!0):(a(),l("div",{key:0,class:T(["paper-table-row",{"repo-inactive":o?._statusKey=="expired"||o?._statusKey=="removed","repo-error":o?.status=="error","row-clickable":!!o?._viewUrl}]),role:"row",onClick:p=>e.openItem(o,p)},[n("div",hB,[n("span",{class:"project-type-icon",role:"img","aria-label":o?._type==="repo"?"Repository":o?._type==="pr"?"Pull request":"Gist",title:o?._type==="repo"?"Repository":o?._type==="pr"?"Pull request":"Gist"},[(a(),l("svg",yB,[n("use",{href:"#project-type-"+o._type},null,8,vB)]))],8,gB),n("div",bB,[n("div",wB,[o?._viewUrl?(a(),l("a",{key:0,class:"repo-name",title:o._label,href:e.safeUrl(o?._viewUrl)},[(o?._label||"").indexOf("/")>0?(a(),l(N,{key:0},[n("span",CB,c(o._label.slice(0,o._label.indexOf("/")+1)),1),t[64]||(t[64]=n("wbr",null,null,-1)),n("span",EB,c(o._label.slice(o._label.indexOf("/")+1)),1)],64)):(a(),l(N,{key:1},[h(c(o?._label),1)],64))],8,kB)):f("v-if",!0),o?._viewUrl?f("v-if",!0):(a(),l("span",SB,[(o?._label||"").indexOf("/")>0?(a(),l(N,{key:0},[n("span",NB,c(o._label.slice(0,o._label.indexOf("/")+1)),1),t[65]||(t[65]=n("wbr",null,null,-1)),n("span",RB,c(o._label.slice(o._label.indexOf("/")+1)),1)],64)):(a(),l(N,{key:1},[h(c(o?._label),1)],64))])),o?.role==="coauthor"?(a(),l("span",TB,"Co-author")):f("v-if",!0)]),o?._id||o?._type==="repo"&&o?.source?.commit||o?.conference?(a(),l("div",PB,[o?._id?(a(),l("code",{key:0,class:"anonymous-id",title:o._id},[o._id.length>14?(a(),l(N,{key:0},[n("span",AB,c(o._id.slice(0,-6)),1),n("span",IB,c(o._id.slice(-6)),1)],64)):(a(),l(N,{key:1},[h(c(o._id),1)],64))],8,DB)):f("v-if",!0),o?._type==="repo"&&o?.source?.commit?(a(),l("span",{key:1,class:"commit-hash",title:o.source.commit},c(o.source.commit.substring(0,7)),9,OB)):f("v-if",!0),o?.conference?(a(),l("span",{key:2,class:"cell-conf conf-tag",title:"Conference: "+o.conference},[t[66]||(t[66]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),n("span",{class:"conf-name",textContent:c(o?.conference)},null,8,VB)],8,MB)):f("v-if",!0)])):f("v-if",!0)])]),n("div",qB,[n("div",LB,[n("div",$B,[n("span",{class:T(["status-dot","status-"+o?._statusKey]),"aria-hidden":"true"},null,2),n("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(o?.status))},null,8,FB),o?.status=="removed"?(a(),l(N,{key:0},[t[67]||(t[67]=n("span",{class:"seg-sep status-removed-sep","aria-hidden":"true"},"\xB7",-1)),n("button",{type:"button",class:"project-attention-action status-enable",onClick:de(p=>e.refreshItem(o),["stop"]),title:"Reviewers can no longer open this link"},"Enable again",8,UB)],64)):f("v-if",!0)]),o?.status=="error"&&o?.statusMessage?(a(),l("div",{key:0,class:"status-sub status-sub-error",textContent:c(e.fmt?.statusMsg(o?.statusMessage)),title:o?.statusMessage},null,8,BB)):f("v-if",!0),o?._stale?(a(),l("div",{key:1,class:"status-sub status-sub-warn",title:"Last activity "+e.fmt?.humanTime(o?.anonymizeDate||o?.lastView)},c(e.idleText(o)),9,HB)):f("v-if",!0),o.status==="error"&&o._editUrl?(a(),l("a",{key:2,class:"project-attention-action",href:e.safeUrl(o._editUrl)},"Fix source",8,zB)):f("v-if",!0),o._stale||o._broken?(a(),l("div",jB,[o._stale&&!o._broken?(a(),l("span",_B,[...t[68]||(t[68]=[h("May be stuck",-1),n("span",{"aria-hidden":"true"}," \xB7 ",-1)])])):f("v-if",!0),o._stale||o._broken?(a(),l("button",{key:1,type:"button",class:"project-attention-action",onClick:de(p=>e.showProjectDetails(o),["stop"]),"data-project-actions":o._broken?encodeURIComponent(o._type+":"+o._id):null,"aria-controls":o._broken?e.projectDetailsId(o):null,"aria-expanded":o._broken?e.selectedProject===o:null},c(o._broken?"Review details":"Check progress"),9,GB)):f("v-if",!0)])):f("v-if",!0),o?.status=="expired"?(a(),l("button",{key:4,type:"button",class:"project-attention-action",onClick:de(p=>e.extendItem(o),["stop"]),title:"Reviewers can no longer open this link"},"Extend 6 months",8,WB)):f("v-if",!0),o?.status=="removed"&&o?.anonymizeDate?(a(),l("div",KB,"anonymized Line truncated
anonymous_github`)])])])])]),f(" Limitations "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})]),h("Limitations ")]),n("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[n("h3",{class:"panel-title"},[n("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? ")])]),n("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[n("div",{class:"panel-body p-3"},[n("ul",null,[n("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),n("li",null," Files larger than 8 MB are not supported. "),n("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),n("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). ")])])])])]),f(" Privacy and security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),h("Privacy and security ")]),n("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[n("h3",{class:"panel-title"},[n("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? ")])]),n("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[n("div",{class:"panel-body p-3"},[n("p",null," Repository data is used to provide the anonymization service. If you purchase a plan, Stripe processes payment and billing information. When a repository is removed or expires, only its configuration is retained. This makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[n("h3",{class:"panel-title"},[n("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? ")])]),n("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[n("div",{class:"panel-body p-3"},[n("p",null,[h("The GitHub App has read-only access to the repositories you choose. You can change repository access on your "),n("a",{href:"/connections"},"GitHub connections"),h(" page.")]),n("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."),n("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[n("h3",{class:"panel-title"},[n("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? ")])]),n("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[n("div",{class:"panel-body p-3"},[n("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. ")])])])]),f(" Self-hosting "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-storage"})]),h("Self"),n("span",{class:"serif-hy"},"-"),h("hosting ")]),n("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[n("h3",{class:"panel-title"},[n("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? ")])]),n("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[n("div",{cla Line truncated
anonymized repository often think it is about the paper, so the
label names the service and the tooltip says who to contact. `),n("li",{class:T(["nav-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[19]||(t[19]=[n("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"},[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),h("Report a bug ")],-1)])],2),n("li",{class:T(["nav-item nav-support-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[20]||(t[20]=[n("a",{class:"nav-link nav-support-inline",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Donate on Ko-fi to help cover hosting costs"},[n("svg",{class:"ui-icon nav-heart","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})]),h("Support ")],-1)])],2),e.isDarkMode?f("v-if",!0):(a(),l("li",q_,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to dark mode","aria-label":"Switch to dark mode",onClick:t[1]||(t[1]=s=>{e.darkMode(!0)})},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(a(),l("li",L_,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to light mode","aria-label":"Switch to light mode",onClick:t[2]||(t[2]=s=>{e.darkMode(!1)})},[...t[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):f("v-if",!0),!e.user&&!e.isReviewerRoute?(a(),l("li",$_,[...t[23]||(t[23]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),h(" Sign in ")],-1)])])):f("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(a(),l("li",F_,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=de(s=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(a(),l("li",U_,[n("a",B_,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,H_)):f("v-if",!0),n("span",z_,c(e.user?.username),1)]),n("div",j_,[n("h6",__,"Signed in as @"+c(e.user?.username),1),t[25]||(t[25]=Pe('<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 um-extra" 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>',6)),e.headerShowSupport?(a(),l("a",G_,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",null,"Support the project",-1)])])):f("v-if",!0),t[26]||(t[26]=n("div",{class:"dropdown-divider"},null,-1)),t[27]||(t[27]=n("a",{class:"dropdown-item",href:"/api/user/logout",target:"_self"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-logout"})]),n("span",null,"Sign out")],-1))])])):f("v-if",!0)])])],2),e.generalMessage?(a(),l("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,W_)):f("v-if",!0),e.emailPromptOpen?(a(),l("dialog",{key:1,id:"email-prompt",class:"email-prompt","aria-labelledby":"email-prompt-title","aria-describedby":"email-prompt-reason",onCancel:t[8]||(t[8]=de(s=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=de(s=>e.respondToEmailPrompt("save"),["prevent"]))},[t[30]||(t[30]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[31]||(t[31]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[32]||(t[32]=n("label",{for:"email-prompt-address"},"Email address",-1)),O(n("input",{id:"email-prompt-address",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[4]||(t[4]=s=>e.emailPromptAddress=s),disabled:e.emailPromptBusy},null,8,K_),[[ft,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p Line truncated
python experiments/run.py`),n("p",null,[h("Contact: "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 3"},[n("i",null,"3")])])])])])])],-1))]),f(" Live stats "),n("section",{class:T(["paper-stats paper-wrap",{"is-empty":e.statsEmpty()}]),id:"metrics","aria-label":"Usage over the last 60 days"},[n("div",iG,[e.statsEmpty()?f("v-if",!0):(a(),l("div",rG,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),h(),n("span",null,[h("Live \xB7 last 60 days"),n("span",{class:"paper-stats-daily"}," \xB7 updated daily")],-1)])])),t[12]||(t[12]=n("div",{class:"paper-stats-meta-right"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),e.statsEmpty()?f("v-if",!0):(a(),l("div",aG,[(a(!0),l(N,null,U(e.cards,(i,r)=>(a(),l("div",{class:"paper-stat-card",key:i?.key},[n("div",{class:T(["paper-stat-value",{"is-pending":!e.stat}])},c(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",lG,c(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",dG," +"+c(e.fmt?.number(e.history[i?.key].deltaToday))+" today ",1)):f("v-if",!0)]))),128))]))],2),f(" Before / after "),t[22]||(t[22]=n("section",{class:"paper-section-head paper-wrap"},[n("div",null,[n("div",{class:"paper-eyebrow"},"Try it"),n("h2",null,[h("The same repository, "),n("em",null,"minus you.")])]),n("p",null," Names, affiliations, emails, and any term you list are replaced across the README, source files, notebooks, and PDF links. Reviewers browse the real thing, not a zip. ")],-1)),n("div",uG,[n("div",cG,[t[13]||(t[13]=n("label",{for:"demo-terms"},[h("Terms to redact "),n("span",null,[h("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),O(n("textarea",{id:"demo-terms",class:"demo-terms-input",rows:"1","onUpdate:modelValue":t[0]||(t[0]=i=>e.demoTerms=i),spellcheck:"false",autocomplete:"off",onKeydown:t[1]||(t[1]=Rt(de(()=>{},["prevent"]),["enter"]))},null,544),[[ft,e.demoTerms]])]),n("div",pG,[n("div",fG,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[h("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",mG,[n("div",hG,[(a(!0),l(N,null,U(e.demoParts(),(i,r)=>(a(),l(N,{key:r},[i.redacted?(a(),l("mark",gG,c(i.original),1)):(a(),l(N,{key:1},[h(c(i.text),1)],64))],64))),128)),t[14]||(t[14]=h("\u200B",-1))]),O(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[2]||(t[2]=i=>e.demoText=i),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[ft,e.demoText]])])]),n("div",yG,[n("div",vG,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",bG,[n("span",wG,c(e.demoCount())+" redacted",1)])]),n("div",kG,[(a(!0),l(N,null,U(e.demoParts(),(i,r)=>(a(),l(N,{key:r},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},c(i.text),9,CG)):(a(),l(N,{key:1},[h(c(i.text),1)],64))],64))),128))])])])]),f(" What you get: one screenshot, three tabs "),t[23]||(t[23]=n("section",{class:"paper-section-head paper-wrap",id:"about"},[n("div",null,[n("div",{class:"paper-eyebrow"},"What you get"),n("h2",null,"Anonymize, review, manage.")]),n("p",null," Terms are redacted in text files. Enabled images and PDFs are served unchanged, so review them for identifying content before sharing. Monitor your mirror, update it, or remove it when the review is over. ")],-1)),n("section",EG,[n("div",SG,[(a(!0),l(N,null,U(e.features,(i,r)=>(a(),l("div",{class:T(["paper-feature",{"is-on":e.feature===i?.key}]),key:i?.key},[n("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:o=>e.selectFeature(i.key),onKeydown:o=>e.featureKeydown(o,r),id:"feature-tab-"+i?.key,"aria-controls":"feature-panel-"+i?.key,"aria-selected":e.feature===i?.key,tabindex:e.feature===i?.key?0:-1},[n("span",RG,[n("span",TG,c(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",PG,c(i?.eyebrow),1)]),n("span",DG,[h(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",AG,"-")):f("v-if",!0),h(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)])],40,NG),n("div",IG,[n("span",OG,[h(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",MG,"-")):f("v-if",!0),h(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)]),n("p",null,c(i?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(i)),target:e.featureTarget(i)},c(i?.cta)+" \u2192",9,VG)])],2))),128))]),n("div",qG,[(a(!0),l(N,null,U(e.features,(i,r)=>O((a(),l("div",{class:"paper-feature-panel",role:"tabpanel",key:i?.key,id:"feature-panel-"+i?.key,"aria-labelledby":"feature-tab-"+i?.key},[n("div",$G,[n("div",FG,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",UG,c(i?.url),1)]),n("div",{class:T(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(a(),l("div",HG,[...t[19]||(t[19]=[Pe('<div class="fm-label">GitHub reposit Line truncated
label names the service and the tooltip says who to contact. `),n("li",{class:T(["nav-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[19]||(t[19]=[n("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"},[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),h("Report a bug ")],-1)])],2),n("li",{class:T(["nav-item nav-support-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[20]||(t[20]=[n("a",{class:"nav-link nav-support-inline",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Donate on Ko-fi to help cover hosting costs"},[n("svg",{class:"ui-icon nav-heart","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})]),h("Support ")],-1)])],2),e.isDarkMode?f("v-if",!0):(a(),l("li",G_,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to dark mode","aria-label":"Switch to dark mode",onClick:t[1]||(t[1]=s=>{e.darkMode(!0)})},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(a(),l("li",W_,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to light mode","aria-label":"Switch to light mode",onClick:t[2]||(t[2]=s=>{e.darkMode(!1)})},[...t[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):f("v-if",!0),!e.user&&!e.isReviewerRoute?(a(),l("li",K_,[...t[23]||(t[23]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),h(" Sign in ")],-1)])])):f("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(a(),l("li",Y_,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=de(s=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(a(),l("li",X_,[n("a",Q_,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,J_)):f("v-if",!0),n("span",Z_,c(e.user?.username),1)]),n("div",x_,[n("h6",eG,"Signed in as @"+c(e.user?.username),1),t[25]||(t[25]=Pe('<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 um-extra" 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>',6)),e.headerShowSupport?(a(),l("a",tG,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",null,"Support the project",-1)])])):f("v-if",!0),t[26]||(t[26]=n("div",{class:"dropdown-divider"},null,-1)),t[27]||(t[27]=n("a",{class:"dropdown-item",href:"/api/user/logout",target:"_self"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-logout"})]),n("span",null,"Sign out")],-1))])])):f("v-if",!0)])])],2),e.generalMessage?(a(),l("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,nG)):f("v-if",!0),e.emailPromptOpen?(a(),l("dialog",{key:1,id:"email-prompt",class:"email-prompt","aria-labelledby":"email-prompt-title","aria-describedby":"email-prompt-reason",onCancel:t[8]||(t[8]=de(s=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=de(s=>e.respondToEmailPrompt("save"),["prevent"]))},[t[30]||(t[30]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[31]||(t[31]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[32]||(t[32]=n("label",{for:"email-prompt-address"},"Email address",-1)),O(n("input",{id:"email-prompt-address",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[4]||(t[4]=s=>e.emailPromptAddress=s),disabled:e.emailPromptBusy},null,8,sG),[[ft,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p Line truncated
python experiments/run.py`),n("p",null,[h("Contact: "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 3"},[n("i",null,"3")])])])])])])],-1))]),f(" Live stats "),n("section",{class:T(["paper-stats paper-wrap",{"is-empty":e.statsEmpty()}]),id:"metrics","aria-label":"Usage over the last 60 days"},[n("div",hG,[e.statsEmpty()?f("v-if",!0):(a(),l("div",gG,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),h(),n("span",null,[h("Live \xB7 last 60 days"),n("span",{class:"paper-stats-daily"}," \xB7 updated daily")],-1)])])),t[12]||(t[12]=n("div",{class:"paper-stats-meta-right"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),e.statsEmpty()?f("v-if",!0):(a(),l("div",yG,[(a(!0),l(N,null,U(e.cards,(i,r)=>(a(),l("div",{class:"paper-stat-card",key:i?.key},[n("div",{class:T(["paper-stat-value",{"is-pending":!e.stat}])},c(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",vG,c(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",bG," +"+c(e.fmt?.number(e.history[i?.key].deltaToday))+" today ",1)):f("v-if",!0)]))),128))]))],2),f(" Before / after "),t[22]||(t[22]=n("section",{class:"paper-section-head paper-wrap"},[n("div",null,[n("div",{class:"paper-eyebrow"},"Try it"),n("h2",null,[h("The same repository, "),n("em",null,"minus you.")])]),n("p",null," Names, affiliations, emails, and any term you list are replaced across the README, source files, notebooks, and PDF links. Reviewers browse the real thing, not a zip. ")],-1)),n("div",wG,[n("div",kG,[t[13]||(t[13]=n("label",{for:"demo-terms"},[h("Terms to redact "),n("span",null,[h("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),O(n("textarea",{id:"demo-terms",class:"demo-terms-input",rows:"1","onUpdate:modelValue":t[0]||(t[0]=i=>e.demoTerms=i),spellcheck:"false",autocomplete:"off",onKeydown:t[1]||(t[1]=Rt(de(()=>{},["prevent"]),["enter"]))},null,544),[[ft,e.demoTerms]])]),n("div",CG,[n("div",EG,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[h("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",SG,[n("div",NG,[(a(!0),l(N,null,U(e.demoParts(),(i,r)=>(a(),l(N,{key:r},[i.redacted?(a(),l("mark",RG,c(i.original),1)):(a(),l(N,{key:1},[h(c(i.text),1)],64))],64))),128)),t[14]||(t[14]=h("\u200B",-1))]),O(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[2]||(t[2]=i=>e.demoText=i),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[ft,e.demoText]])])]),n("div",TG,[n("div",PG,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",DG,[n("span",AG,c(e.demoCount())+" redacted",1)])]),n("div",IG,[(a(!0),l(N,null,U(e.demoParts(),(i,r)=>(a(),l(N,{key:r},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},c(i.text),9,OG)):(a(),l(N,{key:1},[h(c(i.text),1)],64))],64))),128))])])])]),f(" What you get: one screenshot, three tabs "),t[23]||(t[23]=n("section",{class:"paper-section-head paper-wrap",id:"about"},[n("div",null,[n("div",{class:"paper-eyebrow"},"What you get"),n("h2",null,"Anonymize, review, manage.")]),n("p",null," Terms are redacted in text files. Enabled images and PDFs are served unchanged, so review them for identifying content before sharing. Monitor your mirror, update it, or remove it when the review is over. ")],-1)),n("section",MG,[n("div",VG,[(a(!0),l(N,null,U(e.features,(i,r)=>(a(),l("div",{class:T(["paper-feature",{"is-on":e.feature===i?.key}]),key:i?.key},[n("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:o=>e.selectFeature(i.key),onKeydown:o=>e.featureKeydown(o,r),id:"feature-tab-"+i?.key,"aria-controls":"feature-panel-"+i?.key,"aria-selected":e.feature===i?.key,tabindex:e.feature===i?.key?0:-1},[n("span",LG,[n("span",$G,c(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",FG,c(i?.eyebrow),1)]),n("span",UG,[h(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",BG,"-")):f("v-if",!0),h(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)])],40,qG),n("div",HG,[n("span",zG,[h(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",jG,"-")):f("v-if",!0),h(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)]),n("p",null,c(i?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(i)),target:e.featureTarget(i)},c(i?.cta)+" \u2192",9,_G)])],2))),128))]),n("div",GG,[(a(!0),l(N,null,U(e.features,(i,r)=>O((a(),l("div",{class:"paper-feature-panel",role:"tabpanel",key:i?.key,id:"feature-panel-"+i?.key,"aria-labelledby":"feature-tab-"+i?.key},[n("div",KG,[n("div",YG,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",XG,c(i?.url),1)]),n("div",{class:T(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(a(),l("div",JG,[...t[19]||(t[19]=[Pe('<div class="fm-label">GitHub reposit Line truncated
<span class="ln">2</span><span class="c"># Author: <span class="redact">XXXX-1</span>, <span class="redact">XXXX-2</span></span>
<span class="ln">3</span><span class="k">import</span> torch
<span class="ln">4</span><span class="k">from</span> utils <span class="k">import</span> load_config
@@ -64,18 +64,18 @@ python experiments/run.py`),n("p",null,[h("Contact: "),n("span",{class:"redact",
<span class="ln">7</span> model = build_model(config)
<span class="ln">8</span> <span class="k">for</span> epoch <span class="k">in</span> range(config.epochs):
<span class="ln">9</span> loss = step(model)
<span class="ln">10</span> log(<span class="s">&quot;epoch %d: %.3f&quot;</span>, epoch, loss)</pre></div>`,2)])])):(a(),l("div",jG,[...t[21]||(t[21]=[Pe('<div class="fm-dash-head"><span>Project</span><span>Status</span><span>Views</span><span>Expires</span></div><div class="fm-dash-row"><span><b>DeepLearnUtils</b><i>paper-7f2a \xB7 ICSE 2027</i></span><span class="st is-ready">Ready</span><span>41</span><span>Mar 31, 2027</span></div><div class="fm-dash-row"><span><b>vision-bench#212</b><i>pull request \xB7 FSE 2027</i></span><span class="st is-ready">Ready</span><span>12</span><span>Never</span></div><div class="fm-dash-row"><span><b>graph-repair</b><i>gr-91ab</i></span><span class="st is-progress">Updating</span><span>5</span><span>Jan 5, 2027</span></div><div class="fm-dash-row is-muted"><span><b>JarSift</b><i>OOPSLA 2025</i></span><span class="st is-expired">Expired</span><span>72</span><span>Sep 28, 2026</span></div>',5)])]))],10,BG)])],8,LG)),[[te,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Pe('<section class="paper-qa paper-qa-r3 paper-wrap" aria-labelledby="qa-heading"><div class="qa-head"><div><div class="paper-eyebrow">Before you sign in</div><h2 id="qa-heading">The questions that come up most.</h2></div><a class="paper-link-arrow" href="/faq">Read the full FAQ \u2192</a></div><div class="qa-grid"><div class="q"><a href="/faq#permissions">What access does GitHub sign-in require?</a><p> The GitHub App has read-only access to gists and the repositories you choose. Legacy OAuth uses broader permissions. Anonymous GitHub never writes to your repositories. </p></div><div class="q"><a href="/faq#formats">Which file formats are supported?</a><p> Source code with syntax highlighting, Markdown, Jupyter notebooks, PDFs, images, and GitHub Pages sites. Text files are anonymized; enabled images and PDFs are served unchanged. </p></div><div class="q"><a href="/faq#expiration">What happens when an anonymized repository expires?</a><p> You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over. </p></div></div></section><section class="paper-cta paper-wrap" aria-labelledby="cta-heading"><div><h2 id="cta-heading">Ready for review?</h2><p>Create an anonymous mirror in a couple of minutes. Reviewers just open the link.</p></div><div class="paper-cta-actions"><a class="btn-hero" href="/signin" target="_self"><i class="fab fa-github" aria-hidden="true"></i> Sign in with GitHub</a><a class="paper-link-arrow" target="_self" href="https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/">See an anonymized repository \u2192</a></div></section>',2)),$e(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var _G={class:"paper-empty"},GG={class:"paper-empty-inner"},WG={key:0,class:"paper-eyebrow"},KG={key:1,class:"paper-eyebrow"},YG={key:2,class:"paper-empty-title"},XG=["textContent"];function Xf(e,t){return a(),l("div",_G,[n("div",GG,[e.error?f("v-if",!0):(a(),l("div",WG,"Working")),e.error?(a(),l("div",KG,"Error")):f("v-if",!0),e.error?f("v-if",!0):(a(),l("h1",YG,[...t[0]||(t[0]=[h(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(a(),l("h1",{key:3,class:"paper-empty-title",textContent:c(e.fmt.translate(e.error))},null,8,XG)):f("v-if",!0)])])}var QG={class:"container paper-page paper-settings"},JG={class:"paper-crumbs"},ZG={class:"here"},xG={class:"paper-page-title"},eW={class:"paper-settings-body"},tW={class:"paper-settings-toc"},nW={href:"#conf-billing"},sW={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},oW={id:"conf-basics",class:"paper-settings-section"},iW={class:"form-group"},rW={class:"invalid-feedback"},aW={class:"invalid-feedback"},lW={class:"form-group"},dW={class:"invalid-feedback"},uW={class:"form-group"},cW={class:"invalid-feedback"},pW={class:"invalid-feedback"},fW={id:"conf-window",class:"paper-settings-section"},mW={class:"form-grid-2"},hW={class:"form-group"},gW={class:"invalid-feedback"},yW={class:"invalid-feedback"},vW={class:"form-group"},bW={class:"invalid-feedback"},wW={class:"invalid-feedback"},kW={id:"conf-rendering",class:"paper-settings-section"},CW={class:"form-check"},EW={class:"form-check-input",type:"checkbox",id:"link",name:"link"},SW={class:"form-check"},NW={class:"form-check-input",type:"checkbox",id:"image",name:"image"},RW={class:"form-check"},TW={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},PW={class:"form-check"},DW={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},AW={id:"conf-features",class:"paper-settings-section"},IW={class:"form-check"},OW={class:"form-check-input",type:"checkbox",id:"update",name:"update"},MW={class:"form-check"},VW={class:"form-check-input",type:"checkbox",id:"page",name:"page"},qW={id:"conf-plan",class:"paper-settings-section"},LW={key:0,class:"paper-section-copy"},$W={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"}Line truncated
`).length))+" lines",1)):f("v-if",!0)]),O(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[2]||(t[2]=d=>e.copyPath())},[(a(),l("svg",AK,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,IK)]))],8,DK),[[te,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",OK,[e.redactionCount()?(a(),l(N,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[h(c(e.redactionCount()),1),t[49]||(t[49]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,MK),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),h(c(e.languageName||"Text"),1),n("span",VK,[t[51]||(t[51]=n("span",{class:"sep"},"\xB7",-1)),h(c(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),t[52]||(t[52]=n("span",{class:"sep"},"\xB7",-1)),h(c(e.fmt?.number(e.content.split(`
`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(a(),l("span",qK,[e.redactionCount()?(a(),l(N,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[h(c(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,LK),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[56]||(t[56]=h("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(N,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),h(c(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)])):f("v-if",!0),e.preview&&e.previewPreserved()?(a(),l("button",{key:2,type:"button",class:"rp-preserved-tag",onClick:t[3]||(t[3]=d=>e.openPreserveFiles())},"Left unredacted")):f("v-if",!0),n("div",$K,[e.isCsv()?(a(),l("div",FK,[n("button",{type:"button",role:"radio",class:T(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[4]||(t[4]=d=>e.csvView="table")},"Table",10,UK),n("button",{type:"button",role:"radio",class:T(["seg-chip",{active:e.csvView==="chart"}]),"aria-checked":e.csvView==="chart",onClick:t[5]||(t[5]=d=>e.csvView="chart"),title:"Chart the table"},"Chart",10,BK),n("button",{type:"button",role:"radio",class:T(["seg-chip",{active:e.csvView==="raw"}]),"aria-checked":e.csvView==="raw",onClick:t[6]||(t[6]=d=>e.csvView="raw"),title:"Show the file as text with line numbers"},"Text",10,HK)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",zK,[n("button",{type:"button",class:T(["btn btn-sm btn-ghost btn-symbols",{"is-on":e.symbolsOpen}]),"aria-expanded":e.symbolsOpen?"true":"false","aria-haspopup":"true",title:"Symbols in this file",onClick:t[7]||(t[7]=d=>e.symbolsOpen=!e.symbolsOpen)},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,jK),e.symbolsOpen?(a(),l("div",_K,[n("div",GK,c(e.symbols().length)+" "+c(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(N,null,U(e.symbols(),d=>(a(),l("button",{type:"button",class:"symbols-item",role:"menuitem",key:d.line+d.name,onClick:g=>e.goToSymbol(d.line)},[n("span",{class:T(["symbols-kind","is-"+d.kind])},c(d.kind==="class"?"C":d.kind==="function"?"\u0192":"v"),3),n("span",KK,c(d.name),1),n("span",YK,c(d.line),1)],8,WK))),128))])):f("v-if",!0)])):f("v-if",!0),e.type=="html"?(a(),l("button",{key:2,type:"button",class:T(["btn btn-sm btn-ghost btn-icon-only btn-find btn-md-find",{"is-on":e.mdFindOpen}]),"aria-label":"Find on this page",title:"Find on this page ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[8]||(t[8]=d=>e.toggleMdFind())},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,XK)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView!=="raw")?(a(),l("div",QK,[e.type!="html"?(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-goto","aria-label":"Go to line",title:"Go to line ("+(e.isMac?"\u2318":"Ctrl+")+"G)",onClick:t[9]||(t[9]=d=>e.gotoLine())},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,JK)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:1,type:"button",class:T(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap lines",title:"Wrap lines (Alt+Z)",onClick:t[10]||(t[10]=d=>e.toggleWrap())},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,ZK)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:2,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-find","aria-label":"Find in file",title:"Find in file ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[11]||(t[11]=d=>e.findInFile())},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,xK)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",eY,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="html"?"Open the Markdown source":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,tY),typeof e.content=="string"?(a(),l("button",{key:0,type:"button",class:"tb-seg-btn tb-seg-icon","aria-label":e.contentCopied?"Copied":"Copy file contents",title:e.contentCopied?"Copied":"Copy file contents",onClick:t[12]||(t[12]=d=>e.copyContent())},[(a(),l("svg",sY,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,oY)]))],8,nY)):f("v-if",!0),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,iY)])):f("v-if",!0),typeof e.content=="string"?(a(),l("button",{key:5,type:"button",class:"btn btn-sm btn-icon-only btn-ghost tb-copy-m","aria-label":e.contentCopied?"Copied Line truncated
`).length))+" lines",1)],64)):f("v-if",!0)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",bY)):f("v-if",!0),e.type=="html"?(a(),l("button",{key:3,type:"button",role:"menuitem",onClick:t[18]||(t[18]=d=>e.toggleMdFind())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),h("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(a(),l("div",wY)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:5,type:"button",role:"menuitem",onClick:t[19]||(t[19]=d=>e.findInFile())},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),h("Find in file",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:6,type:"button",role:"menuitem",onClick:t[20]||(t[20]=d=>e.gotoLine())},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),h("Go to line",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[21]||(t[21]=d=>e.toggleWrap())},[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[71]||(t[71]=h("Wrap lines",-1)),e.wrapLines?(a(),l("span",CY,"\u2713")):f("v-if",!0)],8,kY)):f("v-if",!0),e.isCsv()?(a(),l(N,{key:8},U(["table","chart","raw"],d=>n("button",{type:"button",role:"menuitemradio",class:"tb-csv-view",key:d,"aria-checked":e.csvView===d?"true":"false",onClick:g=>{e.csvView=d,e.moreOpen=!1}},[(a(),l("svg",SY,[n("use",{href:d==="raw"?"#ui-icon-code":d==="chart"?"#ui-icon-chart":"#ui-icon-list"},null,8,NY)])),h(c(d==="raw"?"Show as text":d==="chart"?"Show as chart":"Show as table"),1),e.csvView===d?(a(),l("span",RY,"\u2713")):f("v-if",!0)],8,EY)),64)):f("v-if",!0),e.type!="html"?(a(),l("div",TY)):f("v-if",!0),e.type=="html"&&(!e.preview||e.url)?(a(),l("a",{key:10,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[72]||(t[72]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),h("View raw",-1)])],8,PY)):f("v-if",!0),e.type!="html"&&(!e.preview||e.url)?(a(),l("a",{key:11,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),h("View raw",-1)])],8,DY)):f("v-if",!0),!e.preview||e.url?(a(),l("a",{key:12,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),h("Download file",-1)])],8,AY)):f("v-if",!0),e.options?.hasWebsite?(a(),l("a",{key:13,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),h("Open website",-1)])],8,IY)):f("v-if",!0),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:14,role:"menuitem",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),h("Edit anonymization",-1)])],8,OY)):f("v-if",!0),e.options?.download?(a(),l("a",{key:15,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[77]||(t[77]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),h("Download ZIP",-1)])],8,MY)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[22]||(t[22]=d=>e.copyPath())},[...t[78]||(t[78]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),h("Copy file path",-1)])]),t[79]||(t[79]=n("div",{class:"tb-menu-sep"},null,-1)),t[80]||(t[80]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),h("FAQ")],-1)),t[81]||(t[81]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),h("Report a bug")],-1))])):f("v-if",!0)])]),e.gotoOpen&&e.type!="html"?(a(),l("form",{key:3,class:"goto-pop",role:"dialog","aria-label":"Go to line",onSubmit:t[26]||(t[26]=de(d=>e.submitGoto(),["prevent"]))},[t[82]||(t[82]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),O(n("input",{id:"goto-input",class:"goto-input",type:"text",inputmode:"numeric",autocomplete:"off",spellcheck:"false",placeholder:"1\u2013"+e.fmt?.number(typeof e.content=="string"?e.content.split(`
`).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[24]||(t[24]=d=>e.gotoValue=d),onKeydown:t[25]||(t[25]=Rt(de(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,VY),[[ft,e.gotoValue]]),n("span",{class:T(["goto-hint",{"is-error":e.gotoError}])},c(e.gotoError||"Line, or line:column"),3)],32)):f("v-if",!0)]),e.isCsv()&&e.csvView!=="raw"?(a(),Nt(s,{key:e.paths?.join("/"),rows:e.csvRows(),name:e.paths?.[e.paths.length-1],"state-key":e.preview?null:"table",view:e.csvView},null,8,["rows","name","state-key","view"])):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView!=="raw")?O((a(),l("div",qY,null,512)),[[u,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",LY,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[27]||(t[27]=d=>{e.mdFindQuery=d.target.value,e.runMdFind()}),onKeydown:[t[28]||(t[28]=Rt(de(d=>d.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=Rt(de(d=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,$Y),n("span",FY,[n("button",{type:"button","aria-label":"Previous match",onClick:t[30]||(t[30]=d=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[83]||(t[83]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,UY),n("button",{type:"button","aria-label":"Next match",onClick:t[31]||(t[31]=d=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,BY)]),n("span",HY,c(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:T(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e.mdFindCase?"true":"false",title:"Match case","aria-label":"Match case",onClick:t[32]||(t[32]=d=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,zY),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[33]||(t[33]=d=>e.toggleMdFind(!1))},"\xD7")])):f("v-if",!0),e.type=="html"?(a(),l("div",jY,[O(n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,_Y),[[p]]),e.tocCount()>=3?(a(),l("aside",GY,[t[85]||(t[85]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",WY,[n("a",{href:"#",class:T(["lvl-2 toc-top",{"is-active":!e.activeHeading||e.activeHeading===e.tocTitle()?.id}]),onClick:t[34]||(t[34]=de(d=>e.scrollToHeading(null),["prevent"]))},[e.tocTitle()?(a(!0),l(N,{key:0},U(e.tocTitle().parts,(d,g)=>(a(),l(N,{key:g},[d.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+d.n},[n("i",null,c(d.n),1)],8,KY)):(a(),l(N,{key:1},[h(c(d.t),1)],64))],64))),128)):(a(),l(N,{key:1},[h("Introduction")],64))],2),(a(!0),l(N,null,U(e.readmeToc(),(d,g)=>(a(),l("a",{key:d.id,href:"#"+d.id,class:T(["lvl-"+(d.depth+2),{"is-active":e.activeHeading===d.id}]),"aria-current":e.activeHeading===d.id?"location":null,onClick:de(m=>e.scrollToHeading(d.id),["prevent"])},[(a(!0),l(N,null,U(d.parts,(m,v)=>(a(),l(N,{key:v},[m.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+m.n},[n("i",null,c(m.n),1)],8,XY)):(a(),l(N,{key:1},[h(c(m.t),1)],64))],64))),128))],10,YY))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Nt(i,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):f("v-if",!0),e.fileFrame()?(a(),l("section",{key:3,class:T(["file-card file-card-media","view-"+e.type])},[n("header",QY,[n("div",JY,[n("button",{type:"button",class:T(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[35]||(t[35]=d=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[86]||(t[86]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",ZY,[n("li",xY,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:c(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,eX)]),(a(!0),l(N,null,U(e.paths,(d,g)=>(a(),l("li",{class:"breadcrumb-item","aria-current":g===e.paths.length-1?"page":null},[(a(!0),l(N,null,U(e.redactParts(d),(m,v)=>(a(),l(N,{key:v},[m.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+m.n},[n("i",null,c(m.n),1)],8,nX)):(a(),l(N,{key:1},[h(c(m.t),1)],64))],64))),128))],8,tX))),256))]),n("span",sX,[e.type=="IPython"&&e.redactionCount()?(a(),l("b",{key:0,class:"ms-item ms-redact",title:e.redactionCount()+" redacted terms"},[h(c(e.redactionCount()),1),t[87]||(t[87]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,oX)):f("v-if",!0),n("span",iX,c(e.fileKind()),1),e.imageSize?(a(),l("span",rX,c(e.imageSize),1)):f("v-if",!0),e.fileSi Line truncated
<span class="ln">10</span> log(<span class="s">&quot;epoch %d: %.3f&quot;</span>, epoch, loss)</pre></div>`,2)])])):(a(),l("div",xG,[...t[21]||(t[21]=[Pe('<div class="fm-dash-head"><span>Project</span><span>Status</span><span>Views</span><span>Expires</span></div><div class="fm-dash-row"><span><b>DeepLearnUtils</b><i>paper-7f2a \xB7 ICSE 2027</i></span><span class="st is-ready">Ready</span><span>41</span><span>Mar 31, 2027</span></div><div class="fm-dash-row"><span><b>vision-bench#212</b><i>pull request \xB7 FSE 2027</i></span><span class="st is-ready">Ready</span><span>12</span><span>Never</span></div><div class="fm-dash-row"><span><b>graph-repair</b><i>gr-91ab</i></span><span class="st is-progress">Updating</span><span>5</span><span>Jan 5, 2027</span></div><div class="fm-dash-row is-muted"><span><b>JarSift</b><i>OOPSLA 2025</i></span><span class="st is-expired">Expired</span><span>72</span><span>Sep 28, 2026</span></div>',5)])]))],10,QG)])],8,WG)),[[te,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Pe('<section class="paper-qa paper-qa-r3 paper-wrap" aria-labelledby="qa-heading"><div class="qa-head"><div><div class="paper-eyebrow">Before you sign in</div><h2 id="qa-heading">The questions that come up most.</h2></div><a class="paper-link-arrow" href="/faq">Read the full FAQ \u2192</a></div><div class="qa-grid"><div class="q"><a href="/faq#permissions">What access does GitHub sign-in require?</a><p> The GitHub App has read-only access to gists and the repositories you choose. Legacy OAuth uses broader permissions. Anonymous GitHub never writes to your repositories. </p></div><div class="q"><a href="/faq#formats">Which file formats are supported?</a><p> Source code with syntax highlighting, Markdown, Jupyter notebooks, PDFs, images, and GitHub Pages sites. Text files are anonymized; enabled images and PDFs are served unchanged. </p></div><div class="q"><a href="/faq#expiration">What happens when an anonymized repository expires?</a><p> You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over. </p></div></div></section><section class="paper-cta paper-wrap" aria-labelledby="cta-heading"><div><h2 id="cta-heading">Ready for review?</h2><p>Create an anonymous mirror in a couple of minutes. Reviewers just open the link.</p></div><div class="paper-cta-actions"><a class="btn-hero" href="/signin" target="_self"><i class="fab fa-github" aria-hidden="true"></i> Sign in with GitHub</a><a class="paper-link-arrow" target="_self" href="https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/">See an anonymized repository \u2192</a></div></section>',2)),$e(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var eW={class:"paper-empty"},tW={class:"paper-empty-inner"},nW={key:0,class:"paper-eyebrow"},sW={key:1,class:"paper-eyebrow"},oW={key:2,class:"paper-empty-title"},iW=["textContent"];function Xf(e,t){return a(),l("div",eW,[n("div",tW,[e.error?f("v-if",!0):(a(),l("div",nW,"Working")),e.error?(a(),l("div",sW,"Error")):f("v-if",!0),e.error?f("v-if",!0):(a(),l("h1",oW,[...t[0]||(t[0]=[h(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(a(),l("h1",{key:3,class:"paper-empty-title",textContent:c(e.fmt.translate(e.error))},null,8,iW)):f("v-if",!0)])])}var rW={class:"container paper-page paper-settings"},aW={class:"paper-crumbs"},lW={class:"here"},dW={class:"paper-page-title"},uW={class:"paper-settings-body"},cW={class:"paper-settings-toc"},pW={href:"#conf-billing"},fW={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},mW={id:"conf-basics",class:"paper-settings-section"},hW={class:"form-group"},gW={class:"invalid-feedback"},yW={class:"invalid-feedback"},vW={class:"form-group"},bW={class:"invalid-feedback"},wW={class:"form-group"},kW={class:"invalid-feedback"},CW={class:"invalid-feedback"},EW={id:"conf-window",class:"paper-settings-section"},SW={class:"form-grid-2"},NW={class:"form-group"},RW={class:"invalid-feedback"},TW={class:"invalid-feedback"},PW={class:"form-group"},DW={class:"invalid-feedback"},AW={class:"invalid-feedback"},IW={id:"conf-rendering",class:"paper-settings-section"},OW={class:"form-check"},MW={class:"form-check-input",type:"checkbox",id:"link",name:"link"},VW={class:"form-check"},qW={class:"form-check-input",type:"checkbox",id:"image",name:"image"},LW={class:"form-check"},$W={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},FW={class:"form-check"},UW={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},BW={id:"conf-features",class:"paper-settings-section"},HW={class:"form-check"},zW={class:"form-check-input",type:"checkbox",id:"update",name:"update"},jW={class:"form-check"},_W={class:"form-check-input",type:"checkbox",id:"page",name:"page"},GW={id:"conf-plan",class:"paper-settings-section"},WW={key:0,class:"paper-section-copy"},KW={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"}Line truncated
`).length))+" lines",1)):f("v-if",!0)]),O(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[2]||(t[2]=d=>e.copyPath())},[(a(),l("svg",BK,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,HK)]))],8,UK),[[te,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",zK,[e.redactionCount()?(a(),l(N,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[h(c(e.redactionCount()),1),t[49]||(t[49]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,jK),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),h(c(e.languageName||"Text"),1),n("span",_K,[t[51]||(t[51]=n("span",{class:"sep"},"\xB7",-1)),h(c(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),t[52]||(t[52]=n("span",{class:"sep"},"\xB7",-1)),h(c(e.fmt?.number(e.content.split(`
`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(a(),l("span",GK,[e.redactionCount()?(a(),l(N,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[h(c(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,WK),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[56]||(t[56]=h("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(N,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),h(c(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)])):f("v-if",!0),e.preview&&e.previewPreserved()?(a(),l("button",{key:2,type:"button",class:"rp-preserved-tag",onClick:t[3]||(t[3]=d=>e.openPreserveFiles())},"Left unredacted")):f("v-if",!0),n("div",KK,[e.isCsv()?(a(),l("div",YK,[n("button",{type:"button",role:"radio",class:T(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[4]||(t[4]=d=>e.csvView="table")},"Table",10,XK),n("button",{type:"button",role:"radio",class:T(["seg-chip",{active:e.csvView==="chart"}]),"aria-checked":e.csvView==="chart",onClick:t[5]||(t[5]=d=>e.csvView="chart"),title:"Chart the table"},"Chart",10,QK),n("button",{type:"button",role:"radio",class:T(["seg-chip",{active:e.csvView==="raw"}]),"aria-checked":e.csvView==="raw",onClick:t[6]||(t[6]=d=>e.csvView="raw"),title:"Show the file as text with line numbers"},"Text",10,JK)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",ZK,[n("button",{type:"button",class:T(["btn btn-sm btn-ghost btn-symbols",{"is-on":e.symbolsOpen}]),"aria-expanded":e.symbolsOpen?"true":"false","aria-haspopup":"true",title:"Symbols in this file",onClick:t[7]||(t[7]=d=>e.symbolsOpen=!e.symbolsOpen)},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,xK),e.symbolsOpen?(a(),l("div",eY,[n("div",tY,c(e.symbols().length)+" "+c(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(N,null,U(e.symbols(),d=>(a(),l("button",{type:"button",class:"symbols-item",role:"menuitem",key:d.line+d.name,onClick:g=>e.goToSymbol(d.line)},[n("span",{class:T(["symbols-kind","is-"+d.kind])},c(d.kind==="class"?"C":d.kind==="function"?"\u0192":"v"),3),n("span",sY,c(d.name),1),n("span",oY,c(d.line),1)],8,nY))),128))])):f("v-if",!0)])):f("v-if",!0),e.type=="html"?(a(),l("button",{key:2,type:"button",class:T(["btn btn-sm btn-ghost btn-icon-only btn-find btn-md-find",{"is-on":e.mdFindOpen}]),"aria-label":"Find on this page",title:"Find on this page ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[8]||(t[8]=d=>e.toggleMdFind())},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,iY)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView!=="raw")?(a(),l("div",rY,[e.type!="html"?(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-goto","aria-label":"Go to line",title:"Go to line ("+(e.isMac?"\u2318":"Ctrl+")+"G)",onClick:t[9]||(t[9]=d=>e.gotoLine())},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,aY)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:1,type:"button",class:T(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap lines",title:"Wrap lines (Alt+Z)",onClick:t[10]||(t[10]=d=>e.toggleWrap())},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,lY)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:2,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-find","aria-label":"Find in file",title:"Find in file ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[11]||(t[11]=d=>e.findInFile())},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,dY)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",uY,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="html"?"Open the Markdown source":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,cY),typeof e.content=="string"?(a(),l("button",{key:0,type:"button",class:"tb-seg-btn tb-seg-icon","aria-label":e.contentCopied?"Copied":"Copy file contents",title:e.contentCopied?"Copied":"Copy file contents",onClick:t[12]||(t[12]=d=>e.copyContent())},[(a(),l("svg",fY,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,mY)]))],8,pY)):f("v-if",!0),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,hY)])):f("v-if",!0),typeof e.content=="string"?(a(),l("button",{key:5,type:"button",class:"btn btn-sm btn-icon-only btn-ghost tb-copy-m","aria-label":e.contentCopied?"Copied Line truncated
`).length))+" lines",1)],64)):f("v-if",!0)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",DY)):f("v-if",!0),e.type=="html"?(a(),l("button",{key:3,type:"button",role:"menuitem",onClick:t[18]||(t[18]=d=>e.toggleMdFind())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),h("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(a(),l("div",AY)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:5,type:"button",role:"menuitem",onClick:t[19]||(t[19]=d=>e.findInFile())},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),h("Find in file",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:6,type:"button",role:"menuitem",onClick:t[20]||(t[20]=d=>e.gotoLine())},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),h("Go to line",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[21]||(t[21]=d=>e.toggleWrap())},[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[71]||(t[71]=h("Wrap lines",-1)),e.wrapLines?(a(),l("span",OY,"\u2713")):f("v-if",!0)],8,IY)):f("v-if",!0),e.isCsv()?(a(),l(N,{key:8},U(["table","chart","raw"],d=>n("button",{type:"button",role:"menuitemradio",class:"tb-csv-view",key:d,"aria-checked":e.csvView===d?"true":"false",onClick:g=>{e.csvView=d,e.moreOpen=!1}},[(a(),l("svg",VY,[n("use",{href:d==="raw"?"#ui-icon-code":d==="chart"?"#ui-icon-chart":"#ui-icon-list"},null,8,qY)])),h(c(d==="raw"?"Show as text":d==="chart"?"Show as chart":"Show as table"),1),e.csvView===d?(a(),l("span",LY,"\u2713")):f("v-if",!0)],8,MY)),64)):f("v-if",!0),e.type!="html"?(a(),l("div",$Y)):f("v-if",!0),e.type=="html"&&(!e.preview||e.url)?(a(),l("a",{key:10,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[72]||(t[72]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),h("View raw",-1)])],8,FY)):f("v-if",!0),e.type!="html"&&(!e.preview||e.url)?(a(),l("a",{key:11,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),h("View raw",-1)])],8,UY)):f("v-if",!0),!e.preview||e.url?(a(),l("a",{key:12,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),h("Download file",-1)])],8,BY)):f("v-if",!0),e.options?.hasWebsite?(a(),l("a",{key:13,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),h("Open website",-1)])],8,HY)):f("v-if",!0),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:14,role:"menuitem",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),h("Edit anonymization",-1)])],8,zY)):f("v-if",!0),e.options?.download?(a(),l("a",{key:15,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[77]||(t[77]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),h("Download ZIP",-1)])],8,jY)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[22]||(t[22]=d=>e.copyPath())},[...t[78]||(t[78]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),h("Copy file path",-1)])]),t[79]||(t[79]=n("div",{class:"tb-menu-sep"},null,-1)),t[80]||(t[80]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),h("FAQ")],-1)),t[81]||(t[81]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),h("Report a bug")],-1))])):f("v-if",!0)])]),e.gotoOpen&&e.type!="html"?(a(),l("form",{key:3,class:"goto-pop",role:"dialog","aria-label":"Go to line",onSubmit:t[26]||(t[26]=de(d=>e.submitGoto(),["prevent"]))},[t[82]||(t[82]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),O(n("input",{id:"goto-input",class:"goto-input",type:"text",inputmode:"numeric",autocomplete:"off",spellcheck:"false",placeholder:"1\u2013"+e.fmt?.number(typeof e.content=="string"?e.content.split(`
`).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[24]||(t[24]=d=>e.gotoValue=d),onKeydown:t[25]||(t[25]=Rt(de(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,_Y),[[ft,e.gotoValue]]),n("span",{class:T(["goto-hint",{"is-error":e.gotoError}])},c(e.gotoError||"Line, or line:column"),3)],32)):f("v-if",!0)]),e.isCsv()&&e.csvView!=="raw"?(a(),Nt(s,{key:e.paths?.join("/"),rows:e.csvRows(),name:e.paths?.[e.paths.length-1],"state-key":e.preview?null:"table",view:e.csvView},null,8,["rows","name","state-key","view"])):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView!=="raw")?O((a(),l("div",GY,null,512)),[[u,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",WY,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[27]||(t[27]=d=>{e.mdFindQuery=d.target.value,e.runMdFind()}),onKeydown:[t[28]||(t[28]=Rt(de(d=>d.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=Rt(de(d=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,KY),n("span",YY,[n("button",{type:"button","aria-label":"Previous match",onClick:t[30]||(t[30]=d=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[83]||(t[83]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,XY),n("button",{type:"button","aria-label":"Next match",onClick:t[31]||(t[31]=d=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,QY)]),n("span",JY,c(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:T(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e.mdFindCase?"true":"false",title:"Match case","aria-label":"Match case",onClick:t[32]||(t[32]=d=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,ZY),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[33]||(t[33]=d=>e.toggleMdFind(!1))},"\xD7")])):f("v-if",!0),e.type=="html"?(a(),l("div",xY,[O(n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,eX),[[p]]),e.tocCount()>=3?(a(),l("aside",tX,[t[85]||(t[85]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",nX,[n("a",{href:"#",class:T(["lvl-2 toc-top",{"is-active":!e.activeHeading||e.activeHeading===e.tocTitle()?.id}]),onClick:t[34]||(t[34]=de(d=>e.scrollToHeading(null),["prevent"]))},[e.tocTitle()?(a(!0),l(N,{key:0},U(e.tocTitle().parts,(d,g)=>(a(),l(N,{key:g},[d.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+d.n},[n("i",null,c(d.n),1)],8,sX)):(a(),l(N,{key:1},[h(c(d.t),1)],64))],64))),128)):(a(),l(N,{key:1},[h("Introduction")],64))],2),(a(!0),l(N,null,U(e.readmeToc(),(d,g)=>(a(),l("a",{key:d.id,href:"#"+d.id,class:T(["lvl-"+(d.depth+2),{"is-active":e.activeHeading===d.id}]),"aria-current":e.activeHeading===d.id?"location":null,onClick:de(m=>e.scrollToHeading(d.id),["prevent"])},[(a(!0),l(N,null,U(d.parts,(m,v)=>(a(),l(N,{key:v},[m.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+m.n},[n("i",null,c(m.n),1)],8,iX)):(a(),l(N,{key:1},[h(c(m.t),1)],64))],64))),128))],10,oX))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Nt(i,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):f("v-if",!0),e.fileFrame()?(a(),l("section",{key:3,class:T(["file-card file-card-media","view-"+e.type])},[n("header",rX,[n("div",aX,[n("button",{type:"button",class:T(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[35]||(t[35]=d=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[86]||(t[86]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",lX,[n("li",dX,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:c(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,uX)]),(a(!0),l(N,null,U(e.paths,(d,g)=>(a(),l("li",{class:"breadcrumb-item","aria-current":g===e.paths.length-1?"page":null},[(a(!0),l(N,null,U(e.redactParts(d),(m,v)=>(a(),l(N,{key:v},[m.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+m.n},[n("i",null,c(m.n),1)],8,pX)):(a(),l(N,{key:1},[h(c(m.t),1)],64))],64))),128))],8,cX))),256))]),n("span",fX,[e.type=="IPython"&&e.redactionCount()?(a(),l("b",{key:0,class:"ms-item ms-redact",title:e.redactionCount()+" redacted terms"},[h(c(e.redactionCount()),1),t[87]||(t[87]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,mX)):f("v-if",!0),n("span",hX,c(e.fileKind()),1),e.imageSize?(a(),l("span",gX,c(e.imageSize),1)):f("v-if",!0),e.fileSi Line truncated
`).length+1)),placeholder:`Jane Smith
MIT CSAIL
jane.smith@example.org`},null,8,fJ),[[i,{state:e.viewState,set:o=>{e.terms=o},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",mJ,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=h("Matches become ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=h(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=h(" for a custom replacement. Regex is supported.",-1))])]),O(n("div",hJ,"Terms are in an invalid format.",512),[[te,e.defaultsForm?.terms?.errors?.format]])])]),n("section",gJ,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",yJ,[n("label",vJ,[O(n("input",bJ,null,512),[[i,{state:e.viewState,set:o=>{e.options.link=o},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=h("Keep links",-1))]),n("label",wJ,[O(n("input",kJ,null,512),[[i,{state:e.viewState,set:o=>{e.options.image=o},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=h("Display images",-1))]),n("label",CJ,[O(n("input",EJ,null,512),[[i,{state:e.viewState,set:o=>{e.options.pdf=o},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=h("Display PDFs",-1))]),n("label",SJ,[O(n("input",NJ,null,512),[[i,{state:e.viewState,set:o=>{e.options.notebook=o},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=h("Display notebooks",-1))]),n("label",RJ,[O(n("input",TJ,null,512),[[i,{state:e.viewState,set:o=>{e.options.loc=o},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=h("Show line counts",-1))]),n("label",PJ,[O(n("input",DJ,null,512),[[i,{state:e.viewState,set:o=>{e.options.page=o},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=h("GitHub Pages",-1))])]),t[33]||(t[33]=n("p",{class:"settings-help"},"Images and PDFs are not anonymized.",-1)),t[34]||(t[34]=n("p",{class:"settings-help"},"GitHub Pages must use the anonymized branch.",-1))])]),n("section",AJ,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",IJ,[O(n("input",OJ,null,512),[[i,{state:e.viewState,set:o=>{e.options.update=o},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=h("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",MJ,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[O((a(),l("select",VJ,[...t[39]||(t[39]=[n("option",{value:"redirect"},"Redirect visitors to the GitHub repository",-1),n("option",{value:"remove",selected:""},"Remove the anonymized repository",-1)])])),[[i,{state:e.viewState,set:o=>{e.options.expirationMode=o},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),n("p",qJ,c(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",LJ,[n("div",$J,[e.draftRestored?(a(),l("span",FJ,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",UJ,"Unsaved changes"+c(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",BJ,c(e.message?"Defaults saved":"No unsaved changes"),1))]),e.draftRestored||e.unsavedChanges?(a(),l("button",{key:0,type:"button",class:"draft-discard",onClick:t[0]||(t[0]=o=>e.discardDraft())},"Discard changes")):f("v-if",!0),n("button",{id:"save",type:"submit",class:T(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},c(e.saving?"Saving\u2026":"Save defaults"),11,HJ),e.error?(a(),l("div",zJ,c(e.error),1)):f("v-if",!0)])],32)),[[r,e.viewState]])],512),[[te,e.settingsTab==="defaults"]]),O(n("section",{id:"settings-billing","aria-busy":e.billingLoading||e.billingBusy},[t[95]||(t[95]=n("p",{class:"settings-scope"},"Your plan and usage. Reviewer access is always free.",-1)),e.billingLoading?(a(),l("p",_J,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",GJ,[h(c(e.billingError)+" ",1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=o=>e.loadBilling()),disabled:e.billingBusy},"Try again",8,WJ)])):f("v-if",!0),e.billingNotice?(a(),l("p",KJ,c(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",YJ,[t[42]||(t[42]=n("strong",null,"Confirming your payment",-1)),t[43]||(t[43]=n("p",null,"Your allowance will update after confirmation. Please do not pay again.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[4]||(t[4]=o=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,XJ)])):f("v-if",!0),n("section",QJ,[n("div",JJ,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",ZJ,c(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",xJ,[h(c(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access Line truncated
jane.smith@example.org`},null,8,EJ),[[i,{state:e.viewState,set:o=>{e.terms=o},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",SJ,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=h("Matches become ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=h(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=h(" for a custom replacement. Regex is supported.",-1))])]),O(n("div",NJ,"Terms are in an invalid format.",512),[[te,e.defaultsForm?.terms?.errors?.format]])])]),n("section",RJ,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",TJ,[n("label",PJ,[O(n("input",DJ,null,512),[[i,{state:e.viewState,set:o=>{e.options.link=o},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=h("Keep links",-1))]),n("label",AJ,[O(n("input",IJ,null,512),[[i,{state:e.viewState,set:o=>{e.options.image=o},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=h("Display images",-1))]),n("label",OJ,[O(n("input",MJ,null,512),[[i,{state:e.viewState,set:o=>{e.options.pdf=o},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=h("Display PDFs",-1))]),n("label",VJ,[O(n("input",qJ,null,512),[[i,{state:e.viewState,set:o=>{e.options.notebook=o},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=h("Display notebooks",-1))]),n("label",LJ,[O(n("input",$J,null,512),[[i,{state:e.viewState,set:o=>{e.options.loc=o},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=h("Show line counts",-1))]),n("label",FJ,[O(n("input",UJ,null,512),[[i,{state:e.viewState,set:o=>{e.options.page=o},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=h("GitHub Pages",-1))])]),t[33]||(t[33]=n("p",{class:"settings-help"},"Images and PDFs are not anonymized.",-1)),t[34]||(t[34]=n("p",{class:"settings-help"},"GitHub Pages must use the anonymized branch.",-1))])]),n("section",BJ,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",HJ,[O(n("input",zJ,null,512),[[i,{state:e.viewState,set:o=>{e.options.update=o},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=h("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",jJ,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[O((a(),l("select",_J,[...t[39]||(t[39]=[n("option",{value:"redirect"},"Redirect visitors to the GitHub repository",-1),n("option",{value:"remove",selected:""},"Remove the anonymized repository",-1)])])),[[i,{state:e.viewState,set:o=>{e.options.expirationMode=o},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),n("p",GJ,c(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",WJ,[n("div",KJ,[e.draftRestored?(a(),l("span",YJ,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",XJ,"Unsaved changes"+c(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",QJ,c(e.message?"Defaults saved":"No unsaved changes"),1))]),e.draftRestored||e.unsavedChanges?(a(),l("button",{key:0,type:"button",class:"draft-discard",onClick:t[0]||(t[0]=o=>e.discardDraft())},"Discard changes")):f("v-if",!0),n("button",{id:"save",type:"submit",class:T(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},c(e.saving?"Saving\u2026":"Save defaults"),11,JJ),e.error?(a(),l("div",ZJ,c(e.error),1)):f("v-if",!0)])],32)),[[r,e.viewState]])],512),[[te,e.settingsTab==="defaults"]]),O(n("section",{id:"settings-billing","aria-busy":e.billingLoading||e.billingBusy},[t[95]||(t[95]=n("p",{class:"settings-scope"},"Your plan and usage. Reviewer access is always free.",-1)),e.billingLoading?(a(),l("p",eZ,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",tZ,[h(c(e.billingError)+" ",1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=o=>e.loadBilling()),disabled:e.billingBusy},"Try again",8,nZ)])):f("v-if",!0),e.billingNotice?(a(),l("p",sZ,c(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",oZ,[t[42]||(t[42]=n("strong",null,"Confirming your payment",-1)),t[43]||(t[43]=n("p",null,"Your allowance will update after confirmation. Please do not pay again.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[4]||(t[4]=o=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,iZ)])):f("v-if",!0),n("section",rZ,[n("div",aZ,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",lZ,c(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",dZ,[h(c(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access Line truncated
`);t.innerHTML=s.map(i=>{let r=i.replace(/^(<[^>]+>)+/,"").charAt(0),o=i.startsWith("@@")?"hunk":r==="+"?"add":r==="-"?"remove":"";return`<span class="md-diff-line${o?" is-"+o:""}">${i||" "}</span>`}).join(`
`)}),Nm=(e,t=0)=>{let s=(String(e).slice(t).match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length;return Math.min(t+s+4,24)},Dm=e=>{e?.closest?.(".reviewer-preview")&&e.querySelectorAll("pre code").forEach(t=>{let s=t.querySelectorAll(".md-diff-line");if(s.length){s.forEach(r=>{r.classList.contains("is-hunk")||r.style.setProperty("--hang",Nm(r.textContent,1)+"ch")});return}if(t.querySelector(".code-line"))return;let i=[];t.innerHTML=t.innerHTML.replace(/\n$/,"").split(`
`).map(r=>{let o=i.join("");r.replace(/<\/?span\b[^>]*>/g,p=>(p.startsWith("</")?i.pop():i.push(p),p));let u=r.replace(/<[^>]+>/g,"");return`<span class="code-line" style="--hang:${Nm(u)}ch">${o}${r||" "}${"</span>".repeat(i.length)}</span>`}).join(`
`)})},zae=e=>e.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section",sd={props:["content","terms","options","reader","idPrefix","onOutline"],setup(e){let t=bt(null),s=()=>{let i=renderMD(e.content||"",window.location.pathname+"/../");if(t.value.innerHTML=e.reader?to(i):i,Pm(t.value),Dm(t.value),e.idPrefix!=null){let r={};t.value.querySelectorAll("h1, h2, h3").forEach(o=>{let u=e.idPrefix+(o.id||zae(o.textContent));r[u]?u+="-"+ ++r[u]:r[u]=1,o.id=u})}ki(t.value),e.onOutline?.(Cr(t.value))};return Qt(()=>{s(),dt(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>we("markdown",{ref:t,class:e.reader?"markdown-body":null})}},Rm=e=>Jt(e).map(t=>t.n?we("span",{class:"redact-slot",role:"img","aria-label":"Redacted term "+t.n},we("i",t.n)):t.t),nd=e=>/^XXXX-\d+$/.test(String(e||"").trim()),jae=(e,t="Reviewer")=>e?we("span",{class:["pr-author",{"is-redacted":nd(e)}],title:nd(e)?"Redacted author":null},nd(e)?Rm(e):["@",...Rm(e)]):we("span",{class:"pr-author is-hidden"},t),Am={props:["comments","fmt"],setup(e){return()=>we("div",{class:"pr-thread"},(e.comments||[]).map((t,s)=>we("article",{class:["pr-thread-comment",{"is-reply":s>0}],key:s},[we("header",{class:"pr-thread-head"},[we("span",{class:"pr-avatar","aria-hidden":"true"},we("svg",{class:"ui-icon"},we("use",{href:"#ui-icon-user"}))),jae(t.author),t.creationDate||t.updatedDate?we("time",{class:"pr-thread-date",datetime:t.creationDate||t.updatedDate},e.fmt?.date(t.creationDate||t.updatedDate)):null]),t.body?we("div",{class:"pr-thread-body"},we(sd,{content:t.body,reader:!0})):null])))}},_ae=e=>String(e??"").replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t]),Gae=new Set(["add","remove","ctx","hunk"]),Wae=e=>{let t=Gae.has(e.kind)?e.kind:"ctx",s=Jt(e.text).map(i=>i.n?`<span class="redact-slot" role="img" aria-label="Redacted term ${Number(i.n)}"><i>${Number(i.n)}</i></span>`:_ae(i.t)).join("");return`<tr class="diff-row diff-row-${t}"><td class="diff-gutter diff-gutter-old">${Number(e.oldNo)||""}</td><td class="diff-gutter diff-gutter-new">${Number(e.newNo)||""}</td><td class="diff-sign">${t==="add"?"+":t==="remove"?"\u2212":""}</td><td class="diff-code" style="--hang: ${Zs(e.text)}ch">${s}</td></tr>`},Kae={props:["file","fmt"],setup(e){return()=>{let t=[],s="",i=()=>{s&&t.push(we("tbody",{key:"r"+t.length,innerHTML:s})),s=""};return(e.file?.lines||[]).forEach(r=>{s+=Wae(r),r.threads?.length&&(i(),t.push(we("tbody",{key:"t"+t.length},r.threads.map((o,u)=>we("tr",{class:"diff-thread-row",key:u},[we("td",{class:"diff-thread-gutter",colspan:3}),we("td",{class:"diff-thread-cell"},we(Am,{comments:o.comments,fmt:e.fmt}))])))))}),i(),we("table",{class:"diff-file-table"},t)}}},Yae={props:["file","terms","options","reader","idPrefix","onOutline"],setup(e){let t=bt(null),s=()=>Je(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),Pm(t.value),Dm(t.value)});return Qt(s),dt(()=>[e.file?.content,e.terms,e.options],s,{deep:!0}),()=>{let i=e.file||{},r=(i.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(r)||i.language==="Markdown")return we("gist-file",{ref:t},we(sd,{content:i.content,terms:e.terms,options:e.options,reader:e.reader,idPrefix:e.idPrefix,onOutline:e.onOutline}));let o={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},u=(i.language||r||"none").toLowerCase();return we("gist-file",{ref:t},we("pre",{class:"line-numbers"},we("code",{class:"language-"+(o[u]||u),key:i.content},i.content||"")))}}},Xae=e=>e?.querySelectorAll(".nb-input pre").forEach(t=>{if(t.parentElement?.classList.contains("nb-code-scroll"))return;let s=document.createElement("div");s.className="nb-code-scroll",t.replaceWith(s),s.appendChild(t);let i=()=>{let r=t.scrollWidth-t.clientWidth>1;if(s.classList.toggle("is-overflowing",r),s.classList.toggle("is-at-end",r&&t.scrollLeft+t.clientWidth>=t.scrollWidth-2),!r)return;let o=t.clientWidth-16,u=Math.max(24,o*t.clientWidth/t.scrollWidth);s.style.setProperty("--thumb-w",u+"px"),s.style.setProperty("--thumb-x",(o-u)*t.scrollLeft/(t.scrollWidth-t.clientWidth)+"px")};t.addEventListener("scroll",i,{passive:!0}),window.ResizeObserver?new ResizeObserver(i).observe(t):i(),i()}),Qae={props:["file","content"],setup(e){let t=bt(null),s=0,i,r=async()=>{let o=++s;i?.abort(),i=new AbortController;try{let u=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:i.signal}).then(p=>{if(!p.ok)throw Error("Notebook request failed");return p.json()});if(await ls("notebook"),o!==s)return;t.value.innerHTML=to(DOMPurify.sanitize(nb.parse(u).render())),t.value.querySelectorAll("pre code").forEach(p=>window.Prism?.highlightElement(p)),Xae(t.value),ki(t.value)}catch(u){o===s&&u.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return Qt(()=>{r(),dt(()=>[e.file,e.content],r)}),Fn(()=>{s++,i?.abort()}),()=>we(Line truncated
`)})},Zae=e=>e.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section",od={props:["content","terms","options","reader","idPrefix","onOutline"],setup(e){let t=bt(null),s=()=>{let i=renderMD(e.content||"",window.location.pathname+"/../");if(t.value.innerHTML=e.reader?to(i):i,Pm(t.value),Dm(t.value),e.idPrefix!=null){let r={};t.value.querySelectorAll("h1, h2, h3").forEach(o=>{let u=e.idPrefix+(o.id||Zae(o.textContent));r[u]?u+="-"+ ++r[u]:r[u]=1,o.id=u})}ki(t.value),e.onOutline?.(Cr(t.value))};return Qt(()=>{s(),dt(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>we("markdown",{ref:t,class:e.reader?"markdown-body":null})}},Rm=e=>Jt(e).map(t=>t.n?we("span",{class:"redact-slot",role:"img","aria-label":"Redacted term "+t.n},we("i",t.n)):t.t),sd=e=>/^XXXX-\d+$/.test(String(e||"").trim()),xae=(e,t="Reviewer")=>e?we("span",{class:["pr-author",{"is-redacted":sd(e)}],title:sd(e)?"Redacted author":null},sd(e)?Rm(e):["@",...Rm(e)]):we("span",{class:"pr-author is-hidden"},t),Am={props:["comments","fmt"],setup(e){return()=>we("div",{class:"pr-thread"},(e.comments||[]).map((t,s)=>we("article",{class:["pr-thread-comment",{"is-reply":s>0}],key:s},[we("header",{class:"pr-thread-head"},[we("span",{class:"pr-avatar","aria-hidden":"true"},we("svg",{class:"ui-icon"},we("use",{href:"#ui-icon-user"}))),xae(t.author),t.creationDate||t.updatedDate?we("time",{class:"pr-thread-date",datetime:t.creationDate||t.updatedDate},e.fmt?.date(t.creationDate||t.updatedDate)):null]),t.body?we("div",{class:"pr-thread-body"},we(od,{content:t.body,reader:!0})):null])))}},ele=e=>String(e??"").replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t]),tle=new Set(["add","remove","ctx","hunk"]),nle=e=>{let t=tle.has(e.kind)?e.kind:"ctx",s=Jt(e.text).map(i=>i.n?`<span class="redact-slot" role="img" aria-label="Redacted term ${Number(i.n)}"><i>${Number(i.n)}</i></span>`:ele(i.t)).join("");return`<tr class="diff-row diff-row-${t}"><td class="diff-gutter diff-gutter-old">${Number(e.oldNo)||""}</td><td class="diff-gutter diff-gutter-new">${Number(e.newNo)||""}</td><td class="diff-sign">${t==="add"?"+":t==="remove"?"\u2212":""}</td><td class="diff-code" style="--hang: ${Zs(e.text)}ch">${s}</td></tr>`},sle={props:["file","fmt"],setup(e){return()=>{let t=[],s="",i=()=>{s&&t.push(we("tbody",{key:"r"+t.length,innerHTML:s})),s=""};return(e.file?.lines||[]).forEach(r=>{s+=nle(r),r.threads?.length&&(i(),t.push(we("tbody",{key:"t"+t.length},r.threads.map((o,u)=>we("tr",{class:"diff-thread-row",key:u},[we("td",{class:"diff-thread-gutter",colspan:3}),we("td",{class:"diff-thread-cell"},we(Am,{comments:o.comments,fmt:e.fmt}))])))))}),i(),we("table",{class:"diff-file-table"},t)}}},ole={props:["file","terms","options","reader","idPrefix","onOutline"],setup(e){let t=bt(null),s=()=>Je(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),Pm(t.value),Dm(t.value)});return Qt(s),dt(()=>[e.file?.content,e.terms,e.options],s,{deep:!0}),()=>{let i=e.file||{},r=(i.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(r)||i.language==="Markdown")return we("gist-file",{ref:t},we(od,{content:i.content,terms:e.terms,options:e.options,reader:e.reader,idPrefix:e.idPrefix,onOutline:e.onOutline}));let o={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},u=(i.language||r||"none").toLowerCase();return we("gist-file",{ref:t},we("pre",{class:"line-numbers"},we("code",{class:"language-"+(o[u]||u),key:i.content},i.content||"")))}}},ile=e=>e?.querySelectorAll(".nb-input pre").forEach(t=>{if(t.parentElement?.classList.contains("nb-code-scroll"))return;let s=document.createElement("div");s.className="nb-code-scroll",t.replaceWith(s),s.appendChild(t);let i=()=>{let r=t.scrollWidth-t.clientWidth>1;if(s.classList.toggle("is-overflowing",r),s.classList.toggle("is-at-end",r&&t.scrollLeft+t.clientWidth>=t.scrollWidth-2),!r)return;let o=t.clientWidth-16,u=Math.max(24,o*t.clientWidth/t.scrollWidth);s.style.setProperty("--thumb-w",u+"px"),s.style.setProperty("--thumb-x",(o-u)*t.scrollLeft/(t.scrollWidth-t.clientWidth)+"px")};t.addEventListener("scroll",i,{passive:!0}),window.ResizeObserver?new ResizeObserver(i).observe(t):i(),i()}),rle={props:["file","content"],setup(e){let t=bt(null),s=0,i,r=async()=>{let o=++s;i?.abort(),i=new AbortController;try{let u=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:i.signal}).then(p=>{if(!p.ok)throw Error("Notebook request failed");return p.json()});if(await ls("notebook"),o!==s)return;t.value.innerHTML=to(DOMPurify.sanitize(nb.parse(u).render())),t.value.querySelectorAll("pre code").forEach(p=>window.Prism?.highlightElement(p)),ile(t.value),ki(t.value)}catch(u){o===s&&u.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return Qt(()=>{r(),dt(()=>[e.file,e.content],r)}),Fn(()=>{s++,i?.abort()}),()=>we(Line truncated
/*! Bundled license information:
@vue/shared/dist/shared.esm-bundler.js:
+1 -1
View File
@@ -45,7 +45,7 @@ function errorFixture({ repos, users, owners = {}, release = "4b2c1e9a7d", previ
// the GitHub owner, so no repository ID is kept: the "not recorded" state.
for (let i = 0; i < 34; i++) {
add({ timestamp: at(380 + i * 0.6), service: "api", module: "route", event: "application_log", severity: "warn", errorCode: "github_rate_limit_exceeded",
status: 429, method: "GET", route: "/api/repo/:owner/:repo", requestId: uuid(n++), ms: i % 11 === 0 ? 180 : 5 + (i % 9), release: previous });
status: 429, method: "GET", route: pick(["/api/repo/:owner/:repo", "/api/user/all_repositories", "/api/repo/:owner/:repo", "/api/repo/:owner/:repo/readme", "/api/gist/source/:id"], i), requestId: uuid(n++), ms: i % 11 === 0 ? 180 : 5 + (i % 9), release: previous });
}
// 3. An internal TypeError with a stack, first seen in the newest release.
+14 -4
View File
@@ -74,7 +74,8 @@ export function issueTitle(row: Row) {
}
export function issueId(row: Row) {
return createHash("sha256").update(JSON.stringify([codeOf(row), String(row.service || ""), String(row.route || row.queue || "")])).digest("hex").slice(0, 16);
// One cause (a GitHub limit, an outage) hits many routes: routes are listed inside the issue.
return createHash("sha256").update(JSON.stringify([codeOf(row), String(row.service || "")])).digest("hex").slice(0, 16);
}
const time = (row: Row) => Date.parse(String(row.timestamp));
@@ -208,12 +209,21 @@ export function buildIssues(rows: Row[], options: IssueOptions) {
const users = countBy(sorted, "userId", validUserId);
const viewers = { signedIn: 0, visitors: 0, notRecorded: 0 };
for (const row of sorted) viewers[SIGNED_IN.has(String(row.viewer)) ? "signedIn" : row.viewer ? "visitors" : "notRecorded"]++;
const routes = new Set(sorted.map(row => row.route).filter(Boolean));
const routeCounts = new Map<string, { route: string; method: string; count: number; last: string }>();
for (const row of sorted) {
const route = String(row.route || (row.queue ? `job ${row.queue}` : ""));
if (!route) continue;
const key = `${row.method || ""} ${route}`;
const entry = routeCounts.get(key) || { route, method: String(row.method || ""), count: 0, last: String(row.timestamp) };
entry.count++; routeCounts.set(key, entry);
}
const routes = [...routeCounts.values()].sort((a, b) => b.count - a.count || Date.parse(b.last) - Date.parse(a.last));
const top = routes[0];
return {
id, title: issueTitle(sample), code: codeOf(sample), errorCode: sample.errorCode || null, errorType: sample.errorType || null,
status: statusOf(sample) || null, service: sample.service || null, route: sample.route || null, method: sample.method || null,
status: statusOf(sample) || null, service: sample.service || null, route: top && !top.route.startsWith("job ") ? top.route : null, method: top?.method || sample.method || null,
queue: sample.queue || null, event: sample.event, severity: sample.severity,
count: sorted.length, requests: requests.size, jobs: jobs.size, routeKnown: sorted.filter(row => row.route).length, routes: routes.size,
count: sorted.length, requests: requests.size, jobs: jobs.size, routeKnown: sorted.filter(row => row.route).length, routeCount: routes.length, routes: routes.slice(0, 20),
repoCount: repos.length, repos: repos.slice(0, 50), userCount: users.length, users: users.slice(0, 50), viewers,
first: new Date(group.first).toISOString(), last: new Date(group.last).toISOString(),
firstRelease: firstRow.release && firstRow.release !== "unknown" ? firstRow.release : null,
+19 -6
View File
@@ -14,28 +14,41 @@ const fault = extra => ({ timestamp: at(5), service: 'api', module: 'route', eve
describe('admin error issues', () => {
describe('grouping', () => {
it('groups by code, service and route, and counts requests, repositories, users and viewers', () => {
it('groups by code and service, and counts requests, repositories, users and viewers', () => {
const rows = [
fault({ requestId: rid(1), repoId: 'repo-one', viewer: 'visitor' }),
fault({ requestId: rid(2), repoId: 'repo-one', viewer: 'owner', userId: USER, timestamp: at(30) }),
fault({ requestId: rid(3), repoId: 'repo-two', viewer: 'visitor', timestamp: at(60) }),
fault({ requestId: rid(4), route: '/api/repo/:repoId/zip' }),
fault({ requestId: rid(5), service: 'streamer' }),
fault({ requestId: rid(6), errorCode: undefined, errorType: 'TypeError', status: 500 }),
];
const { issues, summary } = buildIssues(rows, window);
expect(issues).to.have.length(4);
const file = issues.find(issue => issue.code === 'upstream_error' && issue.service === 'api' && issue.route === '/api/repo/:repoId/file/:path');
expect(file).to.include({ count: 3, requests: 3, repoCount: 2, userCount: 1, title: 'GitHub returned an error', failingNow: true });
expect(issues).to.have.length(3);
const file = issues.find(issue => issue.code === 'upstream_error' && issue.service === 'api');
expect(file).to.include({ count: 3, requests: 3, repoCount: 2, userCount: 1, title: 'GitHub returned an error', failingNow: true, routeCount: 1, route: '/api/repo/:repoId/file/:path' });
expect(file.repos[0]).to.include({ id: 'repo-one', count: 2 });
expect(file.viewers).to.deep.equal({ signedIn: 1, visitors: 2, notRecorded: 0 });
expect(file.occurrences.map(o => o.requestId)).to.deep.equal([rid(1), rid(2), rid(3)]);
expect(file.trend.reduce((a, b) => a + b, 0)).to.equal(3);
expect(issues.find(issue => issue.code === 'TypeError').title).to.equal('Code crashed: TypeError');
expect(summary).to.include({ issues: 4, failingNow: 4, failedRecords: 6, repositories: 2, users: 1 });
expect(summary).to.include({ issues: 3, failingNow: 3, failedRecords: 5, repositories: 2, users: 1 });
expect(issueId(rows[0])).to.equal(file.id);
});
it('keeps one cause across routes in one issue and lists its routes, most frequent first', () => {
const routes = ['/api/user/all_repositories', '/api/repo/:owner/:repo', '/api/repo/:owner/:repo/readme', '/api/gist/source/:id', '/api/pr/:owner/:repo/:id'];
const limited = Array.from({ length: 102 }, (_, i) => fault({ requestId: rid(i), errorCode: 'github_rate_limit_exceeded', status: 429, severity: 'warn', ms: 7,
route: routes[i < 28 ? 0 : i < 53 ? 1 : i < 78 ? 2 : i < 90 ? 3 : 4], timestamp: at(30 + i * 0.3) }));
const other = fault({ requestId: rid(500), errorCode: 'upstream_error', route: routes[0] });
const { issues } = buildIssues([...limited, other], window);
expect(issues).to.have.length(2);
const limit = issues.find(issue => issue.code === 'github_rate_limit_exceeded');
expect(limit).to.include({ count: 102, routeCount: 5, route: '/api/user/all_repositories', method: 'GET' });
expect(limit.routes.map(route => route.count)).to.deep.equal([28, 25, 25, 12, 12]);
expect(limit.id).to.equal(issueId({ errorCode: 'github_rate_limit_exceeded', service: 'api', route: '/anything/else' }));
expect(issues.find(issue => issue.code === 'upstream_error').id).to.not.equal(limit.id);
});
it('drops request envelopes already described by a more specific record, keeps lone edge 5xx', () => {
const rows = [
fault({ requestId: rid(1) }),
+13 -3
View File
@@ -88,6 +88,7 @@ describe("Vue 3 UI", function () {
return { id: "issue-1", title: "GitHub returned an error", code: "upstream_error", errorCode: "upstream_error", status: 502, service: "api", route: "/api/repo/:repoId/file/:path", method: "GET",
count: 3, requests: 3, jobs: 0, repoCount: 1, repos: [{ id: "repo-one", count: 3, last: now }], userCount: 1, users: [{ id: "65f0c0de0000000000000001", count: 1, last: now }],
viewers: { signedIn: 1, visitors: 2, notRecorded: 0 }, first: now, last: now, firstRelease: "abcdef1", newInRelease: null, failingNow: true, trend: [0, 1, 2],
routeCount: 2, routes: [{ route: "/api/repo/:repoId/file/:path", method: "GET", count: 2, last: now }, { route: "/api/repo/:repoId/zip", method: "GET", count: 1, last: now }], routeKnown: 3,
cause: { source: "github", label: "GitHub", summary: "GitHub answered 502 on GET /repos/{owner}/{repo}/contents/* in 3 of 3 failures.", detail: "", evidence: [] },
occurrences: [{ timestamp: now, requestId: ERR_REQ, repoId: "repo-one", viewer: "visitor", requestPath: "/api/repo/repo-one/file/a.py", method: "GET", route: "/api/repo/:repoId/file/:path", status: 502, service: "api" },
{ timestamp: now, repoId: "repo-one", viewer: "owner", userId: "65f0c0de0000000000000001", status: 502, service: "api" }],
@@ -109,6 +110,7 @@ describe("Vue 3 UI", function () {
expect(rows).to.have.length(2);
expect(doc.querySelector(".errs-table img")).to.equal(null);
expect(rows[0].querySelector("a.errs-title").getAttribute("href")).to.equal("/admin/errors?issue=issue-1");
expect(rows[0].querySelector(".errs-more-routes").textContent).to.equal("+1 route");
expect(rows[0].textContent).to.include("GitHub returned an error").and.include("502").and.include("Cause: GitHub").and.include("1 repository").and.include("Now");
expect(doc.querySelector(".errs-summary").textContent).to.include("100%").and.include("failing now (last 15 min)");
expect(doc.querySelector(".errs-source").textContent).to.include("From central logs · last 24 h");
@@ -144,10 +146,18 @@ describe("Vue 3 UI", function () {
});
it("opens an issue from its link, moves focus to the heading and back to the row", async () => {
ui = await browser("/", { "/api/user": admin, "/api/admin/errors/issues": errData() });
const many = errIssue();
many.occurrences = Array.from({ length: 12 }, (_, i) => ({ ...many.occurrences[0], timestamp: new Date(Date.now() - i * 60000).toISOString() }));
ui = await browser("/", { "/api/user": admin, "/api/admin/errors/issues": errData({ issues: [many] }) });
await ui.go("/admin/errors");
const doc = ui.window.document;
doc.querySelector("a.errs-title").click(); await delay(60);
const routes = [...doc.querySelectorAll(".errs-routes li")];
expect(routes.map(li => [li.querySelector("code").textContent, li.querySelector(".errs-num").textContent])).to.deep.equal([["GET /api/repo/:repoId/file/:path", "2 failures"], ["GET /api/repo/:repoId/zip", "1 failures"]]);
expect(doc.querySelectorAll(".errs-occurrences li")).to.have.length(10);
doc.querySelector(".errs-show-all").click(); await delay(20);
expect(doc.querySelectorAll(".errs-occurrences li")).to.have.length(12);
expect(doc.querySelector(".errs-show-all")).to.equal(null);
expect(ui.window.location.search).to.equal("?issue=issue-1");
expect(doc.activeElement.id).to.equal("errs-detail-title");
expect(doc.activeElement.textContent).to.equal("GitHub returned an error");
@@ -156,7 +166,6 @@ describe("Vue 3 UI", function () {
expect(repoLink).to.not.equal(null);
expect(doc.querySelector(".errs-repos a[href='/admin/users/id:65f0c0de0000000000000001']").textContent).to.equal("@alice");
expect(doc.querySelector(".errs-who").textContent).to.include("1 by signed-in users").and.include("2 by visitors");
expect(doc.querySelectorAll(".errs-occurrences a")).to.have.length(2);
expect(doc.querySelector(".errs-list").style.display).to.equal("none");
[...doc.querySelectorAll(".errs-detail a.btn")].find(a => a.textContent.includes("All errors")).click(); await delay(60);
expect(doc.activeElement.getAttribute("data-issue-link")).to.equal("issue-1");
@@ -207,7 +216,8 @@ describe("Vue 3 UI", function () {
expect(doc.querySelector("#errs-panel-timeline").textContent).to.include("no request or job ID");
doc.querySelector("#errs-tab-request").click(); await delay(20);
expect(doc.querySelectorAll("#errs-panel-request .errs-placeholder").length).to.be.greaterThan(2);
expect(doc.querySelector(".errs-chips").textContent).to.include("Signed in as owner");
expect(doc.querySelector(".errs-chips").textContent).to.include("Viewer: owner");
expect(doc.querySelectorAll(".errs-chips a[href='/admin/users/id:65f0c0de0000000000000001']")).to.have.length(1);
expect(ui.errors).to.deep.equal([]);
});