// <nowiki>
// Note: This script was compiled and minified from TypeScript. For a more readable version, see https://github.com/Eejit43/wikipedia-scripts/blob/main/scripts/afcrc-helper/afcrc-helper.ts
"use strict";(()=>{var X=Object.defineProperty;var C=(h,e)=>()=>(h&&(e=h(h=0)),e);var F=(h,e)=>{for(var t in e)X(h,t,{get:e[t],enumerable:!0})};var q,B=C(()=>{"use strict";q=class h extends OO.ui.Dialog{contentLayout;logOutput;closeButton;constructor(){super({size:"large"}),h.static.name="ActionsDialog",h.static.title="Actions"}initialize=()=>(OO.ui.Dialog.prototype.initialize.apply(this),mw.util.addCSS(`
.afcrc-helper-actions-container div {
margin-block: 8px;
}`),this.contentLayout=new OO.ui.PanelLayout({padded:!0,expanded:!1}),this.$body.append(this.contentLayout.$element),this.logOutput=document.createElement("div"),this.logOutput.classList.add("afcrc-helper-actions-container"),this.closeButton=new OO.ui.ButtonWidget({label:"Close",flags:["safe","close"]}),this.closeButton.on("click",()=>this.close()),this.contentLayout.$element.append(this.logOutput,this.closeButton.$element),this);addLogEntry(e,t="notice"){let n=new OO.ui.MessageWidget({type:t,inline:!0,label:new OO.ui.HtmlSnippet(e)});this.logOutput.append(n.$element[0]),this.updateSize(),this.closeButton.scrollElementIntoView()}showReload(){this.closeButton.$element.remove();let e=new OO.ui.ButtonWidget({label:"Reload",flags:["primary"]});e.on("click",()=>{window.location.reload()}),this.contentLayout.$element.append(e.$element)}};Object.assign(q.prototype,OO.ui.Dialog.prototype)});var E,V=C(()=>{"use strict";B();E=class h extends OO.ui.ProcessDialog{api=new mw.Api;scriptMessage=" ([[User:Eejit43/scripts/afcrc-helper|afcrc-helper]])";requestPageType;pageTitle;createdPageWatchMethod;beforeText;pageContent;parsedRequests;editsCreationsToMake=[];constructor(e,t,n){super({size:"large"}),h.static.name="AfcrcHelperDialog",h.static.title="afcrc-helper",h.static.actions=[{action:"cancel",label:"Close",flags:["safe","close"]},{action:"save",label:"Run",flags:["primary","progressive"]}],this.pageTitle=t,this.requestPageType=e,this.createdPageWatchMethod=n&&["nochange","preferences","unwatch","watch"].includes(n)?n:"preferences",document.body.classList.add("afcrc-helper-open"),mw.util.addCSS(`
body.afcrc-helper-open #mw-teleport-target {
z-index: 500;
}
.afcrc-helper-request {
margin: 10px;
border-radius: 5px;
background-color: #eee;
padding: 5px;
color: #202122;
}
.afcrc-helper-request summary {
cursor: pointer;
}
.afcrc-helper-target-editor {
min-width: 1ch;
max-width: calc(100% - 4ch);
font-family: monospace;
}
.afcrc-helper-external-link {
text-decoration: none !important;
}
.afcrc-helper-external-link svg {
display: inline-block;
width: 1em;
height: 1em;
fill: currentColor;
}
.afcrc-helper-request-info,
.afcrc-helper-request-responder {
margin: 5px;
}
.afcrc-helper-request-info > div,
.afcrc-helper-request-responder > div {
margin-block: 8px;
}
.afcrc-helper-request-responder > div:last-of-type {
margin-bottom: 0;
}
.afcrc-helper-request-responder .oo-ui-fieldLayout {
margin-left: 8px;
}
.afcrc-helper-request-responder .oo-ui-fieldLayout-header {
width: max-content;
}
.afcrc-helper-action-radio {
margin-top: 8px;
}
.afcrc-helper-action-radio .oo-ui-radioOptionWidget {
display: inline;
padding: 8px;
}
.afcrc-closing-reason-input,
.afcrc-comment-input {
max-width: 50%;
}
.afcrc-helper-template-parameters-container,
.afcrc-helper-template-parameters-container details {
margin-block: 10px;
border: 1px solid #a2a9b1;
border-radius: 2px;
background-color: white;
padding: 5px;
}
.afcrc-helper-template-parameters-container {
margin-left: 8px;
}
.afcrc-helper-template-parameters-container summary {
cursor: pointer;
font-weight: bold;
}
.afcrc-helper-template-parameters-container details {
margin-block: 5px;
background-color: #e2e2e2;
}
#afcrc-helper-no-templates-message {
padding: 5px;
}`)}getActionProcess=e=>!e||e==="cancel"?new OO.ui.Process(()=>{this.parsedRequests.length>0?OO.ui.confirm("Are you sure you want to close? All changes will be discarded.").then(t=>t?this.close():null):this.close()}):e==="save"?new OO.ui.Process(()=>{this.performActions()}):h.super.prototype.getActionProcess.call(this,e);getTeardownProcess=()=>h.super.prototype.getTeardownProcess.call(this).next(()=>{this.$body.empty(),document.body.classList.remove("afcrc-helper-open")});async load(){let e=await this.api.get({action:"query",formatversion:"2",prop:"revisions",rvprop:"content",rvslots:"main",titles:this.pageTitle});this.pageContent=e.query.pages[0].revisions[0].slots.main.content.trim(),this.parseRequests(),this.loadInputElements()}parseRequests(){this.beforeText=/^(.*?)==/s.exec(this.pageContent)[1],this.pageContent=this.pageContent.replace(/^.*?==/s,"==");let e=[...this.pageContent.matchAll(/^==.*?==$(\s*(?!==[^=]).*)*/gim)].map(t=>t[0]);for(let t of e){if(/{{afc-c\|/i.test(t))continue;let s=/^==(.*?)==$/m.exec(t)[1].trim();this.parseSubtypeRequests(t,s)}}loadInputElements(){if(this.parsedRequests.length>0){let e=0,t=()=>{let s=Math.min(e+5,this.parsedRequests.length);this.title.setLabel(`afcrc-helper (loading ${e+1}-${s}/${this.parsedRequests.length} requests)`);for(let o=e;o<s;o++)this.loadSubtypeElements(o);s<this.parsedRequests.length?(e=s,setTimeout(t,0)):this.title.setLabel(`afcrc-helper (${this.parsedRequests.length} requests loaded)`)};t()}else{let e=new OO.ui.MessageWidget({type:"notice",label:"No valid requests to handle!"}),t=new OO.ui.PanelLayout({padded:!0,expanded:!1});t.$element.append(e.$element),this.$body.append(t.$element),this.updateSize()}}async performActions(){let e=new OO.ui.WindowManager;document.body.append(e.$element[0]);let t=new q;e.addWindows([t]),t.open();let n={accepted:0,denied:0,"commented on":0,closed:0},s=(await this.api.get({action:"query",formatversion:"2",prop:"revisions",rvprop:"content",rvslots:"main",titles:this.pageTitle})).query.pages[0].revisions[0].slots.main.content.trim();this.performSubtypeActions(t,n,s)}formatDeniedReason(e){let t=e.startsWith("autofill:")?/autofill:(\w+)/.exec(e)[1]:`decline|2=${e}`,n=e.startsWith("autofill:")&&e.includes(",")?" "+e.slice(e.indexOf(",")+1).trim():"";return`{{subst:AfC ${this.requestPageType}|${t}}}${n}`}mapDeniedReasons(e,t,n){if(t)return`* ${this.formatDeniedReason(e[0][1])} ~~~~`;let s={};for(let[i,a]of e)a in s||(s[a]=[]),s[a].push(i);let o=Object.entries(s);return o.map(([i,a])=>`* ${this.formatDeniedReason(i)}${o.length>1||!n?` (${a.map(c=>`[[${c}]]`).join(", ")})`:""} ~~~~`).join(`
`)}mapComments(e,t,n){if(t)return`* {{AfC comment|1=${e[0][1]}}} ~~~~`;let s={};for(let[i,a]of e)a in s||(s[a]=[]),s[a].push(i);let o=Object.entries(s);return o.map(([i,a])=>`* {{AfC comment|1=${i}}}${o.length>1||!n?` (${a.map(c=>`[[${c}]]`).join(", ")})`:""} ~~~~`).join(`
`)}modifySectionData(e,{prepend:t,append:n}){let{fullSectionText:s,sectionText:o}=e;return t&&(e.sectionText=t+`
`+e.sectionText),n&&(e.sectionText+=`
`+n),e.fullSectionText=e.fullSectionText.replace(o,e.sectionText),e.pageText=e.pageText.replace(s,e.fullSectionText),e}async makeAllEditsCreations(e){for(let t of this.editsCreationsToMake){let n=t.type==="edit"?this.api.edit(t.title,t.transform):this.api.create(t.title,{summary:t.summary,watchlist:this.createdPageWatchMethod},t.text),s=document.createElement("a");s.target="_blank",s.href=mw.util.getUrl(t.title,"isRedirect"in t&&t.isRedirect?{redirect:"no"}:void 0),s.textContent=t.title,e.addLogEntry(`${t.type==="edit"?"Editing":"Creating"} ${s.outerHTML}...`),await n.catch(async(o,i)=>{o==="ratelimited"?(e.addLogEntry(`Rate limited. Waiting for 70 seconds... (resuming at ${new Date(Date.now()+7e4).toLocaleTimeString()})`,"warning"),await new Promise(a=>setTimeout(a,7e4)),e.addLogEntry("Continuing...","success"),await n.catch((a,c)=>{e.addLogEntry(`Error ${t.type==="edit"?"editing":"creating"} ${s.outerHTML}: ${c?.error.info??"Unknown error"} (${a}).`,"error")})):e.addLogEntry(`Error ${t.type==="edit"?"editing":"creating"} ${s.outerHTML}: ${i?.error.info??"Unknown error"} (${o}).`,"error")})}}parseSubtypeRequests(e,t){throw new Error("Not implemented.")}loadSubtypeElements(e){throw new Error("Not implemented.")}updateRequestColor(e,t){throw new Error("Not implemented.")}async performSubtypeActions(e,t,n){throw new Error("Not implemented.")}};Object.assign(E.prototype,OO.ui.ProcessDialog.prototype)});var S,z=C(()=>{"use strict";S=class{titleIndex;title;detailsElement;responderElement;dialog;templateParametersEditor;templateEditorsInfo=[];commentInput;tagSelectLayout;denyReasonLayout;closingReasonLayout;commentLayout;constructor(e,t,n,s,o){this.titleIndex=e,this.title=t,this.detailsElement=n,this.responderElement=s,this.dialog=o}setUp(){let e=document.createElement("div"),t=document.createElement("b");t.textContent=this.title,e.append(t);let n=new OO.ui.RadioSelectWidget({classes:["afcrc-helper-action-radio"],items:["Accept","Deny","Comment","Close","None"].map(s=>new OO.ui.RadioOptionWidget({data:s,label:s}))});n.selectItemByLabel("None"),n.on("choose",s=>{this.handleActionChange(s)}),this.loadCommentLayout(),e.append(n.$element[0],this.commentLayout.$element[0]),this.responderElement.append(e)}handleActionChange(e){setTimeout(()=>this.dialog.updateSize(),0);let t=e.getData().toLowerCase();switch(this.updateActionsToTake({action:t}),this.dialog.updateRequestColor(this.detailsElement,this.titleIndex),this.tagSelectLayout&&this.tagSelectLayout.$element.hide(),this.templateParametersEditor&&(this.templateParametersEditor.style.display="none"),this.denyReasonLayout&&this.denyReasonLayout.$element.hide(),this.closingReasonLayout&&this.closingReasonLayout.$element.hide(),t){case"accept":{(!this.tagSelectLayout||!this.templateParametersEditor)&&this.loadTagSelectAndParametersEditor(),this.tagSelectLayout.$element.show(),this.templateParametersEditor.style.display="block";break}case"deny":{this.denyReasonLayout||this.loadDenyReasonLayout(),this.denyReasonLayout.$element.show();break}case"close":{this.closingReasonLayout||this.loadClosingReasonLayout(),this.closingReasonLayout.$element.show();break}}if(["accept","comment","close"].includes(t)){this.commentLayout.$element.show();let n=this.commentInput.getValue().trim();n?this.updateActionsToTake({comment:n}):this.updateActionsToTake({comment:void 0})}else this.commentLayout.$element.hide(),this.updateActionsToTake({comment:void 0})}loadTagSelectAndParametersEditor(){let e=new OO.ui.MenuTagMultiselectWidget({allowArbitrary:!1,allowReordering:!1,options:Object.entries(this.dialog.redirectTemplates).map(([s,{redirect:o}])=>{if(!o)return{data:s,label:s};let i=new OO.ui.HtmlSnippet(`${s} <i>(redirect with possibilities)</i>`);return{data:s,label:i}})});e.getMenu().filterMode="substring",e.on("change",()=>{let s=e.getValue().sort((i,a)=>i.toLowerCase().localeCompare(a.toLowerCase()));e.getValue().join(";")!==s.join(";")&&e.setValue(s),this.updateActionsToTake({redirectTemplates:s});let o=0;for(let i of this.templateEditorsInfo){let a=s.includes(i.name);i.details.style.display=a?"block":"none",a&&o++}t.textContent=`Template parameters (${o>0?`for ${o} template${o>1?"s":""}`:"none to show"})`,n.style.display=o>0?"none":"block"}),this.tagSelectLayout=new OO.ui.FieldLayout(e,{classes:["afcrc-helper-tag-select-layout"],align:"inline",label:"Redirect templates:"}),this.commentLayout.$element[0].before(this.tagSelectLayout.$element[0]),this.templateParametersEditor=document.createElement("details"),this.templateParametersEditor.classList.add("afcrc-helper-template-parameters-container");let t=document.createElement("summary");t.textContent="Template parameters (none to show)",this.templateParametersEditor.append(t);for(let[s,o]of Object.entries(this.dialog.redirectTemplates)){let i=Object.entries(o.parameters);if(i.length===0)continue;let a=document.createElement("details");a.style.display="none";let c=document.createElement("summary");c.textContent=s,a.append(c);let u={name:s,details:a,parameters:[]};for(let[p,d]of i){let m=new OO.ui.TextInputWidget({placeholder:d.default?.toString(),required:d.required}),T=new OO.ui.FieldLayout(m,{label:new OO.ui.HtmlSnippet(`${p}${!d.label||p.toLowerCase()===d.label.toLowerCase()?"":` (${d.label})`}${d.description?` (${d.description})`:""} (type: ${d.type}) ${d.suggested?" (suggested)":""}${d.example?` (example: "${d.example}")`:""}`),align:"inline"});a.append(T.$element[0]),u.parameters.push({name:p,aliases:d.aliases,editor:m})}this.templateParametersEditor.append(a),this.templateEditorsInfo.push(u)}this.updateActionsToTake({redirectTemplateParameters:this.templateEditorsInfo});let n=document.createElement("div");n.id="afcrc-helper-no-templates-message",n.textContent="No templates with parameters to display!",this.templateParametersEditor.append(n),this.commentLayout.$element[0].before(this.templateParametersEditor)}loadDenyReasonLayout(){let e=new OO.ui.ComboBoxInputWidget({classes:["afcrc-closing-reason-input"],placeholder:"autofill:unlikely",options:[["exists","existing pages"],["empty","empty submissions"],["notarget","nonexistent or no provided target"],["notitle","no title provided"],["unlikely","unlikely redirects"],["unrelated","apparently unrelated titles"],["notredirect","article creation requests"],["externallink","external link redirects"],["editrequest","edit requests"],["notenglish","requests not in English"]].map(([t,n])=>({data:`autofill:${t}`,label:`Autofilled text for ${n}`}))});e.on("change",t=>{this.updateActionsToTake({denyReason:t||"autofill:unlikely"})}),e.setValue("autofill:unlikely"),e.getMenu().selectItemByData("autofill:unlikely"),this.denyReasonLayout=new OO.ui.FieldLayout(e,{align:"inline",label:"Deny reason:",help:'Supports automatic reasoning, custom reasoning, or a combination of the two with "autofill:REASON, CUSTOM" format'}),this.denyReasonLayout.$element.hide(),this.commentLayout.$element[0].before(this.denyReasonLayout.$element[0])}loadClosingReasonLayout(){let e=new OO.ui.DropdownWidget({classes:["afcrc-closing-reason-input"],menu:{items:[["No response","r"],["Succeeded","s"],["Withdrawn","w"]].map(([t,n])=>new OO.ui.MenuOptionWidget({data:n,label:t}))}});e.getMenu().selectItemByData("r"),e.getMenu().on("choose",t=>{this.updateActionsToTake({closingReason:{name:t.getLabel(),id:t.getData()}}),this.dialog.updateRequestColor(this.detailsElement,this.titleIndex)}),this.closingReasonLayout=new OO.ui.FieldLayout(e,{align:"inline",label:"Closing reason:"}),this.closingReasonLayout.$element.hide(),this.commentLayout.$element[0].before(this.closingReasonLayout.$element[0])}loadCommentLayout(){this.commentInput=new OO.ui.TextInputWidget,this.commentInput.on("change",e=>{let t=e.trim();t?this.updateActionsToTake({comment:t}):this.updateActionsToTake({comment:void 0})}),this.commentLayout=new OO.ui.FieldLayout(this.commentInput,{classes:["afcrc-comment-input"],align:"inline",label:"Comment:"}),this.commentLayout.$element.hide()}updateActionsToTake(e){Object.assign(this.dialog.actionsToTake[this.titleIndex].requests[this.title],e)}}});var Q={};F(Q,{default:()=>N});var N,_=C(()=>{"use strict";V();z();N=class extends E{redirectTemplates;parsedRequests=[];actionsToTake=[];async load(){let e=await this.api.get({action:"query",formatversion:"2",prop:"revisions",rvprop:"content",rvslots:"main",titles:"User:Eejit43/scripts/redirect-helper.json"});this.redirectTemplates=JSON.parse(e.query.pages[0]?.revisions?.[0]?.slots?.main?.content||"{}"),super.load()}parseSubtypeRequests(e,t){let n={},s=t.matchAll(/\[\[(.*?)]]/g).toArray().map(c=>c[1].trim().replace(/^:/,"").replaceAll("_"," ")).filter(Boolean);if(s.length===0)return;n.pages=s;let o=/Target of redirect: ?\[\[(.*?)]]/.exec(e)?.[1].trim().replace(/^:/,"").replaceAll("_"," ");if(!o)return;n.target=o,n.reason=/reason: ?(.*?)\*source(?: \(if applicable\))?:/is.exec(e)?.[1].trim()??"",n.source=/source(?: \(if applicable\))?: ?(.*?)(?:<references \/>|\n\n)/is.exec(e)?.[1].trim()??"";let i=e.match(e.includes("<references />")?/<references \/>\n+(.*)/:new RegExp(`(?:<references \\/>${n.source?`|${n.source.replaceAll(/[\s#$()*+,.?[\\\]^{|}-]/g,"\\$&")}`:""})
+(.*)`))?.[1].trim(),a=i?/(?:Special:Contributions\/|User(?: talk)?:)(.*?)\|/.exec(i)?.[1].trim():null;n.requester=i&&a?{type:/\[\[User( talk)?:/.test(i)?"user":"ip",name:a}:null,this.parsedRequests.push(n),this.actionsToTake.push({target:n.target,requests:Object.fromEntries(s.map(c=>[c,{originalText:{fullSectionText:e,sectionText:e.replace(/^==.*?==$/m,"").trim()},action:"none"}]))})}loadSubtypeElements(e){let t=this.parsedRequests[e],n=document.createElement("details");n.classList.add("afcrc-helper-request"),n.addEventListener("click",()=>setTimeout(()=>this.updateSize(),0));let s=document.createElement("summary");s.innerHTML=t.pages.map(l=>`<b>${l}</b>`).join(", ")+" \u2192 ",s.addEventListener("keyup",l=>{document.activeElement?.tagName==="INPUT"&&l.key===" "&&l.preventDefault()});let o=document.createElement("input");o.classList.add("afcrc-helper-target-editor"),o.style.width=`${t.target.length}ch`,o.value=t.target,o.addEventListener("input",()=>{o.value=o.value.replaceAll("_"," "),o.style.width=`${o.value.length}ch`,this.actionsToTake[e].target=o.value,i.href=mw.util.getUrl(o.value)}),s.append(o);let i=document.createElement("a");i.classList.add("afcrc-helper-external-link"),i.target="_blank",i.href=mw.util.getUrl(t.target),i.innerHTML=`
<svg viewbox="0 0 48 48">
<path d="M36 24c-1.2 0-2 0.8-2 2v12c0 1.2-0.8 2-2 2h-22c-1.2
0-2-0.8-2-2v-22c0-1.2 0.8-2 2-2h12c1.2 0 2-0.8 2-2s-0.8-2-2-2h-12c-3.4
0-6 2.6-6 6v22c0 3.4 2.6 6 6 6h22c3.4 0 6-2.6
6-6v-12c0-1.2-0.8-2-2-2z"></path>
<path d="M43.8 5.2c-0.2-0.4-0.6-0.8-1-1-0.2-0.2-0.6-0.2-0.8-0.2h-12c-1.2
0-2 0.8-2 2s0.8 2 2 2h7.2l-18.6 18.6c-0.8 0.8-0.8 2 0 2.8 0.4 0.4 0.8
0.6 1.4 0.6s1-0.2 1.4-0.6l18.6-18.6v7.2c0 1.2 0.8 2 2 2s2-0.8
2-2v-12c0-0.2 0-0.6-0.2-0.8z"></path>
</svg>`,s.append(i),n.append(s);let a=document.createElement("div");a.classList.add("afcrc-helper-request-info");let c=document.createElement("span");c.style.color="dimgray",c.textContent="None";let u=document.createElement("span");u.style.color="dimgray",u.textContent="Unknown";let p=document.createElement("div"),d=document.createElement("b");d.textContent="Reason: ",p.append(d),t.reason?p.append(t.reason):p.append(c.cloneNode(!0)),a.append(p);let m=document.createElement("div"),T=document.createElement("b");T.textContent="Source: ",m.append(T),t.source?m.append(t.source):m.append(c.cloneNode(!0)),a.append(m);let b=document.createElement("div"),R=document.createElement("b");if(R.textContent="Requester: ",b.append(R),t.requester){let l=document.createElement("a");l.target="_blank",l.href=t.requester.type==="user"?mw.util.getUrl(`User:${t.requester.name}`):mw.util.getUrl(`Special:Contributions/${t.requester.name}`),l.textContent=t.requester.name,b.append(l)}else b.append(u.cloneNode(!0));a.append(b),n.append(a),n.append(document.createElement("hr"));let g=document.createElement("div");g.classList.add("afcrc-helper-request-responder");for(let l of t.pages)new S(e,l,n,g,this).setUp();n.append(g),this.$body.append(n),this.updateSize()}updateRequestColor(e,t){let n=Object.values(this.actionsToTake[t].requests),s=n.every(c=>c.action==="accept"||c.action==="deny"),o=n.find(c=>c.action==="close")?.closingReason?.id,i=n.every(c=>c.action==="close"&&c.closingReason?.id===o),a="";if(s){let c=n.filter(p=>p.action==="accept").length,u=n.filter(p=>p.action==="deny").length;c>0&&u>0?a="#fff17e":c>0?a="#a0ffa0":a="#ffcece"}else i&&(o==="r"?a="#ffcece":o==="s"?a="#90c090":a="#b8b8b8");e.style.backgroundColor=a}async performSubtypeActions(e,t,n){if(this.actionsToTake.some(o=>Object.values(o.requests).some(i=>i.action!=="none"))){for(let{target:i,requests:a}of this.actionsToTake){let c=Object.values(a).some(l=>l.action==="accept"||l.action==="deny"),u=Object.values(a).every(l=>l.action==="accept"||l.action==="deny"),p=Object.values(a).find(l=>l.action==="close")?.closingReason?.id,d=Object.values(a).every(l=>l.action==="close"&&l.closingReason?.id===p),m=[],T=[],b=[],R=Object.keys(a).length;for(let[l,y]of Object.entries(a))switch(y.action){case"accept":{c&&!u?e.addLogEntry(`Not all requests to "${i}" were accepted or denied, the handling of "${l}" will be ignored.`,"warning"):(m.push(l),y.comment&&b.push([l,y.comment]),t.accepted++);break}case"deny":{c&&!u?e.addLogEntry(`Not all requests to "${i}" were accepted or denied, the handling of "${l}" is being ignored.`,"warning"):(T.push([l,y.denyReason]),t.denied++);break}case"comment":{y.comment?(b.push([l,y.comment]),t["commented on"]++):e.addLogEntry(`The request to create "${l}" \u2192 "${i}" was marked to be commented on, but no comment was provided so it will be skipped.`,"warning");break}case"close":{d?(y.comment&&b.push([l,y.comment]),t.closed++):e.addLogEntry(`Not all requests to "${i}" were closed with the same reason, the handling of "${l}" is being ignored.`,"warning");break}}let g={pageText:n,...Object.values(a)[0].originalText};if(b.length>0&&(g=this.modifySectionData(g,{append:this.mapComments(b,R===1,b.length===R)})),u){let l;if(m.length>0&&T.length>0){l="p";let y=`* {{subst:AfC redirect}} (${m.map(O=>`[[${O}]]`).join(", ")}) ~~~~`,L=this.mapDeniedReasons(T,!1,!1);for(let O of m)this.handleAcceptedRedirect(O,a[O],i);g=this.modifySectionData(g,{append:`${y}
${L}`})}else if(m.length>0){l="a";for(let y of m)this.handleAcceptedRedirect(y,a[y],i);g=this.modifySectionData(g,{append:`* {{subst:AfC redirect${m.length>1?"|all":""}}} ~~~~`})}else l="d",g=this.modifySectionData(g,{append:this.mapDeniedReasons(T,R===1,!0)});g=this.modifySectionData(g,{prepend:`{{AfC-c|${l}}}`,append:"{{AfC-c|b}}"})}else d&&(g=this.modifySectionData(g,{prepend:`{{AfC-c|${p}}}`,append:"{{AfC-c|b}}"}));n=g.pageText}if(this.beforeText+this.pageContent===n){e.addLogEntry("No requests have been handled (page content identical)!");return}let o=Object.entries(t).filter(([,i])=>i>0).map(([i,a])=>`${i} ${a}`).join(", ");this.editsCreationsToMake.push({type:"edit",title:this.pageTitle,transform:()=>({text:n,summary:`Handling AfC redirect requests (${o})${this.scriptMessage}`})}),await this.makeAllEditsCreations(e),e.addLogEntry("All changes made, click below to reload!","success"),e.showReload()}else e.addLogEntry("No requests have been handled!")}handleAcceptedRedirect(e,t,n){let s=t.redirectTemplates&&t.redirectTemplates.length>0?t.redirectTemplates.map(i=>{let a=t.redirectTemplateParameters?.find(p=>p.name===i);if(!a)return`{{${i}}}`;let c=a.parameters.findLastIndex((p,d)=>p.name===(d+1).toString()&&p.editor.getValue().trim()),u=a.parameters.map((p,d)=>{let m=p.editor.getValue().trim();return!m&&d>c?null:`|${p.name===(d+1).toString()?"":`${p.name}=`}${m}`}).filter(Boolean).join("");return`{{${i}${u}}}`}):null,o=mw.Title.newFromText(e);this.editsCreationsToMake.push({type:"create",isRedirect:!0,title:o.getPrefixedText(),text:`#REDIRECT [[${n}]]${s?`
{{Redirect category shell|
${s.join(`
`)}
}}`:""}`,summary:`Creating redirect to [[${n}]] as requested at [[WP:AFC/R]]${this.scriptMessage}`},{type:"create",isRedirect:!1,title:o.getTalkPage().getPrefixedText(),text:`{{WikiProject banner shell|
{{WikiProject Articles for creation|ts={{subst:LOCALTIMESTAMP}}|reviewer=${mw.config.get("wgUserName")}}}
}}`,summary:`Adding [[Wikipedia:WikiProject Articles for creation|WikiProject Articles for creation]] banner${this.scriptMessage}`})}}});var x,J=C(()=>{"use strict";x=class extends OO.ui.TextInputWidget{api=new mw.Api;constructor(e){super(e),OO.ui.mixin.LookupElement.call(this,e)}getLookupRequest=()=>{let e=this.getValue(),t=$.Deferred();e||t.resolve([]);let n=mw.Title.newFromText(e);return this.api.get({action:"query",formatversion:"2",gaplimit:20,gapnamespace:14,gapprefix:n?.getMainText()??e,generator:"allpages",prop:"categories"}).catch(()=>null).then(s=>{if(s?.query?.pages){let o=s.query.pages.filter(i=>!i.categories?.some(a=>a.title==="Category:Wikipedia soft redirected categories")).map(i=>{let a=i.title.split(":")[1];return{data:a,label:a}});this.emit("showing-values",o),t.resolve(o)}else t.resolve([])}),t.promise({abort(){}})};getLookupCacheDataFromResponse=e=>e??[];getLookupMenuOptionsFromData=e=>e.map(({data:t,label:n})=>new OO.ui.MenuOptionWidget({data:t,label:n}))};Object.assign(x.prototype,OO.ui.mixin.LookupElement.prototype)});var v,G=C(()=>{"use strict";v=class extends OO.ui.TextInputWidget{api=new mw.Api;constructor(e){super(e),OO.ui.mixin.LookupElement.call(this,e)}getLookupRequest=()=>{let e=this.getValue(),t=$.Deferred();e||t.resolve([]);let n=mw.Title.newFromText(e);return this.api.get({action:"query",formatversion:"2",gaplimit:20,gapnamespace:n?.getNamespaceId()??0,gapprefix:n?.getMainText()??e,generator:"allpages"}).catch(()=>null).then(s=>{if(s?.query?.pages){let o=s.query.pages.map(i=>({data:i.title,label:i.title}));this.emit("showing-values",o),t.resolve(o)}else t.resolve([])}),t.promise({abort(){}})};getLookupCacheDataFromResponse=e=>e??[];getLookupMenuOptionsFromData=e=>e.map(({data:t,label:n})=>new OO.ui.MenuOptionWidget({data:t,label:n}))};Object.assign(v.prototype,OO.ui.mixin.LookupElement.prototype)});var Y={};F(Y,{default:()=>U});var U,K=C(()=>{"use strict";J();V();G();U=class extends E{parsedRequests=[];actionsToTake=[];parseSubtypeRequests(e,t){let n={},s=/:?Category:(.*?)(]]|$)/.exec(t)?.[1].trim();if(!s)return;n.category=s.replaceAll("_"," "),n.examples=[...(/example pages which belong to this category:(.*?)(parent category\/categories:|\n\[\[(special:contributions\/|user:))/is.exec(e)?.[1]??"").matchAll(/\*\s*(?:\[\[)?(.*?)(\||]]|\s*?\n)/g)].map(u=>u[1].trim().replace(/^:/,"").replaceAll("_"," ")).filter(Boolean),n.parents=[...(/parent category\/categories:(.*?)(\n\n|\n\[\[(special:contributions\/|user:))/is.exec(e)?.[1]??"").matchAll(/(?<!\|)#?:?Category:(.*?)(\||]]|\s*?\n)/g)].map(u=>u[1].trim().replace(/^:/,"").replaceAll("_"," ")).filter(Boolean);let o=e.indexOf("[[User:"),i=e.indexOf("[[User talk:"),a=e.indexOf("[[Special:Contributions/"),c=Math.min(...[o,i,a].filter(u=>u!==-1));n.requester=c===Number.POSITIVE_INFINITY?null:c===a?{type:"ip",name:/\[\[Special:Contributions\/(.*?)(\||]])/.exec(e)[1].trim()}:{type:"user",name:/\[\[User(?: talk)?:(.*?)(\||]])/.exec(e)[1].trim()},n.requester?.name||(n.requester=null),this.parsedRequests.push(n),this.actionsToTake.push({category:n.category,examples:n.examples,parents:n.parents,originalText:{fullSectionText:e,sectionText:e.replace(/^==.*?==$/m,"").trim()},action:"none"})}loadSubtypeElements(e){let t=this.parsedRequests[e],n=document.createElement("details");n.classList.add("afcrc-helper-request"),n.addEventListener("click",()=>setTimeout(()=>this.updateSize(),0));let s=document.createElement("summary");s.innerHTML=`<b>Category:${t.category}</b>`,n.append(s);let o=document.createElement("div");o.classList.add("afcrc-helper-request-info");let i=document.createElement("span");i.style.color="dimgray",i.textContent="None";let a=document.createElement("span");a.style.color="dimgray",a.textContent="Unknown";let c=document.createElement("div"),u=document.createElement("b");if(u.textContent="Examples: ",c.append(u),t.examples.length>0)for(let[r,f]of t.examples.entries()){let w=document.createElement("a");w.target="_blank",w.href=mw.util.getUrl(f),w.textContent=f,c.append(w),r!==t.examples.length-1&&c.append(", ")}else c.append(i.cloneNode(!0));o.append(c);let p=document.createElement("div"),d=document.createElement("b");if(d.textContent="Parents: ",p.append(d),t.parents.length>0)for(let[r,f]of t.parents.entries()){let w=document.createElement("a");w.target="_blank",w.href=mw.util.getUrl(`Category:${f}`),w.textContent=f,p.append(w),r!==t.parents.length-1&&p.append(", ")}else p.append(i.cloneNode(!0));o.append(p);let m=document.createElement("div"),T=document.createElement("b");if(T.textContent="Requester: ",m.append(T),t.requester){let r=document.createElement("a");r.target="_blank",r.href=t.requester.type==="user"?mw.util.getUrl(`User:${t.requester.name}`):mw.util.getUrl(`Special:Contributions/${t.requester.name}`),r.textContent=t.requester.name,m.append(r)}else m.append(a.cloneNode(!0));o.append(m),n.append(o),n.append(document.createElement("hr"));let b=document.createElement("div");b.classList.add("afcrc-helper-request-responder");let R=new OO.ui.RadioSelectWidget({classes:["afcrc-helper-action-radio"],items:["Accept","Deny","Comment","Close","None"].map(r=>new OO.ui.RadioOptionWidget({data:r,label:r}))});R.selectItemByLabel("None"),R.on("choose",()=>{setTimeout(()=>this.updateSize(),0);let r=R.findSelectedItem().getData().toLowerCase();if(this.actionsToTake[e].action=r,["comment","close"].includes(r)){j.$element.show();let f=I.getValue().trim();f?this.actionsToTake[e].comment=f:delete this.actionsToTake[e].comment}else j.$element.hide(),delete this.actionsToTake[e].comment;switch(this.updateRequestColor(n,e),L.$element.hide(),P.$element.hide(),M.$element.hide(),D.$element.hide(),r){case"accept":{L.$element.show(),P.$element.show();break}case"deny":{M.$element.show();break}case"close":{D.$element.show();break}}});let g=new v({placeholder:"Add pages here"});g.on("change",()=>{let r=g.getValue();r=r.replace(new RegExp(`^(https?:)?/{2}?${mw.config.get("wgServer").replace(/^\/{2}/,"")}/wiki/`),""),r=r.replace(/^:/,""),r.length>0&&g.setValue(r[0].toUpperCase()+r.slice(1).replaceAll("_"," "))}),g.on("showing-values",r=>{for(let f of r)l.addAllowedValue(f.data)});let l=new OO.ui.TagMultiselectWidget({allowReordering:!1,inputPosition:"outline",inputWidget:g});l.on("change",()=>{let r=l.getValue().sort((f,w)=>f.toLowerCase().localeCompare(w.toLowerCase()));l.getValue().join(";")!==r.join(";")&&l.setValue(r),this.actionsToTake[e].examples=r});let{examples:y}=this.actionsToTake[e];for(let r of y)l.addAllowedValue(r);l.setValue(y);let L=new OO.ui.FieldLayout(l,{align:"inline",label:"Pages to categorize:"});L.$element.hide();let O=new x({placeholder:"Add categories here"});O.on("change",()=>{let r=O.getValue();r=r.replace(new RegExp(`^(https?:)?/{2}?${mw.config.get("wgServer").replace(/^\/{2}/,"")}/wiki/`),""),r=r.replace(/^Category:/,""),r.length>0&&O.setValue(r[0].toUpperCase()+r.slice(1).replaceAll("_"," "))}),O.on("showing-values",r=>{for(let f of r)k.addAllowedValue(f.data)});let k=new OO.ui.TagMultiselectWidget({allowReordering:!1,inputPosition:"outline",inputWidget:O});k.on("change",()=>{let r=k.getValue().sort((f,w)=>f.toLowerCase().localeCompare(w.toLowerCase()));k.getValue().join(";")!==r.join(";")&&k.setValue(r),this.actionsToTake[e].parents=r});let{parents:H}=this.actionsToTake[e];for(let r of H)k.addAllowedValue(r);k.setValue(H);let P=new OO.ui.FieldLayout(k,{align:"inline",label:"Categories:"});P.$element.hide();let A=new OO.ui.ComboBoxInputWidget({classes:["afcrc-closing-reason-input"],placeholder:"autofill:unlikely",options:[["exists","existing categories"],["empty","empty submissions"],["unlikely","categories that are unlikely to have enough pages"],["notcategory","page creation requests"],["notenglish","requests not in English"]].map(([r,f])=>({data:`autofill:${r}`,label:`Autofilled text for ${f}`}))});A.on("change",()=>{this.actionsToTake[e].denyReason=A.getValue()||"autofill:unlikely"}),A.setValue("autofill:unlikely"),A.getMenu().selectItemByData("autofill:unlikely");let M=new OO.ui.FieldLayout(A,{align:"inline",label:"Deny reason:",help:'Supports automatic reasoning, custom reasoning, or a combination of the two with "autofill:REASON, CUSTOM" format'});M.$element.hide();let W=new OO.ui.DropdownWidget({classes:["afcrc-closing-reason-input"],menu:{items:[["No response","r"],["Succeeded","s"],["Withdrawn","w"]].map(([r,f])=>new OO.ui.MenuOptionWidget({data:f,label:r}))}});W.getMenu().on("choose",()=>{let r=W.getMenu().findSelectedItem();this.actionsToTake[e].closingReason={name:r.getLabel(),id:r.getData()},this.updateRequestColor(n,e)}),W.getMenu().selectItemByData("r"),this.actionsToTake[e].closingReason={name:"No response",id:"r"};let D=new OO.ui.FieldLayout(W,{align:"inline",label:"Closing reason:"});D.$element.hide();let I=new OO.ui.TextInputWidget;I.on("change",()=>{let r=I.getValue().trim();r?this.actionsToTake[e].comment=r:delete this.actionsToTake[e].comment});let j=new OO.ui.FieldLayout(I,{classes:["afcrc-comment-input"],align:"inline",label:"Comment:"});j.$element.hide(),b.append(R.$element[0],L.$element[0],P.$element[0],M.$element[0],D.$element[0],j.$element[0]),n.append(b),this.$body.append(n),this.updateSize()}updateRequestColor(e,t){let{action:n}=this.actionsToTake[t],s="";n==="accept"?s="#a0ffa0":n==="deny"?s="#ffcece":n==="close"&&(this.actionsToTake[t].closingReason?.id==="r"?s="#ffcece":this.actionsToTake[t].closingReason?.id==="s"?s="#90c090":s="#b8b8b8"),e.style.backgroundColor=s}async performSubtypeActions(e,t,n){if(this.actionsToTake.some(o=>o.action!=="none")){for(let i of this.actionsToTake){let a={pageText:n,...i.originalText};switch(i.action){case"accept":{a=this.modifySectionData(a,{prepend:"{{AfC-c|a}}",append:`* {{subst:AfC category}} ~~~~
{{AfC-c|b}}`}),this.handleAcceptedCategory(i),t.accepted++;break}case"deny":{a=this.modifySectionData(a,{prepend:"{{AfC-c|d}}",append:`* ${this.formatDeniedReason(i.denyReason)} ~~~~
{{AfC-c|b}}`}),t.denied++;break}case"comment":{i.comment?(a=this.modifySectionData(a,{append:`* {{AfC comment|1=${i.comment}}} ~~~~`}),t["commented on"]++):e.addLogEntry(`The request to create "${i.category}" was marked to be commented on, but no comment was provided so it will be skipped.`,"warning");break}case"close":{a=this.modifySectionData(a,{prepend:`{{AfC-c|${i.closingReason.id}}}`,append:(i.comment?`* {{AfC comment|1=${i.comment}}} ~~~~`:"")+`
{{AfC-c|b}`}),t.closed++;break}}n=a.pageText}if(this.beforeText+this.pageContent===n){e.addLogEntry("No requests have been handled (page content identical)!");return}let o=Object.entries(t).filter(([,i])=>i>0).map(([i,a])=>`${i} ${a}`).join(", ");this.editsCreationsToMake.push({type:"edit",title:this.pageTitle,transform:()=>({text:n,summary:`Handling AfC category requests (${o})${this.scriptMessage}`})}),await this.makeAllEditsCreations(e),e.addLogEntry("All changes made, click below to reload!","success"),e.showReload()}else e.addLogEntry("No requests have been handled!")}handleAcceptedCategory(e){this.editsCreationsToMake.push({type:"create",isRedirect:!1,title:`Category:${e.category}`,text:e.parents.map(t=>`[[Category:${t}]]`).join(`
`),summary:`Creating category as requested at [[WP:AFC/C]]${this.scriptMessage}`},{type:"create",isRedirect:!1,title:`Category talk:${e.category}`,text:`{{WikiProject banner shell|
{{WikiProject Articles for creation|ts={{subst:LOCALTIMESTAMP}}|reviewer=${mw.config.get("wgUserName")}}}
}}`,summary:`Adding [[Wikipedia:WikiProject Articles for creation|WikiProject Articles for creation]] banner${this.scriptMessage}`},...e.examples.map(t=>({type:"edit",title:t,transform:({content:n})=>({text:`${n}
[[Category:${e.category}]]`,summary:`Adding page to [[:Category:${e.category}]] as requested at [[WP:AFC/C]]${this.scriptMessage}`})})))}}});mw.loader.using(["mediawiki.util","oojs-ui-core","oojs-ui-widgets","oojs-ui-windows"],async()=>{let{default:h}=await Promise.resolve().then(()=>(_(),Q)),{default:e}=await Promise.resolve().then(()=>(K(),Y)),t=mw.config.get("wgPageName").replaceAll("_"," "),n=t==="Wikipedia:Articles for creation/Redirects";if(!n&&!(t==="Wikipedia:Articles for creation/Categories"))return;let o=n?"redirect":"category";mw.util.addPortletLink(mw.config.get("skin")==="minerva"?"p-tb":"p-cactions","#",`Handle ${o} creation requests`,"afcrc-helper").addEventListener("click",a=>{a.preventDefault();let c=new OO.ui.WindowManager;document.body.append(c.$element[0]);let u=o==="redirect"?h:e,p=new u(o,t,window.afcrcConfiguration?.createdPageWatchMethod);c.addWindows([p]),p.open(),p.load()})});})();
// </nowiki>
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2NyaXB0cy9hZmNyYy1oZWxwZXIvc2hvdy1hY3Rpb25zLWRpYWxvZy50cyIsICIuLi8uLi9zY3JpcHRzL2FmY3JjLWhlbHBlci9oZWxwZXItZGlhbG9nLnRzIiwgIi4uLy4uL3NjcmlwdHMvYWZjcmMtaGVscGVyL3JlZGlyZWN0LXJlcXVlc3QtaGFuZGxlci50cyIsICIuLi8uLi9zY3JpcHRzL2FmY3JjLWhlbHBlci9yZWRpcmVjdHMtZGlhbG9nLnRzIiwgIi4uLy4uL3NjcmlwdHMvYWZjcmMtaGVscGVyL2NhdGVnb3J5LWlucHV0LXdpZGdldC50cyIsICIuLi8uLi9zY3JpcHRzL2FmY3JjLWhlbHBlci9wYWdlLWlucHV0LXdpZGdldC50cyIsICIuLi8uLi9zY3JpcHRzL2FmY3JjLWhlbHBlci9jYXRlZ29yaWVzLWRpYWxvZy50cyIsICIuLi8uLi9zY3JpcHRzL2FmY3JjLWhlbHBlci9hZmNyYy1oZWxwZXIudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8qKlxuICogQW4gaW5zdGFuY2Ugb2YgdGhpcyBjbGFzcyBpcyBh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XMgeyB0aXRsZTogT08udWkuTGFiZWxXaWRnZXQgfSkudGl0bGUuc2V0TGFiZWwoXG4gICAgICAgICAgICAgICAgICAgIGBhZmNyYy1oZWxwZXIgKGxvYWRpbmcgJHtpbmRleCArIDF9LSR7ZW5kSW5kZXh9LyR7dGhpcy5wYXJzZWRSZXF1ZXN0cy5sZW5ndGh9IHJlcXVlc3RzKWAsXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIGZvciAobGV0IHN1YkluZGV4ID0gaW5kZXg7IHN1YkluZGV4IDwgZW5kSW5kZXg7IHN1YkluZGV4KyspIHRoaXMubG9hZFN1YnR5cGVFbGVtZW50cyhzdWJJbmRleCk7XG5cbiAgICAgICAgICAgICAgICBpZiAoZW5kSW5kZXggPCB0aGlzLnBhcnNlZFJlcXVlc3RzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBpbmRleCA9IGVuZEluZGV4O1xuICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGhhbmRsZSwgMCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgICAgICh0aGlzIGFzIHVua25vd24gYXMgeyB0aXRsZTogT08udWkuTGFiZWxXaWRnZXQgfSkudGl0bGUuc2V0TGFiZWwoXG4gICAgICAgICAgICAgICAgICAgICAgICBgYWZjcmMtaGVscGVyICgke3RoaXMucGFyc2VkUmVxdWVzdHMubGVuZ3RofSByZXF1ZXN0cyBsb2FkZWQpYCxcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGhhbmRsZSgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29uc3QgbWVzc2FnZVdpZGdldCA9IG5ldyBPTy51aS5NZXNzYWdlV2lkZ2V0KHsgdHlwZTogJ25vdGljZScsIGxhYmVsOiAnTm8gdmFsaWQgcmVxdWVzdHMgdG8gaGFuZGxlIScgfSk7XG5cbiAgICAgIC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gICAgICAgc2hvd0FjdGlvbnNEaWFsb2cuYWRkTG9nRW50cnkoJ0NvbnRpbnVpbmcuLi4nLCAnc3VjY2VzcycpO1xuXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IGFwaUZ1bmN0aW9uLmNhdGNoKChlcnJvckNvZGUsIGVycm9ySW5mbykgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0FjdGlvbnNEaWFsb2cuYWRkTG9nRW50cnkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYEVycm9yICR7YWN0aW9uLnR5cGUgPT09ICdlZGl0JyA/ICdlZGl0aW5nJyA6ICdjcmVhdGluZyd9ICR7bGlua0VsZW1lbnQub3V0ZXJIVE1MfTogJHsoZXJyb3JJbmZvIGFzIE1lZGlhV2lraURhdGFFcnJvcik/LmVycm9yLmluZm8gPz8gJ1Vua25vd24gZXJyb3InfSAoJHtlcnJvckNvZGV9KS5gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdlcnJvcicsXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgICAgICAgc2hvd0FjdGlvbnNEaWFsb2cuYWRkTG9nRW50cnkoXG4gICAgICAgICAgICAgICAgICAgICAgICBgRXJyb3IgJHthY3Rpb24udHlwZSA9PT0gJ2VkaXQnID8gJ2VkaXRpbmcnIDogJ2NyZWF0aW5nJ30gJHtsaW5rRWxlbWVudC5vdXRlckhUTUx9OiAkeyhlcnJvckluZm8gYXMgTWVkaWFXaWtpRGF0YUVycm9yKT8uZXJyb3IuaW5mbyA/PyAnVW5rbm93biBlcnJvcid9ICgke2Vycm9yQ29kZX0pLmAsXG4gICAgICAgICAgICAgICAgICAgICAgICAnZXJyb3InLFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBlc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y50ZW1wbGF0ZVBhcmFtZXRlcnNFZGl0b3IpIHRoaXMubG9hZFRhZ1NlbGVjdEFuZFBhcmFtZXRlcnNFZGl0b3IoKTtcblxuICAgICAgICAgICAgICAgIHRoaXMudGFnU2VsZWN0TGF5b3V0IS4kZWxlbWVudC5zaG93KCk7XG4gICAgICAgICAgICAgICAgdGhpcy50ZW1wbGF0ZVBhcmFtZXRlcnNFZGl0b3IhLnN0eWxlLmRpc3BsYXkgPSAnYmxvY2snO1xuXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlICdkZW55Jzoge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5kZW55UmVhc29uTGF5b3V0KSB0aGlzLmxvYWREZW55UmVhc29uTGF5b3V0KCk7XG5cbiAgICAgICAgICAgICAgICB0aGlzLmRlbnlSZWFzb25MYXlvdXQhLiRlbGVtZW50LnNob3coKTtcblxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSAnY2xvc2UnOiB7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLmNsb3NpbmdSZWFzb25MYXlvdXQpIHRoaXMubG9hZENsb3NpbmdSZWFzb25MYXlvdXQoKTtcblxuICAgICAgICAgICAgICAgIHRoaXMuY2xvc2luZ1JlYXNvbkxheW91dCEuJGVsZW1lbnQuc2hvdygpO1xuXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoWydhY2NlcHQnLCAnY29tbWVudCcsICdjbG9zZSddLmluY2x1ZGVzKG9wdGlvbikpIHtcbiAgICAgICAgICAgIHRoaXMuY29tbWVudExheW91dC4kZWxlbWVudC5zaG93KCk7XG5cbiAgICAgICAgICAgIGNvbnN0IGNvbW1lbnQgPSB0aGlzLmNvbW1lbnRJbnB1dC5nZXRWYWx1ZSgpLnRyaW0oKTtcblxuICAgIC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XRlUGFyYW1ldGVyc0VkaXRvcik7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogTG9hZHMgdGhlIGRlbnkgcmVhc29uIGxheW91dC5cbiAgICAgKi9cbiAgICBwcml2YXRlIGxvYWREZW55UmVhc29uTGF5b3V0KCkge1xuICAgICAgICBjb25zdCBkZW55UmVhc29uSW5wdXQgPSBuZXcgT08udWkuQ29tYm9Cb3hJbnB1dFdpZGdldCh7XG4gICAgICAgICAgICBjbGFzc2VzOiBbJ2FmY3JjLWNsb3NpbmctcmVhc29uLWlucHV0J10sXG4gICAgICAgICAgICBwbGFjZWhvbGRlcjogJ2F1dG9maWxsOnVubGlrZWx5JyxcbiAgICAgICAgICAgIG9wdGlvbnM6IFtcbiAgICAgICAgICAgICAgICBbJ2V4aXN0cycsICdleGlzdGluZyBwYWdlcyddLFxuICAgICAgICAgICAgICAgIFsnZW1wdHknLCAnZW1wdHkgc3VibWlzc2lvbnMnXSxcbiAgICAgICAgICAgICAgICBbJ25vdGFyZ2V0JywgJ25vbmV4aXN0ZW50IG9yIG5vIHByb3ZpZGVkIHRhcmdldCddLFxuICAgICAgICAgICAgICAgIFsnbm90aXRsZScsICdubyB0aXRsZSBwcm92aWRlZCddLFxuICAgICAgICAgICAgICAgIFsndW5saWtlbHknLCAndW5saWtlbHkgcmVkaXJlY3RzJ10sXG4gICAgICAgICAgICAgICAgWyd1bnJlbGF0ZWQnLCAnYXBwYXJlbnRseSB1bnJlbGF0ZWQgdGl0bGVzJ10sXG4gICAgICAgICAgICAgICAgWydub3RyZWRpcmVjdCcsICdhcnRpY2xlIGNyZWF0aW9uIHJlcXVlc3RzJ10sXG4gICAgICAgICAgICAgICAgWydleHRlcm5hbGxpbmsnLCAnZXh0ZXJuYWwgbGluayByZWRpcmVjdHMnXSxcbiAgICAgICAgICAgICAgICBbJ2VkaXRyZXF1ZXN0JywgJ2VkaXQgcmVxdWVzdHMnXSxcbiAgICAgICAgICAgICAgICBbJ25vdGVuZ2xpc2gnL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mZXJlbmNlcyBcXC8+fFxcblxcbikvaXMuZXhlYyhzZWN0aW9uVGV4dCk/LlsxXS50cmltKCkgPz8gJyc7XG5cbiAgICAgICAgY29uc3QgcmVxdWVzdGVyID0gc2VjdGlvblRleHRcbiAgICAgICAgICAgIC5tYXRjaChcbiAgICAgICAgICAgICAgICBzZWN0aW9uVGV4dC5pbmNsdWRlcygnPHJlZmVyZW5jZXMgLz4nKVxuICAgICAgICAgICAgICAgICAgICA/IC88cmVmZXJlbmNlcyBcXC8+XFxuKyguKikvXG4gICAgICAgICAgICAgICAgICAgIDogbmV3IFJlZ0V4cChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgYCg/OjxyZWZlcmVuY2VzIFxcXFwvPiR7cGFyc2VkRGF0YS5zb3VyY2UgPyBgfCR7cGFyc2VkRGF0YS5zb3VyY2UucmVwbGFjZUFsbCgvW1xccyMkKCkqKywuP1tcXFxcXFxdXnt8fS1dL2csICdcXFxcJCYnKX1gIDogJyd9KVxcbisoLiopYCxcbiAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKT8uWzFdXG4gICAgICAgICAgICAudHJpbSgpO1xuXG4gICAgICAgIGNvbnN0IG5hbWUgPSByZXF1ZXN0ZXIgPyAvKD86U3BlY2lhbDpDb250cmlidXRpb25zXFwvfFVzZXIoPzogdGFsayk/OikoLio/KVxcfC8uZXhlYyhyZXF1ZXN0ZXIpPy5bMV0udHJpbSgpIDogbnVsbDtcblxuICAgICAgICBwYXJzZWREYXRhLnJlcXVlc3RlciA9IHJlcXVlc3RlciAmJiBuYW1lID8geyB0eXBlOiAvXFxbXFxbVXNlciggdGFsayk/Oi8udGVzdChyZXF1ZXN0ZXIpID8gJ3VzZXInIDogJ2lwJywgbmFtZSB9IDogbnVsbDtcblxuICAgICAgICB0aGlzLnBhcnNlZFJlcXVlc3RzLnB1c2gocGFyc2VkRGF0YSk7XG5cbiAgICAgICAgdGhpcy5hY3Rpb25zVG9UYWtlLnB1c2goe1xuICAgICAgICAgICAgdGFyZ2V0OiBwYXJzZWREYXRhLnRhcmdldCxcbiAgICAgICAgICAgIHJlcXVlc3RzOiBPYmplY3QuZnJvbUVudHJpZXMoXG4gICAgICAgICAgICAgICAgcmVxdWVzdGVkUGFnZXMubWFwKChwYWdlKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgIHBhZ2UsXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9yaWdpbmFsVGV4dDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bGxTZWN0aW9uVGV4dDogc2VjdGlvblRleHQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VjdGlvblRleHQ6IHNlY3Rpb25UZXh0LnJlcGxhY2UoL149PS4qPz09JC9tLCAnJykudHJpbSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbjogJ25vbmUnLFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogTG9hZHMgYSBnaXZlbiByZWRpcmVjdCByZXF1ZXN0IGludG8gdGhlIGRpYWxvZy5cbiAgICAgKiBAcGFyYW0gaW5kZXggVGhlIGluZGV4IG9mIHRoZSByZXF1ZXN0IHRvIGxvYWQuXG4gICAgICovXG4gICAgcHJvdGVjdGVkIGxvYWRTdWJ0eXBlRWxlbWVudHMoaW5kZXg6IG51bWJlcikge1xuICAgICAgICBjb25zdCByZXF1ZXN0ID0gdGhpcy5wYXJzZWRSZXF1ZXN0c1tpbmRleF07XG5cbiAgICAgICAgY29uc3QgZGV0YWlsc0VsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkZXRhaWxzJyk7XG4gICAgICAgIGRldGFpbHNFbGVtZW50LmNsYXNzTGlzdC5hZGQoJ2Fm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ICAgICAgICAgICAgICAgICAgaWYgKHNvbWVSZXF1ZXN0QWNjZXB0ZWREZW5pZWQgJiYgIWFsbFJlcXVlc3RzQWNjZXB0ZWREZW5pZWQpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3dBY3Rpb25zRGlhbG9nLmFkZExvZ0VudHJ5KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYE5vdCBhbGwgcmVxdWVzdHMgdG8gXCIke3RhcmdldH1cIiB3ZXJlIGFjY2VwdGVkIG9yIGRlbmllZCwgdGhlIGhhbmRsaW5nIG9mIFwiJHtyZXF1ZXN0ZWRUaXRsZX1cIiB3aWxsIGJlIGlnbm9yZWQuYCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd3YXJuaW5nJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNjZXB0ZWRQYWdlcy5wdXNoKHJlcXVlc3RlZFRpdGxlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFjdGlvbi5jb21tZW50KSBjb21tZW50cy5wdXNoKFtyZXF1ZXN0ZWRUaXRsZSwgYWN0aW9uLmNvbW1lbnRdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnRzLmFjY2VwdGVkKys7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdkZW55Jzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzb21lUmVxdWVzdEFjY2VwdGVkRGVuaWVkICYmICFhbGxSZXF1ZXN0c0FjY2VwdGVkRGVuaWVkKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93QWN0aW9uc0RpYWxvZy5hZGRMb2dFbnRyeShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGBOb3QgYWxsIHJlcXVlc3RzIHRvIFwiJHt0YXJnZXR9XCIgd2VyZSBhY2NlcHRlZCBvciBkZW5pZWQsIHRoZSBoYW5kbGluZyBvZiBcIiR7cmVxdWVzdGVkVGl0bGV9XCIgaXMgYmVpbmcgaWdub3JlZC5gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3dhcm5pbmcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZW5pZWRQYWdlcy5wdXNoKFtyZXF1ZXN0ZWRUaXRsZSwgYWN0aW9uLmRlbnlSZWFzb24hXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50cy5kZW5pZWQrKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2NvbW1lbnQnOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFjdGlvbi5jb21tZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbW1lbnRzLnB1c2goW3JlcXVlc3RlZFRpdGxlLCBhY3Rpb24uY29tbWVudF0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudHNbJ2NvbW1lbnRlZCBvbiddKys7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3dBY3Rpb25zRGlhbG9nLmFkZExvZ0VudHJ5KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYFRoZSByZXF1ZXN0IHRvIGNyZWF0ZSBcIiR7cmVxdWVzdGVkVGl0bGV9XCIgXHUyMTkyIFwiJHt0YXJnZXR9XCIgd2FzIG1hcmtlZCB0byBiZSBjb21tZW50ZWQgb24sIGJ1dCBubyBjb21tZW50IHdhcyBwcm92aWRlZCBzbyBpdCB3aWxsIGJlIHNraXBwZWQuYCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd3YXJuaW5nJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnY2xvc2UnOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFsbFJlcXVlc3RzQ2xvc2VkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhY3Rpb24uY29tbWVudCkgY29tbWVudHMucHVzaChbcmVxdWVzdGVkVGl0bGUsIGFjdGlvbi5jb21tZW50XSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50cy5jbG9zZWQrKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0FjdGlvbnNEaWFsb2cuYWRkTG9nRW50cnkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgTm90IGFsbCByZXF1ZXN0cyB0byBcIiR7dGFyZ2V0fVwiIHdlcmUgY2xvc2VkIHdpdGggdGhlIHNhbWUgcmVhc29uLCB0aGUgaGFuZGxpbmcgb2YgXCIke3JlcXVlc3RlZFRpdGxlfVwiIGlzIGJlaW5nIGlnbm9yZWQuYCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd3YXJuaW5nJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbGV0IHNlY3Rpb25EYXRhID0geyBwYWdlVGV4dDogbmV3UGFnZVRleHQsIC4uLk9iamVjdC52YWx1ZXMocmVxdWVzdHMpWzBdLm9yaWdpbmFsVGV4dCB9O1xuXG4gICAgICAgICAgICAgICAgaWYgKGNvbW1lbnRzLmxlbmd0aCA+IDApXG4gICAgICAgICAgICAgICAgICAgIHNlY3Rpb25EYXRhID0gdGhpcy5tb2RpZnlTZWN0aW9uRGF0YShzZWN0aW9uRGF0YSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXBwZW5kOiB0aGlzLm1hcENvbW1lbnRzKGNvbW1lbnRzLCBhbW91bnRPZlBhZ2VzID09PSAxLCBjb21tZW50cy5sZW5ndGggPT09IGFtb3VudE9mUGFnZXMpLFxuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGlmIChhbGxSZXF1ZXN0c0FjY2VwdGVkRGVuaWVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBjbG9zaW5nSWQ6IHN0cmluZztcblxuICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXB0ZWRQYWdlcy5sZW5ndGggPiAwICYmIGRlbmllZFBhZ2VzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsb3NpbmdJZCA9ICdwJztcblxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYWNjZXB0ZWRQYWdlc01lc3NhZ2UgPSBgKiB7e3N1YnN0OkFmQyByZWRpcmVjdH19ICgke2FjY2VwdGVkUGFnZXMubWFwKChwYWdlKSA9PiBgW1ske3BhZ2V9XV1gKS5qb2luKCcsICcpfSkg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fn5+YCxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xvc2luZ0lkID0gJ2QnO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWN0aW9uRGF0YSA9IHRoaXMubW9kaWZ5U2VjdGlvbkRhdGEoc2VjdGlvbkRhdGEsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBlbmQ6IHRoaXMubWFwRGVuaWVkUmVhc29ucyhkZW5pZWRQYWdlcywgYW1vdW50T2ZQYWdlcyA9PT0gMSwgdHJ1ZSksXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHNlY3Rpb25EYXRhID0gdGhpcy5tb2RpZnlTZWN0aW9uRGF0YShzZWN0aW9uRGF0YSwgeyBwcmVwZW5kOiBge3tBZkMtY3wke2Nsb3NpbmdJZH19fWAsIGFwcGVuZDogJ3t7QWZDLWN8Yn19JyB9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGFsbFJlcXVlc3RzQ2xvc2VkKVxuICAgICAgICAgICAgICAgICAgICBzZWN0aW9uRGF0YSA9IHRoaXMubW9kaWZ5U2VjdGlvbkRhdGEoc2VjdGlvbkRhdGEsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByZXBlbmQ6IGB7e0FmQy1jfCR7Zmlyc3RDbG9zZVJlYXNvbn19fWAsXG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBlbmQ6ICd7e0FmQy1jfGJ9fScsXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgbmV3UGFnZVRleHQgPSBzZWN0aW9uRGF0YS5wYWdlVGV4dDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMuYmVmb3JlVGV4dCArIHRoaXMucGFnZUNvbnRlbnQgPT09IG5ld1BhZ2VUZXh0KSB7XG4gICAgICAgICAgICAgICAgc2hvd0FjdGlvbnNEaWFsb2cuYWRkTG9nRW50cnkoJ05vIHJlcXVlc3RzIGhhdmUgYmVlbiBoYW5kbGVkIChwYWdlIGNvbnRlbnQgaWRlbnRpY2FsKSEnKTtcblxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgbWFwcGVkQ291bnRzID0gT2JqZWN0LmVudHJpZXMoY291bnRzKVxuICAgICAgICAgICAgICAgIC5maWx0ZXIoKFssIGNvdW50XSkgPT4gY291bnQgPiAwKVxuICAgICAgICAgICAgICAgIC5tYXAoKFthY3Rpb24sIGNvdW50XSkgPT4gYCR7YWN0aW9ufSAke2NvdW50fWApXG4gICAgICAgICAgICAgICAgLmpvaW4oJywgJyk7XG5cbiAgICAgICAgICAgIHRoaXMuZWRpdHNDcmVhdGlvbnNUb01ha2UucHVzaCh7XG4gICAgICAgICAgICAgICAgdHlwZTogJ2VkaXQnLFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aGlzLnBhZ2VUaXRsZSxcbiAgICAgICAgICAgICAgICB0cmFuc2Zvcm06ICgpID0+ICh7XG4gICAgICAgICAgICAgICAgICAgIHRleHQ6IG5ld1BhZ2VUZXh0LFxuICAgICAgICAgICAgICAgICAgICBzdW1tYXJ5OiBgSGFuZGxpbmcgQWZDIHJlZGlyZWN0IHJlcXVlc3RzICgke21hcHBlZENvdW50c30pJHt0aGlzLnNjcmlwdE1lc3NhZ2V9YCxcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBhd2FpdCB0aGlzLm1ha2VBbGxFZGl0c0NyZWF0aW9ucyhzaG93QWN0aW9uc0RpYWxvZyk7XG5cbiAgICAgICAgICAgIHNob3dBY3Rpb25zRGlhbG9nLmFkZExvZ0VudHJ5KCdBbGwgY2hhbmdlcyBtYWRlLC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uICAgICAgICAgICAgICAgICAgICAgIGlmICghZm91bmRBcmd1bWVudEVkaXRvcikgcmV0dXJuIGB7eyR7dGFnfX19YDtcblxuICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGxhc3ROdW1iZXJQYXJhbWV0ZXJJbmRleCA9IGZvdW5kQXJndW1lbnRFZGl0b3IucGFyYW1ldGVycy5maW5kTGFzdEluZGV4KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAocGFyYW1ldGVyLCBpbmRleCkgPT4gcGFyYW1ldGVyLm5hbWUgPT09IChpbmRleCArIDEpLnRvU3RyaW5nKCkgJiYgcGFyYW1ldGVyLmVkaXRvci5nZXRWYWx1ZSgpLnRyaW0oKSxcbiAgICAgICAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgICAgICAgY29uc3QgbWFwcGVkQXJndW1lbnRzID0gZm91bmRBcmd1bWVudEVkaXRvci5wYXJhbWV0ZXJzXG4gICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoKHBhcmFtZXRlciwgaW5kZXgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gcGFyYW1ldGVyLmVkaXRvci5nZXRWYWx1ZSgpLnRyaW0oKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghdmFsdWUgJiYgaW5kZXggPiBsYXN0TnVtYmVyUGFyYW1ldGVySW5kZXgpIHJldHVybiBudWxsO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYHwke3BhcmFtZXRlci5uYW1lID09PSAoaW5kZXggKyAxKS50b1N0cmluZygpID8gJycgOiBgJHtwYXJhbWV0ZXIubmFtZX09YH0ke3ZhbHVlfWA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoQm9vbGVhbilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgLmpvaW4oJycpO1x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BhZ2VzXG4gICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwYWdlKSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAhcGFnZS5jYXRlZ29yaWVzPy5zb21lKChjYXRlZ29yeSkgPT4gY2F0ZWdvcnkudGl0bGUgPT09ICdDYXRlZ29yeTpXaWtpcGVkaWEgc29mdCByZWRpcmVjdGVkIGNhdGVnb3JpZXMnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoKHBhZ2UpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB0aXRsZVdpdGhvdXROYW1lc3BhY2UgPSBwYWdlLnRpdGxlLnNwbGl0KCc6JylbMV07XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBkYXRhOiB0aXRsZVdpdGhvdXROYW1lc3BhY2UsIGxhYmVsOiB0aXRsZVdpdGhvdXROYW1lc3BhY2UgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZW1pdCgnc2hvd2luZy12YWx1ZXMnLCBwYWdlcyk7XG5cbiAgICAgICAgICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShwYWdlcyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGRlZmVycmVkLnJlc29sdmUoW10pO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIGRlZmVycmVkLnByb21pc2UoeyBhYm9ydCgpIHt9IH0pOyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1lbXB0eS1mdW5jdGlvblxuICAgIH07XG5cbiAgICBnZXRMb29rdXBDYWNoZURhdGFGcm9tUmVzcG9uc2UgPSA8VD4ocmVzcG9uc2U6IFRbXSB8IG51bGwgfCB1b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QudGV4dENvbnRlbnQgPSAnTm9uZSc7XG5cbiAgICAgICAgY29uc3QgdW5rbm93bkVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzcGFuJyk7XG4gICAgICAgIHVua25vd25FbGVtZW50LnN0eWxlLmNvbG9yID0gJ2RpbWdyYXknO1xuICAgICAgICB1bmtub3duRWxlbWVudC50ZXh0Q29udGVudCA9ICdVbmtub3duJztcblxuICAgICAgICBjb25zdCBleGFtcGxlc0RpdiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpO1xuXG4gICAgICAgIGNvbnN0IGV4YW1wbGVzTGFiZWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdiJyk7XG4gICAgICAgIGV4YW1wbGVzTGFiZWwudGV4dENvbnRlbnQgPSAnRXhhbXBsZXM6ICc7XG4gICAgICAgIGV4YW1wbGVzRGl2LmFwcGVuZChleGFtcGxlc0xhYmVsKTtcblxuICAgICAgICBpZiAocmVxdWVzdC5leGFtcGxlcy5sZW5ndGggPiAwKVxuICAgICAgICAgICAgZm9yIChjb25zdCBbaW5kZXgsIGV4YW1wbGVdIG9mIHJlcXVlc3QuZXhhbXBsZXMuZW50cmllcygpKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgbGlua0VsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdhJyk7XG4gICAgICAgICAgICAgICAgbGlua0VsZW1lbnQudGFyZ2V0ID0gJ19ibGFuayc7XG4gICAgICAgICAgICAgICAgbGlua0VsZW1lbnQuaHJlZiA9IG13LnV0aWwuZ2V0VXJsKGV4YW1wbGUpO1xuICAgICAgICAgICAgICAgIGxpbmtFbGVtZW50LnRleHRDb250ZW50ID0gZXhhbXBsZTtcblxuICAgICAgICAgICAgICAgIGV4YW1wbGVzRGl2LmFwcGVuZChsaW5rRWxlbWVudCk7XG5cbiAgICAgICAgICAgICAgICBpZiAoaW5kZXggIT09IHJlcXVlc3QuZXhh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Nob29zZScsICgpID0+IHtcbiAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4gdGhpcy51cGRhdGVTaXplKCksIDApO1xuXG4gICAgICAgICAgICBjb25zdCBvcHRpb24gPSAoXG4gICAgICAgICAgICAgICAgKGFjdGlvblJhZGlvSW5wdXQuZmluZFNlbGVjdGVkSXRlbSgpIGFzIE9PLnVpLlJhZGlvT3B0aW9uV2lkZ2V0KS5nZXREYXRhKCkgYXMgc3RyaW5nXG4gICAgICAgICAgICApLnRvTG93ZXJDYXNlKCkgYXMgUmVxdWVzdEFjdGlvblR5cGU7XG5cbiAgICAgICAgICAgIHRoaXMuYWN0aW9uc1RvVGFrZVtpbmRleF0uYWN0aW9uID0gb3B0aW9uO1xuXG4gICAgICAgICAgICBpZiAoWydjb21tZW50JywgJ2Nsb3NlJ10uaW5jbHVkZXMob3B0aW9uKSkge1xuICAgICAgICAgICAgICAgIGNvbW1lbnRJbnB1dExheW91dC4kZWxlbWVudC5zaG93KCk7XG5cbiAgICAgICAgICAgICAgICBjb25zdCBjb21tZW50ID0gY29tbWVudElucHV0LmdldFZhbHVlKCkudHJpbSgpO1xuICAgICAgICAgICAgICAgIGlmIChjb21tZW50KSB0aGlzLmFjdGlvbnNUb1Rha2VbaW5kZXhdLmNvbW1lbnQgPSBjb21tZW50O1xuICAgICAgICAgICAgICAgIGVsc2UgZGVsZXRlIHRoaXMuYWN0aW9uc1RvVGFrZVtpbmRleF0uY29tbWVudDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29tbWVudElucHV0TGF5b3V0LiRlbGVtZW50LmhpZGUoKTtcblxuICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLmFjdGlvbnNUb1Rha2VbaW5kZXhdLmNvbW1lbnQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMudXBkYXRlUmVxdWVzdENvbG9yKGRldGFpbHNFbGVtZW50LCBpbmRleCk7XG5cbiAgICAgICAgICAgIHBhZ2VTZWxlY3RMYXlvdXQuJGVsZW1lbnQuaGlkZSgpO1xuICAgICAgICAgICAgY2F0ZWdvcnlTZWxlY3RMYXlvdXQuJGVsZW1lbnQuaGlkZSgpO1xuICAgICAgICAgICAgZGVueVJlYXNvbkxheW91dC4kZWxlbWVudC5oaWRlKCk7XG4gICAgICAgICAgICBjbG9zaW5nUmVhc29uTGF5b3V0LiRlbGVtZW50LmhpZGUoKTtcblxuICAgICAgICAgICAgc3dpdGNoIChvcHRpb24pIHtcbiAgICAgICAgICAgICAgICBjYXNlICdhY2NlcHQnOiB7XG4gICAgICAgICAgICAgICAgICAgIHBhZ2VTZWxlY3RMYXlvdXQuJGVsZW1lbnQuc2hvdygpO1xuICAgICAgICAgICAgICAgICAgICBjYXRlZ29yeVNlbGVjdExheW91dC4kZWxlbWVudC5zaG93KCk7XG5cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNhc2UgJ2RlbnknOiB7XG4gICAgICAgICAgICAgICAgICAgIGRlbnlSZWFzb25MYXlvdXQuJGVsZW1lbnQuc2hvdygpO1xuXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYXNlICdjbG9zZSc6IHtcbiAgICAgICAgICAgICAgICAgICAgY2xvc2luZ1JlYXNvbkxheW91dC4kZWxlbWVudC5zaG93KCk7XG5cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBjb25zdCBwYWdlU2VsZWN0SW5wdXQgPSBuZXcgUGFnZUlucHV0V2lkZ2V0KHsgcGxhY2Vob2xkZXI6ICdBZGQgcGFnZXMgaGVyZScgfSk7XG4gICAgICAgIHBhZ2VTZWxlY3RJbnB1dC5vbignY2hhbmdlJywgKCkgPT4ge1xuICAgICAg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AgbGFiZWw6ICdEZW55IHJlYXNvbjonLFxuICAgICAgICAgICAgaGVscDogJ1N1cHBvcnRzIGF1dG9tYXRpYyByZWFzb25pbmcsIGN1c3RvbSByZWFzb25pbmcsIG9yIGEgY29tYmluYXRpb24gb2YgdGhlIHR3byB3aXRoIFwiYXV0b2ZpbGw6UkVBU09OLCBDVVNUT01cIiBmb3JtYXQnLFxuICAgICAgICB9KTtcbiAgICAgICAgZGVueVJlYXNvbkxheW91dC4kZWxlbWVudC5oaWRlKCk7XG5cbiAgICAgICAgY29uc3QgY2xvc2luZ1JlYXNvbiA9IG5ldyBPTy51aS5Ecm9wZG93bldpZGdldCh7XG4gICAgICAgICAgICBjbGFzc2VzOiBbJ2FmY3JjLWNsb3NpbmctcmVhc29uLWlucHV0J10sXG4gICAgICAgICAgICBtZW51OiB7XG4gICAgICAgICAgICAgICAgaXRlbXM6IFtcbiAgICAgICAgICAgICAgICAgICAgWydObyByZXNwb25zZScsICdyJ10sXG4gICAgICAgICAgICAgICAgICAgIFsnU3VjY2VlZGVkJywgJ3MnXSxcbiAgICAgICAgICAgICAgICAgICAgWydXaXRoZHJhd24nLCAndyddLFxuICAgICAgICAgICAgICAgIF0ubWFwKChbdGl0bGUsIGlkXSkgPT4gbmV3IE9PLnVpLk1lbnVPcHRpb25XaWRnZXQoeyBkYXRhOiBpZCwgbGFiZWw6IHRpdGxlIH0pKSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgIH0pO1xuICAgICAgICBjbG9zaW5nUmVhc29uLmdldE1lbnUoKS5vbignY2hvb3NlJywgKCkgPT4ge1xuICAgICAgICAgICAgY29uc3Qgc2VsZWN0ZWQgPSBjbG9zaW5nUmVhc29uLmdldE1lbnUoKS5maW5kU2VsZWN0ZWRJdGVtKCkgYXMgT08udWkuTWVudU9wdGlvbldpZGdldDtcblxuICAgICAgICAgICAgdGhpcy5hY3Rpb25zVG9UYWtlW2luZGV4XS5jbG9zaW5nUmVhc29uID0ge1xuICAgICAgICAgICAg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B1dExheW91dCA9IG5ldyBPTy51aS5GaWVsZExheW91dChjb21tZW50SW5wdXQsIHtcbiAgICAgICAgICAgIGNsYXNzZXM6IFsnYWZjcmMtY29tbWVudC1pbnB1dCddLFxuICAgICAgICAgICAgYWxpZ246ICdpbmxpbmUnLFxuICAgICAgICAgICAgbGFiZWw6ICdDb21tZW50OicsXG4gICAgICAgIH0pO1xuICAgICAgICBjb21tZW50SW5wdXRMYXlvdXQuJGVsZW1lbnQuaGlkZSgpO1xuXG4gICAgICAgIHJlcXVlc3RSZXNwb25kZXJFbGVtZW50LmFwcGVuZChcbiAgICAgICAgICAgIGFjdGlvblJhZGlvSW5wdXQuJGVsZW1lbnRbMF0sXG4gICAgICAgICAgICBwYWdlU2VsZWN0TGF5b3V0LiRlbGVtZW50WzBdLFxuICAgICAgICAgICAgY2F0ZWdvcnlTZWxlY3RMYXlvdXQuJGVsZW1lbnRbMF0sXG4gICAgICAgICAgICBkZW55UmVhc29uTGF5b3V0LiRlbGVtZW50WzBdLFxuICAgICAgICAgICAgY2xvc2luZ1JlYXNvbkxheW91dC4kZWxlbWVudFswXSxcbiAgICAgICAgICAgIGNvbW1lbnRJbnB1dExheW91dC4kZWxlbWVudFswXSxcbiAgICAgICAgKTtcblxuICAgICAgICBkZXRhaWxzRWxlbWVudC5hcHBlbmQocmVxdWVzdFJlc3BvbmRlckVsZW1lbnQpO1xuXG4gICAgICAgICh0aGlzIGFzIHVua25vd24gYXMgeyAkYm9keTogSlF1ZXJ5IH0pLiRib2R5LmFwcGVuZChkZXRhaWxzRWxlbWVudCk7XG5cbiAgICAgICAgdGhpcy51cGRhdGVTaXplKCk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVXBkYXRlcyB0aGUgY29sb3Igb2YgYSBkZXRhaWxzIGVsZW1lbnQgYmFzZWQgb24gdGhlIGhhbmRsaW5nIG9mIHRoZSByZXF1ZXN0cyBpbnNpZGUuXG4gICAgICogQHBhcmFtIGRldGFpbHNFbGVtZW50IFR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EYXRhID0gdGhpcy5tb2RpZnlTZWN0aW9uRGF0YShzZWN0aW9uRGF0YSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXBlbmQ6ICd7e0FmQy1jfGF9fScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBwZW5kOiAnKiB7e3N1YnN0OkFmQyBjYXRlZ29yeX19IH5+fn5cXG57e0FmQy1jfGJ9fScsXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVBY2NlcHRlZENhdGVnb3J5KGFjdGlvbkRhdGEpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb3VudHMuYWNjZXB0ZWQrKztcblxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnZGVueSc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlY3Rpb25EYXRhID0gdGhpcy5tb2RpZnlTZWN0aW9uRGF0YShzZWN0aW9uRGF0YSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXBlbmQ6ICd7e0FmQy1jfGR9fScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBwZW5kOiBgKiAke3RoaXMuZm9ybWF0RGVuaWVkUmVhc29uKGFjdGlvbkRhdGEuZGVueVJlYXNvbiEpfSB+fn5+XFxue3tBZkMtY3xifX1gLFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50cy5kZW5pZWQrKztcblxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnY29tbWVudCc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhY3Rpb25EYXRhLmNvbW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWN0aW9uRGF0YSA9IHRoaXMubW9kaWZ5U2VjdGlvbkRhdGEoc2VjdGlvbkRhdGEsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBwZW5kOiBgKiB7e0FmQyBjb21tZW50fDE9JHthY3Rpb25EYXRhLmNvbW1lbnR9fX0gfn5+fmAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudHNbJ2NvbW1lbnRlZCBvbiddKys7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93QWN0aW9uc0RpYWxvZy5hZGRMb2dFbnRyeShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYFRoZSByZXF1ZXN0IHRvIGNyZWF0ZSBcIiR7YWN0aW9uRGF0YS5jYXRlZ29yeX1cIiB3YXMgbWFya2VkIHRvIGJlIGNvbW1lbnRlZCBvbiwgYnV0IG5vIGNvbW1lbnQgd2FzIHByb3ZpZGVkIHNvIGl0IHdpbGwgYmUgc2tpcHBlZC5gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnd2FybmluZycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnY2xvc2UnOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWN0aW9uRGF0YSA9IHRoaXMubW9kaWZ5U2VjdGlvbkRhdGEoc2VjdGlvbkRhdGEsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVwZW5kOiBge3tBZkMtY3wke2FjdGlvbkRhdGEuY2xvc2luZ1JlYXNvbiEuaWR9fX1gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGVuZDogKGFjdGlvbkRhdGEuY29tbWVudCA/IGAqIHt7QWZDIGNvbW1lbnR8MT0ke2FjdGlvbkRhdGEuY29tbWVudH19fSB+fn5+YCA6ICcnKSArICdcXG57e0FmQy1jfGJ9JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb3VudHMuY2xvc2VkKys7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbmV3UGFnZVRleHQgPSBzZWN0aW9uRGF0YS5wYWdlVGV4dDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMuYmVmb3JlVGV4dCArIHRoaXMucGFnZUNvbnRlbnQgPT09IG5ld1BhZ2VUZXh0KSB7XG4gICAgICAgICAgICAgICAgc2hvd0FjdGlvbnNEaWFsb2cuYWRkTG9nRW50cnkoJ05vIHJlcXVlc3RzIGhhdmUgYmVlbiBoYW5kbGVkIChwYWdlIGNvbnRlbnQgaWRlbnRpY2FsKSEnKTtcblxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgbWFwcGVkQ291bnRzID0gT2JqZWN0LmVudHJpZXMoY291bnRzKVxuICAgICAgICAgICAgICAgIC5maWx0ZXIoKFssIGNvdW50XSkgPT4gY291bnQgPiAwKVxuICAgICAgICAgICAgICAgIC5tYXAoKFthY3Rpb24sIGNvdW50XSkgPT4gYCR7YWN0aW9ufSAke2NvdW50fWApXG4gICAgICAgICAgICAgICAgLmpvaW4oJywgJyk7XG5cbiAgICAgICAgICAgIHRoaXMuZWRpdHNDcmVhdGlvbnNUb01ha2UucHVzaCh7XG4gICAgICAgICAgICAgICAgdHlwZTogJ2VkaXQnLFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aGlzLnBhZ2VUa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