From 0ddcb2057f67b635d58d8bdf6196d85a4d6019d4 Mon Sep 17 00:00:00 2001 From: Thomas Durieux <5577568+tdurieux@users.noreply.github.com> Date: Sat, 14 Nov 2026 23:31:43 +0000 Subject: [PATCH] fix: recover source metadata after branch refresh failures --- public/asset-manifest.json | 2 +- public/script/app.js | 7 +++-- public/script/vendor.min.js | 54 ++++++++++++++++++------------------- test/vue-ui.test.js | 29 ++++++++++++++++++++ 4 files changed, 62 insertions(+), 30 deletions(-) diff --git a/public/asset-manifest.json b/public/asset-manifest.json index 2080350..b4ffb99 100644 --- a/public/asset-manifest.json +++ b/public/asset-manifest.json @@ -1,6 +1,6 @@ { "core.min.js": "core.d23af1c652.min.js", - "vendor.min.js": "vendor.df3a647b76.min.js", + "vendor.min.js": "vendor.7b227840ee.min.js", "mermaid.min.js": "mermaid.a7356d5ed1.min.js", "all.min.css": "all.e8df2ae9d6.min.css", "markdown.min.js": "markdown.6c8dfb7b1d.min.js", diff --git a/public/script/app.js b/public/script/app.js index f140962..72d1b96 100644 --- a/public/script/app.js +++ b/public/script/app.js @@ -2464,6 +2464,9 @@ export const anonymizeController = function (state, http, html, params, location const o = parseGithubUrl(state.sourceUrl); const request = beginSourceRequest(); try { + // A previous branch failure invalidated the whole source. Recover its + // metadata and validity as well as branches, retaining explicit refresh. + if (!state.details) { await getRepoDetails(force); return; } const branches = await http.get(`/api/repo/${o.owner}/${o.repo}/branches`, { params: { reconnect: state.reconnectingSource ? "1" : undefined, anonymizedRepoId: state.isUpdate && params.repoId && parseRepoFullName(state.sourceUrl) === state._originalFullName ? params.repoId : undefined, connection: state.githubConnection, force: force === true || state.reconnectingSource ? "1" : "0", repositoryID: sourceRepositoryID() }, }); @@ -2502,7 +2505,7 @@ export const anonymizeController = function (state, http, html, params, location }; - async function getRepoDetails() { + async function getRepoDetails(forceBranches = false) { const o = parseGithubUrl(state.sourceUrl); const request = beginSourceRequest(); try { @@ -2523,7 +2526,7 @@ export const anonymizeController = function (state, http, html, params, location if (!state.repoId) { state.repoId = state.details.repo + "-" + generateRandomId(4); } - await state.getBranches(state.reconnectingSource); + await state.getBranches(forceBranches || state.reconnectingSource); } catch (error) { if (!isCurrentSource(request)) return; // The form and the preview show it; no toast on top. diff --git a/public/script/vendor.min.js b/public/script/vendor.min.js index 248e96c..4b09ca3 100644 --- a/public/script/vendor.min.js +++ b/public/script/vendor.min.js @@ -1,19 +1,19 @@ -"use strict";(()=>{var il=Object.defineProperty;var rl=e=>{throw TypeError(e)};var pf=(e,t,s)=>t in e?il(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var ff=(e,t)=>{for(var s in t)il(e,s,{get:t[s],enumerable:!0})};var nt=(e,t,s)=>pf(e,typeof t!="symbol"?t+"":t,s),wr=(e,t,s)=>t.has(e)||rl("Cannot "+s);var re=(e,t,s)=>(wr(e,t,"read from private field"),s?s.call(e):t.get(e)),_e=(e,t,s)=>t.has(e)?rl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),ze=(e,t,s,i)=>(wr(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),Fe=(e,t,s)=>(wr(e,t,"access private method"),s);var al=(e,t,s,i)=>({set _(o){ze(e,t,o,s)},get _(){return re(e,t,i)}});var ge=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var ve={markdown:"/script/markdown.6c8dfb7b1d.min.js",org:"/script/org.f61f262915.min.js",notebook:"/script/notebook.c3144c18ae.min.js",editor:"/script/editor.4f142d3adc.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js"};function ll(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 dl(e,t){let{http:s,promises:i,window:o}=t,r=t.takeReviewHandoff(),u=r?{clientId:r.clientId,intentId:r.intentId}:null,p,c,v,g,y,m=!0,b,E=i.defer(),S=()=>[...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=()=>m&&e.user?.username===y;function w(){m=!1,r=p=c=void 0,E.resolve(),o.clearTimeout(b)}e.on("dispose",w),e.on("routeLeave",w),e.watch(()=>e.user?.username,F=>{!y&&F?y=F:y&&F!==y&&(w(),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 T=()=>({timeout:E.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":c}}),M=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(!m||!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),g||(g=S());try{let j=(await s.get("/api/review-consent/csrf",{timeout:E.promise})).data;if(!N())return;if(c=j.csrf,e.handoffEnabled=j.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(c||""))throw new Error("invalid_csrf");let oe=(await s.post("/api/review-consent/preview",{repositoryId:F,intent:{...r,requestId:g}},T())).data;if(!N())return;if(!oe||typeof oe.ticket!="string"||!oe.ticket||oe.ticket.length>8192||typeof oe.repositoryName!="string"||!["restricted-review","anonymous-link"].includes(oe.policy?.access)||!Number.isSafeInteger(oe.policy.version)||!Number.isFinite(Date.parse(oe.policy.retainUntil))||!Number.isFinite(Date.parse(oe.expiresAt))||Date.parse(oe.expiresAt)<=Date.now()||Date.parse(oe.expiresAt)>Date.now()+6e5)throw new Error("invalid_preview");p=oe.ticket,v=S(),e.preview={repositoryName:oe.repositoryName,policy:{...oe.policy},expiresAt:oe.expiresAt},b=o.setTimeout(()=>{m&&(e.expired=!0)},Math.max(0,Date.parse(oe.expiresAt)-Date.now()))}catch(j){N()&&(e.error=M(j))}finally{N()&&(e.busy=!1)}},e.confirmConsent=async()=>{if(!(!N()||e.busy||e.saved||!p||!e.acceptAccess||!e.acceptRetention)){if(Date.parse(e.preview.expiresAt)<=Date.now()){e.expired=!0;return}e.busy=!0,e.error="";try{let F=(await s.post("/api/review-consent/confirm",{ticket:p,requestId:v,acceptAccess:!0,acceptRetention:!0},T())).data;if(!N())return;if(F?.requestId!==v||!Number.isFinite(Date.parse(F.confirmedAt)))throw new Error("invalid_receipt");e.saved=!0,e.uncertain=!1,r=void 0,e.handoffEnabled||(p=void 0)}catch{N()&&(e.uncertain=!0,e.error="The confirmation was not verified. Retry with the same approval, or return to your submission to check its status.")}finally{N()&&(e.busy=!1)}}},e.continueReview=async()=>{if(!N()||e.busy||!e.saved||!e.handoffEnabled||!p||!u)return;e.busy=!0,e.error="";let F,j=()=>{F?.remove(),o.removeEventListener("securitypolicyviolation",oe)},oe=_=>{_.violatedDirective?.startsWith("form-action")&&(j(),N()&&(e.busy=!1,e.error="The return address was blocked. Return to your submission to check the artifact status."))};try{let _=(await s.post("/api/review-consent/handoff",{ticket:p},T())).data;if(!N())return;let z=_?.completion,I=new URL(_?.callbackUrl);if(!z||Object.keys(z).sort().join(",")!=="clientId,code,contract,expiresAt,intentId"||z.contract!=="4open.artifacts/1"||z.clientId!==u.clientId||z.intentId!==u.intentId||!/^[a-f0-9]{64}$/.test(z.code||"")||!Number.isFinite(Date.parse(z.expiresAt))||Date.parse(z.expiresAt)<=Date.now()||Date.parse(z.expiresAt)>Date.now()+3e5||I.protocol!=="https:"||I.href!==_.callbackUrl||I.username||I.password||_.callbackUrl.includes("?")||_.callbackUrl.includes("#"))throw new Error("invalid_handoff");F=o.document.createElement("form"),F.method="POST",F.action=I.href;let L=o.document.createElement("input");L.type="hidden",L.name="completion",L.value=JSON.stringify(z),F.appendChild(L),o.document.body.appendChild(F),o.addEventListener("securitypolicyviolation",oe),e.on("dispose",j),F.submit()}catch{j(),N()&&(e.busy=!1,e.error="The return to review could not be prepared. Retry from this page, or return to your submission to check its status.")}}}var ri=new Map,gf=ve;function Xn(e){if(!ri.has(e)){let t=document.createElement("script");t.src=gf[e];let s=new Promise((i,o)=>{t.onload=i,t.onerror=()=>{ri.delete(e),t.remove(),o(new Error(`Unable to load ${e}. Please retry.`))}});ri.set(e,s),document.head.appendChild(t)}return ri.get(e)}async function ai(){await Xn("editor"),ace.config.set("basePath","/script/external/ace/")}function Ro(e){let t=Object.create(null);for(let s of e.split(","))t[s]=1;return s=>s in t}var et={},Vn=[],Ot=()=>{},Cr=()=>!1,To=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Po=e=>e.startsWith("onUpdate:"),ft=Object.assign,ns=(e,t)=>{let s=e.indexOf(t);s>-1&&e.splice(s,1)},vf=Object.prototype.hasOwnProperty,Ke=(e,t)=>vf.call(e,t),Re=Array.isArray,wn=e=>os(e)==="[object Map]",Jt=e=>os(e)==="[object Set]",ul=e=>os(e)==="[object Date]";var Oe=e=>typeof e=="function",lt=e=>typeof e=="string",$t=e=>typeof e=="symbol",Xe=e=>e!==null&&typeof e=="object",Sr=e=>(Xe(e)||Oe(e))&&Oe(e.then)&&Oe(e.catch),ml=Object.prototype.toString,os=e=>ml.call(e),Er=e=>os(e).slice(8,-1),li=e=>os(e)==="[object Object]",di=e=>lt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Do=Ro(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var ui=e=>{let t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},yf=/-\w/g,mt=ui(e=>e.replace(yf,t=>t.slice(1).toUpperCase())),bf=/\B([A-Z])/g,an=ui(e=>e.replace(bf,"-$1").toLowerCase()),Qn=ui(e=>e.charAt(0).toUpperCase()+e.slice(1)),ss=ui(e=>e?`on${Qn(e)}`:""),Ht=(e,t)=>!Object.is(e,t),Ao=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:s})},Io=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var cl,is=()=>cl||(cl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ae(e){if(Re(e)){let t={};for(let s=0;ss.startsWith("/*")?"":s).split(wf).forEach(s=>{if(s){let i=s.split(kf);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function R(e){let t="";if(lt(e))t=e;else if(Re(e))for(let s=0;sXt(s,t))}var vl=e=>!!(e&&e.__v_isRef===!0),d=e=>lt(e)?e:e==null?"":Re(e)||Xe(e)&&(e.toString===ml||!Oe(e.toString))?vl(e)?d(e.value):JSON.stringify(e,yl,2):String(e),yl=(e,t)=>vl(t)?yl(e,t.value):wn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[i,o],r)=>(s[kr(i,r)+" =>"]=o,s),{})}:Jt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>kr(s))}:$t(t)?kr(t):Xe(t)&&!Re(t)&&!li(t)?String(t):t,kr=(e,t="")=>{var s;return $t(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};function Tf(e,...t){console.warn(`[Vue warn] ${e}`,...t)}var ht,ds=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ht&&(ht.active?(this.parent=ht,this.index=(ht.scopes||(ht.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes){let i=this.scopes.slice();for(t=0,s=i.length;t0&&--this._on===0){if(ht===this)ht=this.prevScope;else{let t=ht;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,i;for(s=0,i=this.effects.length;s0)return;if(ls){let t=ls;for(ls=void 0;t;){let s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;as;){let t=as;for(as=void 0;t;){let s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=s}}if(e)throw e}function Nl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Rl(e){let t,s=e.depsTail,i=s;for(;i;){let o=i.prevDep;i.version===-1?(i===s&&(s=o),_r(i),Pf(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=o}e.deps=t,e.depsTail=s}function Pr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Tl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Tl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===us)||(e.globalVersion=us,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Pr(e))))return;e.flags|=2;let t=e.dep,s=st,i=Qt;st=e,Qt=!0;try{Nl(e);let o=e.fn(e._value);(t.version===0||Ht(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{st=s,Qt=i,Rl(e),e.flags&=-3}}function _r(e,t=!1){let{dep:s,prevSub:i,nextSub:o}=e;if(i&&(i.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=i,e.nextSub=void 0),s.subs===e&&(s.subs=i,!i&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)_r(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Pf(e){let{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}var Qt=!0,Pl=[];function Zt(){Pl.push(Qt),Qt=!1}function xt(){let e=Pl.pop();Qt=e===void 0?!0:e}function bl(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let s=st;st=void 0;try{t()}finally{st=s}}}var us=0,Dr=class{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},cs=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!st||!Qt||st===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==st)s=this.activeLink=new Dr(st,this),st.deps?(s.prevDep=st.depsTail,st.depsTail.nextDep=s,st.depsTail=s):st.deps=st.depsTail=s,Dl(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){let i=s.nextDep;i.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=i),s.prevDep=st.depsTail,s.nextDep=void 0,st.depsTail.nextDep=s,st.depsTail=s,st.deps===s&&(st.deps=i)}return s}trigger(t){this.version++,us++,this.notify(t)}notify(t){Lr();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{$r()}}};function Dl(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)Dl(i)}let s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}var Ar=new WeakMap,xn=Symbol(""),Ir=Symbol(""),ps=Symbol("");function Ct(e,t,s){if(Qt&&st){let i=Ar.get(e);i||Ar.set(e,i=new Map);let o=i.get(s);o||(i.set(s,o=new cs),o.map=i,o.key=s),o.track()}}function dn(e,t,s,i,o,r){let u=Ar.get(e);if(!u){us++;return}let p=c=>{c&&c.trigger()};if(Lr(),t==="clear")u.forEach(p);else{let c=Re(e),v=c&&di(s);if(c&&s==="length"){let g=Number(i);u.forEach((y,m)=>{(m==="length"||m===ps||!$t(m)&&m>=g)&&p(y)})}else switch((s!==void 0||u.has(void 0))&&p(u.get(s)),v&&p(u.get(ps)),t){case"add":c?v&&p(u.get("length")):(p(u.get(xn)),wn(e)&&p(u.get(Ir)));break;case"delete":c||(p(u.get(xn)),wn(e)&&p(u.get(Ir)));break;case"set":wn(e)&&p(u.get(xn));break}}$r()}function Oo(e){let t=Ye(e);return t===e||(Ct(t,"iterate",ps),Mt(e))?t:jt(e)?cn(e)?t.map(s=>Cn(_t(s))):t.map(Cn):t.map(_t)}function fs(e){return Ct(e=Ye(e),"iterate",ps),e}function ln(e,t){return jt(e)?Cn(cn(e)?_t(t):t):_t(t)}var Df={__proto__:null,[Symbol.iterator](){return Rr(this,Symbol.iterator,e=>ln(this,e))},concat(...e){return Oo(this).concat(...e.map(t=>Re(t)?Oo(t):t))},entries(){return Rr(this,"entries",e=>(e[1]=ln(this,e[1]),e))},every(e,t){return kn(this,"every",e,t,void 0,arguments)},filter(e,t){return kn(this,"filter",e,t,s=>s.map(i=>ln(this,i)),arguments)},find(e,t){return kn(this,"find",e,t,s=>ln(this,s),arguments)},findIndex(e,t){return kn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return kn(this,"findLast",e,t,s=>ln(this,s),arguments)},findLastIndex(e,t){return kn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return kn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Tr(this,"includes",e)},indexOf(...e){return Tr(this,"indexOf",e)},join(e){return Oo(this).join(e)},lastIndexOf(...e){return Tr(this,"lastIndexOf",e)},map(e,t){return kn(this,"map",e,t,void 0,arguments)},pop(){return rs(this,"pop")},push(...e){return rs(this,"push",e)},reduce(e,...t){return kl(this,"reduce",e,t)},reduceRight(e,...t){return kl(this,"reduceRight",e,t)},shift(){return rs(this,"shift")},some(e,t){return kn(this,"some",e,t,void 0,arguments)},splice(...e){return rs(this,"splice",e)},toReversed(){return Oo(this).toReversed()},toSorted(e){return Oo(this).toSorted(e)},toSpliced(...e){return Oo(this).toSpliced(...e)},unshift(...e){return rs(this,"unshift",e)},values(){return Rr(this,"values",e=>ln(this,e))}};function Rr(e,t,s){let i=fs(e),o=i[t],r=o.call(i);if(i!==e&&!Mt(e)){if(r[Symbol.toStringTag]==="Array Iterator"){let u=Object.create(Object.getPrototypeOf(r));return u.next=()=>wl(r.next(),s),o!==Al[t]&&Object.defineProperties(u,{return:{get(){let p=r.return;return typeof p=="function"?p.bind(r):p}},throw:{get(){let p=r.throw;return typeof p=="function"?p.bind(r):p}}}),u}r._next=r.next,r.next=()=>wl(r._next(),s)}return r}function wl(e,t){return e.done||(e.value=t(e.value)),e}var Al=Array.prototype;function kn(e,t,s,i,o,r){let u=fs(e),p=u!==e&&!Mt(e),c=u[t];if(c!==Al[t]){let y=c.apply(e,r);return p?_t(y):y}let v=s;u!==e&&(p?v=function(y,m){return s.call(this,ln(e,y),m,e)}:s.length>2&&(v=function(y,m){return s.call(this,y,m,e)}));let g=c.call(u,v,i);return p&&o?o(g):g}function kl(e,t,s,i){let o=fs(e),r=o!==e&&!Mt(e),u=s,p=!1;o!==e&&(r?(p=i.length===0,u=function(v,g,y){return p&&(p=!1,v=ln(e,v)),s.call(this,v,ln(e,g),y,e)}):s.length>3&&(u=function(v,g,y){return s.call(this,v,g,y,e)}));let c=o[t](u,...i);return p?ln(e,c):c}function Tr(e,t,s){let i=Ye(e);Ct(i,"iterate",ps);let o=i[t](...s);return(o===-1||o===!1)&&hs(s[0])?(s[0]=Ye(s[0]),i[t](...s)):o}function rs(e,t,s=[]){Zt(),Lr();let i=Ye(e)[t].apply(e,s);return $r(),xt(),i}var Af=Ro("__proto__,__v_isRef,__isVue"),Il=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter($t));function If(e){$t(e)||(e=String(e));let t=Ye(this);return Ct(t,"has",e),t.hasOwnProperty(e)}var vi=class{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,i){if(s==="__v_skip")return t.__v_skip;let o=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return i===(o?r?Uf:Vl:r?Ml:Ol).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;let u=Re(t);if(!o){let c;if(u&&(c=Df[s]))return c;if(s==="hasOwnProperty")return If}let p=Reflect.get(t,s,yt(t)?t:i);if(($t(s)?Il.has(s):Af(s))||(o||Ct(t,"get",s),r))return p;if(yt(p)){let c=u&&di(s)?p:p.value;return o&&Xe(c)?bi(c):c}return Xe(p)?o?bi(p):at(p):p}},yi=class extends vi{constructor(t=!1){super(!1,t)}set(t,s,i,o){let r=t[s],u=Re(t)&&di(s);if(!this._isShallow){let v=jt(r);if(!Mt(i)&&!jt(i)&&(r=Ye(r),i=Ye(i)),!u&&yt(r)&&!yt(i))return v||(r.value=i),!0}let p=u?Number(s)e,mi=e=>Reflect.getPrototypeOf(e);function qf(e,t,s){return function(...i){let o=this.__v_raw,r=Ye(o),u=wn(r),p=e==="entries"||e===Symbol.iterator&&u,c=e==="keys"&&u,v=o[e](...i),g=s?Mr:t?Cn:_t;return!t&&Ct(r,"iterate",c?Ir:xn),ft(Object.create(v),{next(){let{value:y,done:m}=v.next();return m?{value:y,done:m}:{value:p?[g(y[0]),g(y[1])]:g(y),done:m}}})}}function hi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Lf(e,t){let s={get(o){let r=this.__v_raw,u=Ye(r),p=Ye(o);e||(Ht(o,p)&&Ct(u,"get",o),Ct(u,"get",p));let{has:c}=mi(u),v=t?Mr:e?Cn:_t;if(c.call(u,o))return v(r.get(o));if(c.call(u,p))return v(r.get(p));r!==u&&r.get(o)},get size(){let o=this.__v_raw;return!e&&Ct(Ye(o),"iterate",xn),o.size},has(o){let r=this.__v_raw,u=Ye(r),p=Ye(o);return e||(Ht(o,p)&&Ct(u,"has",o),Ct(u,"has",p)),o===p?r.has(o):r.has(o)||r.has(p)},forEach(o,r){let u=this,p=u.__v_raw,c=Ye(p),v=t?Mr:e?Cn:_t;return!e&&Ct(c,"iterate",xn),p.forEach((g,y)=>o.call(r,v(g),v(y),u))}};return ft(s,e?{add:hi("add"),set:hi("set"),delete:hi("delete"),clear:hi("clear")}:{add(o){let r=Ye(this),u=mi(r),p=Ye(o),c=!t&&!Mt(o)&&!jt(o)?p:o;return u.has.call(r,c)||Ht(o,c)&&u.has.call(r,o)||Ht(p,c)&&u.has.call(r,p)||(r.add(c),dn(r,"add",c,c)),this},set(o,r){!t&&!Mt(r)&&!jt(r)&&(r=Ye(r));let u=Ye(this),{has:p,get:c}=mi(u),v=p.call(u,o);v||(o=Ye(o),v=p.call(u,o));let g=c.call(u,o);return u.set(o,r),v?Ht(r,g)&&dn(u,"set",o,r,g):dn(u,"add",o,r),this},delete(o){let r=Ye(this),{has:u,get:p}=mi(r),c=u.call(r,o);c||(o=Ye(o),c=u.call(r,o));let v=p?p.call(r,o):void 0,g=r.delete(o);return c&&dn(r,"delete",o,void 0,v),g},clear(){let o=Ye(this),r=o.size!==0,u=void 0,p=o.clear();return r&&dn(o,"clear",void 0,void 0,u),p}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=qf(o,e,t)}),s}function Fr(e,t){let s=Lf(e,t);return(i,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?i:Reflect.get(Ke(s,o)&&o in i?s:i,o,r)}var $f={get:Fr(!1,!1)},_f={get:Fr(!1,!0)},Ff={get:Fr(!0,!1)};var Ol=new WeakMap,Ml=new WeakMap,Vl=new WeakMap,Uf=new WeakMap;function Bf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function at(e){return jt(e)?e:Ur(e,!1,Of,$f,Ol)}function ms(e){return Ur(e,!1,Vf,_f,Ml)}function bi(e){return Ur(e,!0,Mf,Ff,Vl)}function Ur(e,t,s,i,o){if(!Xe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let r=o.get(e);if(r)return r;let u=Bf(Er(e));if(u===0)return e;let p=new Proxy(e,u===2?i:s);return o.set(e,p),p}function cn(e){return jt(e)?cn(e.__v_raw):!!(e&&e.__v_isReactive)}function jt(e){return!!(e&&e.__v_isReadonly)}function Mt(e){return!!(e&&e.__v_isShallow)}function hs(e){return e?!!e.__v_raw:!1}function Ye(e){let t=e&&e.__v_raw;return t?Ye(t):e}function pn(e){return!Ke(e,"__v_skip")&&Object.isExtensible(e)&&ci(e,"__v_skip",!0),e}var _t=e=>Xe(e)?at(e):e,Cn=e=>Xe(e)?bi(e):e;function yt(e){return e?e.__v_isRef===!0:!1}function St(e){return ql(e,!1)}function ki(e){return ql(e,!0)}function ql(e,t){return yt(e)?e:new Vr(e,t)}var Vr=class{constructor(t,s){this.dep=new cs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:Ye(t),this._value=s?t:_t(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){let s=this._rawValue,i=this.__v_isShallow||Mt(t)||jt(t);t=i?t:Ye(t),Ht(t,s)&&(this._rawValue=t,this._value=i?t:_t(t),this.dep.trigger())}};function Sn(e){return yt(e)?e.value:e}var zf={get:(e,t,s)=>t==="__v_raw"?e:Sn(Reflect.get(e,t,s)),set:(e,t,s,i)=>{let o=e[t];return yt(o)&&!yt(s)?(o.value=s,!0):Reflect.set(e,t,s,i)}};function Ci(e){return cn(e)?e:new Proxy(e,zf)}var qr=class{constructor(t,s,i){this.fn=t,this.setter=s,this._value=void 0,this.dep=new cs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=us-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&st!==this)return El(this,!0),!0}get value(){let t=this.dep.track();return Tl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}};function Ll(e,t,s=!1){let i,o;return Oe(e)?i=e:(i=e.get,o=e.set),new qr(i,o,s)}var gi={},wi=new WeakMap,Zn;function $l(e,t=!1,s=Zn){if(s){let i=wi.get(s);i||wi.set(s,i=[]),i.push(e)}}function _l(e,t,s=et){let{immediate:i,deep:o,once:r,scheduler:u,augmentJob:p,call:c}=s,v=j=>{(s.onWarn||Tf)("Invalid watch source: ",j,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},g=j=>o?j:Mt(j)||o===!1||o===0?un(j,1):un(j),y,m,b,E,S=!1,N=!1;if(yt(e)?(m=()=>e.value,S=Mt(e)):cn(e)?(m=()=>g(e),S=!0):Re(e)?(N=!0,S=e.some(j=>cn(j)||Mt(j)),m=()=>e.map(j=>{if(yt(j))return j.value;if(cn(j))return g(j);if(Oe(j))return c?c(j,2):j()})):Oe(e)?t?m=c?()=>c(e,2):e:m=()=>{if(b){Zt();try{b()}finally{xt()}}let j=Zn;Zn=y;try{return c?c(e,3,[E]):e(E)}finally{Zn=j}}:m=Ot,t&&o){let j=m,oe=o===!0?1/0:o;m=()=>un(j(),oe)}let w=Cl(),T=()=>{y.stop(),w&&w.active&&ns(w.effects,y)};if(r&&t){let j=t;t=(...oe)=>{try{return j(...oe)}finally{T()}}}let M=N?new Array(e.length).fill(gi):gi,F=j=>{if(!(!(y.flags&1)||!y.dirty&&!j))if(t){let oe=y.run();if(j||o||S||(N?oe.some((_,z)=>Ht(_,M[z])):Ht(oe,M))){let _=Zn;Zt();try{b&&b(),Zn=y;let z=[oe,M===gi?void 0:N&&M[0]===gi?[]:M,E];M=oe,c?c(t,3,z):t(...z)}finally{Zn=_,xt()}}}else y.run()};return p&&p(F),y=new Mo(m),y.scheduler=u?()=>u(F,!1):F,E=j=>$l(j,!1,y),b=y.onStop=()=>{let j=wi.get(y);if(j){if(c)c(j,4);else for(let oe of j)oe();wi.delete(y)}},t?i?F(!0):M=y.run():u?u(F.bind(null,!0),!0):y.run(),T.pause=y.pause.bind(y),T.resume=y.resume.bind(y),T.stop=T,T}function un(e,t=1/0,s){if(t<=0||!Xe(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,yt(e))un(e.value,t,s);else if(Re(e))for(let i=0;i{un(i,t,s)});else if(li(e)){for(let i in e)un(e[i],t,s);for(let i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&un(e[i],t,s)}return e}function Ts(e,t,s,i){try{return i?e(...i):e()}catch(o){Ps(o,t,s)}}function Gt(e,t,s,i){if(Oe(e)){let o=Ts(e,t,s,i);return o&&Sr(o)&&o.catch(r=>{Ps(r,t,s)}),o}if(Re(e)){let o=[];for(let r=0;r>>1,o=At[i],r=Cs(o);r=Cs(s)?At.push(e):At.splice(Kf(t),0,e),e.flags|=1,td()}}function td(){Ni||(Ni=ed.then(id))}function nd(e){if(!Re(e))qn&&e.id===-1?qn.splice(Vo+1,0,e):e.flags&1||(mn.push(e),e.flags|=1);else for(let t=0;t=t))continue;At.splice(i,1),i=e?i-1:en,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function sd(e,t,s=0){if(mn.length){let i=mn,o=0;if(t){i=[];for(let u=0;uCs(u)-Cs(p));if(mn.length=o,qn){for(let u=0;ue.id==null?e.flags&2?-1:1/0:e.id;function id(e){let t=Ot;try{for(en=0;en{i._d&&Di(-1);let r=Ri(t),u=oo.length,p;try{p=e(...o)}finally{for(let c=oo.length;c>u;c--)qd();Ri(r),i._d&&Di(1)}return p};return i._n=!0,i._c=!0,i._d=!0,i}function P(e,t){if(Ft===null)return e;let s=$i(Ft),i=e.dirs||(e.dirs=[]);for(let o=0;o1)return s&&Oe(t)?t.call(i&&i.proxy):t}}var Xf=Symbol.for("v-scx"),Qf=()=>{{let e=qt(Xf);return e}};function ut(e,t,s){return ad(e,t,s)}function ad(e,t,s=et){let{immediate:i,deep:o,flush:r,once:u}=s,p=ft({},s),c=t&&i||!t&&r!=="post",v;if($o){if(r==="sync"){let b=Qf();v=b.__watcherHandles||(b.__watcherHandles=[])}else if(!c){let b=()=>{};return b.stop=Ot,b.resume=Ot,b.pause=Ot,b}}let g=Et;p.call=(b,E,S)=>Gt(b,g,E,S);let y=!1;r==="post"?p.scheduler=b=>{b.i=g,Vt(b,g&&g.suspense)}:r!=="sync"&&(y=!0,p.scheduler=(b,E)=>{E?b():Zr(b)}),p.augmentJob=b=>{t&&(b.flags|=4),y&&(b.flags|=2,g&&(b.id=g.uid,b.i=g))};let m=_l(e,t,p);return $o&&(v?v.push(m):c&&m()),m}function Zf(e,t,s){let i=this.proxy,o=lt(e)?e.includes(".")?ld(i,e):()=>i[e]:e.bind(i,i),r;Oe(t)?r=t:(r=t.handler,s=t);let u=Is(this),p=ad(o,r.bind(i),s);return u(),p}function ld(e,t){let s=t.split(".");return()=>{let i=e;for(let o=0;oe.__isTeleport;var zr=Symbol("_leaveCb");function em(e){let t=e[0];if(e.length>1){let s=!1;for(let i of e)if(i.type!==tn){t=i,s=!0;break}}return t}function dd(e){if(!Mi(e))return Oi(e.type)&&e.children?em(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&Oe(s.default))return s.default()}}function Ss(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let s=e.component.subTree;Ss(Oi(s.type)&&dd(s)||s,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===V&&Re(e.children)){let s=kd(e.children,!1);s&&Ss(s,t)}}function Wr(e){if(e.component)return Wr(e.component.subTree);if(e.type===V){let t=Re(e.children)&&kd(e.children,!1);return t?Wr(t):void 0}if(e.type!==tn)return e}function Ds(e,t){return Oe(e)?ft({name:e.name},t,{setup:e}):e}function xr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Fl(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}var Ti=new WeakMap;function ys(e,t,s,i,o=!1){if(Re(e)){e.forEach((S,N)=>ys(S,t&&(Re(t)?t[N]:t),s,i,o));return}if(bs(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&ys(e,t,s,i.component.subTree);return}let r=i.shapeFlag&4?$i(i.component):i.el,u=o?null:r,{i:p,r:c}=e,v=t&&t.r,g=p.refs===et?p.refs={}:p.refs,y=p.setupState,m=Ye(y),b=y===et?Cr:S=>Fl(g,S)?!1:Ke(m,S),E=(S,N)=>!(N&&Fl(g,N));if(v!=null&&v!==c){if(Ul(t),lt(v))g[v]=null,b(v)&&(y[v]=null);else if(yt(v)){let S=t;E(v,S.k)&&(v.value=null),S.k&&(g[S.k]=null)}}if(Oe(c))Ts(c,p,12,[u,g]);else{let S=lt(c),N=yt(c);if(S||N){let w=()=>{if(e.f){let T=S?b(c)?y[c]:g[c]:E(c)||!e.k?c.value:g[e.k];if(o)Re(T)&&ns(T,r);else if(Re(T))T.includes(r)||T.push(r);else if(S)g[c]=[r],b(c)&&(y[c]=g[c]);else{let M=[r];E(c,e.k)&&(c.value=M),e.k&&(g[e.k]=M)}}else S?(g[c]=u,b(c)&&(y[c]=u)):N&&(E(c,e.k)&&(c.value=u),e.k&&(g[e.k]=u))};if(u){let T=()=>{w(),Ti.delete(e)};T.id=-1,Ti.set(e,T),Vt(T,s)}else Ul(e),w()}}}function Ul(e){let t=Ti.get(e);t&&(t.flags|=8,Ti.delete(e))}var Bl=e=>e.nodeType===8;var jte=is().requestIdleCallback||(e=>setTimeout(e,1)),Gte=is().cancelIdleCallback||(e=>clearTimeout(e));function tm(e,t){if(Bl(e)&&e.data==="["){let s=1,i=e.nextSibling;for(;i;){if(i.nodeType===1){if(t(i)===!1)break}else if(Bl(i))if(i.data==="]"){if(--s===0)break}else i.data==="["&&s++;i=i.nextSibling}}else t(e)}var bs=e=>!!e.type.__asyncLoader;function ud(e){Oe(e)&&(e={loader:e});let{loader:t,loadingComponent:s,errorComponent:i,delay:o=200,hydrate:r,timeout:u,suspensible:p=!0,onError:c}=e,v=null,g,y=0,m=()=>(y++,v=null,b()),b=()=>{let E;return v||(E=v=t().catch(S=>{if(S=S instanceof Error?S:new Error(String(S)),c)return new Promise((N,w)=>{c(S,()=>N(m()),()=>w(S),y+1)});throw S}).then(S=>E!==v&&v?v:(S&&(S.__esModule||S[Symbol.toStringTag]==="Module")&&(S=S.default),g=S,S)))};return Ds({name:"AsyncComponentWrapper",__asyncLoader:b,__asyncHydrate(E,S,N){let w=E.isConnected,T=!1;(S.bu||(S.bu=[])).push(()=>T=!0);let M=()=>{T||!E.parentNode||w&&!E.isConnected||N()},F=r?()=>{let j=r(M,oe=>tm(E,oe));j&&(S.bum||(S.bum=[])).push(j)}:M;g?F():b().then(()=>!S.isUnmounted&&F())},get __asyncResolved(){return g},setup(){let E=Et;if(xr(E),g)return()=>Si(g,E);let S=j=>{v=null,Ps(j,E,13,!i)};if(p&&E.suspense||$o)return b().then(j=>()=>Si(j,E)).catch(j=>(S(j),()=>i?Me(i,{error:j}):null));let N=St(!1),w=St(),T=St(!!o),M,F;return As(()=>{M!=null&&clearTimeout(M),F!=null&&clearTimeout(F)}),o&&(F=setTimeout(()=>{E.isUnmounted||(T.value=!1)},o)),u!=null&&(M=setTimeout(()=>{if(!E.isUnmounted&&!N.value&&!w.value){let j=new Error(`Async component timed out after ${u}ms.`);S(j),w.value=j}},u)),b().then(()=>{E.isUnmounted||(N.value=!0,E.parent&&Mi(E.parent.vnode)&&E.parent.update())}).catch(j=>{if(E.isUnmounted){v=null;return}S(j),w.value=j}),()=>{if(N.value&&g)return Si(g,E);if(w.value&&i)return Me(i,{error:w.value});if(s&&!T.value)return Si(s,E)}}})}function Si(e,t){let{ref:s,props:i,children:o,ce:r}=t.vnode,u=Me(e,i,o);return u.ref=s,u.ce=r,delete t.vnode.ce,u}var Mi=e=>e.type.__isKeepAlive;function cd(e,t){fd(e,"a",t)}function pd(e,t){fd(e,"da",t)}function fd(e,t,s=Et){let i=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Vi(t,i,s),s){let o=s.parent;for(;o&&o.parent;)Mi(o.parent.vnode)&&nm(i,t,s,o),o=o.parent}}function nm(e,t,s,i){let o=Vi(t,e,i,!0);As(()=>{ns(i[t],o)},s)}function Vi(e,t,s=Et,i=!1){if(s){let o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...u)=>{Zt();let p=Is(s),c=Gt(t,s,e,u);return p(),xt(),c});return i?o.unshift(r):o.push(r),r}}var Nn=e=>(t,s=Et)=>{(!$o||e==="sp")&&Vi(e,(...i)=>t(...i),s)},om=Nn("bm"),gn=Nn("m"),md=Nn("bu"),hd=Nn("u"),io=Nn("bum"),As=Nn("um"),sm=Nn("sp"),im=Nn("rtg"),rm=Nn("rtc");function am(e,t=Et){Vi("ec",e,t)}var gd="components",lm="directives";function Ze(e,t){return vd(gd,e,!0,t)||e}var dm=Symbol.for("v-ndc");function Pe(e){return vd(lm,e)}function vd(e,t,s=!0,i=!1){let o=Ft||Et;if(o){let r=o.type;if(e===gd){let p=Wm(r,!1);if(p&&(p===t||p===mt(t)||p===Qn(mt(t))))return r}let u=zl(o[e]||r[e],t)||zl(o.appContext[e],t);return!u&&i?r:u}}function zl(e,t){return e&&(e[t]||e[mt(t)]||e[Qn(mt(t))])}function Q(e,t,s,i){let o,r=s&&s[i],u=Re(e);if(u||lt(e)){let p=u&&cn(e),c=!1,v=!1;p&&(c=!Mt(e),v=jt(e),e=fs(e)),o=new Array(e.length);for(let g=0,y=e.length;gt(p,c,void 0,r&&r[c]));else{let p=Object.keys(e);o=new Array(p.length);for(let c=0,v=p.length;ce?Fd(e)?$i(e):Kr(e.parent):null;var ws=ft(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Kr(e.parent),$root:e=>Kr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ea(e),$forceUpdate:e=>e.f||(e.f=()=>{Zr(e.update)}),$nextTick:e=>e.n||(e.n=We.bind(e.proxy)),$watch:e=>Zf.bind(e)});var Hr=(e,t)=>e!==et&&!e.__isScriptSetup&&Ke(e,t),um={get({_:e},t){if(t==="__v_skip")return!0;let{ctx:s,setupState:i,data:o,props:r,accessCache:u,type:p,appContext:c}=e;if(t[0]!=="$"){let m=u[t];if(m!==void 0)switch(m){case 1:return i[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(Hr(i,t))return u[t]=1,i[t];if(o!==et&&Ke(o,t))return u[t]=2,o[t];if(Ke(r,t))return u[t]=3,r[t];if(s!==et&&Ke(s,t))return u[t]=4,s[t];Yr&&(u[t]=0)}}let v=ws[t],g,y;if(v)return t==="$attrs"&&Ct(e.attrs,"get",""),v(e);if((g=p.__cssModules)&&(g=g[t]))return g;if(s!==et&&Ke(s,t))return u[t]=4,s[t];if(y=c.config.globalProperties,Ke(y,t))return y[t]},set({_:e},t,s){let{data:i,setupState:o,ctx:r}=e;return Hr(o,t)?(o[t]=s,!0):i!==et&&Ke(i,t)?(i[t]=s,!0):Ke(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:i,appContext:o,props:r,type:u}},p){let c;return!!(s[p]||e!==et&&p[0]!=="$"&&Ke(e,p)||Hr(t,p)||Ke(r,p)||Ke(i,p)||Ke(ws,p)||Ke(o.config.globalProperties,p)||(c=u.__cssModules)&&c[p])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:Ke(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Hl(e){return Re(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}var Yr=!0;function cm(e){let t=ea(e),s=e.proxy,i=e.ctx;Yr=!1,t.beforeCreate&&jl(t.beforeCreate,e,"bc");let{data:o,computed:r,methods:u,watch:p,provide:c,inject:v,created:g,beforeMount:y,mounted:m,beforeUpdate:b,updated:E,activated:S,deactivated:N,beforeDestroy:w,beforeUnmount:T,destroyed:M,unmounted:F,render:j,renderTracked:oe,renderTriggered:_,errorCaptured:z,serverPrefetch:I,expose:L,inheritAttrs:k,components:q,directives:G,filters:H}=t;if(v&&pm(v,i,null),u)for(let x in u){let fe=u[x];Oe(fe)&&(i[x]=fe.bind(s))}if(o){let x=o.call(s,s);Xe(x)&&(e.data=at(x))}if(Yr=!0,r)for(let x in r){let fe=r[x],he=Oe(fe)?fe.bind(s,s):Oe(fe.get)?fe.get.bind(s,s):Ot,Be=!Oe(fe)&&Oe(fe.set)?fe.set.bind(s):Ot,He=Nt({get:he,set:Be});Object.defineProperty(i,x,{enumerable:!0,configurable:!0,get:()=>He.value,set:Qe=>He.value=Qe})}if(p)for(let x in p)yd(p[x],i,s,x);if(c){let x=Oe(c)?c.call(s):c;Reflect.ownKeys(x).forEach(fe=>{so(fe,x[fe])})}g&&jl(g,e,"c");function ne(x,fe){Re(fe)?fe.forEach(he=>x(he.bind(s))):fe&&x(fe.bind(s))}if(ne(om,y),ne(gn,m),ne(md,b),ne(hd,E),ne(cd,S),ne(pd,N),ne(am,z),ne(rm,oe),ne(im,_),ne(io,T),ne(As,F),ne(sm,I),Re(L))if(L.length){let x=e.exposed||(e.exposed={});L.forEach(fe=>{Object.defineProperty(x,fe,{get:()=>s[fe],set:he=>s[fe]=he,enumerable:!0})})}else e.exposed||(e.exposed={});j&&e.render===Ot&&(e.render=j),k!=null&&(e.inheritAttrs=k),q&&(e.components=q),G&&(e.directives=G),I&&xr(e)}function pm(e,t,s=Ot){Re(e)&&(e=Jr(e));for(let i in e){let o=e[i],r;Xe(o)?"default"in o?r=qt(o.from||i,o.default,!0):r=qt(o.from||i):r=qt(o),yt(r)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:u=>r.value=u}):t[i]=r}}function jl(e,t,s){Gt(Re(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,s)}function yd(e,t,s,i){let o=i.includes(".")?ld(s,i):()=>s[i];if(lt(e)){let r=t[e];Oe(r)&&ut(o,r)}else if(Oe(e))ut(o,e.bind(s));else if(Xe(e))if(Re(e))e.forEach(r=>yd(r,t,s,i));else{let r=Oe(e.handler)?e.handler.bind(s):t[e.handler];Oe(r)&&ut(o,r,e)}}function ea(e){let t=e.type,{mixins:s,extends:i}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:u}}=e.appContext,p=r.get(t),c;return p?c=p:!o.length&&!s&&!i?c=t:(c={},o.length&&o.forEach(v=>Pi(c,v,u,!0)),Pi(c,t,u)),Xe(t)&&r.set(t,c),c}function Pi(e,t,s,i=!1){let{mixins:o,extends:r}=t;r&&Pi(e,r,s,!0),o&&o.forEach(u=>Pi(e,u,s,!0));for(let u in t)if(!(i&&u==="expose")){let p=fm[u]||s&&s[u];e[u]=p?p(e[u],t[u]):t[u]}return e}var fm={data:Gl,props:Wl,emits:Wl,methods:vs,computed:vs,beforeCreate:Dt,created:Dt,beforeMount:Dt,mounted:Dt,beforeUpdate:Dt,updated:Dt,beforeDestroy:Dt,beforeUnmount:Dt,destroyed:Dt,unmounted:Dt,activated:Dt,deactivated:Dt,errorCaptured:Dt,serverPrefetch:Dt,components:vs,directives:vs,watch:hm,provide:Gl,inject:mm};function Gl(e,t){return t?e?function(){return ft(Oe(e)?e.call(this,this):e,Oe(t)?t.call(this,this):t)}:t:e}function mm(e,t){return vs(Jr(e),Jr(t))}function Jr(e){if(Re(e)){let t={};for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${mt(t)}Modifiers`]||e[`${an(t)}Modifiers`];function bm(e,t,...s){if(e.isUnmounted)return;let i=e.vnode.props||et,o=s,r=t.startsWith("update:"),u=r&&ym(i,t.slice(7));u&&(u.trim&&(o=s.map(g=>lt(g)?g.trim():g)),u.number&&(o=o.map(Io)));let p,c=i[p=ss(t)]||i[p=ss(mt(t))];!c&&r&&(c=i[p=ss(an(t))]),c&&Gt(c,e,6,o);let v=i[p+"Once"];if(v){if(!e.emitted)e.emitted={};else if(e.emitted[p])return;e.emitted[p]=!0,Gt(v,e,6,o)}}var wm=new WeakMap;function wd(e,t,s=!1){let i=s?wm:t.emitsCache,o=i.get(e);if(o!==void 0)return o;let r=e.emits,u={},p=!1;if(!Oe(e)){let c=v=>{let g=wd(v,t,!0);g&&(p=!0,ft(u,g))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!p?(Xe(e)&&i.set(e,null),null):(Re(r)?r.forEach(c=>u[c]=null):ft(u,r),Xe(e)&&i.set(e,u),u)}function qi(e,t){return!e||!To(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Ke(e,t[0].toLowerCase()+t.slice(1))||Ke(e,an(t))||Ke(e,t))}function jr(e){let{type:t,vnode:s,proxy:i,withProxy:o,propsOptions:[r],slots:u,attrs:p,emit:c,render:v,renderCache:g,props:y,data:m,setupState:b,ctx:E,inheritAttrs:S}=e,N=Ri(e),w,T;try{if(s.shapeFlag&4){let j=o||i,oe=j;w=hn(v.call(oe,j,g,y,b,m,E)),T=p}else{let j=t;w=hn(j.length>1?j(y,{attrs:p,slots:u,emit:c}):j(y,null)),T=t.props?p:km(p)}}catch(j){oo.length=0,Ps(j,e,1),w=Me(tn)}let M=w,F;if(T&&S!==!1){let j=Object.keys(T),{shapeFlag:oe}=M;j.length&&oe&7&&(r&&j.some(Po)&&(T=Cm(T,r)),M=Lo(M,T,!1,!0))}if(s.dirs&&(M=Lo(M,null,!1,!0),M.dirs=M.dirs?M.dirs.concat(s.dirs):s.dirs),s.transition){let j=Oi(M.type)&&dd(M)||M;Ss(j,s.transition)}return w=M,Ri(N),w}function kd(e,t=!0){let s;for(let i=0;i{let t;for(let s in e)(s==="class"||s==="style"||To(s))&&((t||(t={}))[s]=e[s]);return t},Cm=(e,t)=>{let s={};for(let i in e)(!Po(i)||!(i.slice(9)in t))&&(s[i]=e[i]);return s};function Sm(e,t,s){let{props:i,children:o,component:r}=e,{props:u,children:p,patchFlag:c}=t,v=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return i?Kl(i,u,v):!!u;if(c&8){let g=t.dynamicProps;for(let y=0;yObject.create(Sd),Nd=e=>Object.getPrototypeOf(e)===Sd;function Nm(e,t,s,i=!1){let o={},r=Ed();e.propsDefaults=Object.create(null),Rd(e,t,o,r);for(let u in e.propsOptions[0])u in o||(o[u]=void 0);s?e.props=i?o:ms(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function Rm(e,t,s,i){let{props:o,attrs:r,vnode:{patchFlag:u}}=e,p=Ye(o),[c]=e.propsOptions,v=!1;if((i||u>0)&&!(u&16)){if(u&8){let g=e.vnode.dynamicProps;for(let y=0;y{c=!0;let[m,b]=Td(y,t,!0);ft(u,m),b&&p.push(...b)};!s&&t.mixins.length&&t.mixins.forEach(g),e.extends&&g(e.extends),e.mixins&&e.mixins.forEach(g)}if(!r&&!c)return Xe(e)&&i.set(e,Vn),Vn;if(Re(r))for(let g=0;ge==="_"||e==="_ctx"||e==="$stable",na=e=>Re(e)?e.map(hn):[hn(e)],Pm=(e,t,s)=>{if(t._n)return t;let i=Jf((...o)=>na(t(...o)),s);return i._c=!1,i},Pd=(e,t,s)=>{let i=e._ctx;for(let o in e){if(ta(o))continue;let r=e[o];if(Oe(r))t[o]=Pm(o,r,i);else if(r!=null){let u=na(r);t[o]=()=>u}}},Dd=(e,t)=>{let s=na(t);e.slots.default=()=>s},Ad=(e,t,s)=>{for(let i in t)(s||!ta(i))&&(e[i]=t[i])},Dm=(e,t,s)=>{let i=e.slots=Ed();if(e.vnode.shapeFlag&32){let o=t._;o?(Ad(i,t,s),s&&ci(i,"_",o,!0)):Pd(t,i)}else t&&Dd(e,t)},Am=(e,t,s)=>{let{vnode:i,slots:o}=e,r=!0,u=et;if(i.shapeFlag&32){let p=t._;p?s&&p===1?r=!1:Ad(o,t,s):(r=!t.$stable,Pd(t,o)),u=t}else t&&(Dd(e,t),u={default:1});if(r)for(let p in o)!ta(p)&&u[p]==null&&delete o[p]};function Im(){let e=[]}var Vt=qm;function Id(e){return Om(e)}function Om(e,t){Im();let s=is();s.__VUE__=!0;let{insert:i,remove:o,patchProp:r,createElement:u,createText:p,createComment:c,setText:v,setElementText:g,parentNode:y,nextSibling:m,setScopeId:b=Ot,insertStaticContent:E}=e,S=(D,A,U,Y=null,W=null,ee=null,le=void 0,se=null,ie=!!A.dynamicChildren)=>{if(D===A)return;D&&!gs(D,A)&&(Y=pe(D),Ee(D,W,ee,!0),D=null),A.patchFlag===-2&&(ie=!1,A.dynamicChildren=null),A.dynamicChildren&&D&&D.dynamicChildren&&D.dynamicChildren.hasOnce&&(A.dynamicChildren===Vn&&(A.dynamicChildren=[]),A.dynamicChildren.hasOnce=!0);let{type:te,ref:we,shapeFlag:ce}=A;switch(te){case Li:N(D,A,U,Y);break;case tn:w(D,A,U,Y);break;case ks:D==null&&T(A,U,Y,le);break;case V:G(D,A,U,Y,W,ee,le,se,ie);break;default:ce&1?oe(D,A,U,Y,W,ee,le,se,ie):ce&6?H(D,A,U,Y,W,ee,le,se,ie):(ce&64||ce&128)&&te.process(D,A,U,Y,W,ee,le,se,ie,me)}we!=null&&W?ys(we,D&&D.ref,ee,A||D,!A):we==null&&D&&D.ref!=null&&ys(D.ref,null,ee,D,!0)},N=(D,A,U,Y)=>{if(D==null)i(A.el=p(A.children),U,Y);else{let W=A.el=D.el;A.children!==D.children&&v(W,A.children)}},w=(D,A,U,Y)=>{D==null?i(A.el=c(A.children||""),U,Y):A.el=D.el},T=(D,A,U,Y)=>{[D.el,D.anchor]=E(D.children,A,U,Y,D.el,D.anchor)},M=(D,A,U,Y)=>{if(A.children!==D.children){let W=m(D.anchor);j(D),[A.el,A.anchor]=E(A.children,U,W,Y)}else A.el=D.el,A.anchor=D.anchor},F=({el:D,anchor:A},U,Y)=>{let W;for(;D&&D!==A;)W=m(D),i(D,U,Y),D=W;i(A,U,Y)},j=({el:D,anchor:A})=>{let U;for(;D&&D!==A;)U=m(D),o(D),D=U;o(A)},oe=(D,A,U,Y,W,ee,le,se,ie)=>{if(A.type==="svg"?le="svg":A.type==="math"&&(le="mathml"),D==null)_(A,U,Y,W,ee,le,se,ie);else{let te=D.el&&D.el._isVueCE?D.el:null;try{te&&te._beginPatch(),L(D,A,W,ee,le,se,ie)}finally{te&&te._endPatch()}}},_=(D,A,U,Y,W,ee,le,se)=>{let ie,te,{props:we,shapeFlag:ce,transition:Se,dirs:Te}=D;if(ie=D.el=u(D.type,ee,we&&we.is,we),ce&8?g(ie,D.children):ce&16&&I(D.children,ie,null,Y,W,Gr(D,ee),le,se),Te&&to(D,null,Y,"created"),z(ie,D,D.scopeId,le,Y),we){for(let Je in we)Je!=="value"&&!Do(Je)&&r(ie,Je,null,we[Je],ee,Y);"value"in we&&r(ie,"value",null,we.value,ee),(te=we.onVnodeBeforeMount)&&fn(te,Y,D)}Te&&to(D,null,Y,"beforeMount");let Le=Mm(W,Se);Le&&Se.beforeEnter(ie),i(ie,A,U),((te=we&&we.onVnodeMounted)||Le||Te)&&Vt(()=>{let je;te&&fn(te,Y,D),Le&&Se.enter(ie),Te&&to(D,null,Y,"mounted")},W)},z=(D,A,U,Y,W)=>{if(U&&b(D,U),Y)for(let ee=0;ee{for(let te=ie;te{let se=A.el=D.el,{patchFlag:ie,dynamicChildren:te,dirs:we}=A;ie|=D.patchFlag&16;let ce=D.props||et,Se=A.props||et,Te;if(U&&no(U,!1),(Te=Se.onVnodeBeforeUpdate)&&fn(Te,U,A,D),we&&to(A,D,U,"beforeUpdate"),U&&no(U,!0),te&&(!D.dynamicChildren||D.dynamicChildren.length!==te.length)&&(ie=0,le=!1,te=null),(ce.innerHTML&&Se.innerHTML==null||ce.textContent&&Se.textContent==null)&&g(se,""),te?k(D.dynamicChildren,te,se,U,Y,Gr(A,W),ee):le||he(D,A,se,null,U,Y,Gr(A,W),ee,!1),ie>0){if(ie&16)q(se,ce,Se,U,W);else if(ie&2&&ce.class!==Se.class&&r(se,"class",null,Se.class,W),ie&4&&r(se,"style",ce.style,Se.style,W),ie&8){let Le=A.dynamicProps;for(let Je=0;Je{Te&&fn(Te,U,A,D),we&&to(A,D,U,"updated")},Y)},k=(D,A,U,Y,W,ee,le)=>{for(let se=0;se{if(A!==U){if(A!==et)for(let ee in A)!Do(ee)&&!(ee in U)&&r(D,ee,A[ee],null,W,Y);for(let ee in U){if(Do(ee))continue;let le=U[ee],se=A[ee];le!==se&&ee!=="value"&&r(D,ee,se,le,W,Y)}"value"in U&&r(D,"value",A.value,U.value,W)}},G=(D,A,U,Y,W,ee,le,se,ie)=>{let te=A.el=D?D.el:p(""),we=A.anchor=D?D.anchor:p(""),{patchFlag:ce,dynamicChildren:Se,slotScopeIds:Te}=A;Te&&(se=se?se.concat(Te):Te),D==null?(i(te,U,Y),i(we,U,Y),I(A.children||[],U,we,W,ee,le,se,ie)):ce>0&&ce&64&&Se&&D.dynamicChildren&&D.dynamicChildren.length===Se.length?(k(D.dynamicChildren,Se,U,W,ee,le,se),(A.key!=null||W&&A===W.subTree)&&Od(D,A,!0)):he(D,A,U,we,W,ee,le,se,ie)},H=(D,A,U,Y,W,ee,le,se,ie)=>{A.slotScopeIds=se,D==null?A.shapeFlag&512?W.ctx.activate(A,U,Y,le,ie):K(A,U,Y,W,ee,le,ie):ne(D,A,ie)},K=(D,A,U,Y,W,ee,le)=>{let se=D.component=Bm(D,Y,W);if(Mi(D)&&(se.ctx.renderer=me),zm(se,!1,le),se.asyncDep){if(W&&W.registerDep(se,x,le,ee),!D.el){let ie=se.subTree=Me(tn);w(null,ie,A,U),D.placeholder=ie.el}}else x(se,D,A,U,W,ee,le)},ne=(D,A,U)=>{let Y=A.component=D.component;if(Sm(D,A,U))if(Y.asyncDep&&!Y.asyncResolved){A.el=D.el,A.placeholder=D.placeholder,fe(Y,A,U);return}else Y.next=A,Y.update();else A.el=D.el,A.placeholder=D.placeholder,Y.vnode=A},x=(D,A,U,Y,W,ee,le)=>{let se=()=>{if(D.isMounted){let{next:ce,bu:Se,u:Te,parent:Le,vnode:Je}=D;{let dt=Md(D);if(dt){ce&&(ce.el=Je.el,fe(D,ce,le)),dt.asyncDep.then(()=>{Vt(()=>{D.isUnmounted||te()},W)});return}}let je=ce,Ce;no(D,!1),ce?(ce.el=Je.el,fe(D,ce,le)):ce=Je,Se&&Ao(Se),(Ce=ce.props&&ce.props.onVnodeBeforeUpdate)&&fn(Ce,Le,ce,Je),no(D,!0);let $e=jr(D),it=D.subTree;D.subTree=$e,S(it,$e,y(it.el),pe(it),D,W,ee),ce.el=$e.el,je===null&&Em(D,$e.el),Te&&Vt(Te,W),(Ce=ce.props&&ce.props.onVnodeUpdated)&&Vt(()=>fn(Ce,Le,ce,Je),W)}else{let ce,{el:Se,props:Te}=A,{bm:Le,m:Je,parent:je,root:Ce,type:$e}=D,it=bs(A);if(no(D,!1),Le&&Ao(Le),!it&&(ce=Te&&Te.onVnodeBeforeMount)&&fn(ce,je,A),no(D,!0),Se&&Ve){let dt=()=>{D.subTree=jr(D),Ve(Se,D.subTree,D,W,null)};it&&$e.__asyncHydrate?$e.__asyncHydrate(Se,D,dt):dt()}else{Ce.ce&&Ce.ce._hasShadowRoot()&&Ce.ce._injectChildStyle($e,D.parent?D.parent.type:void 0);let dt=D.subTree=jr(D);S(null,dt,U,Y,D,W,ee),A.el=dt.el}if(Je&&Vt(Je,W),!it&&(ce=Te&&Te.onVnodeMounted)){let dt=A;Vt(()=>fn(ce,je,dt),W)}(A.shapeFlag&256||je&&bs(je.vnode)&&je.vnode.shapeFlag&256)&&D.a&&Vt(D.a,W),D.isMounted=!0,A=U=Y=null}};D.scope.on();let ie=D.effect=new Mo(se);D.scope.off();let te=D.update=ie.run.bind(ie),we=D.job=ie.runIfDirty.bind(ie);we.i=D,we.id=D.uid,ie.scheduler=()=>Zr(we),no(D,!0),te()},fe=(D,A,U)=>{A.component=D;let Y=D.vnode.props;D.vnode=A,D.next=null,Rm(D,A.props,Y,U),Am(D,A.children,U),Zt(),od(D),xt()},he=(D,A,U,Y,W,ee,le,se,ie=!1)=>{let te=D&&D.children,we=D?D.shapeFlag:0,ce=A.children,{patchFlag:Se,shapeFlag:Te}=A;if(Se>0){if(Se&128){He(te,ce,U,Y,W,ee,le,se,ie);return}else if(Se&256){Be(te,ce,U,Y,W,ee,le,se,ie);return}}Te&8?(we&16&&X(te,W,ee),ce!==te&&g(U,ce)):we&16?Te&16?He(te,ce,U,Y,W,ee,le,se,ie):X(te,W,ee,!0):(we&8&&g(U,""),Te&16&&I(ce,U,Y,W,ee,le,se,ie))},Be=(D,A,U,Y,W,ee,le,se,ie)=>{D=D||Vn,A=A||Vn;let te=D.length,we=A.length,ce=Math.min(te,we),Se;for(Se=0;Sewe?X(D,W,ee,!0,!1,ce):I(A,U,Y,W,ee,le,se,ie,ce)},He=(D,A,U,Y,W,ee,le,se,ie)=>{let te=0,we=A.length,ce=D.length-1,Se=we-1;for(;te<=ce&&te<=Se;){let Te=D[te],Le=A[te]=ie?En(A[te]):hn(A[te]);if(gs(Te,Le))S(Te,Le,U,null,W,ee,le,se,ie);else break;te++}for(;te<=ce&&te<=Se;){let Te=D[ce],Le=A[Se]=ie?En(A[Se]):hn(A[Se]);if(gs(Te,Le))S(Te,Le,U,null,W,ee,le,se,ie);else break;ce--,Se--}if(te>ce){if(te<=Se){let Te=Se+1,Le=TeSe)for(;te<=ce;)Ee(D[te],W,ee,!0),te++;else{let Te=te,Le=te,Je=new Map;for(te=Le;te<=Se;te++){let rt=A[te]=ie?En(A[te]):hn(A[te]);rt.key!=null&&Je.set(rt.key,te)}let je,Ce=0,$e=Se-Le+1,it=!1,dt=0,Pt=new Array($e);for(te=0;te<$e;te++)Pt[te]=0;for(te=Te;te<=ce;te++){let rt=D[te];if(Ce>=$e){Ee(rt,W,ee,!0);continue}let Ie;if(rt.key!=null)Ie=Je.get(rt.key);else for(je=Le;je<=Se;je++)if(Pt[je-Le]===0&&gs(rt,A[je])){Ie=je;break}Ie===void 0?Ee(rt,W,ee,!0):(Pt[Ie-Le]=te+1,Ie>=dt?dt=Ie:it=!0,S(rt,A[Ie],U,null,W,ee,le,se,ie),Ce++)}let wt=it?Vm(Pt):Vn;for(je=wt.length-1,te=$e-1;te>=0;te--){let rt=Le+te,Ie=A[rt],sn=A[rt+1],wo=rt+1{let{el:ee,type:le,transition:se,children:ie,shapeFlag:te}=D;if(te&6){Qe(D.component.subTree,A,U,Y);return}if(te&128){D.suspense.move(A,U,Y);return}if(te&64){le.move(D,A,U,me);return}if(le===V){i(ee,A,U);for(let ce=0;cese.enter(ee),W));else{let{leave:ce,delayLeave:Se,afterLeave:Te}=se,Le=()=>{D.ctx.isUnmounted?o(ee):i(ee,A,U)},Je=()=>{let je=ee._isLeaving||!!ee[zr];ee._isLeaving&&ee[zr](!0),se.persisted&&!je?Le():ce(ee,()=>{Le(),Te&&Te()})};Se?Se(ee,Le,Je):Je()}else i(ee,A,U)},Ee=(D,A,U,Y=!1,W=!1)=>{let{type:ee,props:le,ref:se,children:ie,dynamicChildren:te,shapeFlag:we,patchFlag:ce,dirs:Se,cacheIndex:Te,memo:Le}=D;if((ce===-2||te&&te.hasOnce)&&(W=!1),se!=null&&(Zt(),ys(se,null,U,D,!0),xt()),Te!=null&&(!D.ctx||D.ctx===A)&&(A.renderCache[Te]=void 0),we&256){A.ctx.deactivate(D);return}let Je=we&1&&Se,je=!bs(D),Ce;if(je&&(Ce=le&&le.onVnodeBeforeUnmount)&&fn(Ce,A,D),we&6)qe(D.component,U,Y);else{if(we&128){D.suspense.unmount(U,Y);return}Je&&to(D,null,A,"beforeUnmount"),we&64?D.type.remove(D,A,U,me,Y):te&&!te.hasOnce&&(ee!==V||ce>0&&ce&64)?X(te,A,U,!1,!0):(ee===V&&ce&384||!W&&we&16)&&X(ie,A,U),Y&&tt(D)}let $e=Le!=null&&Te==null;(je&&(Ce=le&&le.onVnodeUnmounted)||Je||$e)&&Vt(()=>{Ce&&fn(Ce,A,D),Je&&to(D,null,A,"unmounted"),$e&&(D.el=null)},U)},tt=D=>{let{type:A,el:U,anchor:Y,transition:W}=D,ee=A===V;if(ee&&!W){Ne(U,Y);return}if(A===ks){j(D),W&&!W.persisted&&W.afterLeave&&W.afterLeave();return}let le=ee?Wr(D):D,se=()=>{ee?y(U)&&Ne(U,Y):o(U),W&&!W.persisted&&W.afterLeave&&W.afterLeave()};if(le&&le.shapeFlag&1&&W&&!W.persisted){let{leave:ie,delayLeave:te}=W,we=le.el,ce=()=>ie(we,se);te?te(we,se,ce):ce()}else se()},Ne=(D,A)=>{let U;for(;D!==A;)U=m(D),o(D),D=U;o(A)},qe=(D,A,U)=>{let{bum:Y,scope:W,job:ee,subTree:le,um:se,m:ie,a:te}=D;Jl(ie),Jl(te),Y&&Ao(Y),W.stop(),ee?(ee.flags|=8,Ee(le,D,A,U)):D.vnode.el&&le&&(le.transition=D.vnode.transition,Ee(le,D,A,U)),se&&Vt(se,A),Vt(()=>{D.isUnmounted=!0},A)},X=(D,A,U,Y=!1,W=!1,ee=0)=>{for(let le=ee;le{if(D.shapeFlag&6)return pe(D.component.subTree);if(D.shapeFlag&128)return D.suspense.next();let A=m(D.anchor||D.el),U=A&&A[xf];return U?m(U):A},ue=(D,A,U)=>{let Y=D&&A._vnode?void 0:D&&D.component?D.component.uid:Um();Yf(()=>{D==null?A._vnode&&Ee(A._vnode,null,null,!0):S(A._vnode||null,D,A,null,null,null,U),A._vnode=D},Y)},me={p:S,um:Ee,m:Qe,r:tt,mt:K,mc:I,pc:he,pbc:k,n:pe,o:e},be,Ve;return t&&([be,Ve]=t(me)),{render:ue,hydrate:be,createApp:vm(ue,be)}}function Gr({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function no({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Mm(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Od(e,t,s=!1){let i=e.children,o=t.children;if(Re(i)&&Re(o))for(let r=0;r>1,e[s[p]]0&&(t[i]=s[r-1]),s[r]=i)}}for(r=s.length,u=s[r-1];r-- >0;)s[r]=u,u=t[u];return s}function Md(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Md(t)}function Jl(e){if(e)for(let t=0;te.__isSuspense;function qm(e,t){t&&t.pendingBranch?Re(e)?t.effects.push(...e):t.effects.push(e):nd(e)}var V=Symbol.for("v-fgt"),Li=Symbol.for("v-txt"),tn=Symbol.for("v-cmt"),ks=Symbol.for("v-stc"),oo=[],Ut=null;function a(e=!1){oo.push(Ut=e?null:[])}function qd(){oo.pop(),Ut=oo[oo.length-1]||null}var Es=1;function Di(e,t=!1){Es+=e,e<0&&Ut&&t&&(Ut.hasOnce=!0)}function Ld(e){return e.dynamicChildren=Es>0?Ut||Vn:null,qd(),Es>0&&Ut&&Ut.push(e),e}function l(e,t,s,i,o,r){return Ld(n(e,t,s,i,o,r,!0))}function Wt(e,t,s,i,o){return Ld(Me(e,t,s,i,o,!0))}function Ns(e){return e?e.__v_isVNode===!0:!1}function gs(e,t){return e.type===t.type&&e.key===t.key}var $d=({key:e})=>e??null,Ei=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?lt(e)||yt(e)||Oe(e)?{i:Ft,r:e,k:t,f:!!s}:e:null);function n(e,t=null,s=null,i=0,o=null,r=e===V?0:1,u=!1,p=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$d(t),ref:t&&Ei(t),scopeId:rd,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ft};return p?(Ai(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=lt(s)?8:16),Es>0&&!u&&Ut&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Ut.push(c),c}var Me=Lm;function Lm(e,t=null,s=null,i=0,o=null,r=!1){if((!e||e===dm)&&(e=tn),Ns(e)){let p=Lo(e,t,!0);return s&&Ai(p,s),Es>0&&!r&&Ut&&(p.shapeFlag&6?Ut[Ut.indexOf(e)]=p:Ut.push(p)),p.patchFlag=-2,p}if(Km(e)&&(e=e.__vccOpts),t){t=$m(t);let{class:p,style:c}=t;p&&!lt(p)&&(t.class=R(p)),Xe(c)&&(hs(c)&&!Re(c)&&(c=ft({},c)),t.style=Ae(c))}let u=lt(e)?1:Vd(e)?128:Oi(e)?64:Xe(e)?4:Oe(e)?2:0;return n(e,t,s,i,o,u,r,!0)}function $m(e){return e?hs(e)||Nd(e)?ft({},e):e:null}function Lo(e,t,s=!1,i=!1){let{props:o,ref:r,patchFlag:u,children:p,transition:c}=e,v=t?_m(o||{},t):o,g={__v_isVNode:!0,__v_skip:!0,type:e.type,props:v,key:v&&$d(v),ref:t&&t.ref?s&&r?Re(r)?r.concat(Ei(t)):[r,Ei(t)]:Ei(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:p,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==V?u===-1?16:u|16:u,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Lo(e.ssContent),ssFallback:e.ssFallback&&Lo(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&i&&Ss(g,c.clone(g)),g}function h(e=" ",t=0){return Me(Li,null,e,t)}function ke(e,t){let s=Me(ks,null,e);return s.staticCount=t,s}function f(e="",t=!1){return t?(a(),Wt(tn,null,e)):Me(tn,null,e)}function hn(e){return e==null||typeof e=="boolean"?Me(tn):Re(e)?Me(V,null,e.slice()):Ns(e)?En(e):Me(Li,null,String(e))}function En(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Lo(e)}function Ai(e,t){let s=0,{shapeFlag:i}=e;if(t==null)t=null;else if(Re(t))s=16;else if(typeof t=="object")if(i&65){let o=t.default;o&&(o._c&&(o._d=!1),Ai(e,o()),o._c&&(o._d=!0));return}else{s=32;let o=t._;!o&&!Nd(t)?t._ctx=Ft:o===3&&Ft&&(Ft.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Oe(t)){if(i&65){Ai(e,{default:t});return}t={default:t,_ctx:Ft},s=32}else t=String(t),i&64?(s=16,t=[h(t)]):s=8;e.children=t,e.shapeFlag|=s}function _m(...e){let t={};for(let s=0;sEt||Ft,Ii,Rs;{let e=is(),t=(s,i)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(i),r=>{o.length>1?o.forEach(u=>u(r)):o[0](r)}};Ii=t("__VUE_INSTANCE_SETTERS__",s=>Et=s),Rs=t("__VUE_SSR_SETTERS__",s=>$o=s)}var Is=e=>{let t=Et;return Ii(e),e.scope.on(),()=>{e.scope.off(),Ii(t)}},Xl=()=>{Et&&Et.scope.off(),Ii(null)};function Fd(e){return e.vnode.shapeFlag&4}var $o=!1;function zm(e,t=!1,s=!1){t&&Rs(t);let{props:i,children:o}=e.vnode,r=Fd(e);Nm(e,i,r,t),Dm(e,o,s||t);let u=r?Hm(e,t):void 0;return t&&Rs(!1),u}function Hm(e,t){let s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,um);let{setup:i}=s;if(i){Zt();let o=e.setupContext=i.length>1?Gm(e):null,r=Is(e),u=Ts(i,e,0,[e.props,o]),p=Sr(u);if(xt(),r(),(p||e.sp)&&!bs(e)&&xr(e),p){if(u.then(Xl,Xl),t)return u.then(c=>{Rs(!0);try{Ql(e,c,t)}finally{Rs(!1)}}).catch(c=>{Ps(c,e,0)});e.asyncDep=u}else Ql(e,u,t)}else Ud(e,t)}function Ql(e,t,s){Oe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Xe(t)&&(e.setupState=Ci(t)),Ud(e,s)}var Zl,xl;function Ud(e,t,s){let i=e.type;if(!e.render){if(!t&&Zl&&!i.render){let o=i.template||ea(e).template;if(o){let{isCustomElement:r,compilerOptions:u}=e.appContext.config,{delimiters:p,compilerOptions:c}=i,v=ft(ft({isCustomElement:r,delimiters:p},u),c);i.render=Zl(o,v)}}e.render=i.render||Ot,xl&&xl(e)}{let o=Is(e);Zt();try{cm(e)}finally{xt(),o()}}}var jm={get(e,t){return Ct(e,"get",""),e[t]}};function Gm(e){let t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,jm),slots:e.slots,emit:e.emit,expose:t}}function $i(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ci(pn(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in ws)return ws[s](e)},has(t,s){return s in t||s in ws}})):e.proxy}function Wm(e,t=!0){return Oe(e)?e.displayName||e.name:e.name||t&&e.__name}function Km(e){return Oe(e)&&"__vccOpts"in e}var Nt=(e,t)=>Ll(e,t,$o);function De(e,t,s){try{Di(-1);let i=arguments.length;return i===2?Xe(t)&&!Re(t)?Ns(t)?Me(e,null,[t]):Me(e,t):Me(e,null,t):(i>3?s=Array.prototype.slice.call(arguments,2):i===3&&Ns(s)&&(s=[s]),Me(e,t,s))}finally{Di(1)}}var Ym="3.5.44";var aa,Bd=typeof window<"u"&&window.trustedTypes;if(Bd)try{aa=Bd.createPolicy("vue",{createHTML:e=>e})}catch{}var xd=aa?e=>aa.createHTML(e):e=>e,Jm="http://www.w3.org/2000/svg",Xm="http://www.w3.org/1998/Math/MathML",Rn=typeof document<"u"?document:null,zd=Rn&&Rn.createElement("template"),Qm={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,i)=>{let o=t==="svg"?Rn.createElementNS(Jm,e):t==="mathml"?Rn.createElementNS(Xm,e):s?Rn.createElement(e,{is:s}):Rn.createElement(e);return e==="select"&&i&&i.multiple!=null&&o.setAttribute("multiple",i.multiple),o},createText:e=>Rn.createTextNode(e),createComment:e=>Rn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Rn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,i,o,r){let u=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{zd.innerHTML=xd(i==="svg"?`${e}`:i==="mathml"?`${e}`:e);let p=zd.content;if(i==="svg"||i==="mathml"){let c=p.firstChild;for(;c.firstChild;)p.appendChild(c.firstChild);p.removeChild(c)}t.insertBefore(p,s)}return[u?u.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}};var Zm=Symbol("_vtc");function xm(e,t,s){let i=e[Zm];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}var Ui=Symbol("_vod"),eu=Symbol("_vsh"),Z={name:"show",beforeMount(e,{value:t},{transition:s}){e[Ui]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Os(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:i}){!t!=!s&&(i?t?(i.beforeEnter(e),Os(e,!0),i.enter(e)):i.leave(e,()=>{Os(e,!1)}):Os(e,t))},beforeUnmount(e,{value:t}){Os(e,t)}};function Os(e,t){e.style.display=t?e[Ui]:"none",e[eu]=!t}var eh=Symbol("");var th=/(?:^|;)\s*display\s*:/;function nh(e,t,s){let i=e.style,o=lt(s),r=!1;if(s&&!o){if(t)if(lt(t))for(let u of t.split(";")){let p=u.slice(0,u.indexOf(":")).trim();s[p]==null&&Ms(i,p,"")}else for(let u in t)s[u]==null&&Ms(i,u,"");for(let u in s){u==="display"&&(r=!0);let p=s[u];p!=null?sh(e,u,!lt(t)&&t?t[u]:void 0,p)||Ms(i,u,p):Ms(i,u,"")}}else if(o){if(t!==s){let u=i[eh];u&&(s+=";"+u),i.cssText=s,r=th.test(s)}}else t&&e.removeAttribute("style");Ui in e&&((!o||t!==s)&&(e[Ui]=r?i.display:""),e[eu]&&(i.display="none"))}var _i=/\s*!important$/;function Ms(e,t,s){if(Re(s))s.forEach(i=>Ms(e,t,i));else if(s==null&&(s=""),t.startsWith("--"))_i.test(s)?e.setProperty(t,s.replace(_i,""),"important"):e.setProperty(t,s);else{let i=oh(e,t);_i.test(s)?e.setProperty(an(i),s.replace(_i,""),"important"):e[i]=s}}var Hd=["Webkit","Moz","ms"],sa={};function oh(e,t){let s=sa[t];if(s)return s;let i=mt(t);if(i!=="filter"&&i in e)return sa[t]=i;i=Qn(i);for(let o=0;oia||(uh.then(()=>ia=0),ia=Date.now());function ph(e,t){let s=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=s.attached)return;let o=s.value;if(Re(o)){let r=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{r.call(i),i._stopped=!0};let u=o.slice(),p=[i];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,fh=(e,t,s,i,o,r)=>{let u=o==="svg";t==="class"?xm(e,i,u):t==="style"?nh(e,s,i):To(t)?Po(t)||rh(e,t,s,i,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):mh(e,t,i,u))?(Wd(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Gd(e,t,i,u,r,t!=="value")):e._isVueCE&&(hh(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!lt(i)))?Wd(e,mt(t),i,r,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),Gd(e,t,i,u))};function mh(e,t,s,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&Yd(t)&&Oe(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){let o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Yd(t)&<(s)?!1:t in e}function hh(e,t){let s=e._def.props;if(!s)return!1;let i=mt(t);return Array.isArray(s)?s.some(o=>mt(o)===i):Object.keys(s).some(o=>mt(o)===i)}var _o=e=>{let t=e.props["onUpdate:modelValue"]||!1;return Re(t)?s=>Ao(t,s):t};function gh(e){e.target.composing=!0}function Jd(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var vn=Symbol("_assign"),Fi=Symbol("_initialValue");function ra(e,t,s){return t&&(e=e.trim()),s&&(e=Io(e)),e}var ot={created(e,{modifiers:{lazy:t,trim:s,number:i}},o){e.parentNode&&(e.type==="text"?e[Fi]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Fi]=e.defaultValue.replace(/\r\n?/g,` +"use strict";(()=>{var il=Object.defineProperty;var rl=e=>{throw TypeError(e)};var pf=(e,t,s)=>t in e?il(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var ff=(e,t)=>{for(var s in t)il(e,s,{get:t[s],enumerable:!0})};var nt=(e,t,s)=>pf(e,typeof t!="symbol"?t+"":t,s),wr=(e,t,s)=>t.has(e)||rl("Cannot "+s);var re=(e,t,s)=>(wr(e,t,"read from private field"),s?s.call(e):t.get(e)),_e=(e,t,s)=>t.has(e)?rl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),ze=(e,t,s,i)=>(wr(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),Fe=(e,t,s)=>(wr(e,t,"access private method"),s);var al=(e,t,s,i)=>({set _(o){ze(e,t,o,s)},get _(){return re(e,t,i)}});var ge=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var ve={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 ll(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 dl(e,t){let{http:s,promises:i,window:o}=t,r=t.takeReviewHandoff(),u=r?{clientId:r.clientId,intentId:r.intentId}:null,p,c,v,g,y,m=!0,b,E=i.defer(),S=()=>[...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=()=>m&&e.user?.username===y;function w(){m=!1,r=p=c=void 0,E.resolve(),o.clearTimeout(b)}e.on("dispose",w),e.on("routeLeave",w),e.watch(()=>e.user?.username,F=>{!y&&F?y=F:y&&F!==y&&(w(),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 T=()=>({timeout:E.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":c}}),M=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(!m||!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),g||(g=S());try{let j=(await s.get("/api/review-consent/csrf",{timeout:E.promise})).data;if(!N())return;if(c=j.csrf,e.handoffEnabled=j.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(c||""))throw new Error("invalid_csrf");let oe=(await s.post("/api/review-consent/preview",{repositoryId:F,intent:{...r,requestId:g}},T())).data;if(!N())return;if(!oe||typeof oe.ticket!="string"||!oe.ticket||oe.ticket.length>8192||typeof oe.repositoryName!="string"||!["restricted-review","anonymous-link"].includes(oe.policy?.access)||!Number.isSafeInteger(oe.policy.version)||!Number.isFinite(Date.parse(oe.policy.retainUntil))||!Number.isFinite(Date.parse(oe.expiresAt))||Date.parse(oe.expiresAt)<=Date.now()||Date.parse(oe.expiresAt)>Date.now()+6e5)throw new Error("invalid_preview");p=oe.ticket,v=S(),e.preview={repositoryName:oe.repositoryName,policy:{...oe.policy},expiresAt:oe.expiresAt},b=o.setTimeout(()=>{m&&(e.expired=!0)},Math.max(0,Date.parse(oe.expiresAt)-Date.now()))}catch(j){N()&&(e.error=M(j))}finally{N()&&(e.busy=!1)}},e.confirmConsent=async()=>{if(!(!N()||e.busy||e.saved||!p||!e.acceptAccess||!e.acceptRetention)){if(Date.parse(e.preview.expiresAt)<=Date.now()){e.expired=!0;return}e.busy=!0,e.error="";try{let F=(await s.post("/api/review-consent/confirm",{ticket:p,requestId:v,acceptAccess:!0,acceptRetention:!0},T())).data;if(!N())return;if(F?.requestId!==v||!Number.isFinite(Date.parse(F.confirmedAt)))throw new Error("invalid_receipt");e.saved=!0,e.uncertain=!1,r=void 0,e.handoffEnabled||(p=void 0)}catch{N()&&(e.uncertain=!0,e.error="The confirmation was not verified. Retry with the same approval, or return to your submission to check its status.")}finally{N()&&(e.busy=!1)}}},e.continueReview=async()=>{if(!N()||e.busy||!e.saved||!e.handoffEnabled||!p||!u)return;e.busy=!0,e.error="";let F,j=()=>{F?.remove(),o.removeEventListener("securitypolicyviolation",oe)},oe=_=>{_.violatedDirective?.startsWith("form-action")&&(j(),N()&&(e.busy=!1,e.error="The return address was blocked. Return to your submission to check the artifact status."))};try{let _=(await s.post("/api/review-consent/handoff",{ticket:p},T())).data;if(!N())return;let B=_?.completion,I=new URL(_?.callbackUrl);if(!B||Object.keys(B).sort().join(",")!=="clientId,code,contract,expiresAt,intentId"||B.contract!=="4open.artifacts/1"||B.clientId!==u.clientId||B.intentId!==u.intentId||!/^[a-f0-9]{64}$/.test(B.code||"")||!Number.isFinite(Date.parse(B.expiresAt))||Date.parse(B.expiresAt)<=Date.now()||Date.parse(B.expiresAt)>Date.now()+3e5||I.protocol!=="https:"||I.href!==_.callbackUrl||I.username||I.password||_.callbackUrl.includes("?")||_.callbackUrl.includes("#"))throw new Error("invalid_handoff");F=o.document.createElement("form"),F.method="POST",F.action=I.href;let L=o.document.createElement("input");L.type="hidden",L.name="completion",L.value=JSON.stringify(B),F.appendChild(L),o.document.body.appendChild(F),o.addEventListener("securitypolicyviolation",oe),e.on("dispose",j),F.submit()}catch{j(),N()&&(e.busy=!1,e.error="The return to review could not be prepared. Retry from this page, or return to your submission to check its status.")}}}var ri=new Map,gf=ve;function Xn(e){if(!ri.has(e)){let t=document.createElement("script");t.src=gf[e];let s=new Promise((i,o)=>{t.onload=i,t.onerror=()=>{ri.delete(e),t.remove(),o(new Error(`Unable to load ${e}. Please retry.`))}});ri.set(e,s),document.head.appendChild(t)}return ri.get(e)}async function ai(){await Xn("editor"),ace.config.set("basePath","/script/external/ace/")}function Ro(e){let t=Object.create(null);for(let s of e.split(","))t[s]=1;return s=>s in t}var et={},Vn=[],Ot=()=>{},Cr=()=>!1,To=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Po=e=>e.startsWith("onUpdate:"),ft=Object.assign,ns=(e,t)=>{let s=e.indexOf(t);s>-1&&e.splice(s,1)},vf=Object.prototype.hasOwnProperty,Ke=(e,t)=>vf.call(e,t),Re=Array.isArray,wn=e=>os(e)==="[object Map]",Jt=e=>os(e)==="[object Set]",ul=e=>os(e)==="[object Date]";var Oe=e=>typeof e=="function",lt=e=>typeof e=="string",$t=e=>typeof e=="symbol",Xe=e=>e!==null&&typeof e=="object",Sr=e=>(Xe(e)||Oe(e))&&Oe(e.then)&&Oe(e.catch),ml=Object.prototype.toString,os=e=>ml.call(e),Er=e=>os(e).slice(8,-1),li=e=>os(e)==="[object Object]",di=e=>lt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Do=Ro(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var ui=e=>{let t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},yf=/-\w/g,mt=ui(e=>e.replace(yf,t=>t.slice(1).toUpperCase())),bf=/\B([A-Z])/g,an=ui(e=>e.replace(bf,"-$1").toLowerCase()),Qn=ui(e=>e.charAt(0).toUpperCase()+e.slice(1)),ss=ui(e=>e?`on${Qn(e)}`:""),Ht=(e,t)=>!Object.is(e,t),Ao=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:s})},Io=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var cl,is=()=>cl||(cl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ae(e){if(Re(e)){let t={};for(let s=0;ss.startsWith("/*")?"":s).split(wf).forEach(s=>{if(s){let i=s.split(kf);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function R(e){let t="";if(lt(e))t=e;else if(Re(e))for(let s=0;sXt(s,t))}var vl=e=>!!(e&&e.__v_isRef===!0),d=e=>lt(e)?e:e==null?"":Re(e)||Xe(e)&&(e.toString===ml||!Oe(e.toString))?vl(e)?d(e.value):JSON.stringify(e,yl,2):String(e),yl=(e,t)=>vl(t)?yl(e,t.value):wn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[i,o],r)=>(s[kr(i,r)+" =>"]=o,s),{})}:Jt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>kr(s))}:$t(t)?kr(t):Xe(t)&&!Re(t)&&!li(t)?String(t):t,kr=(e,t="")=>{var s;return $t(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};function Tf(e,...t){console.warn(`[Vue warn] ${e}`,...t)}var ht,ds=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ht&&(ht.active?(this.parent=ht,this.index=(ht.scopes||(ht.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes){let i=this.scopes.slice();for(t=0,s=i.length;t0&&--this._on===0){if(ht===this)ht=this.prevScope;else{let t=ht;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,i;for(s=0,i=this.effects.length;s0)return;if(ls){let t=ls;for(ls=void 0;t;){let s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;as;){let t=as;for(as=void 0;t;){let s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=s}}if(e)throw e}function Nl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Rl(e){let t,s=e.depsTail,i=s;for(;i;){let o=i.prevDep;i.version===-1?(i===s&&(s=o),_r(i),Pf(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=o}e.deps=t,e.depsTail=s}function Pr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Tl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Tl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===us)||(e.globalVersion=us,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Pr(e))))return;e.flags|=2;let t=e.dep,s=st,i=Qt;st=e,Qt=!0;try{Nl(e);let o=e.fn(e._value);(t.version===0||Ht(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{st=s,Qt=i,Rl(e),e.flags&=-3}}function _r(e,t=!1){let{dep:s,prevSub:i,nextSub:o}=e;if(i&&(i.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=i,e.nextSub=void 0),s.subs===e&&(s.subs=i,!i&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)_r(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Pf(e){let{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}var Qt=!0,Pl=[];function Zt(){Pl.push(Qt),Qt=!1}function xt(){let e=Pl.pop();Qt=e===void 0?!0:e}function bl(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let s=st;st=void 0;try{t()}finally{st=s}}}var us=0,Dr=class{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},cs=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!st||!Qt||st===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==st)s=this.activeLink=new Dr(st,this),st.deps?(s.prevDep=st.depsTail,st.depsTail.nextDep=s,st.depsTail=s):st.deps=st.depsTail=s,Dl(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){let i=s.nextDep;i.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=i),s.prevDep=st.depsTail,s.nextDep=void 0,st.depsTail.nextDep=s,st.depsTail=s,st.deps===s&&(st.deps=i)}return s}trigger(t){this.version++,us++,this.notify(t)}notify(t){Lr();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{$r()}}};function Dl(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)Dl(i)}let s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}var Ar=new WeakMap,xn=Symbol(""),Ir=Symbol(""),ps=Symbol("");function Ct(e,t,s){if(Qt&&st){let i=Ar.get(e);i||Ar.set(e,i=new Map);let o=i.get(s);o||(i.set(s,o=new cs),o.map=i,o.key=s),o.track()}}function dn(e,t,s,i,o,r){let u=Ar.get(e);if(!u){us++;return}let p=c=>{c&&c.trigger()};if(Lr(),t==="clear")u.forEach(p);else{let c=Re(e),v=c&&di(s);if(c&&s==="length"){let g=Number(i);u.forEach((y,m)=>{(m==="length"||m===ps||!$t(m)&&m>=g)&&p(y)})}else switch((s!==void 0||u.has(void 0))&&p(u.get(s)),v&&p(u.get(ps)),t){case"add":c?v&&p(u.get("length")):(p(u.get(xn)),wn(e)&&p(u.get(Ir)));break;case"delete":c||(p(u.get(xn)),wn(e)&&p(u.get(Ir)));break;case"set":wn(e)&&p(u.get(xn));break}}$r()}function Oo(e){let t=Ye(e);return t===e||(Ct(t,"iterate",ps),Mt(e))?t:jt(e)?cn(e)?t.map(s=>Cn(_t(s))):t.map(Cn):t.map(_t)}function fs(e){return Ct(e=Ye(e),"iterate",ps),e}function ln(e,t){return jt(e)?Cn(cn(e)?_t(t):t):_t(t)}var Df={__proto__:null,[Symbol.iterator](){return Rr(this,Symbol.iterator,e=>ln(this,e))},concat(...e){return Oo(this).concat(...e.map(t=>Re(t)?Oo(t):t))},entries(){return Rr(this,"entries",e=>(e[1]=ln(this,e[1]),e))},every(e,t){return kn(this,"every",e,t,void 0,arguments)},filter(e,t){return kn(this,"filter",e,t,s=>s.map(i=>ln(this,i)),arguments)},find(e,t){return kn(this,"find",e,t,s=>ln(this,s),arguments)},findIndex(e,t){return kn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return kn(this,"findLast",e,t,s=>ln(this,s),arguments)},findLastIndex(e,t){return kn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return kn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Tr(this,"includes",e)},indexOf(...e){return Tr(this,"indexOf",e)},join(e){return Oo(this).join(e)},lastIndexOf(...e){return Tr(this,"lastIndexOf",e)},map(e,t){return kn(this,"map",e,t,void 0,arguments)},pop(){return rs(this,"pop")},push(...e){return rs(this,"push",e)},reduce(e,...t){return kl(this,"reduce",e,t)},reduceRight(e,...t){return kl(this,"reduceRight",e,t)},shift(){return rs(this,"shift")},some(e,t){return kn(this,"some",e,t,void 0,arguments)},splice(...e){return rs(this,"splice",e)},toReversed(){return Oo(this).toReversed()},toSorted(e){return Oo(this).toSorted(e)},toSpliced(...e){return Oo(this).toSpliced(...e)},unshift(...e){return rs(this,"unshift",e)},values(){return Rr(this,"values",e=>ln(this,e))}};function Rr(e,t,s){let i=fs(e),o=i[t],r=o.call(i);if(i!==e&&!Mt(e)){if(r[Symbol.toStringTag]==="Array Iterator"){let u=Object.create(Object.getPrototypeOf(r));return u.next=()=>wl(r.next(),s),o!==Al[t]&&Object.defineProperties(u,{return:{get(){let p=r.return;return typeof p=="function"?p.bind(r):p}},throw:{get(){let p=r.throw;return typeof p=="function"?p.bind(r):p}}}),u}r._next=r.next,r.next=()=>wl(r._next(),s)}return r}function wl(e,t){return e.done||(e.value=t(e.value)),e}var Al=Array.prototype;function kn(e,t,s,i,o,r){let u=fs(e),p=u!==e&&!Mt(e),c=u[t];if(c!==Al[t]){let y=c.apply(e,r);return p?_t(y):y}let v=s;u!==e&&(p?v=function(y,m){return s.call(this,ln(e,y),m,e)}:s.length>2&&(v=function(y,m){return s.call(this,y,m,e)}));let g=c.call(u,v,i);return p&&o?o(g):g}function kl(e,t,s,i){let o=fs(e),r=o!==e&&!Mt(e),u=s,p=!1;o!==e&&(r?(p=i.length===0,u=function(v,g,y){return p&&(p=!1,v=ln(e,v)),s.call(this,v,ln(e,g),y,e)}):s.length>3&&(u=function(v,g,y){return s.call(this,v,g,y,e)}));let c=o[t](u,...i);return p?ln(e,c):c}function Tr(e,t,s){let i=Ye(e);Ct(i,"iterate",ps);let o=i[t](...s);return(o===-1||o===!1)&&hs(s[0])?(s[0]=Ye(s[0]),i[t](...s)):o}function rs(e,t,s=[]){Zt(),Lr();let i=Ye(e)[t].apply(e,s);return $r(),xt(),i}var Af=Ro("__proto__,__v_isRef,__isVue"),Il=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter($t));function If(e){$t(e)||(e=String(e));let t=Ye(this);return Ct(t,"has",e),t.hasOwnProperty(e)}var vi=class{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,i){if(s==="__v_skip")return t.__v_skip;let o=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return i===(o?r?Uf:Vl:r?Ml:Ol).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;let u=Re(t);if(!o){let c;if(u&&(c=Df[s]))return c;if(s==="hasOwnProperty")return If}let p=Reflect.get(t,s,yt(t)?t:i);if(($t(s)?Il.has(s):Af(s))||(o||Ct(t,"get",s),r))return p;if(yt(p)){let c=u&&di(s)?p:p.value;return o&&Xe(c)?bi(c):c}return Xe(p)?o?bi(p):at(p):p}},yi=class extends vi{constructor(t=!1){super(!1,t)}set(t,s,i,o){let r=t[s],u=Re(t)&&di(s);if(!this._isShallow){let v=jt(r);if(!Mt(i)&&!jt(i)&&(r=Ye(r),i=Ye(i)),!u&&yt(r)&&!yt(i))return v||(r.value=i),!0}let p=u?Number(s)e,mi=e=>Reflect.getPrototypeOf(e);function qf(e,t,s){return function(...i){let o=this.__v_raw,r=Ye(o),u=wn(r),p=e==="entries"||e===Symbol.iterator&&u,c=e==="keys"&&u,v=o[e](...i),g=s?Mr:t?Cn:_t;return!t&&Ct(r,"iterate",c?Ir:xn),ft(Object.create(v),{next(){let{value:y,done:m}=v.next();return m?{value:y,done:m}:{value:p?[g(y[0]),g(y[1])]:g(y),done:m}}})}}function hi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Lf(e,t){let s={get(o){let r=this.__v_raw,u=Ye(r),p=Ye(o);e||(Ht(o,p)&&Ct(u,"get",o),Ct(u,"get",p));let{has:c}=mi(u),v=t?Mr:e?Cn:_t;if(c.call(u,o))return v(r.get(o));if(c.call(u,p))return v(r.get(p));r!==u&&r.get(o)},get size(){let o=this.__v_raw;return!e&&Ct(Ye(o),"iterate",xn),o.size},has(o){let r=this.__v_raw,u=Ye(r),p=Ye(o);return e||(Ht(o,p)&&Ct(u,"has",o),Ct(u,"has",p)),o===p?r.has(o):r.has(o)||r.has(p)},forEach(o,r){let u=this,p=u.__v_raw,c=Ye(p),v=t?Mr:e?Cn:_t;return!e&&Ct(c,"iterate",xn),p.forEach((g,y)=>o.call(r,v(g),v(y),u))}};return ft(s,e?{add:hi("add"),set:hi("set"),delete:hi("delete"),clear:hi("clear")}:{add(o){let r=Ye(this),u=mi(r),p=Ye(o),c=!t&&!Mt(o)&&!jt(o)?p:o;return u.has.call(r,c)||Ht(o,c)&&u.has.call(r,o)||Ht(p,c)&&u.has.call(r,p)||(r.add(c),dn(r,"add",c,c)),this},set(o,r){!t&&!Mt(r)&&!jt(r)&&(r=Ye(r));let u=Ye(this),{has:p,get:c}=mi(u),v=p.call(u,o);v||(o=Ye(o),v=p.call(u,o));let g=c.call(u,o);return u.set(o,r),v?Ht(r,g)&&dn(u,"set",o,r,g):dn(u,"add",o,r),this},delete(o){let r=Ye(this),{has:u,get:p}=mi(r),c=u.call(r,o);c||(o=Ye(o),c=u.call(r,o));let v=p?p.call(r,o):void 0,g=r.delete(o);return c&&dn(r,"delete",o,void 0,v),g},clear(){let o=Ye(this),r=o.size!==0,u=void 0,p=o.clear();return r&&dn(o,"clear",void 0,void 0,u),p}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=qf(o,e,t)}),s}function Fr(e,t){let s=Lf(e,t);return(i,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?i:Reflect.get(Ke(s,o)&&o in i?s:i,o,r)}var $f={get:Fr(!1,!1)},_f={get:Fr(!1,!0)},Ff={get:Fr(!0,!1)};var Ol=new WeakMap,Ml=new WeakMap,Vl=new WeakMap,Uf=new WeakMap;function Bf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function at(e){return jt(e)?e:Ur(e,!1,Of,$f,Ol)}function ms(e){return Ur(e,!1,Vf,_f,Ml)}function bi(e){return Ur(e,!0,Mf,Ff,Vl)}function Ur(e,t,s,i,o){if(!Xe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let r=o.get(e);if(r)return r;let u=Bf(Er(e));if(u===0)return e;let p=new Proxy(e,u===2?i:s);return o.set(e,p),p}function cn(e){return jt(e)?cn(e.__v_raw):!!(e&&e.__v_isReactive)}function jt(e){return!!(e&&e.__v_isReadonly)}function Mt(e){return!!(e&&e.__v_isShallow)}function hs(e){return e?!!e.__v_raw:!1}function Ye(e){let t=e&&e.__v_raw;return t?Ye(t):e}function pn(e){return!Ke(e,"__v_skip")&&Object.isExtensible(e)&&ci(e,"__v_skip",!0),e}var _t=e=>Xe(e)?at(e):e,Cn=e=>Xe(e)?bi(e):e;function yt(e){return e?e.__v_isRef===!0:!1}function St(e){return ql(e,!1)}function ki(e){return ql(e,!0)}function ql(e,t){return yt(e)?e:new Vr(e,t)}var Vr=class{constructor(t,s){this.dep=new cs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:Ye(t),this._value=s?t:_t(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){let s=this._rawValue,i=this.__v_isShallow||Mt(t)||jt(t);t=i?t:Ye(t),Ht(t,s)&&(this._rawValue=t,this._value=i?t:_t(t),this.dep.trigger())}};function Sn(e){return yt(e)?e.value:e}var zf={get:(e,t,s)=>t==="__v_raw"?e:Sn(Reflect.get(e,t,s)),set:(e,t,s,i)=>{let o=e[t];return yt(o)&&!yt(s)?(o.value=s,!0):Reflect.set(e,t,s,i)}};function Ci(e){return cn(e)?e:new Proxy(e,zf)}var qr=class{constructor(t,s,i){this.fn=t,this.setter=s,this._value=void 0,this.dep=new cs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=us-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&st!==this)return El(this,!0),!0}get value(){let t=this.dep.track();return Tl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}};function Ll(e,t,s=!1){let i,o;return Oe(e)?i=e:(i=e.get,o=e.set),new qr(i,o,s)}var gi={},wi=new WeakMap,Zn;function $l(e,t=!1,s=Zn){if(s){let i=wi.get(s);i||wi.set(s,i=[]),i.push(e)}}function _l(e,t,s=et){let{immediate:i,deep:o,once:r,scheduler:u,augmentJob:p,call:c}=s,v=j=>{(s.onWarn||Tf)("Invalid watch source: ",j,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},g=j=>o?j:Mt(j)||o===!1||o===0?un(j,1):un(j),y,m,b,E,S=!1,N=!1;if(yt(e)?(m=()=>e.value,S=Mt(e)):cn(e)?(m=()=>g(e),S=!0):Re(e)?(N=!0,S=e.some(j=>cn(j)||Mt(j)),m=()=>e.map(j=>{if(yt(j))return j.value;if(cn(j))return g(j);if(Oe(j))return c?c(j,2):j()})):Oe(e)?t?m=c?()=>c(e,2):e:m=()=>{if(b){Zt();try{b()}finally{xt()}}let j=Zn;Zn=y;try{return c?c(e,3,[E]):e(E)}finally{Zn=j}}:m=Ot,t&&o){let j=m,oe=o===!0?1/0:o;m=()=>un(j(),oe)}let w=Cl(),T=()=>{y.stop(),w&&w.active&&ns(w.effects,y)};if(r&&t){let j=t;t=(...oe)=>{try{return j(...oe)}finally{T()}}}let M=N?new Array(e.length).fill(gi):gi,F=j=>{if(!(!(y.flags&1)||!y.dirty&&!j))if(t){let oe=y.run();if(j||o||S||(N?oe.some((_,B)=>Ht(_,M[B])):Ht(oe,M))){let _=Zn;Zt();try{b&&b(),Zn=y;let B=[oe,M===gi?void 0:N&&M[0]===gi?[]:M,E];M=oe,c?c(t,3,B):t(...B)}finally{Zn=_,xt()}}}else y.run()};return p&&p(F),y=new Mo(m),y.scheduler=u?()=>u(F,!1):F,E=j=>$l(j,!1,y),b=y.onStop=()=>{let j=wi.get(y);if(j){if(c)c(j,4);else for(let oe of j)oe();wi.delete(y)}},t?i?F(!0):M=y.run():u?u(F.bind(null,!0),!0):y.run(),T.pause=y.pause.bind(y),T.resume=y.resume.bind(y),T.stop=T,T}function un(e,t=1/0,s){if(t<=0||!Xe(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,yt(e))un(e.value,t,s);else if(Re(e))for(let i=0;i{un(i,t,s)});else if(li(e)){for(let i in e)un(e[i],t,s);for(let i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&un(e[i],t,s)}return e}function Ts(e,t,s,i){try{return i?e(...i):e()}catch(o){Ps(o,t,s)}}function Gt(e,t,s,i){if(Oe(e)){let o=Ts(e,t,s,i);return o&&Sr(o)&&o.catch(r=>{Ps(r,t,s)}),o}if(Re(e)){let o=[];for(let r=0;r>>1,o=At[i],r=Cs(o);r=Cs(s)?At.push(e):At.splice(Kf(t),0,e),e.flags|=1,td()}}function td(){Ni||(Ni=ed.then(id))}function nd(e){if(!Re(e))qn&&e.id===-1?qn.splice(Vo+1,0,e):e.flags&1||(mn.push(e),e.flags|=1);else for(let t=0;t=t))continue;At.splice(i,1),i=e?i-1:en,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function sd(e,t,s=0){if(mn.length){let i=mn,o=0;if(t){i=[];for(let u=0;uCs(u)-Cs(p));if(mn.length=o,qn){for(let u=0;ue.id==null?e.flags&2?-1:1/0:e.id;function id(e){let t=Ot;try{for(en=0;en{i._d&&Di(-1);let r=Ri(t),u=oo.length,p;try{p=e(...o)}finally{for(let c=oo.length;c>u;c--)qd();Ri(r),i._d&&Di(1)}return p};return i._n=!0,i._c=!0,i._d=!0,i}function P(e,t){if(Ft===null)return e;let s=$i(Ft),i=e.dirs||(e.dirs=[]);for(let o=0;o1)return s&&Oe(t)?t.call(i&&i.proxy):t}}var Xf=Symbol.for("v-scx"),Qf=()=>{{let e=qt(Xf);return e}};function ut(e,t,s){return ad(e,t,s)}function ad(e,t,s=et){let{immediate:i,deep:o,flush:r,once:u}=s,p=ft({},s),c=t&&i||!t&&r!=="post",v;if($o){if(r==="sync"){let b=Qf();v=b.__watcherHandles||(b.__watcherHandles=[])}else if(!c){let b=()=>{};return b.stop=Ot,b.resume=Ot,b.pause=Ot,b}}let g=Et;p.call=(b,E,S)=>Gt(b,g,E,S);let y=!1;r==="post"?p.scheduler=b=>{b.i=g,Vt(b,g&&g.suspense)}:r!=="sync"&&(y=!0,p.scheduler=(b,E)=>{E?b():Zr(b)}),p.augmentJob=b=>{t&&(b.flags|=4),y&&(b.flags|=2,g&&(b.id=g.uid,b.i=g))};let m=_l(e,t,p);return $o&&(v?v.push(m):c&&m()),m}function Zf(e,t,s){let i=this.proxy,o=lt(e)?e.includes(".")?ld(i,e):()=>i[e]:e.bind(i,i),r;Oe(t)?r=t:(r=t.handler,s=t);let u=Is(this),p=ad(o,r.bind(i),s);return u(),p}function ld(e,t){let s=t.split(".");return()=>{let i=e;for(let o=0;oe.__isTeleport;var zr=Symbol("_leaveCb");function em(e){let t=e[0];if(e.length>1){let s=!1;for(let i of e)if(i.type!==tn){t=i,s=!0;break}}return t}function dd(e){if(!Mi(e))return Oi(e.type)&&e.children?em(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&Oe(s.default))return s.default()}}function Ss(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let s=e.component.subTree;Ss(Oi(s.type)&&dd(s)||s,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===V&&Re(e.children)){let s=kd(e.children,!1);s&&Ss(s,t)}}function Wr(e){if(e.component)return Wr(e.component.subTree);if(e.type===V){let t=Re(e.children)&&kd(e.children,!1);return t?Wr(t):void 0}if(e.type!==tn)return e}function Ds(e,t){return Oe(e)?ft({name:e.name},t,{setup:e}):e}function xr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Fl(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}var Ti=new WeakMap;function ys(e,t,s,i,o=!1){if(Re(e)){e.forEach((S,N)=>ys(S,t&&(Re(t)?t[N]:t),s,i,o));return}if(bs(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&ys(e,t,s,i.component.subTree);return}let r=i.shapeFlag&4?$i(i.component):i.el,u=o?null:r,{i:p,r:c}=e,v=t&&t.r,g=p.refs===et?p.refs={}:p.refs,y=p.setupState,m=Ye(y),b=y===et?Cr:S=>Fl(g,S)?!1:Ke(m,S),E=(S,N)=>!(N&&Fl(g,N));if(v!=null&&v!==c){if(Ul(t),lt(v))g[v]=null,b(v)&&(y[v]=null);else if(yt(v)){let S=t;E(v,S.k)&&(v.value=null),S.k&&(g[S.k]=null)}}if(Oe(c))Ts(c,p,12,[u,g]);else{let S=lt(c),N=yt(c);if(S||N){let w=()=>{if(e.f){let T=S?b(c)?y[c]:g[c]:E(c)||!e.k?c.value:g[e.k];if(o)Re(T)&&ns(T,r);else if(Re(T))T.includes(r)||T.push(r);else if(S)g[c]=[r],b(c)&&(y[c]=g[c]);else{let M=[r];E(c,e.k)&&(c.value=M),e.k&&(g[e.k]=M)}}else S?(g[c]=u,b(c)&&(y[c]=u)):N&&(E(c,e.k)&&(c.value=u),e.k&&(g[e.k]=u))};if(u){let T=()=>{w(),Ti.delete(e)};T.id=-1,Ti.set(e,T),Vt(T,s)}else Ul(e),w()}}}function Ul(e){let t=Ti.get(e);t&&(t.flags|=8,Ti.delete(e))}var Bl=e=>e.nodeType===8;var jte=is().requestIdleCallback||(e=>setTimeout(e,1)),Gte=is().cancelIdleCallback||(e=>clearTimeout(e));function tm(e,t){if(Bl(e)&&e.data==="["){let s=1,i=e.nextSibling;for(;i;){if(i.nodeType===1){if(t(i)===!1)break}else if(Bl(i))if(i.data==="]"){if(--s===0)break}else i.data==="["&&s++;i=i.nextSibling}}else t(e)}var bs=e=>!!e.type.__asyncLoader;function ud(e){Oe(e)&&(e={loader:e});let{loader:t,loadingComponent:s,errorComponent:i,delay:o=200,hydrate:r,timeout:u,suspensible:p=!0,onError:c}=e,v=null,g,y=0,m=()=>(y++,v=null,b()),b=()=>{let E;return v||(E=v=t().catch(S=>{if(S=S instanceof Error?S:new Error(String(S)),c)return new Promise((N,w)=>{c(S,()=>N(m()),()=>w(S),y+1)});throw S}).then(S=>E!==v&&v?v:(S&&(S.__esModule||S[Symbol.toStringTag]==="Module")&&(S=S.default),g=S,S)))};return Ds({name:"AsyncComponentWrapper",__asyncLoader:b,__asyncHydrate(E,S,N){let w=E.isConnected,T=!1;(S.bu||(S.bu=[])).push(()=>T=!0);let M=()=>{T||!E.parentNode||w&&!E.isConnected||N()},F=r?()=>{let j=r(M,oe=>tm(E,oe));j&&(S.bum||(S.bum=[])).push(j)}:M;g?F():b().then(()=>!S.isUnmounted&&F())},get __asyncResolved(){return g},setup(){let E=Et;if(xr(E),g)return()=>Si(g,E);let S=j=>{v=null,Ps(j,E,13,!i)};if(p&&E.suspense||$o)return b().then(j=>()=>Si(j,E)).catch(j=>(S(j),()=>i?Me(i,{error:j}):null));let N=St(!1),w=St(),T=St(!!o),M,F;return As(()=>{M!=null&&clearTimeout(M),F!=null&&clearTimeout(F)}),o&&(F=setTimeout(()=>{E.isUnmounted||(T.value=!1)},o)),u!=null&&(M=setTimeout(()=>{if(!E.isUnmounted&&!N.value&&!w.value){let j=new Error(`Async component timed out after ${u}ms.`);S(j),w.value=j}},u)),b().then(()=>{E.isUnmounted||(N.value=!0,E.parent&&Mi(E.parent.vnode)&&E.parent.update())}).catch(j=>{if(E.isUnmounted){v=null;return}S(j),w.value=j}),()=>{if(N.value&&g)return Si(g,E);if(w.value&&i)return Me(i,{error:w.value});if(s&&!T.value)return Si(s,E)}}})}function Si(e,t){let{ref:s,props:i,children:o,ce:r}=t.vnode,u=Me(e,i,o);return u.ref=s,u.ce=r,delete t.vnode.ce,u}var Mi=e=>e.type.__isKeepAlive;function cd(e,t){fd(e,"a",t)}function pd(e,t){fd(e,"da",t)}function fd(e,t,s=Et){let i=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Vi(t,i,s),s){let o=s.parent;for(;o&&o.parent;)Mi(o.parent.vnode)&&nm(i,t,s,o),o=o.parent}}function nm(e,t,s,i){let o=Vi(t,e,i,!0);As(()=>{ns(i[t],o)},s)}function Vi(e,t,s=Et,i=!1){if(s){let o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...u)=>{Zt();let p=Is(s),c=Gt(t,s,e,u);return p(),xt(),c});return i?o.unshift(r):o.push(r),r}}var Nn=e=>(t,s=Et)=>{(!$o||e==="sp")&&Vi(e,(...i)=>t(...i),s)},om=Nn("bm"),gn=Nn("m"),md=Nn("bu"),hd=Nn("u"),io=Nn("bum"),As=Nn("um"),sm=Nn("sp"),im=Nn("rtg"),rm=Nn("rtc");function am(e,t=Et){Vi("ec",e,t)}var gd="components",lm="directives";function Ze(e,t){return vd(gd,e,!0,t)||e}var dm=Symbol.for("v-ndc");function Pe(e){return vd(lm,e)}function vd(e,t,s=!0,i=!1){let o=Ft||Et;if(o){let r=o.type;if(e===gd){let p=Wm(r,!1);if(p&&(p===t||p===mt(t)||p===Qn(mt(t))))return r}let u=zl(o[e]||r[e],t)||zl(o.appContext[e],t);return!u&&i?r:u}}function zl(e,t){return e&&(e[t]||e[mt(t)]||e[Qn(mt(t))])}function Q(e,t,s,i){let o,r=s&&s[i],u=Re(e);if(u||lt(e)){let p=u&&cn(e),c=!1,v=!1;p&&(c=!Mt(e),v=jt(e),e=fs(e)),o=new Array(e.length);for(let g=0,y=e.length;gt(p,c,void 0,r&&r[c]));else{let p=Object.keys(e);o=new Array(p.length);for(let c=0,v=p.length;ce?Fd(e)?$i(e):Kr(e.parent):null;var ws=ft(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Kr(e.parent),$root:e=>Kr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ea(e),$forceUpdate:e=>e.f||(e.f=()=>{Zr(e.update)}),$nextTick:e=>e.n||(e.n=We.bind(e.proxy)),$watch:e=>Zf.bind(e)});var Hr=(e,t)=>e!==et&&!e.__isScriptSetup&&Ke(e,t),um={get({_:e},t){if(t==="__v_skip")return!0;let{ctx:s,setupState:i,data:o,props:r,accessCache:u,type:p,appContext:c}=e;if(t[0]!=="$"){let m=u[t];if(m!==void 0)switch(m){case 1:return i[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(Hr(i,t))return u[t]=1,i[t];if(o!==et&&Ke(o,t))return u[t]=2,o[t];if(Ke(r,t))return u[t]=3,r[t];if(s!==et&&Ke(s,t))return u[t]=4,s[t];Yr&&(u[t]=0)}}let v=ws[t],g,y;if(v)return t==="$attrs"&&Ct(e.attrs,"get",""),v(e);if((g=p.__cssModules)&&(g=g[t]))return g;if(s!==et&&Ke(s,t))return u[t]=4,s[t];if(y=c.config.globalProperties,Ke(y,t))return y[t]},set({_:e},t,s){let{data:i,setupState:o,ctx:r}=e;return Hr(o,t)?(o[t]=s,!0):i!==et&&Ke(i,t)?(i[t]=s,!0):Ke(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:i,appContext:o,props:r,type:u}},p){let c;return!!(s[p]||e!==et&&p[0]!=="$"&&Ke(e,p)||Hr(t,p)||Ke(r,p)||Ke(i,p)||Ke(ws,p)||Ke(o.config.globalProperties,p)||(c=u.__cssModules)&&c[p])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:Ke(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Hl(e){return Re(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}var Yr=!0;function cm(e){let t=ea(e),s=e.proxy,i=e.ctx;Yr=!1,t.beforeCreate&&jl(t.beforeCreate,e,"bc");let{data:o,computed:r,methods:u,watch:p,provide:c,inject:v,created:g,beforeMount:y,mounted:m,beforeUpdate:b,updated:E,activated:S,deactivated:N,beforeDestroy:w,beforeUnmount:T,destroyed:M,unmounted:F,render:j,renderTracked:oe,renderTriggered:_,errorCaptured:B,serverPrefetch:I,expose:L,inheritAttrs:k,components:q,directives:G,filters:H}=t;if(v&&pm(v,i,null),u)for(let x in u){let fe=u[x];Oe(fe)&&(i[x]=fe.bind(s))}if(o){let x=o.call(s,s);Xe(x)&&(e.data=at(x))}if(Yr=!0,r)for(let x in r){let fe=r[x],he=Oe(fe)?fe.bind(s,s):Oe(fe.get)?fe.get.bind(s,s):Ot,Be=!Oe(fe)&&Oe(fe.set)?fe.set.bind(s):Ot,He=Nt({get:he,set:Be});Object.defineProperty(i,x,{enumerable:!0,configurable:!0,get:()=>He.value,set:Qe=>He.value=Qe})}if(p)for(let x in p)yd(p[x],i,s,x);if(c){let x=Oe(c)?c.call(s):c;Reflect.ownKeys(x).forEach(fe=>{so(fe,x[fe])})}g&&jl(g,e,"c");function ne(x,fe){Re(fe)?fe.forEach(he=>x(he.bind(s))):fe&&x(fe.bind(s))}if(ne(om,y),ne(gn,m),ne(md,b),ne(hd,E),ne(cd,S),ne(pd,N),ne(am,B),ne(rm,oe),ne(im,_),ne(io,T),ne(As,F),ne(sm,I),Re(L))if(L.length){let x=e.exposed||(e.exposed={});L.forEach(fe=>{Object.defineProperty(x,fe,{get:()=>s[fe],set:he=>s[fe]=he,enumerable:!0})})}else e.exposed||(e.exposed={});j&&e.render===Ot&&(e.render=j),k!=null&&(e.inheritAttrs=k),q&&(e.components=q),G&&(e.directives=G),I&&xr(e)}function pm(e,t,s=Ot){Re(e)&&(e=Jr(e));for(let i in e){let o=e[i],r;Xe(o)?"default"in o?r=qt(o.from||i,o.default,!0):r=qt(o.from||i):r=qt(o),yt(r)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:u=>r.value=u}):t[i]=r}}function jl(e,t,s){Gt(Re(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,s)}function yd(e,t,s,i){let o=i.includes(".")?ld(s,i):()=>s[i];if(lt(e)){let r=t[e];Oe(r)&&ut(o,r)}else if(Oe(e))ut(o,e.bind(s));else if(Xe(e))if(Re(e))e.forEach(r=>yd(r,t,s,i));else{let r=Oe(e.handler)?e.handler.bind(s):t[e.handler];Oe(r)&&ut(o,r,e)}}function ea(e){let t=e.type,{mixins:s,extends:i}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:u}}=e.appContext,p=r.get(t),c;return p?c=p:!o.length&&!s&&!i?c=t:(c={},o.length&&o.forEach(v=>Pi(c,v,u,!0)),Pi(c,t,u)),Xe(t)&&r.set(t,c),c}function Pi(e,t,s,i=!1){let{mixins:o,extends:r}=t;r&&Pi(e,r,s,!0),o&&o.forEach(u=>Pi(e,u,s,!0));for(let u in t)if(!(i&&u==="expose")){let p=fm[u]||s&&s[u];e[u]=p?p(e[u],t[u]):t[u]}return e}var fm={data:Gl,props:Wl,emits:Wl,methods:vs,computed:vs,beforeCreate:Dt,created:Dt,beforeMount:Dt,mounted:Dt,beforeUpdate:Dt,updated:Dt,beforeDestroy:Dt,beforeUnmount:Dt,destroyed:Dt,unmounted:Dt,activated:Dt,deactivated:Dt,errorCaptured:Dt,serverPrefetch:Dt,components:vs,directives:vs,watch:hm,provide:Gl,inject:mm};function Gl(e,t){return t?e?function(){return ft(Oe(e)?e.call(this,this):e,Oe(t)?t.call(this,this):t)}:t:e}function mm(e,t){return vs(Jr(e),Jr(t))}function Jr(e){if(Re(e)){let t={};for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${mt(t)}Modifiers`]||e[`${an(t)}Modifiers`];function bm(e,t,...s){if(e.isUnmounted)return;let i=e.vnode.props||et,o=s,r=t.startsWith("update:"),u=r&&ym(i,t.slice(7));u&&(u.trim&&(o=s.map(g=>lt(g)?g.trim():g)),u.number&&(o=o.map(Io)));let p,c=i[p=ss(t)]||i[p=ss(mt(t))];!c&&r&&(c=i[p=ss(an(t))]),c&&Gt(c,e,6,o);let v=i[p+"Once"];if(v){if(!e.emitted)e.emitted={};else if(e.emitted[p])return;e.emitted[p]=!0,Gt(v,e,6,o)}}var wm=new WeakMap;function wd(e,t,s=!1){let i=s?wm:t.emitsCache,o=i.get(e);if(o!==void 0)return o;let r=e.emits,u={},p=!1;if(!Oe(e)){let c=v=>{let g=wd(v,t,!0);g&&(p=!0,ft(u,g))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!p?(Xe(e)&&i.set(e,null),null):(Re(r)?r.forEach(c=>u[c]=null):ft(u,r),Xe(e)&&i.set(e,u),u)}function qi(e,t){return!e||!To(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Ke(e,t[0].toLowerCase()+t.slice(1))||Ke(e,an(t))||Ke(e,t))}function jr(e){let{type:t,vnode:s,proxy:i,withProxy:o,propsOptions:[r],slots:u,attrs:p,emit:c,render:v,renderCache:g,props:y,data:m,setupState:b,ctx:E,inheritAttrs:S}=e,N=Ri(e),w,T;try{if(s.shapeFlag&4){let j=o||i,oe=j;w=hn(v.call(oe,j,g,y,b,m,E)),T=p}else{let j=t;w=hn(j.length>1?j(y,{attrs:p,slots:u,emit:c}):j(y,null)),T=t.props?p:km(p)}}catch(j){oo.length=0,Ps(j,e,1),w=Me(tn)}let M=w,F;if(T&&S!==!1){let j=Object.keys(T),{shapeFlag:oe}=M;j.length&&oe&7&&(r&&j.some(Po)&&(T=Cm(T,r)),M=Lo(M,T,!1,!0))}if(s.dirs&&(M=Lo(M,null,!1,!0),M.dirs=M.dirs?M.dirs.concat(s.dirs):s.dirs),s.transition){let j=Oi(M.type)&&dd(M)||M;Ss(j,s.transition)}return w=M,Ri(N),w}function kd(e,t=!0){let s;for(let i=0;i{let t;for(let s in e)(s==="class"||s==="style"||To(s))&&((t||(t={}))[s]=e[s]);return t},Cm=(e,t)=>{let s={};for(let i in e)(!Po(i)||!(i.slice(9)in t))&&(s[i]=e[i]);return s};function Sm(e,t,s){let{props:i,children:o,component:r}=e,{props:u,children:p,patchFlag:c}=t,v=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return i?Kl(i,u,v):!!u;if(c&8){let g=t.dynamicProps;for(let y=0;yObject.create(Sd),Nd=e=>Object.getPrototypeOf(e)===Sd;function Nm(e,t,s,i=!1){let o={},r=Ed();e.propsDefaults=Object.create(null),Rd(e,t,o,r);for(let u in e.propsOptions[0])u in o||(o[u]=void 0);s?e.props=i?o:ms(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function Rm(e,t,s,i){let{props:o,attrs:r,vnode:{patchFlag:u}}=e,p=Ye(o),[c]=e.propsOptions,v=!1;if((i||u>0)&&!(u&16)){if(u&8){let g=e.vnode.dynamicProps;for(let y=0;y{c=!0;let[m,b]=Td(y,t,!0);ft(u,m),b&&p.push(...b)};!s&&t.mixins.length&&t.mixins.forEach(g),e.extends&&g(e.extends),e.mixins&&e.mixins.forEach(g)}if(!r&&!c)return Xe(e)&&i.set(e,Vn),Vn;if(Re(r))for(let g=0;ge==="_"||e==="_ctx"||e==="$stable",na=e=>Re(e)?e.map(hn):[hn(e)],Pm=(e,t,s)=>{if(t._n)return t;let i=Jf((...o)=>na(t(...o)),s);return i._c=!1,i},Pd=(e,t,s)=>{let i=e._ctx;for(let o in e){if(ta(o))continue;let r=e[o];if(Oe(r))t[o]=Pm(o,r,i);else if(r!=null){let u=na(r);t[o]=()=>u}}},Dd=(e,t)=>{let s=na(t);e.slots.default=()=>s},Ad=(e,t,s)=>{for(let i in t)(s||!ta(i))&&(e[i]=t[i])},Dm=(e,t,s)=>{let i=e.slots=Ed();if(e.vnode.shapeFlag&32){let o=t._;o?(Ad(i,t,s),s&&ci(i,"_",o,!0)):Pd(t,i)}else t&&Dd(e,t)},Am=(e,t,s)=>{let{vnode:i,slots:o}=e,r=!0,u=et;if(i.shapeFlag&32){let p=t._;p?s&&p===1?r=!1:Ad(o,t,s):(r=!t.$stable,Pd(t,o)),u=t}else t&&(Dd(e,t),u={default:1});if(r)for(let p in o)!ta(p)&&u[p]==null&&delete o[p]};function Im(){let e=[]}var Vt=qm;function Id(e){return Om(e)}function Om(e,t){Im();let s=is();s.__VUE__=!0;let{insert:i,remove:o,patchProp:r,createElement:u,createText:p,createComment:c,setText:v,setElementText:g,parentNode:y,nextSibling:m,setScopeId:b=Ot,insertStaticContent:E}=e,S=(D,A,U,J=null,W=null,ee=null,le=void 0,se=null,ie=!!A.dynamicChildren)=>{if(D===A)return;D&&!gs(D,A)&&(J=ce(D),Ee(D,W,ee,!0),D=null),A.patchFlag===-2&&(ie=!1,A.dynamicChildren=null),A.dynamicChildren&&D&&D.dynamicChildren&&D.dynamicChildren.hasOnce&&(A.dynamicChildren===Vn&&(A.dynamicChildren=[]),A.dynamicChildren.hasOnce=!0);let{type:te,ref:we,shapeFlag:pe}=A;switch(te){case Li:N(D,A,U,J);break;case tn:w(D,A,U,J);break;case ks:D==null&&T(A,U,J,le);break;case V:G(D,A,U,J,W,ee,le,se,ie);break;default:pe&1?oe(D,A,U,J,W,ee,le,se,ie):pe&6?H(D,A,U,J,W,ee,le,se,ie):(pe&64||pe&128)&&te.process(D,A,U,J,W,ee,le,se,ie,me)}we!=null&&W?ys(we,D&&D.ref,ee,A||D,!A):we==null&&D&&D.ref!=null&&ys(D.ref,null,ee,D,!0)},N=(D,A,U,J)=>{if(D==null)i(A.el=p(A.children),U,J);else{let W=A.el=D.el;A.children!==D.children&&v(W,A.children)}},w=(D,A,U,J)=>{D==null?i(A.el=c(A.children||""),U,J):A.el=D.el},T=(D,A,U,J)=>{[D.el,D.anchor]=E(D.children,A,U,J,D.el,D.anchor)},M=(D,A,U,J)=>{if(A.children!==D.children){let W=m(D.anchor);j(D),[A.el,A.anchor]=E(A.children,U,W,J)}else A.el=D.el,A.anchor=D.anchor},F=({el:D,anchor:A},U,J)=>{let W;for(;D&&D!==A;)W=m(D),i(D,U,J),D=W;i(A,U,J)},j=({el:D,anchor:A})=>{let U;for(;D&&D!==A;)U=m(D),o(D),D=U;o(A)},oe=(D,A,U,J,W,ee,le,se,ie)=>{if(A.type==="svg"?le="svg":A.type==="math"&&(le="mathml"),D==null)_(A,U,J,W,ee,le,se,ie);else{let te=D.el&&D.el._isVueCE?D.el:null;try{te&&te._beginPatch(),L(D,A,W,ee,le,se,ie)}finally{te&&te._endPatch()}}},_=(D,A,U,J,W,ee,le,se)=>{let ie,te,{props:we,shapeFlag:pe,transition:Se,dirs:Te}=D;if(ie=D.el=u(D.type,ee,we&&we.is,we),pe&8?g(ie,D.children):pe&16&&I(D.children,ie,null,J,W,Gr(D,ee),le,se),Te&&to(D,null,J,"created"),B(ie,D,D.scopeId,le,J),we){for(let Je in we)Je!=="value"&&!Do(Je)&&r(ie,Je,null,we[Je],ee,J);"value"in we&&r(ie,"value",null,we.value,ee),(te=we.onVnodeBeforeMount)&&fn(te,J,D)}Te&&to(D,null,J,"beforeMount");let Le=Mm(W,Se);Le&&Se.beforeEnter(ie),i(ie,A,U),((te=we&&we.onVnodeMounted)||Le||Te)&&Vt(()=>{let je;te&&fn(te,J,D),Le&&Se.enter(ie),Te&&to(D,null,J,"mounted")},W)},B=(D,A,U,J,W)=>{if(U&&b(D,U),J)for(let ee=0;ee{for(let te=ie;te{let se=A.el=D.el,{patchFlag:ie,dynamicChildren:te,dirs:we}=A;ie|=D.patchFlag&16;let pe=D.props||et,Se=A.props||et,Te;if(U&&no(U,!1),(Te=Se.onVnodeBeforeUpdate)&&fn(Te,U,A,D),we&&to(A,D,U,"beforeUpdate"),U&&no(U,!0),te&&(!D.dynamicChildren||D.dynamicChildren.length!==te.length)&&(ie=0,le=!1,te=null),(pe.innerHTML&&Se.innerHTML==null||pe.textContent&&Se.textContent==null)&&g(se,""),te?k(D.dynamicChildren,te,se,U,J,Gr(A,W),ee):le||he(D,A,se,null,U,J,Gr(A,W),ee,!1),ie>0){if(ie&16)q(se,pe,Se,U,W);else if(ie&2&&pe.class!==Se.class&&r(se,"class",null,Se.class,W),ie&4&&r(se,"style",pe.style,Se.style,W),ie&8){let Le=A.dynamicProps;for(let Je=0;Je{Te&&fn(Te,U,A,D),we&&to(A,D,U,"updated")},J)},k=(D,A,U,J,W,ee,le)=>{for(let se=0;se{if(A!==U){if(A!==et)for(let ee in A)!Do(ee)&&!(ee in U)&&r(D,ee,A[ee],null,W,J);for(let ee in U){if(Do(ee))continue;let le=U[ee],se=A[ee];le!==se&&ee!=="value"&&r(D,ee,se,le,W,J)}"value"in U&&r(D,"value",A.value,U.value,W)}},G=(D,A,U,J,W,ee,le,se,ie)=>{let te=A.el=D?D.el:p(""),we=A.anchor=D?D.anchor:p(""),{patchFlag:pe,dynamicChildren:Se,slotScopeIds:Te}=A;Te&&(se=se?se.concat(Te):Te),D==null?(i(te,U,J),i(we,U,J),I(A.children||[],U,we,W,ee,le,se,ie)):pe>0&&pe&64&&Se&&D.dynamicChildren&&D.dynamicChildren.length===Se.length?(k(D.dynamicChildren,Se,U,W,ee,le,se),(A.key!=null||W&&A===W.subTree)&&Od(D,A,!0)):he(D,A,U,we,W,ee,le,se,ie)},H=(D,A,U,J,W,ee,le,se,ie)=>{A.slotScopeIds=se,D==null?A.shapeFlag&512?W.ctx.activate(A,U,J,le,ie):Y(A,U,J,W,ee,le,ie):ne(D,A,ie)},Y=(D,A,U,J,W,ee,le)=>{let se=D.component=Bm(D,J,W);if(Mi(D)&&(se.ctx.renderer=me),zm(se,!1,le),se.asyncDep){if(W&&W.registerDep(se,x,le,ee),!D.el){let ie=se.subTree=Me(tn);w(null,ie,A,U),D.placeholder=ie.el}}else x(se,D,A,U,W,ee,le)},ne=(D,A,U)=>{let J=A.component=D.component;if(Sm(D,A,U))if(J.asyncDep&&!J.asyncResolved){A.el=D.el,A.placeholder=D.placeholder,fe(J,A,U);return}else J.next=A,J.update();else A.el=D.el,A.placeholder=D.placeholder,J.vnode=A},x=(D,A,U,J,W,ee,le)=>{let se=()=>{if(D.isMounted){let{next:pe,bu:Se,u:Te,parent:Le,vnode:Je}=D;{let dt=Md(D);if(dt){pe&&(pe.el=Je.el,fe(D,pe,le)),dt.asyncDep.then(()=>{Vt(()=>{D.isUnmounted||te()},W)});return}}let je=pe,Ce;no(D,!1),pe?(pe.el=Je.el,fe(D,pe,le)):pe=Je,Se&&Ao(Se),(Ce=pe.props&&pe.props.onVnodeBeforeUpdate)&&fn(Ce,Le,pe,Je),no(D,!0);let $e=jr(D),it=D.subTree;D.subTree=$e,S(it,$e,y(it.el),ce(it),D,W,ee),pe.el=$e.el,je===null&&Em(D,$e.el),Te&&Vt(Te,W),(Ce=pe.props&&pe.props.onVnodeUpdated)&&Vt(()=>fn(Ce,Le,pe,Je),W)}else{let pe,{el:Se,props:Te}=A,{bm:Le,m:Je,parent:je,root:Ce,type:$e}=D,it=bs(A);if(no(D,!1),Le&&Ao(Le),!it&&(pe=Te&&Te.onVnodeBeforeMount)&&fn(pe,je,A),no(D,!0),Se&&Ve){let dt=()=>{D.subTree=jr(D),Ve(Se,D.subTree,D,W,null)};it&&$e.__asyncHydrate?$e.__asyncHydrate(Se,D,dt):dt()}else{Ce.ce&&Ce.ce._hasShadowRoot()&&Ce.ce._injectChildStyle($e,D.parent?D.parent.type:void 0);let dt=D.subTree=jr(D);S(null,dt,U,J,D,W,ee),A.el=dt.el}if(Je&&Vt(Je,W),!it&&(pe=Te&&Te.onVnodeMounted)){let dt=A;Vt(()=>fn(pe,je,dt),W)}(A.shapeFlag&256||je&&bs(je.vnode)&&je.vnode.shapeFlag&256)&&D.a&&Vt(D.a,W),D.isMounted=!0,A=U=J=null}};D.scope.on();let ie=D.effect=new Mo(se);D.scope.off();let te=D.update=ie.run.bind(ie),we=D.job=ie.runIfDirty.bind(ie);we.i=D,we.id=D.uid,ie.scheduler=()=>Zr(we),no(D,!0),te()},fe=(D,A,U)=>{A.component=D;let J=D.vnode.props;D.vnode=A,D.next=null,Rm(D,A.props,J,U),Am(D,A.children,U),Zt(),od(D),xt()},he=(D,A,U,J,W,ee,le,se,ie=!1)=>{let te=D&&D.children,we=D?D.shapeFlag:0,pe=A.children,{patchFlag:Se,shapeFlag:Te}=A;if(Se>0){if(Se&128){He(te,pe,U,J,W,ee,le,se,ie);return}else if(Se&256){Be(te,pe,U,J,W,ee,le,se,ie);return}}Te&8?(we&16&&X(te,W,ee),pe!==te&&g(U,pe)):we&16?Te&16?He(te,pe,U,J,W,ee,le,se,ie):X(te,W,ee,!0):(we&8&&g(U,""),Te&16&&I(pe,U,J,W,ee,le,se,ie))},Be=(D,A,U,J,W,ee,le,se,ie)=>{D=D||Vn,A=A||Vn;let te=D.length,we=A.length,pe=Math.min(te,we),Se;for(Se=0;Sewe?X(D,W,ee,!0,!1,pe):I(A,U,J,W,ee,le,se,ie,pe)},He=(D,A,U,J,W,ee,le,se,ie)=>{let te=0,we=A.length,pe=D.length-1,Se=we-1;for(;te<=pe&&te<=Se;){let Te=D[te],Le=A[te]=ie?En(A[te]):hn(A[te]);if(gs(Te,Le))S(Te,Le,U,null,W,ee,le,se,ie);else break;te++}for(;te<=pe&&te<=Se;){let Te=D[pe],Le=A[Se]=ie?En(A[Se]):hn(A[Se]);if(gs(Te,Le))S(Te,Le,U,null,W,ee,le,se,ie);else break;pe--,Se--}if(te>pe){if(te<=Se){let Te=Se+1,Le=TeSe)for(;te<=pe;)Ee(D[te],W,ee,!0),te++;else{let Te=te,Le=te,Je=new Map;for(te=Le;te<=Se;te++){let rt=A[te]=ie?En(A[te]):hn(A[te]);rt.key!=null&&Je.set(rt.key,te)}let je,Ce=0,$e=Se-Le+1,it=!1,dt=0,Pt=new Array($e);for(te=0;te<$e;te++)Pt[te]=0;for(te=Te;te<=pe;te++){let rt=D[te];if(Ce>=$e){Ee(rt,W,ee,!0);continue}let Ie;if(rt.key!=null)Ie=Je.get(rt.key);else for(je=Le;je<=Se;je++)if(Pt[je-Le]===0&&gs(rt,A[je])){Ie=je;break}Ie===void 0?Ee(rt,W,ee,!0):(Pt[Ie-Le]=te+1,Ie>=dt?dt=Ie:it=!0,S(rt,A[Ie],U,null,W,ee,le,se,ie),Ce++)}let wt=it?Vm(Pt):Vn;for(je=wt.length-1,te=$e-1;te>=0;te--){let rt=Le+te,Ie=A[rt],sn=A[rt+1],wo=rt+1{let{el:ee,type:le,transition:se,children:ie,shapeFlag:te}=D;if(te&6){Qe(D.component.subTree,A,U,J);return}if(te&128){D.suspense.move(A,U,J);return}if(te&64){le.move(D,A,U,me);return}if(le===V){i(ee,A,U);for(let pe=0;pese.enter(ee),W));else{let{leave:pe,delayLeave:Se,afterLeave:Te}=se,Le=()=>{D.ctx.isUnmounted?o(ee):i(ee,A,U)},Je=()=>{let je=ee._isLeaving||!!ee[zr];ee._isLeaving&&ee[zr](!0),se.persisted&&!je?Le():pe(ee,()=>{Le(),Te&&Te()})};Se?Se(ee,Le,Je):Je()}else i(ee,A,U)},Ee=(D,A,U,J=!1,W=!1)=>{let{type:ee,props:le,ref:se,children:ie,dynamicChildren:te,shapeFlag:we,patchFlag:pe,dirs:Se,cacheIndex:Te,memo:Le}=D;if((pe===-2||te&&te.hasOnce)&&(W=!1),se!=null&&(Zt(),ys(se,null,U,D,!0),xt()),Te!=null&&(!D.ctx||D.ctx===A)&&(A.renderCache[Te]=void 0),we&256){A.ctx.deactivate(D);return}let Je=we&1&&Se,je=!bs(D),Ce;if(je&&(Ce=le&&le.onVnodeBeforeUnmount)&&fn(Ce,A,D),we&6)qe(D.component,U,J);else{if(we&128){D.suspense.unmount(U,J);return}Je&&to(D,null,A,"beforeUnmount"),we&64?D.type.remove(D,A,U,me,J):te&&!te.hasOnce&&(ee!==V||pe>0&&pe&64)?X(te,A,U,!1,!0):(ee===V&&pe&384||!W&&we&16)&&X(ie,A,U),J&&tt(D)}let $e=Le!=null&&Te==null;(je&&(Ce=le&&le.onVnodeUnmounted)||Je||$e)&&Vt(()=>{Ce&&fn(Ce,A,D),Je&&to(D,null,A,"unmounted"),$e&&(D.el=null)},U)},tt=D=>{let{type:A,el:U,anchor:J,transition:W}=D,ee=A===V;if(ee&&!W){Ne(U,J);return}if(A===ks){j(D),W&&!W.persisted&&W.afterLeave&&W.afterLeave();return}let le=ee?Wr(D):D,se=()=>{ee?y(U)&&Ne(U,J):o(U),W&&!W.persisted&&W.afterLeave&&W.afterLeave()};if(le&&le.shapeFlag&1&&W&&!W.persisted){let{leave:ie,delayLeave:te}=W,we=le.el,pe=()=>ie(we,se);te?te(we,se,pe):pe()}else se()},Ne=(D,A)=>{let U;for(;D!==A;)U=m(D),o(D),D=U;o(A)},qe=(D,A,U)=>{let{bum:J,scope:W,job:ee,subTree:le,um:se,m:ie,a:te}=D;Jl(ie),Jl(te),J&&Ao(J),W.stop(),ee?(ee.flags|=8,Ee(le,D,A,U)):D.vnode.el&&le&&(le.transition=D.vnode.transition,Ee(le,D,A,U)),se&&Vt(se,A),Vt(()=>{D.isUnmounted=!0},A)},X=(D,A,U,J=!1,W=!1,ee=0)=>{for(let le=ee;le{if(D.shapeFlag&6)return ce(D.component.subTree);if(D.shapeFlag&128)return D.suspense.next();let A=m(D.anchor||D.el),U=A&&A[xf];return U?m(U):A},ue=(D,A,U)=>{let J=D&&A._vnode?void 0:D&&D.component?D.component.uid:Um();Yf(()=>{D==null?A._vnode&&Ee(A._vnode,null,null,!0):S(A._vnode||null,D,A,null,null,null,U),A._vnode=D},J)},me={p:S,um:Ee,m:Qe,r:tt,mt:Y,mc:I,pc:he,pbc:k,n:ce,o:e},be,Ve;return t&&([be,Ve]=t(me)),{render:ue,hydrate:be,createApp:vm(ue,be)}}function Gr({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function no({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Mm(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Od(e,t,s=!1){let i=e.children,o=t.children;if(Re(i)&&Re(o))for(let r=0;r>1,e[s[p]]0&&(t[i]=s[r-1]),s[r]=i)}}for(r=s.length,u=s[r-1];r-- >0;)s[r]=u,u=t[u];return s}function Md(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Md(t)}function Jl(e){if(e)for(let t=0;te.__isSuspense;function qm(e,t){t&&t.pendingBranch?Re(e)?t.effects.push(...e):t.effects.push(e):nd(e)}var V=Symbol.for("v-fgt"),Li=Symbol.for("v-txt"),tn=Symbol.for("v-cmt"),ks=Symbol.for("v-stc"),oo=[],Ut=null;function a(e=!1){oo.push(Ut=e?null:[])}function qd(){oo.pop(),Ut=oo[oo.length-1]||null}var Es=1;function Di(e,t=!1){Es+=e,e<0&&Ut&&t&&(Ut.hasOnce=!0)}function Ld(e){return e.dynamicChildren=Es>0?Ut||Vn:null,qd(),Es>0&&Ut&&Ut.push(e),e}function l(e,t,s,i,o,r){return Ld(n(e,t,s,i,o,r,!0))}function Wt(e,t,s,i,o){return Ld(Me(e,t,s,i,o,!0))}function Ns(e){return e?e.__v_isVNode===!0:!1}function gs(e,t){return e.type===t.type&&e.key===t.key}var $d=({key:e})=>e??null,Ei=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?lt(e)||yt(e)||Oe(e)?{i:Ft,r:e,k:t,f:!!s}:e:null);function n(e,t=null,s=null,i=0,o=null,r=e===V?0:1,u=!1,p=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$d(t),ref:t&&Ei(t),scopeId:rd,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ft};return p?(Ai(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=lt(s)?8:16),Es>0&&!u&&Ut&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Ut.push(c),c}var Me=Lm;function Lm(e,t=null,s=null,i=0,o=null,r=!1){if((!e||e===dm)&&(e=tn),Ns(e)){let p=Lo(e,t,!0);return s&&Ai(p,s),Es>0&&!r&&Ut&&(p.shapeFlag&6?Ut[Ut.indexOf(e)]=p:Ut.push(p)),p.patchFlag=-2,p}if(Km(e)&&(e=e.__vccOpts),t){t=$m(t);let{class:p,style:c}=t;p&&!lt(p)&&(t.class=R(p)),Xe(c)&&(hs(c)&&!Re(c)&&(c=ft({},c)),t.style=Ae(c))}let u=lt(e)?1:Vd(e)?128:Oi(e)?64:Xe(e)?4:Oe(e)?2:0;return n(e,t,s,i,o,u,r,!0)}function $m(e){return e?hs(e)||Nd(e)?ft({},e):e:null}function Lo(e,t,s=!1,i=!1){let{props:o,ref:r,patchFlag:u,children:p,transition:c}=e,v=t?_m(o||{},t):o,g={__v_isVNode:!0,__v_skip:!0,type:e.type,props:v,key:v&&$d(v),ref:t&&t.ref?s&&r?Re(r)?r.concat(Ei(t)):[r,Ei(t)]:Ei(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:p,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==V?u===-1?16:u|16:u,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Lo(e.ssContent),ssFallback:e.ssFallback&&Lo(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&i&&Ss(g,c.clone(g)),g}function h(e=" ",t=0){return Me(Li,null,e,t)}function ke(e,t){let s=Me(ks,null,e);return s.staticCount=t,s}function f(e="",t=!1){return t?(a(),Wt(tn,null,e)):Me(tn,null,e)}function hn(e){return e==null||typeof e=="boolean"?Me(tn):Re(e)?Me(V,null,e.slice()):Ns(e)?En(e):Me(Li,null,String(e))}function En(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Lo(e)}function Ai(e,t){let s=0,{shapeFlag:i}=e;if(t==null)t=null;else if(Re(t))s=16;else if(typeof t=="object")if(i&65){let o=t.default;o&&(o._c&&(o._d=!1),Ai(e,o()),o._c&&(o._d=!0));return}else{s=32;let o=t._;!o&&!Nd(t)?t._ctx=Ft:o===3&&Ft&&(Ft.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Oe(t)){if(i&65){Ai(e,{default:t});return}t={default:t,_ctx:Ft},s=32}else t=String(t),i&64?(s=16,t=[h(t)]):s=8;e.children=t,e.shapeFlag|=s}function _m(...e){let t={};for(let s=0;sEt||Ft,Ii,Rs;{let e=is(),t=(s,i)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(i),r=>{o.length>1?o.forEach(u=>u(r)):o[0](r)}};Ii=t("__VUE_INSTANCE_SETTERS__",s=>Et=s),Rs=t("__VUE_SSR_SETTERS__",s=>$o=s)}var Is=e=>{let t=Et;return Ii(e),e.scope.on(),()=>{e.scope.off(),Ii(t)}},Xl=()=>{Et&&Et.scope.off(),Ii(null)};function Fd(e){return e.vnode.shapeFlag&4}var $o=!1;function zm(e,t=!1,s=!1){t&&Rs(t);let{props:i,children:o}=e.vnode,r=Fd(e);Nm(e,i,r,t),Dm(e,o,s||t);let u=r?Hm(e,t):void 0;return t&&Rs(!1),u}function Hm(e,t){let s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,um);let{setup:i}=s;if(i){Zt();let o=e.setupContext=i.length>1?Gm(e):null,r=Is(e),u=Ts(i,e,0,[e.props,o]),p=Sr(u);if(xt(),r(),(p||e.sp)&&!bs(e)&&xr(e),p){if(u.then(Xl,Xl),t)return u.then(c=>{Rs(!0);try{Ql(e,c,t)}finally{Rs(!1)}}).catch(c=>{Ps(c,e,0)});e.asyncDep=u}else Ql(e,u,t)}else Ud(e,t)}function Ql(e,t,s){Oe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Xe(t)&&(e.setupState=Ci(t)),Ud(e,s)}var Zl,xl;function Ud(e,t,s){let i=e.type;if(!e.render){if(!t&&Zl&&!i.render){let o=i.template||ea(e).template;if(o){let{isCustomElement:r,compilerOptions:u}=e.appContext.config,{delimiters:p,compilerOptions:c}=i,v=ft(ft({isCustomElement:r,delimiters:p},u),c);i.render=Zl(o,v)}}e.render=i.render||Ot,xl&&xl(e)}{let o=Is(e);Zt();try{cm(e)}finally{xt(),o()}}}var jm={get(e,t){return Ct(e,"get",""),e[t]}};function Gm(e){let t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,jm),slots:e.slots,emit:e.emit,expose:t}}function $i(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ci(pn(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in ws)return ws[s](e)},has(t,s){return s in t||s in ws}})):e.proxy}function Wm(e,t=!0){return Oe(e)?e.displayName||e.name:e.name||t&&e.__name}function Km(e){return Oe(e)&&"__vccOpts"in e}var Nt=(e,t)=>Ll(e,t,$o);function De(e,t,s){try{Di(-1);let i=arguments.length;return i===2?Xe(t)&&!Re(t)?Ns(t)?Me(e,null,[t]):Me(e,t):Me(e,null,t):(i>3?s=Array.prototype.slice.call(arguments,2):i===3&&Ns(s)&&(s=[s]),Me(e,t,s))}finally{Di(1)}}var Ym="3.5.44";var aa,Bd=typeof window<"u"&&window.trustedTypes;if(Bd)try{aa=Bd.createPolicy("vue",{createHTML:e=>e})}catch{}var xd=aa?e=>aa.createHTML(e):e=>e,Jm="http://www.w3.org/2000/svg",Xm="http://www.w3.org/1998/Math/MathML",Rn=typeof document<"u"?document:null,zd=Rn&&Rn.createElement("template"),Qm={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,i)=>{let o=t==="svg"?Rn.createElementNS(Jm,e):t==="mathml"?Rn.createElementNS(Xm,e):s?Rn.createElement(e,{is:s}):Rn.createElement(e);return e==="select"&&i&&i.multiple!=null&&o.setAttribute("multiple",i.multiple),o},createText:e=>Rn.createTextNode(e),createComment:e=>Rn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Rn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,i,o,r){let u=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{zd.innerHTML=xd(i==="svg"?`${e}`:i==="mathml"?`${e}`:e);let p=zd.content;if(i==="svg"||i==="mathml"){let c=p.firstChild;for(;c.firstChild;)p.appendChild(c.firstChild);p.removeChild(c)}t.insertBefore(p,s)}return[u?u.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}};var Zm=Symbol("_vtc");function xm(e,t,s){let i=e[Zm];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}var Ui=Symbol("_vod"),eu=Symbol("_vsh"),Z={name:"show",beforeMount(e,{value:t},{transition:s}){e[Ui]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Os(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:i}){!t!=!s&&(i?t?(i.beforeEnter(e),Os(e,!0),i.enter(e)):i.leave(e,()=>{Os(e,!1)}):Os(e,t))},beforeUnmount(e,{value:t}){Os(e,t)}};function Os(e,t){e.style.display=t?e[Ui]:"none",e[eu]=!t}var eh=Symbol("");var th=/(?:^|;)\s*display\s*:/;function nh(e,t,s){let i=e.style,o=lt(s),r=!1;if(s&&!o){if(t)if(lt(t))for(let u of t.split(";")){let p=u.slice(0,u.indexOf(":")).trim();s[p]==null&&Ms(i,p,"")}else for(let u in t)s[u]==null&&Ms(i,u,"");for(let u in s){u==="display"&&(r=!0);let p=s[u];p!=null?sh(e,u,!lt(t)&&t?t[u]:void 0,p)||Ms(i,u,p):Ms(i,u,"")}}else if(o){if(t!==s){let u=i[eh];u&&(s+=";"+u),i.cssText=s,r=th.test(s)}}else t&&e.removeAttribute("style");Ui in e&&((!o||t!==s)&&(e[Ui]=r?i.display:""),e[eu]&&(i.display="none"))}var _i=/\s*!important$/;function Ms(e,t,s){if(Re(s))s.forEach(i=>Ms(e,t,i));else if(s==null&&(s=""),t.startsWith("--"))_i.test(s)?e.setProperty(t,s.replace(_i,""),"important"):e.setProperty(t,s);else{let i=oh(e,t);_i.test(s)?e.setProperty(an(i),s.replace(_i,""),"important"):e[i]=s}}var Hd=["Webkit","Moz","ms"],sa={};function oh(e,t){let s=sa[t];if(s)return s;let i=mt(t);if(i!=="filter"&&i in e)return sa[t]=i;i=Qn(i);for(let o=0;oia||(uh.then(()=>ia=0),ia=Date.now());function ph(e,t){let s=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=s.attached)return;let o=s.value;if(Re(o)){let r=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{r.call(i),i._stopped=!0};let u=o.slice(),p=[i];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,fh=(e,t,s,i,o,r)=>{let u=o==="svg";t==="class"?xm(e,i,u):t==="style"?nh(e,s,i):To(t)?Po(t)||rh(e,t,s,i,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):mh(e,t,i,u))?(Wd(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Gd(e,t,i,u,r,t!=="value")):e._isVueCE&&(hh(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!lt(i)))?Wd(e,mt(t),i,r,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),Gd(e,t,i,u))};function mh(e,t,s,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&Yd(t)&&Oe(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){let o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Yd(t)&<(s)?!1:t in e}function hh(e,t){let s=e._def.props;if(!s)return!1;let i=mt(t);return Array.isArray(s)?s.some(o=>mt(o)===i):Object.keys(s).some(o=>mt(o)===i)}var _o=e=>{let t=e.props["onUpdate:modelValue"]||!1;return Re(t)?s=>Ao(t,s):t};function gh(e){e.target.composing=!0}function Jd(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var vn=Symbol("_assign"),Fi=Symbol("_initialValue");function ra(e,t,s){return t&&(e=e.trim()),s&&(e=Io(e)),e}var ot={created(e,{modifiers:{lazy:t,trim:s,number:i}},o){e.parentNode&&(e.type==="text"?e[Fi]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Fi]=e.defaultValue.replace(/\r\n?/g,` `))),e[vn]=_o(o);let r=i||o.props&&o.props.type==="number";Ln(e,t?"change":"input",u=>{u.target.composing||e[vn](ra(e.value,s,r))}),(s||r)&&Ln(e,"change",()=>{e.value=ra(e.value,s,r)}),t||(Ln(e,"compositionstart",gh),Ln(e,"compositionend",Jd),Ln(e,"change",Jd))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){let o=t??"",r=e[Fi];delete e[Fi],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[vn](ra(e.value,s,i)):e.value=o},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:o,number:r}},u){if(e[vn]=_o(u),e.composing)return;let p=(r||e.type==="number")&&!/^0\d/.test(e.value)?Io(e.value):e.value,c=t??"";if(p===c)return;let v=e.getRootNode();(v instanceof Document||v instanceof ShadowRoot)&&v.activeElement===e&&e.type!=="range"&&(i&&t===s||o&&e.value.trim()===c)||(e.value=c)}},la={deep:!0,created(e,t,s){e[vn]=_o(s),Ln(e,"change",()=>{let i=e._modelValue,o=Vs(e),r=e.checked,u=e[vn];if(Re(i)){let p=fi(i,o),c=p!==-1;if(r&&!c)u(i.concat(o));else if(!r&&c){let v=[...i];v.splice(p,1),u(v)}}else if(Jt(i)){let p=new Set(i);r?p.add(o):p.delete(o),u(p)}else u(tu(e,r))})},mounted:Xd,beforeUpdate(e,t,s){e[vn]=_o(s),Xd(e,t,s)}};function Xd(e,{value:t,oldValue:s},i){e._modelValue=t;let o;if(Re(t))o=fi(t,i.props.value)>-1;else if(Jt(t))o=t.has(i.props.value);else{if(t===s)return;o=Xt(t,tu(e,!0))}e.checked!==o&&(e.checked=o)}var Rt={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,Ln(e,"change",()=>{let o=Array.prototype.filter.call(e.options,c=>c.selected).map(c=>s?Io(Vs(c)):Vs(c)),r=e.multiple,u=r?Jt(e._modelValue)?new Set(o):o:o[0],p=e._pendingValue=[r,r?Re(u)?o.slice():o:u];try{e[vn](u)}finally{We(()=>{e._pendingValue===p&&(e._pendingValue=void 0)})}}),e[vn]=_o(i)},mounted(e,{value:t}){Qd(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[vn]=_o(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!vh(t,s[1],s[0]))&&Qd(e,t)}};function vh(e,t,s){if(!s)return Xt(e,t);if(Re(e))return Xt(e,t);if(Jt(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function Qd(e,t){let s=e.multiple,i=Re(t);if(!(s&&!i&&!Jt(t))){for(let o=0,r=e.options.length;oString(v)===String(p)):u.selected=fi(t,p)>-1}else u.selected=t.has(p);else if(Xt(Vs(u),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Vs(e){return"_value"in e?e._value:e.value}function tu(e,t){let s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}var yh=["ctrl","shift","alt","meta"],bh={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)=>yh.some(s=>e[`${s}Key`]&&!t.includes(s))},de=(e,t)=>{if(!e)return e;let s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((o,...r)=>{for(let u=0;u{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(o=>{if(!("key"in o))return;let r=an(o.key);if(t.some(u=>u===r||wh[u]===r))return e(o)}))},kh=ft({patchProp:fh},Qm),Zd;function Ch(){return Zd||(Zd=Id(kh))}var nu=((...e)=>{let t=Ch().createApp(...e),{mount:s}=t;return t.mount=i=>{let o=Eh(i);if(!o)return;let r=t._component;!Oe(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");let u=s(o,!1,Sh(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),u},t});function Sh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Eh(e){return lt(e)?document.querySelector(e):e}var lo=typeof document<"u";function su(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Nh(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&su(e.default)}var xe=Object.assign;function Bi(e,t){let s={};for(let i in t){let o=t[i];s[i]=Kt(o)?o.map(e):e(o)}return s}var Uo=()=>{},Kt=Array.isArray;function ca(e,t){let s={};for(let i in e)s[i]=i in t?t[i]:e[i];return s}var iu=/#/g,Rh=/&/g,Th=/\//g,Ph=/=/g,Dh=/\?/g,ru=/\+/g,Ah=/%5B/g,Ih=/%5D/g,au=/%5E/g,Oh=/%60/g,lu=/%7B/g,Mh=/%7C/g,du=/%7D/g,Vh=/%20/g;function pa(e){return e==null?"":encodeURI(""+e).replace(Mh,"|").replace(Ah,"[").replace(Ih,"]")}function uu(e){return pa(e).replace(lu,"{").replace(du,"}").replace(au,"^")}function da(e){return pa(e).replace(ru,"%2B").replace(Vh,"+").replace(iu,"%23").replace(Rh,"%26").replace(Oh,"`").replace(lu,"{").replace(du,"}").replace(au,"^")}function qh(e){return da(e).replace(Ph,"%3D")}function Lh(e){return pa(e).replace(iu,"%23").replace(Dh,"%3F")}function cu(e){return Lh(e).replace(Th,"%2F")}function Fo(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var $h=/\/$/,_h=e=>e.replace($h,"");function zi(e,t,s="/"){let i,o={},r="",u="",p=t.indexOf("#"),c=t.indexOf("?");return c=p>=0&&c>p?-1:c,c>=0&&(i=t.slice(0,c),r=t.slice(c,p>0?p:t.length),o=e(r.slice(1))),p>=0&&(i=i||t.slice(0,p),u=t.slice(p,t.length)),i=Uh(i??t,s),{fullPath:i+r+u,path:i,query:o,hash:Fo(u)}}function pu(e,t){let s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function fa(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function fu(e,t,s){let i=t.matched.length-1,o=s.matched.length-1;return i>-1&&i===o&&ro(t.matched[i],s.matched[o])&&ma(t.params,s.params)&&e(t.query)===e(s.query)&&t.hash===s.hash}function ro(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ma(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var s in e)if(!Fh(e[s],t[s]))return!1;return!0}function Fh(e,t){return Kt(e)?ou(e,t):Kt(t)?ou(t,e):e?.valueOf()===t?.valueOf()}function ou(e,t){return Kt(t)?e.length===t.length&&e.every((s,i)=>s===t[i]):e.length===1&&e[0]===t}function Uh(e,t){if(e.startsWith("/"))return e;if(!e)return t;let s=t.split("/"),i=e.split("/"),o=i[i.length-1];(o===".."||o===".")&&i.push("");let r=s.length-1,u,p;for(u=0;u1&&r--;else break;return s.slice(0,r).join("/")+"/"+i.slice(u).join("/")}var Pn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Hi=(function(e){return e.pop="pop",e.push="push",e})({}),ji=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function mu(e){if(!e)if(lo){let t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),_h(e)}var Bh=/^[^#]+#/;function hu(e,t){return e.replace(Bh,"#")+t}function zh(e,t){let s=document.documentElement.getBoundingClientRect(),i=e.getBoundingClientRect();return{behavior:t.behavior,left:i.left-s.left-(t.left||0),top:i.top-s.top-(t.top||0)}}var qs=()=>({left:window.scrollX,top:window.scrollY});function gu(e){let t;if("el"in e){let s=e.el,i=typeof s=="string"&&s.startsWith("#"),o=typeof s=="string"?i?document.getElementById(s.slice(1)):document.querySelector(s):s;if(!o)return;t=zh(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function ha(e,t){return(history.state?history.state.position-t:-1)+e}var ua=new Map;function vu(e,t){ua.set(e,t)}function yu(e){let t=ua.get(e);return ua.delete(e),t}function Hh(e){return typeof e=="string"||e&&typeof e=="object"}function ga(e){return typeof e=="string"||typeof e=="symbol"}var ct=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({}),bu=Symbol("");var Cne={[ct.MATCHER_NOT_FOUND]({location:e,currentLocation:t}){return`No match for ${JSON.stringify(e)}${t?` while being at -`+JSON.stringify(t):""}`},[ct.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Gh(t)}" via a navigation guard.`},[ct.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[ct.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[ct.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ao(e,t){return xe(new Error,{type:e,[bu]:!0},t)}function yn(e,t){return e instanceof Error&&bu in e&&(t==null||!!(e.type&t))}var jh=["params","query","hash"];function Gh(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of jh)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function wu(e){let t={};if(e===""||e==="?")return t;let s=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;io&&da(o)):[i&&da(i)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function ku(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=Kt(i)?i.map(o=>o==null?null:""+o):i==null?i:""+i)}return t}var Cu=Symbol(""),ya=Symbol(""),Gi=Symbol(""),Wi=Symbol(""),Ki=Symbol("");function Bo(){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 Tn(e,t,s,i,o,r=u=>u()){let u=i&&(i.enterCallbacks[o]=i.enterCallbacks[o]||[]);return()=>new Promise((p,c)=>{let v=m=>{m===!1?c(ao(ct.NAVIGATION_ABORTED,{from:s,to:t})):m instanceof Error?c(m):Hh(m)?c(ao(ct.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(u&&i.enterCallbacks[o]===u&&typeof m=="function"&&u.push(m),p())},g=r(()=>e.call(i&&i.instances[o],t,s,v)),y=Promise.resolve(g);e.length<3&&(y=y.then(v)),y.catch(m=>c(m))})}function Yi(e,t,s,i,o=r=>r()){let r=[];for(let u of e)for(let p in u.components){let c=u.components[p];if(!(t!=="beforeRouteEnter"&&!u.instances[p]))if(su(c)){let v=(c.__vccOpts||c)[t];v&&r.push(Tn(v,s,i,u,p,o))}else{let v=c();r.push(()=>v.then(g=>{if(!g)throw new Error(`Couldn't resolve component "${p}" at "${u.path}"`);let y=Nh(g)?g.default:g;u.mods[p]=g,u.components[p]=y;let m=(y.__vccOpts||y)[t];return m&&Tn(m,s,i,u,p,o)()}))}}return r}function Su(e,t){let s=[],i=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let u=0;uro(v,p))?i.push(p):s.push(p));let c=e.matched[u];c&&(t.matched.find(v=>ro(v,c))||o.push(c))}return[s,i,o]}var Wh=()=>location.protocol+"//"+location.host;function Vu(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),fa(p,"")}return fa(s,e)+i+o}function Kh(e,t,s,i){let o=[],r=[],u=null,p=({state:m})=>{let b=Vu(e,location),E=s.value,S=t.value,N=0;if(m){if(s.value=b,t.value=m,u&&u===E){u=null;return}N=S?m.position-S.position:0}else i(b);o.forEach(w=>{w(s.value,E,{delta:N,type:Hi.pop,direction:N?N>0?ji.forward:ji.back:ji.unknown})})};function c(){u=s.value}function v(m){o.push(m);let b=()=>{let E=o.indexOf(m);E>-1&&o.splice(E,1)};return r.push(b),b}function g(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(xe({},m.state,{scroll:qs()}),"")}}function y(){for(let m of r)m();r=[],window.removeEventListener("popstate",p),window.removeEventListener("pagehide",g),document.removeEventListener("visibilitychange",g)}return window.addEventListener("popstate",p),window.addEventListener("pagehide",g),document.addEventListener("visibilitychange",g),{pauseListeners:c,listen:v,destroy:y}}function Eu(e,t,s,i=!1,o=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:o?qs():null}}function Yh(e){let{history:t,location:s}=window,i={value:Vu(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(c,v,g){let y=e.indexOf("#"),m=y>-1?(s.host&&document.querySelector("base")?e:e.slice(y))+c:Wh()+e+c;try{t[g?"replaceState":"pushState"](v,"",m),o.value=v}catch(b){console.error(b),s[g?"replace":"assign"](m)}}function u(c,v){r(c,xe({},t.state,Eu(o.value.back,c,o.value.forward,!0),v,{position:o.value.position}),!0),i.value=c}function p(c,v){let g=xe({},o.value,t.state,{forward:c,scroll:qs()});r(g.current,g,!0),r(c,xe({},Eu(i.value,c,null),{position:g.position+1},v),!1),i.value=c}return{location:i,state:o,push:p,replace:u}}function qu(e){e=mu(e);let t=Yh(e),s=Kh(e,t.state,t.location,t.replace);function i(r,u=!0){u||s.pauseListeners(),history.go(r)}let o=xe({location:"",base:e,go:i,createHref:hu.bind(null,e)},t,s);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}var uo=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({}),gt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(gt||{}),Jh={type:uo.Static,value:""},Xh=/[a-zA-Z0-9_]/;function Qh(e){if(!e)return[[]];if(e==="/")return[[Jh]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${s})/"${v}": ${b}`)}let s=gt.Static,i=s,o=[],r;function u(){r&&o.push(r),r=[]}let p=0,c,v="",g="";function y(){v&&(s===gt.Static?r.push({type:uo.Static,value:v}):s===gt.Param||s===gt.ParamRegExp||s===gt.ParamRegExpEnd?(r.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${v}) must be alone in its segment. eg: '/:ids+.`),r.push({type:uo.Param,value:v,regexp:g,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),v="")}function m(){v+=c}for(;pt.length?t.length===1&&t[0]===It.Static+It.Segment?1:-1:0}function Lu(e,t){let s=0,i=e.score,o=t.score;for(;s0&&t[t.length-1]<0}var ng={strict:!1,end:!0,sensitive:!1};function og(e,t,s){let i=eg(Qh(e.path),s),o=xe(i,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function sg(e,t){let s=[],i=new Map;t=ca(ng,t);function o(y){return i.get(y)}function r(y,m,b){let E=!b,S=Pu(y);S.aliasOf=b&&b.record;let N=ca(t,y),w=[S];if("alias"in y){let F=typeof y.alias=="string"?[y.alias]:y.alias;for(let j of F)w.push(Pu(xe({},S,{components:b?b.record.components:S.components,path:j,aliasOf:b?b.record:S})))}let T,M;for(let F of w){let{path:j}=F;if(m&&j[0]!=="/"){let oe=m.record.path,_=oe[oe.length-1]==="/"?"":"/";F.path=m.record.path+(j&&_+j)}if(T=og(F,m,N),b?b.alias.push(T):(M=M||T,M!==T&&M.alias.push(T),E&&y.name&&!Du(T)&&u(y.name)),$u(T)&&c(T),S.children){let oe=S.children;for(let _=0;_{u(M)}:Uo}function u(y){if(ga(y)){let m=i.get(y);m&&(i.delete(y),s.splice(s.indexOf(m),1),m.children.forEach(u),m.alias.forEach(u))}else{let m=s.indexOf(y);m>-1&&(s.splice(m,1),y.record.name&&i.delete(y.record.name),y.children.forEach(u),y.alias.forEach(u))}}function p(){return s}function c(y){let m=ag(y,s);s.splice(m,0,y),y.record.name&&!Du(y)&&i.set(y.record.name,y)}function v(y,m){let b,E={},S,N;if("name"in y&&y.name){if(b=i.get(y.name),!b)throw ao(ct.MATCHER_NOT_FOUND,{location:y});N=b.record.name,E=xe(Tu(m.params,b.keys.filter(M=>!M.optional).concat(b.parent?b.parent.keys.filter(M=>M.optional):[]).map(M=>M.name)),y.params&&Tu(y.params,b.keys.map(M=>M.name))),S=b.stringify(E)}else if(y.path!=null)S=y.path,b=s.find(M=>M.re.test(S)),b&&(E=b.parse(S),N=b.record.name);else{if(b=m.name?i.get(m.name):s.find(M=>M.re.test(m.path)),!b)throw ao(ct.MATCHER_NOT_FOUND,{location:y,currentLocation:m});N=b.record.name,E=xe({},m.params,y.params),S=b.stringify(E)}let w=[],T=b;for(;T;)w.unshift(T.record),T=T.parent;return{name:N,path:S,params:E,matched:w,meta:rg(w)}}e.forEach(y=>r(y));function g(){s.length=0,i.clear()}return{addRoute:r,resolve:v,removeRoute:u,clearRoutes:g,getRoutes:p,getRecordMatcher:o}}function Tu(e,t){let s={};for(let i of t)i in e&&(s[i]=e[i]);return s}function Pu(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ig(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function ig(e){let t={},s=e.props||!1;if("component"in e)t.default=s;else for(let i in e.components)t[i]=typeof s=="object"?s[i]:s;return t}function Du(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function rg(e){return e.reduce((t,s)=>xe(t,s.meta),{})}function ag(e,t){let s=0,i=t.length;for(;s!==i;){let r=s+i>>1;Lu(e,t[r])<0?i=r:s=r+1}let o=lg(e);return o&&(i=t.lastIndexOf(o,i-1)),i}function lg(e){let t=e;for(;t=t.parent;)if($u(t)&&Lu(e,t)===0)return t}function $u({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Au(e){let t=qt(Gi),s=qt(Wi),i=!1,o=null,r=Nt(()=>{let g=Sn(e.to);return t.resolve(g)}),u=Nt(()=>{let{matched:g}=r.value,{length:y}=g,m=g[y-1],b=s.matched;if(!m||!b.length)return-1;let E=b.findIndex(ro.bind(null,m));if(E>-1)return E;let S=Iu(g[y-2]);return y>1&&Iu(m)===S&&b[b.length-1].path!==S?b.findIndex(ro.bind(null,g[y-2])):E}),p=Nt(()=>u.value>-1&&fg(s.params,r.value.params)),c=Nt(()=>u.value>-1&&u.value===s.matched.length-1&&ma(s.params,r.value.params));function v(g={}){if(pg(g)){let y=t[Sn(e.replace)?"replace":"push"](Sn(e.to)).catch(Uo);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>y),y}return Promise.resolve()}return{route:r,href:Nt(()=>r.value.href),isActive:p,isExactActive:c,navigate:v}}function dg(e){return e.length===1?e[0]:e}var ug=Ds({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Au,setup(e,{slots:t}){let s=at(Au(e)),{options:i}=qt(Gi),o=Nt(()=>({[Ou(e.activeClass,i.linkActiveClass,"router-link-active")]:s.isActive,[Ou(e.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{let r=t.default&&dg(t.default(s));return e.custom?r:De("a",{"aria-current":s.isExactActive?e.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:o.value},r)}}}),cg=ug;function pg(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function fg(e,t){for(let s in t){let i=t[s],o=e[s];if(typeof i=="string"){if(i!==o)return!1}else if(!Kt(o)||o.length!==i.length||i.some((r,u)=>r.valueOf()!==o[u].valueOf()))return!1}return!0}function Iu(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}var Ou=(e,t,s)=>e??t??s,mg=Ds({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:s}){let i=qt(Ki),o=Nt(()=>e.route||i.value),r=qt(ya,0),u=Nt(()=>{let v=Sn(r),{matched:g}=o.value,y;for(;(y=g[v])&&!y.components;)v++;return v}),p=Nt(()=>o.value.matched[u.value]);so(ya,Nt(()=>u.value+1)),so(Cu,p),so(Ki,o);let c=St();return ut(()=>[c.value,p.value,e.name],([v,g,y],[m,b,E])=>{g&&(g.instances[y]=v,b&&b!==g&&v&&v===m&&(g.leaveGuards.size||(g.leaveGuards=b.leaveGuards),g.updateGuards.size||(g.updateGuards=b.updateGuards))),v&&g&&(!b||!ro(g,b)||!m)&&(g.enterCallbacks[y]||[]).forEach(S=>S(v))},{flush:"post"}),()=>{let v=o.value,g=e.name,y=p.value,m=y&&y.components[g];if(!m)return Mu(s.default,{Component:m,route:v});let b=y.props[g],E=b?b===!0?v.params:typeof b=="function"?b(v):b:null,N=De(m,xe({},E,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(y.instances[g]=null)},ref:c}));return Mu(s.default,{Component:N,route:v})||N}}});function Mu(e,t){if(!e)return null;let s=e(t);return s.length===1?s[0]:s}var ba=mg;function _u(e){let t=sg(e.routes,e),s=e.parseQuery||wu,i=e.stringifyQuery||va,o=e.history,r=Bo(),u=Bo(),p=Bo(),c=ki(Pn),v=Pn;lo&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");let g=Bi.bind(null,X=>""+X),y=Bi.bind(null,cu),m=Bi.bind(null,Fo);function b(X,pe){let ue,me;return ga(X)?(ue=t.getRecordMatcher(X),me=pe):me=X,t.addRoute(me,ue)}function E(X){let pe=t.getRecordMatcher(X);pe&&t.removeRoute(pe)}function S(){return t.getRoutes().map(X=>X.record)}function N(X){return!!t.getRecordMatcher(X)}function w(X,pe){if(pe=xe({},pe||c.value),typeof X=="string"){let A=zi(s,X,pe.path),U=t.resolve({path:A.path},pe),Y=o.createHref(A.fullPath);return xe(A,U,{params:m(U.params),hash:Fo(A.hash),redirectedFrom:void 0,href:Y})}let ue;if(X.path!=null)ue=xe({},X,{path:zi(s,X.path,pe.path).path});else{let A=xe({},X.params);for(let U in A)A[U]==null&&delete A[U];ue=xe({},X,{params:y(A)}),pe.params=y(pe.params)}let me=t.resolve(ue,pe),be=X.hash||"";me.params=g(m(me.params));let Ve=pu(i,xe({},X,{hash:uu(be),path:me.path})),D=o.createHref(Ve);return xe({fullPath:Ve,hash:be,query:i===va?ku(X.query):X.query||{}},me,{redirectedFrom:void 0,href:D})}function T(X){return typeof X=="string"?zi(s,X,c.value.path):xe({},X)}function M(X,pe){if(v!==X)return ao(ct.NAVIGATION_CANCELLED,{from:pe,to:X})}function F(X){return _(X)}function j(X){return F(xe(T(X),{replace:!0}))}function oe(X,pe){let ue=X.matched[X.matched.length-1];if(ue&&ue.redirect){let{redirect:me}=ue,be=typeof me=="function"?me(X,pe):me;return typeof be=="string"&&(be=be.includes("?")||be.includes("#")?be=T(be):{path:be},be.params={}),xe({query:X.query,hash:X.hash,params:be.path!=null?{}:X.params},be)}}function _(X,pe){let ue=v=w(X),me=c.value,be=X.state,Ve=X.force,D=X.replace===!0,A=oe(ue,me);if(A)return _(xe(T(A),{state:typeof A=="object"?xe({},be,A.state):be,force:Ve,replace:D}),pe||ue);let U=ue;U.redirectedFrom=pe;let Y;return!Ve&&fu(i,me,ue)&&(Y=ao(ct.NAVIGATION_DUPLICATED,{to:U,from:me}),He(me,me,!0,!1)),(Y?Promise.resolve(Y):L(U,me)).catch(W=>yn(W)?yn(W,ct.NAVIGATION_GUARD_REDIRECT)?W:Be(W):fe(W,U,me)).then(W=>{if(W){if(yn(W,ct.NAVIGATION_GUARD_REDIRECT))return _(xe({replace:D},T(W.to),{state:typeof W.to=="object"?xe({},be,W.to.state):be,force:Ve}),pe||U)}else W=q(U,me,!0,D,be);return k(U,me,W),W})}function z(X,pe){let ue=M(X,pe);return ue?Promise.reject(ue):Promise.resolve()}function I(X){let pe=tt.values().next().value;return pe&&typeof pe.runWithContext=="function"?pe.runWithContext(X):X()}function L(X,pe){let ue,[me,be,Ve]=Su(X,pe);ue=Yi(me.reverse(),"beforeRouteLeave",X,pe);for(let A of me)A.leaveGuards.forEach(U=>{ue.push(Tn(U,X,pe))});let D=z.bind(null,X,pe);return ue.push(D),qe(ue).then(()=>{ue=[];for(let A of r.list())ue.push(Tn(A,X,pe));return ue.push(D),qe(ue)}).then(()=>{ue=Yi(be,"beforeRouteUpdate",X,pe);for(let A of be)A.updateGuards.forEach(U=>{ue.push(Tn(U,X,pe))});return ue.push(D),qe(ue)}).then(()=>{ue=[];for(let A of Ve)if(A.beforeEnter)if(Kt(A.beforeEnter))for(let U of A.beforeEnter)ue.push(Tn(U,X,pe));else ue.push(Tn(A.beforeEnter,X,pe));return ue.push(D),qe(ue)}).then(()=>(X.matched.forEach(A=>A.enterCallbacks={}),ue=Yi(Ve,"beforeRouteEnter",X,pe,I),ue.push(D),qe(ue))).then(()=>{ue=[];for(let A of u.list())ue.push(Tn(A,X,pe));return ue.push(D),qe(ue)}).catch(A=>yn(A,ct.NAVIGATION_CANCELLED)?A:Promise.reject(A))}function k(X,pe,ue){p.list().forEach(me=>I(()=>me(X,pe,ue)))}function q(X,pe,ue,me,be){let Ve=M(X,pe);if(Ve)return Ve;let D=pe===Pn,A=lo?history.state:{};ue&&(me||D?o.replace(X.fullPath,xe({scroll:D&&A&&A.scroll},be)):o.push(X.fullPath,be)),c.value=X,He(X,pe,ue,D),Be()}let G;function H(){G||(G=o.listen((X,pe,ue)=>{if(!Ne.listening)return;let me=w(X),be=oe(me,Ne.currentRoute.value);if(be){_(xe(be,{replace:!0,force:!0}),me).catch(Uo);return}v=me;let Ve=c.value;lo&&vu(ha(Ve.fullPath,ue.delta),qs()),L(me,Ve).catch(D=>yn(D,ct.NAVIGATION_ABORTED|ct.NAVIGATION_CANCELLED)?D:yn(D,ct.NAVIGATION_GUARD_REDIRECT)?(_(xe(T(D.to),{force:!0}),me).then(A=>{yn(A,ct.NAVIGATION_ABORTED|ct.NAVIGATION_DUPLICATED)&&!ue.delta&&ue.type===Hi.pop&&o.go(-1,!1)}).catch(Uo),Promise.reject()):(ue.delta&&o.go(-ue.delta,!1),fe(D,me,Ve))).then(D=>{D=D||q(me,Ve,!1),D&&(ue.delta&&!yn(D,ct.NAVIGATION_CANCELLED)?o.go(-ue.delta,!1):ue.type===Hi.pop&&yn(D,ct.NAVIGATION_ABORTED|ct.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),k(me,Ve,D)}).catch(Uo)}))}let K=Bo(),ne=Bo(),x;function fe(X,pe,ue){Be(X);let me=ne.list();return me.length?me.forEach(be=>be(X,pe,ue)):console.error(X),Promise.reject(X)}function he(){return x&&c.value!==Pn?Promise.resolve():new Promise((X,pe)=>{K.add([X,pe])})}function Be(X){return x||(x=!X,H(),K.list().forEach(([pe,ue])=>X?ue(X):pe()),K.reset()),X}function He(X,pe,ue,me){let{scrollBehavior:be}=e;if(!lo||!be)return Promise.resolve();let Ve=!ue&&yu(ha(X.fullPath,0))||(me||!ue)&&history.state&&history.state.scroll||null;return We().then(()=>be(X,pe,Ve)).then(D=>D&&gu(D)).catch(D=>fe(D,X,pe))}let Qe=X=>o.go(X),Ee,tt=new Set,Ne={currentRoute:c,listening:!0,addRoute:b,removeRoute:E,clearRoutes:t.clearRoutes,hasRoute:N,getRoutes:S,resolve:w,options:e,push:F,replace:j,go:Qe,back:()=>Qe(-1),forward:()=>Qe(1),beforeEach:r.add,beforeResolve:u.add,afterEach:p.add,onError:ne.add,isReady:he,install(X){X.component("RouterLink",cg),X.component("RouterView",ba),X.config.globalProperties.$router=Ne,Object.defineProperty(X.config.globalProperties,"$route",{enumerable:!0,get:()=>Sn(c)}),lo&&!Ee&&c.value===Pn&&(Ee=!0,F(o.location).catch(me=>{}));let pe={};for(let me in Pn)Object.defineProperty(pe,me,{get:()=>c.value[me],enumerable:!0});X.provide(Gi,Ne),X.provide(Wi,ms(pe)),X.provide(Ki,c);let ue=X.unmount;tt.add(X),X.unmount=function(){tt.delete(X),tt.size<1&&(v=Pn,G&&G(),G=null,c.value=Pn,Ee=!1,x=!1),ue()}}};function qe(X){return X.reduce((pe,ue)=>pe.then(()=>I(ue)),Promise.resolve())}return Ne}function Fu(e){return qt(Wi)}function Xi(e){return["author_pass","repo_extend","repo_never","repo_slot","repo_pack"].includes(e)}var Ji=new WeakMap;function Qi(e){if(!Ji.has(e)){let t=e.get("/api/billing/").finally(()=>Ji.delete(e));Ji.set(e,t)}return Ji.get(e)}function Zi(e,t,s=()=>{},i={}){let o=new URLSearchParams(window.location.search).get("billing");e.billing=null,e.billingLoading=!0,e.billingBusy=!1,e.billingError="",e.billingNotice="",e.billingPending=o==="success",e.billingRepository="";let r={billing_invalid_draft:"This draft could not be saved. Your form is unchanged. Try again.",billing_draft_not_found:"This checkout draft is unavailable or expired. Your local form is unchanged.",billing_recovery_required:"Your earlier payment needs verification. Please contact support before paying again.",billing_checkout_disabled:"New purchases are temporarily unavailable. You can still manage existing billing.",billing_unavailable:"Payments are not available yet. Please try again later.",billing_subscription_exists:"You already have a subscription. Use Manage billing to change or cancel it.",billing_checkout_in_progress:"You have another checkout open. Complete it, or wait up to 30 minutes for it to expire, before choosing a different option.",billing_busy:"Another billing request is processing. Please try again shortly.",billing_already_paid:"This repository or conference already has this paid option.",billing_invalid_review_window:"Conference packages cover up to 180 days. Check the review dates.",billing_invalid_conference:"Only a conference owner can pay for a conference awaiting payment.",repo_not_found:"Enter the ID of an existing repository that you own."};e.billingAmount=c=>c?.amount==null?"":new Intl.NumberFormat(void 0,{style:"currency",currency:c.currency,minimumFractionDigits:c.amount%100?2:0,maximumFractionDigits:2}).format(c.amount/100),e.billingPrice=c=>c.amount==null?"Price shown at checkout":e.billingAmount(c)+(c.interval?` / ${c.intervalCount>1?c.intervalCount+" ":""}${c.interval}`:" once"),e.billingPerMonth=c=>c?.amount==null?"":new Intl.NumberFormat(void 0,{style:"currency",currency:c.currency}).format(c.amount/1200),e.billingBytes=c=>{let v=Number(c)||0;if(v<1024)return`${v} B`;let g=Math.min(4,Math.floor(Math.log2(v)/10));return`${new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(v/1024**g)} ${["B","KB","MB","GB","TB"][g]}`},e.billingDate=c=>c?new Date(c).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"",e.loadBilling=()=>(e.billingError="",e.billingLoading=!0,Qi(t).then(c=>{e.billing=c.data,e.emit?.("billing:updated",c.data)}).catch(()=>{e.billingError="Billing could not be loaded. Try again."}).finally(()=>{e.billingLoading=!1}));async function u(c,v,g=!0){if(!(e.billingBusy||!e.billing?.csrf)){e.billingBusy=!0,e.billingError="";try{let y=await t.post(`/api/billing/${c}`,v,{headers:{"x-csrf-token":e.billing.csrf}});if(g)window.location.assign(y.data.url);else return await e.loadBilling(),await s(),e.billingPending=!!y.data.pending,e.emit?.("billing:pending",e.billingPending),e.billingNotice=y.data.pending?"Your payment is still pending. Please do not pay again.":i.confirmedMessage||"Billing status refreshed. Your confirmed access appears below.",y.data}catch(y){e.billingError=r[y.data?.error]||"The billing request failed. Please try again."}finally{e.billingBusy=!1}}}e.checkout=(c,v="",g={})=>u("checkout",{planId:c,target:v,...g}),e.billingPortal=()=>u("portal",{}),e.refreshBilling=()=>u("refresh",{},!1);async function p(){for(let c=0;c<5;c++){let v=await e.refreshBilling();if(!v||!v.pending)return;await new Promise(g=>window.setTimeout(g,3e3))}e.billingNotice="Confirmation is taking longer than usual. You can refresh payment status later. Please do not pay again."}e.loadBilling().then(()=>{o==="success"?(e.billingNotice="Checking your payment. Paid access starts after confirmation.",p()):o==="portal"?e.refreshBilling().then(()=>{e.billingPending=!1,e.emit?.("billing:pending",!1),e.billingNotice=i.portalMessage?.(e.billing)||"Your billing details are up to date."}):o==="cancelled"&&(e.billingNotice="Checkout was closed. No new paid access has been activated.")})}function Uu(e,t){return t?.split(".").reduce((s,i)=>s?.[i],e)}function Ls(e=null,t=new Map){let s=at({}),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,c=!1,v=!0)=>{let g=typeof u=="function"?()=>u(r):()=>Uu(r,u),y=ut(g,p,{deep:c,flush:"post"});return i.push(y),v&&We(()=>{o||p(g(),g())}),y},r.watchGroup=(u,p,c=!0)=>r.watch(()=>u.map(v=>Uu(r,v)),p,!0,c),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 c=()=>t.get(u)?.delete(p);return i.push(c),c},r.emit=(u,...p)=>{for(let c of[...t.get(u)||[]])c({},...p)},r.dispose=()=>{o=!0,i.splice(0).reverse().forEach(u=>u())},eo(r.dispose),r}function bt(){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)},eo(()=>{s=!0,e.forEach(clearTimeout),t.forEach(clearInterval)}),{timeout:i,interval:o}}function Bt(){let e=new Set;return eo(()=>{e.forEach(t=>t()),e.clear()}),(t,s,i,o)=>{t.addEventListener(s,i,o);let r=()=>{t.removeEventListener(s,i,o),e.delete(r)};return e.add(r),r}}var wa=function(e,t=e){let s=/\bXXXX-\d+\b/g;t.on("dark-mode",(I,L)=>{e.aceOption&&(e.aceOption.theme=L?"nord_dark":"chrome")});let i=bt(),o=Bt();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"],c=["wav","mp3","ogg","wma","flac","aac","m4a"],v=["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 g=(()=>{try{return window.localStorage?.getItem("wrapLines")}catch{return null}})();e.wrapLines=(g??(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 m(){let I=y();I&&(I.querySelectorAll("mark.md-find").forEach(L=>{L.replaceWith(window.document.createTextNode(L.textContent))}),I.normalize())}e.runMdFind=function(){m(),e.mdFindTotal=0,e.mdFindIndex=0;let I=(e.mdFindQuery||"").trim(),L=y();if(!I||!L)return;let k=!!e.mdFindCase,q=k?I:I.toLowerCase(),G=window.document.createTreeWalker(L,4),H=[];for(;G.nextNode();)(k?G.currentNode.nodeValue:G.currentNode.nodeValue.toLowerCase()).includes(q)&&H.push(G.currentNode);let K=0;for(let ne of H){let x=ne.nodeValue,fe=k?x:x.toLowerCase(),he=window.document.createDocumentFragment(),Be=0,He;for(;(He=fe.indexOf(q,Be))!==-1;){he.appendChild(window.document.createTextNode(x.slice(Be,He)));let Qe=window.document.createElement("mark");Qe.className="md-find",Qe.textContent=x.slice(He,He+I.length),he.appendChild(Qe),K++,Be=He+I.length}he.appendChild(window.document.createTextNode(x.slice(Be))),ne.parentNode.replaceChild(he,ne)}e.mdFindTotal=K,K&&e.stepMdFind(0)},e.stepMdFind=function(I){let L=y();if(!L||!e.mdFindTotal)return;let k=L.querySelectorAll("mark.md-find");e.mdFindIndex=(e.mdFindIndex+I+k.length)%k.length,k.forEach((q,G)=>q.classList.toggle("is-current",G===e.mdFindIndex)),k[e.mdFindIndex]?.scrollIntoView({block:"center",behavior:"smooth"})},e.toggleMdFind=function(I){if(e.mdFindOpen=I===void 0?!e.mdFindOpen:I,!e.mdFindOpen){m(),e.mdFindTotal=0;return}We(()=>window.document.querySelector(".md-find-input")?.focus())},e.findInFile=function(){let I=e.codeEditor;if(!I)return;I.focus(),I.execCommand("find");let L=()=>{let k=I.searchBox?.element;k&&(I.renderer.setScrollMargin(52,12,0,0),!k._dockObserver&&(k._dockObserver=new MutationObserver(()=>{I.renderer.setScrollMargin(k.style.display!=="none"?52:12,12,0,0)}),k._dockObserver.observe(k,{attributes:!0,attributeFilter:["style"]})))};L(),setTimeout(L,150)};let b=[[/^\s*(?:export\s+)?(?:default\s+)?(?:abstract\s+)?class\s+([A-Za-z_$][\w$]*)/,"class"],[/^\s*(?:export\s+)?(?:default\s+)?(?:async\s+)?function\s*\*?\s*([A-Za-z_$][\w$]*)/,"function"],[/^\s*(?:export\s+)?(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:async\s*)?(?:function|\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>)/,"function"],[/^\s*(?:async\s+)?def\s+([A-Za-z_]\w*)/,"function"],[/^\s*class\s+([A-Za-z_]\w*)/,"class"],[/^\s*func\s+(?:\([^)]*\)\s*)?([A-Za-z_]\w*)/,"function"],[/^\s*(?:pub\s+)?fn\s+([A-Za-z_]\w*)/,"function"],[/^\s*(?:public|private|protected|static|\s)+[\w<>\[\],\s]+\s+([A-Za-z_]\w*)\s*\([^;]*\)\s*\{?\s*$/,"function"]],E={content:null,list:[]};e.symbolsOpen=!1,e.symbols=function(){if(typeof e.content!="string"||e.content.length>2e6)return[];if(E.content===e.content)return E.list;let I=[];return e.content.split(` -`).forEach((L,k)=>{for(let[q,G]of b){let H=q.exec(L);if(H&&!/^(if|for|while|switch|return|catch)$/.test(H[1])){I.push({name:H[1],kind:G,line:k+1});break}}}),E={content:e.content,list:I.slice(0,300)},E.list},e.goToSymbol=function(I){e.symbolsOpen=!1;let L=e.codeEditor;L&&(L.scrollToLine(I-1,!0,!0,()=>{}),L.gotoLine(I,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+I),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 I=window.document.getElementById("goto-input");I&&(I.focus(),I.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let I=e.codeEditor;if(!I)return;let L=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),k=I.session.getLength();if(!L||+L[1]<1||+L[1]>k){e.gotoError="Enter a line from 1 to "+k;return}I.gotoLine(+L[1],L[2]?Math.max(0,+L[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",I.focus()},e.rootEntries=function(){return[...e.files||[]].sort((I,L)=>{let k=I.size==null,q=L.size==null;return k!==q?k?-1:1:I.name.localeCompare(L.name)})},e.formatSize=function(I){if(I==null)return"";if(I<1024)return I+" B";let L=I/1024,k=q=>q.toFixed(1).replace(/\.0$/,"");return L<1024?k(L)+" KB":L<1024*1024?k(L/1024)+" MB":k(L/1024/1024)+" GB"},e.fileSize=function(I){if(!I)return null;let L=I.replace(/^\/+/,""),k=(e.files||[]).find(q=>(q.path?q.path+"/":"")+q.name===L);return k&&k.size!=null?k.size:null},e.revealFolder=function(I){e.sidebarHidden=!1,e.sidebarCollapsed=!1,We(()=>{let L=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(I):I)+'"]');L&&(L.closest("li")?.classList.contains("open")||L.click(),L.scrollIntoView({block:"nearest"}),L.focus())})};let S={content:null,n:0},N=I=>{if(S.content===I)return S.n;let L=I;if(typeof L=="string")try{L=JSON.parse(L)}catch{L=null}let k=[],q=H=>{Array.isArray(H)?k.push(H.join("")):typeof H=="string"&&k.push(H)};(L&&(L.cells||(L.worksheets||[]).flatMap(H=>H.cells||[]))||[]).forEach(H=>{q(H?.source??H?.input),(H?.outputs||[]).forEach(K=>{q(K?.text),K?.data&&(q(K.data["text/plain"]),q(K.data["text/markdown"]),q(K.data["text/html"])),q(K?.traceback)})});let G=k.reduce((H,K)=>H+(K.match(s)||[]).length,0);return S={content:I,n:G},G};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=$s;let w=I=>I.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(I){let L=e.renderRedacted(I);if(!L||typeof window.DOMParser!="function")return L;let k=new window.DOMParser().parseFromString("
"+L+"
","text/html"),q={};return k.querySelectorAll("h1, h2, h3").forEach(G=>{let H=G.id||w(G.textContent);q[H]?H+="-"+ ++q[H]:q[H]=1,G.id=H}),k.body.firstChild.innerHTML};let T={content:null,list:[]};e.readmeToc=function(){if(e.type!=="html"||typeof e.content!="string")return[];if(T.content===e.content)return T.list;let L=[...new window.DOMParser().parseFromString("
"+e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)+"
","text/html").querySelectorAll("h2, h3")].map(k=>({id:k.id,text:k.textContent.trim(),level:k.tagName==="H3"?3:2})).slice(0,40);return T={content:e.content,list:L},L},e.activeHeading=null,o(window,"scroll",()=>{let I=e.readmeToc?e.readmeToc():[];if(!I.length)return;let L=150,k="",q="";for(let G of I){let H=window.document.getElementById(G.id);if(!H)continue;let K=H.getBoundingClientRect().top;K{let k=[],q=[],G="",H=!1;for(let K=0;KK.length>1||K[0]!=="")};e.isCsv=()=>typeof e.content=="string"&&e.type!=="html"&&/\.(csv|tsv)$/i.test(e.filePath||"")&&e.content.length<=1024*1024,e.csvRows=()=>{if(M.content!==e.content){let I=/\.tsv$/i.test(e.filePath||"")?" ":",";M={content:e.content,rows:F(e.content,I)}}return M.rows},e.csvNumCol=I=>{let L=e.csvRows().slice(1).map(k=>k[I]).filter(k=>k!=null&&String(k).trim()!=="");return L.length>0&&L.every(k=>e.csvNumeric(k))},e.csvNumeric=I=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(I)&&/\d/.test(I),e.redactParts=function(I){let L=[],k=0,q,G=/\bXXXX-(\d+)\b/g;for(I=String(I||"");q=G.exec(I);)q.index>k&&L.push({t:I.slice(k,q.index)}),L.push({n:q[1]}),k=q.index+q[0].length;return k{e.pathCopied=!1},1600))},e.contentCopied=!1,e.copyContent=async function(){if(typeof e.content!="string"||!window.navigator.clipboard?.writeText)return;let I=e.content;if(e.type==="html"&&e.url)if(e.preview)I=e.sourceContent;else try{I=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(I),e.contentCopied=!0,setTimeout(()=>{e.contentCopied=!1},1600)};function j(I){return r[I]?r[I]:I}function oe(I){return I=="pdf"?"pdf":I=="html"||I=="htm"?"html-doc":["md","markdown","mdown","mkdn","mdx"].includes(I)?"md":I=="org"?"org":I=="ipynb"?"IPython":u.indexOf(I)>-1?"text":p.indexOf(I)>-1?"image":v.indexOf(I)>-1?"media":c.indexOf(I)>-1?"audio":"code"}e.downloadUrl=()=>e.preview?e.url:e.url+"&download=true",e.prepareFile=function(I){e.showSource=!1,e.allowScripts=!1,e.imageSize="",e.filePath=I,e.paths=I.split("/").filter(Boolean);let L=e.filePath.toLowerCase(),k=L.lastIndexOf(".");k>-1&&(L=L.substring(k+1));let q={javascript:"JavaScript",typescript:"TypeScript",tsx:"TSX",jsx:"JSX",python:"Python",java:"Java",c_cpp:"C/C++",csharp:"C#",golang:"Go",rust:"Rust",ruby:"Ruby",php:"PHP",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",yaml:"YAML",markdown:"Markdown",sh:"Shell",dockerfile:"Dockerfile",xml:"XML",sql:"SQL",kotlin:"Kotlin",swift:"Swift",scala:"Scala",r:"R",julia:"Julia",latex:"LaTeX",toml:"TOML",csv:"CSV",tsv:"TSV",text:""},G=j(L);e.languageName=q[G]??(G?G.charAt(0).toUpperCase()+G.slice(1):""),e.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,tabSize:2,fontSize:window.matchMedia?.("(max-width: 767px)").matches?12:13,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!1,showPrintMargin:!1,highlightSelectedWord:!1,enableBehaviours:!0,fadeFoldWidgets:!1,mode:j(L),onLoad:function(H){e.codeEditor=pn(H);{let Ne=H.session,qe=Ne.getTokens.bind(Ne),X=/\bXXXX-\d+\b/g;if(Ne.getTokens=function(pe){let ue=qe(pe);if(!ue.some(be=>be.value.indexOf("XXXX-")!==-1))return ue;let me=[];for(let be of ue){if(be.value.indexOf("XXXX-")===-1){me.push(be);continue}let Ve=0;X.lastIndex=0;let D;for(;D=X.exec(be.value);)D.index>Ve&&me.push({type:be.type,value:be.value.slice(Ve,D.index)}),me.push({type:"redacted.n"+D[0].slice(5),value:D[0]}),Ve=D.index+D[0].length;Ve`.ace_redacted.ace_n${me+1}::after{content:"${me+1}"}`).join(""),window.document.head.appendChild(pe)}H.renderer.updateFull(!0)}H.session.setUseWrapMode(e.wrapLines!==!1);let K=H.container.closest?.(".file-card"),ne=()=>{if(!K)return;let Ne=H.renderer,qe=(Ne.layerConfig?.width||0)-(Ne.$size?.scrollerWidth||0);K.classList.toggle("at-right-edge",qe<=2||Ne.getScrollLeft()>=qe-2)};H.session.on("changeScrollLeft",ne),H.renderer.on("afterRender",ne),window.matchMedia?.("(max-width: 767px)").matches&&H.setOption("hScrollBarAlwaysVisible",!0);let x=ace.require("ace/range").Range,fe=null;function he(Ne,qe){fe!==null&&(H.session.removeMarker(fe),fe=null),Ne!=null&&(fe=H.session.addMarker(new x(Ne,0,qe,1),"highlighted-line","fullLine"))}function Be(Ne){let qe=!e.preview&&window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!qe){he(null);return}let X=parseInt(qe[1])-1,pe=qe[2]?parseInt(qe[2])-1:X;he(X,pe),Ne&&i.timeout(()=>{H.scrollToLine(X,!0,!0,function(){})},100)}Be(!0);let He=null;H.on("guttermousedown",function(Ne){let qe=Ne.getDocumentPosition().row,X=Ne.domEvent&&Ne.domEvent.shiftKey,pe=qe,ue=qe;X&&He!==null?(pe=Math.min(He,qe),ue=Math.max(He,qe)):He=qe;let me=pe===ue?`#L${pe+1}`:`#L${pe+1}-L${ue+1}`,be=window.location.pathname+window.location.search+me;e.preview||window.history.replaceState(null,"",be),he(pe,ue),Ne.stop()});let Qe=o(window,"hashchange",()=>Be(!1));H.setFontSize(e.aceOption.fontSize),H.setOptions({fontFamily:"'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace"}),H.container.style.lineHeight="20px",H.renderer.setPadding(16),H.renderer.setScrollMargin(12,12,0,0),H.renderer.updateFontSize(),H.setReadOnly(e.aceOption.readOnly),H.setKeyboardHandler(e.aceOption.keyBinding),H.setSelectionStyle(e.aceOption.fullLineSelection?"line":"text"),H.setOption("displayIndentGuides",!1),H.setHighlightActiveLine(e.aceOption.highlightActiveLine),e.aceOption.cursor=="hide"&&(H.renderer.$cursorLayer.element.style.display="none"),H.setHighlightGutterLine(e.aceOption.highlightGutterLine),H.setShowInvisibles(e.aceOption.showInvisibles),H.setDisplayIndentGuides(e.aceOption.showIndentGuides),H.renderer.setShowPrintMargin(e.aceOption.showPrintMargin),H.setHighlightSelectedWord(e.aceOption.highlightSelectedWord),H.session.setUseSoftTabs(e.aceOption.useSoftTab),H.session.setTabSize(e.aceOption.tabSize),H.setBehavioursEnabled(e.aceOption.enableBehaviours),H.setFadeFoldWidgets(e.aceOption.fadeFoldWidgets);let Ee=()=>!e.preview||H.isFocused(),tt=o(window,"keydown",Ne=>{if((Ne.ctrlKey||Ne.metaKey)&&!Ne.altKey&&Ne.key.toLowerCase()==="g"&&document.body.contains(H.container)&&Ee()){Ne.preventDefault(),e.gotoLine();return}if(Ne.altKey&&!Ne.ctrlKey&&!Ne.metaKey&&Ne.key.toLowerCase()==="z"&&document.body.contains(H.container)&&Ee()){Ne.preventDefault(),e.toggleWrap();return}(Ne.ctrlKey||Ne.metaKey)&&!Ne.altKey&&Ne.key.toLowerCase()==="f"&&document.body.contains(H.container)&&Ee()&&(Ne.preventDefault(),e.findInFile())});return()=>{Qe(),tt()}}},e.isDarkMode&&(e.aceOption.theme="nord_dark"),e.type=oe(L)},e.renderFileContent=function(I,L,k,q){if(e.type=L,e.content=I,e.sourceContent=I,e.content==""&&(e.content=null),e.type=="md"&&(e.content=renderMD(I,k),e.type="html"),e.type=="org"){let H=contentAbs2Relative(I);var G=new Org.Parser().parse(H).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1});e.content=DOMPurify.sanitize(G.toString()),e.type="html"}e.type=="code"&&q=="application/octet-stream"&&(e.type="binary",e.content="binary"),i.timeout(()=>{Prism.highlightAll()},50)};let _=["image","media","audio","pdf","IPython","binary"],z=["file_too_big","file_not_found","file_not_accessible","file_not_supported","folder_not_supported"];e.fileFrame=()=>e.filePath?_.includes(e.type)?e.content!=null:e.type==="error"?z.includes(e.content):e.content==null&&["code","text"].includes(e.type):!1,e.fileKind=()=>{let I=(e.paths||[])[(e.paths||[]).length-1]||"",L=I.lastIndexOf("."),k=L>0?I.slice(L+1).toUpperCase():"";if(e.type==="image")return(k==="JPG"?"JPEG":k)+" image";let q={WEBM:"WebM",OGG:"Ogg",OGV:"Ogg",MOV:"QuickTime",M4V:"M4V",MKV:"Matroska"};return e.type==="media"?(q[k]||k)+" video":e.type==="audio"?k+" audio":e.type==="pdf"?"PDF":e.type==="IPython"?"Jupyter notebook":e.type==="binary"?"Binary file":e.languageName||(k?k+" file":"File")},e.imageSize="",e.onImageLoad=I=>{let L=I.target;L?.naturalWidth&&(e.imageSize=`${L.naturalWidth} \xD7 ${L.naturalHeight}`)},o(document,"click",I=>{e.preview&&(I.target.closest?.(".symbols")||(e.symbolsOpen=!1),I.target.closest?.(".tb-more")||(e.moreOpen=!1),I.target.closest?.(".tb-toc-m")||(e.tocOpen=!1),I.target.isConnected&&!I.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1))})};function ka(e,t,s){let i,o=!1,r="form-draft:"+s,u=()=>Object.fromEntries(t.map(m=>[m,e[m]])),p=()=>JSON.stringify(u()),c=m=>{for(let b of t)Object.prototype.hasOwnProperty.call(m,b)&&(e[b]=m[b]);e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate))},v=()=>{try{window.sessionStorage.removeItem(r)}catch{}},g=(m=!1)=>{if(i!==void 0){if(m&&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){v();return}try{window.sessionStorage.setItem(r,JSON.stringify({account:e.user?.username||null,savedAt:Date.now(),values:u()})),e.draftSaved=!0}catch{}}},y=()=>g(!0);return e.on("routeLeave",y),window.addEventListener("beforeunload",y),e.on("dispose",()=>window.removeEventListener("beforeunload",y)),{restore(){i=p();let m;try{m=JSON.parse(window.sessionStorage.getItem(r)||"null")}catch{}let b=m&&m.account===(e.user?.username||null)&&Date.now()-m.savedAt<30*6e4&&m.values;return b&&(c(m.values),e.draftRestored=!0),o||(o=!0,e.watch(()=>u(),()=>g(),!0)),e.unsavedChanges=p()!==i,!!b},checkpoint(){return document.querySelectorAll("input, select, textarea").forEach(m=>{m._field?.binding.state===e&&m._field.timer&&m._field.commit()}),JSON.parse(p())},accept(m){i=JSON.stringify(m),e.draftRestored=!1,g()},discard(){document.querySelectorAll("input, select, textarea").forEach(m=>{m._field?.binding.state!==e||!m._field.timer||(clearTimeout(m._field.timer),m._field.timer=null,m.value=m._field.binding.value??"")}),i!==void 0&&c(JSON.parse(i)),e.draftRestored=!1,g()},clear(){i=p(),e.unsavedChanges=!1,e.draftRestored=!1,e.draftSaved=!1,v()}}}function Bu(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(m=>(!e.logView.severity||e.logSeverity(m.sample)===e.logView.severity)&&(!y||Object.values(m.sample).join(" ").toLowerCase().includes(y))).slice().sort((m,b)=>e.logView.sort==="count"?b.count-m.count:Date.parse(b.last)-Date.parse(m.last))},e.shortLogId=y=>y?y.slice(0,8):"",e.isLogIdentifier=(y,m)=>typeof m=="string"&&m.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 m=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",E=Number(y.status||y.httpStatus),S={502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"}[E];return m+" "+b+(E?" with HTTP "+E+(S?" ("+S+")":""):"")+"."},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((m,b)=>Date.parse(b.ts)-Date.parse(m.ts)),e.historyDetailFields=y=>{try{let m=JSON.parse(y?._detailJson||"{}");return m&&typeof m=="object"?Object.entries(m):[["value",m]]}catch{return[["record",y?._detailJson||""]]}},e.logFieldText=y=>typeof y=="object"?JSON.stringify(y):String(y??""),e.captureErrorScroll=y=>{let m=[];for(let b=y?.parentElement;b;b=b.parentElement)m.push({element:b,top:b.scrollTop,left:b.scrollLeft});return m},e.restoreErrorScroll=y=>y.forEach(({element:m,top:b,left:E})=>{m.isConnected&&(m.scrollTop=b,m.scrollLeft=E)});let s=null,i=null,o=null,r=[];e.selectLog=async(y,m)=>{if(i=m||document.activeElement,r=e.captureErrorScroll(i),c++,e.trace=null,e.traceSelection=null,e.traceLoading=!1,e.logDetailTab="overview",e.selectedLog=y,await We(),v||e.selectedLog!==y||e.errorSource!=="central")return;document.getElementById("log-detail-title")?.focus({preventScroll:!0}),document.querySelector(".log-inspector")?.scrollIntoView?.({block:"start"});let b=["requestId","jobId"].find(E=>e.logTraceId(y,E));b&&e.lookupTrace(b,y.sample[b],document.getElementById("trace-selector-"+b),y.sample,!0)},e.closeLogDetail=async()=>{e.selectedLog=null,c++,e.trace=null,e.traceSelection=null,e.traceLoading=!1,await We(),i?.isConnected?(i.focus({preventScroll:!0}),e.restoreErrorScroll(r)):document.getElementById("error-source-central")?.focus()},e.logFilters={window:"1h",service:"",release:""},e.logAppliedFilters={...e.logFilters},e.logData=null,e.logLoading=!1,e.logFailure="",e.logSnapshotStale=!1,e.trace=null,e.traceLoading=!1,e.traceSelection=null;let u=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i,p=0,c=0,v=!1;e.logStateText=y=>({ready:"Central logs available",empty:"No warnings, errors or HTTP 5xx returned in this window",disabled:"Central lookup is not configured. Application history is available in the other source.",misconfigured:"Central lookup configuration is invalid. Ask an operator to check it.",unreachable:"Central logging is unreachable. Application history is available in the other source.",busy:"Central lookup is busy. Retry shortly.",partial:"Partial results: a result limit or invalid record reduced coverage.",stale:"Central logging responds, but expected application telemetry is stale or missing."})[y]||"Central log status has not been checked",e.refreshLogs=async()=>{let y=++p,m={...e.logFilters};e.logLoading=!0,e.logFailure="",e.trace=null,e.traceSelection=null,e.traceLoading=!1,e.selectedLog=null,c++;try{let b=await t.get("/api/admin/errors/investigation",{params:m});if(v||y!==p)return;e.logData=b.data,e.logAppliedFilters=m,e.logSnapshotStale=!!b.data?.end&&Date.now()-Date.parse(b.data.end)>9e4}catch(b){if(v||y!==p)return;e.logData=null,e.logFailure=b?.status===400?"Use a Git release SHA or \u2018unknown\u2019 and retry.":"Could not load central log status. Retry or open Application history."}finally{!v&&y===p&&(e.logLoading=!1)}},e.lookupTrace=async(y,m,b,E,S=!1)=>{if(!["requestId","jobId"].includes(y)||!u.test(m||""))return;e.errorSource==="central"&&e.selectedLog&&(e.logDetailTab="timeline"),e.errorSource==="history"&&(e.historyView="timeline"),o=e.errorSource,s=b||document.activeElement;let N=++c;if(e.traceSelection={kind:y,id:m,context:E?{event:E.errorCode||E.event||E.displayMessage||E.message,service:E.service||E.module}:null},e.trace=null,e.traceLoading=!0,await We(),v||N!==c)return;let w=document.getElementById("log-timeline-title");S||(w?.focus(),w?.scrollIntoView?.({block:"nearest"}));try{let T=await t.get("/api/admin/errors/correlation",{params:{kind:y,id:m,window:e.logData?.window||e.logAppliedFilters.window}});!v&&N===c&&(e.trace=T.data)}catch{!v&&N===c&&(e.trace={state:"unreachable",events:[]})}finally{!v&&N===c&&(e.traceLoading=!1)}},e.showLogTimeline=y=>{if(e.logDetailTab="timeline",e.traceSelection)return;let m=["requestId","jobId"].find(b=>e.logTraceId(e.selectedLog,b));m&&e.lookupTrace(m,e.selectedLog.sample[m],y,e.selectedLog.sample)},e.closeTrace=async()=>{e.logDetailTab="overview",e.historyView="overview",c++,e.trace=null,e.traceSelection=null,e.traceLoading=!1,await We(),s?.isConnected&&o===e.errorSource?s.focus():document.getElementById("error-source-"+e.errorSource)?.focus()},e.logTraceId=(y,m)=>{let b=y?.sample?.[m]||y?.raw?.find(E=>E&&typeof E=="object")?.[m];return u.test(b||"")?b:null},e.watch("errorSource",()=>{c++,e.trace=null,e.traceSelection=null,e.traceLoading=!1,e.selectedLog=null,e.historySelected=null,e.historyView="overview",e.expanded={}},!1,!1);let g=window.setInterval(()=>{e.logSnapshotStale=!!e.logData?.end&&Date.now()-Date.parse(e.logData.end)>9e4},15e3);e.on("dispose",()=>{v=!0,p++,c++,window.clearInterval(g)}),e.refreshLogs()}var Na={};ff(Na,{bigNum:()=>gg,date:()=>Rg,dateEcho:()=>Sa,diff:()=>bg,duration:()=>$n,filter:()=>Eg,humanFileSize:()=>hg,humanTime:()=>Ca,limitTo:()=>Sg,money:()=>kg,number:()=>wg,orderBy:()=>Ng,plural:()=>Tg,shortDate:()=>Ea,statusLabel:()=>yg,statusMsg:()=>xi,title:()=>vg,uppercase:()=>Cg});var hg=e=>String(window.humanFileSize(e)).replace(/([KMGTPEZY])iB$/,"$1B").replace(/\.0 ([KMGTPEZY]?B)$/," $1"),gg=(function(){return function(t){let s=Number(t)||0,i=Math.abs(s);return i<1e3?String(s):i<1e4?(s/1e3).toFixed(1).replace(/\.0$/,"")+"k":i<1e6?Math.round(s/1e3)+"k":i<1e7?(s/1e6).toFixed(1).replace(/\.0$/,"")+"M":Math.round(s/1e6)+"M"}})(),Ca=(function(){return function(t){if(!t)return"never";var s=null;t instanceof Date&&(s=t,t=Math.round((Date.now()-t)/1e3)),(typeof t=="string"||typeof t=="number")&&(s=new Date(t),t=Math.round((Date.now()-s)/1e3));var i=t<0?"from now":"ago";if(Math.abs(t)>7200*24)return(s&&!isNaN(s)?s:new Date(Date.now()-t*1e3)).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"});t=Math.abs(t);for(var o=[t/60/60/24/365,t/60/60/24/30,t/60/60/24/7,t/60/60/24,t/60/60,t/60,t],r=["year","month","week","day","hour","minute","second"],u=0;u1&&(c+="s"),p>=1)return p+" "+c+" "+i}return"0 seconds "+i}})(),vg=(function(){return function(e){if(!e)return e;e=e.toLowerCase();var t=e.split(" "),s=t.map(function(i){return i.charAt(0).toUpperCase()+i.substring(1,i.length)});return s.join(" ")}})(),yg=(function(){var e={ready:"Ready",error:"Error",expired:"Expired",expiring:"Expiring",removed:"Removed",removing:"Removing",queue:"Queued",download:"Downloading",downloaded:"Downloaded",preparing:"Preparing",anonymizing:"Anonymizing"};return function(t){if(!t)return"";if(e[t])return e[t];var s=String(t).replace(/[_-]+/g," ").toLowerCase();return s.charAt(0).toUpperCase()+s.slice(1)}})(),xi=(function(){var e={branch_not_found:"Branch not found on GitHub",repo_not_found:"Repository not found on GitHub",repository_not_found:"Repository not found on GitHub",repo_not_accessible:"Repository is not accessible with your token",pr_not_found:"Pull request not found on GitHub",gist_not_found:"Gist not found on GitHub",commit_not_found:"Commit not found on GitHub",repo_too_big:"Repository exceeds the size limit",repository_too_big:"Repository exceeds the size limit",quota_exceeded:"Storage quota exceeded",incomplete_record:"Incomplete record: missing identifier"};return function(t){if(!t)return t;var s=t.match(/^rate_limited:(\d+)$/);if(s){var i=Math.max(0,Math.ceil((parseInt(s[1],10)-Date.now())/1e3));if(i<=0)return"Rate limited \u2014 resuming soon";var o=Math.floor(i/60),r=i%60;return"Rate limited \u2014 retrying in "+(o>0?o+"m "+r+"s":r+"s")}if(e[t])return e[t];var u=/^([a-z0-9]+(?:_[a-z0-9]+)+):\s*\S/.exec(t);if(u){if(e[u[1]])return e[u[1]];var p=u[1].replace(/_/g," ");return p.charAt(0).toUpperCase()+p.slice(1)}if(/^[a-z0-9]+(_[a-z0-9]+)+$/.test(t)){var c=t.replace(/_/g," ");return c.charAt(0).toUpperCase()+c.slice(1)}return t}})(),bg=(function(e){let t=i=>i.replace(/&/g,"&").replace(//g,">");function s(i,o){if(!o)return;let r=o.newPath&&o.newPath!=="/dev/null"?o.newPath:o.oldPath||"",u=o.oldPath==="/dev/null"?"added":o.newPath==="/dev/null"?"deleted":o.oldPath&&o.newPath&&o.oldPath!==o.newPath?"renamed":"modified";if(i.push('
'),i.push('
'+t(r)+''+u+"
"),o.lines.length){i.push('');for(let p of o.lines)i.push('");i.push("
'+(p.oldNo||"")+''+(p.newNo||"")+''+(p.kind==="add"?"+":p.kind==="remove"?"-":"")+''+t(p.text)+"
")}i.push("
")}return function(i){if(!i)return i;let o=[],r=null,u=0,p=0,c=()=>(r||(r={oldPath:"",newPath:"",lines:[]}),r),v=()=>{r&&(r.lines.length||r.oldPath||r.newPath)&&(s(o,r),r=null)},g=i.split(` +`+JSON.stringify(t):""}`},[ct.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Gh(t)}" via a navigation guard.`},[ct.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[ct.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[ct.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ao(e,t){return xe(new Error,{type:e,[bu]:!0},t)}function yn(e,t){return e instanceof Error&&bu in e&&(t==null||!!(e.type&t))}var jh=["params","query","hash"];function Gh(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of jh)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function wu(e){let t={};if(e===""||e==="?")return t;let s=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;io&&da(o)):[i&&da(i)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function ku(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=Kt(i)?i.map(o=>o==null?null:""+o):i==null?i:""+i)}return t}var Cu=Symbol(""),ya=Symbol(""),Gi=Symbol(""),Wi=Symbol(""),Ki=Symbol("");function Bo(){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 Tn(e,t,s,i,o,r=u=>u()){let u=i&&(i.enterCallbacks[o]=i.enterCallbacks[o]||[]);return()=>new Promise((p,c)=>{let v=m=>{m===!1?c(ao(ct.NAVIGATION_ABORTED,{from:s,to:t})):m instanceof Error?c(m):Hh(m)?c(ao(ct.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(u&&i.enterCallbacks[o]===u&&typeof m=="function"&&u.push(m),p())},g=r(()=>e.call(i&&i.instances[o],t,s,v)),y=Promise.resolve(g);e.length<3&&(y=y.then(v)),y.catch(m=>c(m))})}function Yi(e,t,s,i,o=r=>r()){let r=[];for(let u of e)for(let p in u.components){let c=u.components[p];if(!(t!=="beforeRouteEnter"&&!u.instances[p]))if(su(c)){let v=(c.__vccOpts||c)[t];v&&r.push(Tn(v,s,i,u,p,o))}else{let v=c();r.push(()=>v.then(g=>{if(!g)throw new Error(`Couldn't resolve component "${p}" at "${u.path}"`);let y=Nh(g)?g.default:g;u.mods[p]=g,u.components[p]=y;let m=(y.__vccOpts||y)[t];return m&&Tn(m,s,i,u,p,o)()}))}}return r}function Su(e,t){let s=[],i=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let u=0;uro(v,p))?i.push(p):s.push(p));let c=e.matched[u];c&&(t.matched.find(v=>ro(v,c))||o.push(c))}return[s,i,o]}var Wh=()=>location.protocol+"//"+location.host;function Vu(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),fa(p,"")}return fa(s,e)+i+o}function Kh(e,t,s,i){let o=[],r=[],u=null,p=({state:m})=>{let b=Vu(e,location),E=s.value,S=t.value,N=0;if(m){if(s.value=b,t.value=m,u&&u===E){u=null;return}N=S?m.position-S.position:0}else i(b);o.forEach(w=>{w(s.value,E,{delta:N,type:Hi.pop,direction:N?N>0?ji.forward:ji.back:ji.unknown})})};function c(){u=s.value}function v(m){o.push(m);let b=()=>{let E=o.indexOf(m);E>-1&&o.splice(E,1)};return r.push(b),b}function g(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(xe({},m.state,{scroll:qs()}),"")}}function y(){for(let m of r)m();r=[],window.removeEventListener("popstate",p),window.removeEventListener("pagehide",g),document.removeEventListener("visibilitychange",g)}return window.addEventListener("popstate",p),window.addEventListener("pagehide",g),document.addEventListener("visibilitychange",g),{pauseListeners:c,listen:v,destroy:y}}function Eu(e,t,s,i=!1,o=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:o?qs():null}}function Yh(e){let{history:t,location:s}=window,i={value:Vu(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(c,v,g){let y=e.indexOf("#"),m=y>-1?(s.host&&document.querySelector("base")?e:e.slice(y))+c:Wh()+e+c;try{t[g?"replaceState":"pushState"](v,"",m),o.value=v}catch(b){console.error(b),s[g?"replace":"assign"](m)}}function u(c,v){r(c,xe({},t.state,Eu(o.value.back,c,o.value.forward,!0),v,{position:o.value.position}),!0),i.value=c}function p(c,v){let g=xe({},o.value,t.state,{forward:c,scroll:qs()});r(g.current,g,!0),r(c,xe({},Eu(i.value,c,null),{position:g.position+1},v),!1),i.value=c}return{location:i,state:o,push:p,replace:u}}function qu(e){e=mu(e);let t=Yh(e),s=Kh(e,t.state,t.location,t.replace);function i(r,u=!0){u||s.pauseListeners(),history.go(r)}let o=xe({location:"",base:e,go:i,createHref:hu.bind(null,e)},t,s);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}var uo=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({}),gt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(gt||{}),Jh={type:uo.Static,value:""},Xh=/[a-zA-Z0-9_]/;function Qh(e){if(!e)return[[]];if(e==="/")return[[Jh]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${s})/"${v}": ${b}`)}let s=gt.Static,i=s,o=[],r;function u(){r&&o.push(r),r=[]}let p=0,c,v="",g="";function y(){v&&(s===gt.Static?r.push({type:uo.Static,value:v}):s===gt.Param||s===gt.ParamRegExp||s===gt.ParamRegExpEnd?(r.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${v}) must be alone in its segment. eg: '/:ids+.`),r.push({type:uo.Param,value:v,regexp:g,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),v="")}function m(){v+=c}for(;pt.length?t.length===1&&t[0]===It.Static+It.Segment?1:-1:0}function Lu(e,t){let s=0,i=e.score,o=t.score;for(;s0&&t[t.length-1]<0}var ng={strict:!1,end:!0,sensitive:!1};function og(e,t,s){let i=eg(Qh(e.path),s),o=xe(i,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function sg(e,t){let s=[],i=new Map;t=ca(ng,t);function o(y){return i.get(y)}function r(y,m,b){let E=!b,S=Pu(y);S.aliasOf=b&&b.record;let N=ca(t,y),w=[S];if("alias"in y){let F=typeof y.alias=="string"?[y.alias]:y.alias;for(let j of F)w.push(Pu(xe({},S,{components:b?b.record.components:S.components,path:j,aliasOf:b?b.record:S})))}let T,M;for(let F of w){let{path:j}=F;if(m&&j[0]!=="/"){let oe=m.record.path,_=oe[oe.length-1]==="/"?"":"/";F.path=m.record.path+(j&&_+j)}if(T=og(F,m,N),b?b.alias.push(T):(M=M||T,M!==T&&M.alias.push(T),E&&y.name&&!Du(T)&&u(y.name)),$u(T)&&c(T),S.children){let oe=S.children;for(let _=0;_{u(M)}:Uo}function u(y){if(ga(y)){let m=i.get(y);m&&(i.delete(y),s.splice(s.indexOf(m),1),m.children.forEach(u),m.alias.forEach(u))}else{let m=s.indexOf(y);m>-1&&(s.splice(m,1),y.record.name&&i.delete(y.record.name),y.children.forEach(u),y.alias.forEach(u))}}function p(){return s}function c(y){let m=ag(y,s);s.splice(m,0,y),y.record.name&&!Du(y)&&i.set(y.record.name,y)}function v(y,m){let b,E={},S,N;if("name"in y&&y.name){if(b=i.get(y.name),!b)throw ao(ct.MATCHER_NOT_FOUND,{location:y});N=b.record.name,E=xe(Tu(m.params,b.keys.filter(M=>!M.optional).concat(b.parent?b.parent.keys.filter(M=>M.optional):[]).map(M=>M.name)),y.params&&Tu(y.params,b.keys.map(M=>M.name))),S=b.stringify(E)}else if(y.path!=null)S=y.path,b=s.find(M=>M.re.test(S)),b&&(E=b.parse(S),N=b.record.name);else{if(b=m.name?i.get(m.name):s.find(M=>M.re.test(m.path)),!b)throw ao(ct.MATCHER_NOT_FOUND,{location:y,currentLocation:m});N=b.record.name,E=xe({},m.params,y.params),S=b.stringify(E)}let w=[],T=b;for(;T;)w.unshift(T.record),T=T.parent;return{name:N,path:S,params:E,matched:w,meta:rg(w)}}e.forEach(y=>r(y));function g(){s.length=0,i.clear()}return{addRoute:r,resolve:v,removeRoute:u,clearRoutes:g,getRoutes:p,getRecordMatcher:o}}function Tu(e,t){let s={};for(let i of t)i in e&&(s[i]=e[i]);return s}function Pu(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ig(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function ig(e){let t={},s=e.props||!1;if("component"in e)t.default=s;else for(let i in e.components)t[i]=typeof s=="object"?s[i]:s;return t}function Du(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function rg(e){return e.reduce((t,s)=>xe(t,s.meta),{})}function ag(e,t){let s=0,i=t.length;for(;s!==i;){let r=s+i>>1;Lu(e,t[r])<0?i=r:s=r+1}let o=lg(e);return o&&(i=t.lastIndexOf(o,i-1)),i}function lg(e){let t=e;for(;t=t.parent;)if($u(t)&&Lu(e,t)===0)return t}function $u({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Au(e){let t=qt(Gi),s=qt(Wi),i=!1,o=null,r=Nt(()=>{let g=Sn(e.to);return t.resolve(g)}),u=Nt(()=>{let{matched:g}=r.value,{length:y}=g,m=g[y-1],b=s.matched;if(!m||!b.length)return-1;let E=b.findIndex(ro.bind(null,m));if(E>-1)return E;let S=Iu(g[y-2]);return y>1&&Iu(m)===S&&b[b.length-1].path!==S?b.findIndex(ro.bind(null,g[y-2])):E}),p=Nt(()=>u.value>-1&&fg(s.params,r.value.params)),c=Nt(()=>u.value>-1&&u.value===s.matched.length-1&&ma(s.params,r.value.params));function v(g={}){if(pg(g)){let y=t[Sn(e.replace)?"replace":"push"](Sn(e.to)).catch(Uo);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>y),y}return Promise.resolve()}return{route:r,href:Nt(()=>r.value.href),isActive:p,isExactActive:c,navigate:v}}function dg(e){return e.length===1?e[0]:e}var ug=Ds({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Au,setup(e,{slots:t}){let s=at(Au(e)),{options:i}=qt(Gi),o=Nt(()=>({[Ou(e.activeClass,i.linkActiveClass,"router-link-active")]:s.isActive,[Ou(e.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{let r=t.default&&dg(t.default(s));return e.custom?r:De("a",{"aria-current":s.isExactActive?e.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:o.value},r)}}}),cg=ug;function pg(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function fg(e,t){for(let s in t){let i=t[s],o=e[s];if(typeof i=="string"){if(i!==o)return!1}else if(!Kt(o)||o.length!==i.length||i.some((r,u)=>r.valueOf()!==o[u].valueOf()))return!1}return!0}function Iu(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}var Ou=(e,t,s)=>e??t??s,mg=Ds({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:s}){let i=qt(Ki),o=Nt(()=>e.route||i.value),r=qt(ya,0),u=Nt(()=>{let v=Sn(r),{matched:g}=o.value,y;for(;(y=g[v])&&!y.components;)v++;return v}),p=Nt(()=>o.value.matched[u.value]);so(ya,Nt(()=>u.value+1)),so(Cu,p),so(Ki,o);let c=St();return ut(()=>[c.value,p.value,e.name],([v,g,y],[m,b,E])=>{g&&(g.instances[y]=v,b&&b!==g&&v&&v===m&&(g.leaveGuards.size||(g.leaveGuards=b.leaveGuards),g.updateGuards.size||(g.updateGuards=b.updateGuards))),v&&g&&(!b||!ro(g,b)||!m)&&(g.enterCallbacks[y]||[]).forEach(S=>S(v))},{flush:"post"}),()=>{let v=o.value,g=e.name,y=p.value,m=y&&y.components[g];if(!m)return Mu(s.default,{Component:m,route:v});let b=y.props[g],E=b?b===!0?v.params:typeof b=="function"?b(v):b:null,N=De(m,xe({},E,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(y.instances[g]=null)},ref:c}));return Mu(s.default,{Component:N,route:v})||N}}});function Mu(e,t){if(!e)return null;let s=e(t);return s.length===1?s[0]:s}var ba=mg;function _u(e){let t=sg(e.routes,e),s=e.parseQuery||wu,i=e.stringifyQuery||va,o=e.history,r=Bo(),u=Bo(),p=Bo(),c=ki(Pn),v=Pn;lo&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");let g=Bi.bind(null,X=>""+X),y=Bi.bind(null,cu),m=Bi.bind(null,Fo);function b(X,ce){let ue,me;return ga(X)?(ue=t.getRecordMatcher(X),me=ce):me=X,t.addRoute(me,ue)}function E(X){let ce=t.getRecordMatcher(X);ce&&t.removeRoute(ce)}function S(){return t.getRoutes().map(X=>X.record)}function N(X){return!!t.getRecordMatcher(X)}function w(X,ce){if(ce=xe({},ce||c.value),typeof X=="string"){let A=zi(s,X,ce.path),U=t.resolve({path:A.path},ce),J=o.createHref(A.fullPath);return xe(A,U,{params:m(U.params),hash:Fo(A.hash),redirectedFrom:void 0,href:J})}let ue;if(X.path!=null)ue=xe({},X,{path:zi(s,X.path,ce.path).path});else{let A=xe({},X.params);for(let U in A)A[U]==null&&delete A[U];ue=xe({},X,{params:y(A)}),ce.params=y(ce.params)}let me=t.resolve(ue,ce),be=X.hash||"";me.params=g(m(me.params));let Ve=pu(i,xe({},X,{hash:uu(be),path:me.path})),D=o.createHref(Ve);return xe({fullPath:Ve,hash:be,query:i===va?ku(X.query):X.query||{}},me,{redirectedFrom:void 0,href:D})}function T(X){return typeof X=="string"?zi(s,X,c.value.path):xe({},X)}function M(X,ce){if(v!==X)return ao(ct.NAVIGATION_CANCELLED,{from:ce,to:X})}function F(X){return _(X)}function j(X){return F(xe(T(X),{replace:!0}))}function oe(X,ce){let ue=X.matched[X.matched.length-1];if(ue&&ue.redirect){let{redirect:me}=ue,be=typeof me=="function"?me(X,ce):me;return typeof be=="string"&&(be=be.includes("?")||be.includes("#")?be=T(be):{path:be},be.params={}),xe({query:X.query,hash:X.hash,params:be.path!=null?{}:X.params},be)}}function _(X,ce){let ue=v=w(X),me=c.value,be=X.state,Ve=X.force,D=X.replace===!0,A=oe(ue,me);if(A)return _(xe(T(A),{state:typeof A=="object"?xe({},be,A.state):be,force:Ve,replace:D}),ce||ue);let U=ue;U.redirectedFrom=ce;let J;return!Ve&&fu(i,me,ue)&&(J=ao(ct.NAVIGATION_DUPLICATED,{to:U,from:me}),He(me,me,!0,!1)),(J?Promise.resolve(J):L(U,me)).catch(W=>yn(W)?yn(W,ct.NAVIGATION_GUARD_REDIRECT)?W:Be(W):fe(W,U,me)).then(W=>{if(W){if(yn(W,ct.NAVIGATION_GUARD_REDIRECT))return _(xe({replace:D},T(W.to),{state:typeof W.to=="object"?xe({},be,W.to.state):be,force:Ve}),ce||U)}else W=q(U,me,!0,D,be);return k(U,me,W),W})}function B(X,ce){let ue=M(X,ce);return ue?Promise.reject(ue):Promise.resolve()}function I(X){let ce=tt.values().next().value;return ce&&typeof ce.runWithContext=="function"?ce.runWithContext(X):X()}function L(X,ce){let ue,[me,be,Ve]=Su(X,ce);ue=Yi(me.reverse(),"beforeRouteLeave",X,ce);for(let A of me)A.leaveGuards.forEach(U=>{ue.push(Tn(U,X,ce))});let D=B.bind(null,X,ce);return ue.push(D),qe(ue).then(()=>{ue=[];for(let A of r.list())ue.push(Tn(A,X,ce));return ue.push(D),qe(ue)}).then(()=>{ue=Yi(be,"beforeRouteUpdate",X,ce);for(let A of be)A.updateGuards.forEach(U=>{ue.push(Tn(U,X,ce))});return ue.push(D),qe(ue)}).then(()=>{ue=[];for(let A of Ve)if(A.beforeEnter)if(Kt(A.beforeEnter))for(let U of A.beforeEnter)ue.push(Tn(U,X,ce));else ue.push(Tn(A.beforeEnter,X,ce));return ue.push(D),qe(ue)}).then(()=>(X.matched.forEach(A=>A.enterCallbacks={}),ue=Yi(Ve,"beforeRouteEnter",X,ce,I),ue.push(D),qe(ue))).then(()=>{ue=[];for(let A of u.list())ue.push(Tn(A,X,ce));return ue.push(D),qe(ue)}).catch(A=>yn(A,ct.NAVIGATION_CANCELLED)?A:Promise.reject(A))}function k(X,ce,ue){p.list().forEach(me=>I(()=>me(X,ce,ue)))}function q(X,ce,ue,me,be){let Ve=M(X,ce);if(Ve)return Ve;let D=ce===Pn,A=lo?history.state:{};ue&&(me||D?o.replace(X.fullPath,xe({scroll:D&&A&&A.scroll},be)):o.push(X.fullPath,be)),c.value=X,He(X,ce,ue,D),Be()}let G;function H(){G||(G=o.listen((X,ce,ue)=>{if(!Ne.listening)return;let me=w(X),be=oe(me,Ne.currentRoute.value);if(be){_(xe(be,{replace:!0,force:!0}),me).catch(Uo);return}v=me;let Ve=c.value;lo&&vu(ha(Ve.fullPath,ue.delta),qs()),L(me,Ve).catch(D=>yn(D,ct.NAVIGATION_ABORTED|ct.NAVIGATION_CANCELLED)?D:yn(D,ct.NAVIGATION_GUARD_REDIRECT)?(_(xe(T(D.to),{force:!0}),me).then(A=>{yn(A,ct.NAVIGATION_ABORTED|ct.NAVIGATION_DUPLICATED)&&!ue.delta&&ue.type===Hi.pop&&o.go(-1,!1)}).catch(Uo),Promise.reject()):(ue.delta&&o.go(-ue.delta,!1),fe(D,me,Ve))).then(D=>{D=D||q(me,Ve,!1),D&&(ue.delta&&!yn(D,ct.NAVIGATION_CANCELLED)?o.go(-ue.delta,!1):ue.type===Hi.pop&&yn(D,ct.NAVIGATION_ABORTED|ct.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),k(me,Ve,D)}).catch(Uo)}))}let Y=Bo(),ne=Bo(),x;function fe(X,ce,ue){Be(X);let me=ne.list();return me.length?me.forEach(be=>be(X,ce,ue)):console.error(X),Promise.reject(X)}function he(){return x&&c.value!==Pn?Promise.resolve():new Promise((X,ce)=>{Y.add([X,ce])})}function Be(X){return x||(x=!X,H(),Y.list().forEach(([ce,ue])=>X?ue(X):ce()),Y.reset()),X}function He(X,ce,ue,me){let{scrollBehavior:be}=e;if(!lo||!be)return Promise.resolve();let Ve=!ue&&yu(ha(X.fullPath,0))||(me||!ue)&&history.state&&history.state.scroll||null;return We().then(()=>be(X,ce,Ve)).then(D=>D&&gu(D)).catch(D=>fe(D,X,ce))}let Qe=X=>o.go(X),Ee,tt=new Set,Ne={currentRoute:c,listening:!0,addRoute:b,removeRoute:E,clearRoutes:t.clearRoutes,hasRoute:N,getRoutes:S,resolve:w,options:e,push:F,replace:j,go:Qe,back:()=>Qe(-1),forward:()=>Qe(1),beforeEach:r.add,beforeResolve:u.add,afterEach:p.add,onError:ne.add,isReady:he,install(X){X.component("RouterLink",cg),X.component("RouterView",ba),X.config.globalProperties.$router=Ne,Object.defineProperty(X.config.globalProperties,"$route",{enumerable:!0,get:()=>Sn(c)}),lo&&!Ee&&c.value===Pn&&(Ee=!0,F(o.location).catch(me=>{}));let ce={};for(let me in Pn)Object.defineProperty(ce,me,{get:()=>c.value[me],enumerable:!0});X.provide(Gi,Ne),X.provide(Wi,ms(ce)),X.provide(Ki,c);let ue=X.unmount;tt.add(X),X.unmount=function(){tt.delete(X),tt.size<1&&(v=Pn,G&&G(),G=null,c.value=Pn,Ee=!1,x=!1),ue()}}};function qe(X){return X.reduce((ce,ue)=>ce.then(()=>I(ue)),Promise.resolve())}return Ne}function Fu(e){return qt(Wi)}function Xi(e){return["author_pass","repo_extend","repo_never","repo_slot","repo_pack"].includes(e)}var Ji=new WeakMap;function Qi(e){if(!Ji.has(e)){let t=e.get("/api/billing/").finally(()=>Ji.delete(e));Ji.set(e,t)}return Ji.get(e)}function Zi(e,t,s=()=>{},i={}){let o=new URLSearchParams(window.location.search).get("billing");e.billing=null,e.billingLoading=!0,e.billingBusy=!1,e.billingError="",e.billingNotice="",e.billingPending=o==="success",e.billingRepository="";let r={billing_invalid_draft:"This draft could not be saved. Your form is unchanged. Try again.",billing_draft_not_found:"This checkout draft is unavailable or expired. Your local form is unchanged.",billing_recovery_required:"Your earlier payment needs verification. Please contact support before paying again.",billing_checkout_disabled:"New purchases are temporarily unavailable. You can still manage existing billing.",billing_unavailable:"Payments are not available yet. Please try again later.",billing_subscription_exists:"You already have a subscription. Use Manage billing to change or cancel it.",billing_checkout_in_progress:"You have another checkout open. Complete it, or wait up to 30 minutes for it to expire, before choosing a different option.",billing_busy:"Another billing request is processing. Please try again shortly.",billing_already_paid:"This repository or conference already has this paid option.",billing_invalid_review_window:"Conference packages cover up to 180 days. Check the review dates.",billing_invalid_conference:"Only a conference owner can pay for a conference awaiting payment.",repo_not_found:"Enter the ID of an existing repository that you own."};e.billingAmount=c=>c?.amount==null?"":new Intl.NumberFormat(void 0,{style:"currency",currency:c.currency,minimumFractionDigits:c.amount%100?2:0,maximumFractionDigits:2}).format(c.amount/100),e.billingPrice=c=>c.amount==null?"Price shown at checkout":e.billingAmount(c)+(c.interval?` / ${c.intervalCount>1?c.intervalCount+" ":""}${c.interval}`:" once"),e.billingPerMonth=c=>c?.amount==null?"":new Intl.NumberFormat(void 0,{style:"currency",currency:c.currency}).format(c.amount/1200),e.billingBytes=c=>{let v=Number(c)||0;if(v<1024)return`${v} B`;let g=Math.min(4,Math.floor(Math.log2(v)/10));return`${new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(v/1024**g)} ${["B","KB","MB","GB","TB"][g]}`},e.billingDate=c=>c?new Date(c).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"",e.loadBilling=()=>(e.billingError="",e.billingLoading=!0,Qi(t).then(c=>{e.billing=c.data,e.emit?.("billing:updated",c.data)}).catch(()=>{e.billingError="Billing could not be loaded. Try again."}).finally(()=>{e.billingLoading=!1}));async function u(c,v,g=!0){if(!(e.billingBusy||!e.billing?.csrf)){e.billingBusy=!0,e.billingError="";try{let y=await t.post(`/api/billing/${c}`,v,{headers:{"x-csrf-token":e.billing.csrf}});if(g)window.location.assign(y.data.url);else return await e.loadBilling(),await s(),e.billingPending=!!y.data.pending,e.emit?.("billing:pending",e.billingPending),e.billingNotice=y.data.pending?"Your payment is still pending. Please do not pay again.":i.confirmedMessage||"Billing status refreshed. Your confirmed access appears below.",y.data}catch(y){e.billingError=r[y.data?.error]||"The billing request failed. Please try again."}finally{e.billingBusy=!1}}}e.checkout=(c,v="",g={})=>u("checkout",{planId:c,target:v,...g}),e.billingPortal=()=>u("portal",{}),e.refreshBilling=()=>u("refresh",{},!1);async function p(){for(let c=0;c<5;c++){let v=await e.refreshBilling();if(!v||!v.pending)return;await new Promise(g=>window.setTimeout(g,3e3))}e.billingNotice="Confirmation is taking longer than usual. You can refresh payment status later. Please do not pay again."}e.loadBilling().then(()=>{o==="success"?(e.billingNotice="Checking your payment. Paid access starts after confirmation.",p()):o==="portal"?e.refreshBilling().then(()=>{e.billingPending=!1,e.emit?.("billing:pending",!1),e.billingNotice=i.portalMessage?.(e.billing)||"Your billing details are up to date."}):o==="cancelled"&&(e.billingNotice="Checkout was closed. No new paid access has been activated.")})}function Uu(e,t){return t?.split(".").reduce((s,i)=>s?.[i],e)}function Ls(e=null,t=new Map){let s=at({}),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,c=!1,v=!0)=>{let g=typeof u=="function"?()=>u(r):()=>Uu(r,u),y=ut(g,p,{deep:c,flush:"post"});return i.push(y),v&&We(()=>{o||p(g(),g())}),y},r.watchGroup=(u,p,c=!0)=>r.watch(()=>u.map(v=>Uu(r,v)),p,!0,c),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 c=()=>t.get(u)?.delete(p);return i.push(c),c},r.emit=(u,...p)=>{for(let c of[...t.get(u)||[]])c({},...p)},r.dispose=()=>{o=!0,i.splice(0).reverse().forEach(u=>u())},eo(r.dispose),r}function bt(){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)},eo(()=>{s=!0,e.forEach(clearTimeout),t.forEach(clearInterval)}),{timeout:i,interval:o}}function Bt(){let e=new Set;return eo(()=>{e.forEach(t=>t()),e.clear()}),(t,s,i,o)=>{t.addEventListener(s,i,o);let r=()=>{t.removeEventListener(s,i,o),e.delete(r)};return e.add(r),r}}var wa=function(e,t=e){let s=/\bXXXX-\d+\b/g;t.on("dark-mode",(I,L)=>{e.aceOption&&(e.aceOption.theme=L?"nord_dark":"chrome")});let i=bt(),o=Bt();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"],c=["wav","mp3","ogg","wma","flac","aac","m4a"],v=["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 g=(()=>{try{return window.localStorage?.getItem("wrapLines")}catch{return null}})();e.wrapLines=(g??(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 m(){let I=y();I&&(I.querySelectorAll("mark.md-find").forEach(L=>{L.replaceWith(window.document.createTextNode(L.textContent))}),I.normalize())}e.runMdFind=function(){m(),e.mdFindTotal=0,e.mdFindIndex=0;let I=(e.mdFindQuery||"").trim(),L=y();if(!I||!L)return;let k=!!e.mdFindCase,q=k?I:I.toLowerCase(),G=window.document.createTreeWalker(L,4),H=[];for(;G.nextNode();)(k?G.currentNode.nodeValue:G.currentNode.nodeValue.toLowerCase()).includes(q)&&H.push(G.currentNode);let Y=0;for(let ne of H){let x=ne.nodeValue,fe=k?x:x.toLowerCase(),he=window.document.createDocumentFragment(),Be=0,He;for(;(He=fe.indexOf(q,Be))!==-1;){he.appendChild(window.document.createTextNode(x.slice(Be,He)));let Qe=window.document.createElement("mark");Qe.className="md-find",Qe.textContent=x.slice(He,He+I.length),he.appendChild(Qe),Y++,Be=He+I.length}he.appendChild(window.document.createTextNode(x.slice(Be))),ne.parentNode.replaceChild(he,ne)}e.mdFindTotal=Y,Y&&e.stepMdFind(0)},e.stepMdFind=function(I){let L=y();if(!L||!e.mdFindTotal)return;let k=L.querySelectorAll("mark.md-find");e.mdFindIndex=(e.mdFindIndex+I+k.length)%k.length,k.forEach((q,G)=>q.classList.toggle("is-current",G===e.mdFindIndex)),k[e.mdFindIndex]?.scrollIntoView({block:"center",behavior:"smooth"})},e.toggleMdFind=function(I){if(e.mdFindOpen=I===void 0?!e.mdFindOpen:I,!e.mdFindOpen){m(),e.mdFindTotal=0;return}We(()=>window.document.querySelector(".md-find-input")?.focus())},e.findInFile=function(){let I=e.codeEditor;if(!I)return;I.focus(),I.execCommand("find");let L=()=>{let k=I.searchBox?.element;k&&(I.renderer.setScrollMargin(52,12,0,0),!k._dockObserver&&(k._dockObserver=new MutationObserver(()=>{I.renderer.setScrollMargin(k.style.display!=="none"?52:12,12,0,0)}),k._dockObserver.observe(k,{attributes:!0,attributeFilter:["style"]})))};L(),setTimeout(L,150)};let b=[[/^\s*(?:export\s+)?(?:default\s+)?(?:abstract\s+)?class\s+([A-Za-z_$][\w$]*)/,"class"],[/^\s*(?:export\s+)?(?:default\s+)?(?:async\s+)?function\s*\*?\s*([A-Za-z_$][\w$]*)/,"function"],[/^\s*(?:export\s+)?(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:async\s*)?(?:function|\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>)/,"function"],[/^\s*(?:async\s+)?def\s+([A-Za-z_]\w*)/,"function"],[/^\s*class\s+([A-Za-z_]\w*)/,"class"],[/^\s*func\s+(?:\([^)]*\)\s*)?([A-Za-z_]\w*)/,"function"],[/^\s*(?:pub\s+)?fn\s+([A-Za-z_]\w*)/,"function"],[/^\s*(?:public|private|protected|static|\s)+[\w<>\[\],\s]+\s+([A-Za-z_]\w*)\s*\([^;]*\)\s*\{?\s*$/,"function"]],E={content:null,list:[]};e.symbolsOpen=!1,e.symbols=function(){if(typeof e.content!="string"||e.content.length>2e6)return[];if(E.content===e.content)return E.list;let I=[];return e.content.split(` +`).forEach((L,k)=>{for(let[q,G]of b){let H=q.exec(L);if(H&&!/^(if|for|while|switch|return|catch)$/.test(H[1])){I.push({name:H[1],kind:G,line:k+1});break}}}),E={content:e.content,list:I.slice(0,300)},E.list},e.goToSymbol=function(I){e.symbolsOpen=!1;let L=e.codeEditor;L&&(L.scrollToLine(I-1,!0,!0,()=>{}),L.gotoLine(I,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+I),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 I=window.document.getElementById("goto-input");I&&(I.focus(),I.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let I=e.codeEditor;if(!I)return;let L=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),k=I.session.getLength();if(!L||+L[1]<1||+L[1]>k){e.gotoError="Enter a line from 1 to "+k;return}I.gotoLine(+L[1],L[2]?Math.max(0,+L[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",I.focus()},e.rootEntries=function(){return[...e.files||[]].sort((I,L)=>{let k=I.size==null,q=L.size==null;return k!==q?k?-1:1:I.name.localeCompare(L.name)})},e.formatSize=function(I){if(I==null)return"";if(I<1024)return I+" B";let L=I/1024,k=q=>q.toFixed(1).replace(/\.0$/,"");return L<1024?k(L)+" KB":L<1024*1024?k(L/1024)+" MB":k(L/1024/1024)+" GB"},e.fileSize=function(I){if(!I)return null;let L=I.replace(/^\/+/,""),k=(e.files||[]).find(q=>(q.path?q.path+"/":"")+q.name===L);return k&&k.size!=null?k.size:null},e.revealFolder=function(I){e.sidebarHidden=!1,e.sidebarCollapsed=!1,We(()=>{let L=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(I):I)+'"]');L&&(L.closest("li")?.classList.contains("open")||L.click(),L.scrollIntoView({block:"nearest"}),L.focus())})};let S={content:null,n:0},N=I=>{if(S.content===I)return S.n;let L=I;if(typeof L=="string")try{L=JSON.parse(L)}catch{L=null}let k=[],q=H=>{Array.isArray(H)?k.push(H.join("")):typeof H=="string"&&k.push(H)};(L&&(L.cells||(L.worksheets||[]).flatMap(H=>H.cells||[]))||[]).forEach(H=>{q(H?.source??H?.input),(H?.outputs||[]).forEach(Y=>{q(Y?.text),Y?.data&&(q(Y.data["text/plain"]),q(Y.data["text/markdown"]),q(Y.data["text/html"])),q(Y?.traceback)})});let G=k.reduce((H,Y)=>H+(Y.match(s)||[]).length,0);return S={content:I,n:G},G};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=$s;let w=I=>I.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(I){let L=e.renderRedacted(I);if(!L||typeof window.DOMParser!="function")return L;let k=new window.DOMParser().parseFromString("
"+L+"
","text/html"),q={};return k.querySelectorAll("h1, h2, h3").forEach(G=>{let H=G.id||w(G.textContent);q[H]?H+="-"+ ++q[H]:q[H]=1,G.id=H}),k.body.firstChild.innerHTML};let T={content:null,list:[]};e.readmeToc=function(){if(e.type!=="html"||typeof e.content!="string")return[];if(T.content===e.content)return T.list;let L=[...new window.DOMParser().parseFromString("
"+e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)+"
","text/html").querySelectorAll("h2, h3")].map(k=>({id:k.id,text:k.textContent.trim(),level:k.tagName==="H3"?3:2})).slice(0,40);return T={content:e.content,list:L},L},e.activeHeading=null,o(window,"scroll",()=>{let I=e.readmeToc?e.readmeToc():[];if(!I.length)return;let L=150,k="",q="";for(let G of I){let H=window.document.getElementById(G.id);if(!H)continue;let Y=H.getBoundingClientRect().top;Y{let k=[],q=[],G="",H=!1;for(let Y=0;YY.length>1||Y[0]!=="")};e.isCsv=()=>typeof e.content=="string"&&e.type!=="html"&&/\.(csv|tsv)$/i.test(e.filePath||"")&&e.content.length<=1024*1024,e.csvRows=()=>{if(M.content!==e.content){let I=/\.tsv$/i.test(e.filePath||"")?" ":",";M={content:e.content,rows:F(e.content,I)}}return M.rows},e.csvNumCol=I=>{let L=e.csvRows().slice(1).map(k=>k[I]).filter(k=>k!=null&&String(k).trim()!=="");return L.length>0&&L.every(k=>e.csvNumeric(k))},e.csvNumeric=I=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(I)&&/\d/.test(I),e.redactParts=function(I){let L=[],k=0,q,G=/\bXXXX-(\d+)\b/g;for(I=String(I||"");q=G.exec(I);)q.index>k&&L.push({t:I.slice(k,q.index)}),L.push({n:q[1]}),k=q.index+q[0].length;return k{e.pathCopied=!1},1600))},e.contentCopied=!1,e.copyContent=async function(){if(typeof e.content!="string"||!window.navigator.clipboard?.writeText)return;let I=e.content;if(e.type==="html"&&e.url)if(e.preview)I=e.sourceContent;else try{I=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(I),e.contentCopied=!0,setTimeout(()=>{e.contentCopied=!1},1600)};function j(I){return r[I]?r[I]:I}function oe(I){return I=="pdf"?"pdf":I=="html"||I=="htm"?"html-doc":["md","markdown","mdown","mkdn","mdx"].includes(I)?"md":I=="org"?"org":I=="ipynb"?"IPython":u.indexOf(I)>-1?"text":p.indexOf(I)>-1?"image":v.indexOf(I)>-1?"media":c.indexOf(I)>-1?"audio":"code"}e.downloadUrl=()=>e.preview?e.url:e.url+"&download=true",e.prepareFile=function(I){e.showSource=!1,e.allowScripts=!1,e.imageSize="",e.filePath=I,e.paths=I.split("/").filter(Boolean);let L=e.filePath.toLowerCase(),k=L.lastIndexOf(".");k>-1&&(L=L.substring(k+1));let q={javascript:"JavaScript",typescript:"TypeScript",tsx:"TSX",jsx:"JSX",python:"Python",java:"Java",c_cpp:"C/C++",csharp:"C#",golang:"Go",rust:"Rust",ruby:"Ruby",php:"PHP",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",yaml:"YAML",markdown:"Markdown",sh:"Shell",dockerfile:"Dockerfile",xml:"XML",sql:"SQL",kotlin:"Kotlin",swift:"Swift",scala:"Scala",r:"R",julia:"Julia",latex:"LaTeX",toml:"TOML",csv:"CSV",tsv:"TSV",text:""},G=j(L);e.languageName=q[G]??(G?G.charAt(0).toUpperCase()+G.slice(1):""),e.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,tabSize:2,fontSize:window.matchMedia?.("(max-width: 767px)").matches?12:13,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!1,showPrintMargin:!1,highlightSelectedWord:!1,enableBehaviours:!0,fadeFoldWidgets:!1,mode:j(L),onLoad:function(H){e.codeEditor=pn(H);{let Ne=H.session,qe=Ne.getTokens.bind(Ne),X=/\bXXXX-\d+\b/g;if(Ne.getTokens=function(ce){let ue=qe(ce);if(!ue.some(be=>be.value.indexOf("XXXX-")!==-1))return ue;let me=[];for(let be of ue){if(be.value.indexOf("XXXX-")===-1){me.push(be);continue}let Ve=0;X.lastIndex=0;let D;for(;D=X.exec(be.value);)D.index>Ve&&me.push({type:be.type,value:be.value.slice(Ve,D.index)}),me.push({type:"redacted.n"+D[0].slice(5),value:D[0]}),Ve=D.index+D[0].length;Ve`.ace_redacted.ace_n${me+1}::after{content:"${me+1}"}`).join(""),window.document.head.appendChild(ce)}H.renderer.updateFull(!0)}H.session.setUseWrapMode(e.wrapLines!==!1);let Y=H.container.closest?.(".file-card"),ne=()=>{if(!Y)return;let Ne=H.renderer,qe=(Ne.layerConfig?.width||0)-(Ne.$size?.scrollerWidth||0);Y.classList.toggle("at-right-edge",qe<=2||Ne.getScrollLeft()>=qe-2)};H.session.on("changeScrollLeft",ne),H.renderer.on("afterRender",ne),window.matchMedia?.("(max-width: 767px)").matches&&H.setOption("hScrollBarAlwaysVisible",!0);let x=ace.require("ace/range").Range,fe=null;function he(Ne,qe){fe!==null&&(H.session.removeMarker(fe),fe=null),Ne!=null&&(fe=H.session.addMarker(new x(Ne,0,qe,1),"highlighted-line","fullLine"))}function Be(Ne){let qe=!e.preview&&window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!qe){he(null);return}let X=parseInt(qe[1])-1,ce=qe[2]?parseInt(qe[2])-1:X;he(X,ce),Ne&&i.timeout(()=>{H.scrollToLine(X,!0,!0,function(){})},100)}Be(!0);let He=null;H.on("guttermousedown",function(Ne){let qe=Ne.getDocumentPosition().row,X=Ne.domEvent&&Ne.domEvent.shiftKey,ce=qe,ue=qe;X&&He!==null?(ce=Math.min(He,qe),ue=Math.max(He,qe)):He=qe;let me=ce===ue?`#L${ce+1}`:`#L${ce+1}-L${ue+1}`,be=window.location.pathname+window.location.search+me;e.preview||window.history.replaceState(null,"",be),he(ce,ue),Ne.stop()});let Qe=o(window,"hashchange",()=>Be(!1));H.setFontSize(e.aceOption.fontSize),H.setOptions({fontFamily:"'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace"}),H.container.style.lineHeight="20px",H.renderer.setPadding(16),H.renderer.setScrollMargin(12,12,0,0),H.renderer.updateFontSize(),H.setReadOnly(e.aceOption.readOnly),H.setKeyboardHandler(e.aceOption.keyBinding),H.setSelectionStyle(e.aceOption.fullLineSelection?"line":"text"),H.setOption("displayIndentGuides",!1),H.setHighlightActiveLine(e.aceOption.highlightActiveLine),e.aceOption.cursor=="hide"&&(H.renderer.$cursorLayer.element.style.display="none"),H.setHighlightGutterLine(e.aceOption.highlightGutterLine),H.setShowInvisibles(e.aceOption.showInvisibles),H.setDisplayIndentGuides(e.aceOption.showIndentGuides),H.renderer.setShowPrintMargin(e.aceOption.showPrintMargin),H.setHighlightSelectedWord(e.aceOption.highlightSelectedWord),H.session.setUseSoftTabs(e.aceOption.useSoftTab),H.session.setTabSize(e.aceOption.tabSize),H.setBehavioursEnabled(e.aceOption.enableBehaviours),H.setFadeFoldWidgets(e.aceOption.fadeFoldWidgets);let Ee=()=>!e.preview||H.isFocused(),tt=o(window,"keydown",Ne=>{if((Ne.ctrlKey||Ne.metaKey)&&!Ne.altKey&&Ne.key.toLowerCase()==="g"&&document.body.contains(H.container)&&Ee()){Ne.preventDefault(),e.gotoLine();return}if(Ne.altKey&&!Ne.ctrlKey&&!Ne.metaKey&&Ne.key.toLowerCase()==="z"&&document.body.contains(H.container)&&Ee()){Ne.preventDefault(),e.toggleWrap();return}(Ne.ctrlKey||Ne.metaKey)&&!Ne.altKey&&Ne.key.toLowerCase()==="f"&&document.body.contains(H.container)&&Ee()&&(Ne.preventDefault(),e.findInFile())});return()=>{Qe(),tt()}}},e.isDarkMode&&(e.aceOption.theme="nord_dark"),e.type=oe(L)},e.renderFileContent=function(I,L,k,q){if(e.type=L,e.content=I,e.sourceContent=I,e.content==""&&(e.content=null),e.type=="md"&&(e.content=renderMD(I,k),e.type="html"),e.type=="org"){let H=contentAbs2Relative(I);var G=new Org.Parser().parse(H).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1});e.content=DOMPurify.sanitize(G.toString()),e.type="html"}e.type=="code"&&q=="application/octet-stream"&&(e.type="binary",e.content="binary"),i.timeout(()=>{Prism.highlightAll()},50)};let _=["image","media","audio","pdf","IPython","binary"],B=["file_too_big","file_not_found","file_not_accessible","file_not_supported","folder_not_supported"];e.fileFrame=()=>e.filePath?_.includes(e.type)?e.content!=null:e.type==="error"?B.includes(e.content):e.content==null&&["code","text"].includes(e.type):!1,e.fileKind=()=>{let I=(e.paths||[])[(e.paths||[]).length-1]||"",L=I.lastIndexOf("."),k=L>0?I.slice(L+1).toUpperCase():"";if(e.type==="image")return(k==="JPG"?"JPEG":k)+" image";let q={WEBM:"WebM",OGG:"Ogg",OGV:"Ogg",MOV:"QuickTime",M4V:"M4V",MKV:"Matroska"};return e.type==="media"?(q[k]||k)+" video":e.type==="audio"?k+" audio":e.type==="pdf"?"PDF":e.type==="IPython"?"Jupyter notebook":e.type==="binary"?"Binary file":e.languageName||(k?k+" file":"File")},e.imageSize="",e.onImageLoad=I=>{let L=I.target;L?.naturalWidth&&(e.imageSize=`${L.naturalWidth} \xD7 ${L.naturalHeight}`)},o(document,"click",I=>{e.preview&&(I.target.closest?.(".symbols")||(e.symbolsOpen=!1),I.target.closest?.(".tb-more")||(e.moreOpen=!1),I.target.closest?.(".tb-toc-m")||(e.tocOpen=!1),I.target.isConnected&&!I.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1))})};function ka(e,t,s){let i,o=!1,r="form-draft:"+s,u=()=>Object.fromEntries(t.map(m=>[m,e[m]])),p=()=>JSON.stringify(u()),c=m=>{for(let b of t)Object.prototype.hasOwnProperty.call(m,b)&&(e[b]=m[b]);e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate))},v=()=>{try{window.sessionStorage.removeItem(r)}catch{}},g=(m=!1)=>{if(i!==void 0){if(m&&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){v();return}try{window.sessionStorage.setItem(r,JSON.stringify({account:e.user?.username||null,savedAt:Date.now(),values:u()})),e.draftSaved=!0}catch{}}},y=()=>g(!0);return e.on("routeLeave",y),window.addEventListener("beforeunload",y),e.on("dispose",()=>window.removeEventListener("beforeunload",y)),{restore(){i=p();let m;try{m=JSON.parse(window.sessionStorage.getItem(r)||"null")}catch{}let b=m&&m.account===(e.user?.username||null)&&Date.now()-m.savedAt<30*6e4&&m.values;return b&&(c(m.values),e.draftRestored=!0),o||(o=!0,e.watch(()=>u(),()=>g(),!0)),e.unsavedChanges=p()!==i,!!b},checkpoint(){return document.querySelectorAll("input, select, textarea").forEach(m=>{m._field?.binding.state===e&&m._field.timer&&m._field.commit()}),JSON.parse(p())},accept(m){i=JSON.stringify(m),e.draftRestored=!1,g()},discard(){document.querySelectorAll("input, select, textarea").forEach(m=>{m._field?.binding.state!==e||!m._field.timer||(clearTimeout(m._field.timer),m._field.timer=null,m.value=m._field.binding.value??"")}),i!==void 0&&c(JSON.parse(i)),e.draftRestored=!1,g()},clear(){i=p(),e.unsavedChanges=!1,e.draftRestored=!1,e.draftSaved=!1,v()}}}function Bu(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(m=>(!e.logView.severity||e.logSeverity(m.sample)===e.logView.severity)&&(!y||Object.values(m.sample).join(" ").toLowerCase().includes(y))).slice().sort((m,b)=>e.logView.sort==="count"?b.count-m.count:Date.parse(b.last)-Date.parse(m.last))},e.shortLogId=y=>y?y.slice(0,8):"",e.isLogIdentifier=(y,m)=>typeof m=="string"&&m.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 m=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",E=Number(y.status||y.httpStatus),S={502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"}[E];return m+" "+b+(E?" with HTTP "+E+(S?" ("+S+")":""):"")+"."},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((m,b)=>Date.parse(b.ts)-Date.parse(m.ts)),e.historyDetailFields=y=>{try{let m=JSON.parse(y?._detailJson||"{}");return m&&typeof m=="object"?Object.entries(m):[["value",m]]}catch{return[["record",y?._detailJson||""]]}},e.logFieldText=y=>typeof y=="object"?JSON.stringify(y):String(y??""),e.captureErrorScroll=y=>{let m=[];for(let b=y?.parentElement;b;b=b.parentElement)m.push({element:b,top:b.scrollTop,left:b.scrollLeft});return m},e.restoreErrorScroll=y=>y.forEach(({element:m,top:b,left:E})=>{m.isConnected&&(m.scrollTop=b,m.scrollLeft=E)});let s=null,i=null,o=null,r=[];e.selectLog=async(y,m)=>{if(i=m||document.activeElement,r=e.captureErrorScroll(i),c++,e.trace=null,e.traceSelection=null,e.traceLoading=!1,e.logDetailTab="overview",e.selectedLog=y,await We(),v||e.selectedLog!==y||e.errorSource!=="central")return;document.getElementById("log-detail-title")?.focus({preventScroll:!0}),document.querySelector(".log-inspector")?.scrollIntoView?.({block:"start"});let b=["requestId","jobId"].find(E=>e.logTraceId(y,E));b&&e.lookupTrace(b,y.sample[b],document.getElementById("trace-selector-"+b),y.sample,!0)},e.closeLogDetail=async()=>{e.selectedLog=null,c++,e.trace=null,e.traceSelection=null,e.traceLoading=!1,await We(),i?.isConnected?(i.focus({preventScroll:!0}),e.restoreErrorScroll(r)):document.getElementById("error-source-central")?.focus()},e.logFilters={window:"1h",service:"",release:""},e.logAppliedFilters={...e.logFilters},e.logData=null,e.logLoading=!1,e.logFailure="",e.logSnapshotStale=!1,e.trace=null,e.traceLoading=!1,e.traceSelection=null;let u=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i,p=0,c=0,v=!1;e.logStateText=y=>({ready:"Central logs available",empty:"No warnings, errors or HTTP 5xx returned in this window",disabled:"Central lookup is not configured. Application history is available in the other source.",misconfigured:"Central lookup configuration is invalid. Ask an operator to check it.",unreachable:"Central logging is unreachable. Application history is available in the other source.",busy:"Central lookup is busy. Retry shortly.",partial:"Partial results: a result limit or invalid record reduced coverage.",stale:"Central logging responds, but expected application telemetry is stale or missing."})[y]||"Central log status has not been checked",e.refreshLogs=async()=>{let y=++p,m={...e.logFilters};e.logLoading=!0,e.logFailure="",e.trace=null,e.traceSelection=null,e.traceLoading=!1,e.selectedLog=null,c++;try{let b=await t.get("/api/admin/errors/investigation",{params:m});if(v||y!==p)return;e.logData=b.data,e.logAppliedFilters=m,e.logSnapshotStale=!!b.data?.end&&Date.now()-Date.parse(b.data.end)>9e4}catch(b){if(v||y!==p)return;e.logData=null,e.logFailure=b?.status===400?"Use a Git release SHA or \u2018unknown\u2019 and retry.":"Could not load central log status. Retry or open Application history."}finally{!v&&y===p&&(e.logLoading=!1)}},e.lookupTrace=async(y,m,b,E,S=!1)=>{if(!["requestId","jobId"].includes(y)||!u.test(m||""))return;e.errorSource==="central"&&e.selectedLog&&(e.logDetailTab="timeline"),e.errorSource==="history"&&(e.historyView="timeline"),o=e.errorSource,s=b||document.activeElement;let N=++c;if(e.traceSelection={kind:y,id:m,context:E?{event:E.errorCode||E.event||E.displayMessage||E.message,service:E.service||E.module}:null},e.trace=null,e.traceLoading=!0,await We(),v||N!==c)return;let w=document.getElementById("log-timeline-title");S||(w?.focus(),w?.scrollIntoView?.({block:"nearest"}));try{let T=await t.get("/api/admin/errors/correlation",{params:{kind:y,id:m,window:e.logData?.window||e.logAppliedFilters.window}});!v&&N===c&&(e.trace=T.data)}catch{!v&&N===c&&(e.trace={state:"unreachable",events:[]})}finally{!v&&N===c&&(e.traceLoading=!1)}},e.showLogTimeline=y=>{if(e.logDetailTab="timeline",e.traceSelection)return;let m=["requestId","jobId"].find(b=>e.logTraceId(e.selectedLog,b));m&&e.lookupTrace(m,e.selectedLog.sample[m],y,e.selectedLog.sample)},e.closeTrace=async()=>{e.logDetailTab="overview",e.historyView="overview",c++,e.trace=null,e.traceSelection=null,e.traceLoading=!1,await We(),s?.isConnected&&o===e.errorSource?s.focus():document.getElementById("error-source-"+e.errorSource)?.focus()},e.logTraceId=(y,m)=>{let b=y?.sample?.[m]||y?.raw?.find(E=>E&&typeof E=="object")?.[m];return u.test(b||"")?b:null},e.watch("errorSource",()=>{c++,e.trace=null,e.traceSelection=null,e.traceLoading=!1,e.selectedLog=null,e.historySelected=null,e.historyView="overview",e.expanded={}},!1,!1);let g=window.setInterval(()=>{e.logSnapshotStale=!!e.logData?.end&&Date.now()-Date.parse(e.logData.end)>9e4},15e3);e.on("dispose",()=>{v=!0,p++,c++,window.clearInterval(g)}),e.refreshLogs()}var Na={};ff(Na,{bigNum:()=>gg,date:()=>Rg,dateEcho:()=>Sa,diff:()=>bg,duration:()=>$n,filter:()=>Eg,humanFileSize:()=>hg,humanTime:()=>Ca,limitTo:()=>Sg,money:()=>kg,number:()=>wg,orderBy:()=>Ng,plural:()=>Tg,shortDate:()=>Ea,statusLabel:()=>yg,statusMsg:()=>xi,title:()=>vg,uppercase:()=>Cg});var hg=e=>String(window.humanFileSize(e)).replace(/([KMGTPEZY])iB$/,"$1B").replace(/\.0 ([KMGTPEZY]?B)$/," $1"),gg=(function(){return function(t){let s=Number(t)||0,i=Math.abs(s);return i<1e3?String(s):i<1e4?(s/1e3).toFixed(1).replace(/\.0$/,"")+"k":i<1e6?Math.round(s/1e3)+"k":i<1e7?(s/1e6).toFixed(1).replace(/\.0$/,"")+"M":Math.round(s/1e6)+"M"}})(),Ca=(function(){return function(t){if(!t)return"never";var s=null;t instanceof Date&&(s=t,t=Math.round((Date.now()-t)/1e3)),(typeof t=="string"||typeof t=="number")&&(s=new Date(t),t=Math.round((Date.now()-s)/1e3));var i=t<0?"from now":"ago";if(Math.abs(t)>7200*24)return(s&&!isNaN(s)?s:new Date(Date.now()-t*1e3)).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"});t=Math.abs(t);for(var o=[t/60/60/24/365,t/60/60/24/30,t/60/60/24/7,t/60/60/24,t/60/60,t/60,t],r=["year","month","week","day","hour","minute","second"],u=0;u1&&(c+="s"),p>=1)return p+" "+c+" "+i}return"0 seconds "+i}})(),vg=(function(){return function(e){if(!e)return e;e=e.toLowerCase();var t=e.split(" "),s=t.map(function(i){return i.charAt(0).toUpperCase()+i.substring(1,i.length)});return s.join(" ")}})(),yg=(function(){var e={ready:"Ready",error:"Error",expired:"Expired",expiring:"Expiring",removed:"Removed",removing:"Removing",queue:"Queued",download:"Downloading",downloaded:"Downloaded",preparing:"Preparing",anonymizing:"Anonymizing"};return function(t){if(!t)return"";if(e[t])return e[t];var s=String(t).replace(/[_-]+/g," ").toLowerCase();return s.charAt(0).toUpperCase()+s.slice(1)}})(),xi=(function(){var e={branch_not_found:"Branch not found on GitHub",repo_not_found:"Repository not found on GitHub",repository_not_found:"Repository not found on GitHub",repo_not_accessible:"Repository is not accessible with your token",pr_not_found:"Pull request not found on GitHub",gist_not_found:"Gist not found on GitHub",commit_not_found:"Commit not found on GitHub",repo_too_big:"Repository exceeds the size limit",repository_too_big:"Repository exceeds the size limit",quota_exceeded:"Storage quota exceeded",incomplete_record:"Incomplete record: missing identifier"};return function(t){if(!t)return t;var s=t.match(/^rate_limited:(\d+)$/);if(s){var i=Math.max(0,Math.ceil((parseInt(s[1],10)-Date.now())/1e3));if(i<=0)return"Rate limited \u2014 resuming soon";var o=Math.floor(i/60),r=i%60;return"Rate limited \u2014 retrying in "+(o>0?o+"m "+r+"s":r+"s")}if(e[t])return e[t];var u=/^([a-z0-9]+(?:_[a-z0-9]+)+):\s*\S/.exec(t);if(u){if(e[u[1]])return e[u[1]];var p=u[1].replace(/_/g," ");return p.charAt(0).toUpperCase()+p.slice(1)}if(/^[a-z0-9]+(_[a-z0-9]+)+$/.test(t)){var c=t.replace(/_/g," ");return c.charAt(0).toUpperCase()+c.slice(1)}return t}})(),bg=(function(e){let t=i=>i.replace(/&/g,"&").replace(//g,">");function s(i,o){if(!o)return;let r=o.newPath&&o.newPath!=="/dev/null"?o.newPath:o.oldPath||"",u=o.oldPath==="/dev/null"?"added":o.newPath==="/dev/null"?"deleted":o.oldPath&&o.newPath&&o.oldPath!==o.newPath?"renamed":"modified";if(i.push('
'),i.push('
'+t(r)+''+u+"
"),o.lines.length){i.push('');for(let p of o.lines)i.push('");i.push("
'+(p.oldNo||"")+''+(p.newNo||"")+''+(p.kind==="add"?"+":p.kind==="remove"?"-":"")+''+t(p.text)+"
")}i.push("
")}return function(i){if(!i)return i;let o=[],r=null,u=0,p=0,c=()=>(r||(r={oldPath:"",newPath:"",lines:[]}),r),v=()=>{r&&(r.lines.length||r.oldPath||r.newPath)&&(s(o,r),r=null)},g=i.split(` `);for(let y=0;ye});function wg(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function kg(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 Cg(e){return String(e??"").toUpperCase()}function Sg(e,t,s=0){return(e||[]).slice(s,s+t)}function Eg(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function Ng(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((v,g)=>v?.[g],i),c=r.split(".").reduce((v,g)=>v?.[g],o);if(typeof p=="string"&&(p=p.toLowerCase()),typeof c=="string"&&(c=c.toLowerCase()),p!==c)return(p==null?-1:c==null?1:pi[o])}function Tg(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function Sa(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),c=Math.round(p/30.44),v=p<14?[p,"day"]:p<60?[Math.round(p/7),"week"]:c<18?[c,"month"]:[Math.round(p/365.25),"year"],g=v[0]+" "+v[1]+(v[0]===1?"":"s");u=r>0?"in "+g:g+" ago"}return i+" \xB7 "+u}function $n(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 Ea(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)}var er=e=>["preparing","download","downloading","downloaded","queue","anonymizing"].includes(e)?"preparing":e==="expiring"?"expired":e==="removing"?"removed":e;function tr(e,{flags:t,keys:s,count:i,onChange:o=()=>{}}){if(e.segView=()=>{let r=t()||{};if(s.every(p=>!!r[p]))return"all";let u=s.filter(p=>!!r[p]);return u.length===1?u[0]:"custom"},e.setSegView=r=>{let u=t();if(u){for(let p of s)u[p]=r==="all"?!0:p===r;o()}},e.segCount=r=>r==="all"?s.reduce((u,p)=>u+i(p),0):i(r),t()&&e.segView()==="custom")for(let r of s)t()[r]=!0}var ju=function(e,t,s){let i=bt(),o=Bt();Qu(i,o),e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.repositories=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;let r=S=>{if(S.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){S.preventDefault();let N=document.querySelector('.admin-filter-toolbar input[type="search"]');N&&N.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=S=>{S==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[S]="",e.query.page=1},e.chips=[];let u=()=>{let S=[];e.query.owner&&S.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&S.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=S};e.showStatusMessage=S=>{let N=S.statusMessage||"(no message)";window.prompt(`Status message for ${S.repoId} (${S.status}):`,N)},e.fetchGithubInfo=S=>{let N=window.open("","_blank");N&&N.document.write("
Loading GitHub info for "+S.repoId+"...
"),t.get("/api/admin/repos/"+S.repoId+"/github").then(w=>{N&&(N.document.open(),N.document.write('
'+JSON.stringify(w.data,null,2).replace(/[<>]/g,T=>T==="<"?"<":">")+"
"),N.document.close())},w=>{let T=w&&w.data?JSON.stringify(w.data,null,2):String(w);N&&(N.document.body.innerHTML='
'+T+"
")})},e.statusCountFor=S=>{let N=(e.statusCounts||[]).find(w=>w._id===S);return N?N.count:0},e.statusStorageFor=S=>{let N=(e.statusCounts||[]).find(w=>w._id===S);return N?N.storage:0},e.isErrorsOnly=()=>e.query&&e.query.error&&!e.query.ready&&!e.query.preparing&&!e.query.expired&&!e.query.removed,e.toggleErrorsOnly=()=>{e.isErrorsOnly()?Object.assign(e.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(e.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),e.query.page=1},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=S=>{e.query.sort===S?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=S,e.query.direction="desc"),e.query.page=1},e.sortIcon=S=>e.query.sort===S?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.repos.filterPrefs",c={page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},v=loadFilterPrefs(p)||{};e.query=Object.assign({},c,v,{page:1,search:""});let g=s.search();g.owner&&(e.query.owner=g.owner),g.conference&&(e.query.conference=g.conference),g.search&&(e.query.search=g.search);let y="admin.repos.presets";e.presets=JSON.parse(localStorage.getItem(y)||"[]"),e.savePreset=()=>{let S=window.prompt("Preset name:");if(!S)return;let N=Object.assign({},e.query);delete N.page,e.presets=(e.presets||[]).filter(w=>w.name!==S),e.presets.push({name:S,query:N}),localStorage.setItem(y,JSON.stringify(e.presets))},e.applyPreset=S=>{Object.assign(e.query,S.query,{page:1})},e.deletePreset=S=>{e.presets=(e.presets||[]).filter(N=>N.name!==S.name),localStorage.setItem(y,JSON.stringify(e.presets))},e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.repositories.forEach(S=>{e.selected[S.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(S=>e.selected[S.repoId]),e.bulkRefresh=()=>{let S=e.selectedRepos();S.length&&confirm(`Force refresh ${S.length} repositories?`)&&S.forEach(N=>e.updateRepository(N))},e.bulkRemoveCache=()=>{let S=e.selectedRepos();S.length&&confirm(`Purge cache for ${S.length} repositories?`)&&S.forEach(N=>e.removeCache(N))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let S=new URLSearchParams(Object.entries(e.query).filter(([,N])=>N!==""&&N!==!1&&N!=null));S.set("format","csv"),S.set("limit","10000"),window.open("/api/admin/repos?"+S.toString(),"_blank")},e.removeCache=S=>{confirm("Remove cached files for "+S.repoId+"?")&&t.delete("/api/admin/repos/"+S.repoId).then(()=>m(),N=>console.error(N))},e.removeRepository=S=>{confirm("Remove repository "+S.repoId+"?")&&t.delete("/api/repo/"+S.repoId+"/").then(()=>m(),N=>console.error(N))},e.updateRepository=S=>{let N=at({title:`Refreshing ${S.repoId}...`,date:new Date,body:`The repository ${S.repoId} is going to be refreshed.`});e.toasts.push(N),t.post(`/api/repo/${S.repoId}/refresh`).then(w=>{w.data.status=="ready"?N.title=`${S.repoId} is refreshed.`:N.title=`Refreshing of ${S.repoId}.`},w=>{N.title=`Error during the refresh of ${S.repoId}.`,N.body=w.body})},e.filtersOpen=!1,e.fetchError=null;function m(){e.fetchError=null,t.get("/api/admin/repos",{params:e.query}).then(S=>{e.total=S.data.total,e.totalPage=Math.ceil(S.data.total/e.query.limit),e.repositories=S.data.results,e.allSelected=!1},S=>{e.fetchError=S&&S.data&&S.data.error||"Failed to load repositories",console.error(S)})}function b(){let S=Object.assign({},e.query,{page:1,limit:1,ready:!0,expired:!0,removed:!0,error:!0,preparing:!0});t.get("/api/admin/repos",{params:S}).then(N=>{e.statusCounts=N.data.statusCounts||[],e.totalSize=N.data.totalSize||0},()=>{})}e.showAllStatuses=()=>Object.assign(e.query,{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0,page:1}),tr(e,{flags:()=>e.query,keys:["ready","preparing","error","expired","removed"],count:S=>S==="preparing"?e.statusCountFor("preparing")+e.statusCountFor("download"):S==="expired"?e.statusCountFor("expired")+e.statusCountFor("expiring"):S==="removed"?e.statusCountFor("removed")+e.statusCountFor("removing"):e.statusCountFor(S),onChange:()=>{e.query.page=1}}),m(),b();let E=null;e.watch("query",()=>{i.timeout.cancel(E),E=i.timeout(()=>{m(),b()},500);let{page:S,search:N,...w}=e.query;saveFilterPrefs(p,w),u()},!0),u()},Gu=function(e,t,s){let i=bt(),o=Bt();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.users=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.selected={},e.allSelected=!1;let r=m=>{if(m.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){m.preventDefault();let b=document.querySelector('.admin-filter-toolbar input[type="search"]');b&&b.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=m=>{m==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[m]="",e.query.page=1},e.chips=[];let u=()=>{let m=[];e.query.role&&m.push({key:"role",label:"Role",value:e.query.role}),e.chips=m};e.statusCountFor=m=>{let b=(e.statusCounts||[]).find(E=>E._id===m);return b?b.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=m=>{e.query.sort===m?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=m,e.query.direction="desc"),e.query.page=1},e.sortIcon=m=>e.query.sort===m?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.users.filterPrefs",c={page:1,limit:25,sort:"username",direction:"asc",search:"",status:"",role:"",dateFrom:"",dateTo:""},v=loadFilterPrefs(p)||{};e.query=Object.assign({},c,v,{page:1,search:""}),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.users.forEach(m=>{e.selected[m.username]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedUsers=()=>e.users.filter(m=>e.selected[m.username]),e.banUser=m=>{confirm(`Ban user ${m.username}?`)&&t.post(`/api/admin/users/${m.username}/ban`).then(g,b=>console.error(b))},e.activateUser=m=>{t.post(`/api/admin/users/${m.username}/activate`).then(g,b=>console.error(b))},e.bulkBan=()=>{let m=e.selectedUsers();m.length&&confirm(`Ban ${m.length} users?`)&&m.forEach(b=>e.banUser(b))},e.exportCsv=()=>{let m=new URLSearchParams(Object.entries(e.query).filter(([,b])=>b!==""&&b!==!1&&b!=null));m.set("format","csv"),m.set("limit","10000"),window.open("/api/admin/users?"+m.toString(),"_blank")},e.fetchError=null;function g(){e.fetchError=null,t.get("/api/admin/users",{params:e.query}).then(m=>{e.total=m.data.total,e.totalPage=Math.ceil(m.data.total/e.query.limit),e.users=m.data.results,e.statusCounts=m.data.statusCounts||[],e.allSelected=!1},m=>{e.fetchError=m&&m.data&&m.data.error||"Failed to load users",console.error(m)})}g();let y=null;e.watch("query",()=>{i.timeout.cancel(y),y=i.timeout(g,500);let{page:m,search:b,...E}=e.query;saveFilterPrefs(p,E),u()},!0),u()},Wu=function(e,t,s,i){let o=bt();Qu(o,Bt()),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.userInfo,e.repositories=[],e.search="",e.selected={},e.allSelected=!1;let r="admin.user.filterPrefs",u={filters:{status:{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0}},sort:"anonymizeDate",direction:"desc"},p=loadFilterPrefs(r)||{};e.filters={status:Object.assign({},u.filters.status,p.filters&&p.filters.status||{})},e.query={sort:p.sort||u.sort,direction:p.direction||u.direction},e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort,e.sortBy=m=>{e.query.sort===m?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=m,e.query.direction="desc"),e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort},e.sortIcon=m=>e.query.sort===m?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"",e.watch("query",()=>{saveFilterPrefs(r,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.watch("filters",()=>{saveFilterPrefs(r,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.statusCountFor=m=>(e.repositories||[]).filter(b=>er(b.status)===m).length,tr(e,{flags:()=>e.filters.status,keys:["ready","preparing","error","expired","removed"],count:m=>e.statusCountFor(m)}),e.repoFiler=m=>e.filters.status[er(m.status)]==!1?!1:!!(e.search.trim().length==0||m.source.fullName.indexOf(e.search)>-1||m.repoId.indexOf(e.search)>-1||m.statusMessage&&m.statusMessage.indexOf(e.search)>-1||m.conference&&m.conference.indexOf(e.search)>-1),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,(e.filteredRepositories||e.repositories).forEach(m=>{e.selected[m.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(m=>e.selected[m.repoId]),e.bulkRefresh=()=>{let m=e.selectedRepos();m.length&&confirm(`Force refresh ${m.length} repositories?`)&&m.forEach(b=>e.updateRepository(b))},e.bulkRemoveCache=()=>{let m=e.selectedRepos();m.length&&confirm(`Purge cache for ${m.length} repositories?`)&&m.forEach(b=>e.removeCache(b))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let m=e.filteredRepositories||e.repositories,E=["repoId","status","statusMessage","pageView","anonymizeDate","source.fullName","conference","size.storage"].join(","),S=m.map(T=>[T.repoId,T.status,T.statusMessage||"",T.pageView||0,T.anonymizeDate||"",T.source&&T.source.fullName||"",T.conference||"",T.size&&T.size.storage||0].map(M=>{let F=String(M??"");return/[",\n\r]/.test(F)?'"'+F.replace(/"/g,'""')+'"':F}).join(",")),N=new Blob([E+` `+S.join(` -`)],{type:"text/csv"}),w=document.createElement("a");w.href=URL.createObjectURL(N),w.download=i.username+"-repositories.csv",w.click()},e.showStatusMessage=m=>{let b=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,b)},e.fetchGithubInfo=m=>{let b=window.open("","_blank");b&&b.document.write("
Loading GitHub info for "+m.repoId+"...
"),t.get("/api/admin/repos/"+m.repoId+"/github").then(E=>{b&&(b.document.open(),b.document.write('
'+JSON.stringify(E.data,null,2).replace(/[<>]/g,S=>S==="<"?"<":">")+"
"),b.document.close())},E=>{let S=E&&E.data?JSON.stringify(E.data,null,2):String(E);b&&(b.document.body.innerHTML='
'+S+"
")})};function c(m){t.get("/api/admin/users/"+m+"/repos",{}).then(b=>{e.repositories=b.data},b=>{console.error(b)})}function v(m){t.get("/api/admin/users/"+m,{}).then(b=>{e.userInfo=b.data},b=>{console.error(b)})}v(i.username),c(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>v(i.username),m=>console.error(m))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>v(i.username),m=>console.error(m))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>v(i.username),m=>console.error(m))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>v(i.username),m=>console.error(m))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function g(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}g(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(m=>{e.tokenForm.plaintext=m.data.token,e.tokenForm.name="",g()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>g(),b=>console.error(b))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>c(i.username),b=>console.error(b))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>c(i.username),b=>console.error(b))},e.updateRepository=m=>{let b=at({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(b),t.post(`/api/repo/${m.repoId}/refresh`).then(E=>{E.data.status=="ready"?b.title=`${m.repoId} is refreshed.`:b.title=`Refreshing of ${m.repoId}.`},E=>{b.title=`Error during the refresh of ${m.repoId}.`,b.body=E.body})},e.getGitHubRepositories=m=>{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(()=>{c(i.username)},500)},!0)},Ku=function(e,t,s){let i=bt(),o=Bt();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=E=>{if(E.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){E.preventDefault();let S=document.querySelector('.admin-filter-toolbar input[type="search"]');S&&S.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=E=>{E==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[E]="",e.query.page=1},e.chips=[];let u=()=>{let E=[];(e.query.dateFrom||e.query.dateTo)&&E.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=E};e.statusCountFor=E=>{let S=(e.statusCounts||[]).find(N=>N._id===E);return S?S.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=E=>{e.query.sort===E?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=E,e.query.direction="desc"),e.query.page=1},e.sortIcon=E=>e.query.sort===E?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.conferences.filterPrefs",c={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},v=loadFilterPrefs(p)||{};e.query=Object.assign({},c,v,{page:1,search:""});let g=s.search();g.search&&(e.query.search=g.search);let y="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(y)||"[]"),e.savePreset=()=>{let E=window.prompt("Preset name:");if(!E)return;let S=Object.assign({},e.query);delete S.page,e.presets=(e.presets||[]).filter(N=>N.name!==E),e.presets.push({name:E,query:S}),localStorage.setItem(y,JSON.stringify(e.presets))},e.applyPreset=E=>{Object.assign(e.query,E.query,{page:1})},e.deletePreset=E=>{e.presets=(e.presets||[]).filter(S=>S.name!==E.name),localStorage.setItem(y,JSON.stringify(e.presets))},e.removeConference=E=>{confirm("Remove conference "+E.conferenceID+"?")&&t.delete("/api/admin/conferences/"+E.conferenceID).then(()=>m(),S=>console.error(S))},e.exportCsv=()=>{let E=new URLSearchParams(Object.entries(e.query).filter(([,S])=>S!==""&&S!==!1&&S!=null));E.set("format","csv"),E.set("limit","10000"),window.open("/api/admin/conferences?"+E.toString(),"_blank")},e.fetchError=null;function m(){e.fetchError=null,t.get("/api/admin/conferences",{params:e.query}).then(E=>{e.total=E.data.total,e.totalPage=Math.ceil(E.data.total/e.query.limit),e.conferences=E.data.results,e.statusCounts=E.data.statusCounts||[]},E=>{e.fetchError=E&&E.data&&E.data.error||"Failed to load conferences",console.error(E)})}tr(e,{flags:()=>e.query,keys:["ready","preparing","error","expired","removed"],count:E=>e.statusCountFor(E),onChange:()=>{e.query.page=1}}),m();let b=null;e.watch("query",()=>{i.timeout.cancel(b),b=i.timeout(m,500);let{page:E,search:S,...N}=e.query;saveFilterPrefs(p,N),u()},!0),u()},Yu=function(e,t,s,i,o){let r=bt();e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.queueList=[],e.jobs=[],e.selectedQueue="download",e.selectedStats=null,e.range="1h",e.allStates=["active","waiting","delayed","failed","completed"],e.stateFilter={active:!0,waiting:!0,delayed:!0,failed:!0,completed:!0},tr(e,{flags:()=>e.stateFilter,keys:e.allStates,count:N=>(e.jobs||[]).filter(w=>w._state===N).length}),e.query={search:"",autoRefresh:!0},e.filteredJobs=()=>(e.jobs||[]).filter(N=>e.stateFilter[N._state]),e.jobProgressPct=N=>N?._state==="completed"?100:N&&N.progress&&typeof N.progress=="object"&&typeof N.progress.percent=="number"?Math.max(0,Math.min(100,Math.round(N.progress.percent))):typeof N.progress=="number"?Math.max(0,Math.min(100,Math.round(N.progress))):null;let u={get_files:"Fetching files",download:"Downloading",downloading:"Downloading",anonymize:"Anonymizing",anonymizing:"Anonymizing",ready:"Ready",removing:"Removing",preparing:"Preparing"};e.jobDetail=N=>{if(N?._state==="failed")return xi(N.failedReason||"")||"Failed";let w=N?.progress&&typeof N.progress=="object"?N.progress.status:null;return N?._state==="active"&&w?u[w]||xi(w):"\u2014"},e.jobDuration=N=>{if(!N.processedOn)return"\u2014";let w=N.finishedOn||Date.now();return $n(w-N.processedOn)},e.metricsPoints=[],e.selectQueue=N=>{e.selectedQueue=N,p(),c()},e.setRange=N=>{e.range=N,c()};function p(){let N={queue:e.selectedQueue,search:e.query.search};t.get("/api/admin/queues",{params:N}).then(w=>{e.queueList=w.data.queues||[],e.jobs=w.data.jobs||[],e.selectedStats=e.queueList.find(T=>T.key===e.selectedQueue)||e.queueList[0]||null},w=>console.error(w))}function c(){t.get("/api/admin/queues/metrics",{params:{queue:e.selectedQueue,range:e.range}}).then(N=>{e.metricsPoints=N.data.points||[],o(b,0)},N=>console.error(N))}p(),c();let v=i(()=>{e.query.autoRefresh&&(p(),c())},15e3);e.on("dispose",()=>i.cancel(v)),e.refreshNow=function(){p(),c()};function g(N){let w=N&&N.data&&(N.data.message||N.data.error)||"Request failed";e.actionError=w,o(()=>{e.actionError=null},5e3),console.error(N)}e.actionError=null,e.removeJob=N=>{t.delete(`/api/admin/queue/${e.selectedQueue}/${N.id}`).then(p,g)},e.retryJob=N=>{t.post(`/api/admin/queue/${e.selectedQueue}/${N.id}`).then(p,g)},e.retryFailed=()=>{confirm(`Retry all failed jobs in ${e.selectedQueue}?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/retry-failed`).then(p,N=>console.error(N))},e.drainSelected=()=>{confirm(`Drain the ${e.selectedQueue} queue?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/drain`).then(p,N=>console.error(N))},e.togglePause=()=>{let N=e.selectedStats&&e.selectedStats.paused?"resume":"pause";t.post(`/api/admin/queue/${e.selectedQueue}/${N}`).then(p,w=>console.error(w))},e.emptyQueue=()=>{confirm(`Empty the ${e.selectedQueue} queue? This removes ALL jobs.`)&&t.post(`/api/admin/queue/${e.selectedQueue}/empty`).then(p,N=>console.error(N))},e.pauseAll=()=>{confirm("Pause all queues?")&&t.post("/api/admin/queues/pause-all").then(p,N=>console.error(N))};let y=null;e.watch("query.search",()=>{r.timeout.cancel(y),y=r.timeout(p,350)}),e.expanded={},e.toggleJob=N=>{e.expanded[N.id]=!e.expanded[N.id]},e.humanTime=N=>{if(!N)return"";let w=new Date(N);return w.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})+" "+w.toLocaleDateString([],{month:"short",day:"numeric"})},e.delayCountdown=N=>{if(!N)return"";var w=Math.max(0,Math.ceil((N-Date.now())/1e3));if(w<=0)return"resuming soon";var T=Math.floor(w/60),M=w%60;return"in "+(T>0?T+"m "+M+"s":M+"s")};function m(N){if(N<=0)return{ticks:[0],niceMax:1};let w=Math.pow(10,Math.floor(Math.log10(N))),T=w;N/T<2?T=w/2:N/T>5&&(T=w*2);let M=Math.ceil(N/T)*T,F=[];for(let j=0;j<=M;j+=T)F.push(j);return{ticks:F,niceMax:M}}function b(){var N=document.getElementById("q-throughput-chart");if(!N)return;var w=N.getContext("2d"),T=window.devicePixelRatio||1,M=N.parentElement.getBoundingClientRect(),F=44,j=44,oe=22,_=Math.max(200,Math.round(M.width)),z=Math.max(180,Math.min(420,Math.round(M.height)||180)),I=_-F-j,L=z-oe;N.width=_*T,N.height=z*T,N.style.width=_+"px",N.style.height=z+"px",w.setTransform(T,0,0,T,0,0);var k=document.body.classList.contains("dark-mode"),q="#8A857C",G=k?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",H=k?"#6FBF8A":"#2F7D4F",K=k?"rgba(111,191,138,0.12)":"rgba(47,125,79,0.08)",ne=k?"#F08A82":"#B42318",x=k?"rgba(240,138,130,0.08)":"rgba(180,35,24,0.06)",fe=getComputedStyle(document.body).getPropertyValue("--q-time-series").trim()||(k?"#E0A94A":"#946512"),he=e.metricsPoints||[];if(he.length===0){w.fillStyle=q,w.font="13px Inter, system-ui, sans-serif",w.textAlign="center",w.fillText("No metrics data yet",_/2,z/2),E=null;return}var Be=he.map(function(Ce){return Ce.completed}),He=he.map(function(Ce){return Ce.failed}),Qe=he.map(function(Ce){return Ce.avgMs});if(!Be.some(Boolean)&&!He.some(Boolean)){w.strokeStyle=k?"rgba(255,255,255,0.14)":"rgba(0,0,0,0.12)",w.beginPath(),w.moveTo(0,z-18.5),w.lineTo(_,z-18.5),w.stroke(),w.fillStyle=k?"#CFC8BD":"#4F4A42",w.font="500 14px Inter, system-ui, sans-serif",w.textAlign="center",w.fillText("No jobs processed in this window",_/2,z/2-6),w.fillStyle=q,w.font="12.5px Inter, system-ui, sans-serif",w.fillText("Completed and failed jobs will chart here",_/2,z/2+16),E=null;return}var Ee=he.length,tt=I/(Ee-1||1),Ne=Math.max(1,Math.max.apply(null,Be),Math.max.apply(null,He)),qe=m(Ne),X=Math.max.apply(null,Qe),pe=X>0?m(X):{ticks:[0],niceMax:1},ue=function(Ce){return L-Ce/qe.niceMax*(L-10)},me=function(Ce){return L-Ce/pe.niceMax*(L-10)},be=function(Ce){return F+Ce*tt};w.textAlign="right",w.textBaseline="middle",w.font="11px Inter, system-ui, sans-serif",qe.ticks.forEach(function(Ce){var $e=ue(Ce);w.strokeStyle=G,w.lineWidth=1,w.beginPath(),w.moveTo(F,$e),w.lineTo(_-j,$e),w.stroke(),w.fillStyle=q,Ce!==0&&w.fillText(Ce>=1e3?(Ce/1e3).toFixed(1)+"k":String(Ce),F-6,$e)}),X>0&&(w.textAlign="left",pe.ticks.forEach(function(Ce){var $e=me(Ce);w.fillStyle=fe,Ce!==0&&w.fillText($n(Ce),_-j+6,$e)}));var Ve=he[Ee-1].ts,D=he[0].ts,A=Math.max(0,(Ve-D)/6e4),U=[1,2,5,10,15,30,60,120,180,360,720,1440,2880,10080],Y=U.find(function(Ce){return A/Ce<=4})||U[U.length-1],W=function(Ce){return Ce<60?Ce+"m":Ce<1440?Ce/60+"h":Ce/1440+"d"},ee=function(Ce){for(var $e=0,it=1;it0&&Math.abs(he[we].ts-(Ve-te*6e4))>le+1)){var ce=be(we),Se=te===0?"now":W(te)+" ago",Te=w.measureText(Se).width,Le=ie===0?"right":we===0?"left":"center",Je=Le==="right"?ce:Le==="left"?ce+Te:ce+Te/2;Je>se-12||(w.textAlign=Le,w.fillText(Se,ce,L+6),se=Le==="right"?ce-Te:Le==="left"?ce:ce-Te/2)}}function je(Ce,$e,it,dt){Ce.length!==0&&(w.beginPath(),w.moveTo(be(0),L),Ce.forEach(function(Pt,wt){var rt=be(wt),Ie=$e(Pt);if(wt===0)w.lineTo(rt,Ie);else{var sn=(be(wt-1)+rt)/2;w.bezierCurveTo(sn,$e(Ce[wt-1]),sn,Ie,rt,Ie)}}),w.lineTo(be(Ce.length-1),L),w.closePath(),w.fillStyle=it,w.fill(),w.beginPath(),Ce.forEach(function(Pt,wt){var rt=be(wt),Ie=$e(Pt);if(wt===0)w.moveTo(rt,Ie);else{var sn=(be(wt-1)+rt)/2;w.bezierCurveTo(sn,$e(Ce[wt-1]),sn,Ie,rt,Ie)}}),w.strokeStyle=dt,w.lineWidth=1.5,w.stroke())}je(Be,ue,K,H),je(He,ue,x,ne),X>0&&(w.beginPath(),Qe.forEach(function(Ce,$e){var it=be($e),dt=me(Ce);if($e===0)w.moveTo(it,dt);else{var Pt=(be($e-1)+it)/2;w.bezierCurveTo(Pt,me(Qe[$e-1]),Pt,dt,it,dt)}}),w.strokeStyle=fe,w.lineWidth=1,w.setLineDash([4,3]),w.stroke(),w.setLineDash([])),E={pts:he,maxLen:Ee,marginLeft:F,step:tt,totalW:_,toX:be}}var E=null;function S(){var N=document.getElementById("q-throughput-chart");if(!(!N||N._tipBound)){N._tipBound=!0;var w=document.getElementById("q-chart-tooltip"),T=document.getElementById("q-chart-crosshair");N.addEventListener("mousemove",function(M){if(!(!E||!w||!T)){var F=E,j=N.getBoundingClientRect(),oe=M.clientX-j.left,_=Math.round((oe-F.marginLeft)/F.step);if(_<0||_>=F.maxLen){w.style.display="none",T.style.display="none";return}var z=F.pts[_],I=F.pts[F.pts.length-1].ts,L=Math.round((I-z.ts)/6e4),k;if(L<=0)k="now";else if(L<60)k=L+"m ago";else if(L<1440){var q=Math.floor(L/60),G=L%60;k=q+"h"+(G?" "+G+"m":"")+" ago"}else k=Math.round(L/1440)+"d ago";var H='
'+k+'
● completed: '+z.completed+'/min
● failed: '+z.failed+"/min
";if(z.avgMs>0){var K=$n(z.avgMs);H+='
● avg time: '+K+"
"}w.innerHTML=H;var ne=F.toX(_),x=w.offsetWidth,fe=ne+10;fe+x>F.totalW&&(fe=ne-x-10),w.style.display="block",w.style.left=fe+"px",w.style.top="8px",T.style.display="block",T.style.left=ne+"px"}}),N.addEventListener("mouseleave",function(){w&&(w.style.display="none"),T&&(T.style.display="none")})}}e.watch("metricsPoints",function(){o(S,50)})},Ju=function(e,t,s,i){Bu(e,t),e.redisCollecting=null,e.redisLoading=!1;let o=0,r=0,u=!1,p=!1;e.redisStatsState="loading";let c=bt();e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.entries=[],e.visible=[],e.available=null,e.cap=1e3,e.total=0,e.pageSize=250,e.expanded={},e.historySelected=null,e.historyView="overview";let v=null,g=[];e.detailTab={},e.copyHint="",e.parsedFilterCount=0,e.stats={last24h:0,prev24h:0,delta:0,severity:{error:0,warn:0,info:0},unique:{error:0,warn:0,info:0},buckets:[],dropped:0},e.query={search:"",bucket:"",sort:"recent",group:"code",autoRefresh:!0},e.relTime=_=>{if(!_)return"";let z=new Date(_).getTime();if(isNaN(z))return _;let I=Math.max(0,Date.now()-z),L=Math.floor(I/1e3);if(L<5)return"just now";if(L<60)return`${L}s ago`;let k=Math.floor(L/60);if(k<60)return`${k}m ago`;let q=Math.floor(k/60);if(q<24)return`${q}h ago`;let G=Math.floor(q/24);return G<7?`${G}d ago`:new Date(_).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},e.absTime=_=>{if(!_)return"";let z=new Date(_);return isNaN(z.getTime())?_:z.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},e.absTimeShort=_=>{if(!_)return"";let z=new Date(_);return isNaN(z.getTime())?_:z.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})};let y=/^[a-zA-Z][a-zA-Z0-9]*(?:_[a-zA-Z0-9]+)+$/;function m(_,z){let I=_&&(_.httpStatus||_.status)||null;if(typeof I=="number"){if(I>=500)return"error";if(I===401||I===403||I===404)return"info";if(I>=400)return"warn"}return z==="error"?"error":z==="warn"?"warn":"info"}function b(_){_._rawJson=JSON.stringify(_,null,2);let z=(_.raw||[]).find(q=>q&&typeof q=="object"&&!Array.isArray(q));if(z){z.message&&y.test(z.message)?(_.displayMessage=z.message,_.displayContext=_.message):z.code&&y.test(String(z.code))?(_.displayMessage=String(z.code),_.displayContext=_.message):z.name&&z.name!=="AnonymousError"&&z.name!=="Error"?(_.displayMessage=z.name,_.displayContext=z.message||_.message):_.displayMessage=_.message,_._status=z.httpStatus||z.status||null,_._url=z.url||null,_._method=z.method||null,_._repoId=z.repoId||z.detail||null,_._detail=z.detail&&z.detail!==_._repoId?z.detail:null;let q=z.errorStack||z.causeStack?[z.errorType,z.errorStack,z.causeType?"Caused by "+z.causeType:null,z.causeStack].filter(Boolean).join(` -`):typeof z.stack=="string"?z.stack:null;for(var I=[z.cause,z.err].filter(Boolean),L=0;!q&&L{K==null||K===""||I.push([H,K])};for(let H of["service","event","severity","requestId","jobId"])L(H,z&&z[H]);L("name",z&&z.name),L("code",_.displayMessage||z&&z.message),_._bucket&&L("kind",_._bucket),L("httpStatus",z&&z.httpStatus),z&&z.status&&!z.httpStatus&&L("status",z.status),L("module",_.module);let k=z&&z.detail;if(typeof k=="string"){let H=k.trim();if(H[0]==="{"||H[0]==="[")try{k=JSON.parse(k)}catch{}}if(L("detail",k),L("repoId",z&&z.repoId),L("filePath",z&&z.filePath),L("upstreamStatus",z&&z.upstreamStatus),L("upstreamBody",z&&z.upstreamBody),L("url",_._url),L("err",z&&z.err),L("cause",z&&!z.err&&z.cause),L("ts",_.ts),!I.length)return JSON.stringify(_,null,2);let q=I.reduce((H,K)=>Math.max(H,K[0].length),0),G=["{"];return I.forEach(([H,K],ne)=>{let fe=` ${`"${H}":`.padEnd(q+3," ")} `,he=ne{let b=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,b)},e.fetchGithubInfo=m=>{let b=window.open("","_blank");b&&b.document.write("
Loading GitHub info for "+m.repoId+"...
"),t.get("/api/admin/repos/"+m.repoId+"/github").then(E=>{b&&(b.document.open(),b.document.write('
'+JSON.stringify(E.data,null,2).replace(/[<>]/g,S=>S==="<"?"<":">")+"
"),b.document.close())},E=>{let S=E&&E.data?JSON.stringify(E.data,null,2):String(E);b&&(b.document.body.innerHTML='
'+S+"
")})};function c(m){t.get("/api/admin/users/"+m+"/repos",{}).then(b=>{e.repositories=b.data},b=>{console.error(b)})}function v(m){t.get("/api/admin/users/"+m,{}).then(b=>{e.userInfo=b.data},b=>{console.error(b)})}v(i.username),c(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>v(i.username),m=>console.error(m))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>v(i.username),m=>console.error(m))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>v(i.username),m=>console.error(m))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>v(i.username),m=>console.error(m))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function g(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}g(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(m=>{e.tokenForm.plaintext=m.data.token,e.tokenForm.name="",g()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>g(),b=>console.error(b))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>c(i.username),b=>console.error(b))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>c(i.username),b=>console.error(b))},e.updateRepository=m=>{let b=at({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(b),t.post(`/api/repo/${m.repoId}/refresh`).then(E=>{E.data.status=="ready"?b.title=`${m.repoId} is refreshed.`:b.title=`Refreshing of ${m.repoId}.`},E=>{b.title=`Error during the refresh of ${m.repoId}.`,b.body=E.body})},e.getGitHubRepositories=m=>{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(()=>{c(i.username)},500)},!0)},Ku=function(e,t,s){let i=bt(),o=Bt();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=E=>{if(E.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){E.preventDefault();let S=document.querySelector('.admin-filter-toolbar input[type="search"]');S&&S.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=E=>{E==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[E]="",e.query.page=1},e.chips=[];let u=()=>{let E=[];(e.query.dateFrom||e.query.dateTo)&&E.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=E};e.statusCountFor=E=>{let S=(e.statusCounts||[]).find(N=>N._id===E);return S?S.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=E=>{e.query.sort===E?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=E,e.query.direction="desc"),e.query.page=1},e.sortIcon=E=>e.query.sort===E?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.conferences.filterPrefs",c={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},v=loadFilterPrefs(p)||{};e.query=Object.assign({},c,v,{page:1,search:""});let g=s.search();g.search&&(e.query.search=g.search);let y="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(y)||"[]"),e.savePreset=()=>{let E=window.prompt("Preset name:");if(!E)return;let S=Object.assign({},e.query);delete S.page,e.presets=(e.presets||[]).filter(N=>N.name!==E),e.presets.push({name:E,query:S}),localStorage.setItem(y,JSON.stringify(e.presets))},e.applyPreset=E=>{Object.assign(e.query,E.query,{page:1})},e.deletePreset=E=>{e.presets=(e.presets||[]).filter(S=>S.name!==E.name),localStorage.setItem(y,JSON.stringify(e.presets))},e.removeConference=E=>{confirm("Remove conference "+E.conferenceID+"?")&&t.delete("/api/admin/conferences/"+E.conferenceID).then(()=>m(),S=>console.error(S))},e.exportCsv=()=>{let E=new URLSearchParams(Object.entries(e.query).filter(([,S])=>S!==""&&S!==!1&&S!=null));E.set("format","csv"),E.set("limit","10000"),window.open("/api/admin/conferences?"+E.toString(),"_blank")},e.fetchError=null;function m(){e.fetchError=null,t.get("/api/admin/conferences",{params:e.query}).then(E=>{e.total=E.data.total,e.totalPage=Math.ceil(E.data.total/e.query.limit),e.conferences=E.data.results,e.statusCounts=E.data.statusCounts||[]},E=>{e.fetchError=E&&E.data&&E.data.error||"Failed to load conferences",console.error(E)})}tr(e,{flags:()=>e.query,keys:["ready","preparing","error","expired","removed"],count:E=>e.statusCountFor(E),onChange:()=>{e.query.page=1}}),m();let b=null;e.watch("query",()=>{i.timeout.cancel(b),b=i.timeout(m,500);let{page:E,search:S,...N}=e.query;saveFilterPrefs(p,N),u()},!0),u()},Yu=function(e,t,s,i,o){let r=bt();e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.queueList=[],e.jobs=[],e.selectedQueue="download",e.selectedStats=null,e.range="1h",e.allStates=["active","waiting","delayed","failed","completed"],e.stateFilter={active:!0,waiting:!0,delayed:!0,failed:!0,completed:!0},tr(e,{flags:()=>e.stateFilter,keys:e.allStates,count:N=>(e.jobs||[]).filter(w=>w._state===N).length}),e.query={search:"",autoRefresh:!0},e.filteredJobs=()=>(e.jobs||[]).filter(N=>e.stateFilter[N._state]),e.jobProgressPct=N=>N?._state==="completed"?100:N&&N.progress&&typeof N.progress=="object"&&typeof N.progress.percent=="number"?Math.max(0,Math.min(100,Math.round(N.progress.percent))):typeof N.progress=="number"?Math.max(0,Math.min(100,Math.round(N.progress))):null;let u={get_files:"Fetching files",download:"Downloading",downloading:"Downloading",anonymize:"Anonymizing",anonymizing:"Anonymizing",ready:"Ready",removing:"Removing",preparing:"Preparing"};e.jobDetail=N=>{if(N?._state==="failed")return xi(N.failedReason||"")||"Failed";let w=N?.progress&&typeof N.progress=="object"?N.progress.status:null;return N?._state==="active"&&w?u[w]||xi(w):"\u2014"},e.jobDuration=N=>{if(!N.processedOn)return"\u2014";let w=N.finishedOn||Date.now();return $n(w-N.processedOn)},e.metricsPoints=[],e.selectQueue=N=>{e.selectedQueue=N,p(),c()},e.setRange=N=>{e.range=N,c()};function p(){let N={queue:e.selectedQueue,search:e.query.search};t.get("/api/admin/queues",{params:N}).then(w=>{e.queueList=w.data.queues||[],e.jobs=w.data.jobs||[],e.selectedStats=e.queueList.find(T=>T.key===e.selectedQueue)||e.queueList[0]||null},w=>console.error(w))}function c(){t.get("/api/admin/queues/metrics",{params:{queue:e.selectedQueue,range:e.range}}).then(N=>{e.metricsPoints=N.data.points||[],o(b,0)},N=>console.error(N))}p(),c();let v=i(()=>{e.query.autoRefresh&&(p(),c())},15e3);e.on("dispose",()=>i.cancel(v)),e.refreshNow=function(){p(),c()};function g(N){let w=N&&N.data&&(N.data.message||N.data.error)||"Request failed";e.actionError=w,o(()=>{e.actionError=null},5e3),console.error(N)}e.actionError=null,e.removeJob=N=>{t.delete(`/api/admin/queue/${e.selectedQueue}/${N.id}`).then(p,g)},e.retryJob=N=>{t.post(`/api/admin/queue/${e.selectedQueue}/${N.id}`).then(p,g)},e.retryFailed=()=>{confirm(`Retry all failed jobs in ${e.selectedQueue}?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/retry-failed`).then(p,N=>console.error(N))},e.drainSelected=()=>{confirm(`Drain the ${e.selectedQueue} queue?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/drain`).then(p,N=>console.error(N))},e.togglePause=()=>{let N=e.selectedStats&&e.selectedStats.paused?"resume":"pause";t.post(`/api/admin/queue/${e.selectedQueue}/${N}`).then(p,w=>console.error(w))},e.emptyQueue=()=>{confirm(`Empty the ${e.selectedQueue} queue? This removes ALL jobs.`)&&t.post(`/api/admin/queue/${e.selectedQueue}/empty`).then(p,N=>console.error(N))},e.pauseAll=()=>{confirm("Pause all queues?")&&t.post("/api/admin/queues/pause-all").then(p,N=>console.error(N))};let y=null;e.watch("query.search",()=>{r.timeout.cancel(y),y=r.timeout(p,350)}),e.expanded={},e.toggleJob=N=>{e.expanded[N.id]=!e.expanded[N.id]},e.humanTime=N=>{if(!N)return"";let w=new Date(N);return w.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})+" "+w.toLocaleDateString([],{month:"short",day:"numeric"})},e.delayCountdown=N=>{if(!N)return"";var w=Math.max(0,Math.ceil((N-Date.now())/1e3));if(w<=0)return"resuming soon";var T=Math.floor(w/60),M=w%60;return"in "+(T>0?T+"m "+M+"s":M+"s")};function m(N){if(N<=0)return{ticks:[0],niceMax:1};let w=Math.pow(10,Math.floor(Math.log10(N))),T=w;N/T<2?T=w/2:N/T>5&&(T=w*2);let M=Math.ceil(N/T)*T,F=[];for(let j=0;j<=M;j+=T)F.push(j);return{ticks:F,niceMax:M}}function b(){var N=document.getElementById("q-throughput-chart");if(!N)return;var w=N.getContext("2d"),T=window.devicePixelRatio||1,M=N.parentElement.getBoundingClientRect(),F=44,j=44,oe=22,_=Math.max(200,Math.round(M.width)),B=Math.max(180,Math.min(420,Math.round(M.height)||180)),I=_-F-j,L=B-oe;N.width=_*T,N.height=B*T,N.style.width=_+"px",N.style.height=B+"px",w.setTransform(T,0,0,T,0,0);var k=document.body.classList.contains("dark-mode"),q="#8A857C",G=k?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",H=k?"#6FBF8A":"#2F7D4F",Y=k?"rgba(111,191,138,0.12)":"rgba(47,125,79,0.08)",ne=k?"#F08A82":"#B42318",x=k?"rgba(240,138,130,0.08)":"rgba(180,35,24,0.06)",fe=getComputedStyle(document.body).getPropertyValue("--q-time-series").trim()||(k?"#E0A94A":"#946512"),he=e.metricsPoints||[];if(he.length===0){w.fillStyle=q,w.font="13px Inter, system-ui, sans-serif",w.textAlign="center",w.fillText("No metrics data yet",_/2,B/2),E=null;return}var Be=he.map(function(Ce){return Ce.completed}),He=he.map(function(Ce){return Ce.failed}),Qe=he.map(function(Ce){return Ce.avgMs});if(!Be.some(Boolean)&&!He.some(Boolean)){w.strokeStyle=k?"rgba(255,255,255,0.14)":"rgba(0,0,0,0.12)",w.beginPath(),w.moveTo(0,B-18.5),w.lineTo(_,B-18.5),w.stroke(),w.fillStyle=k?"#CFC8BD":"#4F4A42",w.font="500 14px Inter, system-ui, sans-serif",w.textAlign="center",w.fillText("No jobs processed in this window",_/2,B/2-6),w.fillStyle=q,w.font="12.5px Inter, system-ui, sans-serif",w.fillText("Completed and failed jobs will chart here",_/2,B/2+16),E=null;return}var Ee=he.length,tt=I/(Ee-1||1),Ne=Math.max(1,Math.max.apply(null,Be),Math.max.apply(null,He)),qe=m(Ne),X=Math.max.apply(null,Qe),ce=X>0?m(X):{ticks:[0],niceMax:1},ue=function(Ce){return L-Ce/qe.niceMax*(L-10)},me=function(Ce){return L-Ce/ce.niceMax*(L-10)},be=function(Ce){return F+Ce*tt};w.textAlign="right",w.textBaseline="middle",w.font="11px Inter, system-ui, sans-serif",qe.ticks.forEach(function(Ce){var $e=ue(Ce);w.strokeStyle=G,w.lineWidth=1,w.beginPath(),w.moveTo(F,$e),w.lineTo(_-j,$e),w.stroke(),w.fillStyle=q,Ce!==0&&w.fillText(Ce>=1e3?(Ce/1e3).toFixed(1)+"k":String(Ce),F-6,$e)}),X>0&&(w.textAlign="left",ce.ticks.forEach(function(Ce){var $e=me(Ce);w.fillStyle=fe,Ce!==0&&w.fillText($n(Ce),_-j+6,$e)}));var Ve=he[Ee-1].ts,D=he[0].ts,A=Math.max(0,(Ve-D)/6e4),U=[1,2,5,10,15,30,60,120,180,360,720,1440,2880,10080],J=U.find(function(Ce){return A/Ce<=4})||U[U.length-1],W=function(Ce){return Ce<60?Ce+"m":Ce<1440?Ce/60+"h":Ce/1440+"d"},ee=function(Ce){for(var $e=0,it=1;it0&&Math.abs(he[we].ts-(Ve-te*6e4))>le+1)){var pe=be(we),Se=te===0?"now":W(te)+" ago",Te=w.measureText(Se).width,Le=ie===0?"right":we===0?"left":"center",Je=Le==="right"?pe:Le==="left"?pe+Te:pe+Te/2;Je>se-12||(w.textAlign=Le,w.fillText(Se,pe,L+6),se=Le==="right"?pe-Te:Le==="left"?pe:pe-Te/2)}}function je(Ce,$e,it,dt){Ce.length!==0&&(w.beginPath(),w.moveTo(be(0),L),Ce.forEach(function(Pt,wt){var rt=be(wt),Ie=$e(Pt);if(wt===0)w.lineTo(rt,Ie);else{var sn=(be(wt-1)+rt)/2;w.bezierCurveTo(sn,$e(Ce[wt-1]),sn,Ie,rt,Ie)}}),w.lineTo(be(Ce.length-1),L),w.closePath(),w.fillStyle=it,w.fill(),w.beginPath(),Ce.forEach(function(Pt,wt){var rt=be(wt),Ie=$e(Pt);if(wt===0)w.moveTo(rt,Ie);else{var sn=(be(wt-1)+rt)/2;w.bezierCurveTo(sn,$e(Ce[wt-1]),sn,Ie,rt,Ie)}}),w.strokeStyle=dt,w.lineWidth=1.5,w.stroke())}je(Be,ue,Y,H),je(He,ue,x,ne),X>0&&(w.beginPath(),Qe.forEach(function(Ce,$e){var it=be($e),dt=me(Ce);if($e===0)w.moveTo(it,dt);else{var Pt=(be($e-1)+it)/2;w.bezierCurveTo(Pt,me(Qe[$e-1]),Pt,dt,it,dt)}}),w.strokeStyle=fe,w.lineWidth=1,w.setLineDash([4,3]),w.stroke(),w.setLineDash([])),E={pts:he,maxLen:Ee,marginLeft:F,step:tt,totalW:_,toX:be}}var E=null;function S(){var N=document.getElementById("q-throughput-chart");if(!(!N||N._tipBound)){N._tipBound=!0;var w=document.getElementById("q-chart-tooltip"),T=document.getElementById("q-chart-crosshair");N.addEventListener("mousemove",function(M){if(!(!E||!w||!T)){var F=E,j=N.getBoundingClientRect(),oe=M.clientX-j.left,_=Math.round((oe-F.marginLeft)/F.step);if(_<0||_>=F.maxLen){w.style.display="none",T.style.display="none";return}var B=F.pts[_],I=F.pts[F.pts.length-1].ts,L=Math.round((I-B.ts)/6e4),k;if(L<=0)k="now";else if(L<60)k=L+"m ago";else if(L<1440){var q=Math.floor(L/60),G=L%60;k=q+"h"+(G?" "+G+"m":"")+" ago"}else k=Math.round(L/1440)+"d ago";var H='
'+k+'
● completed: '+B.completed+'/min
● failed: '+B.failed+"/min
";if(B.avgMs>0){var Y=$n(B.avgMs);H+='
● avg time: '+Y+"
"}w.innerHTML=H;var ne=F.toX(_),x=w.offsetWidth,fe=ne+10;fe+x>F.totalW&&(fe=ne-x-10),w.style.display="block",w.style.left=fe+"px",w.style.top="8px",T.style.display="block",T.style.left=ne+"px"}}),N.addEventListener("mouseleave",function(){w&&(w.style.display="none"),T&&(T.style.display="none")})}}e.watch("metricsPoints",function(){o(S,50)})},Ju=function(e,t,s,i){Bu(e,t),e.redisCollecting=null,e.redisLoading=!1;let o=0,r=0,u=!1,p=!1;e.redisStatsState="loading";let c=bt();e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.entries=[],e.visible=[],e.available=null,e.cap=1e3,e.total=0,e.pageSize=250,e.expanded={},e.historySelected=null,e.historyView="overview";let v=null,g=[];e.detailTab={},e.copyHint="",e.parsedFilterCount=0,e.stats={last24h:0,prev24h:0,delta:0,severity:{error:0,warn:0,info:0},unique:{error:0,warn:0,info:0},buckets:[],dropped:0},e.query={search:"",bucket:"",sort:"recent",group:"code",autoRefresh:!0},e.relTime=_=>{if(!_)return"";let B=new Date(_).getTime();if(isNaN(B))return _;let I=Math.max(0,Date.now()-B),L=Math.floor(I/1e3);if(L<5)return"just now";if(L<60)return`${L}s ago`;let k=Math.floor(L/60);if(k<60)return`${k}m ago`;let q=Math.floor(k/60);if(q<24)return`${q}h ago`;let G=Math.floor(q/24);return G<7?`${G}d ago`:new Date(_).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},e.absTime=_=>{if(!_)return"";let B=new Date(_);return isNaN(B.getTime())?_:B.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},e.absTimeShort=_=>{if(!_)return"";let B=new Date(_);return isNaN(B.getTime())?_:B.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})};let y=/^[a-zA-Z][a-zA-Z0-9]*(?:_[a-zA-Z0-9]+)+$/;function m(_,B){let I=_&&(_.httpStatus||_.status)||null;if(typeof I=="number"){if(I>=500)return"error";if(I===401||I===403||I===404)return"info";if(I>=400)return"warn"}return B==="error"?"error":B==="warn"?"warn":"info"}function b(_){_._rawJson=JSON.stringify(_,null,2);let B=(_.raw||[]).find(q=>q&&typeof q=="object"&&!Array.isArray(q));if(B){B.message&&y.test(B.message)?(_.displayMessage=B.message,_.displayContext=_.message):B.code&&y.test(String(B.code))?(_.displayMessage=String(B.code),_.displayContext=_.message):B.name&&B.name!=="AnonymousError"&&B.name!=="Error"?(_.displayMessage=B.name,_.displayContext=B.message||_.message):_.displayMessage=_.message,_._status=B.httpStatus||B.status||null,_._url=B.url||null,_._method=B.method||null,_._repoId=B.repoId||B.detail||null,_._detail=B.detail&&B.detail!==_._repoId?B.detail:null;let q=B.errorStack||B.causeStack?[B.errorType,B.errorStack,B.causeType?"Caused by "+B.causeType:null,B.causeStack].filter(Boolean).join(` +`):typeof B.stack=="string"?B.stack:null;for(var I=[B.cause,B.err].filter(Boolean),L=0;!q&&L{Y==null||Y===""||I.push([H,Y])};for(let H of["service","event","severity","requestId","jobId"])L(H,B&&B[H]);L("name",B&&B.name),L("code",_.displayMessage||B&&B.message),_._bucket&&L("kind",_._bucket),L("httpStatus",B&&B.httpStatus),B&&B.status&&!B.httpStatus&&L("status",B.status),L("module",_.module);let k=B&&B.detail;if(typeof k=="string"){let H=k.trim();if(H[0]==="{"||H[0]==="[")try{k=JSON.parse(k)}catch{}}if(L("detail",k),L("repoId",B&&B.repoId),L("filePath",B&&B.filePath),L("upstreamStatus",B&&B.upstreamStatus),L("upstreamBody",B&&B.upstreamBody),L("url",_._url),L("err",B&&B.err),L("cause",B&&!B.err&&B.cause),L("ts",_.ts),!I.length)return JSON.stringify(_,null,2);let q=I.reduce((H,Y)=>Math.max(H,Y[0].length),0),G=["{"];return I.forEach(([H,Y],ne)=>{let fe=` ${`"${H}":`.padEnd(q+3," ")} `,he=neEe===0?Qe:He+Qe).join(` -`)}else typeof K=="number"||typeof K=="boolean"?Be=String(K):Be=JSON.stringify(K);G.push(`${fe}${Be}${he}`)}),G.push("}"),G.join(` -`)}function S(_){let z=[],I="",L=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,k=0,q;for(;q=L.exec(_);)I+=_.slice(k,q.index),k=L.lastIndex,z.push({key:q[1],op:q[2]||"=",val:q[3]});return I+=_.slice(k),{filters:z,free:I.trim().toLowerCase()}}function N(_,z){for(let I of z.filters){let L=(q,G,H)=>{let K=parseFloat(q),ne=parseFloat(G);return H==="="?String(q)===String(G):H==="!="?String(q)!==String(G):H===">="?K>=ne:H==="<="?K<=ne:H===">"?K>ne:H==="<"?Kz&&H._bucket!==z?!1:N(H,_)),L=e.query.group;if(L){let H=x=>JSON.stringify(L==="module"?[x.module,x._bucket]:[x.raw?.[0]?.service||"unknown",x.module,x.displayMessage||x.message||"_",x._bucket,x._status]),K=new Map;for(let x of I){let fe=H(x);if(K.has(fe)){let he=K.get(fe);he.count++,he._related.push(x),new Date(x.ts)>new Date(he.ts)&&(he.ts=x.ts,he._url=x._url,he._status=x._status),new Date(x.ts)new Date(fe.ts).getTime()>=ne).length;I=Array.from(K.values())}else I=I.map((H,K)=>(H._key="row:"+K+":"+H.ts,H._related=[H],H._firstSeen=H.ts,H._lastHourCount=0,H.count=1,H));let k=H=>({error:0,warn:1,info:2})[H._bucket]??1;e.query.sort==="count"?I.sort((H,K)=>k(H)-k(K)||K.count-H.count||new Date(K.ts)-new Date(H.ts)):I.sort((H,K)=>k(H)-k(K)||new Date(K.ts)-new Date(H.ts)),e.visible=I;let q=!!(e.query.bucket||(e.query.search||"").trim()),G=!q&&(e.stats?.severity?.error||0)>0&&!I.some(H=>H._bucket==="error")&&e.entries.length<1500;(q&&!I.length||G)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,T(!0))}function T(_){if(_&&e.redisLoading)return;let z=++o;e.redisLoading=!0;let I=_?e.redisNextOffset||e.entries.length:0,L=_?e.pageSize:Math.max(e.pageSize,e.redisNextOffset||e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:I,limit:L}}).then(k=>{if(p||z!==o)return;e.redisLoading=!1;let q=(k.data.entries||[]).map(b);e.entries=_?e.entries.concat(q):q,e.redisRedacted=(_&&e.redisRedacted||0)+(k.data.redactedEntries||0),e.redisNextOffset=k.data.nextOffset??I+(k.data.entries||[]).length,e.available=!!k.data.available,e.redisCollecting=k.data.redisCollecting!==!1,e.cap=k.data.max||e.cap,e.total=k.data.total||e.entries.length,e._autoLoading=!1,w()},()=>{p||z!==o||(e.redisLoading=!1,e._autoLoading=!1,e.available=!1)})}e.loadMore=()=>T(!0),e.canLoadMore=()=>(e.redisNextOffset||e.entries.length){if(p||z!==r)return;u=!1;let L=I.data||{};e.redisStatsState=L.available===!1?"unavailable":"ready";let k=L.prev24h?Math.round((L.last24h-L.prev24h)/L.prev24h*100):0;e.stats={last24h:L.last24h||0,prev24h:L.prev24h||0,delta:k,severity:L.severity||{error:0,warn:0,info:0},unique:L.unique||{error:0,warn:0,info:0},buckets:L.buckets||[],dropped:L.dropped||0},w()},()=>{!p&&z===r&&(u=!1,e.redisStatsState="unavailable")})}function F(_=!1){(!_||!e.redisLoading)&&T(),M(_)}e.barPx=(_,z)=>{let I=e.stats.buckets||[],L=0,k=0;for(let K of I)L=Math.max(L,(K.error||0)+(K.warn||0)),k=Math.max(k,K.info||0);let q=_[z]||0;if(!q)return 0;if(z==="info")return k?Math.max(2,Math.round(q/k*(L?16:60))):0;let G=(_.error||0)+(_.warn||0),H=Math.round(G/L*44);return Math.max(4,Math.round(q/G*H))},e.bucketTitle=_=>`${new Date(_.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${_.error||0} err \xB7 ${_.warn||0} warn \xB7 ${_.info||0} info`,e.toggle=async(_,z)=>{v=z||document.activeElement,g=e.captureErrorScroll(v),e.historySelected=_,e.historyView="overview",e.expanded={[_._key]:!0},await We(),document.getElementById("history-inspector-title")?.focus({preventScroll:!0}),document.getElementById("history-inspector-title")?.scrollIntoView?.({block:"nearest"})},e.showHistoryTimeline=_=>{if(e.historyView="timeline",e.traceSelection)return;let z=["requestId","jobId"].find(I=>e.logTraceId(e.historySelected,I));z&&e.lookupTrace(z,e.logTraceId(e.historySelected,z),_,e.historySelected)},e.closeHistory=async()=>{let _=e.historySelected?._key;e.historySelected=null,e.expanded={},e.traceSelection&&await e.closeTrace(),await We(),(v?.isConnected?v:[...document.querySelectorAll("[data-history-key]")].find(I=>I.dataset.historyKey===_))?.focus({preventScroll:!0}),e.restoreErrorScroll(g)},e.setBucket=_=>{e.query.bucket=_},e.refreshNow=()=>{e.historySelected=null,e.historyView="overview",e.expanded={},e.traceSelection&&e.closeTrace(),F()},e.clearAll=()=>{confirm("Clear Redis error history? Central logs are unaffected.")&&t.delete("/api/admin/errors").then(()=>e.refreshNow(),_=>console.error(_))},e.exportCsv=()=>{let _=["ts","level","module","displayMessage","_status","_url","_repoId"],z=[_.join(",")];for(let q of e.visible)z.push(_.map(G=>{let H=q[G]==null?"":String(q[G]);return/[",\n]/.test(H)?`"${H.replace(/"/g,'""')}"`:H}).join(","));let I=new Blob([z.join(` -`)],{type:"text/csv;charset=utf-8"}),L=URL.createObjectURL(I),k=document.createElement("a");k.href=L,k.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(k),k.click(),document.body.removeChild(k),URL.revokeObjectURL(L)};function j(_){e.copyHint=`${_} copied`,c.timeout(()=>{e.copyHint=""},1500)}e.copyJson=_=>{navigator.clipboard.writeText(_._rawJson).then(()=>j("JSON"))},e.copyCurl=_=>{if(!_._url)return;let I=`curl -X ${_._method||"GET"} '${window.location.origin}${_._url}'`;navigator.clipboard.writeText(I).then(()=>j("curl"))},F();let oe=i(()=>{e.query.autoRefresh&&F(!0)},15e3);e.on("dispose",()=>{p=!0,o++,r++,i.cancel(oe)}),e.watch("query.search",w),e.watch("query.bucket",w),e.watch("query.sort",w),e.watch("query.group",w)},Xu=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(w){e.ovView=w;try{window.history.replaceState(null,"",w==="summary"?window.location.pathname:"#"+w)}catch{}};var o=!1;e.loadCache=function(){if(!o){o=!0;var w=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:w}}).then(function(T){w===e.cacheMinutes&&(e.cacheReport=T.data,e.cacheError=T.data.available?null:T.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){o=!1,w!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(w){return e.cacheTraffic==="all"||w.traffic===e.cacheTraffic})},e.cacheRate=function(w,T){var M=e.cacheRows(),F=function(_){return M.filter(function(z){return z.name===_}).reduce(function(z,I){return z+I[T]},0)},j=F(w+"_hit"),oe=F(w+"_miss");return j+oe?(100*j/(j+oe)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(w){return w.replaceAll("_"," ")},e.cacheP95=function(w){var T=0,M=e.cacheReport?.latencyBucketsMs||[];if(!w.count)return"No samples";if(!w.ms)return"Not timed";for(var F=0;F<=M.length;F++)if(T+=w["b"+F]||0,T>=Math.ceil(w.count*.95))return F 10\u202Fs";return"No samples"},e.healthAlert=function(){let w=e.data&&e.data.system||{},T=[["Memory",w.memPercent],["Disk",w.diskPercent]].filter(([,F])=>F>90);return T.length?T.map(([F,j])=>F+" is at "+j+"%").join(" and ")+". New anonymizations may fail until "+(T.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(w){return w==null?"":$n(w)},e.latencyBound=function(w,T){return w.count?w[T]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(w[T]):"No samples"},e.firstByteBound=function(w){return e.latencyBound({count:w.firstByteCount,p95UpperMs:w.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(w){return Math.max(0,Math.round((Date.now()-w.sampledAt)/1e3))},e.peakRss=function(w){return(e.performance.runtimeSeries||[]).filter(function(T){return T.instance===w.instance}).reduce(function(T,M){return Math.max(T,M.rss)},w.memory.rss)},e.performanceWarning=function(w){return e.sampleAge(w)>45||w.droppedBatches||w.droppedMetrics||w.sockets?.closeWait>0||w.eventLoop?.p95Ms>100||w.memoryLimitBytes&&w.memory.rss>w.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var w=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==w&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:w}}).then(function(T){w===e.performanceMinutes&&(e.performance=T.data,e.performanceError=T.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){w===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,w!==e.performanceMinutes&&e.loadPerformance()}))};function u(w){if(w==null)return"\u2014";for(var T=["B","KB","MB","GB","TB"],M=0,F=w;F>=1024&&M0?1:0).replace(/\.0$/,"")+" "+T[M]}e.humanBytes=u;function p(w){if(!w)return"\u2014";var T=Math.floor(w/86400),M=Math.floor(w%86400/3600),F=Math.floor(w%3600/60);return T>0?T+"d "+(M<10?"0":"")+M+"h":M>0?M+"h "+(F<10?"0":"")+F+"m":F+"m"}e.humanDuration=p;function c(w){return w==null?"\u2014":w>=1e6?(w/1e6).toFixed(1)+"M":w>=1e3?(w/1e3).toFixed(1)+"K":String(w)}e.humanNum=c,e.queueTotal=function(w){return w?(w.waiting||0)+(w.active||0)+(w.delayed||0)+(w.failed||0):0},e.statusCount=function(w){if(!e.data||!e.data.repos)return 0;for(var T=e.data.repos.statusBreakdown||[],M=0;M0,zero:!F,title:String(j.getHours()).padStart(2,"0")+":00 \xB7 "+(M.error||0)+" 5xx, "+(M.warn||0)+" 4xx"}})},e.errorHoursPeak=function(){var w=e.errorStats&&e.errorStats.buckets||[];return w.reduce(function(T,M){return Math.max(T,(M.error||0)+(M.warn||0))},0)};function v(w){var T=w||[];return T.map(function(M,F){var j=T[F-1]||{},oe=Object.assign({},M);return oe.dailyRepositories=F?Math.max(0,(M.nbRepositories||0)-(j.nbRepositories||0)):0,oe.dailyUsers=F?Math.max(0,(M.nbUsers||0)-(j.nbUsers||0)):0,oe.dailyPageViews=F?Math.max(0,(M.nbPageViews||0)-(j.nbPageViews||0)):0,oe})}function g(w){var T=w&&w.length?w[w.length-1]:{};return{repositories:T.dailyRepositories||0,users:T.dailyUsers||0,pageViews:T.dailyPageViews||0}}function y(w,T){if(!w||!w.length)return w;var M=new Date(w[w.length-1].date);if(isNaN(M))return w;var F={};w.forEach(function(I){F[new Date(I.date).toISOString().slice(0,10)]=I});for(var j=[],oe=T-1;oe>=0;oe--){var _=new Date(M.getTime()-oe*864e5),z=_.toISOString().slice(0,10);j.push(F[z]||{date:_.toISOString(),_empty:!0,dailyPageViews:0,dailyRepositories:0,dailyUsers:0,nbUsers:0})}return j}var m={};e.historyMax=function(w){return m[w]||0};var b={};e.axisMax=function(w){var T=m[w]||0;if(T<=2)return 2;if(T<=10)return Math.ceil(T/2)*2;var M=Math.pow(10,Math.floor(Math.log10(T)));return Math.ceil(T/M)*M},e.historyBarH=function(w,T){return!w||!m[T]||!w[T]?0:Math.max(1,Math.round(w[T]/e.axisMax(T)*140))},e.historyRange=function(w){return{min:b[w],max:m[w]}};var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.historyLabel=function(w){if(!w||!w.date)return"";var T=new Date(w.date);return E[T.getUTCMonth()]+" "+T.getUTCDate()},e.historyHasMissing=function(){return!!(e.data&&e.data.history||[]).some(function(w){return w&&w._empty})},e.firstDataIndex=function(){for(var w=e.data&&e.data.history||[],T=0;T=M)return{lo:z,hi:z+2*oe[_]}}return{lo:0,hi:e.axisMax("nbUsers")}},e.userStepPath=function(w){var T=e.data&&e.data.history||[],M=e.userAxis(),F=m.nbUsers?M.hi-M.lo:0,j=e.firstDataIndex();if(!F||j>=T.length)return"";for(var oe=function(L){return(140-((L||0)-M.lo)/F*140).toFixed(2)},_=w?"M"+j+" 140":"",z=j;zm[M])&&(m[M]=T[M]),(b[M]==null||T[M] .meta-more"),s=[...e.querySelectorAll(":scope > .meta-item")];if(s.forEach(o=>{o.removeAttribute("data-meta-hidden")}),t&&(t.hidden=!0,t.textContent="",t.removeAttribute("title"),t.removeAttribute("aria-label")),!e.clientWidth)return;if(e.classList.add("is-fitting"),e.scrollWidth<=e.clientWidth+1){e.classList.remove("is-fitting");return}let i=[];for(let o=s.length-1;o>=0&&e.scrollWidth>e.clientWidth+1;o--)if(s[o].setAttribute("data-meta-hidden",""),i.unshift(s[o]),t){let r=i.map(u=>u.dataset.metaLabel||u.textContent.trim().replace(/\s+/g," "));t.hidden=!1,t.textContent="+"+i.length,t.title=r.join(" \xB7 "),t.setAttribute("aria-label",i.length+" more: "+r.join(", "))}e.classList.remove("is-fitting")}function Qu(e,t){if(typeof document>"u"||typeof MutationObserver>"u"||!document.body)return;let s=!1,i=null,o=()=>{s=!1,i&&(document.querySelectorAll("[data-meta-fit]").forEach(Pg),i.takeRecords())},r=()=>{!s&&i&&(s=!0,e.timeout(o,30))};i=new MutationObserver(u=>{u.some(p=>!(p.target.closest&&p.target.closest(".meta-more")))&&r()}),i.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),eo(()=>{i.disconnect(),i=null}),t(window,"resize",r),document.fonts?.ready&&document.fonts.ready.then(r),r()}var Dg=["bif","clp","djf","gnf","jpy","kmf","krw","mga","pyg","rwf","ugx","vnd","vuv","xaf","xof","xpf"],zu=[{id:"subscription",label:"Subscriptions"},{id:"repository",label:"Repository purchases"},{id:"conference",label:"Conferences"}],Ag={author_monthly:"Author monthly",author_annual:"Author annual",author_pass:"Live updates",repo_extend:"Extended expiration",repo_never:"Never expire",repo_slot:"Extra repository",repo_pack:"Paper pack",conference_workshop:"Workshop",conference:"Conference",conference_large:"Large conference"};function Hu(e){return Object.entries(e||{}).filter(([,t])=>t).sort((t,s)=>s[1]-t[1]).map(([t,s])=>{let i=Dg.includes(t)?s:s/100;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t.toUpperCase(),minimumFractionDigits:i%1?2:0,maximumFractionDigits:2}).format(i)}catch{return i+" "+t.toUpperCase()}})}var Zu=function(e,t,s){let i=bt();if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null){s.url("/");return}e.families=zu,e.periods=[{id:"7d",label:"7 days"},{id:"30d",label:"30 days"},{id:"90d",label:"90 days"},{id:"12m",label:"12 months"},{id:"all",label:"All time"}];let o=(()=>{try{return localStorage.getItem("admin.billing.period")}catch{return null}})();e.period=e.periods.some(m=>m.id===o)?o:"30d",e.summary=null,e.summaryError=null,e.summaryLoading=!0,e.periodLabel=()=>(e.periods.find(m=>m.id===e.period)||{}).label||"",e.periodPhrase=()=>e.period==="all"?"all time":"last "+e.periodLabel(),e.money=m=>Hu(m),e.moneyText=(m,b="\u2014")=>Hu(m).join(" \xB7 ")||b,e.revenueOn=()=>!!e.summary?.revenue?.available,e.planName=m=>((e.summary?.plans||[]).find(b=>b.planId===m)||{}).name||Ag[m]||m,e.bucketTotal=m=>m?m.subscription+m.repository+m.conference:0,e.chartMax=()=>{let m=Math.max(0,...(e.summary?.series||[]).map(e.bucketTotal));if(m<=4)return 4;let b=Math.pow(10,Math.floor(Math.log10(m)));return[1,1.2,1.5,2,2.5,3,4,5,6,8,10].map(E=>E*b).find(E=>E>=m&&E%2===0)||10*b},e.segmentPct=(m,b)=>m&&m[b]?m[b]/e.chartMax()*100:0,e.familyTotal=m=>(e.summary?.series||[]).reduce((b,E)=>b+E[m],0),e.bucketLabel=m=>{if(!m)return"";let b=new Date(m.date),E={timeZone:"UTC",day:"numeric",month:"short"};return e.summary?.bucket==="month"?b.toLocaleDateString(void 0,{timeZone:"UTC",month:"short",year:"numeric"}):((e.period==="12m"||e.period==="all"||b.getUTCFullYear()!==new Date().getUTCFullYear())&&(E.year="numeric"),(e.summary?.bucket==="week"?"Week of ":"")+b.toLocaleDateString(void 0,E))},e.bucketTip=m=>{let b=e.bucketTotal(m);if(!b)return e.bucketLabel(m)+": no sales";let E=zu.filter(S=>m[S.id]).map(S=>m[S.id]+" "+S.label.toLowerCase());return e.bucketLabel(m)+": "+b+(b===1?" sale":" sales")+" ("+E.join(", ")+")"},e.bucketName=()=>({day:"day",week:"week",month:"month"})[e.summary?.bucket]||"day",e.seriesSales=()=>(e.summary?.series||[]).reduce((m,b)=>m+e.bucketTotal(b),0),e.plansWithActivity=()=>(e.summary?.plans||[]).filter(m=>m.active||m.allTimeSales||m.sales),e.planTotals=()=>{let m=b=>(e.summary?.plans||[]).reduce((E,S)=>E+(S[b]||0),0);return{active:m("active"),sales:m("sales"),allTimeSales:m("allTimeSales")}},e.webhookState=()=>{let m=e.summary?.webhooks;return m?m.failed||m.reconciliationFailed?"bad":m.oldestPendingSeconds>900||m.unreviewedRevocations?"warn":"ok":"ok"},e.age=m=>m?$n(m*1e3):"\u2014";let r=0;e.loadSummary=()=>{let m=++r;e.summaryLoading=!0,e.summaryError=null,t.get("/api/admin/billing/summary",{params:{period:e.period}}).then(b=>{if(m!==r)return;e.summaryLoading=!1;let E=b.data;if(!E||!E.subscriptions||!E.sales||!Array.isArray(E.plans)){e.summaryError="The billing summary had an unexpected format.";return}e.summary=E},b=>{m===r&&(e.summaryLoading=!1,e.summaryError=b&&b.data&&b.data.error||"Could not load billing figures.")})},e.setPeriod=m=>{if(e.period!==m){e.period=m;try{localStorage.setItem("admin.billing.period",m)}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:"",sort:"purchasedAt",direction:"desc"};let u=s.search();u.search&&(e.query.search=u.search),e.stateView=()=>e.query.state||"all",e.setStateView=m=>{e.query.state=m==="all"?"":m,e.query.page=1},e.stateCount=m=>m==="all"?["active","expired","revoked"].reduce((b,E)=>b+(e.stateCounts[E]||0),0):e.stateCounts[m]||0,e.sortBy=m=>{e.query.sort===m?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=m,e.query.direction="desc"),e.query.page=1},e.sortIcon=m=>e.query.sort===m?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"",e.chips=[];let p=()=>{let m=[];e.query.plan&&m.push({key:"plan",label:"Plan",value:e.planName(e.query.plan)}),e.query.status&&m.push({key:"status",label:"Stripe status",value:e.query.status.replace(/_/g," ")}),e.chips=m};e.clearFilter=m=>{e.query[m]="",e.query.page=1},e.filterPlan=m=>{Object.assign(e.query,{plan:m,page:1});let b=document.getElementById("bl-grants");b&&b.scrollIntoView&&b.scrollIntoView({behavior:"smooth",block:"start"})},e.clearFilters=()=>Object.assign(e.query,{search:"",plan:"",status:"",state:"",page:1}),e.hasFilters=()=>!!(e.query.search||e.query.plan||e.query.status||e.query.state),e.statusText=m=>(m.status||"unknown").replace(/_/g," "),e.revocationText=m=>m==="dispute"?"Disputed":m==="full_refund"?"Refunded":"Revoked",e.scopeHref=m=>m?.kind==="repo"?"/admin/repositories?search="+encodeURIComponent(m.id):m?.kind==="conference"?"/conference/"+encodeURIComponent(m.id):null;let c=0;function v(){let m=++c;e.grantsError=null;let b=Object.fromEntries(Object.entries(e.query).filter(([,E])=>E!==""&&E!=null));t.get("/api/admin/billing/grants",{params:b}).then(E=>{m===c&&(e.total=E.data?.total??0,e.totalPage=Math.ceil(e.total/e.query.limit),e.grants=E.data?.results||[],e.stateCounts=E.data.stateCounts||{},e.statuses=E.data.statuses||[])},E=>{m===c&&(e.grantsError=E&&E.data&&E.data.error||"Could not load subscriptions and purchases.")})}e.reloadGrants=v,e.loadSummary(),v(),p();let g=null,y=JSON.stringify({...e.query,page:0});e.watch("query",()=>{let m=JSON.stringify({...e.query,page:0});if(m!==y&&e.query.page!==1){y=m,e.query.page=1;return}y=m,i.timeout.cancel(g),g=i.timeout(v,300),p()},!0)},xu=function(e,t,s){if(e.user==null){s.url("/");return}e.Math=Math;let i=typeof window<"u"?window:null,o=i?new URLSearchParams(i.location.search):null,r=["7d","30d","90d","all"],u=["accepted","rejected","unknown","sending"];e.emailRows=[],e.emailState=u.includes(o?.get("state"))?o.get("state"):"",e.emailKind=["repository-expiration","owner-access"].includes(o?.get("kind"))?o.get("kind"):"",e.emailPeriod=r.includes(o?.get("period"))?o.get("period"):"7d",e.emailSearch=o?.get("search")||"";let p=e.emailSearch.trim();e.emailLoading=!1,e.emailError="",e.emailAnnouncement="",e.emailNextCursor=null,e.emailSummary=null,e.emailSummaryError="",e.emailSummaryLoading=!1,e.emailUpdated=null,e.emailPage=1,e.selectedEmailId=null,e.emailCopyMessage="",e.emailCopiedValue=null,e.emailTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone,e.emailStatusLabel=M=>({sending:"Pending",accepted:"Accepted",rejected:"Rejected",unknown:"Unknown"})[M]||M,e.emailKindLabel=M=>({"repository-expiration":"Repository expiration","owner-access":"GitHub access"})[M]||M,e.emailTime=M=>M?new Date(M).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}):"Not recorded",e.emailShortTime=M=>{if(!M)return"Not recorded";let F=new Date(M);return F.toLocaleString(void 0,{...e.emailPeriod==="all"||F.getFullYear()!==new Date().getFullYear()?{year:"numeric"}:{},month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},e.emailExplanation=M=>M.state==="accepted"?"The provider accepted this request. Inbox delivery is not confirmed.":M.state==="sending"?"The attempt was recorded, but no final outcome has been recorded. Check the provider before sending again.":M.state==="unknown"?"The provider outcome could not be confirmed. Check the provider before sending again to avoid duplicates.":{400:"The provider rejected the request as invalid.",401:"The provider rejected authentication.",403:"The provider denied this request.",404:"The provider could not find the requested endpoint or resource.",422:"The provider could not process the request.",429:"The provider rejected the request because of rate limiting."}[M.httpStatus]||(M.httpStatus>=500?"The provider reported a server error.":"The provider rejected this request."),e.toggleEmail=M=>{e.selectedEmailId=e.selectedEmailId===M._id?null:M._id,e.emailCopyMessage="",e.emailCopiedValue=null};let c=!1,v=0,g=0,y="",m="",b=!1,E=null;e.copyEmail=async M=>{e.emailCopiedValue=null;try{if(!i?.navigator?.clipboard)throw new Error("Clipboard unavailable");await i.navigator.clipboard.writeText(String(M)),c||(e.emailCopyMessage="Copied.",e.emailCopiedValue=String(M))}catch{c||(e.emailCopyMessage="Could not copy. Select and copy the text manually.")}};let S=()=>({period:e.emailPeriod,search:p||void 0,kind:e.emailKind||void 0}),N=()=>{if(i)try{let M=new URL(i.location.href);for(let[F,j]of Object.entries({...S(),state:e.emailState}))j?M.searchParams.set(F,j):M.searchParams.delete(F);i.history.replaceState(null,"",M.pathname+M.search+M.hash)}catch{}};e.hasEmailFilters=()=>!!(e.emailState||e.emailKind||p||e.emailPeriod!=="7d"),e.emailVisibleRows=()=>e.emailRows.slice((e.emailPage-1)*25,e.emailPage*25),e.emailTotal=()=>e.emailSummary?e.emailState?e.emailSummary.counts[e.emailState]:e.emailSummary.total:null,e.emailPageCount=()=>e.emailTotal()==null?null:Math.max(1,Math.ceil(e.emailTotal()/25)),e.emailDayTotal=M=>u.reduce((F,j)=>F+(Number(M[j])||0),0),e.emailChartTotal=()=>(e.emailSummary?.series||[]).reduce((M,F)=>M+e.emailDayTotal(F),0),e.jumpToEmailHistory=()=>{let M=i?.document?.querySelector("#email-history-title");M&&(M.focus({preventScroll:!0}),M.scrollIntoView({block:"start"}))},e.emailChartMax=()=>Math.max(1,...(e.emailSummary?.series||[]).map(e.emailDayTotal)),e.emailDayLabel=M=>{let F=typeof M=="string"?M:M?.date;if(!F)return"";let j=new Date(F+"T12:00:00Z");return Number.isNaN(j.getTime())?"":j.toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})};let w=M=>{e.emailPage=M,e.selectedEmailId=null,E=null;let F=(M-1)*25+1,j=Math.min(M*25,e.emailRows.length);e.emailAnnouncement=`Page ${M}. Showing attempts ${F} to ${j}.`;let oe=i?.document?.querySelector("#email-history-title");oe&&(oe.setAttribute("tabindex","-1"),oe.focus({preventScroll:!0}),oe.scrollIntoView({block:"start",behavior:"auto"}))};e.loadEmailSummary=async()=>{let M=JSON.stringify(S());M!==m&&(e.emailSummary=null),m=M;let F=++g;e.emailSummaryLoading=!0,e.emailSummaryError="";try{let j=await t.get("/api/admin/emails/summary",{params:S()});F===g&&(e.emailSummary=j.data)}catch{F===g&&(e.emailSummaryError=e.emailSummary?"Could not refresh the summary. Previously loaded totals are still shown.":"Email summary is unavailable.")}finally{F===g&&(e.emailSummaryLoading=!1)}},e.retryEmails=()=>e.loadEmails(b),e.loadEmails=async(M=!1)=>{let F=JSON.stringify([e.emailState,e.emailKind,e.emailPeriod,p]),j=F!==y;if(y=F,j&&(M=!1),M&&(e.emailLoading||!e.emailNextCursor))return;let oe=++v;e.emailLoading=!0,e.emailError="",e.emailAnnouncement=M?"Loading older emails.":"Loading email history.",j&&(e.emailRows=[],e.emailNextCursor=null,e.emailPage=1,e.selectedEmailId=null,E=null),M||(E=null),N();try{let _=await t.get("/api/admin/emails",{params:{...S(),state:e.emailState||void 0,before:M?e.emailNextCursor:void 0}});return oe!==v?void 0:(e.emailRows=M?e.emailRows.concat(_.data.entries):_.data.entries,e.emailNextCursor=_.data.nextCursor,M||(e.emailPage=1),e.emailUpdated=new Date().toISOString(),e.emailAnnouncement=`Email history loaded. ${e.emailRows.length} attempts loaded.`,M&&E&&e.emailRows.length>(E-1)*25&&w(E),!0)}catch{oe===v&&(b=M,e.emailError=M?"Could not load older emails. Your loaded history is still shown.":e.emailRows.length?"Could not refresh email history. Previously loaded results are still shown.":"Could not load email history.",e.emailAnnouncement="")}finally{oe===v&&(e.emailLoading=!1)}},e.emailPreviousPage=()=>{!e.emailLoading&&e.emailPage>1&&w(e.emailPage-1)},e.emailNextPage=async()=>{if(e.emailLoading)return;let M=e.emailPage+1,F=y;e.emailRows.length<=(M-1)*25&&e.emailNextCursor&&(E=M,await e.loadEmails(!0)),!c&&F===y&&e.emailPage!==M&&e.emailRows.length>(M-1)*25&&w(M)},e.refreshEmails=()=>Promise.all([e.loadEmails(),e.loadEmailSummary()]),e.applyEmailFilters=()=>(p=e.emailSearch.trim(),e.refreshEmails()),e.setEmailStatus=M=>(e.emailState=u.includes(M)?M:"",e.loadEmails()),e.clearEmailFilters=()=>(e.emailState="",e.emailKind="",e.emailSearch="",e.emailPeriod="7d",e.applyEmailFilters());let T;i?.setTimeout&&(T=i.setTimeout(()=>{let M=i.document?.querySelector(".emails-page .admin-nav"),F=M?.querySelector('[aria-current="page"]');M&&F&&(M.scrollLeft=Math.max(0,F.offsetLeft-M.offsetLeft-(M.clientWidth-F.offsetWidth)/2))},0)),e.on("dispose",()=>{c=!0,v++,g++,T!=null&&i.clearTimeout(T)}),e.refreshEmails()};var Ra=(e,t,s)=>{let i=e instanceof RegExp?ec(e,s):e,o=t instanceof RegExp?ec(t,s):t,r=i!==null&&o!=null&&Og(i,o,s);return r&&{start:r[0],end:r[1],pre:s.slice(0,r[0]),body:s.slice(r[0]+i.length,r[1]),post:s.slice(r[1]+o.length)}},ec=(e,t)=>{let s=t.match(e);return s?s[0]:null},Og=(e,t,s)=>{let i,o,r,u,p,c=s.indexOf(e),v=s.indexOf(t,c+1),g=c;if(c>=0&&v>0){if(e===t)return[c,v];for(i=[],r=s.length;g>=0&&!p;){if(g===c)i.push(g),c=s.indexOf(e,g+1);else if(i.length===1){let y=i.pop();y!==void 0&&(p=[y,v])}else o=i.pop(),o!==void 0&&o=0?c:v}i.length&&u!==void 0&&(p=[r,u])}return p};var tc="\0SLASH"+Math.random()+"\0",nc="\0OPEN"+Math.random()+"\0",Aa="\0CLOSE"+Math.random()+"\0",oc="\0COMMA"+Math.random()+"\0",sc="\0PERIOD"+Math.random()+"\0",Mg=new RegExp(tc,"g"),Vg=new RegExp(nc,"g"),qg=new RegExp(Aa,"g"),Lg=new RegExp(oc,"g"),$g=new RegExp(sc,"g"),_g=/\\\\/g,Fg=/\\{/g,Ug=/\\}/g,Bg=/\\,/g,zg=/\\\./g,Hg=1e5,jg=4e6,Gg=1e3,Wg=1e3;function Ta(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function Kg(e){return e.replace(_g,tc).replace(Fg,nc).replace(Ug,Aa).replace(Bg,oc).replace(zg,sc)}function Yg(e){return e.replace(Mg,"\\").replace(Vg,"{").replace(qg,"}").replace(Lg,",").replace($g,".")}function Pa(e,t){for(let s=0;s=t}function _s(e,t,s,i,o,r){let u=[],p=0;for(let c=0;c=i)return u;let g=e[c]+t+s[v];if(!(r&&!g)){if(p+g.length>o)return u;u.push(g),p+=g.length}}return u}function ev(e,t,s,i){let o=e.split(/\.\./),r=[];if(o[0]===void 0||o[1]===void 0)return r;let u=Ta(o[0]),p=Ta(o[1]),c=Math.max(o[0].length,o[1].length),v=o.length===3&&o[2]!==void 0?Math.max(Math.abs(Ta(o[2])),1):1,g=Zg;p0){let w=new Array(N+1).join("0");E<0?S="-"+w+S.slice(1):S=w+S}}if(b+S.length>i)break;r.push(S),b+=S.length}return r}function Da(e,t,s,i,o,r,u){if(o>i)return[e];let p=[""],c=0,v=!1,g=!0;for(;;){let y=Ra("{","}",e);if(!y)return _s(p,e,[""],t,s,v);let m=y.pre;if(/\$$/.test(m)){if(p=_s(p,m+"{"+y.body+"}",[""],t,s,v&&!y.post.length),g=!1,!y.post.length)break;e=y.post;continue}let b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(y.body),E=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(y.body),S=b||E,N=y.body.indexOf(",")>=0;if(!S&&!N){if(c=t||F+z.length>s)break e;w.push(z),F+=z.length}}}}if(p=_s(p,m,w,t,s,v&&!y.post.length),!y.post.length)break;e=y.post}return p}var tv={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}"],"[:alpha:]":["\\p{L}\\p{Nl}"],"[:ascii:]":["\\x00-\\x7f"],"[:blank:]":["\\p{Zs}\\t"],"[:cntrl:]":["\\p{Cc}"],"[:digit:]":["\\p{Nd}"],"[:graph:]":["\\p{Z}\\p{C}",!0],"[:lower:]":["\\p{Ll}"],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}\\p{S}"],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f"],"[:upper:]":["\\p{Lu}"],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}"],"[:xdigit:]":["A-Fa-f0-9"]},Fs=e=>e.replace(/[[\]\\-]/g,"\\$&"),Ia=/$./,rc=(e,t,s=!1,i)=>{let o=w=>{let T=i?w.normalize(i):w;return[...T].length===1?T:w},r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let u=[],p=[],c=r+1,v=!1,g=!1,y=!1,m=r,b="";e:for(;cb.codePointAt(0)?u.push(Fs(b)+"-"+Fs(T)):T===b&&u.push(Fs(T)),b="",c+=w.length;continue}if(e.startsWith("-]",c+w.length)){u.push(Fs(T+"-")),c+=w.length+1;continue}if(e.startsWith("-",c+w.length)){b=T,c+=w.length+1;continue}u.push(Fs(T)),c+=w.length}if(m({t:"lit",ch:e}),ov=e=>e.replace(/[\\^$.*+?()[\]{}|/]/g,"\\$&"),uc=e=>new RegExp(`^${ov(e)}$`,"iu"),nr=new Map,cc=e=>{let t=nr.get(e);return t||(t=uc(e),nr.size>=1e3&&nr.clear(),nr.set(e,t)),t},_a=(e,t)=>{if(t===e.ch)return!0;if(!e.re)return!1;let s=t.charCodeAt(0);if(s>=128)return e.re.test(t);let i=e.ascii??(e.ascii=new Uint8Array(128));return i[s]||(i[s]=e.re.test(t)?1:2),i[s]===1},sv=(e,t,s,i)=>{let o=[];for(let r=0;r{let t=new Map,s=[];return e.forEach((i,o)=>{i.t==="open"?s.push(o):i.t==="close"&&s.length&&t.set(s.pop(),o)}),t},pc=(e,t,s,i,o)=>{let r=[],u=[r];for(let p=s;p{let s=[],i="",o=()=>{for(let r of i.normalize(t))s.push(co(r));i=""};for(let r of e){if(r.t==="lit"){i+=r.ch;continue}o(),s.push(r.t==="ext"?{...r,alts:r.alts.map(u=>fc(u,t))}:r)}return o(),s},rv=(e,t)=>{let s=1,i=p=>({t:"split",id:s++,out:p}),o=(p,c)=>p.reduceRight((v,g)=>r(g,v),c),r=(p,c)=>{switch(p.t){case"lit":let m=t?cc(p.ch):void 0;return{t:"lit",id:s++,ch:p.ch,re:m,next:c};case"any":case"star":return{t:p.t,id:s++,next:c};case"class":return{t:"class",id:s++,re:p.re,next:c}}let v=m=>p.alts.map(b=>o(b,m));switch(p.type){case"@":return i(v(c));case"?":return i([c,...v(c)]);case"!":return{t:"neg",id:s++,sub:i(v(Oa)),next:c}}let g=i([]),y=i(v(g));return g.out.push(c,y),p.type==="*"?g:y};return[o(e,Oa),s]},av=e=>{let t=[],s=new Set,i=r=>r.t==="match"?"match":String(r.id),o=(r,u)=>{if(r.t==="match"||s.has(r))return;s.add(r);let p=c=>t.push(`${u}${r.id}: ${c}`);switch(r.t){case"split":p(`split -> ${r.out.map(i).join(", ")}`);for(let c of r.out)o(c,u);return;case"neg":return p(`!(${i(r.sub)}) -> ${i(r.next)}`),o(r.sub,u+" "),o(r.next,u);case"lit":p(`${JSON.stringify(r.ch)} -> ${i(r.next)}`);break;case"class":p(`${r.re} -> ${i(r.next)}`);break;default:p(`${r.t==="any"?"?":"*"} -> ${i(r.next)}`)}o(r.next,u)};return o(e,""),[`start -> ${i(e)}`,...t].join(` +`)}else typeof Y=="number"||typeof Y=="boolean"?Be=String(Y):Be=JSON.stringify(Y);G.push(`${fe}${Be}${he}`)}),G.push("}"),G.join(` +`)}function S(_){let B=[],I="",L=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,k=0,q;for(;q=L.exec(_);)I+=_.slice(k,q.index),k=L.lastIndex,B.push({key:q[1],op:q[2]||"=",val:q[3]});return I+=_.slice(k),{filters:B,free:I.trim().toLowerCase()}}function N(_,B){for(let I of B.filters){let L=(q,G,H)=>{let Y=parseFloat(q),ne=parseFloat(G);return H==="="?String(q)===String(G):H==="!="?String(q)!==String(G):H===">="?Y>=ne:H==="<="?Y<=ne:H===">"?Y>ne:H==="<"?YB&&H._bucket!==B?!1:N(H,_)),L=e.query.group;if(L){let H=x=>JSON.stringify(L==="module"?[x.module,x._bucket]:[x.raw?.[0]?.service||"unknown",x.module,x.displayMessage||x.message||"_",x._bucket,x._status]),Y=new Map;for(let x of I){let fe=H(x);if(Y.has(fe)){let he=Y.get(fe);he.count++,he._related.push(x),new Date(x.ts)>new Date(he.ts)&&(he.ts=x.ts,he._url=x._url,he._status=x._status),new Date(x.ts)new Date(fe.ts).getTime()>=ne).length;I=Array.from(Y.values())}else I=I.map((H,Y)=>(H._key="row:"+Y+":"+H.ts,H._related=[H],H._firstSeen=H.ts,H._lastHourCount=0,H.count=1,H));let k=H=>({error:0,warn:1,info:2})[H._bucket]??1;e.query.sort==="count"?I.sort((H,Y)=>k(H)-k(Y)||Y.count-H.count||new Date(Y.ts)-new Date(H.ts)):I.sort((H,Y)=>k(H)-k(Y)||new Date(Y.ts)-new Date(H.ts)),e.visible=I;let q=!!(e.query.bucket||(e.query.search||"").trim()),G=!q&&(e.stats?.severity?.error||0)>0&&!I.some(H=>H._bucket==="error")&&e.entries.length<1500;(q&&!I.length||G)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,T(!0))}function T(_){if(_&&e.redisLoading)return;let B=++o;e.redisLoading=!0;let I=_?e.redisNextOffset||e.entries.length:0,L=_?e.pageSize:Math.max(e.pageSize,e.redisNextOffset||e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:I,limit:L}}).then(k=>{if(p||B!==o)return;e.redisLoading=!1;let q=(k.data.entries||[]).map(b);e.entries=_?e.entries.concat(q):q,e.redisRedacted=(_&&e.redisRedacted||0)+(k.data.redactedEntries||0),e.redisNextOffset=k.data.nextOffset??I+(k.data.entries||[]).length,e.available=!!k.data.available,e.redisCollecting=k.data.redisCollecting!==!1,e.cap=k.data.max||e.cap,e.total=k.data.total||e.entries.length,e._autoLoading=!1,w()},()=>{p||B!==o||(e.redisLoading=!1,e._autoLoading=!1,e.available=!1)})}e.loadMore=()=>T(!0),e.canLoadMore=()=>(e.redisNextOffset||e.entries.length){if(p||B!==r)return;u=!1;let L=I.data||{};e.redisStatsState=L.available===!1?"unavailable":"ready";let k=L.prev24h?Math.round((L.last24h-L.prev24h)/L.prev24h*100):0;e.stats={last24h:L.last24h||0,prev24h:L.prev24h||0,delta:k,severity:L.severity||{error:0,warn:0,info:0},unique:L.unique||{error:0,warn:0,info:0},buckets:L.buckets||[],dropped:L.dropped||0},w()},()=>{!p&&B===r&&(u=!1,e.redisStatsState="unavailable")})}function F(_=!1){(!_||!e.redisLoading)&&T(),M(_)}e.barPx=(_,B)=>{let I=e.stats.buckets||[],L=0,k=0;for(let Y of I)L=Math.max(L,(Y.error||0)+(Y.warn||0)),k=Math.max(k,Y.info||0);let q=_[B]||0;if(!q)return 0;if(B==="info")return k?Math.max(2,Math.round(q/k*(L?16:60))):0;let G=(_.error||0)+(_.warn||0),H=Math.round(G/L*44);return Math.max(4,Math.round(q/G*H))},e.bucketTitle=_=>`${new Date(_.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${_.error||0} err \xB7 ${_.warn||0} warn \xB7 ${_.info||0} info`,e.toggle=async(_,B)=>{v=B||document.activeElement,g=e.captureErrorScroll(v),e.historySelected=_,e.historyView="overview",e.expanded={[_._key]:!0},await We(),document.getElementById("history-inspector-title")?.focus({preventScroll:!0}),document.getElementById("history-inspector-title")?.scrollIntoView?.({block:"nearest"})},e.showHistoryTimeline=_=>{if(e.historyView="timeline",e.traceSelection)return;let B=["requestId","jobId"].find(I=>e.logTraceId(e.historySelected,I));B&&e.lookupTrace(B,e.logTraceId(e.historySelected,B),_,e.historySelected)},e.closeHistory=async()=>{let _=e.historySelected?._key;e.historySelected=null,e.expanded={},e.traceSelection&&await e.closeTrace(),await We(),(v?.isConnected?v:[...document.querySelectorAll("[data-history-key]")].find(I=>I.dataset.historyKey===_))?.focus({preventScroll:!0}),e.restoreErrorScroll(g)},e.setBucket=_=>{e.query.bucket=_},e.refreshNow=()=>{e.historySelected=null,e.historyView="overview",e.expanded={},e.traceSelection&&e.closeTrace(),F()},e.clearAll=()=>{confirm("Clear Redis error history? Central logs are unaffected.")&&t.delete("/api/admin/errors").then(()=>e.refreshNow(),_=>console.error(_))},e.exportCsv=()=>{let _=["ts","level","module","displayMessage","_status","_url","_repoId"],B=[_.join(",")];for(let q of e.visible)B.push(_.map(G=>{let H=q[G]==null?"":String(q[G]);return/[",\n]/.test(H)?`"${H.replace(/"/g,'""')}"`:H}).join(","));let I=new Blob([B.join(` +`)],{type:"text/csv;charset=utf-8"}),L=URL.createObjectURL(I),k=document.createElement("a");k.href=L,k.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(k),k.click(),document.body.removeChild(k),URL.revokeObjectURL(L)};function j(_){e.copyHint=`${_} copied`,c.timeout(()=>{e.copyHint=""},1500)}e.copyJson=_=>{navigator.clipboard.writeText(_._rawJson).then(()=>j("JSON"))},e.copyCurl=_=>{if(!_._url)return;let I=`curl -X ${_._method||"GET"} '${window.location.origin}${_._url}'`;navigator.clipboard.writeText(I).then(()=>j("curl"))},F();let oe=i(()=>{e.query.autoRefresh&&F(!0)},15e3);e.on("dispose",()=>{p=!0,o++,r++,i.cancel(oe)}),e.watch("query.search",w),e.watch("query.bucket",w),e.watch("query.sort",w),e.watch("query.group",w)},Xu=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(w){e.ovView=w;try{window.history.replaceState(null,"",w==="summary"?window.location.pathname:"#"+w)}catch{}};var o=!1;e.loadCache=function(){if(!o){o=!0;var w=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:w}}).then(function(T){w===e.cacheMinutes&&(e.cacheReport=T.data,e.cacheError=T.data.available?null:T.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){o=!1,w!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(w){return e.cacheTraffic==="all"||w.traffic===e.cacheTraffic})},e.cacheRate=function(w,T){var M=e.cacheRows(),F=function(_){return M.filter(function(B){return B.name===_}).reduce(function(B,I){return B+I[T]},0)},j=F(w+"_hit"),oe=F(w+"_miss");return j+oe?(100*j/(j+oe)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(w){return w.replaceAll("_"," ")},e.cacheP95=function(w){var T=0,M=e.cacheReport?.latencyBucketsMs||[];if(!w.count)return"No samples";if(!w.ms)return"Not timed";for(var F=0;F<=M.length;F++)if(T+=w["b"+F]||0,T>=Math.ceil(w.count*.95))return F 10\u202Fs";return"No samples"},e.healthAlert=function(){let w=e.data&&e.data.system||{},T=[["Memory",w.memPercent],["Disk",w.diskPercent]].filter(([,F])=>F>90);return T.length?T.map(([F,j])=>F+" is at "+j+"%").join(" and ")+". New anonymizations may fail until "+(T.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(w){return w==null?"":$n(w)},e.latencyBound=function(w,T){return w.count?w[T]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(w[T]):"No samples"},e.firstByteBound=function(w){return e.latencyBound({count:w.firstByteCount,p95UpperMs:w.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(w){return Math.max(0,Math.round((Date.now()-w.sampledAt)/1e3))},e.peakRss=function(w){return(e.performance.runtimeSeries||[]).filter(function(T){return T.instance===w.instance}).reduce(function(T,M){return Math.max(T,M.rss)},w.memory.rss)},e.performanceWarning=function(w){return e.sampleAge(w)>45||w.droppedBatches||w.droppedMetrics||w.sockets?.closeWait>0||w.eventLoop?.p95Ms>100||w.memoryLimitBytes&&w.memory.rss>w.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var w=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==w&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:w}}).then(function(T){w===e.performanceMinutes&&(e.performance=T.data,e.performanceError=T.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){w===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,w!==e.performanceMinutes&&e.loadPerformance()}))};function u(w){if(w==null)return"\u2014";for(var T=["B","KB","MB","GB","TB"],M=0,F=w;F>=1024&&M0?1:0).replace(/\.0$/,"")+" "+T[M]}e.humanBytes=u;function p(w){if(!w)return"\u2014";var T=Math.floor(w/86400),M=Math.floor(w%86400/3600),F=Math.floor(w%3600/60);return T>0?T+"d "+(M<10?"0":"")+M+"h":M>0?M+"h "+(F<10?"0":"")+F+"m":F+"m"}e.humanDuration=p;function c(w){return w==null?"\u2014":w>=1e6?(w/1e6).toFixed(1)+"M":w>=1e3?(w/1e3).toFixed(1)+"K":String(w)}e.humanNum=c,e.queueTotal=function(w){return w?(w.waiting||0)+(w.active||0)+(w.delayed||0)+(w.failed||0):0},e.statusCount=function(w){if(!e.data||!e.data.repos)return 0;for(var T=e.data.repos.statusBreakdown||[],M=0;M0,zero:!F,title:String(j.getHours()).padStart(2,"0")+":00 \xB7 "+(M.error||0)+" 5xx, "+(M.warn||0)+" 4xx"}})},e.errorHoursPeak=function(){var w=e.errorStats&&e.errorStats.buckets||[];return w.reduce(function(T,M){return Math.max(T,(M.error||0)+(M.warn||0))},0)};function v(w){var T=w||[];return T.map(function(M,F){var j=T[F-1]||{},oe=Object.assign({},M);return oe.dailyRepositories=F?Math.max(0,(M.nbRepositories||0)-(j.nbRepositories||0)):0,oe.dailyUsers=F?Math.max(0,(M.nbUsers||0)-(j.nbUsers||0)):0,oe.dailyPageViews=F?Math.max(0,(M.nbPageViews||0)-(j.nbPageViews||0)):0,oe})}function g(w){var T=w&&w.length?w[w.length-1]:{};return{repositories:T.dailyRepositories||0,users:T.dailyUsers||0,pageViews:T.dailyPageViews||0}}function y(w,T){if(!w||!w.length)return w;var M=new Date(w[w.length-1].date);if(isNaN(M))return w;var F={};w.forEach(function(I){F[new Date(I.date).toISOString().slice(0,10)]=I});for(var j=[],oe=T-1;oe>=0;oe--){var _=new Date(M.getTime()-oe*864e5),B=_.toISOString().slice(0,10);j.push(F[B]||{date:_.toISOString(),_empty:!0,dailyPageViews:0,dailyRepositories:0,dailyUsers:0,nbUsers:0})}return j}var m={};e.historyMax=function(w){return m[w]||0};var b={};e.axisMax=function(w){var T=m[w]||0;if(T<=2)return 2;if(T<=10)return Math.ceil(T/2)*2;var M=Math.pow(10,Math.floor(Math.log10(T)));return Math.ceil(T/M)*M},e.historyBarH=function(w,T){return!w||!m[T]||!w[T]?0:Math.max(1,Math.round(w[T]/e.axisMax(T)*140))},e.historyRange=function(w){return{min:b[w],max:m[w]}};var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.historyLabel=function(w){if(!w||!w.date)return"";var T=new Date(w.date);return E[T.getUTCMonth()]+" "+T.getUTCDate()},e.historyHasMissing=function(){return!!(e.data&&e.data.history||[]).some(function(w){return w&&w._empty})},e.firstDataIndex=function(){for(var w=e.data&&e.data.history||[],T=0;T=M)return{lo:B,hi:B+2*oe[_]}}return{lo:0,hi:e.axisMax("nbUsers")}},e.userStepPath=function(w){var T=e.data&&e.data.history||[],M=e.userAxis(),F=m.nbUsers?M.hi-M.lo:0,j=e.firstDataIndex();if(!F||j>=T.length)return"";for(var oe=function(L){return(140-((L||0)-M.lo)/F*140).toFixed(2)},_=w?"M"+j+" 140":"",B=j;Bm[M])&&(m[M]=T[M]),(b[M]==null||T[M] .meta-more"),s=[...e.querySelectorAll(":scope > .meta-item")];if(s.forEach(o=>{o.removeAttribute("data-meta-hidden")}),t&&(t.hidden=!0,t.textContent="",t.removeAttribute("title"),t.removeAttribute("aria-label")),!e.clientWidth)return;if(e.classList.add("is-fitting"),e.scrollWidth<=e.clientWidth+1){e.classList.remove("is-fitting");return}let i=[];for(let o=s.length-1;o>=0&&e.scrollWidth>e.clientWidth+1;o--)if(s[o].setAttribute("data-meta-hidden",""),i.unshift(s[o]),t){let r=i.map(u=>u.dataset.metaLabel||u.textContent.trim().replace(/\s+/g," "));t.hidden=!1,t.textContent="+"+i.length,t.title=r.join(" \xB7 "),t.setAttribute("aria-label",i.length+" more: "+r.join(", "))}e.classList.remove("is-fitting")}function Qu(e,t){if(typeof document>"u"||typeof MutationObserver>"u"||!document.body)return;let s=!1,i=null,o=()=>{s=!1,i&&(document.querySelectorAll("[data-meta-fit]").forEach(Pg),i.takeRecords())},r=()=>{!s&&i&&(s=!0,e.timeout(o,30))};i=new MutationObserver(u=>{u.some(p=>!(p.target.closest&&p.target.closest(".meta-more")))&&r()}),i.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),eo(()=>{i.disconnect(),i=null}),t(window,"resize",r),document.fonts?.ready&&document.fonts.ready.then(r),r()}var Dg=["bif","clp","djf","gnf","jpy","kmf","krw","mga","pyg","rwf","ugx","vnd","vuv","xaf","xof","xpf"],zu=[{id:"subscription",label:"Subscriptions"},{id:"repository",label:"Repository purchases"},{id:"conference",label:"Conferences"}],Ag={author_monthly:"Author monthly",author_annual:"Author annual",author_pass:"Live updates",repo_extend:"Extended expiration",repo_never:"Never expire",repo_slot:"Extra repository",repo_pack:"Paper pack",conference_workshop:"Workshop",conference:"Conference",conference_large:"Large conference"};function Hu(e){return Object.entries(e||{}).filter(([,t])=>t).sort((t,s)=>s[1]-t[1]).map(([t,s])=>{let i=Dg.includes(t)?s:s/100;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t.toUpperCase(),minimumFractionDigits:i%1?2:0,maximumFractionDigits:2}).format(i)}catch{return i+" "+t.toUpperCase()}})}var Zu=function(e,t,s){let i=bt();if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null){s.url("/");return}e.families=zu,e.periods=[{id:"7d",label:"7 days"},{id:"30d",label:"30 days"},{id:"90d",label:"90 days"},{id:"12m",label:"12 months"},{id:"all",label:"All time"}];let o=(()=>{try{return localStorage.getItem("admin.billing.period")}catch{return null}})();e.period=e.periods.some(m=>m.id===o)?o:"30d",e.summary=null,e.summaryError=null,e.summaryLoading=!0,e.periodLabel=()=>(e.periods.find(m=>m.id===e.period)||{}).label||"",e.periodPhrase=()=>e.period==="all"?"all time":"last "+e.periodLabel(),e.money=m=>Hu(m),e.moneyText=(m,b="\u2014")=>Hu(m).join(" \xB7 ")||b,e.revenueOn=()=>!!e.summary?.revenue?.available,e.planName=m=>((e.summary?.plans||[]).find(b=>b.planId===m)||{}).name||Ag[m]||m,e.bucketTotal=m=>m?m.subscription+m.repository+m.conference:0,e.chartMax=()=>{let m=Math.max(0,...(e.summary?.series||[]).map(e.bucketTotal));if(m<=4)return 4;let b=Math.pow(10,Math.floor(Math.log10(m)));return[1,1.2,1.5,2,2.5,3,4,5,6,8,10].map(E=>E*b).find(E=>E>=m&&E%2===0)||10*b},e.segmentPct=(m,b)=>m&&m[b]?m[b]/e.chartMax()*100:0,e.familyTotal=m=>(e.summary?.series||[]).reduce((b,E)=>b+E[m],0),e.bucketLabel=m=>{if(!m)return"";let b=new Date(m.date),E={timeZone:"UTC",day:"numeric",month:"short"};return e.summary?.bucket==="month"?b.toLocaleDateString(void 0,{timeZone:"UTC",month:"short",year:"numeric"}):((e.period==="12m"||e.period==="all"||b.getUTCFullYear()!==new Date().getUTCFullYear())&&(E.year="numeric"),(e.summary?.bucket==="week"?"Week of ":"")+b.toLocaleDateString(void 0,E))},e.bucketTip=m=>{let b=e.bucketTotal(m);if(!b)return e.bucketLabel(m)+": no sales";let E=zu.filter(S=>m[S.id]).map(S=>m[S.id]+" "+S.label.toLowerCase());return e.bucketLabel(m)+": "+b+(b===1?" sale":" sales")+" ("+E.join(", ")+")"},e.bucketName=()=>({day:"day",week:"week",month:"month"})[e.summary?.bucket]||"day",e.seriesSales=()=>(e.summary?.series||[]).reduce((m,b)=>m+e.bucketTotal(b),0),e.plansWithActivity=()=>(e.summary?.plans||[]).filter(m=>m.active||m.allTimeSales||m.sales),e.planTotals=()=>{let m=b=>(e.summary?.plans||[]).reduce((E,S)=>E+(S[b]||0),0);return{active:m("active"),sales:m("sales"),allTimeSales:m("allTimeSales")}},e.webhookState=()=>{let m=e.summary?.webhooks;return m?m.failed||m.reconciliationFailed?"bad":m.oldestPendingSeconds>900||m.unreviewedRevocations?"warn":"ok":"ok"},e.age=m=>m?$n(m*1e3):"\u2014";let r=0;e.loadSummary=()=>{let m=++r;e.summaryLoading=!0,e.summaryError=null,t.get("/api/admin/billing/summary",{params:{period:e.period}}).then(b=>{if(m!==r)return;e.summaryLoading=!1;let E=b.data;if(!E||!E.subscriptions||!E.sales||!Array.isArray(E.plans)){e.summaryError="The billing summary had an unexpected format.";return}e.summary=E},b=>{m===r&&(e.summaryLoading=!1,e.summaryError=b&&b.data&&b.data.error||"Could not load billing figures.")})},e.setPeriod=m=>{if(e.period!==m){e.period=m;try{localStorage.setItem("admin.billing.period",m)}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:"",sort:"purchasedAt",direction:"desc"};let u=s.search();u.search&&(e.query.search=u.search),e.stateView=()=>e.query.state||"all",e.setStateView=m=>{e.query.state=m==="all"?"":m,e.query.page=1},e.stateCount=m=>m==="all"?["active","expired","revoked"].reduce((b,E)=>b+(e.stateCounts[E]||0),0):e.stateCounts[m]||0,e.sortBy=m=>{e.query.sort===m?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=m,e.query.direction="desc"),e.query.page=1},e.sortIcon=m=>e.query.sort===m?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"",e.chips=[];let p=()=>{let m=[];e.query.plan&&m.push({key:"plan",label:"Plan",value:e.planName(e.query.plan)}),e.query.status&&m.push({key:"status",label:"Stripe status",value:e.query.status.replace(/_/g," ")}),e.chips=m};e.clearFilter=m=>{e.query[m]="",e.query.page=1},e.filterPlan=m=>{Object.assign(e.query,{plan:m,page:1});let b=document.getElementById("bl-grants");b&&b.scrollIntoView&&b.scrollIntoView({behavior:"smooth",block:"start"})},e.clearFilters=()=>Object.assign(e.query,{search:"",plan:"",status:"",state:"",page:1}),e.hasFilters=()=>!!(e.query.search||e.query.plan||e.query.status||e.query.state),e.statusText=m=>(m.status||"unknown").replace(/_/g," "),e.revocationText=m=>m==="dispute"?"Disputed":m==="full_refund"?"Refunded":"Revoked",e.scopeHref=m=>m?.kind==="repo"?"/admin/repositories?search="+encodeURIComponent(m.id):m?.kind==="conference"?"/conference/"+encodeURIComponent(m.id):null;let c=0;function v(){let m=++c;e.grantsError=null;let b=Object.fromEntries(Object.entries(e.query).filter(([,E])=>E!==""&&E!=null));t.get("/api/admin/billing/grants",{params:b}).then(E=>{m===c&&(e.total=E.data?.total??0,e.totalPage=Math.ceil(e.total/e.query.limit),e.grants=E.data?.results||[],e.stateCounts=E.data.stateCounts||{},e.statuses=E.data.statuses||[])},E=>{m===c&&(e.grantsError=E&&E.data&&E.data.error||"Could not load subscriptions and purchases.")})}e.reloadGrants=v,e.loadSummary(),v(),p();let g=null,y=JSON.stringify({...e.query,page:0});e.watch("query",()=>{let m=JSON.stringify({...e.query,page:0});if(m!==y&&e.query.page!==1){y=m,e.query.page=1;return}y=m,i.timeout.cancel(g),g=i.timeout(v,300),p()},!0)},xu=function(e,t,s){if(e.user==null){s.url("/");return}e.Math=Math;let i=typeof window<"u"?window:null,o=i?new URLSearchParams(i.location.search):null,r=["7d","30d","90d","all"],u=["accepted","rejected","unknown","sending"];e.emailRows=[],e.emailState=u.includes(o?.get("state"))?o.get("state"):"",e.emailKind=["repository-expiration","owner-access"].includes(o?.get("kind"))?o.get("kind"):"",e.emailPeriod=r.includes(o?.get("period"))?o.get("period"):"7d",e.emailSearch=o?.get("search")||"";let p=e.emailSearch.trim();e.emailLoading=!1,e.emailError="",e.emailAnnouncement="",e.emailNextCursor=null,e.emailSummary=null,e.emailSummaryError="",e.emailSummaryLoading=!1,e.emailUpdated=null,e.emailPage=1,e.selectedEmailId=null,e.emailCopyMessage="",e.emailCopiedValue=null,e.emailTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone,e.emailStatusLabel=M=>({sending:"Pending",accepted:"Accepted",rejected:"Rejected",unknown:"Unknown"})[M]||M,e.emailKindLabel=M=>({"repository-expiration":"Repository expiration","owner-access":"GitHub access"})[M]||M,e.emailTime=M=>M?new Date(M).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}):"Not recorded",e.emailShortTime=M=>{if(!M)return"Not recorded";let F=new Date(M);return F.toLocaleString(void 0,{...e.emailPeriod==="all"||F.getFullYear()!==new Date().getFullYear()?{year:"numeric"}:{},month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},e.emailExplanation=M=>M.state==="accepted"?"The provider accepted this request. Inbox delivery is not confirmed.":M.state==="sending"?"The attempt was recorded, but no final outcome has been recorded. Check the provider before sending again.":M.state==="unknown"?"The provider outcome could not be confirmed. Check the provider before sending again to avoid duplicates.":{400:"The provider rejected the request as invalid.",401:"The provider rejected authentication.",403:"The provider denied this request.",404:"The provider could not find the requested endpoint or resource.",422:"The provider could not process the request.",429:"The provider rejected the request because of rate limiting."}[M.httpStatus]||(M.httpStatus>=500?"The provider reported a server error.":"The provider rejected this request."),e.toggleEmail=M=>{e.selectedEmailId=e.selectedEmailId===M._id?null:M._id,e.emailCopyMessage="",e.emailCopiedValue=null};let c=!1,v=0,g=0,y="",m="",b=!1,E=null;e.copyEmail=async M=>{e.emailCopiedValue=null;try{if(!i?.navigator?.clipboard)throw new Error("Clipboard unavailable");await i.navigator.clipboard.writeText(String(M)),c||(e.emailCopyMessage="Copied.",e.emailCopiedValue=String(M))}catch{c||(e.emailCopyMessage="Could not copy. Select and copy the text manually.")}};let S=()=>({period:e.emailPeriod,search:p||void 0,kind:e.emailKind||void 0}),N=()=>{if(i)try{let M=new URL(i.location.href);for(let[F,j]of Object.entries({...S(),state:e.emailState}))j?M.searchParams.set(F,j):M.searchParams.delete(F);i.history.replaceState(null,"",M.pathname+M.search+M.hash)}catch{}};e.hasEmailFilters=()=>!!(e.emailState||e.emailKind||p||e.emailPeriod!=="7d"),e.emailVisibleRows=()=>e.emailRows.slice((e.emailPage-1)*25,e.emailPage*25),e.emailTotal=()=>e.emailSummary?e.emailState?e.emailSummary.counts[e.emailState]:e.emailSummary.total:null,e.emailPageCount=()=>e.emailTotal()==null?null:Math.max(1,Math.ceil(e.emailTotal()/25)),e.emailDayTotal=M=>u.reduce((F,j)=>F+(Number(M[j])||0),0),e.emailChartTotal=()=>(e.emailSummary?.series||[]).reduce((M,F)=>M+e.emailDayTotal(F),0),e.jumpToEmailHistory=()=>{let M=i?.document?.querySelector("#email-history-title");M&&(M.focus({preventScroll:!0}),M.scrollIntoView({block:"start"}))},e.emailChartMax=()=>Math.max(1,...(e.emailSummary?.series||[]).map(e.emailDayTotal)),e.emailDayLabel=M=>{let F=typeof M=="string"?M:M?.date;if(!F)return"";let j=new Date(F+"T12:00:00Z");return Number.isNaN(j.getTime())?"":j.toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})};let w=M=>{e.emailPage=M,e.selectedEmailId=null,E=null;let F=(M-1)*25+1,j=Math.min(M*25,e.emailRows.length);e.emailAnnouncement=`Page ${M}. Showing attempts ${F} to ${j}.`;let oe=i?.document?.querySelector("#email-history-title");oe&&(oe.setAttribute("tabindex","-1"),oe.focus({preventScroll:!0}),oe.scrollIntoView({block:"start",behavior:"auto"}))};e.loadEmailSummary=async()=>{let M=JSON.stringify(S());M!==m&&(e.emailSummary=null),m=M;let F=++g;e.emailSummaryLoading=!0,e.emailSummaryError="";try{let j=await t.get("/api/admin/emails/summary",{params:S()});F===g&&(e.emailSummary=j.data)}catch{F===g&&(e.emailSummaryError=e.emailSummary?"Could not refresh the summary. Previously loaded totals are still shown.":"Email summary is unavailable.")}finally{F===g&&(e.emailSummaryLoading=!1)}},e.retryEmails=()=>e.loadEmails(b),e.loadEmails=async(M=!1)=>{let F=JSON.stringify([e.emailState,e.emailKind,e.emailPeriod,p]),j=F!==y;if(y=F,j&&(M=!1),M&&(e.emailLoading||!e.emailNextCursor))return;let oe=++v;e.emailLoading=!0,e.emailError="",e.emailAnnouncement=M?"Loading older emails.":"Loading email history.",j&&(e.emailRows=[],e.emailNextCursor=null,e.emailPage=1,e.selectedEmailId=null,E=null),M||(E=null),N();try{let _=await t.get("/api/admin/emails",{params:{...S(),state:e.emailState||void 0,before:M?e.emailNextCursor:void 0}});return oe!==v?void 0:(e.emailRows=M?e.emailRows.concat(_.data.entries):_.data.entries,e.emailNextCursor=_.data.nextCursor,M||(e.emailPage=1),e.emailUpdated=new Date().toISOString(),e.emailAnnouncement=`Email history loaded. ${e.emailRows.length} attempts loaded.`,M&&E&&e.emailRows.length>(E-1)*25&&w(E),!0)}catch{oe===v&&(b=M,e.emailError=M?"Could not load older emails. Your loaded history is still shown.":e.emailRows.length?"Could not refresh email history. Previously loaded results are still shown.":"Could not load email history.",e.emailAnnouncement="")}finally{oe===v&&(e.emailLoading=!1)}},e.emailPreviousPage=()=>{!e.emailLoading&&e.emailPage>1&&w(e.emailPage-1)},e.emailNextPage=async()=>{if(e.emailLoading)return;let M=e.emailPage+1,F=y;e.emailRows.length<=(M-1)*25&&e.emailNextCursor&&(E=M,await e.loadEmails(!0)),!c&&F===y&&e.emailPage!==M&&e.emailRows.length>(M-1)*25&&w(M)},e.refreshEmails=()=>Promise.all([e.loadEmails(),e.loadEmailSummary()]),e.applyEmailFilters=()=>(p=e.emailSearch.trim(),e.refreshEmails()),e.setEmailStatus=M=>(e.emailState=u.includes(M)?M:"",e.loadEmails()),e.clearEmailFilters=()=>(e.emailState="",e.emailKind="",e.emailSearch="",e.emailPeriod="7d",e.applyEmailFilters());let T;i?.setTimeout&&(T=i.setTimeout(()=>{let M=i.document?.querySelector(".emails-page .admin-nav"),F=M?.querySelector('[aria-current="page"]');M&&F&&(M.scrollLeft=Math.max(0,F.offsetLeft-M.offsetLeft-(M.clientWidth-F.offsetWidth)/2))},0)),e.on("dispose",()=>{c=!0,v++,g++,T!=null&&i.clearTimeout(T)}),e.refreshEmails()};var Ra=(e,t,s)=>{let i=e instanceof RegExp?ec(e,s):e,o=t instanceof RegExp?ec(t,s):t,r=i!==null&&o!=null&&Og(i,o,s);return r&&{start:r[0],end:r[1],pre:s.slice(0,r[0]),body:s.slice(r[0]+i.length,r[1]),post:s.slice(r[1]+o.length)}},ec=(e,t)=>{let s=t.match(e);return s?s[0]:null},Og=(e,t,s)=>{let i,o,r,u,p,c=s.indexOf(e),v=s.indexOf(t,c+1),g=c;if(c>=0&&v>0){if(e===t)return[c,v];for(i=[],r=s.length;g>=0&&!p;){if(g===c)i.push(g),c=s.indexOf(e,g+1);else if(i.length===1){let y=i.pop();y!==void 0&&(p=[y,v])}else o=i.pop(),o!==void 0&&o=0?c:v}i.length&&u!==void 0&&(p=[r,u])}return p};var tc="\0SLASH"+Math.random()+"\0",nc="\0OPEN"+Math.random()+"\0",Aa="\0CLOSE"+Math.random()+"\0",oc="\0COMMA"+Math.random()+"\0",sc="\0PERIOD"+Math.random()+"\0",Mg=new RegExp(tc,"g"),Vg=new RegExp(nc,"g"),qg=new RegExp(Aa,"g"),Lg=new RegExp(oc,"g"),$g=new RegExp(sc,"g"),_g=/\\\\/g,Fg=/\\{/g,Ug=/\\}/g,Bg=/\\,/g,zg=/\\\./g,Hg=1e5,jg=4e6,Gg=1e3,Wg=1e3;function Ta(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function Kg(e){return e.replace(_g,tc).replace(Fg,nc).replace(Ug,Aa).replace(Bg,oc).replace(zg,sc)}function Yg(e){return e.replace(Mg,"\\").replace(Vg,"{").replace(qg,"}").replace(Lg,",").replace($g,".")}function Pa(e,t){for(let s=0;s=t}function _s(e,t,s,i,o,r){let u=[],p=0;for(let c=0;c=i)return u;let g=e[c]+t+s[v];if(!(r&&!g)){if(p+g.length>o)return u;u.push(g),p+=g.length}}return u}function ev(e,t,s,i){let o=e.split(/\.\./),r=[];if(o[0]===void 0||o[1]===void 0)return r;let u=Ta(o[0]),p=Ta(o[1]),c=Math.max(o[0].length,o[1].length),v=o.length===3&&o[2]!==void 0?Math.max(Math.abs(Ta(o[2])),1):1,g=Zg;p0){let w=new Array(N+1).join("0");E<0?S="-"+w+S.slice(1):S=w+S}}if(b+S.length>i)break;r.push(S),b+=S.length}return r}function Da(e,t,s,i,o,r,u){if(o>i)return[e];let p=[""],c=0,v=!1,g=!0;for(;;){let y=Ra("{","}",e);if(!y)return _s(p,e,[""],t,s,v);let m=y.pre;if(/\$$/.test(m)){if(p=_s(p,m+"{"+y.body+"}",[""],t,s,v&&!y.post.length),g=!1,!y.post.length)break;e=y.post;continue}let b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(y.body),E=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(y.body),S=b||E,N=y.body.indexOf(",")>=0;if(!S&&!N){if(c=t||F+B.length>s)break e;w.push(B),F+=B.length}}}}if(p=_s(p,m,w,t,s,v&&!y.post.length),!y.post.length)break;e=y.post}return p}var tv={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}"],"[:alpha:]":["\\p{L}\\p{Nl}"],"[:ascii:]":["\\x00-\\x7f"],"[:blank:]":["\\p{Zs}\\t"],"[:cntrl:]":["\\p{Cc}"],"[:digit:]":["\\p{Nd}"],"[:graph:]":["\\p{Z}\\p{C}",!0],"[:lower:]":["\\p{Ll}"],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}\\p{S}"],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f"],"[:upper:]":["\\p{Lu}"],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}"],"[:xdigit:]":["A-Fa-f0-9"]},Fs=e=>e.replace(/[[\]\\-]/g,"\\$&"),Ia=/$./,rc=(e,t,s=!1,i)=>{let o=w=>{let T=i?w.normalize(i):w;return[...T].length===1?T:w},r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let u=[],p=[],c=r+1,v=!1,g=!1,y=!1,m=r,b="";e:for(;cb.codePointAt(0)?u.push(Fs(b)+"-"+Fs(T)):T===b&&u.push(Fs(T)),b="",c+=w.length;continue}if(e.startsWith("-]",c+w.length)){u.push(Fs(T+"-")),c+=w.length+1;continue}if(e.startsWith("-",c+w.length)){b=T,c+=w.length+1;continue}u.push(Fs(T)),c+=w.length}if(m({t:"lit",ch:e}),ov=e=>e.replace(/[\\^$.*+?()[\]{}|/]/g,"\\$&"),uc=e=>new RegExp(`^${ov(e)}$`,"iu"),nr=new Map,cc=e=>{let t=nr.get(e);return t||(t=uc(e),nr.size>=1e3&&nr.clear(),nr.set(e,t)),t},_a=(e,t)=>{if(t===e.ch)return!0;if(!e.re)return!1;let s=t.charCodeAt(0);if(s>=128)return e.re.test(t);let i=e.ascii??(e.ascii=new Uint8Array(128));return i[s]||(i[s]=e.re.test(t)?1:2),i[s]===1},sv=(e,t,s,i)=>{let o=[];for(let r=0;r{let t=new Map,s=[];return e.forEach((i,o)=>{i.t==="open"?s.push(o):i.t==="close"&&s.length&&t.set(s.pop(),o)}),t},pc=(e,t,s,i,o)=>{let r=[],u=[r];for(let p=s;p{let s=[],i="",o=()=>{for(let r of i.normalize(t))s.push(co(r));i=""};for(let r of e){if(r.t==="lit"){i+=r.ch;continue}o(),s.push(r.t==="ext"?{...r,alts:r.alts.map(u=>fc(u,t))}:r)}return o(),s},rv=(e,t)=>{let s=1,i=p=>({t:"split",id:s++,out:p}),o=(p,c)=>p.reduceRight((v,g)=>r(g,v),c),r=(p,c)=>{switch(p.t){case"lit":let m=t?cc(p.ch):void 0;return{t:"lit",id:s++,ch:p.ch,re:m,next:c};case"any":case"star":return{t:p.t,id:s++,next:c};case"class":return{t:"class",id:s++,re:p.re,next:c}}let v=m=>p.alts.map(b=>o(b,m));switch(p.type){case"@":return i(v(c));case"?":return i([c,...v(c)]);case"!":return{t:"neg",id:s++,sub:i(v(Oa)),next:c}}let g=i([]),y=i(v(g));return g.out.push(c,y),p.type==="*"?g:y};return[o(e,Oa),s]},av=e=>{let t=[],s=new Set,i=r=>r.t==="match"?"match":String(r.id),o=(r,u)=>{if(r.t==="match"||s.has(r))return;s.add(r);let p=c=>t.push(`${u}${r.id}: ${c}`);switch(r.t){case"split":p(`split -> ${r.out.map(i).join(", ")}`);for(let c of r.out)o(c,u);return;case"neg":return p(`!(${i(r.sub)}) -> ${i(r.next)}`),o(r.sub,u+" "),o(r.next,u);case"lit":p(`${JSON.stringify(r.ch)} -> ${i(r.next)}`);break;case"class":p(`${r.re} -> ${i(r.next)}`);break;default:p(`${r.t==="any"?"?":"*"} -> ${i(r.next)}`)}o(r.next,u)};return o(e,""),[`start -> ${i(e)}`,...t].join(` `)},Ma=class{constructor(t){nt(this,"gen");nt(this,"threads",[]);nt(this,"match",!1);nt(this,"runs",[]);nt(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},mc=(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&&mc(i.state,s.state))),ac=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),po,Hn,Va,qa,Bs=class{constructor(t,s,i){_e(this,Hn);nt(this,"dots");nt(this,"dotStart");_e(this,po);this.dots=t,this.dotStart=s,ze(this,po,i)}state(){return new Ma(++re(this,po).gen)}done(t){return t.ids=t.threads.map(s=>s.id).sort((s,i)=>s-i),t.match&&t.ids.unshift(Oa.id),t}restricted(t,s){return s&&(this.dots||this.dotStart&&t===0)}add(t,s,i,o){switch(s.t){case"split":if(!Fe(this,Hn,Va).call(this,t,s))return;for(let u of s.out)this.add(t,u,i,o);return;case"neg":if(!Fe(this,Hn,Va).call(this,t,s))return;let r=this.state();return this.add(r,s.sub,i,!1),this.done(r),this.addRun(t,{t:"run",neg:s,state:r},i,o);case"star":if(this.restricted(i,o))return;Fe(this,Hn,qa).call(this,t,s)&&this.add(t,s.next,i,o);return;case"match":t.match=!0;return;default:Fe(this,Hn,qa).call(this,t,s)}}addRun(t,s,i,o){for(let r of t.runs)if(r.neg===s.neg&&mc(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":_a(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)}};po=new WeakMap,Hn=new WeakSet,Va=function(t,s){let{seen:i}=re(this,po);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,!0)},qa=function(t,s){let{has:i}=re(this,po);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,t.threads.push(s),!0)};var hc=e=>{let t=e.ids.join();if(!e.runs.length)return t;let s=e.runs.map(i=>`${i.neg.id}(${hc(i.state)})`);return`${t}|${s.sort().join("|")}`},lv=1<<18,zo,Ho,_n,fo,Fn,Un,Bn,on,$a,sr,gc,La=class{constructor(t,s){_e(this,on);_e(this,zo);_e(this,Ho,new Map);_e(this,_n,0);_e(this,fo);_e(this,Fn);_e(this,Un);_e(this,Bn);ze(this,zo,t),ze(this,Un,new Bs(!1,!1,s)),ze(this,Bn,new Bs(!1,!0,s))}start(t){if(t){if(re(this,Fn))return re(this,Fn);let i=re(this,Bn).state();return re(this,Bn).add(i,re(this,zo),0,!0),ze(this,Fn,Fe(this,on,$a).call(this,re(this,Bn).done(i)))}if(re(this,fo))return re(this,fo);let s=re(this,Un).state();return re(this,Un).add(s,re(this,zo),0,!0),ze(this,fo,Fe(this,on,sr).call(this,re(this,Un).done(s)))}next(t,s){let i=s.charCodeAt(0),o=i<128?void 0:t.next.get(s);if(o)return o;let r=t===re(this,Fn)?Fe(this,on,sr).call(this,re(this,Bn).step(t.state,s,0,!0)):Fe(this,on,sr).call(this,re(this,Un).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),ze(this,_n,re(this,_n)+128)),t.ascii[i]=r):t.next.set(s,r),al(this,_n)._++,r}};zo=new WeakMap,Ho=new WeakMap,_n=new WeakMap,fo=new WeakMap,Fn=new WeakMap,Un=new WeakMap,Bn=new WeakMap,on=new WeakSet,$a=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},sr=function(t){let s=hc(t),i=re(this,Ho).get(s);if(i)return i;re(this,_n)>lv&&Fe(this,on,gc).call(this);let o=Fe(this,on,$a).call(this,t);return re(this,Ho).set(s,o),ze(this,_n,re(this,_n)+(s.length+1)),o},gc=function(){re(this,Ho).clear(),ze(this,_n,0),ze(this,fo,void 0),ze(this,Fn,void 0)};var dv=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},uv=(e,t,s,i)=>{let o=0,r=s,u=-1,p=0;for(;r{let t=0,s=0;for(let i of e){let[o,r]=cv(i);t+=o,s+=r}return[t,s]},cv=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(vc),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]},lc=(e,t,s)=>{for(let i=0;ifv.test(e)?[...e]:e,dc=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},zn,jo,mo,ir,ho,Hs,rr,go,js,Gs,Ws,Dn,bn,Go,Wo,Ks,ar,nn,vo,Us,zs=class{constructor(t,s={}){_e(this,vo);nt(this,"pattern");nt(this,"options");_e(this,zn);_e(this,jo);_e(this,mo);_e(this,ir);_e(this,ho);_e(this,Hs,!1);_e(this,rr);_e(this,go);_e(this,js,!1);_e(this,Gs,0);_e(this,Ws,1/0);_e(this,Dn,[]);_e(this,bn,[]);_e(this,Go);_e(this,Wo);_e(this,Ks,!1);_e(this,ar);_e(this,nn);if(t.includes("/"))throw new Error("can only match a single path portion, got pattern: "+t);this.pattern=t,this.options=s;let{nocase:i=!1,noext:o=!1,normalize:r}=s;ze(this,nn,r===!0?"NFC":r||void 0);let u=/^[?*+@]\(\)$/.test(t),p=sv(t,i,o||u,re(this,nn)),[c]=pc(p,iv(p),0,p.length,!0);re(this,nn)&&(c=fc(c,re(this,nn)));let[v,g]=rv(c,i);if(ze(this,zn,v),ze(this,jo,g),c.every(y=>y.t==="lit"))ze(this,ho,c.map(y=>y.ch).join("")),ze(this,Hs,i);else{let y=E=>E.t!=="lit"?void 0:i?{ch:E.ch,re:cc(E.ch)}:{ch:E.ch};for(let E of c){let S=y(E);if(!S)break;re(this,Dn).push(S)}for(let E=c.length-1;E>=0;E--){let S=y(c[E]);if(!S)break;re(this,bn).unshift(S)}ze(this,Ks,!!(re(this,Dn).length||re(this,bn).length)),i||(ze(this,Go,re(this,Dn).map(E=>E.ch).join("")),ze(this,Wo,re(this,bn).map(E=>E.ch).join(""))),ze(this,go,dv(re(this,zn))?.slice(re(this,Dn).length,-re(this,bn).length||void 0)),ze(this,js,!!re(this,go)?.every(E=>E.t==="star"||E.t==="any"));let[m,b]=vc(c);ze(this,Gs,m),ze(this,Ws,b)}}test(t){return re(this,nn)?(dc(t),Fe(this,vo,Us).call(this,t.normalize(re(this,nn)))):pv.test(t)?(dc(t),Fe(this,vo,Us).call(this,t,[...t])):Fe(this,vo,Us).call(this,t,t)}testUnchecked(t){return Fe(this,vo,Us).call(this,re(this,nn)?t.normalize(re(this,nn)):t)}toString(){return av(re(this,zn))}};zn=new WeakMap,jo=new WeakMap,mo=new WeakMap,ir=new WeakMap,ho=new WeakMap,Hs=new WeakMap,rr=new WeakMap,go=new WeakMap,js=new WeakMap,Gs=new WeakMap,Ws=new WeakMap,Dn=new WeakMap,bn=new WeakMap,Go=new WeakMap,Wo=new WeakMap,Ks=new WeakMap,ar=new WeakMap,nn=new WeakMap,vo=new WeakSet,Us=function(t,s){if(re(this,ho)!==void 0)return re(this,Hs)?(re(this,rr)??ze(this,rr,uc(re(this,ho)))).test(t):t===re(this,ho);let i=re(this,Gs),o=re(this,Ws);if(s===void 0){let g=t.length,y=g+1>>1;if(go)return!1;(yo)&&(s=or(t))}if(s!==void 0&&(s.lengtho))return!1;let r=re(this,Dn).length;if(re(this,Ks))if(re(this,Go)!==void 0&&re(this,Wo)!==void 0){if(!t.startsWith(re(this,Go))||!t.endsWith(re(this,Wo)))return!1}else{s??(s=or(t));let g=s.length-re(this,bn).length;if(!lc(re(this,Dn),s,0)||!lc(re(this,bn),s,g))return!1}let u=!this.options.dot&&t.startsWith(".");if(re(this,go)){if(t==="."||t===".."||u&&!r)return!1;if(re(this,js))return!0;s??(s=or(t));let g=s.length-re(this,bn).length;return uv(re(this,go),s,r,g)}if(s??(s=or(t)),t==="."||t===".."){re(this,mo)??ze(this,mo,ac(re(this,jo)));let g=re(this,ir)??ze(this,ir,new Bs(!0,!1,re(this,mo))),y=g.state();g.add(y,re(this,zn),0,!0);let m=g.done(y);for(let b=0;b{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};var jn=(e,{windowsPathsNoEscape:t=!1,magicalBraces:s=!1}={})=>s?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");var yo=(e,{windowsPathsNoEscape:t=!1,magicalBraces:s=!0}={})=>s?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var zt=(e,t,s={})=>(Ys(t),!s.nocomment&&t.charAt(0)==="#"?!1:hv(t,s).match(e)),Ko=new Map,mv=256,hv=(e,t)=>{let s=e+"\0"+JSON.stringify(t),i=Ko.get(s);return i?Ko.delete(s):(i=new bo(e,{...t}),Ko.size>=mv&&Ko.delete(Ko.keys().next().value)),Ko.set(s,i),i},Sc=typeof process=="object"&&process?process.env?.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",yc={win32:{sep:"\\"},posix:{sep:"/"}},gv=Sc==="win32"?yc.win32.sep:yc.posix.sep;zt.sep=gv;var vt=Symbol("globstar **");zt.GLOBSTAR=vt;var vv=(e,t={})=>s=>zt(s,e,t);zt.filter=vv;var An=(e,t={})=>Object.assign({},e,t),yv=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return zt;let t=zt;return Object.assign((i,o,r={})=>t(i,o,An(e,r)),{Minimatch:class extends t.Minimatch{constructor(o,r={}){super(o,An(e,r))}static defaults(o){return t.defaults(An(e,o)).Minimatch}},unescape:(i,o={})=>t.unescape(i,An(e,o)),escape:(i,o={})=>t.escape(i,An(e,o)),filter:(i,o={})=>t.filter(i,An(e,o)),defaults:i=>t.defaults(An(e,i)),braceExpand:(i,o={})=>t.braceExpand(i,An(e,o)),match:(i,o,r={})=>t.match(i,o,An(e,r)),sep:t.sep,GLOBSTAR:vt})};zt.defaults=yv;var Ec=(e,t={})=>(Ys(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:ic(e,{max:t.braceExpandMax}));zt.braceExpand=Ec;var bv=(e,t,s={})=>{let i=new bo(t,s);return e=e.filter(o=>i.match(o)),i.options.nonull&&!e.length&&e.push(t),e};zt.match=bv;var bc=/[?*]|[+@!]\(.*?\)|\[|\]/,Nc=(e,t)=>{let s=t+1;(e.charAt(s)==="!"||e.charAt(s)==="^")&&s++;let i=!1;for(;s{if(!t&&(e==="+()"||e==="@()"))return e;let s="";for(let i=0;i{if(/^[?*+@]\(\)$/.test(e)||e.includes("[:"))return!1;let t=0;for(let s=0;stypeof e=="string"?t===e:t!==""&&e.testUnchecked(t),kc=(e,t,s,i,o)=>Gn(e,t)?s:i!==void 0&&Gn(e,i)?o:-1,Ha=e=>e==="."||e==="..",Ua=e=>typeof e=="string"&&/^[a-z]:$/i.test(e),dr=e=>typeof e=="string"&&/^unc$/i.test(e),Ba=e=>{if(e[0]!==""||e[1]!=="")return-1;let t=e[2]!=="?"?2:dr(e[3])?4:-1,s=e[t],i=e[t+1];return t!==-1&&s!==void 0&&s!==""&&s!==vt&&i!==void 0&&i!==""&&i!==vt?t:-1},lr=(e,t)=>!Ha(e)&&(t||!e.startsWith(".")),Js=(e,t,s,i,o)=>{for(let r=t;r=s||cr(e.charCodeAt(p),o))return!0}let u=ja(e,r,o);if(u===-1)return!1;for(r=u+1;rt==="/"?e===47:t==="\\"?e===92:e===47||e===92,ja=(e,t,s)=>{if(s!=="both")return e.indexOf(s,t);let i=e.indexOf("/",t),o=e.indexOf("\\",t);return i===-1?o:o===-1?i:Math.min(i,o)},Cc=(e,t,s)=>s!=="both"?e.lastIndexOf(s,t):Math.max(e.lastIndexOf("/",t),e.lastIndexOf("\\",t)),za={},Wn,Jo,Kn,In,Xo,Qo,Yn,Qs,Zo,Zs,Ue,ur,Xs,Rc,Tc,Pc,Dc,Ac,Ic,Ga,Oc,Mc,Wa,Yo,Ka,bo=class{constructor(t,s={}){_e(this,Ue);nt(this,"options");nt(this,"set");nt(this,"pattern");nt(this,"windowsPathsNoEscape");nt(this,"nonegate");nt(this,"negate");nt(this,"comment");nt(this,"empty");nt(this,"preserveMultipleSlashes");nt(this,"partial");nt(this,"globSet");nt(this,"globParts");nt(this,"nocase");nt(this,"isWindows");nt(this,"platform");nt(this,"windowsNoMagicRoot");nt(this,"maxGlobstarRecursion");_e(this,Wn);_e(this,Jo);_e(this,Kn);_e(this,In);_e(this,Xo,[]);_e(this,Qo,[]);_e(this,Yn,[]);_e(this,Qs,new Map);_e(this,Zo,!1);_e(this,Zs,new WeakMap);Ys(t),s=s||{},this.options=s,this.maxGlobstarRecursion=s.maxGlobstarRecursion??200,this.pattern=t,this.platform=s.platform||Sc,this.isWindows=this.platform==="win32";let i="allowWindowsEscape";this.windowsPathsNoEscape=!!s.windowsPathsNoEscape||s[i]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!s.preserveMultipleSlashes,this.negate=!1,this.nonegate=!!s.nonegate,this.comment=!1,this.empty=!1,this.partial=!!s.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=s.windowsNoMagicRoot!==void 0?s.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],ze(this,Wn,!this.preserveMultipleSlashes),ze(this,Kn,(s.optimizationLevel??1)>=2);let o=s.normalize;ze(this,In,o===!0?"NFC":o||void 0),this.make();let r=this.set.map(u=>Fe(this,Ue,Xs).call(this,u));ze(this,Yn,this.set.map((u,p)=>re(this,Wn)&&u.length-1>r[p])),ze(this,Xo,this.set.map((u,p)=>{let c=re(this,Yn)[p]?u.length-1:u.length,v=u.slice(r[p]+1,c).filter(g=>typeof g=="string"&&!!g);return[...new Set(v)]})),ze(this,Jo,re(this,Xo).some(u=>u.length)),ze(this,Qo,this.set.map((u,p)=>{let[c,v,g]=u;if(re(this,Yn)[p]&&u.length===2&&c===vt&&v!==vt)return"tail";if(re(this,Yn)[p]&&s.matchBase&&u.length===1&&c!==vt&&c!=="")return"base";if(!(!re(this,Wn)||r[p]!==-1)){if(u.length===3&&c===vt&&g===vt&&v!==vt&&v!==""&&this.maxGlobstarRecursion>0)return"mid";if(u.length===2&&v===vt&&c!==vt&&c!=="")return"head"}}))}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let s of t)if(typeof s!="string")return!0;return!1}make(){let t=this.pattern,s=this.options;if(!s.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())];let i=this.globSet.map(r=>Fe(this,Ue,Ka).call(this,r));this.globParts=this.preprocess(i),ze(this,Zo,!0);let o=this.globParts.map((r,u,p)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=r[2]==="?"&&dr(r[3])?6:4,v=r[0]===""&&r[1]===""&&(r[2]==="?"||!bc.test(r[2]))&&r.slice(3,c).every(y=>!bc.test(y)),g=/^[a-z]:/i.test(r[0]);if(v)return[...r.slice(0,c).map(y=>Fe(this,Ue,ur).call(this,y)),...r.slice(c).map(y=>this.parse(y))];if(g)return[Fe(this,Ue,ur).call(this,r[0]),...r.slice(1).map(y=>this.parse(y))]}return r.map(c=>this.parse(c))});if(this.set=o.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r{for(let p=0;pi.length));for(let i=0;i{if(!(u[i]instanceof zs||u[i]===za)||!kv(this.globParts[p][i]))return;let c=[...this.globParts[p]];c[i]="";let v=`${u.length}/${c.join("/")}`,g=o.get(v);g?g.push(p):o.set(v,[p])});let r=new Set;for(let u of o.values()){if(u.length<2)continue;let[p,...c]=u,g=`@(${u.map(y=>this.globParts[y][i]).join("|")})`;this.globParts[p][i]=g,this.set[p][i]=this.parse(g);for(let y of c)r.add(y)}r.size&&(t=!0,this.set=this.set.filter((u,p)=>!r.has(p)),this.globParts=this.globParts.filter((u,p)=>!r.has(p)))}}}preprocess(t){if(this.options.noglobstar)for(let i of t)for(let o=0;o=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):s>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(s=>{let i=-1;for(;(i=s.indexOf("**",i+1))!==-1;){let o=i;for(;s[o+1]==="**";)o++;o!==i&&s.splice(i,o-i)}return s})}levelOneOptimize(t){return t.map(s=>{let i=Fe(this,Ue,Xs).call(this,s)+1;return s=s.reduce((o,r)=>{let u=o[o.length-1];return r==="**"&&u==="**"?o:r===".."&&o.length>i&&u&&u!==".."&&u!=="."&&u!=="**"?(o.pop(),o):(o.push(r),o)},[]),s.length===0?[""]:s})}firstPhasePreProcess(t){let{braceExpandMax:s=1e5}=this.options,i=!1;do{i=!1;for(let o of t){let r=-1;for(;(r=o.indexOf("**",r+1))!==-1;){let c=r;for(;o[c+1]==="**";)c++;c>r&&o.splice(r+1,c-r);let v=o[r+1],g=o[r+2],y=o[r+3];if(v!==".."||!g||g==="."||g===".."||!y||y==="."||y===".."||t.length>=s)continue;i=!0,o.splice(r,1);let m=o.slice(0);m[r]="**",t.push(m),r--}if(!this.preserveMultipleSlashes){for(let c=1;c1e3)return t;for(let s=0;ss.length)}partsMatch(t,s,i=!1){let o=0,r=0,u=[],p="";for(;o=0;v--)c=r[v];for(let v=0;v=0){let w=S;for(;w>0&&cr(t.charCodeAt(w-1),s);)w--;p=w===0?0:Cc(t,w-1,s)+1,u=t.slice(p,w)}let N=re(this,Kn)&&(Ha(o)||o===""&&u!==void 0&&Ha(u));i=N?-1:1,m=!N}let b=-1;if(m&&typeof y=="string"&&(b=kc(y,o,r,u,p),b===-1))continue;if(re(this,Jo)){for(let S of re(this,Xo)[v])if(!t.includes(S))continue e}if(m&&typeof y=="object"&&(b=kc(y,o,r,u,p),b===-1))continue;let E=re(this,Qo)[v];if(E==="base"&&m)return"yes";if(E==="tail"&&m){if(re(this,Kn)&&Js(t,0,b,!0,s))return"maybe";if(!Js(t,0,b,c,s))return"yes";continue}if(E==="mid"||E==="head"){let S=Fe(this,Ue,Pc).call(this,t,g,E==="head",c,s);if(S!=="no")return S;continue}return"maybe"}return"no"},Tc=function(t,s,i){let o=!!this.options.dot,r=t.length;if(i==="head"){if(r<2||!Gn(s[0],t[0]))return!1;for(let p=1;pp&&u.testUnchecked(t.slice(p,c)))&&!Js(t,v,t.length,o,r))return"yes";if(i||Js(t,p,v,o,r))return"no";p=v}return"no"},Dc=function(t){let s=Fa;return s?.f===t&&s.isWindows===this.isWindows&&s.preserveMultipleSlashes===this.preserveMultipleSlashes&&s.normalize===re(this,In)?s:void 0},Ac=function(t){let{isWindows:s,preserveMultipleSlashes:i}=this,o=Fe(this,Ue,Ka).call(this,s?t.split("\\").join("/"):t),r=re(this,In);return r&&(o=o.map(u=>u.normalize(r))),Fa={f:t,isWindows:s,preserveMultipleSlashes:i,normalize:r,parts:o},Fa},Ic=function(t){let s=[...t],i=!1;do{if(i=!1,!this.preserveMultipleSlashes){for(let u=1;ut.length)return!1;let y=t.length-c.length;if(Fe(this,Ue,Yo).call(this,t,c,i,y,0))g=c.length;else{if(t[t.length-1]!==""||o+c.length===t.length||(y--,!Fe(this,Ue,Yo).call(this,t,c,i,y,0)))return!1;g=c.length+1}}if(!p.length){let y=!!g;for(let m=o;m{w[1]=E-S[T]});let N={head:v,body:g,tail:y,segments:m};return o[r]=N,N},Wa=function(t,s,i,o,r,u,p,c,v){let g=s[r];if(!g){if(u)return o>=i||o===i-1&&t[o]==="";for(let E=o;Ee.lastIndexOf(t)===s)}function Ja(e){let t=(e||[]).filter(s=>typeof s=="string"&&s.length>0).map(s=>{let{negated:i,anchored:o,directoryOnly:r,body:u}=Cv(s);return{negated:i,directoryOnly:r,matcher:new bo(u,{dot:!0,nonegate:!0,nocomment:!0,matchBase:!o&&!u.includes("/")})}});return(s,i=!1)=>{let o=(s||"").replace(/^\/+/,"");if(!o)return!1;let r=o.split("/"),u=r.slice(0,-1).map((c,v)=>r.slice(0,v+1).join("/")),p=i;for(let c of t){if(c.negated?!p:p)continue;(c.directoryOnly?u:[...u,o]).some(g=>c.matcher.match(g))&&(p=!c.negated)}return p}}var ese=new Set("^$\\.*+?()[]{}|/dDsSwWbBnrtvf0cxupP".split(""));function Xa(e){let t=e.indexOf("=>");if(t<0)return{term:e,replacement:null};let s=e.slice(0,t).replace(/\s+$/,""),i=e.slice(t+2).replace(/^\s+/,"");return s?{term:s,replacement:i}:{term:e,replacement:null}}var Vc=new Set(["*","+","?","(",")","[","]","{","}","|","^","$"]);function qc(e){let t=[];return String(e||"").split(` `).forEach((s,i)=>{let{term:o}=Xa(s.trim());if(!o)return;let r=[];for(let u=0;ub.trim()).filter(b=>b.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",m).then(()=>{p.accept(y),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",v&&i.cancel(v),v=i(()=>{e.message=null},2500)},b=>{e.saving=!1;let E=b&&b.data&&b.data.error,S="Unable to save your defaults. Please try again.";Promise.all([s("ERRORS."+E),s("ERRORS.unknown_error")]).then(([N,w])=>{e.error=E&&N!==w?N:S},()=>{e.error=S})})},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."}))}},Hc=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)})}},jc=function(e,t,s,i,o){e.user&&!e.user.status&&s.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&s.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(p){e.feature=p},e.featureHref=function(p){return p.needsUser&&!e.user?"/signin":p.href},e.featureTarget=function(p){return p.needsUser&&!e.user?"_self":p.target||void 0},e.featureKeydown=function(p,c){let v={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[p.key];if(v===void 0)return;p.preventDefault();let g=e.features.length,y=v==="first"?0:v==="last"?g-1:(c+v+g)%g;e.feature=e.features[y].key,o(()=>{let m=i.document.getElementById("feature-tab-"+e.feature);m&&m.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(m=>m.trim()).filter(Boolean).sort((m,b)=>b.length-m.length),c=m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let v=new RegExp("("+p.map(c).join("|")+")","gi"),g={},y=0;return(e.demoText||"").split(v).filter(m=>m!=="").map(m=>{let b=p.find(E=>E.toLowerCase()===m.toLowerCase());return b?(g[b.toLowerCase()]||(g[b.toLowerCase()]=++y),{text:String(g[b.toLowerCase()]),redacted:!0,original:m}):{text:m}})},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 c={series:p,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!p||p.length<2)return c;let v=new Array(p.length-1);for(let S=1;S=2){let S=v[g-2];S&&(c.pctChange=(c.deltaToday-S)/S*100)}return c.pctAbs=Math.round(Math.abs(c.pctChange)),c.isUp=c.pctChange>=0,c}e.history={repositories:u([]),users:u([]),pageViews:u([]),pullRequests:u([])},t.get("/api/stat/history?days=60").then(p=>{let c=p.data||[];e.history={repositories:u(c.map(v=>v.nbRepositories||0)),users:u(c.map(v=>v.nbUsers||0)),pageViews:u(c.map(v=>v.nbPageViews||0)),pullRequests:u(c.map(v=>v.nbPullRequests||0))}}).catch(()=>{})},Gc=function(e,t,s,i,o,r){let u=bt();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,We(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Bt()(document,"click",k=>{e.quotaExpanded&&!k.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=k=>k.status==="error"||k._broken||c(k.status)==="progress"&&k._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=k=>{e.projectView=k,k==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=k=>{let q=Ca(k?.anonymizeDate||k?.lastView)||"";return/ ago$/.test(q)?"No activity for "+q.replace(/ ago$/,""):"No activity since "+q.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=k=>"project-details-"+encodeURIComponent(k._type+":"+(k._id||k._source||"unknown")),e.showProjectDetails=async k=>{e.selectedProject=k,e.projectName=k.projectName||"",e.nameError="",e.nameMessage="",await We();let q=document.getElementById(e.projectDetailsId(k));q?.focus(),q?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=k=>{e.selectedProject=null,We(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(k._type+":"+k._id)}"]`)?.focus())},e.saveProjectName=async k=>{if(e.nameSaving||!k._id)return;let q=e.projectName.trim();if(q.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let G=await t.post("/api/user/project-name",{type:k._type,id:k._id,name:q});k.projectName=G.data.name,k._label=k.projectName||k._fallbackLabel,e.selectedProject===k&&(e.nameMessage=q?"Project name saved.":"Default project name restored."),T||(e.dashboardCursor=null,await F(),e.selectedProject===k&&(e.selectedProject=e.items.find(H=>H._type===k._type&&H._id===k._id)||null))}catch{e.selectedProject===k&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async k=>{if(!k._viewUrl||e.copyingId)return;let q=new URL(k._viewUrl,o.location.origin).href;e.copyingId=k._type+":"+k._id;try{await Qa(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 c(k){return k==="ready"||k==="error"?k:k==="expired"||k==="expiring"?"expired":k==="removed"||k==="removing"?"removed":(p.indexOf(k)>-1,"progress")}let v=7200*1e3,g="dashboard.filterPrefs",y={typeFilter:"all",filters:{status:{ready:!0,progress:!0,error:!0,expired:!0,removed:!1}},orderBy:"-anonymizeDate"},m=loadFilterPrefs(g)||{};e.typeFilter=m.typeFilter||y.typeFilter,e.filters={status:Object.assign({},y.filters.status,m.filters&&m.filters.status||{})},e.orderBy=m.orderBy||y.orderBy;let b={_name:{label:"Anonymous ID",defaultDesc:!1},_label:{label:"Project",defaultDesc:!1},anonymizeDate:{label:"Anonymize date",defaultDesc:!0},status:{label:"Status",defaultDesc:!1},lastView:{label:"Last view",defaultDesc:!0},pageView:{label:"Views",defaultDesc:!0},"options.expirationDate":{label:"Expiration",defaultDesc:!1}};e.sortFields=b,e.sortField=()=>e.orderBy.replace(/^-/,""),e.sortDesc=()=>e.orderBy.charAt(0)==="-",e.sortLabel=()=>{let k=b[e.sortField()];return k?k.label:"Custom"},e.isSortedBy=k=>e.sortField()===k,e.setSort=(k,q)=>{typeof q!="boolean"&&(q=e.isSortedBy(k)?!e.sortDesc():!!(b[k]&&b[k].defaultDesc)),e.orderBy=(q?"-":"")+k},e.toggleSortDirection=()=>{e.setSort(e.sortField(),!e.sortDesc())},e.watchGroup(["typeFilter","orderBy"],()=>{saveFilterPrefs(g,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(g,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})},!0),r.load().then(k=>{e.quota=k},console.error);function E(k,q,G,H,K,ne){k.pageView||(k.pageView=0),k.lastView||(k.lastView=""),k.options=k.options||{},k.options.terms=(k.options.terms||[]).filter(fe=>fe),k._id=q||"",k._source=H,k._broken=!q,k._name=q||H||"(unnamed)",k._fallbackLabel=k._type==="gist"?"Gist "+(q||H||"without an ID"):H||G||k._name,k._label=k.projectName||k._fallbackLabel,k._editUrl=q?K:null,k._viewUrl=q?ne:null,k._broken&&(k.status="error",k.statusMessage="incomplete_record"),k._statusKey=c(k.status);let x=k.anonymizeDate||k.lastView;if(k._stale=k._statusKey==="progress"&&!!x&&Date.now()-new Date(x).getTime()>v,k.status==="expired"||k.status==="expiring")k._expiry={kind:"expired",date:k.options.expirationDate},k._expiry.label=Ea(k.options.expirationDate)||void 0;else if(k.status!=="ready")k._expiry={kind:"none"};else if(k.options.expirationMode==="never"||!k.options.expirationDate)k._expiry={kind:"never"};else{k._expiry={kind:"date",date:k.options.expirationDate};let fe=new Date(k.options.expirationDate).getTime()-Date.now();if(fe>0&&fe<=168*3600*1e3){let he=Math.max(1,Math.round(fe/36e5)),Be=Math.round(fe/864e5);k._expiry.soon=he<48?"in "+he+(he===1?" hour":" hours"):"in "+Be+" days"}}return k}function S(k){return t.get(k).then(q=>q.data||[],q=>(console.error(q),[]))}function N(){return e.loading=!0,i.all([S("/api/user/anonymized_repositories"),S("/api/user/anonymized_pull_requests"),S("/api/user/anonymized_gists")]).then(k=>{let q=k[0],G=k[1],H=k[2],K=[];q.forEach(ne=>{ne._type="repo";let x=ne.source||{};K.push(E(ne,ne.repoId,ne.repoId,x.fullName,"/anonymize/"+ne.repoId,"/r/"+ne.repoId+"/"))}),G.forEach(ne=>{ne._type="pr";let x=ne.source||{};K.push(E(ne,ne.pullRequestId,ne.pullRequestId,x.repositoryFullName?x.repositoryFullName+"#"+x.pullRequestId:void 0,"/pull-request-anonymize/"+ne.pullRequestId,"/pr/"+ne.pullRequestId+"/"))}),H.forEach(ne=>{ne._type="gist";let x=ne.source||{};K.push(E(ne,ne.gistId,ne.gistId,x.gistId,"/gist-anonymize/"+ne.gistId,"/gist/"+ne.gistId+"/"))}),e.items=K,e.removedCount=K.filter(ne=>ne._statusKey==="removed").length,e.loading=!1})}let w=0,T=!1;e.dashboardCursor=null,e.dashboardError="";function M(k){let q=k.source||{};return k._type==="repo"?E(k,k.repoId,k.repoId,q.fullName,"/anonymize/"+k.repoId,"/r/"+k.repoId+"/"):k._type==="pr"?E(k,k.pullRequestId,k.pullRequestId,q.repositoryFullName?q.repositoryFullName+"#"+q.pullRequestId:void 0,"/pull-request-anonymize/"+k.pullRequestId,"/pr/"+k.pullRequestId+"/"):E(k,k.gistId,k.gistId,q.gistId,"/gist-anonymize/"+k.gistId,"/gist/"+k.gistId+"/")}function F(k=!1){if(T)return N();let q=++w;return e.loading=!k,e.loadingMore=k,e.dashboardError="",t.get("/api/user/dashboard",{params:{q:e.search,type:e.typeFilter,sort:e.orderBy,statuses:Object.keys(e.filters.status).filter(G=>e.filters.status[G]!==!1).join(",")||"none",attention:String(e.projectView==="attention"),cursor:k?e.dashboardCursor:void 0}}).then(G=>{if(q===w){if(!Array.isArray(G.data?.items))return T=!0,N();e.items=(k?e.items:[]).concat(G.data.items.map(M)),e.dashboardCursor=G.data.cursor,e.dashboardTotals=G.data,k||_()}},G=>{if(q===w){if(G.status===404)return T=!0,N();e.dashboardError="Projects could not be loaded. Please try again."}}).finally(()=>{q===w&&(e.loading=!1,e.loadingMore=!1)})}e.loadMoreProjects=()=>F(!0);let j;e.watchGroup(["search","typeFilter","orderBy","projectView"],()=>{T||(j&&u.timeout.cancel(j),j=u.timeout(()=>F(),150))},!1),e.watch("filters",()=>{T||F()},!0,!1),e.on("dispose",()=>{w++}),F(),e.openItem=(k,q)=>{if(!k._viewUrl)return;let G=q&&q.target;G&&G.closest&&G.closest("a, button, .dropdown, input")||(o.location.href=k._viewUrl)},e.hiddenStatusCount=()=>Object.keys(e.filters.status).filter(k=>e.filters.status[k]===!1).length,e.hasHiddenStatus=()=>e.hiddenStatusCount()>0;let oe=()=>Object.keys(e.statusKeyLabels);e.onlyRemovedShown=()=>oe().every(k=>k==="removed"==(e.filters.status[k]!==!1)),e.isActiveDefault=()=>oe().every(k=>k==="removed"==(e.filters.status[k]===!1)),e.statusView=()=>e.projectView==="attention"?"attention":e.onlyRemovedShown()?"removed":e.filters.status.removed===!1?"active":"custom",e.setStatusView=k=>{if(k==="attention")return e.setProjectView("attention");e.projectView="all",oe().forEach(q=>{e.filters.status[q]=k==="removed"?q==="removed":q!=="removed"})},e.statusChipKeys=()=>{let k=e.statusView();return k==="removed"?[]:oe().filter(q=>e.filters.status[q]===!1&&!(q==="removed"&&k!=="custom"))},e.removedCount=null;function _(){if(T){e.removedCount=e.items.filter(q=>q._statusKey==="removed").length;return}let k=e.dashboardTotals;!k||e.projectView!=="all"||e.search.trim()||e.typeFilter!=="all"||(e.isActiveDefault()?e.removedCount=Math.max(0,k.total-k.filtered):e.onlyRemovedShown()&&(e.removedCount=k.filtered))}e.showViewTabs=()=>e.statusView()!=="active"||e.attentionCount()>0||e.removedCount>0||e.removedCount==null&&!!e.dashboardTotals&&e.dashboardTotals.total>e.dashboardTotals.filtered,e.hasActiveFilters=()=>e.projectView!=="all"||e.typeFilter!=="all"||e.search.trim().length>0||Object.keys(e.filters.status).some(k=>e.filters.status[k]===!1),e.showClearFilters=()=>e.search.trim().length>0||e.typeFilter!=="all"||e.statusChipKeys().length>0,e.isPlainView=()=>!e.showClearFilters(),e.clearFilters=()=>{let k=e.statusView();e.typeFilter="all",e.search="",e.setStatusView(k==="removed"?"removed":"active")};function z(k,q,G,H){t.get("/api/repo/"+k).then(async K=>{let ne=H!==void 0&&H!==K.data.status;for(let x of e.items)if(x._type==="repo"&&x.repoId==k){ne=ne||x.status!==K.data.status;let fe=e.needsAttention(x);x.status=K.data.status,x.statusMessage=K.data.statusMessage,x._statusKey=c(x.status),x._statusKey!=="progress"&&(x._stale=!1);let he=e.needsAttention(x);e.dashboardTotals&&fe!==he&&(e.dashboardTotals.attention=Math.max(0,e.dashboardTotals.attention+(he?1:-1)));break}if(ne&&!T){e.dashboardCursor=null;let x=e.selectedProject;await F(),x&&e.selectedProject===x&&(e.selectedProject=e.items.find(fe=>fe._type===x._type&&fe._id===x._id)||null)}if(K.data.status=="ready"||K.data.status=="error"||K.data.status=="removed"||K.data.status=="expired"){q(K.data);return}u.timeout(()=>z(k,q,G,K.data.status),2500)},G)}let I=k=>k==="repo"?"repository":k==="gist"?"gist":"pull request",L=k=>k==="repo"?"/api/repo":k==="gist"?"/api/gist":"/api/pr";e.removeItem=k=>{let q=I(k._type);if(confirm(`Are you sure that you want to remove the ${q} ${k._id}?`)){let G=at({title:`Removing ${k._id}...`,date:new Date,body:`The ${q} ${k._id} is going to be removed.`});e.addToast(G);let H=`${L(k._type)}/${k._id}`;t.delete(H).then(()=>{k._type==="repo"?z(k._id,()=>{G.title=`${k._id} is removed.`,G.body=`The ${q} ${k._id} is removed.`},void 0,k.status):(G.title=`${k._id} is removed.`,G.body=`The ${q} ${k._id} is removed.`,F())},K=>{G.title=`Error during the removal of ${k._id}.`,G.body=K.body,F()})}},e.refreshItem=k=>{let q=I(k._type),G=at({title:`Refreshing ${k._id}...`,date:new Date,body:`The ${q} ${k._id} is going to be refreshed.`});e.addToast(G);let H=ne=>{G.title=`Error during the refresh of ${k._id}.`,G.body=ne.data?.error||ne.body||"The refresh could not be completed. Please try again.",F()},K=`${L(k._type)}/${k._id}/refresh`;t.post(K).then(()=>{k._type==="repo"?z(k._id,ne=>{if(ne.status!=="ready"){H({body:ne.statusMessage||`The repository is ${ne.status}.`});return}G.title=`${k._id} is refreshed.`,G.body=`The ${q} ${k._id} is refreshed.`},H,k.status):(G.title=`${k._id} is refreshed.`,G.body=`The ${q} ${k._id} is refreshed.`,F())},H)},e.extendItem=k=>{let q=I(k._type),G=at({title:`Extending ${k._id}...`,date:new Date,body:`The expiration of ${q} ${k._id} is being extended.`});e.addToast(G);let H=`${L(k._type)}/${k._id}/extend`;t.post(H).then(K=>{let ne=K?.data?.expirationDate?` until ${new Date(K.data.expirationDate).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}`:"";k._type==="repo"?z(k._id,()=>{G.title=`${k._id} is extended.`,G.body=`${q} ${k._id} is extended${ne}.`},void 0,k.status):(G.title=`${k._id} is extended.`,G.body=`${q} ${k._id} is extended${ne}.`,F())},K=>{G.title=`Error during the extension of ${k._id}.`;let ne=K.data&&K.data.error;G.body=ne||K.body,ne&&Object.prototype.hasOwnProperty.call(Jn.ERRORS,ne)&&(G.body=Jn.ERRORS[ne]),F()})},e.itemFilter=k=>{if(e.projectView==="attention"&&!e.needsAttention(k)||e.typeFilter!=="all"&&k._type!==e.typeFilter||e.filters.status[k._statusKey]===!1)return!1;let q=e.search.trim().toLowerCase();return!!(q.length==0||k._label&&String(k._label).toLowerCase().indexOf(q)>-1||k._source&&String(k._source).toLowerCase().indexOf(q)>-1||k._id&&String(k._id).toLowerCase().indexOf(q)>-1||k.conference&&String(k.conference).toLowerCase().indexOf(q)>-1)}};var Wc=function(e,t,s){let i=bt();e.repoId=s.repoId,e.reviewUrl=window.location.origin+"/r/"+encodeURIComponent(s.repoId)+"/",e.repo=null,e.progress=0,e.rateLimitResetAt=0,e.rateLimitCountdown="",e.shareUrl=(window.location?.origin||"")+"/r/"+encodeURIComponent(e.repoId)+"/",e.copied=!1;let o=null;e.copyShareUrl=async()=>{try{await Qa(e.shareUrl),e.copied=!0,o&&i.timeout.cancel(o),o=i.timeout(()=>{e.copied=!1},2e3)}catch{e.addToast?.({title:"Copy this anonymous link",body:e.shareUrl})}},e.selectShareUrl=g=>{let y=window.getSelection?.();if(!y||!g?.target)return;let m=document.createRange();m.selectNodeContents(g.target),y.removeAllRanges(),y.addRange(m)};var r=null;let u=null,p=!1;function c(g){e.rateLimitResetAt=g,r&&i.interval.cancel(r);function y(){var m=Math.max(0,Math.ceil((g-Date.now())/1e3));if(m<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,i.interval.cancel(r),r=null;else{var b=Math.floor(m/60),E=m%60;e.rateLimitCountdown=b>0?b+"m "+E+"s":E+"s"}}y(),r=i.interval(y,1e3)}e.on("dispose",function(){p=!0,r&&i.interval.cancel(r),u&&i.timeout.cancel(u)});function v(g){if(!g)return g;var y=g.match(/^rate_limited:(\d+)$/);return y?(c(parseInt(y[1],10)),null):(e.rateLimitResetAt=0,g)}e.getStatus=()=>{p||t.get("/api/repo/"+e.repoId,{repoId:e.repoId,repoUrl:e.repoUrl}).then(g=>{if(!p){e.repo=g.data,g.data.rateLimitResetAt?c(g.data.rateLimitResetAt):e.repo.statusMessage=v(e.repo.statusMessage),e.repo.status=="ready"?e.progress=100:e.repo.status=="queue"?e.progress=10:e.repo.status=="downloaded"?e.progress=50:e.repo.status=="download"||e.repo.status=="preparing"?e.progress=25:e.repo.status=="anonymizing"&&(e.progress=75);var y=!["ready","removed","expired"].includes(e.repo.status);e.repo.status=="error"&&!e.rateLimitResetAt&&(y=!1),y&&(u=i.timeout(e.getStatus,2e3))}},g=>{e.error=g.data.error})},e.getStatus()},mr=function(e,t,s,i,o,r,u){_c(),e.renderRedacted=$s,e.sourceUrl="",e.workspaceOpen=!1,e.sourceUrlError="",e.previewStatus="idle",e.sourceLoading=!1,e.mobilePane="settings";let p=window.matchMedia?.("(max-width: 767px)");e.mobileWorkspace=!!p?.matches,p?.addEventListener&&Bt()(p,"change",C=>{e.mobileWorkspace=C.matches}),e.selectMobilePane=C=>{e.mobilePane=C};let c=0,v=!1,g=new Set,y=(C,O=!1)=>!v&&C.generation===c&&C.url===e.sourceUrl.trim()&&C.connection===e.githubConnection&&(!O||C.branch===e.source.branch),m=()=>{let C={generation:c,url:e.sourceUrl.trim(),connection:e.githubConnection,branch:e.source.branch};return g.add(C),e.sourceLoading=!0,C},b=C=>{g.delete(C),v||(e.sourceLoading=[...g].some(O=>y(O)))};e.on("dispose",()=>{v=!0,c++});let E=null,S=C=>C.gistId&&!C.repo?"gist:"+C.gistId.toLowerCase():(C.owner+"/"+C.repo).toLowerCase()+(C.pullRequestId?"/pull/"+C.pullRequestId:""),N=ka(e,["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"],"anonymize:"+(o.path?.()||"")),w=null,T=null,M=null;e.hostingReview=!1,e.previewExpanded=!1,e.taskValidationError="",e.editRepository=()=>{e.mobilePane="settings",e.previewExpanded=!1,We(()=>document.querySelector(".anonymize-fields .is-invalid")?.focus())},e.submitRepository=C=>{if(e.taskValidationError="",!(e.sourceLoading||e.billingBusy||e.hostingSaving||e.billingPending)){if(oi()||e.anonymize?.invalid||e.sourceUrlError){e.taskValidationError="Check the highlighted fields before continuing.",e.editRepository();return}return e.hostingNeedsPayment()?e.checkoutRepository(Xi(e.hostingChoice())?e.hostingChoice():""):e.anonymizeRepo(C)}},e.hostingPayment=!1,e.hostingAlternatives=!1,e.hostingPrice=C=>C.amount==null?"Price shown at checkout":new Intl.NumberFormat(void 0,{style:"currency",currency:C.currency,minimumFractionDigits:0,maximumFractionDigits:2}).format(C.amount/100)+(C.interval==="year"?" billed annually":" billed monthly"),e.hostingPlan="",e.hostingSaving=!1,e.selectedHostingPlan=()=>e.authorPlans().find(C=>C.id===e.hostingPlan)||e.hostingSubscriptionPlan?.();let F=()=>t.get("/api/user/quota").then(C=>{e.hostingQuota=C.data});Zi(e,t,async()=>{await F(),e.hostingQuotaBlocked=!1},{confirmedMessage:"Hosting status refreshed. Your draft is ready to continue."}),F().catch(()=>{}),e.authorPlans=()=>(e.billing?.plans||[]).filter(C=>["author_monthly","author_annual"].includes(C.id)),e.conferenceHosting=()=>!!(e.conference&&e.conference_data?.hosting),e.hasAuthorHosting=()=>["author_monthly","author_annual"].includes(e.billing?.allowance?.plan),e.hostingNeedsPayment=()=>!e.billing?.enabled||e.detectedType!=="repo"||e.hasAuthorHosting()||e.isUpdate&&e.role!=="owner"?!1:!!(e.options?.expirationMode==="never"&&!e._existingNever&&!e.repositoryGrants("repo_never").length||!e.conferenceHosting()&&e.hostingQuotaBlocked),e.repositoryGrants=C=>(e.billing?.grants||[]).filter(O=>O.planId===C&&O.scope===`repo:${e.repoId}`&&["active","paid","past_due"].includes(O.status)&&new Date(O.until).getTime()>Date.now()),e.repositoryAddonPlans=()=>(e.billing?.plans||[]).filter(C=>Xi(C.id)&&(["repo_extend","repo_pack"].includes(C.id)||!e.repositoryGrants(C.id).length)),e.hostingOneTimePlans=()=>{let C=O=>O.map(B=>(e.billing?.plans||[]).find(J=>J.id===B&&!e.repositoryGrants(B).length)).filter(Boolean);return e.options?.expirationMode==="never"&&!e._existingNever&&!e.repositoryGrants("repo_never").length?C(["repo_never"]):e.hostingQuotaBlocked&&!e.conferenceHosting()?C(["repo_slot","repo_pack"]):[]},e.hostingOneTime=()=>e.hostingOneTimePlans()[0];let j=["free","repo_slot"];e.liveUpdatesIncluded=()=>{if(!e.billing?.enabled||e.detectedType!=="repo"||e.isUpdate&&e.role!=="owner"||e.conferenceHosting()||e.hasAuthorHosting())return!0;let C=e.billing?.allowance?.plan;return C&&!j.includes(C)?!0:e.repositoryGrants("author_pass").length>0||e.repositoryGrants("repo_pack").length>0},e.liveUpdatesPrice=()=>{let C=(e.billing?.plans||[]).find(O=>O.id==="author_pass");return C?.amount!=null?e.billingAmount(C):""},e.showHostingOptions=()=>{e.mobilePane="settings",We(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"start",behavior:"smooth"}))},e.neverExpireTag=()=>{if(e.hasAuthorHosting())return"Included in your subscription";if(e.repositoryGrants("repo_never").length)return"Paid for this repository";let C=(e.billing?.plans||[]).find(O=>O.id==="repo_never");return C?.amount!=null?`${e.billingAmount(C)} once, or with a subscription`:"Subscription or one-time add-on"},e.hostingCycle="author_annual",e.hostingSubscriptionPlan=()=>e.authorPlans().find(C=>C.id===e.hostingCycle)||e.authorPlans().find(C=>C.interval==="year")||e.authorPlans()[0],e.hostingAnnualSavings=()=>{let C=e.authorPlans().find(B=>B.interval==="month")?.amount,O=e.authorPlans().find(B=>B.interval==="year")?.amount;return C&&O&&Oe.hostingOneTimePlans().concat(e.authorPlans().length?[e.hostingSubscriptionPlan()]:[]),e.hostingOptionName=C=>({repo_slot:"Add this repository",repo_pack:"Paper pack",repo_never:"Never expire",author_annual:"Author subscription",author_monthly:"Author subscription"})[C.id]||C.name,e.hostingOptionBlurb=C=>({repo_slot:"Hosted outside your free repositories. Refresh it by hand.",repo_pack:"Adds automatic updates for 180 days and keeps the link online for a year.",repo_never:"This link never expires. No subscription."})[C.id]||`${C.repositories} repositories, ${e.billingBytes(C.storage)}, automatic updates and links that never expire.`,e.hostingChoice=()=>{let C=e.hostingOneTimePlans();return C.some(O=>O.id===e.hostingPlan)||e.authorPlans().some(O=>O.id===e.hostingPlan)?e.hostingPlan:C[0]?.id||e.hostingSubscriptionPlan()?.id||""},e.checkoutRepository=async(C="")=>{if(!(e.hostingSaving||e.billingBusy||!e.billing?.csrf||e.sourceLoading)){e.hostingSaving=!0,e.billingError="";try{let O=N.checkpoint(),B=JSON.stringify(O);(!T||B!==M)&&(T=(await t.post("/api/billing/draft",{path:o.path(),values:O},{headers:{"x-csrf-token":e.billing.csrf}})).data.id,M=B);let J=e.authorPlans().find(ae=>ae.id===e.hostingPlan)||e.hostingSubscriptionPlan();if(!C&&!J)throw new Error("No author plan available");await e.checkout(C||J.id,C?e.repoId:"",{draftId:T})}catch{e.billingError="Your draft could not be saved for checkout. Your form is unchanged. Please try again."}finally{e.hostingSaving=!1}}},e.useDatedHosting=()=>{e.options.expirationMode="remove"},e.discardDraft=async()=>{N.discard(),e.workspaceOpen=!!e.sourceUrl,e.error=null,e.sourceUrl?await e.urlSelected(!0):(c++,e.sourceLoading=!1,e.detectedType=null,e.details=null,e.sourceUrlError="",Yt.cancel(),On.cancel(),Mn.cancel(),e.previewStatus="idle")},e.githubConnection=void 0,e.githubConnections=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1;let oe=()=>{let C={};for(let O of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])C[O]=e[O];sessionStorage.setItem("github-access-draft",JSON.stringify({path:o.path(),savedAt:Date.now(),draft:C}))};e.connectGistApp=()=>{oe(),window.location.href="/github/app/login?returnTo="+encodeURIComponent(o.path())},e.connectGistOAuth=()=>{oe(),window.location.href="/github/login?returnTo="+encodeURIComponent(o.path())},e.grantGitHubAccess=()=>{oe();let C=o.path(),O=tt(e.sourceUrl)||"",B=e.githubConnections?.appConnected?"/github/app/install":"/github/app/login";window.location.href=B+"?returnTo="+encodeURIComponent(C)+"&repository="+encodeURIComponent(O)+"&install=1"},e.chooseGitHubConnection=async C=>{e.githubConnection=C,e.readme="",e.sourceUrl&&await qe()},e.detectedType=null,e.repoId="",e.pullRequestId="",e.gistId="",e.terms="",e.defaultTerms="",e.branches=[],e.source={branch:"",commit:""},e.options={expirationMode:"remove",expirationDate:new Date,update:!1,image:!0,pdf:!0,notebook:!0,link:!0,body:!0,title:!0,origin:!1,diff:!0,content:!0,comments:!0,username:!0,date:!0};function _(){let C=new Date;return C.setMonth(C.getMonth()+6),C}e.options.expirationDate=_();function z(C){let O=C.getFullYear(),B=String(C.getMonth()+1).padStart(2,"0"),J=String(C.getDate()).padStart(2,"0");return`${O}-${B}-${J}`}e.minExpirationDate=z(new Date);let I=()=>{let C=new Date,O=new Date(C);if(O.setFullYear(O.getFullYear()+1),e.billing?.enabled&&e.detectedType==="repo"&&!e.hasAuthorHosting()){O=new Date(C),O.setMonth(O.getMonth()+(e.billing.freeExpirationMonths||5));for(let ae of e.repositoryGrants("repo_extend"))new Date(ae.until)>O&&(O=new Date(ae.until));e.conference_data?.endDate&&new Date(e.conference_data.endDate)>O&&(O=new Date(e.conference_data.endDate)),e._savedExpirationDate&&e._savedExpirationDate>O&&(O=new Date(e._savedExpirationDate));let B=e.options?.expirationDate,J=e._savedExpirationDate&&B instanceof Date&&B.getTime()===e._savedExpirationDate.getTime();B instanceof Date&&B>O&&!J&&(e.options.expirationDate=new Date(O))}e.maxExpirationDate=z(O)};I(),e.watch(()=>[e.billing,e.repoId,e.conference_data,e.isUpdate,e._savedExpirationDate,e.options?.expirationMode,e.detectedType],I,!0,!1),e.anonymize_readme="",e.readme="",e.isUpdate=!1,e.userRepos=[],e.userReposStatus="idle",e.userRepoFilter="",e.userRepoPage=1,e.userRepoNext=null;let L=0,k,q=[0];e.on("dispose",()=>{L++,clearTimeout(k)}),e.loadUserRepos=async()=>{clearTimeout(k);let C=++L,O=e.userRepoFilter.trim();e.userReposStatus="loading",e.userRepos=[];let B=q[e.userRepoPage-1];try{for(let J=0;J<5;J++){let ae=await t.get("/api/user/repository_picker",{params:{cursor:B,q:O,connection:e.githubConnection}});if(v||C!==L)return;if(e.userRepos=ae.data.items||[],e.userRepoNext=ae.data.nextCursor??null,e.userRepos.length||e.userRepoNext===null||!O)break;B=e.userRepoNext}e.userReposStatus="ready"}catch{!v&&C===L&&(e.userReposStatus="error")}},e.changeUserRepoPage=C=>{if(e.userReposStatus!=="loading"){if(C>0&&e.userRepoNext!==null)q[e.userRepoPage]=e.userRepoNext,e.userRepoPage++;else if(C<0&&e.userRepoPage>1)e.userRepoPage--;else return;e.loadUserRepos()}},e.watch(()=>[e.userRepoFilter,e.githubConnection],()=>{i.repoId||i.pullRequestId||i.gistId||(L++,clearTimeout(k),q=[0],e.userRepoPage=1,e.userRepoNext=null,e.userRepos=[],e.userReposStatus="loading",k=setTimeout(()=>{v||e.loadUserRepos()},300))},!0,!1),e.selectUserRepo=C=>{if(C?.fullName)return e.sourceUrl="https://github.com/"+C.fullName,e.urlSelected()},e.previousConfigurations=[],e.previousConfigurationId="";let G,H=C=>String(C||"").replace(/\/$/,"").replace(/\.git$/i,"").toLowerCase();async function K(){if(e.isUpdate||i.repoId||i.pullRequestId||i.gistId)return;let C={generation:c,url:e.sourceUrl.trim(),connection:e.githubConnection};try{G||(G=t.get("/api/user/anonymized_repositories").then(J=>J.data));let O=await G;if(!y(C))return;let B=H(tt(C.url));e.previousConfigurations=O.filter(J=>J.repoId&&J.options&&H(J.source?.fullName)===B).sort((J,ae)=>(Date.parse(ae.anonymizeDate)||0)-(Date.parse(J.anonymizeDate)||0)),e.previousConfigurationId=e.previousConfigurations[0]?.repoId||""}catch{G=void 0}}e.sourceSummary=()=>{let C=String(e.sourceUrl||""),O=/github\.com\/([^/\s]+\/[^/\s]+)\/pull\/(\d+)/i.exec(C);return O?O[1]+" \xB7 PR #"+O[2]:(O=/gist\.github\.com\/([^/\s]+)\/([0-9a-f]{8,})/i.exec(C),O?O[1]+" \xB7 gist "+(O[2].length>12?O[2].slice(0,7)+"\u2026"+O[2].slice(-4):O[2]):"")},e.sourceError="",e.sourceErrorText="";let ne={repo_access_limited:"access",repo_not_accessible:"access",repo_saml_enforcement:"access",repo_already_anonymized:"used",repo_not_found:"missing",github_app_access_required:"missing",pull_request_not_found:"missing",gist_not_found:"missing",token_expired:"missing"},x=C=>{let O=C?.data?.error||(C?.status===404?"repo_not_found":"unknown_error");e.sourceError=O,e.sourceErrorText="",ne[O]||r("ERRORS."+O).then(B=>{e.sourceError===O&&B!=="ERRORS."+O&&(e.sourceErrorText=B)},()=>{}),si(O),Ee("sourceUrl","missing",!1)},fe=()=>{e.sourceError="",e.sourceErrorText=""};e.sourceReady=()=>!!e.isUpdate||!!e.details,e.sourceProblem=()=>{let C=e.anonymize?.sourceUrl?.errors||{};if(C.github||e.sourceUrlError&&e.workspaceOpen)return{kind:"github",title:"Not a GitHub URL",text:"Paste a repository, pull request, or gist URL from github.com."};if(e.sourceLoading||e.details&&!C.used)return null;if(e.gistAppRequired||e.gistOAuthRequired)return{kind:"connect",title:"Couldn't load this gist",text:"Connect GitHub to read gists."};let O=e.sourceError||(C.used?"repo_already_anonymized":C.access?"repo_not_accessible":C.missing?"repo_not_found":"");if(!O)return null;let B=ne[O]||"other",J=e.detectedType,ae="this gist";try{let kt=parseGithubUrl(String(e.sourceUrl||"").trim());J==="pr"?ae=`pull request #${kt.pullRequestId} in ${kt.owner}/${kt.repo}`:J!=="gist"&&(ae=`${kt.owner}/${kt.repo}`)}catch{}let ye=J==="pr"?"this pull request":J==="gist"?"this gist":"this repository",Ge=J!=="gist"&&e.githubConnection==="github-app",Tt=e.isUpdate&&J==="repo"?null:J==="gist"||!e.githubConnection?"link":Ge?"app":"link",pt="Couldn't load "+ye;if(B==="used")return{kind:B,title:"Already anonymized",text:`You've already anonymized ${ae}. Open it from My work to change its settings.`,dashboard:!0};if(B==="access"){let kt=O==="repo_saml_enforcement"?"Its organization requires single sign-on.":"Its organization restricts third-party apps.",ii=O==="repo_saml_enforcement"?"Authorize your GitHub session for the organization, then try again.":"An organization owner may need to approve Anonymous GitHub. You can also anonymize a personal fork.";return{kind:B,title:pt,text:`We can't read ${ae}. ${kt}`,note:ii,manage:Tt,retry:!0}}return B==="missing"?{kind:B,title:pt,text:`We can't read ${ae}. It doesn't exist, or ${Ge?"the Anonymous GitHub app hasn't been given access to it":"your GitHub account can't see it"}.`,manage:Tt,retry:!0}:{kind:B,title:pt,text:e.sourceErrorText||"GitHub didn't return it. Try again in a moment.",retry:!0}},e.submitBlockedReason=()=>e.sourceLoading?e.detectedType==="pr"?"Waiting for the pull request to load from GitHub\u2026":e.detectedType==="gist"?"Waiting for the gist to load from GitHub\u2026":"Waiting for the repository to load from GitHub\u2026":e.sourceReady()?"":e.sourceProblem()?.kind==="github"?"Enter a GitHub URL to continue.":e.detectedType==="pr"?"Add a pull request you can access to continue.":e.detectedType==="gist"?"Add a gist you can access to continue.":"Add a repository you can access to continue.",e.sourceIsPrivate=()=>e.details?e.detectedType==="gist"?e.details.gist?!e.details.gist.isPublic:!0:e.details.private!==!1:!1,e.previewId=()=>e.detectedType==="pr"?e.pullRequestId:e.detectedType==="gist"?e.gistId:e.repoId,e.previewPath=()=>{let C=e.previewId();return C?(e.detectedType==="pr"?"/pr/":e.detectedType==="gist"?"/gist/":"/r/")+encodeURIComponent(C)+"/":""},e.previewUrl=()=>{let C=e.previewPath();return C?"anonymous.4open.science"+C.replace(/\/$/,""):""},e.previewRedactions=()=>{let C=J=>typeof J=="string"?(J.match(xs)||[]).length:0;if(e.detectedType==="repo")return e.previewViewer.redactionCount();let O=e.detectedType==="pr"?So:Eo,B=0;return O.forEach(J=>{B+=C(J)}),B};let he=(C,O)=>C.localeCompare(O,void 0,{sensitivity:"base"}),Be=C=>C.slice(C.lastIndexOf("/")+1),He={key:null,files:[]};e.previewTreeFiles=()=>{if(!e.preserve.commit||!W)return[];let C=e.preserve.commit+"\0"+e.terms+"\0"+ko.size+"\0"+W.files.length;if(He.key===C)return He.files;let O=W.files.map(B=>{let J=e.previewPathName(B),ae=J.lastIndexOf("/");return{name:J.slice(ae+1),path:ae<0?"":J.slice(0,ae),size:0,sourcePath:B}});return He={key:C,files:O},O},e.selectPreviewPath=C=>{let O=e.previewTreeFiles().find(B=>"/"+(B.path?B.path+"/":"")+B.name===C);O&&e.openPreviewFile(O.sourcePath)},e.existingConfigurationUrl=()=>{let C=e.previousConfigurations.find(O=>O.repoId===e.previousConfigurationId);return C?"/anonymize/"+encodeURIComponent(C.repoId):null};function Qe(C){t.get("/api/user/default").then(O=>{let B=O.data;B.terms&&(e.defaultTerms=B.terms.join(` -`)),e.options=Object.assign({},e.options,B.options),e.options.expirationDate=B.options&&B.options.expirationDate?new Date(B.options.expirationDate):_(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),C&&C()})}function Ee(C,O,B){e.anonymize&&e.anonymize[C]&&e.anonymize[C].setValidity(O,B)}function tt(C){try{let O=parseGithubUrl(C);if(O&&O.owner&&O.repo)return O.owner+"/"+O.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 C=m();try{let O=await t.get("/github/connections");if(e.githubConnections=O.data,!O.data.appEnabled)return;let B=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":O.data.csrf}});if(!y(C))return;e.error=null,B.data.fullName&&(e._originalFullName=B.data.fullName,e.source.fullName=B.data.fullName,e.sourceUrl="https://github.com/"+B.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{y(C)&&(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(C)}},e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await pe()}catch{}}};function Ne(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:tt(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function qe(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function X(){let C=new URLSearchParams(window.location.search).get("billingDraft");if(C){N.restore();try{let B=(await t.get("/api/billing/draft/"+encodeURIComponent(C))).data;if(B.path!==o.path())throw new Error("Wrong task");w=B.values.conference||null;for(let J of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(B.values,J)&&(e[J]=B.values[J]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),T=B.id,M=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await qe(),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 O;try{O=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!O||O.path!==o.path()||Date.now()-O.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await qe(),!0):!1;N.restore();for(let B of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(O.draft,B)&&(e[B]=O.draft[B]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await qe(),sessionStorage.removeItem("github-access-draft"),!0}Qe(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&u(X,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async C=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(C.data.status),e.githubConnection=C.data.connection||"oauth",e.sourceUrl="https://github.com/"+C.data.source.fullName,e._originalFullName=C.data.source.fullName,e.terms=C.data.options.terms.filter(O=>O).join(` -`),e.source=C.data.source,e.role=C.data.role||"owner",e._existingNever=C.data.options.expirationMode==="never",e._savedExpirationDate=C.data.options.expirationDate?new Date(C.data.options.expirationDate):null,e.coauthors=C.data.coauthors||[],e._originalBranch=C.data.source.branch,e.options=Object.assign({},e.options,C.data.options),e.conference=C.data.conference,e._originalConference=C.data.conference,e.repositoryID=C.data.source.repositoryID,e._originalRepositoryID=C.data.source.repositoryID,C.data.options.expirationDate&&(e.options.expirationDate=new Date(C.data.options.expirationDate)),E=S(parseGithubUrl(e.sourceUrl)),!await X()&&(await Promise.all([pe(),ue()]),Co())},()=>{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 C=>{if(e.githubConnection=C.data.connection||"oauth",e.sourceUrl="https://github.com/"+C.data.source.repositoryFullName+"/pull/"+C.data.source.pullRequestId,e.terms=C.data.options.terms.filter(O=>O).join(` +Contact: jane.smith@mit.edu`,e.demoTerms="Jane Smith, Smith, MIT CSAIL, jane.smith@mit.edu",e.demoParts=function(){let p=(e.demoTerms||"").split(/[,\n]/).map(m=>m.trim()).filter(Boolean).sort((m,b)=>b.length-m.length),c=m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let v=new RegExp("("+p.map(c).join("|")+")","gi"),g={},y=0;return(e.demoText||"").split(v).filter(m=>m!=="").map(m=>{let b=p.find(E=>E.toLowerCase()===m.toLowerCase());return b?(g[b.toLowerCase()]||(g[b.toLowerCase()]=++y),{text:String(g[b.toLowerCase()]),redacted:!0,original:m}):{text:m}})},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 c={series:p,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!p||p.length<2)return c;let v=new Array(p.length-1);for(let S=1;S=2){let S=v[g-2];S&&(c.pctChange=(c.deltaToday-S)/S*100)}return c.pctAbs=Math.round(Math.abs(c.pctChange)),c.isUp=c.pctChange>=0,c}e.history={repositories:u([]),users:u([]),pageViews:u([]),pullRequests:u([])},t.get("/api/stat/history?days=60").then(p=>{let c=p.data||[];e.history={repositories:u(c.map(v=>v.nbRepositories||0)),users:u(c.map(v=>v.nbUsers||0)),pageViews:u(c.map(v=>v.nbPageViews||0)),pullRequests:u(c.map(v=>v.nbPullRequests||0))}}).catch(()=>{})},Gc=function(e,t,s,i,o,r){let u=bt();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,We(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Bt()(document,"click",k=>{e.quotaExpanded&&!k.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=k=>k.status==="error"||k._broken||c(k.status)==="progress"&&k._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=k=>{e.projectView=k,k==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=k=>{let q=Ca(k?.anonymizeDate||k?.lastView)||"";return/ ago$/.test(q)?"No activity for "+q.replace(/ ago$/,""):"No activity since "+q.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=k=>"project-details-"+encodeURIComponent(k._type+":"+(k._id||k._source||"unknown")),e.showProjectDetails=async k=>{e.selectedProject=k,e.projectName=k.projectName||"",e.nameError="",e.nameMessage="",await We();let q=document.getElementById(e.projectDetailsId(k));q?.focus(),q?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=k=>{e.selectedProject=null,We(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(k._type+":"+k._id)}"]`)?.focus())},e.saveProjectName=async k=>{if(e.nameSaving||!k._id)return;let q=e.projectName.trim();if(q.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let G=await t.post("/api/user/project-name",{type:k._type,id:k._id,name:q});k.projectName=G.data.name,k._label=k.projectName||k._fallbackLabel,e.selectedProject===k&&(e.nameMessage=q?"Project name saved.":"Default project name restored."),T||(e.dashboardCursor=null,await F(),e.selectedProject===k&&(e.selectedProject=e.items.find(H=>H._type===k._type&&H._id===k._id)||null))}catch{e.selectedProject===k&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async k=>{if(!k._viewUrl||e.copyingId)return;let q=new URL(k._viewUrl,o.location.origin).href;e.copyingId=k._type+":"+k._id;try{await Qa(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 c(k){return k==="ready"||k==="error"?k:k==="expired"||k==="expiring"?"expired":k==="removed"||k==="removing"?"removed":(p.indexOf(k)>-1,"progress")}let v=7200*1e3,g="dashboard.filterPrefs",y={typeFilter:"all",filters:{status:{ready:!0,progress:!0,error:!0,expired:!0,removed:!1}},orderBy:"-anonymizeDate"},m=loadFilterPrefs(g)||{};e.typeFilter=m.typeFilter||y.typeFilter,e.filters={status:Object.assign({},y.filters.status,m.filters&&m.filters.status||{})},e.orderBy=m.orderBy||y.orderBy;let b={_name:{label:"Anonymous ID",defaultDesc:!1},_label:{label:"Project",defaultDesc:!1},anonymizeDate:{label:"Anonymize date",defaultDesc:!0},status:{label:"Status",defaultDesc:!1},lastView:{label:"Last view",defaultDesc:!0},pageView:{label:"Views",defaultDesc:!0},"options.expirationDate":{label:"Expiration",defaultDesc:!1}};e.sortFields=b,e.sortField=()=>e.orderBy.replace(/^-/,""),e.sortDesc=()=>e.orderBy.charAt(0)==="-",e.sortLabel=()=>{let k=b[e.sortField()];return k?k.label:"Custom"},e.isSortedBy=k=>e.sortField()===k,e.setSort=(k,q)=>{typeof q!="boolean"&&(q=e.isSortedBy(k)?!e.sortDesc():!!(b[k]&&b[k].defaultDesc)),e.orderBy=(q?"-":"")+k},e.toggleSortDirection=()=>{e.setSort(e.sortField(),!e.sortDesc())},e.watchGroup(["typeFilter","orderBy"],()=>{saveFilterPrefs(g,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(g,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})},!0),r.load().then(k=>{e.quota=k},console.error);function E(k,q,G,H,Y,ne){k.pageView||(k.pageView=0),k.lastView||(k.lastView=""),k.options=k.options||{},k.options.terms=(k.options.terms||[]).filter(fe=>fe),k._id=q||"",k._source=H,k._broken=!q,k._name=q||H||"(unnamed)",k._fallbackLabel=k._type==="gist"?"Gist "+(q||H||"without an ID"):H||G||k._name,k._label=k.projectName||k._fallbackLabel,k._editUrl=q?Y:null,k._viewUrl=q?ne:null,k._broken&&(k.status="error",k.statusMessage="incomplete_record"),k._statusKey=c(k.status);let x=k.anonymizeDate||k.lastView;if(k._stale=k._statusKey==="progress"&&!!x&&Date.now()-new Date(x).getTime()>v,k.status==="expired"||k.status==="expiring")k._expiry={kind:"expired",date:k.options.expirationDate},k._expiry.label=Ea(k.options.expirationDate)||void 0;else if(k.status!=="ready")k._expiry={kind:"none"};else if(k.options.expirationMode==="never"||!k.options.expirationDate)k._expiry={kind:"never"};else{k._expiry={kind:"date",date:k.options.expirationDate};let fe=new Date(k.options.expirationDate).getTime()-Date.now();if(fe>0&&fe<=168*3600*1e3){let he=Math.max(1,Math.round(fe/36e5)),Be=Math.round(fe/864e5);k._expiry.soon=he<48?"in "+he+(he===1?" hour":" hours"):"in "+Be+" days"}}return k}function S(k){return t.get(k).then(q=>q.data||[],q=>(console.error(q),[]))}function N(){return e.loading=!0,i.all([S("/api/user/anonymized_repositories"),S("/api/user/anonymized_pull_requests"),S("/api/user/anonymized_gists")]).then(k=>{let q=k[0],G=k[1],H=k[2],Y=[];q.forEach(ne=>{ne._type="repo";let x=ne.source||{};Y.push(E(ne,ne.repoId,ne.repoId,x.fullName,"/anonymize/"+ne.repoId,"/r/"+ne.repoId+"/"))}),G.forEach(ne=>{ne._type="pr";let x=ne.source||{};Y.push(E(ne,ne.pullRequestId,ne.pullRequestId,x.repositoryFullName?x.repositoryFullName+"#"+x.pullRequestId:void 0,"/pull-request-anonymize/"+ne.pullRequestId,"/pr/"+ne.pullRequestId+"/"))}),H.forEach(ne=>{ne._type="gist";let x=ne.source||{};Y.push(E(ne,ne.gistId,ne.gistId,x.gistId,"/gist-anonymize/"+ne.gistId,"/gist/"+ne.gistId+"/"))}),e.items=Y,e.removedCount=Y.filter(ne=>ne._statusKey==="removed").length,e.loading=!1})}let w=0,T=!1;e.dashboardCursor=null,e.dashboardError="";function M(k){let q=k.source||{};return k._type==="repo"?E(k,k.repoId,k.repoId,q.fullName,"/anonymize/"+k.repoId,"/r/"+k.repoId+"/"):k._type==="pr"?E(k,k.pullRequestId,k.pullRequestId,q.repositoryFullName?q.repositoryFullName+"#"+q.pullRequestId:void 0,"/pull-request-anonymize/"+k.pullRequestId,"/pr/"+k.pullRequestId+"/"):E(k,k.gistId,k.gistId,q.gistId,"/gist-anonymize/"+k.gistId,"/gist/"+k.gistId+"/")}function F(k=!1){if(T)return N();let q=++w;return e.loading=!k,e.loadingMore=k,e.dashboardError="",t.get("/api/user/dashboard",{params:{q:e.search,type:e.typeFilter,sort:e.orderBy,statuses:Object.keys(e.filters.status).filter(G=>e.filters.status[G]!==!1).join(",")||"none",attention:String(e.projectView==="attention"),cursor:k?e.dashboardCursor:void 0}}).then(G=>{if(q===w){if(!Array.isArray(G.data?.items))return T=!0,N();e.items=(k?e.items:[]).concat(G.data.items.map(M)),e.dashboardCursor=G.data.cursor,e.dashboardTotals=G.data,k||_()}},G=>{if(q===w){if(G.status===404)return T=!0,N();e.dashboardError="Projects could not be loaded. Please try again."}}).finally(()=>{q===w&&(e.loading=!1,e.loadingMore=!1)})}e.loadMoreProjects=()=>F(!0);let j;e.watchGroup(["search","typeFilter","orderBy","projectView"],()=>{T||(j&&u.timeout.cancel(j),j=u.timeout(()=>F(),150))},!1),e.watch("filters",()=>{T||F()},!0,!1),e.on("dispose",()=>{w++}),F(),e.openItem=(k,q)=>{if(!k._viewUrl)return;let G=q&&q.target;G&&G.closest&&G.closest("a, button, .dropdown, input")||(o.location.href=k._viewUrl)},e.hiddenStatusCount=()=>Object.keys(e.filters.status).filter(k=>e.filters.status[k]===!1).length,e.hasHiddenStatus=()=>e.hiddenStatusCount()>0;let oe=()=>Object.keys(e.statusKeyLabels);e.onlyRemovedShown=()=>oe().every(k=>k==="removed"==(e.filters.status[k]!==!1)),e.isActiveDefault=()=>oe().every(k=>k==="removed"==(e.filters.status[k]===!1)),e.statusView=()=>e.projectView==="attention"?"attention":e.onlyRemovedShown()?"removed":e.filters.status.removed===!1?"active":"custom",e.setStatusView=k=>{if(k==="attention")return e.setProjectView("attention");e.projectView="all",oe().forEach(q=>{e.filters.status[q]=k==="removed"?q==="removed":q!=="removed"})},e.statusChipKeys=()=>{let k=e.statusView();return k==="removed"?[]:oe().filter(q=>e.filters.status[q]===!1&&!(q==="removed"&&k!=="custom"))},e.removedCount=null;function _(){if(T){e.removedCount=e.items.filter(q=>q._statusKey==="removed").length;return}let k=e.dashboardTotals;!k||e.projectView!=="all"||e.search.trim()||e.typeFilter!=="all"||(e.isActiveDefault()?e.removedCount=Math.max(0,k.total-k.filtered):e.onlyRemovedShown()&&(e.removedCount=k.filtered))}e.showViewTabs=()=>e.statusView()!=="active"||e.attentionCount()>0||e.removedCount>0||e.removedCount==null&&!!e.dashboardTotals&&e.dashboardTotals.total>e.dashboardTotals.filtered,e.hasActiveFilters=()=>e.projectView!=="all"||e.typeFilter!=="all"||e.search.trim().length>0||Object.keys(e.filters.status).some(k=>e.filters.status[k]===!1),e.showClearFilters=()=>e.search.trim().length>0||e.typeFilter!=="all"||e.statusChipKeys().length>0,e.isPlainView=()=>!e.showClearFilters(),e.clearFilters=()=>{let k=e.statusView();e.typeFilter="all",e.search="",e.setStatusView(k==="removed"?"removed":"active")};function B(k,q,G,H){t.get("/api/repo/"+k).then(async Y=>{let ne=H!==void 0&&H!==Y.data.status;for(let x of e.items)if(x._type==="repo"&&x.repoId==k){ne=ne||x.status!==Y.data.status;let fe=e.needsAttention(x);x.status=Y.data.status,x.statusMessage=Y.data.statusMessage,x._statusKey=c(x.status),x._statusKey!=="progress"&&(x._stale=!1);let he=e.needsAttention(x);e.dashboardTotals&&fe!==he&&(e.dashboardTotals.attention=Math.max(0,e.dashboardTotals.attention+(he?1:-1)));break}if(ne&&!T){e.dashboardCursor=null;let x=e.selectedProject;await F(),x&&e.selectedProject===x&&(e.selectedProject=e.items.find(fe=>fe._type===x._type&&fe._id===x._id)||null)}if(Y.data.status=="ready"||Y.data.status=="error"||Y.data.status=="removed"||Y.data.status=="expired"){q(Y.data);return}u.timeout(()=>B(k,q,G,Y.data.status),2500)},G)}let I=k=>k==="repo"?"repository":k==="gist"?"gist":"pull request",L=k=>k==="repo"?"/api/repo":k==="gist"?"/api/gist":"/api/pr";e.removeItem=k=>{let q=I(k._type);if(confirm(`Are you sure that you want to remove the ${q} ${k._id}?`)){let G=at({title:`Removing ${k._id}...`,date:new Date,body:`The ${q} ${k._id} is going to be removed.`});e.addToast(G);let H=`${L(k._type)}/${k._id}`;t.delete(H).then(()=>{k._type==="repo"?B(k._id,()=>{G.title=`${k._id} is removed.`,G.body=`The ${q} ${k._id} is removed.`},void 0,k.status):(G.title=`${k._id} is removed.`,G.body=`The ${q} ${k._id} is removed.`,F())},Y=>{G.title=`Error during the removal of ${k._id}.`,G.body=Y.body,F()})}},e.refreshItem=k=>{let q=I(k._type),G=at({title:`Refreshing ${k._id}...`,date:new Date,body:`The ${q} ${k._id} is going to be refreshed.`});e.addToast(G);let H=ne=>{G.title=`Error during the refresh of ${k._id}.`,G.body=ne.data?.error||ne.body||"The refresh could not be completed. Please try again.",F()},Y=`${L(k._type)}/${k._id}/refresh`;t.post(Y).then(()=>{k._type==="repo"?B(k._id,ne=>{if(ne.status!=="ready"){H({body:ne.statusMessage||`The repository is ${ne.status}.`});return}G.title=`${k._id} is refreshed.`,G.body=`The ${q} ${k._id} is refreshed.`},H,k.status):(G.title=`${k._id} is refreshed.`,G.body=`The ${q} ${k._id} is refreshed.`,F())},H)},e.extendItem=k=>{let q=I(k._type),G=at({title:`Extending ${k._id}...`,date:new Date,body:`The expiration of ${q} ${k._id} is being extended.`});e.addToast(G);let H=`${L(k._type)}/${k._id}/extend`;t.post(H).then(Y=>{let ne=Y?.data?.expirationDate?` until ${new Date(Y.data.expirationDate).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}`:"";k._type==="repo"?B(k._id,()=>{G.title=`${k._id} is extended.`,G.body=`${q} ${k._id} is extended${ne}.`},void 0,k.status):(G.title=`${k._id} is extended.`,G.body=`${q} ${k._id} is extended${ne}.`,F())},Y=>{G.title=`Error during the extension of ${k._id}.`;let ne=Y.data&&Y.data.error;G.body=ne||Y.body,ne&&Object.prototype.hasOwnProperty.call(Jn.ERRORS,ne)&&(G.body=Jn.ERRORS[ne]),F()})},e.itemFilter=k=>{if(e.projectView==="attention"&&!e.needsAttention(k)||e.typeFilter!=="all"&&k._type!==e.typeFilter||e.filters.status[k._statusKey]===!1)return!1;let q=e.search.trim().toLowerCase();return!!(q.length==0||k._label&&String(k._label).toLowerCase().indexOf(q)>-1||k._source&&String(k._source).toLowerCase().indexOf(q)>-1||k._id&&String(k._id).toLowerCase().indexOf(q)>-1||k.conference&&String(k.conference).toLowerCase().indexOf(q)>-1)}};var Wc=function(e,t,s){let i=bt();e.repoId=s.repoId,e.reviewUrl=window.location.origin+"/r/"+encodeURIComponent(s.repoId)+"/",e.repo=null,e.progress=0,e.rateLimitResetAt=0,e.rateLimitCountdown="",e.shareUrl=(window.location?.origin||"")+"/r/"+encodeURIComponent(e.repoId)+"/",e.copied=!1;let o=null;e.copyShareUrl=async()=>{try{await Qa(e.shareUrl),e.copied=!0,o&&i.timeout.cancel(o),o=i.timeout(()=>{e.copied=!1},2e3)}catch{e.addToast?.({title:"Copy this anonymous link",body:e.shareUrl})}},e.selectShareUrl=g=>{let y=window.getSelection?.();if(!y||!g?.target)return;let m=document.createRange();m.selectNodeContents(g.target),y.removeAllRanges(),y.addRange(m)};var r=null;let u=null,p=!1;function c(g){e.rateLimitResetAt=g,r&&i.interval.cancel(r);function y(){var m=Math.max(0,Math.ceil((g-Date.now())/1e3));if(m<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,i.interval.cancel(r),r=null;else{var b=Math.floor(m/60),E=m%60;e.rateLimitCountdown=b>0?b+"m "+E+"s":E+"s"}}y(),r=i.interval(y,1e3)}e.on("dispose",function(){p=!0,r&&i.interval.cancel(r),u&&i.timeout.cancel(u)});function v(g){if(!g)return g;var y=g.match(/^rate_limited:(\d+)$/);return y?(c(parseInt(y[1],10)),null):(e.rateLimitResetAt=0,g)}e.getStatus=()=>{p||t.get("/api/repo/"+e.repoId,{repoId:e.repoId,repoUrl:e.repoUrl}).then(g=>{if(!p){e.repo=g.data,g.data.rateLimitResetAt?c(g.data.rateLimitResetAt):e.repo.statusMessage=v(e.repo.statusMessage),e.repo.status=="ready"?e.progress=100:e.repo.status=="queue"?e.progress=10:e.repo.status=="downloaded"?e.progress=50:e.repo.status=="download"||e.repo.status=="preparing"?e.progress=25:e.repo.status=="anonymizing"&&(e.progress=75);var y=!["ready","removed","expired"].includes(e.repo.status);e.repo.status=="error"&&!e.rateLimitResetAt&&(y=!1),y&&(u=i.timeout(e.getStatus,2e3))}},g=>{e.error=g.data.error})},e.getStatus()},mr=function(e,t,s,i,o,r,u){_c(),e.renderRedacted=$s,e.sourceUrl="",e.workspaceOpen=!1,e.sourceUrlError="",e.previewStatus="idle",e.sourceLoading=!1,e.mobilePane="settings";let p=window.matchMedia?.("(max-width: 767px)");e.mobileWorkspace=!!p?.matches,p?.addEventListener&&Bt()(p,"change",C=>{e.mobileWorkspace=C.matches}),e.selectMobilePane=C=>{e.mobilePane=C};let c=0,v=!1,g=new Set,y=(C,O=!1)=>!v&&C.generation===c&&C.url===e.sourceUrl.trim()&&C.connection===e.githubConnection&&(!O||C.branch===e.source.branch),m=()=>{let C={generation:c,url:e.sourceUrl.trim(),connection:e.githubConnection,branch:e.source.branch};return g.add(C),e.sourceLoading=!0,C},b=C=>{g.delete(C),v||(e.sourceLoading=[...g].some(O=>y(O)))};e.on("dispose",()=>{v=!0,c++});let E=null,S=C=>C.gistId&&!C.repo?"gist:"+C.gistId.toLowerCase():(C.owner+"/"+C.repo).toLowerCase()+(C.pullRequestId?"/pull/"+C.pullRequestId:""),N=ka(e,["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"],"anonymize:"+(o.path?.()||"")),w=null,T=null,M=null;e.hostingReview=!1,e.previewExpanded=!1,e.taskValidationError="",e.editRepository=()=>{e.mobilePane="settings",e.previewExpanded=!1,We(()=>document.querySelector(".anonymize-fields .is-invalid")?.focus())},e.submitRepository=C=>{if(e.taskValidationError="",!(e.sourceLoading||e.billingBusy||e.hostingSaving||e.billingPending)){if(oi()||e.anonymize?.invalid||e.sourceUrlError){e.taskValidationError="Check the highlighted fields before continuing.",e.editRepository();return}return e.hostingNeedsPayment()?e.checkoutRepository(Xi(e.hostingChoice())?e.hostingChoice():""):e.anonymizeRepo(C)}},e.hostingPayment=!1,e.hostingAlternatives=!1,e.hostingPrice=C=>C.amount==null?"Price shown at checkout":new Intl.NumberFormat(void 0,{style:"currency",currency:C.currency,minimumFractionDigits:0,maximumFractionDigits:2}).format(C.amount/100)+(C.interval==="year"?" billed annually":" billed monthly"),e.hostingPlan="",e.hostingSaving=!1,e.selectedHostingPlan=()=>e.authorPlans().find(C=>C.id===e.hostingPlan)||e.hostingSubscriptionPlan?.();let F=()=>t.get("/api/user/quota").then(C=>{e.hostingQuota=C.data});Zi(e,t,async()=>{await F(),e.hostingQuotaBlocked=!1},{confirmedMessage:"Hosting status refreshed. Your draft is ready to continue."}),F().catch(()=>{}),e.authorPlans=()=>(e.billing?.plans||[]).filter(C=>["author_monthly","author_annual"].includes(C.id)),e.conferenceHosting=()=>!!(e.conference&&e.conference_data?.hosting),e.hasAuthorHosting=()=>["author_monthly","author_annual"].includes(e.billing?.allowance?.plan),e.hostingNeedsPayment=()=>!e.billing?.enabled||e.detectedType!=="repo"||e.hasAuthorHosting()||e.isUpdate&&e.role!=="owner"?!1:!!(e.options?.expirationMode==="never"&&!e._existingNever&&!e.repositoryGrants("repo_never").length||!e.conferenceHosting()&&e.hostingQuotaBlocked),e.repositoryGrants=C=>(e.billing?.grants||[]).filter(O=>O.planId===C&&O.scope===`repo:${e.repoId}`&&["active","paid","past_due"].includes(O.status)&&new Date(O.until).getTime()>Date.now()),e.repositoryAddonPlans=()=>(e.billing?.plans||[]).filter(C=>Xi(C.id)&&(["repo_extend","repo_pack"].includes(C.id)||!e.repositoryGrants(C.id).length)),e.hostingOneTimePlans=()=>{let C=O=>O.map(z=>(e.billing?.plans||[]).find(K=>K.id===z&&!e.repositoryGrants(z).length)).filter(Boolean);return e.options?.expirationMode==="never"&&!e._existingNever&&!e.repositoryGrants("repo_never").length?C(["repo_never"]):e.hostingQuotaBlocked&&!e.conferenceHosting()?C(["repo_slot","repo_pack"]):[]},e.hostingOneTime=()=>e.hostingOneTimePlans()[0];let j=["free","repo_slot"];e.liveUpdatesIncluded=()=>{if(!e.billing?.enabled||e.detectedType!=="repo"||e.isUpdate&&e.role!=="owner"||e.conferenceHosting()||e.hasAuthorHosting())return!0;let C=e.billing?.allowance?.plan;return C&&!j.includes(C)?!0:e.repositoryGrants("author_pass").length>0||e.repositoryGrants("repo_pack").length>0},e.liveUpdatesPrice=()=>{let C=(e.billing?.plans||[]).find(O=>O.id==="author_pass");return C?.amount!=null?e.billingAmount(C):""},e.showHostingOptions=()=>{e.mobilePane="settings",We(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"start",behavior:"smooth"}))},e.neverExpireTag=()=>{if(e.hasAuthorHosting())return"Included in your subscription";if(e.repositoryGrants("repo_never").length)return"Paid for this repository";let C=(e.billing?.plans||[]).find(O=>O.id==="repo_never");return C?.amount!=null?`${e.billingAmount(C)} once, or with a subscription`:"Subscription or one-time add-on"},e.hostingCycle="author_annual",e.hostingSubscriptionPlan=()=>e.authorPlans().find(C=>C.id===e.hostingCycle)||e.authorPlans().find(C=>C.interval==="year")||e.authorPlans()[0],e.hostingAnnualSavings=()=>{let C=e.authorPlans().find(z=>z.interval==="month")?.amount,O=e.authorPlans().find(z=>z.interval==="year")?.amount;return C&&O&&Oe.hostingOneTimePlans().concat(e.authorPlans().length?[e.hostingSubscriptionPlan()]:[]),e.hostingOptionName=C=>({repo_slot:"Add this repository",repo_pack:"Paper pack",repo_never:"Never expire",author_annual:"Author subscription",author_monthly:"Author subscription"})[C.id]||C.name,e.hostingOptionBlurb=C=>({repo_slot:"Hosted outside your free repositories. Refresh it by hand.",repo_pack:"Adds automatic updates for 180 days and keeps the link online for a year.",repo_never:"This link never expires. No subscription."})[C.id]||`${C.repositories} repositories, ${e.billingBytes(C.storage)}, automatic updates and links that never expire.`,e.hostingChoice=()=>{let C=e.hostingOneTimePlans();return C.some(O=>O.id===e.hostingPlan)||e.authorPlans().some(O=>O.id===e.hostingPlan)?e.hostingPlan:C[0]?.id||e.hostingSubscriptionPlan()?.id||""},e.checkoutRepository=async(C="")=>{if(!(e.hostingSaving||e.billingBusy||!e.billing?.csrf||e.sourceLoading)){e.hostingSaving=!0,e.billingError="";try{let O=N.checkpoint(),z=JSON.stringify(O);(!T||z!==M)&&(T=(await t.post("/api/billing/draft",{path:o.path(),values:O},{headers:{"x-csrf-token":e.billing.csrf}})).data.id,M=z);let K=e.authorPlans().find(ae=>ae.id===e.hostingPlan)||e.hostingSubscriptionPlan();if(!C&&!K)throw new Error("No author plan available");await e.checkout(C||K.id,C?e.repoId:"",{draftId:T})}catch{e.billingError="Your draft could not be saved for checkout. Your form is unchanged. Please try again."}finally{e.hostingSaving=!1}}},e.useDatedHosting=()=>{e.options.expirationMode="remove"},e.discardDraft=async()=>{N.discard(),e.workspaceOpen=!!e.sourceUrl,e.error=null,e.sourceUrl?await e.urlSelected(!0):(c++,e.sourceLoading=!1,e.detectedType=null,e.details=null,e.sourceUrlError="",Yt.cancel(),On.cancel(),Mn.cancel(),e.previewStatus="idle")},e.githubConnection=void 0,e.githubConnections=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1;let oe=()=>{let C={};for(let O of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])C[O]=e[O];sessionStorage.setItem("github-access-draft",JSON.stringify({path:o.path(),savedAt:Date.now(),draft:C}))};e.connectGistApp=()=>{oe(),window.location.href="/github/app/login?returnTo="+encodeURIComponent(o.path())},e.connectGistOAuth=()=>{oe(),window.location.href="/github/login?returnTo="+encodeURIComponent(o.path())},e.grantGitHubAccess=()=>{oe();let C=o.path(),O=tt(e.sourceUrl)||"",z=e.githubConnections?.appConnected?"/github/app/install":"/github/app/login";window.location.href=z+"?returnTo="+encodeURIComponent(C)+"&repository="+encodeURIComponent(O)+"&install=1"},e.chooseGitHubConnection=async C=>{e.githubConnection=C,e.readme="",e.sourceUrl&&await qe()},e.detectedType=null,e.repoId="",e.pullRequestId="",e.gistId="",e.terms="",e.defaultTerms="",e.branches=[],e.source={branch:"",commit:""},e.options={expirationMode:"remove",expirationDate:new Date,update:!1,image:!0,pdf:!0,notebook:!0,link:!0,body:!0,title:!0,origin:!1,diff:!0,content:!0,comments:!0,username:!0,date:!0};function _(){let C=new Date;return C.setMonth(C.getMonth()+6),C}e.options.expirationDate=_();function B(C){let O=C.getFullYear(),z=String(C.getMonth()+1).padStart(2,"0"),K=String(C.getDate()).padStart(2,"0");return`${O}-${z}-${K}`}e.minExpirationDate=B(new Date);let I=()=>{let C=new Date,O=new Date(C);if(O.setFullYear(O.getFullYear()+1),e.billing?.enabled&&e.detectedType==="repo"&&!e.hasAuthorHosting()){O=new Date(C),O.setMonth(O.getMonth()+(e.billing.freeExpirationMonths||5));for(let ae of e.repositoryGrants("repo_extend"))new Date(ae.until)>O&&(O=new Date(ae.until));e.conference_data?.endDate&&new Date(e.conference_data.endDate)>O&&(O=new Date(e.conference_data.endDate)),e._savedExpirationDate&&e._savedExpirationDate>O&&(O=new Date(e._savedExpirationDate));let z=e.options?.expirationDate,K=e._savedExpirationDate&&z instanceof Date&&z.getTime()===e._savedExpirationDate.getTime();z instanceof Date&&z>O&&!K&&(e.options.expirationDate=new Date(O))}e.maxExpirationDate=B(O)};I(),e.watch(()=>[e.billing,e.repoId,e.conference_data,e.isUpdate,e._savedExpirationDate,e.options?.expirationMode,e.detectedType],I,!0,!1),e.anonymize_readme="",e.readme="",e.isUpdate=!1,e.userRepos=[],e.userReposStatus="idle",e.userRepoFilter="",e.userRepoPage=1,e.userRepoNext=null;let L=0,k,q=[0];e.on("dispose",()=>{L++,clearTimeout(k)}),e.loadUserRepos=async()=>{clearTimeout(k);let C=++L,O=e.userRepoFilter.trim();e.userReposStatus="loading",e.userRepos=[];let z=q[e.userRepoPage-1];try{for(let K=0;K<5;K++){let ae=await t.get("/api/user/repository_picker",{params:{cursor:z,q:O,connection:e.githubConnection}});if(v||C!==L)return;if(e.userRepos=ae.data.items||[],e.userRepoNext=ae.data.nextCursor??null,e.userRepos.length||e.userRepoNext===null||!O)break;z=e.userRepoNext}e.userReposStatus="ready"}catch{!v&&C===L&&(e.userReposStatus="error")}},e.changeUserRepoPage=C=>{if(e.userReposStatus!=="loading"){if(C>0&&e.userRepoNext!==null)q[e.userRepoPage]=e.userRepoNext,e.userRepoPage++;else if(C<0&&e.userRepoPage>1)e.userRepoPage--;else return;e.loadUserRepos()}},e.watch(()=>[e.userRepoFilter,e.githubConnection],()=>{i.repoId||i.pullRequestId||i.gistId||(L++,clearTimeout(k),q=[0],e.userRepoPage=1,e.userRepoNext=null,e.userRepos=[],e.userReposStatus="loading",k=setTimeout(()=>{v||e.loadUserRepos()},300))},!0,!1),e.selectUserRepo=C=>{if(C?.fullName)return e.sourceUrl="https://github.com/"+C.fullName,e.urlSelected()},e.previousConfigurations=[],e.previousConfigurationId="";let G,H=C=>String(C||"").replace(/\/$/,"").replace(/\.git$/i,"").toLowerCase();async function Y(){if(e.isUpdate||i.repoId||i.pullRequestId||i.gistId)return;let C={generation:c,url:e.sourceUrl.trim(),connection:e.githubConnection};try{G||(G=t.get("/api/user/anonymized_repositories").then(K=>K.data));let O=await G;if(!y(C))return;let z=H(tt(C.url));e.previousConfigurations=O.filter(K=>K.repoId&&K.options&&H(K.source?.fullName)===z).sort((K,ae)=>(Date.parse(ae.anonymizeDate)||0)-(Date.parse(K.anonymizeDate)||0)),e.previousConfigurationId=e.previousConfigurations[0]?.repoId||""}catch{G=void 0}}e.sourceSummary=()=>{let C=String(e.sourceUrl||""),O=/github\.com\/([^/\s]+\/[^/\s]+)\/pull\/(\d+)/i.exec(C);return O?O[1]+" \xB7 PR #"+O[2]:(O=/gist\.github\.com\/([^/\s]+)\/([0-9a-f]{8,})/i.exec(C),O?O[1]+" \xB7 gist "+(O[2].length>12?O[2].slice(0,7)+"\u2026"+O[2].slice(-4):O[2]):"")},e.sourceError="",e.sourceErrorText="";let ne={repo_access_limited:"access",repo_not_accessible:"access",repo_saml_enforcement:"access",repo_already_anonymized:"used",repo_not_found:"missing",github_app_access_required:"missing",pull_request_not_found:"missing",gist_not_found:"missing",token_expired:"missing"},x=C=>{let O=C?.data?.error||(C?.status===404?"repo_not_found":"unknown_error");e.sourceError=O,e.sourceErrorText="",ne[O]||r("ERRORS."+O).then(z=>{e.sourceError===O&&z!=="ERRORS."+O&&(e.sourceErrorText=z)},()=>{}),si(O),Ee("sourceUrl","missing",!1)},fe=()=>{e.sourceError="",e.sourceErrorText=""};e.sourceReady=()=>!!e.isUpdate||!!e.details,e.sourceProblem=()=>{let C=e.anonymize?.sourceUrl?.errors||{};if(C.github||e.sourceUrlError&&e.workspaceOpen)return{kind:"github",title:"Not a GitHub URL",text:"Paste a repository, pull request, or gist URL from github.com."};if(e.sourceLoading||e.details&&!C.used)return null;if(e.gistAppRequired||e.gistOAuthRequired)return{kind:"connect",title:"Couldn't load this gist",text:"Connect GitHub to read gists."};let O=e.sourceError||(C.used?"repo_already_anonymized":C.access?"repo_not_accessible":C.missing?"repo_not_found":"");if(!O)return null;let z=ne[O]||"other",K=e.detectedType,ae="this gist";try{let kt=parseGithubUrl(String(e.sourceUrl||"").trim());K==="pr"?ae=`pull request #${kt.pullRequestId} in ${kt.owner}/${kt.repo}`:K!=="gist"&&(ae=`${kt.owner}/${kt.repo}`)}catch{}let ye=K==="pr"?"this pull request":K==="gist"?"this gist":"this repository",Ge=K!=="gist"&&e.githubConnection==="github-app",Tt=e.isUpdate&&K==="repo"?null:K==="gist"||!e.githubConnection?"link":Ge?"app":"link",pt="Couldn't load "+ye;if(z==="used")return{kind:z,title:"Already anonymized",text:`You've already anonymized ${ae}. Open it from My work to change its settings.`,dashboard:!0};if(z==="access"){let kt=O==="repo_saml_enforcement"?"Its organization requires single sign-on.":"Its organization restricts third-party apps.",ii=O==="repo_saml_enforcement"?"Authorize your GitHub session for the organization, then try again.":"An organization owner may need to approve Anonymous GitHub. You can also anonymize a personal fork.";return{kind:z,title:pt,text:`We can't read ${ae}. ${kt}`,note:ii,manage:Tt,retry:!0}}return z==="missing"?{kind:z,title:pt,text:`We can't read ${ae}. It doesn't exist, or ${Ge?"the Anonymous GitHub app hasn't been given access to it":"your GitHub account can't see it"}.`,manage:Tt,retry:!0}:{kind:z,title:pt,text:e.sourceErrorText||"GitHub didn't return it. Try again in a moment.",retry:!0}},e.submitBlockedReason=()=>e.sourceLoading?e.detectedType==="pr"?"Waiting for the pull request to load from GitHub\u2026":e.detectedType==="gist"?"Waiting for the gist to load from GitHub\u2026":"Waiting for the repository to load from GitHub\u2026":e.sourceReady()?"":e.sourceProblem()?.kind==="github"?"Enter a GitHub URL to continue.":e.detectedType==="pr"?"Add a pull request you can access to continue.":e.detectedType==="gist"?"Add a gist you can access to continue.":"Add a repository you can access to continue.",e.sourceIsPrivate=()=>e.details?e.detectedType==="gist"?e.details.gist?!e.details.gist.isPublic:!0:e.details.private!==!1:!1,e.previewId=()=>e.detectedType==="pr"?e.pullRequestId:e.detectedType==="gist"?e.gistId:e.repoId,e.previewPath=()=>{let C=e.previewId();return C?(e.detectedType==="pr"?"/pr/":e.detectedType==="gist"?"/gist/":"/r/")+encodeURIComponent(C)+"/":""},e.previewUrl=()=>{let C=e.previewPath();return C?"anonymous.4open.science"+C.replace(/\/$/,""):""},e.previewRedactions=()=>{let C=K=>typeof K=="string"?(K.match(xs)||[]).length:0;if(e.detectedType==="repo")return e.previewViewer.redactionCount();let O=e.detectedType==="pr"?So:Eo,z=0;return O.forEach(K=>{z+=C(K)}),z};let he=(C,O)=>C.localeCompare(O,void 0,{sensitivity:"base"}),Be=C=>C.slice(C.lastIndexOf("/")+1),He={key:null,files:[]};e.previewTreeFiles=()=>{if(!e.preserve.commit||!W)return[];let C=e.preserve.commit+"\0"+e.terms+"\0"+ko.size+"\0"+W.files.length;if(He.key===C)return He.files;let O=W.files.map(z=>{let K=e.previewPathName(z),ae=K.lastIndexOf("/");return{name:K.slice(ae+1),path:ae<0?"":K.slice(0,ae),size:0,sourcePath:z}});return He={key:C,files:O},O},e.selectPreviewPath=C=>{let O=e.previewTreeFiles().find(z=>"/"+(z.path?z.path+"/":"")+z.name===C);O&&e.openPreviewFile(O.sourcePath)},e.existingConfigurationUrl=()=>{let C=e.previousConfigurations.find(O=>O.repoId===e.previousConfigurationId);return C?"/anonymize/"+encodeURIComponent(C.repoId):null};function Qe(C){t.get("/api/user/default").then(O=>{let z=O.data;z.terms&&(e.defaultTerms=z.terms.join(` +`)),e.options=Object.assign({},e.options,z.options),e.options.expirationDate=z.options&&z.options.expirationDate?new Date(z.options.expirationDate):_(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),C&&C()})}function Ee(C,O,z){e.anonymize&&e.anonymize[C]&&e.anonymize[C].setValidity(O,z)}function tt(C){try{let O=parseGithubUrl(C);if(O&&O.owner&&O.repo)return O.owner+"/"+O.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 C=m();try{let O=await t.get("/github/connections");if(e.githubConnections=O.data,!O.data.appEnabled)return;let z=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":O.data.csrf}});if(!y(C))return;e.error=null,z.data.fullName&&(e._originalFullName=z.data.fullName,e.source.fullName=z.data.fullName,e.sourceUrl="https://github.com/"+z.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{y(C)&&(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(C)}},e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await ce()}catch{}}};function Ne(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:tt(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function qe(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function X(){let C=new URLSearchParams(window.location.search).get("billingDraft");if(C){N.restore();try{let z=(await t.get("/api/billing/draft/"+encodeURIComponent(C))).data;if(z.path!==o.path())throw new Error("Wrong task");w=z.values.conference||null;for(let K of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(z.values,K)&&(e[K]=z.values[K]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),T=z.id,M=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await qe(),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 O;try{O=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!O||O.path!==o.path()||Date.now()-O.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await qe(),!0):!1;N.restore();for(let z of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(O.draft,z)&&(e[z]=O.draft[z]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await qe(),sessionStorage.removeItem("github-access-draft"),!0}Qe(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&u(X,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async C=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(C.data.status),e.githubConnection=C.data.connection||"oauth",e.sourceUrl="https://github.com/"+C.data.source.fullName,e._originalFullName=C.data.source.fullName,e.terms=C.data.options.terms.filter(O=>O).join(` +`),e.source=C.data.source,e.role=C.data.role||"owner",e._existingNever=C.data.options.expirationMode==="never",e._savedExpirationDate=C.data.options.expirationDate?new Date(C.data.options.expirationDate):null,e.coauthors=C.data.coauthors||[],e._originalBranch=C.data.source.branch,e.options=Object.assign({},e.options,C.data.options),e.conference=C.data.conference,e._originalConference=C.data.conference,e.repositoryID=C.data.source.repositoryID,e._originalRepositoryID=C.data.source.repositoryID,C.data.options.expirationDate&&(e.options.expirationDate=new Date(C.data.options.expirationDate)),E=S(parseGithubUrl(e.sourceUrl)),!await X()&&(await Promise.all([ce(),ue()]),Co())},()=>{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 C=>{if(e.githubConnection=C.data.connection||"oauth",e.sourceUrl="https://github.com/"+C.data.source.repositoryFullName+"/pull/"+C.data.source.pullRequestId,e.terms=C.data.options.terms.filter(O=>O).join(` `),e.source=C.data.source,e.options=Object.assign({},e.options,C.data.options),e.conference=C.data.conference,e._originalConference=C.data.conference,C.data.options.expirationDate&&(e.options.expirationDate=new Date(C.data.options.expirationDate)),E=S(parseGithubUrl(e.sourceUrl)),!await X())try{await ol()}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 C=>{e.sourceUrl="https://gist.github.com/"+C.data.source.gistId,e.terms=C.data.options.terms.filter(O=>O).join(` -`),e.source=C.data.source,e.options=Object.assign({},e.options,C.data.options),e.conference=C.data.conference,e._originalConference=C.data.conference,C.data.options.expirationDate&&(e.options.expirationDate=new Date(C.data.options.expirationDate)),E=S(parseGithubUrl(e.sourceUrl)),!await X()&&await sl()},()=>{o.url("/404")}))}),t.get("/github/connections").then(C=>{e.githubConnections=C.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&C.data.appEnabled&&C.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&qe())}).catch(()=>{}).finally(()=>{!v&&!i.repoId&&!i.pullRequestId&&!i.gistId&&e.userReposStatus==="idle"&&e.loadUserRepos()}),e.urlSelected=async(C=!1)=>{let O=++c;e.previousConfigurations=[],e.previousConfigurationId="";let B;try{B=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,e.details=null,fe(),Yt.cancel(),On.cancel(),Mn.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",Ee("sourceUrl","github",!1);return}let J=S(B),ae=C||E===J;E=J,e.sourceUrlError="",Ee("sourceUrl","github",!0),fe();let ye=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let Ge=window.document.getElementById("sourceUrl");if(Ge){try{Ge.setSelectionRange(0,0)}catch{}Ge.scrollLeft=0}},50),ye&&u(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!ae&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],ae||(e.source={type:"GitHubStream",branch:"",commit:""}),Yt.cancel(),On.cancel(),Mn.cancel(),So.clear(),Eo.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",rf(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=ae;try{B.gistId&&!B.repo?(e.detectedType="gist",e.source={gistId:B.gistId},await sl()):B.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:B.owner+"/"+B.repo,pullRequestId:B.pullRequestId},await ol()):(e.detectedType="repo",K(),await Promise.all([pe(),ue()]),Co())}catch{}finally{O===c&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let C=e.branches.filter(B=>B.name==e.source.branch)[0];if(!C)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=C.commit),e.readme=C.readme,await ue(),Co()}),e.getBranches=async C=>{let O=parseGithubUrl(e.sourceUrl),B=m();try{let J=await t.get(`/api/repo/${O.owner}/${O.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:C===!0||e.reconnectingSource?"1":"0",repositoryID:Ne()}});if(!y(B))return;e.branches=J.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let ae=e.branches.filter(ye=>ye.name==e.source.branch);ae.length>0&&(!(!e.reconnectingSource&&!C&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=ae[0].commit),e.readme=ae[0].readme,await ue(C))}catch(J){if(!y(B))return;e.branches=[],e.sourceUnreachable=J&&(J.status===404||J.data&&J.data.error==="repo_not_found"),e.details=null,x(J)}finally{b(B)}};async function pe(){let C=parseGithubUrl(e.sourceUrl),O=m();try{No(),fe();let B=await t.get(`/api/repo/${C.owner}/${C.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:Ne(),force:"1"}});if(!y(O))return;e.details=B.data,e.reconnectingSource&&(e.reconnectRepositoryId=e.details.externalId),e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches(e.reconnectingSource)}catch(B){if(!y(O))return;throw x(B),B}finally{b(O)}}async function ue(C){if(e.readme&&!C)return e.readme;let O=parseGithubUrl(e.sourceUrl),B=m();try{let J=await t.get(`/api/repo/${O.owner}/${O.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:C===!0?"1":"0",branch:e.source.branch,repositoryID:Ne()}});y(B,!0)&&(e.readme=J.data)}catch{y(B,!0)&&(e.readme="")}finally{b(B)}}let me={magicalBraces:!0},be=C=>C.startsWith("/")&&!C.endsWith("/")&&jn(yo(C.slice(1),me),me)===C.slice(1),Ve=()=>Object.keys(e.preserve.picked).filter(C=>e.preserve.picked[C]).sort().map(C=>"/"+jn(C,me)),D=C=>"/"+jn(C,me)+"/**",A=C=>"!/"+jn(C,me)+"/",U=()=>String(e.preserve.patterns||"").split(` -`).map(C=>C.trim()).filter(Boolean),Y=null,W=null,ee=new Set,le=0,se=null,ie=()=>!1;function te(){let C=le+"\0"+e.preserve.patterns;if(C!==se){se=C;try{ie=Ja(Ya([...Ve(),...U()]))}catch{ie=()=>!1}}return ie}function we(C){let O=new Map([["",{dirs:[],files:[]}]]);for(let B of C){let J=B.split("/"),ae="";for(let ye=0;yeO.startsWith(C+"/"))),Y.descendants.get(C)}let Se=C=>te()(C);function Te(C){let O=ce(C),B=0;for(let J of O)Se(J)&&B++;return B===0?"none":B===O.length?"all":"some"}e.preserve={open:!1,loading:!1,error:"",truncated:!1,commit:"",search:"",expanded:{},picked:{},patterns:"",patternsOpen:!1},e.preserveSummary=()=>{let C=(e.options?.preserveFiles||[]).map(O=>String(O).trim()).filter(Boolean).map(O=>be(O)?yo(O.slice(1),me):O);return C.length?C.slice(0,2).join(", ")+(C.length>2?` and ${C.length-2} more`:""):"None. Every file is redacted."};async function Le(){let C=e.source?.commit;if(!(Y&&e.preserve.commit===C)){e.preserve.loading=!0,e.preserve.error="",Y=null,W=null;try{let O=parseGithubUrl(e.sourceUrl),B=await t.get(`/api/repo/${O.owner}/${O.repo}/tree`,{params:{commit:C,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&tt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ne()}});if(e.source?.commit!==C)return;let J=Array.isArray(B.data.binaryFiles)?B.data.binaryFiles:[];Y=pn(we(B.data.files||[])),W=J.length?pn(we([...B.data.files||[],...J])):Y,ee=pn(new Set(J)),e.preserve.commit=C,e.preserve.truncated=!!B.data.truncated,e.previewFile||Yt()}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",C=>{e.previewFile&&e.openPreviewFile(""),e.detectedType==="repo"&&C&&e.sourceUrl&&Le().catch(()=>{})}),e.openPreserveFiles=()=>{let C={},O=[];for(let J of e.options?.preserveFiles||[]){let ae=String(J).trim();ae&&(!O.length&&be(ae)?C[yo(ae.slice(1),me)]=!0:O.push(ae))}let B={};for(let J of Object.keys(C)){let ae=J.split("/");for(let ye=1;ye0}),e.mobileWorkspace&&(e.mobilePane="settings"),le++,u(()=>{let J=document.getElementById("preserve-files-dialog");J?.showModal&&!J.open&&J.showModal(),document.getElementById("preserve-files-search")?.focus()},0),Le()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=Ya([...Ve(),...U()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!Y)return[];let C=te(),O=(ye,Ge,Tt)=>{let pt=!!e.preserve.picked[ye],kt=C(ye);return{kind:"file",path:ye,label:Tt,depth:Ge,state:kt?"all":"none",locked:!pt&&kt,note:!pt&&kt?"matched by a pattern":pt&&!kt?"excluded by a pattern":""}},B=String(e.preserve.search||"").trim().toLowerCase();if(B)return Y.files.filter(ye=>ye.toLowerCase().includes(B)).slice(0,300).map(ye=>O(ye,0,ye));let J=[],ae=(ye,Ge)=>{let Tt=Y.dirs.get(ye);for(let pt of Tt.dirs){let kt=!!e.preserve.expanded[pt],ii=U().includes(D(pt));J.push({kind:"dir",path:pt,label:pt.slice(ye?ye.length+1:0)+"/",depth:Ge,open:kt,state:Te(pt),locked:!1,note:ii?"whole folder":""}),kt&&ae(pt,Ge+1)}for(let pt of Tt.files)J.push(O(pt,Ge,pt.slice(ye?ye.length+1:0)))};return ae("",0),J},e.preserveCount=()=>Y?Y.files.filter(Se).length:0,e.togglePreserveDir=C=>{e.preserve.expanded[C]=!e.preserve.expanded[C]},e.togglePreserveFile=C=>{e.preserve.picked[C]=!e.preserve.picked[C],le++},e.togglePreserveFolder=C=>{let O=D(C),B=A(C),J=U().filter(ye=>ye!==O&&ye!==B),ae=Te(C)==="all"||U().includes(O);for(let ye of ce(C))e.preserve.picked[ye]=!1;le++,e.preserve.patterns=(ae?J:[...J,O]).join(` -`),ae&&ce(C).some(Se)&&(e.preserve.patterns=[...J,B].join(` -`))};let Je=/^readme(\.[^/]*)?$/i,je=[".md",".markdown",".mdown",".mkdn",".rst",".txt",""],Ce=["README.md","README","README.markdown","README.rst","README.txt","readme.md"],$e=C=>{let O=Be(C),B=O.indexOf("."),J=je.indexOf(B===-1?"":O.slice(B).toLowerCase());return J===-1?je.length:J},it=()=>!!Y&&!!e.preserve.commit&&e.preserve.commit===e.source?.commit;e.readmePath=()=>{if(!it())return"";for(let C of[".github","","docs"]){let O=(Y.dirs.get(C)?.files||[]).filter(B=>Je.test(Be(B)));if(O.length)return O.sort((B,J)=>$e(B)-$e(J)||he(B,J))[0]}return""},e.readmeName=()=>Be(e.readmePath())||"README.md";let dt={key:null,fn:()=>!1},Pt=()=>{let C=(e.options?.preserveFiles||[]).map(B=>String(B).trim()).filter(Boolean),O=C.join(` -`);if(O!==dt.key){let B=()=>!1;try{C.length&&(B=Ja(C))}catch{}dt={key:O,fn:B}}return dt.fn};e.pathPreserved=C=>!!C&&Pt()(C),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let C=Pt();if(it()){let O=e.readmePath();return!!O&&C(O)}return Ce.some(O=>C(O))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function wt(){let C={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&&(C.branchName=e.source.branch);try{let O=parseGithubUrl(e.sourceUrl);C.repoName=`${O.owner}/${O.repo}`}catch{}return C}function rt(C,O,B){let J=null,ae=0,ye=()=>{if(e.detectedType!==C)return;J&&u.cancel(J);let Ge=++ae;e.previewStatus="loading",J=u(()=>{J=null;let Tt=O();if(!Tt){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Tt).then(pt=>{Ge===ae&&(B(pt.data,Tt),e.previewStatus="ready")}).catch(()=>{Ge===ae&&(e.previewStatus="error")})},200)};return ye.cancel=()=>{ae++,J&&u.cancel(J),J=null},e.on("dispose",ye.cancel),ye}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof rn!="string"?tl(e.previewFile):Yt()),e.detectedType==="pr"&&On(),e.detectedType==="gist"&&Mn()};let Ie=pn(Ls(e));Object.defineProperty(e,"previewViewer",{get:()=>Ie}),wa(Ie,e),Object.assign(Ie,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),Ie.preview=!0,Ie.fileSize=C=>C===Ie.filePath&&typeof rn=="string"?new Blob([rn]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,Ie.openPreserveFiles=()=>e.openPreserveFiles(),Ie.previewPreserved=()=>e.previewPreserved(),Ie.retryContent=()=>e.retryPreview();let sn=C=>ee.has(C)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(C),wo=(C="")=>({path:C,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=wo();let xo=0,rn=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=C=>{if(C=C||"",C&&C===e.readmePath()&&(C=""),xo++,rn=null,ti(),Yt.cancel(),e.previewFile=C,e.previewDoc=wo(C),Ie.sidebarCollapsed=!0,Ie.content=null,!C){e.readme?Yt():e.previewStatus="idle";return}if(sn(C)){gr("binary"),e.previewStatus="ready";return}tl(C)};function rf(){xo++,rn=null,e.previewFile="",e.previewDoc=wo(),Ie.sidebarCollapsed=!0,Ie.content=null}function tl(C){let O=++xo;rn=null,Object.assign(e.previewDoc,{loading:!0,loadError:""}),e.previewStatus="loading";let B;try{B=parseGithubUrl(e.sourceUrl)}catch{B=null}if(!B||!e.source?.commit){Object.assign(e.previewDoc,{loading:!1,loadError:"The repository is still loading. Try again in a moment."}),e.previewStatus="error";return}t.get(`/api/repo/${B.owner}/${B.repo}/file`,{params:{commit:e.source.commit,path:C,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&tt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ne()},transformResponse:J=>J}).then(J=>{if(O!==xo)return;e.previewDoc.loading=!1;let ae=typeof J.headers=="function"&&J.headers("content-type")||"";if(/json/i.test(ae)){let ye=null;try{ye=JSON.parse(J.data)}catch{}if(ye&&ye.binary===!0){gr("binary"),e.previewStatus="ready";return}}rn=typeof J.data=="string"?J.data:"",Yt()},J=>{if(O!==xo)return;e.previewDoc.loading=!1;let ae=pr(J);if(ae==="file_too_big"){gr("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=Jn.ERRORS[ae]||"GitHub did not return this file.",e.previewStatus="error"})}let ei;function ti(){ei&&window.URL.revokeObjectURL(ei),ei=void 0,Ie.url=void 0}e.on("dispose",ti);function gr(C){ti(),e.previewDoc.note=C,Ie.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),Ie.type=C==="too_big"?"error":"binary",Ie.content=C==="too_big"?"file_too_big":"binary"}function af(C){try{let O=parseGithubUrl(e.sourceUrl),B=e.source.branch||e.details&&e.details.defaultBranch||"main",J=C&&C.includes("/")?C.slice(0,C.lastIndexOf("/")+1):"";return`https://github.com/${O.owner}/${O.repo}/raw/${B}/${J}`}catch{return""}}let nl=rt("repo",()=>e.previewFile?typeof rn!="string"?null:{content:rn,options:wt()}:e.readme?{content:e.readme,options:wt()}:null,C=>{if(typeof C?.content!="string")throw Error("Invalid preview response");ti(),window.URL?.createObjectURL&&(Ie.url=ei=window.URL.createObjectURL(new Blob([C.content],{type:"text/plain"})));let O=e.previewOpenPath()||e.readmeName();Ie.prepareFile(e.previewPathName(O)),Ie.fileBaseUrl=af(O),Ie.renderFileContent(C.content,Ie.type,Ie.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=C.content)}),Yt=()=>{e.previewFile&&typeof rn!="string"||nl()};Yt.cancel=nl.cancel;let ko=at(new Map),vr=new Set,yr=new Set,es="",ts=null,ni=()=>String(e.terms||"").split(` +`),e.source=C.data.source,e.options=Object.assign({},e.options,C.data.options),e.conference=C.data.conference,e._originalConference=C.data.conference,C.data.options.expirationDate&&(e.options.expirationDate=new Date(C.data.options.expirationDate)),E=S(parseGithubUrl(e.sourceUrl)),!await X()&&await sl()},()=>{o.url("/404")}))}),t.get("/github/connections").then(C=>{e.githubConnections=C.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&C.data.appEnabled&&C.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&qe())}).catch(()=>{}).finally(()=>{!v&&!i.repoId&&!i.pullRequestId&&!i.gistId&&e.userReposStatus==="idle"&&e.loadUserRepos()}),e.urlSelected=async(C=!1)=>{let O=++c;e.previousConfigurations=[],e.previousConfigurationId="";let z;try{z=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,e.details=null,fe(),Yt.cancel(),On.cancel(),Mn.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",Ee("sourceUrl","github",!1);return}let K=S(z),ae=C||E===K;E=K,e.sourceUrlError="",Ee("sourceUrl","github",!0),fe();let ye=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let Ge=window.document.getElementById("sourceUrl");if(Ge){try{Ge.setSelectionRange(0,0)}catch{}Ge.scrollLeft=0}},50),ye&&u(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!ae&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],ae||(e.source={type:"GitHubStream",branch:"",commit:""}),Yt.cancel(),On.cancel(),Mn.cancel(),So.clear(),Eo.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",rf(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=ae;try{z.gistId&&!z.repo?(e.detectedType="gist",e.source={gistId:z.gistId},await sl()):z.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:z.owner+"/"+z.repo,pullRequestId:z.pullRequestId},await ol()):(e.detectedType="repo",Y(),await Promise.all([ce(),ue()]),Co())}catch{}finally{O===c&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let C=e.branches.filter(z=>z.name==e.source.branch)[0];if(!C)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=C.commit),e.readme=C.readme,await ue(),Co()}),e.getBranches=async C=>{let O=parseGithubUrl(e.sourceUrl),z=m();try{if(!e.details){await ce(C);return}let K=await t.get(`/api/repo/${O.owner}/${O.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:C===!0||e.reconnectingSource?"1":"0",repositoryID:Ne()}});if(!y(z))return;e.branches=K.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let ae=e.branches.filter(ye=>ye.name==e.source.branch);ae.length>0&&(!(!e.reconnectingSource&&!C&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=ae[0].commit),e.readme=ae[0].readme,await ue(C))}catch(K){if(!y(z))return;e.branches=[],e.sourceUnreachable=K&&(K.status===404||K.data&&K.data.error==="repo_not_found"),e.details=null,x(K)}finally{b(z)}};async function ce(C=!1){let O=parseGithubUrl(e.sourceUrl),z=m();try{No(),fe();let K=await t.get(`/api/repo/${O.owner}/${O.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:Ne(),force:"1"}});if(!y(z))return;e.details=K.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(C||e.reconnectingSource)}catch(K){if(!y(z))return;throw x(K),K}finally{b(z)}}async function ue(C){if(e.readme&&!C)return e.readme;let O=parseGithubUrl(e.sourceUrl),z=m();try{let K=await t.get(`/api/repo/${O.owner}/${O.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:C===!0?"1":"0",branch:e.source.branch,repositoryID:Ne()}});y(z,!0)&&(e.readme=K.data)}catch{y(z,!0)&&(e.readme="")}finally{b(z)}}let me={magicalBraces:!0},be=C=>C.startsWith("/")&&!C.endsWith("/")&&jn(yo(C.slice(1),me),me)===C.slice(1),Ve=()=>Object.keys(e.preserve.picked).filter(C=>e.preserve.picked[C]).sort().map(C=>"/"+jn(C,me)),D=C=>"/"+jn(C,me)+"/**",A=C=>"!/"+jn(C,me)+"/",U=()=>String(e.preserve.patterns||"").split(` +`).map(C=>C.trim()).filter(Boolean),J=null,W=null,ee=new Set,le=0,se=null,ie=()=>!1;function te(){let C=le+"\0"+e.preserve.patterns;if(C!==se){se=C;try{ie=Ja(Ya([...Ve(),...U()]))}catch{ie=()=>!1}}return ie}function we(C){let O=new Map([["",{dirs:[],files:[]}]]);for(let z of C){let K=z.split("/"),ae="";for(let ye=0;yeO.startsWith(C+"/"))),J.descendants.get(C)}let Se=C=>te()(C);function Te(C){let O=pe(C),z=0;for(let K of O)Se(K)&&z++;return z===0?"none":z===O.length?"all":"some"}e.preserve={open:!1,loading:!1,error:"",truncated:!1,commit:"",search:"",expanded:{},picked:{},patterns:"",patternsOpen:!1},e.preserveSummary=()=>{let C=(e.options?.preserveFiles||[]).map(O=>String(O).trim()).filter(Boolean).map(O=>be(O)?yo(O.slice(1),me):O);return C.length?C.slice(0,2).join(", ")+(C.length>2?` and ${C.length-2} more`:""):"None. Every file is redacted."};async function Le(){let C=e.source?.commit;if(!(J&&e.preserve.commit===C)){e.preserve.loading=!0,e.preserve.error="",J=null,W=null;try{let O=parseGithubUrl(e.sourceUrl),z=await t.get(`/api/repo/${O.owner}/${O.repo}/tree`,{params:{commit:C,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&tt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ne()}});if(e.source?.commit!==C)return;let K=Array.isArray(z.data.binaryFiles)?z.data.binaryFiles:[];J=pn(we(z.data.files||[])),W=K.length?pn(we([...z.data.files||[],...K])):J,ee=pn(new Set(K)),e.preserve.commit=C,e.preserve.truncated=!!z.data.truncated,e.previewFile||Yt()}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",C=>{e.previewFile&&e.openPreviewFile(""),e.detectedType==="repo"&&C&&e.sourceUrl&&Le().catch(()=>{})}),e.openPreserveFiles=()=>{let C={},O=[];for(let K of e.options?.preserveFiles||[]){let ae=String(K).trim();ae&&(!O.length&&be(ae)?C[yo(ae.slice(1),me)]=!0:O.push(ae))}let z={};for(let K of Object.keys(C)){let ae=K.split("/");for(let ye=1;ye0}),e.mobileWorkspace&&(e.mobilePane="settings"),le++,u(()=>{let K=document.getElementById("preserve-files-dialog");K?.showModal&&!K.open&&K.showModal(),document.getElementById("preserve-files-search")?.focus()},0),Le()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=Ya([...Ve(),...U()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!J)return[];let C=te(),O=(ye,Ge,Tt)=>{let pt=!!e.preserve.picked[ye],kt=C(ye);return{kind:"file",path:ye,label:Tt,depth:Ge,state:kt?"all":"none",locked:!pt&&kt,note:!pt&&kt?"matched by a pattern":pt&&!kt?"excluded by a pattern":""}},z=String(e.preserve.search||"").trim().toLowerCase();if(z)return J.files.filter(ye=>ye.toLowerCase().includes(z)).slice(0,300).map(ye=>O(ye,0,ye));let K=[],ae=(ye,Ge)=>{let Tt=J.dirs.get(ye);for(let pt of Tt.dirs){let kt=!!e.preserve.expanded[pt],ii=U().includes(D(pt));K.push({kind:"dir",path:pt,label:pt.slice(ye?ye.length+1:0)+"/",depth:Ge,open:kt,state:Te(pt),locked:!1,note:ii?"whole folder":""}),kt&&ae(pt,Ge+1)}for(let pt of Tt.files)K.push(O(pt,Ge,pt.slice(ye?ye.length+1:0)))};return ae("",0),K},e.preserveCount=()=>J?J.files.filter(Se).length:0,e.togglePreserveDir=C=>{e.preserve.expanded[C]=!e.preserve.expanded[C]},e.togglePreserveFile=C=>{e.preserve.picked[C]=!e.preserve.picked[C],le++},e.togglePreserveFolder=C=>{let O=D(C),z=A(C),K=U().filter(ye=>ye!==O&&ye!==z),ae=Te(C)==="all"||U().includes(O);for(let ye of pe(C))e.preserve.picked[ye]=!1;le++,e.preserve.patterns=(ae?K:[...K,O]).join(` +`),ae&&pe(C).some(Se)&&(e.preserve.patterns=[...K,z].join(` +`))};let Je=/^readme(\.[^/]*)?$/i,je=[".md",".markdown",".mdown",".mkdn",".rst",".txt",""],Ce=["README.md","README","README.markdown","README.rst","README.txt","readme.md"],$e=C=>{let O=Be(C),z=O.indexOf("."),K=je.indexOf(z===-1?"":O.slice(z).toLowerCase());return K===-1?je.length:K},it=()=>!!J&&!!e.preserve.commit&&e.preserve.commit===e.source?.commit;e.readmePath=()=>{if(!it())return"";for(let C of[".github","","docs"]){let O=(J.dirs.get(C)?.files||[]).filter(z=>Je.test(Be(z)));if(O.length)return O.sort((z,K)=>$e(z)-$e(K)||he(z,K))[0]}return""},e.readmeName=()=>Be(e.readmePath())||"README.md";let dt={key:null,fn:()=>!1},Pt=()=>{let C=(e.options?.preserveFiles||[]).map(z=>String(z).trim()).filter(Boolean),O=C.join(` +`);if(O!==dt.key){let z=()=>!1;try{C.length&&(z=Ja(C))}catch{}dt={key:O,fn:z}}return dt.fn};e.pathPreserved=C=>!!C&&Pt()(C),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let C=Pt();if(it()){let O=e.readmePath();return!!O&&C(O)}return Ce.some(O=>C(O))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function wt(){let C={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&&(C.branchName=e.source.branch);try{let O=parseGithubUrl(e.sourceUrl);C.repoName=`${O.owner}/${O.repo}`}catch{}return C}function rt(C,O,z){let K=null,ae=0,ye=()=>{if(e.detectedType!==C)return;K&&u.cancel(K);let Ge=++ae;e.previewStatus="loading",K=u(()=>{K=null;let Tt=O();if(!Tt){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Tt).then(pt=>{Ge===ae&&(z(pt.data,Tt),e.previewStatus="ready")}).catch(()=>{Ge===ae&&(e.previewStatus="error")})},200)};return ye.cancel=()=>{ae++,K&&u.cancel(K),K=null},e.on("dispose",ye.cancel),ye}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof rn!="string"?tl(e.previewFile):Yt()),e.detectedType==="pr"&&On(),e.detectedType==="gist"&&Mn()};let Ie=pn(Ls(e));Object.defineProperty(e,"previewViewer",{get:()=>Ie}),wa(Ie,e),Object.assign(Ie,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),Ie.preview=!0,Ie.fileSize=C=>C===Ie.filePath&&typeof rn=="string"?new Blob([rn]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,Ie.openPreserveFiles=()=>e.openPreserveFiles(),Ie.previewPreserved=()=>e.previewPreserved(),Ie.retryContent=()=>e.retryPreview();let sn=C=>ee.has(C)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(C),wo=(C="")=>({path:C,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=wo();let xo=0,rn=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=C=>{if(C=C||"",C&&C===e.readmePath()&&(C=""),xo++,rn=null,ti(),Yt.cancel(),e.previewFile=C,e.previewDoc=wo(C),Ie.sidebarCollapsed=!0,Ie.content=null,!C){e.readme?Yt():e.previewStatus="idle";return}if(sn(C)){gr("binary"),e.previewStatus="ready";return}tl(C)};function rf(){xo++,rn=null,e.previewFile="",e.previewDoc=wo(),Ie.sidebarCollapsed=!0,Ie.content=null}function tl(C){let O=++xo;rn=null,Object.assign(e.previewDoc,{loading:!0,loadError:""}),e.previewStatus="loading";let z;try{z=parseGithubUrl(e.sourceUrl)}catch{z=null}if(!z||!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/${z.owner}/${z.repo}/file`,{params:{commit:e.source.commit,path:C,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&tt(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ne()},transformResponse:K=>K}).then(K=>{if(O!==xo)return;e.previewDoc.loading=!1;let ae=typeof K.headers=="function"&&K.headers("content-type")||"";if(/json/i.test(ae)){let ye=null;try{ye=JSON.parse(K.data)}catch{}if(ye&&ye.binary===!0){gr("binary"),e.previewStatus="ready";return}}rn=typeof K.data=="string"?K.data:"",Yt()},K=>{if(O!==xo)return;e.previewDoc.loading=!1;let ae=pr(K);if(ae==="file_too_big"){gr("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=Jn.ERRORS[ae]||"GitHub did not return this file.",e.previewStatus="error"})}let ei;function ti(){ei&&window.URL.revokeObjectURL(ei),ei=void 0,Ie.url=void 0}e.on("dispose",ti);function gr(C){ti(),e.previewDoc.note=C,Ie.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),Ie.type=C==="too_big"?"error":"binary",Ie.content=C==="too_big"?"file_too_big":"binary"}function af(C){try{let O=parseGithubUrl(e.sourceUrl),z=e.source.branch||e.details&&e.details.defaultBranch||"main",K=C&&C.includes("/")?C.slice(0,C.lastIndexOf("/")+1):"";return`https://github.com/${O.owner}/${O.repo}/raw/${z}/${K}`}catch{return""}}let nl=rt("repo",()=>e.previewFile?typeof rn!="string"?null:{content:rn,options:wt()}:e.readme?{content:e.readme,options:wt()}:null,C=>{if(typeof C?.content!="string")throw Error("Invalid preview response");ti(),window.URL?.createObjectURL&&(Ie.url=ei=window.URL.createObjectURL(new Blob([C.content],{type:"text/plain"})));let O=e.previewOpenPath()||e.readmeName();Ie.prepareFile(e.previewPathName(O)),Ie.fileBaseUrl=af(O),Ie.renderFileContent(C.content,Ie.type,Ie.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=C.content)}),Yt=()=>{e.previewFile&&typeof rn!="string"||nl()};Yt.cancel=nl.cancel;let ko=at(new Map),vr=new Set,yr=new Set,es="",ts=null,ni=()=>String(e.terms||"").split(` `).filter(C=>C.trim());function lf(){ts=null;let C=ni(),O=C.join(` -`);O!==es&&(ko.clear(),yr.clear(),es=O);let B=[...vr].filter(J=>!ko.has(J));if(vr.clear(),!(!B.length||!C.length))for(let J=0;J{if(es!==O||ni().join(` +`);O!==es&&(ko.clear(),yr.clear(),es=O);let z=[...vr].filter(K=>!ko.has(K));if(vr.clear(),!(!z.length||!C.length))for(let K=0;K{if(es!==O||ni().join(` `)!==O)return;let Ge=ye.data?.contents;if(!Array.isArray(Ge)||Ge.length!==ae.length)throw Error("Invalid preview response");ae.forEach((Tt,pt)=>ko.set(Tt,typeof Ge[pt]=="string"?Ge[pt]:Tt))}).catch(()=>{es===O&&ae.forEach(ye=>yr.add(ye))})}}e.previewName=C=>{if(!C||!ni().length)return C;if(es===ni().join(` -`)){if(ko.has(C))return ko.get(C);if(yr.has(C))return C}return vr.add(C),ts||(ts=u(lf,120)),C},e.previewPathName=C=>{C=String(C||"");let O=C.lastIndexOf("/");return O<0?e.previewName(C):e.previewName(C.slice(0,O))+"/"+e.previewName(C.slice(O+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{Ie.repoId=e.repoId||"repository",Ie.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),Ie.paths=Ie.filePath.split("/"),Ie.files=e.previewTreeFiles(),Ie.loadedFolders=Object.fromEntries([...W?.dirs.keys()||[]].map(C=>[e.previewName(C),!0]))},!0),e.on("dispose",()=>{ts&&u.cancel(ts)});function Co(){!e.anonymize||!e.anonymize.terms||Yt()}async function ol(){let C=parseGithubUrl(e.sourceUrl),O=m();try{No(),fe();let B=await t.get(`/api/pr/${C.owner}/${C.repo}/${C.pullRequestId}`,{params:{connection:e.githubConnection}});if(!y(O))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=C.repo+"-PR"+C.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!y(O))return;throw x(B),B}finally{b(O)}}let So=at(new Map);function df(){let C=new Set,O=e.details&&e.details.pullRequest;if(!O)return C;typeof O.title=="string"&&C.add(O.title),typeof O.body=="string"&&C.add(O.body),typeof O.diff=="string"&&C.add(O.diff);let B=O.comments||[];for(let J of B)typeof J.author=="string"&&C.add(J.author),typeof J.body=="string"&&C.add(J.body);return C}let On=rt("pr",()=>{let C=df(),O=Array.from(C);return O.length===0?null:{contents:O,options:wt()}},(C,O)=>{if(!Array.isArray(C?.contents)||C.contents.length!==O.contents.length||C.contents.some(ae=>typeof ae!="string"))throw Error("Invalid preview response");let B=O.contents,J=new Map;for(let ae=0;aeSo.set(ye,ae))});e.anonymizePrContent=function(C){return C&&(So.has(C)?So.get(C):"")};async function sl(){let C=parseGithubUrl(e.sourceUrl),O=m();try{No(),fe(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${C.gistId}`);if(!y(O))return;e.details=B.data,e.gistId||(e.gistId="gist-"+C.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!y(O))return;if(B.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,Ee("sourceUrl","missing",!1);return}if(B.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,Ee("sourceUrl","missing",!1);return}throw x(B),B}finally{b(O)}}let Eo=at(new Map);function uf(){let C=new Set,O=e.details&&e.details.gist;if(!O)return C;typeof O.description=="string"&&C.add(O.description),typeof O.ownerLogin=="string"&&C.add(O.ownerLogin);let B=O.files||[];for(let ae of B)typeof ae.filename=="string"&&C.add(ae.filename),typeof ae.content=="string"&&C.add(ae.content);let J=O.comments||[];for(let ae of J)typeof ae.author=="string"&&C.add(ae.author),typeof ae.body=="string"&&C.add(ae.body);return C}let Mn=rt("gist",()=>{let C=uf(),O=Array.from(C);return O.length===0?null:{contents:O,options:wt()}},(C,O)=>{if(!Array.isArray(C?.contents)||C.contents.length!==O.contents.length||C.contents.some(ae=>typeof ae!="string"))throw Error("Invalid preview response");let B=O.contents,J=new Map;for(let ae=0;aeEo.set(ye,ae)),br()});e.anonymizeGistContent=function(C){return C&&(Eo.has(C)?Eo.get(C):"")},e.previewGistFiles=[];function br(){let C=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=C.map(O=>({filename:e.anonymizeGistContent(O.filename),content:e.anonymizeGistContent(O.content),language:O.language}))}e.watch("details.gist.files",br,!0),e.watch("terms",br);function cf(){let C=e.conference;if(e.conference_data=null,!C)return;let O=C===w||e.isUpdate&&C===e._originalConference;C!==w&&(w=null),t.get("/api/conferences/"+C).then(B=>{e.conference===C&&(e.conference_data=B.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!O&&(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===C&&(e.conference_data=null)})}function No(){Ee("repoId","used",!0),Ee("repoId","format",!0),Ee("pullRequestId","used",!0),Ee("pullRequestId","format",!0),Ee("gistId","used",!0),Ee("gistId","format",!0),Ee("sourceUrl","used",!0),Ee("sourceUrl","missing",!0),Ee("sourceUrl","access",!0),Ee("sourceUrl","github",!0),Ee("commit","exists",!0),Ee("conference","activated",!0),Ee("terms","format",!0),e.termHints=[]}function oi(){if(e.detectedType==="repo"&&e.options.expirationMode==="never")return!1;let C=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||C&&C.invalid?(C&&C.setDirty&&C.setDirty(),e.error="Please choose a valid expiration date.",!0):!1}function si(C){let O=e.detectedType==="pr"?"pullRequestId":e.detectedType==="gist"?"gistId":"repoId";switch(C){case"repoId_already_used":Ee(O,"used",!1);break;case"invalid_repoId":Ee(O,"format",!1);break;case"options_not_provided":Ee(O,"format",!1);break;case"repo_already_anonymized":Ee("sourceUrl","used",!1);break;case"invalid_terms_format":Ee("terms","format",!1);break;case"repo_not_found":Ee("sourceUrl","missing",!1);break;case"repo_not_accessible":Ee("sourceUrl","access",!1);break;case"commit_not_found":Ee("commit","exists",!1);break;case"conf_not_activated":Ee("conference","activated",!1);break}}e.coauthors=e.coauthors||[],e.coauthorResults=[],e.coauthorError="",e.searchCoauthors=()=>{let C=(e.coauthorSearch||"").trim();if(e.coauthorError="",C.length<2){e.coauthorResults=[];return}t.get("/api/user/search/github-users",{params:{q:C}}).then(O=>{let B=new Set((e.coauthors||[]).map(J=>(J.username||"").toLowerCase()));e.coauthorResults=(O.data||[]).filter(J=>!B.has((J.username||"").toLowerCase()))},()=>{e.coauthorResults=[]})},e.addCoauthor=(C,O)=>{O&&O.preventDefault(),!(!C||!C.username)&&t.post("/api/repo/"+e.repoId+"/coauthors",{username:C.username}).then(B=>{e.coauthors=B.data||[],e.coauthorResults=[],e.coauthorSearch="",e.coauthorError=""},B=>{let J=B&&B.data&&B.data.error||"unknown_error";e.coauthorError=J})},e.removeCoauthor=C=>{!C||!C.username||confirm("Remove co-author "+C.username+"?")&&t.delete("/api/repo/"+e.repoId+"/coauthors/"+encodeURIComponent(C.username)).then(O=>{e.coauthors=O.data||[]},O=>{let B=O&&O.data&&O.data.error||"unknown_error";e.coauthorError=B})},e.anonymizeRepo=C=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(e.reconnectingSource&&!e.reconnectRepositoryId)return;if(oi()){e.editRepository();return}if(e.anonymize?.invalid||e.sourceUrlError){e.editRepository(),e.error="Please correct the highlighted fields before saving.";return}if(e.hostingNeedsPayment()&&e.options.expirationMode==="never"){e.hostingReview=!0,We(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"}));return}let O=C.currentTarget||C.target.closest?.("button")||C.target;O.disabled=!0;let B=parseGithubUrl(e.sourceUrl),J={repoId:e.repoId,terms:e.terms.trim().split(` -`).filter(ye=>ye),connection:e.githubConnection,fullName:`${B.owner}/${B.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(J.options.pageSource=e.details.pageSource),No();let ae=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(ae,J,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/status/"+e.repoId},ye=>{if(ye.data){let Ge=["quota_exceeded","subscription_required_for_never_expiration"].includes(ye.data.error);Ge||r("ERRORS."+ye.data.error).then(Tt=>{e.error=Tt},console.error),si(ye.data.error),Ge&&(ye.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,We(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{O.disabled=!1})},e.anonymizeGist=C=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(oi())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let O=C.currentTarget||C.target.closest?.("button")||C.target;O.disabled=!0;let B=parseGithubUrl(e.sourceUrl),J={gistId:e.gistId,terms:e.terms.trim().split(` -`).filter(ye=>ye),source:{gistId:B.gistId},options:e.options,conference:e.conference};No();let ae=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(ae,J,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/gist/"+e.gistId},ye=>{ye.data&&(r("ERRORS."+ye.data.error).then(Ge=>{e.error=Ge},console.error),si(ye.data.error))}).finally(()=>{O.disabled=!1})},e.anonymizePullRequest=C=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(oi())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let O=C.currentTarget||C.target.closest?.("button")||C.target;O.disabled=!0;let B=parseGithubUrl(e.sourceUrl),J={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(` -`).filter(ye=>ye),source:{repositoryFullName:`${B.owner}/${B.repo}`,pullRequestId:B.pullRequestId},options:e.options,conference:e.conference};No();let ae=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(ae,J,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/pr/"+e.pullRequestId},ye=>{ye.data&&(r("ERRORS."+ye.data.error).then(Ge=>{e.error=Ge},console.error),si(ye.data.error))}).finally(()=>{O.disabled=!1})},e.watch("conference",()=>{cf()}),e.termHints=[],e.matchTermAsWritten=C=>{e.terms=Lc(e.terms,C)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&Yt()}),e.watch("terms",()=>{e.termHints=qc(e.terms),e.detectedType==="repo"&&Co(),e.detectedType==="pr"&&On(),e.detectedType==="gist"&&Mn()}),e.watch("options.image",()=>{e.detectedType==="repo"&&Co(),e.detectedType==="pr"&&On(),e.detectedType==="gist"&&Mn()}),e.watch("options.link",()=>{e.detectedType==="repo"&&Co(),e.detectedType==="pr"&&On(),e.detectedType==="gist"&&Mn()}),e.watch("details",()=>{e.detectedType==="pr"&&On(),e.detectedType==="gist"&&Mn()},!0)},Za=function(e,t,s,i,o,r){wa(e);let u=bt();_c();let p=Bt(),c=0,v=null,g=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function y(){v&&(v.resolve(),v=null),g&&(u.timeout.cancel(g),g=null)}let m=!1;e.on("dispose",()=>{m=!0,c++,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",I=>{e.symbolsOpen&&!I.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!I.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!I.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&I.target.isConnected&&!I.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!I.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!I.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),p(document,"keydown",I=>{I.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(I.ctrlKey||I.metaKey)&&!I.altKey&&I.key&&I.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(I.preventDefault(),e.toggleMdFind(!0))}),p(document,"keydown",function(I){if((I.metaKey||I.ctrlKey)&&I.key==="k"){I.preventDefault();var L=document.querySelector(".tree-search-input");L&&(L.focus(),L.select())}});var b=null;e.onFileSearchChange=function(){b&&(b.resolve(),b=null);let I=e.fileSearchQuery;if(!I||I.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let L=r.defer();b=L,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(I)}`,{timeout:L.promise}).then(function(k){if(!(m||b!==L)){b=null,e.fileSearchLoading=!1;var q={};e.files.forEach(function(qe){q[(qe.path||"")+"/"+qe.name]=!0});for(var G=[],H={},K=0;K0&&e.files.push.apply(e.files,G);for(var Qe=[],Ee=0;Ee0&&e.files.push.apply(e.files,Qe),e.fileSearchResults=k.data}},function(){!m&&b===L&&(b=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(I,L){if(e.repoId!=i.repoId)return z();if((i.path||"")!=e.filePath){window.matchMedia?.("(max-width: 767px)").matches&&(e.sidebarCollapsed=!0),e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(k=>k&&k.trim().length>0),_();for(let k=0;k0?e.paths.slice(0,k).join("/"):"";e.files.some(H=>H.path===q)||e.getFiles(q)}}});function E(){if(e.paths[0]!="")return;let I=["readme.md","readme.txt","readme.org","readme.1st","readme"],L={};for(let q of e.files)q.name.toLowerCase().indexOf("readme")>-1&&(L[q.name.toLowerCase()]=q.name);let k=null;for(let q of I)if(L[q]){k=q;break}if(!k&&Object.keys(L).length>0&&(k=Object.keys(L)[0]),k){let q=s.url();q[q.length-1]!="/"&&(q+="/"),s.url(q+encodePathForUrl(L[k]))}}e.fileCounts=null;let S=0,N=new Set,w=!1;e.getFiles=function(I,L=!1){let k=e.repoId,q=S;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(I)}&v=${e.options.lastUpdateDate}`).then(function(G){if(m||k!==e.repoId||q!==S)return[];let H=I||"";return e.files=e.files.filter(K=>K.path!==H),e.files.push(...G.data),e.loadedFolders={...e.loadedFolders,[H]:!0},T(H,q),G.data},function(G){if(m||k!==e.repoId||q!==S)return[];L||(e.type="error",e.content=pr(G),e.files=[])})};function T(I,L){if(w||N.has(I))return;N.add(I);let k=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(I)}`).then(function(q){m||k!==e.repoId||L!==S||(e.fileCounts={...e.fileCounts,...q.data})},function(){m||k!==e.repoId||L!==S||(w=!0)})}function M(){return e.files.filter(I=>I.name==e.paths[e.paths.length-1]&&I.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var F=null;e.on("dispose",function(){F&&u.interval.cancel(F)});function j(I){if(m)return;let L=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(k=>{if(!(m||L!==e.repoId)){if(e.options=k.data,e.options.url){window.location=e.options.url;return}I&&I(k.data)}},k=>{if(!(m||L!==e.repoId)){var q=k.data||{};if(q.error==="rate_limited"&&q.resetAt){let H=function(){var K=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(K<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,F&&(u.interval.cancel(F),F=null),j(I);else{var ne=Math.floor(K/60),x=K%60;e.rateLimitCountdown=ne>0?ne+"m "+x+"s":x+"s"}};var G=H;e.type="rate_limited",e.rateLimitResetAt=q.resetAt,F&&u.interval.cancel(F),H(),F=u.interval(H,1e3)}else q.error==="repository_not_ready"?(e.type="loading",u.timeout(function(){j(I)},3e3)):(e.type="error",e.content=pr(k))}})}function oe(I,L){let k=c;if(!I){e.type="error",e.content="no_file_selected";return}let q=e.type;(q==="code"||q==="text")&&ai().catch(()=>{}),e.type="loading",e.content="loading",e.fileLoadingSlow=!1,e.fileReceivedBytes=0;let G=r.defer();v=G,g=u.timeout(()=>{!m&&k===c&&e.type==="loading"&&(e.fileLoadingSlow=!0)},1500);let H=L&&L.sha||"0";t.get(`/api/repo/${e.repoId}/file/${encodePathForUrl(I)}?v=`+H,{timeout:G.promise,onDownloadProgress:K=>{!m&&k===c&&(e.fileReceivedBytes=K)},transformResponse:K=>K}).then(K=>{m||k!==c||(y(),e.renderFileContent(K.data,q,s.url()+"/../",K.headers("content-type")))},K=>{m||k!==c||(y(),e.type="error",e.content=pr(K))})}function _(){c++,y(),e.content="",e.file=M();let I="0";e.file&&e.file.sha&&(I=e.file.sha),e.url=`/api/repo/${e.repoId}/file/${encodePathForUrl(e.filePath)}?v=${I}`;let L=e.filePath.substring(0,e.filePath.lastIndexOf("/")+1);if(e.fileBaseUrl=`/api/repo/${e.repoId}/file/${L?encodePathForUrl(L):""}`,e.showSource=!1,e.imageSize="",e.allowScripts=!1,e.prepareFile(e.filePath),e.type=="pdf"){e.content="pdf";return}if(e.type=="media"||e.type=="audio"){e.content=e.type;return}oe(e.filePath,e.file)}e.isSourceAccessError=()=>["repo_not_found","token_expired","github_app_access_required","github_app_reconnect_required","repo_saml_enforcement","repo_access_limited"].includes(e.content),e.retryContent=()=>z();function z(){c++,y(),e.files=[],e.loadedFolders={},e.content=null,e.fileCounts=null,S++,N=new Set,w=!1,e.fileSearchQuery="",e.onFileSearchChange(),e.repoId=i.repoId,e.type="loading",e.filePath=i.path||"",e.paths=e.filePath.split("/");let I=e.repoId;j(function(L){if(e.filePath){_();let q=[...new Set(e.paths.map((G,H)=>e.paths.slice(0,H).join("/")))];r.all(q.map(G=>e.getFiles(G,!0)));return}var k=r.resolve();for(let q=0;q0?e.paths.slice(0,q).join("/"):"";k=k.then(function(){return e.getFiles(G)}).then(function(){if(e.type==="error")return r.reject("error")})}k.then(function(){m||I!==e.repoId||(e.files.length==1&&e.files[0].name==""?(e.files=[],e.type="empty"):(E(),_()))})})}z()},Kc=function(e,t,s,i,o){async function r(c){t.get(`/api/pr/${e.pullRequestId}/options`).then(v=>{if(e.options=v.data,e.options.url){window.location=e.options.url;return}c&&c(v.data)},v=>{e.type="error",e.content=v.data.error})}async function u(c){t.get(`/api/pr/${e.pullRequestId}/content`).then(v=>{e.details=v.data,e.tabState={active:v.data.diff?"diff":"comments"},c&&c(v.data)},v=>{e.type="error",e.content=v.data.error})}function p(){e.pullRequestId=i.pullRequestId,e.type="loading",r(c=>{u()})}p()},Yc=function(e,t,s,i,o){async function r(c){t.get(`/api/gist/${e.gistId}/options`).then(v=>{if(e.options=v.data,e.options.url){window.location=e.options.url;return}c&&c(v.data)},v=>{e.type="error",e.content=v.data.error})}async function u(c){t.get(`/api/gist/${e.gistId}/content`).then(v=>{e.details=v.data;let g=v.data&&v.data.files&&v.data.files.length;e.tabState={active:g?"files":"comments"},c&&c(v.data)},v=>{e.type="error",e.content=v.data.error})}function p(){e.gistId=i.gistId,e.type="loading",r(()=>{u()})}p()},Jc=function(e,t,s){e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.loading=!0,e.error="",e.search="";let i="conferences.filterPrefs",o={filters:{status:{ready:!0,expired:!1,removed:!1}},orderBy:"name"},r=loadFilterPrefs(i)||{};e.filters={status:Object.assign({},o.filters.status,r.filters&&r.filters.status||{})},e.orderBy=r.orderBy||o.orderBy,e.watch("orderBy",()=>{saveFilterPrefs(i,{filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(i,{filters:e.filters,orderBy:e.orderBy})},!0),e.removeConference=function(u){if(!u.removing&&confirm(`Are you sure that you want to remove the conference ${u.name}? All the repositories linked to this conference will expire.`)){u.removing=!0;let p=at({title:`Removing ${u.name}...`,date:new Date,body:`The conference ${u.name} is going to be removed.`});e.addToast(p),t.delete(`/api/conferences/${u.conferenceID}`).then(()=>{p.title=`${u.name} is removed.`,p.body=`The conference ${u.name} is removed.`,e.loadConferences()}).catch(()=>{p.title="Unable to remove conference",p.body="Please try again. The conference has not been removed."}).finally(()=>{u.removing=!1})}},e.loadConferences=()=>(e.loading=!0,e.error="",t.get("/api/conferences/").then(u=>{e.conferences=u.data||[]},u=>{e.error="Unable to load your conferences. Please try again."}).finally(()=>{e.loading=!1})),e.loadConferences(),e.conferenceFilter=u=>{if(e.filters.status[u.status]==!1)return!1;let p=e.search.trim().toLowerCase();return!!(!p||(u.name||"").toLowerCase().includes(p)||(u.conferenceID||"").toLowerCase().includes(p))}},xa=function(e,t,s,i){e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/");let o=()=>{for(let[m,b,E]of[["startDate","Starts","startDate"],["endDate","Ends","endDate"]]){let S=document.getElementById(m);if(!S)continue;let N=S.parentElement.querySelector(":scope > .date-echo");N||(N=document.createElement("p"),N.className="date-echo",N.setAttribute("aria-live","polite"),S.insertAdjacentElement("afterend",N));let w=Sa(e.options?.[E]);N.textContent=w?b+" "+w:"",N.hidden=!w}};typeof e.watchGroup=="function"&&e.watchGroup(["options.startDate","options.endDate"],()=>We(o));let r=(m=20)=>{let b=document.querySelector("input#name.form-control"),E=document.querySelector("input#conferenceID.form-control");E&&(E.placeholder="e.g. ICSE27"),b?b.placeholder="e.g. ICSE 2027":m>0&&setTimeout(()=>r(m-1),50)};setTimeout(()=>r(),0),e.plans=[],e.plansLoaded=!1,e.conferenceBilling=null,Qi(t).then(m=>{e.conferenceBilling=m.data}).catch(()=>{}),e.conferenceTiers=()=>e.plans.filter(m=>m.id!=="free_conference").map(m=>{let b=(e.conferenceBilling?.plans||[]).find(E=>E.id===m.id)||{};return{...m,storage:m.storagePerRepo,...b,id:m.id,name:m.name}}),e.conferenceAudience=m=>({conference_workshop:"Workshops and small venues",conference:"A typical conference",conference_large:"Large or multi-track venues"})[m]||"",e.conferencePlanName=m=>Xc(m),e.conferenceAmount=(m,b=m?.amount)=>new Intl.NumberFormat(void 0,{style:"currency",currency:m?.currency||"eur",minimumFractionDigits:b%100?2:0,maximumFractionDigits:2}).format(b/100),e.conferenceBytes=m=>{let b=Number(m)||0,E=Math.min(4,Math.floor(Math.log2(Math.max(b,1))/10));return`${new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(b/1024**E)} ${["B","KB","MB","GB","TB"][E]}`},e.editionMode=!1,e.saving=!1,e.error="";function u(){return t.get("/api/conferences/"+i.conferenceId).then(m=>{e.options={...e.options,...m.data,billing:m.data.billing||{}},e.options.startDate=new Date(e.options.startDate),e.options.endDate=new Date(e.options.endDate)})}i.conferenceId&&(e.editionMode=!0,u());function p(){t.get("/api/conferences/plans").then(m=>{e.plans=m.data,e.plansLoaded=!0,!e.editionMode&&e.plans.length&&!e.plans.some(b=>b.id==e.options.plan.planID)&&(e.options.plan.planID=(e.plans.find(b=>b.id==="conference")||e.plans[0]).id),e.plan=e.plans.filter(b=>b.id==e.options.plan.planID)[0]})}p();let c=new Date;c.setDate(1),c.setMonth(c.getMonth()+1);let v=new Date(c);v.setTime(c.getTime()+179*864e5),e.options={billing:{},startDate:c,endDate:v,plan:{planID:"free_conference"},options:{link:!0,image:!0,pdf:!0,notebook:!0,update:!0,page:!0}},e.plan=null,e.watch("options.plan.planID",()=>{e.plan=e.plans.filter(m=>m.id==e.options.plan.planID)[0]});function g(){e.conference.name.setValidity("required",!0),e.conference.conferenceID.setValidity("pattern",!0),e.conference.conferenceID.setValidity("required",!0),e.conference.conferenceID.setValidity("used",!0),e.conference.startDate.setValidity("required",!0),e.conference.startDate.setValidity("invalid",!0),e.conference.endDate.setValidity("required",!0),e.conference.endDate.setValidity("invalid",!0),e.conference.setValidity("error",!0)}function y(m){switch(m){case"conf_name_missing":e.conference.name.setValidity("required",!1);break;case"conf_id_missing":e.conference.conferenceID.setValidity("required",!1);break;case"conf_id_format":e.conference.conferenceID.setValidity("pattern",!1);break;case"conf_id_used":e.conference.conferenceID.setValidity("used",!1);break;case"conf_start_date_missing":e.conference.startDate.setValidity("required",!1);break;case"conf_end_date_missing":e.conference.endDate.setValidity("required",!1);break;case"conf_start_date_invalid":e.conference.startDate.setValidity("invalid",!1);break;case"conf_end_date_invalid":e.conference.endDate.setValidity("invalid",!1);break;default:e.conference.setValidity("error",!1);break}}e.submit=function(){if(e.saving)return;e.saving=!0,e.error="";let m=JSON.parse(JSON.stringify(e.options)),b=at({title:`Creating ${m.name}...`,date:new Date,body:`The conference ${m.conferenceID} is in creation.`});e.editionMode&&(b.title=`Updating ${m.name}...`,b.body=`The conference '${m.conferenceID}' is updating.`),e.addToast(b),g(),t.post("/api/conferences/"+(e.editionMode?m.conferenceID:""),m).then(()=>{e.editionMode?(b.title=`${m.name} updated`,b.body=`The conference '${m.conferenceID}' is updated.`):(b.title=`${m.name} created`,b.body=`The conference '${m.conferenceID}' is created.`),s.url("/conference/"+m.conferenceID)},E=>{y(E.data?.error),e.error="Unable to save the conference. Please correct any highlighted fields and try again.",e.removeToast(b)}).finally(()=>{e.saving=!1})}};function Xc(e){return{free_conference:"Free (no longer offered to new conferences)",conference_workshop:"Workshop package",conference:"Conference package",conference_large:"Large conference package",premium_conference:"Premium (legacy)",unlimited_conference:"Unlimited (legacy)"}[e]||e||"Free"}var Qc=function(e,t,s,i){Zi(e,t,()=>p(),{confirmedMessage:"Payment status checked. Your conference is ready for submissions once payment is confirmed."}),e.conferencePlanName=c=>Xc(c),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conference=null,e.search="",e.filters={status:{ready:!0,preparing:!0,error:!0,expired:!0,removed:!1}},e.orderBy="-anonymizeDate";let o=er,r=["ready","preparing","error","expired","removed"],u={current:c=>c!=="removed",attention:c=>c==="error",removed:c=>c==="removed"};e.confView=()=>Object.keys(u).find(c=>r.every(v=>u[c](v)===(e.filters.status[v]!==!1)))||"custom",e.setConfView=c=>{r.forEach(v=>{e.filters.status[v]=(u[c]||u.current)(v)})},e.confCount=c=>(e.conference?.repositories||[]).filter(v=>u[c](o(v.status))).length,e.copyingId=null,e.copyRepoLink=async c=>{if(!c?.repoId||e.copyingId)return;let v=new URL("/r/"+c.repoId+"/",window.location.origin).href;e.copyingId=c.repoId;try{await Qa(v),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:v})}finally{e.copyingId=null}},e.extendingId=null,e.extendRepo=c=>{!c?.repoId||e.extendingId||(e.extendingId=c.repoId,t.post("/api/repo/"+c.repoId+"/extend").then(v=>{let g=v?.data?.expirationDate?` until ${new Date(v.data.expirationDate).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}`:"";e.addToast({title:`${c.repoId} is extended.`,body:`Reviewers can open it again${g}.`}),c.status="ready",v?.data?.expirationDate&&(c.options={...c.options||{},expirationDate:v.data.expirationDate}),e.extendingId=null},v=>{let g=v?.status||v?.data?.status;e.addToast({title:`Couldn't extend ${c.repoId}.`,body:g===401||g===403?"Only the repository's authors can extend this link. Ask them to extend it from My work.":"Try again in a moment."}),e.extendingId=null}))},e.repoFiler=c=>{if(e.filters.status[o(c.status)]==!1)return!1;let v=e.search.trim().toLowerCase();return!!(!v||(c.source?.fullName||"").toLowerCase().includes(v)||(c.repoId||"").toLowerCase().includes(v))};function p(){t.get("/api/conferences/"+i.conferenceId).then(c=>{e.conference=c.data})}p()},Zc=function(e,t){e.notificationEmail="",e.emailSaved=!1,e.saveNotificationEmail=async()=>{e.busy=!0,e.emailSaved=!1,e.connectionError="";try{let s=await t.post("/github/connections/email",{email:e.notificationEmail},{headers:{"X-CSRF-Token":e.connections.csrf}});e.notificationEmail=s.data.notificationEmail,e.user&&(e.user.notificationEmail=s.data.notificationEmail),e.emailSaved=!0}catch(s){e.connectionError=s.data?.error||"Unable to save email address."}finally{e.busy=!1}},e.connections=null,e.connectionError="",e.busy=!1,e.loadConnections=()=>t.get("/github/connections").then(s=>{e.connections=s.data,e.notificationEmail=s.data.notificationEmail||""}).catch(s=>{e.connectionError=s.data?.error||"Unable to load connections."}),e.changeConnection=async(s,i,o)=>{e.busy=!0,e.connectionError="";try{let r=await t.post("/github/connections/migrate",{type:s.type,id:s.id,connection:i,preview:o},{headers:{"X-CSRF-Token":e.connections.csrf}});o?s.eligible=r.data.eligible:await e.loadConnections()}catch(r){e.connectionError=r.data?.error||"Unable to change connection."}finally{e.busy=!1}},e.disconnectOAuth=async()=>{e.busy=!0;try{await t.post("/github/connections/disconnect-oauth",{},{headers:{"X-CSRF-Token":e.connections.csrf}}),await e.loadConnections()}catch(s){e.connectionError=s.data?.error||"Unable to disconnect OAuth."}finally{e.busy=!1}},e.loadConnections()},xc=function(e,t){e.accountRecovery=!1,t.get("/github/account-recovery").then(s=>{e.accountRecovery=s.data.required}).catch(()=>{})};typeof document<"u"&&document.addEventListener("scroll",e=>{let t=e.target;!t||!t.classList||!t.classList.contains("repo-picker-list")||t.classList.toggle("is-end",t.scrollTop+t.clientHeight>=t.scrollHeight-2)},!0);var ep=[{path:"/review-link",template:"partials/reviewConsent.htm",title:"Artifact consent \u2013 Anonymous GitHub",setup:(e,t)=>dl(e,t)},{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Zc(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>xc(e,t.http)},{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>jc(e,t.http,t.location,t.window,t.timeout)},{path:"/dashboard",template:"partials/dashboard.htm",title:"Your anonymizations \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Gc(e,t.http,t.location,t.promises,t.window,t.quotaService)},{path:"/pr-dashboard",redirect:"/dashboard"},{path:"/anonymize/:repoId?",template:"partials/anonymize.htm",title:"New anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>mr(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/pull-request-anonymize/:pullRequestId?",template:"partials/anonymize.htm",title:"Anonymize a pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>mr(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/gist-anonymize/:gistId?",template:"partials/anonymize.htm",title:"Anonymize a gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>mr(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/status/:repoId",template:"partials/status.htm",title:"Repository status \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Wc(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Jc(e,t.http,t.location)},{path:"/conference/new",template:"partials/newConference.htm",title:"New conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>xa(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId/edit",template:"partials/newConference.htm",title:"Edit conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>xa(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId",template:"partials/conference.htm",title:"Conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Qc(e,t.http,t.location,t.params)},{path:"/faq",template:"partials/faq.htm",title:"FAQ \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Bc(e,t.http)},{path:"/profile",template:"partials/profile.htm",title:"Your settings \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>zc(e,t.http,t.translate,t.timeout,t.quotaService)},{path:"/claim",template:"partials/claim.htm",title:"Claim an anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Hc(e,t.http,t.location)},{path:"/pr/:pullRequestId/:path(.*)*",template:"partials/pullRequest.htm",title:"Anonymous pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Kc(e,t.http,t.location,t.params,t.html)},{path:"/gist/:gistId/:path(.*)*",template:"partials/gist.htm",title:"Anonymous gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yc(e,t.http,t.location,t.params,t.html)},{path:"/r/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Za(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/repository/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Za(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/admin/",template:"partials/admin/overview.htm",title:"Admin \xB7 Overview \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Xu(e,t.http,t.location,t.interval)},{path:"/admin/repositories",template:"partials/admin/repositories.htm",title:"Admin \xB7 Repositories \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>ju(e,t.http,t.location)},{path:"/admin/users",template:"partials/admin/users.htm",title:"Admin \xB7 Users \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Gu(e,t.http,t.location)},{path:"/admin/users/:username",template:"partials/admin/user.htm",title:"Admin \xB7 User details \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Wu(e,t.http,t.location,t.params)},{path:"/admin/conferences",template:"partials/admin/conferences.htm",title:"Admin \xB7 Conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ku(e,t.http,t.location)},{path:"/admin/emails",template:"partials/admin/emails.htm",title:"Admin \xB7 Emails \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>xu(e,t.http,t.location)},{path:"/admin/billing",template:"partials/admin/billing.htm",title:"Admin \xB7 Billing \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Zu(e,t.http,t.location)},{path:"/admin/queues",template:"partials/admin/queues.htm",title:"Admin \xB7 Queues \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yu(e,t.http,t.location,t.interval,t.timeout)},{path:"/admin/errors",template:"partials/admin/errors.htm",title:"Admin \xB7 Errors \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ju(e,t.http,t.location,t.interval)},{path:"/404",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",preserveExplorer:!1,setup:()=>{}},{path:"/:pathMatch(.*)*",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",setup:()=>{}}];var Pv={class:"container paper-page admin-page overview-page emails-page"},Dv={class:"email-overview-toolbar"},Av={class:"seg-filter",role:"group","aria-label":"History period"},Iv=["aria-pressed","onClick"],Ov={class:"email-refresh"},Mv={key:0},Vv=["disabled"],qv={key:0,class:"email-state email-state-error",role:"alert"},Lv=["aria-busy"],$v={class:"ov-kpi-card"},_v={class:"ov-kpi-value"},Fv={class:"ov-kpi-card"},Uv={class:"ov-kpi-value"},Bv={class:"ov-kpi-card"},zv={class:"ov-kpi-card"},Hv={class:"ov-kpi-value"},jv={class:"ov-kpi-sub"},Gv={key:1,class:"ov-chart-card email-chart","aria-label":"Email activity by day"},Wv={class:"ov-chart-head"},Kv={class:"ov-chart-title"},Yv={class:"email-muted"},Jv={class:"email-chart-plot"},Xv={class:"email-axis"},Qv={class:"email-bars"},Zv=["aria-label","title"],xv={class:"email-chart-dates"},ey={key:0},ty={class:"email-chart-data"},ny={class:"email-data-scroll"},oy={scope:"row"},sy={"aria-labelledby":"email-history-title",class:"email-history"},iy={class:"email-section-head"},ry={class:"email-muted"},ay={class:"email-search"},ly={class:"email-status-tabs",role:"group","aria-label":"Outcome filter"},dy=["aria-pressed","onClick"],uy={class:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true"},cy={key:0,class:"email-state email-state-error",role:"alert"},py=["disabled"],fy={key:1,class:"email-state"},my={key:2,class:"email-state"},hy={key:3,class:"email-footer email-pager-top"},gy=["disabled"],vy=["disabled"],yy=["aria-busy"],by={class:"email-table",role:"table"},wy={role:"rowgroup"},ky={class:"email-recipient",role:"cell"},Cy=["title"],Sy={class:"email-result",role:"cell"},Ey={key:0,class:"email-http"},Ny={class:"email-type",role:"cell"},Ry={class:"email-attempted",role:"cell"},Ty=["datetime","title"],Py={class:"email-expand",role:"cell"},Dy=["aria-expanded","aria-controls","aria-label","onClick"],Ay={"aria-hidden":"true"},Iy={key:0,class:"email-expanded",role:"row"},Oy={colspan:"5",role:"cell"},My=["id","aria-label"],Vy={class:"email-detail-heading"},qy={class:"email-explanation"},Ly={class:"email-detail-grid"},$y=["onClick"],_y=["onClick"],Fy=["onClick"],Uy=["onClick"],By={key:0,class:"email-copy-feedback"},zy={key:5,class:"email-footer"},Hy=["disabled"],jy=["disabled"];function tp(e,t){return a(),l("div",Pv,[t[43]||(t[43]=ke('
Admin \xA0/\xA0 Emails

Emails

',2)),n("div",Dv,[n("div",Av,[(a(),l(V,null,Q([{id:"7d",label:"7 days"},{id:"30d",label:"30 days"},{id:"90d",label:"90 days"},{id:"all",label:"All time"}],s=>n("button",{key:s.id,class:R(["seg-chip",{active:e.emailPeriod===s.id}]),"aria-pressed":e.emailPeriod===s.id,onClick:i=>{e.emailPeriod=s.id,e.applyEmailFilters()}},d(s.label),11,Iv)),64))]),n("button",{class:"email-detail-button email-jump",onClick:t[0]||(t[0]=s=>e.jumpToEmailHistory())},"Search email history \u2193"),n("div",Ov,[e.emailUpdated?(a(),l("span",Mv,"History updated "+d(e.emailShortTime(e.emailUpdated)),1)):f("v-if",!0),n("button",{class:"btn btn-sm",disabled:e.emailLoading||e.emailSummaryLoading,onClick:t[1]||(t[1]=s=>e.refreshEmails())},"Refresh",8,Vv)])]),t[44]||(t[44]=n("p",{class:"email-basis"},"Recorded sending attempts \xB7 Provider acceptance does not confirm inbox delivery.",-1)),e.emailSummaryError?(a(),l("div",qv,[h(d(e.emailSummaryError)+" ",1),n("button",{class:"btn btn-sm",onClick:t[2]||(t[2]=s=>e.loadEmailSummary())},"Retry summary")])):f("v-if",!0),n("section",{class:"ov-kpi-row email-kpis","aria-label":"Email summary","aria-busy":e.emailSummaryLoading},[n("div",$v,[t[14]||(t[14]=n("div",{class:"ov-kpi-label"},"Recorded attempts",-1)),n("div",_v,d(e.emailSummary?e.emailSummary.total.toLocaleString():"\u2014"),1),t[15]||(t[15]=n("div",{class:"ov-kpi-sub"},"Selected period, search and type",-1))]),n("div",Fv,[t[16]||(t[16]=n("div",{class:"ov-kpi-label"},"Accepted by provider",-1)),n("div",Uv,d(e.emailSummary?e.emailSummary.counts.accepted.toLocaleString():"\u2014"),1),t[17]||(t[17]=n("div",{class:"ov-kpi-sub"},"Delivery unverified",-1))]),n("div",Bv,[t[18]||(t[18]=n("div",{class:"ov-kpi-label"},"Rejected",-1)),n("div",{class:R(["ov-kpi-value",{"email-error-text":e.emailSummary?.counts.rejected}])},d(e.emailSummary?e.emailSummary.counts.rejected.toLocaleString():"\u2014"),3),t[19]||(t[19]=n("div",{class:"ov-kpi-sub"},"Provider returned an error",-1))]),n("div",zv,[t[20]||(t[20]=n("div",{class:"ov-kpi-label"},"Unconfirmed",-1)),n("div",Hv,d(e.emailSummary?(e.emailSummary.counts.unknown+e.emailSummary.counts.sending).toLocaleString():"\u2014"),1),n("div",jv,d(e.emailSummary?e.emailSummary.counts.unknown:"\u2014")+" unknown \xB7 "+d(e.emailSummary?e.emailSummary.counts.sending:"\u2014")+" pending",1)])],8,Lv),e.emailSummary?(a(),l("section",Gv,[n("div",Wv,[n("h2",Kv,[t[21]||(t[21]=h("Sending activity ",-1)),n("span",Yv,"\xB7 "+d(e.emailSummary.chartDays)+" days \xB7 UTC",1)]),t[22]||(t[22]=n("div",{class:"email-legend"},[n("span",{class:"email-outcome email-outcome-accepted"},"Accepted"),n("span",{class:"email-outcome email-outcome-rejected"},"Rejected"),n("span",{class:"email-outcome email-outcome-unknown"},"Unconfirmed")],-1))]),n("div",Jv,[n("div",Xv,[n("span",null,d(e.emailChartMax()),1),t[23]||(t[23]=n("span",null,"0",-1))]),n("div",Qv,[(a(!0),l(V,null,Q(e.emailSummary.series,s=>(a(),l("div",{key:s.date,class:"email-bar-column","aria-label":e.emailDayLabel(s)+": "+s.accepted+" accepted, "+s.rejected+" rejected, "+(s.unknown+s.sending)+" unconfirmed",title:e.emailDayLabel(s)+": "+e.emailDayTotal(s)+" attempts"},[n("div",{class:"email-bar-stack",style:Ae({height:Math.max(1,e.emailDayTotal(s)/e.emailChartMax()*100)+"%"})},[n("i",{class:"email-bar-accepted",style:Ae({flexGrow:s.accepted})},null,4),n("i",{class:"email-bar-rejected",style:Ae({flexGrow:s.rejected})},null,4),n("i",{class:"email-bar-unknown",style:Ae({flexGrow:s.unknown+s.sending})},null,4)],4)],8,Zv))),128))])]),n("div",xv,[n("span",null,d(e.emailDayLabel(e.emailSummary.series[0])),1),e.emailChartTotal()?f("v-if",!0):(a(),l("span",ey,"No recorded activity in these "+d(e.emailSummary.chartDays)+" days",1)),n("span",null,d(e.emailDayLabel(e.emailSummary.series[e.emailSummary.series.length-1])),1)]),n("details",ty,[t[26]||(t[26]=n("summary",null,"View daily counts",-1)),n("div",ny,[n("table",null,[t[24]||(t[24]=n("caption",{class:"sr-only"},"Daily sending attempts in UTC",-1)),t[25]||(t[25]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Date"),n("th",{scope:"col"},"Accepted"),n("th",{scope:"col"},"Rejected"),n("th",{scope:"col"},"Unknown"),n("th",{scope:"col"},"Pending")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q(e.emailSummary.series,s=>(a(),l("tr",{key:s.date},[n("th",oy,d(e.emailDayLabel(s)),1),n("td",null,d(s.accepted),1),n("td",null,d(s.rejected),1),n("td",null,d(s.unknown),1),n("td",null,d(s.sending),1)]))),128))])])])])])):f("v-if",!0),n("section",sy,[n("div",iy,[t[27]||(t[27]=n("h2",{id:"email-history-title",tabindex:"-1"},"Email history",-1)),n("span",ry,"Newest first \xB7 "+d(e.emailTimezone),1)]),n("form",{class:"email-toolbar",onSubmit:t[7]||(t[7]=de(s=>e.applyEmailFilters(),["prevent"])),"aria-label":"Filter email history"},[n("label",ay,[t[28]||(t[28]=h("Search attempts",-1)),P(n("input",{class:"form-control","onUpdate:modelValue":t[3]||(t[3]=s=>e.emailSearch=s),type:"search",maxlength:"200",placeholder:"Search recipients or IDs","aria-describedby":"email-search-help"},null,512),[[ot,e.emailSearch]])]),n("label",null,[t[30]||(t[30]=h("Email type",-1)),P(n("select",{class:"form-control","onUpdate:modelValue":t[4]||(t[4]=s=>e.emailKind=s),onChange:t[5]||(t[5]=s=>e.applyEmailFilters())},[...t[29]||(t[29]=[n("option",{value:""},"All email types",-1),n("option",{value:"repository-expiration"},"Repository expiration",-1),n("option",{value:"owner-access"},"GitHub access",-1)])],544),[[Rt,e.emailKind]])]),t[31]||(t[31]=n("button",{class:"btn",type:"submit"},"Search",-1)),e.hasEmailFilters()?(a(),l("button",{key:0,class:"btn",type:"button",onClick:t[6]||(t[6]=s=>e.clearEmailFilters())},"Clear")):f("v-if",!0)],32),t[42]||(t[42]=n("p",{id:"email-search-help",class:"email-search-help"},"Search part of a recipient address, or an exact attempt, owner or resource ID.",-1)),n("div",ly,[(a(),l(V,null,Q(["","accepted","rejected","unknown","sending"],s=>n("button",{key:s,class:R({active:e.emailState===s}),"aria-pressed":e.emailState===s,onClick:i=>e.setEmailStatus(s)},[h(d(s?e.emailStatusLabel(s):"All attempts")+" ",1),n("span",null,d(e.emailSummary?(s?e.emailSummary.counts[s]:e.emailSummary.total).toLocaleString():"\u2014"),1)],10,dy)),64))]),n("p",uy,d(e.emailAnnouncement)+" "+d(e.emailCopyMessage),1),e.emailError?(a(),l("div",cy,[n("span",null,d(e.emailError),1),n("button",{class:"btn btn-sm",disabled:e.emailLoading,onClick:t[8]||(t[8]=s=>e.retryEmails())},"Retry",8,py)])):f("v-if",!0),e.emailLoading&&!e.emailRows.length?(a(),l("p",fy,"Loading email history\u2026")):f("v-if",!0),!e.emailLoading&&!e.emailError&&!e.emailRows.length?(a(),l("div",my,[n("p",null,d(e.hasEmailFilters()?"No attempts match these filters. Try another recipient or a wider period.":"No attempts recorded in this period."),1),e.hasEmailFilters()?(a(),l("button",{key:0,class:"btn btn-sm",onClick:t[9]||(t[9]=s=>e.clearEmailFilters())},"Clear filters")):f("v-if",!0)])):f("v-if",!0),e.emailRows.length?(a(),l("div",hy,[n("span",null,[h(d((e.emailPage-1)*25+1)+"\u2013"+d(Math.min(e.emailPage*25,e.emailRows.length)),1),e.emailTotal()!=null?(a(),l(V,{key:0},[h(" of "+d(e.emailTotal().toLocaleString()),1)],64)):f("v-if",!0),t[32]||(t[32]=h(" attempts",-1))]),n("div",null,[n("button",{class:"btn btn-sm",disabled:e.emailPage===1||e.emailLoading,onClick:t[10]||(t[10]=s=>e.emailPreviousPage())},"Previous",8,gy),n("button",{class:"btn btn-sm",disabled:e.emailLoading||!e.emailNextCursor&&e.emailPage*25>=e.emailRows.length,onClick:t[11]||(t[11]=s=>e.emailNextPage())},"Next",8,vy)])])):f("v-if",!0),e.emailRows.length?(a(),l("div",{key:4,class:"email-table-wrap","aria-busy":e.emailLoading},[n("table",by,[t[40]||(t[40]=n("caption",{class:"sr-only"},"Recorded email attempts. Expand a row for identifiers and outcome details.",-1)),t[41]||(t[41]=n("thead",{role:"rowgroup"},[n("tr",{role:"row"},[n("th",{scope:"col"},"Recipient"),n("th",{scope:"col"},"Outcome"),n("th",{scope:"col"},"Email type"),n("th",{scope:"col"},"Attempted"),n("th",{scope:"col"},[n("span",{class:"sr-only"},"Details")])])],-1)),n("tbody",wy,[(a(!0),l(V,null,Q(e.emailVisibleRows(),s=>(a(),l(V,{key:s._id},[n("tr",{role:"row",class:R({"email-selected":e.selectedEmailId===s._id})},[n("td",ky,[n("span",{title:s.recipient},d(s.recipient),9,Cy)]),n("td",Sy,[n("span",{class:R(["email-outcome","email-outcome-"+s.state])},d(e.emailStatusLabel(s.state)),3),s.httpStatus?(a(),l("small",Ey,d(s.httpStatus),1)):f("v-if",!0)]),n("td",Ny,d(e.emailKindLabel(s.kind)),1),n("td",Ry,[n("time",{datetime:s.createdAt,title:e.emailTime(s.createdAt)},d(e.emailShortTime(s.createdAt)),9,Ty)]),n("td",Py,[n("button",{class:"email-detail-button","aria-expanded":e.selectedEmailId===s._id,"aria-controls":"detail-"+s._id,"aria-label":(e.selectedEmailId===s._id?"Close":"View")+" details for "+s.recipient,onClick:i=>e.toggleEmail(s)},[h(d(e.selectedEmailId===s._id?"Close":"Details")+" ",1),n("span",Ay,d(e.selectedEmailId===s._id?"\u2212":"+"),1)],8,Dy)])],2),e.selectedEmailId===s._id?(a(),l("tr",Iy,[n("td",Oy,[n("section",{id:"detail-"+s._id,"aria-label":"Attempt details for "+s.recipient},[n("div",Vy,[t[33]||(t[33]=n("h3",null,"Attempt details",-1)),n("span",{class:R(["email-outcome","email-outcome-"+s.state])},d(e.emailStatusLabel(s.state)),3)]),n("p",qy,d(e.emailExplanation(s)),1),n("dl",Ly,[n("div",null,[t[34]||(t[34]=n("dt",null,"Recipient",-1)),n("dd",null,[h(d(s.recipient)+" ",1),n("button",{class:"email-copy",onClick:i=>e.copyEmail(s.recipient),"aria-label":"Copy recipient"},d(e.emailCopiedValue===s.recipient?"Copied":"Copy"),9,$y)])]),n("div",null,[t[35]||(t[35]=n("dt",null,"Provider response",-1)),n("dd",null,d(s.httpStatus?"HTTP "+s.httpStatus:"No HTTP response recorded"),1)]),n("div",null,[t[36]||(t[36]=n("dt",null,"Attempted",-1)),n("dd",null,d(e.emailTime(s.createdAt)),1)]),n("div",null,[t[37]||(t[37]=n("dt",null,"Completed",-1)),n("dd",null,d(e.emailTime(s.completedAt)),1)]),n("div",null,[t[38]||(t[38]=n("dt",null,"Attempt ID",-1)),n("dd",null,[n("code",null,d(s._id),1),n("button",{class:"email-copy",onClick:i=>e.copyEmail(s._id),"aria-label":"Copy attempt ID"},d(e.emailCopiedValue===s._id?"Copied":"Copy"),9,_y)])]),n("div",null,[t[39]||(t[39]=n("dt",null,"Owner ID",-1)),n("dd",null,[n("code",null,d(s.ownerId),1),n("button",{class:"email-copy",onClick:i=>e.copyEmail(s.ownerId),"aria-label":"Copy owner ID"},d(e.emailCopiedValue===s.ownerId?"Copied":"Copy"),9,Fy)])]),n("div",null,[n("dt",null,"Resource \xB7 "+d(s.resourceKind),1),n("dd",null,[n("code",null,d(s.resourceId),1),n("button",{class:"email-copy",onClick:i=>e.copyEmail(s.resourceId),"aria-label":"Copy resource ID"},d(e.emailCopiedValue===s.resourceId?"Copied":"Copy"),9,Uy)])])]),e.emailCopyMessage&&e.emailCopyMessage!=="Copied."?(a(),l("p",By,d(e.emailCopyMessage),1)):f("v-if",!0)],8,My)])])):f("v-if",!0)],64))),128))])])],8,yy)):f("v-if",!0),e.emailRows.length?(a(),l("div",zy,[n("span",null,[h("Page "+d(e.emailPage),1),e.emailPageCount()?(a(),l(V,{key:0},[h(" of "+d(e.emailPageCount()),1)],64)):f("v-if",!0),h(" \xB7 "+d(e.emailTotal()==null?e.emailRows.length+" loaded":e.emailTotal().toLocaleString()+" attempts"),1)]),n("div",null,[n("button",{class:"btn btn-sm",disabled:e.emailPage===1||e.emailLoading,onClick:t[12]||(t[12]=s=>e.emailPreviousPage())},"Previous",8,Hy),n("button",{class:"btn btn-sm",disabled:e.emailLoading||!e.emailNextCursor&&e.emailPage*25>=e.emailRows.length,onClick:t[13]||(t[13]=s=>e.emailNextPage())},"Next",8,jy)])])):f("v-if",!0)]),t[45]||(t[45]=n("details",{class:"email-about"},[n("summary",null,"What this history records"),n("p",null,"New sending attempts only; older sends are not backfilled. Accepted means the provider accepted the request, not that it reached the inbox. Check pending or unknown outcomes in Resend before considering another send. Audit storage failures can leave this history incomplete.")],-1))])}var Gy={class:"container py-4",style:{"max-width":"48rem","overflow-wrap":"anywhere"}},Wy={key:0},Ky={key:1,role:"alert"},Yy={key:2,role:"status"},Jy={key:0},Xy={key:1},Qy=["disabled"],Zy=["disabled"],xy=["disabled"],eb={key:5,class:"mt-4","aria-labelledby":"review-policy-title"},tb={id:"review-policy-title"},ob={key:0,role:"alert"},sb=["disabled"],ib=["disabled"],rb=["disabled"],ab={key:6,role:"status"};function np(e,t){return a(),l("section",Gy,[t[12]||(t[12]=n("a",{href:"/"},"Anonymous GitHub",-1)),t[13]||(t[13]=n("h1",{class:"mt-3"},"Approve artifact access",-1)),t[14]||(t[14]=n("p",null,"This records your approval as the repository owner or an authorized co-author.",-1)),e.user?.username?f("v-if",!0):(a(),l("p",Wy,[...t[6]||(t[6]=[h("Sign in first, then reopen the artifact link from your submission. ",-1),n("a",{href:"/signin"},"Sign in",-1)])])),e.error?(a(),l("p",Ky,d(e.error),1)):f("v-if",!0),e.saved?(a(),l("p",Yy,[t[7]||(t[7]=h("Consent recorded. ",-1)),e.handoffEnabled?(a(),l("span",Jy,"Continue to review to finish linking.")):(a(),l("span",Xy,"Artifact linking is not complete. Return to your submission to check its status."))])):f("v-if",!0),e.saved&&e.handoffEnabled?(a(),l("button",{key:3,class:"btn btn-primary",type:"button",onClick:t[0]||(t[0]=(...s)=>e.continueReview&&e.continueReview(...s)),disabled:e.busy},"Continue to review",8,Qy)):f("v-if",!0),e.user?.username&&!e.saved?(a(),l("form",{key:4,onSubmit:t[2]||(t[2]=de((...s)=>e.loadPreview&&e.loadPreview(...s),["prevent"]))},[t[8]||(t[8]=n("label",{for:"review-repository"},"Anonymous repository ID",-1)),P(n("input",{id:"review-repository",class:"form-control","onUpdate:modelValue":t[1]||(t[1]=s=>e.repositoryId=s),maxlength:"128",autocomplete:"off",disabled:e.busy||e.uncertain,"aria-describedby":"review-repository-help"},null,8,Zy),[[ot,e.repositoryId]]),t[9]||(t[9]=n("p",{id:"review-repository-help"},"Use the ID after /r/ in the anonymous repository URL.",-1)),n("button",{type:"submit",class:"btn btn-primary",disabled:e.busy||e.uncertain},"Preview access and retention",8,xy)],32)):f("v-if",!0),e.preview&&!e.saved?(a(),l("section",eb,[n("h2",tb,d(e.preview.repositoryName),1),n("p",null,"Access: "+d(e.preview.policy.access==="anonymous-link"?"Anyone with the anonymous link":"Restricted review access")+".",1),n("p",null,"Retain until "+d(e.preview.policy.retainUntil)+". Policy version "+d(e.preview.policy.version)+".",1),e.expired?(a(),l("p",ob,"This preview expired. Open a new artifact link from your submission.")):f("v-if",!0),n("div",null,[n("label",null,[P(n("input",{type:"checkbox","onUpdate:modelValue":t[3]||(t[3]=s=>e.acceptAccess=s),disabled:e.busy||e.uncertain||e.expired},null,8,sb),[[la,e.acceptAccess]]),t[10]||(t[10]=h(" I approve the access policy above.",-1))])]),n("div",null,[n("label",null,[P(n("input",{type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=s=>e.acceptRetention=s),disabled:e.busy||e.uncertain||e.expired},null,8,ib),[[la,e.acceptRetention]]),t[11]||(t[11]=h(" I approve retention until the date above.",-1))])]),n("button",{class:"btn btn-primary",type:"button",onClick:t[5]||(t[5]=(...s)=>e.confirmConsent&&e.confirmConsent(...s)),disabled:e.busy||e.expired||!e.acceptAccess||!e.acceptRetention},d(e.uncertain?"Retry confirmation":"Confirm consent"),9,rb)])):f("v-if",!0),e.busy?(a(),l("p",ab,"Waiting for the server\u2026")):f("v-if",!0)])}var lb={class:"container paper-page connections-page"},db={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},ub={key:1,role:"status"},cb=["disabled"],pb={key:3},fb={key:0,class:"connection-resources"},mb=["disabled"],hb=["disabled"],gb={key:0,role:"status"},vb={class:"connections-grid"},yb={key:0},bb={class:"connection-title"},wb={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},kb={class:"connection-actions"},Cb={key:0,class:"btn btn-ink",target:"_self",href:"/github/app/install"},Sb=["disabled"],Eb={key:1,class:"connection-installations"},Nb={key:0},Rb=["href"],Tb={class:"sr-only"},Pb={class:"connection-title"},Db={key:0,target:"_self",href:"/github/login",class:"btn btn-outline-ink"},Ab={key:1,class:"connection-revoke"},Ib={key:0},Ob=["disabled"],Mb={class:"connection-resources"},Vb={class:"connection-title"},qb={class:"connection-count"},Lb={key:0,class:"connection-empty"},$b={class:"connection-resource-name"},_b={key:0,class:"connection-resource-actions"},Fb=["disabled","onClick"],Ub=["disabled","onClick"],Bb={key:1,class:"connection-help",role:"status"},zb=["disabled","onClick"];function op(e,t){return a(),l("div",lb,[t[27]||(t[27]=ke('
My work \xA0/\xA0 GitHub connections

GitHub connections

Manage how GitHub shares your code. Your anonymizations and URLs stay the same.

',2)),e.connectionError?(a(),l("p",db,d(e.connectionError),1)):f("v-if",!0),!e.connections&&!e.connectionError?(a(),l("p",ub,"Loading your connections\u2026")):f("v-if",!0),!e.connections&&e.connectionError?(a(),l("button",{key:2,class:"btn btn-outline-ink",disabled:e.busy,onClick:t[0]||(t[0]=s=>e.loadConnections())},"Try again",8,cb)):f("v-if",!0),e.connections?(a(),l("div",pb,[e.connections.emailNotificationsEnabled?(a(),l("section",fb,[t[6]||(t[6]=n("h2",null,"Email alerts",-1)),t[7]||(t[7]=n("p",null,"We will email you if your GitHub connection stops working or a repository becomes inaccessible. Your address is never shown on anonymous pages.",-1)),n("form",{onSubmit:t[2]||(t[2]=de(s=>e.saveNotificationEmail(),["prevent"]))},[t[5]||(t[5]=n("label",{for:"notification-email"},"Email address",-1)),P(n("input",{id:"notification-email",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[1]||(t[1]=s=>e.notificationEmail=s),disabled:e.busy},null,8,mb),[[ot,e.notificationEmail]]),n("button",{class:"btn btn-ink mt-2",type:"submit",disabled:e.busy},"Save email address",8,hb),e.emailSaved?(a(),l("p",gb,"Email address saved.")):f("v-if",!0)],32)])):f("v-if",!0),n("div",vb,[e.connections.appEnabled?(a(),l("section",yb,[t[15]||(t[15]=n("div",{class:"connection-top"},[n("i",{class:"fab fa-github","aria-hidden":"true"}),n("span",{class:"connection-badge"},"Recommended")],-1)),n("div",bb,[t[8]||(t[8]=n("h2",null,"GitHub App",-1)),n("span",{class:R(["connection-status",{"is-connected":e.connections.appConnected&&!e.connections.appError}])},d(e.connections.appError?"Needs attention":e.connections.appConnected?"Connected":"Not connected"),3)]),t[16]||(t[16]=n("p",null,"Read-only access to gists and the repositories you choose.",-1)),e.connections.appError?(a(),l("p",wb,d(e.connections.appError)+". Reconnect to restore access.",1)):f("v-if",!0),n("div",kb,[e.connections.appConnected&&!e.connections.appError?(a(),l("a",Cb,[...t[9]||(t[9]=[h("Manage repository access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0),n("a",{class:R(e.connections.appConnected&&!e.connections.appError?"connection-link":"btn btn-ink"),target:"_self",href:"/github/app/login"},d(e.connections.appConnected?"Reconnect account":"Connect GitHub account"),3),e.connections.appConnected?(a(),l("button",{key:1,class:"connection-link connection-refresh",title:"Refresh access",disabled:e.busy,onClick:t[3]||(t[3]=s=>e.loadConnections())},[...t[10]||(t[10]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),n("span",{class:"sr-only"},"Refresh access",-1)])],8,Sb)):f("v-if",!0)]),t[17]||(t[17]=n("p",{class:"connection-help"},"Choose repositories on GitHub. Organization access may need an administrator's approval.",-1)),e.connections.installations?.length?(a(),l("ul",Eb,[(a(!0),l(V,null,Q(e.connections.installations,s=>(a(),l("li",{key:s.id},[n("div",null,[t[11]||(t[11]=n("span",{class:"connection-label"},"Installed on",-1)),t[12]||(t[12]=h()),n("strong",null,d(s.account),1),s.suspended?(a(),l("span",Nb," \xB7 Suspended")):f("v-if",!0)]),e.connections.installations.length>1?(a(),l("a",{key:0,target:"_self",href:"/github/app/install?installationId="+s.id},[t[13]||(t[13]=h("Manage access ",-1)),n("span",Tb,"for "+d(s.account),1),t[14]||(t[14]=h(" \u2192",-1))],8,Rb)):f("v-if",!0)]))),128))])):f("v-if",!0)])):f("v-if",!0),n("section",null,[t[20]||(t[20]=n("div",{class:"connection-top"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-key"})]),n("span",{class:"connection-badge connection-badge-muted"},"Legacy")],-1)),n("div",Pb,[t[18]||(t[18]=n("h2",null,"GitHub OAuth",-1)),n("span",{class:R(["connection-status",{"is-connected":e.connections.oauthConnected}])},d(e.connections.oauthConnected?"Connected":"Not connected"),3)]),t[21]||(t[21]=n("p",null,"For existing OAuth anonymizations.",-1)),t[22]||(t[22]=n("p",{class:"connection-help"},"This connection uses GitHub's broader repository permissions. Existing work keeps using it until you switch below.",-1)),e.connections.oauthEnabled?(a(),l("a",Db,d(e.connections.oauthConnected?"Reconnect OAuth":"Connect legacy OAuth"),1)):f("v-if",!0),e.connections.oauthConnected?(a(),l("div",Ab,[e.connections.gistCount?(a(),l("p",Ib,d(e.connections.gistCount)+" gist(s) use your GitHub App connection when available.",1)):f("v-if",!0),t[19]||(t[19]=n("p",null,"Switch all dependent repositories before revoking access. Gists can use your GitHub App connection.",-1)),e.connections.appConnected?(a(),l("button",{key:1,class:"btn btn-sm btn-outline-danger connection-danger",disabled:e.busy||e.connections.resources.some(s=>s.connection==="oauth"),onClick:t[4]||(t[4]=s=>e.disconnectOAuth())},"Revoke OAuth access",8,Ob)):f("v-if",!0)])):f("v-if",!0)])]),n("section",Mb,[n("div",Vb,[t[23]||(t[23]=n("h2",null,"Repository connections",-1)),n("span",qb,d(e.connections.resources?.length||0)+" "+d((e.connections.resources?.length||0)===1?"resource":"resources"),1)]),t[25]||(t[25]=n("p",null,"Check access, then switch each resource to the GitHub App. After reinstalling the App, reconnect existing resources here to keep their anonymous URLs and published snapshots.",-1)),e.connections.resources?.length?f("v-if",!0):(a(),l("div",Lb,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),n("div",null,[n("h3",null,"No repository connections yet"),n("p",null,"Your repositories and pull requests will appear here once you anonymize them.")],-1),n("a",{class:"connection-link",href:"/anonymize"},"New anonymization \u2192",-1)])])),(a(!0),l(V,null,Q(e.connections.resources,s=>(a(),l("div",{class:"connection-resource",key:s.type+s.id},[n("div",$b,[n("strong",null,d(s.name||s.id),1),n("small",null,d(s.type)+" \xB7 "+d(s.id),1)]),n("span",{class:R(["connection-badge",{"connection-badge-muted":s.connection==="oauth"}])},d(s.connection==="github-app"?"Read-only App":"Legacy OAuth"),3),!["archived","removed","preparing","queue","removing","expiring"].includes(s.status)&&(s.status!=="download"||s.type==="pull-request"&&(!s.statusDate||new Date(s.statusDate).getTime()<=Date.now()-3e5))&&e.connections.appEnabled&&e.connections.appConnected?(a(),l("div",_b,[n("button",{class:"btn btn-outline-ink",disabled:e.busy,onClick:i=>e.changeConnection(s,"github-app",!0)},"Check read-only access",8,Fb),s.eligible?(a(),l("button",{key:0,class:"btn btn-ink",disabled:e.busy,onClick:i=>e.changeConnection(s,"github-app",!1)},d(s.connection==="github-app"?"Reconnect read-only access":"Switch to read-only access"),9,Ub)):f("v-if",!0),s.eligible===!1?(a(),l("span",Bb,"Access unavailable. Allow this repository on GitHub, then check again.")):f("v-if",!0)])):f("v-if",!0),!["archived","removed","preparing","queue","removing","expiring"].includes(s.status)&&(s.status!=="download"||s.type==="pull-request"&&(!s.statusDate||new Date(s.statusDate).getTime()<=Date.now()-3e5))&&s.connection==="github-app"&&e.connections.oauthConnected?(a(),l("button",{key:1,class:"connection-link",disabled:e.busy,onClick:i=>e.changeConnection(s,"oauth",!1)},"Use OAuth",8,zb)):f("v-if",!0)]))),128)),t[26]||(t[26]=n("p",{class:"connection-footnote"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})]),h(" Removing access stops new fetches from GitHub. Published content keeps its current expiration and removal settings.")],-1))])])):f("v-if",!0)])}var Hb={class:"container paper-page auth-page"},jb={class:"auth-layout"},Gb={class:"auth-options"},Wb={key:0},Kb={key:0,class:"btn btn-ink auth-continue",target:"_self",href:"/github/login?recover=1"},Yb={key:1},Jb={key:1,class:"auth-card"},Xb={key:2,class:"auth-legacy"},Qb={key:3,role:"status"};function sp(e,t){let s=Ze("partial-view");return a(),l(V,null,[n("div",Hb,[n("div",jb,[t[4]||(t[4]=ke('
Your research, ready for review

Your code.
Your identity,
protected.
Sign in to GitHub

Sign in to create and manage your anonymizations.

',1)),n("div",Gb,[e.accountRecovery?(a(),l("section",Wb,[t[0]||(t[0]=n("h2",null,"Verify your existing account",-1)),t[1]||(t[1]=n("p",null,"We found an existing account. Verify it with your previous GitHub connection to keep your anonymizations. Future sign-ins will use the GitHub App.",-1)),e.site_options?.GITHUB_OAUTH_ENABLED?(a(),l("a",Kb,"Verify with previous GitHub connection")):(a(),l("p",Yb,"Account verification is currently unavailable. Please try again later."))])):f("v-if",!0),e.site_options?.GITHUB_APP_ENABLED&&!e.accountRecovery?(a(),l("section",Jb,[...t[2]||(t[2]=[ke('

Continue with GitHub

Connect through the GitHub App with read-only repository access.

  • You choose which repositories to share
  • No permission to write to your code
Sign in with GitHubYour existing anonymizations and connections stay with your account.',5)])])):f("v-if",!0),!e.site_options?.GITHUB_APP_ENABLED&&e.site_options?.GITHUB_OAUTH_ENABLED&&!e.accountRecovery?(a(),l("section",Xb,[...t[3]||(t[3]=[n("div",{class:"connection-title"},[n("h2",null,"Continue with GitHub")],-1),n("p",null,"Sign in to access your account. GitHub OAuth includes write access to private repositories.",-1),n("a",{class:"connection-link",target:"_self",href:"/github/login"},[h("Sign in with GitHub "),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-arrow-right"})])],-1)])])):f("v-if",!0),e.site_options&&!e.site_options.GITHUB_APP_ENABLED&&!e.site_options.GITHUB_OAUTH_ENABLED?(a(),l("p",Qb,"GitHub sign-in is currently unavailable. Please try again later.")):f("v-if",!0)])])]),Me(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])],64)}function ip(e,t){let s=Ze("partial-view");return a(),l(V,null,[t[0]||(t[0]=ke('
Error \xB7 404

This link
isn\u2019t here.

The anonymous mirror you\u2019re looking for has expired, been removed by its owner, or never existed. If you received this URL from an author, ask them to re-issue it.

',1)),Me(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])],64)}var Zb={class:"container paper-page admin-page"},xb={class:"seg-bar"},e1={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},t1=["aria-checked"],n1={class:"count"},o1=["aria-checked"],s1={class:"count"},i1=["aria-checked"],r1={class:"count"},a1=["aria-checked"],l1={class:"count"},d1=["aria-checked"],u1={class:"count"},c1=["aria-checked"],p1={class:"count"},f1={class:"seg-countline",role:"status"},m1={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},h1={class:"w-100 admin-filter-toolbar","aria-label":"Conferences","accept-charset":"UTF-8"},g1={class:"admin-filter-row"},v1={class:"search-wrap"},y1={type:"search",class:"form-control",placeholder:"Search conferences\u2026",autocomplete:"off"},b1={key:0,class:"admin-search-hint"},w1={key:1,class:"admin-filter-inline","aria-label":"Pagination"},k1=["disabled"],C1={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},S1=["disabled"],E1={key:0,class:"admin-filter-row"},N1={class:"admin-active-chips"},R1={class:"key"},T1=["onClick"],P1={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},D1={key:0,class:"paper-table-head",role:"row"},A1={role:"columnheader"},I1={role:"columnheader"},O1={role:"columnheader"},M1={class:"paper-table-row",role:"row"},V1={class:"cell-anon",role:"cell"},q1={class:"anon-text"},L1=["textContent","href"],$1={class:"anon-sub"},_1={class:"cell-status",role:"cell"},F1=["textContent"],U1={class:"cell-views num",role:"cell"},B1=["textContent","href"],z1={class:"cell-expires",role:"cell"},H1={class:"cell-actions",role:"cell"},j1={class:"dropdown"},G1={class:"dropdown-menu dropdown-menu-right"},W1=["href"],K1=["href"],Y1=["href"],J1=["onClick"],X1={key:1,class:"paper-table-empty"},Q1={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},Z1={key:0,class:"pagination-compact"},x1=["disabled"],ew=["max"],tw=["disabled"],nw={class:"admin-filter-inline"},ow={class:"form-control form-control-sm"};function rp(e,t){let s=Pe("field"),i=Pe("form");return a(),l("div",Zb,[t[55]||(t[55]=ke('
Admin \xA0/\xA0 Conferences

Conferences

',3)),n("div",xb,[n("div",e1,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[0]||(t[0]=o=>e.setSegView("all"))},[t[14]||(t[14]=h("All ",-1)),n("span",n1,d(e.fmt?.number(e.segCount("all"))),1)],10,t1),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="ready","is-empty":!e.segCount("ready")}]),"aria-checked":e.segView()==="ready",onClick:t[1]||(t[1]=o=>e.setSegView("ready"))},[t[15]||(t[15]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[16]||(t[16]=h("Ready ",-1)),n("span",s1,d(e.fmt?.number(e.segCount("ready"))),1)],10,o1),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="preparing","is-empty":!e.segCount("preparing")}]),"aria-checked":e.segView()==="preparing",onClick:t[2]||(t[2]=o=>e.setSegView("preparing"))},[t[17]||(t[17]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[18]||(t[18]=h("Preparing ",-1)),n("span",r1,d(e.fmt?.number(e.segCount("preparing"))),1)],10,i1),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="error","is-empty":!e.segCount("error")}]),"aria-checked":e.segView()==="error",onClick:t[3]||(t[3]=o=>e.setSegView("error"))},[t[19]||(t[19]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[20]||(t[20]=h("Error ",-1)),n("span",l1,d(e.fmt?.number(e.segCount("error"))),1)],10,a1),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="expired","is-empty":!e.segCount("expired")}]),"aria-checked":e.segView()==="expired",onClick:t[4]||(t[4]=o=>e.setSegView("expired"))},[t[21]||(t[21]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[22]||(t[22]=h("Expired ",-1)),n("span",u1,d(e.fmt?.number(e.segCount("expired"))),1)],10,d1),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="removed","is-empty":!e.segCount("removed")}]),"aria-checked":e.segView()==="removed",onClick:t[5]||(t[5]=o=>e.setSegView("removed"))},[t[23]||(t[23]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[24]||(t[24]=h("Removed ",-1)),n("span",p1,d(e.fmt?.number(e.segCount("removed"))),1)],10,c1)]),n("p",f1,[n("strong",null,d(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[25]||(t[25]=h(" shown",-1))])]),e.fetchError?(a(),l("div",m1,[t[26]||(t[26]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),h(" "+d(e.fetchError),1)])):f("v-if",!0),P((a(),l("form",h1,[n("div",g1,[n("div",v1,[P(n("input",y1,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(a(),l("span",b1,"/"))]),t[30]||(t[30]=n("span",{class:"admin-filter-spacer"},null,-1)),e.total>0?(a(),l("button",{key:0,class:"btn btn-sm",type:"button",onClick:t[6]||(t[6]=o=>e.exportCsv())},[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),h(" Export",-1)])])):f("v-if",!0),e.totalPage>1?(a(),l("span",w1,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[7]||(t[7]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[28]||(t[28]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,k1),n("span",C1,d(e.query?.page)+"/"+d(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[8]||(t[8]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[29]||(t[29]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,S1)])):f("v-if",!0)]),e.chips?.length?(a(),l("div",E1,[n("div",N1,[(a(!0),l(V,null,Q(e.chips,(o,r)=>(a(),l("span",{class:"admin-active-chip",key:o?.key},[n("span",R1,d(o?.label),1),n("span",null,d(o?.value),1),n("button",{type:"button",onClick:u=>e.clearFilter(o.key),"aria-label":"Clear filter"},[...t[31]||(t[31]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,T1)]))),128))])])):f("v-if",!0)])),[[i,e.viewState]]),n("div",P1,[e.total!==0?(a(),l("div",D1,[n("div",A1,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="name"}]),onClick:t[9]||(t[9]=o=>e.sortBy("name"))},[t[33]||(t[33]=h("Conference ",-1)),e.sortIcon("name")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("name")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[32]||(t[32]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",I1,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="status"}]),onClick:t[10]||(t[10]=o=>e.sortBy("status"))},[t[35]||(t[35]=h("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[34]||(t[34]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[38]||(t[38]=n("div",{role:"columnheader",class:"num"},"Repos",-1)),n("div",O1,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="startDate"}]),onClick:t[11]||(t[11]=o=>e.sortBy("startDate"))},[t[37]||(t[37]=h("Window ",-1)),e.sortIcon("startDate")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("startDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[36]||(t[36]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[39]||(t[39]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))])):f("v-if",!0),(a(!0),l(V,null,Q(e.filteredConferences,(o,r)=>(a(),l("div",M1,[n("div",V1,[t[40]||(t[40]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Conference"},[n("use",{href:"#project-icon-conference"})],-1)),n("div",q1,[n("a",{class:"repo-name",textContent:d(o?.name),href:e.safeUrl("/conference/"+o?.conferenceID)},null,8,L1),n("div",$1,[n("span",null,d(o?.conferenceID),1),n("span",null,d(e.fmt?.money(o?.price||0)),1)])])]),n("div",_1,[n("span",{class:R(["status-dot","st-"+(o?.status||"unknown")])},null,2),n("span",{textContent:d(e.fmt?.statusLabel(o?.status))},null,8,F1)]),n("div",U1,[t[41]||(t[41]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),n("a",{title:"Show repositories in this conference",textContent:d(e.fmt?.number(o?.repositories?.length||0)),href:e.safeUrl("/admin/?conference="+o?.conferenceID)},null,8,B1)]),n("div",z1,[t[42]||(t[42]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),h(" "+d(e.fmt?.date(o?.startDate))+" \u2013 "+d(e.fmt?.date(o?.endDate)),1)]),n("div",H1,[n("div",j1,[t[48]||(t[48]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",G1,[n("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+o?.conferenceID+"/edit")},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),h(" Edit",-1)])],8,W1),n("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+o?.conferenceID+"/")},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),h(" View",-1)])],8,K1),n("a",{class:"dropdown-item",href:e.safeUrl("/admin/?conference="+o?.conferenceID)},[...t[45]||(t[45]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),h(" View repositories",-1)])],8,Y1),t[47]||(t[47]=n("div",{class:"dropdown-divider"},null,-1)),P(n("a",{class:"dropdown-item text-danger",href:"#",onClick:de(u=>e.removeConference(o),["prevent"])},[...t[46]||(t[46]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),h(" Remove",-1)])],8,J1),[[Z,o?.status!="removed"]])])])])]))),256)),e.filteredConferences?.length==0?(a(),l("div",X1,[t[49]||(t[49]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),n("span",null,d(e.total?"No conferences match the current filters.":"No conferences yet."),1)])):f("v-if",!0)]),n("div",Q1,[t[54]||(t[54]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",Z1,[n("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[50]||(t[50]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),h(" Previous",-1)])],8,x1),P(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,ew),[[s,{state:e.viewState,set:o=>{e.query.page=o},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+d(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[13]||(t[13]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[51]||(t[51]=[h("Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,tw)])):f("v-if",!0),n("span",nw,[t[53]||(t[53]=n("label",null,"Per page",-1)),P((a(),l("select",ow,[...t[52]||(t[52]=[ke('',5)])])),[[s,{state:e.viewState,set:o=>{e.query.limit=o},value:e.query?.limit,form:null,options:{}}]])])])])}var sw={class:"container paper-page admin-page overview-page errors-page"},iw={class:"error-source-toolbar"},rw={class:"error-source-switch seg-filter",role:"group","aria-label":"Log source"},aw=["aria-pressed"],lw=["aria-pressed"],dw={class:"error-health-strip"},uw={class:"log-state",role:"status","aria-live":"polite"},cw=["disabled"],pw={class:"sr-only"},fw=["aria-busy"],mw={class:"volume-head"},hw=["href"],gw={key:0,class:"log-inspector","aria-labelledby":"log-detail-title"},vw={class:"log-inspector-heading"},yw={class:"log-inspector-eyebrow"},bw={id:"log-detail-title",tabindex:"-1"},ww={key:0},kw={class:"log-facts-strip"},Cw=["datetime"],Sw=["datetime"],Ew={class:"log-detail log-investigation-body",id:"log-detail"},Nw={class:"log-related-main"},Rw={class:"log-correlation-selector",role:"group","aria-label":"Related events correlation"},Tw=["id","aria-label","aria-pressed","onClick"],Pw={class:"log-selector-mark","aria-hidden":"true"},Dw={key:0,class:"log-meta"},Aw={class:"log-correlation-window"},Iw=["aria-busy"],Ow={class:"volume-head"},Mw={key:0,role:"status"},Vw={key:1,class:"log-coverage"},qw={key:2,class:"log-events"},Lw=["datetime","title"],$w={class:"log-timeline-event"},_w={class:"log-timeline-event-title"},Fw={key:0},Uw={key:1},Bw={key:2},zw={key:0,class:"log-request-route"},Hw={key:1,class:"log-error-stack"},jw={key:0},Gw={key:0},Ww={key:1},Kw={key:2},Yw={class:"log-event-fields"},Jw=["onClick"],Xw={class:"log-timeline-scope"},Qw=["href"],Zw={key:1,class:"log-no-trace"},xw={class:"log-evidence"},ek={class:"log-coverage"},tk={class:"log-sample-panel"},nk={class:"log-coverage"},ok={key:0,class:"log-request-route"},sk={key:1,class:"log-reproduction"},ik={key:2,class:"log-error-stack"},rk={key:0},ak={key:1},lk={key:2},dk={class:"log-sample-facts"},uk={key:0},ck={class:"log-detail-identifiers"},pk={key:0},fk={class:"log-value-reveal"},mk=["onClick"],hk={class:"log-all-fields"},gk={class:"log-raw-sample"},vk={class:"log-list-view"},yk={class:"log-query"},bk={key:0},wk=["disabled"],kk={key:0,class:"log-coverage"},Ck={class:"log-local-filters"},Sk={class:"log-search"},Ek={class:"log-coverage",role:"status",title:"Counts and first/last dates apply only to returned records, not all matching events."},Nk={key:0,class:"log-loading"},Rk={key:1,class:"log-workspace"},Tk={class:"log-results"},Pk={key:0,class:"log-table-scroll"},Dk={class:"log-table",role:"table"},Ak=["aria-label","onClick","aria-expanded"],Ik={class:"log-event-title"},Ok={class:"log-meta"},Mk={class:"log-service"},Vk={class:"log-module"},qk={class:"log-level"},Lk={key:0,class:"log-http"},$k={class:"log-count"},_k=["datetime","title"],Fk={key:1,class:"admin-empty"},Uk={key:2,class:"admin-empty"},Bk={key:2,class:"log-health"},zk={key:0},Hk={key:1},jk={key:2},Gk={key:0,class:"log-copy-status",role:"status"},Wk=["aria-busy"],Kk={key:0,class:"history-warning",role:"status"},Yk={key:1,class:"log-inspector"},Jk={class:"log-inspector-heading"},Xk={class:"log-inspector-eyebrow"},Qk={id:"history-inspector-title",tabindex:"-1"},Zk={key:0},xk={class:"log-inspector-tabs detail-tabs",role:"group","aria-label":"History event view"},e0=["aria-pressed"],t0=["aria-pressed"],n0=["aria-pressed"],o0=["aria-pressed"],s0=["aria-pressed"],i0={class:"errors-toolbar","aria-label":"Error filters"},r0={class:"seg-filter",role:"group","aria-label":"Filter by severity"},a0=["aria-pressed"],l0=["aria-pressed"],d0=["aria-pressed"],u0=["aria-pressed"],c0={class:"search-wrap"},p0={type:"search",class:"form-control","aria-label":"Search application history",placeholder:"Search history\u2026",title:"Search messages, or filter with code:repo_not_found module:route status:>=400",autocomplete:"off"},f0={key:0,class:"filter-count"},m0={class:"history-view-options"},h0={class:"history-view-controls"},g0={class:"select-wrap"},v0={id:"history-sort",class:"form-control form-control-sm"},y0={class:"select-wrap"},b0={id:"history-merge",class:"form-control form-control-sm"},w0={class:"autoref"},k0={type:"checkbox"},C0={key:0,role:"status"},S0={key:1,class:"admin-empty"},E0={key:2},N0={key:3,class:"errors-pager"},R0=["disabled"],T0={key:0,class:"errors-list-head"},P0={key:0,class:"errors-group-head"},D0={class:"errors-group-count"},A0={key:0,class:"errors-group-note"},I0=["data-history-key","aria-expanded","aria-controls","onClick"],O0={class:"col-when"},M0={class:"when-rel"},V0={class:"when-abs"},q0={class:"col-sev"},L0={class:"sev-label"},$0={class:"col-mod"},_0={class:"pill pill-module"},F0={class:"col-msg"},U0={class:"msg-code"},B0={key:0,class:"msg-context"},z0={key:1,class:"msg-detail"},H0=["title"],j0={class:"col-count"},G0={key:0,class:"count-pill"},W0={key:1,class:"count-pill count-pill-muted"},K0={class:"col-status"},Y0=["title"],J0={key:1,class:"status-empty",title:"No HTTP status for this event"},X0=["id"],Q0={class:"detail-body"},Z0={class:"detail-main"},x0={key:0},e2={key:0,class:"log-request-route"},t2={key:1,class:"log-reproduction"},n2=["onClick"],o2={key:2},s2={key:0},i2={class:"log-explanation-lead"},r2={class:"log-evidence"},a2={class:"history-technical"},l2={key:0,class:"history-fields"},d2={class:"log-value-reveal"},u2=["onClick"],c2={key:1},p2={key:2,class:"stack-pre"},f2={key:3,class:"history-occurrences","aria-label":"Stored occurrences"},m2={class:"log-evidence"},h2={class:"history-occurrence-list"},g2={class:"history-occurrence"},v2={class:"history-occurrence-heading"},y2=["datetime"],b2={class:"history-occurrence-context"},w2={key:0},k2={key:1},C2={key:0},S2={key:1},E2={key:2,class:"log-evidence"},N2={key:3,class:"log-evidence"},R2={class:"history-occurrence-record"},T2={class:"detail-actions"},P2=["onClick"],D2=["onClick"],A2=["onClick"],I2=["onClick"],O2={key:3,class:"copy-hint"},M2={class:"detail-aside"},V2={class:"aside-block"},q2=["title"],L2={class:"aside-block"},$2=["title"],_2={class:"aside-block"},F2={class:"aside-value"},U2={key:0,class:"aside-sub"},B2={key:0,class:"aside-block"},z2=["href"],H2={key:0,class:"log-value-reveal"},j2=["onClick"],G2={key:1,class:"aside-block"},W2={class:"aside-value mono"},K2={class:"history-management"},Y2={class:"volume-head"},J2={class:"errors-actions"},X2={role:"status"},Q2={key:0},Z2={class:"history-summary"},x2={key:0,class:"kpi-grid"},eC={class:"kpi-card"},tC={class:"kpi-value"},nC={key:0},oC={key:1},sC={key:2},iC={class:"kpi-card kpi-error"},rC={class:"kpi-value"},aC={class:"kpi-sub"},lC={class:"kpi-card kpi-warn"},dC={class:"kpi-value"},uC={class:"kpi-sub"},cC={class:"kpi-card kpi-info"},pC={class:"kpi-value"},fC={class:"kpi-sub"},mC={class:"kpi-value"},hC={class:"kpi-sub"},gC={key:0,class:"dropped-warn"},vC={key:1,class:"volume-chart"},yC={class:"volume-head"},bC={class:"volume-legend"},wC={key:0},kC={key:1},CC={key:2},SC={class:"volume-bars"},EC=["title"],NC={key:1},RC={key:0,class:"admin-empty"},TC=["aria-busy"],PC={class:"volume-head"},DC={id:"log-timeline-title",tabindex:"-1"},AC={key:0,class:"log-origin"},IC={key:1,role:"status"},OC={key:2,class:"log-coverage"},MC={key:3,class:"log-events"},VC=["datetime","title"],qC={class:"log-timeline-event"},LC={class:"log-timeline-event-title"},$C={key:0},_C={key:1},FC={key:2},UC={key:0,class:"log-request-route"},BC={key:1,class:"log-error-stack"},zC={key:0},HC={key:0},jC={key:1},GC={key:2},WC={class:"log-event-fields"},KC=["onClick"],YC={class:"log-timeline-scope"},JC=["href"];function ap(e,t){let s=Pe("field"),i=Pe("form");return a(),l("div",sw,[t[117]||(t[117]=ke('
Admin \xA0/\xA0 Errors

Errors

',2)),n("div",iw,[n("div",rw,[n("button",{id:"error-source-central",type:"button",class:R(["seg-chip",{active:e.errorSource==="central"}]),"aria-pressed":e.errorSource==="central",onClick:t[0]||(t[0]=o=>e.errorSource="central")},"Central logs",10,aw),n("button",{id:"error-source-history",type:"button",class:R(["seg-chip",{active:e.errorSource==="history"}]),"aria-pressed":e.errorSource==="history",onClick:t[1]||(t[1]=o=>e.errorSource="history")},"Application history",10,lw)]),n("div",dw,[n("p",uw,d(e.errorSource==="history"?e.redisLoading?"Loading application history\u2026":e.available===null?"Checking Redis\u2026":e.available?"Redis history is reachable.":"Redis history is unavailable. Previously loaded rows may be stale.":e.logFailure||(e.logLoading?"Loading central logs\u2026":e.logSnapshotStale?"This snapshot is stale. Refresh before assessing current health.":e.logStateText(e.logData?.state))),1),n("button",{type:"button",class:"btn btn-sm",disabled:e.errorSource==="central"?e.logLoading:e.redisLoading,onClick:t[2]||(t[2]=o=>e.errorSource==="central"?e.refreshLogs():e.refreshNow())},[h(d((e.errorSource==="central"?e.logLoading:e.redisLoading)?"Refreshing\u2026":"Refresh"),1),n("span",pw,d(e.errorSource==="central"?" central logs":" history"),1)],8,cw),e.errorSource==="central"&&(e.logFailure||["disabled","misconfigured","unreachable","busy"].includes(e.logData?.state))?(a(),l("button",{key:0,type:"button",class:"btn btn-sm",onClick:t[3]||(t[3]=o=>e.errorSource="history")},"Open application history")):f("v-if",!0)])]),P(n("section",{class:"log-investigation","aria-labelledby":"central-logs-title","aria-busy":e.logLoading},[n("div",mw,[t[31]||(t[31]=n("h2",{class:"sr-only",id:"central-logs-title"},"Central logs",-1)),e.logData?.grafanaUrl?(a(),l("a",{key:0,href:e.safeUrl(e.logData.grafanaUrl),target:"_blank",rel:"noopener noreferrer"},"Open in Grafana",8,hw)):f("v-if",!0)]),e.selectedLog?(a(),l("section",gw,[n("button",{type:"button",class:"log-back",onClick:t[4]||(t[4]=o=>e.closeLogDetail())},[...t[32]||(t[32]=[n("span",{"aria-hidden":"true"},"\u2190",-1),h(" Back to events",-1)])]),n("div",vw,[n("div",null,[n("p",yw,d(e.selectedLog.sample.service)+" / "+d(e.selectedLog.sample.module)+" \xB7 Event sample",1),n("h2",bw,d(e.selectedLog.sample.errorCode||e.selectedLog.sample.errorType||e.selectedLog.sample.event),1)]),n("span",{class:R(["log-severity","log-severity-"+e.logSeverity(e.selectedLog.sample)])},[h(d(e.logSeverity(e.selectedLog.sample)==="error"?"Failure":e.logSeverity(e.selectedLog.sample)==="warn"?"Warning":"Info"),1),e.selectedLog.sample.status||e.selectedLog.sample.httpStatus?(a(),l("span",ww," \xB7 HTTP "+d(e.selectedLog.sample.status||e.selectedLog.sample.httpStatus),1)):f("v-if",!0)],2)]),n("div",kw,[n("span",null,[n("strong",null,d(e.selectedLog.count),1),t[33]||(t[33]=h(" returned occurrences",-1))]),n("span",null,[t[34]||(t[34]=h("First ",-1)),n("time",{datetime:e.selectedLog.first},d(e.absTimeShort(e.selectedLog.first)),9,Cw)]),n("span",null,[t[35]||(t[35]=h("Last ",-1)),n("time",{datetime:e.selectedLog.last},d(e.absTimeShort(e.selectedLog.last)),9,Sw)])]),n("div",Ew,[n("div",Nw,[n("div",Rw,[t[36]||(t[36]=n("span",null,"Follow",-1)),(a(!0),l(V,null,Q(["requestId","jobId"].filter(o=>e.logTraceId(e.selectedLog,o)),o=>(a(),l("button",{type:"button",class:"log-trace-button",key:o,id:"trace-selector-"+o,"aria-label":"Follow "+(o==="requestId"?"request ":"job ")+e.selectedLog.sample[o],"aria-pressed":e.traceSelection?.kind===o,onClick:r=>e.lookupTrace(o,e.selectedLog.sample[o],r.currentTarget,e.selectedLog.sample)},[h(d(o==="requestId"?"Request":"Job")+" ",1),n("span",Pw,d(e.traceSelection?.kind===o?"\u2713":"\u2192"),1)],8,Tw))),128)),!e.logTraceId(e.selectedLog,"requestId")&&!e.logTraceId(e.selectedLog,"jobId")?(a(),l("span",Dw,"No correlation ID recorded")):f("v-if",!0),n("span",Aw,d(e.logData?.window||e.logAppliedFilters.window)+" window",1)]),e.traceSelection?(a(),l("section",{key:0,class:"log-timeline","aria-labelledby":"log-timeline-title","aria-busy":e.traceLoading},[n("div",Ow,[t[37]||(t[37]=n("h3",{id:"log-timeline-title",tabindex:"-1"},"Related events",-1)),n("button",{type:"button",class:"btn btn-sm",onClick:t[5]||(t[5]=o=>e.closeTrace())},"Hide events")]),e.traceLoading||e.trace?.state!=="ready"?(a(),l("p",Mw,d(e.traceLoading?"Loading related events\u2026":e.trace?.state==="empty"?"No related events returned in this window.":e.logStateText(e.trace?.state)),1)):f("v-if",!0),e.trace&&!e.traceLoading?(a(),l("p",Vw,d(e.trace.events?.length||0)+" events returned \xB7 "+d(e.absTime(e.trace.start))+" \u2013 "+d(e.absTime(e.trace.end))+" \xB7 200-event cap. All services and releases.",1)):f("v-if",!0),e.trace?.events?.length?(a(),l("ol",qw,[(a(!0),l(V,null,Q(e.trace.events,(o,r)=>(a(),l("li",{key:r},[n("time",{datetime:o.timestamp,title:o.timestamp},d(e.absTimeShort(o.timestamp)),9,Lw),n("div",$w,[n("div",_w,[n("strong",null,d(o.errorCode||o.errorType||o.event),1),n("span",{class:R(["log-severity","log-severity-"+e.logSeverity(o)])},d(o.status||o.httpStatus?"HTTP "+(o.status||o.httpStatus):o.severity||"Event"),3)]),n("p",null,[h(d(o.service),1),o.module?(a(),l("span",Fw," / "+d(o.module),1)):f("v-if",!0),o.ms!==void 0?(a(),l("span",Uw," \xB7 "+d(o.ms)+" ms",1)):f("v-if",!0),o.attempt!==void 0?(a(),l("span",Bw," \xB7 attempt "+d(o.attempt),1)):f("v-if",!0)]),o.route?(a(),l("p",zw,[n("code",null,d(o.method)+" "+d(o.requestPath||o.route),1)])):f("v-if",!0),o.errorStack||o.causeStack?(a(),l("details",Hw,[n("summary",null,[t[38]||(t[38]=h("Exception frames",-1)),o.errorType?(a(),l("span",jw," \xB7 "+d(o.errorType),1)):f("v-if",!0)]),o.errorStack?(a(),l("pre",Gw,d(o.errorStack),1)):f("v-if",!0),o.causeType?(a(),l("p",Ww,"Caused by "+d(o.causeType),1)):f("v-if",!0),o.causeStack?(a(),l("pre",Kw,d(o.causeStack),1)):f("v-if",!0)])):f("v-if",!0),n("details",Yw,[t[39]||(t[39]=n("summary",null,"Event fields",-1)),n("pre",null,d(JSON.stringify(o,null,2)),1),n("button",{type:"button",class:"btn btn-sm",onClick:u=>e.copyLogValue(JSON.stringify(o,null,2))},"Copy JSON",8,Jw)])])]))),128))])):f("v-if",!0),n("details",Xw,[t[40]||(t[40]=n("summary",null,"Query scope",-1)),n("p",null,"Earliest matching events for the selected "+d(e.traceSelection.kind==="jobId"?"job":"request")+" ID. Service and release filters do not narrow this timeline.",1)]),e.trace?.grafanaUrl?(a(),l("a",{key:3,href:e.safeUrl(e.trace.grafanaUrl),target:"_blank",rel:"noopener noreferrer"},"Open in Grafana",8,Qw)):f("v-if",!0)],8,Iw)):f("v-if",!0),e.traceSelection?f("v-if",!0):(a(),l("div",Zw,[n("h3",null,d(e.logTraceId(e.selectedLog,"requestId")||e.logTraceId(e.selectedLog,"jobId")?"Related events hidden":"This sample has no correlation ID"),1),n("p",null,d(e.logExplanation(e.selectedLog.sample)),1),n("p",xw,d(e.logEvidence(e.selectedLog.sample)),1),n("p",ek,d(e.logTraceId(e.selectedLog,"requestId")||e.logTraceId(e.selectedLog,"jobId")?"Choose Request or Job above to load related events.":"The recorded fields are available in the sample panel. Related events cannot be looked up for this record."),1)]))]),n("aside",tk,[t[51]||(t[51]=n("h3",null,"Event sample",-1)),n("p",nk,"One of "+d(e.selectedLog.count)+" returned occurrences. IDs can differ across the group.",1),e.selectedLog.sample.route?(a(),l("p",ok,[n("code",null,d(e.selectedLog.sample.method)+" "+d(e.selectedLog.sample.route),1)])):f("v-if",!0),e.selectedLog.sample.requestPath?(a(),l("section",sk,[t[43]||(t[43]=n("h3",null,"Reproduce this request",-1)),n("dl",null,[n("div",null,[t[41]||(t[41]=n("dt",null,"Anonymous repository ID",-1)),n("dd",null,[n("code",null,d(e.selectedLog.sample.repoId),1)])]),n("div",null,[t[42]||(t[42]=n("dt",null,"Request path \xB7 query excluded",-1)),n("dd",null,[n("code",null,d(e.selectedLog.sample.requestPath),1)])])]),n("button",{type:"button",class:"btn btn-sm",onClick:t[6]||(t[6]=o=>e.copyLogValue(e.selectedLog.sample.requestPath))},"Copy request path")])):f("v-if",!0),e.selectedLog.sample.errorStack||e.selectedLog.sample.causeStack?(a(),l("details",ik,[n("summary",null,"Exception frames \xB7 "+d(e.selectedLog.sample.errorType),1),e.selectedLog.sample.errorStack?(a(),l("pre",rk,d(e.selectedLog.sample.errorStack),1)):f("v-if",!0),e.selectedLog.sample.causeType?(a(),l("p",ak,"Caused by "+d(e.selectedLog.sample.causeType),1)):f("v-if",!0),e.selectedLog.sample.causeStack?(a(),l("pre",lk,d(e.selectedLog.sample.causeStack),1)):f("v-if",!0)])):f("v-if",!0),n("dl",dk,[n("div",null,[t[44]||(t[44]=n("dt",null,"Service",-1)),n("dd",null,d(e.selectedLog.sample.service),1)]),n("div",null,[t[45]||(t[45]=n("dt",null,"Module",-1)),n("dd",null,d(e.selectedLog.sample.module||"Not recorded"),1)]),n("div",null,[t[46]||(t[46]=n("dt",null,"Event",-1)),n("dd",null,d(e.selectedLog.sample.event),1)]),e.selectedLog.sample.release?(a(),l("div",uk,[t[47]||(t[47]=n("dt",null,"Release",-1)),n("dd",null,d(e.selectedLog.sample.release),1)])):f("v-if",!0)]),n("dl",ck,[(a(),l(V,null,Q(["requestId","jobId"],o=>(a(),l(V,{key:o},[e.logTraceId(e.selectedLog,o)?(a(),l("div",pk,[n("dt",null,d(o==="requestId"?"Request ID":"Job ID"),1),n("dd",null,[n("details",fk,[n("summary",null,d(e.compactLogValue(e.selectedLog.sample[o])),1),n("span",null,d(e.selectedLog.sample[o]),1)]),n("button",{type:"button",class:"log-copy-value",onClick:r=>e.copyLogValue(e.selectedLog.sample[o])},"Copy full ID",8,mk)])])):f("v-if",!0)],64))),64))]),n("details",hk,[n("summary",null,[t[48]||(t[48]=h("All sample fields ",-1)),n("span",null,d(Object.keys(e.selectedLog.sample).length),1)]),t[50]||(t[50]=n("p",{class:"log-coverage"},"Admin API fields only. Failed file requests may include their anonymous repository ID and pathname. Query strings are excluded; exception frames include recognized application code only.",-1)),n("dl",null,[(a(!0),l(V,null,Q(e.selectedLog.sample,(o,r)=>P((a(),l("div",{key:r},[n("dt",null,d(r),1),n("dd",null,d(o),1)])),[[Z,!["requestId","jobId"].includes(r)]])),128))]),n("details",gk,[t[49]||(t[49]=n("summary",null,"Raw sample",-1)),n("pre",null,d(JSON.stringify(e.selectedLog.sample,null,2)),1),n("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=o=>e.copyLogValue(JSON.stringify(e.selectedLog.sample,null,2)))},"Copy JSON")])])])])])):f("v-if",!0),P(n("div",vk,[n("details",yk,[n("summary",null,[h("Window: "+d(e.logAppliedFilters.window)+" \xB7 "+d(e.logAppliedFilters.service||"All services"),1),e.logAppliedFilters.release?(a(),l("span",bk," \xB7 "+d(e.logAppliedFilters.release),1)):f("v-if",!0),t[52]||(t[52]=n("span",{class:"log-query-hint"},"Time & service",-1))]),t[58]||(t[58]=h()),n("form",{class:"errors-toolbar log-filters",onSubmit:t[11]||(t[11]=de(o=>e.refreshLogs(),["prevent"]))},[n("label",null,[t[54]||(t[54]=h("Time window ",-1)),P(n("select",{class:"form-control","onUpdate:modelValue":t[8]||(t[8]=o=>e.logFilters.window=o),id:"log-window"},[...t[53]||(t[53]=[n("option",{value:"15m"},"Last 15 minutes",-1),n("option",{value:"1h"},"Last hour",-1),n("option",{value:"6h"},"Last 6 hours",-1),n("option",{value:"24h"},"Last 24 hours",-1)])],512),[[Rt,e.logFilters.window]])]),n("label",null,[t[56]||(t[56]=h("Service ",-1)),P(n("select",{class:"form-control","onUpdate:modelValue":t[9]||(t[9]=o=>e.logFilters.service=o),id:"log-service"},[...t[55]||(t[55]=[ke('',8)])],512),[[Rt,e.logFilters.service]])]),n("label",null,[t[57]||(t[57]=h("Release SHA ",-1)),P(n("input",{class:"form-control",id:"log-release","onUpdate:modelValue":t[10]||(t[10]=o=>e.logFilters.release=o),maxlength:"40",placeholder:"All releases",pattern:"[a-f0-9]{7,40}|unknown",autocomplete:"off"},null,512),[[ot,e.logFilters.release]])]),n("button",{class:"btn btn-sm",type:"submit",disabled:e.logLoading},d(e.logLoading?"Loading\u2026":"Refresh logs"),9,wk)],32),e.logData?.captured!==void 0?(a(),l("p",kk,d(e.logData.captured)+" records returned \xB7 1,000-record cap \xB7 "+d(e.absTime(e.logData.start))+" to "+d(e.absTime(e.logData.end)),1)):f("v-if",!0)]),n("div",Ck,[n("label",Sk,[t[59]||(t[59]=h("Search returned groups",-1)),P(n("input",{class:"form-control",type:"search","onUpdate:modelValue":t[12]||(t[12]=o=>e.logView.search=o),placeholder:"Event, service, code or sample ID"},null,512),[[ot,e.logView.search]])]),n("label",null,[t[61]||(t[61]=h("Severity",-1)),P(n("select",{class:"form-control","onUpdate:modelValue":t[13]||(t[13]=o=>e.logView.severity=o)},[...t[60]||(t[60]=[n("option",{value:""},"All severities",-1),n("option",{value:"error"},"Failure / HTTP 5xx",-1),n("option",{value:"warn"},"Warning",-1),n("option",{value:"info"},"Info",-1)])],512),[[Rt,e.logView.severity]])]),n("label",null,[t[63]||(t[63]=h("Sort",-1)),P(n("select",{class:"form-control","onUpdate:modelValue":t[14]||(t[14]=o=>e.logView.sort=o)},[...t[62]||(t[62]=[n("option",{value:"recent"},"Most recent",-1),n("option",{value:"count"},"Most frequent",-1)])],512),[[Rt,e.logView.sort]])])]),n("p",Ek,d(e.filteredLogGroups().length)+" of "+d(e.logData?.groups?.length||0)+" returned groups \xB7 "+d(e.logData?.captured??0)+" records \xB7 1,000-record cap.",1),e.logLoading?(a(),l("div",Nk,"Loading event groups\u2026")):(a(),l("div",Rk,[n("div",Tk,[e.filteredLogGroups().length?(a(),l("div",Pk,[n("table",Dk,[t[66]||(t[66]=n("caption",{class:"sr-only"},"Returned events grouped by service, module, code, severity and status. Select an event for sample details.",-1)),t[67]||(t[67]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Event"),n("th",{scope:"col"},"Severity"),n("th",{scope:"col"},"Count"),n("th",{scope:"col"},"Last seen")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q(e.filteredLogGroups(),o=>(a(),l("tr",{key:o.fingerprint,class:R({"log-selected":e.selectedLog?.fingerprint===o.fingerprint})},[n("td",null,[n("button",{class:"log-event-button",type:"button","aria-label":"Inspect "+(o.sample.errorCode||o.sample.errorType||o.sample.event),onClick:r=>e.selectLog(o,r.currentTarget),"aria-expanded":e.selectedLog?.fingerprint===o.fingerprint,"aria-controls":"log-detail"},[n("span",Ik,[n("strong",null,d(o.sample.errorCode||o.sample.errorType||o.sample.event),1),t[64]||(t[64]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-arrow-right"})],-1))]),n("span",Ok,[n("span",Mk,d(o.sample.service),1),n("span",Vk," / "+d(o.sample.module),1)])],8,Ak)]),n("td",qk,[n("span",{class:R(["log-severity","log-severity-"+e.logSeverity(o.sample)])},d(e.logSeverity(o.sample)==="error"?"Failure":e.logSeverity(o.sample)==="warn"?"Warning":"Info"),3),o.sample.status||o.sample.httpStatus?(a(),l("span",Lk,"HTTP "+d(o.sample.status||o.sample.httpStatus),1)):f("v-if",!0)]),n("td",$k,[t[65]||(t[65]=n("span",{class:"sr-only"},"Count ",-1)),h(d(o.count),1)]),n("td",null,[n("time",{datetime:o.last,title:e.absTime(o.last)},d(e.relTime(o.last)),9,_k)])],2))),128))])])])):e.logData?.groups?.length?(a(),l("div",Fk,[t[68]||(t[68]=h("No returned groups match these filters. ",-1)),n("button",{class:"btn btn-sm",onClick:t[15]||(t[15]=o=>{e.logView.search="",e.logView.severity=""})},"Reset filters")])):(a(),l("div",Uk,d(e.logData?.state==="empty"?"No warnings, errors or HTTP 5xx returned in this window.":"No central events available. Refresh logs or open Application history."),1))])])),e.logData?.telemetry?(a(),l("details",Bk,[t[70]||(t[70]=n("summary",null,[h("Telemetry details "),n("span",null,"90 seconds before last check")],-1)),e.logData.telemetry.missing?.length?(a(),l("p",zk,"Missing or stale: "+d(e.logData.telemetry.missing.join(", "))+". Expected one API, four streamers and three queues.",1)):(a(),l("p",Hk,"Expected API, streamer and queue heartbeats were present at the last check.")),e.logData.telemetry.partial?(a(),l("p",jk,"Telemetry coverage is partial; absence and drop totals may be incomplete.")):f("v-if",!0),n("p",null,"Collector: "+d(e.logData.telemetry.collector.state)+" \xB7 dropped events since collector start: "+d(e.logData.telemetry.collector.dropped??"unknown")+". Intentional filtering is excluded.",1),n("details",null,[t[69]||(t[69]=n("summary",null,"Application drop counters and last telemetry",-1)),n("ul",null,[(a(!0),l(V,null,Q(e.logData.telemetry.instances,(o,r)=>(a(),l("li",{key:r},d(o.service)+" \xB7 "+d(o.instance||"unknown instance")+" \xB7 "+d(o.dropped??"unknown")+" dropped since process start \xB7 last seen "+d(e.absTime(o.last)),1))),128))])])])):f("v-if",!0)],512),[[Z,!e.selectedLog]])],8,fw),[[Z,e.errorSource==="central"]]),e.logCopyStatus?(a(),l("p",Gk,d(e.logCopyStatus),1)):f("v-if",!0),P(n("section",{class:"history-source","aria-busy":e.redisLoading},[t[112]||(t[112]=n("h2",{class:"sr-only"},"Application history",-1)),e.redisCollecting!==!0?(a(),l("p",Kk,d(e.redisCollecting===!1?"Collection is off; retained history is not receiving new events.":"Collection status is unknown."),1)):f("v-if",!0),e.historySelected?(a(),l("div",Yk,[n("button",{type:"button",class:"log-back",onClick:t[16]||(t[16]=o=>e.closeHistory())},"\u2190 Back to history"),n("div",Jk,[n("div",null,[n("p",Xk,d(e.historySelected.module)+" \xB7 Application history",1),n("h2",Qk,d(e.historySelected.displayMessage),1)]),n("span",{class:R(["log-severity","log-severity-"+e.historySelected._bucket])},[h(d(e.historySelected._bucket),1),e.historySelected._status?(a(),l("span",Zk," \xB7 HTTP "+d(e.historySelected._status),1)):f("v-if",!0)],2)]),n("div",xk,[n("button",{type:"button","aria-pressed":e.historyView==="overview"&&(!e.detailTab[e.historySelected._key]||e.detailTab[e.historySelected._key]==="summary"),class:R({active:e.historyView==="overview"&&(!e.detailTab[e.historySelected._key]||e.detailTab[e.historySelected._key]==="summary")}),onClick:t[17]||(t[17]=o=>{e.historyView="overview",e.detailTab[e.historySelected._key]="summary"})},"Overview",10,e0),n("button",{type:"button","aria-pressed":e.historyView==="timeline",class:R({active:e.historyView==="timeline"}),onClick:t[18]||(t[18]=o=>e.showHistoryTimeline(o.currentTarget))},"Timeline",10,t0),n("button",{type:"button","aria-pressed":e.historyView==="overview"&&e.detailTab[e.historySelected._key]==="raw",class:R({active:e.historyView==="overview"&&e.detailTab[e.historySelected._key]==="raw"}),onClick:t[19]||(t[19]=o=>{e.historyView="overview",e.detailTab[e.historySelected._key]="raw"})},"Raw",10,n0),e.historySelected._stack?(a(),l("button",{key:0,type:"button","aria-pressed":e.historyView==="overview"&&e.detailTab[e.historySelected._key]==="stack",class:R({active:e.historyView==="overview"&&e.detailTab[e.historySelected._key]==="stack"}),onClick:t[20]||(t[20]=o=>{e.historyView="overview",e.detailTab[e.historySelected._key]="stack"})},"Stack",10,o0)):f("v-if",!0),e.historySelected.count>1?(a(),l("button",{key:1,type:"button","aria-pressed":e.historyView==="overview"&&e.detailTab[e.historySelected._key]==="related",class:R({active:e.historyView==="overview"&&e.detailTab[e.historySelected._key]==="related"}),onClick:t[21]||(t[21]=o=>{e.historyView="overview",e.detailTab[e.historySelected._key]="related"})},"Occurrences ("+d(e.historySelected.count)+")",11,s0)):f("v-if",!0)])])):f("v-if",!0),P(n("div",null,[P((a(),l("form",i0,[n("div",r0,[n("button",{type:"button",class:R(["seg-chip",{active:(e.query?.bucket||"")===""}]),"aria-pressed":(e.query?.bucket||"")==="",onClick:t[22]||(t[22]=o=>e.setBucket(""))},"All ",10,a0),n("button",{type:"button",class:R(["seg-chip",{active:(e.query?.bucket||"")==="error","is-empty":!e.stats?.severity?.error}]),"aria-pressed":(e.query?.bucket||"")==="error",onClick:t[23]||(t[23]=o=>e.setBucket("error"))},[...t[71]||(t[71]=[n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1),h("Error ",-1)])],10,l0),n("button",{type:"button",class:R(["seg-chip",{active:(e.query?.bucket||"")==="warn","is-empty":!e.stats?.severity?.warn}]),"aria-pressed":(e.query?.bucket||"")==="warn",onClick:t[24]||(t[24]=o=>e.setBucket("warn"))},[...t[72]||(t[72]=[n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1),h("Warning ",-1)])],10,d0),n("button",{type:"button",class:R(["seg-chip",{active:(e.query?.bucket||"")==="info","is-empty":!e.stats?.severity?.info}]),"aria-pressed":(e.query?.bucket||"")==="info",onClick:t[25]||(t[25]=o=>e.setBucket("info"))},[...t[73]||(t[73]=[n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1),h("Info ",-1)])],10,u0)]),n("div",c0,[t[74]||(t[74]=n("svg",{class:"ui-icon search-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)),P(n("input",p0,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]]),e.parsedFilterCount?(a(),l("span",f0,d(e.parsedFilterCount)+" filter"+d(e.parsedFilterCount>1?"s":""),1)):f("v-if",!0)]),n("details",m0,[t[80]||(t[80]=n("summary",null,"View options",-1)),n("div",h0,[n("div",g0,[t[76]||(t[76]=n("label",{for:"history-sort"},"Sort",-1)),P((a(),l("select",v0,[...t[75]||(t[75]=[n("option",{value:"recent"},"Most recent",-1),n("option",{value:"count"},"Most frequent",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.sort=o},value:e.query?.sort,form:null,options:{}}]])]),n("div",y0,[t[78]||(t[78]=n("label",{for:"history-merge",title:"Rows are always sectioned by severity. This merges repeated events inside each section."},"Merge",-1)),P((a(),l("select",b0,[...t[77]||(t[77]=[n("option",{value:""},"Don't merge",-1),n("option",{value:"code"},"Same error",-1),n("option",{value:"module"},"Same module",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.group=o},value:e.query?.group,form:null,options:{}}]])]),n("label",w0,[P(n("input",k0,null,512),[[s,{state:e.viewState,set:o=>{e.query.autoRefresh=o},value:e.query?.autoRefresh,form:null,options:{}}]]),t[79]||(t[79]=n("span",{class:"auto-refresh-label"},"Auto-refresh",-1))])])])])),[[i,e.viewState]]),e.redisLoading?(a(),l("p",C0,"Loading application history\u2026")):f("v-if",!0),!e.redisLoading&&!e.visible?.length&&e.available===!0?(a(),l("div",S0,"No matching entries in the loaded Redis history.")):f("v-if",!0),e.redisRedacted?(a(),l("p",E0,d(e.redisRedacted)+" invalid legacy records were omitted. Older valid records may still be available.",1)):f("v-if",!0),e.entries?.length||e.canLoadMore()?(a(),l("div",N0,[n("span",null,d(e.query?.group&&e.visible?.length!==e.entries?.length?e.fmt?.number(e.visible?.length)+(e.visible?.length===1?" group":" groups")+" from ":"")+d(e.fmt?.number(e.entries?.length))+" safe entries loaded \xB7 "+d(e.fmt?.number(e.redisNextOffset||e.entries?.length))+" of "+d(e.fmt?.number(e.total))+" stored records scanned",1),e.canLoadMore()?(a(),l("button",{key:0,class:"btn btn-sm",type:"button",onClick:t[26]||(t[26]=o=>e.loadMore()),disabled:e.redisLoading},"Load 250 older",8,R0)):f("v-if",!0)])):f("v-if",!0)],512),[[Z,!e.historySelected]]),e.visible?.length||e.historySelected?P((a(),l("div",{key:2,class:R(["errors-list",{"history-inspector":e.historySelected}])},[e.historySelected?f("v-if",!0):(a(),l("div",T0,[...t[81]||(t[81]=[ke('WhenSeverityModuleMessageTotalStatus',6)])])),(a(!0),l(V,null,Q(e.historySelected?[e.historySelected]:e.visible,(o,r)=>(a(),l(V,{key:o?._key},[!e.historySelected&&(r===0||e.visible[r-1]?._bucket!==o?._bucket)?(a(),l("div",P0,[n("span",{class:R(["sev-dot","sev-"+o?._bucket])},null,2),h(d(o?._bucket==="error"?"Error":o?._bucket==="warn"?"Warning":"Info"),1),n("span",D0,d(e.fmt?.number(e.visible.filter(u=>u?._bucket===o?._bucket).length)),1),r===0?(a(),l("span",A0,"By severity \xB7 "+d(e.query?.group==="code"?"repeats merged by error \xB7 ":e.query?.group==="module"?"repeats merged by module \xB7 ":"")+d(e.query?.sort==="count"?"most frequent first":"most recent first"),1)):f("v-if",!0)])):f("v-if",!0),n("div",{class:R(["errors-row",{open:e.expanded[o?._key]}])},[P(n("button",{type:"button",class:"errors-row-main","data-history-key":o?._key,"aria-expanded":!!e.expanded[o?._key],"aria-controls":"history-detail-"+r,onClick:u=>e.toggle(o,u.currentTarget)},[n("span",O0,[n("span",M0,d(e.relTime(o?.ts)),1),n("span",V0,d(e.absTimeShort(o?.ts)),1)]),n("span",q0,[n("span",{class:R(["sev-dot","sev-"+o?._bucket])},null,2),n("span",L0,d(o?._bucket==="error"?"Error":o?._bucket==="warn"?"Warning":"Info"),1)]),n("span",$0,[n("span",_0,d(o?.module),1)]),n("span",F0,[n("strong",U0,d(o?.displayMessage),1),o?.displayContext&&o?.displayContext!==o?.displayMessage?(a(),l("span",B0,d(o?.displayContext),1)):f("v-if",!0),o?._detail?(a(),l("span",z0,d(o?._detail),1)):f("v-if",!0),o?._url?(a(),l("span",{key:2,class:"msg-url",title:o?._url},d(o?._url),9,H0)):f("v-if",!0)]),n("span",j0,[o?.count>1?(a(),l("span",G0,"\xD7"+d(o?.count),1)):f("v-if",!0),o?.count===1?(a(),l("span",W0,"\xD71")):f("v-if",!0)]),n("span",K0,[o?._status?(a(),l("span",{key:0,class:R(["status-pill",String(o?._status).match(/^[23]/)?"status-neutral":"status-"+o?._bucket]),title:String(o?._status).match(/^2/)&&o?._bucket==="warn"?"Client closed the connection":null},d(String(o?._status).match(/^2/)&&o?._bucket==="warn"?"\u2014":o?._status),11,Y0)):f("v-if",!0),o?._status?f("v-if",!0):(a(),l("span",J0,"\u2014"))])],8,I0),[[Z,!e.historySelected]]),e.expanded[o?._key]?(a(),l("div",{key:0,class:"errors-row-detail",id:"history-detail-"+r},[n("div",Q0,[n("div",Z0,[!e.detailTab[o?._key]||e.detailTab[o?._key]==="summary"?(a(),l("div",x0,[t[87]||(t[87]=n("h3",null,"What happened",-1)),o.raw?.[0]?.route?(a(),l("p",e2,[n("code",null,d(o.raw[0].method)+" "+d(o.raw[0].route),1)])):f("v-if",!0),o.raw?.[0]?.requestPath?(a(),l("section",t2,[t[84]||(t[84]=n("h3",null,"Reproduce this request",-1)),n("dl",null,[n("div",null,[t[82]||(t[82]=n("dt",null,"Anonymous repository ID",-1)),n("dd",null,[n("code",null,d(o.raw[0].repoId),1)])]),n("div",null,[t[83]||(t[83]=n("dt",null,"Request path \xB7 query excluded",-1)),n("dd",null,[n("code",null,d(o.raw[0].requestPath),1)])])]),n("button",{type:"button",class:"btn btn-sm",onClick:u=>e.copyLogValue(o.raw[0].requestPath)},"Copy request path",8,n2)])):f("v-if",!0),o.raw?.[0]?.errorType?(a(),l("p",o2,[h(d(o.raw[0].errorType),1),o.raw[0].causeType?(a(),l("span",s2," \xB7 caused by "+d(o.raw[0].causeType),1)):f("v-if",!0)])):f("v-if",!0),n("p",i2,d(e.logExplanation(o.raw?.[0]||{})),1),n("p",r2,d(e.logEvidence(o.raw?.[0]||{})),1),n("details",a2,[t[85]||(t[85]=n("summary",null,"Technical fields",-1)),t[86]||(t[86]=h()),!e.detailTab[o?._key]||e.detailTab[o?._key]==="summary"?(a(),l("dl",l2,[(a(!0),l(V,null,Q(e.historyDetailFields(o),([u,p])=>(a(),l("div",{key:u},[n("dt",null,d(u),1),n("dd",null,[e.isLogIdentifier(u,p)?(a(),l(V,{key:0},[n("details",d2,[n("summary",null,d(e.compactLogValue(p)),1),n("span",null,d(p),1)]),n("button",{type:"button",class:"log-copy-value",onClick:c=>e.copyLogValue(p)},"Copy full "+d(u),9,u2)],64)):(a(),l(V,{key:1},[h(d(e.logFieldText(p)),1)],64))])]))),128))])):f("v-if",!0)])])):f("v-if",!0),e.detailTab[o?._key]==="raw"?(a(),l("pre",c2,d(o?._rawJson),1)):f("v-if",!0),e.detailTab[o?._key]==="stack"?(a(),l("pre",p2,d(o?._stack),1)):f("v-if",!0),e.detailTab[o?._key]==="related"?(a(),l("section",f2,[t[89]||(t[89]=n("h3",null,"Stored occurrences",-1)),n("p",m2,d(o._related.length)+" matching records in the loaded Redis snapshot. Most recent first.",1),n("ol",h2,[(a(!0),l(V,null,Q(e.historyOccurrences(o),(u,p)=>(a(),l("li",{key:p},[n("details",g2,[n("summary",null,[n("span",v2,[n("time",{datetime:u.ts},d(e.occurrenceTime(u.ts)),9,y2),n("span",{class:R(["log-severity","log-severity-"+u._bucket])},d(u._status?"HTTP "+u._status:u._bucket),3)]),n("span",b2,[h(d(u.raw?.[0]?.service||"Application")+" \xB7 "+d(u.module||"Unknown module"),1),u.raw?.[0]?.route?(a(),l("span",w2,[h(" \xB7 "+d(u.raw[0].method)+" ",1),n("code",null,d(u.raw[0].requestPath||u.raw[0].route),1)])):(a(),l("span",k2," \xB7 Route not captured"))])]),u.raw?.[0]?.errorType?(a(),l("p",C2,d(u.raw[0].errorType),1)):f("v-if",!0),u._stack?(a(),l("pre",S2,d(u._stack),1)):(a(),l("p",E2,"Exception frames were not captured.")),u.raw?.[0]?.route?f("v-if",!0):(a(),l("p",N2,"Request route was not captured.")),n("details",R2,[t[88]||(t[88]=n("summary",null,"Stored record",-1)),n("pre",null,d(u._rawJson),1)])])]))),128))])])):f("v-if",!0),n("div",T2,[e.logTraceId(o,"requestId")?(a(),l("button",{key:0,class:"btn btn-sm",type:"button",onClick:u=>e.lookupTrace("requestId",e.logTraceId(o,"requestId"),u.currentTarget,o)},"Request timeline \u2192",8,P2)):f("v-if",!0),e.logTraceId(o,"jobId")?(a(),l("button",{key:1,class:"btn btn-sm",type:"button",onClick:u=>e.lookupTrace("jobId",e.logTraceId(o,"jobId"),u.currentTarget,o)},"Job timeline \u2192",8,D2)):f("v-if",!0),o?._url?(a(),l("button",{key:2,class:"btn btn-sm",type:"button",title:"Copy a curl that reproduces the request",onClick:u=>e.copyCurl(o)},[...t[90]||(t[90]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),h(" Copy curl",-1)])],8,A2)):f("v-if",!0),n("button",{class:"btn btn-sm",type:"button",onClick:u=>e.copyJson(o)},[...t[91]||(t[91]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-clipboard"})],-1),h(" Copy JSON",-1)])],8,I2),e.copyHint?(a(),l("span",O2,d(e.copyHint),1)):f("v-if",!0)])]),n("aside",M2,[n("div",V2,[t[92]||(t[92]=n("div",{class:"aside-label"},"First seen",-1)),n("div",{class:"aside-value",title:e.absTime(o?._firstSeen)},d(e.relTime(o?._firstSeen)),9,q2)]),n("div",L2,[t[93]||(t[93]=n("div",{class:"aside-label"},"Last seen",-1)),n("div",{class:"aside-value",title:e.absTime(o?.ts)},d(e.relTime(o?.ts)),9,$2)]),n("div",_2,[t[94]||(t[94]=n("div",{class:"aside-label"},"Occurrences",-1)),n("div",F2,[h(d(o?.count),1),o?._lastHourCount?(a(),l("span",U2," \xB7 "+d(o?._lastHourCount)+" this hour",1)):f("v-if",!0)])]),o?._repoId?(a(),l("div",B2,[t[96]||(t[96]=n("div",{class:"aside-label"},"Repository",-1)),n("a",{class:"aside-value",href:e.safeUrl("/r/"+o?._repoId)},d(e.isLogIdentifier("repoId",o?._repoId)?e.compactLogValue(o?._repoId):o?._repoId),9,z2),e.isLogIdentifier("repoId",o?._repoId)?(a(),l("details",H2,[t[95]||(t[95]=n("summary",null,"Full repository ID",-1)),h(d(o?._repoId),1)])):f("v-if",!0),n("button",{type:"button",class:"log-copy-value",onClick:u=>e.copyLogValue(o?._repoId)},"Copy full repository ID",8,j2)])):f("v-if",!0),o?._url?(a(),l("div",G2,[t[97]||(t[97]=n("div",{class:"aside-label"},"URL",-1)),n("div",W2,d(o?._url),1)])):f("v-if",!0)])])],8,X0)):f("v-if",!0)],2)],64))),128))],2)),[[Z,e.historyView!=="timeline"||!e.historySelected]]):f("v-if",!0),P(n("details",K2,[t[110]||(t[110]=n("summary",null,"History settings, export and diagnostics",-1)),n("div",Y2,[n("div",J2,[n("button",{class:"btn btn-sm",type:"button",onClick:t[27]||(t[27]=o=>e.exportCsv())},"Export Redis CSV"),n("button",{class:"btn btn-sm btn-outline-danger",type:"button",onClick:t[28]||(t[28]=o=>e.clearAll())},"Clear Redis history")])]),n("p",X2,d(e.redisCollecting===!1?"Collection is OFF (LOG_REDIS_MIRROR=off); retained history is not receiving new events.":e.redisCollecting===!0?"The application is configured to mirror warnings and errors.":"Collection status is unknown."),1),t[111]||(t[111]=n("p",{class:"log-coverage"},"Redis mirror: hourly counters cover 24 hours; stored rows are a rotating snapshot and may cover a shorter or longer period. Counts are not combined with central logs.",-1)),e.redisStatsState!=="ready"||e.available!==!0?(a(),l("p",Q2,"Redis counters are "+d(e.redisStatsState==="loading"?"loading":"unavailable")+".",1)):f("v-if",!0),n("details",Z2,[t[108]||(t[108]=n("summary",null,"24-hour counters and volume",-1)),t[109]||(t[109]=h()),e.redisStatsState==="ready"&&e.available===!0?(a(),l("section",x2,[n("div",eC,[t[98]||(t[98]=n("div",{class:"kpi-label"},"Occurrences \xB7 24h",-1)),n("div",tC,d(e.fmt?.number(e.stats?.last24h??0)),1),n("div",{class:R(["kpi-sub",{up:e.stats?.delta>0,down:e.stats?.delta<0}])},[e.stats?.prev24h>=20?(a(),l("span",nC,d((e.stats?.last24h??0)-(e.stats?.prev24h??0)>=0?"+":"")+d(Math.round(((e.stats?.last24h??0)-(e.stats?.prev24h??0))/e.stats.prev24h*100))+"% vs yesterday",1)):e.stats?.prev24h!==void 0?(a(),l("span",oC,d(e.fmt?.number(e.stats?.prev24h??0))+" in prior 24h",1)):f("v-if",!0),e.stats?.prev24h?f("v-if",!0):(a(),l("span",sC,"no prior baseline"))],2)]),n("div",iC,[t[99]||(t[99]=n("div",{class:"kpi-label"},"Error",-1)),n("div",rC,d(e.fmt?.number(e.stats?.severity?.error??0)),1),n("div",aC,"5xx \xB7 "+d(e.stats?.unique?.error)+" unique",1)]),n("div",lC,[t[100]||(t[100]=n("div",{class:"kpi-label"},"Warning",-1)),n("div",dC,d(e.fmt?.number(e.stats?.severity?.warn??0)),1),n("div",uC,"4xx, aborted \xB7 "+d(e.stats?.unique?.warn)+" unique",1)]),n("div",cC,[t[101]||(t[101]=n("div",{class:"kpi-label"},"Info",-1)),n("div",pC,d(e.fmt?.number(e.stats?.severity?.info??0)),1),n("div",fC,"Auth, 404 \xB7 "+d(e.stats?.unique?.info)+" unique",1)]),n("div",{class:R(["kpi-card",{"kpi-error":e.stats?.dropped>0}])},[t[102]||(t[102]=n("div",{class:"kpi-label"},"Entries stored",-1)),n("div",mC,d(e.fmt?.number(e.total)),1),n("div",hC,[h(" rotating history \xB7 cap "+d(e.fmt?.number(e.cap))+" ",1),e.stats?.dropped>0?(a(),l("span",gC," \xB7 "+d(e.stats?.dropped)+" dropped",1)):f("v-if",!0)])],2)])):f("v-if",!0),e.redisStatsState==="ready"&&e.available===!0?(a(),l("section",vC,[n("div",yC,[t[106]||(t[106]=n("span",{class:"volume-title"},"Volume \xB7 24h \xB7 1h buckets",-1)),n("span",bC,[e.stats?.severity?.error?(a(),l("span",wC,[...t[103]||(t[103]=[n("span",{class:"dot dot-error"},null,-1),h("Error",-1)])])):f("v-if",!0),e.stats?.severity?.warn?(a(),l("span",kC,[...t[104]||(t[104]=[n("span",{class:"dot dot-warn"},null,-1),h("Warning",-1)])])):f("v-if",!0),e.stats?.severity?.info?(a(),l("span",CC,[...t[105]||(t[105]=[n("span",{class:"dot dot-info"},null,-1),h("Info",-1)])])):f("v-if",!0)])]),n("div",SC,[(a(!0),l(V,null,Q(e.stats?.buckets,(o,r)=>(a(),l("div",{class:"volume-bar",key:r,title:e.bucketTitle(o)},[n("span",{class:"seg seg-error",style:Ae({height:e.barPx(o,"error")+"px"})},null,4),n("span",{class:"seg seg-warn",style:Ae({height:e.barPx(o,"warn")+"px"})},null,4),n("span",{class:"seg seg-info",style:Ae({height:e.barPx(o,"info")+"px"})},null,4)],8,EC))),128))]),t[107]||(t[107]=n("div",{class:"volume-axis","aria-hidden":"true"},[n("span",null,"24h ago"),n("span",null,"12h ago"),n("span",null,"now")],-1))])):f("v-if",!0)])],512),[[Z,!e.historySelected]])],8,Wk),[[Z,e.errorSource==="history"]]),e.errorSource==="history"&&e.historyView==="timeline"?(a(),l("div",NC,[e.traceSelection?f("v-if",!0):(a(),l("div",RC,"No request or job ID was recorded for this entry.")),e.traceSelection?(a(),l("section",{key:1,class:"log-timeline","aria-labelledby":"log-timeline-title","aria-busy":e.traceLoading},[n("div",PC,[n("h3",DC,d(e.traceSelection.kind==="jobId"?"Job":"Request")+" timeline",1),n("button",{type:"button",class:"btn btn-sm",onClick:t[29]||(t[29]=o=>e.closeTrace())},"Close timeline")]),e.traceSelection.context?(a(),l("p",AC,d(e.traceSelection.context.event)+" \xB7 "+d(e.traceSelection.context.service),1)):f("v-if",!0),e.traceLoading||e.trace?.state!=="ready"?(a(),l("p",IC,d(e.traceLoading?"Loading related events\u2026":e.trace?.state==="empty"?"No related events returned in this window.":e.logStateText(e.trace?.state)),1)):f("v-if",!0),e.trace&&!e.traceLoading?(a(),l("p",OC,d(e.trace.events?.length||0)+" events returned \xB7 "+d(e.absTime(e.trace.start))+" \u2013 "+d(e.absTime(e.trace.end))+" \xB7 200-event cap. All services and releases.",1)):f("v-if",!0),e.trace?.events?.length?(a(),l("ol",MC,[(a(!0),l(V,null,Q(e.trace.events,(o,r)=>(a(),l("li",{key:r},[n("time",{datetime:o.timestamp,title:o.timestamp},d(e.absTimeShort(o.timestamp)),9,VC),n("div",qC,[n("div",LC,[n("strong",null,d(o.errorCode||o.errorType||o.event),1),n("span",{class:R(["log-severity","log-severity-"+e.logSeverity(o)])},d(o.status||o.httpStatus?"HTTP "+(o.status||o.httpStatus):o.severity||"Event"),3)]),n("p",null,[h(d(o.service),1),o.module?(a(),l("span",$C," / "+d(o.module),1)):f("v-if",!0),o.ms!==void 0?(a(),l("span",_C," \xB7 "+d(o.ms)+" ms",1)):f("v-if",!0),o.attempt!==void 0?(a(),l("span",FC," \xB7 attempt "+d(o.attempt),1)):f("v-if",!0)]),o.route?(a(),l("p",UC,[n("code",null,d(o.method)+" "+d(o.requestPath||o.route),1)])):f("v-if",!0),o.errorStack||o.causeStack?(a(),l("details",BC,[n("summary",null,[t[113]||(t[113]=h("Exception frames",-1)),o.errorType?(a(),l("span",zC," \xB7 "+d(o.errorType),1)):f("v-if",!0)]),o.errorStack?(a(),l("pre",HC,d(o.errorStack),1)):f("v-if",!0),o.causeType?(a(),l("p",jC,"Caused by "+d(o.causeType),1)):f("v-if",!0),o.causeStack?(a(),l("pre",GC,d(o.causeStack),1)):f("v-if",!0)])):f("v-if",!0),n("details",WC,[t[114]||(t[114]=n("summary",null,"Event fields",-1)),n("pre",null,d(JSON.stringify(o,null,2)),1),n("button",{type:"button",class:"btn btn-sm",onClick:u=>e.copyLogValue(JSON.stringify(o,null,2))},"Copy JSON",8,KC)])])]))),128))])):f("v-if",!0),n("details",YC,[t[115]||(t[115]=n("summary",null,"Correlation ID and query scope",-1)),n("code",null,d(e.traceSelection.id),1),n("button",{type:"button",class:"log-copy-value",onClick:t[30]||(t[30]=o=>e.copyLogValue(e.traceSelection.id))},"Copy full ID"),t[116]||(t[116]=n("p",null,"Earliest matching events in the selected window. Service and release filters do not narrow this timeline.",-1))]),e.trace?.grafanaUrl?(a(),l("a",{key:4,href:e.safeUrl(e.trace.grafanaUrl),target:"_blank",rel:"noopener noreferrer"},"Open in Grafana",8,JC)):f("v-if",!0)],8,TC)):f("v-if",!0)])):f("v-if",!0)])}var XC={class:"container paper-page admin-page overview-page"},QC={key:0,class:"admin-empty"},ZC={key:1,class:"alert alert-danger",style:{margin:"12px 0"}},xC={class:"ov-views",role:"tablist","aria-label":"Overview sections"},eS=["aria-selected","onClick"],tS={key:2},nS={key:0,class:"ov-health",role:"status"},oS={class:"ov-kpi-row"},sS={class:"ov-kpi-card"},iS={class:"ov-kpi-value"},rS={class:"ov-kpi-sub"},aS={class:"ov-kpi-card"},lS={class:"ov-kpi-sub"},dS={class:"ov-kpi-card"},uS={class:"ov-kpi-sub"},cS={class:"ov-kpi-card"},pS={class:"ov-kpi-sub"},fS={class:"ov-kpi-card"},mS={class:"ov-kpi-value"},hS={class:"ov-kpi-sub"},gS={class:"ov-daily-row"},vS={class:"ov-daily-card"},yS={class:"ov-daily-value"},bS={class:"ov-daily-card"},wS={class:"ov-daily-value"},kS={class:"ov-daily-sub"},CS={class:"ov-daily-card"},SS={class:"ov-daily-value"},ES={class:"ov-chart-card"},NS={class:"ov-chart-head"},RS={class:"ov-chart-legends"},TS={class:"ov-chart-legend"},PS={key:0,class:"ov-legend-missing"},DS={key:0,class:"ov-spark-bars ov-has-axis"},AS={class:"ov-yaxis","aria-hidden":"true"},IS=["data-tip","aria-label"],OS={key:1,class:"ov-spark-x"},MS={class:"ov-chart-card"},VS={class:"ov-chart-head"},qS={class:"ov-chart-legends"},LS={class:"ov-chart-legend"},$S={key:0,class:"ov-legend-missing"},_S={key:0,class:"ov-spark-bars ov-has-axis"},FS={class:"ov-yaxis","aria-hidden":"true"},US=["data-tip","aria-label"],BS={key:1,class:"ov-spark-x"},zS={key:0,class:"ov-chart-card"},HS={class:"ov-chart-head"},jS={class:"ov-chart-legends"},GS={class:"ov-chart-legend"},WS={key:0,class:"ov-legend-missing"},KS={key:0,class:"ov-spark-bars ov-spark-step ov-has-axis"},YS={class:"ov-yaxis","aria-hidden":"true"},JS=["viewBox","aria-label"],XS=["d"],QS=["d"],ZS={key:1,class:"ov-spark-x"},xS={class:"ov-chart-card"},eE={class:"ov-chart-head"},tE={class:"ov-chart-legends"},nE={class:"ov-chart-legend"},oE={key:0,class:"ov-legend-missing"},sE={key:0,class:"ov-spark-bars ov-has-axis"},iE={class:"ov-yaxis","aria-hidden":"true"},rE=["data-tip","aria-label"],aE={key:1,class:"ov-spark-x"},lE={class:"ov-triple-row"},dE={class:"ov-panel-card"},uE={class:"ov-panel-head"},cE={class:"ov-panel-meta"},pE={class:"ov-stacked-bar"},fE={class:"ov-bar-legend"},mE={href:"/admin/repositories",class:"ov-legend-item"},hE={class:"ov-legend-n"},gE={href:"/admin/repositories",class:"ov-legend-item"},vE={class:"ov-legend-n"},yE={href:"/admin/repositories",class:"ov-legend-item"},bE={class:"ov-legend-n"},wE={href:"/admin/repositories",class:"ov-legend-item"},kE={class:"ov-legend-n"},CE={href:"/admin/repositories",class:"ov-legend-item"},SE={class:"ov-legend-n"},EE={class:"ov-panel-card"},NE={class:"ov-panel-head"},RE={class:"ov-panel-meta"},TE={class:"ov-error-bars"},PE={class:"ov-ebar-row"},DE={class:"ov-ebar-track"},AE={class:"ov-ebar-n"},IE={class:"ov-ebar-row"},OE={class:"ov-ebar-track"},ME={class:"ov-ebar-n"},VE={key:0,class:"ov-ehours",role:"img","aria-label":"Errors per hour over the last 24 hours"},qE={class:"ov-ehours-legend"},LE={class:"ov-ehours-note"},$E={class:"ov-ehours-bars"},_E=["title"],FE={key:0,class:"ov-ehours-zero"},UE={class:"ov-ebar-note"},BE={key:0,class:"ov-panel-foot"},zE={href:"/admin/errors"},HE={class:"ov-panel-card"},jE={class:"ov-routes-table"},GE={class:"ov-route-row",href:"/admin/queues"},WE={class:"ov-route-n"},KE={class:"ov-route-n"},YE={class:"ov-route-row",href:"/admin/queues"},JE={class:"ov-route-n"},XE={class:"ov-route-n"},QE={class:"ov-route-row",href:"/admin/queues"},ZE={class:"ov-route-n"},xE={class:"ov-route-n"},eN={class:"ov-services-card"},tN={class:"ov-services-head"},nN={class:"ov-panel-meta"},oN={class:"ov-services-grid"},sN={class:"ov-svc"},iN={class:"ov-svc-info"},rN={class:"ov-svc-meta"},aN={class:"ov-svc"},lN={class:"ov-svc-info"},dN={key:0,class:"ov-svc-meta"},uN={key:1,class:"ov-svc-meta"},cN={class:"ov-svc"},pN={class:"ov-svc-info"},fN={key:0,class:"ov-svc-meta"},mN={key:1,class:"ov-svc-meta"},hN={class:"ov-svc"},gN={class:"ov-svc-info"},vN={key:0,class:"ov-svc-meta"},yN={key:1,class:"ov-svc-meta"},bN={class:"ov-svc"},wN=["title"],kN={class:"ov-svc-info"},CN={class:"ov-svc-meta"},SN={class:"ov-panel-card ov-cache","aria-labelledby":"cache-heading"},EN={class:"ov-panel-head ov-performance-head"},NN={class:"ov-performance-window"},RN={key:0,class:"ov-performance-message ov-performance-warning",role:"alert"},TN={key:1,class:"ov-performance-empty",role:"status"},PN={key:0,class:"ov-performance-note"},DN={key:1,class:"ov-performance-note"},AN={key:2,class:"ov-performance-message ov-performance-warning",role:"status"},IN={key:3,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Cache storage budgets"},ON={class:"ov-metrics-table"},MN={scope:"row",class:"ov-event-name"},VN=["title"],qN={key:0,class:"ov-metric-bad-text"},LN={key:1,class:"budget-bar","aria-hidden":"true"},$N={class:"num"},_N={class:"num"},FN={class:"num"},UN={class:"num"},BN={key:4,class:"ov-cache-rates"},zN={key:5,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Cache events and processing durations"},HN={class:"ov-metrics-table"},jN={scope:"row",class:"ov-event-name"},GN={class:"ov-event-traffic"},WN={class:"num"},KN={class:"num"},YN={key:6,class:"ov-performance-empty",role:"status"},JN={class:"ov-performance-note"},XN={class:"ov-panel-card ov-performance","aria-labelledby":"performance-heading"},QN={class:"ov-panel-head ov-performance-head"},ZN={class:"ov-performance-window"},xN={key:0,class:"ov-performance-message ov-performance-warning",role:"alert"},eR={key:1,class:"ov-performance-empty",role:"status"},tR={key:2},nR={id:"performance-routes",role:"region","aria-label":"Routes"},oR={key:0,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Route latency metrics, scroll for more columns"},sR={class:"ov-metrics-table"},iR={scope:"row",class:"ov-metric-name"},rR={class:"num"},aR={class:"num"},lR={class:"num"},dR={class:"num"},uR={class:"num"},cR={key:1,class:"ov-performance-empty"},pR={id:"performance-processes",role:"region","aria-label":"Processes"},fR={key:0,class:"ov-performance-message ov-performance-warning",role:"status"},mR={key:1,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Process resource metrics, scroll for more columns"},hR={class:"ov-metrics-table"},gR={scope:"row",class:"ov-metric-name"},vR={key:0,class:"ov-metric-warn"},yR={class:"num"},bR={class:"num"},wR={class:"num"},kR={class:"num"},CR={class:"num"},SR={class:"num"},ER={class:"num"},NR={class:"num"},RR={id:"performance-stages",role:"region","aria-label":"Work stages"},TR={key:0,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Work stage metrics, scroll for more columns"},PR={class:"ov-metrics-table"},DR={scope:"row",class:"ov-metric-name"},AR={class:"num"},IR={class:"num"},OR={class:"num"},MR={key:1,class:"ov-performance-empty"};function lp(e,t){return a(),l("div",XC,[t[95]||(t[95]=ke('
Admin \xA0/\xA0 Overview

Overview

Live \xB7 refreshes every 30s
',2)),e.loading?(a(),l("div",QC,"Loading overview\u2026")):f("v-if",!0),e.error?(a(),l("div",ZC,[t[8]||(t[8]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),h(" "+d(e.error),1)])):f("v-if",!0),n("div",xC,[(a(),l(V,null,Q([{id:"summary",label:"Summary"},{id:"performance",label:"Performance"},{id:"cache",label:"Cache"}],s=>n("button",{type:"button",role:"tab",key:s.id,"aria-selected":e.ovView===s.id?"true":"false",class:R({active:e.ovView===s.id}),onClick:i=>e.setOvView(s.id)},d(s.label),11,eS)),64))]),e.data?P((a(),l("div",tS,[e.data?.system?.memPercent>90||e.data?.system?.diskPercent>90?(a(),l("div",nS,[t[10]||(t[10]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,[t[9]||(t[9]=n("b",null,"Server needs attention.",-1)),h(" "+d(e.healthAlert()),1)])])):f("v-if",!0),f(" \u2500\u2500 Top KPI row \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",oS,[n("div",sS,[t[11]||(t[11]=n("div",{class:"ov-kpi-label"},"Live repositories",-1)),n("div",iS,d(e.humanNum((e.data?.repos?.statusBreakdown||[]).filter(s=>s._id!=="removed"&&s._id!=="expired").reduce((s,i)=>s+(i.count||0),0))),1),n("div",rS,d(e.humanNum(((e.data?.repos?.statusBreakdown||[]).find(s=>s._id==="removed")||{}).count||0))+" removed \xB7 "+d(e.humanNum(e.data?.repos?.total))+" total",1)]),n("div",aS,[t[12]||(t[12]=n("div",{class:"ov-kpi-label"},"CPU",-1)),n("div",{class:R(["ov-kpi-value",{"ov-val-warn":e.data?.system?.cpuPercent>=75}])},d(e.data?.system?.cpuPercent)+"%",3),n("div",{class:R(["ov-meter",{warn:e.data?.system?.cpuPercent>=75,crit:e.data?.system?.cpuPercent>90}])},[n("span",{style:Ae({width:Math.min(100,e.data?.system?.cpuPercent||0)+"%"})},null,4)],2),n("div",lS,[e.data?.system?.cpuPercent>=75?(a(),l("b",{key:0,class:R(["ov-flag",{critical:e.data?.system?.cpuPercent>90}])},d(e.data?.system?.cpuPercent>90?"Critical":"High")+" \xB7 ",3)):f("v-if",!0),h(d(e.data?.system?.cpuCount)+" cores \xB7 load "+d(e.data?.system?.loadAvg?.[0]?.toFixed(1)),1)])]),n("div",dS,[t[13]||(t[13]=n("div",{class:"ov-kpi-label"},"Memory",-1)),n("div",{class:R(["ov-kpi-value",{"ov-val-warn":e.data?.system?.memPercent>=75}])},d(e.data?.system?.memPercent)+"%",3),n("div",{class:R(["ov-meter",{warn:e.data?.system?.memPercent>=75,crit:e.data?.system?.memPercent>90}])},[n("span",{style:Ae({width:Math.min(100,e.data?.system?.memPercent||0)+"%"})},null,4)],2),n("div",uS,[e.data?.system?.memPercent>=75?(a(),l("b",{key:0,class:R(["ov-flag",{critical:e.data?.system?.memPercent>90}])},d(e.data?.system?.memPercent>90?"Critical":"High")+" \xB7 ",3)):f("v-if",!0),h(d(e.humanBytes(e.data?.system?.memUsed).replace(/\s*GB$/,""))+" / "+d(e.humanBytes(e.data?.system?.memTotal)),1)])]),n("div",cS,[t[14]||(t[14]=n("div",{class:"ov-kpi-label"},"Disk",-1)),n("div",{class:R(["ov-kpi-value",{"ov-val-warn":e.data?.system?.diskPercent>=75}])},d(e.data?.system?.diskPercent)+"%",3),n("div",{class:R(["ov-meter",{warn:e.data?.system?.diskPercent>=75,crit:e.data?.system?.diskPercent>90}])},[n("span",{style:Ae({width:Math.min(100,e.data?.system?.diskPercent||0)+"%"})},null,4)],2),n("div",pS,[e.data?.system?.diskPercent>=75?(a(),l("b",{key:0,class:R(["ov-flag",{critical:e.data?.system?.diskPercent>90}])},d(e.data?.system?.diskPercent>90?"Critical":"High")+" \xB7 ",3)):f("v-if",!0),h(d(e.humanBytes(e.data?.system?.diskUsed).replace(/\s*GB$/,""))+" / "+d(e.humanBytes(e.data?.system?.diskTotal)),1),e.data?.system?.diskMount&&e.data.system.diskMount!=="/"?(a(),l(V,{key:1},[h(" \xB7 "+d(e.data?.system?.diskMount),1)],64)):f("v-if",!0)])]),n("div",fS,[t[15]||(t[15]=n("div",{class:"ov-kpi-label"},"Uptime",-1)),n("div",mS,d(e.humanDuration(e.data?.system?.uptime)),1),n("div",hS,d(e.data?.system?.nodeVersion)+" \xB7 "+d(e.data?.system?.platform),1)])]),f(" \u2500\u2500 Daily activity highlights \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",gS,[n("div",vS,[t[16]||(t[16]=n("div",{class:"ov-daily-label"},"New repos today",-1)),n("div",yS,d(e.fmt?.number(e.data?.daily?.today?.repositories||0)),1),t[17]||(t[17]=n("div",{class:"ov-daily-sub"},"so far today",-1))]),n("div",bS,[t[18]||(t[18]=n("div",{class:"ov-daily-label"},"New users today",-1)),n("div",wS,d(e.fmt?.number(e.data?.daily?.today?.users||0)),1),n("div",kS,d(e.fmt?.number(e.data?.users?.total))+" total \xB7 +"+d(e.fmt?.number(e.usersGained()))+" in 30 days",1)]),n("div",CS,[t[19]||(t[19]=n("div",{class:"ov-daily-label"},"Page views today",-1)),n("div",SS,d(e.fmt?.number(e.data?.daily?.today?.pageViews||0)),1),t[20]||(t[20]=n("div",{class:"ov-daily-sub"},"so far today",-1))])]),f(" \u2500\u2500 Daily charts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",{class:R(["ov-chart-row",{"is-three":e.usersTiny()}])},[n("div",ES,[n("div",NS,[t[23]||(t[23]=n("span",{class:"ov-chart-title"},"Daily page views \xB7 30d",-1)),n("span",RS,[n("span",TS,[t[21]||(t[21]=n("span",{class:"ov-dot-legend ov-dot-accent"},null,-1)),h("views/day \xB7 peak "+d(e.fmt?.number(e.historyMax("dailyPageViews"))),1)]),e.historyHasMissing()?(a(),l("span",PS,[...t[22]||(t[22]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),h("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",DS,[n("div",AS,[n("span",null,d(e.fmt?.number(e.axisMax("dailyPageViews"))),1),n("span",null,d(e.fmt?.number(e.axisMax("dailyPageViews")/2)),1),t[24]||(t[24]=n("span",null,"0",-1))]),(a(!0),l(V,null,Q(e.data?.history,(s,i)=>(a(),l("div",{class:R(["ov-spark-col has-tip",{"is-missing":s?._empty}]),key:i,"data-tip":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyPageViews)+(s?.dailyPageViews===1?" view":" views"),"aria-label":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyPageViews)+(s?.dailyPageViews===1?" view":" views")},[n("span",{class:"ov-spark-fill",style:Ae({height:e.historyBarH(s,"dailyPageViews")+"px"})},null,4)],10,IS))),128))])):f("v-if",!0),e.data?.history?.length?(a(),l("div",OS,[n("span",null,d(e.historyLabel(e.data?.history[0])),1),n("span",null,d(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,d(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),n("div",MS,[n("div",VS,[t[27]||(t[27]=n("span",{class:"ov-chart-title"},"New repos \xB7 30d",-1)),n("span",qS,[n("span",LS,[t[25]||(t[25]=n("span",{class:"ov-dot-legend ov-dot-ok-fill"},null,-1)),h("repos/day \xB7 peak "+d(e.fmt?.number(e.historyMax("dailyRepositories"))),1)]),e.historyHasMissing()?(a(),l("span",$S,[...t[26]||(t[26]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),h("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",_S,[n("div",FS,[n("span",null,d(e.fmt?.number(e.axisMax("dailyRepositories"))),1),n("span",null,d(e.fmt?.number(e.axisMax("dailyRepositories")/2)),1),t[28]||(t[28]=n("span",null,"0",-1))]),(a(!0),l(V,null,Q(e.data?.history,(s,i)=>(a(),l("div",{class:R(["ov-spark-col has-tip",{"is-missing":s?._empty}]),key:i,"data-tip":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyRepositories)+(s?.dailyRepositories===1?" repo":" repos"),"aria-label":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyRepositories)+(s?.dailyRepositories===1?" repo":" repos")},[n("span",{class:"ov-spark-fill ov-spark-fill-alt",style:Ae({height:e.historyBarH(s,"dailyRepositories")+"px"})},null,4)],10,US))),128))])):f("v-if",!0),e.data?.history?.length?(a(),l("div",BS,[n("span",null,d(e.historyLabel(e.data?.history[0])),1),n("span",null,d(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,d(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),e.usersTiny()?f("v-if",!0):(a(),l("div",zS,[n("div",HS,[t[31]||(t[31]=n("span",{class:"ov-chart-title"},"Users \xB7 30d",-1)),n("span",jS,[n("span",GS,[t[29]||(t[29]=n("span",{class:"ov-dot-legend ov-dot-user-fill"},null,-1)),h("total users \xB7 "+d(e.fmt?.number(e.historyRange("nbUsers").max))+" now \xB7 +"+d(e.fmt?.number(Math.max(0,e.historyRange("nbUsers").max-e.usersFirst())))+" in 30 days",1)]),e.historyHasMissing()?(a(),l("span",WS,[...t[30]||(t[30]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),h("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",KS,[n("div",YS,[n("span",null,d(e.fmt?.number(e.userAxis().hi)),1),n("span",null,d(e.fmt?.number((e.userAxis().hi+e.userAxis().lo)/2)),1),n("span",null,d(e.fmt?.number(e.userAxis().lo)),1)]),(a(),l("svg",{class:"ov-step-svg",viewBox:"0 0 "+e.data.history.length+" 140",preserveAspectRatio:"none",role:"img","aria-label":"Total users over 30 days, from "+e.fmt?.number(e.usersFirst())+" to "+e.fmt?.number(e.historyRange("nbUsers").max)},[e.userAxis().lo===0?(a(),l("path",{key:0,class:"ov-step-area",d:e.userStepPath(!0)},null,8,XS)):f("v-if",!0),n("path",{class:"ov-step-line",d:e.userStepPath(!1),"vector-effect":"non-scaling-stroke"},null,8,QS)],8,JS)),e.firstDataIndex()>0?(a(),l("div",{key:0,class:"ov-step-missing",style:Ae({width:e.firstDataIndex()/e.data.history.length*100+"%"})},null,4)):f("v-if",!0)])):f("v-if",!0),e.data?.history?.length?(a(),l("div",ZS,[n("span",null,d(e.historyLabel(e.data?.history[0])),1),n("span",null,d(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,d(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)])),n("div",xS,[n("div",eE,[t[34]||(t[34]=n("span",{class:"ov-chart-title"},"New users \xB7 30d",-1)),n("span",tE,[n("span",nE,[t[32]||(t[32]=n("span",{class:"ov-dot-legend ov-dot-new-user-fill"},null,-1)),h("users/day \xB7 peak "+d(e.fmt?.number(e.historyMax("dailyUsers"))),1)]),e.historyHasMissing()?(a(),l("span",oE,[...t[33]||(t[33]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),h("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",sE,[n("div",iE,[n("span",null,d(e.fmt?.number(e.axisMax("dailyUsers"))),1),n("span",null,d(e.fmt?.number(e.axisMax("dailyUsers")/2)),1),t[35]||(t[35]=n("span",null,"0",-1))]),(a(!0),l(V,null,Q(e.data?.history,(s,i)=>(a(),l("div",{class:R(["ov-spark-col has-tip",{"is-missing":s?._empty}]),key:i,"data-tip":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyUsers)+(s?.dailyUsers===1?" user":" users"),"aria-label":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyUsers)+(s?.dailyUsers===1?" user":" users")},[n("span",{class:"ov-spark-fill ov-spark-fill-new-user",style:Ae({height:e.historyBarH(s,"dailyUsers")+"px"})},null,4)],10,rE))),128))])):f("v-if",!0),e.data?.history?.length?(a(),l("div",aE,[n("span",null,d(e.historyLabel(e.data?.history[0])),1),n("span",null,d(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,d(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)])],2),f(" \u2500\u2500 Three-panel row: Status / Errors / Queues \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",lE,[f(" Repo status breakdown "),n("div",dE,[n("div",uE,[t[36]||(t[36]=n("span",{class:"ov-panel-title"},"Repo status",-1)),n("span",cE,d(e.fmt?.number(e.data?.repos?.total))+" total",1)]),n("div",pE,[e.barPct("ready")>0?(a(),l("span",{key:0,class:"ov-bar-seg ov-bar-ready",title:"Ready",style:Ae({width:e.barPct("ready")+"%"})},null,4)):f("v-if",!0),e.barPct("preparing")>0?(a(),l("span",{key:1,class:"ov-bar-seg ov-bar-preparing",title:"Preparing",style:Ae({width:e.barPct("preparing")+"%"})},null,4)):f("v-if",!0),e.barPct("error")>0?(a(),l("span",{key:2,class:"ov-bar-seg ov-bar-error",title:"Error",style:Ae({width:e.barPct("error")+"%"})},null,4)):f("v-if",!0),e.barPct("expired")>0?(a(),l("span",{key:3,class:"ov-bar-seg ov-bar-expired",title:"Expiring / expired",style:Ae({width:e.barPct("expired")+"%"})},null,4)):f("v-if",!0),e.barPct("removed")>0?(a(),l("span",{key:4,class:"ov-bar-seg ov-bar-removed",title:"Removing / removed",style:Ae({width:e.barPct("removed")+"%"})},null,4)):f("v-if",!0)]),n("div",fE,[n("a",mE,[t[37]||(t[37]=n("span",{class:"ov-swatch ov-bar-ready"},null,-1)),t[38]||(t[38]=h(" Ready ",-1)),n("span",hE,d(e.fmt?.number(e.statusCount("ready"))),1)]),n("a",gE,[t[39]||(t[39]=n("span",{class:"ov-swatch ov-bar-preparing"},null,-1)),t[40]||(t[40]=h(" Preparing ",-1)),n("span",vE,d(e.fmt?.number(e.statusCount("preparing")+e.statusCount("download"))),1)]),n("a",yE,[t[41]||(t[41]=n("span",{class:"ov-swatch ov-bar-error"},null,-1)),t[42]||(t[42]=h(" Error ",-1)),n("span",bE,d(e.fmt?.number(e.statusCount("error"))),1)]),n("a",wE,[t[43]||(t[43]=n("span",{class:"ov-swatch ov-bar-expired"},null,-1)),t[44]||(t[44]=h(" Expiring / expired ",-1)),n("span",kE,d(e.fmt?.number(e.statusCount("expired")+e.statusCount("expiring"))),1)]),n("a",CE,[t[45]||(t[45]=n("span",{class:"ov-swatch ov-bar-removed"},null,-1)),t[46]||(t[46]=h(" Removing / removed ",-1)),n("span",SE,d(e.fmt?.number(e.statusCount("removed")+e.statusCount("removing"))),1)])])]),f(" Error breakdown "),n("div",EE,[n("div",NE,[t[47]||(t[47]=n("span",{class:"ov-panel-title"},"Errors \xB7 24h",-1)),n("span",RE,d(e.fmt?.number(e.realErrors()))+" "+d(e.realErrors()===1?"error":"errors"),1)]),n("div",TE,[n("div",PE,[t[48]||(t[48]=n("span",{class:"ov-ebar-label"},"Error",-1)),n("span",DE,[n("span",{class:"ov-ebar-fill ov-ebar-error",style:Ae({width:e.errPct("error")+"%"})},null,4)]),n("span",AE,d(e.data?.errors?.severity?.error),1)]),n("div",IE,[t[49]||(t[49]=n("span",{class:"ov-ebar-label"},"Warning",-1)),n("span",OE,[n("span",{class:"ov-ebar-fill ov-ebar-warn",style:Ae({width:e.errPct("warn")+"%"})},null,4)]),n("span",ME,d(e.data?.errors?.severity?.warn),1)]),e.errorHours().length?(a(),l("div",VE,[n("div",qE,[t[52]||(t[52]=n("span",{class:"ov-ehours-key"},[n("span",{class:"ov-ehours-swatch is-error","aria-hidden":"true"}),h("Error")],-1)),t[53]||(t[53]=n("span",{class:"ov-ehours-key"},[n("span",{class:"ov-ehours-swatch is-warn","aria-hidden":"true"}),h("Warning")],-1)),n("span",LE,[t[50]||(t[50]=h("Per hour",-1)),t[51]||(t[51]=n("span",{class:"seg-sep","aria-hidden":"true"},"\xB7",-1)),h("peak "+d(e.fmt?.number(e.errorHoursPeak())),1)])]),n("div",$E,[(a(!0),l(V,null,Q(e.errorHours(),s=>(a(),l("span",{key:s.key,class:R({"is-bad":s.bad,"is-zero":s.zero}),title:s.title},[s.zero?(a(),l("i",FE)):(a(),l(V,{key:1},[s.errPct?(a(),l("i",{key:0,class:"ov-ehours-e",style:Ae({height:s.errPct+"%"})},null,4)):f("v-if",!0),s.warnPct?(a(),l("i",{key:1,class:"ov-ehours-w",style:Ae({height:s.warnPct+"%"})},null,4)):f("v-if",!0)],64))],10,_E))),128))]),t[54]||(t[54]=n("div",{class:"ov-ehours-x"},[n("span",null,"24h ago"),n("span",null,"now")],-1))])):f("v-if",!0),n("p",UE,"Info "+d(e.fmt?.number(e.data?.errors?.severity?.info||0))+" \xB7 logged, not counted as errors",1)]),e.data?.repos?.recentErrors24h?(a(),l("div",BE,[n("a",zE,d(e.data?.repos?.recentErrors24h)+" repos in error state \u2192",1)])):f("v-if",!0)]),f(" Top routes / queues "),n("div",HE,[t[59]||(t[59]=n("div",{class:"ov-panel-head"},[n("span",{class:"ov-panel-title"},"Queues"),n("span",{class:"ov-panel-meta"},"by state")],-1)),n("div",jE,[t[58]||(t[58]=ke('
QueueActiveWaitFailed
',1)),n("a",GE,[t[55]||(t[55]=n("span",{class:"ov-route-name"},"Download",-1)),n("span",WE,d(e.data?.queues?.download?.active),1),n("span",KE,d(e.data?.queues?.download?.waiting),1),n("span",{class:R(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.download?.failed>0}])},d(e.data?.queues?.download?.failed),3)]),n("a",YE,[t[56]||(t[56]=n("span",{class:"ov-route-name"},"Remove",-1)),n("span",JE,d(e.data?.queues?.remove?.active),1),n("span",XE,d(e.data?.queues?.remove?.waiting),1),n("span",{class:R(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.remove?.failed>0}])},d(e.data?.queues?.remove?.failed),3)]),n("a",QE,[t[57]||(t[57]=n("span",{class:"ov-route-name"},"Cache cleanup",-1)),n("span",ZE,d(e.data?.queues?.cache?.active),1),n("span",xE,d(e.data?.queues?.cache?.waiting),1),n("span",{class:R(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.cache?.failed>0}])},d(e.data?.queues?.cache?.failed),3)])])])]),f(" \u2500\u2500 Services bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",eN,[n("div",tN,[t[60]||(t[60]=n("span",{class:"ov-panel-title"},"Services",-1)),n("span",nN,"5 services \xB7 "+d(e.realErrors()>0?"1 needs attention":"all healthy"),1)]),n("div",oN,[n("div",sN,[t[62]||(t[62]=n("span",{class:"ov-svc-dot ov-dot-ok"},null,-1)),n("div",iN,[t[61]||(t[61]=n("span",{class:"ov-svc-name"},"web",-1)),n("span",rN,d(e.data?.system?.nodeVersion)+" \xB7 up "+d(e.humanDuration(e.data?.system?.uptime)),1)])]),n("div",aN,[n("span",{class:R(["ov-svc-dot",e.queueTotal(e.data?.queues?.download)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),n("div",lN,[t[63]||(t[63]=n("span",{class:"ov-svc-name"},"download",-1)),e.queueTotal(e.data?.queues?.download)?(a(),l("span",dN,d(e.queueTotal(e.data?.queues?.download))+" "+d(e.queueTotal(e.data?.queues?.download)===1?"job":"jobs"),1)):f("v-if",!0),e.queueTotal(e.data?.queues?.download)?f("v-if",!0):(a(),l("span",uN,"idle"))])]),n("div",cN,[n("span",{class:R(["ov-svc-dot",e.queueTotal(e.data?.queues?.cache)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),n("div",pN,[t[64]||(t[64]=n("span",{class:"ov-svc-name"},"cache",-1)),e.queueTotal(e.data?.queues?.cache)?(a(),l("span",fN,d(e.queueTotal(e.data?.queues?.cache))+" "+d(e.queueTotal(e.data?.queues?.cache)===1?"job":"jobs"),1)):f("v-if",!0),e.queueTotal(e.data?.queues?.cache)?f("v-if",!0):(a(),l("span",mN,"idle"))])]),n("div",hN,[n("span",{class:R(["ov-svc-dot",e.queueTotal(e.data?.queues?.remove)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),n("div",gN,[t[65]||(t[65]=n("span",{class:"ov-svc-name"},"remove",-1)),e.queueTotal(e.data?.queues?.remove)?(a(),l("span",vN,d(e.queueTotal(e.data?.queues?.remove))+" "+d(e.queueTotal(e.data?.queues?.remove)===1?"job":"jobs"),1)):f("v-if",!0),e.queueTotal(e.data?.queues?.remove)?f("v-if",!0):(a(),l("span",yN,"idle"))])]),n("div",bN,[n("span",{class:R(["ov-svc-dot",e.realErrors()>0?"ov-dot-warn":"ov-dot-ok"]),title:e.realErrors()>0?"Errors in the last 24 hours":"No errors in the last 24 hours"},null,10,wN),n("div",kN,[t[66]||(t[66]=n("span",{class:"ov-svc-name"},"errors",-1)),n("span",CN,d(e.fmt?.number(e.realErrors()))+" / 24h",1)])])])])],512)),[[Z,e.ovView==="summary"]]):f("v-if",!0),P(n("section",SN,[n("div",EN,[t[71]||(t[71]=n("div",null,[n("h2",{class:"ov-panel-title",id:"cache-heading"},"Cache"),n("p",{class:"ov-performance-note"},"Shared storage, repeated reads and anonymization work")],-1)),n("div",NN,[t[69]||(t[69]=n("label",{for:"cache-window"},"Time range",-1)),P(n("select",{id:"cache-window",class:"form-control form-control-sm","onUpdate:modelValue":t[0]||(t[0]=s=>e.cacheMinutes=s),onChange:t[1]||(t[1]=s=>e.loadCache())},[...t[67]||(t[67]=[n("option",{value:15},"Last 15 minutes",-1),n("option",{value:60},"Last hour",-1),n("option",{value:1440},"Last 24 hours",-1),n("option",{value:10080},"Last 7 days",-1)])],544),[[Rt,e.cacheMinutes,void 0,{number:!0}]]),t[70]||(t[70]=n("label",{for:"cache-traffic"},"Traffic",-1)),P(n("select",{id:"cache-traffic",class:"form-control form-control-sm","onUpdate:modelValue":t[2]||(t[2]=s=>e.cacheTraffic=s)},[...t[68]||(t[68]=[ke('',6)])],512),[[Rt,e.cacheTraffic]])])]),e.cacheError?(a(),l("div",RN,[n("span",null,d(e.cacheError),1),n("button",{type:"button",class:"btn btn-sm",onClick:t[3]||(t[3]=s=>e.loadCache())},"Retry")])):f("v-if",!0),!e.cacheReport&&!e.cacheError?(a(),l("p",TN,"Loading cache monitoring\u2026")):f("v-if",!0),e.cacheReport?.available?(a(),l(V,{key:2},[e.cacheReport.enabled?f("v-if",!0):(a(),l("p",PN,"Shared blob storage is disabled. Inspection and legacy-cache activity are still measured.")),e.cacheReport.filesystemSupported?f("v-if",!0):(a(),l("p",DN,"Shared blobs require a local filesystem. The configured storage continues to use its existing cache.")),e.cacheReport.dropped?(a(),l("p",AN,d(e.cacheReport.dropped)+" telemetry events were dropped. Totals may be incomplete.",1)):f("v-if",!0),e.cacheReport.source?(a(),l("div",IN,[n("table",ON,[t[72]||(t[72]=n("caption",{class:"sr-only"},"Current shared-cache storage and byte budgets",-1)),t[73]||(t[73]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Pool"),n("th",{scope:"col",class:"num"},"Allocated / budget"),n("th",{scope:"col",class:"num"},"Reserved for fills"),n("th",{scope:"col",class:"num"},"Original bytes"),n("th",{scope:"col",class:"num"},"Blobs"),n("th",{scope:"col",class:"num"},"Active readers")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q([{name:"Source blobs",data:e.cacheReport.source},{name:"Transformed output",data:e.cacheReport.results}],s=>P((a(),l("tr",{key:s.name},[n("th",MN,d(s.name),1),n("td",{class:R(["num budget-cell",{"is-over":s.data?.budgetBytes&&s.data?.allocatedBytes>s.data?.budgetBytes}]),title:s.data?.budgetBytes?Math.round(100*(s.data?.allocatedBytes||0)/s.data.budgetBytes)+"% of budget":null},[s.data?.budgetBytes&&s.data?.allocatedBytes>s.data?.budgetBytes?(a(),l("span",qN,"Over budget \xB7 ")):f("v-if",!0),h(d(e.humanBytes(s.data?.allocatedBytes))+" / "+d(e.humanBytes(s.data?.budgetBytes)),1),s.data?.budgetBytes?(a(),l("span",LN,[n("i",{style:Ae({width:Math.min(100,Math.round(100*(s.data?.allocatedBytes||0)/s.data.budgetBytes))+"%"})},null,4)])):f("v-if",!0)],10,VN),n("td",$N,d(e.humanBytes(s.data?.reservedBytes)),1),n("td",_N,d(e.humanBytes(s.data?.originalBytes)),1),n("td",FN,d(e.fmt?.number(s.data?.blobs)),1),n("td",UN,d(e.fmt?.number(s.data?.activeReaders)),1)])),[[Z,s.data]])),128))])])])):f("v-if",!0),e.cacheReport.source?(a(),l("dl",BN,[n("div",null,[t[74]||(t[74]=n("dt",null,"Source request hit rate",-1)),n("dd",null,d(e.cacheRate("source","count")),1)]),n("div",null,[t[75]||(t[75]=n("dt",null,"Source byte hit rate",-1)),n("dd",null,d(e.cacheRate("source","bytes")),1)]),n("div",null,[t[76]||(t[76]=n("dt",null,"Decision hit rate",-1)),n("dd",null,d(e.cacheRate("decision","count")),1)])])):f("v-if",!0),t[79]||(t[79]=n("p",{class:"ov-performance-note"},"Reuse counts measure consecutive reads of the same blob within each interval. Codec timings are elapsed stream time, not CPU time; eviction times measure how long a blob was idle. Known monitors are identified by request metadata; other automation may remain in file reads.",-1)),e.cacheRows().length?(a(),l("div",zN,[n("table",HN,[t[77]||(t[77]=n("caption",{class:"sr-only"},"Cache events for the selected time range and traffic",-1)),t[78]||(t[78]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Event"),n("th",{scope:"col"},"Traffic"),n("th",{scope:"col",class:"num"},"Count"),n("th",{scope:"col",class:"num"},"Bytes"),n("th",{scope:"col",class:"num"},"Mean measured time"),n("th",{scope:"col",class:"num"},"p95 bound")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q(e.cacheRows(),s=>(a(),l("tr",{key:s.name+":"+s.traffic},[n("th",jN,d(e.cacheEventName(s.name)),1),n("td",GN,d(s.traffic),1),n("td",WN,d(e.fmt?.number(s.count)),1),n("td",KN,d(e.humanBytes(s.bytes)),1),n("td",{class:R(["num",{"ov-muted":!s.ms}])},d(s.ms?e.fmt.duration(s.ms/s.count):"Not timed"),3),n("td",{class:R(["num",{"ov-muted":!s.ms}])},d(e.cacheP95(s)),3)]))),128))])])])):(a(),l("p",YN,"No cache events in this time range for the selected traffic.")),n("p",JN,"Updated "+d(e.sampleAge(e.cacheReport))+" seconds ago. Minute history is retained for 48 hours; hourly history for 30 days.",1)],64)):f("v-if",!0)],512),[[Z,e.ovView==="cache"]]),P(n("section",XN,[n("div",QN,[t[84]||(t[84]=n("div",null,[n("h2",{class:"ov-panel-title",id:"performance-heading"},"Request performance"),n("p",{class:"ov-performance-note"},"Request latency and process health")],-1)),n("div",ZN,[e.performance?.available?(a(),l(V,{key:0},[t[81]||(t[81]=n("label",{for:"performance-view"},"Show",-1)),P(n("select",{id:"performance-view",class:"form-control form-control-sm","onUpdate:modelValue":t[4]||(t[4]=s=>e.performanceTab=s),"aria-label":"Performance metrics"},[...t[80]||(t[80]=[n("option",{value:"routes"},"Routes",-1),n("option",{value:"processes"},"Processes",-1),n("option",{value:"stages"},"Work stages",-1)])],512),[[Rt,e.performanceTab]])],64)):f("v-if",!0),t[83]||(t[83]=n("label",{for:"performance-window"},"Time range",-1)),P(n("select",{id:"performance-window",class:"form-control form-control-sm","onUpdate:modelValue":t[5]||(t[5]=s=>e.performanceMinutes=s),onChange:t[6]||(t[6]=s=>e.loadPerformance()),"aria-label":"Performance time range"},[...t[82]||(t[82]=[n("option",{value:15},"Last 15 minutes",-1),n("option",{value:60},"Last hour",-1)])],544),[[Rt,e.performanceMinutes,void 0,{number:!0}]])])]),e.performanceError?(a(),l("div",xN,[t[85]||(t[85]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,d(e.performanceError),1),n("button",{type:"button",class:"btn btn-sm",onClick:t[7]||(t[7]=s=>e.loadPerformance())},"Retry")])):f("v-if",!0),!e.performance&&!e.performanceError?(a(),l("p",eR,"Loading performance monitoring\u2026")):f("v-if",!0),e.performance?.available?(a(),l("div",tR,[P(n("div",nR,[e.performance.routes?.length?(a(),l("div",oR,[n("table",sR,[t[86]||(t[86]=n("caption",{class:"sr-only"},"Route latency for the selected time range",-1)),t[87]||(t[87]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Route"),n("th",{scope:"col",class:"num"},"Requests"),n("th",{scope:"col",class:"num"},"Average"),n("th",{scope:"col",class:"num"},"First byte p95"),n("th",{scope:"col",class:"num"},"p95"),n("th",{scope:"col",class:"num"},"p99"),n("th",{scope:"col",class:"num"},"Interrupted"),n("th",{scope:"col",class:"num"},"5xx"),n("th",{scope:"col",class:"num"},"Slow")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q(e.performance.routes,s=>(a(),l("tr",{key:s.service+s.method+s.route},[n("th",iR,[n("span",null,d(s.route),1),n("small",null,d(s.service)+" \xB7 "+d(s.method),1)]),n("td",rR,d(e.fmt.number(s.count)),1),n("td",aR,d(e.formatMs(s.avgMs)),1),n("td",lR,d(e.firstByteBound(s)),1),n("td",dR,d(e.latencyBound(s,"p95UpperMs")),1),n("td",uR,d(e.latencyBound(s,"p99UpperMs")),1),n("td",{class:R(["num",{"ov-metric-warn":s.aborted>0}])},d(e.fmt.number(s.aborted)),3),n("td",{class:R(["num",{"ov-metric-bad":s.errors>0}])},d(e.fmt.number(s.errors)),3),n("td",{class:R(["num",{"ov-metric-warn":s.slow>0}])},d(e.fmt.number(s.slow)),3)]))),128))])])])):(a(),l("p",cR,"No recorded requests in this time range yet."))],512),[[Z,e.performanceTab==="routes"]]),P(n("div",pR,[t[91]||(t[91]=n("p",{class:"ov-performance-note"},"API and streamer processes \xB7 latest sample per instance",-1)),e.performance.instances?.length?(a(),l("div",mR,[n("table",hR,[t[89]||(t[89]=n("caption",{class:"sr-only"},"API and streamer process resource usage",-1)),t[90]||(t[90]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Process"),n("th",{scope:"col",class:"num"},"RSS / limit"),n("th",{scope:"col",class:"num"},"CPU"),n("th",{scope:"col",class:"num"},"Event loop p95"),n("th",{scope:"col",class:"num"},"Active requests"),n("th",{scope:"col",class:"num"},"Sockets / CLOSE_WAIT"),n("th",{scope:"col",class:"num"},"Workers / waiting"),n("th",{scope:"col",class:"num"},"Sample age"),n("th",{scope:"col",class:"num"},"Dropped batches / metrics")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q(e.performance.instances,s=>(a(),l("tr",{key:s.instance,class:R({"ov-metric-warning-row":e.performanceWarning(s)})},[n("th",gR,[n("span",null,d(s.instance),1),e.performanceWarning(s)?(a(),l("small",vR,[...t[88]||(t[88]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1),h(" Needs attention",-1)])])):f("v-if",!0)]),n("td",yR,[h(d(e.humanBytes(s.memory.rss))+" / "+d(e.humanBytes(s.memoryLimitBytes)),1),n("small",null,"Peak "+d(e.humanBytes(e.peakRss(s))),1)]),n("td",bR,d(s.cpuPercent==null?"Unavailable":s.cpuPercent.toFixed(1)+"%"),1),n("td",wR,d(s.eventLoop?.p95Ms==null?"Not applicable":e.fmt.duration(s.eventLoop.p95Ms)),1),n("td",kR,d(s.activeRequests),1),n("td",CR,d(s.sockets?.descriptors??"Unavailable")+" / "+d(s.sockets?.closeWait??"Unavailable"),1),n("td",SR,d(s.workers?.running??0)+" / "+d(s.workers?.waiting??0),1),n("td",ER,d(e.sampleAge(s))+" s",1),n("td",NR,d(s.droppedBatches)+" / "+d(s.droppedMetrics),1)],2))),128))])])])):(a(),l("div",fR,"No recent process samples. Monitoring coverage is incomplete."))],512),[[Z,e.performanceTab==="processes"]]),P(n("div",RR,[e.performance.stages?.some(s=>s.metric!=="first_byte")?(a(),l("div",TR,[n("table",PR,[t[92]||(t[92]=n("caption",{class:"sr-only"},"Work stages and cache results",-1)),t[93]||(t[93]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Work stage"),n("th",{scope:"col",class:"num"},"Samples"),n("th",{scope:"col",class:"num"},"Average"),n("th",{scope:"col",class:"num"},"p95")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q(e.performance.stages.filter(s=>s.metric!=="first_byte"),s=>(a(),l("tr",{key:s.service+s.metric},[n("th",DR,[n("span",null,d(s.metric),1),n("small",null,d(s.service),1)]),n("td",AR,d(e.fmt.number(s.count)),1),n("td",IR,d(e.formatMs(s.avgMs)),1),n("td",OR,d(e.latencyBound(s,"p95UpperMs")),1)]))),128))])])])):(a(),l("p",MR,"No recorded work stages or cache results in this time range yet."))],512),[[Z,e.performanceTab==="stages"]]),t[94]||(t[94]=n("details",{class:"ov-performance-help"},[n("summary",null,"How to read these metrics"),n("p",null,"Latency includes upstream waits and response transfer. Percentiles show histogram bucket upper bounds, not exact timings. Process rows marked \u201CNeeds attention\u201D have stale samples, dropped monitoring data, CLOSE_WAIT sockets, high event loop delay, or high memory usage.")],-1))])):f("v-if",!0)],512),[[Z,e.ovView==="performance"]])])}var VR={class:"container paper-page admin-page"},qR={class:"q-header"},LR={class:"q-header-actions"},$R={class:"q-cards"},_R=["aria-pressed","onKeydown","onClick"],FR={class:"q-card-head"},UR=["title"],BR=["textContent"],zR=["textContent"],HR={class:"q-card-sub"},jR={class:"q-card-failed"},GR={key:0,class:"q-card-bar"},WR={key:0,class:"q-detail"},KR={class:"q-throughput"},YR={class:"q-range-btns"},JR={class:"q-section-label"},XR={key:0,class:"q-section-right"},QR={class:"q-chart-wrap"},ZR={key:0,class:"q-chart-empty"},xR={class:"q-stats-panel"},eT={class:"q-section-label"},tT={class:"q-stats-grid"},nT={class:"q-stat"},oT=["textContent"],sT={class:"q-stat"},iT=["textContent"],rT={class:"q-stat"},aT=["textContent"],lT={class:"q-stat"},dT=["textContent"],uT={class:"q-stat"},cT=["textContent"],pT={class:"q-stat"},fT=["textContent"],mT={class:"q-stats-actions"},hT=["disabled"],gT={class:"q-danger-group"},vT={class:"q-jobs"},yT={class:"q-jobs-header"},bT={class:"q-section-label"},wT={class:"seg-filter",role:"radiogroup","aria-label":"Filter jobs by state"},kT=["aria-checked"],CT={class:"count"},ST=["aria-checked"],ET={class:"count"},NT=["aria-checked"],RT={class:"count"},TT=["aria-checked"],PT={class:"count"},DT=["aria-checked"],AT={class:"count"},IT=["aria-checked"],OT={class:"count"},MT={class:"q-search-row"},VT={type:"search",class:"form-control",placeholder:"Search by job/repo id\u2026",autocomplete:"off"},qT={class:"q-auto-refresh"},LT={type:"checkbox"},$T={key:0,class:"q-table"},_T=["onClick"],FT={class:"q-cell-state"},UT=["textContent"],BT=["textContent"],zT=["title"],HT=["textContent","href"],jT=["title","textContent"],GT=["textContent"],WT=["textContent"],KT={class:"q-cell-progress"},YT=["aria-label"],JT=["textContent"],XT={class:"q-cell-actions"},QT=["onClick"],ZT=["onClick"],xT={key:0,class:"q-detail-row"},e4={colspan:"7"},t4={class:"q-job-detail"},n4={class:"q-job-detail-grid"},o4={class:"q-job-detail-item"},s4={class:"q-job-detail-value"},i4=["textContent","href"],r4={class:"q-job-detail-item"},a4={class:"q-job-detail-value"},l4=["textContent"],d4={key:0,class:"q-job-detail-item"},u4=["textContent"],c4={key:1,class:"q-job-detail-item"},p4=["textContent"],f4={key:2,class:"q-job-detail-item"},m4={class:"q-job-detail-value"},h4={key:3,class:"q-job-detail-item"},g4=["textContent"],v4={key:4,class:"q-job-detail-item"},y4=["textContent"],b4={key:5,class:"q-job-detail-item"},w4=["textContent"],k4={key:6,class:"q-job-detail-item"},C4=["textContent"],S4={key:7,class:"q-job-detail-item"},E4=["textContent"],N4={key:0,class:"q-job-detail-error"},R4=["textContent"],T4={key:1},P4=["textContent"],D4={class:"q-job-detail-actions"},A4=["onClick"],I4=["onClick"],O4=["href"],M4={key:1,class:"paper-table-empty",style:{border:"1px solid var(--border-color)","border-radius":"10px",background:"var(--paper-card)"}},V4={key:0},q4={key:1};function dp(e,t){let s=Pe("field");return a(),l("div",VR,[t[71]||(t[71]=n("div",{class:"paper-crumbs"},[h("Admin \xA0/\xA0 "),n("span",{class:"here"},"Queues")],-1)),n("div",qR,[t[18]||(t[18]=n("h1",{class:"paper-page-title"},"Queues",-1)),n("div",LR,[n("button",{class:"btn btn-sm",onClick:t[0]||(t[0]=i=>e.pauseAll())},"Pause all queues")])]),t[72]||(t[72]=ke('',1)),f(" Queue overview cards "),n("div",$R,[(a(!0),l(V,null,Q(e.queueList,(i,o)=>(a(),l("div",{class:R(["q-card",{selected:e.selectedQueue==i?.key,paused:i?.paused}]),role:"button",tabindex:"0","aria-pressed":e.selectedQueue===i.key,onKeydown:[Lt(de(r=>e.selectQueue(i.key),["prevent"]),["enter"]),Lt(de(r=>e.selectQueue(i.key),["prevent"]),["space"])],onClick:r=>e.selectQueue(i.key)},[n("div",FR,[n("span",{class:R(["q-dot",{"q-dot-red":i?.paused||i?.counts?.failed>0,"q-dot-idle":!i?.counts?.active&&!i?.counts?.waiting}]),title:i?.paused?"Paused":i?.counts?.failed>0?i.counts.failed+" failed jobs":i?.counts?.active||i?.counts?.waiting?"Running":"Idle"},null,10,UR),n("span",{class:"q-card-name",textContent:d(i?.label)},null,8,BR)]),n("div",{class:"q-card-count",textContent:d((i?.counts?.waiting||0)+(i?.counts?.active||0)+(i?.counts?.delayed||0))},null,8,zR),n("div",HR,[n("span",null,[h("waiting \xB7 "+d(i?.counts?.active||0)+" active",1),i?.counts?.failed?(a(),l(V,{key:0},[t[19]||(t[19]=h(" \xB7 ",-1)),n("b",jR,d(i.counts.failed)+" failed",1)],64)):f("v-if",!0),i?.paused?(a(),l(V,{key:1},[t[20]||(t[20]=h(" \xB7 ",-1)),t[21]||(t[21]=n("b",{class:"q-card-failed"},"paused",-1))],64)):f("v-if",!0)]),i?.counts?.active?(a(),l("div",GR,[n("div",{class:"q-card-bar-fill",style:Ae({width:i?.counts?.active/((i?.counts?.waiting||0)+(i?.counts?.active||0)+(i?.counts?.delayed||0)||1)*100+"%"})},null,4)])):f("v-if",!0)])],42,_R))),256))]),f(" Detail: throughput chart + stats panel "),e.selectedStats?(a(),l("div",WR,[n("div",KR,[n("div",YR,[n("button",{class:R(["btn btn-sm",{active:e.range=="1h"}]),onClick:t[1]||(t[1]=i=>e.setRange("1h"))},"1h",2),n("button",{class:R(["btn btn-sm",{active:e.range=="6h"}]),onClick:t[2]||(t[2]=i=>e.setRange("6h"))},"6h",2),n("button",{class:R(["btn btn-sm",{active:e.range=="24h"}]),onClick:t[3]||(t[3]=i=>e.setRange("24h"))},"24h",2),n("button",{class:R(["btn btn-sm",{active:e.range=="7d"}]),onClick:t[4]||(t[4]=i=>e.setRange("7d"))},"7d",2)]),n("div",JR,[h("Throughput \xB7 "+d(e.selectedQueue)+" ",1),(e.selectedStats?.completed24h||0)+(e.selectedStats?.failed24h||0)>0?(a(),l("span",XR,[t[23]||(t[23]=n("span",{class:"q-legend-completed"},"\u25CF",-1)),t[24]||(t[24]=h(" Completed ",-1)),t[25]||(t[25]=n("span",{class:"q-legend-failed"},"\u25CF",-1)),t[26]||(t[26]=h(" Failed ",-1)),(e.selectedStats?.completed24h||0)+(e.selectedStats?.failed24h||0)>0?(a(),l(V,{key:0},[t[22]||(t[22]=n("span",{class:"q-legend-exec","aria-hidden":"true"},null,-1)),h(" Avg time \xB7 "+d(e.range),1)],64)):f("v-if",!0)])):f("v-if",!0)]),n("div",QR,[t[28]||(t[28]=n("canvas",{id:"q-throughput-chart",height:"180"},null,-1)),(e.selectedStats?.completed24h||0)+(e.selectedStats?.failed24h||0)===0?(a(),l("div",ZR,[...t[27]||(t[27]=[n("strong",null,"No jobs processed in this window",-1),n("span",null,"Completed and failed jobs will chart here.",-1)])])):f("v-if",!0),t[29]||(t[29]=n("div",{id:"q-chart-tooltip",class:"q-chart-tooltip",style:{display:"none"}},null,-1)),t[30]||(t[30]=n("div",{id:"q-chart-crosshair",class:"q-chart-crosshair",style:{display:"none"}},null,-1))])]),n("div",xR,[n("div",eT,"Stats \xB7 "+d(e.selectedQueue),1),n("div",tT,[n("div",nT,[t[31]||(t[31]=n("div",{class:"q-stat-label"},"Waiting",-1)),n("div",{class:"q-stat-value",textContent:d(e.selectedStats?.counts?.waiting||0)},null,8,oT)]),n("div",sT,[t[32]||(t[32]=n("div",{class:"q-stat-label"},"Active",-1)),n("div",{class:"q-stat-value",textContent:d(e.selectedStats?.counts?.active||0)},null,8,iT)]),n("div",rT,[t[33]||(t[33]=n("div",{class:"q-stat-label"},"Completed (24h)",-1)),n("div",{class:"q-stat-value",textContent:d(e.fmt?.number(e.selectedStats?.completed24h))},null,8,aT)]),n("div",lT,[t[34]||(t[34]=n("div",{class:"q-stat-label"},"Failed (24h)",-1)),n("div",{class:"q-stat-value",textContent:d(e.selectedStats?.failed24h||0)},null,8,dT)]),n("div",uT,[t[35]||(t[35]=n("div",{class:"q-stat-label"},"Delayed",-1)),n("div",{class:"q-stat-value",textContent:d(e.selectedStats?.counts?.delayed||0)},null,8,cT)]),n("div",pT,[t[36]||(t[36]=n("div",{class:"q-stat-label"},"Workers",-1)),n("div",{class:"q-stat-value",textContent:d(e.selectedStats?.workers||0)},null,8,fT)])]),n("div",mT,[n("button",{class:"btn btn-sm",onClick:t[5]||(t[5]=i=>e.togglePause())},d(e.selectedStats?.paused?"Resume "+e.selectedQueue:"Pause "+e.selectedQueue),1),n("button",{class:"btn btn-sm",onClick:t[6]||(t[6]=i=>e.retryFailed()),disabled:!e.selectedStats?.counts?.failed},"Retry failed",8,hT),n("span",gT,[n("button",{class:"btn btn-sm btn-outline-danger",onClick:t[7]||(t[7]=i=>e.drainSelected())},"Drain"),n("button",{class:"btn btn-sm btn-outline-danger",onClick:t[8]||(t[8]=i=>e.emptyQueue())},"Empty")])])])])):f("v-if",!0),e.actionError?(a(),l("div",{key:1,class:"q-toast-error",onClick:t[9]||(t[9]=i=>e.actionError=null)},[t[37]||(t[37]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1)),h(" "+d(e.actionError),1)])):f("v-if",!0),f(" Jobs table "),n("div",vT,[n("div",yT,[n("div",bT,"All jobs \xB7 "+d(e.selectedQueue),1),n("div",wT,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[10]||(t[10]=i=>e.setSegView("all"))},[t[38]||(t[38]=h("All ",-1)),n("span",CT,d(e.fmt?.number(e.segCount("all"))),1)],10,kT),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="active","is-empty":!e.segCount("active")}]),"aria-checked":e.segView()==="active",onClick:t[11]||(t[11]=i=>e.setSegView("active"))},[t[39]||(t[39]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[40]||(t[40]=h("Active ",-1)),n("span",ET,d(e.fmt?.number(e.segCount("active"))),1)],10,ST),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="waiting","is-empty":!e.segCount("waiting")}]),"aria-checked":e.segView()==="waiting",onClick:t[12]||(t[12]=i=>e.setSegView("waiting"))},[t[41]||(t[41]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[42]||(t[42]=h("Waiting ",-1)),n("span",RT,d(e.fmt?.number(e.segCount("waiting"))),1)],10,NT),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="delayed","is-empty":!e.segCount("delayed")}]),"aria-checked":e.segView()==="delayed",onClick:t[13]||(t[13]=i=>e.setSegView("delayed"))},[t[43]||(t[43]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[44]||(t[44]=h("Delayed ",-1)),n("span",PT,d(e.fmt?.number(e.segCount("delayed"))),1)],10,TT),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="failed","is-empty":!e.segCount("failed")}]),"aria-checked":e.segView()==="failed",onClick:t[14]||(t[14]=i=>e.setSegView("failed"))},[t[45]||(t[45]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[46]||(t[46]=h("Failed ",-1)),n("span",AT,d(e.fmt?.number(e.segCount("failed"))),1)],10,DT),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="completed","is-empty":!e.segCount("completed")}]),"aria-checked":e.segView()==="completed",onClick:t[15]||(t[15]=i=>e.setSegView("completed"))},[t[47]||(t[47]=n("span",{class:"seg-dot done","aria-hidden":"true"},null,-1)),t[48]||(t[48]=h("Completed ",-1)),n("span",OT,d(e.fmt?.number(e.segCount("completed"))),1)],10,IT)])]),n("div",MT,[P(n("input",VT,null,512),[[s,{state:e.viewState,set:i=>{e.query.search=i},value:e.query?.search,form:null,options:{}}]]),n("label",qT,[P(n("input",LT,null,512),[[s,{state:e.viewState,set:i=>{e.query.autoRefresh=i},value:e.query?.autoRefresh,form:null,options:{}}]]),t[49]||(t[49]=n("span",{class:"auto-refresh-label"},"Auto-refresh",-1))]),n("button",{class:"btn btn-sm btn-icon",type:"button",title:"Refresh now",onClick:t[16]||(t[16]=i=>e.refreshNow()),"aria-label":"Refresh"},[...t[50]||(t[50]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])])]),e.filteredJobs().length>0?(a(),l("table",$T,[t[69]||(t[69]=n("thead",null,[n("tr",null,[n("th",null,"State"),n("th",null,"Job"),n("th",null,"Detail"),n("th",null,"Attempts"),n("th",{class:"q-th-num"},"Duration"),n("th",null,"Progress"),n("th")])],-1)),(a(!0),l(V,null,Q(e.filteredJobs(),(i,o)=>(a(),l("tbody",null,[n("tr",{style:{cursor:"pointer"},class:R({"q-row-failed":i?._state=="failed","q-row-expanded":e.expanded[i?.id]}),onClick:r=>e.toggleJob(i)},[n("td",FT,[n("span",{textContent:d(i?._state),class:R("q-state-badge q-state-"+i?._state)},null,10,UT),i?._state=="delayed"&&i?.delayUntil?(a(),l("span",{key:0,class:"q-delay-hint",textContent:d(e.delayCountdown(i?.delayUntil))},null,8,BT)):f("v-if",!0)]),n("td",{class:"q-cell-id",title:"job:"+i?.id+(i?.name&&i?.name!==i?.id?" \xB7 "+i.name:"")+(i?.data?.repoId&&i?.data?.repoId!==i?.id?" \xB7 "+i.data.repoId:"")},[(a(),l("svg",{class:R(["ui-icon q-chevron",{"q-chevron-open":e.expanded[i?.id]}]),"aria-hidden":"true"},[...t[51]||(t[51]=[n("use",{href:"#ui-icon-chevron-right"},null,-1)])],2)),n("a",{target:"_blank",class:"q-job-link",textContent:d(i?.data?.repoId||i?.id),onClick:t[17]||(t[17]=r=>r.stopPropagation()),href:e.safeUrl("/r/"+(i?.data?.repoId||i?.id))},null,8,HT)],8,zT),n("td",{class:R(["q-cell-detail",{"is-error":i?._state=="failed"}]),title:i?._state=="failed"?i?.failedReason:"",textContent:d(e.jobDetail(i))},null,10,jT),n("td",{class:"q-cell-num",textContent:d(i?.attemptsMade||1)},null,8,GT),n("td",{class:"q-cell-num q-cell-duration",textContent:d(e.jobDuration(i))},null,8,WT),n("td",KT,[n("div",{class:R(["q-progress-wrap",{"is-indeterminate":e.jobProgressPct(i)===null}]),"aria-label":e.jobProgressPct(i)===null?"Progress not reported":e.jobProgressPct(i)+"% done"},[n("div",{class:"q-progress-bar",style:Ae({"--pct":(e.jobProgressPct(i)||0)+"%"})},null,4),n("span",{class:"q-progress-label",textContent:d(e.jobProgressPct(i)===null?"\u2014":e.jobProgressPct(i)+"%")},null,8,JT)],10,YT)]),n("td",XT,[i?._state=="failed"?(a(),l("button",{key:0,class:"btn btn-sm btn-icon",title:"Retry",onClick:r=>{e.retryJob(i),r.stopPropagation()},"aria-label":"Retry job"},[...t[52]||(t[52]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])],8,QT)):f("v-if",!0),n("button",{class:"btn btn-sm btn-icon",title:"Remove","aria-label":"Remove job",onClick:r=>{e.removeJob(i),r.stopPropagation()}},[...t[53]||(t[53]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1)])],8,ZT)])],10,_T),e.expanded[i?.id]?(a(),l("tr",xT,[n("td",e4,[n("div",t4,[n("div",n4,[n("div",o4,[t[54]||(t[54]=n("span",{class:"q-job-detail-label"},"Job id",-1)),n("span",s4,[n("a",{target:"_blank",textContent:d(i?.id),href:e.safeUrl("/r/"+i?.id)},null,8,i4)])]),n("div",r4,[t[55]||(t[55]=n("span",{class:"q-job-detail-label"},"State",-1)),n("span",a4,[n("span",{textContent:d(i?._state),class:R("q-state-badge q-state-"+i?._state)},null,10,l4)])]),i?.data?.repoId?(a(),l("div",d4,[t[56]||(t[56]=n("span",{class:"q-job-detail-label"},"Repo ID",-1)),n("span",{class:"q-job-detail-value",textContent:d(i?.data?.repoId)},null,8,u4)])):f("v-if",!0),i?.timestamp?(a(),l("div",c4,[t[57]||(t[57]=n("span",{class:"q-job-detail-label"},"Created",-1)),n("span",{class:"q-job-detail-value",textContent:d(e.humanTime(i?.timestamp))},null,8,p4)])):f("v-if",!0),i?._state=="delayed"&&i?.delayUntil?(a(),l("div",f4,[t[58]||(t[58]=n("span",{class:"q-job-detail-label"},"Retry at",-1)),n("span",m4,d(e.humanTime(i?.delayUntil))+" ("+d(e.delayCountdown(i?.delayUntil))+")",1)])):f("v-if",!0),i?.processedOn?(a(),l("div",h4,[t[59]||(t[59]=n("span",{class:"q-job-detail-label"},"Processed",-1)),n("span",{class:"q-job-detail-value",textContent:d(e.humanTime(i?.processedOn))},null,8,g4)])):f("v-if",!0),i?.finishedOn?(a(),l("div",v4,[t[60]||(t[60]=n("span",{class:"q-job-detail-label"},"Finished",-1)),n("span",{class:"q-job-detail-value",textContent:d(e.humanTime(i?.finishedOn))},null,8,y4)])):f("v-if",!0),i?.attemptsMade?(a(),l("div",b4,[t[61]||(t[61]=n("span",{class:"q-job-detail-label"},"Attempts",-1)),n("span",{class:"q-job-detail-value",textContent:d(i?.attemptsMade)},null,8,w4)])):f("v-if",!0),i?.progress&&i?.progress?.status?(a(),l("div",k4,[t[62]||(t[62]=n("span",{class:"q-job-detail-label"},"Status",-1)),n("span",{class:"q-job-detail-value",textContent:d(i?.progress?.status)},null,8,C4)])):f("v-if",!0),e.jobProgressPct(i)!==null?(a(),l("div",S4,[t[63]||(t[63]=n("span",{class:"q-job-detail-label"},"Progress",-1)),n("span",{class:"q-job-detail-value",textContent:d(e.jobProgressPct(i)+"%")},null,8,E4)])):f("v-if",!0)]),i?.failedReason?(a(),l("div",N4,[t[64]||(t[64]=n("span",{class:"q-job-detail-label"},"Error",-1)),n("div",{class:"q-error-reason",textContent:d(i?.failedReason)},null,8,R4)])):f("v-if",!0),i?.stacktrace?.length?(a(),l("div",T4,[t[65]||(t[65]=n("span",{class:"q-job-detail-label"},"Stacktrace",-1)),(a(!0),l(V,null,Q(i?.stacktrace,(r,u)=>(a(),l("pre",{class:"q-error-stack",key:u},[n("code",{textContent:d(r)},null,8,P4)]))),128))])):f("v-if",!0),n("div",D4,[i?._state=="failed"?(a(),l("button",{key:0,class:"btn btn-sm",onClick:r=>e.retryJob(i)},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),h(" Retry",-1)])],8,A4)):f("v-if",!0),n("button",{class:"btn btn-sm",onClick:r=>e.removeJob(i)},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),h(" Remove",-1)])],8,I4),n("a",{class:"btn btn-sm",target:"_blank",href:e.safeUrl("/r/"+i?.id)},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1),h(" View repo",-1)])],8,O4)])])])])):f("v-if",!0)]))),256))])):f("v-if",!0),e.filteredJobs().length==0?(a(),l("div",M4,[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1)),e.query?.search?f("v-if",!0):(a(),l("span",V4,"No jobs in the "+d(e.selectedQueue)+" queue.",1)),e.query?.search?(a(),l("span",q4,"No jobs match the current filters.")):f("v-if",!0)])):f("v-if",!0)])])}var L4={class:"container paper-page admin-page"},$4={class:"seg-bar"},_4={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},F4=["aria-checked"],U4={class:"count"},B4=["aria-checked"],z4={class:"count"},H4=["aria-checked"],j4={class:"count"},G4=["aria-checked"],W4={class:"count"},K4=["aria-checked"],Y4={class:"count"},J4=["aria-checked"],X4={class:"count"},Q4={class:"seg-countline",role:"status"},Z4={class:"seg-meta"},x4={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},eP={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},tP=["aria-expanded"],nP={class:"search-wrap"},oP={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repositories\u2026",autocomplete:"off"},sP={key:0,class:"admin-search-hint"},iP={class:"admin-filter-inline"},rP={type:"text",class:"form-control form-control-sm",placeholder:"username"},aP={class:"admin-filter-inline"},lP={type:"text",class:"form-control form-control-sm",placeholder:"ID"},dP={key:0,class:"admin-filter-inline","aria-label":"Pagination"},uP=["disabled"],cP={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},pP=["disabled"],fP={key:0,class:"admin-filter-row"},mP={class:"admin-active-chips"},hP={class:"key"},gP=["onClick"],vP={key:1,class:"bulk-bar"},yP={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},bP={class:"paper-table-head",role:"row"},wP={role:"columnheader",style:{width:"28px"}},kP=["checked"],CP={role:"columnheader"},SP={role:"columnheader"},EP={role:"columnheader",class:"num"},NP={role:"columnheader"},RP={role:"cell",style:{width:"28px"}},TP={type:"checkbox","aria-label":"Select repository"},PP={class:"cell-anon",role:"cell"},DP={class:"anon-text"},AP=["textContent","href"],IP=["title"],OP=["href"],MP=["textContent"],VP=["textContent"],qP=["data-meta-label"],LP=["title","textContent","href"],$P=["data-meta-label"],_P=["textContent","href"],FP=["data-meta-label"],UP={key:3,class:"meta-item"},BP={class:"meta-item"},zP={class:"cell-status",role:"cell"},HP={class:"status-line"},jP=["textContent"],GP=["textContent","title"],WP=["data-unit"],KP=["textContent"],YP={class:"cell-expires",role:"cell"},JP=["textContent"],XP={class:"cell-actions",role:"cell"},QP={class:"dropdown"},ZP={class:"dropdown-menu dropdown-menu-right"},xP=["href"],eD=["href"],tD=["href"],nD=["onClick"],oD=["onClick"],sD=["onClick"],iD=["onClick"],rD=["onClick"],aD=["onClick"],lD={key:0,class:"paper-table-empty"},dD={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},uD={key:0,class:"pagination-compact"},cD=["disabled"],pD=["max"],fD=["disabled"],mD={class:"admin-filter-inline"},hD={class:"form-control form-control-sm"};function up(e,t){let s=Pe("field"),i=Pe("form");return a(),l("div",L4,[t[80]||(t[80]=ke('
Admin \xA0/\xA0 Repositories

Repositories

',3)),n("div",$4,[n("div",_4,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[0]||(t[0]=o=>e.setSegView("all"))},[t[21]||(t[21]=h("All ",-1)),n("span",U4,d(e.fmt?.number(e.segCount("all"))),1)],10,F4),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="ready","is-empty":!e.segCount("ready")}]),"aria-checked":e.segView()==="ready",onClick:t[1]||(t[1]=o=>e.setSegView("ready"))},[t[22]||(t[22]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[23]||(t[23]=h("Ready ",-1)),n("span",z4,d(e.fmt?.number(e.segCount("ready"))),1)],10,B4),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="preparing","is-empty":!e.segCount("preparing")}]),"aria-checked":e.segView()==="preparing",onClick:t[2]||(t[2]=o=>e.setSegView("preparing"))},[t[24]||(t[24]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[25]||(t[25]=h("Preparing ",-1)),n("span",j4,d(e.fmt?.number(e.segCount("preparing"))),1)],10,H4),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="error","is-empty":!e.segCount("error")}]),"aria-checked":e.segView()==="error",onClick:t[3]||(t[3]=o=>e.setSegView("error"))},[t[26]||(t[26]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[27]||(t[27]=h("Error ",-1)),n("span",W4,d(e.fmt?.number(e.segCount("error"))),1)],10,G4),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="expired","is-empty":!e.segCount("expired")}]),"aria-checked":e.segView()==="expired",onClick:t[4]||(t[4]=o=>e.setSegView("expired"))},[t[28]||(t[28]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[29]||(t[29]=h("Expiring / expired ",-1)),n("span",Y4,d(e.fmt?.number(e.segCount("expired"))),1)],10,K4),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="removed","is-empty":!e.segCount("removed")}]),"aria-checked":e.segView()==="removed",onClick:t[5]||(t[5]=o=>e.setSegView("removed"))},[t[30]||(t[30]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[31]||(t[31]=h("Removing / removed ",-1)),n("span",X4,d(e.fmt?.number(e.segCount("removed"))),1)],10,J4)]),n("p",Q4,[n("strong",null,d(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[32]||(t[32]=h(" shown",-1)),t[33]||(t[33]=n("span",{class:"seg-sep"},"\xB7",-1)),n("span",Z4,d(e.fmt?.humanFileSize(e.totalSize))+" on disk",1)])]),e.fetchError?(a(),l("div",x4,[t[34]||(t[34]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),h(" "+d(e.fetchError),1)])):f("v-if",!0),P((a(),l("form",eP,[f(" Row 1: search + scoped inputs + headline actions "),n("button",{type:"button",class:"btn btn-sm admin-filters-toggle",onClick:t[6]||(t[6]=o=>e.filtersOpen=!e.filtersOpen),"aria-expanded":e.filtersOpen?"true":"false"},"Filters",8,tP),n("div",{class:R(["admin-filter-row",{"is-open":e.filtersOpen}])},[n("div",nP,[P(n("input",oP,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(a(),l("span",sP,"/"))]),n("span",iP,[t[35]||(t[35]=n("label",null,"Owner",-1)),P(n("input",rP,null,512),[[s,{state:e.viewState,set:o=>{e.query.owner=o},value:e.query?.owner,form:null,options:{}}]])]),n("span",aP,[t[36]||(t[36]=n("label",null,"Conference",-1)),P(n("input",lP,null,512),[[s,{state:e.viewState,set:o=>{e.query.conference=o},value:e.query?.conference,form:null,options:{}}]])]),t[40]||(t[40]=n("span",{class:"admin-filter-spacer"},null,-1)),n("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[7]||(t[7]=o=>e.exportCsv())},[...t[37]||(t[37]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),h(" Export",-1)])]),e.totalPage>1?(a(),l("span",dP,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[8]||(t[8]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[38]||(t[38]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,uP),n("span",cP,d(e.query?.page)+"/"+d(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[9]||(t[9]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[39]||(t[39]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,pP)])):f("v-if",!0)],2),f(" Row 2: appears only when there are active filter chips "),e.chips?.length?(a(),l("div",fP,[n("div",mP,[(a(!0),l(V,null,Q(e.chips,(o,r)=>(a(),l("span",{class:"admin-active-chip",key:o?.key},[n("span",hP,d(o?.label),1),n("span",null,d(o?.value),1),n("button",{type:"button","aria-label":"Remove filter",onClick:u=>e.clearFilter(o.key)},[...t[41]||(t[41]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,gP)]))),128))])])):f("v-if",!0)])),[[i,e.viewState]]),e.selectedCount()>0?(a(),l("div",vP,[n("span",null,[n("strong",null,d(e.selectedCount()),1),t[42]||(t[42]=h(" selected",-1))]),n("button",{class:"btn btn-sm",type:"button",onClick:t[10]||(t[10]=o=>e.bulkRefresh())},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),h(" Force refresh",-1)])]),n("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[11]||(t[11]=o=>e.bulkRemoveCache())},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),h(" Remove cache",-1)])]),n("button",{class:"btn btn-sm",type:"button",onClick:t[12]||(t[12]=o=>e.clearSelection())},"Clear")])):f("v-if",!0),n("div",yP,[n("div",bP,[n("div",wP,[n("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[13]||(t[13]=o=>e.selectAllOnPage()),checked:e.allSelected},null,8,kP)]),n("div",CP,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[14]||(t[14]=o=>e.sortBy("source.repositoryName"))},[t[46]||(t[46]=h("Repository ",-1)),e.sortIcon("source.repositoryName")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("source.repositoryName")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[45]||(t[45]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",SP,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="status"}]),onClick:t[15]||(t[15]=o=>e.sortBy("status"))},[t[48]||(t[48]=h("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[47]||(t[47]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",EP,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[16]||(t[16]=o=>e.sortBy("pageView"))},[t[50]||(t[50]=h("Views ",-1)),e.sortIcon("pageView")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("pageView")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[49]||(t[49]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",NP,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[17]||(t[17]=o=>e.sortBy("anonymizeDate"))},[t[52]||(t[52]=h("Anonymized ",-1)),e.sortIcon("anonymizeDate")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("anonymizeDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[51]||(t[51]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[53]||(t[53]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(a(!0),l(V,null,Q(e.filteredRepositories,(o,r)=>(a(),l("div",{class:R(["paper-table-row",{"repo-inactive":o?.status=="expired"||o?.status=="removed","repo-error":o?.status=="error","row-selected":e.selected[o?.repoId]}]),role:"row"},[n("div",RP,[P(n("input",TP,null,512),[[s,{state:e.viewState,set:u=>{e.selected[o.repoId]=u},value:e.selected[o?.repoId],form:null,options:{}}]])]),n("div",PP,[t[56]||(t[56]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[n("use",{href:"#project-type-repo"})],-1)),n("div",DP,[n("a",{class:"repo-name",target:"_blank",textContent:d(o?.repoId),href:e.safeUrl("/r/"+o?.repoId)},null,8,AP),n("div",{class:"anon-sub anon-meta","data-meta-fit":"",title:[o?.source?.fullName||o?.source?.repositoryName,o?.options?.update?"branch "+o?.source?.branch:"commit "+o?.source?.commit?.substring(0,7),o?.conference?"conference "+o?.conference:"",o?.size?.storage>0?e.fmt?.humanFileSize(o?.size?.storage):"",e.fmt?.number(o?.options?.terms?.length)+(o?.options?.terms?.length===1?" term":" terms")].filter(Boolean).join(" \xB7 ")},[n("a",{class:"src-path",href:e.safeUrl("https://github.com/"+o?.source?.repositoryName+"/")},[(o?.source?.repositoryName||"").includes("/")?(a(),l("span",{key:0,class:"src-owner",textContent:d((u=>u.length>16?u.slice(0,14)+"\u2026":u)((o?.source?.repositoryName||"").split("/")[0]))},null,8,MP)):f("v-if",!0),n("span",{class:"src-repo",textContent:d((o?.source?.repositoryName||"").includes("/")?"/"+(o?.source?.repositoryName||"").split("/").slice(1).join("/"):o?.source?.repositoryName)},null,8,VP)],8,OP),o?.options?.update?f("v-if",!0):(a(),l("span",{key:0,class:"meta-item","data-meta-label":"commit "+(o?.source?.commit||"").substring(0,7)},[n("a",{class:"mono-hash",title:o?.source?.commit,textContent:d(o?.source?.commit?.substring(0,7)),href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/tree/"+o?.source?.commit)},null,8,LP)],8,qP)),o?.options?.update?(a(),l("span",{key:1,class:"meta-item","data-meta-label":"branch "+(o?.source?.branch||"")},[n("a",{textContent:d(o?.source?.branch),href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/tree/"+o?.source?.branch)},null,8,_P)],8,$P)):f("v-if",!0),o?.conference?(a(),l("span",{key:2,class:"meta-item meta-conf","data-meta-label":"conference "+o?.conference},[t[54]||(t[54]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),h(" "+d(o?.conference),1)],8,FP)):f("v-if",!0),o?.size?.storage>0?(a(),l("span",UP,d(e.fmt?.humanFileSize(o?.size?.storage)),1)):f("v-if",!0),n("span",BP,d(e.fmt?.number(o?.options?.terms?.length))+" "+d(o?.options?.terms?.length===1?"term":"terms"),1),t[55]||(t[55]=n("span",{class:"meta-more",hidden:""},null,-1))],8,IP)])]),n("div",zP,[n("span",HP,[n("span",{class:R(["status-dot","st-"+(o?.status||"unknown")])},null,2),n("span",{textContent:d(e.fmt?.statusLabel(o?.status))},null,8,jP)]),o?.statusMessage?(a(),l("span",{key:0,class:"status-sub",textContent:d(e.fmt?.statusMsg(o?.statusMessage)),title:o?.statusMessage},null,8,GP)):f("v-if",!0)]),n("div",{class:"cell-views num",role:"cell","data-unit":(o?.pageView||0)===1?"view":"views"},[t[57]||(t[57]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1)),t[58]||(t[58]=h()),n("span",{textContent:d(e.fmt?.number(o?.pageView||0))},null,8,KP)],8,WP),n("div",YP,[t[59]||(t[59]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[60]||(t[60]=h()),n("span",{textContent:d((e.fmt?.humanTime(o?.anonymizeDate)||"").replace(/^on /,""))},null,8,JP)]),n("div",XP,[n("div",QP,[t[72]||(t[72]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",ZP,[n("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+o?.repoId)},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),h(" Edit",-1)])],8,xP),n("a",{class:"dropdown-item",href:e.safeUrl("/r/"+o?.repoId+"/")},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),h(" View repo",-1)])],8,eD),o?.options?.page&&o?.status=="ready"?(a(),l("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+o?.repoId+"/")},[...t[63]||(t[63]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),h(" View page",-1)])],8,tD)):f("v-if",!0),n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.fetchGithubInfo(o),["prevent"])},[...t[64]||(t[64]=[n("i",{class:"fab fa-github"},null,-1),h(" Live GitHub info",-1)])],8,nD),t[70]||(t[70]=n("div",{class:"dropdown-divider"},null,-1)),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.updateRepository(o),["prevent"])},[...t[65]||(t[65]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),h(" Force update",-1)])],8,oD),[[Z,o?.status=="ready"||o?.status=="error"]]),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.updateRepository(o),["prevent"])},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),h(" Enable",-1)])],8,sD),[[Z,o?.status=="removed"]]),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.showStatusMessage(o),["prevent"])},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1),h(" View status message",-1)])],8,iD),[[Z,o?.statusMessage]]),t[71]||(t[71]=n("div",{class:"dropdown-divider"},null,-1)),n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.removeCache(o),["prevent"])},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),h(" Remove cache",-1)])],8,rD),P(n("a",{class:"dropdown-item text-danger",href:"#",onClick:de(u=>e.removeRepository(o),["prevent"])},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),h(" Remove",-1)])],8,aD),[[Z,o?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(a(),l("div",lD,[t[73]||(t[73]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),t[74]||(t[74]=n("span",null,"No repositories match the current filters.",-1)),e.query.ready&&e.query.expired&&e.query.removed&&e.query.error&&e.query.preparing?f("v-if",!0):(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-outline-ink",onClick:t[18]||(t[18]=o=>e.showAllStatuses())},"Show all statuses"))])):f("v-if",!0)]),n("div",dD,[t[79]||(t[79]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",uD,[n("button",{class:"btn btn-sm",onClick:t[19]||(t[19]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),h(" Previous ",-1)])],8,cD),P(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},"aria-label":"Page",max:e.totalPage},null,8,pD),[[s,{state:e.viewState,set:o=>{e.query.page=o},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+d(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[20]||(t[20]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[76]||(t[76]=[h(" Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,fD)])):f("v-if",!0),n("span",mD,[t[78]||(t[78]=n("label",null,"Per page",-1)),P((a(),l("select",hD,[...t[77]||(t[77]=[ke('',5)])])),[[s,{state:e.viewState,set:o=>{e.query.limit=o},value:e.query?.limit,form:null,options:{}}]])])])])}var gD={class:"container paper-page admin-page"},vD={class:"paper-crumbs"},yD={class:"here"},bD={class:"paper-page-title"},wD={key:0,class:"user-detail-card"},kD={class:"user-header"},CD=["src"],SD={class:"user-header-status"},ED={class:"status-dot-wrap"},ND=["textContent"],RD={key:0,class:"type-badge type-repo"},TD={class:"user-actions",style:{"margin-top":"4px"}},PD={class:"user-detail-grid"},DD={class:"detail-value mono-id"},AD={class:"detail-value"},ID=["href"],OD={class:"detail-value"},MD={class:"detail-value"},VD={key:0},qD={key:1,class:"text-muted"},LD={class:"detail-value"},$D={key:0,style:{"margin-top":"20px"}},_D={class:"paper-table w-100",style:{"margin-top":"10px"}},FD={class:"paper-table-row",style:{"grid-template-columns":"1fr 160px"}},UD={class:"cell-anon",role:"cell"},BD={class:"anon-text"},zD=["textContent"],HD={class:"cell-expires",role:"cell"},jD={key:1,class:"admin-section-header"},GD={class:"section-count"},WD={key:2,class:"user-detail-card"},KD={type:"text",class:"form-control",placeholder:"Token name (e.g. dev-laptop)",required:""},YD={key:0,class:"alert alert-warning",role:"alert"},JD={style:{"white-space":"pre-wrap","word-break":"break-all",margin:"8px 0 0","font-family":"var(--font-mono)","font-size":"0.85rem"}},XD={key:1,class:"paper-table w-100"},QD={class:"paper-table-row",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},ZD=["textContent"],xD=["textContent"],eA={role:"cell"},tA={key:0},nA={key:1,class:"text-muted"},oA={role:"cell"},sA=["onClick"],iA={key:2,class:"paper-table-empty"},rA={class:"admin-section-header"},aA={class:"section-count"},lA={class:"seg-bar"},dA={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},uA=["aria-checked"],cA={class:"count"},pA=["aria-checked"],fA={class:"count"},mA=["aria-checked"],hA={class:"count"},gA=["aria-checked"],vA={class:"count"},yA=["aria-checked"],bA={class:"count"},wA=["aria-checked"],kA={class:"count"},CA={class:"seg-countline",role:"status"},SA={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},EA={class:"admin-filter-row"},NA={class:"search-wrap"},RA={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repositories or errors\u2026",autocomplete:"off"},TA={key:3,class:"bulk-bar"},PA={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},DA={class:"paper-table-head",role:"row"},AA={role:"columnheader",style:{width:"28px"}},IA=["checked"],OA={role:"columnheader"},MA={role:"columnheader"},VA={role:"columnheader",class:"num"},qA={role:"columnheader"},LA={role:"cell",style:{width:"28px"}},$A={type:"checkbox","aria-label":"Select repository"},_A={class:"cell-anon",role:"cell"},FA={class:"anon-text"},UA=["textContent","href"],BA=["title"],zA=["href"],HA=["textContent"],jA=["textContent"],GA=["data-meta-label"],WA=["title","textContent","href"],KA=["data-meta-label"],YA=["textContent","href"],JA=["data-meta-label"],XA={key:3,class:"meta-item"},QA={class:"meta-item"},ZA={class:"cell-status",role:"cell"},xA={class:"status-line"},e3=["textContent"],t3=["textContent","title"],n3=["data-unit","textContent"],o3=["textContent"],s3={class:"cell-actions",role:"cell"},i3={class:"dropdown"},r3={class:"dropdown-menu dropdown-menu-right"},a3=["href"],l3=["href"],d3=["href"],u3=["onClick"],c3=["onClick"],p3=["onClick"],f3=["onClick"],m3=["onClick"],h3=["onClick"],g3={key:0,class:"paper-table-empty"};function cp(e,t){let s=Pe("field"),i=Pe("form");return a(),l("div",gD,[n("div",vD,[t[23]||(t[23]=n("a",{href:"/admin/"},"Admin",-1)),t[24]||(t[24]=h(" \xA0/\xA0 ",-1)),t[25]||(t[25]=n("a",{href:"/admin/users"},"Users",-1)),t[26]||(t[26]=h(" \xA0/\xA0 ",-1)),n("span",yD,d(e.userInfo?.username||"Profile"),1)]),n("h1",bD,d(e.userInfo?.username||"User"),1),t[93]||(t[93]=ke('',1)),e.userInfo?(a(),l("div",wD,[n("div",kD,[e.userInfo?.photo?(a(),l("img",{key:0,width:"56",height:"56",src:e.safeUrl(e.userInfo?.photo)},null,8,CD)):f("v-if",!0),n("div",null,[n("div",SD,[n("span",ED,[n("span",{class:R(["status-dot","st-"+(e.userInfo?.status||"unknown")])},null,2),n("span",{textContent:d(e.fmt?.title(e.userInfo?.status))},null,8,ND)]),e.userInfo?.isAdmin?(a(),l("span",RD,"Admin")):f("v-if",!0)]),n("div",TD,[e.userInfo?.status!=="banned"&&e.userInfo?.username!==e.user?.username?(a(),l("button",{key:0,class:"btn btn-sm btn-outline-danger",onClick:t[0]||(t[0]=o=>e.banUser())},[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-ban"})],-1),h(" Ban",-1)])])):f("v-if",!0),e.userInfo?.status==="banned"||e.userInfo?.status==="removed"?(a(),l("button",{key:1,class:"btn btn-sm",onClick:t[1]||(t[1]=o=>e.activateUser())},[...t[28]||(t[28]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),h(" Activate",-1)])])):f("v-if",!0),e.userInfo?.isAdmin?f("v-if",!0):(a(),l("button",{key:2,class:"btn btn-sm",onClick:t[2]||(t[2]=o=>e.promoteUser())},[...t[29]||(t[29]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user-shield"})],-1),h(" Promote to admin",-1)])])),e.userInfo?.isAdmin&&e.userInfo?.username!==e.user?.username?(a(),l("button",{key:3,class:"btn btn-sm btn-outline-ink",onClick:t[3]||(t[3]=o=>e.demoteUser())},[...t[30]||(t[30]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user-minus"})],-1),h(" Remove admin",-1)])])):f("v-if",!0)])])]),n("div",PD,[t[33]||(t[33]=n("div",{class:"detail-label"},"ID",-1)),n("div",DD,d(e.userInfo?._id),1),t[34]||(t[34]=n("div",{class:"detail-label"},"Email",-1)),n("div",{class:R(["detail-value",{"is-empty":!e.userInfo?.emails?.[0]?.email}])},d(e.userInfo?.emails?.[0]?.email||"Not shared"),3),t[35]||(t[35]=n("div",{class:"detail-label"},"Access token",-1)),n("div",{class:R(["detail-value",{"is-empty":!e.userInfo?.accessTokens?.github}]),style:{"font-family":"var(--font-mono)","font-size":"0.85rem"}},d(e.userInfo?.accessTokens?.github||"Not stored"),3),t[36]||(t[36]=n("div",{class:"detail-label"},"GitHub",-1)),n("div",AD,[n("a",{target:"_blank",href:e.safeUrl("https://github.com/"+e.userInfo?.username)},[t[31]||(t[31]=n("i",{class:"fab fa-github"},null,-1)),h(" "+d(e.userInfo?.username),1)],8,ID)]),t[37]||(t[37]=n("div",{class:"detail-label"},"Created",-1)),n("div",OD,d(e.fmt?.humanTime(e.userInfo?.dateOfEntry)),1),t[38]||(t[38]=n("div",{class:"detail-label"},"Last connection",-1)),n("div",MD,[e.userInfo?.accessTokenDates?.github?(a(),l("span",VD,d(e.fmt?.humanTime(e.userInfo?.accessTokenDates?.github)),1)):f("v-if",!0),e.userInfo?.accessTokenDates?.github?f("v-if",!0):(a(),l("span",qD,"Not recorded (GitHub App sign-in)"))]),t[39]||(t[39]=n("div",{class:"detail-label"},"GitHub repos",-1)),n("div",LD,[h(d(e.userInfo?.repositories?.length?e.userInfo.repositories.length+" repositories":"Not synced")+" ",1),e.userInfo?.repositories?.length?(a(),l("button",{key:0,class:"btn btn-sm ml-2",onClick:t[4]||(t[4]=o=>e.showRepos=!e.showRepos)},d(e.showRepos?"Hide repos":"Show repos"),1)):f("v-if",!0),n("button",{class:"btn btn-sm ml-1",onClick:t[5]||(t[5]=o=>e.getGitHubRepositories())},[...t[32]||(t[32]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),h(" Refresh ",-1)])])])]),e.showRepos?(a(),l("div",$D,[t[42]||(t[42]=n("div",{class:"paper-section-eyebrow"},"GitHub repositories",-1)),n("div",_D,[(a(!0),l(V,null,Q(e.userInfo?.repositories,(o,r)=>(a(),l("div",FD,[n("div",UD,[t[40]||(t[40]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[n("use",{href:"#project-type-repo"})],-1)),n("div",BD,[n("span",{class:"repo-name",textContent:d(o?.name)},null,8,zD)])]),n("div",HD,[t[41]||(t[41]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-database"})],-1)),h(" "+d(e.fmt?.humanFileSize(o?.size)),1)])]))),256))])])):f("v-if",!0)])):f("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(a(),l("div",jD,[t[43]||(t[43]=n("h2",null,[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-key"})]),h(" API tokens")],-1)),n("span",GD,d(e.tokens?.length),1)])):f("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(a(),l("div",WD,[t[49]||(t[49]=n("p",{class:"paper-page-lede"},[h("Personal API tokens for this admin account. Send as "),n("code",null,"Authorization: Bearer "),h(" to authenticate without GitHub OAuth (useful for development).")],-1)),P((a(),l("form",{class:"d-flex",style:{gap:"8px","margin-bottom":"12px"},onSubmit:t[6]||(t[6]=de(o=>e.submitForm(o,()=>{e.createToken()}),["prevent"]))},[P(n("input",KD,null,512),[[s,{state:e.viewState,set:o=>{e.tokenForm.name=o},value:e.tokenForm?.name,form:null,options:{}}]]),t[44]||(t[44]=n("button",{type:"submit",class:"btn btn-ink"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-plus"})]),h(" Generate")],-1))],32)),[[i,e.viewState]]),e.tokenForm?.plaintext?(a(),l("div",YD,[t[45]||(t[45]=n("strong",null,"Copy this token now \u2014 it will not be shown again:",-1)),n("pre",JD,d(e.tokenForm?.plaintext),1),n("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=o=>e.tokenForm.plaintext=null)},"Dismiss")])):f("v-if",!0),e.tokens?.length?(a(),l("div",XD,[t[47]||(t[47]=n("div",{class:"paper-table-head",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},[n("div",{role:"columnheader"},"Name"),n("div",{role:"columnheader"},"Created"),n("div",{role:"columnheader"},"Last used"),n("div",{role:"columnheader","aria-label":"Actions"})],-1)),(a(!0),l(V,null,Q(e.tokens,(o,r)=>(a(),l("div",QD,[n("div",{role:"cell",textContent:d(o?.name)},null,8,ZD),n("div",{role:"cell",textContent:d(e.fmt?.humanTime(o?.createdAt))},null,8,xD),n("div",eA,[o?.lastUsedAt?(a(),l("span",tA,d(e.fmt?.humanTime(o?.lastUsedAt)),1)):f("v-if",!0),o?.lastUsedAt?f("v-if",!0):(a(),l("span",nA,"never"))]),n("div",oA,[n("button",{class:"btn btn-sm text-danger btn-icon",title:"Revoke","aria-label":"Revoke token",onClick:u=>e.revokeToken(o)},[...t[46]||(t[46]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1)])],8,sA)])]))),256))])):f("v-if",!0),e.tokens?.length?f("v-if",!0):(a(),l("div",iA,[...t[48]||(t[48]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No tokens yet.",-1)])]))])):f("v-if",!0),n("div",rA,[t[50]||(t[50]=n("h2",null,[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})]),h(" Anonymized repositories")],-1)),n("span",aA,d(e.repositories?.length),1)]),n("div",lA,[n("div",dA,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[8]||(t[8]=o=>e.setSegView("all"))},[t[51]||(t[51]=h("All ",-1)),n("span",cA,d(e.fmt?.number(e.segCount("all"))),1)],10,uA),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="ready","is-empty":!e.segCount("ready")}]),"aria-checked":e.segView()==="ready",onClick:t[9]||(t[9]=o=>e.setSegView("ready"))},[t[52]||(t[52]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[53]||(t[53]=h("Ready ",-1)),n("span",fA,d(e.fmt?.number(e.segCount("ready"))),1)],10,pA),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="preparing","is-empty":!e.segCount("preparing")}]),"aria-checked":e.segView()==="preparing",onClick:t[10]||(t[10]=o=>e.setSegView("preparing"))},[t[54]||(t[54]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[55]||(t[55]=h("Preparing ",-1)),n("span",hA,d(e.fmt?.number(e.segCount("preparing"))),1)],10,mA),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="error","is-empty":!e.segCount("error")}]),"aria-checked":e.segView()==="error",onClick:t[11]||(t[11]=o=>e.setSegView("error"))},[t[56]||(t[56]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[57]||(t[57]=h("Error ",-1)),n("span",vA,d(e.fmt?.number(e.segCount("error"))),1)],10,gA),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="expired","is-empty":!e.segCount("expired")}]),"aria-checked":e.segView()==="expired",onClick:t[12]||(t[12]=o=>e.setSegView("expired"))},[t[58]||(t[58]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[59]||(t[59]=h("Expiring / expired ",-1)),n("span",bA,d(e.fmt?.number(e.segCount("expired"))),1)],10,yA),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="removed","is-empty":!e.segCount("removed")}]),"aria-checked":e.segView()==="removed",onClick:t[13]||(t[13]=o=>e.setSegView("removed"))},[t[60]||(t[60]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[61]||(t[61]=h("Removing / removed ",-1)),n("span",kA,d(e.fmt?.number(e.segCount("removed"))),1)],10,wA)]),n("p",CA,[n("strong",null,d(e.fmt.number(e.filteredRepositories?.length||0)),1),t[62]||(t[62]=h(" shown",-1))])]),P((a(),l("form",SA,[n("div",EA,[n("div",NA,[P(n("input",RA,null,512),[[s,{state:e.viewState,set:o=>{e.search=o},value:e.search,form:null,options:{}}]])]),t[64]||(t[64]=n("span",{class:"admin-filter-spacer"},null,-1)),n("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[14]||(t[14]=o=>e.exportCsv())},[...t[63]||(t[63]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),h(" Export",-1)])])])])),[[i,e.viewState]]),e.selectedCount()>0?(a(),l("div",TA,[n("span",null,[n("strong",null,d(e.selectedCount()),1),t[65]||(t[65]=h(" selected",-1))]),n("button",{class:"btn btn-sm",type:"button",onClick:t[15]||(t[15]=o=>e.bulkRefresh())},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),h(" Force refresh",-1)])]),n("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[16]||(t[16]=o=>e.bulkRemoveCache())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),h(" Remove cache",-1)])]),n("button",{class:"btn btn-sm",type:"button",onClick:t[17]||(t[17]=o=>e.clearSelection())},"Clear")])):f("v-if",!0),n("div",PA,[n("div",DA,[n("div",AA,[n("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[18]||(t[18]=o=>e.selectAllOnPage()),checked:e.allSelected},null,8,IA)]),n("div",OA,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[19]||(t[19]=o=>e.sortBy("source.repositoryName"))},[t[69]||(t[69]=h("Repository ",-1)),e.sortIcon("source.repositoryName")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("source.repositoryName")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[68]||(t[68]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",MA,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="status"}]),onClick:t[20]||(t[20]=o=>e.sortBy("status"))},[t[71]||(t[71]=h("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[70]||(t[70]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",VA,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[21]||(t[21]=o=>e.sortBy("pageView"))},[t[73]||(t[73]=h("Views ",-1)),e.sortIcon("pageView")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("pageView")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[72]||(t[72]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",qA,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[22]||(t[22]=o=>e.sortBy("anonymizeDate"))},[t[75]||(t[75]=h("Anonymized ",-1)),e.sortIcon("anonymizeDate")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("anonymizeDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[74]||(t[74]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[76]||(t[76]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(a(!0),l(V,null,Q(e.filteredRepositories,(o,r)=>(a(),l("div",{class:R(["paper-table-row",{"repo-inactive":o?.status=="expired"||o?.status=="removed","repo-error":o?.status=="error","row-selected":e.selected[o?.repoId]}]),role:"row"},[n("div",LA,[P(n("input",$A,null,512),[[s,{state:e.viewState,set:u=>{e.selected[o.repoId]=u},value:e.selected[o?.repoId],form:null,options:{}}]])]),n("div",_A,[t[79]||(t[79]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[n("use",{href:"#project-type-repo"})],-1)),n("div",FA,[n("a",{class:"repo-name",target:"_blank",textContent:d(o?.repoId),href:e.safeUrl("/r/"+o?.repoId)},null,8,UA),n("div",{class:"anon-sub anon-meta","data-meta-fit":"",title:[o?.source?.fullName||o?.source?.repositoryName,o?.options?.update?"branch "+o?.source?.branch:"commit "+o?.source?.commit?.substring(0,7),o?.conference?"conference "+o?.conference:"",o?.size?.storage>0?e.fmt?.humanFileSize(o?.size?.storage):"",e.fmt?.number(o?.options?.terms?.length)+(o?.options?.terms?.length===1?" term":" terms")].filter(Boolean).join(" \xB7 ")},[n("a",{class:"src-path",href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/")},[(o?.source?.fullName||"").includes("/")?(a(),l("span",{key:0,class:"src-owner",textContent:d((u=>u.length>16?u.slice(0,14)+"\u2026":u)((o?.source?.fullName||"").split("/")[0]))},null,8,HA)):f("v-if",!0),n("span",{class:"src-repo",textContent:d((o?.source?.fullName||"").includes("/")?"/"+(o?.source?.fullName||"").split("/").slice(1).join("/"):o?.source?.fullName)},null,8,jA)],8,zA),o?.options?.update?f("v-if",!0):(a(),l("span",{key:0,class:"meta-item","data-meta-label":"commit "+(o?.source?.commit||"").substring(0,7)},[n("a",{class:"mono-hash",title:o?.source?.commit,textContent:d(o?.source?.commit?.substring(0,7)),href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/tree/"+o?.source?.commit)},null,8,WA)],8,GA)),o?.options?.update?(a(),l("span",{key:1,class:"meta-item","data-meta-label":"branch "+(o?.source?.branch||"")},[n("a",{textContent:d(o?.source?.branch),href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/tree/"+o?.source?.branch)},null,8,YA)],8,KA)):f("v-if",!0),o?.conference?(a(),l("span",{key:2,class:"meta-item meta-conf","data-meta-label":"conference "+o?.conference},[t[77]||(t[77]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),h(" "+d(o?.conference),1)],8,JA)):f("v-if",!0),o?.size?.storage>0?(a(),l("span",XA,d(e.fmt?.humanFileSize(o?.size?.storage)),1)):f("v-if",!0),n("span",QA,d(e.fmt?.number(o?.options?.terms?.length))+" "+d(o?.options?.terms?.length===1?"term":"terms"),1),t[78]||(t[78]=n("span",{class:"meta-more",hidden:""},null,-1))],8,BA)])]),n("div",ZA,[n("span",xA,[n("span",{class:R(["status-dot","st-"+(o?.status||"unknown")])},null,2),n("span",{textContent:d(e.fmt?.statusLabel(o?.status))},null,8,e3)]),o?.statusMessage?(a(),l("span",{key:0,class:"status-sub",textContent:d(e.fmt?.statusMsg(o?.statusMessage)),title:o?.statusMessage},null,8,t3)):f("v-if",!0)]),n("div",{class:"cell-views num",role:"cell","data-unit":(o?.pageView||0)===1?"view":"views",textContent:d(e.fmt?.number(o?.pageView||0))},null,8,n3),n("div",{class:"cell-expires",role:"cell",textContent:d(e.fmt?.humanTime(o?.anonymizeDate))},null,8,o3),n("div",s3,[n("div",i3,[t[91]||(t[91]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",r3,[n("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+o?.repoId)},[...t[80]||(t[80]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),h(" Edit",-1)])],8,a3),n("a",{class:"dropdown-item",href:e.safeUrl("/r/"+o?.repoId+"/")},[...t[81]||(t[81]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),h(" View repo",-1)])],8,l3),o?.options?.page&&o?.status=="ready"?(a(),l("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+o?.repoId+"/")},[...t[82]||(t[82]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),h(" View page",-1)])],8,d3)):f("v-if",!0),n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.fetchGithubInfo(o),["prevent"])},[...t[83]||(t[83]=[n("i",{class:"fab fa-github"},null,-1),h(" Live GitHub info",-1)])],8,u3),t[89]||(t[89]=n("div",{class:"dropdown-divider"},null,-1)),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.updateRepository(o),["prevent"])},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),h(" Force update",-1)])],8,c3),[[Z,o?.status=="ready"||o?.status=="error"]]),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.updateRepository(o),["prevent"])},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),h(" Enable",-1)])],8,p3),[[Z,o?.status=="removed"]]),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.showStatusMessage(o),["prevent"])},[...t[86]||(t[86]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1),h(" View status message",-1)])],8,f3),[[Z,o?.statusMessage]]),t[90]||(t[90]=n("div",{class:"dropdown-divider"},null,-1)),n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.removeCache(o),["prevent"])},[...t[87]||(t[87]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),h(" Remove cache",-1)])],8,m3),P(n("a",{class:"dropdown-item text-danger",href:"#",onClick:de(u=>e.removeRepository(o),["prevent"])},[...t[88]||(t[88]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),h(" Remove",-1)])],8,h3),[[Z,o?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(a(),l("div",g3,[...t[92]||(t[92]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No repositories match the current filters.",-1)])])):f("v-if",!0)])])}var v3={class:"container paper-page admin-page"},y3={class:"seg-bar"},b3={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},w3=["aria-checked"],k3={class:"count"},C3=["aria-checked"],S3={class:"count"},E3=["aria-checked"],N3={class:"count"},R3=["aria-checked"],T3={class:"count"},P3={class:"seg-countline",role:"status"},D3={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},A3={class:"w-100 admin-filter-toolbar","aria-label":"Users","accept-charset":"UTF-8"},I3={class:"admin-filter-row"},O3={class:"search-wrap"},M3={type:"search",class:"form-control","aria-label":"Search users",placeholder:"Search username or email\u2026",autocomplete:"off"},V3={key:0,class:"admin-search-hint"},q3={class:"admin-filter-inline"},L3={class:"form-control form-control-sm"},$3={key:0,class:"admin-filter-inline","aria-label":"Pagination"},_3=["disabled"],F3={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},U3=["disabled"],B3={key:0,class:"admin-filter-row"},z3={class:"admin-active-chips"},H3={class:"key"},j3=["onClick"],G3={key:1,class:"bulk-bar"},W3={class:"paper-table w-100",role:"table","aria-label":"Users",style:{"--cols":"28px minmax(280px, 2.4fr) 100px 140px 140px 52px"}},K3={class:"paper-table-head admin-users-row",role:"row"},Y3={role:"columnheader",style:{width:"28px"}},J3=["checked"],X3={role:"columnheader"},Q3={role:"columnheader"},Z3={role:"cell",style:{width:"28px"}},x3={type:"checkbox","aria-label":"Select user"},eI={class:"cell-anon",role:"cell"},tI=["src"],nI={key:1,class:"avatar-fallback","aria-hidden":"true"},oI={class:"anon-text"},sI={class:"user-name-line"},iI=["textContent","href"],rI=["href","title","aria-label"],aI={class:"anon-sub meta-dots"},lI=["title"],dI={key:1},uI={class:"cell-views num",role:"cell"},cI=["title","textContent","href"],pI={class:"cell-status",role:"cell"},fI=["textContent"],mI={class:"cell-status",role:"cell"},hI={key:0,class:"role-pill"},gI={key:1,class:"empty-dash"},vI={class:"cell-actions",role:"cell"},yI={class:"dropdown"},bI={class:"dropdown-menu dropdown-menu-right"},wI=["href"],kI=["href"],CI=["onClick"],SI=["onClick"],EI={key:0,class:"paper-table-empty"},NI={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},RI={key:0,class:"pagination-compact"},TI=["disabled"],PI=["max"],DI=["disabled"],AI={class:"admin-filter-inline"},II={class:"form-control form-control-sm"};function pp(e,t){let s=Pe("field"),i=Pe("form");return a(),l("div",v3,[t[53]||(t[53]=ke('
Admin \xA0/\xA0 Users

Users

',3)),n("div",y3,[n("div",b3,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:!e.query?.status}]),"aria-checked":!e.query?.status,onClick:t[0]||(t[0]=o=>{e.query.status="",e.query.page=1})},[t[14]||(t[14]=h("All ",-1)),n("span",k3,d(e.fmt?.number(e.statusCountFor("active")+e.statusCountFor("banned")+e.statusCountFor("removed"))),1)],10,w3),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.query?.status==="active","is-empty":!e.statusCountFor("active")}]),"aria-checked":e.query?.status==="active",onClick:t[1]||(t[1]=o=>{e.query.status="active",e.query.page=1})},[t[15]||(t[15]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[16]||(t[16]=h("Active ",-1)),n("span",S3,d(e.fmt?.number(e.statusCountFor("active"))),1)],10,C3),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.query?.status==="banned","is-empty":!e.statusCountFor("banned")}]),"aria-checked":e.query?.status==="banned",onClick:t[2]||(t[2]=o=>{e.query.status="banned",e.query.page=1})},[t[17]||(t[17]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[18]||(t[18]=h("Banned ",-1)),n("span",N3,d(e.fmt?.number(e.statusCountFor("banned"))),1)],10,E3),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.query?.status==="removed","is-empty":!e.statusCountFor("removed")}]),"aria-checked":e.query?.status==="removed",onClick:t[3]||(t[3]=o=>{e.query.status="removed",e.query.page=1})},[t[19]||(t[19]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[20]||(t[20]=h("Removed ",-1)),n("span",T3,d(e.fmt?.number(e.statusCountFor("removed"))),1)],10,R3)]),n("p",P3,[n("strong",null,d(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[21]||(t[21]=h(" shown",-1))])]),e.fetchError?(a(),l("div",D3,[t[22]||(t[22]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),h(" "+d(e.fetchError),1)])):f("v-if",!0),P((a(),l("form",A3,[n("div",I3,[n("div",O3,[P(n("input",M3,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(a(),l("span",V3,"/"))]),n("span",q3,[t[24]||(t[24]=n("label",null,"Role",-1)),P((a(),l("select",L3,[...t[23]||(t[23]=[n("option",{value:""},"Any",-1),n("option",{value:"admin"},"Admin",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.role=o},value:e.query?.role,form:null,options:{}}]])]),t[28]||(t[28]=n("span",{class:"admin-filter-spacer"},null,-1)),n("button",{class:"btn btn-sm",type:"button",onClick:t[4]||(t[4]=o=>e.exportCsv())},[...t[25]||(t[25]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),h(" Export",-1)])]),e.totalPage>1?(a(),l("span",$3,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[5]||(t[5]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[26]||(t[26]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,_3),n("span",F3,d(e.query?.page)+"/"+d(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[6]||(t[6]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,U3)])):f("v-if",!0)]),e.chips?.length?(a(),l("div",B3,[n("div",z3,[(a(!0),l(V,null,Q(e.chips,(o,r)=>(a(),l("span",{class:"admin-active-chip",key:o?.key},[n("span",H3,d(o?.label),1),n("span",null,d(o?.value),1),n("button",{type:"button",onClick:u=>e.clearFilter(o.key),"aria-label":"Clear filter"},[...t[29]||(t[29]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,j3)]))),128))])])):f("v-if",!0)])),[[i,e.viewState]]),e.selectedCount()>0?(a(),l("div",G3,[n("span",null,[n("strong",null,d(e.selectedCount()),1),t[30]||(t[30]=h(" selected",-1))]),n("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[7]||(t[7]=o=>e.bulkBan())},[...t[31]||(t[31]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-ban"})],-1),h(" Ban",-1)])]),n("button",{class:"btn btn-sm",type:"button",onClick:t[8]||(t[8]=o=>{e.selected={},e.allSelected=!1})},"Clear")])):f("v-if",!0),n("div",W3,[n("div",K3,[n("div",Y3,[n("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[9]||(t[9]=o=>e.selectAllOnPage()),checked:e.allSelected},null,8,J3)]),n("div",X3,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="username"}]),onClick:t[10]||(t[10]=o=>e.sortBy("username"))},[t[33]||(t[33]=h("User ",-1)),e.sortIcon("username")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("username")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[32]||(t[32]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[36]||(t[36]=n("div",{role:"columnheader",class:"num",title:"Repositories discovered on the user's GitHub account"},"GitHub repos",-1)),n("div",Q3,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="status"}]),onClick:t[11]||(t[11]=o=>e.sortBy("status"))},[t[35]||(t[35]=h("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[34]||(t[34]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[37]||(t[37]=n("div",{role:"columnheader"},"Role",-1)),t[38]||(t[38]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(a(!0),l(V,null,Q(e.filteredUsers,(o,r)=>(a(),l("div",{class:R(["paper-table-row admin-users-row",{"row-selected":e.selected[o?.username]}]),role:"row"},[n("div",Z3,[P(n("input",x3,null,512),[[s,{state:e.viewState,set:u=>{e.selected[o.username]=u},value:e.selected[o?.username],form:null,options:{}}]])]),n("div",eI,[o?.photo?(a(),l("img",{key:0,width:"28",height:"28",class:"rounded-circle",style:{"flex-shrink":"0"},src:e.safeUrl(o?.photo)},null,8,tI)):(a(),l("span",nI,d((o?.username||"?").charAt(0).toUpperCase()),1)),n("div",oI,[n("span",sI,[n("a",{class:"repo-name",textContent:d(o?.username),href:e.safeUrl("/admin/users/"+o?.username)},null,8,iI),n("a",{class:"user-gh-link",target:"_blank",rel:"noopener",href:e.safeUrl("https://github.com/"+o?.username),title:o?.username+" on GitHub","aria-label":o?.username+" on GitHub"},[...t[39]||(t[39]=[n("i",{class:"fab fa-github","aria-hidden":"true"},null,-1)])],8,rI)]),n("div",aI,[o?.emails?.[0]?.email?(a(),l("span",{key:0,class:"meta-email meta-tail",title:o?.emails?.[0]?.email},d(o?.emails?.[0]?.email),9,lI)):f("v-if",!0),o?.dateOfEntry?(a(),l("span",dI,"Joined "+d(e.fmt?.humanTime(o?.dateOfEntry)),1)):f("v-if",!0)])])]),n("div",uI,[t[40]||(t[40]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),n("a",{title:o?.repoCount?"Show this user\u2019s repositories":"Repositories not synced yet",textContent:d(o?.repoCount?e.fmt?.number(o.repoCount):"Not synced"),class:R({"is-unsynced":!o?.repoCount}),href:e.safeUrl("/admin/repositories?owner="+o?.username)},null,10,cI)]),n("div",pI,[n("span",{class:R(["status-dot","st-"+(o?.status||"unknown")])},null,2),n("span",{textContent:d(e.fmt?.title(o?.status))},null,8,fI)]),n("div",mI,[o?.isAdmin?(a(),l("span",hI,"Admin")):f("v-if",!0),o?.isAdmin?f("v-if",!0):(a(),l("span",gI,"\u2014"))]),n("div",vI,[n("div",yI,[t[46]||(t[46]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",bI,[n("a",{class:"dropdown-item",href:e.safeUrl("/admin/users/"+o?.username)},[...t[41]||(t[41]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),h(" View details",-1)])],8,wI),n("a",{class:"dropdown-item",href:e.safeUrl("/admin/repositories?owner="+o?.username)},[...t[42]||(t[42]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),h(" View repositories",-1)])],8,kI),t[45]||(t[45]=n("div",{class:"dropdown-divider"},null,-1)),P(n("a",{class:"dropdown-item text-danger",href:"#",onClick:de(u=>e.banUser(o),["prevent"])},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-ban"})],-1),h(" Ban",-1)])],8,CI),[[Z,o?.status=="active"]]),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.activateUser(o),["prevent"])},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),h(" Activate",-1)])],8,SI),[[Z,o?.status=="removed"||o?.status=="banned"]])])])])],2))),256)),e.filteredUsers?.length==0?(a(),l("div",EI,[...t[47]||(t[47]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No users match the current filters.",-1)])])):f("v-if",!0)]),n("div",NI,[t[52]||(t[52]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",RI,[n("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[48]||(t[48]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),h(" Previous",-1)])],8,TI),P(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,PI),[[s,{state:e.viewState,set:o=>{e.query.page=o},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+d(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[13]||(t[13]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[49]||(t[49]=[h("Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,DI)])):f("v-if",!0),n("span",AI,[t[51]||(t[51]=n("label",null,"Per page",-1)),P((a(),l("select",II,[...t[50]||(t[50]=[n("option",{value:"10"},"10",-1),n("option",{value:"25"},"25",-1),n("option",{value:"50"},"50",-1),n("option",{value:"100"},"100",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.limit=o},value:e.query?.limit,form:null,options:{}}]])])])])}var OI={class:"anonymize-landing"},MI={class:"anonymize-landing-inner"},VI={class:"form-group mt-4 mb-2"},qI={class:"source-url-label-row"},LI={key:0,class:"repo-access","aria-label":"GitHub access"},$I={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},_I=["aria-pressed","disabled"],FI=["aria-pressed","disabled"],UI={key:1,class:"connection-badge"},BI={class:"landing-url-row"},zI={id:"sourceUrl-landing",onblur:"this.scrollLeft=0",type:"text",class:"form-control form-control-lg",placeholder:"https://github.com/owner/repository"},HI=["aria-disabled"],jI={key:0,class:"text-danger",role:"alert"},GI={class:"repo-picker","aria-labelledby":"repo-picker-title"},WI={class:"repo-picker-head"},KI={class:"repo-picker-title"},YI={key:0,class:"repo-picker-count",role:"status"},JI={key:0,class:"repo-picker-list","aria-busy":"true","aria-label":"Loading your repositories"},XI={class:"repo-picker-row is-skeleton","aria-hidden":"true"},QI={key:1,class:"repo-picker-list"},ZI=["title"],xI={class:"repo-picker-owner"},eO={class:"repo-picker-repo"},tO=["onClick","aria-label"],nO={key:2,class:"repo-picker-state",role:"status"},oO={key:3,class:"repo-picker-state"},sO={key:4,class:"repo-picker-state",role:"alert"},iO={key:5,class:"repo-picker-pagination","aria-label":"Repository pages"},rO=["disabled"],aO={class:"repo-picker-count",role:"status"},lO=["disabled"],dO={key:6,class:"repo-picker-access"},uO={key:1,class:"connection-link",href:"/connections"},cO={class:"anonymize-workspace"},pO={class:"anonymize-topbar"},fO={class:"anonymize-topbar-inner"},mO={class:"paper-crumbs"},hO={class:"here"},gO={class:"anonymize-topbar-head"},vO={class:"paper-page-title anonymize-topbar-title"},yO={key:0},bO={key:1},wO={class:"paper-page-lede anonymize-topbar-lede"},kO={key:0,class:"task-trail flow-trail","aria-label":"Anonymization steps"},CO={key:0,class:"alert alert-info",role:"status"},SO={key:1,class:"alert alert-info",role:"status"},EO={key:1},NO={class:"anonymize-mobile-tabs",role:"tablist","aria-label":"Anonymization workspace"},RO=["aria-selected","tabindex"],TO=["aria-selected","tabindex"],PO={class:"anonymize-split"},DO=["role","aria-labelledby"],AO={class:"form needs-validation paper-settings-main",name:"anonymize",novalidate:""},IO={class:"anonymize-fields"},OO={class:"paper-settings-section"},MO={class:"form-group"},VO={class:"source-url-label-row"},qO={key:0,class:"repo-access","aria-label":"GitHub access"},LO={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},$O=["aria-pressed","disabled"],_O=["aria-pressed","disabled"],FO={key:1,class:"connection-badge"},UO=["disabled"],BO={key:0,class:"source-summary"},zO={key:1,class:"source-error",role:"alert"},HO={class:"invalid-feedback"},jO={key:0,class:"source-error-note"},GO={key:1,class:"repo-access-controls"},WO={key:1,class:"btn btn-ink",href:"/connections"},KO={key:2,class:"btn btn-ink",href:"/dashboard"},YO={key:0,class:"repo-access-details","aria-label":"Previous repository configuration"},JO={key:0,class:"form-group"},XO=["value"],QO={key:1},ZO={class:"repo-access-controls"},xO=["href"],e5={key:1,class:"repo-access-details","aria-label":"Publication"},t5={class:"repo-access-note"},n5={key:2,class:"form-text text-muted source-public-note"},o5=["open"],s5={key:0,class:"repair-step"},i5=["disabled"],r5={key:0,role:"status"},a5={class:"repair-step"},l5={key:0,role:"status"},d5={key:4,class:"form-grid-2"},u5={class:"form-group"},c5={class:"input-group"},p5={class:"form-control",id:"branch",name:"branch"},f5=["textContent","value"],m5={class:"input-group-append"},h5={class:"form-group"},g5=["disabled"],v5={class:"invalid-feedback"},y5={class:"invalid-feedback"},b5={class:"form-check-input",type:"checkbox",id:"update",name:"update","aria-describedby":"update-help"},w5={class:"form-check-label",for:"update"},k5={key:0,class:"paid-tag"},C5={key:0,class:"form-text text-muted",id:"update-help"},S5={key:1,class:"form-text text-muted auto-update-paid",id:"update-help"},E5={class:"paper-settings-section"},N5={class:"form-group"},R5=["disabled"],T5={class:"form-text text-muted anon-url-echo"},P5={class:"anon-url-id"},D5={class:"invalid-feedback"},A5={class:"form-group"},I5=["disabled"],O5={class:"form-text text-muted anon-url-echo"},M5={class:"anon-url-id"},V5={class:"invalid-feedback"},q5={class:"form-group"},L5=["disabled"],$5={class:"form-text text-muted anon-url-echo"},_5={class:"anon-url-id"},F5={class:"invalid-feedback"},U5={class:"form-group"},B5=["rows"],z5={class:"redaction-syntax"},H5={class:"form-text text-muted"},j5=["onClick"],G5={key:0,class:"term-hint-more"},W5={class:"invalid-feedback"},K5={class:"preserve-row"},Y5={class:"preserve-row-text"},J5={class:"preserve-row-value"},X5=["disabled"],Q5={class:"preserve-tree"},Z5={key:0,class:"preserve-status"},x5={key:1,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},e8=["aria-expanded","aria-label","onClick"],t8={key:1,class:"preserve-caret-space"},n8=["id","aria-label","checked",".indeterminate","disabled","onChange"],o8=["for","onClick"],s8={key:2,class:"preserve-note"},i8={key:0,class:"preserve-status"},r8={key:0,class:"preserve-status"},a8=["open"],l8={class:"preserve-foot"},d8={class:"preserve-count","aria-live":"polite"},u8={class:"preserve-actions"},c8={class:"paper-settings-section"},p8={class:"form-check"},f8={class:"form-check-input",type:"checkbox",id:"link",name:"link"},m8={class:"form-check"},h8={class:"form-check-input",type:"checkbox",id:"image",name:"image"},g8={class:"form-check"},v8={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},y8={class:"form-check"},b8={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},w8={class:"form-check"},k8=["disabled"],C8={key:0,class:"form-text text-muted"},S8={key:1,class:"form-text text-muted"},E8={key:0,class:"form-text text-muted"},N8={class:"form-check"},R8={class:"form-check-input",type:"checkbox",id:"title-gist",name:"title-gist"},T8={class:"form-check"},P8={class:"form-check-input",type:"checkbox",id:"content-gist",name:"content-gist"},D8={class:"form-check"},A8={class:"form-check-input",type:"checkbox",id:"comments-gist",name:"comments-gist"},I8={class:"form-check"},O8={class:"form-check-input",type:"checkbox",id:"username-gist",name:"username-gist"},M8={class:"form-check"},V8={class:"form-check-input",type:"checkbox",id:"date-gist",name:"date-gist"},q8={class:"form-check"},L8={class:"form-check-input",type:"checkbox",id:"origin-gist",name:"origin-gist"},$8={class:"form-check"},_8={class:"form-check-input",type:"checkbox",id:"title",name:"title"},F8={class:"form-check"},U8={class:"form-check-input",type:"checkbox",id:"body",name:"body"},B8={class:"form-check"},z8={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},H8={class:"form-check"},j8={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},G8={class:"form-check"},W8={class:"form-check-input",type:"checkbox",id:"username",name:"username"},K8={class:"form-check"},Y8={class:"form-check-input",type:"checkbox",id:"date",name:"date"},J8={class:"form-check"},X8={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},Q8={class:"paper-settings-section hosting-settings",id:"repository-hosting","aria-labelledby":"hosting-heading"},Z8={class:"form-group conference-field"},x8=["href"],e6={class:"invalid-feedback"},t6={class:"form-text text-muted"},n6={key:0,class:"hosting-usage"},o6={key:0},s6={key:1},i6={key:2},r6={key:1,class:"hosting-limit auto-update-note",role:"status"},a6={key:2,class:"hosting-payment"},l6={key:0,class:"hosting-limit",role:"status"},d6={key:1,class:"hosting-options"},u6={class:"hosting-options-title"},c6=["value","checked","onChange"],p6={class:"hosting-option-body"},f6={key:0,class:"hosting-cycle billing-toggle",role:"radiogroup","aria-label":"Billing frequency"},m6=["aria-checked","onClick"],h6={key:0,class:"billing-toggle-save"},g6={class:"hosting-option-price"},v6={key:2,role:"status"},y6={key:3,class:"hosting-terms"},b6={key:4,class:"hosting-terms"},w6={key:5,class:"capacity-options"},k6=["disabled"],C6={key:3,class:"hosting-subhead"},S6={class:"expiration-choices"},E6={class:"expiration-choice"},N6=["checked","disabled"],R6={key:0,class:"dated-options"},T6={key:0,class:"hosting-date"},P6=["min","max"],D6={key:0,class:"date-echo","aria-live":"polite"},A6={class:"invalid-feedback"},I6={class:"invalid-feedback"},O6={class:"hosting-property"},M6={key:1,class:"expiration-choice"},V6=["checked","disabled"],q6={key:0},L6={key:4,class:"form-text text-muted"},$6={key:5,class:"inline-hosting"},_6={key:0,role:"alert",class:"text-danger"},F6={key:1,role:"alert",class:"text-danger"},U6=["disabled"],B6={key:2,role:"status"},z6={key:3,role:"status",class:"form-text text-muted"},H6={key:4,class:"hosting-terms"},j6={key:5,class:"hosting-terms"},G6={key:6,class:"repository-pass"},W6=["disabled","onClick"],K6={class:"paper-settings-section"},Y6={class:"form-group"},J6={style:{position:"relative"}},X6={type:"text",id:"coauthorSearch",class:"form-control",placeholder:"Search GitHub username\u2026",autocomplete:"off"},Q6={class:"dropdown-menu show",style:{display:"block","max-height":"220px","overflow-y":"auto",width:"100%"}},Z6=["onClick"],x6=["src"],eM=["textContent"],tM=["textContent"],nM={class:"coauthor-list"},oM={class:"coauthor-row d-flex align-items-center",style:{padding:"6px 0",gap:"8px"}},sM=["src"],iM=["textContent","href"],rM=["onClick"],aM={class:"form-text text-muted"},lM=["textContent"],dM={class:"anonymize-submit-bar"},uM=["disabled"],cM=["disabled"],pM=["disabled"],fM=["disabled"],mM=["disabled"],hM=["disabled"],gM={key:5,class:"submit-reason",role:"status"},vM={key:6,class:"checkout-return-note"},yM={key:7,class:"draft-status",role:"status"},bM={key:8,class:"draft-status"},wM=["role","aria-labelledby"],kM={class:"rp-caption"},CM=["aria-expanded"],SM=["title"],EM={class:"redact-slot","aria-hidden":"true"},NM={key:2,class:"rp-count rp-count-none"},RM=["href"],TM=["aria-pressed"],PM={class:"rp-open-icon",viewBox:"0 0 16 16","aria-hidden":"true"},DM={key:0,d:"M9.5 2.5h4v4M13.5 2.5 9 7M6.5 13.5h-4v-4M2.5 13.5 7 9"},AM={key:1,d:"M13.5 6.5h-4v-4M9.5 6.5 14 2M2.5 9.5h4v4M6.5 9.5 2 14"},IM={class:"rp-window"},OM={class:"rp-chrome","aria-hidden":"true"},MM={class:"rp-url"},VM={class:"rp-bar","aria-hidden":"true"},qM={key:0,class:"rp-bar-id"},LM={key:1,class:"rp-bar-kind"},$M={class:"leftCol-head"},_M={class:"leftCol-body"},FM={key:0,class:"rp-state rp-loading",role:"status"},UM={class:"rp-state-text"},BM={class:"rp-state rp-error"},zM={key:0,class:"rp-state-actions"},HM={key:1,class:"btn btn-ink btn-sm",href:"/connections"},jM={key:2,class:"btn btn-ink btn-sm",href:"/dashboard"},GM={class:"rp-state rp-error",role:"alert"},WM={class:"rp-state-actions"},KM={class:"rp-state rp-error",role:"alert"},YM={class:"rp-state-actions"},JM={key:4,class:"rp-state rp-empty"},XM={key:6,class:"anonymize-preview-body"},QM={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},ZM={class:"pr-title mb-1"},xM={key:0},eV=["textContent"],tV={key:0},nV={key:1},oV={key:2},sV={class:"pr-comments mt-3"},iV={class:"pr-comment"},rV={class:"pr-comment-head"},aV=["textContent"],lV={key:0,class:"pr-comment-date"},dV={key:3},uV={class:"pr-comments"},cV={class:"pr-comment"},pV={class:"pr-comment-head"},fV={key:0,class:"pr-comment-author"},mV=["textContent"],hV=["textContent"],gV={key:0,class:"pr-comment-body"},vV={key:7,class:"anonymize-preview-body"},yV={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},bV={class:"pr-title mb-1"},wV={key:0},kV=["textContent"],CV={key:0},SV={key:1,class:"pr-body"},EV={key:2,class:"paper-tabs",role:"tablist"},NV=["aria-selected","tabindex"],RV=["aria-selected","tabindex"],TV=["textContent"],PV={key:3,class:"anonymize-preview-status"},DV={class:"paper-tab-content"},AV={key:0,role:"tabpanel",id:"preview-pr-diff-panel","aria-labelledby":"preview-pr-diff-tab"},IV=["innerHTML"],OV={key:1,role:"tabpanel",id:"preview-pr-comments-panel","aria-labelledby":"preview-pr-comments-tab"},MV={class:"pr-comments"},VV={class:"pr-comment"},qV={class:"pr-comment-head"},LV={key:0,class:"pr-comment-author"},$V=["textContent"],_V=["textContent"],FV={key:0,class:"pr-comment-body"},UV={key:8,class:"rp-more"},BV=["href"],zV={key:2,class:"rp-more-btn is-hint","aria-hidden":"true"};function fp(e,t){let s=Ze("tree"),i=Ze("partial-view"),o=Ze("gist-file"),r=Ze("markdown"),u=Pe("field"),p=Pe("form");return a(),l("div",{class:R(["anonymize-page h-100",{"mobile-preview-active":e.mobilePane==="preview","preview-expanded":e.previewExpanded}])},[f(" ===== STATE 1: No URL \u2014 centered input ===== "),P(n("div",OI,[n("div",MI,[t[70]||(t[70]=ke('
My work \xA0/\xA0 New anonymization

New anonymization

Paste a repository, pull request, or gist URL, or pick one of your repositories. You\u2019ll choose the terms to redact next.

  1. 1. Repository
  2. 2. Review and hosting
  3. 3. Review link
',2)),n("div",VI,[n("div",qI,[t[62]||(t[62]=n("label",{class:"paper-field-label",for:"sourceUrl-landing"},"Source URL",-1)),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(a(),l("aside",LI,[!e.isUpdate&&e.detectedType!=="gist"?(a(),l("div",$I,[n("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[0]||(t[0]=c=>e.chooseGitHubConnection("github-app"))},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1),h(),n("span",{class:"sr-only"},"Read-only ",-1),h("GitHub App",-1)])],8,_I),n("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[1]||(t[1]=c=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,FI)])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"?(a(),l("span",UI,d((e.detectedType==="gist"?e.githubConnections?.gistConnection==="github-app":e.githubConnection==="github-app")?"Read-only GitHub App":"Legacy OAuth"),1)):f("v-if",!0)])):f("v-if",!0)]),n("div",BI,[P(n("input",zI,null,512),[[u,{state:e.viewState,set:c=>{e.sourceUrl=c},value:e.sourceUrl,form:null,options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]]),n("button",{type:"button",class:"btn btn-primary landing-continue","aria-disabled":e.sourceUrl?.trim()?null:"true",onClick:t[2]||(t[2]=c=>e.sourceUrl?.trim()&&e.urlSelected())},"Continue",8,HI)])]),e.sourceUrlError?(a(),l("p",jI,d(e.sourceUrlError),1)):f("v-if",!0),t[71]||(t[71]=n("small",{class:"form-text landing-help",style:{color:"var(--ink-muted)"}}," Repository, pull request (\u2026/pull/42) and gist (gist.github.com/\u2026) URLs are all accepted. ",-1)),n("section",GI,[n("div",WI,[n("div",KI,[t[63]||(t[63]=n("h2",{id:"repo-picker-title"},"Your repositories",-1)),e.userReposStatus==="loading"?(a(),l("span",YI,d(e.userRepoFilter.trim()?"Searching repositories\u2026":"Loading repositories\u2026"),1)):f("v-if",!0)]),P(n("input",{type:"search",class:"form-control repo-picker-filter",placeholder:"Search repositories\u2026","aria-label":"Search your repositories",autocomplete:"off",maxlength:"200","onUpdate:modelValue":t[3]||(t[3]=c=>e.userRepoFilter=c)},null,512),[[ot,e.userRepoFilter]])]),e.userReposStatus==="loading"||e.userReposStatus==="idle"?(a(),l("ul",JI,[(a(),l(V,null,Q([1,2,3,4],(c,v)=>n("li",XI,[n("span",{class:"skeleton skeleton-line",style:Ae({width:34+c*9+"%"})},null,4)])),64))])):f("v-if",!0),e.userReposStatus==="ready"&&e.userRepos.length>0?(a(),l("ul",QI,[(a(!0),l(V,null,Q(e.userRepos,(c,v)=>(a(),l("li",{key:c.id||c.fullName,class:"repo-picker-row"},[t[65]||(t[65]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),n("span",{class:"repo-picker-name",title:c.fullName},[n("span",xI,[h(d(c.fullName.split("/")[0]),1),t[64]||(t[64]=n("span",{class:"repo-picker-slash"},"/",-1))]),n("span",eO,d(c.fullName.split("/").slice(1).join("/")),1)],8,ZI),n("button",{type:"button",class:"btn btn-outline-ink btn-sm repo-picker-select",onClick:g=>e.selectUserRepo(c),"aria-label":"Select "+c.fullName},"Select",8,tO)]))),128))])):f("v-if",!0),e.userReposStatus==="ready"&&e.userRepos.length===0&&e.userRepoFilter.trim()?(a(),l("p",nO,d(e.userRepoNext!==null?"No matches yet. Continue searching the remaining repositories.":e.userRepoPage>1?"No more matching repositories.":"No matching repositories found."),1)):f("v-if",!0),e.userReposStatus==="ready"&&e.userRepos.length===0&&!e.userRepoFilter.trim()?(a(),l("p",oO,"No repositories found. Paste a URL above, or grant access below.")):f("v-if",!0),e.userReposStatus==="error"?(a(),l("p",sO,[t[66]||(t[66]=h("Your repositories could not be loaded. ",-1)),n("button",{type:"button",class:"task-text-button",onClick:t[4]||(t[4]=c=>e.loadUserRepos())},"Try again")])):f("v-if",!0),e.userRepoPage>1||e.userRepoNext!==null?(a(),l("nav",iO,[n("button",{type:"button",class:"btn btn-outline-ink btn-sm",disabled:e.userRepoPage===1||e.userReposStatus==="loading",onClick:t[5]||(t[5]=c=>e.changeUserRepoPage(-1))},"Previous",8,rO),n("span",aO,"Page "+d(e.userRepoPage),1),n("button",{type:"button",class:"btn btn-outline-ink btn-sm",disabled:e.userRepoNext===null||e.userReposStatus!=="ready",onClick:t[6]||(t[6]=c=>e.changeUserRepoPage(1))},d(e.userRepoFilter.trim()&&!e.userRepos.length?"Continue search":"Next"),9,lO)])):f("v-if",!0),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.userReposStatus==="ready"?(a(),l("p",dO,[t[69]||(t[69]=h("Don\u2019t see your repository? ",-1)),e.githubConnection!=="oauth"?(a(),l("button",{key:0,type:"button",class:"connection-link",onClick:t[7]||(t[7]=c=>e.grantGitHubAccess())},[...t[67]||(t[67]=[h("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):(a(),l("a",uO,[...t[68]||(t[68]=[h("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])]))])):f("v-if",!0)])])],512),[[Z,!e.workspaceOpen&&!e.isUpdate]]),f(" ===== STATE 2: URL provided \u2014 form (left) + preview (right) ===== "),P(n("div",cO,[n("header",pO,[n("div",fO,[n("div",mO,[t[72]||(t[72]=n("a",{href:"/dashboard"},"My work",-1)),t[73]||(t[73]=h(" \xA0/\xA0 ",-1)),n("span",hO,d(e.isUpdate?"Edit anonymization":"New anonymization"),1)]),n("div",gO,[n("h1",vO,[e.isUpdate?f("v-if",!0):(a(),l("span",yO,"New anonymization")),e.isUpdate?(a(),l("span",bO,"Edit anonymization")):f("v-if",!0)]),P(n("span",{class:R(["type-badge",{"type-repo":e.detectedType==="repo","type-pr":e.detectedType==="pr","type-gist":e.detectedType==="gist"}])},d(e.detectedType==="repo"?"Repository":e.detectedType==="pr"?"Pull request":"Gist"),3),[[Z,e.detectedType]])]),n("p",wO,d(e.isUpdate?"Changes apply to the existing anonymous link; reviewers keep the same URL.":"Choose the terms to redact, what reviewers see, and when the link expires."),1),e.isUpdate?f("v-if",!0):(a(),l("ol",kO,[...t[74]||(t[74]=[n("li",null,"1. Repository",-1),n("li",{"aria-current":"step"},"2. Review and hosting",-1),n("li",null,"3. Review link",-1)])]))])]),e.detectedType==="gist"&&e.gistAppRequired?(a(),l("aside",CO,[t[75]||(t[75]=n("p",null,"Reconnect your GitHub account to read this gist. Your draft will be restored when you return.",-1)),n("button",{type:"button",class:"btn btn-ink",onClick:t[8]||(t[8]=c=>e.connectGistApp())},"Connect GitHub App to access gists")])):f("v-if",!0),e.detectedType==="gist"&&e.gistOAuthRequired?(a(),l("aside",SO,[t[76]||(t[76]=n("p",null,"Connect GitHub OAuth to access gists. Your account and existing anonymizations stay the same, and your draft will be restored when you return.",-1)),t[77]||(t[77]=n("p",null,"GitHub's legacy OAuth connection includes write access to private repositories.",-1)),e.githubConnections?.oauthEnabled?(a(),l("button",{key:0,type:"button",class:"btn btn-ink",onClick:t[9]||(t[9]=c=>e.connectGistOAuth())},"Connect GitHub OAuth to access gists")):(a(),l("p",EO,"GitHub OAuth is currently unavailable. Please try again later."))])):f("v-if",!0),n("nav",NO,[n("button",{id:"workspace-settings-tab",role:"tab",type:"button","aria-selected":e.mobilePane==="settings","aria-controls":"workspace-settings",tabindex:e.mobilePane==="settings"?0:-1,onKeydown:t[10]||(t[10]=c=>e.previewTabKeydown(c)),onClick:t[11]||(t[11]=c=>e.selectMobilePane("settings"))},[...t[78]||(t[78]=[n("span",{class:"tab-label"},"Settings",-1)])],40,RO),n("button",{id:"workspace-preview-tab",role:"tab",type:"button","aria-selected":e.mobilePane==="preview","aria-controls":"workspace-preview",tabindex:e.mobilePane==="preview"?0:-1,onKeydown:t[12]||(t[12]=c=>e.previewTabKeydown(c)),onClick:t[13]||(t[13]=c=>e.selectMobilePane("preview"))},[...t[79]||(t[79]=[n("span",{class:"tab-label"},"Reviewer preview",-1)])],40,TO)]),n("div",PO,[f(" Form column (left) "),n("div",{id:"workspace-settings",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-settings-tab":null,class:"anonymize-form-col overflow-auto"},[P((a(),l("form",AO,[n("div",IO,[n("section",OO,[t[98]||(t[98]=n("h2",{class:"paper-section-eyebrow"},"Source & access",-1)),n("div",MO,[n("div",VO,[t[81]||(t[81]=n("label",{class:"paper-field-label",for:"sourceUrl"},"Source URL",-1)),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(a(),l("aside",qO,[!e.isUpdate&&e.detectedType!=="gist"?(a(),l("div",LO,[n("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[14]||(t[14]=c=>e.chooseGitHubConnection("github-app"))},[...t[80]||(t[80]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1),h(),n("span",{class:"sr-only"},"Read-only ",-1),h("GitHub App",-1)])],8,$O),n("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[15]||(t[15]=c=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,_O)])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"?(a(),l("span",FO,d((e.detectedType==="gist"?e.githubConnections?.gistConnection==="github-app":e.githubConnection==="github-app")?"Read-only GitHub App":"Legacy OAuth"),1)):f("v-if",!0)])):f("v-if",!0)]),P(n("input",{type:"text",class:R(["form-control",{"is-invalid":e.anonymize?.sourceUrl?.invalid}]),name:"sourceUrl",id:"sourceUrl",onblur:"this.scrollLeft=0",disabled:e.isUpdate&&e.detectedType!=="repo",placeholder:"Paste a GitHub repo or pull request URL"},null,10,UO),[[u,{state:e.viewState,set:c=>{e.sourceUrl=c},value:e.sourceUrl,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]]),e.sourceSummary()&&!e.anonymize?.sourceUrl?.invalid?(a(),l("p",BO,[t[82]||(t[82]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check"})],-1)),h(d(e.sourceSummary()),1)])):f("v-if",!0),e.sourceProblem()&&e.sourceProblem().kind!=="connect"?(a(),l("div",zO,[n("p",HO,d(e.sourceProblem().text),1),e.sourceProblem().note?(a(),l("p",jO,d(e.sourceProblem().note),1)):f("v-if",!0),e.sourceProblem().manage||e.sourceProblem().retry||e.sourceProblem().dashboard?(a(),l("div",GO,[e.sourceProblem().manage==="app"?(a(),l("button",{key:0,type:"button",class:"btn btn-ink",onClick:t[16]||(t[16]=c=>e.grantGitHubAccess())},[...t[83]||(t[83]=[h("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0),e.sourceProblem().manage==="link"?(a(),l("a",WO,"Manage GitHub access")):f("v-if",!0),e.sourceProblem().dashboard?(a(),l("a",KO,"Open My work")):f("v-if",!0),e.sourceProblem().retry?(a(),l("button",{key:3,type:"button",class:"btn btn-outline-ink",onClick:t[17]||(t[17]=c=>e.urlSelected(!0))},"Try again")):f("v-if",!0)])):f("v-if",!0)])):f("v-if",!0)]),!e.isUpdate&&e.previousConfigurations.length?(a(),l("aside",YO,[t[85]||(t[85]=n("p",{role:"status"},"You have already anonymized this repository. Use the existing configuration to keep its anonymous link and avoid creating another repository.",-1)),e.previousConfigurations.length>1?(a(),l("div",JO,[t[84]||(t[84]=n("label",{class:"paper-field-label",for:"previousConfiguration"},"Previous anonymization",-1)),P(n("select",{id:"previousConfiguration",class:"form-control","onUpdate:modelValue":t[18]||(t[18]=c=>e.previousConfigurationId=c)},[(a(!0),l(V,null,Q(e.previousConfigurations,c=>(a(),l("option",{key:c.repoId,value:c.repoId},d(c.repoId),9,XO))),128))],512),[[Rt,e.previousConfigurationId]])])):(a(),l("p",QO,d(e.previousConfigurationId),1)),t[86]||(t[86]=n("p",null,"You can review and update its settings before saving.",-1)),n("div",ZO,[n("a",{class:"btn btn-ink",href:e.existingConfigurationUrl()},"Use existing configuration",8,xO),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[19]||(t[19]=c=>e.previousConfigurations=[])},"Create a separate one")])])):f("v-if",!0),e.details&&e.sourceIsPrivate()?(a(),l("aside",e5,[n("div",t5,[n("span",null,[t[87]||(t[87]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1)),h(" "+d(e.detectedType==="gist"?"This secret gist will be published at a public link.":"Selected content will be published, including content from private repositories."),1)])])])):e.details?(a(),l("p",n5,"Anonymized content is public.")):f("v-if",!0),e.isUpdate&&e.detectedType==="repo"&&e.role==="owner"&&e.sourceUrl==="https://github.com/"+e._originalFullName?(a(),l("details",{key:3,class:"repair-disclosure",open:!!(e.error||e.sourceError||e.accessRepairMessage||e.reconnectRepositoryId)},[t[91]||(t[91]=n("summary",null,"Connection problems?",-1)),e.accessRepairAllowed&&e.githubConnections?.appEnabled&&e.githubConnection==="github-app"&&e.sourceUrl==="https://github.com/"+e._originalFullName?(a(),l("div",s5,[t[89]||(t[89]=n("p",null,"If this repository became private or its App installation changed, repair its access here. This keeps the same anonymous URL and published commit.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.repairingGitHubAccess,onClick:t[20]||(t[20]=c=>e.repairGitHubAccess())},"Repair GitHub access",8,i5),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[21]||(t[21]=c=>e.grantGitHubAccess())},[...t[88]||(t[88]=[h("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])]),e.accessRepairMessage?(a(),l("p",r5,d(e.accessRepairMessage),1)):f("v-if",!0)])):f("v-if",!0),n("div",a5,[t[90]||(t[90]=n("p",null,"If you deleted and recreated this repository, reconnect it before choosing a branch.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[22]||(t[22]=c=>e.reconnectSource())},"Reconnect source repository"),e.reconnectRepositoryId?(a(),l("p",l5,"Source reloaded. Review the branch, commit, and anonymization preview, then save to replace the published snapshot.")):f("v-if",!0)])],8,o5)):f("v-if",!0),e.detectedType==="repo"?P((a(),l("div",d5,[n("div",u5,[t[93]||(t[93]=n("label",{class:"paper-field-label",for:"branch"},"Branch",-1)),n("div",c5,[P((a(),l("select",p5,[(a(!0),l(V,null,Q(e.branches,(c,v)=>(a(),l("option",{textContent:d(c?.name),value:c?.name},null,8,f5))),256))])),[[u,{state:e.viewState,set:c=>{e.source.branch=c},value:e.source?.branch,form:"anonymize",options:{}}]]),n("div",m5,[n("button",{class:"btn btn-icon refresh-branches",type:"button",title:"Refresh branches",onClick:t[23]||(t[23]=c=>e.getBranches(!0)),"aria-label":"Refresh branches"},[...t[92]||(t[92]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])])])])]),n("div",h5,[t[94]||(t[94]=n("label",{class:"paper-field-label",for:"commit"},"Commit",-1)),P(n("input",{class:R(["form-control",{"is-invalid":e.anonymize?.commit?.invalid}]),id:"commit",disabled:e.options.update,name:"commit",pattern:"[a-fA-Z0-9]{6,}",required:""},null,10,g5),[[u,{state:e.viewState,set:c=>{e.source.commit=c},value:e.source?.commit,form:"anonymize",options:{}}]]),P(n("div",v5," The commit SHA is not valid. ",512),[[Z,e.anonymize?.commit?.errors?.pattern||e.anonymize?.commit?.errors?.required]]),P(n("div",y5," This commit no longer exists in the repository. Click refresh to get the latest. ",512),[[Z,e.anonymize?.commit?.errors?.exists]])])],512)),[[Z,e.sourceReady()]]):f("v-if",!0),P(n("div",{class:R(["form-check auto-update-check",{"is-paid":!e.liveUpdatesIncluded()}])},[P(n("input",b5,null,512),[[u,{state:e.viewState,set:c=>{e.options.update=c},value:e.options?.update,form:"anonymize",options:{}}]]),n("label",w5,[t[95]||(t[95]=h("Auto-update from GitHub",-1)),e.liveUpdatesIncluded()?f("v-if",!0):(a(),l("span",k5,"Paid"))]),e.liveUpdatesIncluded()?(a(),l("small",C5,"Follows the latest version, at most once an hour.")):(a(),l("small",S5,[t[96]||(t[96]=h("Needs Live updates",-1)),e.liveUpdatesPrice()?(a(),l(V,{key:0},[h(" \xB7 "+d(e.liveUpdatesPrice()),1)],64)):f("v-if",!0),t[97]||(t[97]=h(", a Paper pack or an author subscription. ",-1)),n("a",{href:"#repository-hosting",onClick:t[24]||(t[24]=de(c=>e.showHostingOptions(),["prevent"]))},"Hosting options")]))],2),[[Z,e.detectedType&&e.sourceReady()]])]),P(n("section",E5,[t[132]||(t[132]=n("h2",{class:"paper-section-eyebrow"},"Anonymization",-1)),P(n("div",N5,[t[103]||(t[103]=n("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),P(n("input",{type:"text",class:R(["form-control",{"is-invalid":e.anonymize?.repoId?.invalid}]),name:"repoId",id:"repoId",disabled:e.isUpdate},null,10,R5),[[u,{state:e.viewState,set:c=>{e.repoId=c},value:e.repoId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",T5,[t[99]||(t[99]=h("anonymous.4open.science/",-1)),t[100]||(t[100]=n("wbr",null,null,-1)),t[101]||(t[101]=h("r/",-1)),t[102]||(t[102]=n("wbr",null,null,-1)),n("span",P5,d(e.repoId),1)]),P(n("div",D5,"ID can only contain letters and numbers.",512),[[Z,e.anonymize?.repoId?.errors?.format]]),P(n("div",{class:"invalid-feedback"},d(e.repoId)+" is already used.",513),[[Z,e.anonymize?.repoId?.errors?.used]])],512),[[Z,e.detectedType==="repo"]]),P(n("div",A5,[t[108]||(t[108]=n("label",{class:"paper-field-label",for:"pullRequestId"},"Anonymized pull request ID",-1)),P(n("input",{type:"text",class:R(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId",disabled:e.isUpdate},null,10,I5),[[u,{state:e.viewState,set:c=>{e.pullRequestId=c},value:e.pullRequestId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",O5,[t[104]||(t[104]=h("anonymous.4open.science/",-1)),t[105]||(t[105]=n("wbr",null,null,-1)),t[106]||(t[106]=h("pr/",-1)),t[107]||(t[107]=n("wbr",null,null,-1)),n("span",M5,d(e.pullRequestId),1)]),P(n("div",V5,"ID can only contain letters and numbers.",512),[[Z,e.anonymize?.pullRequestId?.errors?.format]]),P(n("div",{class:"invalid-feedback"},d(e.pullRequestId)+" is already used.",513),[[Z,e.anonymize?.pullRequestId?.errors?.used]])],512),[[Z,e.detectedType==="pr"]]),P(n("div",q5,[t[113]||(t[113]=n("label",{class:"paper-field-label",for:"gistId"},"Anonymized gist ID",-1)),P(n("input",{type:"text",class:R(["form-control",{"is-invalid":e.anonymize?.gistId?.invalid}]),name:"gistId",id:"gistId",disabled:e.isUpdate},null,10,L5),[[u,{state:e.viewState,set:c=>{e.gistId=c},value:e.gistId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",$5,[t[109]||(t[109]=h("anonymous.4open.science/",-1)),t[110]||(t[110]=n("wbr",null,null,-1)),t[111]||(t[111]=h("gist/",-1)),t[112]||(t[112]=n("wbr",null,null,-1)),n("span",_5,d(e.gistId),1)]),P(n("div",F5,"ID can only contain letters and numbers.",512),[[Z,e.anonymize?.gistId?.errors?.format]]),P(n("div",{class:"invalid-feedback"},d(e.gistId)+" is already used.",513),[[Z,e.anonymize?.gistId?.errors?.used]])],512),[[Z,e.detectedType==="gist"]]),n("div",U5,[t[124]||(t[124]=n("label",{class:"paper-field-label",for:"terms"},"Terms to redact",-1)),P(n("textarea",{class:R(["form-control terms-input",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:Math.min(14,Math.max(4,String(e.terms||"").split(` +`)){if(ko.has(C))return ko.get(C);if(yr.has(C))return C}return vr.add(C),ts||(ts=u(lf,120)),C},e.previewPathName=C=>{C=String(C||"");let O=C.lastIndexOf("/");return O<0?e.previewName(C):e.previewName(C.slice(0,O))+"/"+e.previewName(C.slice(O+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{Ie.repoId=e.repoId||"repository",Ie.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),Ie.paths=Ie.filePath.split("/"),Ie.files=e.previewTreeFiles(),Ie.loadedFolders=Object.fromEntries([...W?.dirs.keys()||[]].map(C=>[e.previewName(C),!0]))},!0),e.on("dispose",()=>{ts&&u.cancel(ts)});function Co(){!e.anonymize||!e.anonymize.terms||Yt()}async function ol(){let C=parseGithubUrl(e.sourceUrl),O=m();try{No(),fe();let z=await t.get(`/api/pr/${C.owner}/${C.repo}/${C.pullRequestId}`,{params:{connection:e.githubConnection}});if(!y(O))return;e.details=z.data,e.pullRequestId||(e.pullRequestId=C.repo+"-PR"+C.pullRequestId+"-"+generateRandomId(4))}catch(z){if(!y(O))return;throw x(z),z}finally{b(O)}}let So=at(new Map);function df(){let C=new Set,O=e.details&&e.details.pullRequest;if(!O)return C;typeof O.title=="string"&&C.add(O.title),typeof O.body=="string"&&C.add(O.body),typeof O.diff=="string"&&C.add(O.diff);let z=O.comments||[];for(let K of z)typeof K.author=="string"&&C.add(K.author),typeof K.body=="string"&&C.add(K.body);return C}let On=rt("pr",()=>{let C=df(),O=Array.from(C);return O.length===0?null:{contents:O,options:wt()}},(C,O)=>{if(!Array.isArray(C?.contents)||C.contents.length!==O.contents.length||C.contents.some(ae=>typeof ae!="string"))throw Error("Invalid preview response");let z=O.contents,K=new Map;for(let ae=0;aeSo.set(ye,ae))});e.anonymizePrContent=function(C){return C&&(So.has(C)?So.get(C):"")};async function sl(){let C=parseGithubUrl(e.sourceUrl),O=m();try{No(),fe(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let z=await t.get(`/api/gist/source/${C.gistId}`);if(!y(O))return;e.details=z.data,e.gistId||(e.gistId="gist-"+C.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(z){if(!y(O))return;if(z.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,Ee("sourceUrl","missing",!1);return}if(z.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,Ee("sourceUrl","missing",!1);return}throw x(z),z}finally{b(O)}}let Eo=at(new Map);function uf(){let C=new Set,O=e.details&&e.details.gist;if(!O)return C;typeof O.description=="string"&&C.add(O.description),typeof O.ownerLogin=="string"&&C.add(O.ownerLogin);let z=O.files||[];for(let ae of z)typeof ae.filename=="string"&&C.add(ae.filename),typeof ae.content=="string"&&C.add(ae.content);let K=O.comments||[];for(let ae of K)typeof ae.author=="string"&&C.add(ae.author),typeof ae.body=="string"&&C.add(ae.body);return C}let Mn=rt("gist",()=>{let C=uf(),O=Array.from(C);return O.length===0?null:{contents:O,options:wt()}},(C,O)=>{if(!Array.isArray(C?.contents)||C.contents.length!==O.contents.length||C.contents.some(ae=>typeof ae!="string"))throw Error("Invalid preview response");let z=O.contents,K=new Map;for(let ae=0;aeEo.set(ye,ae)),br()});e.anonymizeGistContent=function(C){return C&&(Eo.has(C)?Eo.get(C):"")},e.previewGistFiles=[];function br(){let C=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=C.map(O=>({filename:e.anonymizeGistContent(O.filename),content:e.anonymizeGistContent(O.content),language:O.language}))}e.watch("details.gist.files",br,!0),e.watch("terms",br);function cf(){let C=e.conference;if(e.conference_data=null,!C)return;let O=C===w||e.isUpdate&&C===e._originalConference;C!==w&&(w=null),t.get("/api/conferences/"+C).then(z=>{e.conference===C&&(e.conference_data=z.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!O&&(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===C&&(e.conference_data=null)})}function No(){Ee("repoId","used",!0),Ee("repoId","format",!0),Ee("pullRequestId","used",!0),Ee("pullRequestId","format",!0),Ee("gistId","used",!0),Ee("gistId","format",!0),Ee("sourceUrl","used",!0),Ee("sourceUrl","missing",!0),Ee("sourceUrl","access",!0),Ee("sourceUrl","github",!0),Ee("commit","exists",!0),Ee("conference","activated",!0),Ee("terms","format",!0),e.termHints=[]}function oi(){if(e.detectedType==="repo"&&e.options.expirationMode==="never")return!1;let C=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||C&&C.invalid?(C&&C.setDirty&&C.setDirty(),e.error="Please choose a valid expiration date.",!0):!1}function si(C){let O=e.detectedType==="pr"?"pullRequestId":e.detectedType==="gist"?"gistId":"repoId";switch(C){case"repoId_already_used":Ee(O,"used",!1);break;case"invalid_repoId":Ee(O,"format",!1);break;case"options_not_provided":Ee(O,"format",!1);break;case"repo_already_anonymized":Ee("sourceUrl","used",!1);break;case"invalid_terms_format":Ee("terms","format",!1);break;case"repo_not_found":Ee("sourceUrl","missing",!1);break;case"repo_not_accessible":Ee("sourceUrl","access",!1);break;case"commit_not_found":Ee("commit","exists",!1);break;case"conf_not_activated":Ee("conference","activated",!1);break}}e.coauthors=e.coauthors||[],e.coauthorResults=[],e.coauthorError="",e.searchCoauthors=()=>{let C=(e.coauthorSearch||"").trim();if(e.coauthorError="",C.length<2){e.coauthorResults=[];return}t.get("/api/user/search/github-users",{params:{q:C}}).then(O=>{let z=new Set((e.coauthors||[]).map(K=>(K.username||"").toLowerCase()));e.coauthorResults=(O.data||[]).filter(K=>!z.has((K.username||"").toLowerCase()))},()=>{e.coauthorResults=[]})},e.addCoauthor=(C,O)=>{O&&O.preventDefault(),!(!C||!C.username)&&t.post("/api/repo/"+e.repoId+"/coauthors",{username:C.username}).then(z=>{e.coauthors=z.data||[],e.coauthorResults=[],e.coauthorSearch="",e.coauthorError=""},z=>{let K=z&&z.data&&z.data.error||"unknown_error";e.coauthorError=K})},e.removeCoauthor=C=>{!C||!C.username||confirm("Remove co-author "+C.username+"?")&&t.delete("/api/repo/"+e.repoId+"/coauthors/"+encodeURIComponent(C.username)).then(O=>{e.coauthors=O.data||[]},O=>{let z=O&&O.data&&O.data.error||"unknown_error";e.coauthorError=z})},e.anonymizeRepo=C=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(e.reconnectingSource&&!e.reconnectRepositoryId)return;if(oi()){e.editRepository();return}if(e.anonymize?.invalid||e.sourceUrlError){e.editRepository(),e.error="Please correct the highlighted fields before saving.";return}if(e.hostingNeedsPayment()&&e.options.expirationMode==="never"){e.hostingReview=!0,We(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"}));return}let O=C.currentTarget||C.target.closest?.("button")||C.target;O.disabled=!0;let z=parseGithubUrl(e.sourceUrl),K={repoId:e.repoId,terms:e.terms.trim().split(` +`).filter(ye=>ye),connection:e.githubConnection,fullName:`${z.owner}/${z.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(K.options.pageSource=e.details.pageSource),No();let ae=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(ae,K,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/status/"+e.repoId},ye=>{if(ye.data){let Ge=["quota_exceeded","subscription_required_for_never_expiration"].includes(ye.data.error);Ge||r("ERRORS."+ye.data.error).then(Tt=>{e.error=Tt},console.error),si(ye.data.error),Ge&&(ye.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,We(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{O.disabled=!1})},e.anonymizeGist=C=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(oi())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let O=C.currentTarget||C.target.closest?.("button")||C.target;O.disabled=!0;let z=parseGithubUrl(e.sourceUrl),K={gistId:e.gistId,terms:e.terms.trim().split(` +`).filter(ye=>ye),source:{gistId:z.gistId},options:e.options,conference:e.conference};No();let ae=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(ae,K,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/gist/"+e.gistId},ye=>{ye.data&&(r("ERRORS."+ye.data.error).then(Ge=>{e.error=Ge},console.error),si(ye.data.error))}).finally(()=>{O.disabled=!1})},e.anonymizePullRequest=C=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(oi())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let O=C.currentTarget||C.target.closest?.("button")||C.target;O.disabled=!0;let z=parseGithubUrl(e.sourceUrl),K={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(` +`).filter(ye=>ye),source:{repositoryFullName:`${z.owner}/${z.repo}`,pullRequestId:z.pullRequestId},options:e.options,conference:e.conference};No();let ae=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(ae,K,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/pr/"+e.pullRequestId},ye=>{ye.data&&(r("ERRORS."+ye.data.error).then(Ge=>{e.error=Ge},console.error),si(ye.data.error))}).finally(()=>{O.disabled=!1})},e.watch("conference",()=>{cf()}),e.termHints=[],e.matchTermAsWritten=C=>{e.terms=Lc(e.terms,C)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&Yt()}),e.watch("terms",()=>{e.termHints=qc(e.terms),e.detectedType==="repo"&&Co(),e.detectedType==="pr"&&On(),e.detectedType==="gist"&&Mn()}),e.watch("options.image",()=>{e.detectedType==="repo"&&Co(),e.detectedType==="pr"&&On(),e.detectedType==="gist"&&Mn()}),e.watch("options.link",()=>{e.detectedType==="repo"&&Co(),e.detectedType==="pr"&&On(),e.detectedType==="gist"&&Mn()}),e.watch("details",()=>{e.detectedType==="pr"&&On(),e.detectedType==="gist"&&Mn()},!0)},Za=function(e,t,s,i,o,r){wa(e);let u=bt();_c();let p=Bt(),c=0,v=null,g=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function y(){v&&(v.resolve(),v=null),g&&(u.timeout.cancel(g),g=null)}let m=!1;e.on("dispose",()=>{m=!0,c++,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",I=>{e.symbolsOpen&&!I.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!I.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!I.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&I.target.isConnected&&!I.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!I.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!I.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),p(document,"keydown",I=>{I.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(I.ctrlKey||I.metaKey)&&!I.altKey&&I.key&&I.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(I.preventDefault(),e.toggleMdFind(!0))}),p(document,"keydown",function(I){if((I.metaKey||I.ctrlKey)&&I.key==="k"){I.preventDefault();var L=document.querySelector(".tree-search-input");L&&(L.focus(),L.select())}});var b=null;e.onFileSearchChange=function(){b&&(b.resolve(),b=null);let I=e.fileSearchQuery;if(!I||I.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let L=r.defer();b=L,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(I)}`,{timeout:L.promise}).then(function(k){if(!(m||b!==L)){b=null,e.fileSearchLoading=!1;var q={};e.files.forEach(function(qe){q[(qe.path||"")+"/"+qe.name]=!0});for(var G=[],H={},Y=0;Y0&&e.files.push.apply(e.files,G);for(var Qe=[],Ee=0;Ee0&&e.files.push.apply(e.files,Qe),e.fileSearchResults=k.data}},function(){!m&&b===L&&(b=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(I,L){if(e.repoId!=i.repoId)return B();if((i.path||"")!=e.filePath){window.matchMedia?.("(max-width: 767px)").matches&&(e.sidebarCollapsed=!0),e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(k=>k&&k.trim().length>0),_();for(let k=0;k0?e.paths.slice(0,k).join("/"):"";e.files.some(H=>H.path===q)||e.getFiles(q)}}});function E(){if(e.paths[0]!="")return;let I=["readme.md","readme.txt","readme.org","readme.1st","readme"],L={};for(let q of e.files)q.name.toLowerCase().indexOf("readme")>-1&&(L[q.name.toLowerCase()]=q.name);let k=null;for(let q of I)if(L[q]){k=q;break}if(!k&&Object.keys(L).length>0&&(k=Object.keys(L)[0]),k){let q=s.url();q[q.length-1]!="/"&&(q+="/"),s.url(q+encodePathForUrl(L[k]))}}e.fileCounts=null;let S=0,N=new Set,w=!1;e.getFiles=function(I,L=!1){let k=e.repoId,q=S;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(I)}&v=${e.options.lastUpdateDate}`).then(function(G){if(m||k!==e.repoId||q!==S)return[];let H=I||"";return e.files=e.files.filter(Y=>Y.path!==H),e.files.push(...G.data),e.loadedFolders={...e.loadedFolders,[H]:!0},T(H,q),G.data},function(G){if(m||k!==e.repoId||q!==S)return[];L||(e.type="error",e.content=pr(G),e.files=[])})};function T(I,L){if(w||N.has(I))return;N.add(I);let k=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(I)}`).then(function(q){m||k!==e.repoId||L!==S||(e.fileCounts={...e.fileCounts,...q.data})},function(){m||k!==e.repoId||L!==S||(w=!0)})}function M(){return e.files.filter(I=>I.name==e.paths[e.paths.length-1]&&I.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var F=null;e.on("dispose",function(){F&&u.interval.cancel(F)});function j(I){if(m)return;let L=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(k=>{if(!(m||L!==e.repoId)){if(e.options=k.data,e.options.url){window.location=e.options.url;return}I&&I(k.data)}},k=>{if(!(m||L!==e.repoId)){var q=k.data||{};if(q.error==="rate_limited"&&q.resetAt){let H=function(){var Y=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(Y<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,F&&(u.interval.cancel(F),F=null),j(I);else{var ne=Math.floor(Y/60),x=Y%60;e.rateLimitCountdown=ne>0?ne+"m "+x+"s":x+"s"}};var G=H;e.type="rate_limited",e.rateLimitResetAt=q.resetAt,F&&u.interval.cancel(F),H(),F=u.interval(H,1e3)}else q.error==="repository_not_ready"?(e.type="loading",u.timeout(function(){j(I)},3e3)):(e.type="error",e.content=pr(k))}})}function oe(I,L){let k=c;if(!I){e.type="error",e.content="no_file_selected";return}let q=e.type;(q==="code"||q==="text")&&ai().catch(()=>{}),e.type="loading",e.content="loading",e.fileLoadingSlow=!1,e.fileReceivedBytes=0;let G=r.defer();v=G,g=u.timeout(()=>{!m&&k===c&&e.type==="loading"&&(e.fileLoadingSlow=!0)},1500);let H=L&&L.sha||"0";t.get(`/api/repo/${e.repoId}/file/${encodePathForUrl(I)}?v=`+H,{timeout:G.promise,onDownloadProgress:Y=>{!m&&k===c&&(e.fileReceivedBytes=Y)},transformResponse:Y=>Y}).then(Y=>{m||k!==c||(y(),e.renderFileContent(Y.data,q,s.url()+"/../",Y.headers("content-type")))},Y=>{m||k!==c||(y(),e.type="error",e.content=pr(Y))})}function _(){c++,y(),e.content="",e.file=M();let I="0";e.file&&e.file.sha&&(I=e.file.sha),e.url=`/api/repo/${e.repoId}/file/${encodePathForUrl(e.filePath)}?v=${I}`;let L=e.filePath.substring(0,e.filePath.lastIndexOf("/")+1);if(e.fileBaseUrl=`/api/repo/${e.repoId}/file/${L?encodePathForUrl(L):""}`,e.showSource=!1,e.imageSize="",e.allowScripts=!1,e.prepareFile(e.filePath),e.type=="pdf"){e.content="pdf";return}if(e.type=="media"||e.type=="audio"){e.content=e.type;return}oe(e.filePath,e.file)}e.isSourceAccessError=()=>["repo_not_found","token_expired","github_app_access_required","github_app_reconnect_required","repo_saml_enforcement","repo_access_limited"].includes(e.content),e.retryContent=()=>B();function B(){c++,y(),e.files=[],e.loadedFolders={},e.content=null,e.fileCounts=null,S++,N=new Set,w=!1,e.fileSearchQuery="",e.onFileSearchChange(),e.repoId=i.repoId,e.type="loading",e.filePath=i.path||"",e.paths=e.filePath.split("/");let I=e.repoId;j(function(L){if(e.filePath){_();let q=[...new Set(e.paths.map((G,H)=>e.paths.slice(0,H).join("/")))];r.all(q.map(G=>e.getFiles(G,!0)));return}var k=r.resolve();for(let q=0;q0?e.paths.slice(0,q).join("/"):"";k=k.then(function(){return e.getFiles(G)}).then(function(){if(e.type==="error")return r.reject("error")})}k.then(function(){m||I!==e.repoId||(e.files.length==1&&e.files[0].name==""?(e.files=[],e.type="empty"):(E(),_()))})})}B()},Kc=function(e,t,s,i,o){async function r(c){t.get(`/api/pr/${e.pullRequestId}/options`).then(v=>{if(e.options=v.data,e.options.url){window.location=e.options.url;return}c&&c(v.data)},v=>{e.type="error",e.content=v.data.error})}async function u(c){t.get(`/api/pr/${e.pullRequestId}/content`).then(v=>{e.details=v.data,e.tabState={active:v.data.diff?"diff":"comments"},c&&c(v.data)},v=>{e.type="error",e.content=v.data.error})}function p(){e.pullRequestId=i.pullRequestId,e.type="loading",r(c=>{u()})}p()},Yc=function(e,t,s,i,o){async function r(c){t.get(`/api/gist/${e.gistId}/options`).then(v=>{if(e.options=v.data,e.options.url){window.location=e.options.url;return}c&&c(v.data)},v=>{e.type="error",e.content=v.data.error})}async function u(c){t.get(`/api/gist/${e.gistId}/content`).then(v=>{e.details=v.data;let g=v.data&&v.data.files&&v.data.files.length;e.tabState={active:g?"files":"comments"},c&&c(v.data)},v=>{e.type="error",e.content=v.data.error})}function p(){e.gistId=i.gistId,e.type="loading",r(()=>{u()})}p()},Jc=function(e,t,s){e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.loading=!0,e.error="",e.search="";let i="conferences.filterPrefs",o={filters:{status:{ready:!0,expired:!1,removed:!1}},orderBy:"name"},r=loadFilterPrefs(i)||{};e.filters={status:Object.assign({},o.filters.status,r.filters&&r.filters.status||{})},e.orderBy=r.orderBy||o.orderBy,e.watch("orderBy",()=>{saveFilterPrefs(i,{filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(i,{filters:e.filters,orderBy:e.orderBy})},!0),e.removeConference=function(u){if(!u.removing&&confirm(`Are you sure that you want to remove the conference ${u.name}? All the repositories linked to this conference will expire.`)){u.removing=!0;let p=at({title:`Removing ${u.name}...`,date:new Date,body:`The conference ${u.name} is going to be removed.`});e.addToast(p),t.delete(`/api/conferences/${u.conferenceID}`).then(()=>{p.title=`${u.name} is removed.`,p.body=`The conference ${u.name} is removed.`,e.loadConferences()}).catch(()=>{p.title="Unable to remove conference",p.body="Please try again. The conference has not been removed."}).finally(()=>{u.removing=!1})}},e.loadConferences=()=>(e.loading=!0,e.error="",t.get("/api/conferences/").then(u=>{e.conferences=u.data||[]},u=>{e.error="Unable to load your conferences. Please try again."}).finally(()=>{e.loading=!1})),e.loadConferences(),e.conferenceFilter=u=>{if(e.filters.status[u.status]==!1)return!1;let p=e.search.trim().toLowerCase();return!!(!p||(u.name||"").toLowerCase().includes(p)||(u.conferenceID||"").toLowerCase().includes(p))}},xa=function(e,t,s,i){e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/");let o=()=>{for(let[m,b,E]of[["startDate","Starts","startDate"],["endDate","Ends","endDate"]]){let S=document.getElementById(m);if(!S)continue;let N=S.parentElement.querySelector(":scope > .date-echo");N||(N=document.createElement("p"),N.className="date-echo",N.setAttribute("aria-live","polite"),S.insertAdjacentElement("afterend",N));let w=Sa(e.options?.[E]);N.textContent=w?b+" "+w:"",N.hidden=!w}};typeof e.watchGroup=="function"&&e.watchGroup(["options.startDate","options.endDate"],()=>We(o));let r=(m=20)=>{let b=document.querySelector("input#name.form-control"),E=document.querySelector("input#conferenceID.form-control");E&&(E.placeholder="e.g. ICSE27"),b?b.placeholder="e.g. ICSE 2027":m>0&&setTimeout(()=>r(m-1),50)};setTimeout(()=>r(),0),e.plans=[],e.plansLoaded=!1,e.conferenceBilling=null,Qi(t).then(m=>{e.conferenceBilling=m.data}).catch(()=>{}),e.conferenceTiers=()=>e.plans.filter(m=>m.id!=="free_conference").map(m=>{let b=(e.conferenceBilling?.plans||[]).find(E=>E.id===m.id)||{};return{...m,storage:m.storagePerRepo,...b,id:m.id,name:m.name}}),e.conferenceAudience=m=>({conference_workshop:"Workshops and small venues",conference:"A typical conference",conference_large:"Large or multi-track venues"})[m]||"",e.conferencePlanName=m=>Xc(m),e.conferenceAmount=(m,b=m?.amount)=>new Intl.NumberFormat(void 0,{style:"currency",currency:m?.currency||"eur",minimumFractionDigits:b%100?2:0,maximumFractionDigits:2}).format(b/100),e.conferenceBytes=m=>{let b=Number(m)||0,E=Math.min(4,Math.floor(Math.log2(Math.max(b,1))/10));return`${new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(b/1024**E)} ${["B","KB","MB","GB","TB"][E]}`},e.editionMode=!1,e.saving=!1,e.error="";function u(){return t.get("/api/conferences/"+i.conferenceId).then(m=>{e.options={...e.options,...m.data,billing:m.data.billing||{}},e.options.startDate=new Date(e.options.startDate),e.options.endDate=new Date(e.options.endDate)})}i.conferenceId&&(e.editionMode=!0,u());function p(){t.get("/api/conferences/plans").then(m=>{e.plans=m.data,e.plansLoaded=!0,!e.editionMode&&e.plans.length&&!e.plans.some(b=>b.id==e.options.plan.planID)&&(e.options.plan.planID=(e.plans.find(b=>b.id==="conference")||e.plans[0]).id),e.plan=e.plans.filter(b=>b.id==e.options.plan.planID)[0]})}p();let c=new Date;c.setDate(1),c.setMonth(c.getMonth()+1);let v=new Date(c);v.setTime(c.getTime()+179*864e5),e.options={billing:{},startDate:c,endDate:v,plan:{planID:"free_conference"},options:{link:!0,image:!0,pdf:!0,notebook:!0,update:!0,page:!0}},e.plan=null,e.watch("options.plan.planID",()=>{e.plan=e.plans.filter(m=>m.id==e.options.plan.planID)[0]});function g(){e.conference.name.setValidity("required",!0),e.conference.conferenceID.setValidity("pattern",!0),e.conference.conferenceID.setValidity("required",!0),e.conference.conferenceID.setValidity("used",!0),e.conference.startDate.setValidity("required",!0),e.conference.startDate.setValidity("invalid",!0),e.conference.endDate.setValidity("required",!0),e.conference.endDate.setValidity("invalid",!0),e.conference.setValidity("error",!0)}function y(m){switch(m){case"conf_name_missing":e.conference.name.setValidity("required",!1);break;case"conf_id_missing":e.conference.conferenceID.setValidity("required",!1);break;case"conf_id_format":e.conference.conferenceID.setValidity("pattern",!1);break;case"conf_id_used":e.conference.conferenceID.setValidity("used",!1);break;case"conf_start_date_missing":e.conference.startDate.setValidity("required",!1);break;case"conf_end_date_missing":e.conference.endDate.setValidity("required",!1);break;case"conf_start_date_invalid":e.conference.startDate.setValidity("invalid",!1);break;case"conf_end_date_invalid":e.conference.endDate.setValidity("invalid",!1);break;default:e.conference.setValidity("error",!1);break}}e.submit=function(){if(e.saving)return;e.saving=!0,e.error="";let m=JSON.parse(JSON.stringify(e.options)),b=at({title:`Creating ${m.name}...`,date:new Date,body:`The conference ${m.conferenceID} is in creation.`});e.editionMode&&(b.title=`Updating ${m.name}...`,b.body=`The conference '${m.conferenceID}' is updating.`),e.addToast(b),g(),t.post("/api/conferences/"+(e.editionMode?m.conferenceID:""),m).then(()=>{e.editionMode?(b.title=`${m.name} updated`,b.body=`The conference '${m.conferenceID}' is updated.`):(b.title=`${m.name} created`,b.body=`The conference '${m.conferenceID}' is created.`),s.url("/conference/"+m.conferenceID)},E=>{y(E.data?.error),e.error="Unable to save the conference. Please correct any highlighted fields and try again.",e.removeToast(b)}).finally(()=>{e.saving=!1})}};function Xc(e){return{free_conference:"Free (no longer offered to new conferences)",conference_workshop:"Workshop package",conference:"Conference package",conference_large:"Large conference package",premium_conference:"Premium (legacy)",unlimited_conference:"Unlimited (legacy)"}[e]||e||"Free"}var Qc=function(e,t,s,i){Zi(e,t,()=>p(),{confirmedMessage:"Payment status checked. Your conference is ready for submissions once payment is confirmed."}),e.conferencePlanName=c=>Xc(c),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conference=null,e.search="",e.filters={status:{ready:!0,preparing:!0,error:!0,expired:!0,removed:!1}},e.orderBy="-anonymizeDate";let o=er,r=["ready","preparing","error","expired","removed"],u={current:c=>c!=="removed",attention:c=>c==="error",removed:c=>c==="removed"};e.confView=()=>Object.keys(u).find(c=>r.every(v=>u[c](v)===(e.filters.status[v]!==!1)))||"custom",e.setConfView=c=>{r.forEach(v=>{e.filters.status[v]=(u[c]||u.current)(v)})},e.confCount=c=>(e.conference?.repositories||[]).filter(v=>u[c](o(v.status))).length,e.copyingId=null,e.copyRepoLink=async c=>{if(!c?.repoId||e.copyingId)return;let v=new URL("/r/"+c.repoId+"/",window.location.origin).href;e.copyingId=c.repoId;try{await Qa(v),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:v})}finally{e.copyingId=null}},e.extendingId=null,e.extendRepo=c=>{!c?.repoId||e.extendingId||(e.extendingId=c.repoId,t.post("/api/repo/"+c.repoId+"/extend").then(v=>{let g=v?.data?.expirationDate?` until ${new Date(v.data.expirationDate).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}`:"";e.addToast({title:`${c.repoId} is extended.`,body:`Reviewers can open it again${g}.`}),c.status="ready",v?.data?.expirationDate&&(c.options={...c.options||{},expirationDate:v.data.expirationDate}),e.extendingId=null},v=>{let g=v?.status||v?.data?.status;e.addToast({title:`Couldn't extend ${c.repoId}.`,body:g===401||g===403?"Only the repository's authors can extend this link. Ask them to extend it from My work.":"Try again in a moment."}),e.extendingId=null}))},e.repoFiler=c=>{if(e.filters.status[o(c.status)]==!1)return!1;let v=e.search.trim().toLowerCase();return!!(!v||(c.source?.fullName||"").toLowerCase().includes(v)||(c.repoId||"").toLowerCase().includes(v))};function p(){t.get("/api/conferences/"+i.conferenceId).then(c=>{e.conference=c.data})}p()},Zc=function(e,t){e.notificationEmail="",e.emailSaved=!1,e.saveNotificationEmail=async()=>{e.busy=!0,e.emailSaved=!1,e.connectionError="";try{let s=await t.post("/github/connections/email",{email:e.notificationEmail},{headers:{"X-CSRF-Token":e.connections.csrf}});e.notificationEmail=s.data.notificationEmail,e.user&&(e.user.notificationEmail=s.data.notificationEmail),e.emailSaved=!0}catch(s){e.connectionError=s.data?.error||"Unable to save email address."}finally{e.busy=!1}},e.connections=null,e.connectionError="",e.busy=!1,e.loadConnections=()=>t.get("/github/connections").then(s=>{e.connections=s.data,e.notificationEmail=s.data.notificationEmail||""}).catch(s=>{e.connectionError=s.data?.error||"Unable to load connections."}),e.changeConnection=async(s,i,o)=>{e.busy=!0,e.connectionError="";try{let r=await t.post("/github/connections/migrate",{type:s.type,id:s.id,connection:i,preview:o},{headers:{"X-CSRF-Token":e.connections.csrf}});o?s.eligible=r.data.eligible:await e.loadConnections()}catch(r){e.connectionError=r.data?.error||"Unable to change connection."}finally{e.busy=!1}},e.disconnectOAuth=async()=>{e.busy=!0;try{await t.post("/github/connections/disconnect-oauth",{},{headers:{"X-CSRF-Token":e.connections.csrf}}),await e.loadConnections()}catch(s){e.connectionError=s.data?.error||"Unable to disconnect OAuth."}finally{e.busy=!1}},e.loadConnections()},xc=function(e,t){e.accountRecovery=!1,t.get("/github/account-recovery").then(s=>{e.accountRecovery=s.data.required}).catch(()=>{})};typeof document<"u"&&document.addEventListener("scroll",e=>{let t=e.target;!t||!t.classList||!t.classList.contains("repo-picker-list")||t.classList.toggle("is-end",t.scrollTop+t.clientHeight>=t.scrollHeight-2)},!0);var ep=[{path:"/review-link",template:"partials/reviewConsent.htm",title:"Artifact consent \u2013 Anonymous GitHub",setup:(e,t)=>dl(e,t)},{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Zc(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>xc(e,t.http)},{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>jc(e,t.http,t.location,t.window,t.timeout)},{path:"/dashboard",template:"partials/dashboard.htm",title:"Your anonymizations \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Gc(e,t.http,t.location,t.promises,t.window,t.quotaService)},{path:"/pr-dashboard",redirect:"/dashboard"},{path:"/anonymize/:repoId?",template:"partials/anonymize.htm",title:"New anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>mr(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/pull-request-anonymize/:pullRequestId?",template:"partials/anonymize.htm",title:"Anonymize a pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>mr(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/gist-anonymize/:gistId?",template:"partials/anonymize.htm",title:"Anonymize a gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>mr(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/status/:repoId",template:"partials/status.htm",title:"Repository status \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Wc(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Jc(e,t.http,t.location)},{path:"/conference/new",template:"partials/newConference.htm",title:"New conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>xa(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId/edit",template:"partials/newConference.htm",title:"Edit conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>xa(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId",template:"partials/conference.htm",title:"Conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Qc(e,t.http,t.location,t.params)},{path:"/faq",template:"partials/faq.htm",title:"FAQ \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Bc(e,t.http)},{path:"/profile",template:"partials/profile.htm",title:"Your settings \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>zc(e,t.http,t.translate,t.timeout,t.quotaService)},{path:"/claim",template:"partials/claim.htm",title:"Claim an anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Hc(e,t.http,t.location)},{path:"/pr/:pullRequestId/:path(.*)*",template:"partials/pullRequest.htm",title:"Anonymous pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Kc(e,t.http,t.location,t.params,t.html)},{path:"/gist/:gistId/:path(.*)*",template:"partials/gist.htm",title:"Anonymous gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yc(e,t.http,t.location,t.params,t.html)},{path:"/r/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Za(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/repository/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Za(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/admin/",template:"partials/admin/overview.htm",title:"Admin \xB7 Overview \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Xu(e,t.http,t.location,t.interval)},{path:"/admin/repositories",template:"partials/admin/repositories.htm",title:"Admin \xB7 Repositories \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>ju(e,t.http,t.location)},{path:"/admin/users",template:"partials/admin/users.htm",title:"Admin \xB7 Users \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Gu(e,t.http,t.location)},{path:"/admin/users/:username",template:"partials/admin/user.htm",title:"Admin \xB7 User details \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Wu(e,t.http,t.location,t.params)},{path:"/admin/conferences",template:"partials/admin/conferences.htm",title:"Admin \xB7 Conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ku(e,t.http,t.location)},{path:"/admin/emails",template:"partials/admin/emails.htm",title:"Admin \xB7 Emails \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>xu(e,t.http,t.location)},{path:"/admin/billing",template:"partials/admin/billing.htm",title:"Admin \xB7 Billing \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Zu(e,t.http,t.location)},{path:"/admin/queues",template:"partials/admin/queues.htm",title:"Admin \xB7 Queues \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yu(e,t.http,t.location,t.interval,t.timeout)},{path:"/admin/errors",template:"partials/admin/errors.htm",title:"Admin \xB7 Errors \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ju(e,t.http,t.location,t.interval)},{path:"/404",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",preserveExplorer:!1,setup:()=>{}},{path:"/:pathMatch(.*)*",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",setup:()=>{}}];var Pv={class:"container paper-page admin-page overview-page emails-page"},Dv={class:"email-overview-toolbar"},Av={class:"seg-filter",role:"group","aria-label":"History period"},Iv=["aria-pressed","onClick"],Ov={class:"email-refresh"},Mv={key:0},Vv=["disabled"],qv={key:0,class:"email-state email-state-error",role:"alert"},Lv=["aria-busy"],$v={class:"ov-kpi-card"},_v={class:"ov-kpi-value"},Fv={class:"ov-kpi-card"},Uv={class:"ov-kpi-value"},Bv={class:"ov-kpi-card"},zv={class:"ov-kpi-card"},Hv={class:"ov-kpi-value"},jv={class:"ov-kpi-sub"},Gv={key:1,class:"ov-chart-card email-chart","aria-label":"Email activity by day"},Wv={class:"ov-chart-head"},Kv={class:"ov-chart-title"},Yv={class:"email-muted"},Jv={class:"email-chart-plot"},Xv={class:"email-axis"},Qv={class:"email-bars"},Zv=["aria-label","title"],xv={class:"email-chart-dates"},ey={key:0},ty={class:"email-chart-data"},ny={class:"email-data-scroll"},oy={scope:"row"},sy={"aria-labelledby":"email-history-title",class:"email-history"},iy={class:"email-section-head"},ry={class:"email-muted"},ay={class:"email-search"},ly={class:"email-status-tabs",role:"group","aria-label":"Outcome filter"},dy=["aria-pressed","onClick"],uy={class:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true"},cy={key:0,class:"email-state email-state-error",role:"alert"},py=["disabled"],fy={key:1,class:"email-state"},my={key:2,class:"email-state"},hy={key:3,class:"email-footer email-pager-top"},gy=["disabled"],vy=["disabled"],yy=["aria-busy"],by={class:"email-table",role:"table"},wy={role:"rowgroup"},ky={class:"email-recipient",role:"cell"},Cy=["title"],Sy={class:"email-result",role:"cell"},Ey={key:0,class:"email-http"},Ny={class:"email-type",role:"cell"},Ry={class:"email-attempted",role:"cell"},Ty=["datetime","title"],Py={class:"email-expand",role:"cell"},Dy=["aria-expanded","aria-controls","aria-label","onClick"],Ay={"aria-hidden":"true"},Iy={key:0,class:"email-expanded",role:"row"},Oy={colspan:"5",role:"cell"},My=["id","aria-label"],Vy={class:"email-detail-heading"},qy={class:"email-explanation"},Ly={class:"email-detail-grid"},$y=["onClick"],_y=["onClick"],Fy=["onClick"],Uy=["onClick"],By={key:0,class:"email-copy-feedback"},zy={key:5,class:"email-footer"},Hy=["disabled"],jy=["disabled"];function tp(e,t){return a(),l("div",Pv,[t[43]||(t[43]=ke('
Admin \xA0/\xA0 Emails

Emails

',2)),n("div",Dv,[n("div",Av,[(a(),l(V,null,Q([{id:"7d",label:"7 days"},{id:"30d",label:"30 days"},{id:"90d",label:"90 days"},{id:"all",label:"All time"}],s=>n("button",{key:s.id,class:R(["seg-chip",{active:e.emailPeriod===s.id}]),"aria-pressed":e.emailPeriod===s.id,onClick:i=>{e.emailPeriod=s.id,e.applyEmailFilters()}},d(s.label),11,Iv)),64))]),n("button",{class:"email-detail-button email-jump",onClick:t[0]||(t[0]=s=>e.jumpToEmailHistory())},"Search email history \u2193"),n("div",Ov,[e.emailUpdated?(a(),l("span",Mv,"History updated "+d(e.emailShortTime(e.emailUpdated)),1)):f("v-if",!0),n("button",{class:"btn btn-sm",disabled:e.emailLoading||e.emailSummaryLoading,onClick:t[1]||(t[1]=s=>e.refreshEmails())},"Refresh",8,Vv)])]),t[44]||(t[44]=n("p",{class:"email-basis"},"Recorded sending attempts \xB7 Provider acceptance does not confirm inbox delivery.",-1)),e.emailSummaryError?(a(),l("div",qv,[h(d(e.emailSummaryError)+" ",1),n("button",{class:"btn btn-sm",onClick:t[2]||(t[2]=s=>e.loadEmailSummary())},"Retry summary")])):f("v-if",!0),n("section",{class:"ov-kpi-row email-kpis","aria-label":"Email summary","aria-busy":e.emailSummaryLoading},[n("div",$v,[t[14]||(t[14]=n("div",{class:"ov-kpi-label"},"Recorded attempts",-1)),n("div",_v,d(e.emailSummary?e.emailSummary.total.toLocaleString():"\u2014"),1),t[15]||(t[15]=n("div",{class:"ov-kpi-sub"},"Selected period, search and type",-1))]),n("div",Fv,[t[16]||(t[16]=n("div",{class:"ov-kpi-label"},"Accepted by provider",-1)),n("div",Uv,d(e.emailSummary?e.emailSummary.counts.accepted.toLocaleString():"\u2014"),1),t[17]||(t[17]=n("div",{class:"ov-kpi-sub"},"Delivery unverified",-1))]),n("div",Bv,[t[18]||(t[18]=n("div",{class:"ov-kpi-label"},"Rejected",-1)),n("div",{class:R(["ov-kpi-value",{"email-error-text":e.emailSummary?.counts.rejected}])},d(e.emailSummary?e.emailSummary.counts.rejected.toLocaleString():"\u2014"),3),t[19]||(t[19]=n("div",{class:"ov-kpi-sub"},"Provider returned an error",-1))]),n("div",zv,[t[20]||(t[20]=n("div",{class:"ov-kpi-label"},"Unconfirmed",-1)),n("div",Hv,d(e.emailSummary?(e.emailSummary.counts.unknown+e.emailSummary.counts.sending).toLocaleString():"\u2014"),1),n("div",jv,d(e.emailSummary?e.emailSummary.counts.unknown:"\u2014")+" unknown \xB7 "+d(e.emailSummary?e.emailSummary.counts.sending:"\u2014")+" pending",1)])],8,Lv),e.emailSummary?(a(),l("section",Gv,[n("div",Wv,[n("h2",Kv,[t[21]||(t[21]=h("Sending activity ",-1)),n("span",Yv,"\xB7 "+d(e.emailSummary.chartDays)+" days \xB7 UTC",1)]),t[22]||(t[22]=n("div",{class:"email-legend"},[n("span",{class:"email-outcome email-outcome-accepted"},"Accepted"),n("span",{class:"email-outcome email-outcome-rejected"},"Rejected"),n("span",{class:"email-outcome email-outcome-unknown"},"Unconfirmed")],-1))]),n("div",Jv,[n("div",Xv,[n("span",null,d(e.emailChartMax()),1),t[23]||(t[23]=n("span",null,"0",-1))]),n("div",Qv,[(a(!0),l(V,null,Q(e.emailSummary.series,s=>(a(),l("div",{key:s.date,class:"email-bar-column","aria-label":e.emailDayLabel(s)+": "+s.accepted+" accepted, "+s.rejected+" rejected, "+(s.unknown+s.sending)+" unconfirmed",title:e.emailDayLabel(s)+": "+e.emailDayTotal(s)+" attempts"},[n("div",{class:"email-bar-stack",style:Ae({height:Math.max(1,e.emailDayTotal(s)/e.emailChartMax()*100)+"%"})},[n("i",{class:"email-bar-accepted",style:Ae({flexGrow:s.accepted})},null,4),n("i",{class:"email-bar-rejected",style:Ae({flexGrow:s.rejected})},null,4),n("i",{class:"email-bar-unknown",style:Ae({flexGrow:s.unknown+s.sending})},null,4)],4)],8,Zv))),128))])]),n("div",xv,[n("span",null,d(e.emailDayLabel(e.emailSummary.series[0])),1),e.emailChartTotal()?f("v-if",!0):(a(),l("span",ey,"No recorded activity in these "+d(e.emailSummary.chartDays)+" days",1)),n("span",null,d(e.emailDayLabel(e.emailSummary.series[e.emailSummary.series.length-1])),1)]),n("details",ty,[t[26]||(t[26]=n("summary",null,"View daily counts",-1)),n("div",ny,[n("table",null,[t[24]||(t[24]=n("caption",{class:"sr-only"},"Daily sending attempts in UTC",-1)),t[25]||(t[25]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Date"),n("th",{scope:"col"},"Accepted"),n("th",{scope:"col"},"Rejected"),n("th",{scope:"col"},"Unknown"),n("th",{scope:"col"},"Pending")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q(e.emailSummary.series,s=>(a(),l("tr",{key:s.date},[n("th",oy,d(e.emailDayLabel(s)),1),n("td",null,d(s.accepted),1),n("td",null,d(s.rejected),1),n("td",null,d(s.unknown),1),n("td",null,d(s.sending),1)]))),128))])])])])])):f("v-if",!0),n("section",sy,[n("div",iy,[t[27]||(t[27]=n("h2",{id:"email-history-title",tabindex:"-1"},"Email history",-1)),n("span",ry,"Newest first \xB7 "+d(e.emailTimezone),1)]),n("form",{class:"email-toolbar",onSubmit:t[7]||(t[7]=de(s=>e.applyEmailFilters(),["prevent"])),"aria-label":"Filter email history"},[n("label",ay,[t[28]||(t[28]=h("Search attempts",-1)),P(n("input",{class:"form-control","onUpdate:modelValue":t[3]||(t[3]=s=>e.emailSearch=s),type:"search",maxlength:"200",placeholder:"Search recipients or IDs","aria-describedby":"email-search-help"},null,512),[[ot,e.emailSearch]])]),n("label",null,[t[30]||(t[30]=h("Email type",-1)),P(n("select",{class:"form-control","onUpdate:modelValue":t[4]||(t[4]=s=>e.emailKind=s),onChange:t[5]||(t[5]=s=>e.applyEmailFilters())},[...t[29]||(t[29]=[n("option",{value:""},"All email types",-1),n("option",{value:"repository-expiration"},"Repository expiration",-1),n("option",{value:"owner-access"},"GitHub access",-1)])],544),[[Rt,e.emailKind]])]),t[31]||(t[31]=n("button",{class:"btn",type:"submit"},"Search",-1)),e.hasEmailFilters()?(a(),l("button",{key:0,class:"btn",type:"button",onClick:t[6]||(t[6]=s=>e.clearEmailFilters())},"Clear")):f("v-if",!0)],32),t[42]||(t[42]=n("p",{id:"email-search-help",class:"email-search-help"},"Search part of a recipient address, or an exact attempt, owner or resource ID.",-1)),n("div",ly,[(a(),l(V,null,Q(["","accepted","rejected","unknown","sending"],s=>n("button",{key:s,class:R({active:e.emailState===s}),"aria-pressed":e.emailState===s,onClick:i=>e.setEmailStatus(s)},[h(d(s?e.emailStatusLabel(s):"All attempts")+" ",1),n("span",null,d(e.emailSummary?(s?e.emailSummary.counts[s]:e.emailSummary.total).toLocaleString():"\u2014"),1)],10,dy)),64))]),n("p",uy,d(e.emailAnnouncement)+" "+d(e.emailCopyMessage),1),e.emailError?(a(),l("div",cy,[n("span",null,d(e.emailError),1),n("button",{class:"btn btn-sm",disabled:e.emailLoading,onClick:t[8]||(t[8]=s=>e.retryEmails())},"Retry",8,py)])):f("v-if",!0),e.emailLoading&&!e.emailRows.length?(a(),l("p",fy,"Loading email history\u2026")):f("v-if",!0),!e.emailLoading&&!e.emailError&&!e.emailRows.length?(a(),l("div",my,[n("p",null,d(e.hasEmailFilters()?"No attempts match these filters. Try another recipient or a wider period.":"No attempts recorded in this period."),1),e.hasEmailFilters()?(a(),l("button",{key:0,class:"btn btn-sm",onClick:t[9]||(t[9]=s=>e.clearEmailFilters())},"Clear filters")):f("v-if",!0)])):f("v-if",!0),e.emailRows.length?(a(),l("div",hy,[n("span",null,[h(d((e.emailPage-1)*25+1)+"\u2013"+d(Math.min(e.emailPage*25,e.emailRows.length)),1),e.emailTotal()!=null?(a(),l(V,{key:0},[h(" of "+d(e.emailTotal().toLocaleString()),1)],64)):f("v-if",!0),t[32]||(t[32]=h(" attempts",-1))]),n("div",null,[n("button",{class:"btn btn-sm",disabled:e.emailPage===1||e.emailLoading,onClick:t[10]||(t[10]=s=>e.emailPreviousPage())},"Previous",8,gy),n("button",{class:"btn btn-sm",disabled:e.emailLoading||!e.emailNextCursor&&e.emailPage*25>=e.emailRows.length,onClick:t[11]||(t[11]=s=>e.emailNextPage())},"Next",8,vy)])])):f("v-if",!0),e.emailRows.length?(a(),l("div",{key:4,class:"email-table-wrap","aria-busy":e.emailLoading},[n("table",by,[t[40]||(t[40]=n("caption",{class:"sr-only"},"Recorded email attempts. Expand a row for identifiers and outcome details.",-1)),t[41]||(t[41]=n("thead",{role:"rowgroup"},[n("tr",{role:"row"},[n("th",{scope:"col"},"Recipient"),n("th",{scope:"col"},"Outcome"),n("th",{scope:"col"},"Email type"),n("th",{scope:"col"},"Attempted"),n("th",{scope:"col"},[n("span",{class:"sr-only"},"Details")])])],-1)),n("tbody",wy,[(a(!0),l(V,null,Q(e.emailVisibleRows(),s=>(a(),l(V,{key:s._id},[n("tr",{role:"row",class:R({"email-selected":e.selectedEmailId===s._id})},[n("td",ky,[n("span",{title:s.recipient},d(s.recipient),9,Cy)]),n("td",Sy,[n("span",{class:R(["email-outcome","email-outcome-"+s.state])},d(e.emailStatusLabel(s.state)),3),s.httpStatus?(a(),l("small",Ey,d(s.httpStatus),1)):f("v-if",!0)]),n("td",Ny,d(e.emailKindLabel(s.kind)),1),n("td",Ry,[n("time",{datetime:s.createdAt,title:e.emailTime(s.createdAt)},d(e.emailShortTime(s.createdAt)),9,Ty)]),n("td",Py,[n("button",{class:"email-detail-button","aria-expanded":e.selectedEmailId===s._id,"aria-controls":"detail-"+s._id,"aria-label":(e.selectedEmailId===s._id?"Close":"View")+" details for "+s.recipient,onClick:i=>e.toggleEmail(s)},[h(d(e.selectedEmailId===s._id?"Close":"Details")+" ",1),n("span",Ay,d(e.selectedEmailId===s._id?"\u2212":"+"),1)],8,Dy)])],2),e.selectedEmailId===s._id?(a(),l("tr",Iy,[n("td",Oy,[n("section",{id:"detail-"+s._id,"aria-label":"Attempt details for "+s.recipient},[n("div",Vy,[t[33]||(t[33]=n("h3",null,"Attempt details",-1)),n("span",{class:R(["email-outcome","email-outcome-"+s.state])},d(e.emailStatusLabel(s.state)),3)]),n("p",qy,d(e.emailExplanation(s)),1),n("dl",Ly,[n("div",null,[t[34]||(t[34]=n("dt",null,"Recipient",-1)),n("dd",null,[h(d(s.recipient)+" ",1),n("button",{class:"email-copy",onClick:i=>e.copyEmail(s.recipient),"aria-label":"Copy recipient"},d(e.emailCopiedValue===s.recipient?"Copied":"Copy"),9,$y)])]),n("div",null,[t[35]||(t[35]=n("dt",null,"Provider response",-1)),n("dd",null,d(s.httpStatus?"HTTP "+s.httpStatus:"No HTTP response recorded"),1)]),n("div",null,[t[36]||(t[36]=n("dt",null,"Attempted",-1)),n("dd",null,d(e.emailTime(s.createdAt)),1)]),n("div",null,[t[37]||(t[37]=n("dt",null,"Completed",-1)),n("dd",null,d(e.emailTime(s.completedAt)),1)]),n("div",null,[t[38]||(t[38]=n("dt",null,"Attempt ID",-1)),n("dd",null,[n("code",null,d(s._id),1),n("button",{class:"email-copy",onClick:i=>e.copyEmail(s._id),"aria-label":"Copy attempt ID"},d(e.emailCopiedValue===s._id?"Copied":"Copy"),9,_y)])]),n("div",null,[t[39]||(t[39]=n("dt",null,"Owner ID",-1)),n("dd",null,[n("code",null,d(s.ownerId),1),n("button",{class:"email-copy",onClick:i=>e.copyEmail(s.ownerId),"aria-label":"Copy owner ID"},d(e.emailCopiedValue===s.ownerId?"Copied":"Copy"),9,Fy)])]),n("div",null,[n("dt",null,"Resource \xB7 "+d(s.resourceKind),1),n("dd",null,[n("code",null,d(s.resourceId),1),n("button",{class:"email-copy",onClick:i=>e.copyEmail(s.resourceId),"aria-label":"Copy resource ID"},d(e.emailCopiedValue===s.resourceId?"Copied":"Copy"),9,Uy)])])]),e.emailCopyMessage&&e.emailCopyMessage!=="Copied."?(a(),l("p",By,d(e.emailCopyMessage),1)):f("v-if",!0)],8,My)])])):f("v-if",!0)],64))),128))])])],8,yy)):f("v-if",!0),e.emailRows.length?(a(),l("div",zy,[n("span",null,[h("Page "+d(e.emailPage),1),e.emailPageCount()?(a(),l(V,{key:0},[h(" of "+d(e.emailPageCount()),1)],64)):f("v-if",!0),h(" \xB7 "+d(e.emailTotal()==null?e.emailRows.length+" loaded":e.emailTotal().toLocaleString()+" attempts"),1)]),n("div",null,[n("button",{class:"btn btn-sm",disabled:e.emailPage===1||e.emailLoading,onClick:t[12]||(t[12]=s=>e.emailPreviousPage())},"Previous",8,Hy),n("button",{class:"btn btn-sm",disabled:e.emailLoading||!e.emailNextCursor&&e.emailPage*25>=e.emailRows.length,onClick:t[13]||(t[13]=s=>e.emailNextPage())},"Next",8,jy)])])):f("v-if",!0)]),t[45]||(t[45]=n("details",{class:"email-about"},[n("summary",null,"What this history records"),n("p",null,"New sending attempts only; older sends are not backfilled. Accepted means the provider accepted the request, not that it reached the inbox. Check pending or unknown outcomes in Resend before considering another send. Audit storage failures can leave this history incomplete.")],-1))])}var Gy={class:"container py-4",style:{"max-width":"48rem","overflow-wrap":"anywhere"}},Wy={key:0},Ky={key:1,role:"alert"},Yy={key:2,role:"status"},Jy={key:0},Xy={key:1},Qy=["disabled"],Zy=["disabled"],xy=["disabled"],eb={key:5,class:"mt-4","aria-labelledby":"review-policy-title"},tb={id:"review-policy-title"},ob={key:0,role:"alert"},sb=["disabled"],ib=["disabled"],rb=["disabled"],ab={key:6,role:"status"};function np(e,t){return a(),l("section",Gy,[t[12]||(t[12]=n("a",{href:"/"},"Anonymous GitHub",-1)),t[13]||(t[13]=n("h1",{class:"mt-3"},"Approve artifact access",-1)),t[14]||(t[14]=n("p",null,"This records your approval as the repository owner or an authorized co-author.",-1)),e.user?.username?f("v-if",!0):(a(),l("p",Wy,[...t[6]||(t[6]=[h("Sign in first, then reopen the artifact link from your submission. ",-1),n("a",{href:"/signin"},"Sign in",-1)])])),e.error?(a(),l("p",Ky,d(e.error),1)):f("v-if",!0),e.saved?(a(),l("p",Yy,[t[7]||(t[7]=h("Consent recorded. ",-1)),e.handoffEnabled?(a(),l("span",Jy,"Continue to review to finish linking.")):(a(),l("span",Xy,"Artifact linking is not complete. Return to your submission to check its status."))])):f("v-if",!0),e.saved&&e.handoffEnabled?(a(),l("button",{key:3,class:"btn btn-primary",type:"button",onClick:t[0]||(t[0]=(...s)=>e.continueReview&&e.continueReview(...s)),disabled:e.busy},"Continue to review",8,Qy)):f("v-if",!0),e.user?.username&&!e.saved?(a(),l("form",{key:4,onSubmit:t[2]||(t[2]=de((...s)=>e.loadPreview&&e.loadPreview(...s),["prevent"]))},[t[8]||(t[8]=n("label",{for:"review-repository"},"Anonymous repository ID",-1)),P(n("input",{id:"review-repository",class:"form-control","onUpdate:modelValue":t[1]||(t[1]=s=>e.repositoryId=s),maxlength:"128",autocomplete:"off",disabled:e.busy||e.uncertain,"aria-describedby":"review-repository-help"},null,8,Zy),[[ot,e.repositoryId]]),t[9]||(t[9]=n("p",{id:"review-repository-help"},"Use the ID after /r/ in the anonymous repository URL.",-1)),n("button",{type:"submit",class:"btn btn-primary",disabled:e.busy||e.uncertain},"Preview access and retention",8,xy)],32)):f("v-if",!0),e.preview&&!e.saved?(a(),l("section",eb,[n("h2",tb,d(e.preview.repositoryName),1),n("p",null,"Access: "+d(e.preview.policy.access==="anonymous-link"?"Anyone with the anonymous link":"Restricted review access")+".",1),n("p",null,"Retain until "+d(e.preview.policy.retainUntil)+". Policy version "+d(e.preview.policy.version)+".",1),e.expired?(a(),l("p",ob,"This preview expired. Open a new artifact link from your submission.")):f("v-if",!0),n("div",null,[n("label",null,[P(n("input",{type:"checkbox","onUpdate:modelValue":t[3]||(t[3]=s=>e.acceptAccess=s),disabled:e.busy||e.uncertain||e.expired},null,8,sb),[[la,e.acceptAccess]]),t[10]||(t[10]=h(" I approve the access policy above.",-1))])]),n("div",null,[n("label",null,[P(n("input",{type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=s=>e.acceptRetention=s),disabled:e.busy||e.uncertain||e.expired},null,8,ib),[[la,e.acceptRetention]]),t[11]||(t[11]=h(" I approve retention until the date above.",-1))])]),n("button",{class:"btn btn-primary",type:"button",onClick:t[5]||(t[5]=(...s)=>e.confirmConsent&&e.confirmConsent(...s)),disabled:e.busy||e.expired||!e.acceptAccess||!e.acceptRetention},d(e.uncertain?"Retry confirmation":"Confirm consent"),9,rb)])):f("v-if",!0),e.busy?(a(),l("p",ab,"Waiting for the server\u2026")):f("v-if",!0)])}var lb={class:"container paper-page connections-page"},db={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},ub={key:1,role:"status"},cb=["disabled"],pb={key:3},fb={key:0,class:"connection-resources"},mb=["disabled"],hb=["disabled"],gb={key:0,role:"status"},vb={class:"connections-grid"},yb={key:0},bb={class:"connection-title"},wb={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},kb={class:"connection-actions"},Cb={key:0,class:"btn btn-ink",target:"_self",href:"/github/app/install"},Sb=["disabled"],Eb={key:1,class:"connection-installations"},Nb={key:0},Rb=["href"],Tb={class:"sr-only"},Pb={class:"connection-title"},Db={key:0,target:"_self",href:"/github/login",class:"btn btn-outline-ink"},Ab={key:1,class:"connection-revoke"},Ib={key:0},Ob=["disabled"],Mb={class:"connection-resources"},Vb={class:"connection-title"},qb={class:"connection-count"},Lb={key:0,class:"connection-empty"},$b={class:"connection-resource-name"},_b={key:0,class:"connection-resource-actions"},Fb=["disabled","onClick"],Ub=["disabled","onClick"],Bb={key:1,class:"connection-help",role:"status"},zb=["disabled","onClick"];function op(e,t){return a(),l("div",lb,[t[27]||(t[27]=ke('
My work \xA0/\xA0 GitHub connections

GitHub connections

Manage how GitHub shares your code. Your anonymizations and URLs stay the same.

',2)),e.connectionError?(a(),l("p",db,d(e.connectionError),1)):f("v-if",!0),!e.connections&&!e.connectionError?(a(),l("p",ub,"Loading your connections\u2026")):f("v-if",!0),!e.connections&&e.connectionError?(a(),l("button",{key:2,class:"btn btn-outline-ink",disabled:e.busy,onClick:t[0]||(t[0]=s=>e.loadConnections())},"Try again",8,cb)):f("v-if",!0),e.connections?(a(),l("div",pb,[e.connections.emailNotificationsEnabled?(a(),l("section",fb,[t[6]||(t[6]=n("h2",null,"Email alerts",-1)),t[7]||(t[7]=n("p",null,"We will email you if your GitHub connection stops working or a repository becomes inaccessible. Your address is never shown on anonymous pages.",-1)),n("form",{onSubmit:t[2]||(t[2]=de(s=>e.saveNotificationEmail(),["prevent"]))},[t[5]||(t[5]=n("label",{for:"notification-email"},"Email address",-1)),P(n("input",{id:"notification-email",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[1]||(t[1]=s=>e.notificationEmail=s),disabled:e.busy},null,8,mb),[[ot,e.notificationEmail]]),n("button",{class:"btn btn-ink mt-2",type:"submit",disabled:e.busy},"Save email address",8,hb),e.emailSaved?(a(),l("p",gb,"Email address saved.")):f("v-if",!0)],32)])):f("v-if",!0),n("div",vb,[e.connections.appEnabled?(a(),l("section",yb,[t[15]||(t[15]=n("div",{class:"connection-top"},[n("i",{class:"fab fa-github","aria-hidden":"true"}),n("span",{class:"connection-badge"},"Recommended")],-1)),n("div",bb,[t[8]||(t[8]=n("h2",null,"GitHub App",-1)),n("span",{class:R(["connection-status",{"is-connected":e.connections.appConnected&&!e.connections.appError}])},d(e.connections.appError?"Needs attention":e.connections.appConnected?"Connected":"Not connected"),3)]),t[16]||(t[16]=n("p",null,"Read-only access to gists and the repositories you choose.",-1)),e.connections.appError?(a(),l("p",wb,d(e.connections.appError)+". Reconnect to restore access.",1)):f("v-if",!0),n("div",kb,[e.connections.appConnected&&!e.connections.appError?(a(),l("a",Cb,[...t[9]||(t[9]=[h("Manage repository access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0),n("a",{class:R(e.connections.appConnected&&!e.connections.appError?"connection-link":"btn btn-ink"),target:"_self",href:"/github/app/login"},d(e.connections.appConnected?"Reconnect account":"Connect GitHub account"),3),e.connections.appConnected?(a(),l("button",{key:1,class:"connection-link connection-refresh",title:"Refresh access",disabled:e.busy,onClick:t[3]||(t[3]=s=>e.loadConnections())},[...t[10]||(t[10]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),n("span",{class:"sr-only"},"Refresh access",-1)])],8,Sb)):f("v-if",!0)]),t[17]||(t[17]=n("p",{class:"connection-help"},"Choose repositories on GitHub. Organization access may need an administrator's approval.",-1)),e.connections.installations?.length?(a(),l("ul",Eb,[(a(!0),l(V,null,Q(e.connections.installations,s=>(a(),l("li",{key:s.id},[n("div",null,[t[11]||(t[11]=n("span",{class:"connection-label"},"Installed on",-1)),t[12]||(t[12]=h()),n("strong",null,d(s.account),1),s.suspended?(a(),l("span",Nb," \xB7 Suspended")):f("v-if",!0)]),e.connections.installations.length>1?(a(),l("a",{key:0,target:"_self",href:"/github/app/install?installationId="+s.id},[t[13]||(t[13]=h("Manage access ",-1)),n("span",Tb,"for "+d(s.account),1),t[14]||(t[14]=h(" \u2192",-1))],8,Rb)):f("v-if",!0)]))),128))])):f("v-if",!0)])):f("v-if",!0),n("section",null,[t[20]||(t[20]=n("div",{class:"connection-top"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-key"})]),n("span",{class:"connection-badge connection-badge-muted"},"Legacy")],-1)),n("div",Pb,[t[18]||(t[18]=n("h2",null,"GitHub OAuth",-1)),n("span",{class:R(["connection-status",{"is-connected":e.connections.oauthConnected}])},d(e.connections.oauthConnected?"Connected":"Not connected"),3)]),t[21]||(t[21]=n("p",null,"For existing OAuth anonymizations.",-1)),t[22]||(t[22]=n("p",{class:"connection-help"},"This connection uses GitHub's broader repository permissions. Existing work keeps using it until you switch below.",-1)),e.connections.oauthEnabled?(a(),l("a",Db,d(e.connections.oauthConnected?"Reconnect OAuth":"Connect legacy OAuth"),1)):f("v-if",!0),e.connections.oauthConnected?(a(),l("div",Ab,[e.connections.gistCount?(a(),l("p",Ib,d(e.connections.gistCount)+" gist(s) use your GitHub App connection when available.",1)):f("v-if",!0),t[19]||(t[19]=n("p",null,"Switch all dependent repositories before revoking access. Gists can use your GitHub App connection.",-1)),e.connections.appConnected?(a(),l("button",{key:1,class:"btn btn-sm btn-outline-danger connection-danger",disabled:e.busy||e.connections.resources.some(s=>s.connection==="oauth"),onClick:t[4]||(t[4]=s=>e.disconnectOAuth())},"Revoke OAuth access",8,Ob)):f("v-if",!0)])):f("v-if",!0)])]),n("section",Mb,[n("div",Vb,[t[23]||(t[23]=n("h2",null,"Repository connections",-1)),n("span",qb,d(e.connections.resources?.length||0)+" "+d((e.connections.resources?.length||0)===1?"resource":"resources"),1)]),t[25]||(t[25]=n("p",null,"Check access, then switch each resource to the GitHub App. After reinstalling the App, reconnect existing resources here to keep their anonymous URLs and published snapshots.",-1)),e.connections.resources?.length?f("v-if",!0):(a(),l("div",Lb,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),n("div",null,[n("h3",null,"No repository connections yet"),n("p",null,"Your repositories and pull requests will appear here once you anonymize them.")],-1),n("a",{class:"connection-link",href:"/anonymize"},"New anonymization \u2192",-1)])])),(a(!0),l(V,null,Q(e.connections.resources,s=>(a(),l("div",{class:"connection-resource",key:s.type+s.id},[n("div",$b,[n("strong",null,d(s.name||s.id),1),n("small",null,d(s.type)+" \xB7 "+d(s.id),1)]),n("span",{class:R(["connection-badge",{"connection-badge-muted":s.connection==="oauth"}])},d(s.connection==="github-app"?"Read-only App":"Legacy OAuth"),3),!["archived","removed","preparing","queue","removing","expiring"].includes(s.status)&&(s.status!=="download"||s.type==="pull-request"&&(!s.statusDate||new Date(s.statusDate).getTime()<=Date.now()-3e5))&&e.connections.appEnabled&&e.connections.appConnected?(a(),l("div",_b,[n("button",{class:"btn btn-outline-ink",disabled:e.busy,onClick:i=>e.changeConnection(s,"github-app",!0)},"Check read-only access",8,Fb),s.eligible?(a(),l("button",{key:0,class:"btn btn-ink",disabled:e.busy,onClick:i=>e.changeConnection(s,"github-app",!1)},d(s.connection==="github-app"?"Reconnect read-only access":"Switch to read-only access"),9,Ub)):f("v-if",!0),s.eligible===!1?(a(),l("span",Bb,"Access unavailable. Allow this repository on GitHub, then check again.")):f("v-if",!0)])):f("v-if",!0),!["archived","removed","preparing","queue","removing","expiring"].includes(s.status)&&(s.status!=="download"||s.type==="pull-request"&&(!s.statusDate||new Date(s.statusDate).getTime()<=Date.now()-3e5))&&s.connection==="github-app"&&e.connections.oauthConnected?(a(),l("button",{key:1,class:"connection-link",disabled:e.busy,onClick:i=>e.changeConnection(s,"oauth",!1)},"Use OAuth",8,zb)):f("v-if",!0)]))),128)),t[26]||(t[26]=n("p",{class:"connection-footnote"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})]),h(" Removing access stops new fetches from GitHub. Published content keeps its current expiration and removal settings.")],-1))])])):f("v-if",!0)])}var Hb={class:"container paper-page auth-page"},jb={class:"auth-layout"},Gb={class:"auth-options"},Wb={key:0},Kb={key:0,class:"btn btn-ink auth-continue",target:"_self",href:"/github/login?recover=1"},Yb={key:1},Jb={key:1,class:"auth-card"},Xb={key:2,class:"auth-legacy"},Qb={key:3,role:"status"};function sp(e,t){let s=Ze("partial-view");return a(),l(V,null,[n("div",Hb,[n("div",jb,[t[4]||(t[4]=ke('
Your research, ready for review

Your code.
Your identity,
protected.
Sign in to GitHub

Sign in to create and manage your anonymizations.

',1)),n("div",Gb,[e.accountRecovery?(a(),l("section",Wb,[t[0]||(t[0]=n("h2",null,"Verify your existing account",-1)),t[1]||(t[1]=n("p",null,"We found an existing account. Verify it with your previous GitHub connection to keep your anonymizations. Future sign-ins will use the GitHub App.",-1)),e.site_options?.GITHUB_OAUTH_ENABLED?(a(),l("a",Kb,"Verify with previous GitHub connection")):(a(),l("p",Yb,"Account verification is currently unavailable. Please try again later."))])):f("v-if",!0),e.site_options?.GITHUB_APP_ENABLED&&!e.accountRecovery?(a(),l("section",Jb,[...t[2]||(t[2]=[ke('

Continue with GitHub

Connect through the GitHub App with read-only repository access.

  • You choose which repositories to share
  • No permission to write to your code
Sign in with GitHubYour existing anonymizations and connections stay with your account.',5)])])):f("v-if",!0),!e.site_options?.GITHUB_APP_ENABLED&&e.site_options?.GITHUB_OAUTH_ENABLED&&!e.accountRecovery?(a(),l("section",Xb,[...t[3]||(t[3]=[n("div",{class:"connection-title"},[n("h2",null,"Continue with GitHub")],-1),n("p",null,"Sign in to access your account. GitHub OAuth includes write access to private repositories.",-1),n("a",{class:"connection-link",target:"_self",href:"/github/login"},[h("Sign in with GitHub "),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-arrow-right"})])],-1)])])):f("v-if",!0),e.site_options&&!e.site_options.GITHUB_APP_ENABLED&&!e.site_options.GITHUB_OAUTH_ENABLED?(a(),l("p",Qb,"GitHub sign-in is currently unavailable. Please try again later.")):f("v-if",!0)])])]),Me(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])],64)}function ip(e,t){let s=Ze("partial-view");return a(),l(V,null,[t[0]||(t[0]=ke('
Error \xB7 404

This link
isn\u2019t here.

The anonymous mirror you\u2019re looking for has expired, been removed by its owner, or never existed. If you received this URL from an author, ask them to re-issue it.

',1)),Me(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])],64)}var Zb={class:"container paper-page admin-page"},xb={class:"seg-bar"},e1={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},t1=["aria-checked"],n1={class:"count"},o1=["aria-checked"],s1={class:"count"},i1=["aria-checked"],r1={class:"count"},a1=["aria-checked"],l1={class:"count"},d1=["aria-checked"],u1={class:"count"},c1=["aria-checked"],p1={class:"count"},f1={class:"seg-countline",role:"status"},m1={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},h1={class:"w-100 admin-filter-toolbar","aria-label":"Conferences","accept-charset":"UTF-8"},g1={class:"admin-filter-row"},v1={class:"search-wrap"},y1={type:"search",class:"form-control",placeholder:"Search conferences\u2026",autocomplete:"off"},b1={key:0,class:"admin-search-hint"},w1={key:1,class:"admin-filter-inline","aria-label":"Pagination"},k1=["disabled"],C1={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},S1=["disabled"],E1={key:0,class:"admin-filter-row"},N1={class:"admin-active-chips"},R1={class:"key"},T1=["onClick"],P1={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},D1={key:0,class:"paper-table-head",role:"row"},A1={role:"columnheader"},I1={role:"columnheader"},O1={role:"columnheader"},M1={class:"paper-table-row",role:"row"},V1={class:"cell-anon",role:"cell"},q1={class:"anon-text"},L1=["textContent","href"],$1={class:"anon-sub"},_1={class:"cell-status",role:"cell"},F1=["textContent"],U1={class:"cell-views num",role:"cell"},B1=["textContent","href"],z1={class:"cell-expires",role:"cell"},H1={class:"cell-actions",role:"cell"},j1={class:"dropdown"},G1={class:"dropdown-menu dropdown-menu-right"},W1=["href"],K1=["href"],Y1=["href"],J1=["onClick"],X1={key:1,class:"paper-table-empty"},Q1={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},Z1={key:0,class:"pagination-compact"},x1=["disabled"],ew=["max"],tw=["disabled"],nw={class:"admin-filter-inline"},ow={class:"form-control form-control-sm"};function rp(e,t){let s=Pe("field"),i=Pe("form");return a(),l("div",Zb,[t[55]||(t[55]=ke('
Admin \xA0/\xA0 Conferences

Conferences

',3)),n("div",xb,[n("div",e1,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[0]||(t[0]=o=>e.setSegView("all"))},[t[14]||(t[14]=h("All ",-1)),n("span",n1,d(e.fmt?.number(e.segCount("all"))),1)],10,t1),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="ready","is-empty":!e.segCount("ready")}]),"aria-checked":e.segView()==="ready",onClick:t[1]||(t[1]=o=>e.setSegView("ready"))},[t[15]||(t[15]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[16]||(t[16]=h("Ready ",-1)),n("span",s1,d(e.fmt?.number(e.segCount("ready"))),1)],10,o1),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="preparing","is-empty":!e.segCount("preparing")}]),"aria-checked":e.segView()==="preparing",onClick:t[2]||(t[2]=o=>e.setSegView("preparing"))},[t[17]||(t[17]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[18]||(t[18]=h("Preparing ",-1)),n("span",r1,d(e.fmt?.number(e.segCount("preparing"))),1)],10,i1),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="error","is-empty":!e.segCount("error")}]),"aria-checked":e.segView()==="error",onClick:t[3]||(t[3]=o=>e.setSegView("error"))},[t[19]||(t[19]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[20]||(t[20]=h("Error ",-1)),n("span",l1,d(e.fmt?.number(e.segCount("error"))),1)],10,a1),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="expired","is-empty":!e.segCount("expired")}]),"aria-checked":e.segView()==="expired",onClick:t[4]||(t[4]=o=>e.setSegView("expired"))},[t[21]||(t[21]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[22]||(t[22]=h("Expired ",-1)),n("span",u1,d(e.fmt?.number(e.segCount("expired"))),1)],10,d1),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="removed","is-empty":!e.segCount("removed")}]),"aria-checked":e.segView()==="removed",onClick:t[5]||(t[5]=o=>e.setSegView("removed"))},[t[23]||(t[23]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[24]||(t[24]=h("Removed ",-1)),n("span",p1,d(e.fmt?.number(e.segCount("removed"))),1)],10,c1)]),n("p",f1,[n("strong",null,d(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[25]||(t[25]=h(" shown",-1))])]),e.fetchError?(a(),l("div",m1,[t[26]||(t[26]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),h(" "+d(e.fetchError),1)])):f("v-if",!0),P((a(),l("form",h1,[n("div",g1,[n("div",v1,[P(n("input",y1,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(a(),l("span",b1,"/"))]),t[30]||(t[30]=n("span",{class:"admin-filter-spacer"},null,-1)),e.total>0?(a(),l("button",{key:0,class:"btn btn-sm",type:"button",onClick:t[6]||(t[6]=o=>e.exportCsv())},[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),h(" Export",-1)])])):f("v-if",!0),e.totalPage>1?(a(),l("span",w1,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[7]||(t[7]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[28]||(t[28]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,k1),n("span",C1,d(e.query?.page)+"/"+d(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[8]||(t[8]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[29]||(t[29]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,S1)])):f("v-if",!0)]),e.chips?.length?(a(),l("div",E1,[n("div",N1,[(a(!0),l(V,null,Q(e.chips,(o,r)=>(a(),l("span",{class:"admin-active-chip",key:o?.key},[n("span",R1,d(o?.label),1),n("span",null,d(o?.value),1),n("button",{type:"button",onClick:u=>e.clearFilter(o.key),"aria-label":"Clear filter"},[...t[31]||(t[31]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,T1)]))),128))])])):f("v-if",!0)])),[[i,e.viewState]]),n("div",P1,[e.total!==0?(a(),l("div",D1,[n("div",A1,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="name"}]),onClick:t[9]||(t[9]=o=>e.sortBy("name"))},[t[33]||(t[33]=h("Conference ",-1)),e.sortIcon("name")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("name")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[32]||(t[32]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",I1,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="status"}]),onClick:t[10]||(t[10]=o=>e.sortBy("status"))},[t[35]||(t[35]=h("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[34]||(t[34]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[38]||(t[38]=n("div",{role:"columnheader",class:"num"},"Repos",-1)),n("div",O1,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="startDate"}]),onClick:t[11]||(t[11]=o=>e.sortBy("startDate"))},[t[37]||(t[37]=h("Window ",-1)),e.sortIcon("startDate")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("startDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[36]||(t[36]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[39]||(t[39]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))])):f("v-if",!0),(a(!0),l(V,null,Q(e.filteredConferences,(o,r)=>(a(),l("div",M1,[n("div",V1,[t[40]||(t[40]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Conference"},[n("use",{href:"#project-icon-conference"})],-1)),n("div",q1,[n("a",{class:"repo-name",textContent:d(o?.name),href:e.safeUrl("/conference/"+o?.conferenceID)},null,8,L1),n("div",$1,[n("span",null,d(o?.conferenceID),1),n("span",null,d(e.fmt?.money(o?.price||0)),1)])])]),n("div",_1,[n("span",{class:R(["status-dot","st-"+(o?.status||"unknown")])},null,2),n("span",{textContent:d(e.fmt?.statusLabel(o?.status))},null,8,F1)]),n("div",U1,[t[41]||(t[41]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),n("a",{title:"Show repositories in this conference",textContent:d(e.fmt?.number(o?.repositories?.length||0)),href:e.safeUrl("/admin/?conference="+o?.conferenceID)},null,8,B1)]),n("div",z1,[t[42]||(t[42]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),h(" "+d(e.fmt?.date(o?.startDate))+" \u2013 "+d(e.fmt?.date(o?.endDate)),1)]),n("div",H1,[n("div",j1,[t[48]||(t[48]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",G1,[n("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+o?.conferenceID+"/edit")},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),h(" Edit",-1)])],8,W1),n("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+o?.conferenceID+"/")},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),h(" View",-1)])],8,K1),n("a",{class:"dropdown-item",href:e.safeUrl("/admin/?conference="+o?.conferenceID)},[...t[45]||(t[45]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),h(" View repositories",-1)])],8,Y1),t[47]||(t[47]=n("div",{class:"dropdown-divider"},null,-1)),P(n("a",{class:"dropdown-item text-danger",href:"#",onClick:de(u=>e.removeConference(o),["prevent"])},[...t[46]||(t[46]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),h(" Remove",-1)])],8,J1),[[Z,o?.status!="removed"]])])])])]))),256)),e.filteredConferences?.length==0?(a(),l("div",X1,[t[49]||(t[49]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),n("span",null,d(e.total?"No conferences match the current filters.":"No conferences yet."),1)])):f("v-if",!0)]),n("div",Q1,[t[54]||(t[54]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",Z1,[n("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[50]||(t[50]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),h(" Previous",-1)])],8,x1),P(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,ew),[[s,{state:e.viewState,set:o=>{e.query.page=o},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+d(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[13]||(t[13]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[51]||(t[51]=[h("Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,tw)])):f("v-if",!0),n("span",nw,[t[53]||(t[53]=n("label",null,"Per page",-1)),P((a(),l("select",ow,[...t[52]||(t[52]=[ke('',5)])])),[[s,{state:e.viewState,set:o=>{e.query.limit=o},value:e.query?.limit,form:null,options:{}}]])])])])}var sw={class:"container paper-page admin-page overview-page errors-page"},iw={class:"error-source-toolbar"},rw={class:"error-source-switch seg-filter",role:"group","aria-label":"Log source"},aw=["aria-pressed"],lw=["aria-pressed"],dw={class:"error-health-strip"},uw={class:"log-state",role:"status","aria-live":"polite"},cw=["disabled"],pw={class:"sr-only"},fw=["aria-busy"],mw={class:"volume-head"},hw=["href"],gw={key:0,class:"log-inspector","aria-labelledby":"log-detail-title"},vw={class:"log-inspector-heading"},yw={class:"log-inspector-eyebrow"},bw={id:"log-detail-title",tabindex:"-1"},ww={key:0},kw={class:"log-facts-strip"},Cw=["datetime"],Sw=["datetime"],Ew={class:"log-detail log-investigation-body",id:"log-detail"},Nw={class:"log-related-main"},Rw={class:"log-correlation-selector",role:"group","aria-label":"Related events correlation"},Tw=["id","aria-label","aria-pressed","onClick"],Pw={class:"log-selector-mark","aria-hidden":"true"},Dw={key:0,class:"log-meta"},Aw={class:"log-correlation-window"},Iw=["aria-busy"],Ow={class:"volume-head"},Mw={key:0,role:"status"},Vw={key:1,class:"log-coverage"},qw={key:2,class:"log-events"},Lw=["datetime","title"],$w={class:"log-timeline-event"},_w={class:"log-timeline-event-title"},Fw={key:0},Uw={key:1},Bw={key:2},zw={key:0,class:"log-request-route"},Hw={key:1,class:"log-error-stack"},jw={key:0},Gw={key:0},Ww={key:1},Kw={key:2},Yw={class:"log-event-fields"},Jw=["onClick"],Xw={class:"log-timeline-scope"},Qw=["href"],Zw={key:1,class:"log-no-trace"},xw={class:"log-evidence"},ek={class:"log-coverage"},tk={class:"log-sample-panel"},nk={class:"log-coverage"},ok={key:0,class:"log-request-route"},sk={key:1,class:"log-reproduction"},ik={key:2,class:"log-error-stack"},rk={key:0},ak={key:1},lk={key:2},dk={class:"log-sample-facts"},uk={key:0},ck={class:"log-detail-identifiers"},pk={key:0},fk={class:"log-value-reveal"},mk=["onClick"],hk={class:"log-all-fields"},gk={class:"log-raw-sample"},vk={class:"log-list-view"},yk={class:"log-query"},bk={key:0},wk=["disabled"],kk={key:0,class:"log-coverage"},Ck={class:"log-local-filters"},Sk={class:"log-search"},Ek={class:"log-coverage",role:"status",title:"Counts and first/last dates apply only to returned records, not all matching events."},Nk={key:0,class:"log-loading"},Rk={key:1,class:"log-workspace"},Tk={class:"log-results"},Pk={key:0,class:"log-table-scroll"},Dk={class:"log-table",role:"table"},Ak=["aria-label","onClick","aria-expanded"],Ik={class:"log-event-title"},Ok={class:"log-meta"},Mk={class:"log-service"},Vk={class:"log-module"},qk={class:"log-level"},Lk={key:0,class:"log-http"},$k={class:"log-count"},_k=["datetime","title"],Fk={key:1,class:"admin-empty"},Uk={key:2,class:"admin-empty"},Bk={key:2,class:"log-health"},zk={key:0},Hk={key:1},jk={key:2},Gk={key:0,class:"log-copy-status",role:"status"},Wk=["aria-busy"],Kk={key:0,class:"history-warning",role:"status"},Yk={key:1,class:"log-inspector"},Jk={class:"log-inspector-heading"},Xk={class:"log-inspector-eyebrow"},Qk={id:"history-inspector-title",tabindex:"-1"},Zk={key:0},xk={class:"log-inspector-tabs detail-tabs",role:"group","aria-label":"History event view"},e0=["aria-pressed"],t0=["aria-pressed"],n0=["aria-pressed"],o0=["aria-pressed"],s0=["aria-pressed"],i0={class:"errors-toolbar","aria-label":"Error filters"},r0={class:"seg-filter",role:"group","aria-label":"Filter by severity"},a0=["aria-pressed"],l0=["aria-pressed"],d0=["aria-pressed"],u0=["aria-pressed"],c0={class:"search-wrap"},p0={type:"search",class:"form-control","aria-label":"Search application history",placeholder:"Search history\u2026",title:"Search messages, or filter with code:repo_not_found module:route status:>=400",autocomplete:"off"},f0={key:0,class:"filter-count"},m0={class:"history-view-options"},h0={class:"history-view-controls"},g0={class:"select-wrap"},v0={id:"history-sort",class:"form-control form-control-sm"},y0={class:"select-wrap"},b0={id:"history-merge",class:"form-control form-control-sm"},w0={class:"autoref"},k0={type:"checkbox"},C0={key:0,role:"status"},S0={key:1,class:"admin-empty"},E0={key:2},N0={key:3,class:"errors-pager"},R0=["disabled"],T0={key:0,class:"errors-list-head"},P0={key:0,class:"errors-group-head"},D0={class:"errors-group-count"},A0={key:0,class:"errors-group-note"},I0=["data-history-key","aria-expanded","aria-controls","onClick"],O0={class:"col-when"},M0={class:"when-rel"},V0={class:"when-abs"},q0={class:"col-sev"},L0={class:"sev-label"},$0={class:"col-mod"},_0={class:"pill pill-module"},F0={class:"col-msg"},U0={class:"msg-code"},B0={key:0,class:"msg-context"},z0={key:1,class:"msg-detail"},H0=["title"],j0={class:"col-count"},G0={key:0,class:"count-pill"},W0={key:1,class:"count-pill count-pill-muted"},K0={class:"col-status"},Y0=["title"],J0={key:1,class:"status-empty",title:"No HTTP status for this event"},X0=["id"],Q0={class:"detail-body"},Z0={class:"detail-main"},x0={key:0},e2={key:0,class:"log-request-route"},t2={key:1,class:"log-reproduction"},n2=["onClick"],o2={key:2},s2={key:0},i2={class:"log-explanation-lead"},r2={class:"log-evidence"},a2={class:"history-technical"},l2={key:0,class:"history-fields"},d2={class:"log-value-reveal"},u2=["onClick"],c2={key:1},p2={key:2,class:"stack-pre"},f2={key:3,class:"history-occurrences","aria-label":"Stored occurrences"},m2={class:"log-evidence"},h2={class:"history-occurrence-list"},g2={class:"history-occurrence"},v2={class:"history-occurrence-heading"},y2=["datetime"],b2={class:"history-occurrence-context"},w2={key:0},k2={key:1},C2={key:0},S2={key:1},E2={key:2,class:"log-evidence"},N2={key:3,class:"log-evidence"},R2={class:"history-occurrence-record"},T2={class:"detail-actions"},P2=["onClick"],D2=["onClick"],A2=["onClick"],I2=["onClick"],O2={key:3,class:"copy-hint"},M2={class:"detail-aside"},V2={class:"aside-block"},q2=["title"],L2={class:"aside-block"},$2=["title"],_2={class:"aside-block"},F2={class:"aside-value"},U2={key:0,class:"aside-sub"},B2={key:0,class:"aside-block"},z2=["href"],H2={key:0,class:"log-value-reveal"},j2=["onClick"],G2={key:1,class:"aside-block"},W2={class:"aside-value mono"},K2={class:"history-management"},Y2={class:"volume-head"},J2={class:"errors-actions"},X2={role:"status"},Q2={key:0},Z2={class:"history-summary"},x2={key:0,class:"kpi-grid"},eC={class:"kpi-card"},tC={class:"kpi-value"},nC={key:0},oC={key:1},sC={key:2},iC={class:"kpi-card kpi-error"},rC={class:"kpi-value"},aC={class:"kpi-sub"},lC={class:"kpi-card kpi-warn"},dC={class:"kpi-value"},uC={class:"kpi-sub"},cC={class:"kpi-card kpi-info"},pC={class:"kpi-value"},fC={class:"kpi-sub"},mC={class:"kpi-value"},hC={class:"kpi-sub"},gC={key:0,class:"dropped-warn"},vC={key:1,class:"volume-chart"},yC={class:"volume-head"},bC={class:"volume-legend"},wC={key:0},kC={key:1},CC={key:2},SC={class:"volume-bars"},EC=["title"],NC={key:1},RC={key:0,class:"admin-empty"},TC=["aria-busy"],PC={class:"volume-head"},DC={id:"log-timeline-title",tabindex:"-1"},AC={key:0,class:"log-origin"},IC={key:1,role:"status"},OC={key:2,class:"log-coverage"},MC={key:3,class:"log-events"},VC=["datetime","title"],qC={class:"log-timeline-event"},LC={class:"log-timeline-event-title"},$C={key:0},_C={key:1},FC={key:2},UC={key:0,class:"log-request-route"},BC={key:1,class:"log-error-stack"},zC={key:0},HC={key:0},jC={key:1},GC={key:2},WC={class:"log-event-fields"},KC=["onClick"],YC={class:"log-timeline-scope"},JC=["href"];function ap(e,t){let s=Pe("field"),i=Pe("form");return a(),l("div",sw,[t[117]||(t[117]=ke('
Admin \xA0/\xA0 Errors

Errors

',2)),n("div",iw,[n("div",rw,[n("button",{id:"error-source-central",type:"button",class:R(["seg-chip",{active:e.errorSource==="central"}]),"aria-pressed":e.errorSource==="central",onClick:t[0]||(t[0]=o=>e.errorSource="central")},"Central logs",10,aw),n("button",{id:"error-source-history",type:"button",class:R(["seg-chip",{active:e.errorSource==="history"}]),"aria-pressed":e.errorSource==="history",onClick:t[1]||(t[1]=o=>e.errorSource="history")},"Application history",10,lw)]),n("div",dw,[n("p",uw,d(e.errorSource==="history"?e.redisLoading?"Loading application history\u2026":e.available===null?"Checking Redis\u2026":e.available?"Redis history is reachable.":"Redis history is unavailable. Previously loaded rows may be stale.":e.logFailure||(e.logLoading?"Loading central logs\u2026":e.logSnapshotStale?"This snapshot is stale. Refresh before assessing current health.":e.logStateText(e.logData?.state))),1),n("button",{type:"button",class:"btn btn-sm",disabled:e.errorSource==="central"?e.logLoading:e.redisLoading,onClick:t[2]||(t[2]=o=>e.errorSource==="central"?e.refreshLogs():e.refreshNow())},[h(d((e.errorSource==="central"?e.logLoading:e.redisLoading)?"Refreshing\u2026":"Refresh"),1),n("span",pw,d(e.errorSource==="central"?" central logs":" history"),1)],8,cw),e.errorSource==="central"&&(e.logFailure||["disabled","misconfigured","unreachable","busy"].includes(e.logData?.state))?(a(),l("button",{key:0,type:"button",class:"btn btn-sm",onClick:t[3]||(t[3]=o=>e.errorSource="history")},"Open application history")):f("v-if",!0)])]),P(n("section",{class:"log-investigation","aria-labelledby":"central-logs-title","aria-busy":e.logLoading},[n("div",mw,[t[31]||(t[31]=n("h2",{class:"sr-only",id:"central-logs-title"},"Central logs",-1)),e.logData?.grafanaUrl?(a(),l("a",{key:0,href:e.safeUrl(e.logData.grafanaUrl),target:"_blank",rel:"noopener noreferrer"},"Open in Grafana",8,hw)):f("v-if",!0)]),e.selectedLog?(a(),l("section",gw,[n("button",{type:"button",class:"log-back",onClick:t[4]||(t[4]=o=>e.closeLogDetail())},[...t[32]||(t[32]=[n("span",{"aria-hidden":"true"},"\u2190",-1),h(" Back to events",-1)])]),n("div",vw,[n("div",null,[n("p",yw,d(e.selectedLog.sample.service)+" / "+d(e.selectedLog.sample.module)+" \xB7 Event sample",1),n("h2",bw,d(e.selectedLog.sample.errorCode||e.selectedLog.sample.errorType||e.selectedLog.sample.event),1)]),n("span",{class:R(["log-severity","log-severity-"+e.logSeverity(e.selectedLog.sample)])},[h(d(e.logSeverity(e.selectedLog.sample)==="error"?"Failure":e.logSeverity(e.selectedLog.sample)==="warn"?"Warning":"Info"),1),e.selectedLog.sample.status||e.selectedLog.sample.httpStatus?(a(),l("span",ww," \xB7 HTTP "+d(e.selectedLog.sample.status||e.selectedLog.sample.httpStatus),1)):f("v-if",!0)],2)]),n("div",kw,[n("span",null,[n("strong",null,d(e.selectedLog.count),1),t[33]||(t[33]=h(" returned occurrences",-1))]),n("span",null,[t[34]||(t[34]=h("First ",-1)),n("time",{datetime:e.selectedLog.first},d(e.absTimeShort(e.selectedLog.first)),9,Cw)]),n("span",null,[t[35]||(t[35]=h("Last ",-1)),n("time",{datetime:e.selectedLog.last},d(e.absTimeShort(e.selectedLog.last)),9,Sw)])]),n("div",Ew,[n("div",Nw,[n("div",Rw,[t[36]||(t[36]=n("span",null,"Follow",-1)),(a(!0),l(V,null,Q(["requestId","jobId"].filter(o=>e.logTraceId(e.selectedLog,o)),o=>(a(),l("button",{type:"button",class:"log-trace-button",key:o,id:"trace-selector-"+o,"aria-label":"Follow "+(o==="requestId"?"request ":"job ")+e.selectedLog.sample[o],"aria-pressed":e.traceSelection?.kind===o,onClick:r=>e.lookupTrace(o,e.selectedLog.sample[o],r.currentTarget,e.selectedLog.sample)},[h(d(o==="requestId"?"Request":"Job")+" ",1),n("span",Pw,d(e.traceSelection?.kind===o?"\u2713":"\u2192"),1)],8,Tw))),128)),!e.logTraceId(e.selectedLog,"requestId")&&!e.logTraceId(e.selectedLog,"jobId")?(a(),l("span",Dw,"No correlation ID recorded")):f("v-if",!0),n("span",Aw,d(e.logData?.window||e.logAppliedFilters.window)+" window",1)]),e.traceSelection?(a(),l("section",{key:0,class:"log-timeline","aria-labelledby":"log-timeline-title","aria-busy":e.traceLoading},[n("div",Ow,[t[37]||(t[37]=n("h3",{id:"log-timeline-title",tabindex:"-1"},"Related events",-1)),n("button",{type:"button",class:"btn btn-sm",onClick:t[5]||(t[5]=o=>e.closeTrace())},"Hide events")]),e.traceLoading||e.trace?.state!=="ready"?(a(),l("p",Mw,d(e.traceLoading?"Loading related events\u2026":e.trace?.state==="empty"?"No related events returned in this window.":e.logStateText(e.trace?.state)),1)):f("v-if",!0),e.trace&&!e.traceLoading?(a(),l("p",Vw,d(e.trace.events?.length||0)+" events returned \xB7 "+d(e.absTime(e.trace.start))+" \u2013 "+d(e.absTime(e.trace.end))+" \xB7 200-event cap. All services and releases.",1)):f("v-if",!0),e.trace?.events?.length?(a(),l("ol",qw,[(a(!0),l(V,null,Q(e.trace.events,(o,r)=>(a(),l("li",{key:r},[n("time",{datetime:o.timestamp,title:o.timestamp},d(e.absTimeShort(o.timestamp)),9,Lw),n("div",$w,[n("div",_w,[n("strong",null,d(o.errorCode||o.errorType||o.event),1),n("span",{class:R(["log-severity","log-severity-"+e.logSeverity(o)])},d(o.status||o.httpStatus?"HTTP "+(o.status||o.httpStatus):o.severity||"Event"),3)]),n("p",null,[h(d(o.service),1),o.module?(a(),l("span",Fw," / "+d(o.module),1)):f("v-if",!0),o.ms!==void 0?(a(),l("span",Uw," \xB7 "+d(o.ms)+" ms",1)):f("v-if",!0),o.attempt!==void 0?(a(),l("span",Bw," \xB7 attempt "+d(o.attempt),1)):f("v-if",!0)]),o.route?(a(),l("p",zw,[n("code",null,d(o.method)+" "+d(o.requestPath||o.route),1)])):f("v-if",!0),o.errorStack||o.causeStack?(a(),l("details",Hw,[n("summary",null,[t[38]||(t[38]=h("Exception frames",-1)),o.errorType?(a(),l("span",jw," \xB7 "+d(o.errorType),1)):f("v-if",!0)]),o.errorStack?(a(),l("pre",Gw,d(o.errorStack),1)):f("v-if",!0),o.causeType?(a(),l("p",Ww,"Caused by "+d(o.causeType),1)):f("v-if",!0),o.causeStack?(a(),l("pre",Kw,d(o.causeStack),1)):f("v-if",!0)])):f("v-if",!0),n("details",Yw,[t[39]||(t[39]=n("summary",null,"Event fields",-1)),n("pre",null,d(JSON.stringify(o,null,2)),1),n("button",{type:"button",class:"btn btn-sm",onClick:u=>e.copyLogValue(JSON.stringify(o,null,2))},"Copy JSON",8,Jw)])])]))),128))])):f("v-if",!0),n("details",Xw,[t[40]||(t[40]=n("summary",null,"Query scope",-1)),n("p",null,"Earliest matching events for the selected "+d(e.traceSelection.kind==="jobId"?"job":"request")+" ID. Service and release filters do not narrow this timeline.",1)]),e.trace?.grafanaUrl?(a(),l("a",{key:3,href:e.safeUrl(e.trace.grafanaUrl),target:"_blank",rel:"noopener noreferrer"},"Open in Grafana",8,Qw)):f("v-if",!0)],8,Iw)):f("v-if",!0),e.traceSelection?f("v-if",!0):(a(),l("div",Zw,[n("h3",null,d(e.logTraceId(e.selectedLog,"requestId")||e.logTraceId(e.selectedLog,"jobId")?"Related events hidden":"This sample has no correlation ID"),1),n("p",null,d(e.logExplanation(e.selectedLog.sample)),1),n("p",xw,d(e.logEvidence(e.selectedLog.sample)),1),n("p",ek,d(e.logTraceId(e.selectedLog,"requestId")||e.logTraceId(e.selectedLog,"jobId")?"Choose Request or Job above to load related events.":"The recorded fields are available in the sample panel. Related events cannot be looked up for this record."),1)]))]),n("aside",tk,[t[51]||(t[51]=n("h3",null,"Event sample",-1)),n("p",nk,"One of "+d(e.selectedLog.count)+" returned occurrences. IDs can differ across the group.",1),e.selectedLog.sample.route?(a(),l("p",ok,[n("code",null,d(e.selectedLog.sample.method)+" "+d(e.selectedLog.sample.route),1)])):f("v-if",!0),e.selectedLog.sample.requestPath?(a(),l("section",sk,[t[43]||(t[43]=n("h3",null,"Reproduce this request",-1)),n("dl",null,[n("div",null,[t[41]||(t[41]=n("dt",null,"Anonymous repository ID",-1)),n("dd",null,[n("code",null,d(e.selectedLog.sample.repoId),1)])]),n("div",null,[t[42]||(t[42]=n("dt",null,"Request path \xB7 query excluded",-1)),n("dd",null,[n("code",null,d(e.selectedLog.sample.requestPath),1)])])]),n("button",{type:"button",class:"btn btn-sm",onClick:t[6]||(t[6]=o=>e.copyLogValue(e.selectedLog.sample.requestPath))},"Copy request path")])):f("v-if",!0),e.selectedLog.sample.errorStack||e.selectedLog.sample.causeStack?(a(),l("details",ik,[n("summary",null,"Exception frames \xB7 "+d(e.selectedLog.sample.errorType),1),e.selectedLog.sample.errorStack?(a(),l("pre",rk,d(e.selectedLog.sample.errorStack),1)):f("v-if",!0),e.selectedLog.sample.causeType?(a(),l("p",ak,"Caused by "+d(e.selectedLog.sample.causeType),1)):f("v-if",!0),e.selectedLog.sample.causeStack?(a(),l("pre",lk,d(e.selectedLog.sample.causeStack),1)):f("v-if",!0)])):f("v-if",!0),n("dl",dk,[n("div",null,[t[44]||(t[44]=n("dt",null,"Service",-1)),n("dd",null,d(e.selectedLog.sample.service),1)]),n("div",null,[t[45]||(t[45]=n("dt",null,"Module",-1)),n("dd",null,d(e.selectedLog.sample.module||"Not recorded"),1)]),n("div",null,[t[46]||(t[46]=n("dt",null,"Event",-1)),n("dd",null,d(e.selectedLog.sample.event),1)]),e.selectedLog.sample.release?(a(),l("div",uk,[t[47]||(t[47]=n("dt",null,"Release",-1)),n("dd",null,d(e.selectedLog.sample.release),1)])):f("v-if",!0)]),n("dl",ck,[(a(),l(V,null,Q(["requestId","jobId"],o=>(a(),l(V,{key:o},[e.logTraceId(e.selectedLog,o)?(a(),l("div",pk,[n("dt",null,d(o==="requestId"?"Request ID":"Job ID"),1),n("dd",null,[n("details",fk,[n("summary",null,d(e.compactLogValue(e.selectedLog.sample[o])),1),n("span",null,d(e.selectedLog.sample[o]),1)]),n("button",{type:"button",class:"log-copy-value",onClick:r=>e.copyLogValue(e.selectedLog.sample[o])},"Copy full ID",8,mk)])])):f("v-if",!0)],64))),64))]),n("details",hk,[n("summary",null,[t[48]||(t[48]=h("All sample fields ",-1)),n("span",null,d(Object.keys(e.selectedLog.sample).length),1)]),t[50]||(t[50]=n("p",{class:"log-coverage"},"Admin API fields only. Failed file requests may include their anonymous repository ID and pathname. Query strings are excluded; exception frames include recognized application code only.",-1)),n("dl",null,[(a(!0),l(V,null,Q(e.selectedLog.sample,(o,r)=>P((a(),l("div",{key:r},[n("dt",null,d(r),1),n("dd",null,d(o),1)])),[[Z,!["requestId","jobId"].includes(r)]])),128))]),n("details",gk,[t[49]||(t[49]=n("summary",null,"Raw sample",-1)),n("pre",null,d(JSON.stringify(e.selectedLog.sample,null,2)),1),n("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=o=>e.copyLogValue(JSON.stringify(e.selectedLog.sample,null,2)))},"Copy JSON")])])])])])):f("v-if",!0),P(n("div",vk,[n("details",yk,[n("summary",null,[h("Window: "+d(e.logAppliedFilters.window)+" \xB7 "+d(e.logAppliedFilters.service||"All services"),1),e.logAppliedFilters.release?(a(),l("span",bk," \xB7 "+d(e.logAppliedFilters.release),1)):f("v-if",!0),t[52]||(t[52]=n("span",{class:"log-query-hint"},"Time & service",-1))]),t[58]||(t[58]=h()),n("form",{class:"errors-toolbar log-filters",onSubmit:t[11]||(t[11]=de(o=>e.refreshLogs(),["prevent"]))},[n("label",null,[t[54]||(t[54]=h("Time window ",-1)),P(n("select",{class:"form-control","onUpdate:modelValue":t[8]||(t[8]=o=>e.logFilters.window=o),id:"log-window"},[...t[53]||(t[53]=[n("option",{value:"15m"},"Last 15 minutes",-1),n("option",{value:"1h"},"Last hour",-1),n("option",{value:"6h"},"Last 6 hours",-1),n("option",{value:"24h"},"Last 24 hours",-1)])],512),[[Rt,e.logFilters.window]])]),n("label",null,[t[56]||(t[56]=h("Service ",-1)),P(n("select",{class:"form-control","onUpdate:modelValue":t[9]||(t[9]=o=>e.logFilters.service=o),id:"log-service"},[...t[55]||(t[55]=[ke('',8)])],512),[[Rt,e.logFilters.service]])]),n("label",null,[t[57]||(t[57]=h("Release SHA ",-1)),P(n("input",{class:"form-control",id:"log-release","onUpdate:modelValue":t[10]||(t[10]=o=>e.logFilters.release=o),maxlength:"40",placeholder:"All releases",pattern:"[a-f0-9]{7,40}|unknown",autocomplete:"off"},null,512),[[ot,e.logFilters.release]])]),n("button",{class:"btn btn-sm",type:"submit",disabled:e.logLoading},d(e.logLoading?"Loading\u2026":"Refresh logs"),9,wk)],32),e.logData?.captured!==void 0?(a(),l("p",kk,d(e.logData.captured)+" records returned \xB7 1,000-record cap \xB7 "+d(e.absTime(e.logData.start))+" to "+d(e.absTime(e.logData.end)),1)):f("v-if",!0)]),n("div",Ck,[n("label",Sk,[t[59]||(t[59]=h("Search returned groups",-1)),P(n("input",{class:"form-control",type:"search","onUpdate:modelValue":t[12]||(t[12]=o=>e.logView.search=o),placeholder:"Event, service, code or sample ID"},null,512),[[ot,e.logView.search]])]),n("label",null,[t[61]||(t[61]=h("Severity",-1)),P(n("select",{class:"form-control","onUpdate:modelValue":t[13]||(t[13]=o=>e.logView.severity=o)},[...t[60]||(t[60]=[n("option",{value:""},"All severities",-1),n("option",{value:"error"},"Failure / HTTP 5xx",-1),n("option",{value:"warn"},"Warning",-1),n("option",{value:"info"},"Info",-1)])],512),[[Rt,e.logView.severity]])]),n("label",null,[t[63]||(t[63]=h("Sort",-1)),P(n("select",{class:"form-control","onUpdate:modelValue":t[14]||(t[14]=o=>e.logView.sort=o)},[...t[62]||(t[62]=[n("option",{value:"recent"},"Most recent",-1),n("option",{value:"count"},"Most frequent",-1)])],512),[[Rt,e.logView.sort]])])]),n("p",Ek,d(e.filteredLogGroups().length)+" of "+d(e.logData?.groups?.length||0)+" returned groups \xB7 "+d(e.logData?.captured??0)+" records \xB7 1,000-record cap.",1),e.logLoading?(a(),l("div",Nk,"Loading event groups\u2026")):(a(),l("div",Rk,[n("div",Tk,[e.filteredLogGroups().length?(a(),l("div",Pk,[n("table",Dk,[t[66]||(t[66]=n("caption",{class:"sr-only"},"Returned events grouped by service, module, code, severity and status. Select an event for sample details.",-1)),t[67]||(t[67]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Event"),n("th",{scope:"col"},"Severity"),n("th",{scope:"col"},"Count"),n("th",{scope:"col"},"Last seen")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q(e.filteredLogGroups(),o=>(a(),l("tr",{key:o.fingerprint,class:R({"log-selected":e.selectedLog?.fingerprint===o.fingerprint})},[n("td",null,[n("button",{class:"log-event-button",type:"button","aria-label":"Inspect "+(o.sample.errorCode||o.sample.errorType||o.sample.event),onClick:r=>e.selectLog(o,r.currentTarget),"aria-expanded":e.selectedLog?.fingerprint===o.fingerprint,"aria-controls":"log-detail"},[n("span",Ik,[n("strong",null,d(o.sample.errorCode||o.sample.errorType||o.sample.event),1),t[64]||(t[64]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-arrow-right"})],-1))]),n("span",Ok,[n("span",Mk,d(o.sample.service),1),n("span",Vk," / "+d(o.sample.module),1)])],8,Ak)]),n("td",qk,[n("span",{class:R(["log-severity","log-severity-"+e.logSeverity(o.sample)])},d(e.logSeverity(o.sample)==="error"?"Failure":e.logSeverity(o.sample)==="warn"?"Warning":"Info"),3),o.sample.status||o.sample.httpStatus?(a(),l("span",Lk,"HTTP "+d(o.sample.status||o.sample.httpStatus),1)):f("v-if",!0)]),n("td",$k,[t[65]||(t[65]=n("span",{class:"sr-only"},"Count ",-1)),h(d(o.count),1)]),n("td",null,[n("time",{datetime:o.last,title:e.absTime(o.last)},d(e.relTime(o.last)),9,_k)])],2))),128))])])])):e.logData?.groups?.length?(a(),l("div",Fk,[t[68]||(t[68]=h("No returned groups match these filters. ",-1)),n("button",{class:"btn btn-sm",onClick:t[15]||(t[15]=o=>{e.logView.search="",e.logView.severity=""})},"Reset filters")])):(a(),l("div",Uk,d(e.logData?.state==="empty"?"No warnings, errors or HTTP 5xx returned in this window.":"No central events available. Refresh logs or open Application history."),1))])])),e.logData?.telemetry?(a(),l("details",Bk,[t[70]||(t[70]=n("summary",null,[h("Telemetry details "),n("span",null,"90 seconds before last check")],-1)),e.logData.telemetry.missing?.length?(a(),l("p",zk,"Missing or stale: "+d(e.logData.telemetry.missing.join(", "))+". Expected one API, four streamers and three queues.",1)):(a(),l("p",Hk,"Expected API, streamer and queue heartbeats were present at the last check.")),e.logData.telemetry.partial?(a(),l("p",jk,"Telemetry coverage is partial; absence and drop totals may be incomplete.")):f("v-if",!0),n("p",null,"Collector: "+d(e.logData.telemetry.collector.state)+" \xB7 dropped events since collector start: "+d(e.logData.telemetry.collector.dropped??"unknown")+". Intentional filtering is excluded.",1),n("details",null,[t[69]||(t[69]=n("summary",null,"Application drop counters and last telemetry",-1)),n("ul",null,[(a(!0),l(V,null,Q(e.logData.telemetry.instances,(o,r)=>(a(),l("li",{key:r},d(o.service)+" \xB7 "+d(o.instance||"unknown instance")+" \xB7 "+d(o.dropped??"unknown")+" dropped since process start \xB7 last seen "+d(e.absTime(o.last)),1))),128))])])])):f("v-if",!0)],512),[[Z,!e.selectedLog]])],8,fw),[[Z,e.errorSource==="central"]]),e.logCopyStatus?(a(),l("p",Gk,d(e.logCopyStatus),1)):f("v-if",!0),P(n("section",{class:"history-source","aria-busy":e.redisLoading},[t[112]||(t[112]=n("h2",{class:"sr-only"},"Application history",-1)),e.redisCollecting!==!0?(a(),l("p",Kk,d(e.redisCollecting===!1?"Collection is off; retained history is not receiving new events.":"Collection status is unknown."),1)):f("v-if",!0),e.historySelected?(a(),l("div",Yk,[n("button",{type:"button",class:"log-back",onClick:t[16]||(t[16]=o=>e.closeHistory())},"\u2190 Back to history"),n("div",Jk,[n("div",null,[n("p",Xk,d(e.historySelected.module)+" \xB7 Application history",1),n("h2",Qk,d(e.historySelected.displayMessage),1)]),n("span",{class:R(["log-severity","log-severity-"+e.historySelected._bucket])},[h(d(e.historySelected._bucket),1),e.historySelected._status?(a(),l("span",Zk," \xB7 HTTP "+d(e.historySelected._status),1)):f("v-if",!0)],2)]),n("div",xk,[n("button",{type:"button","aria-pressed":e.historyView==="overview"&&(!e.detailTab[e.historySelected._key]||e.detailTab[e.historySelected._key]==="summary"),class:R({active:e.historyView==="overview"&&(!e.detailTab[e.historySelected._key]||e.detailTab[e.historySelected._key]==="summary")}),onClick:t[17]||(t[17]=o=>{e.historyView="overview",e.detailTab[e.historySelected._key]="summary"})},"Overview",10,e0),n("button",{type:"button","aria-pressed":e.historyView==="timeline",class:R({active:e.historyView==="timeline"}),onClick:t[18]||(t[18]=o=>e.showHistoryTimeline(o.currentTarget))},"Timeline",10,t0),n("button",{type:"button","aria-pressed":e.historyView==="overview"&&e.detailTab[e.historySelected._key]==="raw",class:R({active:e.historyView==="overview"&&e.detailTab[e.historySelected._key]==="raw"}),onClick:t[19]||(t[19]=o=>{e.historyView="overview",e.detailTab[e.historySelected._key]="raw"})},"Raw",10,n0),e.historySelected._stack?(a(),l("button",{key:0,type:"button","aria-pressed":e.historyView==="overview"&&e.detailTab[e.historySelected._key]==="stack",class:R({active:e.historyView==="overview"&&e.detailTab[e.historySelected._key]==="stack"}),onClick:t[20]||(t[20]=o=>{e.historyView="overview",e.detailTab[e.historySelected._key]="stack"})},"Stack",10,o0)):f("v-if",!0),e.historySelected.count>1?(a(),l("button",{key:1,type:"button","aria-pressed":e.historyView==="overview"&&e.detailTab[e.historySelected._key]==="related",class:R({active:e.historyView==="overview"&&e.detailTab[e.historySelected._key]==="related"}),onClick:t[21]||(t[21]=o=>{e.historyView="overview",e.detailTab[e.historySelected._key]="related"})},"Occurrences ("+d(e.historySelected.count)+")",11,s0)):f("v-if",!0)])])):f("v-if",!0),P(n("div",null,[P((a(),l("form",i0,[n("div",r0,[n("button",{type:"button",class:R(["seg-chip",{active:(e.query?.bucket||"")===""}]),"aria-pressed":(e.query?.bucket||"")==="",onClick:t[22]||(t[22]=o=>e.setBucket(""))},"All ",10,a0),n("button",{type:"button",class:R(["seg-chip",{active:(e.query?.bucket||"")==="error","is-empty":!e.stats?.severity?.error}]),"aria-pressed":(e.query?.bucket||"")==="error",onClick:t[23]||(t[23]=o=>e.setBucket("error"))},[...t[71]||(t[71]=[n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1),h("Error ",-1)])],10,l0),n("button",{type:"button",class:R(["seg-chip",{active:(e.query?.bucket||"")==="warn","is-empty":!e.stats?.severity?.warn}]),"aria-pressed":(e.query?.bucket||"")==="warn",onClick:t[24]||(t[24]=o=>e.setBucket("warn"))},[...t[72]||(t[72]=[n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1),h("Warning ",-1)])],10,d0),n("button",{type:"button",class:R(["seg-chip",{active:(e.query?.bucket||"")==="info","is-empty":!e.stats?.severity?.info}]),"aria-pressed":(e.query?.bucket||"")==="info",onClick:t[25]||(t[25]=o=>e.setBucket("info"))},[...t[73]||(t[73]=[n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1),h("Info ",-1)])],10,u0)]),n("div",c0,[t[74]||(t[74]=n("svg",{class:"ui-icon search-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)),P(n("input",p0,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]]),e.parsedFilterCount?(a(),l("span",f0,d(e.parsedFilterCount)+" filter"+d(e.parsedFilterCount>1?"s":""),1)):f("v-if",!0)]),n("details",m0,[t[80]||(t[80]=n("summary",null,"View options",-1)),n("div",h0,[n("div",g0,[t[76]||(t[76]=n("label",{for:"history-sort"},"Sort",-1)),P((a(),l("select",v0,[...t[75]||(t[75]=[n("option",{value:"recent"},"Most recent",-1),n("option",{value:"count"},"Most frequent",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.sort=o},value:e.query?.sort,form:null,options:{}}]])]),n("div",y0,[t[78]||(t[78]=n("label",{for:"history-merge",title:"Rows are always sectioned by severity. This merges repeated events inside each section."},"Merge",-1)),P((a(),l("select",b0,[...t[77]||(t[77]=[n("option",{value:""},"Don't merge",-1),n("option",{value:"code"},"Same error",-1),n("option",{value:"module"},"Same module",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.group=o},value:e.query?.group,form:null,options:{}}]])]),n("label",w0,[P(n("input",k0,null,512),[[s,{state:e.viewState,set:o=>{e.query.autoRefresh=o},value:e.query?.autoRefresh,form:null,options:{}}]]),t[79]||(t[79]=n("span",{class:"auto-refresh-label"},"Auto-refresh",-1))])])])])),[[i,e.viewState]]),e.redisLoading?(a(),l("p",C0,"Loading application history\u2026")):f("v-if",!0),!e.redisLoading&&!e.visible?.length&&e.available===!0?(a(),l("div",S0,"No matching entries in the loaded Redis history.")):f("v-if",!0),e.redisRedacted?(a(),l("p",E0,d(e.redisRedacted)+" invalid legacy records were omitted. Older valid records may still be available.",1)):f("v-if",!0),e.entries?.length||e.canLoadMore()?(a(),l("div",N0,[n("span",null,d(e.query?.group&&e.visible?.length!==e.entries?.length?e.fmt?.number(e.visible?.length)+(e.visible?.length===1?" group":" groups")+" from ":"")+d(e.fmt?.number(e.entries?.length))+" safe entries loaded \xB7 "+d(e.fmt?.number(e.redisNextOffset||e.entries?.length))+" of "+d(e.fmt?.number(e.total))+" stored records scanned",1),e.canLoadMore()?(a(),l("button",{key:0,class:"btn btn-sm",type:"button",onClick:t[26]||(t[26]=o=>e.loadMore()),disabled:e.redisLoading},"Load 250 older",8,R0)):f("v-if",!0)])):f("v-if",!0)],512),[[Z,!e.historySelected]]),e.visible?.length||e.historySelected?P((a(),l("div",{key:2,class:R(["errors-list",{"history-inspector":e.historySelected}])},[e.historySelected?f("v-if",!0):(a(),l("div",T0,[...t[81]||(t[81]=[ke('WhenSeverityModuleMessageTotalStatus',6)])])),(a(!0),l(V,null,Q(e.historySelected?[e.historySelected]:e.visible,(o,r)=>(a(),l(V,{key:o?._key},[!e.historySelected&&(r===0||e.visible[r-1]?._bucket!==o?._bucket)?(a(),l("div",P0,[n("span",{class:R(["sev-dot","sev-"+o?._bucket])},null,2),h(d(o?._bucket==="error"?"Error":o?._bucket==="warn"?"Warning":"Info"),1),n("span",D0,d(e.fmt?.number(e.visible.filter(u=>u?._bucket===o?._bucket).length)),1),r===0?(a(),l("span",A0,"By severity \xB7 "+d(e.query?.group==="code"?"repeats merged by error \xB7 ":e.query?.group==="module"?"repeats merged by module \xB7 ":"")+d(e.query?.sort==="count"?"most frequent first":"most recent first"),1)):f("v-if",!0)])):f("v-if",!0),n("div",{class:R(["errors-row",{open:e.expanded[o?._key]}])},[P(n("button",{type:"button",class:"errors-row-main","data-history-key":o?._key,"aria-expanded":!!e.expanded[o?._key],"aria-controls":"history-detail-"+r,onClick:u=>e.toggle(o,u.currentTarget)},[n("span",O0,[n("span",M0,d(e.relTime(o?.ts)),1),n("span",V0,d(e.absTimeShort(o?.ts)),1)]),n("span",q0,[n("span",{class:R(["sev-dot","sev-"+o?._bucket])},null,2),n("span",L0,d(o?._bucket==="error"?"Error":o?._bucket==="warn"?"Warning":"Info"),1)]),n("span",$0,[n("span",_0,d(o?.module),1)]),n("span",F0,[n("strong",U0,d(o?.displayMessage),1),o?.displayContext&&o?.displayContext!==o?.displayMessage?(a(),l("span",B0,d(o?.displayContext),1)):f("v-if",!0),o?._detail?(a(),l("span",z0,d(o?._detail),1)):f("v-if",!0),o?._url?(a(),l("span",{key:2,class:"msg-url",title:o?._url},d(o?._url),9,H0)):f("v-if",!0)]),n("span",j0,[o?.count>1?(a(),l("span",G0,"\xD7"+d(o?.count),1)):f("v-if",!0),o?.count===1?(a(),l("span",W0,"\xD71")):f("v-if",!0)]),n("span",K0,[o?._status?(a(),l("span",{key:0,class:R(["status-pill",String(o?._status).match(/^[23]/)?"status-neutral":"status-"+o?._bucket]),title:String(o?._status).match(/^2/)&&o?._bucket==="warn"?"Client closed the connection":null},d(String(o?._status).match(/^2/)&&o?._bucket==="warn"?"\u2014":o?._status),11,Y0)):f("v-if",!0),o?._status?f("v-if",!0):(a(),l("span",J0,"\u2014"))])],8,I0),[[Z,!e.historySelected]]),e.expanded[o?._key]?(a(),l("div",{key:0,class:"errors-row-detail",id:"history-detail-"+r},[n("div",Q0,[n("div",Z0,[!e.detailTab[o?._key]||e.detailTab[o?._key]==="summary"?(a(),l("div",x0,[t[87]||(t[87]=n("h3",null,"What happened",-1)),o.raw?.[0]?.route?(a(),l("p",e2,[n("code",null,d(o.raw[0].method)+" "+d(o.raw[0].route),1)])):f("v-if",!0),o.raw?.[0]?.requestPath?(a(),l("section",t2,[t[84]||(t[84]=n("h3",null,"Reproduce this request",-1)),n("dl",null,[n("div",null,[t[82]||(t[82]=n("dt",null,"Anonymous repository ID",-1)),n("dd",null,[n("code",null,d(o.raw[0].repoId),1)])]),n("div",null,[t[83]||(t[83]=n("dt",null,"Request path \xB7 query excluded",-1)),n("dd",null,[n("code",null,d(o.raw[0].requestPath),1)])])]),n("button",{type:"button",class:"btn btn-sm",onClick:u=>e.copyLogValue(o.raw[0].requestPath)},"Copy request path",8,n2)])):f("v-if",!0),o.raw?.[0]?.errorType?(a(),l("p",o2,[h(d(o.raw[0].errorType),1),o.raw[0].causeType?(a(),l("span",s2," \xB7 caused by "+d(o.raw[0].causeType),1)):f("v-if",!0)])):f("v-if",!0),n("p",i2,d(e.logExplanation(o.raw?.[0]||{})),1),n("p",r2,d(e.logEvidence(o.raw?.[0]||{})),1),n("details",a2,[t[85]||(t[85]=n("summary",null,"Technical fields",-1)),t[86]||(t[86]=h()),!e.detailTab[o?._key]||e.detailTab[o?._key]==="summary"?(a(),l("dl",l2,[(a(!0),l(V,null,Q(e.historyDetailFields(o),([u,p])=>(a(),l("div",{key:u},[n("dt",null,d(u),1),n("dd",null,[e.isLogIdentifier(u,p)?(a(),l(V,{key:0},[n("details",d2,[n("summary",null,d(e.compactLogValue(p)),1),n("span",null,d(p),1)]),n("button",{type:"button",class:"log-copy-value",onClick:c=>e.copyLogValue(p)},"Copy full "+d(u),9,u2)],64)):(a(),l(V,{key:1},[h(d(e.logFieldText(p)),1)],64))])]))),128))])):f("v-if",!0)])])):f("v-if",!0),e.detailTab[o?._key]==="raw"?(a(),l("pre",c2,d(o?._rawJson),1)):f("v-if",!0),e.detailTab[o?._key]==="stack"?(a(),l("pre",p2,d(o?._stack),1)):f("v-if",!0),e.detailTab[o?._key]==="related"?(a(),l("section",f2,[t[89]||(t[89]=n("h3",null,"Stored occurrences",-1)),n("p",m2,d(o._related.length)+" matching records in the loaded Redis snapshot. Most recent first.",1),n("ol",h2,[(a(!0),l(V,null,Q(e.historyOccurrences(o),(u,p)=>(a(),l("li",{key:p},[n("details",g2,[n("summary",null,[n("span",v2,[n("time",{datetime:u.ts},d(e.occurrenceTime(u.ts)),9,y2),n("span",{class:R(["log-severity","log-severity-"+u._bucket])},d(u._status?"HTTP "+u._status:u._bucket),3)]),n("span",b2,[h(d(u.raw?.[0]?.service||"Application")+" \xB7 "+d(u.module||"Unknown module"),1),u.raw?.[0]?.route?(a(),l("span",w2,[h(" \xB7 "+d(u.raw[0].method)+" ",1),n("code",null,d(u.raw[0].requestPath||u.raw[0].route),1)])):(a(),l("span",k2," \xB7 Route not captured"))])]),u.raw?.[0]?.errorType?(a(),l("p",C2,d(u.raw[0].errorType),1)):f("v-if",!0),u._stack?(a(),l("pre",S2,d(u._stack),1)):(a(),l("p",E2,"Exception frames were not captured.")),u.raw?.[0]?.route?f("v-if",!0):(a(),l("p",N2,"Request route was not captured.")),n("details",R2,[t[88]||(t[88]=n("summary",null,"Stored record",-1)),n("pre",null,d(u._rawJson),1)])])]))),128))])])):f("v-if",!0),n("div",T2,[e.logTraceId(o,"requestId")?(a(),l("button",{key:0,class:"btn btn-sm",type:"button",onClick:u=>e.lookupTrace("requestId",e.logTraceId(o,"requestId"),u.currentTarget,o)},"Request timeline \u2192",8,P2)):f("v-if",!0),e.logTraceId(o,"jobId")?(a(),l("button",{key:1,class:"btn btn-sm",type:"button",onClick:u=>e.lookupTrace("jobId",e.logTraceId(o,"jobId"),u.currentTarget,o)},"Job timeline \u2192",8,D2)):f("v-if",!0),o?._url?(a(),l("button",{key:2,class:"btn btn-sm",type:"button",title:"Copy a curl that reproduces the request",onClick:u=>e.copyCurl(o)},[...t[90]||(t[90]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),h(" Copy curl",-1)])],8,A2)):f("v-if",!0),n("button",{class:"btn btn-sm",type:"button",onClick:u=>e.copyJson(o)},[...t[91]||(t[91]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-clipboard"})],-1),h(" Copy JSON",-1)])],8,I2),e.copyHint?(a(),l("span",O2,d(e.copyHint),1)):f("v-if",!0)])]),n("aside",M2,[n("div",V2,[t[92]||(t[92]=n("div",{class:"aside-label"},"First seen",-1)),n("div",{class:"aside-value",title:e.absTime(o?._firstSeen)},d(e.relTime(o?._firstSeen)),9,q2)]),n("div",L2,[t[93]||(t[93]=n("div",{class:"aside-label"},"Last seen",-1)),n("div",{class:"aside-value",title:e.absTime(o?.ts)},d(e.relTime(o?.ts)),9,$2)]),n("div",_2,[t[94]||(t[94]=n("div",{class:"aside-label"},"Occurrences",-1)),n("div",F2,[h(d(o?.count),1),o?._lastHourCount?(a(),l("span",U2," \xB7 "+d(o?._lastHourCount)+" this hour",1)):f("v-if",!0)])]),o?._repoId?(a(),l("div",B2,[t[96]||(t[96]=n("div",{class:"aside-label"},"Repository",-1)),n("a",{class:"aside-value",href:e.safeUrl("/r/"+o?._repoId)},d(e.isLogIdentifier("repoId",o?._repoId)?e.compactLogValue(o?._repoId):o?._repoId),9,z2),e.isLogIdentifier("repoId",o?._repoId)?(a(),l("details",H2,[t[95]||(t[95]=n("summary",null,"Full repository ID",-1)),h(d(o?._repoId),1)])):f("v-if",!0),n("button",{type:"button",class:"log-copy-value",onClick:u=>e.copyLogValue(o?._repoId)},"Copy full repository ID",8,j2)])):f("v-if",!0),o?._url?(a(),l("div",G2,[t[97]||(t[97]=n("div",{class:"aside-label"},"URL",-1)),n("div",W2,d(o?._url),1)])):f("v-if",!0)])])],8,X0)):f("v-if",!0)],2)],64))),128))],2)),[[Z,e.historyView!=="timeline"||!e.historySelected]]):f("v-if",!0),P(n("details",K2,[t[110]||(t[110]=n("summary",null,"History settings, export and diagnostics",-1)),n("div",Y2,[n("div",J2,[n("button",{class:"btn btn-sm",type:"button",onClick:t[27]||(t[27]=o=>e.exportCsv())},"Export Redis CSV"),n("button",{class:"btn btn-sm btn-outline-danger",type:"button",onClick:t[28]||(t[28]=o=>e.clearAll())},"Clear Redis history")])]),n("p",X2,d(e.redisCollecting===!1?"Collection is OFF (LOG_REDIS_MIRROR=off); retained history is not receiving new events.":e.redisCollecting===!0?"The application is configured to mirror warnings and errors.":"Collection status is unknown."),1),t[111]||(t[111]=n("p",{class:"log-coverage"},"Redis mirror: hourly counters cover 24 hours; stored rows are a rotating snapshot and may cover a shorter or longer period. Counts are not combined with central logs.",-1)),e.redisStatsState!=="ready"||e.available!==!0?(a(),l("p",Q2,"Redis counters are "+d(e.redisStatsState==="loading"?"loading":"unavailable")+".",1)):f("v-if",!0),n("details",Z2,[t[108]||(t[108]=n("summary",null,"24-hour counters and volume",-1)),t[109]||(t[109]=h()),e.redisStatsState==="ready"&&e.available===!0?(a(),l("section",x2,[n("div",eC,[t[98]||(t[98]=n("div",{class:"kpi-label"},"Occurrences \xB7 24h",-1)),n("div",tC,d(e.fmt?.number(e.stats?.last24h??0)),1),n("div",{class:R(["kpi-sub",{up:e.stats?.delta>0,down:e.stats?.delta<0}])},[e.stats?.prev24h>=20?(a(),l("span",nC,d((e.stats?.last24h??0)-(e.stats?.prev24h??0)>=0?"+":"")+d(Math.round(((e.stats?.last24h??0)-(e.stats?.prev24h??0))/e.stats.prev24h*100))+"% vs yesterday",1)):e.stats?.prev24h!==void 0?(a(),l("span",oC,d(e.fmt?.number(e.stats?.prev24h??0))+" in prior 24h",1)):f("v-if",!0),e.stats?.prev24h?f("v-if",!0):(a(),l("span",sC,"no prior baseline"))],2)]),n("div",iC,[t[99]||(t[99]=n("div",{class:"kpi-label"},"Error",-1)),n("div",rC,d(e.fmt?.number(e.stats?.severity?.error??0)),1),n("div",aC,"5xx \xB7 "+d(e.stats?.unique?.error)+" unique",1)]),n("div",lC,[t[100]||(t[100]=n("div",{class:"kpi-label"},"Warning",-1)),n("div",dC,d(e.fmt?.number(e.stats?.severity?.warn??0)),1),n("div",uC,"4xx, aborted \xB7 "+d(e.stats?.unique?.warn)+" unique",1)]),n("div",cC,[t[101]||(t[101]=n("div",{class:"kpi-label"},"Info",-1)),n("div",pC,d(e.fmt?.number(e.stats?.severity?.info??0)),1),n("div",fC,"Auth, 404 \xB7 "+d(e.stats?.unique?.info)+" unique",1)]),n("div",{class:R(["kpi-card",{"kpi-error":e.stats?.dropped>0}])},[t[102]||(t[102]=n("div",{class:"kpi-label"},"Entries stored",-1)),n("div",mC,d(e.fmt?.number(e.total)),1),n("div",hC,[h(" rotating history \xB7 cap "+d(e.fmt?.number(e.cap))+" ",1),e.stats?.dropped>0?(a(),l("span",gC," \xB7 "+d(e.stats?.dropped)+" dropped",1)):f("v-if",!0)])],2)])):f("v-if",!0),e.redisStatsState==="ready"&&e.available===!0?(a(),l("section",vC,[n("div",yC,[t[106]||(t[106]=n("span",{class:"volume-title"},"Volume \xB7 24h \xB7 1h buckets",-1)),n("span",bC,[e.stats?.severity?.error?(a(),l("span",wC,[...t[103]||(t[103]=[n("span",{class:"dot dot-error"},null,-1),h("Error",-1)])])):f("v-if",!0),e.stats?.severity?.warn?(a(),l("span",kC,[...t[104]||(t[104]=[n("span",{class:"dot dot-warn"},null,-1),h("Warning",-1)])])):f("v-if",!0),e.stats?.severity?.info?(a(),l("span",CC,[...t[105]||(t[105]=[n("span",{class:"dot dot-info"},null,-1),h("Info",-1)])])):f("v-if",!0)])]),n("div",SC,[(a(!0),l(V,null,Q(e.stats?.buckets,(o,r)=>(a(),l("div",{class:"volume-bar",key:r,title:e.bucketTitle(o)},[n("span",{class:"seg seg-error",style:Ae({height:e.barPx(o,"error")+"px"})},null,4),n("span",{class:"seg seg-warn",style:Ae({height:e.barPx(o,"warn")+"px"})},null,4),n("span",{class:"seg seg-info",style:Ae({height:e.barPx(o,"info")+"px"})},null,4)],8,EC))),128))]),t[107]||(t[107]=n("div",{class:"volume-axis","aria-hidden":"true"},[n("span",null,"24h ago"),n("span",null,"12h ago"),n("span",null,"now")],-1))])):f("v-if",!0)])],512),[[Z,!e.historySelected]])],8,Wk),[[Z,e.errorSource==="history"]]),e.errorSource==="history"&&e.historyView==="timeline"?(a(),l("div",NC,[e.traceSelection?f("v-if",!0):(a(),l("div",RC,"No request or job ID was recorded for this entry.")),e.traceSelection?(a(),l("section",{key:1,class:"log-timeline","aria-labelledby":"log-timeline-title","aria-busy":e.traceLoading},[n("div",PC,[n("h3",DC,d(e.traceSelection.kind==="jobId"?"Job":"Request")+" timeline",1),n("button",{type:"button",class:"btn btn-sm",onClick:t[29]||(t[29]=o=>e.closeTrace())},"Close timeline")]),e.traceSelection.context?(a(),l("p",AC,d(e.traceSelection.context.event)+" \xB7 "+d(e.traceSelection.context.service),1)):f("v-if",!0),e.traceLoading||e.trace?.state!=="ready"?(a(),l("p",IC,d(e.traceLoading?"Loading related events\u2026":e.trace?.state==="empty"?"No related events returned in this window.":e.logStateText(e.trace?.state)),1)):f("v-if",!0),e.trace&&!e.traceLoading?(a(),l("p",OC,d(e.trace.events?.length||0)+" events returned \xB7 "+d(e.absTime(e.trace.start))+" \u2013 "+d(e.absTime(e.trace.end))+" \xB7 200-event cap. All services and releases.",1)):f("v-if",!0),e.trace?.events?.length?(a(),l("ol",MC,[(a(!0),l(V,null,Q(e.trace.events,(o,r)=>(a(),l("li",{key:r},[n("time",{datetime:o.timestamp,title:o.timestamp},d(e.absTimeShort(o.timestamp)),9,VC),n("div",qC,[n("div",LC,[n("strong",null,d(o.errorCode||o.errorType||o.event),1),n("span",{class:R(["log-severity","log-severity-"+e.logSeverity(o)])},d(o.status||o.httpStatus?"HTTP "+(o.status||o.httpStatus):o.severity||"Event"),3)]),n("p",null,[h(d(o.service),1),o.module?(a(),l("span",$C," / "+d(o.module),1)):f("v-if",!0),o.ms!==void 0?(a(),l("span",_C," \xB7 "+d(o.ms)+" ms",1)):f("v-if",!0),o.attempt!==void 0?(a(),l("span",FC," \xB7 attempt "+d(o.attempt),1)):f("v-if",!0)]),o.route?(a(),l("p",UC,[n("code",null,d(o.method)+" "+d(o.requestPath||o.route),1)])):f("v-if",!0),o.errorStack||o.causeStack?(a(),l("details",BC,[n("summary",null,[t[113]||(t[113]=h("Exception frames",-1)),o.errorType?(a(),l("span",zC," \xB7 "+d(o.errorType),1)):f("v-if",!0)]),o.errorStack?(a(),l("pre",HC,d(o.errorStack),1)):f("v-if",!0),o.causeType?(a(),l("p",jC,"Caused by "+d(o.causeType),1)):f("v-if",!0),o.causeStack?(a(),l("pre",GC,d(o.causeStack),1)):f("v-if",!0)])):f("v-if",!0),n("details",WC,[t[114]||(t[114]=n("summary",null,"Event fields",-1)),n("pre",null,d(JSON.stringify(o,null,2)),1),n("button",{type:"button",class:"btn btn-sm",onClick:u=>e.copyLogValue(JSON.stringify(o,null,2))},"Copy JSON",8,KC)])])]))),128))])):f("v-if",!0),n("details",YC,[t[115]||(t[115]=n("summary",null,"Correlation ID and query scope",-1)),n("code",null,d(e.traceSelection.id),1),n("button",{type:"button",class:"log-copy-value",onClick:t[30]||(t[30]=o=>e.copyLogValue(e.traceSelection.id))},"Copy full ID"),t[116]||(t[116]=n("p",null,"Earliest matching events in the selected window. Service and release filters do not narrow this timeline.",-1))]),e.trace?.grafanaUrl?(a(),l("a",{key:4,href:e.safeUrl(e.trace.grafanaUrl),target:"_blank",rel:"noopener noreferrer"},"Open in Grafana",8,JC)):f("v-if",!0)],8,TC)):f("v-if",!0)])):f("v-if",!0)])}var XC={class:"container paper-page admin-page overview-page"},QC={key:0,class:"admin-empty"},ZC={key:1,class:"alert alert-danger",style:{margin:"12px 0"}},xC={class:"ov-views",role:"tablist","aria-label":"Overview sections"},eS=["aria-selected","onClick"],tS={key:2},nS={key:0,class:"ov-health",role:"status"},oS={class:"ov-kpi-row"},sS={class:"ov-kpi-card"},iS={class:"ov-kpi-value"},rS={class:"ov-kpi-sub"},aS={class:"ov-kpi-card"},lS={class:"ov-kpi-sub"},dS={class:"ov-kpi-card"},uS={class:"ov-kpi-sub"},cS={class:"ov-kpi-card"},pS={class:"ov-kpi-sub"},fS={class:"ov-kpi-card"},mS={class:"ov-kpi-value"},hS={class:"ov-kpi-sub"},gS={class:"ov-daily-row"},vS={class:"ov-daily-card"},yS={class:"ov-daily-value"},bS={class:"ov-daily-card"},wS={class:"ov-daily-value"},kS={class:"ov-daily-sub"},CS={class:"ov-daily-card"},SS={class:"ov-daily-value"},ES={class:"ov-chart-card"},NS={class:"ov-chart-head"},RS={class:"ov-chart-legends"},TS={class:"ov-chart-legend"},PS={key:0,class:"ov-legend-missing"},DS={key:0,class:"ov-spark-bars ov-has-axis"},AS={class:"ov-yaxis","aria-hidden":"true"},IS=["data-tip","aria-label"],OS={key:1,class:"ov-spark-x"},MS={class:"ov-chart-card"},VS={class:"ov-chart-head"},qS={class:"ov-chart-legends"},LS={class:"ov-chart-legend"},$S={key:0,class:"ov-legend-missing"},_S={key:0,class:"ov-spark-bars ov-has-axis"},FS={class:"ov-yaxis","aria-hidden":"true"},US=["data-tip","aria-label"],BS={key:1,class:"ov-spark-x"},zS={key:0,class:"ov-chart-card"},HS={class:"ov-chart-head"},jS={class:"ov-chart-legends"},GS={class:"ov-chart-legend"},WS={key:0,class:"ov-legend-missing"},KS={key:0,class:"ov-spark-bars ov-spark-step ov-has-axis"},YS={class:"ov-yaxis","aria-hidden":"true"},JS=["viewBox","aria-label"],XS=["d"],QS=["d"],ZS={key:1,class:"ov-spark-x"},xS={class:"ov-chart-card"},eE={class:"ov-chart-head"},tE={class:"ov-chart-legends"},nE={class:"ov-chart-legend"},oE={key:0,class:"ov-legend-missing"},sE={key:0,class:"ov-spark-bars ov-has-axis"},iE={class:"ov-yaxis","aria-hidden":"true"},rE=["data-tip","aria-label"],aE={key:1,class:"ov-spark-x"},lE={class:"ov-triple-row"},dE={class:"ov-panel-card"},uE={class:"ov-panel-head"},cE={class:"ov-panel-meta"},pE={class:"ov-stacked-bar"},fE={class:"ov-bar-legend"},mE={href:"/admin/repositories",class:"ov-legend-item"},hE={class:"ov-legend-n"},gE={href:"/admin/repositories",class:"ov-legend-item"},vE={class:"ov-legend-n"},yE={href:"/admin/repositories",class:"ov-legend-item"},bE={class:"ov-legend-n"},wE={href:"/admin/repositories",class:"ov-legend-item"},kE={class:"ov-legend-n"},CE={href:"/admin/repositories",class:"ov-legend-item"},SE={class:"ov-legend-n"},EE={class:"ov-panel-card"},NE={class:"ov-panel-head"},RE={class:"ov-panel-meta"},TE={class:"ov-error-bars"},PE={class:"ov-ebar-row"},DE={class:"ov-ebar-track"},AE={class:"ov-ebar-n"},IE={class:"ov-ebar-row"},OE={class:"ov-ebar-track"},ME={class:"ov-ebar-n"},VE={key:0,class:"ov-ehours",role:"img","aria-label":"Errors per hour over the last 24 hours"},qE={class:"ov-ehours-legend"},LE={class:"ov-ehours-note"},$E={class:"ov-ehours-bars"},_E=["title"],FE={key:0,class:"ov-ehours-zero"},UE={class:"ov-ebar-note"},BE={key:0,class:"ov-panel-foot"},zE={href:"/admin/errors"},HE={class:"ov-panel-card"},jE={class:"ov-routes-table"},GE={class:"ov-route-row",href:"/admin/queues"},WE={class:"ov-route-n"},KE={class:"ov-route-n"},YE={class:"ov-route-row",href:"/admin/queues"},JE={class:"ov-route-n"},XE={class:"ov-route-n"},QE={class:"ov-route-row",href:"/admin/queues"},ZE={class:"ov-route-n"},xE={class:"ov-route-n"},eN={class:"ov-services-card"},tN={class:"ov-services-head"},nN={class:"ov-panel-meta"},oN={class:"ov-services-grid"},sN={class:"ov-svc"},iN={class:"ov-svc-info"},rN={class:"ov-svc-meta"},aN={class:"ov-svc"},lN={class:"ov-svc-info"},dN={key:0,class:"ov-svc-meta"},uN={key:1,class:"ov-svc-meta"},cN={class:"ov-svc"},pN={class:"ov-svc-info"},fN={key:0,class:"ov-svc-meta"},mN={key:1,class:"ov-svc-meta"},hN={class:"ov-svc"},gN={class:"ov-svc-info"},vN={key:0,class:"ov-svc-meta"},yN={key:1,class:"ov-svc-meta"},bN={class:"ov-svc"},wN=["title"],kN={class:"ov-svc-info"},CN={class:"ov-svc-meta"},SN={class:"ov-panel-card ov-cache","aria-labelledby":"cache-heading"},EN={class:"ov-panel-head ov-performance-head"},NN={class:"ov-performance-window"},RN={key:0,class:"ov-performance-message ov-performance-warning",role:"alert"},TN={key:1,class:"ov-performance-empty",role:"status"},PN={key:0,class:"ov-performance-note"},DN={key:1,class:"ov-performance-note"},AN={key:2,class:"ov-performance-message ov-performance-warning",role:"status"},IN={key:3,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Cache storage budgets"},ON={class:"ov-metrics-table"},MN={scope:"row",class:"ov-event-name"},VN=["title"],qN={key:0,class:"ov-metric-bad-text"},LN={key:1,class:"budget-bar","aria-hidden":"true"},$N={class:"num"},_N={class:"num"},FN={class:"num"},UN={class:"num"},BN={key:4,class:"ov-cache-rates"},zN={key:5,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Cache events and processing durations"},HN={class:"ov-metrics-table"},jN={scope:"row",class:"ov-event-name"},GN={class:"ov-event-traffic"},WN={class:"num"},KN={class:"num"},YN={key:6,class:"ov-performance-empty",role:"status"},JN={class:"ov-performance-note"},XN={class:"ov-panel-card ov-performance","aria-labelledby":"performance-heading"},QN={class:"ov-panel-head ov-performance-head"},ZN={class:"ov-performance-window"},xN={key:0,class:"ov-performance-message ov-performance-warning",role:"alert"},eR={key:1,class:"ov-performance-empty",role:"status"},tR={key:2},nR={id:"performance-routes",role:"region","aria-label":"Routes"},oR={key:0,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Route latency metrics, scroll for more columns"},sR={class:"ov-metrics-table"},iR={scope:"row",class:"ov-metric-name"},rR={class:"num"},aR={class:"num"},lR={class:"num"},dR={class:"num"},uR={class:"num"},cR={key:1,class:"ov-performance-empty"},pR={id:"performance-processes",role:"region","aria-label":"Processes"},fR={key:0,class:"ov-performance-message ov-performance-warning",role:"status"},mR={key:1,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Process resource metrics, scroll for more columns"},hR={class:"ov-metrics-table"},gR={scope:"row",class:"ov-metric-name"},vR={key:0,class:"ov-metric-warn"},yR={class:"num"},bR={class:"num"},wR={class:"num"},kR={class:"num"},CR={class:"num"},SR={class:"num"},ER={class:"num"},NR={class:"num"},RR={id:"performance-stages",role:"region","aria-label":"Work stages"},TR={key:0,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Work stage metrics, scroll for more columns"},PR={class:"ov-metrics-table"},DR={scope:"row",class:"ov-metric-name"},AR={class:"num"},IR={class:"num"},OR={class:"num"},MR={key:1,class:"ov-performance-empty"};function lp(e,t){return a(),l("div",XC,[t[95]||(t[95]=ke('
Admin \xA0/\xA0 Overview

Overview

Live \xB7 refreshes every 30s
',2)),e.loading?(a(),l("div",QC,"Loading overview\u2026")):f("v-if",!0),e.error?(a(),l("div",ZC,[t[8]||(t[8]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),h(" "+d(e.error),1)])):f("v-if",!0),n("div",xC,[(a(),l(V,null,Q([{id:"summary",label:"Summary"},{id:"performance",label:"Performance"},{id:"cache",label:"Cache"}],s=>n("button",{type:"button",role:"tab",key:s.id,"aria-selected":e.ovView===s.id?"true":"false",class:R({active:e.ovView===s.id}),onClick:i=>e.setOvView(s.id)},d(s.label),11,eS)),64))]),e.data?P((a(),l("div",tS,[e.data?.system?.memPercent>90||e.data?.system?.diskPercent>90?(a(),l("div",nS,[t[10]||(t[10]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,[t[9]||(t[9]=n("b",null,"Server needs attention.",-1)),h(" "+d(e.healthAlert()),1)])])):f("v-if",!0),f(" \u2500\u2500 Top KPI row \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",oS,[n("div",sS,[t[11]||(t[11]=n("div",{class:"ov-kpi-label"},"Live repositories",-1)),n("div",iS,d(e.humanNum((e.data?.repos?.statusBreakdown||[]).filter(s=>s._id!=="removed"&&s._id!=="expired").reduce((s,i)=>s+(i.count||0),0))),1),n("div",rS,d(e.humanNum(((e.data?.repos?.statusBreakdown||[]).find(s=>s._id==="removed")||{}).count||0))+" removed \xB7 "+d(e.humanNum(e.data?.repos?.total))+" total",1)]),n("div",aS,[t[12]||(t[12]=n("div",{class:"ov-kpi-label"},"CPU",-1)),n("div",{class:R(["ov-kpi-value",{"ov-val-warn":e.data?.system?.cpuPercent>=75}])},d(e.data?.system?.cpuPercent)+"%",3),n("div",{class:R(["ov-meter",{warn:e.data?.system?.cpuPercent>=75,crit:e.data?.system?.cpuPercent>90}])},[n("span",{style:Ae({width:Math.min(100,e.data?.system?.cpuPercent||0)+"%"})},null,4)],2),n("div",lS,[e.data?.system?.cpuPercent>=75?(a(),l("b",{key:0,class:R(["ov-flag",{critical:e.data?.system?.cpuPercent>90}])},d(e.data?.system?.cpuPercent>90?"Critical":"High")+" \xB7 ",3)):f("v-if",!0),h(d(e.data?.system?.cpuCount)+" cores \xB7 load "+d(e.data?.system?.loadAvg?.[0]?.toFixed(1)),1)])]),n("div",dS,[t[13]||(t[13]=n("div",{class:"ov-kpi-label"},"Memory",-1)),n("div",{class:R(["ov-kpi-value",{"ov-val-warn":e.data?.system?.memPercent>=75}])},d(e.data?.system?.memPercent)+"%",3),n("div",{class:R(["ov-meter",{warn:e.data?.system?.memPercent>=75,crit:e.data?.system?.memPercent>90}])},[n("span",{style:Ae({width:Math.min(100,e.data?.system?.memPercent||0)+"%"})},null,4)],2),n("div",uS,[e.data?.system?.memPercent>=75?(a(),l("b",{key:0,class:R(["ov-flag",{critical:e.data?.system?.memPercent>90}])},d(e.data?.system?.memPercent>90?"Critical":"High")+" \xB7 ",3)):f("v-if",!0),h(d(e.humanBytes(e.data?.system?.memUsed).replace(/\s*GB$/,""))+" / "+d(e.humanBytes(e.data?.system?.memTotal)),1)])]),n("div",cS,[t[14]||(t[14]=n("div",{class:"ov-kpi-label"},"Disk",-1)),n("div",{class:R(["ov-kpi-value",{"ov-val-warn":e.data?.system?.diskPercent>=75}])},d(e.data?.system?.diskPercent)+"%",3),n("div",{class:R(["ov-meter",{warn:e.data?.system?.diskPercent>=75,crit:e.data?.system?.diskPercent>90}])},[n("span",{style:Ae({width:Math.min(100,e.data?.system?.diskPercent||0)+"%"})},null,4)],2),n("div",pS,[e.data?.system?.diskPercent>=75?(a(),l("b",{key:0,class:R(["ov-flag",{critical:e.data?.system?.diskPercent>90}])},d(e.data?.system?.diskPercent>90?"Critical":"High")+" \xB7 ",3)):f("v-if",!0),h(d(e.humanBytes(e.data?.system?.diskUsed).replace(/\s*GB$/,""))+" / "+d(e.humanBytes(e.data?.system?.diskTotal)),1),e.data?.system?.diskMount&&e.data.system.diskMount!=="/"?(a(),l(V,{key:1},[h(" \xB7 "+d(e.data?.system?.diskMount),1)],64)):f("v-if",!0)])]),n("div",fS,[t[15]||(t[15]=n("div",{class:"ov-kpi-label"},"Uptime",-1)),n("div",mS,d(e.humanDuration(e.data?.system?.uptime)),1),n("div",hS,d(e.data?.system?.nodeVersion)+" \xB7 "+d(e.data?.system?.platform),1)])]),f(" \u2500\u2500 Daily activity highlights \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",gS,[n("div",vS,[t[16]||(t[16]=n("div",{class:"ov-daily-label"},"New repos today",-1)),n("div",yS,d(e.fmt?.number(e.data?.daily?.today?.repositories||0)),1),t[17]||(t[17]=n("div",{class:"ov-daily-sub"},"so far today",-1))]),n("div",bS,[t[18]||(t[18]=n("div",{class:"ov-daily-label"},"New users today",-1)),n("div",wS,d(e.fmt?.number(e.data?.daily?.today?.users||0)),1),n("div",kS,d(e.fmt?.number(e.data?.users?.total))+" total \xB7 +"+d(e.fmt?.number(e.usersGained()))+" in 30 days",1)]),n("div",CS,[t[19]||(t[19]=n("div",{class:"ov-daily-label"},"Page views today",-1)),n("div",SS,d(e.fmt?.number(e.data?.daily?.today?.pageViews||0)),1),t[20]||(t[20]=n("div",{class:"ov-daily-sub"},"so far today",-1))])]),f(" \u2500\u2500 Daily charts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",{class:R(["ov-chart-row",{"is-three":e.usersTiny()}])},[n("div",ES,[n("div",NS,[t[23]||(t[23]=n("span",{class:"ov-chart-title"},"Daily page views \xB7 30d",-1)),n("span",RS,[n("span",TS,[t[21]||(t[21]=n("span",{class:"ov-dot-legend ov-dot-accent"},null,-1)),h("views/day \xB7 peak "+d(e.fmt?.number(e.historyMax("dailyPageViews"))),1)]),e.historyHasMissing()?(a(),l("span",PS,[...t[22]||(t[22]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),h("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",DS,[n("div",AS,[n("span",null,d(e.fmt?.number(e.axisMax("dailyPageViews"))),1),n("span",null,d(e.fmt?.number(e.axisMax("dailyPageViews")/2)),1),t[24]||(t[24]=n("span",null,"0",-1))]),(a(!0),l(V,null,Q(e.data?.history,(s,i)=>(a(),l("div",{class:R(["ov-spark-col has-tip",{"is-missing":s?._empty}]),key:i,"data-tip":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyPageViews)+(s?.dailyPageViews===1?" view":" views"),"aria-label":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyPageViews)+(s?.dailyPageViews===1?" view":" views")},[n("span",{class:"ov-spark-fill",style:Ae({height:e.historyBarH(s,"dailyPageViews")+"px"})},null,4)],10,IS))),128))])):f("v-if",!0),e.data?.history?.length?(a(),l("div",OS,[n("span",null,d(e.historyLabel(e.data?.history[0])),1),n("span",null,d(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,d(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),n("div",MS,[n("div",VS,[t[27]||(t[27]=n("span",{class:"ov-chart-title"},"New repos \xB7 30d",-1)),n("span",qS,[n("span",LS,[t[25]||(t[25]=n("span",{class:"ov-dot-legend ov-dot-ok-fill"},null,-1)),h("repos/day \xB7 peak "+d(e.fmt?.number(e.historyMax("dailyRepositories"))),1)]),e.historyHasMissing()?(a(),l("span",$S,[...t[26]||(t[26]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),h("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",_S,[n("div",FS,[n("span",null,d(e.fmt?.number(e.axisMax("dailyRepositories"))),1),n("span",null,d(e.fmt?.number(e.axisMax("dailyRepositories")/2)),1),t[28]||(t[28]=n("span",null,"0",-1))]),(a(!0),l(V,null,Q(e.data?.history,(s,i)=>(a(),l("div",{class:R(["ov-spark-col has-tip",{"is-missing":s?._empty}]),key:i,"data-tip":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyRepositories)+(s?.dailyRepositories===1?" repo":" repos"),"aria-label":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyRepositories)+(s?.dailyRepositories===1?" repo":" repos")},[n("span",{class:"ov-spark-fill ov-spark-fill-alt",style:Ae({height:e.historyBarH(s,"dailyRepositories")+"px"})},null,4)],10,US))),128))])):f("v-if",!0),e.data?.history?.length?(a(),l("div",BS,[n("span",null,d(e.historyLabel(e.data?.history[0])),1),n("span",null,d(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,d(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),e.usersTiny()?f("v-if",!0):(a(),l("div",zS,[n("div",HS,[t[31]||(t[31]=n("span",{class:"ov-chart-title"},"Users \xB7 30d",-1)),n("span",jS,[n("span",GS,[t[29]||(t[29]=n("span",{class:"ov-dot-legend ov-dot-user-fill"},null,-1)),h("total users \xB7 "+d(e.fmt?.number(e.historyRange("nbUsers").max))+" now \xB7 +"+d(e.fmt?.number(Math.max(0,e.historyRange("nbUsers").max-e.usersFirst())))+" in 30 days",1)]),e.historyHasMissing()?(a(),l("span",WS,[...t[30]||(t[30]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),h("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",KS,[n("div",YS,[n("span",null,d(e.fmt?.number(e.userAxis().hi)),1),n("span",null,d(e.fmt?.number((e.userAxis().hi+e.userAxis().lo)/2)),1),n("span",null,d(e.fmt?.number(e.userAxis().lo)),1)]),(a(),l("svg",{class:"ov-step-svg",viewBox:"0 0 "+e.data.history.length+" 140",preserveAspectRatio:"none",role:"img","aria-label":"Total users over 30 days, from "+e.fmt?.number(e.usersFirst())+" to "+e.fmt?.number(e.historyRange("nbUsers").max)},[e.userAxis().lo===0?(a(),l("path",{key:0,class:"ov-step-area",d:e.userStepPath(!0)},null,8,XS)):f("v-if",!0),n("path",{class:"ov-step-line",d:e.userStepPath(!1),"vector-effect":"non-scaling-stroke"},null,8,QS)],8,JS)),e.firstDataIndex()>0?(a(),l("div",{key:0,class:"ov-step-missing",style:Ae({width:e.firstDataIndex()/e.data.history.length*100+"%"})},null,4)):f("v-if",!0)])):f("v-if",!0),e.data?.history?.length?(a(),l("div",ZS,[n("span",null,d(e.historyLabel(e.data?.history[0])),1),n("span",null,d(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,d(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)])),n("div",xS,[n("div",eE,[t[34]||(t[34]=n("span",{class:"ov-chart-title"},"New users \xB7 30d",-1)),n("span",tE,[n("span",nE,[t[32]||(t[32]=n("span",{class:"ov-dot-legend ov-dot-new-user-fill"},null,-1)),h("users/day \xB7 peak "+d(e.fmt?.number(e.historyMax("dailyUsers"))),1)]),e.historyHasMissing()?(a(),l("span",oE,[...t[33]||(t[33]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),h("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",sE,[n("div",iE,[n("span",null,d(e.fmt?.number(e.axisMax("dailyUsers"))),1),n("span",null,d(e.fmt?.number(e.axisMax("dailyUsers")/2)),1),t[35]||(t[35]=n("span",null,"0",-1))]),(a(!0),l(V,null,Q(e.data?.history,(s,i)=>(a(),l("div",{class:R(["ov-spark-col has-tip",{"is-missing":s?._empty}]),key:i,"data-tip":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyUsers)+(s?.dailyUsers===1?" user":" users"),"aria-label":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyUsers)+(s?.dailyUsers===1?" user":" users")},[n("span",{class:"ov-spark-fill ov-spark-fill-new-user",style:Ae({height:e.historyBarH(s,"dailyUsers")+"px"})},null,4)],10,rE))),128))])):f("v-if",!0),e.data?.history?.length?(a(),l("div",aE,[n("span",null,d(e.historyLabel(e.data?.history[0])),1),n("span",null,d(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,d(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)])],2),f(" \u2500\u2500 Three-panel row: Status / Errors / Queues \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",lE,[f(" Repo status breakdown "),n("div",dE,[n("div",uE,[t[36]||(t[36]=n("span",{class:"ov-panel-title"},"Repo status",-1)),n("span",cE,d(e.fmt?.number(e.data?.repos?.total))+" total",1)]),n("div",pE,[e.barPct("ready")>0?(a(),l("span",{key:0,class:"ov-bar-seg ov-bar-ready",title:"Ready",style:Ae({width:e.barPct("ready")+"%"})},null,4)):f("v-if",!0),e.barPct("preparing")>0?(a(),l("span",{key:1,class:"ov-bar-seg ov-bar-preparing",title:"Preparing",style:Ae({width:e.barPct("preparing")+"%"})},null,4)):f("v-if",!0),e.barPct("error")>0?(a(),l("span",{key:2,class:"ov-bar-seg ov-bar-error",title:"Error",style:Ae({width:e.barPct("error")+"%"})},null,4)):f("v-if",!0),e.barPct("expired")>0?(a(),l("span",{key:3,class:"ov-bar-seg ov-bar-expired",title:"Expiring / expired",style:Ae({width:e.barPct("expired")+"%"})},null,4)):f("v-if",!0),e.barPct("removed")>0?(a(),l("span",{key:4,class:"ov-bar-seg ov-bar-removed",title:"Removing / removed",style:Ae({width:e.barPct("removed")+"%"})},null,4)):f("v-if",!0)]),n("div",fE,[n("a",mE,[t[37]||(t[37]=n("span",{class:"ov-swatch ov-bar-ready"},null,-1)),t[38]||(t[38]=h(" Ready ",-1)),n("span",hE,d(e.fmt?.number(e.statusCount("ready"))),1)]),n("a",gE,[t[39]||(t[39]=n("span",{class:"ov-swatch ov-bar-preparing"},null,-1)),t[40]||(t[40]=h(" Preparing ",-1)),n("span",vE,d(e.fmt?.number(e.statusCount("preparing")+e.statusCount("download"))),1)]),n("a",yE,[t[41]||(t[41]=n("span",{class:"ov-swatch ov-bar-error"},null,-1)),t[42]||(t[42]=h(" Error ",-1)),n("span",bE,d(e.fmt?.number(e.statusCount("error"))),1)]),n("a",wE,[t[43]||(t[43]=n("span",{class:"ov-swatch ov-bar-expired"},null,-1)),t[44]||(t[44]=h(" Expiring / expired ",-1)),n("span",kE,d(e.fmt?.number(e.statusCount("expired")+e.statusCount("expiring"))),1)]),n("a",CE,[t[45]||(t[45]=n("span",{class:"ov-swatch ov-bar-removed"},null,-1)),t[46]||(t[46]=h(" Removing / removed ",-1)),n("span",SE,d(e.fmt?.number(e.statusCount("removed")+e.statusCount("removing"))),1)])])]),f(" Error breakdown "),n("div",EE,[n("div",NE,[t[47]||(t[47]=n("span",{class:"ov-panel-title"},"Errors \xB7 24h",-1)),n("span",RE,d(e.fmt?.number(e.realErrors()))+" "+d(e.realErrors()===1?"error":"errors"),1)]),n("div",TE,[n("div",PE,[t[48]||(t[48]=n("span",{class:"ov-ebar-label"},"Error",-1)),n("span",DE,[n("span",{class:"ov-ebar-fill ov-ebar-error",style:Ae({width:e.errPct("error")+"%"})},null,4)]),n("span",AE,d(e.data?.errors?.severity?.error),1)]),n("div",IE,[t[49]||(t[49]=n("span",{class:"ov-ebar-label"},"Warning",-1)),n("span",OE,[n("span",{class:"ov-ebar-fill ov-ebar-warn",style:Ae({width:e.errPct("warn")+"%"})},null,4)]),n("span",ME,d(e.data?.errors?.severity?.warn),1)]),e.errorHours().length?(a(),l("div",VE,[n("div",qE,[t[52]||(t[52]=n("span",{class:"ov-ehours-key"},[n("span",{class:"ov-ehours-swatch is-error","aria-hidden":"true"}),h("Error")],-1)),t[53]||(t[53]=n("span",{class:"ov-ehours-key"},[n("span",{class:"ov-ehours-swatch is-warn","aria-hidden":"true"}),h("Warning")],-1)),n("span",LE,[t[50]||(t[50]=h("Per hour",-1)),t[51]||(t[51]=n("span",{class:"seg-sep","aria-hidden":"true"},"\xB7",-1)),h("peak "+d(e.fmt?.number(e.errorHoursPeak())),1)])]),n("div",$E,[(a(!0),l(V,null,Q(e.errorHours(),s=>(a(),l("span",{key:s.key,class:R({"is-bad":s.bad,"is-zero":s.zero}),title:s.title},[s.zero?(a(),l("i",FE)):(a(),l(V,{key:1},[s.errPct?(a(),l("i",{key:0,class:"ov-ehours-e",style:Ae({height:s.errPct+"%"})},null,4)):f("v-if",!0),s.warnPct?(a(),l("i",{key:1,class:"ov-ehours-w",style:Ae({height:s.warnPct+"%"})},null,4)):f("v-if",!0)],64))],10,_E))),128))]),t[54]||(t[54]=n("div",{class:"ov-ehours-x"},[n("span",null,"24h ago"),n("span",null,"now")],-1))])):f("v-if",!0),n("p",UE,"Info "+d(e.fmt?.number(e.data?.errors?.severity?.info||0))+" \xB7 logged, not counted as errors",1)]),e.data?.repos?.recentErrors24h?(a(),l("div",BE,[n("a",zE,d(e.data?.repos?.recentErrors24h)+" repos in error state \u2192",1)])):f("v-if",!0)]),f(" Top routes / queues "),n("div",HE,[t[59]||(t[59]=n("div",{class:"ov-panel-head"},[n("span",{class:"ov-panel-title"},"Queues"),n("span",{class:"ov-panel-meta"},"by state")],-1)),n("div",jE,[t[58]||(t[58]=ke('
QueueActiveWaitFailed
',1)),n("a",GE,[t[55]||(t[55]=n("span",{class:"ov-route-name"},"Download",-1)),n("span",WE,d(e.data?.queues?.download?.active),1),n("span",KE,d(e.data?.queues?.download?.waiting),1),n("span",{class:R(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.download?.failed>0}])},d(e.data?.queues?.download?.failed),3)]),n("a",YE,[t[56]||(t[56]=n("span",{class:"ov-route-name"},"Remove",-1)),n("span",JE,d(e.data?.queues?.remove?.active),1),n("span",XE,d(e.data?.queues?.remove?.waiting),1),n("span",{class:R(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.remove?.failed>0}])},d(e.data?.queues?.remove?.failed),3)]),n("a",QE,[t[57]||(t[57]=n("span",{class:"ov-route-name"},"Cache cleanup",-1)),n("span",ZE,d(e.data?.queues?.cache?.active),1),n("span",xE,d(e.data?.queues?.cache?.waiting),1),n("span",{class:R(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.cache?.failed>0}])},d(e.data?.queues?.cache?.failed),3)])])])]),f(" \u2500\u2500 Services bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",eN,[n("div",tN,[t[60]||(t[60]=n("span",{class:"ov-panel-title"},"Services",-1)),n("span",nN,"5 services \xB7 "+d(e.realErrors()>0?"1 needs attention":"all healthy"),1)]),n("div",oN,[n("div",sN,[t[62]||(t[62]=n("span",{class:"ov-svc-dot ov-dot-ok"},null,-1)),n("div",iN,[t[61]||(t[61]=n("span",{class:"ov-svc-name"},"web",-1)),n("span",rN,d(e.data?.system?.nodeVersion)+" \xB7 up "+d(e.humanDuration(e.data?.system?.uptime)),1)])]),n("div",aN,[n("span",{class:R(["ov-svc-dot",e.queueTotal(e.data?.queues?.download)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),n("div",lN,[t[63]||(t[63]=n("span",{class:"ov-svc-name"},"download",-1)),e.queueTotal(e.data?.queues?.download)?(a(),l("span",dN,d(e.queueTotal(e.data?.queues?.download))+" "+d(e.queueTotal(e.data?.queues?.download)===1?"job":"jobs"),1)):f("v-if",!0),e.queueTotal(e.data?.queues?.download)?f("v-if",!0):(a(),l("span",uN,"idle"))])]),n("div",cN,[n("span",{class:R(["ov-svc-dot",e.queueTotal(e.data?.queues?.cache)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),n("div",pN,[t[64]||(t[64]=n("span",{class:"ov-svc-name"},"cache",-1)),e.queueTotal(e.data?.queues?.cache)?(a(),l("span",fN,d(e.queueTotal(e.data?.queues?.cache))+" "+d(e.queueTotal(e.data?.queues?.cache)===1?"job":"jobs"),1)):f("v-if",!0),e.queueTotal(e.data?.queues?.cache)?f("v-if",!0):(a(),l("span",mN,"idle"))])]),n("div",hN,[n("span",{class:R(["ov-svc-dot",e.queueTotal(e.data?.queues?.remove)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),n("div",gN,[t[65]||(t[65]=n("span",{class:"ov-svc-name"},"remove",-1)),e.queueTotal(e.data?.queues?.remove)?(a(),l("span",vN,d(e.queueTotal(e.data?.queues?.remove))+" "+d(e.queueTotal(e.data?.queues?.remove)===1?"job":"jobs"),1)):f("v-if",!0),e.queueTotal(e.data?.queues?.remove)?f("v-if",!0):(a(),l("span",yN,"idle"))])]),n("div",bN,[n("span",{class:R(["ov-svc-dot",e.realErrors()>0?"ov-dot-warn":"ov-dot-ok"]),title:e.realErrors()>0?"Errors in the last 24 hours":"No errors in the last 24 hours"},null,10,wN),n("div",kN,[t[66]||(t[66]=n("span",{class:"ov-svc-name"},"errors",-1)),n("span",CN,d(e.fmt?.number(e.realErrors()))+" / 24h",1)])])])])],512)),[[Z,e.ovView==="summary"]]):f("v-if",!0),P(n("section",SN,[n("div",EN,[t[71]||(t[71]=n("div",null,[n("h2",{class:"ov-panel-title",id:"cache-heading"},"Cache"),n("p",{class:"ov-performance-note"},"Shared storage, repeated reads and anonymization work")],-1)),n("div",NN,[t[69]||(t[69]=n("label",{for:"cache-window"},"Time range",-1)),P(n("select",{id:"cache-window",class:"form-control form-control-sm","onUpdate:modelValue":t[0]||(t[0]=s=>e.cacheMinutes=s),onChange:t[1]||(t[1]=s=>e.loadCache())},[...t[67]||(t[67]=[n("option",{value:15},"Last 15 minutes",-1),n("option",{value:60},"Last hour",-1),n("option",{value:1440},"Last 24 hours",-1),n("option",{value:10080},"Last 7 days",-1)])],544),[[Rt,e.cacheMinutes,void 0,{number:!0}]]),t[70]||(t[70]=n("label",{for:"cache-traffic"},"Traffic",-1)),P(n("select",{id:"cache-traffic",class:"form-control form-control-sm","onUpdate:modelValue":t[2]||(t[2]=s=>e.cacheTraffic=s)},[...t[68]||(t[68]=[ke('',6)])],512),[[Rt,e.cacheTraffic]])])]),e.cacheError?(a(),l("div",RN,[n("span",null,d(e.cacheError),1),n("button",{type:"button",class:"btn btn-sm",onClick:t[3]||(t[3]=s=>e.loadCache())},"Retry")])):f("v-if",!0),!e.cacheReport&&!e.cacheError?(a(),l("p",TN,"Loading cache monitoring\u2026")):f("v-if",!0),e.cacheReport?.available?(a(),l(V,{key:2},[e.cacheReport.enabled?f("v-if",!0):(a(),l("p",PN,"Shared blob storage is disabled. Inspection and legacy-cache activity are still measured.")),e.cacheReport.filesystemSupported?f("v-if",!0):(a(),l("p",DN,"Shared blobs require a local filesystem. The configured storage continues to use its existing cache.")),e.cacheReport.dropped?(a(),l("p",AN,d(e.cacheReport.dropped)+" telemetry events were dropped. Totals may be incomplete.",1)):f("v-if",!0),e.cacheReport.source?(a(),l("div",IN,[n("table",ON,[t[72]||(t[72]=n("caption",{class:"sr-only"},"Current shared-cache storage and byte budgets",-1)),t[73]||(t[73]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Pool"),n("th",{scope:"col",class:"num"},"Allocated / budget"),n("th",{scope:"col",class:"num"},"Reserved for fills"),n("th",{scope:"col",class:"num"},"Original bytes"),n("th",{scope:"col",class:"num"},"Blobs"),n("th",{scope:"col",class:"num"},"Active readers")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q([{name:"Source blobs",data:e.cacheReport.source},{name:"Transformed output",data:e.cacheReport.results}],s=>P((a(),l("tr",{key:s.name},[n("th",MN,d(s.name),1),n("td",{class:R(["num budget-cell",{"is-over":s.data?.budgetBytes&&s.data?.allocatedBytes>s.data?.budgetBytes}]),title:s.data?.budgetBytes?Math.round(100*(s.data?.allocatedBytes||0)/s.data.budgetBytes)+"% of budget":null},[s.data?.budgetBytes&&s.data?.allocatedBytes>s.data?.budgetBytes?(a(),l("span",qN,"Over budget \xB7 ")):f("v-if",!0),h(d(e.humanBytes(s.data?.allocatedBytes))+" / "+d(e.humanBytes(s.data?.budgetBytes)),1),s.data?.budgetBytes?(a(),l("span",LN,[n("i",{style:Ae({width:Math.min(100,Math.round(100*(s.data?.allocatedBytes||0)/s.data.budgetBytes))+"%"})},null,4)])):f("v-if",!0)],10,VN),n("td",$N,d(e.humanBytes(s.data?.reservedBytes)),1),n("td",_N,d(e.humanBytes(s.data?.originalBytes)),1),n("td",FN,d(e.fmt?.number(s.data?.blobs)),1),n("td",UN,d(e.fmt?.number(s.data?.activeReaders)),1)])),[[Z,s.data]])),128))])])])):f("v-if",!0),e.cacheReport.source?(a(),l("dl",BN,[n("div",null,[t[74]||(t[74]=n("dt",null,"Source request hit rate",-1)),n("dd",null,d(e.cacheRate("source","count")),1)]),n("div",null,[t[75]||(t[75]=n("dt",null,"Source byte hit rate",-1)),n("dd",null,d(e.cacheRate("source","bytes")),1)]),n("div",null,[t[76]||(t[76]=n("dt",null,"Decision hit rate",-1)),n("dd",null,d(e.cacheRate("decision","count")),1)])])):f("v-if",!0),t[79]||(t[79]=n("p",{class:"ov-performance-note"},"Reuse counts measure consecutive reads of the same blob within each interval. Codec timings are elapsed stream time, not CPU time; eviction times measure how long a blob was idle. Known monitors are identified by request metadata; other automation may remain in file reads.",-1)),e.cacheRows().length?(a(),l("div",zN,[n("table",HN,[t[77]||(t[77]=n("caption",{class:"sr-only"},"Cache events for the selected time range and traffic",-1)),t[78]||(t[78]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Event"),n("th",{scope:"col"},"Traffic"),n("th",{scope:"col",class:"num"},"Count"),n("th",{scope:"col",class:"num"},"Bytes"),n("th",{scope:"col",class:"num"},"Mean measured time"),n("th",{scope:"col",class:"num"},"p95 bound")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q(e.cacheRows(),s=>(a(),l("tr",{key:s.name+":"+s.traffic},[n("th",jN,d(e.cacheEventName(s.name)),1),n("td",GN,d(s.traffic),1),n("td",WN,d(e.fmt?.number(s.count)),1),n("td",KN,d(e.humanBytes(s.bytes)),1),n("td",{class:R(["num",{"ov-muted":!s.ms}])},d(s.ms?e.fmt.duration(s.ms/s.count):"Not timed"),3),n("td",{class:R(["num",{"ov-muted":!s.ms}])},d(e.cacheP95(s)),3)]))),128))])])])):(a(),l("p",YN,"No cache events in this time range for the selected traffic.")),n("p",JN,"Updated "+d(e.sampleAge(e.cacheReport))+" seconds ago. Minute history is retained for 48 hours; hourly history for 30 days.",1)],64)):f("v-if",!0)],512),[[Z,e.ovView==="cache"]]),P(n("section",XN,[n("div",QN,[t[84]||(t[84]=n("div",null,[n("h2",{class:"ov-panel-title",id:"performance-heading"},"Request performance"),n("p",{class:"ov-performance-note"},"Request latency and process health")],-1)),n("div",ZN,[e.performance?.available?(a(),l(V,{key:0},[t[81]||(t[81]=n("label",{for:"performance-view"},"Show",-1)),P(n("select",{id:"performance-view",class:"form-control form-control-sm","onUpdate:modelValue":t[4]||(t[4]=s=>e.performanceTab=s),"aria-label":"Performance metrics"},[...t[80]||(t[80]=[n("option",{value:"routes"},"Routes",-1),n("option",{value:"processes"},"Processes",-1),n("option",{value:"stages"},"Work stages",-1)])],512),[[Rt,e.performanceTab]])],64)):f("v-if",!0),t[83]||(t[83]=n("label",{for:"performance-window"},"Time range",-1)),P(n("select",{id:"performance-window",class:"form-control form-control-sm","onUpdate:modelValue":t[5]||(t[5]=s=>e.performanceMinutes=s),onChange:t[6]||(t[6]=s=>e.loadPerformance()),"aria-label":"Performance time range"},[...t[82]||(t[82]=[n("option",{value:15},"Last 15 minutes",-1),n("option",{value:60},"Last hour",-1)])],544),[[Rt,e.performanceMinutes,void 0,{number:!0}]])])]),e.performanceError?(a(),l("div",xN,[t[85]||(t[85]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,d(e.performanceError),1),n("button",{type:"button",class:"btn btn-sm",onClick:t[7]||(t[7]=s=>e.loadPerformance())},"Retry")])):f("v-if",!0),!e.performance&&!e.performanceError?(a(),l("p",eR,"Loading performance monitoring\u2026")):f("v-if",!0),e.performance?.available?(a(),l("div",tR,[P(n("div",nR,[e.performance.routes?.length?(a(),l("div",oR,[n("table",sR,[t[86]||(t[86]=n("caption",{class:"sr-only"},"Route latency for the selected time range",-1)),t[87]||(t[87]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Route"),n("th",{scope:"col",class:"num"},"Requests"),n("th",{scope:"col",class:"num"},"Average"),n("th",{scope:"col",class:"num"},"First byte p95"),n("th",{scope:"col",class:"num"},"p95"),n("th",{scope:"col",class:"num"},"p99"),n("th",{scope:"col",class:"num"},"Interrupted"),n("th",{scope:"col",class:"num"},"5xx"),n("th",{scope:"col",class:"num"},"Slow")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q(e.performance.routes,s=>(a(),l("tr",{key:s.service+s.method+s.route},[n("th",iR,[n("span",null,d(s.route),1),n("small",null,d(s.service)+" \xB7 "+d(s.method),1)]),n("td",rR,d(e.fmt.number(s.count)),1),n("td",aR,d(e.formatMs(s.avgMs)),1),n("td",lR,d(e.firstByteBound(s)),1),n("td",dR,d(e.latencyBound(s,"p95UpperMs")),1),n("td",uR,d(e.latencyBound(s,"p99UpperMs")),1),n("td",{class:R(["num",{"ov-metric-warn":s.aborted>0}])},d(e.fmt.number(s.aborted)),3),n("td",{class:R(["num",{"ov-metric-bad":s.errors>0}])},d(e.fmt.number(s.errors)),3),n("td",{class:R(["num",{"ov-metric-warn":s.slow>0}])},d(e.fmt.number(s.slow)),3)]))),128))])])])):(a(),l("p",cR,"No recorded requests in this time range yet."))],512),[[Z,e.performanceTab==="routes"]]),P(n("div",pR,[t[91]||(t[91]=n("p",{class:"ov-performance-note"},"API and streamer processes \xB7 latest sample per instance",-1)),e.performance.instances?.length?(a(),l("div",mR,[n("table",hR,[t[89]||(t[89]=n("caption",{class:"sr-only"},"API and streamer process resource usage",-1)),t[90]||(t[90]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Process"),n("th",{scope:"col",class:"num"},"RSS / limit"),n("th",{scope:"col",class:"num"},"CPU"),n("th",{scope:"col",class:"num"},"Event loop p95"),n("th",{scope:"col",class:"num"},"Active requests"),n("th",{scope:"col",class:"num"},"Sockets / CLOSE_WAIT"),n("th",{scope:"col",class:"num"},"Workers / waiting"),n("th",{scope:"col",class:"num"},"Sample age"),n("th",{scope:"col",class:"num"},"Dropped batches / metrics")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q(e.performance.instances,s=>(a(),l("tr",{key:s.instance,class:R({"ov-metric-warning-row":e.performanceWarning(s)})},[n("th",gR,[n("span",null,d(s.instance),1),e.performanceWarning(s)?(a(),l("small",vR,[...t[88]||(t[88]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1),h(" Needs attention",-1)])])):f("v-if",!0)]),n("td",yR,[h(d(e.humanBytes(s.memory.rss))+" / "+d(e.humanBytes(s.memoryLimitBytes)),1),n("small",null,"Peak "+d(e.humanBytes(e.peakRss(s))),1)]),n("td",bR,d(s.cpuPercent==null?"Unavailable":s.cpuPercent.toFixed(1)+"%"),1),n("td",wR,d(s.eventLoop?.p95Ms==null?"Not applicable":e.fmt.duration(s.eventLoop.p95Ms)),1),n("td",kR,d(s.activeRequests),1),n("td",CR,d(s.sockets?.descriptors??"Unavailable")+" / "+d(s.sockets?.closeWait??"Unavailable"),1),n("td",SR,d(s.workers?.running??0)+" / "+d(s.workers?.waiting??0),1),n("td",ER,d(e.sampleAge(s))+" s",1),n("td",NR,d(s.droppedBatches)+" / "+d(s.droppedMetrics),1)],2))),128))])])])):(a(),l("div",fR,"No recent process samples. Monitoring coverage is incomplete."))],512),[[Z,e.performanceTab==="processes"]]),P(n("div",RR,[e.performance.stages?.some(s=>s.metric!=="first_byte")?(a(),l("div",TR,[n("table",PR,[t[92]||(t[92]=n("caption",{class:"sr-only"},"Work stages and cache results",-1)),t[93]||(t[93]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Work stage"),n("th",{scope:"col",class:"num"},"Samples"),n("th",{scope:"col",class:"num"},"Average"),n("th",{scope:"col",class:"num"},"p95")])],-1)),n("tbody",null,[(a(!0),l(V,null,Q(e.performance.stages.filter(s=>s.metric!=="first_byte"),s=>(a(),l("tr",{key:s.service+s.metric},[n("th",DR,[n("span",null,d(s.metric),1),n("small",null,d(s.service),1)]),n("td",AR,d(e.fmt.number(s.count)),1),n("td",IR,d(e.formatMs(s.avgMs)),1),n("td",OR,d(e.latencyBound(s,"p95UpperMs")),1)]))),128))])])])):(a(),l("p",MR,"No recorded work stages or cache results in this time range yet."))],512),[[Z,e.performanceTab==="stages"]]),t[94]||(t[94]=n("details",{class:"ov-performance-help"},[n("summary",null,"How to read these metrics"),n("p",null,"Latency includes upstream waits and response transfer. Percentiles show histogram bucket upper bounds, not exact timings. Process rows marked \u201CNeeds attention\u201D have stale samples, dropped monitoring data, CLOSE_WAIT sockets, high event loop delay, or high memory usage.")],-1))])):f("v-if",!0)],512),[[Z,e.ovView==="performance"]])])}var VR={class:"container paper-page admin-page"},qR={class:"q-header"},LR={class:"q-header-actions"},$R={class:"q-cards"},_R=["aria-pressed","onKeydown","onClick"],FR={class:"q-card-head"},UR=["title"],BR=["textContent"],zR=["textContent"],HR={class:"q-card-sub"},jR={class:"q-card-failed"},GR={key:0,class:"q-card-bar"},WR={key:0,class:"q-detail"},KR={class:"q-throughput"},YR={class:"q-range-btns"},JR={class:"q-section-label"},XR={key:0,class:"q-section-right"},QR={class:"q-chart-wrap"},ZR={key:0,class:"q-chart-empty"},xR={class:"q-stats-panel"},eT={class:"q-section-label"},tT={class:"q-stats-grid"},nT={class:"q-stat"},oT=["textContent"],sT={class:"q-stat"},iT=["textContent"],rT={class:"q-stat"},aT=["textContent"],lT={class:"q-stat"},dT=["textContent"],uT={class:"q-stat"},cT=["textContent"],pT={class:"q-stat"},fT=["textContent"],mT={class:"q-stats-actions"},hT=["disabled"],gT={class:"q-danger-group"},vT={class:"q-jobs"},yT={class:"q-jobs-header"},bT={class:"q-section-label"},wT={class:"seg-filter",role:"radiogroup","aria-label":"Filter jobs by state"},kT=["aria-checked"],CT={class:"count"},ST=["aria-checked"],ET={class:"count"},NT=["aria-checked"],RT={class:"count"},TT=["aria-checked"],PT={class:"count"},DT=["aria-checked"],AT={class:"count"},IT=["aria-checked"],OT={class:"count"},MT={class:"q-search-row"},VT={type:"search",class:"form-control",placeholder:"Search by job/repo id\u2026",autocomplete:"off"},qT={class:"q-auto-refresh"},LT={type:"checkbox"},$T={key:0,class:"q-table"},_T=["onClick"],FT={class:"q-cell-state"},UT=["textContent"],BT=["textContent"],zT=["title"],HT=["textContent","href"],jT=["title","textContent"],GT=["textContent"],WT=["textContent"],KT={class:"q-cell-progress"},YT=["aria-label"],JT=["textContent"],XT={class:"q-cell-actions"},QT=["onClick"],ZT=["onClick"],xT={key:0,class:"q-detail-row"},e4={colspan:"7"},t4={class:"q-job-detail"},n4={class:"q-job-detail-grid"},o4={class:"q-job-detail-item"},s4={class:"q-job-detail-value"},i4=["textContent","href"],r4={class:"q-job-detail-item"},a4={class:"q-job-detail-value"},l4=["textContent"],d4={key:0,class:"q-job-detail-item"},u4=["textContent"],c4={key:1,class:"q-job-detail-item"},p4=["textContent"],f4={key:2,class:"q-job-detail-item"},m4={class:"q-job-detail-value"},h4={key:3,class:"q-job-detail-item"},g4=["textContent"],v4={key:4,class:"q-job-detail-item"},y4=["textContent"],b4={key:5,class:"q-job-detail-item"},w4=["textContent"],k4={key:6,class:"q-job-detail-item"},C4=["textContent"],S4={key:7,class:"q-job-detail-item"},E4=["textContent"],N4={key:0,class:"q-job-detail-error"},R4=["textContent"],T4={key:1},P4=["textContent"],D4={class:"q-job-detail-actions"},A4=["onClick"],I4=["onClick"],O4=["href"],M4={key:1,class:"paper-table-empty",style:{border:"1px solid var(--border-color)","border-radius":"10px",background:"var(--paper-card)"}},V4={key:0},q4={key:1};function dp(e,t){let s=Pe("field");return a(),l("div",VR,[t[71]||(t[71]=n("div",{class:"paper-crumbs"},[h("Admin \xA0/\xA0 "),n("span",{class:"here"},"Queues")],-1)),n("div",qR,[t[18]||(t[18]=n("h1",{class:"paper-page-title"},"Queues",-1)),n("div",LR,[n("button",{class:"btn btn-sm",onClick:t[0]||(t[0]=i=>e.pauseAll())},"Pause all queues")])]),t[72]||(t[72]=ke('',1)),f(" Queue overview cards "),n("div",$R,[(a(!0),l(V,null,Q(e.queueList,(i,o)=>(a(),l("div",{class:R(["q-card",{selected:e.selectedQueue==i?.key,paused:i?.paused}]),role:"button",tabindex:"0","aria-pressed":e.selectedQueue===i.key,onKeydown:[Lt(de(r=>e.selectQueue(i.key),["prevent"]),["enter"]),Lt(de(r=>e.selectQueue(i.key),["prevent"]),["space"])],onClick:r=>e.selectQueue(i.key)},[n("div",FR,[n("span",{class:R(["q-dot",{"q-dot-red":i?.paused||i?.counts?.failed>0,"q-dot-idle":!i?.counts?.active&&!i?.counts?.waiting}]),title:i?.paused?"Paused":i?.counts?.failed>0?i.counts.failed+" failed jobs":i?.counts?.active||i?.counts?.waiting?"Running":"Idle"},null,10,UR),n("span",{class:"q-card-name",textContent:d(i?.label)},null,8,BR)]),n("div",{class:"q-card-count",textContent:d((i?.counts?.waiting||0)+(i?.counts?.active||0)+(i?.counts?.delayed||0))},null,8,zR),n("div",HR,[n("span",null,[h("waiting \xB7 "+d(i?.counts?.active||0)+" active",1),i?.counts?.failed?(a(),l(V,{key:0},[t[19]||(t[19]=h(" \xB7 ",-1)),n("b",jR,d(i.counts.failed)+" failed",1)],64)):f("v-if",!0),i?.paused?(a(),l(V,{key:1},[t[20]||(t[20]=h(" \xB7 ",-1)),t[21]||(t[21]=n("b",{class:"q-card-failed"},"paused",-1))],64)):f("v-if",!0)]),i?.counts?.active?(a(),l("div",GR,[n("div",{class:"q-card-bar-fill",style:Ae({width:i?.counts?.active/((i?.counts?.waiting||0)+(i?.counts?.active||0)+(i?.counts?.delayed||0)||1)*100+"%"})},null,4)])):f("v-if",!0)])],42,_R))),256))]),f(" Detail: throughput chart + stats panel "),e.selectedStats?(a(),l("div",WR,[n("div",KR,[n("div",YR,[n("button",{class:R(["btn btn-sm",{active:e.range=="1h"}]),onClick:t[1]||(t[1]=i=>e.setRange("1h"))},"1h",2),n("button",{class:R(["btn btn-sm",{active:e.range=="6h"}]),onClick:t[2]||(t[2]=i=>e.setRange("6h"))},"6h",2),n("button",{class:R(["btn btn-sm",{active:e.range=="24h"}]),onClick:t[3]||(t[3]=i=>e.setRange("24h"))},"24h",2),n("button",{class:R(["btn btn-sm",{active:e.range=="7d"}]),onClick:t[4]||(t[4]=i=>e.setRange("7d"))},"7d",2)]),n("div",JR,[h("Throughput \xB7 "+d(e.selectedQueue)+" ",1),(e.selectedStats?.completed24h||0)+(e.selectedStats?.failed24h||0)>0?(a(),l("span",XR,[t[23]||(t[23]=n("span",{class:"q-legend-completed"},"\u25CF",-1)),t[24]||(t[24]=h(" Completed ",-1)),t[25]||(t[25]=n("span",{class:"q-legend-failed"},"\u25CF",-1)),t[26]||(t[26]=h(" Failed ",-1)),(e.selectedStats?.completed24h||0)+(e.selectedStats?.failed24h||0)>0?(a(),l(V,{key:0},[t[22]||(t[22]=n("span",{class:"q-legend-exec","aria-hidden":"true"},null,-1)),h(" Avg time \xB7 "+d(e.range),1)],64)):f("v-if",!0)])):f("v-if",!0)]),n("div",QR,[t[28]||(t[28]=n("canvas",{id:"q-throughput-chart",height:"180"},null,-1)),(e.selectedStats?.completed24h||0)+(e.selectedStats?.failed24h||0)===0?(a(),l("div",ZR,[...t[27]||(t[27]=[n("strong",null,"No jobs processed in this window",-1),n("span",null,"Completed and failed jobs will chart here.",-1)])])):f("v-if",!0),t[29]||(t[29]=n("div",{id:"q-chart-tooltip",class:"q-chart-tooltip",style:{display:"none"}},null,-1)),t[30]||(t[30]=n("div",{id:"q-chart-crosshair",class:"q-chart-crosshair",style:{display:"none"}},null,-1))])]),n("div",xR,[n("div",eT,"Stats \xB7 "+d(e.selectedQueue),1),n("div",tT,[n("div",nT,[t[31]||(t[31]=n("div",{class:"q-stat-label"},"Waiting",-1)),n("div",{class:"q-stat-value",textContent:d(e.selectedStats?.counts?.waiting||0)},null,8,oT)]),n("div",sT,[t[32]||(t[32]=n("div",{class:"q-stat-label"},"Active",-1)),n("div",{class:"q-stat-value",textContent:d(e.selectedStats?.counts?.active||0)},null,8,iT)]),n("div",rT,[t[33]||(t[33]=n("div",{class:"q-stat-label"},"Completed (24h)",-1)),n("div",{class:"q-stat-value",textContent:d(e.fmt?.number(e.selectedStats?.completed24h))},null,8,aT)]),n("div",lT,[t[34]||(t[34]=n("div",{class:"q-stat-label"},"Failed (24h)",-1)),n("div",{class:"q-stat-value",textContent:d(e.selectedStats?.failed24h||0)},null,8,dT)]),n("div",uT,[t[35]||(t[35]=n("div",{class:"q-stat-label"},"Delayed",-1)),n("div",{class:"q-stat-value",textContent:d(e.selectedStats?.counts?.delayed||0)},null,8,cT)]),n("div",pT,[t[36]||(t[36]=n("div",{class:"q-stat-label"},"Workers",-1)),n("div",{class:"q-stat-value",textContent:d(e.selectedStats?.workers||0)},null,8,fT)])]),n("div",mT,[n("button",{class:"btn btn-sm",onClick:t[5]||(t[5]=i=>e.togglePause())},d(e.selectedStats?.paused?"Resume "+e.selectedQueue:"Pause "+e.selectedQueue),1),n("button",{class:"btn btn-sm",onClick:t[6]||(t[6]=i=>e.retryFailed()),disabled:!e.selectedStats?.counts?.failed},"Retry failed",8,hT),n("span",gT,[n("button",{class:"btn btn-sm btn-outline-danger",onClick:t[7]||(t[7]=i=>e.drainSelected())},"Drain"),n("button",{class:"btn btn-sm btn-outline-danger",onClick:t[8]||(t[8]=i=>e.emptyQueue())},"Empty")])])])])):f("v-if",!0),e.actionError?(a(),l("div",{key:1,class:"q-toast-error",onClick:t[9]||(t[9]=i=>e.actionError=null)},[t[37]||(t[37]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1)),h(" "+d(e.actionError),1)])):f("v-if",!0),f(" Jobs table "),n("div",vT,[n("div",yT,[n("div",bT,"All jobs \xB7 "+d(e.selectedQueue),1),n("div",wT,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[10]||(t[10]=i=>e.setSegView("all"))},[t[38]||(t[38]=h("All ",-1)),n("span",CT,d(e.fmt?.number(e.segCount("all"))),1)],10,kT),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="active","is-empty":!e.segCount("active")}]),"aria-checked":e.segView()==="active",onClick:t[11]||(t[11]=i=>e.setSegView("active"))},[t[39]||(t[39]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[40]||(t[40]=h("Active ",-1)),n("span",ET,d(e.fmt?.number(e.segCount("active"))),1)],10,ST),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="waiting","is-empty":!e.segCount("waiting")}]),"aria-checked":e.segView()==="waiting",onClick:t[12]||(t[12]=i=>e.setSegView("waiting"))},[t[41]||(t[41]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[42]||(t[42]=h("Waiting ",-1)),n("span",RT,d(e.fmt?.number(e.segCount("waiting"))),1)],10,NT),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="delayed","is-empty":!e.segCount("delayed")}]),"aria-checked":e.segView()==="delayed",onClick:t[13]||(t[13]=i=>e.setSegView("delayed"))},[t[43]||(t[43]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[44]||(t[44]=h("Delayed ",-1)),n("span",PT,d(e.fmt?.number(e.segCount("delayed"))),1)],10,TT),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="failed","is-empty":!e.segCount("failed")}]),"aria-checked":e.segView()==="failed",onClick:t[14]||(t[14]=i=>e.setSegView("failed"))},[t[45]||(t[45]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[46]||(t[46]=h("Failed ",-1)),n("span",AT,d(e.fmt?.number(e.segCount("failed"))),1)],10,DT),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="completed","is-empty":!e.segCount("completed")}]),"aria-checked":e.segView()==="completed",onClick:t[15]||(t[15]=i=>e.setSegView("completed"))},[t[47]||(t[47]=n("span",{class:"seg-dot done","aria-hidden":"true"},null,-1)),t[48]||(t[48]=h("Completed ",-1)),n("span",OT,d(e.fmt?.number(e.segCount("completed"))),1)],10,IT)])]),n("div",MT,[P(n("input",VT,null,512),[[s,{state:e.viewState,set:i=>{e.query.search=i},value:e.query?.search,form:null,options:{}}]]),n("label",qT,[P(n("input",LT,null,512),[[s,{state:e.viewState,set:i=>{e.query.autoRefresh=i},value:e.query?.autoRefresh,form:null,options:{}}]]),t[49]||(t[49]=n("span",{class:"auto-refresh-label"},"Auto-refresh",-1))]),n("button",{class:"btn btn-sm btn-icon",type:"button",title:"Refresh now",onClick:t[16]||(t[16]=i=>e.refreshNow()),"aria-label":"Refresh"},[...t[50]||(t[50]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])])]),e.filteredJobs().length>0?(a(),l("table",$T,[t[69]||(t[69]=n("thead",null,[n("tr",null,[n("th",null,"State"),n("th",null,"Job"),n("th",null,"Detail"),n("th",null,"Attempts"),n("th",{class:"q-th-num"},"Duration"),n("th",null,"Progress"),n("th")])],-1)),(a(!0),l(V,null,Q(e.filteredJobs(),(i,o)=>(a(),l("tbody",null,[n("tr",{style:{cursor:"pointer"},class:R({"q-row-failed":i?._state=="failed","q-row-expanded":e.expanded[i?.id]}),onClick:r=>e.toggleJob(i)},[n("td",FT,[n("span",{textContent:d(i?._state),class:R("q-state-badge q-state-"+i?._state)},null,10,UT),i?._state=="delayed"&&i?.delayUntil?(a(),l("span",{key:0,class:"q-delay-hint",textContent:d(e.delayCountdown(i?.delayUntil))},null,8,BT)):f("v-if",!0)]),n("td",{class:"q-cell-id",title:"job:"+i?.id+(i?.name&&i?.name!==i?.id?" \xB7 "+i.name:"")+(i?.data?.repoId&&i?.data?.repoId!==i?.id?" \xB7 "+i.data.repoId:"")},[(a(),l("svg",{class:R(["ui-icon q-chevron",{"q-chevron-open":e.expanded[i?.id]}]),"aria-hidden":"true"},[...t[51]||(t[51]=[n("use",{href:"#ui-icon-chevron-right"},null,-1)])],2)),n("a",{target:"_blank",class:"q-job-link",textContent:d(i?.data?.repoId||i?.id),onClick:t[17]||(t[17]=r=>r.stopPropagation()),href:e.safeUrl("/r/"+(i?.data?.repoId||i?.id))},null,8,HT)],8,zT),n("td",{class:R(["q-cell-detail",{"is-error":i?._state=="failed"}]),title:i?._state=="failed"?i?.failedReason:"",textContent:d(e.jobDetail(i))},null,10,jT),n("td",{class:"q-cell-num",textContent:d(i?.attemptsMade||1)},null,8,GT),n("td",{class:"q-cell-num q-cell-duration",textContent:d(e.jobDuration(i))},null,8,WT),n("td",KT,[n("div",{class:R(["q-progress-wrap",{"is-indeterminate":e.jobProgressPct(i)===null}]),"aria-label":e.jobProgressPct(i)===null?"Progress not reported":e.jobProgressPct(i)+"% done"},[n("div",{class:"q-progress-bar",style:Ae({"--pct":(e.jobProgressPct(i)||0)+"%"})},null,4),n("span",{class:"q-progress-label",textContent:d(e.jobProgressPct(i)===null?"\u2014":e.jobProgressPct(i)+"%")},null,8,JT)],10,YT)]),n("td",XT,[i?._state=="failed"?(a(),l("button",{key:0,class:"btn btn-sm btn-icon",title:"Retry",onClick:r=>{e.retryJob(i),r.stopPropagation()},"aria-label":"Retry job"},[...t[52]||(t[52]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])],8,QT)):f("v-if",!0),n("button",{class:"btn btn-sm btn-icon",title:"Remove","aria-label":"Remove job",onClick:r=>{e.removeJob(i),r.stopPropagation()}},[...t[53]||(t[53]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1)])],8,ZT)])],10,_T),e.expanded[i?.id]?(a(),l("tr",xT,[n("td",e4,[n("div",t4,[n("div",n4,[n("div",o4,[t[54]||(t[54]=n("span",{class:"q-job-detail-label"},"Job id",-1)),n("span",s4,[n("a",{target:"_blank",textContent:d(i?.id),href:e.safeUrl("/r/"+i?.id)},null,8,i4)])]),n("div",r4,[t[55]||(t[55]=n("span",{class:"q-job-detail-label"},"State",-1)),n("span",a4,[n("span",{textContent:d(i?._state),class:R("q-state-badge q-state-"+i?._state)},null,10,l4)])]),i?.data?.repoId?(a(),l("div",d4,[t[56]||(t[56]=n("span",{class:"q-job-detail-label"},"Repo ID",-1)),n("span",{class:"q-job-detail-value",textContent:d(i?.data?.repoId)},null,8,u4)])):f("v-if",!0),i?.timestamp?(a(),l("div",c4,[t[57]||(t[57]=n("span",{class:"q-job-detail-label"},"Created",-1)),n("span",{class:"q-job-detail-value",textContent:d(e.humanTime(i?.timestamp))},null,8,p4)])):f("v-if",!0),i?._state=="delayed"&&i?.delayUntil?(a(),l("div",f4,[t[58]||(t[58]=n("span",{class:"q-job-detail-label"},"Retry at",-1)),n("span",m4,d(e.humanTime(i?.delayUntil))+" ("+d(e.delayCountdown(i?.delayUntil))+")",1)])):f("v-if",!0),i?.processedOn?(a(),l("div",h4,[t[59]||(t[59]=n("span",{class:"q-job-detail-label"},"Processed",-1)),n("span",{class:"q-job-detail-value",textContent:d(e.humanTime(i?.processedOn))},null,8,g4)])):f("v-if",!0),i?.finishedOn?(a(),l("div",v4,[t[60]||(t[60]=n("span",{class:"q-job-detail-label"},"Finished",-1)),n("span",{class:"q-job-detail-value",textContent:d(e.humanTime(i?.finishedOn))},null,8,y4)])):f("v-if",!0),i?.attemptsMade?(a(),l("div",b4,[t[61]||(t[61]=n("span",{class:"q-job-detail-label"},"Attempts",-1)),n("span",{class:"q-job-detail-value",textContent:d(i?.attemptsMade)},null,8,w4)])):f("v-if",!0),i?.progress&&i?.progress?.status?(a(),l("div",k4,[t[62]||(t[62]=n("span",{class:"q-job-detail-label"},"Status",-1)),n("span",{class:"q-job-detail-value",textContent:d(i?.progress?.status)},null,8,C4)])):f("v-if",!0),e.jobProgressPct(i)!==null?(a(),l("div",S4,[t[63]||(t[63]=n("span",{class:"q-job-detail-label"},"Progress",-1)),n("span",{class:"q-job-detail-value",textContent:d(e.jobProgressPct(i)+"%")},null,8,E4)])):f("v-if",!0)]),i?.failedReason?(a(),l("div",N4,[t[64]||(t[64]=n("span",{class:"q-job-detail-label"},"Error",-1)),n("div",{class:"q-error-reason",textContent:d(i?.failedReason)},null,8,R4)])):f("v-if",!0),i?.stacktrace?.length?(a(),l("div",T4,[t[65]||(t[65]=n("span",{class:"q-job-detail-label"},"Stacktrace",-1)),(a(!0),l(V,null,Q(i?.stacktrace,(r,u)=>(a(),l("pre",{class:"q-error-stack",key:u},[n("code",{textContent:d(r)},null,8,P4)]))),128))])):f("v-if",!0),n("div",D4,[i?._state=="failed"?(a(),l("button",{key:0,class:"btn btn-sm",onClick:r=>e.retryJob(i)},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),h(" Retry",-1)])],8,A4)):f("v-if",!0),n("button",{class:"btn btn-sm",onClick:r=>e.removeJob(i)},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),h(" Remove",-1)])],8,I4),n("a",{class:"btn btn-sm",target:"_blank",href:e.safeUrl("/r/"+i?.id)},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1),h(" View repo",-1)])],8,O4)])])])])):f("v-if",!0)]))),256))])):f("v-if",!0),e.filteredJobs().length==0?(a(),l("div",M4,[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1)),e.query?.search?f("v-if",!0):(a(),l("span",V4,"No jobs in the "+d(e.selectedQueue)+" queue.",1)),e.query?.search?(a(),l("span",q4,"No jobs match the current filters.")):f("v-if",!0)])):f("v-if",!0)])])}var L4={class:"container paper-page admin-page"},$4={class:"seg-bar"},_4={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},F4=["aria-checked"],U4={class:"count"},B4=["aria-checked"],z4={class:"count"},H4=["aria-checked"],j4={class:"count"},G4=["aria-checked"],W4={class:"count"},K4=["aria-checked"],Y4={class:"count"},J4=["aria-checked"],X4={class:"count"},Q4={class:"seg-countline",role:"status"},Z4={class:"seg-meta"},x4={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},eP={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},tP=["aria-expanded"],nP={class:"search-wrap"},oP={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repositories\u2026",autocomplete:"off"},sP={key:0,class:"admin-search-hint"},iP={class:"admin-filter-inline"},rP={type:"text",class:"form-control form-control-sm",placeholder:"username"},aP={class:"admin-filter-inline"},lP={type:"text",class:"form-control form-control-sm",placeholder:"ID"},dP={key:0,class:"admin-filter-inline","aria-label":"Pagination"},uP=["disabled"],cP={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},pP=["disabled"],fP={key:0,class:"admin-filter-row"},mP={class:"admin-active-chips"},hP={class:"key"},gP=["onClick"],vP={key:1,class:"bulk-bar"},yP={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},bP={class:"paper-table-head",role:"row"},wP={role:"columnheader",style:{width:"28px"}},kP=["checked"],CP={role:"columnheader"},SP={role:"columnheader"},EP={role:"columnheader",class:"num"},NP={role:"columnheader"},RP={role:"cell",style:{width:"28px"}},TP={type:"checkbox","aria-label":"Select repository"},PP={class:"cell-anon",role:"cell"},DP={class:"anon-text"},AP=["textContent","href"],IP=["title"],OP=["href"],MP=["textContent"],VP=["textContent"],qP=["data-meta-label"],LP=["title","textContent","href"],$P=["data-meta-label"],_P=["textContent","href"],FP=["data-meta-label"],UP={key:3,class:"meta-item"},BP={class:"meta-item"},zP={class:"cell-status",role:"cell"},HP={class:"status-line"},jP=["textContent"],GP=["textContent","title"],WP=["data-unit"],KP=["textContent"],YP={class:"cell-expires",role:"cell"},JP=["textContent"],XP={class:"cell-actions",role:"cell"},QP={class:"dropdown"},ZP={class:"dropdown-menu dropdown-menu-right"},xP=["href"],eD=["href"],tD=["href"],nD=["onClick"],oD=["onClick"],sD=["onClick"],iD=["onClick"],rD=["onClick"],aD=["onClick"],lD={key:0,class:"paper-table-empty"},dD={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},uD={key:0,class:"pagination-compact"},cD=["disabled"],pD=["max"],fD=["disabled"],mD={class:"admin-filter-inline"},hD={class:"form-control form-control-sm"};function up(e,t){let s=Pe("field"),i=Pe("form");return a(),l("div",L4,[t[80]||(t[80]=ke('
Admin \xA0/\xA0 Repositories

Repositories

',3)),n("div",$4,[n("div",_4,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[0]||(t[0]=o=>e.setSegView("all"))},[t[21]||(t[21]=h("All ",-1)),n("span",U4,d(e.fmt?.number(e.segCount("all"))),1)],10,F4),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="ready","is-empty":!e.segCount("ready")}]),"aria-checked":e.segView()==="ready",onClick:t[1]||(t[1]=o=>e.setSegView("ready"))},[t[22]||(t[22]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[23]||(t[23]=h("Ready ",-1)),n("span",z4,d(e.fmt?.number(e.segCount("ready"))),1)],10,B4),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="preparing","is-empty":!e.segCount("preparing")}]),"aria-checked":e.segView()==="preparing",onClick:t[2]||(t[2]=o=>e.setSegView("preparing"))},[t[24]||(t[24]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[25]||(t[25]=h("Preparing ",-1)),n("span",j4,d(e.fmt?.number(e.segCount("preparing"))),1)],10,H4),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="error","is-empty":!e.segCount("error")}]),"aria-checked":e.segView()==="error",onClick:t[3]||(t[3]=o=>e.setSegView("error"))},[t[26]||(t[26]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[27]||(t[27]=h("Error ",-1)),n("span",W4,d(e.fmt?.number(e.segCount("error"))),1)],10,G4),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="expired","is-empty":!e.segCount("expired")}]),"aria-checked":e.segView()==="expired",onClick:t[4]||(t[4]=o=>e.setSegView("expired"))},[t[28]||(t[28]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[29]||(t[29]=h("Expiring / expired ",-1)),n("span",Y4,d(e.fmt?.number(e.segCount("expired"))),1)],10,K4),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="removed","is-empty":!e.segCount("removed")}]),"aria-checked":e.segView()==="removed",onClick:t[5]||(t[5]=o=>e.setSegView("removed"))},[t[30]||(t[30]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[31]||(t[31]=h("Removing / removed ",-1)),n("span",X4,d(e.fmt?.number(e.segCount("removed"))),1)],10,J4)]),n("p",Q4,[n("strong",null,d(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[32]||(t[32]=h(" shown",-1)),t[33]||(t[33]=n("span",{class:"seg-sep"},"\xB7",-1)),n("span",Z4,d(e.fmt?.humanFileSize(e.totalSize))+" on disk",1)])]),e.fetchError?(a(),l("div",x4,[t[34]||(t[34]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),h(" "+d(e.fetchError),1)])):f("v-if",!0),P((a(),l("form",eP,[f(" Row 1: search + scoped inputs + headline actions "),n("button",{type:"button",class:"btn btn-sm admin-filters-toggle",onClick:t[6]||(t[6]=o=>e.filtersOpen=!e.filtersOpen),"aria-expanded":e.filtersOpen?"true":"false"},"Filters",8,tP),n("div",{class:R(["admin-filter-row",{"is-open":e.filtersOpen}])},[n("div",nP,[P(n("input",oP,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(a(),l("span",sP,"/"))]),n("span",iP,[t[35]||(t[35]=n("label",null,"Owner",-1)),P(n("input",rP,null,512),[[s,{state:e.viewState,set:o=>{e.query.owner=o},value:e.query?.owner,form:null,options:{}}]])]),n("span",aP,[t[36]||(t[36]=n("label",null,"Conference",-1)),P(n("input",lP,null,512),[[s,{state:e.viewState,set:o=>{e.query.conference=o},value:e.query?.conference,form:null,options:{}}]])]),t[40]||(t[40]=n("span",{class:"admin-filter-spacer"},null,-1)),n("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[7]||(t[7]=o=>e.exportCsv())},[...t[37]||(t[37]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),h(" Export",-1)])]),e.totalPage>1?(a(),l("span",dP,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[8]||(t[8]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[38]||(t[38]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,uP),n("span",cP,d(e.query?.page)+"/"+d(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[9]||(t[9]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[39]||(t[39]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,pP)])):f("v-if",!0)],2),f(" Row 2: appears only when there are active filter chips "),e.chips?.length?(a(),l("div",fP,[n("div",mP,[(a(!0),l(V,null,Q(e.chips,(o,r)=>(a(),l("span",{class:"admin-active-chip",key:o?.key},[n("span",hP,d(o?.label),1),n("span",null,d(o?.value),1),n("button",{type:"button","aria-label":"Remove filter",onClick:u=>e.clearFilter(o.key)},[...t[41]||(t[41]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,gP)]))),128))])])):f("v-if",!0)])),[[i,e.viewState]]),e.selectedCount()>0?(a(),l("div",vP,[n("span",null,[n("strong",null,d(e.selectedCount()),1),t[42]||(t[42]=h(" selected",-1))]),n("button",{class:"btn btn-sm",type:"button",onClick:t[10]||(t[10]=o=>e.bulkRefresh())},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),h(" Force refresh",-1)])]),n("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[11]||(t[11]=o=>e.bulkRemoveCache())},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),h(" Remove cache",-1)])]),n("button",{class:"btn btn-sm",type:"button",onClick:t[12]||(t[12]=o=>e.clearSelection())},"Clear")])):f("v-if",!0),n("div",yP,[n("div",bP,[n("div",wP,[n("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[13]||(t[13]=o=>e.selectAllOnPage()),checked:e.allSelected},null,8,kP)]),n("div",CP,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[14]||(t[14]=o=>e.sortBy("source.repositoryName"))},[t[46]||(t[46]=h("Repository ",-1)),e.sortIcon("source.repositoryName")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("source.repositoryName")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[45]||(t[45]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",SP,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="status"}]),onClick:t[15]||(t[15]=o=>e.sortBy("status"))},[t[48]||(t[48]=h("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[47]||(t[47]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",EP,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[16]||(t[16]=o=>e.sortBy("pageView"))},[t[50]||(t[50]=h("Views ",-1)),e.sortIcon("pageView")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("pageView")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[49]||(t[49]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",NP,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[17]||(t[17]=o=>e.sortBy("anonymizeDate"))},[t[52]||(t[52]=h("Anonymized ",-1)),e.sortIcon("anonymizeDate")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("anonymizeDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[51]||(t[51]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[53]||(t[53]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(a(!0),l(V,null,Q(e.filteredRepositories,(o,r)=>(a(),l("div",{class:R(["paper-table-row",{"repo-inactive":o?.status=="expired"||o?.status=="removed","repo-error":o?.status=="error","row-selected":e.selected[o?.repoId]}]),role:"row"},[n("div",RP,[P(n("input",TP,null,512),[[s,{state:e.viewState,set:u=>{e.selected[o.repoId]=u},value:e.selected[o?.repoId],form:null,options:{}}]])]),n("div",PP,[t[56]||(t[56]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[n("use",{href:"#project-type-repo"})],-1)),n("div",DP,[n("a",{class:"repo-name",target:"_blank",textContent:d(o?.repoId),href:e.safeUrl("/r/"+o?.repoId)},null,8,AP),n("div",{class:"anon-sub anon-meta","data-meta-fit":"",title:[o?.source?.fullName||o?.source?.repositoryName,o?.options?.update?"branch "+o?.source?.branch:"commit "+o?.source?.commit?.substring(0,7),o?.conference?"conference "+o?.conference:"",o?.size?.storage>0?e.fmt?.humanFileSize(o?.size?.storage):"",e.fmt?.number(o?.options?.terms?.length)+(o?.options?.terms?.length===1?" term":" terms")].filter(Boolean).join(" \xB7 ")},[n("a",{class:"src-path",href:e.safeUrl("https://github.com/"+o?.source?.repositoryName+"/")},[(o?.source?.repositoryName||"").includes("/")?(a(),l("span",{key:0,class:"src-owner",textContent:d((u=>u.length>16?u.slice(0,14)+"\u2026":u)((o?.source?.repositoryName||"").split("/")[0]))},null,8,MP)):f("v-if",!0),n("span",{class:"src-repo",textContent:d((o?.source?.repositoryName||"").includes("/")?"/"+(o?.source?.repositoryName||"").split("/").slice(1).join("/"):o?.source?.repositoryName)},null,8,VP)],8,OP),o?.options?.update?f("v-if",!0):(a(),l("span",{key:0,class:"meta-item","data-meta-label":"commit "+(o?.source?.commit||"").substring(0,7)},[n("a",{class:"mono-hash",title:o?.source?.commit,textContent:d(o?.source?.commit?.substring(0,7)),href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/tree/"+o?.source?.commit)},null,8,LP)],8,qP)),o?.options?.update?(a(),l("span",{key:1,class:"meta-item","data-meta-label":"branch "+(o?.source?.branch||"")},[n("a",{textContent:d(o?.source?.branch),href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/tree/"+o?.source?.branch)},null,8,_P)],8,$P)):f("v-if",!0),o?.conference?(a(),l("span",{key:2,class:"meta-item meta-conf","data-meta-label":"conference "+o?.conference},[t[54]||(t[54]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),h(" "+d(o?.conference),1)],8,FP)):f("v-if",!0),o?.size?.storage>0?(a(),l("span",UP,d(e.fmt?.humanFileSize(o?.size?.storage)),1)):f("v-if",!0),n("span",BP,d(e.fmt?.number(o?.options?.terms?.length))+" "+d(o?.options?.terms?.length===1?"term":"terms"),1),t[55]||(t[55]=n("span",{class:"meta-more",hidden:""},null,-1))],8,IP)])]),n("div",zP,[n("span",HP,[n("span",{class:R(["status-dot","st-"+(o?.status||"unknown")])},null,2),n("span",{textContent:d(e.fmt?.statusLabel(o?.status))},null,8,jP)]),o?.statusMessage?(a(),l("span",{key:0,class:"status-sub",textContent:d(e.fmt?.statusMsg(o?.statusMessage)),title:o?.statusMessage},null,8,GP)):f("v-if",!0)]),n("div",{class:"cell-views num",role:"cell","data-unit":(o?.pageView||0)===1?"view":"views"},[t[57]||(t[57]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1)),t[58]||(t[58]=h()),n("span",{textContent:d(e.fmt?.number(o?.pageView||0))},null,8,KP)],8,WP),n("div",YP,[t[59]||(t[59]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[60]||(t[60]=h()),n("span",{textContent:d((e.fmt?.humanTime(o?.anonymizeDate)||"").replace(/^on /,""))},null,8,JP)]),n("div",XP,[n("div",QP,[t[72]||(t[72]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",ZP,[n("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+o?.repoId)},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),h(" Edit",-1)])],8,xP),n("a",{class:"dropdown-item",href:e.safeUrl("/r/"+o?.repoId+"/")},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),h(" View repo",-1)])],8,eD),o?.options?.page&&o?.status=="ready"?(a(),l("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+o?.repoId+"/")},[...t[63]||(t[63]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),h(" View page",-1)])],8,tD)):f("v-if",!0),n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.fetchGithubInfo(o),["prevent"])},[...t[64]||(t[64]=[n("i",{class:"fab fa-github"},null,-1),h(" Live GitHub info",-1)])],8,nD),t[70]||(t[70]=n("div",{class:"dropdown-divider"},null,-1)),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.updateRepository(o),["prevent"])},[...t[65]||(t[65]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),h(" Force update",-1)])],8,oD),[[Z,o?.status=="ready"||o?.status=="error"]]),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.updateRepository(o),["prevent"])},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),h(" Enable",-1)])],8,sD),[[Z,o?.status=="removed"]]),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.showStatusMessage(o),["prevent"])},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1),h(" View status message",-1)])],8,iD),[[Z,o?.statusMessage]]),t[71]||(t[71]=n("div",{class:"dropdown-divider"},null,-1)),n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.removeCache(o),["prevent"])},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),h(" Remove cache",-1)])],8,rD),P(n("a",{class:"dropdown-item text-danger",href:"#",onClick:de(u=>e.removeRepository(o),["prevent"])},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),h(" Remove",-1)])],8,aD),[[Z,o?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(a(),l("div",lD,[t[73]||(t[73]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),t[74]||(t[74]=n("span",null,"No repositories match the current filters.",-1)),e.query.ready&&e.query.expired&&e.query.removed&&e.query.error&&e.query.preparing?f("v-if",!0):(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-outline-ink",onClick:t[18]||(t[18]=o=>e.showAllStatuses())},"Show all statuses"))])):f("v-if",!0)]),n("div",dD,[t[79]||(t[79]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",uD,[n("button",{class:"btn btn-sm",onClick:t[19]||(t[19]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),h(" Previous ",-1)])],8,cD),P(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},"aria-label":"Page",max:e.totalPage},null,8,pD),[[s,{state:e.viewState,set:o=>{e.query.page=o},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+d(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[20]||(t[20]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[76]||(t[76]=[h(" Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,fD)])):f("v-if",!0),n("span",mD,[t[78]||(t[78]=n("label",null,"Per page",-1)),P((a(),l("select",hD,[...t[77]||(t[77]=[ke('',5)])])),[[s,{state:e.viewState,set:o=>{e.query.limit=o},value:e.query?.limit,form:null,options:{}}]])])])])}var gD={class:"container paper-page admin-page"},vD={class:"paper-crumbs"},yD={class:"here"},bD={class:"paper-page-title"},wD={key:0,class:"user-detail-card"},kD={class:"user-header"},CD=["src"],SD={class:"user-header-status"},ED={class:"status-dot-wrap"},ND=["textContent"],RD={key:0,class:"type-badge type-repo"},TD={class:"user-actions",style:{"margin-top":"4px"}},PD={class:"user-detail-grid"},DD={class:"detail-value mono-id"},AD={class:"detail-value"},ID=["href"],OD={class:"detail-value"},MD={class:"detail-value"},VD={key:0},qD={key:1,class:"text-muted"},LD={class:"detail-value"},$D={key:0,style:{"margin-top":"20px"}},_D={class:"paper-table w-100",style:{"margin-top":"10px"}},FD={class:"paper-table-row",style:{"grid-template-columns":"1fr 160px"}},UD={class:"cell-anon",role:"cell"},BD={class:"anon-text"},zD=["textContent"],HD={class:"cell-expires",role:"cell"},jD={key:1,class:"admin-section-header"},GD={class:"section-count"},WD={key:2,class:"user-detail-card"},KD={type:"text",class:"form-control",placeholder:"Token name (e.g. dev-laptop)",required:""},YD={key:0,class:"alert alert-warning",role:"alert"},JD={style:{"white-space":"pre-wrap","word-break":"break-all",margin:"8px 0 0","font-family":"var(--font-mono)","font-size":"0.85rem"}},XD={key:1,class:"paper-table w-100"},QD={class:"paper-table-row",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},ZD=["textContent"],xD=["textContent"],eA={role:"cell"},tA={key:0},nA={key:1,class:"text-muted"},oA={role:"cell"},sA=["onClick"],iA={key:2,class:"paper-table-empty"},rA={class:"admin-section-header"},aA={class:"section-count"},lA={class:"seg-bar"},dA={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},uA=["aria-checked"],cA={class:"count"},pA=["aria-checked"],fA={class:"count"},mA=["aria-checked"],hA={class:"count"},gA=["aria-checked"],vA={class:"count"},yA=["aria-checked"],bA={class:"count"},wA=["aria-checked"],kA={class:"count"},CA={class:"seg-countline",role:"status"},SA={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},EA={class:"admin-filter-row"},NA={class:"search-wrap"},RA={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repositories or errors\u2026",autocomplete:"off"},TA={key:3,class:"bulk-bar"},PA={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},DA={class:"paper-table-head",role:"row"},AA={role:"columnheader",style:{width:"28px"}},IA=["checked"],OA={role:"columnheader"},MA={role:"columnheader"},VA={role:"columnheader",class:"num"},qA={role:"columnheader"},LA={role:"cell",style:{width:"28px"}},$A={type:"checkbox","aria-label":"Select repository"},_A={class:"cell-anon",role:"cell"},FA={class:"anon-text"},UA=["textContent","href"],BA=["title"],zA=["href"],HA=["textContent"],jA=["textContent"],GA=["data-meta-label"],WA=["title","textContent","href"],KA=["data-meta-label"],YA=["textContent","href"],JA=["data-meta-label"],XA={key:3,class:"meta-item"},QA={class:"meta-item"},ZA={class:"cell-status",role:"cell"},xA={class:"status-line"},e3=["textContent"],t3=["textContent","title"],n3=["data-unit","textContent"],o3=["textContent"],s3={class:"cell-actions",role:"cell"},i3={class:"dropdown"},r3={class:"dropdown-menu dropdown-menu-right"},a3=["href"],l3=["href"],d3=["href"],u3=["onClick"],c3=["onClick"],p3=["onClick"],f3=["onClick"],m3=["onClick"],h3=["onClick"],g3={key:0,class:"paper-table-empty"};function cp(e,t){let s=Pe("field"),i=Pe("form");return a(),l("div",gD,[n("div",vD,[t[23]||(t[23]=n("a",{href:"/admin/"},"Admin",-1)),t[24]||(t[24]=h(" \xA0/\xA0 ",-1)),t[25]||(t[25]=n("a",{href:"/admin/users"},"Users",-1)),t[26]||(t[26]=h(" \xA0/\xA0 ",-1)),n("span",yD,d(e.userInfo?.username||"Profile"),1)]),n("h1",bD,d(e.userInfo?.username||"User"),1),t[93]||(t[93]=ke('',1)),e.userInfo?(a(),l("div",wD,[n("div",kD,[e.userInfo?.photo?(a(),l("img",{key:0,width:"56",height:"56",src:e.safeUrl(e.userInfo?.photo)},null,8,CD)):f("v-if",!0),n("div",null,[n("div",SD,[n("span",ED,[n("span",{class:R(["status-dot","st-"+(e.userInfo?.status||"unknown")])},null,2),n("span",{textContent:d(e.fmt?.title(e.userInfo?.status))},null,8,ND)]),e.userInfo?.isAdmin?(a(),l("span",RD,"Admin")):f("v-if",!0)]),n("div",TD,[e.userInfo?.status!=="banned"&&e.userInfo?.username!==e.user?.username?(a(),l("button",{key:0,class:"btn btn-sm btn-outline-danger",onClick:t[0]||(t[0]=o=>e.banUser())},[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-ban"})],-1),h(" Ban",-1)])])):f("v-if",!0),e.userInfo?.status==="banned"||e.userInfo?.status==="removed"?(a(),l("button",{key:1,class:"btn btn-sm",onClick:t[1]||(t[1]=o=>e.activateUser())},[...t[28]||(t[28]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),h(" Activate",-1)])])):f("v-if",!0),e.userInfo?.isAdmin?f("v-if",!0):(a(),l("button",{key:2,class:"btn btn-sm",onClick:t[2]||(t[2]=o=>e.promoteUser())},[...t[29]||(t[29]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user-shield"})],-1),h(" Promote to admin",-1)])])),e.userInfo?.isAdmin&&e.userInfo?.username!==e.user?.username?(a(),l("button",{key:3,class:"btn btn-sm btn-outline-ink",onClick:t[3]||(t[3]=o=>e.demoteUser())},[...t[30]||(t[30]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user-minus"})],-1),h(" Remove admin",-1)])])):f("v-if",!0)])])]),n("div",PD,[t[33]||(t[33]=n("div",{class:"detail-label"},"ID",-1)),n("div",DD,d(e.userInfo?._id),1),t[34]||(t[34]=n("div",{class:"detail-label"},"Email",-1)),n("div",{class:R(["detail-value",{"is-empty":!e.userInfo?.emails?.[0]?.email}])},d(e.userInfo?.emails?.[0]?.email||"Not shared"),3),t[35]||(t[35]=n("div",{class:"detail-label"},"Access token",-1)),n("div",{class:R(["detail-value",{"is-empty":!e.userInfo?.accessTokens?.github}]),style:{"font-family":"var(--font-mono)","font-size":"0.85rem"}},d(e.userInfo?.accessTokens?.github||"Not stored"),3),t[36]||(t[36]=n("div",{class:"detail-label"},"GitHub",-1)),n("div",AD,[n("a",{target:"_blank",href:e.safeUrl("https://github.com/"+e.userInfo?.username)},[t[31]||(t[31]=n("i",{class:"fab fa-github"},null,-1)),h(" "+d(e.userInfo?.username),1)],8,ID)]),t[37]||(t[37]=n("div",{class:"detail-label"},"Created",-1)),n("div",OD,d(e.fmt?.humanTime(e.userInfo?.dateOfEntry)),1),t[38]||(t[38]=n("div",{class:"detail-label"},"Last connection",-1)),n("div",MD,[e.userInfo?.accessTokenDates?.github?(a(),l("span",VD,d(e.fmt?.humanTime(e.userInfo?.accessTokenDates?.github)),1)):f("v-if",!0),e.userInfo?.accessTokenDates?.github?f("v-if",!0):(a(),l("span",qD,"Not recorded (GitHub App sign-in)"))]),t[39]||(t[39]=n("div",{class:"detail-label"},"GitHub repos",-1)),n("div",LD,[h(d(e.userInfo?.repositories?.length?e.userInfo.repositories.length+" repositories":"Not synced")+" ",1),e.userInfo?.repositories?.length?(a(),l("button",{key:0,class:"btn btn-sm ml-2",onClick:t[4]||(t[4]=o=>e.showRepos=!e.showRepos)},d(e.showRepos?"Hide repos":"Show repos"),1)):f("v-if",!0),n("button",{class:"btn btn-sm ml-1",onClick:t[5]||(t[5]=o=>e.getGitHubRepositories())},[...t[32]||(t[32]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),h(" Refresh ",-1)])])])]),e.showRepos?(a(),l("div",$D,[t[42]||(t[42]=n("div",{class:"paper-section-eyebrow"},"GitHub repositories",-1)),n("div",_D,[(a(!0),l(V,null,Q(e.userInfo?.repositories,(o,r)=>(a(),l("div",FD,[n("div",UD,[t[40]||(t[40]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[n("use",{href:"#project-type-repo"})],-1)),n("div",BD,[n("span",{class:"repo-name",textContent:d(o?.name)},null,8,zD)])]),n("div",HD,[t[41]||(t[41]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-database"})],-1)),h(" "+d(e.fmt?.humanFileSize(o?.size)),1)])]))),256))])])):f("v-if",!0)])):f("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(a(),l("div",jD,[t[43]||(t[43]=n("h2",null,[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-key"})]),h(" API tokens")],-1)),n("span",GD,d(e.tokens?.length),1)])):f("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(a(),l("div",WD,[t[49]||(t[49]=n("p",{class:"paper-page-lede"},[h("Personal API tokens for this admin account. Send as "),n("code",null,"Authorization: Bearer "),h(" to authenticate without GitHub OAuth (useful for development).")],-1)),P((a(),l("form",{class:"d-flex",style:{gap:"8px","margin-bottom":"12px"},onSubmit:t[6]||(t[6]=de(o=>e.submitForm(o,()=>{e.createToken()}),["prevent"]))},[P(n("input",KD,null,512),[[s,{state:e.viewState,set:o=>{e.tokenForm.name=o},value:e.tokenForm?.name,form:null,options:{}}]]),t[44]||(t[44]=n("button",{type:"submit",class:"btn btn-ink"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-plus"})]),h(" Generate")],-1))],32)),[[i,e.viewState]]),e.tokenForm?.plaintext?(a(),l("div",YD,[t[45]||(t[45]=n("strong",null,"Copy this token now \u2014 it will not be shown again:",-1)),n("pre",JD,d(e.tokenForm?.plaintext),1),n("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=o=>e.tokenForm.plaintext=null)},"Dismiss")])):f("v-if",!0),e.tokens?.length?(a(),l("div",XD,[t[47]||(t[47]=n("div",{class:"paper-table-head",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},[n("div",{role:"columnheader"},"Name"),n("div",{role:"columnheader"},"Created"),n("div",{role:"columnheader"},"Last used"),n("div",{role:"columnheader","aria-label":"Actions"})],-1)),(a(!0),l(V,null,Q(e.tokens,(o,r)=>(a(),l("div",QD,[n("div",{role:"cell",textContent:d(o?.name)},null,8,ZD),n("div",{role:"cell",textContent:d(e.fmt?.humanTime(o?.createdAt))},null,8,xD),n("div",eA,[o?.lastUsedAt?(a(),l("span",tA,d(e.fmt?.humanTime(o?.lastUsedAt)),1)):f("v-if",!0),o?.lastUsedAt?f("v-if",!0):(a(),l("span",nA,"never"))]),n("div",oA,[n("button",{class:"btn btn-sm text-danger btn-icon",title:"Revoke","aria-label":"Revoke token",onClick:u=>e.revokeToken(o)},[...t[46]||(t[46]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1)])],8,sA)])]))),256))])):f("v-if",!0),e.tokens?.length?f("v-if",!0):(a(),l("div",iA,[...t[48]||(t[48]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No tokens yet.",-1)])]))])):f("v-if",!0),n("div",rA,[t[50]||(t[50]=n("h2",null,[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})]),h(" Anonymized repositories")],-1)),n("span",aA,d(e.repositories?.length),1)]),n("div",lA,[n("div",dA,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[8]||(t[8]=o=>e.setSegView("all"))},[t[51]||(t[51]=h("All ",-1)),n("span",cA,d(e.fmt?.number(e.segCount("all"))),1)],10,uA),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="ready","is-empty":!e.segCount("ready")}]),"aria-checked":e.segView()==="ready",onClick:t[9]||(t[9]=o=>e.setSegView("ready"))},[t[52]||(t[52]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[53]||(t[53]=h("Ready ",-1)),n("span",fA,d(e.fmt?.number(e.segCount("ready"))),1)],10,pA),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="preparing","is-empty":!e.segCount("preparing")}]),"aria-checked":e.segView()==="preparing",onClick:t[10]||(t[10]=o=>e.setSegView("preparing"))},[t[54]||(t[54]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[55]||(t[55]=h("Preparing ",-1)),n("span",hA,d(e.fmt?.number(e.segCount("preparing"))),1)],10,mA),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="error","is-empty":!e.segCount("error")}]),"aria-checked":e.segView()==="error",onClick:t[11]||(t[11]=o=>e.setSegView("error"))},[t[56]||(t[56]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[57]||(t[57]=h("Error ",-1)),n("span",vA,d(e.fmt?.number(e.segCount("error"))),1)],10,gA),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="expired","is-empty":!e.segCount("expired")}]),"aria-checked":e.segView()==="expired",onClick:t[12]||(t[12]=o=>e.setSegView("expired"))},[t[58]||(t[58]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[59]||(t[59]=h("Expiring / expired ",-1)),n("span",bA,d(e.fmt?.number(e.segCount("expired"))),1)],10,yA),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.segView()==="removed","is-empty":!e.segCount("removed")}]),"aria-checked":e.segView()==="removed",onClick:t[13]||(t[13]=o=>e.setSegView("removed"))},[t[60]||(t[60]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[61]||(t[61]=h("Removing / removed ",-1)),n("span",kA,d(e.fmt?.number(e.segCount("removed"))),1)],10,wA)]),n("p",CA,[n("strong",null,d(e.fmt.number(e.filteredRepositories?.length||0)),1),t[62]||(t[62]=h(" shown",-1))])]),P((a(),l("form",SA,[n("div",EA,[n("div",NA,[P(n("input",RA,null,512),[[s,{state:e.viewState,set:o=>{e.search=o},value:e.search,form:null,options:{}}]])]),t[64]||(t[64]=n("span",{class:"admin-filter-spacer"},null,-1)),n("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[14]||(t[14]=o=>e.exportCsv())},[...t[63]||(t[63]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),h(" Export",-1)])])])])),[[i,e.viewState]]),e.selectedCount()>0?(a(),l("div",TA,[n("span",null,[n("strong",null,d(e.selectedCount()),1),t[65]||(t[65]=h(" selected",-1))]),n("button",{class:"btn btn-sm",type:"button",onClick:t[15]||(t[15]=o=>e.bulkRefresh())},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),h(" Force refresh",-1)])]),n("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[16]||(t[16]=o=>e.bulkRemoveCache())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),h(" Remove cache",-1)])]),n("button",{class:"btn btn-sm",type:"button",onClick:t[17]||(t[17]=o=>e.clearSelection())},"Clear")])):f("v-if",!0),n("div",PA,[n("div",DA,[n("div",AA,[n("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[18]||(t[18]=o=>e.selectAllOnPage()),checked:e.allSelected},null,8,IA)]),n("div",OA,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[19]||(t[19]=o=>e.sortBy("source.repositoryName"))},[t[69]||(t[69]=h("Repository ",-1)),e.sortIcon("source.repositoryName")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("source.repositoryName")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[68]||(t[68]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",MA,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="status"}]),onClick:t[20]||(t[20]=o=>e.sortBy("status"))},[t[71]||(t[71]=h("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[70]||(t[70]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",VA,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[21]||(t[21]=o=>e.sortBy("pageView"))},[t[73]||(t[73]=h("Views ",-1)),e.sortIcon("pageView")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("pageView")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[72]||(t[72]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",qA,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[22]||(t[22]=o=>e.sortBy("anonymizeDate"))},[t[75]||(t[75]=h("Anonymized ",-1)),e.sortIcon("anonymizeDate")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("anonymizeDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[74]||(t[74]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[76]||(t[76]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(a(!0),l(V,null,Q(e.filteredRepositories,(o,r)=>(a(),l("div",{class:R(["paper-table-row",{"repo-inactive":o?.status=="expired"||o?.status=="removed","repo-error":o?.status=="error","row-selected":e.selected[o?.repoId]}]),role:"row"},[n("div",LA,[P(n("input",$A,null,512),[[s,{state:e.viewState,set:u=>{e.selected[o.repoId]=u},value:e.selected[o?.repoId],form:null,options:{}}]])]),n("div",_A,[t[79]||(t[79]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[n("use",{href:"#project-type-repo"})],-1)),n("div",FA,[n("a",{class:"repo-name",target:"_blank",textContent:d(o?.repoId),href:e.safeUrl("/r/"+o?.repoId)},null,8,UA),n("div",{class:"anon-sub anon-meta","data-meta-fit":"",title:[o?.source?.fullName||o?.source?.repositoryName,o?.options?.update?"branch "+o?.source?.branch:"commit "+o?.source?.commit?.substring(0,7),o?.conference?"conference "+o?.conference:"",o?.size?.storage>0?e.fmt?.humanFileSize(o?.size?.storage):"",e.fmt?.number(o?.options?.terms?.length)+(o?.options?.terms?.length===1?" term":" terms")].filter(Boolean).join(" \xB7 ")},[n("a",{class:"src-path",href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/")},[(o?.source?.fullName||"").includes("/")?(a(),l("span",{key:0,class:"src-owner",textContent:d((u=>u.length>16?u.slice(0,14)+"\u2026":u)((o?.source?.fullName||"").split("/")[0]))},null,8,HA)):f("v-if",!0),n("span",{class:"src-repo",textContent:d((o?.source?.fullName||"").includes("/")?"/"+(o?.source?.fullName||"").split("/").slice(1).join("/"):o?.source?.fullName)},null,8,jA)],8,zA),o?.options?.update?f("v-if",!0):(a(),l("span",{key:0,class:"meta-item","data-meta-label":"commit "+(o?.source?.commit||"").substring(0,7)},[n("a",{class:"mono-hash",title:o?.source?.commit,textContent:d(o?.source?.commit?.substring(0,7)),href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/tree/"+o?.source?.commit)},null,8,WA)],8,GA)),o?.options?.update?(a(),l("span",{key:1,class:"meta-item","data-meta-label":"branch "+(o?.source?.branch||"")},[n("a",{textContent:d(o?.source?.branch),href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/tree/"+o?.source?.branch)},null,8,YA)],8,KA)):f("v-if",!0),o?.conference?(a(),l("span",{key:2,class:"meta-item meta-conf","data-meta-label":"conference "+o?.conference},[t[77]||(t[77]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),h(" "+d(o?.conference),1)],8,JA)):f("v-if",!0),o?.size?.storage>0?(a(),l("span",XA,d(e.fmt?.humanFileSize(o?.size?.storage)),1)):f("v-if",!0),n("span",QA,d(e.fmt?.number(o?.options?.terms?.length))+" "+d(o?.options?.terms?.length===1?"term":"terms"),1),t[78]||(t[78]=n("span",{class:"meta-more",hidden:""},null,-1))],8,BA)])]),n("div",ZA,[n("span",xA,[n("span",{class:R(["status-dot","st-"+(o?.status||"unknown")])},null,2),n("span",{textContent:d(e.fmt?.statusLabel(o?.status))},null,8,e3)]),o?.statusMessage?(a(),l("span",{key:0,class:"status-sub",textContent:d(e.fmt?.statusMsg(o?.statusMessage)),title:o?.statusMessage},null,8,t3)):f("v-if",!0)]),n("div",{class:"cell-views num",role:"cell","data-unit":(o?.pageView||0)===1?"view":"views",textContent:d(e.fmt?.number(o?.pageView||0))},null,8,n3),n("div",{class:"cell-expires",role:"cell",textContent:d(e.fmt?.humanTime(o?.anonymizeDate))},null,8,o3),n("div",s3,[n("div",i3,[t[91]||(t[91]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",r3,[n("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+o?.repoId)},[...t[80]||(t[80]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),h(" Edit",-1)])],8,a3),n("a",{class:"dropdown-item",href:e.safeUrl("/r/"+o?.repoId+"/")},[...t[81]||(t[81]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),h(" View repo",-1)])],8,l3),o?.options?.page&&o?.status=="ready"?(a(),l("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+o?.repoId+"/")},[...t[82]||(t[82]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),h(" View page",-1)])],8,d3)):f("v-if",!0),n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.fetchGithubInfo(o),["prevent"])},[...t[83]||(t[83]=[n("i",{class:"fab fa-github"},null,-1),h(" Live GitHub info",-1)])],8,u3),t[89]||(t[89]=n("div",{class:"dropdown-divider"},null,-1)),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.updateRepository(o),["prevent"])},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),h(" Force update",-1)])],8,c3),[[Z,o?.status=="ready"||o?.status=="error"]]),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.updateRepository(o),["prevent"])},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),h(" Enable",-1)])],8,p3),[[Z,o?.status=="removed"]]),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.showStatusMessage(o),["prevent"])},[...t[86]||(t[86]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1),h(" View status message",-1)])],8,f3),[[Z,o?.statusMessage]]),t[90]||(t[90]=n("div",{class:"dropdown-divider"},null,-1)),n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.removeCache(o),["prevent"])},[...t[87]||(t[87]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),h(" Remove cache",-1)])],8,m3),P(n("a",{class:"dropdown-item text-danger",href:"#",onClick:de(u=>e.removeRepository(o),["prevent"])},[...t[88]||(t[88]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),h(" Remove",-1)])],8,h3),[[Z,o?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(a(),l("div",g3,[...t[92]||(t[92]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No repositories match the current filters.",-1)])])):f("v-if",!0)])])}var v3={class:"container paper-page admin-page"},y3={class:"seg-bar"},b3={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},w3=["aria-checked"],k3={class:"count"},C3=["aria-checked"],S3={class:"count"},E3=["aria-checked"],N3={class:"count"},R3=["aria-checked"],T3={class:"count"},P3={class:"seg-countline",role:"status"},D3={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},A3={class:"w-100 admin-filter-toolbar","aria-label":"Users","accept-charset":"UTF-8"},I3={class:"admin-filter-row"},O3={class:"search-wrap"},M3={type:"search",class:"form-control","aria-label":"Search users",placeholder:"Search username or email\u2026",autocomplete:"off"},V3={key:0,class:"admin-search-hint"},q3={class:"admin-filter-inline"},L3={class:"form-control form-control-sm"},$3={key:0,class:"admin-filter-inline","aria-label":"Pagination"},_3=["disabled"],F3={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},U3=["disabled"],B3={key:0,class:"admin-filter-row"},z3={class:"admin-active-chips"},H3={class:"key"},j3=["onClick"],G3={key:1,class:"bulk-bar"},W3={class:"paper-table w-100",role:"table","aria-label":"Users",style:{"--cols":"28px minmax(280px, 2.4fr) 100px 140px 140px 52px"}},K3={class:"paper-table-head admin-users-row",role:"row"},Y3={role:"columnheader",style:{width:"28px"}},J3=["checked"],X3={role:"columnheader"},Q3={role:"columnheader"},Z3={role:"cell",style:{width:"28px"}},x3={type:"checkbox","aria-label":"Select user"},eI={class:"cell-anon",role:"cell"},tI=["src"],nI={key:1,class:"avatar-fallback","aria-hidden":"true"},oI={class:"anon-text"},sI={class:"user-name-line"},iI=["textContent","href"],rI=["href","title","aria-label"],aI={class:"anon-sub meta-dots"},lI=["title"],dI={key:1},uI={class:"cell-views num",role:"cell"},cI=["title","textContent","href"],pI={class:"cell-status",role:"cell"},fI=["textContent"],mI={class:"cell-status",role:"cell"},hI={key:0,class:"role-pill"},gI={key:1,class:"empty-dash"},vI={class:"cell-actions",role:"cell"},yI={class:"dropdown"},bI={class:"dropdown-menu dropdown-menu-right"},wI=["href"],kI=["href"],CI=["onClick"],SI=["onClick"],EI={key:0,class:"paper-table-empty"},NI={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},RI={key:0,class:"pagination-compact"},TI=["disabled"],PI=["max"],DI=["disabled"],AI={class:"admin-filter-inline"},II={class:"form-control form-control-sm"};function pp(e,t){let s=Pe("field"),i=Pe("form");return a(),l("div",v3,[t[53]||(t[53]=ke('
Admin \xA0/\xA0 Users

Users

',3)),n("div",y3,[n("div",b3,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:!e.query?.status}]),"aria-checked":!e.query?.status,onClick:t[0]||(t[0]=o=>{e.query.status="",e.query.page=1})},[t[14]||(t[14]=h("All ",-1)),n("span",k3,d(e.fmt?.number(e.statusCountFor("active")+e.statusCountFor("banned")+e.statusCountFor("removed"))),1)],10,w3),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.query?.status==="active","is-empty":!e.statusCountFor("active")}]),"aria-checked":e.query?.status==="active",onClick:t[1]||(t[1]=o=>{e.query.status="active",e.query.page=1})},[t[15]||(t[15]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[16]||(t[16]=h("Active ",-1)),n("span",S3,d(e.fmt?.number(e.statusCountFor("active"))),1)],10,C3),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.query?.status==="banned","is-empty":!e.statusCountFor("banned")}]),"aria-checked":e.query?.status==="banned",onClick:t[2]||(t[2]=o=>{e.query.status="banned",e.query.page=1})},[t[17]||(t[17]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[18]||(t[18]=h("Banned ",-1)),n("span",N3,d(e.fmt?.number(e.statusCountFor("banned"))),1)],10,E3),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.query?.status==="removed","is-empty":!e.statusCountFor("removed")}]),"aria-checked":e.query?.status==="removed",onClick:t[3]||(t[3]=o=>{e.query.status="removed",e.query.page=1})},[t[19]||(t[19]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[20]||(t[20]=h("Removed ",-1)),n("span",T3,d(e.fmt?.number(e.statusCountFor("removed"))),1)],10,R3)]),n("p",P3,[n("strong",null,d(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[21]||(t[21]=h(" shown",-1))])]),e.fetchError?(a(),l("div",D3,[t[22]||(t[22]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),h(" "+d(e.fetchError),1)])):f("v-if",!0),P((a(),l("form",A3,[n("div",I3,[n("div",O3,[P(n("input",M3,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(a(),l("span",V3,"/"))]),n("span",q3,[t[24]||(t[24]=n("label",null,"Role",-1)),P((a(),l("select",L3,[...t[23]||(t[23]=[n("option",{value:""},"Any",-1),n("option",{value:"admin"},"Admin",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.role=o},value:e.query?.role,form:null,options:{}}]])]),t[28]||(t[28]=n("span",{class:"admin-filter-spacer"},null,-1)),n("button",{class:"btn btn-sm",type:"button",onClick:t[4]||(t[4]=o=>e.exportCsv())},[...t[25]||(t[25]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),h(" Export",-1)])]),e.totalPage>1?(a(),l("span",$3,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[5]||(t[5]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[26]||(t[26]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,_3),n("span",F3,d(e.query?.page)+"/"+d(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[6]||(t[6]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,U3)])):f("v-if",!0)]),e.chips?.length?(a(),l("div",B3,[n("div",z3,[(a(!0),l(V,null,Q(e.chips,(o,r)=>(a(),l("span",{class:"admin-active-chip",key:o?.key},[n("span",H3,d(o?.label),1),n("span",null,d(o?.value),1),n("button",{type:"button",onClick:u=>e.clearFilter(o.key),"aria-label":"Clear filter"},[...t[29]||(t[29]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,j3)]))),128))])])):f("v-if",!0)])),[[i,e.viewState]]),e.selectedCount()>0?(a(),l("div",G3,[n("span",null,[n("strong",null,d(e.selectedCount()),1),t[30]||(t[30]=h(" selected",-1))]),n("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[7]||(t[7]=o=>e.bulkBan())},[...t[31]||(t[31]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-ban"})],-1),h(" Ban",-1)])]),n("button",{class:"btn btn-sm",type:"button",onClick:t[8]||(t[8]=o=>{e.selected={},e.allSelected=!1})},"Clear")])):f("v-if",!0),n("div",W3,[n("div",K3,[n("div",Y3,[n("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[9]||(t[9]=o=>e.selectAllOnPage()),checked:e.allSelected},null,8,J3)]),n("div",X3,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="username"}]),onClick:t[10]||(t[10]=o=>e.sortBy("username"))},[t[33]||(t[33]=h("User ",-1)),e.sortIcon("username")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("username")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[32]||(t[32]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[36]||(t[36]=n("div",{role:"columnheader",class:"num",title:"Repositories discovered on the user's GitHub account"},"GitHub repos",-1)),n("div",Q3,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="status"}]),onClick:t[11]||(t[11]=o=>e.sortBy("status"))},[t[35]||(t[35]=h("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[34]||(t[34]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[37]||(t[37]=n("div",{role:"columnheader"},"Role",-1)),t[38]||(t[38]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(a(!0),l(V,null,Q(e.filteredUsers,(o,r)=>(a(),l("div",{class:R(["paper-table-row admin-users-row",{"row-selected":e.selected[o?.username]}]),role:"row"},[n("div",Z3,[P(n("input",x3,null,512),[[s,{state:e.viewState,set:u=>{e.selected[o.username]=u},value:e.selected[o?.username],form:null,options:{}}]])]),n("div",eI,[o?.photo?(a(),l("img",{key:0,width:"28",height:"28",class:"rounded-circle",style:{"flex-shrink":"0"},src:e.safeUrl(o?.photo)},null,8,tI)):(a(),l("span",nI,d((o?.username||"?").charAt(0).toUpperCase()),1)),n("div",oI,[n("span",sI,[n("a",{class:"repo-name",textContent:d(o?.username),href:e.safeUrl("/admin/users/"+o?.username)},null,8,iI),n("a",{class:"user-gh-link",target:"_blank",rel:"noopener",href:e.safeUrl("https://github.com/"+o?.username),title:o?.username+" on GitHub","aria-label":o?.username+" on GitHub"},[...t[39]||(t[39]=[n("i",{class:"fab fa-github","aria-hidden":"true"},null,-1)])],8,rI)]),n("div",aI,[o?.emails?.[0]?.email?(a(),l("span",{key:0,class:"meta-email meta-tail",title:o?.emails?.[0]?.email},d(o?.emails?.[0]?.email),9,lI)):f("v-if",!0),o?.dateOfEntry?(a(),l("span",dI,"Joined "+d(e.fmt?.humanTime(o?.dateOfEntry)),1)):f("v-if",!0)])])]),n("div",uI,[t[40]||(t[40]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),n("a",{title:o?.repoCount?"Show this user\u2019s repositories":"Repositories not synced yet",textContent:d(o?.repoCount?e.fmt?.number(o.repoCount):"Not synced"),class:R({"is-unsynced":!o?.repoCount}),href:e.safeUrl("/admin/repositories?owner="+o?.username)},null,10,cI)]),n("div",pI,[n("span",{class:R(["status-dot","st-"+(o?.status||"unknown")])},null,2),n("span",{textContent:d(e.fmt?.title(o?.status))},null,8,fI)]),n("div",mI,[o?.isAdmin?(a(),l("span",hI,"Admin")):f("v-if",!0),o?.isAdmin?f("v-if",!0):(a(),l("span",gI,"\u2014"))]),n("div",vI,[n("div",yI,[t[46]||(t[46]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",bI,[n("a",{class:"dropdown-item",href:e.safeUrl("/admin/users/"+o?.username)},[...t[41]||(t[41]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),h(" View details",-1)])],8,wI),n("a",{class:"dropdown-item",href:e.safeUrl("/admin/repositories?owner="+o?.username)},[...t[42]||(t[42]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),h(" View repositories",-1)])],8,kI),t[45]||(t[45]=n("div",{class:"dropdown-divider"},null,-1)),P(n("a",{class:"dropdown-item text-danger",href:"#",onClick:de(u=>e.banUser(o),["prevent"])},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-ban"})],-1),h(" Ban",-1)])],8,CI),[[Z,o?.status=="active"]]),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.activateUser(o),["prevent"])},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),h(" Activate",-1)])],8,SI),[[Z,o?.status=="removed"||o?.status=="banned"]])])])])],2))),256)),e.filteredUsers?.length==0?(a(),l("div",EI,[...t[47]||(t[47]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No users match the current filters.",-1)])])):f("v-if",!0)]),n("div",NI,[t[52]||(t[52]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",RI,[n("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[48]||(t[48]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),h(" Previous",-1)])],8,TI),P(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,PI),[[s,{state:e.viewState,set:o=>{e.query.page=o},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+d(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[13]||(t[13]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[49]||(t[49]=[h("Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,DI)])):f("v-if",!0),n("span",AI,[t[51]||(t[51]=n("label",null,"Per page",-1)),P((a(),l("select",II,[...t[50]||(t[50]=[n("option",{value:"10"},"10",-1),n("option",{value:"25"},"25",-1),n("option",{value:"50"},"50",-1),n("option",{value:"100"},"100",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.limit=o},value:e.query?.limit,form:null,options:{}}]])])])])}var OI={class:"anonymize-landing"},MI={class:"anonymize-landing-inner"},VI={class:"form-group mt-4 mb-2"},qI={class:"source-url-label-row"},LI={key:0,class:"repo-access","aria-label":"GitHub access"},$I={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},_I=["aria-pressed","disabled"],FI=["aria-pressed","disabled"],UI={key:1,class:"connection-badge"},BI={class:"landing-url-row"},zI={id:"sourceUrl-landing",onblur:"this.scrollLeft=0",type:"text",class:"form-control form-control-lg",placeholder:"https://github.com/owner/repository"},HI=["aria-disabled"],jI={key:0,class:"text-danger",role:"alert"},GI={class:"repo-picker","aria-labelledby":"repo-picker-title"},WI={class:"repo-picker-head"},KI={class:"repo-picker-title"},YI={key:0,class:"repo-picker-count",role:"status"},JI={key:0,class:"repo-picker-list","aria-busy":"true","aria-label":"Loading your repositories"},XI={class:"repo-picker-row is-skeleton","aria-hidden":"true"},QI={key:1,class:"repo-picker-list"},ZI=["title"],xI={class:"repo-picker-owner"},eO={class:"repo-picker-repo"},tO=["onClick","aria-label"],nO={key:2,class:"repo-picker-state",role:"status"},oO={key:3,class:"repo-picker-state"},sO={key:4,class:"repo-picker-state",role:"alert"},iO={key:5,class:"repo-picker-pagination","aria-label":"Repository pages"},rO=["disabled"],aO={class:"repo-picker-count",role:"status"},lO=["disabled"],dO={key:6,class:"repo-picker-access"},uO={key:1,class:"connection-link",href:"/connections"},cO={class:"anonymize-workspace"},pO={class:"anonymize-topbar"},fO={class:"anonymize-topbar-inner"},mO={class:"paper-crumbs"},hO={class:"here"},gO={class:"anonymize-topbar-head"},vO={class:"paper-page-title anonymize-topbar-title"},yO={key:0},bO={key:1},wO={class:"paper-page-lede anonymize-topbar-lede"},kO={key:0,class:"task-trail flow-trail","aria-label":"Anonymization steps"},CO={key:0,class:"alert alert-info",role:"status"},SO={key:1,class:"alert alert-info",role:"status"},EO={key:1},NO={class:"anonymize-mobile-tabs",role:"tablist","aria-label":"Anonymization workspace"},RO=["aria-selected","tabindex"],TO=["aria-selected","tabindex"],PO={class:"anonymize-split"},DO=["role","aria-labelledby"],AO={class:"form needs-validation paper-settings-main",name:"anonymize",novalidate:""},IO={class:"anonymize-fields"},OO={class:"paper-settings-section"},MO={class:"form-group"},VO={class:"source-url-label-row"},qO={key:0,class:"repo-access","aria-label":"GitHub access"},LO={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},$O=["aria-pressed","disabled"],_O=["aria-pressed","disabled"],FO={key:1,class:"connection-badge"},UO=["disabled"],BO={key:0,class:"source-summary"},zO={key:1,class:"source-error",role:"alert"},HO={class:"invalid-feedback"},jO={key:0,class:"source-error-note"},GO={key:1,class:"repo-access-controls"},WO={key:1,class:"btn btn-ink",href:"/connections"},KO={key:2,class:"btn btn-ink",href:"/dashboard"},YO={key:0,class:"repo-access-details","aria-label":"Previous repository configuration"},JO={key:0,class:"form-group"},XO=["value"],QO={key:1},ZO={class:"repo-access-controls"},xO=["href"],e5={key:1,class:"repo-access-details","aria-label":"Publication"},t5={class:"repo-access-note"},n5={key:2,class:"form-text text-muted source-public-note"},o5=["open"],s5={key:0,class:"repair-step"},i5=["disabled"],r5={key:0,role:"status"},a5={class:"repair-step"},l5={key:0,role:"status"},d5={key:4,class:"form-grid-2"},u5={class:"form-group"},c5={class:"input-group"},p5={class:"form-control",id:"branch",name:"branch"},f5=["textContent","value"],m5={class:"input-group-append"},h5={class:"form-group"},g5=["disabled"],v5={class:"invalid-feedback"},y5={class:"invalid-feedback"},b5={class:"form-check-input",type:"checkbox",id:"update",name:"update","aria-describedby":"update-help"},w5={class:"form-check-label",for:"update"},k5={key:0,class:"paid-tag"},C5={key:0,class:"form-text text-muted",id:"update-help"},S5={key:1,class:"form-text text-muted auto-update-paid",id:"update-help"},E5={class:"paper-settings-section"},N5={class:"form-group"},R5=["disabled"],T5={class:"form-text text-muted anon-url-echo"},P5={class:"anon-url-id"},D5={class:"invalid-feedback"},A5={class:"form-group"},I5=["disabled"],O5={class:"form-text text-muted anon-url-echo"},M5={class:"anon-url-id"},V5={class:"invalid-feedback"},q5={class:"form-group"},L5=["disabled"],$5={class:"form-text text-muted anon-url-echo"},_5={class:"anon-url-id"},F5={class:"invalid-feedback"},U5={class:"form-group"},B5=["rows"],z5={class:"redaction-syntax"},H5={class:"form-text text-muted"},j5=["onClick"],G5={key:0,class:"term-hint-more"},W5={class:"invalid-feedback"},K5={class:"preserve-row"},Y5={class:"preserve-row-text"},J5={class:"preserve-row-value"},X5=["disabled"],Q5={class:"preserve-tree"},Z5={key:0,class:"preserve-status"},x5={key:1,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},e8=["aria-expanded","aria-label","onClick"],t8={key:1,class:"preserve-caret-space"},n8=["id","aria-label","checked",".indeterminate","disabled","onChange"],o8=["for","onClick"],s8={key:2,class:"preserve-note"},i8={key:0,class:"preserve-status"},r8={key:0,class:"preserve-status"},a8=["open"],l8={class:"preserve-foot"},d8={class:"preserve-count","aria-live":"polite"},u8={class:"preserve-actions"},c8={class:"paper-settings-section"},p8={class:"form-check"},f8={class:"form-check-input",type:"checkbox",id:"link",name:"link"},m8={class:"form-check"},h8={class:"form-check-input",type:"checkbox",id:"image",name:"image"},g8={class:"form-check"},v8={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},y8={class:"form-check"},b8={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},w8={class:"form-check"},k8=["disabled"],C8={key:0,class:"form-text text-muted"},S8={key:1,class:"form-text text-muted"},E8={key:0,class:"form-text text-muted"},N8={class:"form-check"},R8={class:"form-check-input",type:"checkbox",id:"title-gist",name:"title-gist"},T8={class:"form-check"},P8={class:"form-check-input",type:"checkbox",id:"content-gist",name:"content-gist"},D8={class:"form-check"},A8={class:"form-check-input",type:"checkbox",id:"comments-gist",name:"comments-gist"},I8={class:"form-check"},O8={class:"form-check-input",type:"checkbox",id:"username-gist",name:"username-gist"},M8={class:"form-check"},V8={class:"form-check-input",type:"checkbox",id:"date-gist",name:"date-gist"},q8={class:"form-check"},L8={class:"form-check-input",type:"checkbox",id:"origin-gist",name:"origin-gist"},$8={class:"form-check"},_8={class:"form-check-input",type:"checkbox",id:"title",name:"title"},F8={class:"form-check"},U8={class:"form-check-input",type:"checkbox",id:"body",name:"body"},B8={class:"form-check"},z8={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},H8={class:"form-check"},j8={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},G8={class:"form-check"},W8={class:"form-check-input",type:"checkbox",id:"username",name:"username"},K8={class:"form-check"},Y8={class:"form-check-input",type:"checkbox",id:"date",name:"date"},J8={class:"form-check"},X8={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},Q8={class:"paper-settings-section hosting-settings",id:"repository-hosting","aria-labelledby":"hosting-heading"},Z8={class:"form-group conference-field"},x8=["href"],e6={class:"invalid-feedback"},t6={class:"form-text text-muted"},n6={key:0,class:"hosting-usage"},o6={key:0},s6={key:1},i6={key:2},r6={key:1,class:"hosting-limit auto-update-note",role:"status"},a6={key:2,class:"hosting-payment"},l6={key:0,class:"hosting-limit",role:"status"},d6={key:1,class:"hosting-options"},u6={class:"hosting-options-title"},c6=["value","checked","onChange"],p6={class:"hosting-option-body"},f6={key:0,class:"hosting-cycle billing-toggle",role:"radiogroup","aria-label":"Billing frequency"},m6=["aria-checked","onClick"],h6={key:0,class:"billing-toggle-save"},g6={class:"hosting-option-price"},v6={key:2,role:"status"},y6={key:3,class:"hosting-terms"},b6={key:4,class:"hosting-terms"},w6={key:5,class:"capacity-options"},k6=["disabled"],C6={key:3,class:"hosting-subhead"},S6={class:"expiration-choices"},E6={class:"expiration-choice"},N6=["checked","disabled"],R6={key:0,class:"dated-options"},T6={key:0,class:"hosting-date"},P6=["min","max"],D6={key:0,class:"date-echo","aria-live":"polite"},A6={class:"invalid-feedback"},I6={class:"invalid-feedback"},O6={class:"hosting-property"},M6={key:1,class:"expiration-choice"},V6=["checked","disabled"],q6={key:0},L6={key:4,class:"form-text text-muted"},$6={key:5,class:"inline-hosting"},_6={key:0,role:"alert",class:"text-danger"},F6={key:1,role:"alert",class:"text-danger"},U6=["disabled"],B6={key:2,role:"status"},z6={key:3,role:"status",class:"form-text text-muted"},H6={key:4,class:"hosting-terms"},j6={key:5,class:"hosting-terms"},G6={key:6,class:"repository-pass"},W6=["disabled","onClick"],K6={class:"paper-settings-section"},Y6={class:"form-group"},J6={style:{position:"relative"}},X6={type:"text",id:"coauthorSearch",class:"form-control",placeholder:"Search GitHub username\u2026",autocomplete:"off"},Q6={class:"dropdown-menu show",style:{display:"block","max-height":"220px","overflow-y":"auto",width:"100%"}},Z6=["onClick"],x6=["src"],eM=["textContent"],tM=["textContent"],nM={class:"coauthor-list"},oM={class:"coauthor-row d-flex align-items-center",style:{padding:"6px 0",gap:"8px"}},sM=["src"],iM=["textContent","href"],rM=["onClick"],aM={class:"form-text text-muted"},lM=["textContent"],dM={class:"anonymize-submit-bar"},uM=["disabled"],cM=["disabled"],pM=["disabled"],fM=["disabled"],mM=["disabled"],hM=["disabled"],gM={key:5,class:"submit-reason",role:"status"},vM={key:6,class:"checkout-return-note"},yM={key:7,class:"draft-status",role:"status"},bM={key:8,class:"draft-status"},wM=["role","aria-labelledby"],kM={class:"rp-caption"},CM=["aria-expanded"],SM=["title"],EM={class:"redact-slot","aria-hidden":"true"},NM={key:2,class:"rp-count rp-count-none"},RM=["href"],TM=["aria-pressed"],PM={class:"rp-open-icon",viewBox:"0 0 16 16","aria-hidden":"true"},DM={key:0,d:"M9.5 2.5h4v4M13.5 2.5 9 7M6.5 13.5h-4v-4M2.5 13.5 7 9"},AM={key:1,d:"M13.5 6.5h-4v-4M9.5 6.5 14 2M2.5 9.5h4v4M6.5 9.5 2 14"},IM={class:"rp-window"},OM={class:"rp-chrome","aria-hidden":"true"},MM={class:"rp-url"},VM={class:"rp-bar","aria-hidden":"true"},qM={key:0,class:"rp-bar-id"},LM={key:1,class:"rp-bar-kind"},$M={class:"leftCol-head"},_M={class:"leftCol-body"},FM={key:0,class:"rp-state rp-loading",role:"status"},UM={class:"rp-state-text"},BM={class:"rp-state rp-error"},zM={key:0,class:"rp-state-actions"},HM={key:1,class:"btn btn-ink btn-sm",href:"/connections"},jM={key:2,class:"btn btn-ink btn-sm",href:"/dashboard"},GM={class:"rp-state rp-error",role:"alert"},WM={class:"rp-state-actions"},KM={class:"rp-state rp-error",role:"alert"},YM={class:"rp-state-actions"},JM={key:4,class:"rp-state rp-empty"},XM={key:6,class:"anonymize-preview-body"},QM={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},ZM={class:"pr-title mb-1"},xM={key:0},eV=["textContent"],tV={key:0},nV={key:1},oV={key:2},sV={class:"pr-comments mt-3"},iV={class:"pr-comment"},rV={class:"pr-comment-head"},aV=["textContent"],lV={key:0,class:"pr-comment-date"},dV={key:3},uV={class:"pr-comments"},cV={class:"pr-comment"},pV={class:"pr-comment-head"},fV={key:0,class:"pr-comment-author"},mV=["textContent"],hV=["textContent"],gV={key:0,class:"pr-comment-body"},vV={key:7,class:"anonymize-preview-body"},yV={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},bV={class:"pr-title mb-1"},wV={key:0},kV=["textContent"],CV={key:0},SV={key:1,class:"pr-body"},EV={key:2,class:"paper-tabs",role:"tablist"},NV=["aria-selected","tabindex"],RV=["aria-selected","tabindex"],TV=["textContent"],PV={key:3,class:"anonymize-preview-status"},DV={class:"paper-tab-content"},AV={key:0,role:"tabpanel",id:"preview-pr-diff-panel","aria-labelledby":"preview-pr-diff-tab"},IV=["innerHTML"],OV={key:1,role:"tabpanel",id:"preview-pr-comments-panel","aria-labelledby":"preview-pr-comments-tab"},MV={class:"pr-comments"},VV={class:"pr-comment"},qV={class:"pr-comment-head"},LV={key:0,class:"pr-comment-author"},$V=["textContent"],_V=["textContent"],FV={key:0,class:"pr-comment-body"},UV={key:8,class:"rp-more"},BV=["href"],zV={key:2,class:"rp-more-btn is-hint","aria-hidden":"true"};function fp(e,t){let s=Ze("tree"),i=Ze("partial-view"),o=Ze("gist-file"),r=Ze("markdown"),u=Pe("field"),p=Pe("form");return a(),l("div",{class:R(["anonymize-page h-100",{"mobile-preview-active":e.mobilePane==="preview","preview-expanded":e.previewExpanded}])},[f(" ===== STATE 1: No URL \u2014 centered input ===== "),P(n("div",OI,[n("div",MI,[t[70]||(t[70]=ke('
My work \xA0/\xA0 New anonymization

New anonymization

Paste a repository, pull request, or gist URL, or pick one of your repositories. You\u2019ll choose the terms to redact next.

  1. 1. Repository
  2. 2. Review and hosting
  3. 3. Review link
',2)),n("div",VI,[n("div",qI,[t[62]||(t[62]=n("label",{class:"paper-field-label",for:"sourceUrl-landing"},"Source URL",-1)),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(a(),l("aside",LI,[!e.isUpdate&&e.detectedType!=="gist"?(a(),l("div",$I,[n("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[0]||(t[0]=c=>e.chooseGitHubConnection("github-app"))},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1),h(),n("span",{class:"sr-only"},"Read-only ",-1),h("GitHub App",-1)])],8,_I),n("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[1]||(t[1]=c=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,FI)])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"?(a(),l("span",UI,d((e.detectedType==="gist"?e.githubConnections?.gistConnection==="github-app":e.githubConnection==="github-app")?"Read-only GitHub App":"Legacy OAuth"),1)):f("v-if",!0)])):f("v-if",!0)]),n("div",BI,[P(n("input",zI,null,512),[[u,{state:e.viewState,set:c=>{e.sourceUrl=c},value:e.sourceUrl,form:null,options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]]),n("button",{type:"button",class:"btn btn-primary landing-continue","aria-disabled":e.sourceUrl?.trim()?null:"true",onClick:t[2]||(t[2]=c=>e.sourceUrl?.trim()&&e.urlSelected())},"Continue",8,HI)])]),e.sourceUrlError?(a(),l("p",jI,d(e.sourceUrlError),1)):f("v-if",!0),t[71]||(t[71]=n("small",{class:"form-text landing-help",style:{color:"var(--ink-muted)"}}," Repository, pull request (\u2026/pull/42) and gist (gist.github.com/\u2026) URLs are all accepted. ",-1)),n("section",GI,[n("div",WI,[n("div",KI,[t[63]||(t[63]=n("h2",{id:"repo-picker-title"},"Your repositories",-1)),e.userReposStatus==="loading"?(a(),l("span",YI,d(e.userRepoFilter.trim()?"Searching repositories\u2026":"Loading repositories\u2026"),1)):f("v-if",!0)]),P(n("input",{type:"search",class:"form-control repo-picker-filter",placeholder:"Search repositories\u2026","aria-label":"Search your repositories",autocomplete:"off",maxlength:"200","onUpdate:modelValue":t[3]||(t[3]=c=>e.userRepoFilter=c)},null,512),[[ot,e.userRepoFilter]])]),e.userReposStatus==="loading"||e.userReposStatus==="idle"?(a(),l("ul",JI,[(a(),l(V,null,Q([1,2,3,4],(c,v)=>n("li",XI,[n("span",{class:"skeleton skeleton-line",style:Ae({width:34+c*9+"%"})},null,4)])),64))])):f("v-if",!0),e.userReposStatus==="ready"&&e.userRepos.length>0?(a(),l("ul",QI,[(a(!0),l(V,null,Q(e.userRepos,(c,v)=>(a(),l("li",{key:c.id||c.fullName,class:"repo-picker-row"},[t[65]||(t[65]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),n("span",{class:"repo-picker-name",title:c.fullName},[n("span",xI,[h(d(c.fullName.split("/")[0]),1),t[64]||(t[64]=n("span",{class:"repo-picker-slash"},"/",-1))]),n("span",eO,d(c.fullName.split("/").slice(1).join("/")),1)],8,ZI),n("button",{type:"button",class:"btn btn-outline-ink btn-sm repo-picker-select",onClick:g=>e.selectUserRepo(c),"aria-label":"Select "+c.fullName},"Select",8,tO)]))),128))])):f("v-if",!0),e.userReposStatus==="ready"&&e.userRepos.length===0&&e.userRepoFilter.trim()?(a(),l("p",nO,d(e.userRepoNext!==null?"No matches yet. Continue searching the remaining repositories.":e.userRepoPage>1?"No more matching repositories.":"No matching repositories found."),1)):f("v-if",!0),e.userReposStatus==="ready"&&e.userRepos.length===0&&!e.userRepoFilter.trim()?(a(),l("p",oO,"No repositories found. Paste a URL above, or grant access below.")):f("v-if",!0),e.userReposStatus==="error"?(a(),l("p",sO,[t[66]||(t[66]=h("Your repositories could not be loaded. ",-1)),n("button",{type:"button",class:"task-text-button",onClick:t[4]||(t[4]=c=>e.loadUserRepos())},"Try again")])):f("v-if",!0),e.userRepoPage>1||e.userRepoNext!==null?(a(),l("nav",iO,[n("button",{type:"button",class:"btn btn-outline-ink btn-sm",disabled:e.userRepoPage===1||e.userReposStatus==="loading",onClick:t[5]||(t[5]=c=>e.changeUserRepoPage(-1))},"Previous",8,rO),n("span",aO,"Page "+d(e.userRepoPage),1),n("button",{type:"button",class:"btn btn-outline-ink btn-sm",disabled:e.userRepoNext===null||e.userReposStatus!=="ready",onClick:t[6]||(t[6]=c=>e.changeUserRepoPage(1))},d(e.userRepoFilter.trim()&&!e.userRepos.length?"Continue search":"Next"),9,lO)])):f("v-if",!0),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.userReposStatus==="ready"?(a(),l("p",dO,[t[69]||(t[69]=h("Don\u2019t see your repository? ",-1)),e.githubConnection!=="oauth"?(a(),l("button",{key:0,type:"button",class:"connection-link",onClick:t[7]||(t[7]=c=>e.grantGitHubAccess())},[...t[67]||(t[67]=[h("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):(a(),l("a",uO,[...t[68]||(t[68]=[h("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])]))])):f("v-if",!0)])])],512),[[Z,!e.workspaceOpen&&!e.isUpdate]]),f(" ===== STATE 2: URL provided \u2014 form (left) + preview (right) ===== "),P(n("div",cO,[n("header",pO,[n("div",fO,[n("div",mO,[t[72]||(t[72]=n("a",{href:"/dashboard"},"My work",-1)),t[73]||(t[73]=h(" \xA0/\xA0 ",-1)),n("span",hO,d(e.isUpdate?"Edit anonymization":"New anonymization"),1)]),n("div",gO,[n("h1",vO,[e.isUpdate?f("v-if",!0):(a(),l("span",yO,"New anonymization")),e.isUpdate?(a(),l("span",bO,"Edit anonymization")):f("v-if",!0)]),P(n("span",{class:R(["type-badge",{"type-repo":e.detectedType==="repo","type-pr":e.detectedType==="pr","type-gist":e.detectedType==="gist"}])},d(e.detectedType==="repo"?"Repository":e.detectedType==="pr"?"Pull request":"Gist"),3),[[Z,e.detectedType]])]),n("p",wO,d(e.isUpdate?"Changes apply to the existing anonymous link; reviewers keep the same URL.":"Choose the terms to redact, what reviewers see, and when the link expires."),1),e.isUpdate?f("v-if",!0):(a(),l("ol",kO,[...t[74]||(t[74]=[n("li",null,"1. Repository",-1),n("li",{"aria-current":"step"},"2. Review and hosting",-1),n("li",null,"3. Review link",-1)])]))])]),e.detectedType==="gist"&&e.gistAppRequired?(a(),l("aside",CO,[t[75]||(t[75]=n("p",null,"Reconnect your GitHub account to read this gist. Your draft will be restored when you return.",-1)),n("button",{type:"button",class:"btn btn-ink",onClick:t[8]||(t[8]=c=>e.connectGistApp())},"Connect GitHub App to access gists")])):f("v-if",!0),e.detectedType==="gist"&&e.gistOAuthRequired?(a(),l("aside",SO,[t[76]||(t[76]=n("p",null,"Connect GitHub OAuth to access gists. Your account and existing anonymizations stay the same, and your draft will be restored when you return.",-1)),t[77]||(t[77]=n("p",null,"GitHub's legacy OAuth connection includes write access to private repositories.",-1)),e.githubConnections?.oauthEnabled?(a(),l("button",{key:0,type:"button",class:"btn btn-ink",onClick:t[9]||(t[9]=c=>e.connectGistOAuth())},"Connect GitHub OAuth to access gists")):(a(),l("p",EO,"GitHub OAuth is currently unavailable. Please try again later."))])):f("v-if",!0),n("nav",NO,[n("button",{id:"workspace-settings-tab",role:"tab",type:"button","aria-selected":e.mobilePane==="settings","aria-controls":"workspace-settings",tabindex:e.mobilePane==="settings"?0:-1,onKeydown:t[10]||(t[10]=c=>e.previewTabKeydown(c)),onClick:t[11]||(t[11]=c=>e.selectMobilePane("settings"))},[...t[78]||(t[78]=[n("span",{class:"tab-label"},"Settings",-1)])],40,RO),n("button",{id:"workspace-preview-tab",role:"tab",type:"button","aria-selected":e.mobilePane==="preview","aria-controls":"workspace-preview",tabindex:e.mobilePane==="preview"?0:-1,onKeydown:t[12]||(t[12]=c=>e.previewTabKeydown(c)),onClick:t[13]||(t[13]=c=>e.selectMobilePane("preview"))},[...t[79]||(t[79]=[n("span",{class:"tab-label"},"Reviewer preview",-1)])],40,TO)]),n("div",PO,[f(" Form column (left) "),n("div",{id:"workspace-settings",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-settings-tab":null,class:"anonymize-form-col overflow-auto"},[P((a(),l("form",AO,[n("div",IO,[n("section",OO,[t[98]||(t[98]=n("h2",{class:"paper-section-eyebrow"},"Source & access",-1)),n("div",MO,[n("div",VO,[t[81]||(t[81]=n("label",{class:"paper-field-label",for:"sourceUrl"},"Source URL",-1)),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(a(),l("aside",qO,[!e.isUpdate&&e.detectedType!=="gist"?(a(),l("div",LO,[n("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[14]||(t[14]=c=>e.chooseGitHubConnection("github-app"))},[...t[80]||(t[80]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1),h(),n("span",{class:"sr-only"},"Read-only ",-1),h("GitHub App",-1)])],8,$O),n("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[15]||(t[15]=c=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,_O)])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"?(a(),l("span",FO,d((e.detectedType==="gist"?e.githubConnections?.gistConnection==="github-app":e.githubConnection==="github-app")?"Read-only GitHub App":"Legacy OAuth"),1)):f("v-if",!0)])):f("v-if",!0)]),P(n("input",{type:"text",class:R(["form-control",{"is-invalid":e.anonymize?.sourceUrl?.invalid}]),name:"sourceUrl",id:"sourceUrl",onblur:"this.scrollLeft=0",disabled:e.isUpdate&&e.detectedType!=="repo",placeholder:"Paste a GitHub repo or pull request URL"},null,10,UO),[[u,{state:e.viewState,set:c=>{e.sourceUrl=c},value:e.sourceUrl,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]]),e.sourceSummary()&&!e.anonymize?.sourceUrl?.invalid?(a(),l("p",BO,[t[82]||(t[82]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check"})],-1)),h(d(e.sourceSummary()),1)])):f("v-if",!0),e.sourceProblem()&&e.sourceProblem().kind!=="connect"?(a(),l("div",zO,[n("p",HO,d(e.sourceProblem().text),1),e.sourceProblem().note?(a(),l("p",jO,d(e.sourceProblem().note),1)):f("v-if",!0),e.sourceProblem().manage||e.sourceProblem().retry||e.sourceProblem().dashboard?(a(),l("div",GO,[e.sourceProblem().manage==="app"?(a(),l("button",{key:0,type:"button",class:"btn btn-ink",onClick:t[16]||(t[16]=c=>e.grantGitHubAccess())},[...t[83]||(t[83]=[h("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0),e.sourceProblem().manage==="link"?(a(),l("a",WO,"Manage GitHub access")):f("v-if",!0),e.sourceProblem().dashboard?(a(),l("a",KO,"Open My work")):f("v-if",!0),e.sourceProblem().retry?(a(),l("button",{key:3,type:"button",class:"btn btn-outline-ink",onClick:t[17]||(t[17]=c=>e.urlSelected(!0))},"Try again")):f("v-if",!0)])):f("v-if",!0)])):f("v-if",!0)]),!e.isUpdate&&e.previousConfigurations.length?(a(),l("aside",YO,[t[85]||(t[85]=n("p",{role:"status"},"You have already anonymized this repository. Use the existing configuration to keep its anonymous link and avoid creating another repository.",-1)),e.previousConfigurations.length>1?(a(),l("div",JO,[t[84]||(t[84]=n("label",{class:"paper-field-label",for:"previousConfiguration"},"Previous anonymization",-1)),P(n("select",{id:"previousConfiguration",class:"form-control","onUpdate:modelValue":t[18]||(t[18]=c=>e.previousConfigurationId=c)},[(a(!0),l(V,null,Q(e.previousConfigurations,c=>(a(),l("option",{key:c.repoId,value:c.repoId},d(c.repoId),9,XO))),128))],512),[[Rt,e.previousConfigurationId]])])):(a(),l("p",QO,d(e.previousConfigurationId),1)),t[86]||(t[86]=n("p",null,"You can review and update its settings before saving.",-1)),n("div",ZO,[n("a",{class:"btn btn-ink",href:e.existingConfigurationUrl()},"Use existing configuration",8,xO),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[19]||(t[19]=c=>e.previousConfigurations=[])},"Create a separate one")])])):f("v-if",!0),e.details&&e.sourceIsPrivate()?(a(),l("aside",e5,[n("div",t5,[n("span",null,[t[87]||(t[87]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1)),h(" "+d(e.detectedType==="gist"?"This secret gist will be published at a public link.":"Selected content will be published, including content from private repositories."),1)])])])):e.details?(a(),l("p",n5,"Anonymized content is public.")):f("v-if",!0),e.isUpdate&&e.detectedType==="repo"&&e.role==="owner"&&e.sourceUrl==="https://github.com/"+e._originalFullName?(a(),l("details",{key:3,class:"repair-disclosure",open:!!(e.error||e.sourceError||e.accessRepairMessage||e.reconnectRepositoryId)},[t[91]||(t[91]=n("summary",null,"Connection problems?",-1)),e.accessRepairAllowed&&e.githubConnections?.appEnabled&&e.githubConnection==="github-app"&&e.sourceUrl==="https://github.com/"+e._originalFullName?(a(),l("div",s5,[t[89]||(t[89]=n("p",null,"If this repository became private or its App installation changed, repair its access here. This keeps the same anonymous URL and published commit.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.repairingGitHubAccess,onClick:t[20]||(t[20]=c=>e.repairGitHubAccess())},"Repair GitHub access",8,i5),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[21]||(t[21]=c=>e.grantGitHubAccess())},[...t[88]||(t[88]=[h("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])]),e.accessRepairMessage?(a(),l("p",r5,d(e.accessRepairMessage),1)):f("v-if",!0)])):f("v-if",!0),n("div",a5,[t[90]||(t[90]=n("p",null,"If you deleted and recreated this repository, reconnect it before choosing a branch.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[22]||(t[22]=c=>e.reconnectSource())},"Reconnect source repository"),e.reconnectRepositoryId?(a(),l("p",l5,"Source reloaded. Review the branch, commit, and anonymization preview, then save to replace the published snapshot.")):f("v-if",!0)])],8,o5)):f("v-if",!0),e.detectedType==="repo"?P((a(),l("div",d5,[n("div",u5,[t[93]||(t[93]=n("label",{class:"paper-field-label",for:"branch"},"Branch",-1)),n("div",c5,[P((a(),l("select",p5,[(a(!0),l(V,null,Q(e.branches,(c,v)=>(a(),l("option",{textContent:d(c?.name),value:c?.name},null,8,f5))),256))])),[[u,{state:e.viewState,set:c=>{e.source.branch=c},value:e.source?.branch,form:"anonymize",options:{}}]]),n("div",m5,[n("button",{class:"btn btn-icon refresh-branches",type:"button",title:"Refresh branches",onClick:t[23]||(t[23]=c=>e.getBranches(!0)),"aria-label":"Refresh branches"},[...t[92]||(t[92]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])])])])]),n("div",h5,[t[94]||(t[94]=n("label",{class:"paper-field-label",for:"commit"},"Commit",-1)),P(n("input",{class:R(["form-control",{"is-invalid":e.anonymize?.commit?.invalid}]),id:"commit",disabled:e.options.update,name:"commit",pattern:"[a-fA-Z0-9]{6,}",required:""},null,10,g5),[[u,{state:e.viewState,set:c=>{e.source.commit=c},value:e.source?.commit,form:"anonymize",options:{}}]]),P(n("div",v5," The commit SHA is not valid. ",512),[[Z,e.anonymize?.commit?.errors?.pattern||e.anonymize?.commit?.errors?.required]]),P(n("div",y5," This commit no longer exists in the repository. Click refresh to get the latest. ",512),[[Z,e.anonymize?.commit?.errors?.exists]])])],512)),[[Z,e.sourceReady()]]):f("v-if",!0),P(n("div",{class:R(["form-check auto-update-check",{"is-paid":!e.liveUpdatesIncluded()}])},[P(n("input",b5,null,512),[[u,{state:e.viewState,set:c=>{e.options.update=c},value:e.options?.update,form:"anonymize",options:{}}]]),n("label",w5,[t[95]||(t[95]=h("Auto-update from GitHub",-1)),e.liveUpdatesIncluded()?f("v-if",!0):(a(),l("span",k5,"Paid"))]),e.liveUpdatesIncluded()?(a(),l("small",C5,"Follows the latest version, at most once an hour.")):(a(),l("small",S5,[t[96]||(t[96]=h("Needs Live updates",-1)),e.liveUpdatesPrice()?(a(),l(V,{key:0},[h(" \xB7 "+d(e.liveUpdatesPrice()),1)],64)):f("v-if",!0),t[97]||(t[97]=h(", a Paper pack or an author subscription. ",-1)),n("a",{href:"#repository-hosting",onClick:t[24]||(t[24]=de(c=>e.showHostingOptions(),["prevent"]))},"Hosting options")]))],2),[[Z,e.detectedType&&e.sourceReady()]])]),P(n("section",E5,[t[132]||(t[132]=n("h2",{class:"paper-section-eyebrow"},"Anonymization",-1)),P(n("div",N5,[t[103]||(t[103]=n("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),P(n("input",{type:"text",class:R(["form-control",{"is-invalid":e.anonymize?.repoId?.invalid}]),name:"repoId",id:"repoId",disabled:e.isUpdate},null,10,R5),[[u,{state:e.viewState,set:c=>{e.repoId=c},value:e.repoId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",T5,[t[99]||(t[99]=h("anonymous.4open.science/",-1)),t[100]||(t[100]=n("wbr",null,null,-1)),t[101]||(t[101]=h("r/",-1)),t[102]||(t[102]=n("wbr",null,null,-1)),n("span",P5,d(e.repoId),1)]),P(n("div",D5,"ID can only contain letters and numbers.",512),[[Z,e.anonymize?.repoId?.errors?.format]]),P(n("div",{class:"invalid-feedback"},d(e.repoId)+" is already used.",513),[[Z,e.anonymize?.repoId?.errors?.used]])],512),[[Z,e.detectedType==="repo"]]),P(n("div",A5,[t[108]||(t[108]=n("label",{class:"paper-field-label",for:"pullRequestId"},"Anonymized pull request ID",-1)),P(n("input",{type:"text",class:R(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId",disabled:e.isUpdate},null,10,I5),[[u,{state:e.viewState,set:c=>{e.pullRequestId=c},value:e.pullRequestId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",O5,[t[104]||(t[104]=h("anonymous.4open.science/",-1)),t[105]||(t[105]=n("wbr",null,null,-1)),t[106]||(t[106]=h("pr/",-1)),t[107]||(t[107]=n("wbr",null,null,-1)),n("span",M5,d(e.pullRequestId),1)]),P(n("div",V5,"ID can only contain letters and numbers.",512),[[Z,e.anonymize?.pullRequestId?.errors?.format]]),P(n("div",{class:"invalid-feedback"},d(e.pullRequestId)+" is already used.",513),[[Z,e.anonymize?.pullRequestId?.errors?.used]])],512),[[Z,e.detectedType==="pr"]]),P(n("div",q5,[t[113]||(t[113]=n("label",{class:"paper-field-label",for:"gistId"},"Anonymized gist ID",-1)),P(n("input",{type:"text",class:R(["form-control",{"is-invalid":e.anonymize?.gistId?.invalid}]),name:"gistId",id:"gistId",disabled:e.isUpdate},null,10,L5),[[u,{state:e.viewState,set:c=>{e.gistId=c},value:e.gistId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",$5,[t[109]||(t[109]=h("anonymous.4open.science/",-1)),t[110]||(t[110]=n("wbr",null,null,-1)),t[111]||(t[111]=h("gist/",-1)),t[112]||(t[112]=n("wbr",null,null,-1)),n("span",_5,d(e.gistId),1)]),P(n("div",F5,"ID can only contain letters and numbers.",512),[[Z,e.anonymize?.gistId?.errors?.format]]),P(n("div",{class:"invalid-feedback"},d(e.gistId)+" is already used.",513),[[Z,e.anonymize?.gistId?.errors?.used]])],512),[[Z,e.detectedType==="gist"]]),n("div",U5,[t[124]||(t[124]=n("label",{class:"paper-field-label",for:"terms"},"Terms to redact",-1)),P(n("textarea",{class:R(["form-control terms-input",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:Math.min(14,Math.max(4,String(e.terms||"").split(` `).length+1)),placeholder:`Jane Smith MIT CSAIL jane.smith@example.org`},null,10,B5),[[u,{state:e.viewState,set:c=>{e.terms=c},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",z5,[t[120]||(t[120]=n("summary",null,"Regex & replacement syntax",-1)),t[121]||(t[121]=h()),n("small",H5,[t[114]||(t[114]=h("Regex is supported. Replaced by ",-1)),n("code",null,d(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[115]||(t[115]=h(", or use ",-1)),t[116]||(t[116]=n("code",null,"term=>replacement",-1)),t[117]||(t[117]=h(" to pick your own (e.g. ",-1)),t[118]||(t[118]=n("code",null,"Anonymous=>ABC",-1)),t[119]||(t[119]=h(").",-1))])]),(a(!0),l(V,null,Q((e.termHints||[]).slice(0,3),c=>(a(),l("div",{class:"term-hint",key:c.line},[n("span",null,[t[122]||(t[122]=h("In ",-1)),n("code",null,d(c.term),1),t[123]||(t[123]=h(", ",-1)),n("code",null,d(c.symbols.join(" ")),1),h(" "+d(c.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:v=>e.matchTermAsWritten(c.line)},"Match as written",8,j5)]))),128)),(e.termHints||[]).length>3?(a(),l("div",G5,d(e.termHints.length-3)+" more "+d(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),P(n("div",W5,"Terms are in an invalid format.",512),[[Z,e.anonymize?.terms?.errors?.format]])]),P(n("div",K5,[n("div",Y5,[t[126]||(t[126]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",J5,d(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]=c=>e.openPreserveFiles())},d((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,X5)],512),[[Z,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]=de(c=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[29]||(t[29]=de(c=>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)),P(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]=c=>e.preserve.search=c)},null,512),[[ot,e.preserve.search]]),n("div",Q5,[e.preserve.loading?(a(),l("p",Z5,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",x5,d(e.preserve.error),1)):(a(),l(V,{key:2},[(a(!0),l(V,null,Q(e.preserveRows(),(c,v)=>(a(),l("div",{class:"preserve-item",key:c.kind+":"+c.path,style:Ae({paddingLeft:c.depth*18+6+"px"})},[c.kind==="dir"?(a(),l("button",{key:0,type:"button",class:"preserve-caret","aria-expanded":c.open?"true":"false","aria-label":(c.open?"Collapse ":"Expand ")+c.label,onClick:g=>e.togglePreserveDir(c.path)},d(c.open?"\u25BE":"\u25B8"),9,e8)):(a(),l("span",t8)),n("input",{type:"checkbox",id:"pf-"+v,"aria-label":c.kind==="dir"?"Leave folder "+c.path+" unredacted":null,checked:c.state==="all",".indeterminate":c.state==="some",disabled:c.locked,onChange:g=>c.kind==="dir"?e.togglePreserveFolder(c.path):e.togglePreserveFile(c.path)},null,40,n8),n("label",{for:c.kind==="file"?"pf-"+v:null,class:"preserve-name",onClick:g=>c.kind==="dir"&&e.togglePreserveDir(c.path)},d(c.label),9,o8),c.note?(a(),l("span",s8,d(c.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",i8,d(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",r8,"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)),P(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib @@ -63,11 +63,11 @@ python experiments/run.py`),n("p",null,[h("Contact: "),n("span",{class:"redact", `).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[24]||(t[24]=u=>e.gotoValue=u),onKeydown:t[25]||(t[25]=Lt(de(u=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,WG),[[ot,e.gotoValue]]),n("span",{class:R(["goto-hint",{"is-error":e.gotoError}])},d(e.gotoError||"Line, or line:column"),3)],32)):f("v-if",!0)]),e.isCsv()&&e.csvView==="table"?(a(),l("div",{key:0,class:"csv-table-wrap",tabindex:"0",role:"region","aria-label":"Table view of "+(e.paths?.[e.paths.length-1]||"file")},[n("table",YG,[n("thead",null,[n("tr",null,[t[83]||(t[83]=n("th",{class:"csv-rownum",scope:"col"},[n("span",{class:"sr-only"},"Row")],-1)),(a(!0),l(V,null,Q(e.csvRows()[0]||[],(u,p)=>(a(),l("th",{scope:"col",key:p,class:R({"is-num":e.csvNumCol(p)})},[(a(!0),l(V,null,Q(e.redactParts(u),(c,v)=>(a(),l(V,{key:v},[c.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+c.n},[n("i",null,d(c.n),1)],8,JG)):(a(),l(V,{key:1},[h(d(c.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(a(!0),l(V,null,Q(e.csvRows().slice(1),(u,p)=>(a(),l("tr",{key:p},[n("td",XG,d(p+1),1),(a(!0),l(V,null,Q(u,(c,v)=>(a(),l("td",{key:v,class:R({"is-num":e.csvNumCol(v)})},[(a(!0),l(V,null,Q(e.redactParts(c),(g,y)=>(a(),l(V,{key:y},[g.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+g.n},[n("i",null,d(g.n),1)],8,QG)):(a(),l(V,{key:1},[h(d(g.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,KG)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?P((a(),l("div",ZG,null,512)),[[r,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",xG,[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]=u=>{e.mdFindQuery=u.target.value,e.runMdFind()}),onKeydown:[t[28]||(t[28]=Lt(de(u=>u.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=Lt(de(u=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,eW),n("span",tW,[n("button",{type:"button","aria-label":"Previous match",onClick:t[30]||(t[30]=u=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,nW),n("button",{type:"button","aria-label":"Next match",onClick:t[31]||(t[31]=u=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,oW)]),n("span",sW,d(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:R(["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]=u=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,iW),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[33]||(t[33]=u=>e.toggleMdFind(!1))},"\xD7")])):f("v-if",!0),e.type=="html"?(a(),l("div",rW,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,aW),e.readmeToc().length>=3?(a(),l("aside",lW,[t[86]||(t[86]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",dW,[n("a",{href:"#",class:R(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[34]||(t[34]=de(u=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(a(!0),l(V,null,Q(e.readmeToc(),(u,p)=>(a(),l("a",{key:u.id,href:"#"+u.id,class:R(["lvl-"+u.level,{"is-active":e.activeHeading===u.id}]),onClick:de(c=>e.scrollToHeading(u.id),["prevent"])},d(u.text),11,uW))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Wt(s,{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:R(["file-card file-card-media","view-"+e.type])},[n("header",cW,[n("div",pW,[n("button",{type:"button",class:R(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[35]||(t[35]=u=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[87]||(t[87]=[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",fW,[n("li",mW,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:d(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,hW)]),(a(!0),l(V,null,Q(e.paths,(u,p)=>(a(),l("li",{class:"breadcrumb-item","aria-current":p===e.paths.length-1?"page":null},[(a(!0),l(V,null,Q(e.redactParts(u),(c,v)=>(a(),l(V,{key:v},[c.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+c.n},[n("i",null,d(c.n),1)],8,vW)):(a(),l(V,{key:1},[h(d(c.t),1)],64))],64))),128))],8,gW))),256))]),n("span",yW,[e.type=="IPython"&&e.redactionCount()?(a(),l("b",{key:0,class:"ms-item ms-redact",title:e.redactionCount()+" redacted terms"},[h(d(e.redactionCount()),1),t[88]||(t[88]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,bW)):f("v-if",!0),n("span",wW,d(e.fileKind()),1),e.imageSize?(a(),l("span",kW,d(e.imageSize),1)):f("v-if",!0),e.fileSize(e.filePath)!=null?(a(),l("span",CW,d(e.formatSize(e.fileSize(e.filePath))),1)):f("v-if",!0)]),P(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[36]||(t[36]=u=>e.copyPath())},[(a(),l("svg",EW,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,NW)]))],8,SW),[[Z,e.filePath]])]),n("span",RW,[e.type=="IPython"&&e.redactionCount()?(a(),l(V,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[h(d(e.redactionCount()),1),t[89]||(t[89]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,TW),t[90]||(t[90]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),h(d(e.fileKind()),1),e.imageSize?(a(),l(V,{key:1},[t[91]||(t[91]=n("span",{class:"sep"},"\xB7",-1)),h(d(e.imageSize),1)],64)):f("v-if",!0),e.fileSize(e.filePath)!=null?(a(),l(V,{key:2},[t[92]||(t[92]=n("span",{class:"sep"},"\xB7",-1)),h(d(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)]),e.preview&&e.previewPreserved()?(a(),l("button",{key:0,type:"button",class:"rp-preserved-tag",onClick:t[37]||(t[37]=u=>e.openPreserveFiles())},"Left unredacted")):f("v-if",!0),n("div",PW,[e.type=="error"&&e.content==="file_too_big"?(a(),l("span",DW,[...t[93]||(t[93]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1),h("Over the size limit",-1)])])):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("div",AW,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="IPython"?"Open the notebook JSON":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,IW),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[94]||(t[94]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,OW)])):f("v-if",!0),n("div",MW,[n("button",{type:"button",class:R(["btn btn-sm btn-icon-only btn-ghost tb-more-btn",{"is-on":e.moreOpen}]),"aria-label":"More actions","aria-haspopup":"true","aria-expanded":e.moreOpen?"true":"false",onClick:t[38]||(t[38]=de(u=>e.moreOpen=!e.moreOpen,["stop"]))},[(a(),l("svg",qW,[...t[95]||(t[95]=[n("circle",{cx:"5",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"12",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"19",cy:"12",r:"1.8"},null,-1)])]))],10,VW),e.moreOpen?(a(),l("div",{key:0,class:"tb-menu",role:"menu",onClick:t[40]||(t[40]=u=>e.moreOpen=!1)},[e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",LW,[t[96]||(t[96]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),h("Snapshot \xB7 "+d(e.fmt?.date(e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),1)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",$W)):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("a",{key:2,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[t[97]||(t[97]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1)),h(d(e.type=="IPython"?"View notebook JSON":"View raw"),1)],8,_W)):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("a",{key:3,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[98]||(t[98]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),h("Download file",-1)])],8,FW)):f("v-if",!0),e.options?.download?(a(),l("a",{key:4,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[99]||(t[99]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),h("Download ZIP",-1)])],8,UW)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[39]||(t[39]=u=>e.copyPath())},[...t[100]||(t[100]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),h("Copy file path",-1)])]),t[101]||(t[101]=n("div",{class:"tb-menu-sep"},null,-1)),t[102]||(t[102]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),h("FAQ")],-1)),t[103]||(t[103]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),h("Report a bug")],-1))])):f("v-if",!0)])])]),e.type=="image"?(a(),l("div",BW,[n("img",{class:"image-content",src:e.safeUrl(e.url),alt:e.paths[e.paths.length-1],onLoad:t[41]||(t[41]=u=>e.onImageLoad(u))},null,40,zW)])):f("v-if",!0),e.type=="media"?(a(),l("div",HW,[n("video",{class:"video-content",controls:"",preload:"metadata",playsinline:"",src:e.safeUrl(e.url)},null,8,jW)])):f("v-if",!0),e.type=="audio"?(a(),l("div",GW,[n("audio",{controls:"",preload:"metadata",src:e.safeUrl(e.url)},null,8,WW)])):f("v-if",!0),e.type=="pdf"?(a(),Wt(i,{key:3,src:e.safeUrl(e.url)},null,8,["src"])):f("v-if",!0),e.type=="IPython"?(a(),l("div",KW,[Me(o,{class:"markdown-body",file:e.url,content:e.content},null,8,["file","content"])])):f("v-if",!0),e.type=="binary"?(a(),l("div",YW,[t[105]||(t[105]=n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-file"})],-1)),t[106]||(t[106]=n("h2",{class:"file-state-title"},"No preview for this file",-1)),n("p",JW,d(e.preview?"Reviewers can open this file; it is not previewed here.":"This is a binary file. Download it to open it on your computer."),1),e.preview?f("v-if",!0):(a(),l("div",XW,[n("a",{target:e.preview?"_blank":"_self",class:"btn btn-primary",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[104]||(t[104]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),h("Download file",-1)])],8,QW)]))])):f("v-if",!0),e.type=="error"?(a(),l("div",ZW,[t[108]||(t[108]=n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("h2",xW,d(e.content==="file_too_big"?"This file is too large to preview":"This file can't be shown"),1),e.content==="file_too_big"?(a(),l("p",eK,d(e.preview?"Reviewers can open this file; it is not previewed here. Files over 1 MB are only shown on the reviewer page.":"It is over the size limit for anonymized files, so it can't be previewed or downloaded from this link."),1)):(a(),l("p",tK,d(e.fmt.translate("ERRORS."+e.content)),1)),e.preview?f("v-if",!0):(a(),l("div",nK,[n("a",{class:"btn btn-primary",href:e.safeUrl("/r/"+e.repoId+"/")},"Back to the repository",8,oK),t[107]||(t[107]=n("a",{class:"btn btn-outline-ink",href:"/faq#formats"},"Supported files",-1))]))])):f("v-if",!0),e.content==null&&e.type!="error"?(a(),l("div",sK,[...t[109]||(t[109]=[n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-file"})],-1),n("h2",{class:"file-state-title"},"This file is empty",-1),n("p",{class:"file-state-msg"},"It has no content in this snapshot.",-1)])])):f("v-if",!0)],2)):f("v-if",!0),e.type=="rate_limited"?(a(),l("div",iK,[n("div",rK,[t[112]||(t[112]=ke('
Temporarily paused
GitHub API rate limit reached
',1)),n("p",aK,[t[110]||(t[110]=h("This repository will be available in ",-1)),n("strong",null,d(e.rateLimitCountdown),1),t[111]||(t[111]=h(". The page will reload automatically.",-1))])])])):f("v-if",!0),e.type=="error"&&!e.fileFrame()?(a(),l("div",lK,[n("section",dK,[n("h1",uK,d(e.fmt.translate(e.isSourceAccessError()?"VIEWER_ERRORS.access_title":"VIEWER_ERRORS.title")),1),n("p",null,d(e.fmt.translate("ERRORS."+e.content)),1),e.isSourceAccessError()?(a(),l(V,{key:0},[n("p",null,d(e.fmt.translate("VIEWER_ERRORS.reader_help")),1),n("p",null,d(e.fmt.translate("VIEWER_ERRORS.owner_help")),1)],64)):f("v-if",!0),n("div",cK,[e.isSourceAccessError()?f("v-if",!0):(a(),l("a",pK,"Back to home")),e.isSourceAccessError()?f("v-if",!0):(a(),l("a",fK,"Read the FAQ")),n("button",{type:"button",class:"btn btn-primary",onClick:t[42]||(t[42]=u=>e.retryContent())},d(e.fmt.translate("VIEWER_ERRORS.retry")),1),e.isSourceAccessError()?(a(),l("a",mK,d(e.fmt.translate("VIEWER_ERRORS.dashboard")),1)):f("v-if",!0)])])])):f("v-if",!0),e.type=="loading"&&!e.error?(a(),l("section",hK,[n("div",gK,[n("strong",null,d(e.fmt.translate(e.fileReceivedBytes?"VIEWER_LOADING.receiving":"VIEWER_LOADING.loading")),1),n("span",vK,d(e.filePath),1),e.fileLoadingSlow?(a(),l("p",yK,d(e.fmt.translate("VIEWER_LOADING.slow")),1)):f("v-if",!0)]),n("div",bK,[(a(),l(V,null,Q(10,u=>n("span",{key:u})),64))])])):f("v-if",!0),e.type=="empty"?(a(),l("div",wK,[...t[113]||(t[113]=[n("h1",{class:"paper-empty-title m-auto"},[h("Empty "),n("em",null,"repository"),h(".")],-1)])])):f("v-if",!0),e.content==null&&!["empty","loading","error","rate_limited"].includes(e.type)&&!e.fileFrame()?(a(),l("div",kK,[...t[114]||(t[114]=[n("h1",{class:"paper-empty-title m-auto"},[h("Empty "),n("em",null,"file"),h(".")],-1)])])):f("v-if",!0)],64)}var CK={class:"container page dashboard-page paper-page"},SK={class:"row"},EK={class:"w-100"},NK={class:"w-100","aria-label":"Pull Requests","accept-charset":"UTF-8"},RK={class:"d-flex flex-column flex-md-row align-items-md-center",style:{gap:"8px"}},TK={class:"flex-grow-1"},PK={type:"search",id:"search",class:"form-control","aria-label":"Find a pull request...",placeholder:"Find a pull request...",autocomplete:"off"},DK={class:"d-flex flex-wrap",style:{gap:"6px"}},AK={class:"dropdown"},IK={class:"dropdown-menu","aria-labelledby":"dropdownSort"},OK={class:"form-check dropdown-item"},MK={class:"form-check-input",type:"radio",name:"sort",id:"sortFullName",value:"fullName"},VK={class:"form-check dropdown-item"},qK={class:"form-check-input",type:"radio",name:"sort",id:"sortAnonymizeDate",value:"-anonymizeDate"},LK={class:"form-check dropdown-item"},$K={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},_K={class:"form-check dropdown-item"},FK={class:"form-check-input",type:"radio",name:"sort",id:"sortLastView",value:"-lastView"},UK={class:"form-check dropdown-item"},BK={class:"form-check-input",type:"radio",name:"sort",id:"sortPageView",value:"-pageView"},zK={class:"dropdown"},HK={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},jK={class:"form-check dropdown-item"},GK={class:"form-check-input",type:"checkbox",name:"sort",id:"statusReady",value:"ready"},WK={class:"form-check dropdown-item"},KK={class:"form-check-input",type:"checkbox",name:"sort",id:"statusExpired",value:"expired"},YK={class:"form-check dropdown-item"},JK={class:"form-check-input",type:"checkbox",name:"sort",id:"statusRemoved",value:"removed"},XK={class:"d-flex flex-wrap mt-2",style:{gap:"6px"}},QK={class:"filter-chip"},ZK=["onClick"],xK={class:"repo-list w-100"},eY={class:"repo-list-item-content"},tY={class:"repo-list-item-main"},nY={class:"repo-list-item-header"},oY=["textContent","href"],sY=["textContent"],iY=["textContent"],rY={class:"repo-source"},aY=["href"],lY={class:"repo-date"},dY={class:"repo-meta"},uY={key:0,title:"Conference"},cY=["title"],pY=["title"],fY=["title"],mY={key:1},hY={class:"repo-list-item-actions"},gY={class:"dropdown"},vY={class:"dropdown-menu dropdown-menu-right"},yY=["href"],bY=["onClick"],wY=["onClick"],kY=["onClick"],CY=["href"],SY={key:0,class:"repo-list-empty"};function Tp(e,t){let s=Pe("field"),i=Pe("form");return a(),l("div",CK,[n("div",SK,[n("div",EK,[t[12]||(t[12]=ke('
My work \xA0/\xA0 Pull requests

Anonymized pull requests

Track PR mirrors you\u2019ve created and their reviewer traffic.

',2)),f(" Search + filters row "),P((a(),l("form",NK,[n("div",RK,[n("div",TK,[P(n("input",PK,null,512),[[s,{state:e.viewState,set:o=>{e.search=o},value:e.search,form:null,options:{}}]])]),n("div",DK,[n("div",AK,[t[6]||(t[6]=n("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Sort ",-1)),n("div",IK,[t[5]||(t[5]=n("h6",{class:"dropdown-header"},"Select order",-1)),n("div",OK,[P(n("input",MK,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[0]||(t[0]=n("label",{class:"form-check-label",for:"sortFullName"},"Pull Request",-1))]),n("div",VK,[P(n("input",qK,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[1]||(t[1]=n("label",{class:"form-check-label",for:"sortAnonymizeDate"},"Anonymize Date",-1))]),n("div",LK,[P(n("input",$K,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[2]||(t[2]=n("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),n("div",_K,[P(n("input",FK,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[3]||(t[3]=n("label",{class:"form-check-label",for:"sortLastView"},"Last View",-1))]),n("div",UK,[P(n("input",BK,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[4]||(t[4]=n("label",{class:"form-check-label",for:"sortPageView"},"Page View",-1))])])]),n("div",zK,[t[11]||(t[11]=n("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Status ",-1)),n("div",HK,[t[10]||(t[10]=n("h6",{class:"dropdown-header"},"Select status",-1)),n("div",jK,[P(n("input",GK,null,512),[[s,{state:e.viewState,set:o=>{e.filters.status.ready=o},value:e.filters?.status?.ready,form:null,options:{}}]]),t[7]||(t[7]=n("label",{class:"form-check-label",for:"statusReady"},"Ready",-1))]),n("div",WK,[P(n("input",KK,null,512),[[s,{state:e.viewState,set:o=>{e.filters.status.expired=o},value:e.filters?.status?.expired,form:null,options:{}}]]),t[8]||(t[8]=n("label",{class:"form-check-label",for:"statusExpired"},"Expired",-1))]),n("div",YK,[P(n("input",JK,null,512),[[s,{state:e.viewState,set:o=>{e.filters.status.removed=o},value:e.filters?.status?.removed,form:null,options:{}}]]),t[9]||(t[9]=n("label",{class:"form-check-label",for:"statusRemoved"},"Removed",-1))])])])])])])),[[i,e.viewState]]),f(" Active filter chips "),P(n("div",XK,[(a(!0),l(V,null,Q(e.filters?.status,(o,r,u)=>P((a(),l("span",QK,[h(d(e.fmt?.title(r))+" ",1),n("button",{type:"button",class:"filter-chip-close","aria-label":"Remove filter",onClick:p=>{e.filters.status[r]=!0}}," \xD7 ",8,ZK)],512)),[[Z,!o]])),256))],512),[[Z,e.filters?.status?.ready===!1||e.filters?.status?.expired===!1||e.filters?.status?.removed===!1]])]),f(" Pull request list "),n("ul",xK,[(a(!0),l(V,null,Q(e.filteredPullRequests,(o,r)=>(a(),l("li",{class:R(["repo-list-item",{"repo-inactive":o?.status=="expired"||o?.status=="removed"||o?.status=="error"}])},[n("div",eY,[n("div",tY,[n("div",nY,[n("a",{class:"repo-name",textContent:d(o?.pullRequestId),href:e.safeUrl("/pr/"+o?.pullRequestId)},null,8,oY),n("span",{class:R(["status-badge",{"status-removed":o?.status=="removed"||o?.status=="expired"||o?.status=="removing"||o?.status=="expiring","status-preparing":o?.status=="preparing"||o?.status=="download","status-ready":o?.status=="ready","status-error":o?.status=="error"}])},[n("span",{textContent:d(e.fmt?.title(o?.status))},null,8,sY),o?.status=="error"?(a(),l("span",{key:0,textContent:d(": "+o?.statusMessage)},null,8,iY)):f("v-if",!0)],2)]),n("div",rY,[n("span",null,[t[13]||(t[13]=n("i",{class:"fab fa-github","aria-hidden":"true"},null,-1)),n("a",{href:e.safeUrl("https://github.com/"+o?.source?.repositoryFullName+"/pull/"+o?.source?.pullRequestId)},d(o?.source?.repositoryFullName)+"#"+d(o?.source?.pullRequestId),9,aY)]),n("span",{class:R(["status-badge",{"status-ready":o?.merged,"status-removed":o?.state=="open","status-error":o?.state=="closed"&&!o?.merged}]),style:{"font-size":"10px"}},d(e.fmt?.title(o?.merged?"merged":o?.state)),3),n("span",lY,"anonymized "+d(e.fmt?.humanTime(o?.anonymizeDate)),1)])]),n("div",dY,[o?.conference?(a(),l("span",uY,[t[14]||(t[14]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),h(" "+d(o?.conference),1)])):f("v-if",!0),n("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Terms: "+o?.options?.terms?.join(", ")},[t[15]||(t[15]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1)),h(" "+d(e.fmt?.number(o?.options?.terms?.length)),1)],8,cY),n("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Views: "+e.fmt?.number(o?.pageView)},[t[16]||(t[16]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1)),h(" "+d(e.fmt?.number(o?.pageView)),1)],8,pY),n("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Last view: "+e.fmt?.date(o?.lastView)},[t[17]||(t[17]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-calendar"})],-1)),h(" "+d(e.fmt?.humanTime(o?.lastView)),1)],8,fY),o?.options?.expirationMode!="never"&&o?.status=="ready"?(a(),l("span",mY,[t[18]||(t[18]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),h(" Expire: "+d(e.fmt?.humanTime(o?.options?.expirationDate)),1)])):f("v-if",!0)])]),n("div",hY,[n("div",gY,[t[24]||(t[24]=n("button",{class:"btn btn-sm dropdown-toggle",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Actions ",-1)),n("div",vY,[n("a",{class:"dropdown-item",href:e.safeUrl("/pull-request-anonymize/"+o?.pullRequestId)},[...t[19]||(t[19]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),h(" Edit ",-1)])],8,yY),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.updatePullRequest(o),["prevent"])},[...t[20]||(t[20]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),h(" Force update ",-1)])],8,bY),[[Z,o?.status=="ready"||o?.status=="error"]]),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.updatePullRequest(o),["prevent"])},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),h(" Enable ",-1)])],8,wY),[[Z,o?.status=="removed"]]),P(n("a",{class:"dropdown-item",href:"#",onClick:de(u=>e.removePullRequest(o),["prevent"])},[...t[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),h(" Remove ",-1)])],8,kY),[[Z,o?.status=="ready"]]),n("a",{class:"dropdown-item",href:e.safeUrl("/pr/"+o?.pullRequestId+"/")},[...t[23]||(t[23]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),h(" View PR ",-1)])],8,CY)])])])],2))),256)),e.filteredPullRequests?.length==0?(a(),l("li",SY,[...t[25]||(t[25]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No pull requests to display.",-1)])])):f("v-if",!0)])])])}var EY={class:"container paper-page user-settings"},NY={class:"settings-nav","aria-label":"Settings"},RY=["aria-current","onClick"],TY={class:"settings-row"},PY=["rows"],DY={class:"settings-syntax"},AY={class:"invalid-feedback"},IY={class:"settings-row"},OY={class:"settings-checks"},MY={class:"settings-check"},VY={class:"form-check-input",type:"checkbox",id:"link",name:"link"},qY={class:"settings-check"},LY={class:"form-check-input",type:"checkbox",id:"image",name:"image"},$Y={class:"settings-check"},_Y={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},FY={class:"settings-check"},UY={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},BY={class:"settings-check"},zY={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},HY={class:"settings-check"},jY={class:"form-check-input",type:"checkbox",id:"page",name:"page"},GY={class:"settings-row"},WY={class:"settings-check"},KY={class:"form-check-input",type:"checkbox",id:"update",name:"update"},YY={class:"settings-row"},JY={class:"form-control",id:"expiration",name:"expiration"},XY={class:"settings-help"},QY={class:"settings-save"},ZY={class:"settings-save-status draft-status",role:"status"},xY={key:0},eJ={key:1},tJ={key:2},nJ=["disabled"],oJ={key:1,class:"settings-save-error",role:"alert"},sJ=["aria-busy"],iJ={key:0,role:"status"},rJ={key:1,class:"settings-notice",role:"alert"},aJ=["disabled"],lJ={key:2,class:"settings-notice",role:"status"},dJ={key:3,class:"settings-notice",role:"status"},uJ=["disabled"],cJ={class:"billing-summary"},pJ={class:"billing-summary-head"},fJ={class:"billing-plan-name"},mJ={key:0,class:"billing-plan-meta"},hJ={key:1,class:"billing-plan-meta"},gJ={key:0,class:"billing-summary-actions"},vJ=["disabled"],yJ={id:"settings-quota"},bJ={key:1,role:"status"},wJ={key:0,class:"settings-notice"},kJ={key:1,class:"settings-notice"},CJ={key:2,class:"settings-notice"},SJ={key:4,class:"billing-section","aria-labelledby":"settings-plan-comparison"},EJ={key:0,class:"billing-offers"},NJ={key:0,class:"billing-offer is-recommended"},RJ={class:"billing-offer-price"},TJ={class:"billing-offer-list"},PJ=["disabled"],DJ={key:1,class:"billing-offer"},AJ={class:"billing-offer-head"},IJ={class:"billing-toggle",role:"radiogroup","aria-label":"Billing frequency"},OJ=["aria-checked","onClick"],MJ={key:0,class:"billing-toggle-save"},VJ={class:"billing-offer-price"},qJ={class:"billing-offer-list"},LJ=["disabled"],$J={key:1,class:"billing-addons"},_J={class:"billing-addon-rows"},FJ={class:"billing-addon-price"},UJ=["onClick","disabled"],BJ={key:2,class:"billing-buy",id:"settings-addons-title",tabindex:"-1"},zJ={class:"billing-buy-info"},HJ={class:"billing-offer-price"},jJ={class:"billing-offer-list"},GJ={class:"billing-buy-form"},WJ=["value"],KJ=["disabled"],YJ={key:1,class:"billing-buy-desc"},JJ={key:2,class:"billing-footnote"},XJ={class:"billing-compare"},QJ={class:"billing-compare-card"},ZJ={class:"settings-comparison"},xJ={key:0,scope:"col",class:"is-recommended"},eX={key:1,scope:"col"},tX={key:0,class:"is-recommended"},nX={key:1},oX={key:0,class:"is-recommended"},sX={key:1},iX={key:0,class:"is-recommended"},rX={key:1},aX={key:0,class:"is-recommended"},lX={key:1},dX={key:0,class:"is-recommended"},uX={key:1},cX={key:0,class:"is-recommended"},pX={key:1},fX={key:3,class:"billing-footnote"},mX={key:5,class:"billing-section"},hX={class:"billing-section-head"},gX=["disabled"],vX={key:0,class:"billing-empty"},yX={key:1,class:"billing-history-head","aria-hidden":"true"},bX={key:2,class:"billing-history"},wX={class:"billing-history-main"},kX=["href"],CX=["href"],SX={class:"billing-history-term"},EX={class:"billing-history-paid"},NX={class:"billing-history-status"},RX={class:"billing-manage"},TX={key:0},PX={key:1},DX=["disabled"],AX={class:"billing-conference"},IX={id:"settings-account",class:"settings-account-panel"},OX={class:"paper-account-card"},MX=["src"],VX={class:"paper-account-identity"},qX={class:"paper-account-name"},LX=["disabled"],$X={key:0,role:"status"},_X={key:1,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},FX=["disabled"],UX={key:3,role:"status"},BX={class:"paper-danger-zone"},zX={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},HX=["textContent"],jX=["disabled"],GX={key:1,class:"settings-delete-confirm"},WX={for:"delete-username"},KX={class:"settings-actions"},YX=["disabled"],JX=["disabled"];function Pp(e,t){let s=Ze("quota-usage"),i=Pe("field"),o=Pe("form");return a(),l("div",EY,[t[107]||(t[107]=n("header",{class:"settings-title page-head page-head-main"},[n("h1",null,"Settings"),n("p",{class:"paper-page-lede"},"Defaults for new anonymizations, hosting and your account.")],-1)),n("nav",NY,[(a(),l(V,null,Q([{id:"defaults",label:"Anonymization defaults"},{id:"billing",label:"Hosting & billing"},{id:"account",label:"Account"}],r=>n("button",{type:"button","aria-current":e.settingsTab===r.id?"page":null,onClick:u=>e.settingsTab=r.id},d(r.label),9,RY)),64))]),P(n("div",null,[t[41]||(t[41]=n("p",{class:"settings-scope"},"For new anonymizations only. Existing repositories keep their settings.",-1)),P((a(),l("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onInput:t[1]||(t[1]=r=>e.unsavedChanges=!0),onSubmit:t[2]||(t[2]=de(r=>e.submitForm(r,()=>{e.saveDefault(r)}),["prevent"]))},[n("section",TY,[t[26]||(t[26]=n("div",null,[n("label",{class:"settings-label",for:"terms"},"Terms to redact"),n("p",{class:"settings-help"},"One term per line.")],-1)),n("div",null,[P(n("textarea",{class:"form-control",id:"terms",name:"terms",rows:Math.min(14,Math.max(3,String(e.terms||"").split(` `).length+1)),placeholder:`Jane Smith MIT CSAIL -jane.smith@example.org`},null,8,PY),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",DY,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=h("Matches become ",-1)),n("code",null,d(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=h(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=h(" for a custom replacement. Regex is supported.",-1))])]),P(n("div",AY,"Terms are in an invalid format.",512),[[Z,e.defaultsForm?.terms?.errors?.format]])])]),n("section",IY,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",OY,[n("label",MY,[P(n("input",VY,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=h("Keep links",-1))]),n("label",qY,[P(n("input",LY,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=h("Display images",-1))]),n("label",$Y,[P(n("input",_Y,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=h("Display PDFs",-1))]),n("label",FY,[P(n("input",UY,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=h("Display notebooks",-1))]),n("label",BY,[P(n("input",zY,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=h("Show line counts",-1))]),n("label",HY,[P(n("input",jY,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=h("GitHub Pages",-1))])]),t[33]||(t[33]=n("p",{class:"settings-help"},"Images and PDFs are not anonymized.",-1)),t[34]||(t[34]=n("p",{class:"settings-help"},"GitHub Pages must use the anonymized branch.",-1))])]),n("section",GY,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",WY,[P(n("input",KY,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=h("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",YY,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[P((a(),l("select",JY,[...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",XY,d(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",QY,[n("div",ZY,[e.draftRestored?(a(),l("span",xY,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",eJ,"Unsaved changes"+d(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",tJ,d(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:R(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},d(e.saving?"Saving\u2026":"Save defaults"),11,nJ),e.error?(a(),l("div",oJ,d(e.error),1)):f("v-if",!0)])],32)),[[o,e.viewState]])],512),[[Z,e.settingsTab==="defaults"]]),P(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",iJ,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",rJ,[h(d(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,aJ)])):f("v-if",!0),e.billingNotice?(a(),l("p",lJ,d(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",dJ,[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,uJ)])):f("v-if",!0),n("section",cJ,[n("div",pJ,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",fJ,d(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",mJ,[h(d(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access until ":"Renews ")+d(e.billingDate(e.profileAuthorGrant().until)),1),e.profileAuthorPurchase()?.amount!=null?(a(),l(V,{key:0},[h(" \xB7 "+d(e.billingPrice(e.profileAuthorPurchase())),1)],64)):f("v-if",!0)])):e.billing?.allowance?(a(),l("p",hJ,d(e.billing.allowance.repositories)+" repositories \xB7 "+d(e.billingBytes(e.billing.allowance.storage))+" \xB7 links up to "+d(e.billing.freeExpirationMonths||5)+" months",1)):f("v-if",!0)]),e.profileAuthorGrant()&&e.billing?.portal?(a(),l("div",gJ,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[5]||(t[5]=r=>e.billingPortal()),disabled:e.billingBusy},d(e.profileAuthorGrant().cancelAtPeriodEnd?"Resume renewal":"Change or cancel plan"),9,vJ)])):f("v-if",!0)]),n("div",yJ,[e.quota?(a(),Wt(s,{key:0,quota:e.quota,fmt:e.fmt},null,8,["quota","fmt"])):(a(),l("p",bJ,"Loading usage\u2026"))]),e.quota?.repository&&!e.quota.repository.unlimited&&e.quota.repository.used>=e.quota.repository.total?(a(),l("p",wJ,[h("Your free repositories are used up. Add the next one for "+d(e.profileSlotPlan()?e.billingPrice(e.profileSlotPlan()):"a one-time payment")+" when you create it, or ",1),t[45]||(t[45]=n("a",{href:"/dashboard"},"remove work you no longer need",-1)),t[46]||(t[46]=h(".",-1))])):f("v-if",!0),e.profileAuthorGrant()?.status==="past_due"?(a(),l("p",kJ,"A subscription payment is overdue. Update your payment details in Manage billing and invoices.")):f("v-if",!0),e.profilePastSubscription()?(a(),l("p",CJ,[...t[47]||(t[47]=[h("Your previous subscription has ended. Never-expiring repositories stay online for a 90-day grace period. ",-1),n("a",{href:"/dashboard"},"Review expiration dates",-1),h(".",-1)])])):f("v-if",!0),t[48]||(t[48]=n("p",{class:"billing-footnote"},"Co-authored, paid and conference repositories aren't counted here.",-1))]),e.billing?.enabled&&!e.profileAuthorGrant()&&(e.profilePackPlan()||e.profileAuthorPlans().length)?(a(),l("section",SJ,[t[85]||(t[85]=n("h2",{class:"billing-section-title",id:"settings-plan-comparison",tabindex:"-1"},"Get more",-1)),e.showRepositoryPass&&e.profileAddon()&&!e.billingPending?f("v-if",!0):(a(),l("div",EJ,[e.profilePackPlan()?(a(),l("article",NJ,[t[54]||(t[54]=n("span",{class:"billing-offer-pill"},"Recommended",-1)),t[55]||(t[55]=n("div",{class:"billing-offer-head"},[n("p",{class:"billing-eyebrow"},"For one paper")],-1)),t[56]||(t[56]=n("h3",null,"Paper pack",-1)),n("p",RJ,[n("strong",null,d(e.billingAmount(e.profilePackPlan())),1),t[49]||(t[49]=h(" once",-1))]),n("ul",TJ,[t[50]||(t[50]=n("li",null,"One more repository, outside your free ones",-1)),n("li",null,"Its own "+d(e.billingBytes(e.profileSlotPlan()?.storage||e.profilePassPlan()?.storage))+" of storage",1),t[51]||(t[51]=n("li",null,"Automatic updates for 180 days",-1)),t[52]||(t[52]=n("li",null,"Online for up to a year",-1)),t[53]||(t[53]=n("li",null,"No subscription",-1))]),n("button",{type:"button",class:"btn btn-ink",onClick:t[6]||(t[6]=r=>e.openProfileAddon("repo_pack")),disabled:e.billingPending||e.billing.checkoutEnabled===!1},"Buy a Paper pack",8,PJ)])):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("article",DJ,[n("div",AJ,[t[57]||(t[57]=n("p",{class:"billing-eyebrow"},"For many papers",-1)),n("div",IJ,[(a(!0),l(V,null,Q(e.profileAuthorPlansByValue(),r=>(a(),l("button",{type:"button",role:"radio",key:r.id,"aria-checked":e.profileSelectedPlan()?.id===r.id?"true":"false",class:R({"is-on":e.profileSelectedPlan()?.id===r.id}),onClick:u=>e.profilePlan=r.id},[h(d(r.interval==="year"?"Yearly":"Monthly"),1),r.interval==="year"&&e.profileAnnualSavings()?(a(),l("span",MJ,"\u2212"+d(e.profileAnnualSavings())+"%",1)):f("v-if",!0)],10,OJ))),128))])]),t[62]||(t[62]=n("h3",null,"Author subscription",-1)),n("p",VJ,[n("strong",null,d(e.billingAmount(e.profileSelectedPlan())),1),h(" per "+d(e.profileSelectedPlan()?.interval==="year"?"year":"month"),1)]),n("ul",qJ,[n("li",null,d(e.profileSelectedPlan()?.repositories)+" repositories, "+d(e.billingBytes(e.profileSelectedPlan()?.storage)),1),t[58]||(t[58]=n("li",null,"Automatic updates",-1)),t[59]||(t[59]=n("li",null,"Links that never expire",-1)),t[60]||(t[60]=n("li",null,"Coauthors included",-1)),t[61]||(t[61]=n("li",null,"Cancel renewal anytime",-1))]),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.billingBusy||e.billing.checkoutEnabled===!1,onClick:t[7]||(t[7]=r=>e.checkout(e.profileSelectedPlan().id))},d(e.billingBusy?"Please wait\u2026":"Subscribe"),9,LJ)])):f("v-if",!0)])),e.profileSingleAddons().length&&!(e.showRepositoryPass&&e.profileAddon()&&!e.billingPending)?(a(),l("div",$J,[t[63]||(t[63]=n("div",{class:"billing-addons-head"},[n("h3",{class:"billing-subtitle"},"Or pay for one thing"),n("span",null,"One-time")],-1)),n("ul",_J,[(a(!0),l(V,null,Q(e.profileSingleAddons(),r=>(a(),l("li",{key:r.id},[n("div",null,[n("strong",null,d(r.name),1),n("span",null,d(e.profileAddonBlurb(r.id)),1)]),n("span",FJ,d(e.billingAmount(r)),1),n("button",{type:"button",class:"settings-text-button",onClick:u=>e.openProfileAddon(r.id),disabled:e.billingPending||e.billing.checkoutEnabled===!1},"Buy",8,UJ)]))),128))])])):f("v-if",!0),e.showRepositoryPass&&e.profileAddon()&&!e.billingPending?(a(),l("div",BJ,[n("div",zJ,[n("button",{type:"button",class:"btn btn-outline-ink billing-back",onClick:t[8]||(t[8]=r=>e.showRepositoryPass=!1)},"\u2190 All options"),n("h3",null,d(e.profileAddon().name),1),n("p",HJ,[n("strong",null,d(e.billingAmount(e.profileAddon())),1),t[64]||(t[64]=h(" once",-1))]),n("ul",jJ,[(a(!0),l(V,null,Q(e.profileAddonFeatures(e.profileAddon().id),r=>(a(),l("li",{key:r},d(r),1))),128))])]),n("div",GJ,[e.profileRepositories().length?(a(),l(V,{key:0},[t[66]||(t[66]=n("label",{class:"paper-field-label",for:"billing-repository"},"Which repository?",-1)),P(n("select",{id:"billing-repository",class:"form-control","onUpdate:modelValue":t[9]||(t[9]=r=>e.billingRepository=r)},[t[65]||(t[65]=n("option",{value:"",disabled:""},"Choose a repository",-1)),(a(!0),l(V,null,Q(e.profileRepositories(),r=>(a(),l("option",{key:r.repoId,value:r.repoId},d(r.repoId)+" \xB7 "+d(e.profileRepositoryExpiry(r)),9,WJ))),128))],512),[[Rt,e.billingRepository]]),n("button",{type:"button",class:"btn btn-ink",disabled:e.billingBusy||!e.billingRepository||e.billing.checkoutEnabled===!1,onClick:t[10]||(t[10]=r=>e.checkout(e.profileAddon().id,e.billingRepository))},d(e.billingBusy?"Please wait\u2026":"Continue to checkout"),9,KJ),t[67]||(t[67]=n("p",{class:"billing-footnote"},"One-time payment. Tax shown at checkout.",-1))],64)):(a(),l("p",YJ,[...t[68]||(t[68]=[h("You have no repositories yet. ",-1),n("a",{href:"/anonymize"},"Create one",-1),h(" first.",-1)])])),["repo_slot","repo_pack"].includes(e.profileAddon().id)?(a(),l("p",JJ,[...t[69]||(t[69]=[h("Adding a new repository? ",-1),n("a",{href:"/anonymize"},"Start creating it",-1),h("; the form offers this once your free repositories are in use.",-1)])])):f("v-if",!0)])])):f("v-if",!0),n("details",XJ,[t[84]||(t[84]=n("summary",null,"Compare all features",-1)),n("div",QJ,[n("table",ZJ,[t[83]||(t[83]=n("caption",{class:"sr-only"},"Free, Paper pack and Author hosting",-1)),n("thead",null,[n("tr",null,[t[72]||(t[72]=n("th",{scope:"col"},[n("span",{class:"sr-only"},"Feature")],-1)),t[73]||(t[73]=n("th",{scope:"col"},[h("Free"),n("small",null,"\u20AC0")],-1)),e.profilePackPlan()?(a(),l("th",xJ,[t[70]||(t[70]=h("Paper pack",-1)),n("small",null,d(e.billingPrice(e.profilePackPlan())),1)])):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("th",eX,[t[71]||(t[71]=h("Author",-1)),n("small",null,d(e.billingPrice(e.profileSelectedPlan())),1)])):f("v-if",!0)])]),n("tbody",null,[n("tr",null,[t[74]||(t[74]=n("th",{scope:"row"},"Repositories",-1)),n("td",null,d(e.billing.allowance?.repositories),1),e.profilePackPlan()?(a(),l("td",tX,"+1")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",nX,d(e.profileSelectedPlan()?.repositories),1)):f("v-if",!0)]),n("tr",null,[t[75]||(t[75]=n("th",{scope:"row"},"Source storage",-1)),n("td",null,d(e.billingBytes(e.billing.allowance?.storage))+" total",1),e.profilePackPlan()?(a(),l("td",oX,d(e.billingBytes(e.profileSlotPlan()?.storage||e.profilePassPlan()?.storage))+" for it",1)):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",sX,d(e.billingBytes(e.profileSelectedPlan()?.storage))+" total",1)):f("v-if",!0)]),n("tr",null,[t[76]||(t[76]=n("th",{scope:"row"},"Latest expiration",-1)),n("td",null,d(e.billing.freeExpirationMonths||5)+" months ahead",1),e.profilePackPlan()?(a(),l("td",iX,"1 year after purchase")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",rX,"Never")):f("v-if",!0)]),n("tr",null,[t[77]||(t[77]=n("th",{scope:"row"},"Automatic updates",-1)),t[78]||(t[78]=n("td",null,"No",-1)),e.profilePackPlan()?(a(),l("td",aX,"180 days")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",lX,"Yes")):f("v-if",!0)]),n("tr",null,[t[79]||(t[79]=n("th",{scope:"row"},"Renews",-1)),t[80]||(t[80]=n("td",null,"No",-1)),e.profilePackPlan()?(a(),l("td",dX,"No")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",uX,"Until cancelled")):f("v-if",!0)]),n("tr",null,[t[81]||(t[81]=n("th",{scope:"row"},"Reviewer access",-1)),t[82]||(t[82]=n("td",null,"Free",-1)),e.profilePackPlan()?(a(),l("td",cX,"Free")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",pX,"Free")):f("v-if",!0)])])])])]),e.billing.checkoutEnabled===!1?(a(),l("p",fX,"New purchases are not available right now. Existing billing can still be managed below.")):f("v-if",!0)])):f("v-if",!0),e.billing?.enabled?(a(),l("section",mX,[n("div",hX,[t[86]||(t[86]=n("h2",{class:"billing-section-title"},"Purchases",-1)),e.billingPending?f("v-if",!0):(a(),l("button",{key:0,type:"button",class:"settings-text-button",onClick:t[11]||(t[11]=r=>e.refreshBilling()),disabled:e.billingBusy},"Refresh payment status",8,gX))]),(e.billing.purchases||[]).length?f("v-if",!0):(a(),l("p",vX,"No purchases yet.")),(e.billing.purchases||[]).length?(a(),l("div",yX,[...t[87]||(t[87]=[n("span",null,"Purchase",-1),n("span",null,"Period",-1),n("span",null,"Amount",-1),n("span",null,"Status",-1)])])):f("v-if",!0),(e.billing.purchases||[]).length?(a(),l("ul",bX,[(a(!0),l(V,null,Q(e.profilePurchases(!0).concat(e.profilePurchases(!1)),r=>(a(),l("li",{class:R(["billing-history-row",{"is-ended":!["active","overdue"].includes(r.status)}]),key:r.id},[n("div",wX,[n("strong",null,[h(d(e.profileGrantName(r)),1),r.repoId?(a(),l(V,{key:0},[t[88]||(t[88]=h(" \xB7 ",-1)),n("a",{href:"/anonymize/"+encodeURIComponent(r.repoId)},d(r.repoId),9,kX)],64)):r.conference?(a(),l(V,{key:1},[t[89]||(t[89]=h(" \xB7 ",-1)),n("a",{href:"/conference/"+encodeURIComponent(r.conference)},d(r.conference),9,CX)],64)):f("v-if",!0)]),n("span",null,d([r.purchasedAt?"Bought "+e.billingDate(r.purchasedAt):"",r.parts.length?e.profilePackSummary(r):["refunded","disputed"].includes(r.status)?"Payment "+r.status+", so what it paid for has ended":r.recurring?"Account subscription":""].filter(Boolean).join(" \xB7 ")),1)]),n("div",SX,d(e.profilePurchaseTerm(r)),1),n("div",EX,d(r.amount!=null?e.billingPrice(r):""),1),n("div",NX,[n("span",{class:R(["settings-status","is-"+r.status])},d(e.profilePurchaseStatus(r)),3)])],2))),128))])):f("v-if",!0),n("div",RX,[n("div",null,[t[90]||(t[90]=n("strong",null,"Invoices and payment details",-1)),e.billing.portal?(a(),l("p",TX,"Download receipts, update your card or change renewal in Stripe.")):(a(),l("p",PX,"Invoices appear here after your first purchase.")),t[91]||(t[91]=n("p",null,[h("Need a refund? "),n("a",{href:"mailto:tdurieux@anonymous.4open.science"},"Email the maintainer"),h(" with the payment date, or read the "),n("a",{href:"/faq#faq-plans"},"refund policy"),h(".")],-1))]),e.billing.portal?(a(),l("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[12]||(t[12]=r=>e.billingPortal()),disabled:e.billingBusy},"Manage billing and invoices",8,DX)):f("v-if",!0)])])):f("v-if",!0),n("p",AX,[t[92]||(t[92]=h("Organizing a conference? ",-1)),e.profileConferencePlan()?(a(),l(V,{key:0},[h("Review packages start at "+d(e.billingAmount(e.profileConferencePlan()))+" once for up to "+d(e.profileConferencePlan().repositories)+" submissions, and authors pay nothing.",1)],64)):(a(),l(V,{key:1},[h("One payment hosts every submission, and authors pay nothing.")],64)),t[93]||(t[93]=h()),t[94]||(t[94]=n("a",{href:"/conference/new"},"Create a conference",-1))])],8,sJ),[[Z,e.settingsTab==="billing"]]),P(n("section",IX,[t[105]||(t[105]=n("p",{class:"settings-scope"},"Your identity, repository access, and account.",-1)),n("div",OX,[e.user?.photo?(a(),l("img",{key:0,width:"40",height:"40",class:"rounded-circle",alt:"",src:e.safeUrl(e.user?.photo)},null,8,MX)):f("v-if",!0),n("div",VX,[n("div",qX,"@"+d(e.user?.username),1),t[96]||(t[96]=n("div",{class:"paper-account-meta"},"Signed in with GitHub. Anonymous GitHub only reads your repositories.",-1))]),t[97]||(t[97]=n("a",{class:"btn btn-outline-ink",href:"/api/user/logout",target:"_self"},"Sign out",-1))]),n("form",{class:"paper-account-email",onSubmit:t[16]||(t[16]=de(r=>e.saveAccountEmail(),["prevent"]))},[t[98]||(t[98]=n("label",{class:"paper-field-label",for:"account-email"},"Email address",-1)),t[99]||(t[99]=n("p",{id:"account-email-help",class:"paper-section-copy"},"Used for account alerts. Your address is never shown on anonymous pages.",-1)),P(n("input",{id:"account-email",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[13]||(t[13]=r=>e.accountEmail=r),"aria-describedby":"account-email-help",disabled:e.emailLoading||e.emailSaving||!e.emailCSRFReady,onInput:t[14]||(t[14]=r=>e.emailSaved=!1)},null,40,LX),[[ot,e.accountEmail]]),e.emailLoading?(a(),l("p",$X,"Loading your email address\u2026")):f("v-if",!0),e.emailError?(a(),l("p",_X,d(e.emailError),1)):f("v-if",!0),!e.emailCSRFReady&&!e.emailLoading?(a(),l("button",{key:2,class:"btn btn-outline-ink mt-2",type:"button",onClick:t[15]||(t[15]=r=>e.loadAccountEmail())},"Try again")):f("v-if",!0),n("button",{class:"btn btn-ink mt-2",type:"submit",disabled:e.emailLoading||e.emailSaving||!e.emailCSRFReady},d(e.emailSaving?"Saving\u2026":"Save email address"),9,FX),e.emailSaved?(a(),l("p",UX,"Email address saved.")):f("v-if",!0)],32),t[106]||(t[106]=n("a",{class:"paper-settings-connection-link",href:"/connections"},[n("i",{class:"fab fa-github","aria-hidden":"true"}),n("span",null,[h("GitHub connections"),n("small",null,"Manage repository access and legacy OAuth.")]),n("span",{"aria-hidden":"true"},"\u2192")],-1)),n("div",BX,[t[103]||(t[103]=n("div",{class:"paper-danger-head"},"Delete account",-1)),t[104]||(t[104]=n("p",{class:"paper-danger-copy"}," Removes all your anonymized repositories, gists, and pull requests, revokes the application's access to your GitHub account, and erases your personal data (username, email, access tokens). This cannot be undone. ",-1)),e.deleteError?(a(),l("div",zX,[t[100]||(t[100]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1)),t[101]||(t[101]=h()),n("span",{textContent:d(e.deleteError)},null,8,HX)])):f("v-if",!0),n("button",{type:"button",class:"btn btn-outline-danger",onClick:t[17]||(t[17]=r=>e.confirmDeleteAccount=!0),disabled:e.deletingAccount},[t[102]||(t[102]=n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1)),h(d(e.deletingAccount?"Deleting\u2026":"Delete my account"),1)],8,jX),e.confirmDeleteAccount?(a(),l("div",GX,[n("label",WX,"Type "+d(e.user?.username)+" to confirm",1),P(n("input",{id:"delete-username",class:"form-control","onUpdate:modelValue":t[18]||(t[18]=r=>e.deleteUsername=r),autocomplete:"off"},null,512),[[ot,e.deleteUsername]]),n("div",KX,[n("button",{type:"button",class:"btn btn-outline-danger",onClick:t[19]||(t[19]=r=>e.deleteAccount()),disabled:e.deletingAccount||e.deleteUsername!==e.user?.username},d(e.deletingAccount?"Deleting\u2026":"Delete permanently"),9,YX),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[20]||(t[20]=r=>{e.confirmDeleteAccount=!1,e.deleteUsername=""}),disabled:e.deletingAccount},"Cancel",8,JX)])])):f("v-if",!0)])],512),[[Z,e.settingsTab==="account"]])])}var XX={class:"pr-page"},QX={class:"container paper-page pr-page-inner"},ZX={class:"pr-header"},xX={class:"pr-title-row"},eQ={class:"paper-page-title pr-title"},tQ=["textContent"],nQ={key:1,class:"text-muted"},oQ=["href"],sQ={class:"pr-header-meta"},iQ={key:0,class:"pr-meta-item"},rQ=["textContent"],aQ={key:1,class:"pr-meta-item"},lQ=["textContent"],dQ={key:2,class:"pr-meta-item"},uQ=["textContent"],cQ={key:0,class:"pr-body-card"},pQ={key:1,class:"paper-tabs",role:"tablist"},fQ=["aria-selected","tabindex"],mQ=["aria-selected","tabindex"],hQ=["textContent"],gQ={class:"paper-tab-content"},vQ={key:0,role:"tabpanel",id:"pr-diff-panel","aria-labelledby":"pr-diff-tab"},yQ=["innerHTML"],bQ={key:1,role:"tabpanel",id:"pr-comments-panel","aria-labelledby":"pr-comments-tab"},wQ={class:"pr-comments"},kQ={class:"pr-comment"},CQ={class:"pr-comment-head"},SQ={key:0,class:"pr-comment-author"},EQ=["textContent"],NQ=["textContent"],RQ={key:0,class:"pr-comment-body"},TQ={key:0,class:"paper-table-empty"};function Dp(e,t){let s=Ze("markdown");return a(),l("div",XX,[n("div",QX,[t[17]||(t[17]=n("div",{class:"paper-crumbs"},[n("a",{href:"/dashboard"},"Reviewer"),h(" \xA0/\xA0 "),n("span",{class:"here"},"Pull request")],-1)),n("header",ZX,[n("div",xX,[n("h1",eQ,[e.details?.title?(a(),l("span",{key:0,textContent:d(e.details?.title)},null,8,tQ)):f("v-if",!0),e.details?.title?f("v-if",!0):(a(),l("span",nQ,"Untitled pull request"))]),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/pull-request-anonymize/"+e.pullRequestId)},[...t[4]||(t[4]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),n("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,oQ)):f("v-if",!0)]),n("div",sQ,[n("span",{class:R(["paper-pill",{good:e.details?.merged,warn:e.details?.state=="open",bad:e.details?.state=="closed"&&!e.details?.merged}])},[n("span",{class:R(["status-dot",{"status-ready":e.details?.merged,"status-error":e.details?.state=="closed"&&!e.details?.merged}])},null,2),h(" "+d(e.details?.merged?"Merged":e.fmt.title(e.details?.state)),1)],2),e.details?.baseRepositoryFullName?(a(),l("span",iQ,[t[5]||(t[5]=n("i",{class:"fab fa-github"},null,-1)),t[6]||(t[6]=h()),n("span",{textContent:d(e.details?.baseRepositoryFullName)},null,8,rQ)])):f("v-if",!0),e.details?.updatedDate?(a(),l("span",aQ,[t[7]||(t[7]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[8]||(t[8]=h()),n("span",{textContent:d(e.fmt?.date(e.details?.updatedDate))},null,8,lQ)])):f("v-if",!0),e.details?.anonymizeDate?(a(),l("span",dQ,[t[9]||(t[9]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1)),t[10]||(t[10]=h(" Anonymized ",-1)),n("span",{textContent:d(e.fmt?.date(e.details?.anonymizeDate))},null,8,uQ)])):f("v-if",!0)])]),e.details?.body?(a(),l("section",cQ,[t[11]||(t[11]=n("div",{class:"paper-section-eyebrow"},"Description",-1)),Me(s,{content:e.details?.body},null,8,["content"])])):f("v-if",!0),e.details?.diff||e.details?.comments?(a(),l("nav",pQ,[e.details?.diff?(a(),l("button",{key:0,class:R(["paper-tab",{active:e.tabState?.active=="diff"}]),type:"button",role:"tab",id:"pr-diff-tab","aria-selected":e.tabState?.active==="diff","aria-controls":"pr-diff-panel",tabindex:e.tabState?.active==="diff"?0:-1,onKeydown:t[0]||(t[0]=i=>e.previewTabKeydown(i)),onClick:t[1]||(t[1]=i=>e.tabState.active="diff")},[...t[12]||(t[12]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),h(" Diff ",-1)])],42,fQ)):f("v-if",!0),e.details?.comments?(a(),l("button",{key:1,class:R(["paper-tab",{active:e.tabState?.active=="comments"}]),type:"button",role:"tab",id:"pr-comments-tab","aria-selected":e.tabState?.active==="comments","aria-controls":"pr-comments-panel",tabindex:e.tabState?.active==="comments"?0:-1,onKeydown:t[2]||(t[2]=i=>e.previewTabKeydown(i)),onClick:t[3]||(t[3]=i=>e.tabState.active="comments")},[t[13]||(t[13]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1)),n("span",{textContent:d(e.fmt.plural(e.details?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,hQ)],42,mQ)):f("v-if",!0)])):f("v-if",!0),n("div",gQ,[e.details?.diff&&e.tabState?.active=="diff"?(a(),l("div",vQ,[n("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.details?.diff))},null,8,yQ)])):f("v-if",!0),e.details?.comments&&e.tabState?.active=="comments"?(a(),l("div",bQ,[n("ul",wQ,[(a(!0),l(V,null,Q(e.details?.comments,(i,o)=>(a(),l("li",kQ,[n("div",CQ,[i?.author?(a(),l("span",SQ,[t[14]||(t[14]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})],-1)),t[15]||(t[15]=h(" @",-1)),n("span",{textContent:d(i?.author)},null,8,EQ)])):f("v-if",!0),i?.updatedDate?(a(),l("span",{key:1,class:"pr-comment-date",textContent:d(e.fmt?.date(i?.updatedDate))},null,8,NQ)):f("v-if",!0)]),i?.body?(a(),l("div",RQ,[Me(s,{content:i?.body},null,8,["content"])])):f("v-if",!0)]))),256)),e.details?.comments?.length?f("v-if",!0):(a(),l("li",TQ,[...t[16]||(t[16]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1),n("span",null,"No comments on this pull request.",-1)])]))])])):f("v-if",!0)])])])}var PQ={class:"repository-task status-page"},DQ={class:"page-head-main"},AQ={class:"task-lede"},IQ={class:"task-columns"},OQ={class:"task-preparation","aria-label":"Repository preparation"},MQ={key:0,class:"text-danger",role:"alert"},VQ={key:1,class:"paper-section-copy"},qQ={key:2,class:"paper-ratelimit-card",role:"status"},LQ={class:"paper-error-msg"},$Q=["aria-valuenow"],_Q={class:"paper-progress-label"},FQ=["textContent"],UQ={key:0},BQ=["textContent"],zQ={class:"paper-progress-pct"},HQ={key:4,class:"paper-error-card",role:"alert"},jQ={key:0,class:"paper-error-msg"},GQ={key:1,class:"paper-error-msg"},WQ={key:2},KQ=["href"],YQ={class:"paper-error-actions"},JQ=["href"],XQ={key:5,class:"share-link"},QQ={class:"share-link-row"},ZQ={class:"share-link-buttons"},xQ={class:"ui-icon","aria-hidden":"true"},eZ=["href"],tZ=["textContent"],nZ=["href"],oZ={class:"share-link-note"},sZ=["href"],iZ={class:"share-link-next"},rZ={class:"share-link-next-actions"},aZ=["href"],lZ={class:"task-summary","aria-label":"Repository summary"},dZ=["title"],uZ={key:1};function Ap(e,t){return a(),l("div",PQ,[n("header",{class:R(["page-head",{"task-ready":e.repo?.status==="ready"}])},[t[3]||(t[3]=n("div",{class:"paper-crumbs"},[n("a",{href:"/dashboard"},"My work"),h(" \xA0/\xA0 "),n("span",{class:"here"},"Review link")],-1)),n("div",DQ,[n("div",null,[n("h1",null,d(e.repo?.status==="ready"?"Your review link is ready":"Prepare your anonymous review link"),1),n("p",AQ,d(e.repo?.status==="ready"?"Share this link with reviewers in your submission.":"Your settings are saved. Track preparation before sharing the link."),1)])]),t[4]||(t[4]=n("ol",{class:"task-trail flow-trail","aria-label":"Repository progress"},[n("li",null,"1. Repository"),n("li",null,"2. Review and hosting"),n("li",{"aria-current":"step"},"3. Review link")],-1))],2),n("div",IQ,[n("section",OQ,[e.error?(a(),l("p",MQ,[t[5]||(t[5]=h("Unable to load repository status. ",-1)),n("button",{type:"button",class:"task-text-button",onClick:t[0]||(t[0]=s=>e.getStatus())},"Try again")])):f("v-if",!0),e.repo?.status!=="ready"?(a(),l("p",VQ,[...t[6]||(t[6]=[h(" The repository will take a few minutes to get ready, depending on its size. Visit the ",-1),n("a",{href:"/faq"},"FAQ",-1),h(" for more information. ",-1)])])):f("v-if",!0),e.rateLimitResetAt?(a(),l("div",qQ,[t[9]||(t[9]=ke('
Temporarily paused
GitHub API rate limit reached
',1)),n("p",LQ,[t[7]||(t[7]=h("Anonymization will resume automatically in ",-1)),n("strong",null,d(e.rateLimitCountdown),1),t[8]||(t[8]=h(". No action needed \u2014 the job is queued and will continue where it left off.",-1))])])):f("v-if",!0),e.repo?.status!=="ready"&&e.repo?.status!="error"&&!e.rateLimitResetAt?(a(),l("div",{key:3,class:R(["paper-progress",{"paper-progress-ready":e.repo?.status=="ready"}]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.progress},[n("div",{class:"paper-progress-bar",style:Ae("width: "+e.progress+"%;")},null,4),n("div",_Q,[n("span",{textContent:d(e.fmt?.title(e.repo?.status))},null,8,FQ),e.repo?.statusMessage?(a(),l("span",UQ,[t[10]||(t[10]=h("\xA0\xB7\xA0",-1)),n("span",{textContent:d(e.repo?.statusMessage)},null,8,BQ)])):f("v-if",!0),n("span",zQ,d(e.progress||0)+"%",1)])],10,$Q)):f("v-if",!0),e.repo?.status=="error"&&!e.rateLimitResetAt?(a(),l("div",HQ,[t[14]||(t[14]=ke('
Anonymization failed
Something went wrong while preparing this repository.
',1)),e.repo?.statusMessage?(a(),l("p",jQ,d(e.fmt?.translate("ERRORS."+e.repo?.statusMessage)),1)):f("v-if",!0),e.repo?.statusMessage?f("v-if",!0):(a(),l("p",GQ,"No additional details were reported. The most common causes are private repositories, missing branches, and rate limits.")),e.repo?.statusMessage==="quota_exceeded"?(a(),l("p",WQ,[n("a",{href:e.safeUrl("/anonymize/"+e.repoId)},"Review this repository\u2019s hosting",8,KQ),t[11]||(t[11]=h(", then retry preparation.",-1))])):f("v-if",!0),t[15]||(t[15]=n("ul",{class:"paper-error-hints"},[n("li",null,"Make sure the source URL points to a repository or pull request you can access."),n("li",null,"Check that the chosen branch and commit still exist on GitHub."),n("li",null,"If you just signed in, the access token may need a moment to propagate \u2014 try again.")],-1)),n("div",YQ,[n("a",{class:"btn btn-primary",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[12]||(t[12]=[n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),h(" Edit anonymization",-1)])],8,JQ),t[13]||(t[13]=ke(' Read the FAQ Report a bug in Anonymous GitHub',2))])])):f("v-if",!0),e.repo?.status=="ready"?(a(),l("div",XQ,[t[24]||(t[24]=n("div",{class:"share-link-label",id:"share-url-label"},"Review link",-1)),n("div",QQ,[n("code",{id:"share-url",class:"share-link-url",tabindex:"0",role:"textbox","aria-readonly":"true","aria-labelledby":"share-url-label",onFocus:t[1]||(t[1]=s=>e.selectShareUrl(s))},d(e.shareUrl),33),n("div",ZQ,[n("button",{type:"button",class:"btn btn-primary share-copy",onClick:t[2]||(t[2]=s=>e.copyShareUrl())},[(a(),l("svg",xQ,[n("use",{href:e.copied?"#ui-icon-check":"#project-icon-copy"},null,8,eZ)])),n("span",{"aria-live":"polite",textContent:d(e.copied?"Copied":"Copy link")},null,8,tZ)]),n("a",{class:"btn share-open",target:"_self",href:e.safeUrl("/r/"+e.repoId+"/")},[...t[16]||(t[16]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),h(" Open repository ",-1)])],8,nZ)])]),n("p",oZ,[h(d(e.repo?.options?.expirationMode!=="never"&&e.repo?.options?.expirationDate?"Expires "+e.fmt.date(e.repo.options.expirationDate):"Never expires"),1),t[18]||(t[18]=n("span",{"aria-hidden":"true"}," \xB7 ",-1)),t[19]||(t[19]=h("Reviewers don\u2019t need an account",-1)),e.repo?.options?.page?(a(),l(V,{key:0},[t[17]||(t[17]=n("span",{"aria-hidden":"true"}," \xB7 ",-1)),n("a",{target:"_self",href:e.safeUrl("/w/"+e.repoId+"/")},"Open GitHub page",8,sZ)],64)):f("v-if",!0)]),n("div",iZ,[t[22]||(t[22]=n("h2",null,"Need to change something?",-1)),t[23]||(t[23]=n("p",null,"Edit the redacted terms or the expiry at any time. The link stays the same.",-1)),n("p",rZ,[n("a",{href:e.safeUrl("/anonymize/"+e.repoId)},"Edit anonymization",8,aZ),t[20]||(t[20]=n("span",{"aria-hidden":"true"},"\xB7",-1)),t[21]||(t[21]=n("a",{href:"/dashboard"},"Go to My work",-1))])])])):f("v-if",!0)]),n("aside",lZ,[n("dl",null,[t[28]||(t[28]=n("dt",null,"Source",-1)),e.repo?.source?.fullName?(a(),l("dd",{key:0,class:"task-source",title:"https://github.com/"+e.repo.source.fullName},[t[25]||(t[25]=h("github.com/",-1)),t[26]||(t[26]=n("wbr",null,null,-1)),h(d(e.repo.source.fullName.split("/")[0])+"/",1),t[27]||(t[27]=n("wbr",null,null,-1)),h(d(e.repo.source.fullName.split("/").slice(1).join("/")),1)],8,dZ)):(a(),l("dd",uZ,"Loading\u2026")),t[29]||(t[29]=n("dt",null,"Lifetime",-1)),n("dd",null,d(e.repo?.options?.expirationMode==="never"?"Never expire while subscribed":e.repo?.options?.expirationDate?"Until "+e.fmt.date(e.repo.options.expirationDate):"Loading\u2026"),1),t[30]||(t[30]=n("dt",null,"Review access",-1)),t[31]||(t[31]=n("dd",null,"Anonymous and free",-1))])])])])}var cZ={class:"container paper-page admin-page overview-page billing-page"},pZ={class:"bl-toolbar"},fZ={class:"seg-filter",role:"radiogroup","aria-label":"Period"},mZ=["aria-checked","onClick"],hZ={key:0,class:"bl-basis"},gZ={key:0,class:"ov-performance-message ov-performance-warning bl-message",role:"alert"},vZ={key:1,class:"ov-performance-message bl-message",role:"status"},yZ={key:2,class:"ov-performance-message ov-performance-warning bl-message",role:"status"},bZ=["aria-busy"],wZ={class:"ov-kpi-card"},kZ={class:"ov-kpi-value"},CZ={class:"ov-kpi-sub"},SZ={class:"ov-kpi-card"},EZ={key:0,class:"ov-kpi-sub"},NZ={key:1,class:"ov-kpi-sub"},RZ={class:"ov-kpi-card"},TZ={class:"ov-kpi-label"},PZ={class:"ov-kpi-value"},DZ={class:"ov-kpi-sub"},AZ={class:"ov-kpi-card"},IZ={class:"ov-kpi-value"},OZ={class:"ov-kpi-sub"},MZ={class:"ov-kpi-card"},VZ={class:"ov-kpi-value"},qZ={class:"ov-kpi-sub"},LZ={class:"ov-kpi-card"},$Z={class:"ov-kpi-sub"},_Z={key:3,class:"bl-health","aria-label":"Webhook health"},FZ={class:"bl-health-title"},UZ={class:"bl-health-item"},BZ=["title"],zZ={key:1,class:"bl-health-item"},HZ={key:4,class:"ov-chart-card bl-chart-card"},jZ={class:"ov-chart-head"},GZ={class:"ov-chart-title"},WZ={key:0,class:"ov-chart-legends"},KZ=["aria-label"],YZ={class:"ov-yaxis","aria-hidden":"true"},JZ=["data-tip"],XZ={class:"ov-spark-x bl-x"},QZ={key:1,class:"ov-performance-empty bl-empty",role:"status"},ZZ={key:5,class:"ov-panel-card bl-plans","aria-labelledby":"bl-plans-heading"},xZ={class:"ov-panel-head"},ex={class:"ov-panel-meta"},tx={class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Sales by plan, scroll for more columns"},nx={class:"ov-metrics-table"},ox={key:0,scope:"colgroup",colspan:"2",class:"bl-group"},sx={scope:"row",class:"bl-plan-name"},ix=["title","onClick"],rx={class:"num"},ax={class:"num"},lx={class:"num"},dx={class:"num"},ux={class:"num"},cx={class:"num"},px={class:"num"},fx={class:"num"},mx={class:"num"},hx={class:"num"},gx={class:"bl-grants",id:"bl-grants","aria-labelledby":"bl-grants-heading"},vx={class:"seg-bar"},yx={class:"seg-filter",role:"radiogroup","aria-label":"Filter by state"},bx=["aria-checked"],wx={class:"count"},kx=["aria-checked"],Cx={class:"count"},Sx=["aria-checked"],Ex={class:"count"},Nx=["aria-checked"],Rx={class:"count"},Tx={class:"seg-countline",role:"status"},Px={key:0,class:"alert alert-danger bl-alert"},Dx=["aria-expanded"],Ax={class:"search-wrap"},Ix={type:"search",class:"form-control","aria-label":"Search by user",placeholder:"Search by user\u2026",autocomplete:"off"},Ox={class:"admin-filter-inline"},Mx={id:"bl-plan",class:"form-control form-control-sm"},Vx=["label"],qx=["value"],Lx={class:"admin-filter-inline"},$x={id:"bl-status",class:"form-control form-control-sm"},_x=["value"],Fx={key:0,class:"admin-filter-inline","aria-label":"Pagination"},Ux=["disabled"],Bx={class:"bl-page"},zx=["disabled"],Hx={key:0,class:"admin-filter-row"},jx={class:"admin-active-chips"},Gx={class:"key"},Wx=["onClick"],Kx={key:1,class:"ov-metrics-scroll bl-grant-scroll",tabindex:"0",role:"region","aria-label":"Subscriptions and purchases, scroll for more columns"},Yx={class:"ov-metrics-table bl-grant-table"},Jx={scope:"col"},Xx={scope:"col"},Qx={scope:"row",class:"bl-user"},Zx=["title","href"],xx={key:1,class:"ov-muted"},eee={class:"bl-plan-cell"},tee={key:0},nee={class:"bl-state"},oee={key:0},see={key:3},iee={key:0,class:"bl-flag"},ree={key:1,class:"ov-muted"},aee={class:"bl-flag is-bad"},lee={key:0},dee={key:1,class:"ov-muted"},uee={class:"bl-scope"},cee=["href"],pee={class:"ui-icon","aria-hidden":"true"},fee=["href"],mee={key:1,class:"ov-muted"},hee={key:2,class:"paper-table-empty"},gee={key:3,class:"admin-empty"},vee={key:4,class:"admin-toolbar bl-pager"},yee={key:0,class:"pagination-compact"},bee=["disabled"],wee=["max"],kee=["disabled"],Cee={class:"admin-filter-inline"},See={id:"bl-limit",class:"form-control form-control-sm"};function Ip(e,t){let s=Pe("field"),i=Pe("form");return a(),l("div",cZ,[t[79]||(t[79]=ke('
Admin \xA0/\xA0 Billing

Billing

',2)),n("div",pZ,[n("div",fZ,[(a(!0),l(V,null,Q(e.periods,o=>(a(),l("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.period===o.id}]),key:o.id,"aria-checked":e.period===o.id,onClick:r=>e.setPeriod(o.id)},d(o.label),11,mZ))),128))]),e.summary?(a(),l("p",hZ,"Sales are new checkouts and subscriptions. Revenue uses Stripe list prices; renewals count toward MRR.")):f("v-if",!0)]),e.summaryError?(a(),l("div",gZ,[t[15]||(t[15]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,d(e.summaryError),1),n("button",{type:"button",class:"btn btn-sm",onClick:t[0]||(t[0]=o=>e.loadSummary())},"Retry")])):f("v-if",!0),e.summary&&!e.summary.revenue?.available?(a(),l("div",vZ,[...t[16]||(t[16]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1),n("span",null,[n("b",null,"Revenue unavailable."),h(" Stripe is not configured on this server, so amounts can't be looked up. Counts are complete.")],-1)])])):f("v-if",!0),e.summary?.revenue?.missingSales||e.summary?.revenue?.missingAllTimeSales||e.summary?.revenue?.missingSubscriptions?(a(),l("div",yZ,[t[17]||(t[17]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,"Some Stripe prices are unavailable. Affected totals are marked incomplete: "+d(e.fmt?.number(e.summary.revenue.missingSales||0))+" period sales, "+d(e.fmt?.number(e.summary.revenue.missingAllTimeSales||0))+" historical sales, "+d(e.fmt?.number(e.summary.revenue.missingSubscriptions||0))+" active subscriptions.",1)])):f("v-if",!0),f(" \u2500\u2500 Summary tiles \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",{class:R(["ov-kpi-row bl-kpi-row",{"is-loading":e.summaryLoading}]),"aria-busy":e.summaryLoading?"true":"false","aria-label":"Billing summary"},[!e.summary&&e.summaryLoading?(a(),l(V,{key:0},Q(6,o=>n("div",{class:"ov-kpi-card",key:o,"aria-hidden":"true"},[...t[18]||(t[18]=[n("span",{class:"skeleton skeleton-line-sm",style:{width:"60%"}},null,-1),n("span",{class:"skeleton bl-skeleton-value"},null,-1),n("span",{class:"skeleton skeleton-line-sm",style:{width:"80%"}},null,-1)])])),64)):f("v-if",!0),e.summary?(a(),l(V,{key:1},[n("div",wZ,[t[19]||(t[19]=n("div",{class:"ov-kpi-label"},"Active subscriptions",-1)),n("div",kZ,d(e.fmt?.number(e.summary.subscriptions.active)),1),n("div",CZ,d(e.fmt?.number(e.summary.subscriptions.monthly))+" monthly \xB7 "+d(e.fmt?.number(e.summary.subscriptions.annual))+" annual",1)]),n("div",SZ,[t[20]||(t[20]=n("div",{class:"ov-kpi-label"},"MRR",-1)),n("div",{class:R(["ov-kpi-value",{"bl-muted-value":!e.revenueOn()}])},d(e.revenueOn()?e.summary.subscriptions.complete===!1?"Incomplete":e.money(e.summary.subscriptions.mrr)[0]||e.fmt?.money(0):"Unavailable"),3),e.revenueOn()&&e.money(e.summary.subscriptions.mrr).length>1?(a(),l("div",EZ,"+ "+d(e.money(e.summary.subscriptions.mrr).slice(1).join(" \xB7 ")),1)):(a(),l("div",NZ,d(e.revenueOn()?"Annual plans \xF7 12":"Needs Stripe prices"),1))]),n("div",RZ,[n("div",TZ,"Sales \xB7 "+d(e.periodPhrase()),1),n("div",PZ,d(e.fmt?.number(e.summary.sales.count)),1),n("div",DZ,d(e.revenueOn()?e.summary.sales.complete===!1?"Revenue incomplete":e.moneyText(e.summary.sales.revenue,e.fmt?.money(0)):"Revenue unavailable"),1)]),n("div",AZ,[t[21]||(t[21]=n("div",{class:"ov-kpi-label"},"All-time sales",-1)),n("div",IZ,d(e.fmt?.number(e.summary.allTime.count)),1),n("div",OZ,d(e.revenueOn()?e.summary.allTime.complete===!1?"Revenue incomplete":e.moneyText(e.summary.allTime.revenue,e.fmt?.money(0)):"Revenue unavailable"),1)]),n("div",MZ,[t[22]||(t[22]=n("div",{class:"ov-kpi-label"},"Cancelling",-1)),n("div",VZ,d(e.fmt?.number(e.summary.subscriptions.cancelling)),1),n("div",qZ,"at period end, of "+d(e.fmt?.number(e.summary.subscriptions.active))+" active",1)]),n("div",LZ,[t[23]||(t[23]=n("div",{class:"ov-kpi-label"},"Refunds & disputes",-1)),n("div",{class:R(["ov-kpi-value",{"ov-val-warn":e.summary.reversals.disputes>0}])},d(e.fmt?.number(e.summary.reversals.refunds+e.summary.reversals.disputes)),3),n("div",$Z,d(e.fmt?.number(e.summary.reversals.refunds))+" "+d(e.summary.reversals.refunds===1?"refund":"refunds")+" \xB7 "+d(e.fmt?.number(e.summary.reversals.disputes))+" "+d(e.summary.reversals.disputes===1?"dispute":"disputes"),1)])],64)):f("v-if",!0)],10,bZ),f(" \u2500\u2500 Webhook health \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),e.summary?.webhooks?(a(),l("section",_Z,[n("span",FZ,[n("span",{class:R(["ov-svc-dot",{"ov-dot-ok":e.webhookState()==="ok","ov-dot-warn":e.webhookState()==="warn","bl-dot-bad":e.webhookState()==="bad"}]),"aria-hidden":"true"},null,2),t[24]||(t[24]=h("Stripe webhooks",-1))]),n("span",UZ,[t[25]||(t[25]=n("span",{class:"k"},"Pending",-1)),h(" "+d(e.fmt?.number(e.summary.webhooks.pending)),1),e.summary.webhooks.pending?(a(),l(V,{key:0},[h(" \xB7 oldest "+d(e.age(e.summary.webhooks.oldestPendingSeconds)),1)],64)):f("v-if",!0)]),n("span",{class:R(["bl-health-item",{"is-bad":e.summary.webhooks.failed}])},[t[26]||(t[26]=n("span",{class:"k"},"Failed",-1)),h(" "+d(e.fmt?.number(e.summary.webhooks.failed)),1)],2),e.summary.webhooks.lastError?(a(),l("span",{key:0,class:"bl-health-item bl-health-error",title:e.summary.webhooks.lastError.type+": "+e.summary.webhooks.lastError.error},[t[27]||(t[27]=n("span",{class:"k"},"Last error",-1)),t[28]||(t[28]=h()),n("code",null,d(e.summary.webhooks.lastError.error),1),h(" on "+d(e.summary.webhooks.lastError.type)+" \xB7 "+d(e.fmt?.humanTime(e.summary.webhooks.lastError.receivedAt)),1)],8,BZ)):(a(),l("span",zZ,[...t[29]||(t[29]=[n("span",{class:"k"},"Last error",-1),h(" none",-1)])])),n("span",{class:R(["bl-health-item",{"is-warn":e.summary.webhooks.unreviewedRevocations}])},[t[30]||(t[30]=n("span",{class:"k"},"Unreviewed reversals",-1)),h(" "+d(e.fmt?.number(e.summary.webhooks.unreviewedRevocations)),1)],2)])):f("v-if",!0),f(" \u2500\u2500 Sales over time \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),e.summary?(a(),l("section",HZ,[n("div",jZ,[n("span",GZ,"Sales per "+d(e.bucketName())+" \xB7 "+d(e.periodPhrase()),1),e.seriesSales()?(a(),l("span",WZ,[(a(!0),l(V,null,Q(e.families,o=>(a(),l("span",{class:"ov-chart-legend",key:o.id},[n("span",{class:R(["bl-swatch","bl-"+o.id]),"aria-hidden":"true"},null,2),h(d(o.label)+" \xB7 "+d(e.fmt?.number(e.familyTotal(o.id))),1)]))),128))])):f("v-if",!0)]),e.seriesSales()?(a(),l(V,{key:0},[n("div",{class:R(["ov-spark-bars ov-has-axis bl-bars",{"is-dense":e.summary.series.length>45}]),role:"img","aria-label":e.fmt?.number(e.seriesSales())+" sales, "+e.periodPhrase()+", by plan family"},[n("div",YZ,[n("span",null,d(e.fmt?.number(e.chartMax())),1),n("span",null,d(e.fmt?.number(e.chartMax()/2)),1),t[31]||(t[31]=n("span",null,"0",-1))]),(a(!0),l(V,null,Q(e.summary.series,(o,r)=>(a(),l("div",{class:R(["ov-spark-col has-tip bl-col",{"is-zero":!e.bucketTotal(o)}]),key:r,"data-tip":e.bucketTip(o)},[n("span",{class:"bl-stack",style:Ae({height:e.bucketTotal(o)/e.chartMax()*100+"%"})},[(a(!0),l(V,null,Q(e.families,u=>P((a(),l("i",{key:u.id,class:R("bl-"+u.id),style:Ae({flexGrow:o[u.id]})},null,6)),[[Z,o[u.id]]])),128))],4)],10,JZ))),128))],10,KZ),n("div",XZ,[n("span",null,d(e.bucketLabel(e.summary.series[0])),1),n("span",null,d(e.bucketLabel(e.summary.series[Math.floor(e.summary.series.length/2)])),1),n("span",null,d(e.bucketLabel(e.summary.series[e.summary.series.length-1])),1)])],64)):(a(),l("p",QZ,"No sales "+d(e.period==="all"?"yet":"in the "+e.periodPhrase())+".",1))])):f("v-if",!0),f(" \u2500\u2500 By plan \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),e.summary?(a(),l("section",ZZ,[n("div",xZ,[t[32]||(t[32]=n("h2",{class:"ov-panel-title",id:"bl-plans-heading"},"By plan",-1)),n("span",ex,d(e.fmt?.number(e.plansWithActivity().length))+" of "+d(e.fmt?.number(e.summary.plans.length))+" plans sold",1)]),n("div",tx,[n("table",nx,[t[41]||(t[41]=n("caption",{class:"sr-only"},"Active grants, sales and revenue per plan",-1)),n("thead",null,[n("tr",null,[t[33]||(t[33]=n("th",{scope:"col",rowspan:"2"},"Plan",-1)),t[34]||(t[34]=n("th",{scope:"col",rowspan:"2",class:"num"},"Active",-1)),e.period!=="all"?(a(),l("th",ox,d(e.periodPhrase().replace(/^./,o=>o.toUpperCase())),1)):f("v-if",!0),t[35]||(t[35]=n("th",{scope:"colgroup",colspan:"2",class:"bl-group"},"All time",-1))]),n("tr",null,[e.period!=="all"?(a(),l(V,{key:0},[t[36]||(t[36]=n("th",{scope:"col",class:"num"},"Sales",-1)),t[37]||(t[37]=n("th",{scope:"col",class:"num"},"Revenue",-1))],64)):f("v-if",!0),t[38]||(t[38]=n("th",{scope:"col",class:"num"},"Sales",-1)),t[39]||(t[39]=n("th",{scope:"col",class:"num"},"Revenue",-1))])]),n("tbody",null,[(a(!0),l(V,null,Q(e.summary.plans,o=>(a(),l("tr",{key:o.planId,class:R({"bl-idle":!o.active&&!o.sales&&!o.allTimeSales})},[n("th",sx,[n("span",{class:R(["bl-swatch","bl-"+o.family]),"aria-hidden":"true"},null,2),n("button",{type:"button",class:"bl-link",title:"Show "+o.name+" grants",onClick:r=>e.filterPlan(o.planId)},d(o.name),9,ix)]),n("td",rx,d(e.fmt?.number(o.active)),1),e.period!=="all"?(a(),l(V,{key:0},[n("td",ax,d(e.fmt?.number(o.sales)),1),n("td",lx,d(e.revenueOn()?o.revenueComplete===!1?"Incomplete":e.moneyText(o.revenue):"\u2014"),1)],64)):f("v-if",!0),n("td",dx,d(e.fmt?.number(o.allTimeSales)),1),n("td",ux,d(e.revenueOn()?o.allTimeRevenueComplete===!1?"Incomplete":e.moneyText(o.allTimeRevenue):"\u2014"),1)],2))),128))]),n("tfoot",null,[n("tr",null,[t[40]||(t[40]=n("th",{scope:"row"},"Total",-1)),n("td",cx,d(e.fmt?.number(e.planTotals().active)),1),e.period!=="all"?(a(),l(V,{key:0},[n("td",px,d(e.fmt?.number(e.planTotals().sales)),1),n("td",fx,d(e.revenueOn()?e.summary.sales.complete===!1?"Incomplete":e.moneyText(e.summary.sales.revenue):"\u2014"),1)],64)):f("v-if",!0),n("td",mx,d(e.fmt?.number(e.planTotals().allTimeSales)),1),n("td",hx,d(e.revenueOn()?e.summary.allTime.complete===!1?"Incomplete":e.moneyText(e.summary.allTime.revenue):"\u2014"),1)])])])]),t[42]||(t[42]=n("p",{class:"ov-performance-note bl-note"},"A paper pack counts once, under Paper pack. Active means paid time remains and the payment wasn't reversed.",-1))])):f("v-if",!0),f(" \u2500\u2500 Subscriptions and purchases \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",gx,[t[78]||(t[78]=n("div",{class:"bl-section-head"},[n("h2",{class:"ov-panel-title",id:"bl-grants-heading"},"Subscriptions and purchases")],-1)),n("div",vx,[n("div",yx,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.stateView()==="all"}]),"aria-checked":e.stateView()==="all",onClick:t[1]||(t[1]=o=>e.setStateView("all"))},[t[43]||(t[43]=h("All ",-1)),n("span",wx,d(e.fmt?.number(e.stateCount("all"))),1)],10,bx),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.stateView()==="active","is-empty":!e.stateCount("active")}]),"aria-checked":e.stateView()==="active",onClick:t[2]||(t[2]=o=>e.setStateView("active"))},[t[44]||(t[44]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[45]||(t[45]=h("Active ",-1)),n("span",Cx,d(e.fmt?.number(e.stateCount("active"))),1)],10,kx),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.stateView()==="expired","is-empty":!e.stateCount("expired")}]),"aria-checked":e.stateView()==="expired",onClick:t[3]||(t[3]=o=>e.setStateView("expired"))},[t[46]||(t[46]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[47]||(t[47]=h("Expired ",-1)),n("span",Ex,d(e.fmt?.number(e.stateCount("expired"))),1)],10,Sx),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.stateView()==="revoked","is-empty":!e.stateCount("revoked")}]),"aria-checked":e.stateView()==="revoked",onClick:t[4]||(t[4]=o=>e.setStateView("revoked"))},[t[48]||(t[48]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[49]||(t[49]=h("Revoked ",-1)),n("span",Rx,d(e.fmt?.number(e.stateCount("revoked"))),1)],10,Nx)]),n("p",Tx,[n("strong",null,d(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[50]||(t[50]=h(" shown",-1))])]),e.grantsError?(a(),l("div",Px,[t[51]||(t[51]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),h(" "+d(e.grantsError)+" ",1),n("button",{type:"button",class:"btn btn-sm",onClick:t[5]||(t[5]=o=>e.reloadGrants())},"Retry")])):f("v-if",!0),P((a(),l("form",{class:"w-100 admin-filter-toolbar","aria-label":"Subscriptions and purchases","accept-charset":"UTF-8",onSubmit:t[9]||(t[9]=de(()=>{},["prevent"]))},[n("button",{type:"button",class:"btn btn-sm admin-filters-toggle",onClick:t[6]||(t[6]=o=>e.filtersOpen=!e.filtersOpen),"aria-expanded":e.filtersOpen?"true":"false"},[t[52]||(t[52]=h("Filters",-1)),e.query.plan||e.query.status?(a(),l(V,{key:0},[h(" ("+d((e.query.plan?1:0)+(e.query.status?1:0))+")",1)],64)):f("v-if",!0)],8,Dx),n("div",{class:R(["admin-filter-row",{"is-open":e.filtersOpen}])},[n("div",Ax,[P(n("input",Ix,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]])]),n("span",Ox,[t[54]||(t[54]=n("label",{for:"bl-plan"},"Plan",-1)),P((a(),l("select",Mx,[t[53]||(t[53]=n("option",{value:""},"Any",-1)),(a(!0),l(V,null,Q(e.families,o=>(a(),l("optgroup",{key:o.id,label:o.label},[(a(!0),l(V,null,Q((e.summary?.plans||[]).filter(r=>r.family===o.id),r=>(a(),l("option",{key:r.planId,value:r.planId},d(r.name),9,qx))),128))],8,Vx))),128))])),[[s,{state:e.viewState,set:o=>{e.query.plan=o},value:e.query?.plan,form:null,options:{}}]])]),n("span",Lx,[t[56]||(t[56]=n("label",{for:"bl-status"},"Stripe status",-1)),P((a(),l("select",$x,[t[55]||(t[55]=n("option",{value:""},"Any",-1)),(a(!0),l(V,null,Q(e.statuses,o=>(a(),l("option",{key:o,value:o},d(o.replace(/_/g," ")),9,_x))),128))])),[[s,{state:e.viewState,set:o=>{e.query.status=o},value:e.query?.status,form:null,options:{}}]])]),t[59]||(t[59]=n("span",{class:"admin-filter-spacer"},null,-1)),e.totalPage>1?(a(),l("span",Fx,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[7]||(t[7]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,Ux),n("span",Bx,d(e.query?.page)+"/"+d(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[8]||(t[8]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,zx)])):f("v-if",!0)],2),e.chips?.length?(a(),l("div",Hx,[n("div",jx,[(a(!0),l(V,null,Q(e.chips,o=>(a(),l("span",{class:"admin-active-chip",key:o?.key},[n("span",Gx,d(o?.label),1),n("span",null,d(o?.value),1),n("button",{type:"button",onClick:r=>e.clearFilter(o.key),"aria-label":"Clear filter"},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,Wx)]))),128))])])):f("v-if",!0)],32)),[[i,e.viewState]]),e.grants?.length?(a(),l("div",Kx,[n("table",Yx,[t[71]||(t[71]=n("caption",{class:"sr-only"},"Subscriptions and purchases",-1)),n("thead",null,[n("tr",null,[t[65]||(t[65]=n("th",{scope:"col"},"User",-1)),t[66]||(t[66]=n("th",{scope:"col"},"Plan",-1)),t[67]||(t[67]=n("th",{scope:"col"},"Status",-1)),n("th",Jx,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="purchasedAt"}]),onClick:t[10]||(t[10]=o=>e.sortBy("purchasedAt"))},[t[62]||(t[62]=h("Started ",-1)),e.sortIcon("purchasedAt")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("purchasedAt")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[61]||(t[61]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("th",Xx,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="until"}]),onClick:t[11]||(t[11]=o=>e.sortBy("until"))},[t[64]||(t[64]=h("Renews / ends ",-1)),e.sortIcon("until")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("until")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[63]||(t[63]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[68]||(t[68]=n("th",{scope:"col"},"Cancelling",-1)),t[69]||(t[69]=n("th",{scope:"col"},"Revoked",-1)),t[70]||(t[70]=n("th",{scope:"col"},"Applies to",-1))])]),n("tbody",null,[(a(!0),l(V,null,Q(e.grants,o=>(a(),l("tr",{key:o.id},[n("th",Qx,[o.user?(a(),l("a",{key:0,title:o.user,href:e.safeUrl("/admin/users/"+o.user)},d(o.user),9,Zx)):(a(),l("span",xx,"Deleted user"))]),n("td",null,[n("span",eee,[n("span",{class:R(["bl-swatch","bl-"+o.family]),"aria-hidden":"true"},null,2),h(d(e.planName(o.planId)),1)]),o.pack?(a(),l("small",tee,"Part of a paper pack")):f("v-if",!0)]),n("td",null,[n("span",nee,[n("span",{class:R(["status-dot",o.state==="active"?"st-ready":o.state==="revoked"?"st-error":"st-expired"])},null,2),h(d(o.state==="active"?"Active":o.state==="revoked"?"Revoked":"Expired"),1)]),["active","paid"].includes(o.status)?f("v-if",!0):(a(),l("small",oee,"Stripe: "+d(e.statusText(o)),1))]),n("td",null,d(o.purchasedAt?e.fmt?.date(o.purchasedAt):"\u2014"),1),n("td",null,[o.never?(a(),l(V,{key:0},[h("Never ends")],64)):o.until?(a(),l(V,{key:1},[h(d(e.fmt?.date(o.until)),1)],64)):(a(),l(V,{key:2},[h("\u2014")],64)),o.subscription&&o.state==="active"?(a(),l("small",see,d(o.cancelAtPeriodEnd?"Ends":"Renews"),1)):f("v-if",!0)]),n("td",null,[o.cancelAtPeriodEnd?(a(),l("span",iee,"Cancelling")):(a(),l("span",ree,"\u2014"))]),n("td",null,[o.revoked?(a(),l(V,{key:0},[n("span",aee,d(e.revocationText(o.revocationReason)),1),o.revokedAt?(a(),l("small",lee,d(e.fmt?.date(o.revokedAt)),1)):f("v-if",!0)],64)):(a(),l("span",dee,"\u2014"))]),n("td",uee,[e.scopeHref(o.scope)?(a(),l("a",{key:0,href:e.safeUrl(e.scopeHref(o.scope))},[(a(),l("svg",pee,[n("use",{href:o.scope.kind==="conference"?"#project-icon-conference":"#project-type-repo"},null,8,fee)])),n("span",null,d(o.scope.id),1)],8,cee)):(a(),l("span",mee,"Account"))])]))),128))])])])):f("v-if",!0),e.total===0?(a(),l("div",hee,[t[72]||(t[72]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),n("span",null,d(e.hasFilters()?"No subscriptions or purchases match these filters.":"No subscriptions or purchases yet."),1),e.hasFilters()?(a(),l("button",{key:0,type:"button",class:"btn btn-sm",onClick:t[12]||(t[12]=o=>e.clearFilters())},"Clear filters")):f("v-if",!0)])):f("v-if",!0),e.total<0&&!e.grantsError?(a(),l("div",gee,"Loading subscriptions and purchases\u2026")):f("v-if",!0),e.total>0?(a(),l("div",vee,[t[77]||(t[77]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",yee,[n("button",{class:"btn btn-sm",onClick:t[13]||(t[13]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),h(" Previous",-1)])],8,bee),P(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},"aria-label":"Page",max:e.totalPage},null,8,wee),[[s,{state:e.viewState,set:o=>{e.query.page=o},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+d(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[14]||(t[14]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[74]||(t[74]=[h("Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,kee)])):f("v-if",!0),n("span",Cee,[t[76]||(t[76]=n("label",{for:"bl-limit"},"Per page",-1)),P((a(),l("select",See,[...t[75]||(t[75]=[n("option",{value:"10"},"10",-1),n("option",{value:"25"},"25",-1),n("option",{value:"50"},"50",-1),n("option",{value:"100"},"100",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.limit=o},value:e.query?.limit,form:null,options:{}}]])])])):f("v-if",!0)])])}var Eee={class:"paper-footer"},Nee={class:"paper-footer-inner"},Ree={class:"paper-footer-col"},Tee={key:0,href:"/dashboard"},Pee={key:1,href:"/conferences"},Dee={class:"paper-footer-foot"};function Op(e,t){return a(),l("footer",Eee,[n("div",Nee,[t[3]||(t[3]=n("div",{class:"paper-footer-brand"},[n("div",{class:"paper-footer-mark"},[h("Anonymous "),n("em",null,"GitHub")]),n("p",{class:"paper-footer-tag"}," A read-only, identity-stripped mirror of your repository, built for double-anonymous peer review. ")],-1)),n("div",Ree,[t[0]||(t[0]=n("div",{class:"paper-footer-head"},"Product",-1)),t[1]||(t[1]=n("a",{href:"/anonymize"},"Anonymize",-1)),e.user?(a(),l("a",Tee,"My work")):f("v-if",!0),e.user?(a(),l("a",Pee,"Conferences")):f("v-if",!0),t[2]||(t[2]=n("a",{href:"/faq"},"FAQ",-1))]),t[4]||(t[4]=ke('',2))]),t[6]||(t[6]=n("div",{class:"paper-footer-rule"},null,-1)),n("div",Dee,[n("span",null,"\xA9 "+d(e.year||new Date().getFullYear())+" Anonymous GitHub \xB7 GPL-3.0 licensed",1),t[5]||(t[5]=n("span",{class:"paper-footer-meta"},"Built for reviewers, by researchers.",-1))])])}var hr={"partials/reviewConsent.htm":np,"partials/connections.htm":op,"partials/signin.htm":sp,"partials/404.htm":ip,"partials/admin/billing.htm":Ip,"partials/admin/emails.htm":tp,"partials/admin/conferences.htm":rp,"partials/admin/errors.htm":ap,"partials/admin/overview.htm":lp,"partials/admin/queues.htm":dp,"partials/admin/repositories.htm":up,"partials/admin/user.htm":cp,"partials/admin/users.htm":pp,"partials/anonymize.htm":fp,"partials/anonymizePullRequest.htm":mp,"partials/claim.htm":hp,"partials/conference.htm":gp,"partials/conferences.htm":vp,"partials/dashboard.htm":yp,"partials/explorer.htm":bp,"partials/faq.htm":wp,"partials/gist.htm":kp,"partials/header.htm":Cp,"partials/home.htm":Sp,"partials/loading.htm":Ep,"partials/newConference.htm":Np,"partials/pageView.htm":Rp,"partials/pr-dashboard.htm":Tp,"partials/profile.htm":Pp,"partials/pullRequest.htm":Dp,"partials/status.htm":Ap,"partials/footer.htm":Op};var Aee={class:"ui-icon-definitions","aria-hidden":"true",focusable:"false"};function Mp(e,t){return a(),l("svg",Aee,[...t[0]||(t[0]=[ke('',1)])])}function Vp(e,t){e==="partials/explorer.htm"&&(t.sidebarCollapsed=window.matchMedia?.("(max-width: 767px)").matches||!1,t.sidebarHidden=!1,t.dirExpanded=!1,t.moreOpen=!1,t.tocOpen=!1,t.gotoOpen=!1,t.gotoValue="",t.gotoError="",t.mdFindOpen=!1,t.mdFindQuery="",t.mdFindTotal=0,t.mdFindIndex=0,t.mdFindCase=!1,t.accountOpen=!1,t.helpOpen=!1,t.sidebarWidth=Math.min(520,Math.max(220,Number(localStorage.getItem("sidebarWidth"))||(window.innerWidth>=1280?320:280))),document.documentElement.style.setProperty("--sidebar-w",t.sidebarWidth+"px"),t.startSidebarResize=o=>{o.preventDefault();let r=o.clientX,u=t.sidebarWidth,p=v=>{t.sidebarWidth=Math.min(520,Math.max(220,u+v.clientX-r)),document.documentElement.style.setProperty("--sidebar-w",t.sidebarWidth+"px")},c=()=>{window.removeEventListener("pointermove",p),window.removeEventListener("pointerup",c),document.body.classList.remove("is-resizing"),localStorage.setItem("sidebarWidth",String(t.sidebarWidth))};document.body.classList.add("is-resizing"),window.addEventListener("pointermove",p),window.addEventListener("pointerup",c)}),e==="partials/anonymize.htm"&&(t.prTabState={active:t.options.diff?"diff":"comments"},t.watchGroup(["options.diff","options.comments"],()=>{t.options[t.prTabState.active]||(t.prTabState.active=t.options.diff?"diff":t.options.comments?"comments":null)})),e==="partials/gist.htm"&&(t.tabState={active:t.details?.files?"files":"comments"}),["partials/conferences.htm","partials/conference.htm"].includes(e)&&(t.statusLabels={ready:"Ready",expired:"Expired",removed:"Removed"});let i={"partials/dashboard.htm":["filteredItems",()=>t.items,"itemFilter"],"partials/conferences.htm":["filteredConferences",()=>t.conferences,"conferenceFilter"],"partials/conference.htm":["filteredRepositories",()=>t.conference?.repositories,"repoFiler"],"partials/admin/repositories.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/user.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/users.htm":["filteredUsers",()=>t.users,"userFiler"],"partials/admin/conferences.htm":["filteredConferences",()=>t.conferences]}[e];if(i){let o=Nt(()=>t.fmt.orderBy(t.fmt.filter(i[1](),t[i[2]]),t.orderBy));Object.defineProperty(t,i[0],{configurable:!0,get:()=>o.value})}}function qp(e=(...t)=>fetch(...t)){async function t(i,o,r,u={}){let p=new URL(o,window.location.href);for(let[g,y]of Object.entries(u.params||{}))if(y!=null)for(let m of Array.isArray(y)?y:[y])p.searchParams.append(g,typeof m=="object"?JSON.stringify(m):m);let c=new AbortController,v;u.timeout?.then?u.timeout.then(()=>c.abort()):u.timeout&&(v=setTimeout(()=>c.abort(),u.timeout));try{let g={Accept:"application/json, text/plain, */*",...u.headers},y=document.cookie.match(/(?:^|;\s*)XSRF-TOKEN=([^;]*)/);y&&p.origin===window.location.origin&&(g["X-XSRF-TOKEN"]=decodeURIComponent(y[1]));let m;r!==void 0&&(r instanceof FormData?m=r:(g["Content-Type"]||(g["Content-Type"]="application/json;charset=utf-8"),m=JSON.stringify(r)));let b=await e(p.href,{method:i,headers:g,body:m,credentials:"same-origin",signal:c.signal}),E;if(u.onDownloadProgress&&b.ok&&b.body?.getReader&&typeof TextDecoder<"u"){let w=b.body.getReader(),T=new TextDecoder,M=[],F=0;try{for(;;){let{value:j,done:oe}=await w.read();if(oe)break;M.push(T.decode(j,{stream:!0})),F+=j.byteLength,u.onDownloadProgress(F)}M.push(T.decode()),E=M.join("")}finally{w.releaseLock()}}else E=await b.text();let S=E;if(u.transformResponse)S=u.transformResponse(E);else if(E&&(/json/i.test(b.headers.get("content-type")||"")||/^[\[{]/.test(E.trim())))try{S=JSON.parse(E)}catch{}let N={data:S,status:b.status,headers:w=>b.headers.get(w)};if(!b.ok)throw N;return N}catch(g){throw g.name==="AbortError"?{status:-1,data:null}:g}finally{clearTimeout(v)}}let s={};for(let i of["get","delete","head"])s[i]=(o,r)=>t(i.toUpperCase(),o,void 0,r);for(let i of["post","put","patch"])s[i]=(o,r,u)=>t(i.toUpperCase(),o,r,u);return s}var Lp={resolve:e=>Promise.resolve(e),reject:e=>Promise.reject(e),all:e=>Promise.all(e),defer(){let e,t;return{promise:new Promise((i,o)=>{e=i,t=o}),resolve:e,reject:t}}};var $p=function(e){function t(s){return s=s||{used:0,total:0},s.unlimited=!s.total,s.percent=s.unlimited?0:Math.min(100,s.used*100/s.total),s.level=s.unlimited?"unlimited":s.percent>=95?"danger":s.percent>=80?"warn":"ok",s}return{decorate:t,load:function(){return e.get("/api/user/quota").then(s=>{let i=s.data||{};return i.storage=t(i.storage),i.file=t(i.file),i.repository=t(i.repository),i})}}};var _p={name:"htmlDoc",props:["content","baseUrl","allowScripts"],setup(e){let t=St(null);return gn(()=>{let i=[t.value][0];i.classList.add("html-doc");function o(){i.innerHTML="";let r=e.content;if(typeof r!="string")return;let u=document.createElement("iframe");u.className="html-doc-frame",u.setAttribute("title","Rendered HTML document");let p=["allow-popups","allow-popups-to-escape-sandbox"];e.allowScripts&&p.push("allow-scripts","allow-forms","allow-modals"),u.setAttribute("sandbox",p.join(" ")),u.setAttribute("referrerpolicy","no-referrer"),i.appendChild(u);let c="";e.baseUrl&&(c=''),u.srcdoc=c+r}ut(()=>e.content,o,{immediate:!0}),ut(()=>e.baseUrl,o,{immediate:!0}),ut(()=>e.allowScripts,o,{immediate:!0})}),()=>De("html-doc",{ref:t})}};var Fp={name:"pdfviewer",props:["src"],setup(e){let t=St(null);return gn(()=>{let s=[t.value],i=400,o=[.5,.75,1,1.25,1.5,2,3],r=1e3,u=s[0];u.classList.add("pdf-viewer");let p=null,c=[],v=!1,g=null,y=1,m=0,b=1,E=0,S=0,N=612/792,w=0,T=null,M=new Map,F=0;function j(A){let U=M.get(A);U&&(U.cancelled=!0,U.task?.cancel?.(),M.delete(A));let Y=A.querySelector("canvas");Y&&(Y.width=0,Y.height=0),A.innerHTML="",delete A.dataset.state}let oe=document.createElement("div");oe.className="pdf-toolbar";let _=document.createElement("div");_.className="pdf-pages",_.tabIndex=0,_.setAttribute("aria-label","PDF pages"),u.appendChild(oe),u.appendChild(_);function z(A,U,Y){let W=document.createElement("button");return W.type="button",W.className="pdf-toolbar-btn",W.title=U,W.setAttribute("aria-label",U),W.innerHTML='',W.addEventListener("click",Y),W}let I=z("fa-chevron-up","Previous page",function(){He(b-1)}),L=z("fa-chevron-down","Next page",function(){He(b+1)}),k=document.createElement("input");k.type="text",k.className="pdf-toolbar-page",k.setAttribute("aria-label","Page number"),k.title="Page number \u2014 type a page and press Enter",k.addEventListener("keydown",function(A){A.key==="Enter"&&(He(parseInt(k.value,10)),k.blur())}),k.addEventListener("blur",function(){k.value=String(b)});let q=document.createElement("span");q.className="pdf-toolbar-count";let G=z("fa-search-minus","Zoom out",function(){be(o[Math.max(0,fe()-1)])}),H=z("fa-search-plus","Zoom in",function(){be(o[Math.min(o.length-1,fe()+1)])}),K=document.createElement("button");K.type="button",K.className="pdf-toolbar-btn pdf-toolbar-zoom",K.title="Reset zoom to fit the width",K.setAttribute("aria-label","Reset zoom to fit the width"),K.addEventListener("click",function(){be(1)}),oe.appendChild(I),oe.appendChild(L);let ne=document.createElement("span");ne.className="pdf-toolbar-group",ne.appendChild(k),ne.appendChild(q),oe.appendChild(ne);let x=document.createElement("span");x.className="pdf-toolbar-group pdf-toolbar-right",x.appendChild(G),x.appendChild(K),x.appendChild(H),oe.appendChild(x);function fe(){let A=0;for(let U=0;U=A,K.textContent=y===1||!m?"Fit":Math.round(Ne()/(m*96/72)*100)+"%",G.disabled=fe()===0,H.disabled=fe()===o.length-1}function Be(A){let U=c[A-1];U&&(_.scrollTop+=U.getBoundingClientRect().top-_.getBoundingClientRect().top)}function He(A){if(!p||isNaN(A))return;let U=Math.min(Math.max(1,A),p.numPages);c[U-1]&&(Be(U),b=U,E=U,S=Date.now()+800,he(),X())}function Qe(){if(!c.length||Date.now(){}),T=null),g&&(clearTimeout(g),g=null),p&&(p.destroy(),p=null),c=[],b=1,_.innerHTML="",he()}function tt(){_.innerHTML="";let A=document.createElement("div");A.className="pdf-viewer-error",A.textContent="This PDF could not be displayed.",_.appendChild(A)}function Ne(){let A=Math.max(120,_.clientWidth-24);return Math.round(Math.min(A,r)*y)}function qe(A,U,Y){let W=window.devicePixelRatio||1,ee=A.getViewport({scale:1}),le=parseFloat(U.style.width);if(!le)return;let se=A.getViewport({scale:le/ee.width*W}),ie=document.createElement("canvas");return ie.width=Math.floor(se.width),ie.height=Math.floor(se.height),ie.style.width=le+"px",ie.style.height=Math.floor(se.height/W)+"px",U.innerHTML="",U.appendChild(ie),U.style.height=ie.style.height,Y.task=A.render({canvasContext:ie.getContext("2d"),viewport:se}),Y.task.promise}function X(){if(!p)return;let A=w,U=_.getBoundingClientRect(),Y=U.top-i,W=U.top+_.clientHeight+i,ee=c.map((se,ie)=>({slot:se,i:ie,rect:se.getBoundingClientRect()})).filter(se=>se.rect.top<=W&&se.rect.bottom>=Y).sort((se,ie)=>Math.abs(se.rect.top-U.top)-Math.abs(ie.rect.top-U.top)).slice(0,6),le=new Set(ee.map(se=>se.slot));for(let se of M.keys())le.has(se)||j(se);for(let{slot:se,i:ie}of ee){if(se.dataset.state||F>=2)continue;let te={cancelled:!1,task:null};M.set(se,te),F++,se.dataset.state="rendering";let we;p.getPage(ie+1).then(ce=>{if(we=ce,!(te.cancelled||A!==w))return qe(we,se,te)}).then(()=>{te.cancelled||A!==w||(se.dataset.state="done",E&&Date.now(){!te.cancelled&&A===w&&(se.dataset.state="failed")}).finally(()=>{F--,we?.cleanup?.(),p&&X()})}}function pe(){v||(v=!0,window.requestAnimationFrame(function(){v=!1,Qe(),X()}))}function ue(){let A=!1;function U(){A||(A=!0,X())}window.requestAnimationFrame(U),window.setTimeout(U,50)}function me(){w++,c.forEach(j);let A=Ne();c.forEach(function(U){delete U.dataset.state,U.innerHTML="",U.style.width=A+"px",U.style.height=Math.round(A/N)+"px"}),X()}function be(A){if(!p||!c.length||A===y)return;let U=b;y=A,he(),me(),He(U)}function Ve(){p&&(g&&clearTimeout(g),g=setTimeout(function(){g=null,p&&c.length&&me()},250))}function D(A){if(Ee(),!A)return;let U=w;T=pdfjsLib.getDocument({url:A,isEvalSupported:!1,standardFontDataUrl:"/script/external/pdf-standard-fonts/",cMapUrl:"/script/external/pdf-cmaps/",cMapPacked:!0}),T.promise.then(function(Y){if(U!==w){Y.destroy();return}return p=Y,p.getPage(1).then(function(W){if(U!==w)return;let ee=W.getViewport({scale:1});ee.width&&ee.height&&(N=ee.width/ee.height),m=ee.width||0;let le=Ne();for(let se=1;se<=p.numPages;se++){let ie=document.createElement("div");ie.className="pdf-viewer-page",ie.style.width=le+"px",ie.style.height=Math.round(le/N)+"px",_.appendChild(ie),c.push(ie)}he(),ue()})}).catch(function(){U===w&&tt()})}_.addEventListener("scroll",pe,{passive:!0}),$(window).on("resize",Ve),he(),ut(()=>e.src,D,{immediate:!0}),io(function(){_.removeEventListener("scroll",pe),$(window).off("resize",Ve),Ee()})}),()=>De("pdfviewer",{ref:t})}};var Iee={key:0,class:"quota-row quota-usage"},Oee={class:"quota-header"},Mee={class:"quota-label"},Vee={class:"project-type-svg","aria-hidden":"true"},qee=["href"],Lee={key:0,class:"quota-percent"},$ee={key:1,class:"quota-unlimited-tag"},_ee={class:"quota-value"},Fee={key:0},Uee=["aria-label","aria-valuenow","aria-valuemax","aria-valuetext"],Bee={key:1,class:"quota-remaining"},zee={key:2,class:"quota-remaining quota-limit"};function Up(e,t){return e.quota?(a(),l("div",Iee,[(a(),l(V,null,Q([{key:"repository",label:"Repositories",kind:"count",icon:"project-type-repo"},{key:"storage",label:"Storage",kind:"bytes",icon:"project-icon-storage"},{key:"file",label:"Files",kind:"count",icon:"project-icon-file"}],s=>n("div",{class:R(["quota-item","quota-"+e.quota[s.key].level]),key:s.key},[n("div",Oee,[n("span",Mee,[(a(),l("svg",Vee,[n("use",{href:"#"+s.icon},null,8,qee)])),h(d(s.label),1)]),e.quota[s.key].unlimited?f("v-if",!0):(a(),l("span",Lee,d(e.quota[s.key].percent>0&&e.quota[s.key].percent<1?"<1":e.fmt.number(e.quota[s.key].percent,0))+"% used",1)),e.quota[s.key].unlimited?(a(),l("span",$ee,"Unlimited")):f("v-if",!0)]),n("div",_ee,[n("strong",null,d(e.formatAmount(e.quota[s.key].used,s.kind)),1),e.quota[s.key].unlimited?f("v-if",!0):(a(),l("span",Fee," / "+d(e.formatAmount(e.quota[s.key].total,s.kind)),1))]),e.quota[s.key].unlimited?f("v-if",!0):(a(),l("div",{key:0,class:R(["quota-track","quota-"+e.quota[s.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":s.label+" quota","aria-valuenow":Math.min(e.quota[s.key].used,e.quota[s.key].total),"aria-valuemax":e.quota[s.key].total,"aria-valuetext":e.fmt.number(e.quota[s.key].percent,0)+"% used"},[e.quota[s?.key].unlimited?f("v-if",!0):(a(),l("div",{key:0,class:"quota-fill",style:Ae({width:e.quota[s.key].percent+"%"})},null,4))],10,Uee)),!e.quota[s.key].unlimited&&e.quota[s.key].used=e.quota[s.key].total?(a(),l("p",zee,d(e.quota[s.key].used>e.quota[s.key].total?"Limit exceeded":"Limit reached"),1)):f("v-if",!0)],2)),64))])):f("v-if",!0)}var Hee={props:["quota","fmt"],setup(e){return{formatAmount:(t,s)=>s==="bytes"?e.fmt.humanFileSize(e.quota?.storage?.unit==="bytes"?t*8:t).replace(/([a-zA-Z]+)$/," $1"):e.fmt.number(t)}},render:Up},jee=new Set(ge),Hp=e=>e?.querySelectorAll("pre code.language-diff, pre code.lang-diff").forEach(t=>{if(t.querySelector(".md-diff-line"))return;let s=t.innerHTML.replace(/\n$/,"").split(` +jane.smith@example.org`},null,8,PY),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",DY,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=h("Matches become ",-1)),n("code",null,d(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=h(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=h(" for a custom replacement. Regex is supported.",-1))])]),P(n("div",AY,"Terms are in an invalid format.",512),[[Z,e.defaultsForm?.terms?.errors?.format]])])]),n("section",IY,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",OY,[n("label",MY,[P(n("input",VY,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=h("Keep links",-1))]),n("label",qY,[P(n("input",LY,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=h("Display images",-1))]),n("label",$Y,[P(n("input",_Y,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=h("Display PDFs",-1))]),n("label",FY,[P(n("input",UY,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=h("Display notebooks",-1))]),n("label",BY,[P(n("input",zY,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=h("Show line counts",-1))]),n("label",HY,[P(n("input",jY,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=h("GitHub Pages",-1))])]),t[33]||(t[33]=n("p",{class:"settings-help"},"Images and PDFs are not anonymized.",-1)),t[34]||(t[34]=n("p",{class:"settings-help"},"GitHub Pages must use the anonymized branch.",-1))])]),n("section",GY,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",WY,[P(n("input",KY,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=h("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",YY,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[P((a(),l("select",JY,[...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",XY,d(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",QY,[n("div",ZY,[e.draftRestored?(a(),l("span",xY,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",eJ,"Unsaved changes"+d(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",tJ,d(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:R(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},d(e.saving?"Saving\u2026":"Save defaults"),11,nJ),e.error?(a(),l("div",oJ,d(e.error),1)):f("v-if",!0)])],32)),[[o,e.viewState]])],512),[[Z,e.settingsTab==="defaults"]]),P(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",iJ,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",rJ,[h(d(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,aJ)])):f("v-if",!0),e.billingNotice?(a(),l("p",lJ,d(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",dJ,[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,uJ)])):f("v-if",!0),n("section",cJ,[n("div",pJ,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",fJ,d(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",mJ,[h(d(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access until ":"Renews ")+d(e.billingDate(e.profileAuthorGrant().until)),1),e.profileAuthorPurchase()?.amount!=null?(a(),l(V,{key:0},[h(" \xB7 "+d(e.billingPrice(e.profileAuthorPurchase())),1)],64)):f("v-if",!0)])):e.billing?.allowance?(a(),l("p",hJ,d(e.billing.allowance.repositories)+" repositories \xB7 "+d(e.billingBytes(e.billing.allowance.storage))+" \xB7 links up to "+d(e.billing.freeExpirationMonths||5)+" months",1)):f("v-if",!0)]),e.profileAuthorGrant()&&e.billing?.portal?(a(),l("div",gJ,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[5]||(t[5]=r=>e.billingPortal()),disabled:e.billingBusy},d(e.profileAuthorGrant().cancelAtPeriodEnd?"Resume renewal":"Change or cancel plan"),9,vJ)])):f("v-if",!0)]),n("div",yJ,[e.quota?(a(),Wt(s,{key:0,quota:e.quota,fmt:e.fmt},null,8,["quota","fmt"])):(a(),l("p",bJ,"Loading usage\u2026"))]),e.quota?.repository&&!e.quota.repository.unlimited&&e.quota.repository.used>=e.quota.repository.total?(a(),l("p",wJ,[h("Your free repositories are used up. Add the next one for "+d(e.profileSlotPlan()?e.billingPrice(e.profileSlotPlan()):"a one-time payment")+" when you create it, or ",1),t[45]||(t[45]=n("a",{href:"/dashboard"},"remove work you no longer need",-1)),t[46]||(t[46]=h(".",-1))])):f("v-if",!0),e.profileAuthorGrant()?.status==="past_due"?(a(),l("p",kJ,"A subscription payment is overdue. Update your payment details in Manage billing and invoices.")):f("v-if",!0),e.profilePastSubscription()?(a(),l("p",CJ,[...t[47]||(t[47]=[h("Your previous subscription has ended. Never-expiring repositories stay online for a 90-day grace period. ",-1),n("a",{href:"/dashboard"},"Review expiration dates",-1),h(".",-1)])])):f("v-if",!0),t[48]||(t[48]=n("p",{class:"billing-footnote"},"Co-authored, paid and conference repositories aren't counted here.",-1))]),e.billing?.enabled&&!e.profileAuthorGrant()&&(e.profilePackPlan()||e.profileAuthorPlans().length)?(a(),l("section",SJ,[t[85]||(t[85]=n("h2",{class:"billing-section-title",id:"settings-plan-comparison",tabindex:"-1"},"Get more",-1)),e.showRepositoryPass&&e.profileAddon()&&!e.billingPending?f("v-if",!0):(a(),l("div",EJ,[e.profilePackPlan()?(a(),l("article",NJ,[t[54]||(t[54]=n("span",{class:"billing-offer-pill"},"Recommended",-1)),t[55]||(t[55]=n("div",{class:"billing-offer-head"},[n("p",{class:"billing-eyebrow"},"For one paper")],-1)),t[56]||(t[56]=n("h3",null,"Paper pack",-1)),n("p",RJ,[n("strong",null,d(e.billingAmount(e.profilePackPlan())),1),t[49]||(t[49]=h(" once",-1))]),n("ul",TJ,[t[50]||(t[50]=n("li",null,"One more repository, outside your free ones",-1)),n("li",null,"Its own "+d(e.billingBytes(e.profileSlotPlan()?.storage||e.profilePassPlan()?.storage))+" of storage",1),t[51]||(t[51]=n("li",null,"Automatic updates for 180 days",-1)),t[52]||(t[52]=n("li",null,"Online for up to a year",-1)),t[53]||(t[53]=n("li",null,"No subscription",-1))]),n("button",{type:"button",class:"btn btn-ink",onClick:t[6]||(t[6]=r=>e.openProfileAddon("repo_pack")),disabled:e.billingPending||e.billing.checkoutEnabled===!1},"Buy a Paper pack",8,PJ)])):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("article",DJ,[n("div",AJ,[t[57]||(t[57]=n("p",{class:"billing-eyebrow"},"For many papers",-1)),n("div",IJ,[(a(!0),l(V,null,Q(e.profileAuthorPlansByValue(),r=>(a(),l("button",{type:"button",role:"radio",key:r.id,"aria-checked":e.profileSelectedPlan()?.id===r.id?"true":"false",class:R({"is-on":e.profileSelectedPlan()?.id===r.id}),onClick:u=>e.profilePlan=r.id},[h(d(r.interval==="year"?"Yearly":"Monthly"),1),r.interval==="year"&&e.profileAnnualSavings()?(a(),l("span",MJ,"\u2212"+d(e.profileAnnualSavings())+"%",1)):f("v-if",!0)],10,OJ))),128))])]),t[62]||(t[62]=n("h3",null,"Author subscription",-1)),n("p",VJ,[n("strong",null,d(e.billingAmount(e.profileSelectedPlan())),1),h(" per "+d(e.profileSelectedPlan()?.interval==="year"?"year":"month"),1)]),n("ul",qJ,[n("li",null,d(e.profileSelectedPlan()?.repositories)+" repositories, "+d(e.billingBytes(e.profileSelectedPlan()?.storage)),1),t[58]||(t[58]=n("li",null,"Automatic updates",-1)),t[59]||(t[59]=n("li",null,"Links that never expire",-1)),t[60]||(t[60]=n("li",null,"Coauthors included",-1)),t[61]||(t[61]=n("li",null,"Cancel renewal anytime",-1))]),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.billingBusy||e.billing.checkoutEnabled===!1,onClick:t[7]||(t[7]=r=>e.checkout(e.profileSelectedPlan().id))},d(e.billingBusy?"Please wait\u2026":"Subscribe"),9,LJ)])):f("v-if",!0)])),e.profileSingleAddons().length&&!(e.showRepositoryPass&&e.profileAddon()&&!e.billingPending)?(a(),l("div",$J,[t[63]||(t[63]=n("div",{class:"billing-addons-head"},[n("h3",{class:"billing-subtitle"},"Or pay for one thing"),n("span",null,"One-time")],-1)),n("ul",_J,[(a(!0),l(V,null,Q(e.profileSingleAddons(),r=>(a(),l("li",{key:r.id},[n("div",null,[n("strong",null,d(r.name),1),n("span",null,d(e.profileAddonBlurb(r.id)),1)]),n("span",FJ,d(e.billingAmount(r)),1),n("button",{type:"button",class:"settings-text-button",onClick:u=>e.openProfileAddon(r.id),disabled:e.billingPending||e.billing.checkoutEnabled===!1},"Buy",8,UJ)]))),128))])])):f("v-if",!0),e.showRepositoryPass&&e.profileAddon()&&!e.billingPending?(a(),l("div",BJ,[n("div",zJ,[n("button",{type:"button",class:"btn btn-outline-ink billing-back",onClick:t[8]||(t[8]=r=>e.showRepositoryPass=!1)},"\u2190 All options"),n("h3",null,d(e.profileAddon().name),1),n("p",HJ,[n("strong",null,d(e.billingAmount(e.profileAddon())),1),t[64]||(t[64]=h(" once",-1))]),n("ul",jJ,[(a(!0),l(V,null,Q(e.profileAddonFeatures(e.profileAddon().id),r=>(a(),l("li",{key:r},d(r),1))),128))])]),n("div",GJ,[e.profileRepositories().length?(a(),l(V,{key:0},[t[66]||(t[66]=n("label",{class:"paper-field-label",for:"billing-repository"},"Which repository?",-1)),P(n("select",{id:"billing-repository",class:"form-control","onUpdate:modelValue":t[9]||(t[9]=r=>e.billingRepository=r)},[t[65]||(t[65]=n("option",{value:"",disabled:""},"Choose a repository",-1)),(a(!0),l(V,null,Q(e.profileRepositories(),r=>(a(),l("option",{key:r.repoId,value:r.repoId},d(r.repoId)+" \xB7 "+d(e.profileRepositoryExpiry(r)),9,WJ))),128))],512),[[Rt,e.billingRepository]]),n("button",{type:"button",class:"btn btn-ink",disabled:e.billingBusy||!e.billingRepository||e.billing.checkoutEnabled===!1,onClick:t[10]||(t[10]=r=>e.checkout(e.profileAddon().id,e.billingRepository))},d(e.billingBusy?"Please wait\u2026":"Continue to checkout"),9,KJ),t[67]||(t[67]=n("p",{class:"billing-footnote"},"One-time payment. Tax shown at checkout.",-1))],64)):(a(),l("p",YJ,[...t[68]||(t[68]=[h("You have no repositories yet. ",-1),n("a",{href:"/anonymize"},"Create one",-1),h(" first.",-1)])])),["repo_slot","repo_pack"].includes(e.profileAddon().id)?(a(),l("p",JJ,[...t[69]||(t[69]=[h("Adding a new repository? ",-1),n("a",{href:"/anonymize"},"Start creating it",-1),h("; the form offers this once your free repositories are in use.",-1)])])):f("v-if",!0)])])):f("v-if",!0),n("details",XJ,[t[84]||(t[84]=n("summary",null,"Compare all features",-1)),n("div",QJ,[n("table",ZJ,[t[83]||(t[83]=n("caption",{class:"sr-only"},"Free, Paper pack and Author hosting",-1)),n("thead",null,[n("tr",null,[t[72]||(t[72]=n("th",{scope:"col"},[n("span",{class:"sr-only"},"Feature")],-1)),t[73]||(t[73]=n("th",{scope:"col"},[h("Free"),n("small",null,"\u20AC0")],-1)),e.profilePackPlan()?(a(),l("th",xJ,[t[70]||(t[70]=h("Paper pack",-1)),n("small",null,d(e.billingPrice(e.profilePackPlan())),1)])):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("th",eX,[t[71]||(t[71]=h("Author",-1)),n("small",null,d(e.billingPrice(e.profileSelectedPlan())),1)])):f("v-if",!0)])]),n("tbody",null,[n("tr",null,[t[74]||(t[74]=n("th",{scope:"row"},"Repositories",-1)),n("td",null,d(e.billing.allowance?.repositories),1),e.profilePackPlan()?(a(),l("td",tX,"+1")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",nX,d(e.profileSelectedPlan()?.repositories),1)):f("v-if",!0)]),n("tr",null,[t[75]||(t[75]=n("th",{scope:"row"},"Source storage",-1)),n("td",null,d(e.billingBytes(e.billing.allowance?.storage))+" total",1),e.profilePackPlan()?(a(),l("td",oX,d(e.billingBytes(e.profileSlotPlan()?.storage||e.profilePassPlan()?.storage))+" for it",1)):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",sX,d(e.billingBytes(e.profileSelectedPlan()?.storage))+" total",1)):f("v-if",!0)]),n("tr",null,[t[76]||(t[76]=n("th",{scope:"row"},"Latest expiration",-1)),n("td",null,d(e.billing.freeExpirationMonths||5)+" months ahead",1),e.profilePackPlan()?(a(),l("td",iX,"1 year after purchase")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",rX,"Never")):f("v-if",!0)]),n("tr",null,[t[77]||(t[77]=n("th",{scope:"row"},"Automatic updates",-1)),t[78]||(t[78]=n("td",null,"No",-1)),e.profilePackPlan()?(a(),l("td",aX,"180 days")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",lX,"Yes")):f("v-if",!0)]),n("tr",null,[t[79]||(t[79]=n("th",{scope:"row"},"Renews",-1)),t[80]||(t[80]=n("td",null,"No",-1)),e.profilePackPlan()?(a(),l("td",dX,"No")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",uX,"Until cancelled")):f("v-if",!0)]),n("tr",null,[t[81]||(t[81]=n("th",{scope:"row"},"Reviewer access",-1)),t[82]||(t[82]=n("td",null,"Free",-1)),e.profilePackPlan()?(a(),l("td",cX,"Free")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",pX,"Free")):f("v-if",!0)])])])])]),e.billing.checkoutEnabled===!1?(a(),l("p",fX,"New purchases are not available right now. Existing billing can still be managed below.")):f("v-if",!0)])):f("v-if",!0),e.billing?.enabled?(a(),l("section",mX,[n("div",hX,[t[86]||(t[86]=n("h2",{class:"billing-section-title"},"Purchases",-1)),e.billingPending?f("v-if",!0):(a(),l("button",{key:0,type:"button",class:"settings-text-button",onClick:t[11]||(t[11]=r=>e.refreshBilling()),disabled:e.billingBusy},"Refresh payment status",8,gX))]),(e.billing.purchases||[]).length?f("v-if",!0):(a(),l("p",vX,"No purchases yet.")),(e.billing.purchases||[]).length?(a(),l("div",yX,[...t[87]||(t[87]=[n("span",null,"Purchase",-1),n("span",null,"Period",-1),n("span",null,"Amount",-1),n("span",null,"Status",-1)])])):f("v-if",!0),(e.billing.purchases||[]).length?(a(),l("ul",bX,[(a(!0),l(V,null,Q(e.profilePurchases(!0).concat(e.profilePurchases(!1)),r=>(a(),l("li",{class:R(["billing-history-row",{"is-ended":!["active","overdue"].includes(r.status)}]),key:r.id},[n("div",wX,[n("strong",null,[h(d(e.profileGrantName(r)),1),r.repoId?(a(),l(V,{key:0},[t[88]||(t[88]=h(" \xB7 ",-1)),n("a",{href:"/anonymize/"+encodeURIComponent(r.repoId)},d(r.repoId),9,kX)],64)):r.conference?(a(),l(V,{key:1},[t[89]||(t[89]=h(" \xB7 ",-1)),n("a",{href:"/conference/"+encodeURIComponent(r.conference)},d(r.conference),9,CX)],64)):f("v-if",!0)]),n("span",null,d([r.purchasedAt?"Bought "+e.billingDate(r.purchasedAt):"",r.parts.length?e.profilePackSummary(r):["refunded","disputed"].includes(r.status)?"Payment "+r.status+", so what it paid for has ended":r.recurring?"Account subscription":""].filter(Boolean).join(" \xB7 ")),1)]),n("div",SX,d(e.profilePurchaseTerm(r)),1),n("div",EX,d(r.amount!=null?e.billingPrice(r):""),1),n("div",NX,[n("span",{class:R(["settings-status","is-"+r.status])},d(e.profilePurchaseStatus(r)),3)])],2))),128))])):f("v-if",!0),n("div",RX,[n("div",null,[t[90]||(t[90]=n("strong",null,"Invoices and payment details",-1)),e.billing.portal?(a(),l("p",TX,"Download receipts, update your card or change renewal in Stripe.")):(a(),l("p",PX,"Invoices appear here after your first purchase.")),t[91]||(t[91]=n("p",null,[h("Need a refund? "),n("a",{href:"mailto:tdurieux@anonymous.4open.science"},"Email the maintainer"),h(" with the payment date, or read the "),n("a",{href:"/faq#faq-plans"},"refund policy"),h(".")],-1))]),e.billing.portal?(a(),l("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[12]||(t[12]=r=>e.billingPortal()),disabled:e.billingBusy},"Manage billing and invoices",8,DX)):f("v-if",!0)])])):f("v-if",!0),n("p",AX,[t[92]||(t[92]=h("Organizing a conference? ",-1)),e.profileConferencePlan()?(a(),l(V,{key:0},[h("Review packages start at "+d(e.billingAmount(e.profileConferencePlan()))+" once for up to "+d(e.profileConferencePlan().repositories)+" submissions, and authors pay nothing.",1)],64)):(a(),l(V,{key:1},[h("One payment hosts every submission, and authors pay nothing.")],64)),t[93]||(t[93]=h()),t[94]||(t[94]=n("a",{href:"/conference/new"},"Create a conference",-1))])],8,sJ),[[Z,e.settingsTab==="billing"]]),P(n("section",IX,[t[105]||(t[105]=n("p",{class:"settings-scope"},"Your identity, repository access, and account.",-1)),n("div",OX,[e.user?.photo?(a(),l("img",{key:0,width:"40",height:"40",class:"rounded-circle",alt:"",src:e.safeUrl(e.user?.photo)},null,8,MX)):f("v-if",!0),n("div",VX,[n("div",qX,"@"+d(e.user?.username),1),t[96]||(t[96]=n("div",{class:"paper-account-meta"},"Signed in with GitHub. Anonymous GitHub only reads your repositories.",-1))]),t[97]||(t[97]=n("a",{class:"btn btn-outline-ink",href:"/api/user/logout",target:"_self"},"Sign out",-1))]),n("form",{class:"paper-account-email",onSubmit:t[16]||(t[16]=de(r=>e.saveAccountEmail(),["prevent"]))},[t[98]||(t[98]=n("label",{class:"paper-field-label",for:"account-email"},"Email address",-1)),t[99]||(t[99]=n("p",{id:"account-email-help",class:"paper-section-copy"},"Used for account alerts. Your address is never shown on anonymous pages.",-1)),P(n("input",{id:"account-email",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[13]||(t[13]=r=>e.accountEmail=r),"aria-describedby":"account-email-help",disabled:e.emailLoading||e.emailSaving||!e.emailCSRFReady,onInput:t[14]||(t[14]=r=>e.emailSaved=!1)},null,40,LX),[[ot,e.accountEmail]]),e.emailLoading?(a(),l("p",$X,"Loading your email address\u2026")):f("v-if",!0),e.emailError?(a(),l("p",_X,d(e.emailError),1)):f("v-if",!0),!e.emailCSRFReady&&!e.emailLoading?(a(),l("button",{key:2,class:"btn btn-outline-ink mt-2",type:"button",onClick:t[15]||(t[15]=r=>e.loadAccountEmail())},"Try again")):f("v-if",!0),n("button",{class:"btn btn-ink mt-2",type:"submit",disabled:e.emailLoading||e.emailSaving||!e.emailCSRFReady},d(e.emailSaving?"Saving\u2026":"Save email address"),9,FX),e.emailSaved?(a(),l("p",UX,"Email address saved.")):f("v-if",!0)],32),t[106]||(t[106]=n("a",{class:"paper-settings-connection-link",href:"/connections"},[n("i",{class:"fab fa-github","aria-hidden":"true"}),n("span",null,[h("GitHub connections"),n("small",null,"Manage repository access and legacy OAuth.")]),n("span",{"aria-hidden":"true"},"\u2192")],-1)),n("div",BX,[t[103]||(t[103]=n("div",{class:"paper-danger-head"},"Delete account",-1)),t[104]||(t[104]=n("p",{class:"paper-danger-copy"}," Removes all your anonymized repositories, gists, and pull requests, revokes the application's access to your GitHub account, and erases your personal data (username, email, access tokens). This cannot be undone. ",-1)),e.deleteError?(a(),l("div",zX,[t[100]||(t[100]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1)),t[101]||(t[101]=h()),n("span",{textContent:d(e.deleteError)},null,8,HX)])):f("v-if",!0),n("button",{type:"button",class:"btn btn-outline-danger",onClick:t[17]||(t[17]=r=>e.confirmDeleteAccount=!0),disabled:e.deletingAccount},[t[102]||(t[102]=n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1)),h(d(e.deletingAccount?"Deleting\u2026":"Delete my account"),1)],8,jX),e.confirmDeleteAccount?(a(),l("div",GX,[n("label",WX,"Type "+d(e.user?.username)+" to confirm",1),P(n("input",{id:"delete-username",class:"form-control","onUpdate:modelValue":t[18]||(t[18]=r=>e.deleteUsername=r),autocomplete:"off"},null,512),[[ot,e.deleteUsername]]),n("div",KX,[n("button",{type:"button",class:"btn btn-outline-danger",onClick:t[19]||(t[19]=r=>e.deleteAccount()),disabled:e.deletingAccount||e.deleteUsername!==e.user?.username},d(e.deletingAccount?"Deleting\u2026":"Delete permanently"),9,YX),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[20]||(t[20]=r=>{e.confirmDeleteAccount=!1,e.deleteUsername=""}),disabled:e.deletingAccount},"Cancel",8,JX)])])):f("v-if",!0)])],512),[[Z,e.settingsTab==="account"]])])}var XX={class:"pr-page"},QX={class:"container paper-page pr-page-inner"},ZX={class:"pr-header"},xX={class:"pr-title-row"},eQ={class:"paper-page-title pr-title"},tQ=["textContent"],nQ={key:1,class:"text-muted"},oQ=["href"],sQ={class:"pr-header-meta"},iQ={key:0,class:"pr-meta-item"},rQ=["textContent"],aQ={key:1,class:"pr-meta-item"},lQ=["textContent"],dQ={key:2,class:"pr-meta-item"},uQ=["textContent"],cQ={key:0,class:"pr-body-card"},pQ={key:1,class:"paper-tabs",role:"tablist"},fQ=["aria-selected","tabindex"],mQ=["aria-selected","tabindex"],hQ=["textContent"],gQ={class:"paper-tab-content"},vQ={key:0,role:"tabpanel",id:"pr-diff-panel","aria-labelledby":"pr-diff-tab"},yQ=["innerHTML"],bQ={key:1,role:"tabpanel",id:"pr-comments-panel","aria-labelledby":"pr-comments-tab"},wQ={class:"pr-comments"},kQ={class:"pr-comment"},CQ={class:"pr-comment-head"},SQ={key:0,class:"pr-comment-author"},EQ=["textContent"],NQ=["textContent"],RQ={key:0,class:"pr-comment-body"},TQ={key:0,class:"paper-table-empty"};function Dp(e,t){let s=Ze("markdown");return a(),l("div",XX,[n("div",QX,[t[17]||(t[17]=n("div",{class:"paper-crumbs"},[n("a",{href:"/dashboard"},"Reviewer"),h(" \xA0/\xA0 "),n("span",{class:"here"},"Pull request")],-1)),n("header",ZX,[n("div",xX,[n("h1",eQ,[e.details?.title?(a(),l("span",{key:0,textContent:d(e.details?.title)},null,8,tQ)):f("v-if",!0),e.details?.title?f("v-if",!0):(a(),l("span",nQ,"Untitled pull request"))]),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/pull-request-anonymize/"+e.pullRequestId)},[...t[4]||(t[4]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),n("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,oQ)):f("v-if",!0)]),n("div",sQ,[n("span",{class:R(["paper-pill",{good:e.details?.merged,warn:e.details?.state=="open",bad:e.details?.state=="closed"&&!e.details?.merged}])},[n("span",{class:R(["status-dot",{"status-ready":e.details?.merged,"status-error":e.details?.state=="closed"&&!e.details?.merged}])},null,2),h(" "+d(e.details?.merged?"Merged":e.fmt.title(e.details?.state)),1)],2),e.details?.baseRepositoryFullName?(a(),l("span",iQ,[t[5]||(t[5]=n("i",{class:"fab fa-github"},null,-1)),t[6]||(t[6]=h()),n("span",{textContent:d(e.details?.baseRepositoryFullName)},null,8,rQ)])):f("v-if",!0),e.details?.updatedDate?(a(),l("span",aQ,[t[7]||(t[7]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[8]||(t[8]=h()),n("span",{textContent:d(e.fmt?.date(e.details?.updatedDate))},null,8,lQ)])):f("v-if",!0),e.details?.anonymizeDate?(a(),l("span",dQ,[t[9]||(t[9]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1)),t[10]||(t[10]=h(" Anonymized ",-1)),n("span",{textContent:d(e.fmt?.date(e.details?.anonymizeDate))},null,8,uQ)])):f("v-if",!0)])]),e.details?.body?(a(),l("section",cQ,[t[11]||(t[11]=n("div",{class:"paper-section-eyebrow"},"Description",-1)),Me(s,{content:e.details?.body},null,8,["content"])])):f("v-if",!0),e.details?.diff||e.details?.comments?(a(),l("nav",pQ,[e.details?.diff?(a(),l("button",{key:0,class:R(["paper-tab",{active:e.tabState?.active=="diff"}]),type:"button",role:"tab",id:"pr-diff-tab","aria-selected":e.tabState?.active==="diff","aria-controls":"pr-diff-panel",tabindex:e.tabState?.active==="diff"?0:-1,onKeydown:t[0]||(t[0]=i=>e.previewTabKeydown(i)),onClick:t[1]||(t[1]=i=>e.tabState.active="diff")},[...t[12]||(t[12]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),h(" Diff ",-1)])],42,fQ)):f("v-if",!0),e.details?.comments?(a(),l("button",{key:1,class:R(["paper-tab",{active:e.tabState?.active=="comments"}]),type:"button",role:"tab",id:"pr-comments-tab","aria-selected":e.tabState?.active==="comments","aria-controls":"pr-comments-panel",tabindex:e.tabState?.active==="comments"?0:-1,onKeydown:t[2]||(t[2]=i=>e.previewTabKeydown(i)),onClick:t[3]||(t[3]=i=>e.tabState.active="comments")},[t[13]||(t[13]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1)),n("span",{textContent:d(e.fmt.plural(e.details?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,hQ)],42,mQ)):f("v-if",!0)])):f("v-if",!0),n("div",gQ,[e.details?.diff&&e.tabState?.active=="diff"?(a(),l("div",vQ,[n("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.details?.diff))},null,8,yQ)])):f("v-if",!0),e.details?.comments&&e.tabState?.active=="comments"?(a(),l("div",bQ,[n("ul",wQ,[(a(!0),l(V,null,Q(e.details?.comments,(i,o)=>(a(),l("li",kQ,[n("div",CQ,[i?.author?(a(),l("span",SQ,[t[14]||(t[14]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})],-1)),t[15]||(t[15]=h(" @",-1)),n("span",{textContent:d(i?.author)},null,8,EQ)])):f("v-if",!0),i?.updatedDate?(a(),l("span",{key:1,class:"pr-comment-date",textContent:d(e.fmt?.date(i?.updatedDate))},null,8,NQ)):f("v-if",!0)]),i?.body?(a(),l("div",RQ,[Me(s,{content:i?.body},null,8,["content"])])):f("v-if",!0)]))),256)),e.details?.comments?.length?f("v-if",!0):(a(),l("li",TQ,[...t[16]||(t[16]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1),n("span",null,"No comments on this pull request.",-1)])]))])])):f("v-if",!0)])])])}var PQ={class:"repository-task status-page"},DQ={class:"page-head-main"},AQ={class:"task-lede"},IQ={class:"task-columns"},OQ={class:"task-preparation","aria-label":"Repository preparation"},MQ={key:0,class:"text-danger",role:"alert"},VQ={key:1,class:"paper-section-copy"},qQ={key:2,class:"paper-ratelimit-card",role:"status"},LQ={class:"paper-error-msg"},$Q=["aria-valuenow"],_Q={class:"paper-progress-label"},FQ=["textContent"],UQ={key:0},BQ=["textContent"],zQ={class:"paper-progress-pct"},HQ={key:4,class:"paper-error-card",role:"alert"},jQ={key:0,class:"paper-error-msg"},GQ={key:1,class:"paper-error-msg"},WQ={key:2},KQ=["href"],YQ={class:"paper-error-actions"},JQ=["href"],XQ={key:5,class:"share-link"},QQ={class:"share-link-row"},ZQ={class:"share-link-buttons"},xQ={class:"ui-icon","aria-hidden":"true"},eZ=["href"],tZ=["textContent"],nZ=["href"],oZ={class:"share-link-note"},sZ=["href"],iZ={class:"share-link-next"},rZ={class:"share-link-next-actions"},aZ=["href"],lZ={class:"task-summary","aria-label":"Repository summary"},dZ=["title"],uZ={key:1};function Ap(e,t){return a(),l("div",PQ,[n("header",{class:R(["page-head",{"task-ready":e.repo?.status==="ready"}])},[t[3]||(t[3]=n("div",{class:"paper-crumbs"},[n("a",{href:"/dashboard"},"My work"),h(" \xA0/\xA0 "),n("span",{class:"here"},"Review link")],-1)),n("div",DQ,[n("div",null,[n("h1",null,d(e.repo?.status==="ready"?"Your review link is ready":"Prepare your anonymous review link"),1),n("p",AQ,d(e.repo?.status==="ready"?"Share this link with reviewers in your submission.":"Your settings are saved. Track preparation before sharing the link."),1)])]),t[4]||(t[4]=n("ol",{class:"task-trail flow-trail","aria-label":"Repository progress"},[n("li",null,"1. Repository"),n("li",null,"2. Review and hosting"),n("li",{"aria-current":"step"},"3. Review link")],-1))],2),n("div",IQ,[n("section",OQ,[e.error?(a(),l("p",MQ,[t[5]||(t[5]=h("Unable to load repository status. ",-1)),n("button",{type:"button",class:"task-text-button",onClick:t[0]||(t[0]=s=>e.getStatus())},"Try again")])):f("v-if",!0),e.repo?.status!=="ready"?(a(),l("p",VQ,[...t[6]||(t[6]=[h(" The repository will take a few minutes to get ready, depending on its size. Visit the ",-1),n("a",{href:"/faq"},"FAQ",-1),h(" for more information. ",-1)])])):f("v-if",!0),e.rateLimitResetAt?(a(),l("div",qQ,[t[9]||(t[9]=ke('
Temporarily paused
GitHub API rate limit reached
',1)),n("p",LQ,[t[7]||(t[7]=h("Anonymization will resume automatically in ",-1)),n("strong",null,d(e.rateLimitCountdown),1),t[8]||(t[8]=h(". No action needed \u2014 the job is queued and will continue where it left off.",-1))])])):f("v-if",!0),e.repo?.status!=="ready"&&e.repo?.status!="error"&&!e.rateLimitResetAt?(a(),l("div",{key:3,class:R(["paper-progress",{"paper-progress-ready":e.repo?.status=="ready"}]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.progress},[n("div",{class:"paper-progress-bar",style:Ae("width: "+e.progress+"%;")},null,4),n("div",_Q,[n("span",{textContent:d(e.fmt?.title(e.repo?.status))},null,8,FQ),e.repo?.statusMessage?(a(),l("span",UQ,[t[10]||(t[10]=h("\xA0\xB7\xA0",-1)),n("span",{textContent:d(e.repo?.statusMessage)},null,8,BQ)])):f("v-if",!0),n("span",zQ,d(e.progress||0)+"%",1)])],10,$Q)):f("v-if",!0),e.repo?.status=="error"&&!e.rateLimitResetAt?(a(),l("div",HQ,[t[14]||(t[14]=ke('
Anonymization failed
Something went wrong while preparing this repository.
',1)),e.repo?.statusMessage?(a(),l("p",jQ,d(e.fmt?.translate("ERRORS."+e.repo?.statusMessage)),1)):f("v-if",!0),e.repo?.statusMessage?f("v-if",!0):(a(),l("p",GQ,"No additional details were reported. The most common causes are private repositories, missing branches, and rate limits.")),e.repo?.statusMessage==="quota_exceeded"?(a(),l("p",WQ,[n("a",{href:e.safeUrl("/anonymize/"+e.repoId)},"Review this repository\u2019s hosting",8,KQ),t[11]||(t[11]=h(", then retry preparation.",-1))])):f("v-if",!0),t[15]||(t[15]=n("ul",{class:"paper-error-hints"},[n("li",null,"Make sure the source URL points to a repository or pull request you can access."),n("li",null,"Check that the chosen branch and commit still exist on GitHub."),n("li",null,"If you just signed in, the access token may need a moment to propagate \u2014 try again.")],-1)),n("div",YQ,[n("a",{class:"btn btn-primary",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[12]||(t[12]=[n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),h(" Edit anonymization",-1)])],8,JQ),t[13]||(t[13]=ke(' Read the FAQ Report a bug in Anonymous GitHub',2))])])):f("v-if",!0),e.repo?.status=="ready"?(a(),l("div",XQ,[t[24]||(t[24]=n("div",{class:"share-link-label",id:"share-url-label"},"Review link",-1)),n("div",QQ,[n("code",{id:"share-url",class:"share-link-url",tabindex:"0",role:"textbox","aria-readonly":"true","aria-labelledby":"share-url-label",onFocus:t[1]||(t[1]=s=>e.selectShareUrl(s))},d(e.shareUrl),33),n("div",ZQ,[n("button",{type:"button",class:"btn btn-primary share-copy",onClick:t[2]||(t[2]=s=>e.copyShareUrl())},[(a(),l("svg",xQ,[n("use",{href:e.copied?"#ui-icon-check":"#project-icon-copy"},null,8,eZ)])),n("span",{"aria-live":"polite",textContent:d(e.copied?"Copied":"Copy link")},null,8,tZ)]),n("a",{class:"btn share-open",target:"_self",href:e.safeUrl("/r/"+e.repoId+"/")},[...t[16]||(t[16]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),h(" Open repository ",-1)])],8,nZ)])]),n("p",oZ,[h(d(e.repo?.options?.expirationMode!=="never"&&e.repo?.options?.expirationDate?"Expires "+e.fmt.date(e.repo.options.expirationDate):"Never expires"),1),t[18]||(t[18]=n("span",{"aria-hidden":"true"}," \xB7 ",-1)),t[19]||(t[19]=h("Reviewers don\u2019t need an account",-1)),e.repo?.options?.page?(a(),l(V,{key:0},[t[17]||(t[17]=n("span",{"aria-hidden":"true"}," \xB7 ",-1)),n("a",{target:"_self",href:e.safeUrl("/w/"+e.repoId+"/")},"Open GitHub page",8,sZ)],64)):f("v-if",!0)]),n("div",iZ,[t[22]||(t[22]=n("h2",null,"Need to change something?",-1)),t[23]||(t[23]=n("p",null,"Edit the redacted terms or the expiry at any time. The link stays the same.",-1)),n("p",rZ,[n("a",{href:e.safeUrl("/anonymize/"+e.repoId)},"Edit anonymization",8,aZ),t[20]||(t[20]=n("span",{"aria-hidden":"true"},"\xB7",-1)),t[21]||(t[21]=n("a",{href:"/dashboard"},"Go to My work",-1))])])])):f("v-if",!0)]),n("aside",lZ,[n("dl",null,[t[28]||(t[28]=n("dt",null,"Source",-1)),e.repo?.source?.fullName?(a(),l("dd",{key:0,class:"task-source",title:"https://github.com/"+e.repo.source.fullName},[t[25]||(t[25]=h("github.com/",-1)),t[26]||(t[26]=n("wbr",null,null,-1)),h(d(e.repo.source.fullName.split("/")[0])+"/",1),t[27]||(t[27]=n("wbr",null,null,-1)),h(d(e.repo.source.fullName.split("/").slice(1).join("/")),1)],8,dZ)):(a(),l("dd",uZ,"Loading\u2026")),t[29]||(t[29]=n("dt",null,"Lifetime",-1)),n("dd",null,d(e.repo?.options?.expirationMode==="never"?"Never expire while subscribed":e.repo?.options?.expirationDate?"Until "+e.fmt.date(e.repo.options.expirationDate):"Loading\u2026"),1),t[30]||(t[30]=n("dt",null,"Review access",-1)),t[31]||(t[31]=n("dd",null,"Anonymous and free",-1))])])])])}var cZ={class:"container paper-page admin-page overview-page billing-page"},pZ={class:"bl-toolbar"},fZ={class:"seg-filter",role:"radiogroup","aria-label":"Period"},mZ=["aria-checked","onClick"],hZ={key:0,class:"bl-basis"},gZ={key:0,class:"ov-performance-message ov-performance-warning bl-message",role:"alert"},vZ={key:1,class:"ov-performance-message bl-message",role:"status"},yZ={key:2,class:"ov-performance-message ov-performance-warning bl-message",role:"status"},bZ=["aria-busy"],wZ={class:"ov-kpi-card"},kZ={class:"ov-kpi-value"},CZ={class:"ov-kpi-sub"},SZ={class:"ov-kpi-card"},EZ={key:0,class:"ov-kpi-sub"},NZ={key:1,class:"ov-kpi-sub"},RZ={class:"ov-kpi-card"},TZ={class:"ov-kpi-label"},PZ={class:"ov-kpi-value"},DZ={class:"ov-kpi-sub"},AZ={class:"ov-kpi-card"},IZ={class:"ov-kpi-value"},OZ={class:"ov-kpi-sub"},MZ={class:"ov-kpi-card"},VZ={class:"ov-kpi-value"},qZ={class:"ov-kpi-sub"},LZ={class:"ov-kpi-card"},$Z={class:"ov-kpi-sub"},_Z={key:3,class:"bl-health","aria-label":"Webhook health"},FZ={class:"bl-health-title"},UZ={class:"bl-health-item"},BZ=["title"],zZ={key:1,class:"bl-health-item"},HZ={key:4,class:"ov-chart-card bl-chart-card"},jZ={class:"ov-chart-head"},GZ={class:"ov-chart-title"},WZ={key:0,class:"ov-chart-legends"},KZ=["aria-label"],YZ={class:"ov-yaxis","aria-hidden":"true"},JZ=["data-tip"],XZ={class:"ov-spark-x bl-x"},QZ={key:1,class:"ov-performance-empty bl-empty",role:"status"},ZZ={key:5,class:"ov-panel-card bl-plans","aria-labelledby":"bl-plans-heading"},xZ={class:"ov-panel-head"},ex={class:"ov-panel-meta"},tx={class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Sales by plan, scroll for more columns"},nx={class:"ov-metrics-table"},ox={key:0,scope:"colgroup",colspan:"2",class:"bl-group"},sx={scope:"row",class:"bl-plan-name"},ix=["title","onClick"],rx={class:"num"},ax={class:"num"},lx={class:"num"},dx={class:"num"},ux={class:"num"},cx={class:"num"},px={class:"num"},fx={class:"num"},mx={class:"num"},hx={class:"num"},gx={class:"bl-grants",id:"bl-grants","aria-labelledby":"bl-grants-heading"},vx={class:"seg-bar"},yx={class:"seg-filter",role:"radiogroup","aria-label":"Filter by state"},bx=["aria-checked"],wx={class:"count"},kx=["aria-checked"],Cx={class:"count"},Sx=["aria-checked"],Ex={class:"count"},Nx=["aria-checked"],Rx={class:"count"},Tx={class:"seg-countline",role:"status"},Px={key:0,class:"alert alert-danger bl-alert"},Dx=["aria-expanded"],Ax={class:"search-wrap"},Ix={type:"search",class:"form-control","aria-label":"Search by user",placeholder:"Search by user\u2026",autocomplete:"off"},Ox={class:"admin-filter-inline"},Mx={id:"bl-plan",class:"form-control form-control-sm"},Vx=["label"],qx=["value"],Lx={class:"admin-filter-inline"},$x={id:"bl-status",class:"form-control form-control-sm"},_x=["value"],Fx={key:0,class:"admin-filter-inline","aria-label":"Pagination"},Ux=["disabled"],Bx={class:"bl-page"},zx=["disabled"],Hx={key:0,class:"admin-filter-row"},jx={class:"admin-active-chips"},Gx={class:"key"},Wx=["onClick"],Kx={key:1,class:"ov-metrics-scroll bl-grant-scroll",tabindex:"0",role:"region","aria-label":"Subscriptions and purchases, scroll for more columns"},Yx={class:"ov-metrics-table bl-grant-table"},Jx={scope:"col"},Xx={scope:"col"},Qx={scope:"row",class:"bl-user"},Zx=["title","href"],xx={key:1,class:"ov-muted"},eee={class:"bl-plan-cell"},tee={key:0},nee={class:"bl-state"},oee={key:0},see={key:3},iee={key:0,class:"bl-flag"},ree={key:1,class:"ov-muted"},aee={class:"bl-flag is-bad"},lee={key:0},dee={key:1,class:"ov-muted"},uee={class:"bl-scope"},cee=["href"],pee={class:"ui-icon","aria-hidden":"true"},fee=["href"],mee={key:1,class:"ov-muted"},hee={key:2,class:"paper-table-empty"},gee={key:3,class:"admin-empty"},vee={key:4,class:"admin-toolbar bl-pager"},yee={key:0,class:"pagination-compact"},bee=["disabled"],wee=["max"],kee=["disabled"],Cee={class:"admin-filter-inline"},See={id:"bl-limit",class:"form-control form-control-sm"};function Ip(e,t){let s=Pe("field"),i=Pe("form");return a(),l("div",cZ,[t[79]||(t[79]=ke('
Admin \xA0/\xA0 Billing

Billing

',2)),n("div",pZ,[n("div",fZ,[(a(!0),l(V,null,Q(e.periods,o=>(a(),l("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.period===o.id}]),key:o.id,"aria-checked":e.period===o.id,onClick:r=>e.setPeriod(o.id)},d(o.label),11,mZ))),128))]),e.summary?(a(),l("p",hZ,"Sales are new checkouts and subscriptions. Revenue uses Stripe list prices; renewals count toward MRR.")):f("v-if",!0)]),e.summaryError?(a(),l("div",gZ,[t[15]||(t[15]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,d(e.summaryError),1),n("button",{type:"button",class:"btn btn-sm",onClick:t[0]||(t[0]=o=>e.loadSummary())},"Retry")])):f("v-if",!0),e.summary&&!e.summary.revenue?.available?(a(),l("div",vZ,[...t[16]||(t[16]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1),n("span",null,[n("b",null,"Revenue unavailable."),h(" Stripe is not configured on this server, so amounts can't be looked up. Counts are complete.")],-1)])])):f("v-if",!0),e.summary?.revenue?.missingSales||e.summary?.revenue?.missingAllTimeSales||e.summary?.revenue?.missingSubscriptions?(a(),l("div",yZ,[t[17]||(t[17]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,"Some Stripe prices are unavailable. Affected totals are marked incomplete: "+d(e.fmt?.number(e.summary.revenue.missingSales||0))+" period sales, "+d(e.fmt?.number(e.summary.revenue.missingAllTimeSales||0))+" historical sales, "+d(e.fmt?.number(e.summary.revenue.missingSubscriptions||0))+" active subscriptions.",1)])):f("v-if",!0),f(" \u2500\u2500 Summary tiles \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",{class:R(["ov-kpi-row bl-kpi-row",{"is-loading":e.summaryLoading}]),"aria-busy":e.summaryLoading?"true":"false","aria-label":"Billing summary"},[!e.summary&&e.summaryLoading?(a(),l(V,{key:0},Q(6,o=>n("div",{class:"ov-kpi-card",key:o,"aria-hidden":"true"},[...t[18]||(t[18]=[n("span",{class:"skeleton skeleton-line-sm",style:{width:"60%"}},null,-1),n("span",{class:"skeleton bl-skeleton-value"},null,-1),n("span",{class:"skeleton skeleton-line-sm",style:{width:"80%"}},null,-1)])])),64)):f("v-if",!0),e.summary?(a(),l(V,{key:1},[n("div",wZ,[t[19]||(t[19]=n("div",{class:"ov-kpi-label"},"Active subscriptions",-1)),n("div",kZ,d(e.fmt?.number(e.summary.subscriptions.active)),1),n("div",CZ,d(e.fmt?.number(e.summary.subscriptions.monthly))+" monthly \xB7 "+d(e.fmt?.number(e.summary.subscriptions.annual))+" annual",1)]),n("div",SZ,[t[20]||(t[20]=n("div",{class:"ov-kpi-label"},"MRR",-1)),n("div",{class:R(["ov-kpi-value",{"bl-muted-value":!e.revenueOn()}])},d(e.revenueOn()?e.summary.subscriptions.complete===!1?"Incomplete":e.money(e.summary.subscriptions.mrr)[0]||e.fmt?.money(0):"Unavailable"),3),e.revenueOn()&&e.money(e.summary.subscriptions.mrr).length>1?(a(),l("div",EZ,"+ "+d(e.money(e.summary.subscriptions.mrr).slice(1).join(" \xB7 ")),1)):(a(),l("div",NZ,d(e.revenueOn()?"Annual plans \xF7 12":"Needs Stripe prices"),1))]),n("div",RZ,[n("div",TZ,"Sales \xB7 "+d(e.periodPhrase()),1),n("div",PZ,d(e.fmt?.number(e.summary.sales.count)),1),n("div",DZ,d(e.revenueOn()?e.summary.sales.complete===!1?"Revenue incomplete":e.moneyText(e.summary.sales.revenue,e.fmt?.money(0)):"Revenue unavailable"),1)]),n("div",AZ,[t[21]||(t[21]=n("div",{class:"ov-kpi-label"},"All-time sales",-1)),n("div",IZ,d(e.fmt?.number(e.summary.allTime.count)),1),n("div",OZ,d(e.revenueOn()?e.summary.allTime.complete===!1?"Revenue incomplete":e.moneyText(e.summary.allTime.revenue,e.fmt?.money(0)):"Revenue unavailable"),1)]),n("div",MZ,[t[22]||(t[22]=n("div",{class:"ov-kpi-label"},"Cancelling",-1)),n("div",VZ,d(e.fmt?.number(e.summary.subscriptions.cancelling)),1),n("div",qZ,"at period end, of "+d(e.fmt?.number(e.summary.subscriptions.active))+" active",1)]),n("div",LZ,[t[23]||(t[23]=n("div",{class:"ov-kpi-label"},"Refunds & disputes",-1)),n("div",{class:R(["ov-kpi-value",{"ov-val-warn":e.summary.reversals.disputes>0}])},d(e.fmt?.number(e.summary.reversals.refunds+e.summary.reversals.disputes)),3),n("div",$Z,d(e.fmt?.number(e.summary.reversals.refunds))+" "+d(e.summary.reversals.refunds===1?"refund":"refunds")+" \xB7 "+d(e.fmt?.number(e.summary.reversals.disputes))+" "+d(e.summary.reversals.disputes===1?"dispute":"disputes"),1)])],64)):f("v-if",!0)],10,bZ),f(" \u2500\u2500 Webhook health \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),e.summary?.webhooks?(a(),l("section",_Z,[n("span",FZ,[n("span",{class:R(["ov-svc-dot",{"ov-dot-ok":e.webhookState()==="ok","ov-dot-warn":e.webhookState()==="warn","bl-dot-bad":e.webhookState()==="bad"}]),"aria-hidden":"true"},null,2),t[24]||(t[24]=h("Stripe webhooks",-1))]),n("span",UZ,[t[25]||(t[25]=n("span",{class:"k"},"Pending",-1)),h(" "+d(e.fmt?.number(e.summary.webhooks.pending)),1),e.summary.webhooks.pending?(a(),l(V,{key:0},[h(" \xB7 oldest "+d(e.age(e.summary.webhooks.oldestPendingSeconds)),1)],64)):f("v-if",!0)]),n("span",{class:R(["bl-health-item",{"is-bad":e.summary.webhooks.failed}])},[t[26]||(t[26]=n("span",{class:"k"},"Failed",-1)),h(" "+d(e.fmt?.number(e.summary.webhooks.failed)),1)],2),e.summary.webhooks.lastError?(a(),l("span",{key:0,class:"bl-health-item bl-health-error",title:e.summary.webhooks.lastError.type+": "+e.summary.webhooks.lastError.error},[t[27]||(t[27]=n("span",{class:"k"},"Last error",-1)),t[28]||(t[28]=h()),n("code",null,d(e.summary.webhooks.lastError.error),1),h(" on "+d(e.summary.webhooks.lastError.type)+" \xB7 "+d(e.fmt?.humanTime(e.summary.webhooks.lastError.receivedAt)),1)],8,BZ)):(a(),l("span",zZ,[...t[29]||(t[29]=[n("span",{class:"k"},"Last error",-1),h(" none",-1)])])),n("span",{class:R(["bl-health-item",{"is-warn":e.summary.webhooks.unreviewedRevocations}])},[t[30]||(t[30]=n("span",{class:"k"},"Unreviewed reversals",-1)),h(" "+d(e.fmt?.number(e.summary.webhooks.unreviewedRevocations)),1)],2)])):f("v-if",!0),f(" \u2500\u2500 Sales over time \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),e.summary?(a(),l("section",HZ,[n("div",jZ,[n("span",GZ,"Sales per "+d(e.bucketName())+" \xB7 "+d(e.periodPhrase()),1),e.seriesSales()?(a(),l("span",WZ,[(a(!0),l(V,null,Q(e.families,o=>(a(),l("span",{class:"ov-chart-legend",key:o.id},[n("span",{class:R(["bl-swatch","bl-"+o.id]),"aria-hidden":"true"},null,2),h(d(o.label)+" \xB7 "+d(e.fmt?.number(e.familyTotal(o.id))),1)]))),128))])):f("v-if",!0)]),e.seriesSales()?(a(),l(V,{key:0},[n("div",{class:R(["ov-spark-bars ov-has-axis bl-bars",{"is-dense":e.summary.series.length>45}]),role:"img","aria-label":e.fmt?.number(e.seriesSales())+" sales, "+e.periodPhrase()+", by plan family"},[n("div",YZ,[n("span",null,d(e.fmt?.number(e.chartMax())),1),n("span",null,d(e.fmt?.number(e.chartMax()/2)),1),t[31]||(t[31]=n("span",null,"0",-1))]),(a(!0),l(V,null,Q(e.summary.series,(o,r)=>(a(),l("div",{class:R(["ov-spark-col has-tip bl-col",{"is-zero":!e.bucketTotal(o)}]),key:r,"data-tip":e.bucketTip(o)},[n("span",{class:"bl-stack",style:Ae({height:e.bucketTotal(o)/e.chartMax()*100+"%"})},[(a(!0),l(V,null,Q(e.families,u=>P((a(),l("i",{key:u.id,class:R("bl-"+u.id),style:Ae({flexGrow:o[u.id]})},null,6)),[[Z,o[u.id]]])),128))],4)],10,JZ))),128))],10,KZ),n("div",XZ,[n("span",null,d(e.bucketLabel(e.summary.series[0])),1),n("span",null,d(e.bucketLabel(e.summary.series[Math.floor(e.summary.series.length/2)])),1),n("span",null,d(e.bucketLabel(e.summary.series[e.summary.series.length-1])),1)])],64)):(a(),l("p",QZ,"No sales "+d(e.period==="all"?"yet":"in the "+e.periodPhrase())+".",1))])):f("v-if",!0),f(" \u2500\u2500 By plan \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),e.summary?(a(),l("section",ZZ,[n("div",xZ,[t[32]||(t[32]=n("h2",{class:"ov-panel-title",id:"bl-plans-heading"},"By plan",-1)),n("span",ex,d(e.fmt?.number(e.plansWithActivity().length))+" of "+d(e.fmt?.number(e.summary.plans.length))+" plans sold",1)]),n("div",tx,[n("table",nx,[t[41]||(t[41]=n("caption",{class:"sr-only"},"Active grants, sales and revenue per plan",-1)),n("thead",null,[n("tr",null,[t[33]||(t[33]=n("th",{scope:"col",rowspan:"2"},"Plan",-1)),t[34]||(t[34]=n("th",{scope:"col",rowspan:"2",class:"num"},"Active",-1)),e.period!=="all"?(a(),l("th",ox,d(e.periodPhrase().replace(/^./,o=>o.toUpperCase())),1)):f("v-if",!0),t[35]||(t[35]=n("th",{scope:"colgroup",colspan:"2",class:"bl-group"},"All time",-1))]),n("tr",null,[e.period!=="all"?(a(),l(V,{key:0},[t[36]||(t[36]=n("th",{scope:"col",class:"num"},"Sales",-1)),t[37]||(t[37]=n("th",{scope:"col",class:"num"},"Revenue",-1))],64)):f("v-if",!0),t[38]||(t[38]=n("th",{scope:"col",class:"num"},"Sales",-1)),t[39]||(t[39]=n("th",{scope:"col",class:"num"},"Revenue",-1))])]),n("tbody",null,[(a(!0),l(V,null,Q(e.summary.plans,o=>(a(),l("tr",{key:o.planId,class:R({"bl-idle":!o.active&&!o.sales&&!o.allTimeSales})},[n("th",sx,[n("span",{class:R(["bl-swatch","bl-"+o.family]),"aria-hidden":"true"},null,2),n("button",{type:"button",class:"bl-link",title:"Show "+o.name+" grants",onClick:r=>e.filterPlan(o.planId)},d(o.name),9,ix)]),n("td",rx,d(e.fmt?.number(o.active)),1),e.period!=="all"?(a(),l(V,{key:0},[n("td",ax,d(e.fmt?.number(o.sales)),1),n("td",lx,d(e.revenueOn()?o.revenueComplete===!1?"Incomplete":e.moneyText(o.revenue):"\u2014"),1)],64)):f("v-if",!0),n("td",dx,d(e.fmt?.number(o.allTimeSales)),1),n("td",ux,d(e.revenueOn()?o.allTimeRevenueComplete===!1?"Incomplete":e.moneyText(o.allTimeRevenue):"\u2014"),1)],2))),128))]),n("tfoot",null,[n("tr",null,[t[40]||(t[40]=n("th",{scope:"row"},"Total",-1)),n("td",cx,d(e.fmt?.number(e.planTotals().active)),1),e.period!=="all"?(a(),l(V,{key:0},[n("td",px,d(e.fmt?.number(e.planTotals().sales)),1),n("td",fx,d(e.revenueOn()?e.summary.sales.complete===!1?"Incomplete":e.moneyText(e.summary.sales.revenue):"\u2014"),1)],64)):f("v-if",!0),n("td",mx,d(e.fmt?.number(e.planTotals().allTimeSales)),1),n("td",hx,d(e.revenueOn()?e.summary.allTime.complete===!1?"Incomplete":e.moneyText(e.summary.allTime.revenue):"\u2014"),1)])])])]),t[42]||(t[42]=n("p",{class:"ov-performance-note bl-note"},"A paper pack counts once, under Paper pack. Active means paid time remains and the payment wasn't reversed.",-1))])):f("v-if",!0),f(" \u2500\u2500 Subscriptions and purchases \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",gx,[t[78]||(t[78]=n("div",{class:"bl-section-head"},[n("h2",{class:"ov-panel-title",id:"bl-grants-heading"},"Subscriptions and purchases")],-1)),n("div",vx,[n("div",yx,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.stateView()==="all"}]),"aria-checked":e.stateView()==="all",onClick:t[1]||(t[1]=o=>e.setStateView("all"))},[t[43]||(t[43]=h("All ",-1)),n("span",wx,d(e.fmt?.number(e.stateCount("all"))),1)],10,bx),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.stateView()==="active","is-empty":!e.stateCount("active")}]),"aria-checked":e.stateView()==="active",onClick:t[2]||(t[2]=o=>e.setStateView("active"))},[t[44]||(t[44]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[45]||(t[45]=h("Active ",-1)),n("span",Cx,d(e.fmt?.number(e.stateCount("active"))),1)],10,kx),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.stateView()==="expired","is-empty":!e.stateCount("expired")}]),"aria-checked":e.stateView()==="expired",onClick:t[3]||(t[3]=o=>e.setStateView("expired"))},[t[46]||(t[46]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[47]||(t[47]=h("Expired ",-1)),n("span",Ex,d(e.fmt?.number(e.stateCount("expired"))),1)],10,Sx),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.stateView()==="revoked","is-empty":!e.stateCount("revoked")}]),"aria-checked":e.stateView()==="revoked",onClick:t[4]||(t[4]=o=>e.setStateView("revoked"))},[t[48]||(t[48]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[49]||(t[49]=h("Revoked ",-1)),n("span",Rx,d(e.fmt?.number(e.stateCount("revoked"))),1)],10,Nx)]),n("p",Tx,[n("strong",null,d(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[50]||(t[50]=h(" shown",-1))])]),e.grantsError?(a(),l("div",Px,[t[51]||(t[51]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),h(" "+d(e.grantsError)+" ",1),n("button",{type:"button",class:"btn btn-sm",onClick:t[5]||(t[5]=o=>e.reloadGrants())},"Retry")])):f("v-if",!0),P((a(),l("form",{class:"w-100 admin-filter-toolbar","aria-label":"Subscriptions and purchases","accept-charset":"UTF-8",onSubmit:t[9]||(t[9]=de(()=>{},["prevent"]))},[n("button",{type:"button",class:"btn btn-sm admin-filters-toggle",onClick:t[6]||(t[6]=o=>e.filtersOpen=!e.filtersOpen),"aria-expanded":e.filtersOpen?"true":"false"},[t[52]||(t[52]=h("Filters",-1)),e.query.plan||e.query.status?(a(),l(V,{key:0},[h(" ("+d((e.query.plan?1:0)+(e.query.status?1:0))+")",1)],64)):f("v-if",!0)],8,Dx),n("div",{class:R(["admin-filter-row",{"is-open":e.filtersOpen}])},[n("div",Ax,[P(n("input",Ix,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]])]),n("span",Ox,[t[54]||(t[54]=n("label",{for:"bl-plan"},"Plan",-1)),P((a(),l("select",Mx,[t[53]||(t[53]=n("option",{value:""},"Any",-1)),(a(!0),l(V,null,Q(e.families,o=>(a(),l("optgroup",{key:o.id,label:o.label},[(a(!0),l(V,null,Q((e.summary?.plans||[]).filter(r=>r.family===o.id),r=>(a(),l("option",{key:r.planId,value:r.planId},d(r.name),9,qx))),128))],8,Vx))),128))])),[[s,{state:e.viewState,set:o=>{e.query.plan=o},value:e.query?.plan,form:null,options:{}}]])]),n("span",Lx,[t[56]||(t[56]=n("label",{for:"bl-status"},"Stripe status",-1)),P((a(),l("select",$x,[t[55]||(t[55]=n("option",{value:""},"Any",-1)),(a(!0),l(V,null,Q(e.statuses,o=>(a(),l("option",{key:o,value:o},d(o.replace(/_/g," ")),9,_x))),128))])),[[s,{state:e.viewState,set:o=>{e.query.status=o},value:e.query?.status,form:null,options:{}}]])]),t[59]||(t[59]=n("span",{class:"admin-filter-spacer"},null,-1)),e.totalPage>1?(a(),l("span",Fx,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[7]||(t[7]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,Ux),n("span",Bx,d(e.query?.page)+"/"+d(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[8]||(t[8]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,zx)])):f("v-if",!0)],2),e.chips?.length?(a(),l("div",Hx,[n("div",jx,[(a(!0),l(V,null,Q(e.chips,o=>(a(),l("span",{class:"admin-active-chip",key:o?.key},[n("span",Gx,d(o?.label),1),n("span",null,d(o?.value),1),n("button",{type:"button",onClick:r=>e.clearFilter(o.key),"aria-label":"Clear filter"},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,Wx)]))),128))])])):f("v-if",!0)],32)),[[i,e.viewState]]),e.grants?.length?(a(),l("div",Kx,[n("table",Yx,[t[71]||(t[71]=n("caption",{class:"sr-only"},"Subscriptions and purchases",-1)),n("thead",null,[n("tr",null,[t[65]||(t[65]=n("th",{scope:"col"},"User",-1)),t[66]||(t[66]=n("th",{scope:"col"},"Plan",-1)),t[67]||(t[67]=n("th",{scope:"col"},"Status",-1)),n("th",Jx,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="purchasedAt"}]),onClick:t[10]||(t[10]=o=>e.sortBy("purchasedAt"))},[t[62]||(t[62]=h("Started ",-1)),e.sortIcon("purchasedAt")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("purchasedAt")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[61]||(t[61]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("th",Xx,[n("button",{type:"button",class:R(["sortable",{active:e.query?.sort=="until"}]),onClick:t[11]||(t[11]=o=>e.sortBy("until"))},[t[64]||(t[64]=h("Renews / ends ",-1)),e.sortIcon("until")?(a(),l("svg",{key:0,class:R(["ui-icon sort-direction",{ascending:e.sortIcon("until")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[63]||(t[63]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[68]||(t[68]=n("th",{scope:"col"},"Cancelling",-1)),t[69]||(t[69]=n("th",{scope:"col"},"Revoked",-1)),t[70]||(t[70]=n("th",{scope:"col"},"Applies to",-1))])]),n("tbody",null,[(a(!0),l(V,null,Q(e.grants,o=>(a(),l("tr",{key:o.id},[n("th",Qx,[o.user?(a(),l("a",{key:0,title:o.user,href:e.safeUrl("/admin/users/"+o.user)},d(o.user),9,Zx)):(a(),l("span",xx,"Deleted user"))]),n("td",null,[n("span",eee,[n("span",{class:R(["bl-swatch","bl-"+o.family]),"aria-hidden":"true"},null,2),h(d(e.planName(o.planId)),1)]),o.pack?(a(),l("small",tee,"Part of a paper pack")):f("v-if",!0)]),n("td",null,[n("span",nee,[n("span",{class:R(["status-dot",o.state==="active"?"st-ready":o.state==="revoked"?"st-error":"st-expired"])},null,2),h(d(o.state==="active"?"Active":o.state==="revoked"?"Revoked":"Expired"),1)]),["active","paid"].includes(o.status)?f("v-if",!0):(a(),l("small",oee,"Stripe: "+d(e.statusText(o)),1))]),n("td",null,d(o.purchasedAt?e.fmt?.date(o.purchasedAt):"\u2014"),1),n("td",null,[o.never?(a(),l(V,{key:0},[h("Never ends")],64)):o.until?(a(),l(V,{key:1},[h(d(e.fmt?.date(o.until)),1)],64)):(a(),l(V,{key:2},[h("\u2014")],64)),o.subscription&&o.state==="active"?(a(),l("small",see,d(o.cancelAtPeriodEnd?"Ends":"Renews"),1)):f("v-if",!0)]),n("td",null,[o.cancelAtPeriodEnd?(a(),l("span",iee,"Cancelling")):(a(),l("span",ree,"\u2014"))]),n("td",null,[o.revoked?(a(),l(V,{key:0},[n("span",aee,d(e.revocationText(o.revocationReason)),1),o.revokedAt?(a(),l("small",lee,d(e.fmt?.date(o.revokedAt)),1)):f("v-if",!0)],64)):(a(),l("span",dee,"\u2014"))]),n("td",uee,[e.scopeHref(o.scope)?(a(),l("a",{key:0,href:e.safeUrl(e.scopeHref(o.scope))},[(a(),l("svg",pee,[n("use",{href:o.scope.kind==="conference"?"#project-icon-conference":"#project-type-repo"},null,8,fee)])),n("span",null,d(o.scope.id),1)],8,cee)):(a(),l("span",mee,"Account"))])]))),128))])])])):f("v-if",!0),e.total===0?(a(),l("div",hee,[t[72]||(t[72]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),n("span",null,d(e.hasFilters()?"No subscriptions or purchases match these filters.":"No subscriptions or purchases yet."),1),e.hasFilters()?(a(),l("button",{key:0,type:"button",class:"btn btn-sm",onClick:t[12]||(t[12]=o=>e.clearFilters())},"Clear filters")):f("v-if",!0)])):f("v-if",!0),e.total<0&&!e.grantsError?(a(),l("div",gee,"Loading subscriptions and purchases\u2026")):f("v-if",!0),e.total>0?(a(),l("div",vee,[t[77]||(t[77]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",yee,[n("button",{class:"btn btn-sm",onClick:t[13]||(t[13]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),h(" Previous",-1)])],8,bee),P(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},"aria-label":"Page",max:e.totalPage},null,8,wee),[[s,{state:e.viewState,set:o=>{e.query.page=o},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+d(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[14]||(t[14]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[74]||(t[74]=[h("Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,kee)])):f("v-if",!0),n("span",Cee,[t[76]||(t[76]=n("label",{for:"bl-limit"},"Per page",-1)),P((a(),l("select",See,[...t[75]||(t[75]=[n("option",{value:"10"},"10",-1),n("option",{value:"25"},"25",-1),n("option",{value:"50"},"50",-1),n("option",{value:"100"},"100",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.limit=o},value:e.query?.limit,form:null,options:{}}]])])])):f("v-if",!0)])])}var Eee={class:"paper-footer"},Nee={class:"paper-footer-inner"},Ree={class:"paper-footer-col"},Tee={key:0,href:"/dashboard"},Pee={key:1,href:"/conferences"},Dee={class:"paper-footer-foot"};function Op(e,t){return a(),l("footer",Eee,[n("div",Nee,[t[3]||(t[3]=n("div",{class:"paper-footer-brand"},[n("div",{class:"paper-footer-mark"},[h("Anonymous "),n("em",null,"GitHub")]),n("p",{class:"paper-footer-tag"}," A read-only, identity-stripped mirror of your repository, built for double-anonymous peer review. ")],-1)),n("div",Ree,[t[0]||(t[0]=n("div",{class:"paper-footer-head"},"Product",-1)),t[1]||(t[1]=n("a",{href:"/anonymize"},"Anonymize",-1)),e.user?(a(),l("a",Tee,"My work")):f("v-if",!0),e.user?(a(),l("a",Pee,"Conferences")):f("v-if",!0),t[2]||(t[2]=n("a",{href:"/faq"},"FAQ",-1))]),t[4]||(t[4]=ke('',2))]),t[6]||(t[6]=n("div",{class:"paper-footer-rule"},null,-1)),n("div",Dee,[n("span",null,"\xA9 "+d(e.year||new Date().getFullYear())+" Anonymous GitHub \xB7 GPL-3.0 licensed",1),t[5]||(t[5]=n("span",{class:"paper-footer-meta"},"Built for reviewers, by researchers.",-1))])])}var hr={"partials/reviewConsent.htm":np,"partials/connections.htm":op,"partials/signin.htm":sp,"partials/404.htm":ip,"partials/admin/billing.htm":Ip,"partials/admin/emails.htm":tp,"partials/admin/conferences.htm":rp,"partials/admin/errors.htm":ap,"partials/admin/overview.htm":lp,"partials/admin/queues.htm":dp,"partials/admin/repositories.htm":up,"partials/admin/user.htm":cp,"partials/admin/users.htm":pp,"partials/anonymize.htm":fp,"partials/anonymizePullRequest.htm":mp,"partials/claim.htm":hp,"partials/conference.htm":gp,"partials/conferences.htm":vp,"partials/dashboard.htm":yp,"partials/explorer.htm":bp,"partials/faq.htm":wp,"partials/gist.htm":kp,"partials/header.htm":Cp,"partials/home.htm":Sp,"partials/loading.htm":Ep,"partials/newConference.htm":Np,"partials/pageView.htm":Rp,"partials/pr-dashboard.htm":Tp,"partials/profile.htm":Pp,"partials/pullRequest.htm":Dp,"partials/status.htm":Ap,"partials/footer.htm":Op};var Aee={class:"ui-icon-definitions","aria-hidden":"true",focusable:"false"};function Mp(e,t){return a(),l("svg",Aee,[...t[0]||(t[0]=[ke('',1)])])}function Vp(e,t){e==="partials/explorer.htm"&&(t.sidebarCollapsed=window.matchMedia?.("(max-width: 767px)").matches||!1,t.sidebarHidden=!1,t.dirExpanded=!1,t.moreOpen=!1,t.tocOpen=!1,t.gotoOpen=!1,t.gotoValue="",t.gotoError="",t.mdFindOpen=!1,t.mdFindQuery="",t.mdFindTotal=0,t.mdFindIndex=0,t.mdFindCase=!1,t.accountOpen=!1,t.helpOpen=!1,t.sidebarWidth=Math.min(520,Math.max(220,Number(localStorage.getItem("sidebarWidth"))||(window.innerWidth>=1280?320:280))),document.documentElement.style.setProperty("--sidebar-w",t.sidebarWidth+"px"),t.startSidebarResize=o=>{o.preventDefault();let r=o.clientX,u=t.sidebarWidth,p=v=>{t.sidebarWidth=Math.min(520,Math.max(220,u+v.clientX-r)),document.documentElement.style.setProperty("--sidebar-w",t.sidebarWidth+"px")},c=()=>{window.removeEventListener("pointermove",p),window.removeEventListener("pointerup",c),document.body.classList.remove("is-resizing"),localStorage.setItem("sidebarWidth",String(t.sidebarWidth))};document.body.classList.add("is-resizing"),window.addEventListener("pointermove",p),window.addEventListener("pointerup",c)}),e==="partials/anonymize.htm"&&(t.prTabState={active:t.options.diff?"diff":"comments"},t.watchGroup(["options.diff","options.comments"],()=>{t.options[t.prTabState.active]||(t.prTabState.active=t.options.diff?"diff":t.options.comments?"comments":null)})),e==="partials/gist.htm"&&(t.tabState={active:t.details?.files?"files":"comments"}),["partials/conferences.htm","partials/conference.htm"].includes(e)&&(t.statusLabels={ready:"Ready",expired:"Expired",removed:"Removed"});let i={"partials/dashboard.htm":["filteredItems",()=>t.items,"itemFilter"],"partials/conferences.htm":["filteredConferences",()=>t.conferences,"conferenceFilter"],"partials/conference.htm":["filteredRepositories",()=>t.conference?.repositories,"repoFiler"],"partials/admin/repositories.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/user.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/users.htm":["filteredUsers",()=>t.users,"userFiler"],"partials/admin/conferences.htm":["filteredConferences",()=>t.conferences]}[e];if(i){let o=Nt(()=>t.fmt.orderBy(t.fmt.filter(i[1](),t[i[2]]),t.orderBy));Object.defineProperty(t,i[0],{configurable:!0,get:()=>o.value})}}function qp(e=(...t)=>fetch(...t)){async function t(i,o,r,u={}){let p=new URL(o,window.location.href);for(let[g,y]of Object.entries(u.params||{}))if(y!=null)for(let m of Array.isArray(y)?y:[y])p.searchParams.append(g,typeof m=="object"?JSON.stringify(m):m);let c=new AbortController,v;u.timeout?.then?u.timeout.then(()=>c.abort()):u.timeout&&(v=setTimeout(()=>c.abort(),u.timeout));try{let g={Accept:"application/json, text/plain, */*",...u.headers},y=document.cookie.match(/(?:^|;\s*)XSRF-TOKEN=([^;]*)/);y&&p.origin===window.location.origin&&(g["X-XSRF-TOKEN"]=decodeURIComponent(y[1]));let m;r!==void 0&&(r instanceof FormData?m=r:(g["Content-Type"]||(g["Content-Type"]="application/json;charset=utf-8"),m=JSON.stringify(r)));let b=await e(p.href,{method:i,headers:g,body:m,credentials:"same-origin",signal:c.signal}),E;if(u.onDownloadProgress&&b.ok&&b.body?.getReader&&typeof TextDecoder<"u"){let w=b.body.getReader(),T=new TextDecoder,M=[],F=0;try{for(;;){let{value:j,done:oe}=await w.read();if(oe)break;M.push(T.decode(j,{stream:!0})),F+=j.byteLength,u.onDownloadProgress(F)}M.push(T.decode()),E=M.join("")}finally{w.releaseLock()}}else E=await b.text();let S=E;if(u.transformResponse)S=u.transformResponse(E);else if(E&&(/json/i.test(b.headers.get("content-type")||"")||/^[\[{]/.test(E.trim())))try{S=JSON.parse(E)}catch{}let N={data:S,status:b.status,headers:w=>b.headers.get(w)};if(!b.ok)throw N;return N}catch(g){throw g.name==="AbortError"?{status:-1,data:null}:g}finally{clearTimeout(v)}}let s={};for(let i of["get","delete","head"])s[i]=(o,r)=>t(i.toUpperCase(),o,void 0,r);for(let i of["post","put","patch"])s[i]=(o,r,u)=>t(i.toUpperCase(),o,r,u);return s}var Lp={resolve:e=>Promise.resolve(e),reject:e=>Promise.reject(e),all:e=>Promise.all(e),defer(){let e,t;return{promise:new Promise((i,o)=>{e=i,t=o}),resolve:e,reject:t}}};var $p=function(e){function t(s){return s=s||{used:0,total:0},s.unlimited=!s.total,s.percent=s.unlimited?0:Math.min(100,s.used*100/s.total),s.level=s.unlimited?"unlimited":s.percent>=95?"danger":s.percent>=80?"warn":"ok",s}return{decorate:t,load:function(){return e.get("/api/user/quota").then(s=>{let i=s.data||{};return i.storage=t(i.storage),i.file=t(i.file),i.repository=t(i.repository),i})}}};var _p={name:"htmlDoc",props:["content","baseUrl","allowScripts"],setup(e){let t=St(null);return gn(()=>{let i=[t.value][0];i.classList.add("html-doc");function o(){i.innerHTML="";let r=e.content;if(typeof r!="string")return;let u=document.createElement("iframe");u.className="html-doc-frame",u.setAttribute("title","Rendered HTML document");let p=["allow-popups","allow-popups-to-escape-sandbox"];e.allowScripts&&p.push("allow-scripts","allow-forms","allow-modals"),u.setAttribute("sandbox",p.join(" ")),u.setAttribute("referrerpolicy","no-referrer"),i.appendChild(u);let c="";e.baseUrl&&(c=''),u.srcdoc=c+r}ut(()=>e.content,o,{immediate:!0}),ut(()=>e.baseUrl,o,{immediate:!0}),ut(()=>e.allowScripts,o,{immediate:!0})}),()=>De("html-doc",{ref:t})}};var Fp={name:"pdfviewer",props:["src"],setup(e){let t=St(null);return gn(()=>{let s=[t.value],i=400,o=[.5,.75,1,1.25,1.5,2,3],r=1e3,u=s[0];u.classList.add("pdf-viewer");let p=null,c=[],v=!1,g=null,y=1,m=0,b=1,E=0,S=0,N=612/792,w=0,T=null,M=new Map,F=0;function j(A){let U=M.get(A);U&&(U.cancelled=!0,U.task?.cancel?.(),M.delete(A));let J=A.querySelector("canvas");J&&(J.width=0,J.height=0),A.innerHTML="",delete A.dataset.state}let oe=document.createElement("div");oe.className="pdf-toolbar";let _=document.createElement("div");_.className="pdf-pages",_.tabIndex=0,_.setAttribute("aria-label","PDF pages"),u.appendChild(oe),u.appendChild(_);function B(A,U,J){let W=document.createElement("button");return W.type="button",W.className="pdf-toolbar-btn",W.title=U,W.setAttribute("aria-label",U),W.innerHTML='',W.addEventListener("click",J),W}let I=B("fa-chevron-up","Previous page",function(){He(b-1)}),L=B("fa-chevron-down","Next page",function(){He(b+1)}),k=document.createElement("input");k.type="text",k.className="pdf-toolbar-page",k.setAttribute("aria-label","Page number"),k.title="Page number \u2014 type a page and press Enter",k.addEventListener("keydown",function(A){A.key==="Enter"&&(He(parseInt(k.value,10)),k.blur())}),k.addEventListener("blur",function(){k.value=String(b)});let q=document.createElement("span");q.className="pdf-toolbar-count";let G=B("fa-search-minus","Zoom out",function(){be(o[Math.max(0,fe()-1)])}),H=B("fa-search-plus","Zoom in",function(){be(o[Math.min(o.length-1,fe()+1)])}),Y=document.createElement("button");Y.type="button",Y.className="pdf-toolbar-btn pdf-toolbar-zoom",Y.title="Reset zoom to fit the width",Y.setAttribute("aria-label","Reset zoom to fit the width"),Y.addEventListener("click",function(){be(1)}),oe.appendChild(I),oe.appendChild(L);let ne=document.createElement("span");ne.className="pdf-toolbar-group",ne.appendChild(k),ne.appendChild(q),oe.appendChild(ne);let x=document.createElement("span");x.className="pdf-toolbar-group pdf-toolbar-right",x.appendChild(G),x.appendChild(Y),x.appendChild(H),oe.appendChild(x);function fe(){let A=0;for(let U=0;U=A,Y.textContent=y===1||!m?"Fit":Math.round(Ne()/(m*96/72)*100)+"%",G.disabled=fe()===0,H.disabled=fe()===o.length-1}function Be(A){let U=c[A-1];U&&(_.scrollTop+=U.getBoundingClientRect().top-_.getBoundingClientRect().top)}function He(A){if(!p||isNaN(A))return;let U=Math.min(Math.max(1,A),p.numPages);c[U-1]&&(Be(U),b=U,E=U,S=Date.now()+800,he(),X())}function Qe(){if(!c.length||Date.now(){}),T=null),g&&(clearTimeout(g),g=null),p&&(p.destroy(),p=null),c=[],b=1,_.innerHTML="",he()}function tt(){_.innerHTML="";let A=document.createElement("div");A.className="pdf-viewer-error",A.textContent="This PDF could not be displayed.",_.appendChild(A)}function Ne(){let A=Math.max(120,_.clientWidth-24);return Math.round(Math.min(A,r)*y)}function qe(A,U,J){let W=window.devicePixelRatio||1,ee=A.getViewport({scale:1}),le=parseFloat(U.style.width);if(!le)return;let se=A.getViewport({scale:le/ee.width*W}),ie=document.createElement("canvas");return ie.width=Math.floor(se.width),ie.height=Math.floor(se.height),ie.style.width=le+"px",ie.style.height=Math.floor(se.height/W)+"px",U.innerHTML="",U.appendChild(ie),U.style.height=ie.style.height,J.task=A.render({canvasContext:ie.getContext("2d"),viewport:se}),J.task.promise}function X(){if(!p)return;let A=w,U=_.getBoundingClientRect(),J=U.top-i,W=U.top+_.clientHeight+i,ee=c.map((se,ie)=>({slot:se,i:ie,rect:se.getBoundingClientRect()})).filter(se=>se.rect.top<=W&&se.rect.bottom>=J).sort((se,ie)=>Math.abs(se.rect.top-U.top)-Math.abs(ie.rect.top-U.top)).slice(0,6),le=new Set(ee.map(se=>se.slot));for(let se of M.keys())le.has(se)||j(se);for(let{slot:se,i:ie}of ee){if(se.dataset.state||F>=2)continue;let te={cancelled:!1,task:null};M.set(se,te),F++,se.dataset.state="rendering";let we;p.getPage(ie+1).then(pe=>{if(we=pe,!(te.cancelled||A!==w))return qe(we,se,te)}).then(()=>{te.cancelled||A!==w||(se.dataset.state="done",E&&Date.now(){!te.cancelled&&A===w&&(se.dataset.state="failed")}).finally(()=>{F--,we?.cleanup?.(),p&&X()})}}function ce(){v||(v=!0,window.requestAnimationFrame(function(){v=!1,Qe(),X()}))}function ue(){let A=!1;function U(){A||(A=!0,X())}window.requestAnimationFrame(U),window.setTimeout(U,50)}function me(){w++,c.forEach(j);let A=Ne();c.forEach(function(U){delete U.dataset.state,U.innerHTML="",U.style.width=A+"px",U.style.height=Math.round(A/N)+"px"}),X()}function be(A){if(!p||!c.length||A===y)return;let U=b;y=A,he(),me(),He(U)}function Ve(){p&&(g&&clearTimeout(g),g=setTimeout(function(){g=null,p&&c.length&&me()},250))}function D(A){if(Ee(),!A)return;let U=w;T=pdfjsLib.getDocument({url:A,isEvalSupported:!1,standardFontDataUrl:"/script/external/pdf-standard-fonts/",cMapUrl:"/script/external/pdf-cmaps/",cMapPacked:!0}),T.promise.then(function(J){if(U!==w){J.destroy();return}return p=J,p.getPage(1).then(function(W){if(U!==w)return;let ee=W.getViewport({scale:1});ee.width&&ee.height&&(N=ee.width/ee.height),m=ee.width||0;let le=Ne();for(let se=1;se<=p.numPages;se++){let ie=document.createElement("div");ie.className="pdf-viewer-page",ie.style.width=le+"px",ie.style.height=Math.round(le/N)+"px",_.appendChild(ie),c.push(ie)}he(),ue()})}).catch(function(){U===w&&tt()})}_.addEventListener("scroll",ce,{passive:!0}),$(window).on("resize",Ve),he(),ut(()=>e.src,D,{immediate:!0}),io(function(){_.removeEventListener("scroll",ce),$(window).off("resize",Ve),Ee()})}),()=>De("pdfviewer",{ref:t})}};var Iee={key:0,class:"quota-row quota-usage"},Oee={class:"quota-header"},Mee={class:"quota-label"},Vee={class:"project-type-svg","aria-hidden":"true"},qee=["href"],Lee={key:0,class:"quota-percent"},$ee={key:1,class:"quota-unlimited-tag"},_ee={class:"quota-value"},Fee={key:0},Uee=["aria-label","aria-valuenow","aria-valuemax","aria-valuetext"],Bee={key:1,class:"quota-remaining"},zee={key:2,class:"quota-remaining quota-limit"};function Up(e,t){return e.quota?(a(),l("div",Iee,[(a(),l(V,null,Q([{key:"repository",label:"Repositories",kind:"count",icon:"project-type-repo"},{key:"storage",label:"Storage",kind:"bytes",icon:"project-icon-storage"},{key:"file",label:"Files",kind:"count",icon:"project-icon-file"}],s=>n("div",{class:R(["quota-item","quota-"+e.quota[s.key].level]),key:s.key},[n("div",Oee,[n("span",Mee,[(a(),l("svg",Vee,[n("use",{href:"#"+s.icon},null,8,qee)])),h(d(s.label),1)]),e.quota[s.key].unlimited?f("v-if",!0):(a(),l("span",Lee,d(e.quota[s.key].percent>0&&e.quota[s.key].percent<1?"<1":e.fmt.number(e.quota[s.key].percent,0))+"% used",1)),e.quota[s.key].unlimited?(a(),l("span",$ee,"Unlimited")):f("v-if",!0)]),n("div",_ee,[n("strong",null,d(e.formatAmount(e.quota[s.key].used,s.kind)),1),e.quota[s.key].unlimited?f("v-if",!0):(a(),l("span",Fee," / "+d(e.formatAmount(e.quota[s.key].total,s.kind)),1))]),e.quota[s.key].unlimited?f("v-if",!0):(a(),l("div",{key:0,class:R(["quota-track","quota-"+e.quota[s.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":s.label+" quota","aria-valuenow":Math.min(e.quota[s.key].used,e.quota[s.key].total),"aria-valuemax":e.quota[s.key].total,"aria-valuetext":e.fmt.number(e.quota[s.key].percent,0)+"% used"},[e.quota[s?.key].unlimited?f("v-if",!0):(a(),l("div",{key:0,class:"quota-fill",style:Ae({width:e.quota[s.key].percent+"%"})},null,4))],10,Uee)),!e.quota[s.key].unlimited&&e.quota[s.key].used=e.quota[s.key].total?(a(),l("p",zee,d(e.quota[s.key].used>e.quota[s.key].total?"Limit exceeded":"Limit reached"),1)):f("v-if",!0)],2)),64))])):f("v-if",!0)}var Hee={props:["quota","fmt"],setup(e){return{formatAmount:(t,s)=>s==="bytes"?e.fmt.humanFileSize(e.quota?.storage?.unit==="bytes"?t*8:t).replace(/([a-zA-Z]+)$/," $1"):e.fmt.number(t)}},render:Up},jee=new Set(ge),Hp=e=>e?.querySelectorAll("pre code.language-diff, pre code.lang-diff").forEach(t=>{if(t.querySelector(".md-diff-line"))return;let s=t.innerHTML.replace(/\n$/,"").split(` `);t.innerHTML=s.map(i=>{let o=i.replace(/^(<[^>]+>)+/,"").charAt(0),r=i.startsWith("@@")?"hunk":o==="+"?"add":o==="-"?"remove":"";return`${i||" "}`}).join(` `)}),Bp=(e,t=0)=>{let s=(String(e).slice(t).match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length;return Math.min(t+s+4,24)},jp=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",Bp(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("]+>/g,"");return`${r}${o||" "}${"".repeat(i.length)}`}).join(` -`)})},Gp={props:["content","terms","options"],setup(e){let t=St(null),s=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),Hp(t.value),jp(t.value)};return gn(()=>{s(),ut(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>De("markdown",{ref:t})}},Gee={props:["file","terms","options"],setup(e){let t=St(null),s=()=>We(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),Hp(t.value),jp(t.value)});return gn(s),ut(()=>[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 De("gist-file",{ref:t},De(Gp,{content:i.content,terms:e.terms,options:e.options}));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 De("gist-file",{ref:t},De("pre",{class:"line-numbers"},De("code",{class:"language-"+(r[u]||u),key:i.content},i.content||"")))}}},Wee=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()}),Kee={props:["file","content"],setup(e){let t=St(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 Xn("notebook"),r!==s)return;t.value.innerHTML=$s(DOMPurify.sanitize(nb.parse(u).render())),t.value.querySelectorAll("pre code").forEach(p=>window.Prism?.highlightElement(p)),Wee(t.value)}catch(u){r===s&&u.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return gn(()=>{o(),ut(()=>[e.file,e.content],o)}),io(()=>{s++,i?.abort()}),()=>De("notebook",{ref:t})}},Yee={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 De("loc",t.map(([i,o])=>De("div",{class:"lang",title:`${i}: ${o.code.toLocaleString()} lines`,style:{width:o.code*100/s+"%",background:langColors[i]}})))}}},Wp={Markdown:Gp,GistFile:Gee,Notebook:Kee,Loc:Yee,HtmlDoc:_p,QuotaUsage:Hee,Pdfviewer:ud(async()=>(await Xn("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Fp))},Kp={async mounted(e,{value:t}){e._editorValue=t;try{if(await ai(),e._editorDisposed)return;let s=e._editorValue,i=ace.edit(e);e._editor=i,i.setValue(String(s.content??""),-1),zp(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),zp(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function zp(e,t={}){let s=jee.has(t.mode)?t.mode:"text";e._editor.session.setMode("ace/mode/"+s),t.theme&&e._editor.setTheme("ace/theme/"+t.theme),e._editor.setReadOnly(t.readOnly!==!1)}var Yp={mounted(e){if(!window.IntersectionObserver)return;let t=[...e.querySelectorAll('a[href^="#"]')],s=new Set,i=new IntersectionObserver(o=>{o.forEach(u=>u.isIntersecting?s.add(u.target.id):s.delete(u.target.id));let r=t.find(u=>s.has(u.hash.slice(1)));r&&t.forEach(u=>u.classList.toggle("active",u===r))},{rootMargin:"-20% 0px -60% 0px",threshold:0});We(()=>{t.forEach(o=>{let r=document.getElementById(o.hash.slice(1));r&&i.observe(r)}),t[0]&&!t.some(o=>o.classList.contains("active"))&&t[0].classList.add("active")}),e._observer=i},beforeUnmount(e){e._observer?.disconnect()}};function Jp(e){let t=[],s=0,i=/\bXXXX-(\d+)\b/g,o;for(;o=i.exec(e);)o.index>s&&t.push(e.slice(s,o.index)),t.push(De("span",{class:"redact-slot",role:"img","aria-label":"Redacted term "+o[1]},[De("i",null,o[1])])),s=o.index+o[0].length;return t.length?(s{s.push(r),u=1024&&iQee(e.file)),p=()=>e.selectedPath??"/"+(Array.isArray(s.params.path)?s.params.path.join("/"):s.params.path||"");ut(()=>[s.params.repoId,s.params.path,e.selectedPath],()=>{let b="";p().split("/").filter(Boolean).forEach(E=>{b+="/"+E,o[b]=!0})},{immediate:!0});let c=Nt(()=>{if(!e.searchQuery||!e.searchResults)return null;let b=new Set,E=new Set;return e.searchResults.forEach(S=>{b.add(S.path?`${S.path}/${S.name}`:S.name);let N="";(S.path||"").split("/").filter(Boolean).forEach(w=>{N=N?N+"/"+w:w,E.add(N)})}),{files:b,folders:E}}),v=()=>[...i.value.querySelectorAll("li > a")],g=b=>{if(i.value.querySelector(".tree-focused")?.classList.remove("tree-focused"),!b)return;if(r=b.dataset.path,b.classList.add("tree-focused"),e.selectedPath===void 0){b.scrollIntoView?.({block:"nearest"}),i.value.focus();return}let E=i.value.scrollHeight>i.value.clientHeight?i.value:i.value.closest(".leftCol-body");if(E){let S=b.getBoundingClientRect(),N=E.getBoundingClientRect();S.topN.bottom&&(E.scrollTop+=S.bottom-N.bottom)}i.value.focus({preventScroll:!0})};function y(b){let E=v(),S=i.value.querySelector(".tree-focused")||E[0],N=E.indexOf(S);if(!["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(b.key)||(b.preventDefault(),b.key==="ArrowDown"&&g(E[(N+1)%E.length]),b.key==="ArrowUp"&&g(E[(N-1+E.length)%E.length]),!S))return;let w=S.closest("li");b.key==="ArrowRight"&&w.classList.contains("folder")&&(w.classList.contains("open")?g(w.querySelector(":scope > ul > li > a")):S.click()),b.key==="ArrowLeft"&&(w.classList.contains("folder")&&w.classList.contains("open")?S.click():g(w.parentElement.closest("li.folder")?.querySelector(":scope > a"))),b.key==="Enter"&&S.click()}function m(b,E=""){let S=[...b].sort((N,w)=>+!!w.children-+!!N.children||N.name.localeCompare(w.name));return De("ul",S.flatMap(N=>{let w=N,T=w.name,M=(E+"/"+T).slice(1);if(c.value&&!c.value.files.has(M)&&!c.value.folders.has(M))return[];for(;w.children?.length===1&&w.children[0].children&&e.page?.loadedFolders?.[(E+"/"+T).slice(1)];)w=w.children[0],T+="/"+w.name;let F=E+"/"+T,j=!!w.children,oe=c.value?o[F]!==!1:!!o[F],_=j&&e.page?.options?.truncatedFolders?.includes(F.slice(1)),z=De("span",{class:j?"tree-icon-folder":"far fa-file tree-icon-file","aria-hidden":"true"},j?De("svg",{viewBox:"0 0 14 12",focusable:"false"},De("path",{d:"M1.5 10.5v-9h4l1.5 2h5.5v7z"})):null),I=!1,L=T,k="",q="";if(T.length>80){let ne=T.length-12;for(let x=T.length-18;x<=T.length-6;x++)if(x>0&&"-_. ".includes(T[x])){ne=x;break}if(I=!/XXXX-\d+/.test(T.slice(Math.max(0,ne-12))),L=T.slice(0,ne).trimEnd(),k=T.slice(ne).trimStart(),I){let x=Math.max(8,30-k.length-1);if(L.length>x&&!/XXXX-\d+/.test(L)){let fe=-1;for(let Be=Math.min(x,L.length);Be>=4;Be--)if(".-_".includes(L[Be])){fe=Be;break}let he=T.slice(0,T.length-k.length);L=(fe>0?L.slice(0,fe):L.slice(0,x)).trimEnd(),q=he.slice(L.length)}}}let G=De("span",{class:{"tree-name":!0,"tree-name-split":I,"tree-name-wrap":!I},title:T.replace(/\bXXXX-(\d+)\b/g,"[redacted term $1]")},I?[De("span",{class:{"tree-name-head":!0,"is-cut":!!q}},Jp(L)),q?De("span",{class:"tree-name-middle"},q):null,De("span",{class:"tree-name-tail"},k)]:Jee(T)),H=ne=>{if(g(ne.currentTarget),!j){e.selectedPath!==void 0&&(ne.preventDefault(),t("select",F));return}ne.preventDefault(),o[F]=!oe,o[F]&&!w.children.length&&e.page.getFiles(F.slice(1)),We(()=>g(v().find(x=>x.dataset.path===r)))},K=De("a",{"data-path":F,"aria-expanded":e.selectedPath!==void 0&&j?String(oe):void 0,"aria-current":e.selectedPath!==void 0&&!j&&p()===F?"page":void 0,href:j?void 0:`/r/${encodeURIComponent(s.params.repoId)}${encodePathForUrl(F)}`,class:{"tree-focused":r===F},onClick:H},[j?De("span",{class:"tree-toggle"}):De("span",{class:"tree-spacer"}),z,G,_?De("span",{class:"truncated-warning",title:e.page.fmt.translate("WARNINGS.folder_truncated")},De("i",{class:"fas fa-exclamation-triangle"})):null]);return De("li",{key:F,class:{file:!0,folder:j,open:oe,active:p()===F,truncated:_},title:j?"":`Size: ${Xee(w.size||0)}`},[K,j&&oe?w.children.length||!e.page?.loadedFolders?.[F.slice(1)]?m(w.children,F):De("ul",De("li",{class:"tree-empty"},"Empty folder")):null])}))}return()=>De("tree",{ref:i,tabindex:0,onKeydown:y},e.file?.length?c.value?.files.size===0?De("div",{class:"tree-search-empty"},"No files found"):m(u.value):"Empty repository")}};function Zp(){return at({errors:{},dirty:!1,touched:!1,submitted:!1,get invalid(){return Object.values(this.errors).some(Boolean)},setValidity(e,t){this.errors[e]=!t},setDirty(){this.dirty=!0}})}function xp(e,t){if(!e[t]){let s=Zp();Object.defineProperty(s,"invalid",{get(){return Object.values(s.errors).some(Boolean)||Object.keys(s).some(i=>i!=="invalid"&&s[i]&&typeof s[i]=="object"&&s[i].invalid)}}),e[t]=s}return e[t]}var ef={beforeMount(e,{value:t}){e._formState=xp(t,e.name),e.addEventListener("submit",s=>s.preventDefault())}};function Zee(e){return e instanceof Date?isNaN(e)?"":`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:e||""}function Qp(e){let t=e._field.binding.value;e.type==="checkbox"?e.checked=!!t:e.type==="radio"?e.checked=t==(e._value??e.value):e._field.timer||(e.value=e.type==="date"?Zee(t):t??""),el(e)}function el(e){let t=e._field.validation;if(!t)return;let s=e.validity;for(let[i,o]of Object.entries({required:s.valueMissing,pattern:s.patternMismatch,min:s.rangeUnderflow,max:s.rangeOverflow,date:s.badInput,email:s.typeMismatch&&e.type==="email",url:s.typeMismatch&&e.type==="url"}))t.setValidity(i,e.disabled||!o)}var tf={beforeMount(e,{value:t}){var u;let s=t.form&&xp(t.state,t.form),i=s&&e.name?s[u=e.name]||(s[u]=Zp()):null;e._field={binding:t,validation:i,timer:null};let o=()=>{clearTimeout(e._field.timer),e._field.timer=null;let p=e._field.binding,c=e.type==="checkbox"?e.checked:e._value??e.value;if(!(e.type==="radio"&&!e.checked)){if((e.type==="number"||e.type==="range")&&(c=e.value===""?null:Number(e.value)),e.type==="date"&&(c=e.value?new Date(e.value+"T00:00:00"):null),i){i.setDirty();for(let v of Object.keys(i.errors))i.setValidity(v,!0)}p.set(c),el(e),p.change?.()}};e._field.commit=o;let r=p=>{let c=e._field.binding.options?.debounce||0,v=typeof c=="number"?c:c[p.type]??c.default??0;clearTimeout(e._field.timer),v?e._field.timer=setTimeout(o,v):o()};e.addEventListener(e.tagName==="SELECT"||["checkbox","radio","date"].includes(e.type)?"change":"input",r),e.addEventListener("blur",()=>{i&&(i.touched=!0),e._field.timer&&o()})},mounted:Qp,updated(e,{value:t}){e._field.binding=t,Qp(e)},beforeUnmount(e){clearTimeout(e._field.timer);let{binding:t,validation:s}=e._field,i=t.form&&t.state[t.form];i&&i[e.name]===s&&delete i[e.name]}};function nf(e,t){let s=e.target.closest("form");if(s?._formState&&(s._formState.submitted=!0),s?.querySelectorAll("input, select, textarea").forEach(i=>{i._field?.timer&&i._field.commit(),i._field&&el(i)}),s&&!s.checkValidity()){let i=s.querySelector("input:invalid, select:invalid, textarea:invalid");i?.scrollIntoView?.({block:"center"}),i?.focus(),s.reportValidity();return}return t()}var of=Symbol("session"),xee=/^\/(w|api|github)(\/|$)/;function sf(e,t={}){let s=e?.split(".").reduce((i,o)=>i?.[o],Jn);return s==null&&e?.startsWith("ERRORS.")&&(s=Jn.ERRORS.unknown_error),String(s??e??"").replace(/{{\s*([^}]+?)\s*}}/g,(i,o)=>t[o]??"")}var ete={...Na,translate:sf};function tte(e){if(e==null||e==="")return e;try{let t=new URL(e,window.location.href);return["http:","https:","mailto:","tel:","blob:"].includes(t.protocol)?e:void 0}catch{return}}function nte(e="#app",t={}){let s=!!document.querySelector('meta[name="review-consent-page"][content="1"]'),i=s&&window.location.pathname==="/review-link"?ll(window):null,o=()=>{let m=i;return i=null,m};!t.history&&window.location.pathname==="/"&&/^#!\/r\/[^/?#]+/.test(window.location.hash)&&window.history.replaceState(window.history.state,"",window.location.hash.slice(2));let r=new Map,u=qp(t.fetch),p,c;function v(){let m=bt(),b={url(S){return S===void 0?c.currentRoute.value.fullPath:(c.push(S),b)},replace(S){return c.replace(S)},path(){return c.currentRoute.value.path},search(){return c.currentRoute.value.query}},E=new Proxy({},{get(S,N){let w=c.currentRoute.value.params[N];return Array.isArray(w)?w.join("/"):w}});return{takeReviewHandoff:o,http:u,...m,location:b,params:E,window,promises:Lp,html:{trustAsHtml:S=>S},translate:(S,N)=>Promise.resolve(sf(S,N)),quotaService:$p(u)}}function g(m){return{name:m.template,setup(){let b=Ls(qt(of),r);m.setup(b,v()),Vp(m.template,b);let E=[];return()=>hr[m.template](b,E)}}}c=_u({history:t.history||qu(),routes:ep.map(m=>m.redirect?m:{path:m.path,component:g(m),meta:{title:m.title,preserveExplorer:m.preserveExplorer}})});let y=nu({setup(){p=Ls(null,r),p.fmt=ete,p.window=window,p.Math=Math,p.sanitize=S=>DOMPurify.sanitize(S??""),p.highlightRedactions=S=>(p.site_options,Fc(S)),p.submitForm=nf,p.safeUrl=tte;let m=v();Uc(p,m.http,m.location,m.timeout),so(of,p),ut(()=>p.title,S=>{document.title=S||"Anonymous GitHub"});let b=[],E=S=>{let N=S.target.closest?.("a[href]");if(S.defaultPrevented||S.button!==0||S.metaKey||S.ctrlKey||S.shiftKey||S.altKey||!N||N.hasAttribute("download")||N.target&&N.target!=="_self"||N.dataset.toggle||N.getAttribute("href").startsWith("#"))return;let T=new URL(N.href,window.location.href);s||/^\/review-link\/?$/i.test(T.pathname)||T.origin!==window.location.origin||xee.test(T.pathname)||(S.preventDefault(),c.push(T.pathname+T.search+T.hash),$("#navbarSupportedContent.show").collapse("hide"))};return document.addEventListener("click",E),io(()=>document.removeEventListener("click",E)),()=>[Mp(p,[]),s||/^\/(r|repository)\//.test(p.path||"")?null:De("header",{class:["app-header",{"is-contained":p.path==="/"||p.path==="/faq","is-signin":p.path==="/signin"}]},hr["partials/header.htm"](p,b)),De("main",{class:"app-view align-items-stretch w-100"},De(ba,null,{default:({Component:S,route:N})=>S?De(S,{key:N.meta.preserveExplorer?N.matched[0]?.path:N.path}):null})),De("div",{class:"position-fixed p-3",style:{zIndex:999999999,right:0,bottom:0}},p.toasts.map((S,N)=>De("div",{class:"toast show",role:"alert","aria-live":"assertive","aria-atomic":"true",key:N},[De("div",{class:"toast-header"},[De("strong",{class:"mr-auto"},S.title),De("button",{type:"button",class:"ml-2 mb-1 close","aria-label":"Close",onClick:()=>p.removeToast(S)},"\xD7")]),De("div",{class:"toast-body"},S.body)])))]}});for(let[m,b]of Object.entries(Wp))y.component(m,b);return y.component("Tree",Xp),y.component("PartialView",{props:["name","state"],setup(m){let b=[];return()=>hr[m.name](m.state,b)}}),y.directive("field",tf),y.directive("form",ef),y.directive("code-editor",Kp),y.directive("paper-scrollspy",Yp),y.use(c),c.beforeEach(async m=>{if(m.path==="/review-link"&&!s||s&&m.path!=="/review-link")return window.location.assign(m.fullPath),!1;p?.emit("routeLeave"),/^\/(r|repository|anonymize|pull-request-anonymize|gist-anonymize|pr|gist)(\/|$)/.test(m.path)&&await Xn("markdown"),/^\/(r|repository|anonymize|pull-request-anonymize|gist-anonymize|pr|gist)(\/|$)/.test(m.path)&&await Xn("org")}),c.afterEach(m=>{if(!p)return;p.title=m.meta.title,p.emit("routeChange",{title:m.meta.title}),p.emit("routeUpdate",{title:m.meta.title});let b=document.querySelector(".app-view");!m.meta.preserveExplorer&&b&&(b.scrollTop=0)}),y.mount(e),{app:y,router:c,state:p}}document.querySelector("#app")&&(window.anonymousApp=nte());})(); +`)})},Gp={props:["content","terms","options"],setup(e){let t=St(null),s=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),Hp(t.value),jp(t.value)};return gn(()=>{s(),ut(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>De("markdown",{ref:t})}},Gee={props:["file","terms","options"],setup(e){let t=St(null),s=()=>We(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),Hp(t.value),jp(t.value)});return gn(s),ut(()=>[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 De("gist-file",{ref:t},De(Gp,{content:i.content,terms:e.terms,options:e.options}));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 De("gist-file",{ref:t},De("pre",{class:"line-numbers"},De("code",{class:"language-"+(r[u]||u),key:i.content},i.content||"")))}}},Wee=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()}),Kee={props:["file","content"],setup(e){let t=St(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 Xn("notebook"),r!==s)return;t.value.innerHTML=$s(DOMPurify.sanitize(nb.parse(u).render())),t.value.querySelectorAll("pre code").forEach(p=>window.Prism?.highlightElement(p)),Wee(t.value)}catch(u){r===s&&u.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return gn(()=>{o(),ut(()=>[e.file,e.content],o)}),io(()=>{s++,i?.abort()}),()=>De("notebook",{ref:t})}},Yee={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 De("loc",t.map(([i,o])=>De("div",{class:"lang",title:`${i}: ${o.code.toLocaleString()} lines`,style:{width:o.code*100/s+"%",background:langColors[i]}})))}}},Wp={Markdown:Gp,GistFile:Gee,Notebook:Kee,Loc:Yee,HtmlDoc:_p,QuotaUsage:Hee,Pdfviewer:ud(async()=>(await Xn("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Fp))},Kp={async mounted(e,{value:t}){e._editorValue=t;try{if(await ai(),e._editorDisposed)return;let s=e._editorValue,i=ace.edit(e);e._editor=i,i.setValue(String(s.content??""),-1),zp(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),zp(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function zp(e,t={}){let s=jee.has(t.mode)?t.mode:"text";e._editor.session.setMode("ace/mode/"+s),t.theme&&e._editor.setTheme("ace/theme/"+t.theme),e._editor.setReadOnly(t.readOnly!==!1)}var Yp={mounted(e){if(!window.IntersectionObserver)return;let t=[...e.querySelectorAll('a[href^="#"]')],s=new Set,i=new IntersectionObserver(o=>{o.forEach(u=>u.isIntersecting?s.add(u.target.id):s.delete(u.target.id));let r=t.find(u=>s.has(u.hash.slice(1)));r&&t.forEach(u=>u.classList.toggle("active",u===r))},{rootMargin:"-20% 0px -60% 0px",threshold:0});We(()=>{t.forEach(o=>{let r=document.getElementById(o.hash.slice(1));r&&i.observe(r)}),t[0]&&!t.some(o=>o.classList.contains("active"))&&t[0].classList.add("active")}),e._observer=i},beforeUnmount(e){e._observer?.disconnect()}};function Jp(e){let t=[],s=0,i=/\bXXXX-(\d+)\b/g,o;for(;o=i.exec(e);)o.index>s&&t.push(e.slice(s,o.index)),t.push(De("span",{class:"redact-slot",role:"img","aria-label":"Redacted term "+o[1]},[De("i",null,o[1])])),s=o.index+o[0].length;return t.length?(s{s.push(r),u=1024&&iQee(e.file)),p=()=>e.selectedPath??"/"+(Array.isArray(s.params.path)?s.params.path.join("/"):s.params.path||"");ut(()=>[s.params.repoId,s.params.path,e.selectedPath],()=>{let b="";p().split("/").filter(Boolean).forEach(E=>{b+="/"+E,o[b]=!0})},{immediate:!0});let c=Nt(()=>{if(!e.searchQuery||!e.searchResults)return null;let b=new Set,E=new Set;return e.searchResults.forEach(S=>{b.add(S.path?`${S.path}/${S.name}`:S.name);let N="";(S.path||"").split("/").filter(Boolean).forEach(w=>{N=N?N+"/"+w:w,E.add(N)})}),{files:b,folders:E}}),v=()=>[...i.value.querySelectorAll("li > a")],g=b=>{if(i.value.querySelector(".tree-focused")?.classList.remove("tree-focused"),!b)return;if(r=b.dataset.path,b.classList.add("tree-focused"),e.selectedPath===void 0){b.scrollIntoView?.({block:"nearest"}),i.value.focus();return}let E=i.value.scrollHeight>i.value.clientHeight?i.value:i.value.closest(".leftCol-body");if(E){let S=b.getBoundingClientRect(),N=E.getBoundingClientRect();S.topN.bottom&&(E.scrollTop+=S.bottom-N.bottom)}i.value.focus({preventScroll:!0})};function y(b){let E=v(),S=i.value.querySelector(".tree-focused")||E[0],N=E.indexOf(S);if(!["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(b.key)||(b.preventDefault(),b.key==="ArrowDown"&&g(E[(N+1)%E.length]),b.key==="ArrowUp"&&g(E[(N-1+E.length)%E.length]),!S))return;let w=S.closest("li");b.key==="ArrowRight"&&w.classList.contains("folder")&&(w.classList.contains("open")?g(w.querySelector(":scope > ul > li > a")):S.click()),b.key==="ArrowLeft"&&(w.classList.contains("folder")&&w.classList.contains("open")?S.click():g(w.parentElement.closest("li.folder")?.querySelector(":scope > a"))),b.key==="Enter"&&S.click()}function m(b,E=""){let S=[...b].sort((N,w)=>+!!w.children-+!!N.children||N.name.localeCompare(w.name));return De("ul",S.flatMap(N=>{let w=N,T=w.name,M=(E+"/"+T).slice(1);if(c.value&&!c.value.files.has(M)&&!c.value.folders.has(M))return[];for(;w.children?.length===1&&w.children[0].children&&e.page?.loadedFolders?.[(E+"/"+T).slice(1)];)w=w.children[0],T+="/"+w.name;let F=E+"/"+T,j=!!w.children,oe=c.value?o[F]!==!1:!!o[F],_=j&&e.page?.options?.truncatedFolders?.includes(F.slice(1)),B=De("span",{class:j?"tree-icon-folder":"far fa-file tree-icon-file","aria-hidden":"true"},j?De("svg",{viewBox:"0 0 14 12",focusable:"false"},De("path",{d:"M1.5 10.5v-9h4l1.5 2h5.5v7z"})):null),I=!1,L=T,k="",q="";if(T.length>80){let ne=T.length-12;for(let x=T.length-18;x<=T.length-6;x++)if(x>0&&"-_. ".includes(T[x])){ne=x;break}if(I=!/XXXX-\d+/.test(T.slice(Math.max(0,ne-12))),L=T.slice(0,ne).trimEnd(),k=T.slice(ne).trimStart(),I){let x=Math.max(8,30-k.length-1);if(L.length>x&&!/XXXX-\d+/.test(L)){let fe=-1;for(let Be=Math.min(x,L.length);Be>=4;Be--)if(".-_".includes(L[Be])){fe=Be;break}let he=T.slice(0,T.length-k.length);L=(fe>0?L.slice(0,fe):L.slice(0,x)).trimEnd(),q=he.slice(L.length)}}}let G=De("span",{class:{"tree-name":!0,"tree-name-split":I,"tree-name-wrap":!I},title:T.replace(/\bXXXX-(\d+)\b/g,"[redacted term $1]")},I?[De("span",{class:{"tree-name-head":!0,"is-cut":!!q}},Jp(L)),q?De("span",{class:"tree-name-middle"},q):null,De("span",{class:"tree-name-tail"},k)]:Jee(T)),H=ne=>{if(g(ne.currentTarget),!j){e.selectedPath!==void 0&&(ne.preventDefault(),t("select",F));return}ne.preventDefault(),o[F]=!oe,o[F]&&!w.children.length&&e.page.getFiles(F.slice(1)),We(()=>g(v().find(x=>x.dataset.path===r)))},Y=De("a",{"data-path":F,"aria-expanded":e.selectedPath!==void 0&&j?String(oe):void 0,"aria-current":e.selectedPath!==void 0&&!j&&p()===F?"page":void 0,href:j?void 0:`/r/${encodeURIComponent(s.params.repoId)}${encodePathForUrl(F)}`,class:{"tree-focused":r===F},onClick:H},[j?De("span",{class:"tree-toggle"}):De("span",{class:"tree-spacer"}),B,G,_?De("span",{class:"truncated-warning",title:e.page.fmt.translate("WARNINGS.folder_truncated")},De("i",{class:"fas fa-exclamation-triangle"})):null]);return De("li",{key:F,class:{file:!0,folder:j,open:oe,active:p()===F,truncated:_},title:j?"":`Size: ${Xee(w.size||0)}`},[Y,j&&oe?w.children.length||!e.page?.loadedFolders?.[F.slice(1)]?m(w.children,F):De("ul",De("li",{class:"tree-empty"},"Empty folder")):null])}))}return()=>De("tree",{ref:i,tabindex:0,onKeydown:y},e.file?.length?c.value?.files.size===0?De("div",{class:"tree-search-empty"},"No files found"):m(u.value):"Empty repository")}};function Zp(){return at({errors:{},dirty:!1,touched:!1,submitted:!1,get invalid(){return Object.values(this.errors).some(Boolean)},setValidity(e,t){this.errors[e]=!t},setDirty(){this.dirty=!0}})}function xp(e,t){if(!e[t]){let s=Zp();Object.defineProperty(s,"invalid",{get(){return Object.values(s.errors).some(Boolean)||Object.keys(s).some(i=>i!=="invalid"&&s[i]&&typeof s[i]=="object"&&s[i].invalid)}}),e[t]=s}return e[t]}var ef={beforeMount(e,{value:t}){e._formState=xp(t,e.name),e.addEventListener("submit",s=>s.preventDefault())}};function Zee(e){return e instanceof Date?isNaN(e)?"":`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:e||""}function Qp(e){let t=e._field.binding.value;e.type==="checkbox"?e.checked=!!t:e.type==="radio"?e.checked=t==(e._value??e.value):e._field.timer||(e.value=e.type==="date"?Zee(t):t??""),el(e)}function el(e){let t=e._field.validation;if(!t)return;let s=e.validity;for(let[i,o]of Object.entries({required:s.valueMissing,pattern:s.patternMismatch,min:s.rangeUnderflow,max:s.rangeOverflow,date:s.badInput,email:s.typeMismatch&&e.type==="email",url:s.typeMismatch&&e.type==="url"}))t.setValidity(i,e.disabled||!o)}var tf={beforeMount(e,{value:t}){var u;let s=t.form&&xp(t.state,t.form),i=s&&e.name?s[u=e.name]||(s[u]=Zp()):null;e._field={binding:t,validation:i,timer:null};let o=()=>{clearTimeout(e._field.timer),e._field.timer=null;let p=e._field.binding,c=e.type==="checkbox"?e.checked:e._value??e.value;if(!(e.type==="radio"&&!e.checked)){if((e.type==="number"||e.type==="range")&&(c=e.value===""?null:Number(e.value)),e.type==="date"&&(c=e.value?new Date(e.value+"T00:00:00"):null),i){i.setDirty();for(let v of Object.keys(i.errors))i.setValidity(v,!0)}p.set(c),el(e),p.change?.()}};e._field.commit=o;let r=p=>{let c=e._field.binding.options?.debounce||0,v=typeof c=="number"?c:c[p.type]??c.default??0;clearTimeout(e._field.timer),v?e._field.timer=setTimeout(o,v):o()};e.addEventListener(e.tagName==="SELECT"||["checkbox","radio","date"].includes(e.type)?"change":"input",r),e.addEventListener("blur",()=>{i&&(i.touched=!0),e._field.timer&&o()})},mounted:Qp,updated(e,{value:t}){e._field.binding=t,Qp(e)},beforeUnmount(e){clearTimeout(e._field.timer);let{binding:t,validation:s}=e._field,i=t.form&&t.state[t.form];i&&i[e.name]===s&&delete i[e.name]}};function nf(e,t){let s=e.target.closest("form");if(s?._formState&&(s._formState.submitted=!0),s?.querySelectorAll("input, select, textarea").forEach(i=>{i._field?.timer&&i._field.commit(),i._field&&el(i)}),s&&!s.checkValidity()){let i=s.querySelector("input:invalid, select:invalid, textarea:invalid");i?.scrollIntoView?.({block:"center"}),i?.focus(),s.reportValidity();return}return t()}var of=Symbol("session"),xee=/^\/(w|api|github)(\/|$)/;function sf(e,t={}){let s=e?.split(".").reduce((i,o)=>i?.[o],Jn);return s==null&&e?.startsWith("ERRORS.")&&(s=Jn.ERRORS.unknown_error),String(s??e??"").replace(/{{\s*([^}]+?)\s*}}/g,(i,o)=>t[o]??"")}var ete={...Na,translate:sf};function tte(e){if(e==null||e==="")return e;try{let t=new URL(e,window.location.href);return["http:","https:","mailto:","tel:","blob:"].includes(t.protocol)?e:void 0}catch{return}}function nte(e="#app",t={}){let s=!!document.querySelector('meta[name="review-consent-page"][content="1"]'),i=s&&window.location.pathname==="/review-link"?ll(window):null,o=()=>{let m=i;return i=null,m};!t.history&&window.location.pathname==="/"&&/^#!\/r\/[^/?#]+/.test(window.location.hash)&&window.history.replaceState(window.history.state,"",window.location.hash.slice(2));let r=new Map,u=qp(t.fetch),p,c;function v(){let m=bt(),b={url(S){return S===void 0?c.currentRoute.value.fullPath:(c.push(S),b)},replace(S){return c.replace(S)},path(){return c.currentRoute.value.path},search(){return c.currentRoute.value.query}},E=new Proxy({},{get(S,N){let w=c.currentRoute.value.params[N];return Array.isArray(w)?w.join("/"):w}});return{takeReviewHandoff:o,http:u,...m,location:b,params:E,window,promises:Lp,html:{trustAsHtml:S=>S},translate:(S,N)=>Promise.resolve(sf(S,N)),quotaService:$p(u)}}function g(m){return{name:m.template,setup(){let b=Ls(qt(of),r);m.setup(b,v()),Vp(m.template,b);let E=[];return()=>hr[m.template](b,E)}}}c=_u({history:t.history||qu(),routes:ep.map(m=>m.redirect?m:{path:m.path,component:g(m),meta:{title:m.title,preserveExplorer:m.preserveExplorer}})});let y=nu({setup(){p=Ls(null,r),p.fmt=ete,p.window=window,p.Math=Math,p.sanitize=S=>DOMPurify.sanitize(S??""),p.highlightRedactions=S=>(p.site_options,Fc(S)),p.submitForm=nf,p.safeUrl=tte;let m=v();Uc(p,m.http,m.location,m.timeout),so(of,p),ut(()=>p.title,S=>{document.title=S||"Anonymous GitHub"});let b=[],E=S=>{let N=S.target.closest?.("a[href]");if(S.defaultPrevented||S.button!==0||S.metaKey||S.ctrlKey||S.shiftKey||S.altKey||!N||N.hasAttribute("download")||N.target&&N.target!=="_self"||N.dataset.toggle||N.getAttribute("href").startsWith("#"))return;let T=new URL(N.href,window.location.href);s||/^\/review-link\/?$/i.test(T.pathname)||T.origin!==window.location.origin||xee.test(T.pathname)||(S.preventDefault(),c.push(T.pathname+T.search+T.hash),$("#navbarSupportedContent.show").collapse("hide"))};return document.addEventListener("click",E),io(()=>document.removeEventListener("click",E)),()=>[Mp(p,[]),s||/^\/(r|repository)\//.test(p.path||"")?null:De("header",{class:["app-header",{"is-contained":p.path==="/"||p.path==="/faq","is-signin":p.path==="/signin"}]},hr["partials/header.htm"](p,b)),De("main",{class:"app-view align-items-stretch w-100"},De(ba,null,{default:({Component:S,route:N})=>S?De(S,{key:N.meta.preserveExplorer?N.matched[0]?.path:N.path}):null})),De("div",{class:"position-fixed p-3",style:{zIndex:999999999,right:0,bottom:0}},p.toasts.map((S,N)=>De("div",{class:"toast show",role:"alert","aria-live":"assertive","aria-atomic":"true",key:N},[De("div",{class:"toast-header"},[De("strong",{class:"mr-auto"},S.title),De("button",{type:"button",class:"ml-2 mb-1 close","aria-label":"Close",onClick:()=>p.removeToast(S)},"\xD7")]),De("div",{class:"toast-body"},S.body)])))]}});for(let[m,b]of Object.entries(Wp))y.component(m,b);return y.component("Tree",Xp),y.component("PartialView",{props:["name","state"],setup(m){let b=[];return()=>hr[m.name](m.state,b)}}),y.directive("field",tf),y.directive("form",ef),y.directive("code-editor",Kp),y.directive("paper-scrollspy",Yp),y.use(c),c.beforeEach(async m=>{if(m.path==="/review-link"&&!s||s&&m.path!=="/review-link")return window.location.assign(m.fullPath),!1;p?.emit("routeLeave"),/^\/(r|repository|anonymize|pull-request-anonymize|gist-anonymize|pr|gist)(\/|$)/.test(m.path)&&await Xn("markdown"),/^\/(r|repository|anonymize|pull-request-anonymize|gist-anonymize|pr|gist)(\/|$)/.test(m.path)&&await Xn("org")}),c.afterEach(m=>{if(!p)return;p.title=m.meta.title,p.emit("routeChange",{title:m.meta.title}),p.emit("routeUpdate",{title:m.meta.title});let b=document.querySelector(".app-view");!m.meta.preserveExplorer&&b&&(b.scrollTop=0)}),y.mount(e),{app:y,router:c,state:p}}document.querySelector("#app")&&(window.anonymousApp=nte());})(); /*! Bundled license information: @vue/shared/dist/shared.esm-bundler.js: diff --git a/test/vue-ui.test.js b/test/vue-ui.test.js index bc73be9..5c09d34 100644 --- a/test/vue-ui.test.js +++ b/test/vue-ui.test.js @@ -899,6 +899,35 @@ describe("Vue 3 UI", function () { "/api/anonymize-preview": request => ({ content: request.payload.content.replaceAll("Private Author", "MASKED") }), }; + it("recovers edit source validity after a failed branch refresh", async () => { + let fail = false; + ui = await browser("/anonymize/saved", { + ...repositorySource, + "/api/repo/saved": { source: { fullName: "owner/repo", branch: "main", commit: "saved123" }, options: { terms: ["Private Author"], update: false } }, + "/api/repo/owner/repo/branches": () => fail ? { __status: 503, body: { error: "github_unavailable" } } + : [{ name: "main", commit: "latest456" }], + }); + await delay(150); + const state = ui.window.document.querySelector("#sourceUrl")._field.binding.state; + expect(state.source.commit).to.equal("saved123"); + fail = true; + await state.getBranches(true); + expect(state.details).to.equal(null); + expect(state.anonymize.sourceUrl.errors.missing).to.equal(true); + expect(state.sourceProblem()).not.to.equal(null); + fail = false; + const metadataBefore = ui.requests.filter(r => r.url.pathname === "/api/repo/owner/repo/").length; + await state.getBranches(true); + await delay(30); + expect(ui.requests.filter(r => r.url.pathname === "/api/repo/owner/repo/")).to.have.length(metadataBefore + 1); + expect(state.details.repo).to.equal("repo"); + expect(state.anonymize.sourceUrl.errors.missing).not.to.equal(true); + expect(state.sourceProblem()).to.equal(null); + expect(state.source.commit).to.equal("latest456"); + expect(state.terms).to.equal("Private Author"); + expect(ui.errors).to.deep.equal([]); + }); + it("browses redacted preview paths with the explorer tree and Ace renderer", async () => { ui = await browser("/anonymize/saved", { ...repositorySource,