mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-12-03 09:33:47 +01:00
fix(viewers): rounded table frame, per-column summary cells restored
- The table's scroll box is now its rounded frame (border, 8px radius, clipping): the sticky header and the summary row are clipped to the same corners top and bottom, and the box ends at the summary row, so no row shows below it. In gists the frame keeps its border. - The summary row is back to its earlier content: Σ in the row-number column, a small "Avg ▾" select before each numeric value, "N distinct" under text columns, in muted labels with semibold right-aligned values. The single row-wide select is gone. - Identifier columns (seed, run...) stay empty, with "Treat as number" in the column menu. - Markdown and notebook tables use the same cells: Σ in a first text column, "Avg ▾" per numeric column, distinct counts muted. - "Show more" sits under the frame instead of inside the scroll box. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4fc3a8b2df
commit
37a01257b3
10 files changed
+150
-131
No files matched your search
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"core.min.js": "core.d23af1c652.min.js",
|
||||
"vendor.min.js": "vendor.a36ef67119.min.js",
|
||||
"vendor.min.js": "vendor.a0b5f311de.min.js",
|
||||
"mermaid.min.js": "mermaid.a7356d5ed1.min.js",
|
||||
"all.min.css": "all.5b8091dd2c.min.css",
|
||||
"all.min.css": "all.b592cadc18.min.css",
|
||||
"markdown.min.js": "markdown.6c8dfb7b1d.min.js",
|
||||
"pdf.min.js": "pdf.4d9cc6ff49.min.js",
|
||||
"notebook.min.js": "notebook.c3144c18ae.min.js",
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
+31
-28
@@ -15126,9 +15126,15 @@ body { --dt-series-1: #2a78d6; --dt-series-2: #eb6834; --dt-series-3: #1baf7a; -
|
||||
.dt-menu-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 6px 10px; font-size: 13px; color: var(--ink-soft); }
|
||||
.dt-menu-field select { max-width: 130px; height: 30px; border: 1px solid var(--border-color); border-radius: var(--radius-control); background: var(--input-bg); color: var(--color); font: 13px var(--font-sans); }
|
||||
/* No vertical padding on the scroller: the sticky header and summary row meet its edges, so no rows peek past them. */
|
||||
.dt .csv-table-wrap { padding-top: 0 !important; padding-bottom: 0 !important; margin: 12px 0 24px; }
|
||||
@media (max-width: 767px) { .dt .csv-table-wrap { margin-bottom: 16px; } .dt .dt-wrap { max-height: calc(100dvh - 210px); } }
|
||||
.dt-wrap { max-height: calc(100vh - 150px); }
|
||||
/* The scroll box is the table's rounded frame: it clips the sticky header and
|
||||
summary row to its corners and ends at the summary row, so no row shows past
|
||||
it. The table inside draws no outer border of its own. */
|
||||
.dt .dt-wrap { width: fit-content; max-width: calc(100% - 48px); max-height: calc(100vh - 190px); margin: 12px 24px 24px; padding: 0 !important; overflow: auto; border: 1px solid var(--border-color); border-radius: 8px; background: var(--paper-card) !important; }
|
||||
.dark-mode .dt .dt-wrap { background: var(--canvas-bg-color) !important; }
|
||||
.dt .dt-wrap .dt-table { border: 0 !important; border-radius: 0 !important; background: transparent !important; }
|
||||
.dt .dt-wrap .dt-table thead th { border-radius: 0 !important; }
|
||||
.dt .dt-wrap .dt-table tbody tr:last-child td { border-radius: 0 !important; }
|
||||
@media (max-width: 767px) { .dt .dt-wrap { max-width: calc(100% - 32px); max-height: calc(100dvh - 210px); margin: 12px 16px 16px; } }
|
||||
|
||||
/* Header: the name sorts; the chevron opens stats and filters. */
|
||||
.dt-table thead th { padding: 0 !important; }
|
||||
@@ -15157,26 +15163,26 @@ th:hover .dt-col-btn, .dt-col-btn:focus-visible, .dt-col-btn.is-on { opacity: 1;
|
||||
.dt-col-btn { margin: 0 2px; }
|
||||
}
|
||||
|
||||
/* Summary row: the table's last row. A 2px rule and the header's solid fill, square
|
||||
edges, the column grid of the body; it stays at the bottom of the scroll area. */
|
||||
.dt-table tfoot td { position: sticky; bottom: 0; z-index: 1; padding-top: 8px; padding-bottom: 8px; border-top: 2px solid var(--border-color); border-bottom: 0; border-radius: 0 !important; box-shadow: none; background: var(--paper-bg-alt) !important; font-size: 13px; font-weight: 600; color: var(--color); white-space: nowrap; font-variant-numeric: tabular-nums; }
|
||||
/* Summary row: the table's last row, on the column grid. A 2px rule and a solid
|
||||
fill; it sticks to the bottom of the scroll box, which ends at its edge. Each
|
||||
numeric cell has its own small aggregate select. */
|
||||
.dt-table tfoot td { position: sticky; bottom: 0; z-index: 1; padding-top: 8px; padding-bottom: 8px; border-top: 2px solid var(--border-color); border-bottom: 0; box-shadow: none; background: var(--paper-bg-alt) !important; font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
|
||||
.dark-mode .dt-table tfoot td { background: var(--paper-card) !important; }
|
||||
.dt-table:has(> tfoot) { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }
|
||||
.dt-table:has(> tfoot) tbody tr:last-child td { border-bottom: 0 !important; border-radius: 0 !important; }
|
||||
.dt-table tfoot .csv-rownum { padding-left: 8px; padding-right: 8px; }
|
||||
.dt-row-fn { position: relative; display: inline-flex; align-items: center; margin: 0; padding-right: 15px; font-weight: 500; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
|
||||
.dt-row-fn select { appearance: none; -webkit-appearance: none; border: 0; padding: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; }
|
||||
.dt-row-fn select:focus { outline: none; }
|
||||
.dt-row-fn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
|
||||
.dt-row-fn:hover { color: var(--color); }
|
||||
.dt-row-fn .dt-caret { position: absolute; right: 0; width: 11px; height: 11px; color: var(--ink-muted); pointer-events: none; }
|
||||
.dark-mode .dt-row-fn select option { background: var(--paper-card); color: var(--color); }
|
||||
.dt-sum-own { margin-right: 6px; font-size: 11px; font-weight: 500; color: var(--ink-muted); }
|
||||
.dt-table tfoot .csv-rownum { color: var(--ink-muted); font-size: 13px; }
|
||||
.dt-sum { display: inline-flex; align-items: baseline; gap: 6px; }
|
||||
.dt-sum.is-text { color: var(--ink-muted); }
|
||||
.dt-sum-value { font-weight: 600; color: var(--color); font-size: 13px; }
|
||||
.dt-sum-fn { position: relative; display: inline-flex; align-items: center; gap: 1px; margin: 0; color: var(--ink-muted); font-size: 11.5px; cursor: pointer; }
|
||||
.dt-sum-fn select { position: absolute; inset: -4px -6px; width: calc(100% + 12px); opacity: 0; cursor: pointer; font-size: 16px; }
|
||||
.dt-sum-caret { width: 10px; height: 10px; color: var(--ink-faint); }
|
||||
.dt-sum-fn:hover, .dt-sum-fn:hover .dt-sum-caret { color: var(--color); }
|
||||
.dt-sum-fn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
|
||||
.dt-menu-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
||||
.dt-menu-row .dt-menu-label { margin: 0; white-space: nowrap; }
|
||||
.dt-menu-hint { margin: 4px 8px 0; font-size: 12px; color: var(--ink-muted); line-height: 1.45; }
|
||||
.dt-empty-row td { padding: 28px 22px !important; color: var(--ink-muted); text-align: center !important; white-space: normal !important; }
|
||||
.dt-more { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 14px 2px 0; font-size: 12.5px; color: var(--ink-muted); }
|
||||
.dt-more { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: -10px; padding: 0 24px 24px; font-size: 12.5px; color: var(--ink-muted); }
|
||||
@media (max-width: 767px) { .dt-more { margin-top: -6px; padding: 0 16px 16px; } }
|
||||
.dt.is-grouped .dt-table tbody td:first-child { font-weight: 500; }
|
||||
|
||||
/* Column menu: stats, histogram, sort, filter, group. */
|
||||
@@ -15261,7 +15267,8 @@ th:hover .dt-col-btn, .dt-col-btn:focus-visible, .dt-col-btn.is-on { opacity: 1;
|
||||
/* Gist cards and the dialog: same toolbar, tighter gutters. */
|
||||
.gist-file-body.is-csv .dt-toolbar, .gist-file-body.is-csv .dt-chart-controls { padding-left: 20px; padding-right: 20px; }
|
||||
.gist-file-body.is-csv .dt-chart { margin: 14px 20px 20px; }
|
||||
.gist-file-body.is-csv .dt-wrap { max-height: 520px; }
|
||||
.gist-file-body.is-csv .dt .dt-wrap { max-height: 520px; max-width: calc(100% - 40px); margin: 12px 20px 20px; border: 1px solid var(--border-color); border-radius: 8px; }
|
||||
@media (max-width: 767px) { .gist-file-body.is-csv .dt .dt-wrap { max-width: calc(100% - 32px); margin: 12px 16px 16px; } }
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.dt-toolbar { padding: 12px 16px 0; gap: 6px; flex-wrap: nowrap; }
|
||||
@@ -15285,21 +15292,18 @@ th:hover .dt-col-btn, .dt-col-btn:focus-visible, .dt-col-btn.is-on { opacity: 1;
|
||||
.md-sort .dt-sort-icon { opacity: .35; }
|
||||
.md-sortable:hover .md-sort .dt-sort-icon { opacity: .9; }
|
||||
.md-sort .dt-sort-icon.is-asc, .md-sort .dt-sort-icon.is-desc { opacity: 1; }
|
||||
.markdown-body table tfoot.md-summary td, notebook table.dataframe tfoot.md-summary td { border-top: 2px solid var(--border-color) !important; background: var(--paper-bg-alt) !important; font-weight: 600; font-variant-numeric: tabular-nums; }
|
||||
.markdown-body table tfoot.md-summary td, notebook table.dataframe tfoot.md-summary td { border-top: 2px solid var(--border-color) !important; background: var(--paper-bg-alt) !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
||||
.dark-mode .markdown-body table tfoot.md-summary td, .dark-mode notebook table.dataframe tfoot.md-summary td { background: var(--paper-card) !important; }
|
||||
.markdown-body table tfoot.md-summary td.is-num { text-align: right; }
|
||||
.markdown-body table tfoot.md-summary td.md-summary-label { padding-top: 4px; padding-bottom: 4px; font-weight: 500; }
|
||||
.md-summary-label .md-table-agg { height: 26px; border: 0; padding-left: 0; background-color: transparent; font-weight: 500; color: var(--ink-soft); }
|
||||
.markdown-body table tfoot.md-summary td.is-num, .markdown-body table tfoot.md-summary td.is-muted, .markdown-body table tfoot.md-summary td.md-summary-label, notebook table.dataframe tfoot.md-summary td.is-muted, notebook table.dataframe tfoot.md-summary td.md-summary-label { color: var(--ink-muted); font-size: .9em; }
|
||||
.markdown-body tfoot.md-summary .dt-sum-value, notebook tfoot.md-summary .dt-sum-value { font-size: inherit; }
|
||||
.md-table-tools { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 6px; }
|
||||
.md-table-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border: 0; border-radius: var(--radius-control); background: none; font: 12.5px var(--font-sans); color: var(--ink-muted); cursor: pointer; }
|
||||
.md-table-btn:hover { background: var(--hover-bg-color); color: var(--color); }
|
||||
.md-table-btn .ui-icon { width: 14px; height: 14px; }
|
||||
.md-sigma > span[aria-hidden] { font-size: 14px; line-height: 1; }
|
||||
.md-sigma.is-on { color: var(--color); background: var(--accent-soft); }
|
||||
.md-table-agg { height: 26px; padding: 0 6px; border: 1px solid var(--border-color); border-radius: var(--radius-control); background: var(--input-bg); color: var(--color); font: 12.5px var(--font-sans); }
|
||||
.md-table-btn:focus-visible, .md-table-agg:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
||||
.md-table-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
||||
.notebook-body .md-table, notebook .md-table { margin-bottom: 4px; }
|
||||
notebook table.dataframe tfoot.md-summary td.is-num { text-align: right; }
|
||||
|
||||
/* Open as table: the full viewer in a dialog. */
|
||||
.dt-dialog-backdrop { position: fixed; inset: 0; z-index: 1050; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 24px 24px; background: rgba(26, 24, 21, .36); }
|
||||
@@ -15310,13 +15314,12 @@ notebook table.dataframe tfoot.md-summary td.is-num { text-align: right; }
|
||||
.dt-dialog .dt-view-toggle { padding: 2px; }
|
||||
.dt-dialog .dt-view-toggle .seg-chip { height: 26px; padding: 0 10px; font-size: 12.5px; }
|
||||
.dt-dialog .dt { overflow: auto; }
|
||||
.dt-dialog .dt .dt-wrap { max-height: none; overflow: visible; }
|
||||
.dt-dialog .dt .dt-wrap { max-height: none; }
|
||||
@media (max-width: 767px) {
|
||||
.dt-dialog-backdrop { padding: 0; }
|
||||
.dt-dialog { max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
|
||||
.dt-dialog-head { padding: 10px 10px 10px 16px; }
|
||||
}
|
||||
.dt-th-agg { font-weight: 400; font-size: 11.5px; color: var(--ink-muted); }
|
||||
.md-table-agg { appearance: none; -webkit-appearance: none; padding: 0 24px 0 8px; background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%238A857C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 6px center / 12px; cursor: pointer; }
|
||||
.dt-menu-note { padding: 4px 10px 2px; font-size: 12px; color: var(--ink-muted); }
|
||||
.dt-dialog:focus { outline: none; }
|
||||
@@ -100,7 +100,8 @@
|
||||
</figure>
|
||||
</template>
|
||||
|
||||
<div class="csv-table-wrap dt-wrap" v-else tabindex="0" role="region" :aria-label="'Table view of ' + (label || name || 'table')">
|
||||
<template v-else>
|
||||
<div class="csv-table-wrap dt-wrap" tabindex="0" role="region" :aria-label="'Table view of ' + (label || name || 'table')">
|
||||
<table class="csv-table dt-table">
|
||||
<thead><tr>
|
||||
<th class="csv-rownum" scope="col" v-if="!groupColumn"><span class="sr-only">Row</span></th>
|
||||
@@ -110,22 +111,23 @@
|
||||
</tr></thead>
|
||||
<tbody v-if="sorted.length" v-html="bodyHtml"></tbody>
|
||||
<tbody v-else><tr class="dt-empty-row"><td :colspan="table.columns.length + (groupColumn ? 0 : 1)">No rows match. <button type="button" class="dt-link" @click="clearFilters()">Clear the filters</button></td></tr></tbody>
|
||||
<tfoot v-if="sorted.length && hasSummary">
|
||||
<tfoot v-if="sorted.length">
|
||||
<tr class="dt-summary">
|
||||
<td class="csv-rownum" v-if="!groupColumn"><label class="dt-row-fn" v-if="!sumInFirst"><span class="sr-only">Summary row</span><select :value="s.sum" @change="setRowSum($event.target.value)"><option v-for="[fn, text] in AGGREGATES" :key="fn" :value="fn">{{ text }}</option></select><svg class="ui-icon dt-caret" aria-hidden="true"><use href="#ui-icon-chevron-down"></use></svg></label></td>
|
||||
<td class="csv-rownum" v-if="!groupColumn"><span aria-hidden="true">Σ</span><span class="sr-only">Summary</span></td>
|
||||
<td v-for="(c, ci) in table.columns" :key="c.index" :class="{ 'is-num': summary[ci].kind === 'number' }">
|
||||
<label class="dt-row-fn" v-if="ci === 0 && sumInFirst"><span class="sr-only">Summary row</span><select :value="s.sum" @change="setRowSum($event.target.value)"><option v-for="[fn, text] in AGGREGATES" :key="fn" :value="fn">{{ text }}</option></select><svg class="ui-icon dt-caret" aria-hidden="true"><use href="#ui-icon-chevron-down"></use></svg></label>
|
||||
<template v-else-if="summary[ci].kind === 'number'"><span class="dt-sum-own" v-if="sumOverride(c)" :title="AGGREGATE_LABEL[sumOverride(c)] + ' (set in the column menu)'">{{ aggregateShort(sumOverride(c)) }}</span>{{ summary[ci].text }}</template>
|
||||
<span class="dt-sum" v-if="summary[ci].kind === 'number'"><label class="dt-sum-fn"><span class="sr-only">Summary of {{ c.name }}</span><select :value="summary[ci].fn" @change="setSum(c, $event.target.value)"><option v-for="[fn, text] in AGGREGATES" :key="fn" :value="fn">{{ text }}</option></select><span class="dt-sum-fn-label" aria-hidden="true">{{ aggregateShort(summary[ci].fn) }}</span><svg class="ui-icon dt-sum-caret" aria-hidden="true"><use href="#ui-icon-chevron-down"></use></svg></label><b class="dt-sum-value">{{ summary[ci].text }}</b></span>
|
||||
<span class="dt-sum is-text" v-else-if="summary[ci].kind === 'distinct'">{{ summary[ci].text }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div class="dt-more" v-if="sorted.length > visible.length">
|
||||
</div>
|
||||
<div class="dt-more" v-if="sorted.length > visible.length">
|
||||
<span>Showing {{ formatNumber(visible.length) }} of {{ formatNumber(sorted.length) }} rows. Sums, filters and charts use all of them.</span>
|
||||
<button type="button" class="btn btn-sm" @click="showMore()">Show {{ formatNumber(Math.min(PAGE_SIZE, sorted.length - visible.length)) }} more</button>
|
||||
<button type="button" class="dt-link" @click="showAll()">Show all</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="dt-menu" v-if="s.menu && menuColumn && menuStats" role="dialog" tabindex="-1" :aria-label="'Column ' + menuColumn.name" :style="{ left: s.menu.left + 'px', top: s.menu.top + 'px' }" @click.stop>
|
||||
<div class="dt-menu-head"><b><template v-for="(seg, si) in redactParts(menuColumn.name)" :key="si"><span v-if="seg.n" class="redact-slot" role="img" :aria-label="'Redacted term ' + seg.n"><i>{{ seg.n }}</i></span><template v-else>{{ seg.t }}</template></template></b><span>{{ menuStats.typeLabel }}</span></div>
|
||||
@@ -135,10 +137,6 @@
|
||||
<figcaption><span>{{ menuStats.histFrom }}</span><span>{{ menuStats.histTo }}</span></figcaption>
|
||||
</figure>
|
||||
<ul class="dt-top" v-if="menuStats.top && menuStats.top.length"><li v-for="t in menuStats.top" :key="t.value"><span class="dt-top-name"><template v-for="(seg, si) in redactParts(t.value)" :key="si"><span v-if="seg.n" class="redact-slot" role="img" :aria-label="'Redacted term ' + seg.n"><i>{{ seg.n }}</i></span><template v-else>{{ seg.t }}</template></template></span><span class="dt-top-bar" :style="{ width: Math.max(4, t.share) + '%' }"></span><span class="dt-top-n">{{ t.count }}</span></li></ul>
|
||||
<div class="dt-menu-sec dt-menu-row" v-if="isMeasure(menuColumn)">
|
||||
<span class="dt-menu-label">Summary row</span>
|
||||
<label class="dt-select"><span class="sr-only">Summary of {{ menuColumn.name }}</span><select :value="s.sums[menuColumn.name] || s.sum" @change="setSum(menuColumn, $event.target.value)"><option v-for="[fn, text] in AGGREGATES" :key="fn" :value="fn">{{ text }}{{ fn === s.sum ? ' (row)' : '' }}</option></select><svg class="ui-icon dt-caret" aria-hidden="true"><use href="#ui-icon-chevron-down"></use></svg></label>
|
||||
</div>
|
||||
<div class="dt-menu-sec" v-if="!groupColumn && menuColumn.identifier">
|
||||
<button type="button" class="dt-menu-action" role="switch" :aria-checked="isMeasure(menuColumn) ? 'true' : 'false'" @click="treatAsNumber(menuColumn, !isMeasure(menuColumn))"><svg class="ui-icon" aria-hidden="true"><use :href="isMeasure(menuColumn) ? '#ui-icon-check' : '#ui-icon-list'"></use></svg>{{ isMeasure(menuColumn) ? 'Treated as a number · undo' : 'Treat as number' }}</button>
|
||||
<p class="dt-menu-hint" v-if="!isMeasure(menuColumn)">Looks like an identifier, so it is left out of the summary row and group averages.</p>
|
||||
|
||||
@@ -48,13 +48,8 @@ export const DataTable = {
|
||||
const sortColumn = computed(() => (s.sort ? byName(table.value, s.sort.column) : null));
|
||||
const sorted = computed(() => (sortColumn.value ? sortIndices(table.value, rowsInView.value, sortColumn.value.index, s.sort.dir) : rowsInView.value));
|
||||
const visible = computed(() => sorted.value.slice(0, s.limit));
|
||||
// One aggregate for the whole summary row; a column can override it from its menu.
|
||||
// Each numeric column picks its aggregate in its summary cell (Average by default).
|
||||
const summary = computed(() => table.value.columns.map((c) => summarize(c, rowsInView.value, s.sums[c.name] || s.sum, isMeasure)));
|
||||
const sumOverride = (c) => (s.sums[c.name] && s.sums[c.name] !== s.sum ? s.sums[c.name] : null);
|
||||
// The row's single "Average ▾" goes in the first column when it holds no
|
||||
// value (a name, a group), else in the row-number column.
|
||||
const sumInFirst = computed(() => !!groupColumn.value || !isMeasure(table.value.columns[0] || {}));
|
||||
const hasSummary = computed(() => summary.value.some((x) => x.kind === "number"));
|
||||
const numericColumns = computed(() => table.value.columns.filter((c) => isMeasure(c)));
|
||||
|
||||
// ---- Sorting: ascending, descending, then the file's order ----
|
||||
@@ -123,7 +118,6 @@ export const DataTable = {
|
||||
if (!fn || fn === s.sum) delete sums[column.name]; else sums[column.name] = fn;
|
||||
s.sums = sums;
|
||||
};
|
||||
const setRowSum = (fn) => { s.sum = fn; };
|
||||
const treatAsNumber = (column, on) => {
|
||||
const list = new Set(s.numeric);
|
||||
if (on) list.add(column.name); else list.delete(column.name);
|
||||
@@ -342,7 +336,7 @@ export const DataTable = {
|
||||
return {
|
||||
s, props, base, table, sorted, visible, summary, numericColumns, filtered, groupColumn, rowsInView,
|
||||
redactParts, cycleSort, setSort, sortState, ariaSort, setRange, rangeValue, chipValues, chipOn, toggleChip,
|
||||
activeFilters, clearFilters, filtering, groupable, setGroup, setAgg, setSum, setRowSum, treatAsNumber, isMeasure, sumOverride, sumInFirst, hasSummary,
|
||||
activeFilters, clearFilters, filtering, groupable, setGroup, setAgg, setSum, treatAsNumber, isMeasure,
|
||||
AGGREGATES, AGGREGATE_LABEL, aggregateShort,
|
||||
menuColumn, menuStats, openMenu, closeMenus, sourceColumn, copyAs, download, isChanged, bodyHtml, rowCountText,
|
||||
chart, chartSpec, chartHost, setChartType, setX, yOn, toggleY, seriesIndex, pointerAt, keyStep, tipStyle, chartSummary,
|
||||
|
||||
@@ -269,10 +269,14 @@ export function formatKey(column, key, fn) {
|
||||
}
|
||||
|
||||
// The summary cell of a column over the given rows: the selected aggregate for
|
||||
// measures; nothing for text, dates and identifiers (their distinct counts are
|
||||
// in the column stats).
|
||||
// measures, the count of distinct values for text and dates, nothing for
|
||||
// identifiers (seed, run...: an average of them means nothing).
|
||||
export function summarize(column, indices, fn = "mean", isMeasure = (c) => !c.identifier) {
|
||||
if (column.type !== "number" || !isMeasure(column)) return { kind: "none", text: "" };
|
||||
if (column.type !== "number") {
|
||||
const distinct = distinctValues(column, indices).size;
|
||||
return { kind: "distinct", value: distinct, text: distinct === 1 ? "1 distinct" : formatNumber(distinct) + " distinct" };
|
||||
}
|
||||
if (!isMeasure(column)) return { kind: "none", text: "" };
|
||||
const value = aggregate(column.keys, indices, fn);
|
||||
return { kind: "number", fn, value, text: formatKey(column, value, fn) };
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// summary row, and "Open as table" for the full analysis view. Redaction slots
|
||||
// stay in place (rows are moved, never re-rendered); sorting and the exported
|
||||
// data use the anonymized text (XXXX-n).
|
||||
import { analyzeTable, sortIndices, summarize, AGGREGATES } from "./table-analysis.js";
|
||||
import { analyzeTable, sortIndices, summarize, AGGREGATES, aggregateShort } from "./table-analysis.js";
|
||||
|
||||
// "Open as table" opens the full viewer; data-table.js registers it (kept out of
|
||||
// this module so the extraction can be tested without the compiled template).
|
||||
@@ -99,20 +99,38 @@ function enhance(table) {
|
||||
});
|
||||
apply();
|
||||
|
||||
// Σ: a footer row like the table viewer's: one aggregate for every measure,
|
||||
// chosen with a single select in the first column (or beside Σ when the
|
||||
// first column holds a value). Text and identifier columns stay empty.
|
||||
// Σ: a footer row like the table viewer's: each measure with its own small
|
||||
// aggregate select (Average first), distinct counts under text columns,
|
||||
// nothing under identifiers. A first text column carries the Σ mark.
|
||||
const measure = (c) => c.type === "number" && !c.identifier;
|
||||
const numeric = model.columns.some(measure);
|
||||
const labelInFirst = model.columns.length > 1 && !measure(model.columns[0]);
|
||||
const markFirst = model.columns.length > 1 && model.columns[0].type !== "number";
|
||||
const tools = doc.createElement("div");
|
||||
tools.className = "md-table-tools";
|
||||
let foot = null, fn = "mean";
|
||||
const select = doc.createElement("select");
|
||||
select.className = "md-table-agg";
|
||||
select.setAttribute("aria-label", "Summary row");
|
||||
AGGREGATES.forEach(([k, text]) => { const o = doc.createElement("option"); o.value = k; o.textContent = text; select.appendChild(o); });
|
||||
select.addEventListener("change", () => { fn = select.value; renderFoot(); });
|
||||
let foot = null;
|
||||
const fns = model.columns.map(() => "mean");
|
||||
const aggCell = (c, i, all) => {
|
||||
const wrap = doc.createElement("span");
|
||||
wrap.className = "dt-sum";
|
||||
const label = doc.createElement("label");
|
||||
label.className = "dt-sum-fn";
|
||||
const select = doc.createElement("select");
|
||||
select.setAttribute("aria-label", "Summary of " + (c.name || "column " + (i + 1)));
|
||||
AGGREGATES.forEach(([k, text]) => { const o = doc.createElement("option"); o.value = k; o.textContent = text; select.appendChild(o); });
|
||||
select.value = fns[i];
|
||||
select.addEventListener("change", () => { fns[i] = select.value; renderFoot(); });
|
||||
const short = doc.createElement("span");
|
||||
short.className = "dt-sum-fn-label";
|
||||
short.setAttribute("aria-hidden", "true");
|
||||
short.textContent = aggregateShort(fns[i]);
|
||||
label.append(select, short);
|
||||
label.insertAdjacentHTML("beforeend", '<svg class="ui-icon dt-sum-caret" aria-hidden="true"><use href="#ui-icon-chevron-down"></use></svg>');
|
||||
const value = doc.createElement("b");
|
||||
value.className = "dt-sum-value";
|
||||
value.textContent = summarize(c, all, fns[i]).text;
|
||||
wrap.append(label, value);
|
||||
return wrap;
|
||||
};
|
||||
const renderFoot = () => {
|
||||
if (!foot) return;
|
||||
const all = original.map((_, i) => i);
|
||||
@@ -120,10 +138,9 @@ function enhance(table) {
|
||||
tr.textContent = "";
|
||||
model.columns.forEach((c, i) => {
|
||||
const td = doc.createElement("td");
|
||||
const align = data.headerCells[i]?.getAttribute("align") || data.headerCells[i]?.style.textAlign;
|
||||
if (align) td.style.textAlign = align;
|
||||
if (i === 0 && labelInFirst) { td.className = "md-summary-label"; td.appendChild(select); }
|
||||
else if (measure(c)) { td.className = "is-num"; td.textContent = summarize(c, all, fn).text; }
|
||||
if (i === 0 && markFirst) { td.className = "md-summary-label"; td.innerHTML = '<span aria-hidden="true">Σ</span><span class="sr-only">Summary</span>'; }
|
||||
else if (measure(c)) { td.className = "is-num"; td.appendChild(aggCell(c, i, all)); }
|
||||
else if (c.type !== "number") { td.className = "is-muted"; td.textContent = summarize(c, all).text; }
|
||||
tr.appendChild(td);
|
||||
});
|
||||
};
|
||||
@@ -134,12 +151,10 @@ function enhance(table) {
|
||||
sigma.setAttribute("aria-pressed", "false");
|
||||
sigma.title = "Show a summary row";
|
||||
sigma.innerHTML = '<span aria-hidden="true">Σ</span><span class="md-table-btn-text">Summary</span>';
|
||||
if (!labelInFirst) select.hidden = true;
|
||||
sigma.addEventListener("click", () => {
|
||||
const on = !foot;
|
||||
sigma.setAttribute("aria-pressed", on ? "true" : "false");
|
||||
sigma.classList.toggle("is-on", on);
|
||||
if (!labelInFirst) select.hidden = !on;
|
||||
if (on) {
|
||||
foot = doc.createElement("tfoot");
|
||||
foot.className = "md-summary";
|
||||
@@ -149,7 +164,6 @@ function enhance(table) {
|
||||
} else { foot.remove(); foot = null; }
|
||||
});
|
||||
tools.appendChild(sigma);
|
||||
if (!labelInFirst) tools.appendChild(select);
|
||||
}
|
||||
const open = doc.createElement("button");
|
||||
open.type = "button";
|
||||
|
||||
Vendored
+50
-50
@@ -1,61 +1,61 @@
|
||||
"use strict";(()=>{var xl=Object.defineProperty;var ed=e=>{throw TypeError(e)};var Im=(e,t,s)=>t in e?xl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Om=(e,t)=>{for(var s in t)xl(e,s,{get:t[s],enumerable:!0})};var lt=(e,t,s)=>Im(e,typeof t!="symbol"?t+"":t,s),xr=(e,t,s)=>t.has(e)||ed("Cannot "+s);var de=(e,t,s)=>(xr(e,t,"read from private field"),s?s.call(e):t.get(e)),He=(e,t,s)=>t.has(e)?ed("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Ke=(e,t,s,i)=>(xr(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),je=(e,t,s)=>(xr(e,t,"access private method"),s);var td=(e,t,s,i)=>({set _(o){Ke(e,t,o,s)},get _(){return de(e,t,i)}});var ye=["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",pdf:"/script/pdf.4d9cc6ff49.min.js",editor:"/script/editor.4f142d3adc.min.js"};function nd(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"),o=s.get("intentId"),r=s.get("token");return!/^[a-f0-9]{32}$/.test(i||"")||!/^[a-f0-9]{32}$/.test(o||"")||!/^[a-f0-9]{64}$/.test(r||"")?null:{contract:"4open.artifacts/1",clientId:i,intentId:o,token:r}}function sd(e,t){let{http:s,promises:i,window:o}=t,r=t.takeReviewHandoff(),u=r?{clientId:r.clientId,intentId:r.intentId}:null,p,d,h,m,y,v=!0,b,w=i.defer(),k=()=>[...o.crypto.getRandomValues(new Uint8Array(16))].map(F=>F.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:r?"":"Open a new artifact link from your submission. This link is missing or invalid."});let N=()=>v&&e.user?.username===y;function C(){v=!1,r=p=d=void 0,w.resolve(),o.clearTimeout(b)}e.on("dispose",C),e.on("routeLeave",C),e.watch(()=>e.user?.username,F=>{!y&&F?y=F:y&&F!==y&&(C(),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:w.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":d}}),I=F=>F?.status===404?"Artifact linking is not available on this server.":F?.status===401?"Sign in, then open a new artifact link from your submission.":F?.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(!v||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;y=e.user.username;let F=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(F)){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,o.clearTimeout(b),m||(m=k());try{let z=(await s.get("/api/review-consent/csrf",{timeout:w.promise})).data;if(!N())return;if(d=z.csrf,e.handoffEnabled=z.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(d||""))throw new Error("invalid_csrf");let K=(await s.post("/api/review-consent/preview",{repositoryId:F,intent:{...r,requestId:m}},P())).data;if(!N())return;if(!K||typeof K.ticket!="string"||!K.ticket||K.ticket.length>8192||typeof K.repositoryName!="string"||!["restricted-review","anonymous-link"].iLine truncated
|
||||
`))),e[Tn]=Js(o);let r=i||o.props&&o.props.type==="number";Xn(e,t?"change":"input",u=>{u.target.composing||e[Tn](Ua(e.value,s,r))}),(s||r)&&Xn(e,"change",()=>{e.value=Ua(e.value,s,r)}),t||(Xn(e,"compositionstart",Lg),Xn(e,"compositionend",Hu),Xn(e,"change",Hu))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){let o=t??"",r=e[sr];delete e[sr],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[Tn](Ua(e.value,s,i)):e.value=o},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:o,number:r}},u){if(e[Tn]=Js(u),e.composing)return;let p=(r||e.type==="number")&&!/^0\d/.test(e.value)?Hs(e.value):e.value,d=t??"";if(p===d)return;let h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(i&&t===s||o&&e.value.trim()===d)||(e.value=d)}},Ba={deep:!0,created(e,t,s){e[Tn]=Js(s),Xn(e,"change",()=>{let i=e._modelValue,o=Xo(e),r=e.checked,u=e[Tn];if(Ve(i)){let p=Ii(i,o),d=p!==-1;if(r&&!d)u(i.concat(o));else if(!r&&d){let h=[...i];h.splice(p,1),u(h)}}else if(dn(i)){let p=new Set(i);r?p.add(o):p.delete(o),u(p)}else u(Xu(e,r))})},mounted:ju,beforeUpdate(e,t,s){e[Tn]=Js(s),ju(e,t,s)}};function ju(e,{value:t,oldValue:s},i){e._modelValue=t;let o;if(Ve(t))o=Ii(t,i.props.value)>-1;else if(dn(t))o=t.has(i.props.value);else{if(t===s)return;o=un(t,Xu(e,!0))}e.checked!==o&&(e.checked=o)}var Ot={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,Xn(e,"change",()=>{let o=Array.prototype.filter.call(e.options,d=>d.selected).map(d=>s?Hs(Xo(d)):Xo(d)),r=e.multiple,u=r?dn(e._modelValue)?new Set(o):o:o[0],p=e._pendingValue=[r,r?Ve(u)?o.slice():o:u];try{e[Tn](u)}finally{Ye(()=>{e._pendingValue===p&&(e._pendingValue=void 0)})}}),e[Tn]=Js(i)},mounted(e,{value:t}){Gu(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[Tn]=Js(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!qg(t,s[1],s[0]))&&Gu(e,t)}};function qg(e,t,s){if(!s)return un(e,t);if(Ve(e))return un(e,t);if(dn(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function Gu(e,t){let s=e.multiple,i=Ve(t);if(!(s&&!i&&!dn(t))){for(let o=0,r=e.options.length;o<r;o++){let u=e.options[o],p=Xo(u);if(s)if(i){let d=typeof p;d==="string"||d==="number"?u.selected=t.some(h=>String(h)===String(p)):u.selected=Ii(t,p)>-1}else u.selected=t.has(p);else if(un(Xo(u),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Xo(e){return"_value"in e?e._value:e.value}function Xu(e,t){let s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}var $g=["ctrl","shift","alt","meta"],Fg={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)=>$g.some(s=>e[`${s}Key`]&&!t.includes(s))},le=(e,t)=>{if(!e)return e;let s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((o,...r)=>{for(let u=0;u<t.length;u++){let p=Fg[t[u]];if(p&&p(o,t))return}return e(o,...r)}))},Ug={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Tt=(e,t)=>{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(o=>{if(!("key"in o))return;let r=yn(o.key);if(t.some(u=>u===r||Ug[u]===r))return e(o)}))},_g=vt({patchProp:Og},gg),Wu;function Bg(){return Wu||(Wu=Nu(_g))}var ir=((...e)=>{let t=Bg().createApp(...e),{mount:s}=t;return t.mount=i=>{let o=Hg(i);if(!o)return;let r=t._component;!$e(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");let u=s(o,!1,zg(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),u},t});function zg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Hg(e){return ht(e)?document.querySelector(e):e}var ws=typeof document<"u";function Qu(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function jg(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Qu(e.default)}var it=Object.assign;function rr(e,t){let s={};for(let i in t){let o=t[i];s[i]=rn(o)?o.map(e):e(o)}return s}var Zs=()=>{},rn=Array.isArray;function ja(e,t){let s={};for(let i in e)s[i]=i in t?t[i]:e[i];return s}var Zu=/#/g,Gg=/&/g,Wg=/\//g,Kg=/=/g,Yg=/\?/g,xu=/\+/g,Xg=/%5B/g,Jg=/%5D/g,ec=/%5E/g,Qg=/%60/g,tc=/%7B/g,Zg=/%7C/g,nc=/%7D/g,xg=/%20/g;function Ga(e){return e==null?"":encodeURI(""+e).replace(Zg,"|").replace(Xg,"[").replace(Jg,"]")}function sc(e){return Ga(e).replace(tc,"{").replace(nc,"}").replace(ec,"^")}function za(e){return Ga(e).replace(xu,"%2B").replace(xg,"+").replace(Zu,"%23").replace(Gg,"%26").replace(Qg,"`").replace(tc,"{").replace(nc,"}").replace(ec,"^")}function ev(e){return za(e).replace(Kg,"%3D")}function tv(e){return GLine truncated
|
||||
"use strict";(()=>{var ed=Object.defineProperty;var td=e=>{throw TypeError(e)};var Im=(e,t,s)=>t in e?ed(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Om=(e,t)=>{for(var s in t)ed(e,s,{get:t[s],enumerable:!0})};var at=(e,t,s)=>Im(e,typeof t!="symbol"?t+"":t,s),xr=(e,t,s)=>t.has(e)||td("Cannot "+s);var de=(e,t,s)=>(xr(e,t,"read from private field"),s?s.call(e):t.get(e)),He=(e,t,s)=>t.has(e)?td("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Ke=(e,t,s,i)=>(xr(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),je=(e,t,s)=>(xr(e,t,"access private method"),s);var nd=(e,t,s,i)=>({set _(o){Ke(e,t,o,s)},get _(){return de(e,t,i)}});var we=["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 ke={markdown:"/script/markdown.6c8dfb7b1d.min.js",org:"/script/org.f61f262915.min.js",notebook:"/script/notebook.c3144c18ae.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",editor:"/script/editor.4f142d3adc.min.js"};function sd(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"),o=s.get("intentId"),r=s.get("token");return!/^[a-f0-9]{32}$/.test(i||"")||!/^[a-f0-9]{32}$/.test(o||"")||!/^[a-f0-9]{64}$/.test(r||"")?null:{contract:"4open.artifacts/1",clientId:i,intentId:o,token:r}}function od(e,t){let{http:s,promises:i,window:o}=t,r=t.takeReviewHandoff(),u=r?{clientId:r.clientId,intentId:r.intentId}:null,p,d,h,m,y,v=!0,b,w=i.defer(),C=()=>[...o.crypto.getRandomValues(new Uint8Array(16))].map(F=>F.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:r?"":"Open a new artifact link from your submission. This link is missing or invalid."});let N=()=>v&&e.user?.username===y;function k(){v=!1,r=p=d=void 0,w.resolve(),o.clearTimeout(b)}e.on("dispose",k),e.on("routeLeave",k),e.watch(()=>e.user?.username,F=>{!y&&F?y=F:y&&F!==y&&(k(),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:w.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":d}}),D=F=>F?.status===404?"Artifact linking is not available on this server.":F?.status===401?"Sign in, then open a new artifact link from your submission.":F?.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(!v||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;y=e.user.username;let F=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(F)){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,o.clearTimeout(b),m||(m=C());try{let B=(await s.get("/api/review-consent/csrf",{timeout:w.promise})).data;if(!N())return;if(d=B.csrf,e.handoffEnabled=B.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(d||""))throw new Error("invalid_csrf");let K=(await s.post("/api/review-consent/preview",{repositoryId:F,intent:{...r,requestId:m}},P())).data;if(!N())return;if(!K||typeof K.ticket!="string"||!K.ticket||K.ticket.length>8192||typeof K.repositoryName!="string"||!["restricted-review","anonymous-link"].iLine truncated
|
||||
`))),e[Sn]=Ws(o);let r=i||o.props&&o.props.type==="number";jn(e,t?"change":"input",u=>{u.target.composing||e[Sn](Ua(e.value,s,r))}),(s||r)&&jn(e,"change",()=>{e.value=Ua(e.value,s,r)}),t||(jn(e,"compositionstart",Lg),jn(e,"compositionend",ju),jn(e,"change",ju))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){let o=t??"",r=e[nr];delete e[nr],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[Sn](Ua(e.value,s,i)):e.value=o},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:o,number:r}},u){if(e[Sn]=Ws(u),e.composing)return;let p=(r||e.type==="number")&&!/^0\d/.test(e.value)?Us(e.value):e.value,d=t??"";if(p===d)return;let h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(i&&t===s||o&&e.value.trim()===d)||(e.value=d)}},Ba={deep:!0,created(e,t,s){e[Sn]=Ws(s),jn(e,"change",()=>{let i=e._modelValue,o=Wo(e),r=e.checked,u=e[Sn];if(qe(i)){let p=Di(i,o),d=p!==-1;if(r&&!d)u(i.concat(o));else if(!r&&d){let h=[...i];h.splice(p,1),u(h)}}else if(on(i)){let p=new Set(i);r?p.add(o):p.delete(o),u(p)}else u(Ju(e,r))})},mounted:Gu,beforeUpdate(e,t,s){e[Sn]=Ws(s),Gu(e,t,s)}};function Gu(e,{value:t,oldValue:s},i){e._modelValue=t;let o;if(qe(t))o=Di(t,i.props.value)>-1;else if(on(t))o=t.has(i.props.value);else{if(t===s)return;o=rn(t,Ju(e,!0))}e.checked!==o&&(e.checked=o)}var It={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,jn(e,"change",()=>{let o=Array.prototype.filter.call(e.options,d=>d.selected).map(d=>s?Us(Wo(d)):Wo(d)),r=e.multiple,u=r?on(e._modelValue)?new Set(o):o:o[0],p=e._pendingValue=[r,r?qe(u)?o.slice():o:u];try{e[Sn](u)}finally{Ye(()=>{e._pendingValue===p&&(e._pendingValue=void 0)})}}),e[Sn]=Ws(i)},mounted(e,{value:t}){Wu(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[Sn]=Ws(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!qg(t,s[1],s[0]))&&Wu(e,t)}};function qg(e,t,s){if(!s)return rn(e,t);if(qe(e))return rn(e,t);if(on(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function Wu(e,t){let s=e.multiple,i=qe(t);if(!(s&&!i&&!on(t))){for(let o=0,r=e.options.length;o<r;o++){let u=e.options[o],p=Wo(u);if(s)if(i){let d=typeof p;d==="string"||d==="number"?u.selected=t.some(h=>String(h)===String(p)):u.selected=Di(t,p)>-1}else u.selected=t.has(p);else if(rn(Wo(u),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Wo(e){return"_value"in e?e._value:e.value}function Ju(e,t){let s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}var $g=["ctrl","shift","alt","meta"],Fg={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)=>$g.some(s=>e[`${s}Key`]&&!t.includes(s))},le=(e,t)=>{if(!e)return e;let s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((o,...r)=>{for(let u=0;u<t.length;u++){let p=Fg[t[u]];if(p&&p(o,t))return}return e(o,...r)}))},Ug={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]=(o=>{if(!("key"in o))return;let r=mn(o.key);if(t.some(u=>u===r||Ug[u]===r))return e(o)}))},_g=gt({patchProp:Og},gg),Ku;function Bg(){return Ku||(Ku=Ru(_g))}var or=((...e)=>{let t=Bg().createApp(...e),{mount:s}=t;return t.mount=i=>{let o=Hg(i);if(!o)return;let r=t._component;!Fe(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");let u=s(o,!1,zg(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),u},t});function zg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Hg(e){return mt(e)?document.querySelector(e):e}var gs=typeof document<"u";function Zu(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function jg(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Zu(e.default)}var it=Object.assign;function ir(e,t){let s={};for(let i in t){let o=t[i];s[i]=tn(o)?o.map(e):e(o)}return s}var Ys=()=>{},tn=Array.isArray;function ja(e,t){let s={};for(let i in e)s[i]=i in t?t[i]:e[i];return s}var xu=/#/g,Gg=/&/g,Wg=/\//g,Kg=/=/g,Yg=/\?/g,ec=/\+/g,Xg=/%5B/g,Jg=/%5D/g,tc=/%5E/g,Qg=/%60/g,nc=/%7B/g,Zg=/%7C/g,sc=/%7D/g,xg=/%20/g;function Ga(e){return e==null?"":encodeURI(""+e).replace(Zg,"|").replace(Xg,"[").replace(Jg,"]")}function oc(e){return Ga(e).replace(nc,"{").replace(sc,"}").replace(tc,"^")}function za(e){return Ga(e).replace(ec,"%2B").replace(xg,"+").replace(xu,"%23").replace(Gg,"%26").replace(Qg,"`").replace(nc,"{").replace(sc,"}").replace(tc,"^")}function ev(e){return za(e).replace(Kg,"%3D")}function tv(e){return GLine 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 "${uv(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 bs(e,t){return it(new Error,{type:e,[pc]:!0},t)}function Pn(e,t){return e instanceof Error&&pc in e&&(t==null||!!(e.type&t))}var dv=["params","query","hash"];function uv(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of dv)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function fc(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 o=s[i].replace(xu," "),r=o.indexOf("="),u=Qs(r<0?o:o.slice(0,r)),p=r<0?null:Qs(o.slice(r+1));if(u in t){let d=t[u];rn(d)||(d=t[u]=[d]),d.push(p)}else t[u]=p}return t}function Ja(e){let t="";for(let s in e){let i=e[s];if(s=ev(s),i==null){i!==void 0&&(t+=(t.length?"&":"")+s);continue}(rn(i)?i.map(o=>o&&za(o)):[i&&za(i)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function mc(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=rn(i)?i.map(o=>o==null?null:""+o):i==null?i:""+i)}return t}var hc=Symbol(""),Qa=Symbol(""),ur=Symbol(""),cr=Symbol(""),pr=Symbol("");function xs(){let e=[];function t(i){return e.push(i),()=>{let o=e.indexOf(i);o>-1&&e.splice(o,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function _n(e,t,s,i,o,r=u=>u()){let u=i&&(i.enterCallbacks[o]=i.enterCallbacks[o]||[]);return()=>new Promise((p,d)=>{let h=v=>{v===!1?d(bs(gt.NAVIGATION_ABORTED,{from:s,to:t})):v instanceof Error?d(v):lv(v)?d(bs(gt.NAVIGATION_GUARD_REDIRECT,{from:t,to:v})):(u&&i.enterCallbacks[o]===u&&typeof v=="function"&&u.push(v),p())},m=r(()=>e.call(i&&i.instances[o],t,s,h)),y=Promise.resolve(m);e.length<3&&(y=y.then(h)),y.catch(v=>d(v))})}function fr(e,t,s,i,o=r=>r()){let r=[];for(let u of e)for(let p in u.components){let d=u.components[p];if(!(t!=="beforeRouteEnter"&&!u.instances[p]))if(Qu(d)){let h=(d.__vccOpts||d)[t];h&&r.push(_n(h,s,i,u,p,o))}else{let h=d();r.push(()=>h.then(m=>{if(!m)throw new Error(`Couldn't resolve component "${p}" at "${u.path}"`);let y=jg(m)?m.default:m;u.mods[p]=m,u.components[p]=y;let v=(y.__vccOpts||y)[t];return v&&_n(v,s,i,u,p,o)()}))}}return r}function gc(e,t){let s=[],i=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let u=0;u<r;u++){let p=t.matched[u];p&&(e.matched.find(h=>ys(h,p))?i.push(p):s.push(p));let d=e.matched[u];d&&(t.matched.find(h=>ys(h,d))||o.push(d))}return[s,i,o]}var cv=()=>location.protocol+"//"+location.host;function Tc(e,t){let{pathname:s,search:i,hash:o}=t,r=e.indexOf("#");if(r>-1){let u=o.includes(e.slice(r))?e.slice(r).length:1,p=o.slice(u);return p[0]!=="/"&&(p="/"+p),Wa(p,"")}return Wa(s,e)+i+o}function pv(e,t,s,i){let o=[],r=[],u=null,p=({state:v})=>{let b=Tc(e,location),w=s.value,k=t.value,N=0;if(v){if(s.value=b,t.value=v,u&&u===w){u=null;return}N=k?v.position-k.position:0}else i(b);o.forEach(C=>{C(s.value,w,{delta:N,type:lr.pop,direction:N?N>0?dr.forward:dr.back:dr.unknown})})};function d(){u=s.value}function h(v){o.push(v);let b=()=>{let w=o.indexOf(v);w>-1&&o.splice(w,1)};return r.push(b),b}function m(){if(document.visibilityState==="hidden"){let{history:v}=window;if(!v.state)return;v.replaceState(it({},v.state,{scroll:Jo()}),"")}}function y(){for(let v of r)v();r=[],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:h,destroy:y}}function vc(e,t,s,i=!1,o=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:o?Jo():null}}function fv(e){let{history:t,location:s}=window,i={value:Tc(e,s)},o={value:t.state};o.value||r(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(d,h,m){let y=e.indexOf("#"),v=y>-1?(s.host&&document.querySelector("base")?e:e.slice(y))+d:cv()+e+d;try{t[m?"replaceState":"pushState"](h,"",v),o.value=h}catch(b){console.error(b),s[m?"replace":"assign"](v)}}function u(d,h){r(d,it({},t.state,vc(o.value.back,d,o.value.forward,!0),h,{position:o.value.position}),!0),i.value=d}function p(d,h){let m=it({},o.value,t.state,{forward:d,scroll:Jo()});r(m.current,m,!0),r(d,it({},vc(i.value,d,null),{position:m.position+1},h),!1),i.value=d}return{location:i,state:o,push:p,replace:u}}function Pc(e){e=ac(e);let t=fv(e),s=pv(e,t.state,t.location,t.replace);function i(r,u=!0){u||s.pauseListeners(),history.go(r)}let o=it({locatLine truncated
|
||||
`);for(let d of p){if(d.startsWith("diff --git")){r(),u();continue}if(d.startsWith("--- ")){s&&s.lines.length&&r(),u().oldPath=d.replace(/^--- (a\/)?/,"").trim();continue}if(d.startsWith("+++ ")){u().newPath=d.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!/^(index |similarity index|rename |new file mode|deleted file mode|Binary files)/.test(d)){if(d.startsWith("@@")){let h=d.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);h&&(i=parseInt(h[1],10),o=parseInt(h[2],10)),u().lines.push({kind:"hunk",oldNo:"",newNo:"",text:d});continue}if(s)if(d.startsWith("+"))s.lines.push({kind:"add",oldNo:"",newNo:o++,text:d.slice(1)});else if(d.startsWith("-"))s.lines.push({kind:"remove",oldNo:i++,newNo:"",text:d.slice(1)});else{if(d.startsWith("\\"))continue;s.lines.push({kind:"ctx",oldNo:i++,newNo:o++,text:d.startsWith(" ")?d.slice(1):d})}}}return r(),t}var Qo=(e,t)=>{let s=[],i=[],o="",r=!1;for(let u=0;u<e.length;u++){let p=e[u];r?p==='"'?e[u+1]==='"'?(o+='"',u++):r=!1:o+=p:p==='"'&&o===""?r=!0:p===t?(i.push(o),o=""):p===`
|
||||
`+JSON.stringify(t):""}`},[ht.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${uv(t)}" via a navigation guard.`},[ht.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[ht.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[ht.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function hs(e,t){return it(new Error,{type:e,[fc]:!0},t)}function En(e,t){return e instanceof Error&&fc in e&&(t==null||!!(e.type&t))}var dv=["params","query","hash"];function uv(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of dv)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function mc(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 o=s[i].replace(ec," "),r=o.indexOf("="),u=Ks(r<0?o:o.slice(0,r)),p=r<0?null:Ks(o.slice(r+1));if(u in t){let d=t[u];tn(d)||(d=t[u]=[d]),d.push(p)}else t[u]=p}return t}function Ja(e){let t="";for(let s in e){let i=e[s];if(s=ev(s),i==null){i!==void 0&&(t+=(t.length?"&":"")+s);continue}(tn(i)?i.map(o=>o&&za(o)):[i&&za(i)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function hc(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=tn(i)?i.map(o=>o==null?null:""+o):i==null?i:""+i)}return t}var gc=Symbol(""),Qa=Symbol(""),dr=Symbol(""),ur=Symbol(""),cr=Symbol("");function Xs(){let e=[];function t(i){return e.push(i),()=>{let o=e.indexOf(i);o>-1&&e.splice(o,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function Ln(e,t,s,i,o,r=u=>u()){let u=i&&(i.enterCallbacks[o]=i.enterCallbacks[o]||[]);return()=>new Promise((p,d)=>{let h=v=>{v===!1?d(hs(ht.NAVIGATION_ABORTED,{from:s,to:t})):v instanceof Error?d(v):lv(v)?d(hs(ht.NAVIGATION_GUARD_REDIRECT,{from:t,to:v})):(u&&i.enterCallbacks[o]===u&&typeof v=="function"&&u.push(v),p())},m=r(()=>e.call(i&&i.instances[o],t,s,h)),y=Promise.resolve(m);e.length<3&&(y=y.then(h)),y.catch(v=>d(v))})}function pr(e,t,s,i,o=r=>r()){let r=[];for(let u of e)for(let p in u.components){let d=u.components[p];if(!(t!=="beforeRouteEnter"&&!u.instances[p]))if(Zu(d)){let h=(d.__vccOpts||d)[t];h&&r.push(Ln(h,s,i,u,p,o))}else{let h=d();r.push(()=>h.then(m=>{if(!m)throw new Error(`Couldn't resolve component "${p}" at "${u.path}"`);let y=jg(m)?m.default:m;u.mods[p]=m,u.components[p]=y;let v=(y.__vccOpts||y)[t];return v&&Ln(v,s,i,u,p,o)()}))}}return r}function vc(e,t){let s=[],i=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let u=0;u<r;u++){let p=t.matched[u];p&&(e.matched.find(h=>ms(h,p))?i.push(p):s.push(p));let d=e.matched[u];d&&(t.matched.find(h=>ms(h,d))||o.push(d))}return[s,i,o]}var cv=()=>location.protocol+"//"+location.host;function Pc(e,t){let{pathname:s,search:i,hash:o}=t,r=e.indexOf("#");if(r>-1){let u=o.includes(e.slice(r))?e.slice(r).length:1,p=o.slice(u);return p[0]!=="/"&&(p="/"+p),Wa(p,"")}return Wa(s,e)+i+o}function pv(e,t,s,i){let o=[],r=[],u=null,p=({state:v})=>{let b=Pc(e,location),w=s.value,C=t.value,N=0;if(v){if(s.value=b,t.value=v,u&&u===w){u=null;return}N=C?v.position-C.position:0}else i(b);o.forEach(k=>{k(s.value,w,{delta:N,type:ar.pop,direction:N?N>0?lr.forward:lr.back:lr.unknown})})};function d(){u=s.value}function h(v){o.push(v);let b=()=>{let w=o.indexOf(v);w>-1&&o.splice(w,1)};return r.push(b),b}function m(){if(document.visibilityState==="hidden"){let{history:v}=window;if(!v.state)return;v.replaceState(it({},v.state,{scroll:Ko()}),"")}}function y(){for(let v of r)v();r=[],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:h,destroy:y}}function yc(e,t,s,i=!1,o=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:o?Ko():null}}function fv(e){let{history:t,location:s}=window,i={value:Pc(e,s)},o={value:t.state};o.value||r(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(d,h,m){let y=e.indexOf("#"),v=y>-1?(s.host&&document.querySelector("base")?e:e.slice(y))+d:cv()+e+d;try{t[m?"replaceState":"pushState"](h,"",v),o.value=h}catch(b){console.error(b),s[m?"replace":"assign"](v)}}function u(d,h){r(d,it({},t.state,yc(o.value.back,d,o.value.forward,!0),h,{position:o.value.position}),!0),i.value=d}function p(d,h){let m=it({},o.value,t.state,{forward:d,scroll:Ko()});r(m.current,m,!0),r(d,it({},yc(i.value,d,null),{position:m.position+1},h),!1),i.value=d}return{location:i,state:o,push:p,replace:u}}function Ac(e){e=lc(e);let t=fv(e),s=pv(e,t.state,t.location,t.replace);function i(r,u=!0){u||s.pauseListeners(),history.go(r)}let o=it({locatLine truncated
|
||||
`);for(let d of p){if(d.startsWith("diff --git")){r(),u();continue}if(d.startsWith("--- ")){s&&s.lines.length&&r(),u().oldPath=d.replace(/^--- (a\/)?/,"").trim();continue}if(d.startsWith("+++ ")){u().newPath=d.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!/^(index |similarity index|rename |new file mode|deleted file mode|Binary files)/.test(d)){if(d.startsWith("@@")){let h=d.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);h&&(i=parseInt(h[1],10),o=parseInt(h[2],10)),u().lines.push({kind:"hunk",oldNo:"",newNo:"",text:d});continue}if(s)if(d.startsWith("+"))s.lines.push({kind:"add",oldNo:"",newNo:o++,text:d.slice(1)});else if(d.startsWith("-"))s.lines.push({kind:"remove",oldNo:i++,newNo:"",text:d.slice(1)});else{if(d.startsWith("\\"))continue;s.lines.push({kind:"ctx",oldNo:i++,newNo:o++,text:d.startsWith(" ")?d.slice(1):d})}}}return r(),t}var Yo=(e,t)=>{let s=[],i=[],o="",r=!1;for(let u=0;u<e.length;u++){let p=e[u];r?p==='"'?e[u+1]==='"'?(o+='"',u++):r=!1:o+=p:p==='"'&&o===""?r=!0:p===t?(i.push(o),o=""):p===`
|
||||
`||p==="\r"?(p==="\r"&&e[u+1]===`
|
||||
`&&u++,i.push(o),s.push(i),i=[],o=""):o+=p}return(o!==""||i.length)&&(i.push(o),s.push(i)),s.filter(u=>u.length>1||u[0]!=="")},Sr=e=>Math.min(((e||"").match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length+4,24),Uv=(function(){let e=s=>s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),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 o of s.lines)i.push('<tr class="diff-row diff-row-'+o.kind+'"><td class="diff-gutter diff-gutter-old">'+(o.oldNo||"")+'</td><td class="diff-gutter diff-gutter-new">'+(o.newNo||"")+'</td><td class="diff-sign">'+(o.kind==="add"?"+":o.kind==="remove"?"-":"")+'</td><td class="diff-code" style="--hang:'+Sr(o.text)+'ch">'+e(o.text)+"</td></tr>");i.push("</tbody></table>")}return i.push("</div>"),i.join("")};return s=>s&&Cr(s).map(t).join("")})();function el(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function _v(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 Bv(e){return String(e??"").toUpperCase()}function zv(e,t,s=0){return(e||[]).slice(s,s+t)}function Hv(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function jv(e,t){if(!t)return e||[];let s=Array.isArray(t)?t:[t];return[...e||[]].sort((i,o)=>{for(let r of s){let u=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let p=r.split(".").reduce((h,m)=>h?.[m],i),d=r.split(".").reduce((h,m)=>h?.[m],o);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 Er(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,o=>i[o])}function Gv(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function tl(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"}),o=new Date;o.setHours(0,0,0,0);let r=Math.round((s-o)/864e5),u;if(r===0)u="today";else if(r===1)u="tomorrow";else if(r===-1)u="yesterday";else{let p=Math.abs(r),d=Math.round(p/30.44),h=p<14?[p,"day"]:p<60?[Math.round(p/7),"week"]:d<18?[d,"month"]:[Math.round(p/365.25),"year"],m=h[0]+" "+h[1]+(h[0]===1?"":"s");u=r>0?"in "+m:m+" ago"}return i+" \xB7 "+u}function Jn(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=r=>String(r).padStart(2,"0"),o=Math.round(s);return o<3600?Math.floor(o/60)+"m "+i(o%60)+"s":Math.floor(o/3600)+"h "+i(Math.floor(o%3600/60))+"m"}function nl(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 Mc(e,t){return t?.split(".").reduce((s,i)=>s?.[i],e)}function Zo(e=null,t=new Map){let s=ct({}),i=[],o=!1,r=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:()=>r}),r.watch=(u,p,d=!1,h=!0)=>{let m=typeof u=="function"?()=>u(r):()=>Mc(r,u),y=dt(m,p,{deep:d,flush:"post"});return i.push(y),h&&Ye(()=>{o||p(m(),m())}),y},r.watchGroup=(u,p,d=!0)=>r.watch(()=>u.map(h=>Mc(r,h)),p,!0,d),r.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},r.emit=(u,...p)=>{for(let d of[...t.get(u)||[]])d({},...p)},r.dispose=()=>{o=!0,i.splice(0).reverse().forEach(u=>u())},Vn(r.dispose),r}function Pt(){let e=new Set,t=new Set,s=!1,i=(r,u=0)=>{if(s)return;let p=setTimeout(()=>{e.delete(p),r()},u);return e.add(p),p};i.cancel=r=>{clearTimeout(r),e.delete(r)};let o=(r,u)=>{if(s)return;let p=setInterval(r,u);return t.add(p),p};return o.cancel=r=>{clearInterval(r),t.delete(r)},Vn(()=>{s=!0,e.forEach(clearTimeout),t.forEach(clearInterval)}),{timeout:i,interval:o}}function Ut(){let e=new Set;return V
Line truncated
|
||||
`&&u++,i.push(o),s.push(i),i=[],o=""):o+=p}return(o!==""||i.length)&&(i.push(o),s.push(i)),s.filter(u=>u.length>1||u[0]!=="")},Cr=e=>Math.min(((e||"").match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length+4,24),Uv=(function(){let e=s=>s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),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 o of s.lines)i.push('<tr class="diff-row diff-row-'+o.kind+'"><td class="diff-gutter diff-gutter-old">'+(o.oldNo||"")+'</td><td class="diff-gutter diff-gutter-new">'+(o.newNo||"")+'</td><td class="diff-sign">'+(o.kind==="add"?"+":o.kind==="remove"?"-":"")+'</td><td class="diff-code" style="--hang:'+Cr(o.text)+'ch">'+e(o.text)+"</td></tr>");i.push("</tbody></table>")}return i.push("</div>"),i.join("")};return s=>s&&kr(s).map(t).join("")})();function el(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function _v(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 Bv(e){return String(e??"").toUpperCase()}function zv(e,t,s=0){return(e||[]).slice(s,s+t)}function Hv(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function jv(e,t){if(!t)return e||[];let s=Array.isArray(t)?t:[t];return[...e||[]].sort((i,o)=>{for(let r of s){let u=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let p=r.split(".").reduce((h,m)=>h?.[m],i),d=r.split(".").reduce((h,m)=>h?.[m],o);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 Sr(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,o=>i[o])}function Gv(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function tl(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"}),o=new Date;o.setHours(0,0,0,0);let r=Math.round((s-o)/864e5),u;if(r===0)u="today";else if(r===1)u="tomorrow";else if(r===-1)u="yesterday";else{let p=Math.abs(r),d=Math.round(p/30.44),h=p<14?[p,"day"]:p<60?[Math.round(p/7),"week"]:d<18?[d,"month"]:[Math.round(p/365.25),"year"],m=h[0]+" "+h[1]+(h[0]===1?"":"s");u=r>0?"in "+m:m+" ago"}return i+" \xB7 "+u}function Gn(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=r=>String(r).padStart(2,"0"),o=Math.round(s);return o<3600?Math.floor(o/60)+"m "+i(o%60)+"s":Math.floor(o/3600)+"h "+i(Math.floor(o%3600/60))+"m"}function nl(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 Vc(e,t){return t?.split(".").reduce((s,i)=>s?.[i],e)}function Xo(e=null,t=new Map){let s=ut({}),i=[],o=!1,r=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:()=>r}),r.watch=(u,p,d=!1,h=!0)=>{let m=typeof u=="function"?()=>u(r):()=>Vc(r,u),y=lt(m,p,{deep:d,flush:"post"});return i.push(y),h&&Ye(()=>{o||p(m(),m())}),y},r.watchGroup=(u,p,d=!0)=>r.watch(()=>u.map(h=>Vc(r,h)),p,!0,d),r.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},r.emit=(u,...p)=>{for(let d of[...t.get(u)||[]])d({},...p)},r.dispose=()=>{o=!0,i.splice(0).reverse().forEach(u=>u())},An(r.dispose),r}function Tt(){let e=new Set,t=new Set,s=!1,i=(r,u=0)=>{if(s)return;let p=setTimeout(()=>{e.delete(p),r()},u);return e.add(p),p};i.cancel=r=>{clearTimeout(r),e.delete(r)};let o=(r,u)=>{if(s)return;let p=setInterval(r,u);return t.add(p),p};return o.cancel=r=>{clearInterval(r),t.delete(r)},An(()=>{s=!0,e.forEach(clearTimeout),t.forEach(clearInterval)}),{timeout:i,interval:o}}function Ft(){let e=new Set;return A
Line truncated
|
||||
`)+`
|
||||
`,qc=e=>String(e??"").replace(/\\/g,"\\\\").replace(/\|/g,"\\|").replace(/\r?\n/g," ");function Hc(e,t,s=[]){return["| "+e.map(qc).join(" | ")+" |","| "+e.map((o,r)=>s[r]?"---:":"---").join(" | ")+" |",...t.map(o=>"| "+e.map((r,u)=>qc(o[u])).join(" | ")+" |")].join(`
|
||||
`,$c=e=>String(e??"").replace(/\\/g,"\\\\").replace(/\|/g,"\\|").replace(/\r?\n/g," ");function Hc(e,t,s=[]){return["| "+e.map($c).join(" | ")+" |","| "+e.map((o,r)=>s[r]?"---:":"---").join(" | ")+" |",...t.map(o=>"| "+e.map((r,u)=>$c(o[u])).join(" | ")+" |")].join(`
|
||||
`)+`
|
||||
`}var iy=Object.freeze({view:"table",query:"",sort:null,group:null,agg:"mean",sum:"mean",ranges:{},values:{},sums:{},numeric:[],chart:null,x:null,y:[]});function ry(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,o]]of Object.entries(e.ranges||{}))(i!=null||o!=null)&&t.set("range."+s,(i??"")+"~"+(o??""));for(let[s,i]of Object.entries(e.values||{}))for(let o of i||[])t.append("in."+s,o);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 ay(e){var d,h;let t=new URLSearchParams(e||""),s={...iy,ranges:{},values:{},sums:{},numeric:[],y:[]},i=t.get("view");["table","chart","raw"].includes(i)&&(s.view=i),s.query=t.get("q")||"";let o=t.get("sort");if(o){let m=/^(.*?)(?::(asc|desc))?$/.exec(o);s.sort={column:m[1],dir:m[2]||"asc"}}s.group=t.get("group")||null;let r=t.get("agg");r&&xo[r]&&(s.agg=r);for(let[m,y]of t.entries())if(m.startsWith("range.")){let[v,b]=y.split("~").map(w=>w===""||w==null?null:Number(w));s.ranges[m.slice(6)]=[Number.isFinite(v)?v:null,Number.isFinite(b)?b:null]}else m.startsWith("in.")?((d=s.values)[h=m.slice(3)]||(d[h]=[])).push(y):m.startsWith("sum.")&&xo[y]&&(s.sums[m.slice(4)]=y);let u=t.get("sum");u&&xo[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 ll=e=>"#"+e+":";function eo(e,t){if(!t||typeof e!="string"||!e.startsWith(ll(t)))return null;try{return ay(e.slice(ll(t).length))}catch{return null}}function jc(e,t){let s=ry(t);return s?ll(e)+s.replace(/%3A/gi,":").replace(/%7C/gi,"|").replace(/%7E/gi,"~").replace(/%2C/gi,","):""}var cl=e=>/^#table(?:-\d+)?:/.test(e||"");var pl=function(e,t=e){let s=/\bXXXX-\d+\b/g;t.on("dark-mode",(M,S)=>{e.aceOption&&(e.aceOption.theme=S?"nord_dark":"chrome")});let i=Pt(),o=Ut();e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent);let r={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"],h=["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 y(){return window.document.querySelector(".reading-layout .markdown-body")}function v(){let M=y();M&&(M.querySelectorAll("mark.md-find").forEach(S=>{S.replaceWith(window.document.createTextNode(S.textContent))}),M.normalize())}e.runMdFind=function(){v(),e.mdFindTotal=0,e.mdFindIndex=0;let M=(e.mdFindQuery||"").trim(),S=y();if(!M||!S)return;let q=!!e.mdFindCase,X=q?M:M.toLowerCase(),Z=window.document.createTreeWalker(S,4),G=[];for(;Z.nextNode();)(q?Z.currentNode.nodeValue:Z.currentNode.nodeValue.toLowerCase()).includes(X)&&G.push(Z.currentNode);let se=0;for(let te of G){let fe=te.nodeValue,we=q?fe:fe.toLowerCase(),_e=window.document.createDocumentFragment(),Je=0,Xe;for(;(Xe=we.indexOf(X,Je))!==-1;){_e.appendChild(window.document.createTextNode(fe.slice(Je,Xe)));let Pe=window.document.createElement("mark");Pe.className="md-find",Pe.textContent=fe.slice(Xe,Xe+M.length),_e.appendChild(Pe),se++,Je=Xe+M.length}_e.appendChild(window.document.createTextNode(fe.slice(Je))),te.parentNode.replaceChild(_e,te)}e.mdFindTotal=se,se&&e.stepMdFind(0)},e.stepMdFind=function(M){let S=y();if(!S||!e.mdFindTotal)return;let q=S.querySelectorAll("mark.md-find");e.mdFindIndex=(e.mdFindIndex+M+q.length)%q.length,q.forEach((X,Z)=>X.classList.toggle("is-current",Z===e.mdFindIndex)),q[e.mdFindIndex]?.scrollIntoView({block:"center",behavior:"smooth"})},e.toggleMdFind=function(M){if(e.mdFindOpen=M===void 0?!e.mdFindOpen:M,!e.mdFindOpen){v(),e.mdFindTotal=0;return}Ye(()=>window.document.querySelector(".md-find-input")?.focus())},e.findInFile=function(){let M=e.codeEditor;if(!M)return;M.focus(),M.execCommand("find");let S=()=>{let q=M.searchBox?.element;q&&(M.renderer.setScrollMargin(52,12,0,0),!q._dockObserver&&(q._dockObserver=new MutationObserver(()=>{M.renderer.setScrollMargin(q.style.display!=="none"
Line truncated
|
||||
`).forEach((S,q)=>{for(let[X,Z]of b){let G=X.exec(S);if(G&&!/^(if|for|while|switch|return|catch)$/.test(G[1])){M.push({name:G[1],kind:Z,line:q+1});break}}}),w={content:e.content,list:M.slice(0,300)},w.list},e.goToSymbol=function(M){e.symbolsOpen=!1;let S=e.codeEditor;S&&(S.scrollToLine(M-1,!0,!0,()=>{}),S.gotoLine(M,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+M),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 M=window.document.getElementById("goto-input");M&&(M.focus(),M.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let M=e.codeEditor;if(!M)return;let S=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),q=M.session.getLength();if(!S||+S[1]<1||+S[1]>q){e.gotoError="Enter a line from 1 to "+q;return}M.gotoLine(+S[1],S[2]?Math.max(0,+S[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",M.focus()},e.rootEntries=function(){return[...e.files||[]].sort((M,S)=>{let q=M.size==null,X=S.size==null;return q!==X?q?-1:1:M.name.localeCompare(S.name)})},e.formatSize=function(M){if(M==null)return"";if(M<1024)return M+" B";let S=M/1024,q=X=>X.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(M){if(!M)return null;let S=M.replace(/^\/+/,""),q=(e.files||[]).find(X=>(X.path?X.path+"/":"")+X.name===S);return q&&q.size!=null?q.size:null},e.revealFolder=function(M){e.sidebarHidden=!1,e.sidebarCollapsed=!1,Ye(()=>{let S=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(M):M)+'"]');S&&(S.closest("li")?.classList.contains("open")||S.click(),S.scrollIntoView({block:"nearest"}),S.focus())})};let k={content:null,n:0},N=M=>{if(k.content===M)return k.n;let S=M;if(typeof S=="string")try{S=JSON.parse(S)}catch{S=null}let q=[],X=G=>{Array.isArray(G)?q.push(G.join("")):typeof G=="string"&&q.push(G)};(S&&(S.cells||(S.worksheets||[]).flatMap(G=>G.cells||[]))||[]).forEach(G=>{X(G?.source??G?.input),(G?.outputs||[]).forEach(se=>{X(se?.text),se?.data&&(X(se.data["text/plain"]),X(se.data["text/markdown"]),X(se.data["text/html"])),X(se?.traceback)})});let Z=q.reduce((G,se)=>G+(se.match(s)||[]).length,0);return k={content:M,n:Z},Z};e.redactionCount=function(){return e.type==="IPython"?N(e.content):typeof e.content!="string"?0:((e.type==="html"?e.content.replace(/<[^>]*>/g," "):e.content).match(s)||[]).length},e.renderRedacted=to;let C=M=>M.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(M){let S=e.renderRedacted(M);if(!S||typeof window.DOMParser!="function")return S;let q=new window.DOMParser().parseFromString("<div>"+S+"</div>","text/html"),X={};return q.querySelectorAll("h1, h2, h3").forEach(Z=>{let G=Z.id||C(Z.textContent);X[G]?G+="-"+ ++X[G]:X[G]=1,Z.id=G}),q.body.firstChild.innerHTML};let P={content:null,list:[],title:null,count:0},I=()=>{if(e.type!=="html"||typeof e.content!="string")return{list:[],title:null,count:0};if(P.content===e.content)return P;let M=yr(e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)),S=M.length,q=null;if(M[0]?.level===1&&M.filter(X=>X.level===1).length===1){q=M[0],M=M.slice(1);let X=Math.min(...M.map(Z=>Z.level));M=M.map(Z=>({...Z,depth:Z.level-X}))}return P={content:e.content,list:M,title:q,count:S},P};e.readmeToc=()=>I().list,e.tocTitle=()=>I().title,e.tocCount=()=>I().count,e.activeHeading=null,o(window,"scroll",()=>{let M=e.readmeToc?e.readmeToc():[];if(e.tocCount()<3)return;let S=br(M.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(M){if(!M){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}wr(M),e.activeHeading=M};let F=()=>!e.preview&&eo(window.location.hash,"table")?.view||"table";e.csvView=F();let z={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(z.content!==e.content){let M=/\.tsv$/i.test(e.filePath||"")?" ":",";z={content:e.content,rows:Qo(e.content,M)}}return z.rows},e.redactParts=an,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 M=e.content;if(e.type==="html"&&e.url)if(e.preview)M=e.sourceContent;else try{M=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigato
Line truncated
|
||||
`).length:0,dy=e=>/\.(md|markdown|mdx)$/i.test(e?.filename||"")||e?.language==="Markdown";function Wc(e,t){let s=Ut();e.redactParts=an,e.hangIndent=Sr,e.isRedactedName=o=>/^XXXX-\d+$/.test(String(o||"").trim()),e.tocOpen=!1,e.activeAnchor="";let i=()=>{let o=t();if(!o.length)return;let r=br(o,{offset:64,scroller:window.document.querySelector("main.app-view")});e.activeAnchor!==r&&(e.activeAnchor=r)};return s(window,"scroll",i,{capture:!0,passive:!0}),s(window,"resize",i,{passive:!0}),s(window.document,"click",o=>{e.tocOpen&&!o.target.closest?.(".toc-menu")&&(e.tocOpen=!1)}),s(window.document,"keydown",o=>{o.key==="Escape"&&e.tocOpen&&(e.tocOpen=!1)}),e.jumpToAnchor=o=>{e.tocOpen=!1,wr(o)&&(e.activeAnchor=o)},i}var Dr=e=>(String(e||"").split(".").pop()||"").toLowerCase(),uy={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"},cy={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"},py=1024*1024;function no(e){if(e?.tooLarge)return"too-large";if(e?.hidden)return"hidden";let t=uy[Dr(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>py?"code":["markdown","notebook","csv","svg"].includes(t)?t:"code":"empty"}var fy=e=>["markdown","notebook","csv","svg"].includes(e),Gc={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 my(e,t){return t==="markdown"?"markdown":t==="notebook"?"json":t==="svg"?"markup":t==="csv"?"none":e?.language||Dr(e?.filename)||"none"}var hy=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 Kc(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=>fy(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:my(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",h=!p||d?cy[Dr(u.filename)]||(d?"application/octet-stream":"text/plain"):"text/plain",m=(u.filename||"")+"\0"+h+"\0"+(u.content||"").length;if(!s.has(m)){let y=d?hy(u.content):u.content||"";s.set(m,window.URL.createObjectURL(new window.Blob([y],{type:h+(d?"":";charset=utf-8")})))}return s.get(m)};e.gistMediaUrl=u=>i(u,!1),e.gistRawUrl=u=>i(u,!0);let o=new Map;e.gistCsvRows=u=>{let p=(u?.filename||"")+"\0"+(u?.content||"");return o.has(p)||o.set(p,Qo(u?.content||"",Dr(u?.filename)==="tsv"?" ":",")),o.get(p)},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(h=>h.id).join()===p.map(h=>h.id).join()||(e.fileOutlines={...e.fileOutlines,[u]:p})},e.gistToc=()=>(e.details?.files||[]).map((u,p)=>({id:e.gistFileId(p),index:p,parts:an(u.filename),kind:no(u),language:Gc[no(u)]&&no(u)!=="csv"?Gc[no(u)]:u.language||(no(u)==="csv"?"CSV":"Text"),lines:u.encoding==="base64"?null:ly(u.content),size:u.size,headings:dy(u)&&e.gistView(p)==="rendered"?e.fileOutlines[p]||[]:[]}));let r=()=>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(h=>h.id===e.activeAnchor));return p?p.index:0},Wc(e,r)}var gy=e=>e?.merged?"merged":e?.draft&&e?.state==="open"?"draft":e?.state==="closed"?"closed":"open";function Yc(e){let t={diff:null,threads:null,files:[]};e.prFiles=()=>{let s=e.details?.diff,i=e.details?.reviewC
Line truncated
|
||||
`}var iy=Object.freeze({view:"table",query:"",sort:null,group:null,agg:"mean",sum:"mean",ranges:{},values:{},sums:{},numeric:[],chart:null,x:null,y:[]});function ry(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,o]]of Object.entries(e.ranges||{}))(i!=null||o!=null)&&t.set("range."+s,(i??"")+"~"+(o??""));for(let[s,i]of Object.entries(e.values||{}))for(let o of i||[])t.append("in."+s,o);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 ay(e){var d,h;let t=new URLSearchParams(e||""),s={...iy,ranges:{},values:{},sums:{},numeric:[],y:[]},i=t.get("view");["table","chart","raw"].includes(i)&&(s.view=i),s.query=t.get("q")||"";let o=t.get("sort");if(o){let m=/^(.*?)(?::(asc|desc))?$/.exec(o);s.sort={column:m[1],dir:m[2]||"asc"}}s.group=t.get("group")||null;let r=t.get("agg");r&&Jo[r]&&(s.agg=r);for(let[m,y]of t.entries())if(m.startsWith("range.")){let[v,b]=y.split("~").map(w=>w===""||w==null?null:Number(w));s.ranges[m.slice(6)]=[Number.isFinite(v)?v:null,Number.isFinite(b)?b:null]}else m.startsWith("in.")?((d=s.values)[h=m.slice(3)]||(d[h]=[])).push(y):m.startsWith("sum.")&&Jo[y]&&(s.sums[m.slice(4)]=y);let u=t.get("sum");u&&Jo[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 ll=e=>"#"+e+":";function Qs(e,t){if(!t||typeof e!="string"||!e.startsWith(ll(t)))return null;try{return ay(e.slice(ll(t).length))}catch{return null}}function jc(e,t){let s=ry(t);return s?ll(e)+s.replace(/%3A/gi,":").replace(/%7C/gi,"|").replace(/%7E/gi,"~").replace(/%2C/gi,","):""}var cl=e=>/^#table(?:-\d+)?:/.test(e||"");var pl=function(e,t=e){let s=/\bXXXX-\d+\b/g;t.on("dark-mode",(M,S)=>{e.aceOption&&(e.aceOption.theme=S?"nord_dark":"chrome")});let i=Tt(),o=Ft();e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent);let r={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"],h=["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 y(){return window.document.querySelector(".reading-layout .markdown-body")}function v(){let M=y();M&&(M.querySelectorAll("mark.md-find").forEach(S=>{S.replaceWith(window.document.createTextNode(S.textContent))}),M.normalize())}e.runMdFind=function(){v(),e.mdFindTotal=0,e.mdFindIndex=0;let M=(e.mdFindQuery||"").trim(),S=y();if(!M||!S)return;let q=!!e.mdFindCase,Y=q?M:M.toLowerCase(),Q=window.document.createTreeWalker(S,4),j=[];for(;Q.nextNode();)(q?Q.currentNode.nodeValue:Q.currentNode.nodeValue.toLowerCase()).includes(Y)&&j.push(Q.currentNode);let se=0;for(let te of j){let fe=te.nodeValue,Se=q?fe:fe.toLowerCase(),Be=window.document.createDocumentFragment(),Qe=0,We;for(;(We=Se.indexOf(Y,Qe))!==-1;){Be.appendChild(window.document.createTextNode(fe.slice(Qe,We)));let Ae=window.document.createElement("mark");Ae.className="md-find",Ae.textContent=fe.slice(We,We+M.length),Be.appendChild(Ae),se++,Qe=We+M.length}Be.appendChild(window.document.createTextNode(fe.slice(Qe))),te.parentNode.replaceChild(Be,te)}e.mdFindTotal=se,se&&e.stepMdFind(0)},e.stepMdFind=function(M){let S=y();if(!S||!e.mdFindTotal)return;let q=S.querySelectorAll("mark.md-find");e.mdFindIndex=(e.mdFindIndex+M+q.length)%q.length,q.forEach((Y,Q)=>Y.classList.toggle("is-current",Q===e.mdFindIndex)),q[e.mdFindIndex]?.scrollIntoView({block:"center",behavior:"smooth"})},e.toggleMdFind=function(M){if(e.mdFindOpen=M===void 0?!e.mdFindOpen:M,!e.mdFindOpen){v(),e.mdFindTotal=0;return}Ye(()=>window.document.querySelector(".md-find-input")?.focus())},e.findInFile=function(){let M=e.codeEditor;if(!M)return;M.focus(),M.execCommand("find");let S=()=>{let q=M.searchBox?.element;q&&(M.renderer.setScrollMargin(52,12,0,0),!q._dockObserver&&(q._dockObserver=new MutationObserver(()=>{M.renderer.setScrollMargin(q.style.display!=="none"
Line truncated
|
||||
`).forEach((S,q)=>{for(let[Y,Q]of b){let j=Y.exec(S);if(j&&!/^(if|for|while|switch|return|catch)$/.test(j[1])){M.push({name:j[1],kind:Q,line:q+1});break}}}),w={content:e.content,list:M.slice(0,300)},w.list},e.goToSymbol=function(M){e.symbolsOpen=!1;let S=e.codeEditor;S&&(S.scrollToLine(M-1,!0,!0,()=>{}),S.gotoLine(M,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+M),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 M=window.document.getElementById("goto-input");M&&(M.focus(),M.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let M=e.codeEditor;if(!M)return;let S=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),q=M.session.getLength();if(!S||+S[1]<1||+S[1]>q){e.gotoError="Enter a line from 1 to "+q;return}M.gotoLine(+S[1],S[2]?Math.max(0,+S[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",M.focus()},e.rootEntries=function(){return[...e.files||[]].sort((M,S)=>{let q=M.size==null,Y=S.size==null;return q!==Y?q?-1:1:M.name.localeCompare(S.name)})},e.formatSize=function(M){if(M==null)return"";if(M<1024)return M+" B";let S=M/1024,q=Y=>Y.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(M){if(!M)return null;let S=M.replace(/^\/+/,""),q=(e.files||[]).find(Y=>(Y.path?Y.path+"/":"")+Y.name===S);return q&&q.size!=null?q.size:null},e.revealFolder=function(M){e.sidebarHidden=!1,e.sidebarCollapsed=!1,Ye(()=>{let S=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(M):M)+'"]');S&&(S.closest("li")?.classList.contains("open")||S.click(),S.scrollIntoView({block:"nearest"}),S.focus())})};let C={content:null,n:0},N=M=>{if(C.content===M)return C.n;let S=M;if(typeof S=="string")try{S=JSON.parse(S)}catch{S=null}let q=[],Y=j=>{Array.isArray(j)?q.push(j.join("")):typeof j=="string"&&q.push(j)};(S&&(S.cells||(S.worksheets||[]).flatMap(j=>j.cells||[]))||[]).forEach(j=>{Y(j?.source??j?.input),(j?.outputs||[]).forEach(se=>{Y(se?.text),se?.data&&(Y(se.data["text/plain"]),Y(se.data["text/markdown"]),Y(se.data["text/html"])),Y(se?.traceback)})});let Q=q.reduce((j,se)=>j+(se.match(s)||[]).length,0);return C={content:M,n:Q},Q};e.redactionCount=function(){return e.type==="IPython"?N(e.content):typeof e.content!="string"?0:((e.type==="html"?e.content.replace(/<[^>]*>/g," "):e.content).match(s)||[]).length},e.renderRedacted=Zs;let k=M=>M.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(M){let S=e.renderRedacted(M);if(!S||typeof window.DOMParser!="function")return S;let q=new window.DOMParser().parseFromString("<div>"+S+"</div>","text/html"),Y={};return q.querySelectorAll("h1, h2, h3").forEach(Q=>{let j=Q.id||k(Q.textContent);Y[j]?j+="-"+ ++Y[j]:Y[j]=1,Q.id=j}),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 M=vr(e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)),S=M.length,q=null;if(M[0]?.level===1&&M.filter(Y=>Y.level===1).length===1){q=M[0],M=M.slice(1);let Y=Math.min(...M.map(Q=>Q.level));M=M.map(Q=>({...Q,depth:Q.level-Y}))}return P={content:e.content,list:M,title:q,count:S},P};e.readmeToc=()=>D().list,e.tocTitle=()=>D().title,e.tocCount=()=>D().count,e.activeHeading=null,o(window,"scroll",()=>{let M=e.readmeToc?e.readmeToc():[];if(e.tocCount()<3)return;let S=yr(M.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(M){if(!M){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}br(M),e.activeHeading=M};let F=()=>!e.preview&&Qs(window.location.hash,"table")?.view||"table";e.csvView=F();let B={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(B.content!==e.content){let M=/\.tsv$/i.test(e.filePath||"")?" ":",";B={content:e.content,rows:Yo(e.content,M)}}return B.rows},e.redactParts=nn,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 M=e.content;if(e.type==="html"&&e.url)if(e.preview)M=e.sourceContent;else try{M=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigato
Line truncated
|
||||
`).length:0,dy=e=>/\.(md|markdown|mdx)$/i.test(e?.filename||"")||e?.language==="Markdown";function Wc(e,t){let s=Ft();e.redactParts=nn,e.hangIndent=Cr,e.isRedactedName=o=>/^XXXX-\d+$/.test(String(o||"").trim()),e.tocOpen=!1,e.activeAnchor="";let i=()=>{let o=t();if(!o.length)return;let r=yr(o,{offset:64,scroller:window.document.querySelector("main.app-view")});e.activeAnchor!==r&&(e.activeAnchor=r)};return s(window,"scroll",i,{capture:!0,passive:!0}),s(window,"resize",i,{passive:!0}),s(window.document,"click",o=>{e.tocOpen&&!o.target.closest?.(".toc-menu")&&(e.tocOpen=!1)}),s(window.document,"keydown",o=>{o.key==="Escape"&&e.tocOpen&&(e.tocOpen=!1)}),e.jumpToAnchor=o=>{e.tocOpen=!1,br(o)&&(e.activeAnchor=o)},i}var Ar=e=>(String(e||"").split(".").pop()||"").toLowerCase(),uy={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"},cy={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"},py=1024*1024;function xs(e){if(e?.tooLarge)return"too-large";if(e?.hidden)return"hidden";let t=uy[Ar(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>py?"code":["markdown","notebook","csv","svg"].includes(t)?t:"code":"empty"}var fy=e=>["markdown","notebook","csv","svg"].includes(e),Gc={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 my(e,t){return t==="markdown"?"markdown":t==="notebook"?"json":t==="svg"?"markup":t==="csv"?"none":e?.language||Ar(e?.filename)||"none"}var hy=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 Kc(e){e.gistViews={};let t=/^#table-(\d+):/.exec(window.location.hash||"");if(t){let u=Qs(window.location.hash,"table-"+t[1])?.view;(u==="chart"||u==="raw")&&(e.gistViews[+t[1]-1]=u)}e.gistKind=u=>xs(e.details?.files?.[u]),e.gistHasRendered=u=>fy(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:my(p,e.gistKind(u)),filename:"source.txt"}};let s=new Map;An(()=>{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",h=!p||d?cy[Ar(u.filename)]||(d?"application/octet-stream":"text/plain"):"text/plain",m=(u.filename||"")+"\0"+h+"\0"+(u.content||"").length;if(!s.has(m)){let y=d?hy(u.content):u.content||"";s.set(m,window.URL.createObjectURL(new window.Blob([y],{type:h+(d?"":";charset=utf-8")})))}return s.get(m)};e.gistMediaUrl=u=>i(u,!1),e.gistRawUrl=u=>i(u,!0);let o=new Map;e.gistCsvRows=u=>{let p=(u?.filename||"")+"\0"+(u?.content||"");return o.has(p)||o.set(p,Yo(u?.content||"",Ar(u?.filename)==="tsv"?" ":",")),o.get(p)},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(h=>h.id).join()===p.map(h=>h.id).join()||(e.fileOutlines={...e.fileOutlines,[u]:p})},e.gistToc=()=>(e.details?.files||[]).map((u,p)=>({id:e.gistFileId(p),index:p,parts:nn(u.filename),kind:xs(u),language:Gc[xs(u)]&&xs(u)!=="csv"?Gc[xs(u)]:u.language||(xs(u)==="csv"?"CSV":"Text"),lines:u.encoding==="base64"?null:ly(u.content),size:u.size,headings:dy(u)&&e.gistView(p)==="rendered"?e.fileOutlines[p]||[]:[]}));let r=()=>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(h=>h.id===e.activeAnchor));return p?p.index:0},Wc(e,r)}var gy=e=>e?.merged?"merged":e?.draft&&e?.state==="open"?"draft":e?.state==="closed"?"closed":"open";function Yc(e){let t={diff:null,threads:null,files:[]};e.prFiles=()=>{let s=e.details?.diff,i=e.details?.reviewC
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:o+1,headline:r,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},Ye(()=>e.jumpToAnchor(s.id)))},e.jumpToFile=s=>{e.collapsedFiles={...e.collapsedFiles,[s.index]:!1},e.jumpToAnchor(s.id)},Wc(e,()=>e.tabState?.active==="files"?e.prFiles().map(s=>s.id):[])}function Xc(e){return e?.body||e?.comments?.length||e?.reviewComments?.length?"conversation":e?.diff?"files":e?.commits?.length?"commits":"conversation"}function fl(e,t,s){let i,o=!1,r="form-draft:"+s,u=()=>Object.fromEntries(t.map(v=>[v,e[v]])),p=()=>JSON.stringify(u()),d=v=>{for(let b of t)Object.prototype.hasOwnProperty.call(v,b)&&(e[b]=v[b]);e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate))},h=()=>{try{window.sessionStorage.removeItem(r)}catch{}},m=(v=!1)=>{if(i!==void 0){if(v&&document.querySelectorAll("input, select, textarea").forEach(b=>{b._field?.binding.state===e&&b._field.timer&&b._field.commit()}),e.unsavedChanges=p()!==i,e.draftSaved=!1,!e.unsavedChanges){h();return}try{window.sessionStorage.setItem(r,JSON.stringify({account:e.user?.username||null,savedAt:Date.now(),values:u()})),e.draftSaved=!0}catch{}}},y=()=>m(!0);return e.on("routeLeave",y),window.addEventListener("beforeunload",y),e.on("dispose",()=>window.removeEventListener("beforeunload",y)),{restore(){i=p();let v;try{v=JSON.parse(window.sessionStorage.getItem(r)||"null")}catch{}let b=v&&v.account===(e.user?.username||null)&&Date.now()-v.savedAt<30*6e4&&v.values;return b&&(d(v.values),e.draftRestored=!0),o||(o=!0,e.watch(()=>u(),()=>m(),!0)),e.unsavedChanges=p()!==i,!!b},checkpoint(){return document.querySelectorAll("input, select, textarea").forEach(v=>{v._field?.binding.state===e&&v._field.timer&&v._field.commit()}),JSON.parse(p())},accept(v){i=JSON.stringify(v),e.draftRestored=!1,m()},discard(){document.querySelectorAll("input, select, textarea").forEach(v=>{v._field?.binding.state!==e||!v._field.timer||(clearTimeout(v._field.timer),v._field.timer=null,v.value=v._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,h()}}}function Jc(e,t){e.errorSource="central",e.logView={search:"",severity:"",sort:"recent"},e.selectedLog=null,e.logDetailTab="overview",e.logSeverity=y=>Number(y?.status||y?.httpStatus)>=500||["error","fatal"].includes(y?.severity)?"error":y?.severity==="warn"?"warn":"info",e.filteredLogGroups=()=>{let y=e.logView.search.trim().toLowerCase();return(e.logData?.groups||[]).filter(v=>(!e.logView.severity||e.logSeverity(v.sample)===e.logView.severity)&&(!y||Object.values(v.sample).join(" ").toLowerCase().includes(y))).slice().sort((v,b)=>e.logView.sort==="count"?b.count-v.count:Date.parse(b.last)-Date.parse(v.last))},e.shortLogId=y=>y?y.slice(0,8):"",e.isLogIdentifier=(y,v)=>typeof v=="string"&&v.length>16&&/(?:id|sha|release)$/i.test(y),e.compactLogValue=y=>String(y).slice(0,8)+"\u2026"+String(y).slice(-4),e.logCopyStatus="",e.copyLogValue=async y=>{try{await navigator.clipboard.writeText(String(y)),e.logCopyStatus="Full value copied"}catch{e.logCopyStatus="Copy unavailable. Expand the value to select it."}},e.logExplanation=y=>{let v=y.service||"The application",b={job_failed:"reported a failed job",request_failed:"reported a failed request",request_aborted:"reported an aborted request",edge_request:"recorded an edge request",http_access:"recorded an HTTP request"}[y.event]||"recorded \u201C"+(y.event||"application event")+"\u201D",w=Number(y.status||y.httpStatus),k={502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"}[w];return v+" "+b+(w?" with HTTP "+w+(k?" ("+k+")":""):"")+"."},e.logEvidence=y=>[y.errorCode?"Recorded error code: "+y.errorCode+".":"No error code was included in this sample.",y.ms!==void 0?"Recorded duration: "+y.ms+" ms.":"",y.attempt!==void 0?"Recorded attempt: "+y.attempt+".":"",y.queue?"Queue: "+y.queue+".":""].filter(Boolean).join(" "),e.occurrenceTime=y=>Number.isFinite(Date.parse(y))?new Date(y).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"medium"}):"Time not captured",e.historyOccurrences=y=>(y?._related||[]).slice().sort((v,b)=>Date.parse(b.ts)-Date.parse(v.ts)),e.historyDetailFields=y=>{try{let v=JSON.parse(y?._detailJson||"{}");return v&&typeof v=="object"?Object.entries(v):[["value",v]]}catch{return[["record",y?._detailJson||""]]}},e.logFieldText=y=>typeof y=="object"?JSON.stringify(y):String(y??""),e.captureErrorScroll=y=>{let v=[];for(let b=y?.parentElement;b;b=b.parentElement)v.push({element:b,top:b.scrollTop,left:b.scrollLeft});return v},e.restoreErrorScroll=y=>y.forEach(({element:v,top:b,left:w})=>{v.isConnected&&(v.scrollTop=b,v.scrollLeft=w)});let s=null,i=null,o=null,r=[];e.selectLog=async(y,v)=>{if(i=v||document.activeElement,
Line truncated
|
||||
`+k.join(`
|
||||
`)],{type:"text/csv"}),C=document.createElement("a");C.href=URL.createObjectURL(N),C.download=i.username+"-repositories.csv",C.click()},e.showStatusMessage=v=>{let b=v.statusMessage||"(no message)";window.prompt(`Status message for ${v.repoId} (${v.status}):`,b)},e.fetchGithubInfo=v=>{let b=window.open("","_blank");b&&b.document.write("<pre>Loading GitHub info for "+v.repoId+"...</pre>"),t.get("/api/admin/repos/"+v.repoId+"/github").then(w=>{b&&(b.document.open(),b.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(w.data,null,2).replace(/[<>]/g,k=>k==="<"?"<":">")+"</pre>"),b.document.close())},w=>{let k=w&&w.data?JSON.stringify(w.data,null,2):String(w);b&&(b.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+k+"</pre>")})};function d(v){t.get("/api/admin/users/"+v+"/repos",{}).then(b=>{e.repositories=b.data},b=>{console.error(b)})}function h(v){t.get("/api/admin/users/"+v,{}).then(b=>{e.userInfo=b.data},b=>{console.error(b)})}h(i.username),d(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>h(i.username),v=>console.error(v))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>h(i.username),v=>console.error(v))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>h(i.username),v=>console.error(v))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>h(i.username),v=>console.error(v))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function m(){t.get("/api/admin/tokens").then(v=>{e.tokens=v.data||[]},v=>{v.status!==401&&v.status!==403&&console.error(v)})}m(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(v=>{e.tokenForm.plaintext=v.data.token,e.tokenForm.name="",m()},v=>console.error(v))},e.revokeToken=v=>{confirm(`Revoke token "${v.name}"?`)&&t.delete("/api/admin/tokens/"+v.id).then(()=>m(),b=>console.error(b))},e.removeCache=v=>{confirm("Remove cached files for "+v.repoId+"?")&&t.delete("/api/admin/repos/"+v.repoId).then(()=>d(i.username),b=>console.error(b))},e.removeRepository=v=>{confirm("Remove repository "+v.repoId+"?")&&t.delete("/api/repo/"+v.repoId+"/").then(()=>d(i.username),b=>console.error(b))},e.updateRepository=v=>{let b=ct({title:`Refreshing ${v.repoId}...`,date:new Date,body:`The repository ${v.repoId} is going to be refreshed.`});e.toasts.push(b),t.post(`/api/repo/${v.repoId}/refresh`).then(w=>{w.data.status=="ready"?b.title=`${v.repoId} is refreshed.`:b.title=`Refreshing of ${v.repoId}.`},w=>{b.title=`Error during the refresh of ${v.repoId}.`,b.body=w.body})},e.getGitHubRepositories=v=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(b=>{e.userInfo.repositories=b.data})};let y=null;e.watch("query",()=>{o.timeout.cancel(y),y=o.timeout(()=>{d(i.username)},500)},!0)},ep=function(e,t,s){let i=Pt(),o=Ut();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let r=w=>{if(w.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){w.preventDefault();let k=document.querySelector('.admin-filter-toolbar input[type="search"]');k&&k.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),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.dateFrom||e.query.dateTo)&&w.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=w};e.statusCountFor=w=>{let k=(e.statusCounts||[]).find(N=>N._id===w);return k?k.count:0},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.conferences.filterPrefs",d={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},h=loadFilterPrefs(p)||{};e.query=Object.assign({},d,h,{page:1,search:""});let m=s.search();m.search&&(e.query.search=m.search);let y="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(y)||"[]"),e.savePreset=()=>{let w=window.prompt("Preset name:");if(!w)return;let k=Object.assign({},e.query);delete k.page,e.presets=(e.presets||[]).filter(N=>N.name!==w),e.presets.push({name:w,query:k}),localStorage.setItem(y,JSON.stringify(e.presets))},e.applyPreset=w=>{Object.assign(e.query,w.query,{page:1})},e.deletePreset=w=>{e.presets=(e.presets||[]).filter(k=>k.name!==w.name),localStorage.setItem(y,JS
Line truncated
|
||||
`):typeof U.stack=="string"?U.stack:null;for(var W=[U.cause,U.err].filter(Boolean),M=0;!q&&M<W.length;M++)for(var S=W[M];!q&&S&&typeof S=="object";)typeof S.stack=="string"&&(q=S.stack),S=S.cause;L._stack=q}else L.displayMessage=L.message,L._status=null,L._url=null,L._stack=null;return L._bucket=v(U,L.level),L._detailJson=w(L,U),L}function w(L,U){let W=[],M=(Z,G)=>{G==null||G===""||W.push([Z,G])};for(let Z of["service","event","severity","requestId","jobId"])M(Z,U&&U[Z]);M("name",U&&U.name),M("code",L.displayMessage||U&&U.message),L._bucket&&M("kind",L._bucket),M("httpStatus",U&&U.httpStatus),U&&U.status&&!U.httpStatus&&M("status",U.status),M("module",L.module);let S=U&&U.detail;if(typeof S=="string"){let Z=S.trim();if(Z[0]==="{"||Z[0]==="[")try{S=JSON.parse(S)}catch{}}if(M("detail",S),M("repoId",U&&U.repoId),M("filePath",U&&U.filePath),M("upstreamStatus",U&&U.upstreamStatus),M("upstreamBody",U&&U.upstreamBody),M("url",L._url),M("err",U&&U.err),M("cause",U&&!U.err&&U.cause),M("ts",L.ts),!W.length)return JSON.stringify(L,null,2);let q=W.reduce((Z,G)=>Math.max(Z,G[0].length),0),X=["{"];return W.forEach(([Z,G],se)=>{let fe=` ${`"${Z}":`.padEnd(q+3," ")} `,we=se<W.length-1?",":"",_e;if(G&&typeof G=="object"){let Je=" ".repeat(fe.length);_e=JSON.stringify(G,null,2).split(`
|
||||
`).map((Xe,Pe)=>Pe===0?Xe:Je+Xe).join(`
|
||||
`)}else typeof G=="number"||typeof G=="boolean"?_e=String(G):_e=JSON.stringify(G);X.push(`${fe}${_e}${we}`)}),X.push("}"),X.join(`
|
||||
`)}function k(L){let U=[],W="",M=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,S=0,q;for(;q=M.exec(L);)W+=L.slice(S,q.index),S=M.lastIndex,U.push({key:q[1],op:q[2]||"=",val:q[3]});return W+=L.slice(S),{filters:U,free:W.trim().toLowerCase()}}function N(L,U){for(let W of U.filters){let M=(q,X,Z)=>{let G=parseFloat(q),se=parseFloat(X);return Z==="="?String(q)===String(X):Z==="!="?String(q)!==String(X):Z===">="?G>=se:Z==="<="?G<=se:Z===">"?G>se:Z==="<"?G<se:!0},S;if(W.key==="code")S=L.displayMessage;else if(W.key==="module")S=L.module;else if(W.key==="status")S=L._status;else if(W.key==="url")S=L._url;else if(W.key==="repo")S=L._repoId;else if(W.key==="level")S=L.level;else continue;if(S==null||!M(S,W.val,W.op))return!1}return!(U.free&&((L.displayMessage||"")+" "+(L.module||"")+" "+(L._url||"")+" "+JSON.stringify(L.raw||[])).toLowerCase().indexOf(U.free)===-1)}function C(){let L=k(e.query.search||"");e.parsedFilterCount=L.filters.length;let U=e.query.bucket,W=e.entries.filter(Z=>U&&Z._bucket!==U?!1:N(Z,L)),M=e.query.group;if(M){let Z=te=>JSON.stringify(M==="module"?[te.module,te._bucket]:[te.raw?.[0]?.service||"unknown",te.module,te.displayMessage||te.message||"_",te._bucket,te._status]),G=new Map;for(let te of W){let fe=Z(te);if(G.has(fe)){let we=G.get(fe);we.count++,we._related.push(te),new Date(te.ts)>new Date(we.ts)&&(we.ts=te.ts,we._url=te._url,we._status=te._status),new Date(te.ts)<new Date(we._firstSeen)&&(we._firstSeen=te.ts)}else{let we=Object.assign({},te);we._key=`${M}:${fe}`,we._related=[te],we._firstSeen=te.ts,we._lastHourCount=0,we.count=1,G.set(fe,we)}}let se=Date.now()-3600*1e3;for(let te of G.values())te._lastHourCount=te._related.filter(fe=>new Date(fe.ts).getTime()>=se).length;W=Array.from(G.values())}else W=W.map((Z,G)=>(Z._key="row:"+G+":"+Z.ts,Z._related=[Z],Z._firstSeen=Z.ts,Z._lastHourCount=0,Z.count=1,Z));let S=Z=>({error:0,warn:1,info:2})[Z._bucket]??1;e.query.sort==="count"?W.sort((Z,G)=>S(Z)-S(G)||G.count-Z.count||new Date(G.ts)-new Date(Z.ts)):W.sort((Z,G)=>S(Z)-S(G)||new Date(G.ts)-new Date(Z.ts)),e.visible=W;let q=!!(e.query.bucket||(e.query.search||"").trim()),X=!q&&(e.stats?.severity?.error||0)>0&&!W.some(Z=>Z._bucket==="error")&&e.entries.length<1500;(q&&!W.length||X)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,P(!0))}function P(L){if(L&&e.redisLoading)return;let U=++o;e.redisLoading=!0;let W=L?e.redisNextOffset||e.entries.length:0,M=L?e.pageSize:Math.max(e.pageSize,e.redisNextOffset||e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:W,limit:M}}).then(S=>{if(p||U!==o)return;e.redisLoading=!1;let q=(S.data.entries||[]).map(b);e.entries=L?e.entries.concat(q):q,e.redisRedacted=(L&&e.redisRedacted||0)+(S.data.redactedEntries||0),e.redisNextOffset=S.data.nextOffset??W+(S.data.entries||[]).length,e.available=!!S.data.available,e.redisCollecting=S.data.redisCollecting!==!1,e.cap=S.data.max||e.cap,e.total=S.data.total||e.entries.length,e._autoLoading=!1,C()},()=>{p||U!==o||(e.redisLoading=!1,e._autoLoading=!1,e.available=!1)})}e.loadMore=()=>P(!0),e.canLoadMore=()=>(e.redisNextOffset||e.entries.length)<e.total;function I(L=!1){if(L&&u)return;let U=++r;u=!0,t.get("/api/admin/errors/stats").then(W=>{if(p||U!==r)return;u=!1;let M=W.data||{};e.redisStatsState=M.available===!1?"unavailable":"ready";let S=M.prev24h?Math.round((M.last24h-M.prev24h)/M.prev24h*100):0;e.stats={last24h:M.last24h||0,prev24h:M.prev24h||0,delta:S,severity:M.severity||{error:0,warn:0,info:0},unique:M.unique||{error:0,warn:0,info:0},buckets:M.buckets||[],dropped:M.dropped||0},C()},()=>{!p&&U===r&&(u=!1,e.redisStatsState="unavailable")})}function F(L=!1){(!L||!e.redisLoading)&&P(),I(L)}e.barPx=(L,U)=>{let W=e.stats.buckets||[],M=0,S=0;for(let G of W)M=Math.max(M,(G.error||0)+(G.warn||0)),S=Math.max(S,G.info||0);let q=L[U]||0;if(!q)return 0;if(U==="info")return S?Math.max(2,Math.round(q/S*(M?16:60))):0;let X=(L.error||0)+(L.warn||0),Z=Math.round(X/M*44);return Math.max(4,Math.round(q/X*Z))},e.bucketTitle=L=>`${new Date(L.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${L.error||0} err \xB7 ${L.warn||0} warn \xB7 ${L.info||0} info`,e.toggle=async(L,U)=>{h=U||document.activeElement,m=e.captureErrorScroll(h),e.historySelected=L,e.historyView="overview",e.expanded={[L._key]:!0},await Ye(),document.getElementById("history-inspector-title")?.focus({preventScroll:!0}),document.getElementById("history-inspector-title")?.scrollIntoView?.({block:"nearest"})},e.showHistoryTimeline=L=>{if(e.historyView="timeline",e.traceSelection)return;let U=["requestId","jobId"].find(W=>e.logTraceId(e.historySelected,W));U&&e.lookupTrace(U,e.logTraceId(e.historySelected,U),L,e.historySelected)},e.closeHistory=async()=>{let L=e.historySelected?._key;e.historySelected=null,e.expanded={},e.traceSelection&&await e.closeTrace(),await Ye(),(h?.isConnected?h:[...document.querySelectorAll("[data-history-key]")].find(W=>W.dataset.historyKey===L))?.focus({preventScroll:!0}),e.restoreError
Line truncated
|
||||
`)],{type:"text/csv;charset=utf-8"}),M=URL.createObjectURL(W),S=document.createElement("a");S.href=M,S.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(S),S.click(),document.body.removeChild(S),URL.revokeObjectURL(M)};function z(L){e.copyHint=`${L} copied`,d.timeout(()=>{e.copyHint=""},1500)}e.copyJson=L=>{navigator.clipboard.writeText(L._rawJson).then(()=>z("JSON"))},e.copyCurl=L=>{if(!L._url)return;let W=`curl -X ${L._method||"GET"} '${window.location.origin}${L._url}'`;navigator.clipboard.writeText(W).then(()=>z("curl"))},F();let K=i(()=>{e.query.autoRefresh&&F(!0)},15e3);e.on("dispose",()=>{p=!0,o++,r++,i.cancel(K)}),e.watch("query.search",C),e.watch("query.bucket",C),e.watch("query.sort",C),e.watch("query.group",C)},sp=function(e,t,s,i){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null){s.url("/");return}e.data=null,e.loading=!0,e.error=null,e.performance=null,e.performanceMinutes=15,e.performanceTab="routes",e.cacheReport=null,e.cacheError=null,e.cacheMinutes=60,e.cacheTraffic="all",e.ovView=["performance","cache"].includes((window.location.hash||"").slice(1))?window.location.hash.slice(1):"summary",e.setOvView=function(C){e.ovView=C;try{window.history.replaceState(null,"",C==="summary"?window.location.pathname:"#"+C)}catch{}};var o=!1;e.loadCache=function(){if(!o){o=!0;var C=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:C}}).then(function(P){C===e.cacheMinutes&&(e.cacheReport=P.data,e.cacheError=P.data.available?null:P.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){o=!1,C!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(C){return e.cacheTraffic==="all"||C.traffic===e.cacheTraffic})},e.cacheRate=function(C,P){var I=e.cacheRows(),F=function(L){return I.filter(function(U){return U.name===L}).reduce(function(U,W){return U+W[P]},0)},z=F(C+"_hit"),K=F(C+"_miss");return z+K?(100*z/(z+K)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(C){return C.replaceAll("_"," ")},e.cacheP95=function(C){var P=0,I=e.cacheReport?.latencyBucketsMs||[];if(!C.count)return"No samples";if(!C.ms)return"Not timed";for(var F=0;F<=I.length;F++)if(P+=C["b"+F]||0,P>=Math.ceil(C.count*.95))return F<I.length?"\u2264 "+Jn(I[F]):"> 10\u202Fs";return"No samples"},e.healthAlert=function(){let C=e.data&&e.data.system||{},P=[["Memory",C.memPercent],["Disk",C.diskPercent]].filter(([,F])=>F>90);return P.length?P.map(([F,z])=>F+" is at "+z+"%").join(" and ")+". New anonymizations may fail until "+(P.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(C){return C==null?"":Jn(C)},e.latencyBound=function(C,P){return C.count?C[P]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(C[P]):"No samples"},e.firstByteBound=function(C){return e.latencyBound({count:C.firstByteCount,p95UpperMs:C.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(C){return Math.max(0,Math.round((Date.now()-C.sampledAt)/1e3))},e.peakRss=function(C){return(e.performance.runtimeSeries||[]).filter(function(P){return P.instance===C.instance}).reduce(function(P,I){return Math.max(P,I.rss)},C.memory.rss)},e.performanceWarning=function(C){return e.sampleAge(C)>45||C.droppedBatches||C.droppedMetrics||C.sockets?.closeWait>0||C.eventLoop?.p95Ms>100||C.memoryLimitBytes&&C.memory.rss>C.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var C=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==C&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:C}}).then(function(P){C===e.performanceMinutes&&(e.performance=P.data,e.performanceError=P.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){C===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,C!==e.performanceMinutes&&e.loadPerformance()}))};function u(C){if(C==null)return"\u2014";for(var P=["B","KB","MB","GB","TB"],I=0,F=C;F>=1024&&I<P.length-1;)F/=1024,I++;return F.toFixed(I>0?1:0).replace(/\.0$/,"")+" "+P[I]}e.humanBytes=u;function p(C){if(!C)return"\u2014";var P=Math.floor(C/86400),I=Math.floor(C%86400/3600),F=Math.floor(C%3600/60);return P>0?P+"d "+(I<10?"0":"")+I+"h":I>0?I+"h "+(F<10?"0":"")+F+"m":F+"m"}e.humanDuration=p;function d(C){return C==null?"\u2014":C>=1e6?(C/1e6).toFixed(1)+"M":C>=1e3?(C/1e3).toFixed(1)+"K":String(C)}e.humanNum=d,e.queueTotal=function(C){return C?(C.waiting||0)+(C.active||0)+(C.delayed||0)+(C.failed||0):0},e.statusCount=function(C){if(!e.data||!e.data.repos)return 0;for(var P=e.data.repos.statusBreakdown||[],I=0;I<P.length;I++)if(P[I]._id===C)return P[I].count;return 0},e.barPct=function(C){var P=e.data&&e.data.repos?e.data.repos.total:0;if(!P)return 0;var I=[C];C==="expired"&&I.push("expiring"),C==="removed"&&
Line truncated
|
||||
`)},e.tipSide=w=>{let k=(e.summary?.series||[]).length;return k<3?"":w<k/4?"tip-start":w>=k*3/4?"tip-end":""},e.bucketName=()=>({day:"day",week:"week",month:"month"})[e.summary?.bucket]||"day",e.seriesSales=()=>(e.summary?.series||[]).reduce((w,k)=>w+e.bucketTotal(k),0),e.plansWithActivity=()=>(e.summary?.plans||[]).filter(w=>w.active||w.allTimeSales||w.sales),e.familyLabel=w=>(Ir.find(k=>k.id===w)||{}).label||"",e.familyPlans=w=>(e.summary?.plans||[]).filter(k=>k.family===w),e.familySum=(w,k)=>e.familyPlans(w).reduce((N,C)=>N+(C[k]||0),0),e.familyMoney=(w,k,N)=>{if(!e.revenueOn())return"\u2014";let C=e.familyPlans(w);return C.some(P=>P[N]===!1)?"Incomplete":e.moneyText(C.reduce((P,I)=>r(P,I[k]),{}))},e.planTotals=()=>{let w=k=>(e.summary?.plans||[]).reduce((N,C)=>N+(C[k]||0),0);return{active:w("active"),sales:w("sales"),allTimeSales:w("allTimeSales")}},e.webhookState=()=>{let w=e.summary?.webhooks;return w?w.failed||w.reconciliationFailed?"bad":w.oldestPendingSeconds>900||w.unreviewedRevocations?"warn":"ok":"ok"},e.age=w=>w?Jn(w*1e3):"\u2014";let u=0;e.loadSummary=()=>{let w=++u;e.summaryLoading=!0,e.summaryError=null,t.get("/api/admin/billing/summary",{params:{period:e.period}}).then(k=>{if(w!==u)return;e.summaryLoading=!1;let N=k.data;if(!N||!N.subscriptions||!N.sales||!Array.isArray(N.plans)){e.summaryError="The billing summary had an unexpected format.";return}e.summary=N},k=>{w===u&&(e.summaryLoading=!1,e.summaryError=k&&k.data&&k.data.error||"Could not load billing figures.")})},e.setPeriod=w=>{if(e.period!==w){e.period=w;try{localStorage.setItem("admin.billing.period",w)}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=w=>{e.query.state=w==="all"?"":w,e.query.page=1},e.stateCount=w=>w==="all"?["active","expired","revoked"].reduce((k,N)=>k+(e.stateCounts[N]||0),0):e.stateCounts[w]||0,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":"",e.chips=[];let d=()=>{let w=[];e.query.plan&&w.push({key:"plan",label:"Plan",value:e.planName(e.query.plan)}),e.query.status&&w.push({key:"status",label:"Stripe status",value:e.query.status.replace(/_/g," ")}),e.query.period&&w.push({key:"period",label:"Started",value:"last "+((e.periods.find(k=>k.id===e.query.period)||{}).label||e.query.period)}),e.chips=w};e.clearFilter=w=>{e.query[w]="",e.query.page=1},e.filterPlan=w=>{Object.assign(e.query,{plan:w,page:1});let k=document.getElementById("bl-grants");k&&k.scrollIntoView&&k.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(w=>e.query[w]).length,e.amountText=w=>{if(!w.amount)return"\u2014";let k=Cs({[w.amount.currency]:w.amount.value})[0]||"\u2014";if(!w.amount.interval)return k;let N=w.amount.intervalCount>1?w.amount.intervalCount+" "+w.amount.interval+"s":w.amount.interval;return k+" / "+N},e.amountTitle=w=>w.amount?"Stripe list price"+(w.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."}[w.amountMissing]||"Revenue unavailable.",e.endText=w=>{if(w.never)return"Never ends";if(!w.until)return"\u2014";let k=Er(w.until);return w.state!=="active"?(new Date(w.until)<new Date?"Ended ":"Ends ")+k:w.subscription?(w.cancelAtPeriodEnd?"Ends ":"Renews ")+k:"Until "+k},e.packNote=w=>{let k=(w.parts||[]).find(N=>N.planId==="author_pass");return!w.pack||!k||!k.until?"":(new Date(k.until)<new Date?"Updates ended ":"Updates until ")+Er(k.until)};let h={repo_slot:"repository",author_pass:"updates",repo_extend:"+1 year"};e.packParts=w=>(w.parts||[]).map(k=>h[k.planId]||e.planName(k.planId)).join(", ").replace(/^./,k=>k.toUpperCase()),e.packPartsTitle=w=>"Paper pack: "+(w.parts||[]).map(k=>e.planName(k.planId)).join(", "),e.statusText=w=>(w.status||"unknown").replace(/_/g," "),e.revocationText=w=>w==="dispute"?"Disputed":w==="full_refund"?"Refunded":"Revoked",e.scopeHref=w=>w?.kind==="repo"?"/admin/repositories?search="+encodeURIComponent(w.id):w?.kind==="conference"?"/conference/"+encodeURIComponent(w.id):null;let m=0;function y(){let w=++m;e.grantsError=null;let k=Object.fromEntries(Object.entries(e.query).filter(([,N])=>N!==""&&N!=null));t.get("/api/admin/billing/grants",{params:k}).then(N=>{w===m&&(
Line truncated
|
||||
`)},kl=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}},kp=(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&&kp(i.state,s.state))),mp=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),Es,ss,Cl,Sl,ii=class{constructor(t,s,i){He(this,ss);lt(this,"dots");lt(this,"dotStart");He(this,Es);this.dots=t,this.dotStart=s,Ke(this,Es,i)}state(){return new kl(++de(this,Es).gen)}done(t){return t.ids=t.threads.map(s=>s.id).sort((s,i)=>s-i),t.match&&t.ids.unshift(wl.id),t}restricted(t,s){return s&&(this.dots||this.dotStart&&t===0)}add(t,s,i,o){switch(s.t){case"split":if(!je(this,ss,Cl).call(this,t,s))return;for(let u of s.out)this.add(t,u,i,o);return;case"neg":if(!je(this,ss,Cl).call(this,t,s))return;let r=this.state();return this.add(r,s.sub,i,!1),this.done(r),this.addRun(t,{t:"run",neg:s,state:r},i,o);case"star":if(this.restricted(i,o))return;je(this,ss,Sl).call(this,t,s)&&this.add(t,s.next,i,o);return;case"match":t.match=!0;return;default:je(this,ss,Sl).call(this,t,s)}}addRun(t,s,i,o){for(let r of t.runs)if(r.neg===s.neg&&kp(r.state,s.state))return;t.runs.push(s),s.state.match||this.add(t,s.neg.next,i,o)}step(t,s,i,o){let r=this.state();for(let u of t.threads)switch(u.t){case"lit":Rl(u,s)&&this.add(r,u.next,i+1,o);break;case"any":this.restricted(i,o)||this.add(r,u.next,i+1,o);break;case"class":!this.restricted(i,o)&&u.re.test(s)&&this.add(r,u.next,i+1,o);break;case"star":this.restricted(i,o)||this.add(r,u,i+1,o)}if(!this.restricted(i,o))for(let u of t.runs){if(u.state.dead){this.addRun(r,u,i+1,o);continue}let p=this.step(u.state,s,i,!1);this.addRun(r,{t:"run",neg:u.neg,state:p},i+1,o)}return this.done(r)}};Es=new WeakMap,ss=new WeakSet,Cl=function(t,s){let{seen:i}=de(this,Es);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,!0)},Sl=function(t,s){let{has:i}=de(this,Es);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,t.threads.push(s),!0)};var Cp=e=>{let t=e.ids.join();if(!e.runs.length)return t;let s=e.runs.map(i=>`${i.neg.id}(${Cp(i.state)})`);return`${t}|${s.sort().join("|")}`},Qy=1<<18,so,oo,Zn,Ns,xn,es,ts,vn,Nl,qr,Sp,El=class{constructor(t,s){He(this,vn);He(this,so);He(this,oo,new Map);He(this,Zn,0);He(this,Ns);He(this,xn);He(this,es);He(this,ts);Ke(this,so,t),Ke(this,es,new ii(!1,!1,s)),Ke(this,ts,new ii(!1,!0,s))}start(t){if(t){if(de(this,xn))return de(this,xn);let i=de(this,ts).state();return de(this,ts).add(i,de(this,so),0,!0),Ke(this,xn,je(this,vn,Nl).call(this,de(this,ts).done(i)))}if(de(this,Ns))return de(this,Ns);let s=de(this,es).state();return de(this,es).add(s,de(this,so),0,!0),Ke(this,Ns,je(this,vn,qr).call(this,de(this,es).done(s)))}next(t,s){let i=s.charCodeAt(0),o=i<128?void 0:t.next.get(s);if(o)return o;let r=t===de(this,xn)?je(this,vn,qr).call(this,de(this,ts).step(t.state,s,0,!0)):je(this,vn,qr).call(this,de(this,es).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Ke(this,Zn,de(this,Zn)+128)),t.ascii[i]=r):t.next.set(s,r),td(this,Zn)._++,r}};so=new WeakMap,oo=new WeakMap,Zn=new WeakMap,Ns=new WeakMap,xn=new WeakMap,es=new WeakMap,ts=new WeakMap,vn=new WeakSet,Nl=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},qr=function(t){let s=Cp(t),i=de(this,oo).get(s);if(i)return i;de(this,Zn)>Qy&&je(this,vn,Sp).call(this);let o=je(this,vn,Nl).call(this,t);return de(this,oo).set(s,o),Ke(this,Zn,de(this,Zn)+(s.length+1)),o},Sp=function(){de(this,oo).clear(),Ke(this,Zn,0),Ke(this,Ns,void 0),Ke(this,xn,void 0)};var Zy=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},xy=(e,t,s,i)=>{let o=0,r=s,u=-1,p=0;for(;r<i;){let d=e[o];if(d?.t==="star"){u=o++,p=r;continue}let h=t[r];if(d&&(d.t==="any"||d.t==="lit"&&Rl(d,h)||d.t==="class"&&d.re.test(h))){o++,r++;continue}if(u===-1)return!1;o=u+1,r=++p}for(;e[o]?.t==="star";)o++;return o===e.length},Ep=e=>{let t=0,s=0;for(let i of e){let[o,r]=eb(i);t+=o,s+=r}return[t,s]},eb=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(Ep),s=Math.min(...t.map(r=>r[0])),i=Math.max(...t.map(r=>r[1])),o=i===0?0:1/0;return e.type==="@"?[s,i]:e.type==="?"?[0,i]:e.type==="*"?[0,o]:[s,o]},hp=(e,t,s)=>{for(let i=0;i<e.length;i++)if(!Rl(e[i],t[s+i]))return!1;return!0},tb=/[/\ud800-\udfff]/,sb=/[\ud800-\udfff]/,Lr=e=>sb.test(e)?[...e]:e,gp=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},ns,io,Rs,$r,Ts,ai,Fr,Ps,li,di,ui,zn,An,ro,ao,ci,Ur,gn,As,oi,ri=class{constructor(t,s={}){He(this,As);lt(this,"pattern");lt(this,"options");He(this,ns);He(this,io);He(this,Rs);He(this,$r);He(this,Ts);He(this,ai,!1);He(this,Fr);He(this,Ps);He(this,li,!1);He(this,di,0);He(this,ui,1/0);He(this,zn,[]);He(this,An,[]);He(this,ro);He(this,ao);He(this,ci,!1);He(this,Ur);He(this,gn);if(t.includes
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},Ye(()=>e.jumpToAnchor(s.id)))},e.jumpToFile=s=>{e.collapsedFiles={...e.collapsedFiles,[s.index]:!1},e.jumpToAnchor(s.id)},Wc(e,()=>e.tabState?.active==="files"?e.prFiles().map(s=>s.id):[])}function Xc(e){return e?.body||e?.comments?.length||e?.reviewComments?.length?"conversation":e?.diff?"files":e?.commits?.length?"commits":"conversation"}function fl(e,t,s){let i,o=!1,r="form-draft:"+s,u=()=>Object.fromEntries(t.map(v=>[v,e[v]])),p=()=>JSON.stringify(u()),d=v=>{for(let b of t)Object.prototype.hasOwnProperty.call(v,b)&&(e[b]=v[b]);e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate))},h=()=>{try{window.sessionStorage.removeItem(r)}catch{}},m=(v=!1)=>{if(i!==void 0){if(v&&document.querySelectorAll("input, select, textarea").forEach(b=>{b._field?.binding.state===e&&b._field.timer&&b._field.commit()}),e.unsavedChanges=p()!==i,e.draftSaved=!1,!e.unsavedChanges){h();return}try{window.sessionStorage.setItem(r,JSON.stringify({account:e.user?.username||null,savedAt:Date.now(),values:u()})),e.draftSaved=!0}catch{}}},y=()=>m(!0);return e.on("routeLeave",y),window.addEventListener("beforeunload",y),e.on("dispose",()=>window.removeEventListener("beforeunload",y)),{restore(){i=p();let v;try{v=JSON.parse(window.sessionStorage.getItem(r)||"null")}catch{}let b=v&&v.account===(e.user?.username||null)&&Date.now()-v.savedAt<30*6e4&&v.values;return b&&(d(v.values),e.draftRestored=!0),o||(o=!0,e.watch(()=>u(),()=>m(),!0)),e.unsavedChanges=p()!==i,!!b},checkpoint(){return document.querySelectorAll("input, select, textarea").forEach(v=>{v._field?.binding.state===e&&v._field.timer&&v._field.commit()}),JSON.parse(p())},accept(v){i=JSON.stringify(v),e.draftRestored=!1,m()},discard(){document.querySelectorAll("input, select, textarea").forEach(v=>{v._field?.binding.state!==e||!v._field.timer||(clearTimeout(v._field.timer),v._field.timer=null,v.value=v._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,h()}}}function Jc(e,t){e.errorSource="central",e.logView={search:"",severity:"",sort:"recent"},e.selectedLog=null,e.logDetailTab="overview",e.logSeverity=y=>Number(y?.status||y?.httpStatus)>=500||["error","fatal"].includes(y?.severity)?"error":y?.severity==="warn"?"warn":"info",e.filteredLogGroups=()=>{let y=e.logView.search.trim().toLowerCase();return(e.logData?.groups||[]).filter(v=>(!e.logView.severity||e.logSeverity(v.sample)===e.logView.severity)&&(!y||Object.values(v.sample).join(" ").toLowerCase().includes(y))).slice().sort((v,b)=>e.logView.sort==="count"?b.count-v.count:Date.parse(b.last)-Date.parse(v.last))},e.shortLogId=y=>y?y.slice(0,8):"",e.isLogIdentifier=(y,v)=>typeof v=="string"&&v.length>16&&/(?:id|sha|release)$/i.test(y),e.compactLogValue=y=>String(y).slice(0,8)+"\u2026"+String(y).slice(-4),e.logCopyStatus="",e.copyLogValue=async y=>{try{await navigator.clipboard.writeText(String(y)),e.logCopyStatus="Full value copied"}catch{e.logCopyStatus="Copy unavailable. Expand the value to select it."}},e.logExplanation=y=>{let v=y.service||"The application",b={job_failed:"reported a failed job",request_failed:"reported a failed request",request_aborted:"reported an aborted request",edge_request:"recorded an edge request",http_access:"recorded an HTTP request"}[y.event]||"recorded \u201C"+(y.event||"application event")+"\u201D",w=Number(y.status||y.httpStatus),C={502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"}[w];return v+" "+b+(w?" with HTTP "+w+(C?" ("+C+")":""):"")+"."},e.logEvidence=y=>[y.errorCode?"Recorded error code: "+y.errorCode+".":"No error code was included in this sample.",y.ms!==void 0?"Recorded duration: "+y.ms+" ms.":"",y.attempt!==void 0?"Recorded attempt: "+y.attempt+".":"",y.queue?"Queue: "+y.queue+".":""].filter(Boolean).join(" "),e.occurrenceTime=y=>Number.isFinite(Date.parse(y))?new Date(y).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"medium"}):"Time not captured",e.historyOccurrences=y=>(y?._related||[]).slice().sort((v,b)=>Date.parse(b.ts)-Date.parse(v.ts)),e.historyDetailFields=y=>{try{let v=JSON.parse(y?._detailJson||"{}");return v&&typeof v=="object"?Object.entries(v):[["value",v]]}catch{return[["record",y?._detailJson||""]]}},e.logFieldText=y=>typeof y=="object"?JSON.stringify(y):String(y??""),e.captureErrorScroll=y=>{let v=[];for(let b=y?.parentElement;b;b=b.parentElement)v.push({element:b,top:b.scrollTop,left:b.scrollLeft});return v},e.restoreErrorScroll=y=>y.forEach(({element:v,top:b,left:w})=>{v.isConnected&&(v.scrollTop=b,v.scrollLeft=w)});let s=null,i=null,o=null,r=[];e.selectLog=async(y,v)=>{if(i=v||document.activeElement,
Line truncated
|
||||
`+C.join(`
|
||||
`)],{type:"text/csv"}),k=document.createElement("a");k.href=URL.createObjectURL(N),k.download=i.username+"-repositories.csv",k.click()},e.showStatusMessage=v=>{let b=v.statusMessage||"(no message)";window.prompt(`Status message for ${v.repoId} (${v.status}):`,b)},e.fetchGithubInfo=v=>{let b=window.open("","_blank");b&&b.document.write("<pre>Loading GitHub info for "+v.repoId+"...</pre>"),t.get("/api/admin/repos/"+v.repoId+"/github").then(w=>{b&&(b.document.open(),b.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(w.data,null,2).replace(/[<>]/g,C=>C==="<"?"<":">")+"</pre>"),b.document.close())},w=>{let C=w&&w.data?JSON.stringify(w.data,null,2):String(w);b&&(b.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+C+"</pre>")})};function d(v){t.get("/api/admin/users/"+v+"/repos",{}).then(b=>{e.repositories=b.data},b=>{console.error(b)})}function h(v){t.get("/api/admin/users/"+v,{}).then(b=>{e.userInfo=b.data},b=>{console.error(b)})}h(i.username),d(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>h(i.username),v=>console.error(v))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>h(i.username),v=>console.error(v))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>h(i.username),v=>console.error(v))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>h(i.username),v=>console.error(v))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function m(){t.get("/api/admin/tokens").then(v=>{e.tokens=v.data||[]},v=>{v.status!==401&&v.status!==403&&console.error(v)})}m(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(v=>{e.tokenForm.plaintext=v.data.token,e.tokenForm.name="",m()},v=>console.error(v))},e.revokeToken=v=>{confirm(`Revoke token "${v.name}"?`)&&t.delete("/api/admin/tokens/"+v.id).then(()=>m(),b=>console.error(b))},e.removeCache=v=>{confirm("Remove cached files for "+v.repoId+"?")&&t.delete("/api/admin/repos/"+v.repoId).then(()=>d(i.username),b=>console.error(b))},e.removeRepository=v=>{confirm("Remove repository "+v.repoId+"?")&&t.delete("/api/repo/"+v.repoId+"/").then(()=>d(i.username),b=>console.error(b))},e.updateRepository=v=>{let b=ut({title:`Refreshing ${v.repoId}...`,date:new Date,body:`The repository ${v.repoId} is going to be refreshed.`});e.toasts.push(b),t.post(`/api/repo/${v.repoId}/refresh`).then(w=>{w.data.status=="ready"?b.title=`${v.repoId} is refreshed.`:b.title=`Refreshing of ${v.repoId}.`},w=>{b.title=`Error during the refresh of ${v.repoId}.`,b.body=w.body})},e.getGitHubRepositories=v=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(b=>{e.userInfo.repositories=b.data})};let y=null;e.watch("query",()=>{o.timeout.cancel(y),y=o.timeout(()=>{d(i.username)},500)},!0)},ep=function(e,t,s){let i=Tt(),o=Ft();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let r=w=>{if(w.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){w.preventDefault();let C=document.querySelector('.admin-filter-toolbar input[type="search"]');C&&C.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),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.dateFrom||e.query.dateTo)&&w.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=w};e.statusCountFor=w=>{let C=(e.statusCounts||[]).find(N=>N._id===w);return C?C.count:0},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.conferences.filterPrefs",d={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},h=loadFilterPrefs(p)||{};e.query=Object.assign({},d,h,{page:1,search:""});let m=s.search();m.search&&(e.query.search=m.search);let y="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(y)||"[]"),e.savePreset=()=>{let w=window.prompt("Preset name:");if(!w)return;let C=Object.assign({},e.query);delete C.page,e.presets=(e.presets||[]).filter(N=>N.name!==w),e.presets.push({name:w,query:C}),localStorage.setItem(y,JSON.stringify(e.presets))},e.applyPreset=w=>{Object.assign(e.query,w.query,{page:1})},e.deletePreset=w=>{e.presets=(e.presets||[]).filter(C=>C.name!==w.name),localStorage.setItem(y,JS
Line truncated
|
||||
`):typeof U.stack=="string"?U.stack:null;for(var G=[U.cause,U.err].filter(Boolean),M=0;!q&&M<G.length;M++)for(var S=G[M];!q&&S&&typeof S=="object";)typeof S.stack=="string"&&(q=S.stack),S=S.cause;L._stack=q}else L.displayMessage=L.message,L._status=null,L._url=null,L._stack=null;return L._bucket=v(U,L.level),L._detailJson=w(L,U),L}function w(L,U){let G=[],M=(Q,j)=>{j==null||j===""||G.push([Q,j])};for(let Q of["service","event","severity","requestId","jobId"])M(Q,U&&U[Q]);M("name",U&&U.name),M("code",L.displayMessage||U&&U.message),L._bucket&&M("kind",L._bucket),M("httpStatus",U&&U.httpStatus),U&&U.status&&!U.httpStatus&&M("status",U.status),M("module",L.module);let S=U&&U.detail;if(typeof S=="string"){let Q=S.trim();if(Q[0]==="{"||Q[0]==="[")try{S=JSON.parse(S)}catch{}}if(M("detail",S),M("repoId",U&&U.repoId),M("filePath",U&&U.filePath),M("upstreamStatus",U&&U.upstreamStatus),M("upstreamBody",U&&U.upstreamBody),M("url",L._url),M("err",U&&U.err),M("cause",U&&!U.err&&U.cause),M("ts",L.ts),!G.length)return JSON.stringify(L,null,2);let q=G.reduce((Q,j)=>Math.max(Q,j[0].length),0),Y=["{"];return G.forEach(([Q,j],se)=>{let fe=` ${`"${Q}":`.padEnd(q+3," ")} `,Se=se<G.length-1?",":"",Be;if(j&&typeof j=="object"){let Qe=" ".repeat(fe.length);Be=JSON.stringify(j,null,2).split(`
|
||||
`).map((We,Ae)=>Ae===0?We:Qe+We).join(`
|
||||
`)}else typeof j=="number"||typeof j=="boolean"?Be=String(j):Be=JSON.stringify(j);Y.push(`${fe}${Be}${Se}`)}),Y.push("}"),Y.join(`
|
||||
`)}function C(L){let U=[],G="",M=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,S=0,q;for(;q=M.exec(L);)G+=L.slice(S,q.index),S=M.lastIndex,U.push({key:q[1],op:q[2]||"=",val:q[3]});return G+=L.slice(S),{filters:U,free:G.trim().toLowerCase()}}function N(L,U){for(let G of U.filters){let M=(q,Y,Q)=>{let j=parseFloat(q),se=parseFloat(Y);return Q==="="?String(q)===String(Y):Q==="!="?String(q)!==String(Y):Q===">="?j>=se:Q==="<="?j<=se:Q===">"?j>se:Q==="<"?j<se:!0},S;if(G.key==="code")S=L.displayMessage;else if(G.key==="module")S=L.module;else if(G.key==="status")S=L._status;else if(G.key==="url")S=L._url;else if(G.key==="repo")S=L._repoId;else if(G.key==="level")S=L.level;else continue;if(S==null||!M(S,G.val,G.op))return!1}return!(U.free&&((L.displayMessage||"")+" "+(L.module||"")+" "+(L._url||"")+" "+JSON.stringify(L.raw||[])).toLowerCase().indexOf(U.free)===-1)}function k(){let L=C(e.query.search||"");e.parsedFilterCount=L.filters.length;let U=e.query.bucket,G=e.entries.filter(Q=>U&&Q._bucket!==U?!1:N(Q,L)),M=e.query.group;if(M){let Q=te=>JSON.stringify(M==="module"?[te.module,te._bucket]:[te.raw?.[0]?.service||"unknown",te.module,te.displayMessage||te.message||"_",te._bucket,te._status]),j=new Map;for(let te of G){let fe=Q(te);if(j.has(fe)){let Se=j.get(fe);Se.count++,Se._related.push(te),new Date(te.ts)>new Date(Se.ts)&&(Se.ts=te.ts,Se._url=te._url,Se._status=te._status),new Date(te.ts)<new Date(Se._firstSeen)&&(Se._firstSeen=te.ts)}else{let Se=Object.assign({},te);Se._key=`${M}:${fe}`,Se._related=[te],Se._firstSeen=te.ts,Se._lastHourCount=0,Se.count=1,j.set(fe,Se)}}let se=Date.now()-3600*1e3;for(let te of j.values())te._lastHourCount=te._related.filter(fe=>new Date(fe.ts).getTime()>=se).length;G=Array.from(j.values())}else G=G.map((Q,j)=>(Q._key="row:"+j+":"+Q.ts,Q._related=[Q],Q._firstSeen=Q.ts,Q._lastHourCount=0,Q.count=1,Q));let S=Q=>({error:0,warn:1,info:2})[Q._bucket]??1;e.query.sort==="count"?G.sort((Q,j)=>S(Q)-S(j)||j.count-Q.count||new Date(j.ts)-new Date(Q.ts)):G.sort((Q,j)=>S(Q)-S(j)||new Date(j.ts)-new Date(Q.ts)),e.visible=G;let q=!!(e.query.bucket||(e.query.search||"").trim()),Y=!q&&(e.stats?.severity?.error||0)>0&&!G.some(Q=>Q._bucket==="error")&&e.entries.length<1500;(q&&!G.length||Y)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,P(!0))}function P(L){if(L&&e.redisLoading)return;let U=++o;e.redisLoading=!0;let G=L?e.redisNextOffset||e.entries.length:0,M=L?e.pageSize:Math.max(e.pageSize,e.redisNextOffset||e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:G,limit:M}}).then(S=>{if(p||U!==o)return;e.redisLoading=!1;let q=(S.data.entries||[]).map(b);e.entries=L?e.entries.concat(q):q,e.redisRedacted=(L&&e.redisRedacted||0)+(S.data.redactedEntries||0),e.redisNextOffset=S.data.nextOffset??G+(S.data.entries||[]).length,e.available=!!S.data.available,e.redisCollecting=S.data.redisCollecting!==!1,e.cap=S.data.max||e.cap,e.total=S.data.total||e.entries.length,e._autoLoading=!1,k()},()=>{p||U!==o||(e.redisLoading=!1,e._autoLoading=!1,e.available=!1)})}e.loadMore=()=>P(!0),e.canLoadMore=()=>(e.redisNextOffset||e.entries.length)<e.total;function D(L=!1){if(L&&u)return;let U=++r;u=!0,t.get("/api/admin/errors/stats").then(G=>{if(p||U!==r)return;u=!1;let M=G.data||{};e.redisStatsState=M.available===!1?"unavailable":"ready";let S=M.prev24h?Math.round((M.last24h-M.prev24h)/M.prev24h*100):0;e.stats={last24h:M.last24h||0,prev24h:M.prev24h||0,delta:S,severity:M.severity||{error:0,warn:0,info:0},unique:M.unique||{error:0,warn:0,info:0},buckets:M.buckets||[],dropped:M.dropped||0},k()},()=>{!p&&U===r&&(u=!1,e.redisStatsState="unavailable")})}function F(L=!1){(!L||!e.redisLoading)&&P(),D(L)}e.barPx=(L,U)=>{let G=e.stats.buckets||[],M=0,S=0;for(let j of G)M=Math.max(M,(j.error||0)+(j.warn||0)),S=Math.max(S,j.info||0);let q=L[U]||0;if(!q)return 0;if(U==="info")return S?Math.max(2,Math.round(q/S*(M?16:60))):0;let Y=(L.error||0)+(L.warn||0),Q=Math.round(Y/M*44);return Math.max(4,Math.round(q/Y*Q))},e.bucketTitle=L=>`${new Date(L.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${L.error||0} err \xB7 ${L.warn||0} warn \xB7 ${L.info||0} info`,e.toggle=async(L,U)=>{h=U||document.activeElement,m=e.captureErrorScroll(h),e.historySelected=L,e.historyView="overview",e.expanded={[L._key]:!0},await Ye(),document.getElementById("history-inspector-title")?.focus({preventScroll:!0}),document.getElementById("history-inspector-title")?.scrollIntoView?.({block:"nearest"})},e.showHistoryTimeline=L=>{if(e.historyView="timeline",e.traceSelection)return;let U=["requestId","jobId"].find(G=>e.logTraceId(e.historySelected,G));U&&e.lookupTrace(U,e.logTraceId(e.historySelected,U),L,e.historySelected)},e.closeHistory=async()=>{let L=e.historySelected?._key;e.historySelected=null,e.expanded={},e.traceSelection&&await e.closeTrace(),await Ye(),(h?.isConnected?h:[...document.querySelectorAll("[data-history-key]")].find(G=>G.dataset.historyKey===L))?.focus({preventScroll:!0}),e.restoreError
Line truncated
|
||||
`)],{type:"text/csv;charset=utf-8"}),M=URL.createObjectURL(G),S=document.createElement("a");S.href=M,S.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(S),S.click(),document.body.removeChild(S),URL.revokeObjectURL(M)};function B(L){e.copyHint=`${L} copied`,d.timeout(()=>{e.copyHint=""},1500)}e.copyJson=L=>{navigator.clipboard.writeText(L._rawJson).then(()=>B("JSON"))},e.copyCurl=L=>{if(!L._url)return;let G=`curl -X ${L._method||"GET"} '${window.location.origin}${L._url}'`;navigator.clipboard.writeText(G).then(()=>B("curl"))},F();let K=i(()=>{e.query.autoRefresh&&F(!0)},15e3);e.on("dispose",()=>{p=!0,o++,r++,i.cancel(K)}),e.watch("query.search",k),e.watch("query.bucket",k),e.watch("query.sort",k),e.watch("query.group",k)},sp=function(e,t,s,i){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null){s.url("/");return}e.data=null,e.loading=!0,e.error=null,e.performance=null,e.performanceMinutes=15,e.performanceTab="routes",e.cacheReport=null,e.cacheError=null,e.cacheMinutes=60,e.cacheTraffic="all",e.ovView=["performance","cache"].includes((window.location.hash||"").slice(1))?window.location.hash.slice(1):"summary",e.setOvView=function(k){e.ovView=k;try{window.history.replaceState(null,"",k==="summary"?window.location.pathname:"#"+k)}catch{}};var o=!1;e.loadCache=function(){if(!o){o=!0;var k=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:k}}).then(function(P){k===e.cacheMinutes&&(e.cacheReport=P.data,e.cacheError=P.data.available?null:P.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){o=!1,k!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(k){return e.cacheTraffic==="all"||k.traffic===e.cacheTraffic})},e.cacheRate=function(k,P){var D=e.cacheRows(),F=function(L){return D.filter(function(U){return U.name===L}).reduce(function(U,G){return U+G[P]},0)},B=F(k+"_hit"),K=F(k+"_miss");return B+K?(100*B/(B+K)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(k){return k.replaceAll("_"," ")},e.cacheP95=function(k){var P=0,D=e.cacheReport?.latencyBucketsMs||[];if(!k.count)return"No samples";if(!k.ms)return"Not timed";for(var F=0;F<=D.length;F++)if(P+=k["b"+F]||0,P>=Math.ceil(k.count*.95))return F<D.length?"\u2264 "+Gn(D[F]):"> 10\u202Fs";return"No samples"},e.healthAlert=function(){let k=e.data&&e.data.system||{},P=[["Memory",k.memPercent],["Disk",k.diskPercent]].filter(([,F])=>F>90);return P.length?P.map(([F,B])=>F+" is at "+B+"%").join(" and ")+". New anonymizations may fail until "+(P.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(k){return k==null?"":Gn(k)},e.latencyBound=function(k,P){return k.count?k[P]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(k[P]):"No samples"},e.firstByteBound=function(k){return e.latencyBound({count:k.firstByteCount,p95UpperMs:k.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(k){return Math.max(0,Math.round((Date.now()-k.sampledAt)/1e3))},e.peakRss=function(k){return(e.performance.runtimeSeries||[]).filter(function(P){return P.instance===k.instance}).reduce(function(P,D){return Math.max(P,D.rss)},k.memory.rss)},e.performanceWarning=function(k){return e.sampleAge(k)>45||k.droppedBatches||k.droppedMetrics||k.sockets?.closeWait>0||k.eventLoop?.p95Ms>100||k.memoryLimitBytes&&k.memory.rss>k.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var k=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==k&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:k}}).then(function(P){k===e.performanceMinutes&&(e.performance=P.data,e.performanceError=P.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){k===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,k!==e.performanceMinutes&&e.loadPerformance()}))};function u(k){if(k==null)return"\u2014";for(var P=["B","KB","MB","GB","TB"],D=0,F=k;F>=1024&&D<P.length-1;)F/=1024,D++;return F.toFixed(D>0?1:0).replace(/\.0$/,"")+" "+P[D]}e.humanBytes=u;function p(k){if(!k)return"\u2014";var P=Math.floor(k/86400),D=Math.floor(k%86400/3600),F=Math.floor(k%3600/60);return P>0?P+"d "+(D<10?"0":"")+D+"h":D>0?D+"h "+(F<10?"0":"")+F+"m":F+"m"}e.humanDuration=p;function d(k){return k==null?"\u2014":k>=1e6?(k/1e6).toFixed(1)+"M":k>=1e3?(k/1e3).toFixed(1)+"K":String(k)}e.humanNum=d,e.queueTotal=function(k){return k?(k.waiting||0)+(k.active||0)+(k.delayed||0)+(k.failed||0):0},e.statusCount=function(k){if(!e.data||!e.data.repos)return 0;for(var P=e.data.repos.statusBreakdown||[],D=0;D<P.length;D++)if(P[D]._id===k)return P[D].count;return 0},e.barPct=function(k){var P=e.data&&e.data.repos?e.data.repos.total:0;if(!P)return 0;var D=[k];k==="expired"&&D.push("expiring"),k==="removed"&&
Line truncated
|
||||
`)},e.tipSide=w=>{let C=(e.summary?.series||[]).length;return C<3?"":w<C/4?"tip-start":w>=C*3/4?"tip-end":""},e.bucketName=()=>({day:"day",week:"week",month:"month"})[e.summary?.bucket]||"day",e.seriesSales=()=>(e.summary?.series||[]).reduce((w,C)=>w+e.bucketTotal(C),0),e.plansWithActivity=()=>(e.summary?.plans||[]).filter(w=>w.active||w.allTimeSales||w.sales),e.familyLabel=w=>(Dr.find(C=>C.id===w)||{}).label||"",e.familyPlans=w=>(e.summary?.plans||[]).filter(C=>C.family===w),e.familySum=(w,C)=>e.familyPlans(w).reduce((N,k)=>N+(k[C]||0),0),e.familyMoney=(w,C,N)=>{if(!e.revenueOn())return"\u2014";let k=e.familyPlans(w);return k.some(P=>P[N]===!1)?"Incomplete":e.moneyText(k.reduce((P,D)=>r(P,D[C]),{}))},e.planTotals=()=>{let w=C=>(e.summary?.plans||[]).reduce((N,k)=>N+(k[C]||0),0);return{active:w("active"),sales:w("sales"),allTimeSales:w("allTimeSales")}},e.webhookState=()=>{let w=e.summary?.webhooks;return w?w.failed||w.reconciliationFailed?"bad":w.oldestPendingSeconds>900||w.unreviewedRevocations?"warn":"ok":"ok"},e.age=w=>w?Gn(w*1e3):"\u2014";let u=0;e.loadSummary=()=>{let w=++u;e.summaryLoading=!0,e.summaryError=null,t.get("/api/admin/billing/summary",{params:{period:e.period}}).then(C=>{if(w!==u)return;e.summaryLoading=!1;let N=C.data;if(!N||!N.subscriptions||!N.sales||!Array.isArray(N.plans)){e.summaryError="The billing summary had an unexpected format.";return}e.summary=N},C=>{w===u&&(e.summaryLoading=!1,e.summaryError=C&&C.data&&C.data.error||"Could not load billing figures.")})},e.setPeriod=w=>{if(e.period!==w){e.period=w;try{localStorage.setItem("admin.billing.period",w)}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=w=>{e.query.state=w==="all"?"":w,e.query.page=1},e.stateCount=w=>w==="all"?["active","expired","revoked"].reduce((C,N)=>C+(e.stateCounts[N]||0),0):e.stateCounts[w]||0,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":"",e.chips=[];let d=()=>{let w=[];e.query.plan&&w.push({key:"plan",label:"Plan",value:e.planName(e.query.plan)}),e.query.status&&w.push({key:"status",label:"Stripe status",value:e.query.status.replace(/_/g," ")}),e.query.period&&w.push({key:"period",label:"Started",value:"last "+((e.periods.find(C=>C.id===e.query.period)||{}).label||e.query.period)}),e.chips=w};e.clearFilter=w=>{e.query[w]="",e.query.page=1},e.filterPlan=w=>{Object.assign(e.query,{plan:w,page:1});let C=document.getElementById("bl-grants");C&&C.scrollIntoView&&C.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(w=>e.query[w]).length,e.amountText=w=>{if(!w.amount)return"\u2014";let C=ys({[w.amount.currency]:w.amount.value})[0]||"\u2014";if(!w.amount.interval)return C;let N=w.amount.intervalCount>1?w.amount.intervalCount+" "+w.amount.interval+"s":w.amount.interval;return C+" / "+N},e.amountTitle=w=>w.amount?"Stripe list price"+(w.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."}[w.amountMissing]||"Revenue unavailable.",e.endText=w=>{if(w.never)return"Never ends";if(!w.until)return"\u2014";let C=Sr(w.until);return w.state!=="active"?(new Date(w.until)<new Date?"Ended ":"Ends ")+C:w.subscription?(w.cancelAtPeriodEnd?"Ends ":"Renews ")+C:"Until "+C},e.packNote=w=>{let C=(w.parts||[]).find(N=>N.planId==="author_pass");return!w.pack||!C||!C.until?"":(new Date(C.until)<new Date?"Updates ended ":"Updates until ")+Sr(C.until)};let h={repo_slot:"repository",author_pass:"updates",repo_extend:"+1 year"};e.packParts=w=>(w.parts||[]).map(C=>h[C.planId]||e.planName(C.planId)).join(", ").replace(/^./,C=>C.toUpperCase()),e.packPartsTitle=w=>"Paper pack: "+(w.parts||[]).map(C=>e.planName(C.planId)).join(", "),e.statusText=w=>(w.status||"unknown").replace(/_/g," "),e.revocationText=w=>w==="dispute"?"Disputed":w==="full_refund"?"Refunded":"Revoked",e.scopeHref=w=>w?.kind==="repo"?"/admin/repositories?search="+encodeURIComponent(w.id):w?.kind==="conference"?"/conference/"+encodeURIComponent(w.id):null;let m=0;function y(){let w=++m;e.grantsError=null;let C=Object.fromEntries(Object.entries(e.query).filter(([,N])=>N!==""&&N!=null));t.get("/api/admin/billing/grants",{params:C}).then(N=>{w===m&&(
Line truncated
|
||||
`)},kl=class{constructor(t){at(this,"gen");at(this,"threads",[]);at(this,"match",!1);at(this,"runs",[]);at(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},kp=(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&&kp(i.state,s.state))),mp=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),ws,Zn,Cl,Sl,ni=class{constructor(t,s,i){He(this,Zn);at(this,"dots");at(this,"dotStart");He(this,ws);this.dots=t,this.dotStart=s,Ke(this,ws,i)}state(){return new kl(++de(this,ws).gen)}done(t){return t.ids=t.threads.map(s=>s.id).sort((s,i)=>s-i),t.match&&t.ids.unshift(wl.id),t}restricted(t,s){return s&&(this.dots||this.dotStart&&t===0)}add(t,s,i,o){switch(s.t){case"split":if(!je(this,Zn,Cl).call(this,t,s))return;for(let u of s.out)this.add(t,u,i,o);return;case"neg":if(!je(this,Zn,Cl).call(this,t,s))return;let r=this.state();return this.add(r,s.sub,i,!1),this.done(r),this.addRun(t,{t:"run",neg:s,state:r},i,o);case"star":if(this.restricted(i,o))return;je(this,Zn,Sl).call(this,t,s)&&this.add(t,s.next,i,o);return;case"match":t.match=!0;return;default:je(this,Zn,Sl).call(this,t,s)}}addRun(t,s,i,o){for(let r of t.runs)if(r.neg===s.neg&&kp(r.state,s.state))return;t.runs.push(s),s.state.match||this.add(t,s.neg.next,i,o)}step(t,s,i,o){let r=this.state();for(let u of t.threads)switch(u.t){case"lit":Rl(u,s)&&this.add(r,u.next,i+1,o);break;case"any":this.restricted(i,o)||this.add(r,u.next,i+1,o);break;case"class":!this.restricted(i,o)&&u.re.test(s)&&this.add(r,u.next,i+1,o);break;case"star":this.restricted(i,o)||this.add(r,u,i+1,o)}if(!this.restricted(i,o))for(let u of t.runs){if(u.state.dead){this.addRun(r,u,i+1,o);continue}let p=this.step(u.state,s,i,!1);this.addRun(r,{t:"run",neg:u.neg,state:p},i+1,o)}return this.done(r)}};ws=new WeakMap,Zn=new WeakSet,Cl=function(t,s){let{seen:i}=de(this,ws);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,!0)},Sl=function(t,s){let{has:i}=de(this,ws);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,t.threads.push(s),!0)};var Cp=e=>{let t=e.ids.join();if(!e.runs.length)return t;let s=e.runs.map(i=>`${i.neg.id}(${Cp(i.state)})`);return`${t}|${s.sort().join("|")}`},Qy=1<<18,eo,to,Kn,ks,Yn,Xn,Jn,fn,Nl,Lr,Sp,El=class{constructor(t,s){He(this,fn);He(this,eo);He(this,to,new Map);He(this,Kn,0);He(this,ks);He(this,Yn);He(this,Xn);He(this,Jn);Ke(this,eo,t),Ke(this,Xn,new ni(!1,!1,s)),Ke(this,Jn,new ni(!1,!0,s))}start(t){if(t){if(de(this,Yn))return de(this,Yn);let i=de(this,Jn).state();return de(this,Jn).add(i,de(this,eo),0,!0),Ke(this,Yn,je(this,fn,Nl).call(this,de(this,Jn).done(i)))}if(de(this,ks))return de(this,ks);let s=de(this,Xn).state();return de(this,Xn).add(s,de(this,eo),0,!0),Ke(this,ks,je(this,fn,Lr).call(this,de(this,Xn).done(s)))}next(t,s){let i=s.charCodeAt(0),o=i<128?void 0:t.next.get(s);if(o)return o;let r=t===de(this,Yn)?je(this,fn,Lr).call(this,de(this,Jn).step(t.state,s,0,!0)):je(this,fn,Lr).call(this,de(this,Xn).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Ke(this,Kn,de(this,Kn)+128)),t.ascii[i]=r):t.next.set(s,r),nd(this,Kn)._++,r}};eo=new WeakMap,to=new WeakMap,Kn=new WeakMap,ks=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,Jn=new WeakMap,fn=new WeakSet,Nl=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},Lr=function(t){let s=Cp(t),i=de(this,to).get(s);if(i)return i;de(this,Kn)>Qy&&je(this,fn,Sp).call(this);let o=je(this,fn,Nl).call(this,t);return de(this,to).set(s,o),Ke(this,Kn,de(this,Kn)+(s.length+1)),o},Sp=function(){de(this,to).clear(),Ke(this,Kn,0),Ke(this,ks,void 0),Ke(this,Yn,void 0)};var Zy=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},xy=(e,t,s,i)=>{let o=0,r=s,u=-1,p=0;for(;r<i;){let d=e[o];if(d?.t==="star"){u=o++,p=r;continue}let h=t[r];if(d&&(d.t==="any"||d.t==="lit"&&Rl(d,h)||d.t==="class"&&d.re.test(h))){o++,r++;continue}if(u===-1)return!1;o=u+1,r=++p}for(;e[o]?.t==="star";)o++;return o===e.length},Ep=e=>{let t=0,s=0;for(let i of e){let[o,r]=eb(i);t+=o,s+=r}return[t,s]},eb=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(Ep),s=Math.min(...t.map(r=>r[0])),i=Math.max(...t.map(r=>r[1])),o=i===0?0:1/0;return e.type==="@"?[s,i]:e.type==="?"?[0,i]:e.type==="*"?[0,o]:[s,o]},hp=(e,t,s)=>{for(let i=0;i<e.length;i++)if(!Rl(e[i],t[s+i]))return!1;return!0},tb=/[/\ud800-\udfff]/,sb=/[\ud800-\udfff]/,Vr=e=>sb.test(e)?[...e]:e,gp=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},Qn,no,Cs,qr,Ss,oi,$r,Es,ii,ri,ai,$n,Nn,so,oo,li,Fr,pn,Ns,ti,si=class{constructor(t,s={}){He(this,Ns);at(this,"pattern");at(this,"options");He(this,Qn);He(this,no);He(this,Cs);He(this,qr);He(this,Ss);He(this,oi,!1);He(this,$r);He(this,Es);He(this,ii,!1);He(this,ri,0);He(this,ai,1/0);He(this,$n,[]);He(this,Nn,[]);He(this,so);He(this,oo);He(this,li,!1);He(this,Fr);He(this,pn);if(t.includes
Line truncated
|
||||
`).forEach((s,i)=>{let{term:o}=Fl(s.trim());if(!o)return;let r=[];for(let u=0;u<o.length;u++){if(o[u]==="\\"){u++;continue}Bp.has(o[u])&&!r.includes(o[u])&&r.push(o[u])}r.length&&t.push({line:i,term:o,symbols:r})}),t}function Hp(e,t){let s=String(e||"").split(`
|
||||
`),i=s[t];if(i===void 0)return e;let{term:o}=Fl(i.trim());if(!o)return e;let r="";for(let p=0;p<o.length;p++){if(o[p]==="\\"){r+=o.slice(p,p+2),p++;continue}r+=Bp.has(o[p])||o[p]==="."?"\\"+o[p]:o[p]}let u=i.indexOf(o);return s[t]=i.slice(0,u)+r+i.slice(u+o.length),s.join(`
|
||||
`)}var ds={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.",invalid_sort:"The selected sort order is invalid.",invalid_cursor:"This project page is no longer valid. Reload the list.",repository_changed:"The repository changed while processing. Please retry.",repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"We could not load this content. Try again. If it still fails, contact support with the anonymous URL and the time of the error.",unreachable:"The service could not complete this request. Wait a moment and try again.",request_error:"The connection was interrupted. Check your internet connection and try again.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"Anonymous GitHub cannot access the source repository on GitHub. It may be private, unavailable, or require the owner to reconnect GitHub.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_not_ready:"This pull request is still being prepared. Please t
Line truncated
|
||||
`)}var os={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.",invalid_sort:"The selected sort order is invalid.",invalid_cursor:"This project page is no longer valid. Reload the list.",repository_changed:"The repository changed while processing. Please retry.",repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"We could not load this content. Try again. If it still fails, contact support with the anonymous URL and the time of the error.",unreachable:"The service could not complete this request. Wait a moment and try again.",request_error:"The connection was interrupted. Check your internet connection and try again.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"Anonymous GitHub cannot access the source repository on GitHub. It may be private, unavailable, or require the owner to reconnect GitHub.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_not_ready:"This pull request is still being prepared. Please t
Line truncated
|
||||
`)),e.options=Object.assign({},e.options,y.options),p.restore()})}d();let h=null;e.saveDefault=m=>{if(m&&m.preventDefault&&m.preventDefault(),e.saving)return;let y=p.checkpoint(),v={terms:e.terms.split(`
|
||||
`).map(b=>b.trim()).filter(b=>b.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",v).then(()=>{p.accept(y),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",h&&i.cancel(h),h=i(()=>{e.message=null},2500)},b=>{e.saving=!1;let w=b&&b.data&&b.data.error,k="Unable to save your defaults. Please try again.";Promise.all([s("ERRORS."+w),s("ERRORS.unknown_error")]).then(([N,C])=>{e.error=w&&N!==C?N:k},()=>{e.error=k})})},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."}))}},Xp=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)})}},Jp=function(e,t,s,i,o){e.user&&!e.user.status&&s.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&s.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(p){e.feature=p},e.featureHref=function(p){return p.needsUser&&!e.user?"/signin":p.href},e.featureTarget=function(p){return p.needsUser&&!e.user?"_self":p.target||void 0},e.featureKeydown=function(p,d){let h={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[p.key];if(h===void 0)return;p.preventDefault();let m=e.features.length,y=h==="first"?0:h==="last"?m-1:(d+h+m)%m;e.feature=e.features[y].key,o(()=>{let v=i.document.getElementById("feature-tab-"+e.feature);v&&v.focus()})},e.demoText=`# DeepLearnUtils
|
||||
`).map(b=>b.trim()).filter(b=>b.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",v).then(()=>{p.accept(y),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",h&&i.cancel(h),h=i(()=>{e.message=null},2500)},b=>{e.saving=!1;let w=b&&b.data&&b.data.error,C="Unable to save your defaults. Please try again.";Promise.all([s("ERRORS."+w),s("ERRORS.unknown_error")]).then(([N,k])=>{e.error=w&&N!==k?N:C},()=>{e.error=C})})},e.deleteAccount=()=>{e.deletingAccount||!e.confirmDeleteAccount||e.deleteUsername!==e.user?.username||(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},Xp=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)})}},Jp=function(e,t,s,i,o){e.user&&!e.user.status&&s.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&s.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(p){e.feature=p},e.featureHref=function(p){return p.needsUser&&!e.user?"/signin":p.href},e.featureTarget=function(p){return p.needsUser&&!e.user?"_self":p.target||void 0},e.featureKeydown=function(p,d){let h={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[p.key];if(h===void 0)return;p.preventDefault();let m=e.features.length,y=h==="first"?0:h==="last"?m-1:(d+h+m)%m;e.feature=e.features[y].key,o(()=>{let v=i.document.getElementById("feature-tab-"+e.feature);v&&v.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(v=>v.trim()).filter(Boolean).sort((v,b)=>b.length-v.length),d=v=>v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let h=new RegExp("("+p.map(d).join("|")+")","gi"),m={},y=0;return(e.demoText||"").split(h).filter(v=>v!=="").map(v=>{let b=p.find(w=>w.toLowerCase()===v.toLowerCase());return b?(m[b.toLowerCase()]||(m[b.toLowerCase()]=++y),{text:String(m[b.toLowerCase()]),redacted:!0,original:v}):{text:v}})},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 r(){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(()=>{})}r();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 h=new Array(p.length-1);for(let k=1;k<p.length;k++)h[k-1]=p[k]-p[k-1];let m=h.length,y=Math.max.apply(null,h),v=Math.min.apply(null,h),b=Math.min(0,v),w=y-b||1;d.viewW=m*2,d.bars=new Array(m);for(let k=0;k<m;k++){let N=(h[k]-b)/w,C=Math.max(1.5,N*34);d.bars[k]={x:(k*2+.25).toFixed(2),y:(36-C).toFixed(2),w:"1.5",h:C.toFixed(2)}}if(d.deltaToday=h[m-1],m>=2){let k=h[m-2];k&&(d.pctChange=(d.deltaToday-k)/k*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(h=>h.nbRepositories||0)),users:u(d.map(h=>h.nbUsers||0)),pageViews:u(d.map(h=>h.nbPageViews||0)),pullRequests:u(d.map(h=>h.nbPullRequests||0))}}).catch(()=>{})},Qp=function(e,t,s,i,o,r){let u=Pt();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,Ye(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Ut()(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=xa(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 Ye();let q=document.getElementById(e.projectDetailsId(S));q?.focus(),q?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=S=>{e.selectedProject=null,Ye(()=>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 X=await t.post("/api/user/project-name",{type:S._type,id:S._id,name:q});S.projectName=X.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 F(),e.selectedProject===S&&(e.selectedProject=e.items.find(Z=>Z._type===S._type&&Z._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,o.location.origin).href;e.copyingId=S._type+":"+S._id;try{await Ul(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"];function
Line truncated
|
||||
`)),e.options=Object.assign({},e.options,H.options),e.options.expirationDate=H.options&&H.options.expirationDate?new Date(H.options.expirationDate):L(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),E&&E()})}function Pe(E,V,H){e.anonymize&&e.anonymize[E]&&e.anonymize[E].setValidity(V,H)}function nt(E){try{let V=parseGithubUrl(E);if(V&&V.owner&&V.repo)return V.owner+"/"+V.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"||nt(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let E=v();try{let V=await t.get("/github/connections");if(e.githubConnections=V.data,!V.data.appEnabled)return;let H=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":V.data.csrf}});if(!y(E))return;e.error=null,H.data.fullName&&(e._originalFullName=H.data.fullName,e.source.fullName=H.data.fullName,e.sourceUrl="https://github.com/"+H.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{y(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,b(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=[];try{await he()}catch{}}};function ut(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:nt(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function De(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function Q(){let E=new URLSearchParams(window.location.search).get("billingDraft");if(E){N.restore();try{let H=(await t.get("/api/billing/draft/"+encodeURIComponent(E))).data;if(H.path!==o.path())throw new Error("Wrong task");C=H.values.conference||null;for(let ee of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(H.values,ee)&&(e[ee]=H.values[ee]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),P=H.id,I=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await De(),o.replace?.(o.path()),!0}catch{e.billingError="The checkout draft could not be restored. Retry by reloading this page; any local draft is still available."}}let V;try{V=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!V||V.path!==o.path()||Date.now()-V.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await De(),!0):!1;N.restore();for(let H of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(V.draft,H)&&(e[H]=V.draft[H]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await De(),sessionStorage.removeItem("github-access-draft"),!0}Xe(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&u(Q,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(V=>V).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)),w=k(parseGithubUrl(e.sourceUrl)),!await Q()&&(await Promise.all([he(),ue()]),Vs())},()=>{o.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(V=>V).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)),w=k(parseGithubUrl(e.sourceUrl)),!await Q())try{await Ql()}catch{}},()=>{o.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(V=>V).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)),w=k(parseGithubUrl(e.sourceUrl)),!await Q()&&await Zl()},()=>{o.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&&De())}).catch(()=>{}).finally(()=>{!h&&!i.repoId&&!i.pullRequestId&&!i.gistId&&e.userReposStatus==="idle"&&e.loadUserRepos()}),e.urlSelected=async(E=!1)=>{let V=++d;e.previousConfigurations=[],e.previousConfigurationId="";let H;try{H=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,e.details=null,fe(),ln.cancel(),Gn.cancel(),Wn.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",Pe("sourceUrl","github",!1);return}let ee=k(H),pe=E||w===ee;w=ee,e.sourceUrlError="",Pe("sourceUrl","github",!0),fe();let Se=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let Ze=window.document.getElementById("sourceUrl");if(Ze){try{Ze.setSelectionRange(0,0)}catch{}Ze.scrollLeft=0}},50),Se&&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:""}),ln.cancel(),Gn.cancel(),Wn.cancel(),Ls.clear(),qs.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",Mt(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=pe;try{H.gistId&&!H.repo?(e.detectedType="gist",e.source={gistId:H.gistId},await Zl()):H.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:H.owner+"/"+H.repo,pullRequestId:H.pullRequestId},await Ql()):(e.detectedType="repo",G(),await Promise.all([he(),ue()]),Vs())}catch{}finally{V===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(H=>H.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 ue(),Vs()}),e.getBranches=async E=>{let V=parseGithubUrl(e.sourceUrl),H=v();try{if(!e.details){await he(E);return}let ee=await t.get(`/api/repo/${V.owner}/${V.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&nt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:E===!0||e.reconnectingSource?"1":"0",repositoryID:ut()}});if(!y(H))return;e.branches=ee.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let pe=e.branches.filter(Se=>Se.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 ue(E))}catch(ee){if(!y(H))return;e.branches=[],e.sourceUnreachable=ee&&(ee.status===404||ee.data&&ee.data.error==="repo_not_found"),e.details=null,te(ee)}finally{b(H)}};async function he(E=!1){let V=parseGithubUrl(e.sourceUrl),H=v();try{$s(),fe();let ee=await t.get(`/api/repo/${V.owner}/${V.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&nt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:ut(),force:"1"}});if(!y(H))return;e.details=ee.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(ee){if(!y(H))return;throw te(ee),ee}finally{b(H)}}async function ue(E){if(e.readme&&!E)return e.readme;let V=parseGithubUrl(e.sourceUrl),H=v();try{let ee=await t.get(`/api/repo/${V.owner}/${V.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&nt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:E===!0?"1":"0",branch:e.source.branch,repositoryID:ut()}});y(H,!0)&&(e.readme=ee.data)}catch{y(H,!0)&&(e.readme="")}finally{b(H)}}let ve={magicalBraces:!0},Ee=E=>E.startsWith("/")&&!E.endsWith("/")&&os(Ds(E.slice(1),ve),ve)===E.slice(1),qe=()=>Object.keys(e.preserve.picked).filter(E=>e.preserve.picked[E]).sort().map(E=>"/"+os(E,ve)),D=E=>"/"+os(E,ve)+"/**",O=E=>"!/"+os(E,ve)+"/",_=()=>String(e.preserve.patterns||"").split(`
|
||||
`).map(E=>E.trim()).filter(Boolean),x=null,J=null,oe=new Set,ce=0,re=null,ae=()=>!1;function ie(){let E=ce+"\0"+e.preserve.patterns;if(E!==re){re=E;try{ae=$l(ql([...qe(),..._()]))}catch{ae=()=>!1}}return ae}function Ce(E){let V=new Map([["",{dirs:[],files:[]}]]);for(let H of E){let ee=H.split("/"),pe="";for(let Se=0;Se<ee.length-1;Se++){let Ze=ee.slice(0,Se+1).join("/");V.has(Ze)||(V.set(Ze,{dirs:[],files:[]}),V.get(pe).dirs.push(Ze)),pe=Ze}V.get(pe).files.push(H)}for(let H of V.values())H.dirs.sort();return{files:E,dirs:V,descendants:new Map}}function me(E){return x.descendants.has(E)||x.descendants.set(E,x.files.filter(V=>V.startsWith(E+"/"))),x.descendants.get(E)}let Ne=E=>ie()(E);function Me(E){let V=me(E),H=0;for(let ee of V)Ne(ee)&&H++;return H===0?"none":H===V.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(V=>String(V).trim()).filter(Boolean).map(V=>Ee(V)?Ds(V.slice(1),ve):V);return E.length?E.slice(0,2).join(", ")+(E.length>2?` and ${E.length-2} more`:""):"None. Every file is redacted."};async function Be(){let E=e.source?.commit;if(!(x&&e.preserve.commit===E)){e.preserve.loading=!0,e.preserve.error="",x=null,J=null;try{let V=parseGithubUrl(e.sourceUrl),H=await t.get(`/api/repo/${V.owner}/${V.repo}/tree`,{params:{commit:E,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&nt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:ut()}});if(e.source?.commit!==E)return;let ee=Array.isArray(H.data.binaryFiles)?H.data.binaryFiles:[];x=Sn(Ce(H.data.files||[])),J=ee.length?Sn(Ce([...H.data.files||[],...ee])):x,oe=Sn(new Set(ee)),e.preserve.commit=E,e.preserve.truncated=!!H.data.truncated,e.previewFile||ln()}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&&Be().catch(()=>{})}),e.openPreserveFiles=()=>{let E={},V=[];for(let ee of e.options?.preserveFiles||[]){let pe=String(ee).trim();pe&&(!V.length&&Ee(pe)?E[Ds(pe.slice(1),ve)]=!0:V.push(pe))}let H={};for(let ee of Object.keys(E)){let pe=ee.split("/");for(let Se=1;Se<pe.length;Se++)H[pe.slice(0,Se).join("/")]=!0}Object.assign(e.preserve,{open:!0,search:"",picked:E,expanded:H,patterns:V.join(`
|
||||
`),patternsOpen:V.length>0}),e.mobileWorkspace&&(e.mobilePane="settings"),ce++,u(()=>{let ee=document.getElementById("preserve-files-dialog");ee?.showModal&&!ee.open&&ee.showModal(),document.getElementById("preserve-files-search")?.focus()},0),Be()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=ql([...qe(),..._()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!x)return[];let E=ie(),V=(Se,Ze,Ht)=>{let yt=!!e.preserve.picked[Se],Lt=E(Se);return{kind:"file",path:Se,label:Ht,depth:Ze,state:Lt?"all":"none",locked:!yt&&Lt,note:!yt&&Lt?"matched by a pattern":yt&&!Lt?"excluded by a pattern":""}},H=String(e.preserve.search||"").trim().toLowerCase();if(H)return x.files.filter(Se=>Se.toLowerCase().includes(H)).slice(0,300).map(Se=>V(Se,0,Se));let ee=[],pe=(Se,Ze)=>{let Ht=x.dirs.get(Se);for(let yt of Ht.dirs){let Lt=!!e.preserve.expanded[yt],tn=_().includes(D(yt));ee.push({kind:"dir",path:yt,label:yt.slice(Se?Se.length+1:0)+"/",depth:Ze,open:Lt,state:Me(yt),locked:!1,note:tn?"whole folder":""}),Lt&&pe(yt,Ze+1)}for(let yt of Ht.files)ee.push(V(yt,Ze,yt.slice(Se?Se.length+1:0)))};return pe("",0),ee},e.preserveCount=()=>x?x.files.filter(Ne).length:0,e.togglePreserveDir=E=>{e.preserve.expanded[E]=!e.preserve.expanded[E]},e.togglePreserveFile=E=>{e.preserve.picked[E]=!e.preserve.picked[E],ce++},e.togglePreserveFolder=E=>{let V=D(E),H=O(E),ee=_().filter(Se=>Se!==V&&Se!==H),pe=Me(E)==="all"||_().includes(V);for(let Se of me(E))e.preserve.picked[Se]=!1;ce++,e.preserve.patterns=(pe?ee:[...ee,V]).join(`
|
||||
`),pe&&me(E).some(Ne)&&(e.preserve.patterns=[...ee,H].join(`
|
||||
`))};let et=/^readme(\.[^/]*)?$/i,Qe=[".md",".markdown",".mdown",".mkdn",".rst",".txt",""],Re=["README.md","README","README.markdown","README.rst","README.txt","readme.md"],Ue=E=>{let V=_e(E),H=V.indexOf("."),ee=Qe.indexOf(H===-1?"":V.slice(H).toLowerCase());return ee===-1?Qe.length:ee},at=()=>!!x&&!!e.preserve.commit&&e.preserve.commit===e.source?.commit;e.readmePath=()=>{if(!at())return"";for(let E of[".github","","docs"]){let V=(x.dirs.get(E)?.files||[]).filter(H=>et.test(_e(H)));if(V.length)return V.sort((H,ee)=>Ue(H)-Ue(ee)||we(H,ee))[0]}return""},e.readmeName=()=>_e(e.readmePath())||"README.md";let ft={key:null,fn:()=>!1},At=()=>{let E=(e.options?.preserveFiles||[]).map(H=>String(H).trim()).filter(Boolean),V=E.join(`
|
||||
`);if(V!==ft.key){let H=()=>!1;try{E.length&&(H=$l(E))}catch{}ft={key:V,fn:H}}return ft.fn};e.pathPreserved=E=>!!E&&At()(E),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let E=At();if(at()){let V=e.readmePath();return!!V&&E(V)}return Re.some(V=>E(V))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function wt(){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 V=parseGithubUrl(e.sourceUrl);E.repoName=`${V.owner}/${V.repo}`}catch{}return E}function j(E,V,H){let ee=null,pe=0,Se=()=>{if(e.detectedType!==E)return;ee&&u.cancel(ee);let Ze=++pe;e.previewStatus="loading",ee=u(()=>{ee=null;let Ht=V();if(!Ht){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Ht).then(yt=>{Ze===pe&&(H(yt.data,Ht),e.previewStatus="ready")}).catch(()=>{Ze===pe&&(e.previewStatus="error")})},200)};return Se.cancel=()=>{pe++,ee&&u.cancel(ee),ee=null},e.on("dispose",Se.cancel),Se}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof ze!="string"?en(e.previewFile):ln()),e.detectedType==="pr"&&Gn(),e.detectedType==="gist"&&Wn()};let Y=Sn(Zo(e));Object.defineProperty(e,"previewViewer",{get:()=>Y}),pl(Y,e),Object.assign(Y,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),Y.preview=!0,Y.fileSize=E=>E===Y.filePath&&typeof ze=="string"?new Blob([ze]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,Y.openPreserveFiles=()=>e.openPreserveFiles(),Y.previewPreserved=()=>e.previewPreserved(),Y.retryContent=()=>e.retryPreview();let ge=E=>oe.has(E)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(E),Te=(E="")=>({path:E,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=Te();let Ie=0,ze=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=E=>{if(E=E||"",E&&E===e.readmePath()&&(E=""),Ie++,ze=null,zt(),ln.cancel(),e.previewFile=E,e.previewDoc=Te(E),Y.sidebarCollapsed=!0,Y.content=null,!E){e.readme?ln():e.previewStatus="idle";return}if(ge(E)){Dn("binary"),e.previewStatus="ready";return}en(E)};function Mt(){Ie++,ze=null,e.previewFile="",e.previewDoc=Te(),Y.sidebarCollapsed=!0,Y.content=null}function en(E){let V=++Ie;ze=null,Object.assign(e.previewDoc,{loading:!0,loadError:""}),e.previewStatus="loading";let H;try{H=parseGithubUrl(e.sourceUrl)}catch{H=null}if(!H||!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/${H.owner}/${H.repo}/file`,{params:{commit:e.source.commit,path:E,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&nt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:ut()},transformResponse:ee=>ee}).then(ee=>{if(V!==Ie)return;e.previewDoc.loading=!1;let pe=typeof ee.headers=="function"&&ee.headers("content-type")||"";if(/json/i.test(pe)){let Se=null;try{Se=JSON.parse(ee.data)}catch{}if(Se&&Se.binary===!0){Dn("binary"),e.previewStatus="ready";return}}ze=typeof ee.data=="string"?ee.data:"",ln()},ee=>{if(V!==Ie)return;e.previewDoc.loading=!1;let pe=jr(ee);if(pe==="file_too_big"){Dn("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=ds.ERRORS[pe]||"GitHub did not return this file.",e.previewStatus="error"})}let Vt;function zt(){Vt&&window.URL.revokeObjectURL(Vt),Vt=void 0,Y.url=void 0}e.on("dispose",zt);function Dn(E){zt(),e.previewDoc.note=E,Y.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),Y.type=E==="too_big"?"error":"binary",Y.content=E==="too_big"?"file_too_big":"binary"}function Nm(E){try{let V=parseGithubUrl(e.sourceUrl),H=e.source.branch||e.details&&e.details.defaultBranch||"main",ee=E&&E.includes("/")?E.slice(0,E.lastIndexOf("/")+1):"";return`https://github.com/${V.owner}/${V.repo}/raw/${H}/${ee}`}catch{return""}}let Jl=j("repo",()=>e.previewFile?typeof ze!="string"?null:{content:ze,options:wt()}:e.readme?{content:e.readme,options:wt()}:null,E=>{if(typeof E?.content!="string")throw Error("Invalid preview response");zt(),window.URL?.createObjectURL&&(Y.url=Vt=window.URL.createObjectURL(new Blob([E.content],{type:"text/plain"})));let V=e.previewOpenPath()||e.readmeName();Y.prepareFile(e.previewPathName(V)),Y.fileBaseUrl=Nm(V),Y.renderFileContent(E.content,Y.type,Y.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=E.content)}),ln=()=>{e.previewFile&&typeof ze!="string"||Jl()};ln.cancel=Jl.cancel;let Ms=ct(new Map),Jr=new Set,Qr=new Set,ho="",go=null,ki=()=>String(e.terms||"").split(`
|
||||
`).filter(E=>E.trim());function Rm(){go=null;let E=ki(),V=E.join(`
|
||||
`);V!==ho&&(Ms.clear(),Qr.clear(),ho=V);let H=[...Jr].filter(ee=>!Ms.has(ee));if(Jr.clear(),!(!H.length||!E.length))for(let ee=0;ee<H.length;ee+=400){let pe=H.slice(ee,ee+400);t.post("/api/anonymize-preview",{contents:pe,options:{terms:E,image:!0,link:!0}}).then(Se=>{if(ho!==V||ki().join(`
|
||||
`)!==V)return;let Ze=Se.data?.contents;if(!Array.isArray(Ze)||Ze.length!==pe.length)throw Error("Invalid preview response");pe.forEach((Ht,yt)=>Ms.set(Ht,typeof Ze[yt]=="string"?Ze[yt]:Ht))}).catch(()=>{ho===V&&pe.forEach(Se=>Qr.add(Se))})}}e.previewName=E=>{if(!E||!ki().length)return E;if(ho===ki().join(`
|
||||
`)){if(Ms.has(E))return Ms.get(E);if(Qr.has(E))return E}return Jr.add(E),go||(go=u(Rm,120)),E},e.previewPathName=E=>{E=String(E||"");let V=E.lastIndexOf("/");return V<0?e.previewName(E):e.previewName(E.slice(0,V))+"/"+e.previewName(E.slice(V+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{Y.repoId=e.repoId||"repository",Y.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),Y.paths=Y.filePath.split("/"),Y.files=e.previewTreeFiles(),Y.loadedFolders=Object.fromEntries([...J?.dirs.keys()||[]].map(E=>[e.previewName(E),!0]))},!0),e.on("dispose",()=>{go&&u.cancel(go)});function Vs(){!e.anonymize||!e.anonymize.terms||ln()}async function Ql(){let E=parseGithubUrl(e.sourceUrl),V=v();try{$s(),fe();let H=await t.get(`/api/pr/${E.owner}/${E.repo}/${E.pullRequestId}`,{params:{connection:e.githubConnection}});if(!y(V))return;e.details=H.data,e.pullRequestId||(e.pullRequestId=E.repo+"-PR"+E.pullRequestId+"-"+generateRandomId(4))}catch(H){if(!y(V))return;throw te(H),H}finally{b(V)}}let Ls=ct(new Map);function Tm(){let E=new Set,V=e.details&&e.details.pullRequest;if(!V)return E;typeof V.title=="string"&&E.add(V.title),typeof V.body=="string"&&E.add(V.body),typeof V.diff=="string"&&E.add(V.diff);let H=V.comments||[];for(let ee of H)typeof ee.author=="string"&&E.add(ee.author),typeof ee.body=="string"&&E.add(ee.body);return E}let Gn=j("pr",()=>{let E=Tm(),V=Array.from(E);return V.length===0?null:{contents:V,options:wt()}},(E,V)=>{if(!Array.isArray(E?.contents)||E.contents.length!==V.contents.length||E.contents.some(pe=>typeof pe!="string"))throw Error("Invalid preview response");let H=V.contents,ee=new Map;for(let pe=0;pe<H.length&&pe<E.contents.length;pe++)ee.set(H[pe],E.contents[pe]);Ls.clear(),ee.forEach((pe,Se)=>Ls.set(Se,pe))});e.anonymizePrContent=function(E){return E&&(Ls.has(E)?Ls.get(E):"")};async function Zl(){let E=parseGithubUrl(e.sourceUrl),V=v();try{$s(),fe(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let H=await t.get(`/api/gist/source/${E.gistId}`);if(!y(V))return;e.details=H.data,e.gistId||(e.gistId="gist-"+E.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(H){if(!y(V))return;if(H.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,Pe("sourceUrl","missing",!1);return}if(H.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,Pe("sourceUrl","missing",!1);return}throw te(H),H}finally{b(V)}}let qs=ct(new Map);function Pm(){let E=new Set,V=e.details&&e.details.gist;if(!V)return E;typeof V.description=="string"&&E.add(V.description),typeof V.ownerLogin=="string"&&E.add(V.ownerLogin);let H=V.files||[];for(let pe of H)typeof pe.filename=="string"&&E.add(pe.filename),typeof pe.content=="string"&&E.add(pe.content);let ee=V.comments||[];for(let pe of ee)typeof pe.author=="string"&&E.add(pe.author),typeof pe.body=="string"&&E.add(pe.body);return E}let Wn=j("gist",()=>{let E=Pm(),V=Array.from(E);return V.length===0?null:{contents:V,options:wt()}},(E,V)=>{if(!Array.isArray(E?.contents)||E.contents.length!==V.contents.length||E.contents.some(pe=>typeof pe!="string"))throw Error("Invalid preview response");let H=V.contents,ee=new Map;for(let pe=0;pe<H.length&&pe<E.contents.length;pe++)ee.set(H[pe],E.contents[pe]);qs.clear(),ee.forEach((pe,Se)=>qs.set(Se,pe)),Zr()});e.anonymizeGistContent=function(E){return E&&(qs.has(E)?qs.get(E):"")},e.previewGistFiles=[];function Zr(){let E=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=E.map(V=>({filename:e.anonymizeGistContent(V.filename),content:e.anonymizeGistContent(V.content),language:V.language}))}e.watch("details.gist.files",Zr,!0),e.watch("terms",Zr);function Am(){let E=e.conference;if(e.conference_data=null,!E)return;let V=E===C||e.isUpdate&&E===e._originalConference;E!==C&&(C=null),t.get("/api/conferences/"+E).then(H=>{e.conference===E&&(e.conference_data=H.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!V&&(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 $s(){Pe("repoId","used",!0),Pe("repoId","format",!0),Pe("pullRequestId","used",!0),Pe("pullRequestId","format",!0),Pe("gistId","used",!0),Pe("gistId","format",!0),Pe("sourceUrl","used",!0),Pe("sourceUrl","missing",!0),Pe("sourceUrl","access",!0),Pe("sourceUrl","github",!0),Pe("commit","exists",!0),Pe("conference","activated",!0),Pe("terms","format",!0),e.termHints=[]}function Ci(){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.er
Line truncated
|
||||
`).filter(Se=>Se),connection:e.githubConnection,fullName:`${H.owner}/${H.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(ee.options.pageSource=e.details.pageSource),$s();let pe=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(pe,ee,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/status/"+e.repoId},Se=>{if(Se.data){let Ze=["quota_exceeded","quota_repository_limit","quota_storage_limit","subscription_required_for_never_expiration"].includes(Se.data.error);Ze||r("ERRORS."+Se.data.error).then(Ht=>{e.error=Ht},console.error),Si(Se.data.error),Ze&&(Se.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,Ye(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{V.disabled=!1})},e.anonymizeGist=E=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(Ci())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let V=E.currentTarget||E.target.closest?.("button")||E.target;V.disabled=!0;let H=parseGithubUrl(e.sourceUrl),ee={gistId:e.gistId,terms:e.terms.trim().split(`
|
||||
`).filter(Se=>Se),source:{gistId:H.gistId},options:e.options,conference:e.conference};$s();let pe=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(pe,ee,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/gist/"+e.gistId},Se=>{Se.data&&(r("ERRORS."+Se.data.error).then(Ze=>{e.error=Ze},console.error),Si(Se.data.error))}).finally(()=>{V.disabled=!1})},e.anonymizePullRequest=E=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(Ci())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let V=E.currentTarget||E.target.closest?.("button")||E.target;V.disabled=!0;let H=parseGithubUrl(e.sourceUrl),ee={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
|
||||
`).filter(Se=>Se),source:{repositoryFullName:`${H.owner}/${H.repo}`,pullRequestId:H.pullRequestId},options:e.options,conference:e.conference};$s();let pe=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(pe,ee,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/pr/"+e.pullRequestId},Se=>{Se.data&&(r("ERRORS."+Se.data.error).then(Ze=>{e.error=Ze},console.error),Si(Se.data.error))}).finally(()=>{V.disabled=!1})},e.watch("conference",()=>{Am()}),e.termHints=[],e.matchTermAsWritten=E=>{e.terms=Hp(e.terms,E)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&ln()}),e.watch("terms",()=>{e.termHints=zp(e.terms),e.detectedType==="repo"&&Vs(),e.detectedType==="pr"&&Gn(),e.detectedType==="gist"&&Wn()}),e.watch("options.image",()=>{e.detectedType==="repo"&&Vs(),e.detectedType==="pr"&&Gn(),e.detectedType==="gist"&&Wn()}),e.watch("options.link",()=>{e.detectedType==="repo"&&Vs(),e.detectedType==="pr"&&Gn(),e.detectedType==="gist"&&Wn()}),e.watch("details",()=>{e.detectedType==="pr"&&Gn(),e.detectedType==="gist"&&Wn()},!0)},_l=function(e,t,s,i,o,r){pl(e);let u=Pt();Wr();let p=Ut(),d=0,h=null,m=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function y(){h&&(h.resolve(),h=null),m&&(u.timeout.cancel(m),m=null)}let v=!1;e.on("dispose",()=>{v=!0,d++,y(),b&&b.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",W=>{e.symbolsOpen&&!W.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!W.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!W.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&W.target.isConnected&&!W.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!W.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!W.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),p(document,"keydown",W=>{W.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(W.ctrlKey||W.metaKey)&&!W.altKey&&W.key&&W.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(W.preventDefault(),e.toggleMdFind(!0))}),p(document,"keydown",function(W){if((W.metaKey||W.ctrlKey)&&W.key==="k"){W.preventDefault();var M=document.querySelector(".tree-search-input");M&&(M.focus(),M.select())}});var b=null;e.onFileSearchChange=function(){b&&(b.resolve(),b=null);let W=e.fileSearchQuery;if(!W||W.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let M=r.defer();b=M,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(W)}`,{timeout:M.promise}).then(function(S){if(!(v||b!==M)){b=null,e.fileSearchLoading=!1;var q={};e.files.forEach(function(De){q[(De.path||"")+"/"+De.name]=!0});for(var X=[],Z={},G=0;G<S.data.length;G++){var se=S.data[G];if(se.path)for(var te=se.path.split("/"),fe="",we=0;we<te.length;we++){var _e=fe;fe=fe?fe+"/"+te[we]:te[we];var Je=_e+"/"+te[we];!q[Je]&&!Z[Je]&&(Z[Je]=!0,X.push({name:te[we],path:_e}))}}X.sort(function(De,Q){return(De.path||"").split("/").length-(Q.path||"").split("/").length}),X.length>0&&e.files.push.apply(e.files,X);for(var Xe=[],Pe=0;Pe<S.data.length;Pe++){var nt=S.data[Pe],ut=(nt.path||"")+"/"+nt.name;!q[ut]&&nt.size!=null&&(Xe.push(nt),q[ut]=!0)}Xe.length>0&&e.files.push.apply(e.files,Xe),e.fileSearchResults=S.data}},function(){!v&&b===M&&(b=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(W,M){if(e.repoId!=i.repoId)return U();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),L();for(let S=0;S<e.paths.length-1;S++){let q=S>0?e.paths.slice(0,S).join("/"):"";e.files.some(Z=>Z.path===q)||e.getFiles(q)}}});function w(){if(e.paths[0]!="")return;let W=["readme.md","readme.txt","readme.org","readme.1st","readme"],M={};for(let q of e.files)q.name.toLowerCase().indexOf("readme")>-1&&(M[q.name.toLowerCase()]=q.name);let S=null;for(let q of W)if(M[q]){S=q;break}if(!S&&Object.keys(M).length>0&&(S=Object.keys(M)[0]),S){let q=s.url();q[q.length-1]!="/"&&(q+="/"),s.url(q+encodePathForUrl(M[S]))}}e.fileCounts=null;let k=0,N=new Set,C=!1;e.getFiles=function(W,M=!1){let S=e.repoId,q=k;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(W)}&v=${e.options.lastUpdateDate}`).then(function(X){if(v||S!==e.repoId||q!==k)return[];let Z=W||"";return e.files=e.files.filter(G=>G.path!==Z),e.files.push(...X.data),e.loadedFolders={...e.loadedFolders,[Z]:!0},P(Z,q),X.data},function(X){if(v||S!==e.repoId||q!==k)return[];M||(e.type="error",e.content=jr(X),e.files=[])})};function P(W,M){if(C||N.has(W))return;N.add(W);let S=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(W)}`).then(function(q){v||S!==e.repoId||M!==k||(e.fileCounts={...e.fileCounts,...q.data})},function()
Line truncated
|
||||
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(v=>v.trim()).filter(Boolean).sort((v,b)=>b.length-v.length),d=v=>v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let h=new RegExp("("+p.map(d).join("|")+")","gi"),m={},y=0;return(e.demoText||"").split(h).filter(v=>v!=="").map(v=>{let b=p.find(w=>w.toLowerCase()===v.toLowerCase());return b?(m[b.toLowerCase()]||(m[b.toLowerCase()]=++y),{text:String(m[b.toLowerCase()]),redacted:!0,original:v}):{text:v}})},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 r(){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(()=>{})}r();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 h=new Array(p.length-1);for(let C=1;C<p.length;C++)h[C-1]=p[C]-p[C-1];let m=h.length,y=Math.max.apply(null,h),v=Math.min.apply(null,h),b=Math.min(0,v),w=y-b||1;d.viewW=m*2,d.bars=new Array(m);for(let C=0;C<m;C++){let N=(h[C]-b)/w,k=Math.max(1.5,N*34);d.bars[C]={x:(C*2+.25).toFixed(2),y:(36-k).toFixed(2),w:"1.5",h:k.toFixed(2)}}if(d.deltaToday=h[m-1],m>=2){let C=h[m-2];C&&(d.pctChange=(d.deltaToday-C)/C*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(h=>h.nbRepositories||0)),users:u(d.map(h=>h.nbUsers||0)),pageViews:u(d.map(h=>h.nbPageViews||0)),pullRequests:u(d.map(h=>h.nbPullRequests||0))}}).catch(()=>{})},Qp=function(e,t,s,i,o,r){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,Ye(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Ft()(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=xa(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 Ye();let q=document.getElementById(e.projectDetailsId(S));q?.focus(),q?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=S=>{e.selectedProject=null,Ye(()=>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 Y=await t.post("/api/user/project-name",{type:S._type,id:S._id,name:q});S.projectName=Y.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 F(),e.selectedProject===S&&(e.selectedProject=e.items.find(Q=>Q._type===S._type&&Q._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,o.location.origin).href;e.copyingId=S._type+":"+S._id;try{await Ul(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"];function
Line truncated
|
||||
`)),e.options=Object.assign({},e.options,H.options),e.options.expirationDate=H.options&&H.options.expirationDate?new Date(H.options.expirationDate):L(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),E&&E()})}function Ae(E,V,H){e.anonymize&&e.anonymize[E]&&e.anonymize[E].setValidity(V,H)}function tt(E){try{let V=parseGithubUrl(E);if(V&&V.owner&&V.repo)return V.owner+"/"+V.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"||tt(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let E=v();try{let V=await t.get("/github/connections");if(e.githubConnections=V.data,!V.data.appEnabled)return;let H=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":V.data.csrf}});if(!y(E))return;e.error=null,H.data.fullName&&(e._originalFullName=H.data.fullName,e.source.fullName=H.data.fullName,e.sourceUrl="https://github.com/"+H.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{y(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,b(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=[];try{await ge()}catch{}}};function dt(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:tt(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function Oe(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function J(){let E=new URLSearchParams(window.location.search).get("billingDraft");if(E){N.restore();try{let H=(await t.get("/api/billing/draft/"+encodeURIComponent(E))).data;if(H.path!==o.path())throw new Error("Wrong task");k=H.values.conference||null;for(let Z of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(H.values,Z)&&(e[Z]=H.values[Z]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),P=H.id,D=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await Oe(),o.replace?.(o.path()),!0}catch{e.billingError="The checkout draft could not be restored. Retry by reloading this page; any local draft is still available."}}let V;try{V=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!V||V.path!==o.path()||Date.now()-V.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await Oe(),!0):!1;N.restore();for(let H of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(V.draft,H)&&(e[H]=V.draft[H]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await Oe(),sessionStorage.removeItem("github-access-draft"),!0}We(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&u(J,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(V=>V).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)),w=C(parseGithubUrl(e.sourceUrl)),!await J()&&(await Promise.all([ge(),ue()]),Ds())},()=>{o.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(V=>V).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)),w=C(parseGithubUrl(e.sourceUrl)),!await J())try{await Zl()}catch{}},()=>{o.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(V=>V).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)),w=C(parseGithubUrl(e.sourceUrl)),!await J()&&await xl()},()=>{o.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&&Oe())}).catch(()=>{}).finally(()=>{!h&&!i.repoId&&!i.pullRequestId&&!i.gistId&&e.userReposStatus==="idle"&&e.loadUserRepos()}),e.urlSelected=async(E=!1)=>{let V=++d;e.previousConfigurations=[],e.previousConfigurationId="";let H;try{H=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,e.details=null,fe(),sn.cancel(),_n.cancel(),Bn.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",Ae("sourceUrl","github",!1);return}let Z=C(H),pe=E||w===Z;w=Z,e.sourceUrlError="",Ae("sourceUrl","github",!0),fe();let Re=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let Ze=window.document.getElementById("sourceUrl");if(Ze){try{Ze.setSelectionRange(0,0)}catch{}Ze.scrollLeft=0}},50),Re&&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:""}),sn.cancel(),_n.cancel(),Bn.cancel(),Is.clear(),Os.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",is(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=pe;try{H.gistId&&!H.repo?(e.detectedType="gist",e.source={gistId:H.gistId},await xl()):H.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:H.owner+"/"+H.repo,pullRequestId:H.pullRequestId},await Zl()):(e.detectedType="repo",j(),await Promise.all([ge(),ue()]),Ds())}catch{}finally{V===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(H=>H.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 ue(),Ds()}),e.getBranches=async E=>{let V=parseGithubUrl(e.sourceUrl),H=v();try{if(!e.details){await ge(E);return}let Z=await t.get(`/api/repo/${V.owner}/${V.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&tt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:E===!0||e.reconnectingSource?"1":"0",repositoryID:dt()}});if(!y(H))return;e.branches=Z.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let pe=e.branches.filter(Re=>Re.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 ue(E))}catch(Z){if(!y(H))return;e.branches=[],e.sourceUnreachable=Z&&(Z.status===404||Z.data&&Z.data.error==="repo_not_found"),e.details=null,te(Z)}finally{b(H)}};async function ge(E=!1){let V=parseGithubUrl(e.sourceUrl),H=v();try{Ms(),fe();let Z=await t.get(`/api/repo/${V.owner}/${V.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&tt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:dt(),force:"1"}});if(!y(H))return;e.details=Z.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(Z){if(!y(H))return;throw te(Z),Z}finally{b(H)}}async function ue(E){if(e.readme&&!E)return e.readme;let V=parseGithubUrl(e.sourceUrl),H=v();try{let Z=await t.get(`/api/repo/${V.owner}/${V.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&tt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:E===!0?"1":"0",branch:e.source.branch,repositoryID:dt()}});y(H,!0)&&(e.readme=Z.data)}catch{y(H,!0)&&(e.readme="")}finally{b(H)}}let ye={magicalBraces:!0},Ne=E=>E.startsWith("/")&&!E.endsWith("/")&&xn(Rs(E.slice(1),ye),ye)===E.slice(1),Ve=()=>Object.keys(e.preserve.picked).filter(E=>e.preserve.picked[E]).sort().map(E=>"/"+xn(E,ye)),I=E=>"/"+xn(E,ye)+"/**",O=E=>"!/"+xn(E,ye)+"/",z=()=>String(e.preserve.patterns||"").split(`
|
||||
`).map(E=>E.trim()).filter(Boolean),ee=null,X=null,oe=new Set,ce=0,ae=null,re=()=>!1;function ie(){let E=ce+"\0"+e.preserve.patterns;if(E!==ae){ae=E;try{re=$l(ql([...Ve(),...z()]))}catch{re=()=>!1}}return re}function Te(E){let V=new Map([["",{dirs:[],files:[]}]]);for(let H of E){let Z=H.split("/"),pe="";for(let Re=0;Re<Z.length-1;Re++){let Ze=Z.slice(0,Re+1).join("/");V.has(Ze)||(V.set(Ze,{dirs:[],files:[]}),V.get(pe).dirs.push(Ze)),pe=Ze}V.get(pe).files.push(H)}for(let H of V.values())H.dirs.sort();return{files:E,dirs:V,descendants:new Map}}function me(E){return ee.descendants.has(E)||ee.descendants.set(E,ee.files.filter(V=>V.startsWith(E+"/"))),ee.descendants.get(E)}let De=E=>ie()(E);function Le(E){let V=me(E),H=0;for(let Z of V)De(Z)&&H++;return H===0?"none":H===V.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(V=>String(V).trim()).filter(Boolean).map(V=>Ne(V)?Rs(V.slice(1),ye):V);return E.length?E.slice(0,2).join(", ")+(E.length>2?` and ${E.length-2} more`:""):"None. Every file is redacted."};async function _e(){let E=e.source?.commit;if(!(ee&&e.preserve.commit===E)){e.preserve.loading=!0,e.preserve.error="",ee=null,X=null;try{let V=parseGithubUrl(e.sourceUrl),H=await t.get(`/api/repo/${V.owner}/${V.repo}/tree`,{params:{commit:E,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&tt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:dt()}});if(e.source?.commit!==E)return;let Z=Array.isArray(H.data.binaryFiles)?H.data.binaryFiles:[];ee=bn(Te(H.data.files||[])),X=Z.length?bn(Te([...H.data.files||[],...Z])):ee,oe=bn(new Set(Z)),e.preserve.commit=E,e.preserve.truncated=!!H.data.truncated,e.previewFile||sn()}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&&_e().catch(()=>{})}),e.openPreserveFiles=()=>{let E={},V=[];for(let Z of e.options?.preserveFiles||[]){let pe=String(Z).trim();pe&&(!V.length&&Ne(pe)?E[Rs(pe.slice(1),ye)]=!0:V.push(pe))}let H={};for(let Z of Object.keys(E)){let pe=Z.split("/");for(let Re=1;Re<pe.length;Re++)H[pe.slice(0,Re).join("/")]=!0}Object.assign(e.preserve,{open:!0,search:"",picked:E,expanded:H,patterns:V.join(`
|
||||
`),patternsOpen:V.length>0}),e.mobileWorkspace&&(e.mobilePane="settings"),ce++,u(()=>{let Z=document.getElementById("preserve-files-dialog");Z?.showModal&&!Z.open&&Z.showModal(),document.getElementById("preserve-files-search")?.focus()},0),_e()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=ql([...Ve(),...z()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!ee)return[];let E=ie(),V=(Re,Ze,_t)=>{let vt=!!e.preserve.picked[Re],Mt=E(Re);return{kind:"file",path:Re,label:_t,depth:Ze,state:Mt?"all":"none",locked:!vt&&Mt,note:!vt&&Mt?"matched by a pattern":vt&&!Mt?"excluded by a pattern":""}},H=String(e.preserve.search||"").trim().toLowerCase();if(H)return ee.files.filter(Re=>Re.toLowerCase().includes(H)).slice(0,300).map(Re=>V(Re,0,Re));let Z=[],pe=(Re,Ze)=>{let _t=ee.dirs.get(Re);for(let vt of _t.dirs){let Mt=!!e.preserve.expanded[vt],Qt=z().includes(I(vt));Z.push({kind:"dir",path:vt,label:vt.slice(Re?Re.length+1:0)+"/",depth:Ze,open:Mt,state:Le(vt),locked:!1,note:Qt?"whole folder":""}),Mt&&pe(vt,Ze+1)}for(let vt of _t.files)Z.push(V(vt,Ze,vt.slice(Re?Re.length+1:0)))};return pe("",0),Z},e.preserveCount=()=>ee?ee.files.filter(De).length:0,e.togglePreserveDir=E=>{e.preserve.expanded[E]=!e.preserve.expanded[E]},e.togglePreserveFile=E=>{e.preserve.picked[E]=!e.preserve.picked[E],ce++},e.togglePreserveFolder=E=>{let V=I(E),H=O(E),Z=z().filter(Re=>Re!==V&&Re!==H),pe=Le(E)==="all"||z().includes(V);for(let Re of me(E))e.preserve.picked[Re]=!1;ce++,e.preserve.patterns=(pe?Z:[...Z,V]).join(`
|
||||
`),pe&&me(E).some(De)&&(e.preserve.patterns=[...Z,H].join(`
|
||||
`))};let et=/^readme(\.[^/]*)?$/i,Je=[".md",".markdown",".mdown",".mkdn",".rst",".txt",""],Pe=["README.md","README","README.markdown","README.rst","README.txt","readme.md"],ze=E=>{let V=Be(E),H=V.indexOf("."),Z=Je.indexOf(H===-1?"":V.slice(H).toLowerCase());return Z===-1?Je.length:Z},W=()=>!!ee&&!!e.preserve.commit&&e.preserve.commit===e.source?.commit;e.readmePath=()=>{if(!W())return"";for(let E of[".github","","docs"]){let V=(ee.dirs.get(E)?.files||[]).filter(H=>et.test(Be(H)));if(V.length)return V.sort((H,Z)=>ze(H)-ze(Z)||Se(H,Z))[0]}return""},e.readmeName=()=>Be(e.readmePath())||"README.md";let x={key:null,fn:()=>!1},he=()=>{let E=(e.options?.preserveFiles||[]).map(H=>String(H).trim()).filter(Boolean),V=E.join(`
|
||||
`);if(V!==x.key){let H=()=>!1;try{E.length&&(H=$l(E))}catch{}x={key:V,fn:H}}return x.fn};e.pathPreserved=E=>!!E&&he()(E),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let E=he();if(W()){let V=e.readmePath();return!!V&&E(V)}return Pe.some(V=>E(V))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function Ce(){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 V=parseGithubUrl(e.sourceUrl);E.repoName=`${V.owner}/${V.repo}`}catch{}return E}function ve(E,V,H){let Z=null,pe=0,Re=()=>{if(e.detectedType!==E)return;Z&&u.cancel(Z);let Ze=++pe;e.previewStatus="loading",Z=u(()=>{Z=null;let _t=V();if(!_t){e.previewStatus="idle";return}t.post("/api/anonymize-preview",_t).then(vt=>{Ze===pe&&(H(vt.data,_t),e.previewStatus="ready")}).catch(()=>{Ze===pe&&(e.previewStatus="error")})},200)};return Re.cancel=()=>{pe++,Z&&u.cancel(Z),Z=null},e.on("dispose",Re.cancel),Re}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof bt!="string"?Jl(e.previewFile):sn()),e.detectedType==="pr"&&_n(),e.detectedType==="gist"&&Bn()};let be=bn(Xo(e));Object.defineProperty(e,"previewViewer",{get:()=>be}),pl(be,e),Object.assign(be,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),be.preview=!0,be.fileSize=E=>E===be.filePath&&typeof bt=="string"?new Blob([bt]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,be.openPreserveFiles=()=>e.openPreserveFiles(),be.previewPreserved=()=>e.previewPreserved(),be.retryContent=()=>e.retryPreview();let ft=E=>oe.has(E)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(E),Ot=(E="")=>({path:E,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=Ot();let Pt=0,bt=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=E=>{if(E=E||"",E&&E===e.readmePath()&&(E=""),Pt++,bt=null,bi(),sn.cancel(),e.previewFile=E,e.previewDoc=Ot(E),be.sidebarCollapsed=!0,be.content=null,!E){e.readme?sn():e.previewStatus="idle";return}if(ft(E)){Xr("binary"),e.previewStatus="ready";return}Jl(E)};function is(){Pt++,bt=null,e.previewFile="",e.previewDoc=Ot(),be.sidebarCollapsed=!0,be.content=null}function Jl(E){let V=++Pt;bt=null,Object.assign(e.previewDoc,{loading:!0,loadError:""}),e.previewStatus="loading";let H;try{H=parseGithubUrl(e.sourceUrl)}catch{H=null}if(!H||!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/${H.owner}/${H.repo}/file`,{params:{commit:e.source.commit,path:E,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&tt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:dt()},transformResponse:Z=>Z}).then(Z=>{if(V!==Pt)return;e.previewDoc.loading=!1;let pe=typeof Z.headers=="function"&&Z.headers("content-type")||"";if(/json/i.test(pe)){let Re=null;try{Re=JSON.parse(Z.data)}catch{}if(Re&&Re.binary===!0){Xr("binary"),e.previewStatus="ready";return}}bt=typeof Z.data=="string"?Z.data:"",sn()},Z=>{if(V!==Pt)return;e.previewDoc.loading=!1;let pe=Hr(Z);if(pe==="file_too_big"){Xr("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=os.ERRORS[pe]||"GitHub did not return this file.",e.previewStatus="error"})}let yi;function bi(){yi&&window.URL.revokeObjectURL(yi),yi=void 0,be.url=void 0}e.on("dispose",bi);function Xr(E){bi(),e.previewDoc.note=E,be.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),be.type=E==="too_big"?"error":"binary",be.content=E==="too_big"?"file_too_big":"binary"}function Nm(E){try{let V=parseGithubUrl(e.sourceUrl),H=e.source.branch||e.details&&e.details.defaultBranch||"main",Z=E&&E.includes("/")?E.slice(0,E.lastIndexOf("/")+1):"";return`https://github.com/${V.owner}/${V.repo}/raw/${H}/${Z}`}catch{return""}}let Ql=ve("repo",()=>e.previewFile?typeof bt!="string"?null:{content:bt,options:Ce()}:e.readme?{content:e.readme,options:Ce()}:null,E=>{if(typeof E?.content!="string")throw Error("Invalid preview response");bi(),window.URL?.createObjectURL&&(be.url=yi=window.URL.createObjectURL(new Blob([E.content],{type:"text/plain"})));let V=e.previewOpenPath()||e.readmeName();be.prepareFile(e.previewPathName(V)),be.fileBaseUrl=Nm(V),be.renderFileContent(E.content,be.type,be.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=E.content)}),sn=()=>{e.previewFile&&typeof bt!="string"||Ql()};sn.cancel=Ql.cancel;let As=ut(new Map),Jr=new Set,Qr=new Set,po="",fo=null,wi=()=>String(e.terms||"").split(`
|
||||
`).filter(E=>E.trim());function Rm(){fo=null;let E=wi(),V=E.join(`
|
||||
`);V!==po&&(As.clear(),Qr.clear(),po=V);let H=[...Jr].filter(Z=>!As.has(Z));if(Jr.clear(),!(!H.length||!E.length))for(let Z=0;Z<H.length;Z+=400){let pe=H.slice(Z,Z+400);t.post("/api/anonymize-preview",{contents:pe,options:{terms:E,image:!0,link:!0}}).then(Re=>{if(po!==V||wi().join(`
|
||||
`)!==V)return;let Ze=Re.data?.contents;if(!Array.isArray(Ze)||Ze.length!==pe.length)throw Error("Invalid preview response");pe.forEach((_t,vt)=>As.set(_t,typeof Ze[vt]=="string"?Ze[vt]:_t))}).catch(()=>{po===V&&pe.forEach(Re=>Qr.add(Re))})}}e.previewName=E=>{if(!E||!wi().length)return E;if(po===wi().join(`
|
||||
`)){if(As.has(E))return As.get(E);if(Qr.has(E))return E}return Jr.add(E),fo||(fo=u(Rm,120)),E},e.previewPathName=E=>{E=String(E||"");let V=E.lastIndexOf("/");return V<0?e.previewName(E):e.previewName(E.slice(0,V))+"/"+e.previewName(E.slice(V+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{be.repoId=e.repoId||"repository",be.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),be.paths=be.filePath.split("/"),be.files=e.previewTreeFiles(),be.loadedFolders=Object.fromEntries([...X?.dirs.keys()||[]].map(E=>[e.previewName(E),!0]))},!0),e.on("dispose",()=>{fo&&u.cancel(fo)});function Ds(){!e.anonymize||!e.anonymize.terms||sn()}async function Zl(){let E=parseGithubUrl(e.sourceUrl),V=v();try{Ms(),fe();let H=await t.get(`/api/pr/${E.owner}/${E.repo}/${E.pullRequestId}`,{params:{connection:e.githubConnection}});if(!y(V))return;e.details=H.data,e.pullRequestId||(e.pullRequestId=E.repo+"-PR"+E.pullRequestId+"-"+generateRandomId(4))}catch(H){if(!y(V))return;throw te(H),H}finally{b(V)}}let Is=ut(new Map);function Tm(){let E=new Set,V=e.details&&e.details.pullRequest;if(!V)return E;typeof V.title=="string"&&E.add(V.title),typeof V.body=="string"&&E.add(V.body),typeof V.diff=="string"&&E.add(V.diff);let H=V.comments||[];for(let Z of H)typeof Z.author=="string"&&E.add(Z.author),typeof Z.body=="string"&&E.add(Z.body);return E}let _n=ve("pr",()=>{let E=Tm(),V=Array.from(E);return V.length===0?null:{contents:V,options:Ce()}},(E,V)=>{if(!Array.isArray(E?.contents)||E.contents.length!==V.contents.length||E.contents.some(pe=>typeof pe!="string"))throw Error("Invalid preview response");let H=V.contents,Z=new Map;for(let pe=0;pe<H.length&&pe<E.contents.length;pe++)Z.set(H[pe],E.contents[pe]);Is.clear(),Z.forEach((pe,Re)=>Is.set(Re,pe))});e.anonymizePrContent=function(E){return E&&(Is.has(E)?Is.get(E):"")};async function xl(){let E=parseGithubUrl(e.sourceUrl),V=v();try{Ms(),fe(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let H=await t.get(`/api/gist/source/${E.gistId}`);if(!y(V))return;e.details=H.data,e.gistId||(e.gistId="gist-"+E.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(H){if(!y(V))return;if(H.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,Ae("sourceUrl","missing",!1);return}if(H.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,Ae("sourceUrl","missing",!1);return}throw te(H),H}finally{b(V)}}let Os=ut(new Map);function Pm(){let E=new Set,V=e.details&&e.details.gist;if(!V)return E;typeof V.description=="string"&&E.add(V.description),typeof V.ownerLogin=="string"&&E.add(V.ownerLogin);let H=V.files||[];for(let pe of H)typeof pe.filename=="string"&&E.add(pe.filename),typeof pe.content=="string"&&E.add(pe.content);let Z=V.comments||[];for(let pe of Z)typeof pe.author=="string"&&E.add(pe.author),typeof pe.body=="string"&&E.add(pe.body);return E}let Bn=ve("gist",()=>{let E=Pm(),V=Array.from(E);return V.length===0?null:{contents:V,options:Ce()}},(E,V)=>{if(!Array.isArray(E?.contents)||E.contents.length!==V.contents.length||E.contents.some(pe=>typeof pe!="string"))throw Error("Invalid preview response");let H=V.contents,Z=new Map;for(let pe=0;pe<H.length&&pe<E.contents.length;pe++)Z.set(H[pe],E.contents[pe]);Os.clear(),Z.forEach((pe,Re)=>Os.set(Re,pe)),Zr()});e.anonymizeGistContent=function(E){return E&&(Os.has(E)?Os.get(E):"")},e.previewGistFiles=[];function Zr(){let E=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=E.map(V=>({filename:e.anonymizeGistContent(V.filename),content:e.anonymizeGistContent(V.content),language:V.language}))}e.watch("details.gist.files",Zr,!0),e.watch("terms",Zr);function Am(){let E=e.conference;if(e.conference_data=null,!E)return;let V=E===k||e.isUpdate&&E===e._originalConference;E!==k&&(k=null),t.get("/api/conferences/"+E).then(H=>{e.conference===E&&(e.conference_data=H.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!V&&(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 Ms(){Ae("repoId","used",!0),Ae("repoId","format",!0),Ae("pullRequestId","used",!0),Ae("pullRequestId","format",!0),Ae("gistId","used",!0),Ae("gistId","format",!0),Ae("sourceUrl","used",!0),Ae("sourceUrl","missing",!0),Ae("sourceUrl","access",!0),Ae("sourceUrl","github",!0),Ae("commit","exists",!0),Ae("conference","activated",!0),Ae("terms","format",!0),e.termHints=[]}function ki(){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(Re=>Re),connection:e.githubConnection,fullName:`${H.owner}/${H.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(Z.options.pageSource=e.details.pageSource),Ms();let pe=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(pe,Z,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/status/"+e.repoId},Re=>{if(Re.data){let Ze=["quota_exceeded","quota_repository_limit","quota_storage_limit","subscription_required_for_never_expiration"].includes(Re.data.error);Ze||r("ERRORS."+Re.data.error).then(_t=>{e.error=_t},console.error),Ci(Re.data.error),Ze&&(Re.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,Ye(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{V.disabled=!1})},e.anonymizeGist=E=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ki())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let V=E.currentTarget||E.target.closest?.("button")||E.target;V.disabled=!0;let H=parseGithubUrl(e.sourceUrl),Z={gistId:e.gistId,terms:e.terms.trim().split(`
|
||||
`).filter(Re=>Re),source:{gistId:H.gistId},options:e.options,conference:e.conference};Ms();let pe=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(pe,Z,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/gist/"+e.gistId},Re=>{Re.data&&(r("ERRORS."+Re.data.error).then(Ze=>{e.error=Ze},console.error),Ci(Re.data.error))}).finally(()=>{V.disabled=!1})},e.anonymizePullRequest=E=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ki())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let V=E.currentTarget||E.target.closest?.("button")||E.target;V.disabled=!0;let H=parseGithubUrl(e.sourceUrl),Z={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
|
||||
`).filter(Re=>Re),source:{repositoryFullName:`${H.owner}/${H.repo}`,pullRequestId:H.pullRequestId},options:e.options,conference:e.conference};Ms();let pe=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(pe,Z,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/pr/"+e.pullRequestId},Re=>{Re.data&&(r("ERRORS."+Re.data.error).then(Ze=>{e.error=Ze},console.error),Ci(Re.data.error))}).finally(()=>{V.disabled=!1})},e.watch("conference",()=>{Am()}),e.termHints=[],e.matchTermAsWritten=E=>{e.terms=Hp(e.terms,E)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&sn()}),e.watch("terms",()=>{e.termHints=zp(e.terms),e.detectedType==="repo"&&Ds(),e.detectedType==="pr"&&_n(),e.detectedType==="gist"&&Bn()}),e.watch("options.image",()=>{e.detectedType==="repo"&&Ds(),e.detectedType==="pr"&&_n(),e.detectedType==="gist"&&Bn()}),e.watch("options.link",()=>{e.detectedType==="repo"&&Ds(),e.detectedType==="pr"&&_n(),e.detectedType==="gist"&&Bn()}),e.watch("details",()=>{e.detectedType==="pr"&&_n(),e.detectedType==="gist"&&Bn()},!0)},_l=function(e,t,s,i,o,r){pl(e);let u=Tt();Gr();let p=Ft(),d=0,h=null,m=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function y(){h&&(h.resolve(),h=null),m&&(u.timeout.cancel(m),m=null)}let v=!1;e.on("dispose",()=>{v=!0,d++,y(),b&&b.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",G=>{e.symbolsOpen&&!G.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!G.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!G.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&G.target.isConnected&&!G.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!G.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!G.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),p(document,"keydown",G=>{G.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(G.ctrlKey||G.metaKey)&&!G.altKey&&G.key&&G.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(G.preventDefault(),e.toggleMdFind(!0))}),p(document,"keydown",function(G){if((G.metaKey||G.ctrlKey)&&G.key==="k"){G.preventDefault();var M=document.querySelector(".tree-search-input");M&&(M.focus(),M.select())}});var b=null;e.onFileSearchChange=function(){b&&(b.resolve(),b=null);let G=e.fileSearchQuery;if(!G||G.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let M=r.defer();b=M,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(G)}`,{timeout:M.promise}).then(function(S){if(!(v||b!==M)){b=null,e.fileSearchLoading=!1;var q={};e.files.forEach(function(Oe){q[(Oe.path||"")+"/"+Oe.name]=!0});for(var Y=[],Q={},j=0;j<S.data.length;j++){var se=S.data[j];if(se.path)for(var te=se.path.split("/"),fe="",Se=0;Se<te.length;Se++){var Be=fe;fe=fe?fe+"/"+te[Se]:te[Se];var Qe=Be+"/"+te[Se];!q[Qe]&&!Q[Qe]&&(Q[Qe]=!0,Y.push({name:te[Se],path:Be}))}}Y.sort(function(Oe,J){return(Oe.path||"").split("/").length-(J.path||"").split("/").length}),Y.length>0&&e.files.push.apply(e.files,Y);for(var We=[],Ae=0;Ae<S.data.length;Ae++){var tt=S.data[Ae],dt=(tt.path||"")+"/"+tt.name;!q[dt]&&tt.size!=null&&(We.push(tt),q[dt]=!0)}We.length>0&&e.files.push.apply(e.files,We),e.fileSearchResults=S.data}},function(){!v&&b===M&&(b=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(G,M){if(e.repoId!=i.repoId)return U();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),L();for(let S=0;S<e.paths.length-1;S++){let q=S>0?e.paths.slice(0,S).join("/"):"";e.files.some(Q=>Q.path===q)||e.getFiles(q)}}});function w(){if(e.paths[0]!="")return;let G=["readme.md","readme.txt","readme.org","readme.1st","readme"],M={};for(let q of e.files)q.name.toLowerCase().indexOf("readme")>-1&&(M[q.name.toLowerCase()]=q.name);let S=null;for(let q of G)if(M[q]){S=q;break}if(!S&&Object.keys(M).length>0&&(S=Object.keys(M)[0]),S){let q=s.url();q[q.length-1]!="/"&&(q+="/"),s.url(q+encodePathForUrl(M[S]))}}e.fileCounts=null;let C=0,N=new Set,k=!1;e.getFiles=function(G,M=!1){let S=e.repoId,q=C;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(G)}&v=${e.options.lastUpdateDate}`).then(function(Y){if(v||S!==e.repoId||q!==C)return[];let Q=G||"";return e.files=e.files.filter(j=>j.path!==Q),e.files.push(...Y.data),e.loadedFolders={...e.loadedFolders,[Q]:!0},P(Q,q),Y.data},function(Y){if(v||S!==e.repoId||q!==C)return[];M||(e.type="error",e.content=Hr(Y),e.files=[])})};function P(G,M){if(k||N.has(G))return;N.add(G);let S=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(G)}`).then(function(q){v||S!==e.repoId||M!==C||(e.fileCounts={...e.fileCounts,...q.data})},function(){
Line truncated
|
||||
`).length+1)),placeholder:`Jane Smith
|
||||
MIT CSAIL
|
||||
jane.smith@example.org`},null,10,D6),[[u,{state:e.viewState,set:d=>{e.terms=d},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[125]||(t[125]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",I6,[t[120]||(t[120]=n("summary",null,"Regex & replacement syntax",-1)),t[121]||(t[121]=g()),n("small",O6,[t[114]||(t[114]=g("Regex is supported. Replaced by ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[115]||(t[115]=g(", or use ",-1)),t[116]||(t[116]=n("code",null,"term=>replacement",-1)),t[117]||(t[117]=g(" to pick your own (e.g. ",-1)),t[118]||(t[118]=n("code",null,"Anonymous=>ABC",-1)),t[119]||(t[119]=g(").",-1))])]),(a(!0),l(R,null,B((e.termHints||[]).slice(0,3),d=>(a(),l("div",{class:"term-hint",key:d.line},[n("span",null,[t[122]||(t[122]=g("In ",-1)),n("code",null,c(d.term),1),t[123]||(t[123]=g(", ",-1)),n("code",null,c(d.symbols.join(" ")),1),g(" "+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:h=>e.matchTermAsWritten(d.line)},"Match as written",8,M6)]))),128)),(e.termHints||[]).length>3?(a(),l("div",V6,c(e.termHints.length-3)+" more "+c(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),A(n("div",L6,"Terms are in an invalid format.",512),[[ne,e.anonymize?.terms?.errors?.format]])]),A(n("div",q6,[n("div",$6,[t[126]||(t[126]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",F6,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[25]||(t[25]=d=>e.openPreserveFiles())},c((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,U6)],512),[[ne,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[30]||(t[30]=le(d=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[29]||(t[29]=le(d=>e.savePreserveFiles(),["prevent"]))},[t[130]||(t[130]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[131]||(t[131]=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)),A(n("input",{type:"search",id:"preserve-files-search",class:"form-control",placeholder:"Search files","aria-label":"Search files",autocomplete:"off","onUpdate:modelValue":t[26]||(t[26]=d=>e.preserve.search=d)},null,512),[[pt,e.preserve.search]]),n("div",_6,[e.preserve.loading?(a(),l("p",B6,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",z6,c(e.preserve.error),1)):(a(),l(R,{key:2},[(a(!0),l(R,null,B(e.preserveRows(),(d,h)=>(a(),l("div",{class:"preserve-item",key:d.kind+":"+d.path,style:Oe({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,H6)):(a(),l("span",j6)),n("input",{type:"checkbox",id:"pf-"+h,"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,G6),n("label",{for:d.kind==="file"?"pf-"+h:null,class:"preserve-name",onClick:m=>d.kind==="dir"&&e.togglePreserveDir(d.path)},c(d.label),9,W6),d.note?(a(),l("span",K6,c(d.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",Y6,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[127]||(t[127]=n("summary",null,"Patterns",-1)),A(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib
|
||||
paper/appendix/**`,"onUpdate:modelValue":t[27]||(t[27]=d=>e.preserve.patterns=d)},null,512),[[pt,e.preserve.patterns]]),t[128]||(t[128]=n("small",{class:"form-text text-muted"},[g("One per line, as in .gitignore: "),n("code",null,"*.bib"),g(" matches in any folder; "),n("code",null,"/refs.bib"),g(" and "),n("code",null,"paper/refs.bib"),g(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),g(" covers everything inside it; "),n("code",null,"!private.bib"),g(" excludes again.")],-1))],8,J6),n("div",Q6,[n("span",Z6,c(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",x6,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[28]||(t[28]=d=>e.closePreserveFiles())},"Cancel"),t[129]||(t[129]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):f("v-if",!0)],512),[[ne,e.detectedType&&e.sourceReady()]]),A(n("section",eM,[t[152]||(t[152]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),A(n("div",null,[n("div",tM,[A(n("input",nM,null,512),[[u,{state:e.viewState,set:d=>{e.options.link=d},value:e.options?.link,form:"anonymize",options:{}}]]),t[133]||(t[133]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",sM,[A(n("input",oM,null,512),[[u,{state:e.viewState,set:d=>{e.options.image=d},value:e.options?.image,form:"anonymize",options:{}}]]),t[134]||(t[134]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",iM,[A(n("input",rM,null,512),[[u,{state:e.viewState,set:d=>{e.options.pdf=d},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[135]||(t[135]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",aM,[A(n("input",lM,null,512),[[u,{state:e.viewState,set:d=>{e.options.notebook=d},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[136]||(t[136]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",dM,[A(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,uM),[[u,{state:e.viewState,set:d=>{e.options.page=d},value:e.options?.page,form:"anonymize",options:{}}]]),t[137]||(t[137]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?f("v-if",!0):(a(),l("small",cM,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",pM,c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[ne,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",fM,[...t[138]||(t[138]=[g("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),A(n("div",null,[n("div",mM,[A(n("input",hM,null,512),[[u,{state:e.viewState,set:d=>{e.options.title=d},value:e.options?.title,form:"anonymize",options:{}}]]),t[139]||(t[139]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",gM,[A(n("input",vM,null,512),[[u,{state:e.viewState,set:d=>{e.options.content=d},value:e.options?.content,form:"anonymize",options:{}}]]),t[140]||(t[140]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",yM,[A(n("input",bM,null,512),[[u,{state:e.viewState,set:d=>{e.options.comments=d},value:e.options?.comments,form:"anonymize",options:{}}]]),t[141]||(t[141]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",wM,[A(n("input",kM,null,512),[[u,{state:e.viewState,set:d=>{e.options.username=d},value:e.options?.username,form:"anonymize",options:{}}]]),t[142]||(t[142]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",CM,[A(n("input",SM,null,512),[[u,{state:e.viewState,set:d=>{e.options.date=d},value:e.options?.date,form:"anonymize",options:{}}]]),t[143]||(t[143]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",EM,[A(n("input",NM,null,512),[[u,{state:e.viewState,set:d=>{e.options.origin=d},value:e.options?.origin,form:"anonymize",options:{}}]]),t[144]||(t[144]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[ne,e.detectedType==="gist"]]),A(n("div",null,[n("div",RM,[A(n("input",TM,null,512),[[u,{state:e.viewState,set:d=>{e.options.title=d},value:e.options?.title,form:"anonymize",options:{}}]]),t[145]||(t[145]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",PM,[A(n("input",AM,null,512),[[u,{state:e.viewState,set:d=>{e.options.body=d},value:e.options?.body,form:"anonymize",options:{}}]]),t[146]||(t[146]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))])
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"})]),g("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"})]),g("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,[g("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"),g(" 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"})]),g("Self"),n("span",{class:"serif-hy"},"-"),g("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,D6),[[u,{state:e.viewState,set:d=>{e.terms=d},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[125]||(t[125]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",I6,[t[120]||(t[120]=n("summary",null,"Regex & replacement syntax",-1)),t[121]||(t[121]=g()),n("small",O6,[t[114]||(t[114]=g("Regex is supported. Replaced by ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[115]||(t[115]=g(", or use ",-1)),t[116]||(t[116]=n("code",null,"term=>replacement",-1)),t[117]||(t[117]=g(" to pick your own (e.g. ",-1)),t[118]||(t[118]=n("code",null,"Anonymous=>ABC",-1)),t[119]||(t[119]=g(").",-1))])]),(a(!0),l(R,null,_((e.termHints||[]).slice(0,3),d=>(a(),l("div",{class:"term-hint",key:d.line},[n("span",null,[t[122]||(t[122]=g("In ",-1)),n("code",null,c(d.term),1),t[123]||(t[123]=g(", ",-1)),n("code",null,c(d.symbols.join(" ")),1),g(" "+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:h=>e.matchTermAsWritten(d.line)},"Match as written",8,M6)]))),128)),(e.termHints||[]).length>3?(a(),l("div",V6,c(e.termHints.length-3)+" more "+c(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),A(n("div",L6,"Terms are in an invalid format.",512),[[ne,e.anonymize?.terms?.errors?.format]])]),A(n("div",q6,[n("div",$6,[t[126]||(t[126]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",F6,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[25]||(t[25]=d=>e.openPreserveFiles())},c((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,U6)],512),[[ne,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[30]||(t[30]=le(d=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[29]||(t[29]=le(d=>e.savePreserveFiles(),["prevent"]))},[t[130]||(t[130]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[131]||(t[131]=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)),A(n("input",{type:"search",id:"preserve-files-search",class:"form-control",placeholder:"Search files","aria-label":"Search files",autocomplete:"off","onUpdate:modelValue":t[26]||(t[26]=d=>e.preserve.search=d)},null,512),[[ct,e.preserve.search]]),n("div",_6,[e.preserve.loading?(a(),l("p",B6,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",z6,c(e.preserve.error),1)):(a(),l(R,{key:2},[(a(!0),l(R,null,_(e.preserveRows(),(d,h)=>(a(),l("div",{class:"preserve-item",key:d.kind+":"+d.path,style:Me({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,H6)):(a(),l("span",j6)),n("input",{type:"checkbox",id:"pf-"+h,"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,G6),n("label",{for:d.kind==="file"?"pf-"+h:null,class:"preserve-name",onClick:m=>d.kind==="dir"&&e.togglePreserveDir(d.path)},c(d.label),9,W6),d.note?(a(),l("span",K6,c(d.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",Y6,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[127]||(t[127]=n("summary",null,"Patterns",-1)),A(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib
|
||||
paper/appendix/**`,"onUpdate:modelValue":t[27]||(t[27]=d=>e.preserve.patterns=d)},null,512),[[ct,e.preserve.patterns]]),t[128]||(t[128]=n("small",{class:"form-text text-muted"},[g("One per line, as in .gitignore: "),n("code",null,"*.bib"),g(" matches in any folder; "),n("code",null,"/refs.bib"),g(" and "),n("code",null,"paper/refs.bib"),g(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),g(" covers everything inside it; "),n("code",null,"!private.bib"),g(" excludes again.")],-1))],8,J6),n("div",Q6,[n("span",Z6,c(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",x6,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[28]||(t[28]=d=>e.closePreserveFiles())},"Cancel"),t[129]||(t[129]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):f("v-if",!0)],512),[[ne,e.detectedType&&e.sourceReady()]]),A(n("section",eM,[t[152]||(t[152]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),A(n("div",null,[n("div",tM,[A(n("input",nM,null,512),[[u,{state:e.viewState,set:d=>{e.options.link=d},value:e.options?.link,form:"anonymize",options:{}}]]),t[133]||(t[133]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",sM,[A(n("input",oM,null,512),[[u,{state:e.viewState,set:d=>{e.options.image=d},value:e.options?.image,form:"anonymize",options:{}}]]),t[134]||(t[134]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",iM,[A(n("input",rM,null,512),[[u,{state:e.viewState,set:d=>{e.options.pdf=d},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[135]||(t[135]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",aM,[A(n("input",lM,null,512),[[u,{state:e.viewState,set:d=>{e.options.notebook=d},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[136]||(t[136]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",dM,[A(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,uM),[[u,{state:e.viewState,set:d=>{e.options.page=d},value:e.options?.page,form:"anonymize",options:{}}]]),t[137]||(t[137]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?f("v-if",!0):(a(),l("small",cM,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",pM,c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[ne,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",fM,[...t[138]||(t[138]=[g("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),A(n("div",null,[n("div",mM,[A(n("input",hM,null,512),[[u,{state:e.viewState,set:d=>{e.options.title=d},value:e.options?.title,form:"anonymize",options:{}}]]),t[139]||(t[139]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",gM,[A(n("input",vM,null,512),[[u,{state:e.viewState,set:d=>{e.options.content=d},value:e.options?.content,form:"anonymize",options:{}}]]),t[140]||(t[140]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",yM,[A(n("input",bM,null,512),[[u,{state:e.viewState,set:d=>{e.options.comments=d},value:e.options?.comments,form:"anonymize",options:{}}]]),t[141]||(t[141]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",wM,[A(n("input",kM,null,512),[[u,{state:e.viewState,set:d=>{e.options.username=d},value:e.options?.username,form:"anonymize",options:{}}]]),t[142]||(t[142]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",CM,[A(n("input",SM,null,512),[[u,{state:e.viewState,set:d=>{e.options.date=d},value:e.options?.date,form:"anonymize",options:{}}]]),t[143]||(t[143]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",EM,[A(n("input",NM,null,512),[[u,{state:e.viewState,set:d=>{e.options.origin=d},value:e.options?.origin,form:"anonymize",options:{}}]]),t[144]||(t[144]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[ne,e.detectedType==="gist"]]),A(n("div",null,[n("div",RM,[A(n("input",TM,null,512),[[u,{state:e.viewState,set:d=>{e.options.title=d},value:e.options?.title,form:"anonymize",options:{}}]]),t[145]||(t[145]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",PM,[A(n("input",AM,null,512),[[u,{state:e.viewState,set:d=>{e.options.body=d},value:e.options?.body,form:"anonymize",options:{}}]]),t[146]||(t[146]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))])
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"})]),g("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"})]),g("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,[g("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"),g(" 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"})]),g("Self"),n("span",{class:"serif-hy"},"-"),g("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"})]),g("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"})]),g("Support ")],-1)])],2),e.isDarkMode?f("v-if",!0):(a(),l("li",Tj,[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",Pj,[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",Aj,[...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"}),g(" Sign in ")],-1)])])):f("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(a(),l("li",Dj,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=le(s=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(a(),l("li",Ij,[n("a",Oj,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,Mj)):f("v-if",!0),n("span",Vj,c(e.user?.username),1)]),n("div",Lj,[n("h6",qj,"Signed in as @"+c(e.user?.username),1),t[25]||(t[25]=Ae('<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",$j,[...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,Fj)):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]=le(s=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=le(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)),A(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,Uj),[[pt,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p
Line truncated
|
||||
python experiments/run.py`),n("p",null,[g("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",Qj,[e.statsEmpty()?f("v-if",!0):(a(),l("div",Zj,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),g(),n("span",null,[g("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",xj,[(a(!0),l(R,null,B(e.cards,(i,o)=>(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",eG,c(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",tG," +"+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,[g("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",nG,[n("div",sG,[t[13]||(t[13]=n("label",{for:"demo-terms"},[g("Terms to redact "),n("span",null,[g("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),A(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]=Tt(le(()=>{},["prevent"]),["enter"]))},null,544),[[pt,e.demoTerms]])]),n("div",oG,[n("div",iG,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[g("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",rG,[n("div",aG,[(a(!0),l(R,null,B(e.demoParts(),(i,o)=>(a(),l(R,{key:o},[i.redacted?(a(),l("mark",lG,c(i.original),1)):(a(),l(R,{key:1},[g(c(i.text),1)],64))],64))),128)),t[14]||(t[14]=g("\u200B",-1))]),A(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),[[pt,e.demoText]])])]),n("div",dG,[n("div",uG,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",cG,[n("span",pG,c(e.demoCount())+" redacted",1)])]),n("div",fG,[(a(!0),l(R,null,B(e.demoParts(),(i,o)=>(a(),l(R,{key:o},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},c(i.text),9,mG)):(a(),l(R,{key:1},[g(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",hG,[n("div",gG,[(a(!0),l(R,null,B(e.features,(i,o)=>(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:r=>e.selectFeature(i.key),onKeydown:r=>e.featureKeydown(r,o),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",yG,[n("span",bG,c(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",wG,c(i?.eyebrow),1)]),n("span",kG,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",CG,"-")):f("v-if",!0),g(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)])],40,vG),n("div",SG,[n("span",EG,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",NG,"-")):f("v-if",!0),g(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,RG)])],2))),128))]),n("div",TG,[(a(!0),l(R,null,B(e.features,(i,o)=>A((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",AG,[n("div",DG,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",IG,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",MG,[...t[19]||(t[19]=[Ae('<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"})]),g("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"})]),g("Support ")],-1)])],2),e.isDarkMode?f("v-if",!0):(a(),l("li",Tj,[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",Pj,[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",Aj,[...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"}),g(" Sign in ")],-1)])])):f("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(a(),l("li",Dj,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=le(s=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(a(),l("li",Ij,[n("a",Oj,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,Mj)):f("v-if",!0),n("span",Vj,c(e.user?.username),1)]),n("div",Lj,[n("h6",qj,"Signed in as @"+c(e.user?.username),1),t[25]||(t[25]=Ie('<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",$j,[...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,Fj)):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]=le(s=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=le(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)),A(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,Uj),[[ct,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p
Line truncated
|
||||
python experiments/run.py`),n("p",null,[g("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",Qj,[e.statsEmpty()?f("v-if",!0):(a(),l("div",Zj,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),g(),n("span",null,[g("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",xj,[(a(!0),l(R,null,_(e.cards,(i,o)=>(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",eG,c(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",tG," +"+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,[g("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",nG,[n("div",sG,[t[13]||(t[13]=n("label",{for:"demo-terms"},[g("Terms to redact "),n("span",null,[g("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),A(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(le(()=>{},["prevent"]),["enter"]))},null,544),[[ct,e.demoTerms]])]),n("div",oG,[n("div",iG,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[g("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",rG,[n("div",aG,[(a(!0),l(R,null,_(e.demoParts(),(i,o)=>(a(),l(R,{key:o},[i.redacted?(a(),l("mark",lG,c(i.original),1)):(a(),l(R,{key:1},[g(c(i.text),1)],64))],64))),128)),t[14]||(t[14]=g("\u200B",-1))]),A(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),[[ct,e.demoText]])])]),n("div",dG,[n("div",uG,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",cG,[n("span",pG,c(e.demoCount())+" redacted",1)])]),n("div",fG,[(a(!0),l(R,null,_(e.demoParts(),(i,o)=>(a(),l(R,{key:o},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},c(i.text),9,mG)):(a(),l(R,{key:1},[g(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",hG,[n("div",gG,[(a(!0),l(R,null,_(e.features,(i,o)=>(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:r=>e.selectFeature(i.key),onKeydown:r=>e.featureKeydown(r,o),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",yG,[n("span",bG,c(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",wG,c(i?.eyebrow),1)]),n("span",kG,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",CG,"-")):f("v-if",!0),g(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)])],40,vG),n("div",SG,[n("span",EG,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",NG,"-")):f("v-if",!0),g(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,RG)])],2))),128))]),n("div",TG,[(a(!0),l(R,null,_(e.features,(i,o)=>A((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",AG,[n("div",DG,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",IG,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",MG,[...t[19]||(t[19]=[Ie('<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,[g("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">"epoch %d: %.3f"</span>, epoch, loss)</pre></div>`,2)])])):(a(),l("div",LG,[...t[21]||(t[21]=[Ae('<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,OG)])],8,PG)),[[ne,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Ae('<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)),Fe(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var qG={class:"paper-empty"},$G={class:"paper-empty-inner"},FG={key:0,class:"paper-eyebrow"},UG={key:1,class:"paper-eyebrow"},_G={key:2,class:"paper-empty-title"},BG=["textContent"];function If(e,t){return a(),l("div",qG,[n("div",$G,[e.error?f("v-if",!0):(a(),l("div",FG,"Working")),e.error?(a(),l("div",UG,"Error")):f("v-if",!0),e.error?f("v-if",!0):(a(),l("h1",_G,[...t[0]||(t[0]=[g(" 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,BG)):f("v-if",!0)])])}var zG={class:"container paper-page paper-settings"},HG={class:"paper-crumbs"},jG={class:"here"},GG={class:"paper-page-title"},WG={class:"paper-settings-body"},KG={class:"paper-settings-toc"},YG={href:"#conf-billing"},XG={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},JG={id:"conf-basics",class:"paper-settings-section"},QG={class:"form-group"},ZG={class:"invalid-feedback"},xG={class:"invalid-feedback"},eW={class:"form-group"},tW={class:"invalid-feedback"},nW={class:"form-group"},sW={class:"invalid-feedback"},oW={class:"invalid-feedback"},iW={id:"conf-window",class:"paper-settings-section"},rW={class:"form-grid-2"},aW={class:"form-group"},lW={class:"invalid-feedback"},dW={class:"invalid-feedback"},uW={class:"form-group"},cW={class:"invalid-feedback"},pW={class:"invalid-feedback"},fW={id:"conf-rendering",class:"paper-settings-section"},mW={class:"form-check"},hW={class:"form-check-input",type:"checkbox",id:"link",name:"link"},gW={class:"form-check"},vW={class:"form-check-input",type:"checkbox",id:"image",name:"image"},yW={class:"form-check"},bW={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},wW={class:"form-check"},kW={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},CW={id:"conf-features",class:"paper-settings-section"},SW={class:"form-check"},EW={class:"form-check-input",type:"checkbox",id:"update",name:"update"},NW={class:"form-check"},RW={class:"form-check-input",type:"checkbox",id:"page",name:"page"},TW={id:"conf-plan",class:"paper-settings-section"},PW={key:0,class:"paper-section-copy"},AW={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"}Line truncated
|
||||
<span class="ln">10</span> log(<span class="s">"epoch %d: %.3f"</span>, epoch, loss)</pre></div>`,2)])])):(a(),l("div",LG,[...t[21]||(t[21]=[Ie('<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,OG)])],8,PG)),[[ne,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Ie('<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)),Ue(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var qG={class:"paper-empty"},$G={class:"paper-empty-inner"},FG={key:0,class:"paper-eyebrow"},UG={key:1,class:"paper-eyebrow"},_G={key:2,class:"paper-empty-title"},BG=["textContent"];function If(e,t){return a(),l("div",qG,[n("div",$G,[e.error?f("v-if",!0):(a(),l("div",FG,"Working")),e.error?(a(),l("div",UG,"Error")):f("v-if",!0),e.error?f("v-if",!0):(a(),l("h1",_G,[...t[0]||(t[0]=[g(" 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,BG)):f("v-if",!0)])])}var zG={class:"container paper-page paper-settings"},HG={class:"paper-crumbs"},jG={class:"here"},GG={class:"paper-page-title"},WG={class:"paper-settings-body"},KG={class:"paper-settings-toc"},YG={href:"#conf-billing"},XG={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},JG={id:"conf-basics",class:"paper-settings-section"},QG={class:"form-group"},ZG={class:"invalid-feedback"},xG={class:"invalid-feedback"},eW={class:"form-group"},tW={class:"invalid-feedback"},nW={class:"form-group"},sW={class:"invalid-feedback"},oW={class:"invalid-feedback"},iW={id:"conf-window",class:"paper-settings-section"},rW={class:"form-grid-2"},aW={class:"form-group"},lW={class:"invalid-feedback"},dW={class:"invalid-feedback"},uW={class:"form-group"},cW={class:"invalid-feedback"},pW={class:"invalid-feedback"},fW={id:"conf-rendering",class:"paper-settings-section"},mW={class:"form-check"},hW={class:"form-check-input",type:"checkbox",id:"link",name:"link"},gW={class:"form-check"},vW={class:"form-check-input",type:"checkbox",id:"image",name:"image"},yW={class:"form-check"},bW={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},wW={class:"form-check"},kW={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},CW={id:"conf-features",class:"paper-settings-section"},SW={class:"form-check"},EW={class:"form-check-input",type:"checkbox",id:"update",name:"update"},NW={class:"form-check"},RW={class:"form-check-input",type:"checkbox",id:"page",name:"page"},TW={id:"conf-plan",class:"paper-settings-section"},PW={key:0,class:"paper-section-copy"},AW={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"}Line truncated
|
||||
`).length))+" lines",1)):f("v-if",!0)]),A(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",CK,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,SK)]))],8,kK),[[ne,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",EK,[e.redactionCount()?(a(),l(R,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[49]||(t[49]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,NK),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),g(c(e.languageName||"Text"),1),n("span",RK,[t[51]||(t[51]=n("span",{class:"sep"},"\xB7",-1)),g(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)),g(c(e.fmt?.number(e.content.split(`
|
||||
`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(a(),l("span",TK,[e.redactionCount()?(a(),l(R,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,PK),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[56]||(t[56]=g("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(R,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),g(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",AK,[e.isCsv()?(a(),l("div",DK,[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,IK),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,OK),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,MK)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",VK,[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,LK),e.symbolsOpen?(a(),l("div",qK,[n("div",$K,c(e.symbols().length)+" "+c(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(R,null,B(e.symbols(),d=>(a(),l("button",{type:"button",class:"symbols-item",role:"menuitem",key:d.line+d.name,onClick:h=>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",UK,c(d.name),1),n("span",_K,c(d.line),1)],8,FK))),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,BK)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView!=="raw")?(a(),l("div",zK,[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,HK)):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,jK)):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,GK)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",WK,[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,KK),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",XK,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,JK)]))],8,YK)):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,QK)])):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",cY)):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),g("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(a(),l("div",pY)):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),g("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),g("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]=g("Wrap lines",-1)),e.wrapLines?(a(),l("span",mY,"\u2713")):f("v-if",!0)],8,fY)):f("v-if",!0),e.isCsv()?(a(),l(R,{key:8},B(["table","chart","raw"],d=>n("button",{type:"button",role:"menuitemradio",class:"tb-csv-view",key:d,"aria-checked":e.csvView===d?"true":"false",onClick:h=>{e.csvView=d,e.moreOpen=!1}},[(a(),l("svg",gY,[n("use",{href:d==="raw"?"#ui-icon-code":d==="chart"?"#ui-icon-chart":"#ui-icon-list"},null,8,vY)])),g(c(d==="raw"?"Show as text":d==="chart"?"Show as chart":"Show as table"),1),e.csvView===d?(a(),l("span",yY,"\u2713")):f("v-if",!0)],8,hY)),64)):f("v-if",!0),e.type!="html"?(a(),l("div",bY)):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),g("View raw",-1)])],8,wY)):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),g("View raw",-1)])],8,kY)):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),g("Download file",-1)])],8,CY)):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),g("Open website",-1)])],8,SY)):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),g("Edit anonymization",-1)])],8,EY)):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),g("Download ZIP",-1)])],8,NY)):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),g("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"})]),g("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"})]),g("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]=le(d=>e.submitGoto(),["prevent"]))},[t[82]||(t[82]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),A(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]=Tt(le(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,RY),[[pt,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(),Rt(s,{key:0,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")?A((a(),l("div",TY,null,512)),[[u,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",PY,[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]=Tt(le(d=>d.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=Tt(le(d=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,AY),n("span",DY,[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,IY),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,OY)]),n("span",MY,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,VY),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",LY,[A(n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,qY),[[p]]),e.tocCount()>=3?(a(),l("aside",$Y,[t[85]||(t[85]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",FY,[n("a",{href:"#",class:T(["lvl-2 toc-top",{"is-active":!e.activeHeading||e.activeHeading===e.tocTitle()?.id}]),onClick:t[34]||(t[34]=le(d=>e.scrollToHeading(null),["prevent"]))},[e.tocTitle()?(a(!0),l(R,{key:0},B(e.tocTitle().parts,(d,h)=>(a(),l(R,{key:h},[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,UY)):(a(),l(R,{key:1},[g(c(d.t),1)],64))],64))),128)):(a(),l(R,{key:1},[g("Introduction")],64))],2),(a(!0),l(R,null,B(e.readmeToc(),(d,h)=>(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:le(m=>e.scrollToHeading(d.id),["prevent"])},[(a(!0),l(R,null,B(d.parts,(m,y)=>(a(),l(R,{key:y},[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,BY)):(a(),l(R,{key:1},[g(c(m.t),1)],64))],64))),128))],10,_Y))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Rt(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",zY,[n("div",HY,[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",jY,[n("li",GY,[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,WY)]),(a(!0),l(R,null,B(e.paths,(d,h)=>(a(),l("li",{class:"breadcrumb-item","aria-current":h===e.paths.length-1?"page":null},[(a(!0),l(R,null,B(e.redactParts(d),(m,y)=>(a(),l(R,{key:y},[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,YY)):(a(),l(R,{key:1},[g(c(m.t),1)],64))],64))),128))],8,KY))),256))]),n("span",XY,[e.type=="IPython"&&e.redactionCount()?(a(),l("b",{key:0,class:"ms-item ms-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[87]||(t[87]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,JY)):f("v-if",!0),n("span",QY,c(e.fileKind()),1),e.imageSize?(a(),l("span",ZY,c(e.imageSize),1)):f("v-if",!0),e.fileSize(e.filePath)!=n
Line truncated
|
||||
`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(a(),l("span",TK,[e.redactionCount()?(a(),l(R,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,PK),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[56]||(t[56]=g("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(R,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),g(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",AK,[e.isCsv()?(a(),l("div",DK,[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,IK),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,OK),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,MK)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",VK,[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,LK),e.symbolsOpen?(a(),l("div",qK,[n("div",$K,c(e.symbols().length)+" "+c(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(R,null,_(e.symbols(),d=>(a(),l("button",{type:"button",class:"symbols-item",role:"menuitem",key:d.line+d.name,onClick:h=>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",UK,c(d.name),1),n("span",_K,c(d.line),1)],8,FK))),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,BK)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView!=="raw")?(a(),l("div",zK,[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,HK)):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,jK)):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,GK)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",WK,[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,KK),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",XK,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,JK)]))],8,YK)):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,QK)])):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",cY)):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),g("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(a(),l("div",pY)):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),g("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),g("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]=g("Wrap lines",-1)),e.wrapLines?(a(),l("span",mY,"\u2713")):f("v-if",!0)],8,fY)):f("v-if",!0),e.isCsv()?(a(),l(R,{key:8},_(["table","chart","raw"],d=>n("button",{type:"button",role:"menuitemradio",class:"tb-csv-view",key:d,"aria-checked":e.csvView===d?"true":"false",onClick:h=>{e.csvView=d,e.moreOpen=!1}},[(a(),l("svg",gY,[n("use",{href:d==="raw"?"#ui-icon-code":d==="chart"?"#ui-icon-chart":"#ui-icon-list"},null,8,vY)])),g(c(d==="raw"?"Show as text":d==="chart"?"Show as chart":"Show as table"),1),e.csvView===d?(a(),l("span",yY,"\u2713")):f("v-if",!0)],8,hY)),64)):f("v-if",!0),e.type!="html"?(a(),l("div",bY)):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),g("View raw",-1)])],8,wY)):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),g("View raw",-1)])],8,kY)):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),g("Download file",-1)])],8,CY)):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),g("Open website",-1)])],8,SY)):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),g("Edit anonymization",-1)])],8,EY)):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),g("Download ZIP",-1)])],8,NY)):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),g("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"})]),g("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"})]),g("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]=le(d=>e.submitGoto(),["prevent"]))},[t[82]||(t[82]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),A(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(le(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,RY),[[ct,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:0,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")?A((a(),l("div",TY,null,512)),[[u,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",PY,[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(le(d=>d.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=Rt(le(d=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,AY),n("span",DY,[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,IY),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,OY)]),n("span",MY,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,VY),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",LY,[A(n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,qY),[[p]]),e.tocCount()>=3?(a(),l("aside",$Y,[t[85]||(t[85]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",FY,[n("a",{href:"#",class:T(["lvl-2 toc-top",{"is-active":!e.activeHeading||e.activeHeading===e.tocTitle()?.id}]),onClick:t[34]||(t[34]=le(d=>e.scrollToHeading(null),["prevent"]))},[e.tocTitle()?(a(!0),l(R,{key:0},_(e.tocTitle().parts,(d,h)=>(a(),l(R,{key:h},[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,UY)):(a(),l(R,{key:1},[g(c(d.t),1)],64))],64))),128)):(a(),l(R,{key:1},[g("Introduction")],64))],2),(a(!0),l(R,null,_(e.readmeToc(),(d,h)=>(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:le(m=>e.scrollToHeading(d.id),["prevent"])},[(a(!0),l(R,null,_(d.parts,(m,y)=>(a(),l(R,{key:y},[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,BY)):(a(),l(R,{key:1},[g(c(m.t),1)],64))],64))),128))],10,_Y))),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",zY,[n("div",HY,[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",jY,[n("li",GY,[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,WY)]),(a(!0),l(R,null,_(e.paths,(d,h)=>(a(),l("li",{class:"breadcrumb-item","aria-current":h===e.paths.length-1?"page":null},[(a(!0),l(R,null,_(e.redactParts(d),(m,y)=>(a(),l(R,{key:y},[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,YY)):(a(),l(R,{key:1},[g(c(m.t),1)],64))],64))),128))],8,KY))),256))]),n("span",XY,[e.type=="IPython"&&e.redactionCount()?(a(),l("b",{key:0,class:"ms-item ms-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[87]||(t[87]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,JY)):f("v-if",!0),n("span",QY,c(e.fileKind()),1),e.imageSize?(a(),l("span",ZY,c(e.imageSize),1)):f("v-if",!0),e.fileSize(e.filePath)!=n
Line truncated
|
||||
`).length+1)),placeholder:`Jane Smith
|
||||
MIT CSAIL
|
||||
jane.smith@example.org`},null,8,iQ),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",rQ,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=g("Matches become ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=g(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=g(" for a custom replacement. Regex is supported.",-1))])]),A(n("div",aQ,"Terms are in an invalid format.",512),[[ne,e.defaultsForm?.terms?.errors?.format]])])]),n("section",lQ,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",dQ,[n("label",uQ,[A(n("input",cQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=g("Keep links",-1))]),n("label",pQ,[A(n("input",fQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=g("Display images",-1))]),n("label",mQ,[A(n("input",hQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=g("Display PDFs",-1))]),n("label",gQ,[A(n("input",vQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=g("Display notebooks",-1))]),n("label",yQ,[A(n("input",bQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=g("Show line counts",-1))]),n("label",wQ,[A(n("input",kQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=g("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",CQ,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",SQ,[A(n("input",EQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=g("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",NQ,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[A((a(),l("select",RQ,[...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:r=>{e.options.expirationMode=r},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),n("p",TQ,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",PQ,[n("div",AQ,[e.draftRestored?(a(),l("span",DQ,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",IQ,"Unsaved changes"+c(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",OQ,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]=r=>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,MQ),e.error?(a(),l("div",VQ,c(e.error),1)):f("v-if",!0)])],32)),[[o,e.viewState]])],512),[[ne,e.settingsTab==="defaults"]]),A(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",qQ,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",$Q,[g(c(e.billingError)+" ",1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=r=>e.loadBilling()),disabled:e.billingBusy},"Try again",8,FQ)])):f("v-if",!0),e.billingNotice?(a(),l("p",UQ,c(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",_Q,[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]=r=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,BQ)])):f("v-if",!0),n("section",zQ,[n("div",HQ,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",jQ,c(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",GQ,[g(c(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access
Line truncated
|
||||
jane.smith@example.org`},null,8,iQ),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",rQ,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=g("Matches become ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=g(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=g(" for a custom replacement. Regex is supported.",-1))])]),A(n("div",aQ,"Terms are in an invalid format.",512),[[ne,e.defaultsForm?.terms?.errors?.format]])])]),n("section",lQ,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",dQ,[n("label",uQ,[A(n("input",cQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=g("Keep links",-1))]),n("label",pQ,[A(n("input",fQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=g("Display images",-1))]),n("label",mQ,[A(n("input",hQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=g("Display PDFs",-1))]),n("label",gQ,[A(n("input",vQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=g("Display notebooks",-1))]),n("label",yQ,[A(n("input",bQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=g("Show line counts",-1))]),n("label",wQ,[A(n("input",kQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=g("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",CQ,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",SQ,[A(n("input",EQ,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=g("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",NQ,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[A((a(),l("select",RQ,[...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:r=>{e.options.expirationMode=r},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),n("p",TQ,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",PQ,[n("div",AQ,[e.draftRestored?(a(),l("span",DQ,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",IQ,"Unsaved changes"+c(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",OQ,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]=r=>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,MQ),e.error?(a(),l("div",VQ,c(e.error),1)):f("v-if",!0)])],32)),[[o,e.viewState]])],512),[[ne,e.settingsTab==="defaults"]]),A(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",qQ,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",$Q,[g(c(e.billingError)+" ",1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=r=>e.loadBilling()),disabled:e.billingBusy},"Try again",8,FQ)])):f("v-if",!0),e.billingNotice?(a(),l("p",UQ,c(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",_Q,[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]=r=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,BQ)])):f("v-if",!0),n("section",zQ,[n("div",HQ,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",jQ,c(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",GQ,[g(c(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access
Line truncated
|
||||
`);t.innerHTML=s.map(i=>{let o=i.replace(/^(<[^>]+>)+/,"").charAt(0),r=i.startsWith("@@")?"hunk":o==="+"?"add":o==="-"?"remove":"";return`<span class="md-diff-line${r?" is-"+r:""}">${i||" "}</span>`}).join(`
|
||||
`)}),am=(e,t=0)=>{let s=(String(e).slice(t).match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length;return Math.min(t+s+4,24)},cm=e=>{e?.closest?.(".reviewer-preview")&&e.querySelectorAll("pre code").forEach(t=>{let s=t.querySelectorAll(".md-diff-line");if(s.length){s.forEach(o=>{o.classList.contains("is-hunk")||o.style.setProperty("--hang",am(o.textContent,1)+"ch")});return}if(t.querySelector(".code-line"))return;let i=[];t.innerHTML=t.innerHTML.replace(/\n$/,"").split(`
|
||||
`).map(o=>{let r=i.join("");o.replace(/<\/?span\b[^>]*>/g,p=>(p.startsWith("</")?i.pop():i.push(p),p));let u=o.replace(/<[^>]+>/g,"");return`<span class="code-line" style="--hang:${am(u)}ch">${r}${o||" "}${"</span>".repeat(i.length)}</span>`}).join(`
|
||||
`)})},Hae=e=>e.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section",Yl={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,um(t.value),cm(t.value),e.idPrefix!=null){let o={};t.value.querySelectorAll("h1, h2, h3").forEach(r=>{let u=e.idPrefix+(r.id||Hae(r.textContent));o[u]?u+="-"+ ++o[u]:o[u]=1,r.id=u})}bi(t.value),e.onOutline?.(yr(t.value))};return Zt(()=>{s(),dt(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>ke("markdown",{ref:t,class:e.reader?"markdown-body":null})}},lm=e=>an(e).map(t=>t.n?ke("span",{class:"redact-slot",role:"img","aria-label":"Redacted term "+t.n},ke("i",t.n)):t.t),Kl=e=>/^XXXX-\d+$/.test(String(e||"").trim()),jae=(e,t="Reviewer")=>e?ke("span",{class:["pr-author",{"is-redacted":Kl(e)}],title:Kl(e)?"Redacted author":null},Kl(e)?lm(e):["@",...lm(e)]):ke("span",{class:"pr-author is-hidden"},t),Gae={props:["comments","fmt"],setup(e){return()=>ke("div",{class:"pr-thread"},(e.comments||[]).map((t,s)=>ke("article",{class:["pr-thread-comment",{"is-reply":s>0}],key:s},[ke("header",{class:"pr-thread-head"},[ke("span",{class:"pr-avatar","aria-hidden":"true"},ke("svg",{class:"ui-icon"},ke("use",{href:"#ui-icon-user"}))),jae(t.author),t.creationDate||t.updatedDate?ke("time",{class:"pr-thread-date",datetime:t.creationDate||t.updatedDate},e.fmt?.date(t.creationDate||t.updatedDate)):null]),t.body?ke("div",{class:"pr-thread-body"},ke(Yl,{content:t.body,reader:!0})):null])))}},Wae={props:["file","terms","options","reader","idPrefix","onOutline"],setup(e){let t=bt(null),s=()=>Ye(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),um(t.value),cm(t.value)});return Zt(s),dt(()=>[e.file?.content,e.terms,e.options],s,{deep:!0}),()=>{let i=e.file||{},o=(i.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(o)||i.language==="Markdown")return ke("gist-file",{ref:t},ke(Yl,{content:i.content,terms:e.terms,options:e.options,reader:e.reader,idPrefix:e.idPrefix,onOutline:e.onOutline}));let r={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},u=(i.language||o||"none").toLowerCase();return ke("gist-file",{ref:t},ke("pre",{class:"line-numbers"},ke("code",{class:"language-"+(r[u]||u),key:i.content},i.content||"")))}}},Kae=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 o=t.scrollWidth-t.clientWidth>1;if(s.classList.toggle("is-overflowing",o),s.classList.toggle("is-at-end",o&&t.scrollLeft+t.clientWidth>=t.scrollWidth-2),!o)return;let r=t.clientWidth-16,u=Math.max(24,r*t.clientWidth/t.scrollWidth);s.style.setProperty("--thumb-w",u+"px"),s.style.setProperty("--thumb-x",(r-u)*t.scrollLeft/(t.scrollWidth-t.clientWidth)+"px")};t.addEventListener("scroll",i,{passive:!0}),window.ResizeObserver?new ResizeObserver(i).observe(t):i(),i()}),Yae={props:["file","content"],setup(e){let t=bt(null),s=0,i,o=async()=>{let r=++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 us("notebook"),r!==s)return;t.value.innerHTML=to(DOMPurify.sanitize(nb.parse(u).render())),t.value.querySelectorAll("pre code").forEach(p=>window.Prism?.highlightElement(p)),Kae(t.value),bi(t.value)}catch(u){r===s&&u.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return Zt(()=>{o(),dt(()=>[e.file,e.content],o)}),Fn(()=>{s++,i?.abort()}),()=>ke("notebook",{ref:t})}},Xae={props:["stats"],setup(e){return()=>{let t=Object.entries(e.stats||{}).filter(([,i])=>i.code),s=t.reduce((i,[,o])=>i+o.code,0);return ke("loc",t.map(([i,o])=>ke("div",{class:"lang",title:`${i}: ${o.code.toLocaleString()} lines`,style:{width:o.code*100/s+"%",background:langColors[i]}})))}}},pm={Markdown:Yl,GistFile:Wae,PrThread:Gae,Notebook:Yae,Loc:Xae,HtmlDoc:Gf,QuotaUsage:Bae,DataTable:Wl,Pdfviewer:ou(async()=>(await us("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Wf))},fm={async mounted(e,{value:t}){e._editorValue=t;try{if(await Ni(),e._editorDisposed)return;let s=e._editorValue,i=ace.edit(e);e._editor=i,i.setValue(String(s.content??""),-1),dm(e,s.options),e._editorCleanup=s.options?.onLoad?.(i)}catch(s){e._editorDisposed||(e.textContent=s.message)}},updated(e,{value:t}){e._editorValue=t,e._editor&&(e._editor.getValue()!==String(t.content??"")&&e._editor.setValue(String(t.content??""),-1),dm(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function dm(e,t={}){let s=zae.has(t.mode)?t.mode:"text";e._editor.session.s
Line truncated
|
||||
`)})},Uae=e=>e.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section",Yl={props:["content","terms","options","reader","idPrefix","onOutline"],setup(e){let t=yt(null),s=()=>{let i=renderMD(e.content||"",window.location.pathname+"/../");if(t.value.innerHTML=e.reader?Zs(i):i,um(t.value),cm(t.value),e.idPrefix!=null){let o={};t.value.querySelectorAll("h1, h2, h3").forEach(r=>{let u=e.idPrefix+(r.id||Uae(r.textContent));o[u]?u+="-"+ ++o[u]:o[u]=1,r.id=u})}gi(t.value),e.onOutline?.(vr(t.value))};return Xt(()=>{s(),lt(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>Ee("markdown",{ref:t,class:e.reader?"markdown-body":null})}},lm=e=>nn(e).map(t=>t.n?Ee("span",{class:"redact-slot",role:"img","aria-label":"Redacted term "+t.n},Ee("i",t.n)):t.t),Kl=e=>/^XXXX-\d+$/.test(String(e||"").trim()),_ae=(e,t="Reviewer")=>e?Ee("span",{class:["pr-author",{"is-redacted":Kl(e)}],title:Kl(e)?"Redacted author":null},Kl(e)?lm(e):["@",...lm(e)]):Ee("span",{class:"pr-author is-hidden"},t),Bae={props:["comments","fmt"],setup(e){return()=>Ee("div",{class:"pr-thread"},(e.comments||[]).map((t,s)=>Ee("article",{class:["pr-thread-comment",{"is-reply":s>0}],key:s},[Ee("header",{class:"pr-thread-head"},[Ee("span",{class:"pr-avatar","aria-hidden":"true"},Ee("svg",{class:"ui-icon"},Ee("use",{href:"#ui-icon-user"}))),_ae(t.author),t.creationDate||t.updatedDate?Ee("time",{class:"pr-thread-date",datetime:t.creationDate||t.updatedDate},e.fmt?.date(t.creationDate||t.updatedDate)):null]),t.body?Ee("div",{class:"pr-thread-body"},Ee(Yl,{content:t.body,reader:!0})):null])))}},zae={props:["file","terms","options","reader","idPrefix","onOutline"],setup(e){let t=yt(null),s=()=>Ye(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),um(t.value),cm(t.value)});return Xt(s),lt(()=>[e.file?.content,e.terms,e.options],s,{deep:!0}),()=>{let i=e.file||{},o=(i.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(o)||i.language==="Markdown")return Ee("gist-file",{ref:t},Ee(Yl,{content:i.content,terms:e.terms,options:e.options,reader:e.reader,idPrefix:e.idPrefix,onOutline:e.onOutline}));let r={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},u=(i.language||o||"none").toLowerCase();return Ee("gist-file",{ref:t},Ee("pre",{class:"line-numbers"},Ee("code",{class:"language-"+(r[u]||u),key:i.content},i.content||"")))}}},Hae=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 o=t.scrollWidth-t.clientWidth>1;if(s.classList.toggle("is-overflowing",o),s.classList.toggle("is-at-end",o&&t.scrollLeft+t.clientWidth>=t.scrollWidth-2),!o)return;let r=t.clientWidth-16,u=Math.max(24,r*t.clientWidth/t.scrollWidth);s.style.setProperty("--thumb-w",u+"px"),s.style.setProperty("--thumb-x",(r-u)*t.scrollLeft/(t.scrollWidth-t.clientWidth)+"px")};t.addEventListener("scroll",i,{passive:!0}),window.ResizeObserver?new ResizeObserver(i).observe(t):i(),i()}),jae={props:["file","content"],setup(e){let t=yt(null),s=0,i,o=async()=>{let r=++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 rs("notebook"),r!==s)return;t.value.innerHTML=Zs(DOMPurify.sanitize(nb.parse(u).render())),t.value.querySelectorAll("pre code").forEach(p=>window.Prism?.highlightElement(p)),Hae(t.value),gi(t.value)}catch(u){r===s&&u.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return Xt(()=>{o(),lt(()=>[e.file,e.content],o)}),Mn(()=>{s++,i?.abort()}),()=>Ee("notebook",{ref:t})}},Gae={props:["stats"],setup(e){return()=>{let t=Object.entries(e.stats||{}).filter(([,i])=>i.code),s=t.reduce((i,[,o])=>i+o.code,0);return Ee("loc",t.map(([i,o])=>Ee("div",{class:"lang",title:`${i}: ${o.code.toLocaleString()} lines`,style:{width:o.code*100/s+"%",background:langColors[i]}})))}}},pm={Markdown:Yl,GistFile:zae,PrThread:Bae,Notebook:jae,Loc:Gae,HtmlDoc:Gf,QuotaUsage:$ae,DataTable:Wl,Pdfviewer:iu(async()=>(await rs("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Wf))},fm={async mounted(e,{value:t}){e._editorValue=t;try{if(await Ei(),e._editorDisposed)return;let s=e._editorValue,i=ace.edit(e);e._editor=i,i.setValue(String(s.content??""),-1),dm(e,s.options),e._editorCleanup=s.options?.onLoad?.(i)}catch(s){e._editorDisposed||(e.textContent=s.message)}},updated(e,{value:t}){e._editorValue=t,e._editor&&(e._editor.getValue()!==String(t.content??"")&&e._editor.setValue(String(t.content??""),-1),dm(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function dm(e,t={}){let s=Fae.has(t.mode)?t.mode:"text";e._editor.session.s
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
@vue/shared/dist/shared.esm-bundler.js:
|
||||
|
||||
@@ -79,8 +79,8 @@ describe("Table analysis", function () {
|
||||
expect(T.summarize(t.columns[3], all(t), "mean").text).to.equal("443.8");
|
||||
expect(T.summarize(t.columns[3], all(t), "count").text).to.equal("5");
|
||||
expect(T.summarize(t.columns[3], all(t), "sum").text).to.equal("2,219");
|
||||
// Text and identifier columns stay empty in the summary row.
|
||||
expect(T.summarize(t.columns[0], all(t))).to.deep.equal({ kind: "none", text: "" });
|
||||
// Text columns count distinct values; identifier columns stay empty.
|
||||
expect(T.summarize(t.columns[0], all(t)).text).to.equal("3 distinct");
|
||||
expect(T.summarize(t.columns[1], all(t), "mean").kind).to.equal("none");
|
||||
expect(T.summarize(t.columns[1], all(t), "mean", () => true).text).to.equal("1.5");
|
||||
});
|
||||
|
||||
+14
-8
@@ -3152,11 +3152,15 @@ describe("Vue 3 UI", function () {
|
||||
const doc = ui.window.document;
|
||||
expect(cells(doc, 1)).to.deep.equal(["Baseline", "Baseline", "Ours", "Ours", "2"]);
|
||||
expect(doc.querySelector(".dt-table tbody .redact-slot").textContent).to.equal("2");
|
||||
// One "Average" select in the first column; text and the seed (an identifier) stay empty.
|
||||
const foot = () => [...doc.querySelectorAll(".dt-summary td")].slice(2).map((td) => td.textContent.trim());
|
||||
// Σ, distinct count for text, nothing for the seed (an identifier), "Avg ▾ value" per measure.
|
||||
const cellsOf = () => [...doc.querySelectorAll(".dt-summary td")];
|
||||
expect(cellsOf()[0].textContent.trim()).to.match(/^Σ/);
|
||||
expect(cellsOf()[1].textContent.trim()).to.equal("3 distinct");
|
||||
expect(cellsOf()[2].textContent.trim()).to.equal("");
|
||||
expect(doc.querySelectorAll(".dt-summary select")).to.have.length(1);
|
||||
expect(doc.querySelector(".dt-summary td:nth-child(2) select").value).to.equal("mean");
|
||||
expect(foot()).to.deep.equal(["", "75.1"]);
|
||||
expect(doc.querySelector(".dt-sum-fn-label").textContent).to.equal("Avg");
|
||||
const foot = () => [...doc.querySelectorAll(".dt-sum-value")].map((b) => b.textContent);
|
||||
expect(foot()).to.deep.equal(["75.1"]);
|
||||
sortButton(doc, "accuracy").click(); await delay(30);
|
||||
expect(cells(doc, 3)).to.deep.equal(["71.0", "71.4", "78.7", "79.1", ""]);
|
||||
sortButton(doc, "accuracy").click(); await delay(30);
|
||||
@@ -3167,7 +3171,8 @@ describe("Vue 3 UI", function () {
|
||||
expect(doc.querySelector("th[aria-sort=ascending], th[aria-sort=descending]")).to.equal(null);
|
||||
const select = doc.querySelector(".dt-summary select");
|
||||
select.value = "max"; select.dispatchEvent(new ui.window.Event("change")); await delay(30);
|
||||
expect(foot()).to.deep.equal(["", "79.1"]);
|
||||
expect(foot()).to.deep.equal(["79.1"]);
|
||||
expect(doc.querySelector(".dt-sum-fn-label").textContent).to.equal("Max");
|
||||
expect(ui.errors).to.deep.equal([]);
|
||||
});
|
||||
|
||||
@@ -3177,7 +3182,7 @@ describe("Vue 3 UI", function () {
|
||||
await ui.input(".dt-search-input", "ours");
|
||||
expect(cells(doc, 1)).to.deep.equal(["Ours", "Ours"]);
|
||||
expect(doc.querySelector(".dt-count").textContent).to.equal("2 of 5 rows");
|
||||
expect([...doc.querySelectorAll(".dt-summary td")].at(-1).textContent.trim()).to.equal("78.9");
|
||||
expect([...doc.querySelectorAll(".dt-sum-value")].at(-1).textContent).to.equal("78.9");
|
||||
await ui.input(".dt-search-input", "");
|
||||
const group = doc.querySelector(".dt-tools .dt-select select");
|
||||
group.value = "model"; group.dispatchEvent(new ui.window.Event("change")); await delay(30);
|
||||
@@ -3234,8 +3239,9 @@ describe("Vue 3 UI", function () {
|
||||
expect(firstCol()).to.deep.equal(["Ours", "3", "Baseline"]);
|
||||
expect(table.querySelector("tbody .redact-chip, tbody .redact-slot")).to.not.equal(null);
|
||||
doc.querySelector(".md-sigma").click(); await delay(20);
|
||||
expect(table.querySelector("tfoot td select").value).to.equal("mean");
|
||||
expect(table.querySelectorAll("tfoot td")[1].textContent).to.equal("75.9");
|
||||
expect(table.querySelector("tfoot td").textContent).to.match(/^Σ/);
|
||||
expect(table.querySelector("tfoot .dt-sum-fn-label").textContent).to.equal("Avg");
|
||||
expect(table.querySelector("tfoot .dt-sum-value").textContent).to.equal("75.9");
|
||||
doc.querySelector(".md-open").click(); await delay(60);
|
||||
const dialog = doc.querySelector(".dt-dialog");
|
||||
expect(dialog.querySelector(".dt-dialog-title").textContent).to.equal("Table · Results");
|
||||
|
||||
Reference in new issue
Block a user