Jump to content

User:Eejit43/scripts/afcrc-helper.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// <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 L,B=C(()=>{"use strict";L=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(L.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 L;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.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)s[a]||(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)s[a]||(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"],["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.setValue("autofill:unlikely"),e.getMenu().selectItemByData("autofill:unlikely"),e.on("change",t=>{this.updateActionsToTake({denyReason:t||"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.updateActionsToTake({closingReason:{name:"No response",id:"r"}}),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)].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(", ")}) ~~~~`,q=this.mapDeniedReasons(T,!1,!1);for(let O of m)this.handleAcceptedRedirect(O,a[O],i);g=this.modifySectionData(g,{append:`${y}
${q}`})}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)return e.addLogEntry("No requests have been handled (page content identical)!");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),q.$element.hide(),P.$element.hide(),M.$element.hide(),W.$element.hide(),r){case"accept":{q.$element.show(),P.$element.show();break}case"deny":{M.$element.show();break}case"close":{W.$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 q=new OO.ui.FieldLayout(l,{align:"inline",label:"Pages to categorize:"});q.$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 D=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}))}});D.getMenu().on("choose",()=>{let r=D.getMenu().findSelectedItem();this.actionsToTake[e].closingReason={name:r.getLabel(),id:r.getData()},this.updateRequestColor(n,e)}),D.getMenu().selectItemByData("r"),this.actionsToTake[e].closingReason={name:"No response",id:"r"};let W=new OO.ui.FieldLayout(D,{align:"inline",label:"Closing reason:"});W.$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],q.$element[0],P.$element[0],M.$element[0],W.$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)return e.addLogEntry("No requests have been handled (page content identical)!");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,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2NyaXB0cy9hZmNyYy1oZWxwZXIvc2hvdy1hY3Rpb25zLWRpYWxvZy50cyIsICIuLi8uLi9zY3JpcHRzL2FmY3JjLWhlbHBlci9oZWxwZXItZGlhbG9nLnRzIiwgIi4uLy4uL3NjcmlwdHMvYWZjcmMtaGVscGVyL3JlZGlyZWN0LXJlcXVlc3QtaGFuZGxlci50cyIsICIuLi8uLi9zY3JpcHRzL2FmY3JjLWhlbHBlci9yZWRpcmVjdHMtZGlhbG9nLnRzIiwgIi4uLy4uL3NjcmlwdHMvYWZjcmMtaGVscGVyL2NhdGVnb3J5LWlucHV0LXdpZGdldC50cyIsICIuLi8uLi9zY3JpcHRzL2FmY3JjLWhlbHBlci9wYWdlLWlucHV0LXdpZGdldC50cyIsICIuLi8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G4gICAgICAgICAgICAgICAgY29uc3QgZW5kSW5kZXggPSBNYXRoLm1pbihpbmRleCArIGJhdGNoU2l6ZSwgdGhpcy5wYXJzZWRSZXF1ZXN0cy5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICh0aGlzIGFzIHVua25vd24gYXMgeyB0aXRsZTogT08udWkuTGFiZWxXaWRnZXQgfSkudGl0bGUuc2V0TGFiZWwoXG4gICAgICAgICAgICAgICAgICAgIGBhZmNyYy1oZWxwZXIgKGxvYWRpbmcgJHtpbmRleCArIDF9LSR7ZW5kSW5kZXh9LyR7dGhpcy5wYXJzZWRSZXF1ZXN0cy5sZW5ndGh9IHJlcXVlc3RzKWAsXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIGZvciAobGV0IHN1YkluZGV4ID0gaW5kZXg7IHN1YkluZGV4IDwgZW5kSW5kZXg7IHN1YkluZGV4KyspIHRoaXMubG9hZFN1YnR5cGVFbGVtZW50cyhzdWJJbmRleCk7XG5cbiAgICAgICAgICAgICAgICBpZiAoZW5kSW5kZXggPCB0aGlzLnBhcnNlZFJlcXVlc3RzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBpbmRleCA9IGVuZEluZGV4O1xuICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGhhbmRsZSwgMCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgICAgICh0aGlzIGFzIHVua25vd24gYXMgeyB0aXRsZTogT08udWkuTGFiZWxXaWRnZXQgfSkudGl0bGUuc2V0TGFiZWwoXG4gICAgICAgICAgICAgICAgICAgICAgICBgYWZjcmMtaGVscGVyICgke3RoaXMucGFyc2VkUmVxdWVzdHMubGVuZ3RofSByZXF1ZXN0cyBsb2FkZWQpYCxcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGhhbmRsZSgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgIC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tYXBDb21tZW50cyhjb21tZW50czogc3RyaW5nW11bXSwgc2luZ3VsYXJSZXF1ZXN0OiBib29sZWFuLCBhbGxSZXF1ZXN0czogYm9vbGVhbikge1xuICAgICAgICBpZiAoc2luZ3VsYXJSZXF1ZXN0KSByZXR1cm4gYCoge3tBZkMgY29tbWVudHwxPSR7Y29tbWVudHNbMF1bMV19fX0gfn5+fmA7XG5cbiAgICAgICAgY29uc3QgY29tbWVudE1lc3NhZ2VzOiBSZWNvcmQ8c3RyaW5nLCBzdHJpbmdbXT4gPSB7fTtcblxuICAgICAgICBmb3IgKGNvbnN0IFtwYWdlLCBjb21tZW50XSBvZiBjb21tZW50cykge1xuICAgICAgICAgICAgaWYgKCFjb21tZW50TWVzc2FnZXNbY29tbWVudF0pIGNvbW1lbnRNZXNzYWdlc1tjb21tZW50XSA9IFtdO1xuICAgICAgICAgICAgY29tbWVudE1lc3NhZ2VzW2NvbW1lbnRdLnB1c2gocGFnZSk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBjb21tZW50c0FycmF5ID0gT2JqZWN0LmVudHJpZXMoY29tbWVudE1lc3NhZ2VzKTtcblxuICAgICAgICByZXR1cm4gY29tbWVudHNBcnJheVxuICAgICAgICAgICAgLm1hcChcbiAgICAgICAgICAgICAgICAoW2NvbW1lbnQsIHBhZ2VzXSkgPT5cbiAgICAgICAgICAgICAgICAgICAgYCoge3tBZkMgY29tbWVudHwxPSR7Y29tbWVudH19fSR7Y29tbWVudHNBcnJheS5sZW5ndGggPiAxIHx8ICFhbGxSZXF1ZXN0cyA/IGAgKCR7cGFnZXMubWFwKChwYWdlKSA9PiBgW1ske3BhZ2V9XV1gKS5qb2luKCcsICcpfSlgIDogJyd9IH5+fn5gLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgLmpvaW4oJ1xcbicpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIE1vZGlmaWVzIGEgZ2l2ZW4gc2VjdGlvbiB0ZXh0IHdpdGggcHJlc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AgICAgICAgYXdhaXQgbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHNldFRpbWVvdXQocmVzb2x2ZSwgNzBfMDAwKSk7XG5cbiAgICAgICAgICAgICAgICAgICAgc2hvd0FjdGlvbnNEaWFsb2cuYWRkTG9nRW50cnkoJ0NvbnRpbnVpbmcuLi4nLCAnc3VjY2VzcycpO1xuXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IGFwaUZ1bmN0aW9uLmNhdGNoKChlcnJvckNvZGU6IHN0cmluZywgZXJyb3JJbmZvOiBNZWRpYVdpa2lEYXRhRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNob3dBY3Rpb25zRGlhbG9nLmFkZExvZ0VudHJ5KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGBFcnJvciAke2FjdGlvbi50eXBlID09PSAnZWRpdCcgPyAnZWRpdGluZycgOiAnY3JlYXRpbmcnfSAke2xpbmtFbGVtZW50Lm91dGVySFRNTH06ICR7ZXJyb3JJbmZvPy5lcnJvci5pbmZvID8/ICdVbmtub3duIGVycm9yJ30gKCR7ZXJyb3JDb2RlfSkuYCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZXJyb3InLFxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHNob3dBY3Rpb25zRGlhbG9nLmFkZExvZ0VudHJ5KFxuICAgICAgICAgICAgICAgICAgICAgICAgYEVycm9yICR7YWN0aW9uLnR5cGUgPT09ICdlZGl0JyA/ICdlZGl0aW5nJyA6ICdjcmVhdGluZyd9ICR7bGlua0VsZW1lbnQub3V0ZXJIVE1MfTogJHtlcnJvckluZm8/LmVycm9yLmluZm8gPz8gJ1Vua25vd24gZXJyb3InfSAoJHtlcnJvckNvZGV9KS5gLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2Vycm9yJyxcb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FzZSAnYWNjZXB0Jzoge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy50YWdTZWxlY3RMYXlvdXQgfHwgIXRoaXMudGVtcGxhdGVQYXJhbWV0ZXJzRWRpdG9yKSB0aGlzLmxvYWRUYWdTZWxlY3RBbmRQYXJhbWV0ZXJzRWRpdG9yKCk7XG5cbiAgICAgICAgICAgICAgICB0aGlzLnRhZ1NlbGVjdExheW91dCEuJGVsZW1lbnQuc2hvdygpO1xuICAgICAgICAgICAgICAgIHRoaXMudGVtcGxhdGVQYXJhbWV0ZXJzRWRpdG9yIS5zdHlsZS5kaXNwbGF5ID0gJ2Jsb2NrJztcblxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSAnZGVueSc6IHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuZGVueVJlYXNvbkxheW91dCkgdGhpcy5sb2FkRGVueVJlYXNvbkxheW91dCgpO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5kZW55UmVhc29uTGF5b3V0IS4kZWxlbWVudC5zaG93KCk7XG5cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgJ2Nsb3NlJzoge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5jbG9zaW5nUmVhc29uTGF5b3V0KSB0aGlzLmxvYWRDbG9zaW5nUmVhc29uTGF5b3V0KCk7XG5cbiAgICAgICAgICAgICAgICB0aGlzLmNsb3NpbmdSZWFzb25MYXlvdXQhLiRlbGVtZW50LnNob3coKTtcblxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKFsnYWNjZXB0JywgJ2NvbW1lbnQnLCAnY2xvc2UnXS5pbmNsdWRlcyhvcHRpb24pKSB7XG4gICAgICAgICAgICB0aGlzLmNvbW1lbnRMYXlvdXQuJGVsZW1lbnQuc2hvdygpO1x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mVxdWVzdHMucHVzaChwYXJzZWREYXRhKTtcblxuICAgICAgICB0aGlzLmFjdGlvbnNUb1Rha2UucHVzaCh7XG4gICAgICAgICAgICB0YXJnZXQ6IHBhcnNlZERhdGEudGFyZ2V0LFxuICAgICAgICAgICAgcmVxdWVzdHM6IE9iamVjdC5mcm9tRW50cmllcyhcbiAgICAgICAgICAgICAgICByZXF1ZXN0ZWRQYWdlcy5tYXAoKHBhZ2UpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgcGFnZSxcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3JpZ2luYWxUZXh0OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVsbFNlY3Rpb25UZXh0OiBzZWN0aW9uVGV4dCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWN0aW9uVGV4dDogc2VjdGlvblRleHQucmVwbGFjZSgvXj09Lio/PT0kL20sICcnKS50cmltKCksXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uOiAnbm9uZScsXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICApLFxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBMb2FkcyBhIGdpdmVuIHJlZGlyZWN0IHJlcXVlc3QgaW50byB0aGUgZGlhbG9nLlxuICAgICAqIEBwYXJhbSBpbmRleCBUaGUgaW5kZXggb2YgdGhlIHJlcXVlc3QgdG8gbG9hZC5cbiAgICAgKi9cbiAgICBwcm90ZWN0ZWQgbG9hZFN1YnR5cGVFbGVtZW50cyhpbmRleDogbnVtYmVyKSB7XG4gICAgICAgIGNvbnN0IHJlcXVlc3QgPSB0aGlzLnBhcnNlZFJlcXVlc3RzW2luZGV4XTtcblxuICAgICAgICBjb25zdCBkZXRhaWxzRWxlbWVudCA9IGRvY3VtZW50LmNyZWF0Z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ICAgICAgICAgICAgICAgY29uc3QgYWxsUmVxdWVzdHNBY2NlcHRlZERlbmllZCA9IE9iamVjdC52YWx1ZXMocmVxdWVzdHMpLmV2ZXJ5KFxuICAgICAgICAgICAgICAgICAgICAoYWN0aW9uKSA9PiBhY3Rpb24uYWN0aW9uID09PSAnYWNjZXB0JyB8fCBhY3Rpb24uYWN0aW9uID09PSAnZGVueScsXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIGNvbnN0IGZpcnN0Q2xvc2VSZWFzb24gPSBPYmplY3QudmFsdWVzKHJlcXVlc3RzKS5maW5kKChhY3Rpb24pID0+IGFjdGlvbi5hY3Rpb24gPT09ICdjbG9zZScpPy5jbG9zaW5nUmVhc29uPy5pZDtcbiAgICAgICAgICAgICAgICBjb25zdCBhbGxSZXF1ZXN0c0Nsb3NlZCA9IE9iamVjdC52YWx1ZXMocmVxdWVzdHMpLmV2ZXJ5KFxuICAgICAgICAgICAgICAgICAgICAoYWN0aW9uKSA9PiBhY3Rpb24uYWN0aW9uID09PSAnY2xvc2UnICYmIGFjdGlvbi5jbG9zaW5nUmVhc29uPy5pZCA9PT0gZmlyc3RDbG9zZVJlYXNvbixcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgY29uc3QgYWNjZXB0ZWRQYWdlcyA9IFtdO1xuICAgICAgICAgICAgICAgIGNvbnN0IGRlbmllZFBhZ2VzID0gW107XG4gICAgICAgICAgICAgICAgY29uc3QgY29tbWVudHMgPSBbXTtcblxuICAgICAgICAgICAgICAgIGNvbnN0IGFtb3VudE9mUGFnZXMgPSBPYmplY3Qua2V5cyhyZXF1ZXN0cykubGVuZ3RoO1xuXG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBbcmVxdWVzdGVkVGl0bGUsIGFjdGlvbl0gb2YgT2JqZWN0LmVudHJpZXMocmVxdWVzdHMpKVxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGFjdGlvbi5hY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2FjY2VwdCc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc29tZVJlcXVlc3RBY2NlcHRlZERlbmllZCAmJiAhYWxsUmVxdWVzdHNBY2NlcHRlZERlbmllZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0FjdGlvbnNEaWFsb2cuYWRkTG9nRW50cnkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgTm90IGFsbCByZXF1ZXN0cyB0byBcIiR7dGFyZ2V0fVwiIHdlcmUgYWNjZXB0ZWQgb3IgZGVuaWVkLCB0aGUgaGFuZGxpbmcgb2YgXCIke3JlcXVlc3RlZFRpdGxlfVwiIHdpbGwgYmUgaWdub3JlZC5gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3dhcm5pbmcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY2NlcHRlZFBhZ2VzLnB1c2gocmVxdWVzdGVkVGl0bGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWN0aW9uLmNvbW1lbnQpIGNvbW1lbnRzLnB1c2goW3JlcXVlc3RlZFRpdGxlLCBhY3Rpb24uY29tbWVudF0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudHMuYWNjZXB0ZWQrKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2RlbnknOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNvbWVSZXF1ZXN0QWNjZXB0ZWREZW5pZWQgJiYgIWFsbFJlcXVlc3RzQWNjZXB0ZWREZW5pZWQpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3dBY3Rpb25zRGlhbG9nLmFkZExvZ0VudHJ5KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYE5vdCBhbGwgcmVxdWVzdHMgdG8gXCIke3RhcmdldH1cIiB3ZXJlIGFjY2VwdGVkIG9yIGRlbmllZCwgdGhlIGhhbmRsaW5nIG9mIFwiJHtyZXF1ZXN0ZWRUaXRsZX1cIiBpcyBiZWluZyBpZ25vcmVkLmAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnd2FybmluZycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbmllZFBhZ2VzLnB1c2goW3JlcXVlc3RlZFRpdGxlLCBhY3Rpb24uZGVueVJlYXNvbiFdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnRzLmRlbmllZCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnY29tbWVudCc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWN0aW9uLmNvbW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tbWVudHMucHVzaChbcmVxdWVzdGVkVGl0bGUsIGFjdGlvbi5jb21tZW50XSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50c1snY29tbWVudGVkIG9uJ10rKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0FjdGlvbnNEaWFsb2cuYWRkTG9nRW50cnkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgVGhlIHJlcXVlc3QgdG8gY3JlYXRlIFwiJHtyZXF1ZXN0ZWRUaXRsZX1cIiBcdTIxOTIgXCIke3RhcmdldH1cIiB3YXMgbWFya2VkIHRvIGJlIGNvbW1lbnRlZCBvbiwgYnV0IG5vIGNvbW1lbnQgd2FzIHByb3ZpZGVkIHNvIGl0IHdpbGwgYmUgc2tpcHBlZC5gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3dhcm5pbmcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdjbG9zZSc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWxsUmVxdWVzdHNDbG9zZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFjdGlvbi5jb21tZW50KSBjb21tZW50cy5wdXNoKFtyZXF1ZXN0ZWRUaXRsZSwgYWN0aW9uLmNvbW1lbnRdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnRzLmNsb3NlZCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93QWN0aW9uc0RpYWxvZy5hZGRMb2dFbnRyeShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGBOb3QgYWxsIHJlcXVlc3RzIHRvIFwiJHt0YXJnZXR9XCIgd2VyZSBjbG9zZWQgd2l0aCB0aGUgc2FtZSByZWFzb24sIHRoZSBoYW5kbGluZyBvZiBcIiR7cmVxdWVzdGVkVGl0bGV9XCIgaXMgYmVpbmcgaWdub3JlZC5gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3dhcm5pbmcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBsZXQgc2VjdGlvbkRhdGEgPSB7IHBhZ2VUZXh0OiBuZXdQYWdlVGV4dCwgLi4uT2JqZWN0LnZhbHVlcyhyZXF1ZXN0cylbMF0ub3JpZ2luYWxUZXh0IH07XG5cbiAgICAgICAgICAgICAgICBpZiAoY29tbWVudHMubGVuZ3RoID4gMClcbiAgICAgICAgICAgICAgICAgICAgc2VjdGlvbkRhdGEgPSB0aGlzLm1vZGlmeVNlY3Rpb25EYXRhKHNlY3Rpb25EYXRhLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBlbmQ6IHRoaXMubWFwQ29tbWVudHMoY29tbWVudHMsIGFtb3VudE9mUGFnZXMgPT09IDEsIGNvbW1lbnRzLmxlbmd0aCA9PT0gYW1vdW50T2ZQYWdlcyksXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgaWYgKGFsbFJlcXVlc3RzQWNjZXB0ZWREZW5pZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNsb3NpbmdJZDogc3RyaW5nO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChhY2NlcHRlZFBhZ2VzLmxlbmd0aCA+IDAgJiYgZGVuaWVkUGFnZXMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xvc2luZ0lkID0gJ3AnO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBhY2NlcHRlZFBhZ2VzTWVzc2FnZSA9IGAqIHt7c3Vic3Q6QWZDIHJlZGlyZWN0fX0gKC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kaXJlY3Qke2FjY2VwdGVkUGFnZXMubGVuZ3RoID4gMSA/ICd8YWxsJyA6ICcnfX19IH5+fn5gLFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbG9zaW5nSWQgPSAnZCc7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHNlY3Rpb25EYXRhID0gdGhpcy5tb2RpZnlTZWN0aW9uRGF0YShzZWN0aW9uRGF0YSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGVuZDogdGhpcy5tYXBEZW5pZWRSZWFzb25zKGRlbmllZFBhZ2VzLCBhbW91bnRPZlBhZ2VzID09PSAxLCB0cnVlKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgc2VjdGlvbkRhdGEgPSB0aGlzLm1vZGlmeVNlY3Rpb25EYXRhKHNlY3Rpb25EYXRhLCB7IHByZXBlbmQ6IGB7e0FmQy1jfCR7Y2xvc2luZ0lkfX19YCwgYXBwZW5kOiAne3tBZkMtY3xifX0nIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYWxsUmVxdWVzdHNDbG9zZWQpXG4gICAgICAgICAgICAgICAgICAgIHNlY3Rpb25EYXRhID0gdGhpcy5tb2RpZnlTZWN0aW9uRGF0YShzZWN0aW9uRGF0YSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJlcGVuZDogYHt7QWZDLWN8JHtmaXJzdENsb3NlUmVhc29ufX19YCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGVuZDogJ3t7QWZDLWN8Yn19JyxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBuZXdQYWdlVGV4dCA9IHNlY3Rpb25EYXRhLnBhZ2VUZXh0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5iZWZvcmVUZXh0ICsgdGhpcy5wYWdlQ29udGVudCA9PT0gbmV3UGFnZVRleHQpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHNob3dBY3Rpb25zRGlhbG9nLmFkZExvZ0VudHJ5KCdObyByZXF1ZXN0cyBoYXZlIGJlZW4gaGFuZGxlZCAocGFnZSBjb250ZW50IGlkZW50aWNhbCkhJyk7XG5cbiAgICAgICAgICAgIGNvbnN0IG1hcHBlZENvdW50cyA9IE9iamVjdC5lbnRyaWVzKGNvdW50cylcbiAgICAgICAgICAgICAgICAuZmlsdGVyKChbLCBjb3VudF0pID0+IGNvdW50ID4gMClcbiAgICAgICAgICAgICAgICAubWFwKChbYWN0aW9uLCBjb3VudF0pID0+IGAke2FjdGlvbn0gJHtjb3VudH1gKVxuICAgICAgICAgICAgICAgIC5qb2luKCcsICcpO1xuXG4gICAgICAgICAgICB0aGlzLmVkaXRzQ3JlYXRpb25zVG9NYWtlLnB1c2goe1xuICAgICAgICAgICAgICAgIHR5cGU6ICdlZGl0JyxcbiAgICAgICAgICAgICAgICB0aXRsZTogdGhpcy5wYWdlVGl0bGUsXG4gICAgICAgICAgICAgICAgdHJhbnNmb3JtOiAoKSA9PiAoe1xuICAgICAgICAgICAgICAgICAgICB0ZXh0OiBuZXdQYWdlVGV4dCxcbiAgICAgICAgICAgICAgICAgICAgc3VtbWFyeTogYEhhbmRsaW5nIEFmQyByZWRpcmVjdCByZXF1ZXN0cyAoJHttYXBwZWRDb3VudHN9KSR7dGhpcy5zY3JpcHRNZXNzYWdlfWAsXG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgYXdhaXQgdGhpcy5tYWtlQWxsRWRpdHNDcmVhdGlvbnMoc2hvd0FjdGlvbnNEaWFsb2cpO1xuXG4gICAgICAgICAgICBzaG93QWN0aW9uc0RpYWxvZy5hZGRMb2dFbnRyeSgnQWxsIGNoYW5nZXM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nKTtcbiAgICAgICAgICAgICAgICAgICAgICBpZiAoIWZvdW5kQXJndW1lbnRFZGl0b3IpIHJldHVybiBge3ske3RhZ319fWA7XG5cbiAgICAgICAgICAgICAgICAgICAgICBjb25zdCBsYXN0TnVtYmVyUGFyYW1ldGVySW5kZXggPSBmb3VuZEFyZ3VtZW50RWRpdG9yLnBhcmFtZXRlcnMuZmluZExhc3RJbmRleChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgKHBhcmFtZXRlciwgaW5kZXgpID0+IHBhcmFtZXRlci5uYW1lID09PSAoaW5kZXggKyAxKS50b1N0cmluZygpICYmIHBhcmFtZXRlci5lZGl0b3IuZ2V0VmFsdWUoKS50cmltKCksXG4gICAgICAgICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1hcHBlZEFyZ3VtZW50cyA9IGZvdW5kQXJndW1lbnRFZGl0b3IucGFyYW1ldGVyc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKChwYXJhbWV0ZXIsIGluZGV4KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IHBhcmFtZXRlci5lZGl0b3IuZ2V0VmFsdWUoKS50cmltKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXZhbHVlICYmIGluZGV4ID4gbGFzdE51bWJlclBhcmFtZXRlckluZGV4KSByZXR1cm4gbnVsbDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGB8JHtwYXJhbWV0ZXIubmFtZSA9PT0gKGluZGV4ICsgMSkudG9TdHJpbmcoKSA/ICcnIDogYCR7cGFyYW1ldGVyLm5hbWV9PWB9JHt2YWx1ZX1gO1xuICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKEJvb2xlYW4pXG4gICAgICAgICAgICAgICAgICAgICAgICAgIC5qb2luKCcnKTtcblxuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBge3ske3RhZ30ke21hcHBlZEFyZ3VtZW50c319fWA7XG4gICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIDogbnVsbDtcblxuICAgICAgICBjb25zdCB0aXRsZSA9IG13LlRpdGxlLm5ld0Zyb21UZXh0KHBhZ2UpITtcblxuICAgICAgICB0aGlzLmVkaXRzQ3JlYXRpb25zVG9NYWtlLnB1c2goXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdHlwZTogJ2NyZWF0ZScsXG4gICAgICAgICAgICAgICAgaXNSZWRpcmVjdDogdHJ1ZSxcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUuZ2V0UHJlZml4ZWRUZXh0KCksXG4gICAgICAgICAgICAgICAgdGV4dDogYCNSRURJUkVDVCBbWyR7dGFyZ2V0fV1dJHt0YWdzV2l0aEFyZ3VtZW50cyA/IGBcXG5cXG57e1JlZGlyZWN0IGNhdGVnb3J5IHNoZWxsfFxcbiR7dGFnc1dpdGhBcmd1bWVudHMuam9pbignXFxuJyl9XFxufX1gIDogJyd9YCxcbiAgICAgICAgICAgICAgICBzdW1tYXJ5OiBgQ3JlYXRpbmcgcmVkaXJlY3QgdG8gW1ske3RhcmdldH1dXSBhcyByZXF1ZXN0ZWQgYXQgW1tXUDpBRkMvUl1dJHt0aGlzLnNjcmlwdE1lc3NhZ2V9YCxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdHlwZTogJ2NyZWF0ZScsXG4gICAgICAgICAgICAgICAgaXNSZWRpcmVjdDogZmFsc2UsXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLmdldFRhbGtQYWdlKCkhLmdldFByZWZpeGVkVGV4dCgpLFxuICAgICAgICAgICAgICAgIHRleHQ6IGB7e1dpa2lQcm9qZWN0IGJhbm5lciBzaGVsbHxcXG57e1dpa2lQcm9qZWN0IEFydGljbGVz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2VzID0gcmVzdWx0LnF1ZXJ5LnBhZ2VzXG4gICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwYWdlKSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAhcGFnZS5jYXRlZ29yaWVzPy5zb21lKChjYXRlZ29yeSkgPT4gY2F0ZWdvcnkudGl0bGUgPT09ICdDYXRlZ29yeTpXaWtpcGVkaWEgc29mdCByZWRpcmVjdGVkIGNhdGVnb3JpZXMnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoKHBhZ2UpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB0aXRsZVdpdGhvdXROYW1lc3BhY2UgPSBwYWdlLnRpdGxlLnNwbGl0KCc6JylbMV07XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBkYXRhOiB0aXRsZVdpdGhvdXROYW1lc3BhY2UsIGxhYmVsOiB0aXRsZVdpdGhvdXROYW1lc3BhY2UgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZW1pdCgnc2hvd2luZy12YWx1ZXMnLCBwYWdlcyk7XG5cbiAgICAgICAgICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShwYWdlcyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGRlZmVycmVkLnJlc29sdmUoW10pO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIGRlZmVycmVkLnByb21pc2UoeyBhYm9ydCgpIHt9IH0pOyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1lbXB0eS1mdW5jdGlvblxuICAgIH07XG5cbiAgICBnZXRMb29rdXBDYWNoZURhdGFGcm9tUmVzcG9uc2UgPSA8VD4ocmVzc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dW1lbnQuY3JlYXRlRWxlbWVudCgnc3BhbicpO1xuICAgICAgICBub25lRWxlbWVudC5zdHlsZS5jb2xvciA9ICdkaW1ncmF5JztcbiAgICAgICAgbm9uZUVsZW1lbnQudGV4dENvbnRlbnQgPSAnTm9uZSc7XG5cbiAgICAgICAgY29uc3QgdW5rbm93bkVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzcGFuJyk7XG4gICAgICAgIHVua25vd25FbGVtZW50LnN0eWxlLmNvbG9yID0gJ2RpbWdyYXknO1xuICAgICAgICB1bmtub3duRWxlbWVudC50ZXh0Q29udGVudCA9ICdVbmtub3duJztcblxuICAgICAgICBjb25zdCBleGFtcGxlc0RpdiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpO1xuXG4gICAgICAgIGNvbnN0IGV4YW1wbGVzTGFiZWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdiJyk7XG4gICAgICAgIGV4YW1wbGVzTGFiZWwudGV4dENvbnRlbnQgPSAnRXhhbXBsZXM6ICc7XG4gICAgICAgIGV4YW1wbGVzRGl2LmFwcGVuZChleGFtcGxlc0xhYmVsKTtcblxuICAgICAgICBpZiAocmVxdWVzdC5leGFtcGxlcy5sZW5ndGggPiAwKVxuICAgICAgICAgICAgZm9yIChjb25zdCBbaW5kZXgsIGV4YW1wbGVdIG9mIHJlcXVlc3QuZXhhbXBsZXMuZW50cmllcygpKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgbGlua0VsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdhJyk7XG4gICAgICAgICAgICAgICAgbGlua0VsZW1lbnQudGFyZ2V0ID0gJ19ibGFuayc7XG4gICAgICAgICAgICAgICAgbGlua0VsZW1lbnQuaHJlZiA9IG13LnV0aWwuZ2V0VXJsKGV4YW1wbGUpO1xuICAgICAgICAgICAgICAgIGxpbmtFbGVtZW50LnRleHRDb250ZW50ID0gZXhhbXBsZTt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gICAgIH0pO1xuICAgICAgICBhY3Rpb25SYWRpb0lucHV0LnNlbGVjdEl0ZW1CeUxhYmVsKCdOb25lJyk7XG4gICAgICAgIGFjdGlvblJhZGlvSW5wdXQub24oJ2Nob29zZScsICgpID0+IHtcbiAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4gdGhpcy51cGRhdGVTaXplKCksIDApO1xuXG4gICAgICAgICAgICBjb25zdCBvcHRpb24gPSAoXG4gICAgICAgICAgICAgICAgKGFjdGlvblJhZGlvSW5wdXQuZmluZFNlbGVjdGVkSXRlbSgpIGFzIE9PLnVpLlJhZGlvT3B0aW9uV2lkZ2V0KS5nZXREYXRhKCkgYXMgc3RyaW5nXG4gICAgICAgICAgICApLnRvTG93ZXJDYXNlKCkgYXMgUmVxdWVzdEFjdGlvblR5cGU7XG5cbiAgICAgICAgICAgIHRoaXMuYWN0aW9uc1RvVGFrZVtpbmRleF0uYWN0aW9uID0gb3B0aW9uO1xuXG4gICAgICAgICAgICBpZiAoWydjb21tZW50JywgJ2Nsb3NlJ10uaW5jbHVkZXMob3B0aW9uKSkge1xuICAgICAgICAgICAgICAgIGNvbW1lbnRJbnB1dExheW91dC4kZWxlbWVudC5zaG93KCk7XG5cbiAgICAgICAgICAgICAgICBjb25zdCBjb21tZW50ID0gY29tbWVudElucHV0LmdldFZhbHVlKCkudHJpbSgpO1xuICAgICAgICAgICAgICAgIGlmIChjb21tZW50KSB0aGlzLmFjdGlvbnNUb1Rha2VbaW5kZXhdLmNvbW1lbnQgPSBjb21tZW50O1xuICAgICAgICAgICAgICAgIGVsc2UgZGVsZXRlIHRoaXMuYWN0aW9uc1RvVGFrZVtpbmRleF0uY29tbWVudDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29tbWVudElucHV0TGF5b3V0LiRlbGVtZW50LmhpZGUoKTtcblxuICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLmFjdGlvbnNUb1Rha2VbaW5kZXhdLmNvbW1lbnQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMudXBkYXRlUmVxdWVzdENvbG9yKGRldGFpbHNFbGVtZW50LCBpbmRleCk7XG5cbiAgICAgICAgICAgIHBhZ2VTZWxlY3RMYXlvdXQuJGVsZW1lbnQuaGlkZSgpO1xuICAgICAgICAgICAgY2F0ZWdvcnlTZWxlY3RMYXlvdXQuJGVsZW1lbnQuaGlkZSgpO1xuICAgICAgICAgICAgZGVueVJlYXNvbkxheW91dC4kZWxlbWVudC5oaWRlKCk7XG4gICAgICAgICAgICBjbG9zaW5nUmVhc29uTGF5b3V0LiRlbGVtZW50LmhpZGUoKTtcblxuICAgICAgICAgICAgc3dpdGNoIChvcHRpb24pIHtcbiAgICAgICAgICAgICAgICBjYXNlICdhY2NlcHQnOiB7XG4gICAgICAgICAgICAgICAgICAgIHBhZ2VTZWxlY3RMYXlvdXQuJGVsZW1lbnQuc2hvdygpO1xuICAgICAgICAgICAgICAgICAgICBjYXRlZ29yeVNlbGVjdExheW91dC4kZWxlbWVudC5zaG93KCk7XG5cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNhc2UgJ2RlbnknOiB7XG4gICAgICAgICAgICAgICAgICAgIGRlbnlSZWFzb25MYXlvdXQuJGVsZW1lbnQuc2hvdygpO1xuXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYXNlICdjbG9zZSc6IHtcbiAgICAgICAgICAgICAgICAgICAgY2xvc2luZ1JlYXNvbkxheW91dC4kZWxlbWVudC5zaG93KCk7XG5cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBjb25zdCBwYWdlU2VsZWN0SW5wdXQgPSBuZXcgUGFnZUlucHV0V2lkZ2V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GRlbnlSZWFzb25MYXlvdXQgPSBuZXcgT08udWkuRmllbGRMYXlvdXQoZGVueVJlYXNvbiwge1xuICAgICAgICAgICAgYWxpZ246ICdpbmxpbmUnLFxuICAgICAgICAgICAgbGFiZWw6ICdEZW55IHJlYXNvbjonLFxuICAgICAgICAgICAgaGVscDogJ1N1cHBvcnRzIGF1dG9tYXRpYyByZWFzb25pbmcsIGN1c3RvbSByZWFzb25pbmcsIG9yIGEgY29tYmluYXRpb24gb2YgdGhlIHR3byB3aXRoIFwiYXV0b2ZpbGw6UkVBU09OLCBDVVNUT01cIiBmb3JtYXQnLFxuICAgICAgICB9KTtcbiAgICAgICAgZGVueVJlYXNvbkxheW91dC4kZWxlbWVudC5oaWRlKCk7XG5cbiAgICAgICAgY29uc3QgY2xvc2luZ1JlYXNvbiA9IG5ldyBPTy51aS5Ecm9wZG93bldpZGdldCh7XG4gICAgICAgICAgICBjbGFzc2VzOiBbJ2FmY3JjLWNsb3NpbmctcmVhc29uLWlucHV0J10sXG4gICAgICAgICAgICBtZW51OiB7XG4gICAgICAgICAgICAgICAgaXRlbXM6IFtcbiAgICAgICAgICAgICAgICAgICAgWydObyByZXNwb25zZScsICdyJ10sXG4gICAgICAgICAgICAgICAgICAgIFsnU3VjY2VlZGVkJywgJ3MnXSxcbiAgICAgICAgICAgICAgICAgICAgWydXaXRoZHJhd24nLCAndyddLFxuICAgICAgICAgICAgICAgIF0ubWFwKChbdGl0bGUsIGlkXSkgPT4gbmV3IE9PLnVpLk1lbnVPcHRpb25XaWRnZXQoeyBkYXRhOiBpZCwgbGFiZWw6IHRpdGxlIH0pKSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgIH0pO1xuICAgICAgICBjbG9zaW5nUmVhc29uLmdldE1lbnUoKS5vbignY2hvb3NlJywgKCkgPT4ge1xuICAgICAgICAgICAgY29uc3Qgc2VsZWN0ZWQgPSBjbG9zaW5nUmVhc29uLmdldE1lbnUoKS5maW5kU2VsZWN0ZWRJdGVtKCkgY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BlbHNlIGRlbGV0ZSB0aGlzLmFjdGlvbnNUb1Rha2VbaW5kZXhdLmNvbW1lbnQ7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGNvbnN0IGNvbW1lbnRJbnB1dExheW91dCA9IG5ldyBPTy51aS5GaWVsZExheW91dChjb21tZW50SW5wdXQsIHtcbiAgICAgICAgICAgIGNsYXNzZXM6IFsnYWZjcmMtY29tbWVudC1pbnB1dCddLFxuICAgICAgICAgICAgYWxpZ246ICdpbmxpbmUnLFxuICAgICAgICAgICAgbGFiZWw6ICdDb21tZW50OicsXG4gICAgICAgIH0pO1xuICAgICAgICBjb21tZW50SW5wdXRMYXlvdXQuJGVsZW1lbnQuaGlkZSgpO1xuXG4gICAgICAgIHJlcXVlc3RSZXNwb25kZXJFbGVtZW50LmFwcGVuZChcbiAgICAgICAgICAgIGFjdGlvblJhZGlvSW5wdXQuJGVsZW1lbnRbMF0sXG4gICAgICAgICAgICBwYWdlU2VsZWN0TGF5b3V0LiRlbGVtZW50WzBdLFxuICAgICAgICAgICAgY2F0ZWdvcnlTZWxlY3RMYXlvdXQuJGVsZW1lbnRbMF0sXG4gICAgICAgICAgICBkZW55UmVhc29uTGF5b3V0LiRlbGVtZW50WzBdLFxuICAgICAgICAgICAgY2xvc2luZ1JlYXNvbkxheW91dC4kZWxlbWVudFswXSxcbiAgICAgICAgICAgIGNvbW1lbnRJbnB1dExheW91dC4kZWxlbWVudFswXSxcbiAgICAgICAgKTtcblxuICAgICAgICBkZXRhaWxzRWxlbWVudC5hcHBlbmQocmVxdWVzdFJlc3BvbmRlckVsZW1lbnQpO1xuXG4gICAgICAgICh0aGlzIGFzIHVua25vd24gYXMgeyAkYm9keTogSlF1ZXJ5IH0pLiRib2R5LmFwcGVuZChkZXRhaWxzRWxlbWVudCk7XG5cbiAgICAgICAgdGhpcy51cGRhdGVTaXplKCk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVXBkYXRlcyB0aGUgY29sb3Igb2YgYSBkZXR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2ggKGFjdGlvbkRhdGEuYWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ2FjY2VwdCc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlY3Rpb25EYXRhID0gdGhpcy5tb2RpZnlTZWN0aW9uRGF0YShzZWN0aW9uRGF0YSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXBlbmQ6ICd7e0FmQy1jfGF9fScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBwZW5kOiAnKiB7e3N1YnN0OkFmQyBjYXRlZ29yeX19IH5+fn5cXG57e0FmQy1jfGJ9fScsXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVBY2NlcHRlZENhdGVnb3J5KGFjdGlvbkRhdGEpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb3VudHMuYWNjZXB0ZWQrKztcblxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnZGVueSc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlY3Rpb25EYXRhID0gdGhpcy5tb2RpZnlTZWN0aW9uRGF0YShzZWN0aW9uRGF0YSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXBlbmQ6ICd7e0FmQy1jfGR9fScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBwZW5kOiBgKiAke3RoaXMuZm9ybWF0RGVuaWVkUmVhc29uKGFjdGlvbkRhdGEuZGVueVJlYXNvbiEpfSB+fn5+XFxue3tBZkMtY3xifX1gLFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50cy5kZW5pZWQrKztcblxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnY29tbWVudCc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhY3Rpb25EYXRhLmNvbW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWN0aW9uRGF0YSA9IHRoaXMubW9kaWZ5U2VjdGlvbkRhdGEoc2VjdGlvbkRhdGEsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBwZW5kOiBgKiB7e0FmQyBjb21tZW50fDE9JHthY3Rpb25EYXRhLmNvbW1lbnR9fX0gfn5+fmAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudHNbJ2NvbW1lbnRlZCBvbiddKys7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93QWN0aW9uc0RpYWxvZy5hZGRMb2dFbnRyeShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYFRoZSByZXF1ZXN0IHRvIGNyZWF0ZSBcIiR7YWN0aW9uRGF0YS5jYXRlZ29yeX1cIiB3YXMgbWFya2VkIHRvIGJlIGNvbW1lbnRlZCBvbiwgYnV0IG5vIGNvbW1lbnQgd2FzIHByb3ZpZGVkIHNvIGl0IHdpbGwgYmUgc2tpcHBlZC5gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnd2FybmluZycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnY2xvc2UnOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWN0aW9uRGF0YSA9IHRoaXMubW9kaWZ5U2VjdGlvbkRhdGEoc2VjdGlvbkRhdGEsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVwZW5kOiBge3tBZkMtY3wke2FjdGlvbkRhdGEuY2xvc2luZ1JlYXNvbiEuaWR9fX1gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGVuZDogKGFjdGlvbkRhdGEuY29tbWVudCA/IGAqIHt7QWZDIGNvbW1lbnR8MT0ke2FjdGlvbkRhdGEuY29tbWVudH19fSB+fn5+YCA6ICcnKSArICdcXG57e0FmQy1jfGJ9JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb3VudHMuY2xvc2VkKys7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbmV3UGFnZVRleHQgPSBzZWN0aW9uRGF0YS5wYWdlVGV4dDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMuYmVmb3JlVGV4dCArIHRoaXMucGFnZUNvbnRlbnQgPT09IG5ld1BhZ2VUZXh0KVxuICAgICAgICAgICAgICAgIHJldHVybiBzaG93QWN0aW9uc0RpYWxvZy5hZGRMb2dFbnRyeSgnTm8gcmVxdWVzdHMgaGF2ZSBiZWVuIGhhbmRsZWQgKHBhZ2UgY29udGVudCBpZGVudGljYWwpIScpO1xuXG4gICAgICAgICAgICBjb25zdCBtYXBwZWRDb3VudHMgPSBPYmplY3QuZW50cmllcyhjb3VudHMpXG4gICAgICAgICAgICAgICAgLmZpbHRlcigoWywgY291bnRdKSA9PiBjb3VudCA+IDApXG4gICAgICAgICAgICAgICAgLm1hcCgoW2FjdGlvbiwgY291bnRdKSA9PiBgJHthY3Rpb259ICR7Y291bnR9YClcbiAgICAgICAgICAgICAgICAuam9pbignLCAnKTtcblxuICAgICAgICAgICAgdGhpcy5lZGl0c0NyZWF0aW9uc1RvTWFrZS5wdXNoKHtcbiAgICAgICAgICA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