User:Eejit43/scripts/afcrc-helper.js

// // 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.ts

"use strict";mw.loader.using(["mediawiki.util","oojs-ui-core","oojs-ui-widgets","oojs-ui-windows"],=>{const z=mw.config.get("wgPageName")==="Wikipedia:Articles_for_creation/Redirects",Y=mw.config.get("wgPageName")==="Wikipedia:Articles_for_creation/Categories";if(!z&&!Y)return;const F=z?"redirect":"category";mw.util.addPortletLink(mw.config.get("skin")==="minerva"?"p-tb":"p-cactions","#",`Handle ${F} creation requests`,"afcrc-helper").addEventListener("click",B=>{B.preventDefault;const t=new OO.ui.WindowManager;document.body.append(t.$element[0]);const e=new I(F,mw.config.get("wgPageName").replaceAll("_"," "));t.addWindows([e]),e.open,e.load});class N extends OO.ui.Dialog{contentLayout;logOutput;closeButton;constructor{super({size:"large"}),N.static.name="ShowActionsDialog",N.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(t,e="notice"){const s=new OO.ui.MessageWidget({type:e,inline:!0,label:new OO.ui.HtmlSnippet(t)});this.logOutput.append(s.$element[0]),this.updateSize,this.closeButton.scrollElementIntoView}showReload{this.closeButton.$element.remove;const t=new OO.ui.ButtonWidget({label:"Reload",flags:["primary"]});t.on("click",=>window.location.reload),this.contentLayout.$element.append(t.$element)}}Object.assign(N.prototype,OO.ui.Dialog.prototype);class _ extends OO.ui.TextInputWidget{api=new mw.Api;constructor(t){super(t),OO.ui.mixin.LookupElement.call(this,t)}getLookupRequest==>{const t=this.getValue,e=$.Deferred;t||e.resolve([]);const s=mw.Title.newFromText(t);return this.api.get({action:"query",formatversion:"2",gaplimit:20,gapnamespace:s?.getNamespaceId??0,gapprefix:s?.getMainText??t,generator:"allpages"}).catch(=>null).then(r=>{if(r?.query?.pages){const i=r.query.pages.map(c=>({data:c.title,label:c.title}));this.emit("showing-values",i),e.resolve(i)}else e.resolve([])}),e.promise({abort{}})};getLookupCacheDataFromResponse=t=>t??[];getLookupMenuOptionsFromData=t=>t.map(({data:e,label:s})=>new OO.ui.MenuOptionWidget({data:e,label:s}))}Object.assign(_.prototype,OO.ui.mixin.LookupElement.prototype);class Q extends OO.ui.TextInputWidget{api=new mw.Api;constructor(t){super(t),OO.ui.mixin.LookupElement.call(this,t)}getLookupRequest==>{const t=this.getValue,e=$.Deferred;t||e.resolve([]);const s=mw.Title.newFromText(t);return this.api.get({action:"query",formatversion:"2",gaplimit:20,gapnamespace:14,gapprefix:s?.getMainText??t,generator:"allpages",prop:"categories"}).catch(=>null).then(r=>{if(r?.query?.pages){const i=r.query.pages.filter(c=>!c.categories?.some(a=>a.title==="Category:Wikipedia soft redirected categories")).map(c=>{const a=c.title.split(":")[1];return{data:a,label:a}});this.emit("showing-values",i),e.resolve(i)}else e.resolve([])}),e.promise({abort{}})};getLookupCacheDataFromResponse=t=>t??[];getLookupMenuOptionsFromData=t=>t.map(({data:e,label:s})=>new OO.ui.MenuOptionWidget({data:e,label:s}))}Object.assign(Q.prototype,OO.ui.mixin.LookupElement.prototype);class I extends OO.ui.ProcessDialog{api=new mw.Api;scriptMessage=" (afcrc-helper)";requestPageType;pageTitle;redirectTemplates;beforeText;pageContent;parsedRequests=[];actionsToTake=[];editsCreationsToMake=[];constructor(t,e){super({size:"large"}),I.static.name="AfcrcHelperDialog",I.static.title="afcrc-helper",I.static.actions=[{action:"cancel",label:"Close",flags:["safe","close"]},{action:"save",label:"Run",flags:["primary","progressive"]}],this.pageTitle=e,this.requestPageType=t,mw.util.addCSS(` .afcrc-helper-request { color: #202122; background-color: #eee; border-radius: 5px; margin: 10px; padding: 5px; }

.afcrc-helper-request summary { cursor: pointer; }

.afcrc-helper-target-editor { font-family: monospace; min-width: 1ch; max-width: calc(100% - 4ch); }

.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 { background-color: #fff; border: 1px solid #a2a9b1; border-radius: 2px; margin-block: 10px; 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 { background-color: #e2e2e2; margin-block: 5px; }

padding: 5px; }`)}getActionProcess=t=>t==="cancel"?new OO.ui.Process(=>{this.getManager.closeWindow(this)}):t==="save"?new OO.ui.Process(=>{this.performActions}):I.super.prototype.getActionProcess.call(this,t);getTeardownProcess==>I.super.prototype.getTeardownProcess.call(this).next(=>{this.$body.empty});async load{const t=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(t.query.pages?.[0]?.revisions?.[0]?.slots?.main?.content||"{}");const 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=this.pageContent.match(/^(.*?)==/s)[1],this.pageContent=this.pageContent.replace(/^.*?==/s,"==");const t=[...this.pageContent.matchAll(/^==.*?==$(\s*(?!==[^=]).*)*/gim)].map(e=>e[0]);for(const e of t){if(/loadInputElements{if(this.parsedRequests.length>0){let t=0;const e==>{const r=Math.min(t+5,this.parsedRequests.length);this.title.setLabel(`afcrc-helper (loading ${t+1}-${r}/${this.parsedRequests.length} requests)`);for(let i=t;i<r;i++)this.requestPageType==="redirect"?this.loadRedirectRequestElements(i):this.loadCategoryRequestElements(i);r<this.parsedRequests.length?(t=r,setTimeout(e,0)):this.title.setLabel(`afcrc-helper (${this.parsedRequests.length} requests loaded)`)};e}else{const t=new OO.ui.MessageWidget({type:"notice",label:"No valid requests to handle!"}),e=new OO.ui.PanelLayout({padded:!0,expanded:!1});e.$element.append(t.$element),this.$body.append(e.$element),this.updateSize}}loadRedirectRequestElements(t){const e=this.parsedRequests[t],s=document.createElement("details");s.classList.add("afcrc-helper-request"),s.addEventListener("click",=>setTimeout(=>this.updateSize,0));const r=document.createElement("summary");r.innerHTML=e.pages.map(l=>`${l}`).join(", ")+" \u2192 ",r.addEventListener("keyup",l=>{document.activeElement?.tagName==="INPUT"&&l.key===" "&&l.preventDefault});const i=document.createElement("input");i.classList.add("afcrc-helper-target-editor"),i.style.width=`${e.target.length}ch`,i.value=e.target,i.addEventListener("input",=>{i.value=i.value.replaceAll("_"," "),i.style.width=`${i.value.length}ch`,this.actionsToTake[t].target=i.value,c.href=mw.util.getUrl(i.value)}),r.append(i);const c=document.createElement("a");c.classList.add("afcrc-helper-external-link"),c.target="_blank",c.href=mw.util.getUrl(e.target),c.innerHTML=`   `,r.append(c),s.append(r);const a=document.createElement("div");a.classList.add("afcrc-helper-request-info");const o=document.createElement("span");o.style.color="dimgray",o.textContent="None";const h=document.createElement("span");h.style.color="dimgray",h.textContent="Unknown";const u=document.createElement("div"),y=document.createElement("b");y.textContent="Reason: ",u.append(y),e.reason?u.append(e.reason):u.append(o.cloneNode(!0)),a.append(u);const k=document.createElement("div"),w=document.createElement("b");w.textContent="Source: ",k.append(w),e.source?k.append(e.source):k.append(o.cloneNode(!0)),a.append(k);const b=document.createElement("div"),T=document.createElement("b");if(T.textContent="Requester: ",b.append(T),e.requester){const l=document.createElement("a");l.target="_blank",l.href=e.requester.type==="user"?mw.util.getUrl(`User:${e.requester.name}`):mw.util.getUrl(`Special:Contributions/${e.requester.name}`),l.textContent=e.requester.name,b.append(l)}else b.append(h.cloneNode(!0));a.append(b),s.append(a),s.append(document.createElement("hr"));const O=document.createElement("div");O.classList.add("afcrc-helper-request-responder");for(const l of e.pages){const d=document.createElement("div"),g=document.createElement("b");g.textContent=l,d.append(g);let C,m;const j=[],L=new OO.ui.RadioSelectWidget({classes:["afcrc-helper-action-radio"],items:["Accept","Deny","Comment","Close","None"].map(n=>new OO.ui.RadioOptionWidget({data:n,label:n}))});L.selectItemByLabel("None"),L.on("choose",=>{setTimeout(=>this.updateSize,0);const n=L.findSelectedItem.getData.toLowerCase;if(this.actionsToTake[t].requests[l].action=n,!C||!m){const p=new OO.ui.MenuTagMultiselectWidget({allowArbitrary:!1,allowReordering:!1,options:Object.entries(this.redirectTemplates).map(([v,{redirect:D}])=>{if(!D)return{data:v,label:v};const E=new OO.ui.HtmlSnippet(`${v} (redirect with possibilities)`);return{data:v,label:E}})});p.getMenu.filterMode="substring",p.on("change",=>{const v=p.getValue.sort((E,x)=>E.toLowerCase.localeCompare(x.toLowerCase));p.getValue.join(";")!==v.join(";")&&p.setValue(v),this.actionsToTake[t].requests[l].redirectTemplates=v;for(const E of j)E.details.style.display="none";let D=0;for(const E of p.getValue){const x=j.find(U=>U.name===E);x&&(x.details.style.display="block",D++)}f.textContent=`Template parameters (${D>0?`for ${D} template${D>1?"s":""}`:"none to show"})`,V.style.display=D>0?"none":"block"}),C=new OO.ui.FieldLayout(p,{classes:["afcrc-helper-tag-select-layout"],align:"inline",label:"Redirect templates:"}),A.$element[0].before(C.$element[0]),m=document.createElement("details"),m.classList.add("afcrc-helper-template-parameters-container");const f=document.createElement("summary");f.textContent="Template parameters (none to show)",m.append(f);for(const[v,D]of Object.entries(this.redirectTemplates)){const E=Object.entries(D.parameters);if(E.length===0)continue;const x=document.createElement("details");x.style.display="none";const U=document.createElement("summary");U.textContent=v,x.append(U);const J={name:v,details:x,parameters:[]};for(const[H,R]of E){const G=new OO.ui.TextInputWidget({placeholder:R.default?.toString,required:R.required}),K=new OO.ui.FieldLayout(G,{label:new OO.ui.HtmlSnippet(`${H}${!R.label||H.toLowerCase===R.label?.toLowerCase?"":` (${R.label})`}${R.description?` (${R.description})`:""} (type: ${R.type}) ${R.suggested?" (suggested)":""}${R.example?` (example: "${R.example}")`:""}`),align:"inline"});x.append(K.$element[0]),J.parameters.push({name:H,aliases:R.aliases,editor:G})}m.append(x),j.push(J)}this.actionsToTake[t].requests[l].redirectTemplateParameters=j;const V=document.createElement("div");V.id="afcrc-helper-no-templates-message",V.textContent="No templates with parameters to display!",m.append(V),A.$element[0].before(m)}if(["accept","comment","close"].includes(n)){A.$element.show;const p=W.getValue.trim;p?this.actionsToTake[t].requests[l].comment=p:delete this.actionsToTake[t].requests[l].comment}else A.$element.hide,delete this.actionsToTake[t].requests[l].comment;switch(this.updateRequestColor(s,t),C.$element.hide,m.style.display="none",P.$element.hide,M.$element.hide,n){case"accept":{C.$element.show,m.style.display="block";break}case"deny":{P.$element.show;break}case"close":{M.$element.show;break}}});const q=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(([n,p])=>({data:`autofill:${n}`,label:`Autofilled text for ${p}`}))});q.on("change",=>{this.actionsToTake[t].requests[l].denyReason=q.getValue||"autofill:unlikely"}),q.setValue("autofill:unlikely"),q.getMenu.selectItemByData("autofill:unlikely");const P=new OO.ui.FieldLayout(q,{align:"inline",label:"Deny reason:",help:'Supports automatic reasoning, custom reasoning, or a combination of the two with "autofill:REASON, CUSTOM" format'});P.$element.hide;const S=new OO.ui.DropdownWidget({classes:["afcrc-closing-reason-input"],menu:{items:"No response","r"],["Succeeded","s"],["Withdrawn","w".map(([n,p])=>new OO.ui.MenuOptionWidget({data:p,label:n}))}});S.getMenu.on("choose",=>{const n=S.getMenu.findSelectedItem;this.actionsToTake[t].requests[l].closingReason={name:n.getLabel,id:n.getData},this.updateRequestColor(s,t)}),S.getMenu.selectItemByData("r"),this.actionsToTake[t].requests[l].closingReason={name:"No response",id:"r"};const M=new OO.ui.FieldLayout(S,{align:"inline",label:"Closing reason:"});M.$element.hide;const W=new OO.ui.TextInputWidget;W.on("change",=>{const n=W.getValue.trim;n?this.actionsToTake[t].requests[l].comment=n:delete this.actionsToTake[t].requests[l].comment});const A=new OO.ui.FieldLayout(W,{classes:["afcrc-comment-input"],align:"inline",label:"Comment:"});A.$element.hide,d.append(L.$element[0],P.$element[0],M.$element[0],A.$element[0]),O.append(d)}s.append(O),this.$body.append(s),this.updateSize}loadCategoryRequestElements(t){const e=this.parsedRequests[t],s=document.createElement("details");s.classList.add("afcrc-helper-request"),s.addEventListener("click",=>setTimeout(=>this.updateSize,0));const r=document.createElement("summary");r.innerHTML=`Category:${e.category}`,s.append(r);const i=document.createElement("div");i.classList.add("afcrc-helper-request-info");const c=document.createElement("span");c.style.color="dimgray",c.textContent="None";const a=document.createElement("span");a.style.color="dimgray",a.textContent="Unknown";const o=document.createElement("div"),h=document.createElement("b");if(h.textContent="Examples: ",o.append(h),e.examples.length>0)for(const[n,p]of e.examples.entries){const f=document.createElement("a");f.target="_blank",f.href=mw.util.getUrl(p),f.textContent=p,o.append(f),n!==e.examples.length-1&&o.append(", ")}else o.append(c.cloneNode(!0));i.append(o);const u=document.createElement("div"),y=document.createElement("b");if(y.textContent="Parents: ",u.append(y),e.parents.length>0)for(const[n,p]of e.parents.entries){const f=document.createElement("a");f.target="_blank",f.href=mw.util.getUrl(`Category:${p}`),f.textContent=p,u.append(f),n!==e.parents.length-1&&u.append(", ")}else u.append(c.cloneNode(!0));i.append(u);const k=document.createElement("div"),w=document.createElement("b");if(w.textContent="Requester: ",k.append(w),e.requester){const n=document.createElement("a");n.target="_blank",n.href=e.requester.type==="user"?mw.util.getUrl(`User:${e.requester.name}`):mw.util.getUrl(`Special:Contributions/${e.requester.name}`),n.textContent=e.requester.name,k.append(n)}else k.append(a.cloneNode(!0));i.append(k),s.append(i),s.append(document.createElement("hr"));const b=document.createElement("div");b.classList.add("afcrc-helper-request-responder");const T=new OO.ui.RadioSelectWidget({classes:["afcrc-helper-action-radio"],items:["Accept","Deny","Comment","Close","None"].map(n=>new OO.ui.RadioOptionWidget({data:n,label:n}))});T.selectItemByLabel("None"),T.on("choose",=>{setTimeout(=>this.updateSize,0);const n=T.findSelectedItem.getData.toLowerCase;if(this.actionsToTake[t].action=n,["comment","close"].includes(n)){A.$element.show;const p=W.getValue.trim;p?this.actionsToTake[t].comment=p:delete this.actionsToTake[t].comment}else A.$element.hide,delete this.actionsToTake[t].comment;switch(this.updateRequestColor(s,t),g.$element.hide,L.$element.hide,P.$element.hide,M.$element.hide,n){case"accept":{g.$element.show,L.$element.show;break}case"deny":{P.$element.show;break}case"close":{M.$element.show;break}}});const O=new _({placeholder:"Add pages here"});O.on("change",=>{let n=O.getValue;n=n.replace(new RegExp(`^(https?:)?/{2}?${mw.config.get("wgServer").replace(/^\/{2}/,"")}/wiki/`),""),n=n.replace(/^:/,""),n.length>0&&O.setValue(n[0].toUpperCase+n.slice(1).replaceAll("_"," "))}),O.on("showing-values",n=>{for(const p of n)l.addAllowedValue(p.data)});const l=new OO.ui.TagMultiselectWidget({allowReordering:!1,inputPosition:"outline",inputWidget:O});l.on("change",=>{const n=l.getValue.sort((p,f)=>p.toLowerCase.localeCompare(f.toLowerCase));l.getValue.join(";")!==n.join(";")&&l.setValue(n),this.actionsToTake[t].examples=n});const{examples:d}=this.actionsToTake[t];for(const n of d)l.addAllowedValue(n);l.setValue(d);const g=new OO.ui.FieldLayout(l,{align:"inline",label:"Pages to categorize:"});g.$element.hide;const C=new Q({placeholder:"Add categories here"});C.on("change",=>{let n=C.getValue;n=n.replace(new RegExp(`^(https?:)?/{2}?${mw.config.get("wgServer").replace(/^\/{2}/,"")}/wiki/`),""),n=n.replace(/^Category:/,""),n.length>0&&C.setValue(n[0].toUpperCase+n.slice(1).replaceAll("_"," "))}),C.on("showing-values",n=>{for(const p of n)m.addAllowedValue(p.data)});const m=new OO.ui.TagMultiselectWidget({allowReordering:!1,inputPosition:"outline",inputWidget:C});m.on("change",=>{const n=m.getValue.sort((p,f)=>p.toLowerCase.localeCompare(f.toLowerCase));m.getValue.join(";")!==n.join(";")&&m.setValue(n),this.actionsToTake[t].parents=n});const{parents:j}=this.actionsToTake[t];for(const n of j)m.addAllowedValue(n);m.setValue(j);const L=new OO.ui.FieldLayout(m,{align:"inline",label:"Categories:"});L.$element.hide;const q=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(([n,p])=>({data:`autofill:${n}`,label:`Autofilled text for ${p}`}))});q.on("change",=>{this.actionsToTake[t].denyReason=q.getValue||"autofill:unlikely"}),q.setValue("autofill:unlikely"),q.getMenu.selectItemByData("autofill:unlikely");const P=new OO.ui.FieldLayout(q,{align:"inline",label:"Deny reason:",help:'Supports automatic reasoning, custom reasoning, or a combination of the two with "autofill:REASON, CUSTOM" format'});P.$element.hide;const S=new OO.ui.DropdownWidget({classes:["afcrc-closing-reason-input"],menu:{items:"No response","r"],["Succeeded","s"],["Withdrawn","w".map(([n,p])=>new OO.ui.MenuOptionWidget({data:p,label:n}))}});S.getMenu.on("choose",=>{const n=S.getMenu.findSelectedItem;this.actionsToTake[t].closingReason={name:n.getLabel,id:n.getData},this.updateRequestColor(s,t)}),S.getMenu.selectItemByData("r"),this.actionsToTake[t].closingReason={name:"No response",id:"r"};const M=new OO.ui.FieldLayout(S,{align:"inline",label:"Closing reason:"});M.$element.hide;const W=new OO.ui.TextInputWidget;W.on("change",=>{const n=W.getValue.trim;n?this.actionsToTake[t].comment=n:delete this.actionsToTake[t].comment});const A=new OO.ui.FieldLayout(W,{classes:["afcrc-comment-input"],align:"inline",label:"Comment:"});A.$element.hide,b.append(T.$element[0],g.$element[0],L.$element[0],P.$element[0],M.$element[0],A.$element[0]),s.append(b),this.$body.append(s),this.updateSize}updateRequestColor(t,e){if(this.requestPageType==="redirect"){const s=Object.values(this.actionsToTake[e].requests),r=s.every(o=>o.action==="accept"||o.action==="deny"),i=s.find(o=>o.action==="close")?.closingReason?.id,c=s.every(o=>o.action==="close"&&o.closingReason?.id===i);let a="";if(r){const o=s.filter(u=>u.action==="accept").length,h=s.filter(u=>u.action==="deny").length;o>0&&h>0?a="#fff17e":o>0?a="#a0ffa0":a="#ffcece"}else c&&(i==="r"?a="#ffcece":i==="s"?a="#90c090":a="#b8b8b8");t.style.backgroundColor=a}else{const{action:s}=this.actionsToTake[e];let r="";s==="accept"?r="#a0ffa0":s==="deny"?r="#ffcece":s==="close"&&(this.actionsToTake[e].closingReason?.id==="r"?r="#ffcece":this.actionsToTake[e].closingReason?.id==="s"?r="#90c090":r="#b8b8b8"),t.style.backgroundColor=r}}async performActions{const t=new OO.ui.WindowManager;document.body.append(t.$element[0]);const e=new N;t.addWindows([e]),e.open;const s={accepted:0,denied:0,"commented on":0,closed:0};let r=(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;if(this.requestPageType==="redirect")if(this.actionsToTake.some(c=>Object.values(c.requests).some(a=>a.action!=="none"))){for(const{target:a,requests:o}of this.actionsToTake){const h=Object.values(o).some(d=>d.action==="accept"||d.action==="deny"),u=Object.values(o).every(d=>d.action==="accept"||d.action==="deny"),y=Object.values(o).find(d=>d.action==="close")?.closingReason?.id,k=Object.values(o).every(d=>d.action==="close"&&d.closingReason?.id===y),w=[],b=[],T=[],O=Object.keys(o).length;for(const[d,g]of Object.entries(o))switch(g.action){case"accept":{h&&!u?e.addLogEntry(`Not all requests to "${a}" were accepted or denied, the handling of "${d}" will be ignored.`,"warning"):(w.push(d),g.comment&&T.push([d,g.comment]),s.accepted++);break}case"deny":{h&&!u?e.addLogEntry(`Not all requests to "${a}" were accepted or denied, the handling of "${d}" is being ignored.`,"warning"):(b.push([d,g.denyReason]),s.denied++);break}case"comment":{g.comment?(T.push([d,g.comment]),s["commented on"]++):e.addLogEntry(`The request to create "${d}" \u2192 "${a}" was marked to be commented on, but no comment was provided so it will be skipped.`,"warning");break}case"close":{k?(g.comment&&T.push([d,g.comment]),s.closed++):e.addLogEntry(`Not all requests to "${a}" were closed with the same reason, the handling of "${d}" is being ignored.`,"warning");break}}let l={pageText:r,...Object.values(o)[0].originalText};if(T.length>0&&(l=this.modifySectionData(l,{append:this.mapComments(T,O===1,T.length===O)})),u){let d;if(w.length>0&&b.length>0){d="p";const g=`* (${w.map(m=>`${m}`).join(", ")}) ~`,C=this.mapDeniedReasons(b,!1,!1);for(const m of w)this.handleAcceptedRedirect(m,o[m],a);l=this.modifySectionData(l,{append:`${g} ${C}`})}else if(w.length>0){d="a";for(const g of w)this.handleAcceptedRedirect(g,o[g],a);l=this.modifySectionData(l,{append:`* all":""} ~`})}else d="d",l=this.modifySectionData(l,{append:this.mapDeniedReasons(b,O===1,!0)});l=this.modifySectionData(l,{prepend:``,append:""})}else k&&(l=this.modifySectionData(l,{prepend:``,append:""}));r=l.pageText}if(this.beforeText+this.pageContent===r)return e.addLogEntry("No requests have been handled (page content identical)!");const c=Object.entries(s).filter(([,a])=>a>0).map(([a,o])=>`${a} ${o}`).join(", ");this.editsCreationsToMake.push({type:"edit",title:this.pageTitle,transform:=>({text:r,summary:`Handling AfC redirect requests (${c})${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!");else if(this.actionsToTake.some(c=>c.action!=="none")){for(const a of this.actionsToTake){let o={pageText:r,...a.originalText};switch(a.action){case"accept":{o=this.modifySectionData(o,{prepend:"",append:`* ~ `}),this.handleAcceptedCategory(a),s.accepted++;break}case"deny":{o=this.modifySectionData(o,{prepend:"",append:`* ${this.formatDeniedReason(a.denyReason)} ~ `}),s.denied++;break}case"comment":{a.comment?(o=this.modifySectionData(o,{append:`* ~`}),s["commented on"]++):e.addLogEntry(`The request to create "${a.category}" was marked to be commented on, but no comment was provided so it will be skipped.`,"warning");break}case"close":{o=this.modifySectionData(o,{prepend:``,append:(a.comment?`*  ~`:"")+` {{AfC-c|b}`}),s.closed++;break}}r=o.pageText}if(this.beforeText+this.pageContent===r)return e.addLogEntry("No requests have been handled (page content identical)!");const c=Object.entries(s).filter(([,a])=>a>0).map(([a,o])=>`${a} ${o}`).join(", ");this.editsCreationsToMake.push({type:"edit",title:this.pageTitle,transform:=>({text:r,summary:`Handling AfC category requests (${c})${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!")}formatDeniedReason(t){const e=t.startsWith("autofill:")?t.match(/autofill:(\w+)/)[1]:`decline|2=${t}`,s=t.includes(",")?" "+t.slice(t.indexOf(",")+1).trim:"";return`${e}${s}`}mapDeniedReasons(t,e,s){if(e)return`* ${this.formatDeniedReason(t[0][1])} ~`;const r={};for(const[c,a]of t)r[a]||(r[a]=[]),r[a].push(c);const i=Object.entries(r);return i.map(([c,a])=>`* ${this.formatDeniedReason(c)}${i.length>1||!s?` (${a.map(o=>`${o}`).join(", ")})`:""} ~`).join(` `)}mapComments(t,e,s){if(e)return`* ~`;const r={};for(const[c,a]of t)r[a]||(r[a]=[]),r[a].push(c);const i=Object.entries(r);return i.map(([c,a])=>`* ${i.length>1||!s?` (${a.map(o=>`${o}`).join(", ")})`:""} ~`).join(` `)}modifySectionData(t,{prepend:e,append:s}){const{fullSectionText:r,sectionText:i}=t;return e&&(t.sectionText=e+` `+t.sectionText),s&&(t.sectionText+=` `+s),t.fullSectionText=t.fullSectionText.replace(i,t.sectionText),t.pageText=t.pageText.replace(r,t.fullSectionText),t}handleAcceptedRedirect(t,e,s){const r=e.redirectTemplates&&e.redirectTemplates.length>0?e.redirectTemplates.map(i=>{const c=e.redirectTemplateParameters?.find(o=>o.name===i);if(!c)return``;const a=c.parameters.map((o,h)=>{const u=o.editor.getValue.trim;return u?`|${o.name===(h+1).toString?"":`${o.name}=`}${u}`:null}).filter(Boolean).join("");return``}):null;this.editsCreationsToMake.push({type:"create",isRedirect:!0,title:t,text:`#REDIRECT ${s}${r?`
 * 1) afcrc-helper-no-templates-message {

`:""}`,summary:`Creating redirect to ${s} as requested at WP:AFC/R${this.scriptMessage}`},{type:"create",isRedirect:!1,title:mw.Title.newFromText(t).getTalkPage.getPrefixedText,text:``,summary:`Adding WikiProject Articles for creation banner${this.scriptMessage}`})}handleAcceptedCategory(t){this.editsCreationsToMake.push({type:"create",isRedirect:!1,title:`Category:${t.category}`,text:t.parents.map(e=>``).join(` `),summary:`Creating category as requested at WP:AFC/C${this.scriptMessage}`},{type:"create",isRedirect:!1,title:`Category talk:${t.category}`,text:``,summary:`Adding WikiProject Articles for creation banner${this.scriptMessage}`},...t.examples.map(e=>({type:"edit",title:e,transform:({content:s})=>({text:`${s} `,summary:`Adding page to Category:${t.category} as requested at WP:AFC/C${this.scriptMessage}`})})))}async makeAllEditsCreations(t){for(const e of this.editsCreationsToMake){const s=e.type==="edit"?this.api.edit(e.title,e.transform):this.api.create(e.title,{summary:e.summary},e.text),r=document.createElement("a");r.target="_blank",r.href=mw.util.getUrl(e.title,"isRedirect"in e&&e.isRedirect?{redirect:"no"}:void 0),r.textContent=e.title,t.addLogEntry(`${e.type==="edit"?"Editing":"Creating"} ${r.outerHTML}...`),await s.catch(async(i,c)=>{i==="ratelimited"?(t.addLogEntry(`Rate limited. Waiting for 70 seconds... (resuming at ${new Date(Date.now+7e4).toLocaleTimeString})`,"warning"),await new Promise(a=>setTimeout(a,7e4)),t.addLogEntry("Continuing...","success"),await s.catch((a,o)=>{t.addLogEntry(`Error ${e.type==="edit"?"editing":"creating"} ${r.outerHTML}: ${o?.error.info??"Unknown error"} (${a}).`,"error")})):t.addLogEntry(`Error ${e.type==="edit"?"editing":"creating"} ${r.outerHTML}: ${c?.error.info??"Unknown error"} (${i}).`,"error")})}}}Object.assign(I.prototype,OO.ui.ProcessDialog.prototype)});

// //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2NyaXB0cy9hZmNyYy1oZWxwZXIudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCB7IEFwaUVkaXRQYWdlUGFyYW1zLCBBcGlRdWVyeVJldmlzaW9uc1BhcmFtcyB9IGZyb20gJ3R5cGVzLW1lZGlhd2lraS9hcGlfcGFyYW1zJztcbmltcG9ydCB7IEFwaVF1ZXJ5QWxsUGFnZXNHZW5lcmF0b3JQYXJhbXMsIE1lZGlhV2lraURhdGFFcnJvciwgUGFnZVJldmlzaW9uc1Jlc3VsdCB9IGZyb20gJy4uL2dsb2JhbC10eXBlcyc7IC8vIGVzbGludC1kaXNhYmxlLWxpbmUgdW5pY29ybi9wcmV2ZW50LWFiYnJldmlhdGlvbnNcbmltcG9ydCB7IFJlZGlyZWN0VGVtcGxhdGVEYXRhLCBUZW1wbGF0ZUVkaXRvckVsZW1lbnRJbmZvIH0gZnJvbSAnLi9yZWRpcmVjdC1oZWxwZXInO1xuXG5tdy5sb2FkZXIudXNpbmcoWydtZWRpYXdpa2kudXRpbCcsICdvb2pzLXVpLW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xlID0gbXcuVGl0bGUubmV3RnJvbVRleHQodmFsdWUpO1xuXG4gICAgICAgICAgICB0aGlzLmFwaVxuICAgICAgICAgICAgICAgIC5nZXQoe1xuICAgICAgICAgICAgICAgICAgICBhY3Rpb246ICdxdWVyeScsXG4gICAgICAgICAgICAgICAgICAgIGZvcm1hdHZlcnNpb246ICcyJyxcbiAgICAgICAgICAgICAgICAgICAgZ2FwbGltaXQ6IDIwLFxuICAgICAgICAgICAgICAgICAgICBnYXBuYW1lc3BhY2U6IHBhcnNlZFRpdGxlPy5nZXROYW1lc3BhY2VJZCgpID8/IDAsXG4gICAgICAgICAgICAgICAgICAgIGdhcHByZWZpeDogcGFyc2VkVGl0bGU/LmdldE1haW5UZXh0KCkgPz8gdmFsdWUsXG4gICAgICAgICAgICAgICAgICAgIGdlbmVyYXRvcjogJ2FsbHBhZ2VzJyxcbiAgICAgICAgICAgICAgICB9IHNhdGlzZmllcyBBcGlRdWVyeUFsbFBhZ2VzR2VuZXJhdG9yUGFyYW1zKVxuICAgICAgICAgICAgICAgIC5jYXRjaCgoKSA9PiBudWxsKVxuICAgICAgICAgICAgICAgIC50aGVuKChyZXN1bHQ6IHsgcXVlcnk6IHsgcGFnZXM6IHsgdGl0bGU6IHN0cmluZyB9W10gfSB9IHwgbnVsbCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0Py5xdWVyeT8ucGFnZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhZ2VzID0gcmVzdWx0LnF1ZXJ5LnBhZ2VzLm1hcCgocGFnZSkgPT4gKHsgZGF0YTogcGFnZS50aXRsZSwgbGFiZWw6IHBhZ2UudGl0bGUgfSkpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXQoJ3Nob3dpbmctdmFsdWVzJywgcGFnZXMpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKHBhZ2VzKTtcbiAgICAg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ICAgc3VwZXIoY29uZmlnKTtcbiAgICAgICAgICAgIE9PLnVpLm1peGluLkxvb2t1cEVsZW1lbnQuY2FsbCh0aGlzIGFzIHVua25vd24gYXMgT08udWkubWl4aW4uTG9va3VwRWxlbWVudCwgY29uZmlnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGdldExvb2t1cFJlcXVlc3QgPSAoKSA9PiB7XG4gICAgICAgICAgICBjb25zdCB2YWx1ZSA9IHRoaXMuZ2V0VmFsdWUoKTtcbiAgICAgICAgICAgIGNvbnN0IGRlZmVycmVkID0gJC5EZWZlcnJlZCgpO1xuXG4gICAgICAgICAgICBpZiAoIXZhbHVlKSBkZWZlcnJlZC5yZXNvbHZlKFtdKTtcblxuICAgICAgICAgICAgY29uc3QgcGFyc2VkVGl0bGUgPSBtdy5UaXRsZS5uZXdGcm9tVGV4dCh2YWx1ZSk7XG5cbiAgICAgICAgICAgIHRoaXMuYXBpXG4gICAgICAgICAgICAgICAgLmdldCh7XG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbjogJ3F1ZXJ5JyxcbiAgICAgICAgICAgICAgICAgICAgZm9ybWF0dmVyc2lvbjogJzInLFxuICAgICAgICAgICAgICAgICAgICBnYXBsaW1pdDogMjAsXG4gICAgICAgICAgICAgICAgICAgIGdhcG5hbWVzcGFjZTogMTQsXG4gICAgICAgICAgICAgICAgICAgIGdhcHByZWZpeDogcGFyc2VkVGl0bGU/LmdldE1haW5UZXh0KCkgPz8gdmFsdWUsXG4gICAgICAgICAgICAgICAgICAgIGdlbmVyYXRvcjogJ2FsbHBhZ2VzJyxcbiAgICAgICAgICAgICAgICAgICAgcHJvcDogJ2NhdGVnb3JpZXMnLFxuICAgICAgICAgICAgICAgIH0gc2F0aXNmaWVzIEFwaVF1ZXJ5QWxsUGFnZXNHZW5lcmF0b3JQYXJhbXMpXG4gICAgICAgICAgICAgICAgLmNhdGNoKCgpID0+IG51bGwpXG4gICAgICAgICAgICAgICAgLnRoZW4oKHJlc3VsdDogeyBxdWVyeTogeyBwYWdlczogeyB0aXRsZTogc3RyaW5nOyBjYXRlZ29yaWVzPzogeyB0aXRsZTogc3RyaW5nIH1bXSB9W10gfSB9IHwgbnVsbCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0Py5xdWVyeT8ucGFnZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhZ2VzID0gcmVzdWx0LnF1ZXJ5LnBhZ2VzIC8vXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmZpbHRlcigocGFnZSkgPT4gIXBhZ2UuY2F0ZWdvcmllcz8uc29tZSgoY2F0ZWdvcnkpID0+IGNhdGVnb3J5LnRpdGxlID09PSAnQ2F0ZWdvcnk6V2lraXBlZGlhIHNvZnQgcmVkaXJlY3RlZCBjYXRlZ29yaWVzJykpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcCgocGFnZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB0aXRsZVdpdGhvdXROYW1lc3BhY2UgPSBwYWdlLnRpdGxlLnNwbGl0KCc6JylbMV07XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgZGF0YTogdGl0bGVXaXRob3V0TmFtZXNwYWNlLCBsYWJlbDogdGl0bGVXaXRob3V0TmFtZXNwYWNlIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZW1pdCgnc2hvd2luZy12YWx1ZXMnLCBwYWdlcyk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUocGFnZXMpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgZGVmZXJyZWQucmVzb2x2ZShbXSk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIHJldHVybiBkZWZlcnJlZC5wcm9taXNlKHsgYWJvcn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W1wbGF0ZXMtbWVzc2FnZSB7XG4gICAgcGFkZGluZzogNXB4O1xufWApO1xuICAgICAgICB9XG5cbiAgICAgICAgZ2V0QWN0aW9uUHJvY2VzcyA9IChhY3Rpb246IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgaWYgKGFjdGlvbiA9PT0gJ2NhbmNlbCcpXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBPTy51aS5Qcm9jZXNzKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5nZXRNYW5hZ2VyKCkuY2xvc2VXaW5kb3codGhpcyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBlbHNlIGlmIChhY3Rpb24gPT09ICdzYXZlJylcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IE9PLnVpLlByb2Nlc3MoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBlcmZvcm1BY3Rpb25zKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBlbHNlIHJldHVybiBBZmNyY0hlbHBlckRpYWxvZy5zdXBlci5wcm90b3R5cGUuZ2V0QWN0aW9uUHJvY2Vzcy5jYWxsKHRoaXMsIGFjdGlvbik7XG4gICAgICAgIH07XG5cbiAgICAgICAgZ2V0VGVhcmRvd25Qcm9jZXNzID0gKCkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIEFmY3JjSGVscGVyRGlhbG9nLnN1cGVyLnByb3RvdHlwZS5nZXRUZWFyZG93blByb2Nlc3MuY2FsbCh0aGlzKS5uZXh0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAodGhpcyBhcyB1bmtub3duIGFzIHsgJGJvZHk6IEpRdWVyeSB9KS4kYm9keS5lbXB0eSgpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIExvYWQgZWxlbWVudHMgaW4gdGhlIHdpbmRvdy5cbiAgICAgICAgICovXG4gICAgICAgIHB1YmxpYyBhc3luYyBsb2FkKCkge1xuICAgICAgICAgICAgY29uc3QgcmVkaXJlY3RUZW1wbGF0ZVJlc3BvbnNlID0gKGF3YWl0IHRoaXMuYXBpLmdldCh7XG4gICAgICAgICAgICAgICAgYWN0aW9uOiAncXVlcnknLFxuICAgICAgICAgICAgICAgIGZvcm1hdHZlcnNpb246ICcyJyxcbiAgICAgICAgICAgICAgICBwcm9wOiAncmV2aXNpb25zJyxcbiAgICAgICAgICAgICAgICBydnByb3A6ICdjb250ZW50JyxcbiAgICAgICAgICAgICAgICBydnNsb3RzOiAnbWFpbicsXG4gICAgICAgICAgICAgICAgdGl0bGVzOiAnVXNlcjpFZWppdDQzL3NjcmlwdHMvcmVkaXJlY3QtaGVscGVyLmpzb24nLFxuICAgICAgICAgICAgfSBzYXRpc2ZpZXMgQXBpUXVlcnlSZXZpc2lvbnNQYXJhbXMpKSBhcyBQYWdlUmV2aXNpb25zUmVzdWx0O1xuXG4gICAgICAgICAgICB0aGlzLnJlZGlyZWN0VGVtcGxhdGVzID0gSlNPTi5wYXJzZShyZWRpcmVjdFRlbXBsYXRlUmVzcG9uc2UucXVlcnkucGFnZXM/LlswXT8ucmV2aXNpb25zPy5bMF0/LnNsb3RzPy5tYWluPy5jb250ZW50IHx8ICd7fScpIGFzIFJlZGlyZWN0VGVtcGxhdGVEYXRhO1xuXG4gICAgICAgICAgICBjb25zdCBwYWdlUmV2aXNpb24gPSAoYXdhaXQgdGhpcy5hcGkuZ2V0KHtcbiAgICAgICAgICAgICAgICBhY3Rpb246ICdxdWVyeScsXG4gICAgICAgICAgICAgICAgZm9ybWF0dmVyc2lvbjogJzInLFxuICAgICAgICAgICAgICAgIHByb3A6ICdyZXZpc2lvbnMnLFxuICAgICAgICAgICAgICAgIHJ2cHJvcDogJ2NvbnRlbnQnLFxuICAgICAgICAgICAgICAgIHJ2c2xvdHM6ICdtYWluJyxcbiAgICAgICAgICAgICAgICB0aXRsZXM6IHRoaXMucGFnZVRpd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jb25zdCBzZWN0aW9uSGVhZGVyID0gc2VjdGlvblRleHQubWF0Y2goL149PSguKj8pPT0kL20pIVsxXS50cmltKCk7XG5cbiAgICAgICAgICAgICAgICBpZiAocmVxdWVzdFBhZ2VUeXBlID09PSAncmVkaXJlY3QnKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhcnNlZERhdGEgPSB7fSBhcyBSZWRpcmVjdFJlcXVlc3REYXRhO1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlcXVlc3RlZFBhZ2VzID0gWy4uLnNlY3Rpb25IZWFkZXIubWF0Y2hBbGwoL1xcW1xcWyguKj8pXV0vZyldLm1hcCgobWF0Y2gpID0+IG1hdGNoWzFdPy50cmltKCkucmVwbGFjZSgvXjovLCAnJykucmVwbGFjZUFsbCgnXycsICcgJykpLmZpbHRlcihCb29sZWFuKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlcXVlc3RlZFBhZ2VzLmxlbmd0aCA9PT0gMCkgY29udGludWU7XG5cbiAgICAgICAgICAgICAgICAgICAgcGFyc2VkRGF0YS5wYWdlcyA9IHJlcXVlc3RlZFBhZ2VzO1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhcnNlZFRhcmdldCA9IHNlY3Rpb25UZXh0XG4gICAgICAgICAgICAgICAgICAgICAgICAubWF0Y2goL1RhcmdldCBvZiByZWRpcmVjdDogP1xcW1xcWyguKj8pXV0vKT8uWzFdXG4gICAgICAgICAgICAgICAgICAgICAgICAudHJpbSgpXG4gICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvXjovLCAnJylcbiAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlQWxsKCdfJywgJyAnKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFwYXJzZWRUYXJnZXQpIGNvbnRpbnVlO1xuXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlZERhdGEudGFyZ2V0ID0gcGFyc2VkVGFyZ2V0O1xuXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlZERhdGEucmVhc29uID0gc2VjdGlvblRleHQubWF0Y2goL3JlYXNvbjogPyguKj8pXFwqc291cmNlKD86IFxcKGlmIGFwcGxpY2FibGVcXCkpPzovaXMpPy5bMV0udHJpbSgpID8/ICcnO1xuXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlZERhdGEuc291cmNlID0gc2VjdGlvblRleHQubWF0Y2goL3NvdXJjZSg/OiBcXChpZiBhcHBsaWNhYmxlXFwpKT86ID8oLio/KSg/OjxyZWZlcmVuY2VzIFxcLz58XFxuXFxuKS9pcyk/LlsxXS50cmltKCkgPz8gJyc7XG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVxdWVzdGVyID0gc2VjdGlvblRleHRcbiAgICAgICAgICAgICAgICAgICAgICAgIC5tYXRjaChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWN0aW9uVGV4dC5pbmNsdWRlcygnPHJlZmVyZW5jZXMgLz4nKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IC88cmVmZXJlbmNlcyBcXC8+XFxuKyguKikvXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbmV3IFJlZ0V4cChgKD86PHJlZmVyZW5jZXMgXFxcXC8+JHtwYXJzZWREYXRhLnNvdXJjZSA/IGB8JHtwYXJzZWREYXRhLnNvdXJjZS5yZXBsYWNlQWxsKC9bXFxzIyQoKSorLC4/W1xcXFxcXF1ee3x9LV0vZywgJ1xcXFwkJicpfWAgOiAnJ30pXFxuKyguKilgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICk/LlsxXVxuICAgICAgICAgICAgICAgICAgICAgICAgLnRyaW0oKTtcblxuICAgICAgICAgICAgICAgICAgICBjb25zdCBuYW1lID0gcmVxdWVzdGVyID8gcmVxdWVzdGVyLm1hdGNoKC8oPzpTcGVjaWFsOkNvbnRyaWJ1dGlvbnNcXC98VXNlcig/OiB0YWxrKT86KSguKj8pXFx8Lyk/LlsxXS50cmltKCkgOiBudWxsO1xuXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlZERhdGEucmVxdWVzdGVyID0gcmVxdWVzdGVyICYmIG5hbWUgPyB7IHR5cGU6IC9cXFtcXFtVc2VyKCB0YWxrKT86Ly50ZXN0KHJlcXVlc3RlcikgPyAndXNlcicgOiAnaXAnLCBuYW1lIH0gOiBudWxsO1xuXG4gICAgICAgICAgICAgICAgICAgICh0aGlzLnBhcnNlZFJlcXVlc3RzIGFzIFJlZGlyZWN0UmVxdWVzdERhdGFbXSkucHVzaChwYXJzZWREYXRhKTtcblxuICAgICAgICAgICAgICAgICAgICAodGhpcy5hY3Rpb25zVG9UYWtlIGFzIFJlZGlyZWN0QWN0aW9ucykucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXQ6IHBhcnNlZERhdGEudGFyZ2V0LFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdHM6IE9iamVjdC5mcm9tRW50cmllcyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1ZXN0ZWRQYWdlcy5tYXAoKHBhZ2UpID0+IFtwYWdlLCB7IG9yaWdpbmFsVGV4dDogeyBmdWxsU2VjdGlvblRleHQ6IHNlY3Rpb25UZXh0LCBzZWN0aW9uVGV4dDogc2VjdGlvblRleHQucmVwbGFjZSgvXj09Lio/PT0kL20sICcnKS50cmltKCkgfSwgYWN0aW9uOiAnbm9uZScgfV0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFyc2VkRGF0YSA9IHt9IGFzIENhdGVnb3J5UmVxdWVzdERhdGE7XG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZm91bmRDYXRlZ29yeSA9IHNlY3Rpb25IZWFkZXIubWF0Y2goLzo/Q2F0ZWdvcnk6KC4qPykoXV18JCkvKT8uWzFdLnRyaW0oKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFmb3VuZENhdGVnb3J5KSBjb250aW51ZTtcblxuICAgICAgICAgICAgICAgICAgICBwYXJzZWREYXRhLmNhdGVnb3J5ID0gZm91bmRDYXRlZ29yeS5yZXBsYWNlQWxsKCdfJywgJyAnKTtcblxuICAgICAgICAgICAgICAgICAgICBwYXJzZWREYXRhLmV4YW1wbGVzID1cbiAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuLi4oc2VjdGlvblRleHQubWF0Y2goL2V4YW1wbGUgcGFnZXMgd2hpY2ggYmVsb25nIHRvIHRoaXMgY2F0ZWdvcnk6KC4qPykocGFyZW50IGNhdGVnb3J5XFwvY2F0ZWdvcmllczp8XFxuXFxbXFxbKHNwZWNpYWw6Y29udHJpYnV0aW9uc1xcL3x1c2VyOikpL2lzKT8uWzFdID8/ICcnKS5tYXRjaEFsbChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL1xcKlxccyooPzpcXFtcXFspPyguKj8pKFxcfHxdXXxcXHMqP1xcbikvZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoKG1hdGNoKSA9PiBtYXRjaFsxXS50cmltKCkucmVwbGFjZSgvXjovLCAnJykucmVwbGFjZUFsbCgnXycsICcgJykpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmZpbHRlcihCb29sZWFuKSA/PyBbXTtcblxuICAgICAgICAgICAgICAgICAgICBwYXJzZWREYXRhLnBhcmVudHMgPVxuICAgICAgICAgICAgICAgICAgICAgICAgWy4uLihzZWN0aW9uVGV4dC5tYXRjaCgvcGFyZW50IGNhdGVnb3J5XFwvY2F0ZWdvcmllczooLio/KShcXG5cXG58XFxuXFxbXFxbKHNwZWNpYWw6Y29udHJpYnV0aW9uc1xcL3x1c2VyOikpL2lzKT8uWzFdID8/ICcnKS5tYXRjaEFsbCgvKD88IVxcfCkjPzo/Q2F0ZWdvcnk6KC4qPykoXFx8fF1dfFxccyo/XFxuKS9nKV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/Lm1hcCgobWF0Y2gpID0+IG1hdGNoWzFdLnRyaW0oKS5yZXBsYWNlKC9eOi8sICcnKS5yZXBsYWNlQWxsKCdfJywgJyAnKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKEJvb2xlYW4pID8/IFtdO1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGZpcnN0VXNlckluZGV4ID0gc2VjdGlvblRleHQuaW5kZXhPZignW1tVc2VyOicpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBmaXJzdFVzZXJUYWxrSW5kZXggPSBzZWN0aW9uVGV4dC5pbmRleE9mKCdbW1VzZXIgdGFsazonKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZmlyc3RJcEluZGV4ID0gc2VjdGlvblRleHQuaW5kZXhPZignW1tTcGVjaWFsOkNvbnRyaWJ1dGlvbnMvJyk7XG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZmlyc3RJbmRleCA9IE1hdGgubWluKC4uLltmaXJzdFVzZXJJbmRleCwgZmlyc3RVc2VyVGFsa0luZGV4LCBmaXJzdElwSW5kZXhdLmZpbHRlcigoaW5kZXgpID0+IGluZGV4ICE9PSAtMSkpO1xuXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlZERhdGEucmVxdWVzdGVyID1cbiAgICAgICAgICAgICAgICAgICAgICAgIGZpcnN0SW5kZXggPT09IE51bWJlci5QT1NJVElWRV9JTkZJTklUWVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbnVsbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogZmlyc3RJbmRleCA9PT0gZmlyc3RJcEluZGV4XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHsgdHlwZTogJ2lwJywgbmFtZTogc2VjdGlvblRleHQubWF0Y2goL1xcW1xcW1NwZWNpYWw6Q29udHJpYnV0aW9uc1xcLyguKj8pKFxcfHxdXSkvKSFbMV0udHJpbSgpIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogeyB0eXBlOiAndXNlcicsIG5hbWU6IHNlY3Rpb25UZXh0Lm1hdGNoKC9cXFtcXFtVc2VyKD86IHRhbGspPzooLio/KShcXHx8XV0pLykhWzFdLnRyaW0oKSB9O1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXBhcnNlZERhdGEucmVxdWVzdGVyPy5uYW1lKSBwYXJzZWREYXRhLnJlcXVlc3RlciA9IG51bGw7XG5cbiAgICAgICAgICAgICAgICAgICAgKHRoaXMucGFyc2VkUmVxdWVzdHMgYXMgQ2F0ZWdvcnlSZXF1ZXN0RGF0YVtdKS5wdXNoKHBhcnNlZERhdGEpO1xuXG4gICAgICAgICAgICAgICAgICAgICh0aGlzLmFjdGlvbnNUb1Rha2UgYXMgQ2F0ZWdvcnlBY3Rpb25zKS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVnb3J5OiBwYXJzZWREYXRhLmNhdGVnb3J5LFxuICAgICAgICAgICAgICAgICAgICAgICAgZXhhbXBsZXM6IHBhcnNlZERhdGEuZXhhbXBsZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnRzOiBwYXJzZWREYXRhLnBhcmVudHMsXG4gICAgICAgICAgICAgICAgICAgICAgICBvcmlnaW5hbFRleHQ6IHsgZnVsbFNlY3Rpb25UZXh0OiBzZWN0aW9uVGV4dCwgc2VjdGlvblRleHQ6IHNlY3Rpb25UZXh0LnJlcGxhY2UoL149PS4qPz09JC9tLCAnJykudHJpbSgpIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb246ICdub25lJyxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIExvYWRzIHRoZSBpbnB1dCBlbGVtZW50cyBpbiB0aGUgZGlhbG9nLlxuICAgICAgICAgKi9cbiAgICAgICAgcHJpdmF0ZSBsb2FkSW5wdXRFbGVtZW50cygpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnBhcnNlZFJlcXVlc3RzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5kZXggPSAwO1xuXG4gICAgICAgICAgICAgICAgY29uc3QgaGFuZGxlID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBiYXRjaFNpemUgPSA1O1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBlbmRJbmRleCA9IE1hdGgubWluKGluZGV4ICsgYmF0Y2hTaXplLCB0aGlzLnBhcnNlZFJlcXVlc3RzLmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgICAgICh0aGlzIGFzIHVua25vd24gYXMgeyB0aXRsZTogT08udWkuTGFiZWxXaWRnZXQgfSkudGl0bGUuc2V0TGFiZWwoYGFmY3JjLWhlbHBlciAobG9hZGluZyAke2luZGV4ICsgMX0tJHtlbmRJbmRleH0vJHt0aGlzLnBhcnNlZFJlcXVlc3RzLmxlbmd0aH0gcmVxdWVzdHMpYCk7XG5cbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgc3ViSW5kZXggPSBpbmRleDsgc3ViSW5kZXggPCBlbmRJbmRleDsgc3ViSW5kZXgrKylcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnJlcXVlc3RQYWdlVHlwZSA9PT0gJ3JlZGlyZWN0JykgdGhpcy5sb2FkUmVkaXJlY3RSZXF1ZXN0RWxlbWVudHMoc3ViSW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB0aGlzLmxvYWRDYXRlZ29yeVJlcXVlc3RFbG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9uZSddLm1hcCgobGFiZWwpID0+IG5ldyBPTy51aS5SYWRpb09wdGlvbldpZGdldCh7IGRhdGE6IGxhYmVsLCBsYWJlbCB9KSksXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgYWN0aW9uUmFkaW9JbnB1dC5zZWxlY3RJdGVtQnlMYWJlbCgnTm9uZScpO1xuICAgICAgICAgICAgICAgIGFjdGlvblJhZGlvSW5wdXQub24oJ2Nob29zZScsICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB0aGlzLnVwZGF0ZVNpemUoKSwgMCk7XG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3B0aW9uID0gKChhY3Rpb25SYWRpb0lucHV0LmZpbmRTZWxlY3RlZEl0ZW0oKSBhcyBPTy51aS5SYWRpb09wdGlvbldpZGdldCkuZ2V0RGF0YSgpIGFzIHN0cmluZykudG9Mb3dlckNhc2UoKSBhcyBBY3Rpb25UeXBlO1xuXG4gICAgICAgICAgICAgICAgICAgICh0aGlzLmFjdGlvbnNUb1Rha2UgYXMgUmVkaXJlY3RBY3Rpb25zKVtpbmRleF0ucmVxdWVzdHNbcmVxdWVzdGVkVGl0bGVdLmFjdGlvbiA9IG9wdGlvbjtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoIXRhZ1NlbGVjdExheW91dCB8fCAhdGVtcGxhdGVQYXJhbWV0ZXJzRWRpdG9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB0YWdTZWxlY3QgPSBuZXcgT08udWkuTWVudVRhZ011bHRpc2VsZWN0V2lkZ2V0KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGxvd0FyYml0cmFyeTogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxsb3dSZW9yZGVyaW5nOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiBPYmplY3QuZW50cmllcyh0aGlzLnJlZGlyZWN0VGVtcGxhdGVzKS5tYXAoKFt0YWcsIHsgcmVkaXJlY3QgfV0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFyZWRpcmVjdCkgcmV0dXJuIHsgZGF0YTogdGFnLCBsYWJlbDogdGFnIH07XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbGFiZWwgPSBuZXcgT08udWkuSHRtbFNuaXBwZXQoYCR7dGFnfSA8aT4ocmVkaXJlY3Qgd2l0aCBwb3NzaWJpbGl0aWVzKTwvaT5gKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBkYXRhOiB0YWcsIGxhYmVsIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICh0YWdTZWxlY3QuZ2V0TWVudSgpIGFzIE9PLnVpLk1lbnVTZWxlY3RXaWRnZXQuQ29uZmlnT3B0aW9ucykuZmlsdGVyTW9kZSA9ICdzdWJzdHJpbmcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGFnU2VsZWN0Lm9uKCdjaGFuZ2UnLCAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc29ydGVkVGFncyA9ICh0YWdTZWxlY3QuZ2V0VmFsdWUoKSBhcyBzdHJpbmdbXSkuc29ydCgoYSwgYikgPT4gYS50b0xvd2VyQ2FzZSgpLmxvY2FsZUNvbXBhcmUoYi50b0xvd2VyQ2FzZSgpKSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHRhZ1NlbGVjdC5nZXRWYWx1ZSgpIGFzIHN0cmluZ1tdKS5qb2luKCc7JykgIT09IHNvcnRlZFRhZ3Muam9pbignOycpKSB0YWdTZWxlY3Quc2V0VmFsdWUoc29ydGVkVGFncyk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAodGhpcy5hY3Rpb25zVG9UYWtlIGFzIFJlZGlyZWN0QWN0aW9ucylbaW5kZXhdLnJlcXVlc3RzW3JlcXVlc3RlZFRpdGxlXS5yZWRpcmVjdFRlbXBsYXRlcyA9IHNvcnRlZFRhZ3M7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IGVkaXRvckluZm8gb2YgdGVtcGxhdGVFZGl0b3JzSW5mbykgZWRpdG9ySW5mby5kZXRhaWxzLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2hvd25UZW1wbGF0ZUVkaXRvcnMgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoY29uc3QgdGFnIG9mIHRhZ1NlbGVjdC5nZXRWYWx1ZSgpIGFzIHN0cmluZ1tdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGVkaXRvckluZm8gPSB0ZW1wbGF0ZUVkaXRvcnNJbmZvLmZpbmQoKGVkaXRvckluZm8pID0+IGVkaXRvckluZm8ubmFtZSA9PT0gdGFnKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZWRpdG9ySW5mbykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWRpdG9ySW5mby5kZXRhaWxzLnN0eWxlLmRpc3BsYXkgPSAnYmxvY2snO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd25UZW1wbGF0ZUVkaXRvcnMrKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1bW1hcnlFbGVtZW50LnRleHRDb250ZW50ID0gYFRlbXBsYXRlIHBhcmFtZXRlcnMgKCR7c2hvd25UZW1wbGF0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UVsZW1lbnQudGV4dENvbnRlbnQgPSAnVGVtcGxhdGUgcGFyYW1ldGVycyAobm9uZSB0byBzaG93KSc7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZVBhcmFtZXRlcnNFZGl0b3IuYXBwZW5kKHN1bW1hcnlFbGVtZW50KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBbdGVtcGxhdGVOYW1lLCB0ZW1wbGF0ZURhdGFdIG9mIE9iamVjdC5lbnRyaWVzKHRoaXMucmVkaXJlY3RUZW1wbGF0ZXMpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFyYW1ldGVycyA9IE9iamVjdC5lbnRyaWVzKHRlbXBsYXRlRGF0YS5wYXJhbWV0ZXJzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1ldGVycy5sZW5ndGggPT09IDApIGNvbnRpbnVlO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZGV0YWlscyA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RldGFpbHMnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXRhaWxzLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdW1tYXJ5ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnc3VtbWFyeScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1bW1hcnkudGV4dENvbnRlbnQgPSB0ZW1wbGF0ZU5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGV0YWlscy5hcHBlbmQoc3VtbWFyeSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbGVtZW50RGF0YTogVGVtcGxhdGVFZGl0b3JFbGVtZW50SW5mbyA9IHsgbmFtZTogdGVtcGxhdGVOYW1lLCBkZXRhaWxzLCBwYXJhbWV0ZXJzOiBbXSB9O1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBbcGFyYW1ldGVyTmFtZSwgcGFyYW1ldGVyRGF0YV0gb2YgcGFyYW1ldGVycykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpbnB1dCA9IG5ldyBPTy51aS5UZXh0SW5wdXRXaWRnZXQoeyBwbGFjZWhvbGRlcjogcGFyYW1ldGVyRGF0YS5kZWZhdWx0Py50b1N0cmluZygpLCByZXF1aXJlZDogcGFyYW1ldGVyRGF0YS5yZXF1aXJlZCB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpbnB1dExheW91dCA9IG5ldyBPTy51aS5GaWVsZExheW91dChpbnB1dCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IG5ldyBPTy51aS5IdG1sU25pcHBldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgJHtwYXJhbWV0ZXJOYW1lfSR7IXBhcmFtZXRlckRhdGEubGFiZWwgfHwgcGFyYW1ldGVyTmFtZS50b0xvd2VyQ2FzZSgpID09PSBwYXJhbWV0ZXJEYXRhLmxhYmVsPy50b0xvd2VyQ2FzZSgpID8gJycgOiBgICgke3BhcmFtZXRlckRhdGEubGFiZWx9KWB9JHtwYXJhbWV0ZXJEYXRhLmRlc2NyaXB0aW9uID8gYCAoJHtwYXJhbWV0ZXJEYXRhLmRlc2NyaXB0aW9ufSlgIDogJyd9ICh0eXBlOiAke3BhcmFtZXRlckRhdGEudHlwZX0pICR7cGFyYW1ldGVyRGF0YS5zdWdnZXN0ZWQgPyAnIChzdWdnZXN0ZWQpJyA6ICcnfSR7cGFyYW1ldGVyRGF0YS5leGFtcGxlID8gYCAoZXhhbXBsZTogXCIke3BhcmFtZXRlckRhdGEuZXhhbXBsZX1cIilgIDogJyd9YCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGlnbjogJ2lubGluZScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXRhaWxzLmFwcGVuZChpbnB1dExheW91dC4kZWxlbWVudFswXSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxlbWVudERhdGEucGFyYW1ldGVycy5wdXNoKHsgbmFtZTogcGFyYW1ldGVyTmFtZSwgYWxpYXNlczogcGFyYW1ldGVyRGF0YS5hbGlhc2VzLCBlZGl0b3I6IGlucHV0IH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlUGFyYW1ldGVyc0VkaXRvci5hcHBlbmQoZGV0YWlscyk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZUVkaXRvcnNJbmZvLnB1c2goZWxlbWVudERhdGEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAodGhpcy5hY3Rpb25zVG9UYWtlIGFzIFJlZGlyZWN0QWN0aW9ucylbaW5kZXhdLnJlcXVlc3RzW3JlcXVlc3RlZFRpdGxlXS5yZWRpcmVjdFRlbXBsYXRlUGFyYW1ldGVycyA9IHRlbXBsYXRlRWRpdG9yc0luZm87XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5vVGVtcGxhdGVzTWVzc2FnZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbm9UZW1wbGF0ZXNNZXNzYWdlLmlkID0gJ2FmY3JjLWhlbHBlci1uby10ZW1wbGF0ZXMtbWVzc2FnZSc7XG4gICAgICAgICAgICAgICAgICAgICAgICBub1RlbXBsYXRlc01lc3NhZ2UudGV4dENvbnRlbnQgPSAnTm8gdGVtcGxhdGVzIHdpdGggcGFyYW1ldGVycyB0byBkaXNwbGF5ISc7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlUGFyYW1ldGVyc0VkaXRvci5hcHBlbmQobm9UZW1wbGF0ZXNNZXNzYWdlKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgY29tbWVudElucHV0TGF5b3V0LiRlbGVtZW50WzBdLmJlZm9yZSh0ZW1wbGF0ZVBhcmFtZXRlcnNFZGl0b3IpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKFsnYWNjZXB0JywgJ2NvbW1lbnQnLCAnY2xvc2UnXS5pbmNsdWRlcyhvcHRpb24pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb21tZW50SW5wdXRMYXlvdXQuJGVsZW1lbnQuc2hvdygpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21tZW50ID0gY29tbWVudElucHV0LmdldFZhbHVlKCkudHJpbSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbW1lbnQpICh0aGlzLmFjdGlvbnNUb1Rha2UgYXMgUmVkaXJlY3RBY3Rpb25zKVtpbmRleF0ucmVxdWVzdHNbcmVxdWVzdGVkVGl0bGVdLmNvbW1lbnQgPSBjb21tZW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBkZWxldGUgKHRoaXMuYWN0aW9uc1RvVGFrZSBhcyBSZWRpcmVjdEFjdGlvbnMpW2luZGV4XS5yZXF1ZXN0c1tyZXF1ZXN0ZWRUaXRsZV0uY29tbWVudDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbW1lbnRJbnB1dExheW91dC4kZWxlbWVudC5oaWRlKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSAodGhpcy5hY3Rpb25zVG9UYWtlIGFzIFJlZGlyZWN0QWN0aW9ucylbaW5kZXhdLnJlcXVlc3RzW3JlcXVlc3RlZFRpdGxlXS5jb21tZW50O1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGVSZXF1ZXN0Q29sb3IoZGV0YWlsc0VsZW1lbnQsIGluZGV4KTtcblxuICAgICAgICAgICAgICAgICAgICB0YWdTZWxlY3RMYXlvdXQuJGVsZW1lbnQuaGlkZSgpO1xuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZVBhcmFtZXRlcnNFZGl0b3Iuc3R5bGUuZGlzcGxheSA9ICdub25lJztcbiAgICAgICAgICAgICAgICAgICAgZGVueVJlYXNvbkxheW91dC4kZWxlbWVudC5oaWRlKCk7XG4gICAgICAgICAgICAgICAgICAgIGNsb3NpbmdSZWFzb25MYXlvdXQuJGVsZW1lbnQuaGlkZSgpO1xuXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAob3B0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdhY2NlcHQnOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnU2VsZWN0TGF5b3V0LiRlbGVtZW50LnNob3coKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZVBhcmFtZXRlcnNFZGl0b3Iuc3R5bGUuZGlzcGxheSA9ICdibG9jayc7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2RlbnknOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVueVJlYXNvbkxheW91dC4kZWxlbWVudC5zaG93KCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2Nsb3NlJzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb3NpbmdSZWFzb25MYXlvdXQuJGVsZW1lbnQuc2hvdygpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGNvbnN0IGRlbnlSZWFzb24gPSBuZXcgT08udWkuQ29tYm9Cb3hJbnB1dFdpZGdldCh7XG4gICAgICAgICAgICAgICAgICAgIGNsYXNzZXM6IFsnYWZjcmMtY2xvc2luZy1yZWFzb24taW5wdXQnXSxcbiAgICAgICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI6ICdhdXRvZmlsbDp1bmxpa2VseScsXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIFsnZXhpc3RzJywgJ2V4aXN0aW5nIHBhZ2VzJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICBbJ2VtcHR5JywgJ2VtcHR5IHN1Ym1pc3Npb25zJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICBbJ25vdGFyZ2V0JywgJ25vbmV4aXN0ZW50IG9yIG5vIHByb3ZpZGVkIHRhcmdldCddLFxuICAgICAgICAgICAgICAgICAgICAgICAgWydub3RpdGxlJywgJ25vIHRpdGxlIHByb3ZpZGVkJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICBbJ3VubGlrZWx5JywgJ3VubGlrZWx5IHJlZGlyZWN0cyddLFxuICAgICAgICAgICAgICAgICAgICAgICAgWydub3RyZWRpcmVjdCcsICdhcnRpY2xlIGNyZWF0aW9uIHJlcXVlc3RzJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICBbJ2V4dGVybmFsbGluaycsICdleHRlcm5hbCBsaW5rIHJlZGly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Vhc29uaW5nLCBjdXN0b20gcmVhc29uaW5nLCBvciBhIGNvbWJpbmF0aW9uIG9mIHRoZSB0d28gd2l0aCBcImF1dG9maWxsOlJFQVNPTiwgQ1VTVE9NXCIgZm9ybWF0JyxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBkZW55UmVhc29uTGF5b3V0LiRlbGVtZW50LmhpZGUoKTtcblxuICAgICAgICAgICAgICAgIGNvbnN0IGNsb3NpbmdSZWFzb24gPSBuZXcgT08udWkuRHJvcGRvd25XaWRnZXQoe1xuICAgICAgICAgICAgICAgICAgICBjbGFzc2VzOiBbJ2FmY3JjLWNsb3NpbmctcmVhc29uLWlucHV0J10sXG4gICAgICAgICAgICAgICAgICAgIG1lbnU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgWydObyByZXNwb25zZScsICdyJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgWydTdWNjZWVkZWQnLCAncyddLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFsnV2l0aGRyYXduJywgJ3cnXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF0ubWFwKChbdGl0bGUsIGlkXSkgPT4gbmV3IE9PLnVpLk1lbnVPcHRpb25XaWRnZXQoeyBkYXRhOiBpZCwgbGFiZWw6IHRpdGxlIH0pKSxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBjbG9zaW5nUmVhc29uLmdldE1lbnUoKS5vbignY2hvb3NlJywgKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBzZWxlY3RlZCA9IGNsb3NpbmdSZWFzb24uZ2V0TWVudSgpLmZpbmRTZWxlY3RlZEl0ZW0oKSBhcyBPTy51aS5NZW51T3B0aW9uV2lkZ2V0O1xuXG4gICAgICAgICAgICAgICAgICAgICh0aGlzLmFjdGlvbnNU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FyZW50cy5lbnRyaWVzKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbGlua0VsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdhJyk7XG4gICAgICAgICAgICAgICAgICAgIGxpbmtFbGVtZW50LnRhcmdldCA9ICdfYmxhbmsnO1xuICAgICAgICAgICAgICAgICAgICBsaW5rRWxlbWVudC5ocmVmID0gbXcudXRpbC5nZXRVcmwoYENhdGVnb3J5OiR7cGFyZW50fWApO1xuICAgICAgICAgICAgICAgICAgICBsaW5rRWxlbWVudC50ZXh0Q29udGVudCA9IHBhcmVudDtcblxuICAgICAgICAgICAgICAgICAgICBwYXJlbnRzRGl2LmFwcGVuZChsaW5rRWxlbWVudCk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ICE9PSByZXF1ZXN0LnBhcmVudHMubGVuZ3RoIC0gMSkgcGFyZW50c0Rpdi5hcHBlbmQoJywgJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBwYXJlbnRzRGl2LmFwcGVuZChub25lRWxlbWVudC5jbG9uZU5vZGUodHJ1ZSkpO1xuXG4gICAgICAgICAgICByZXF1ZXN0SW5mb0VsZW1lbnQuYXBwZW5kKHBhcmVudHNEaXYpO1xuXG4gICAgICAgICAgICBjb25zdCByZXF1ZXN0ZXJEaXYgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcblxuICAgICAgICAgICAgY29uc3QgcmVxdWVzdGVyTGFiZWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdiJyk7XG4gICAgICAgICAgICByZXF1ZXN0ZXJMYWJlbC50ZXh0Q29udGVudCA9ICdSZXF1ZXN0ZXI6ICc7XG4gICAgICAgICAgICByZXF1ZXN0ZXJEaXYuYXBwZW5kKHJlcXVlc3RlckxhYmVsKTtcblxuICAgICAgICAgICAgaWYgKHJlcXVlc3QucmVxdWVzdGVyKSB7XG4gICAgICAgICA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gICAgIGNvbnN0IGNvbW1lbnQgPSBjb21tZW50SW5wdXQuZ2V0VmFsdWUoKS50cmltKCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb21tZW50KSAodGhpcy5hY3Rpb25zVG9UYWtlIGFzIENhdGVnb3J5QWN0aW9ucylbaW5kZXhdLmNvbW1lbnQgPSBjb21tZW50O1xuICAgICAgICAgICAgICAgICAgICBlbHNlIGRlbGV0ZSAodGhpcy5hY3Rpb25zVG9UYWtlIGFzIENhdGVnb3J5QWN0aW9ucylbaW5kZXhdLmNvbW1lbnQ7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWVudElucHV0TGF5b3V0LiRlbGVtZW50LmhpZGUoKTtcblxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgKHRoaXMuYWN0aW9uc1RvVGFrZSBhcyBDYXRlZ29yeUFjdGlvbnMpW2luZGV4XS5jb21tZW50O1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlUmVxdWVzdENvbG9yKGRldGFpbHNFbGVtZW50LCBpbmRleCk7XG5cbiAgICAgICAgICAgICAgICBwYWdlU2VsZWN0TGF5b3V0LiRlbGVtZW50LmhpZGUoKTtcbiAgICAgICAgICAgICAgICBjYXRlZ29yeVNlbGVjdExheW91dC4kZWxlbWVudC5oaWRlKCk7XG4gICAgICAgICAgICAgICAgZGVueVJlYXNvbkxheW91dC4kZWxlbWVudC5oaWRlKCk7XG4gICAgICAgICAgICAgICAgY2xvc2luZ1JlYXNvbkxheW91dC4kZWxlbWVudC5oaWRlKCk7XG5cbiAgICAgICAgICAgICAgICBzd2l0Y2ggKG9wdGlvbikge1xuICAgICAgICAgICAgICAgICAgICBjYXNlICdhY2NlcHQnOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlU2VsZWN0TGF5b3V0LiRlbGVtZW50LnNob3coKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVnb3J5U2VsZWN0TGF5b3V0LiRlbGVtZW50LnNob3coKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnZGVueSc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbnlSZWFzb25MYXlvdXQuJGVsZW1lbnQuc2hvdygpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjYXNlICdjbG9zZSc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsb3NpbmdSZWFzb25MYXlvdXQuJGVsZW1lbnQuc2hvdygpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBjb25zdCBwYWdlU2VsZWN0SW5wdXQgPSBuZXcgUGFnZUlucHV0V2lkZ2V0KHsgcGxhY2Vob2xkZXI6ICdBZGQgcGFnZXMgaGVyZScgfSk7XG4gICAgICAgICAgICBwYWdlU2VsZWN0SW5wdXQub24oJ2NoYW5nZScsICgpID0+IHtcbiAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSBwYWdlU2VsZWN0SW5wdXQuZ2V0VmFsdWUoKTtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IHZhbHVlLnJlcGxhY2UobmV3IFJlZ0V4cChgXihodHRwcz86KT8vezJ9PyR7bXcuY29uZmlnLmdldCgnd2dTZXJ2ZXInKS5yZXBsYWNlKC9eXFwvezJ9LywgJycpfS93aWtpL2ApLCAnJyk7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZS5yZXBsYWNlKC9eOi8sICcnKTtcblxuICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggPiAwKSBwYW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5IHN1Ym1pc3Npb25zJ10sXG4gICAgICAgICAgICAgICAgICAgIFsndW5saWtlbHknLCAnY2F0ZWdvcmllcyB0aGF0IGFyZSB1bmxpa2VseSB0byBoYXZlIGVub3VnaCBwYWdlcyddLFxuICAgICAgICAgICAgICAgICAgICBbJ25vdGNhdGVnb3J5JywgJ3BhZ2UgY3JlYXRpb24gcmVxdWVzdHMnXSxcbiAgICAgICAgICAgICAgICAgICAgWydub3RlbmdsaXNoJywgJ3JlcXVlc3RzIG5vdCBpbiBFbmdsaXNoJ10sXG4gICAgICAgICAgICAgICAgXS5tYXAoKFt2YWx1ZSwgbGFiZWxdKSA9PiAoeyBkYXRhOiBgYXV0b2ZpbGw6JHt2YWx1ZX1gLCBsYWJlbDogYEF1dG9maWxsZWQgdGV4dCBmb3IgJHtsYWJlbH1gIH0pKSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgZGVueVJlYXNvbi5vbignY2hhbmdlJywgKCkgPT4ge1xuICAgICAgICAgICAgICAgICh0aGlzLmFjdGlvbnNUb1Rha2UgYXMgQ2F0ZWdvcnlBY3Rpb25zKVtpbmRleF0uZGVueVJlYXNvbiA9IGRlbnlSZWFzb24uZ2V0VmFsdWUoKSB8fCAnYXV0b2ZpbGw6dW5saWtlbHknO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBkZW55UmVhc29uLnNldFZhbHVlKCdhdXRvZmlsbDp1bmxpa2VseScpO1xuICAgICAgICAgICAgZGVueVJlYXNvbi5nZXRNZW51KCkuc2VsZWN0SXRlbUJ5RGF0YSgnYXV0b2ZpbGw6dW5saWtlbHknKTtcblxuICAgICAgICAgICAgY29uc3QgZGVueVJlYXNvbkxheW91dCA9IG5ldyBPTy51aS5GaWVsZExheW91dChkZW55UmVhc29uLCB7XG4gICAgICAgICAgICAgICAgYWxpZ246ICdpbmxpbmUnLFxuICAgICAgICAgICAgICAgIGxhYmVsOiAnRGVueSByZWFzb246JyxcbiAgICAgICAgICAgICAgICBoZWxwOiAnU3VwcG9ydHMgYXV0b21hdGljIHJlYXNvbmluZywgY3VzdG9tIHJlYXNvbmluZywgb3IgYSBjb21iaW5hdGlvbiBvZiB0aGUgdHdvIHdpdGggXCJhdXRvZmlsbDpSRUFTT04sIENVU1RPTVwiIGZvcm1hdCcsXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGRlbnlSZWFzb25MYXlvdXQuJGVsZW1lbnQuaGlkZSgpO1xuXG4gICAgICAgICAgICBjb25zdCBjbG9zaW5nUmVhc29uID0gbmV3IE9PLnVpLkRyb3Bkb3duV2lkZ2V0KHtcbiAgICAgICAgICAgICAgICBjbGFzc2VzOiBbJ2FmY3JjLWNsb3NpbmctcmVhc29uLWlucHV0J10sXG4gICAgICAgICAgICAgICAgbWVudToge1xuICAgICAgICAgICAgICAgICAgICBpdGVtczogW1xuICAgICAgICAgICAgICAgICAgICAgICAgWydObyByZXNwb25zZScsICdyJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICBbJ1N1Y2NlZWRlZCcsICdzJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICBbJ1dpdGhkcmF3bicsICd3J10sXG4gICAgICAgICAgICAgICAgICAgIF0ubWFwKChbdGl0bGUsIGlkXSkgPT4gbmV3IE9PLnVpLk1lbnVPcHRpb25XaWRnZXQoeyBkYXRhOiBpZCwgbGFiZWw6IHRpdGxlIH0pKSxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjbG9zaW5nUmVhc29uLmdldE1lbnUoKS5vbignY2hvb3NlJywgKCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IHNlbGVjdGVkID0gY2xvc2luZ1JlYXNvbi5nZXRNZW51KCkuZmluZFNlbGVjdGVkSXRlbSgpIGFzIE9PLnVpLk1lbnVPcHRpb25XaWRnZXQ7XG5cbiAgICAgICAgICAgICAgICAodGhpcy5hY3Rpb25zVG9UYWtlIGFzIENhdGVnb3J5QWN0aW9uc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HRoaXMuYWN0aW9uc1RvVGFrZSBhcyBDYXRlZ29yeUFjdGlvbnMpW2luZGV4XS5jb21tZW50O1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGNvbnN0IGNvbW1lbnRJbnB1dExheW91dCA9IG5ldyBPTy51aS5GaWVsZExheW91dChjb21tZW50SW5wdXQsIHsgY2xhc3NlczogWydhZmNyYy1jb21tZW50LWlucHV0J10sIGFsaWduOiAnaW5saW5lJywgbGFiZWw6ICdDb21tZW50OicgfSk7XG4gICAgICAgICAgICBjb21tZW50SW5wdXRMYXlvdXQuJGVsZW1lbnQuaGlkZSgpO1xuXG4gICAgICAgICAgICByZXF1ZXN0UmVzcG9uZGVyRWxlbWVudC5hcHBlbmQoXG4gICAgICAgICAgICAgICAgYWN0aW9uUmFkaW9JbnB1dC4kZWxlbWVudFswXSxcbiAgICAgICAgICAgICAgICBwYWdlU2VsZWN0TGF5b3V0LiRlbGVtZW50WzBdLFxuICAgICAgICAgICAgICAgIGNhdGVnb3J5U2VsZWN0TGF5b3V0LiRlbGVtZW50WzBdLFxuICAgICAgICAgICAgICAgIGRlbnlSZWFzb25MYXlvdXQuJGVsZW1lbnRbMF0sXG4gICAgICAgICAgICAgICAgY2xvc2luZ1JlYXNvbkxheW91dC4kZWxlbWVudFswXSxcbiAgICAgICAgICAgICAgICBjb21tZW50SW5wdXRMYXlvdXQuJGVsZW1lbnRbMF0sXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICBkZXRhaWxzRWxlbWVudC5hcHBlbmQocmVxdWVzdFJlc3BvbmRlckVsZW1lbnQpO1xuXG4gICAgICAgICAgICAodGhpcyBhcyB1bmtub3duIGFzIHsgJGJvZHk6IEpRdWVyeSB9KS4kYm9keS5hcHBlbmQoZGV0YWlsc0VsZW1lbnQpO1xuXG4gICAgICAgICAgICB0aGlzLnVwZGF0ZVNpemUoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBVcGRhdGVzI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ICAgICAgICAgICBkZXRhaWxzRWxlbWVudC5zdHlsZS5iYWNrZ3JvdW5kQ29sb3IgPSBiYWNrZ3JvdW5kQ29sb3I7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvKipcbiAgICAgICAgICogUGVyZm9ybXMgYWxsIGFjdGlvbnMgYW5kIGxvZ3MgdGhlaXIgcmVzdWx0cy5cbiAgICAgICAgICovXG4gICAgICAgIHByaXZhdGUgYXN5bmMgcGVyZm9ybUFjdGlvbnMoKSB7XG4gICAgICAgICAgICBjb25zdCB3aW5kb3dNYW5hZ2VyID0gbmV3IE9PLnVpLldpbmRvd01hbmFnZXIoKTtcbiAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kKHdpbmRvd01hbmFnZXIuJGVsZW1lbnRbMF0pO1xuXG4gICAgICAgICAgICBjb25zdCBzaG93QWN0aW9uc0RpYWxvZyA9IG5ldyBTaG93QWN0aW9uc0RpYWxvZygpO1xuICAgICAgICAgICAgd2luZG93TWFuYWdlci5hZGRXaW5kb3dzKFtzaG93QWN0aW9uc0RpYWxvZ10pO1xuICAgICAgICAgICAgc2hvd0FjdGlvbnNEaWFsb2cub3BlbigpO1xuXG4gICAgICAgICAgICBjb25zdCBjb3VudHMgPSB7IGFjY2VwdGVkOiAwLCBkZW5pZWQ6IDAsICdjb21tZW50ZWQgb24nOiAwLCBjbG9zZWQ6IDAgfTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbmFtaW5nLWNvbnZlbnRpb25cblxuICAgICAgICAgICAgbGV0IG5ld1BhZ2VUZXh0ID0gKFxuICAgICAgICAgICAgICAgIChhd2FpdCB0aGlzLmFwaS5nZXQoe1xuICAgICAgICAgICAgICAgICAgICBhY3Rpb246ICdxdWVyeScsXG4gICAgICAgICAgICAgICAgICAgIGZvcm1hdHZlcnNpb246ICcyJyxcbiAgICAgICAgICAgICAgICAgICAgcHJvcDogJ3JldmlzaW9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AgICAgY29uc3QgYWxsUmVxdWVzdHNBY2NlcHRlZERlbmllZCA9IE9iamVjdC52YWx1ZXMocmVxdWVzdHMpLmV2ZXJ5KChhY3Rpb24pID0+IGFjdGlvbi5hY3Rpb24gPT09ICdhY2NlcHQnIHx8IGFjdGlvbi5hY3Rpb24gPT09ICdkZW55Jyk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGZpcnN0Q2xvc2VSZWFzb24gPSBPYmplY3QudmFsdWVzKHJlcXVlc3RzIGFzIFJlY29yZDxzdHJpbmcsIFJlZGlyZWN0QWN0aW9uPikuZmluZCgoYWN0aW9uKSA9PiBhY3Rpb24uYWN0aW9uID09PSAnY2xvc2UnKT8uY2xvc2luZ1JlYXNvbj8uaWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBhbGxSZXF1ZXN0c0Nsb3NlZCA9IE9iamVjdC52YWx1ZXMocmVxdWVzdHMgYXMgUmVjb3JkPHN0cmluZywgUmVkaXJlY3RBY3Rpb24+KS5ldmVyeShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYWN0aW9uKSA9PiBhY3Rpb24uYWN0aW9uID09PSAnY2xvc2UnICYmIGFjdGlvbi5jbG9zaW5nUmVhc29uPy5pZCA9PT0gZmlyc3RDbG9zZVJlYXNvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGFjY2VwdGVkUGFnZXMgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRlbmllZFBhZ2VzID0gW107XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21tZW50cyA9IFtdO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBhbW91bnRPZlBhZ2VzID0gT2JqZWN0LmtleXMocmVxdWVzdHMpLmxlbmd0aDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBbcmVxdWVzdGVkVGl0bGUsIGFjdGlvbl0gb2YgT2JqZWN0LmVudHJpZXMocmVxdWVzdHMpIGFzIFtzdHJpbmcsIFJlZGlyZWN0QWN0aW9uXVtdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoYWN0aW9uLmFjdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdhY2NlcHQnOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc29tZVJlcXVlc3RBY2NlcHRlZERlbmllZCAmJiAhYWxsUmVxdWVzdHNBY2NlcHRlZERlbmllZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93QWN0aW9uc0RpYWxvZy5hZGRMb2dFbnRyeShgTm90IGFsbCByZXF1ZXN0cyB0byBcIiR7dGFyZ2V0fVwiIHdlcmUgYWNjZXB0ZWQgb3IgZGVuaWVkLCB0aGUgaGFuZGxpbmcgb2YgXCIke3JlcXVlc3RlZFRpdGxlfVwiIHdpbGwgYmUgaWdub3JlZC5gLCAnd2FybmluZycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNjZXB0ZWRQYWdlcy5wdXNoKHJlcXVlc3RlZFRpdGxlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWN0aW9uLmNvbW1lbnQpIGNvbW1lbnRzLnB1c2goW3JlcXVlc3RlZFRpdGxlLCBhY3Rpb24uY29tbWVudF0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50cy5hY2NlcHRlZCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdkZW55Jzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNvbWVSZXF1ZXN0QWNjZXB0ZWREZW5pZWQgJiYgIWFsbFJlcXVlc3RzQWNjZXB0ZWREZW5pZWQpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0FjdGlvbnNEaWFsb2cuYWRkTG9nRW50cnkoYE5vdCBhbGwgcmVxdWVzdHMgdG8gXCIke3RhcmdldH1cIiB3ZXJlIGFjY2VwdGVkIG9yIGRlbmllZCwgdGhlIGhhbmRsaW5nIG9mIFwiJHtyZXF1ZXN0ZWRUaXRsZX1cIiBpcyBiZWluZyBpZ25vcmVkLmAsICd3YXJuaW5nJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZW5pZWRQYWdlcy5wdXNoKFtyZXF1ZXN0ZWRUaXRsZSwgYWN0aW9uLmRlbnlSZWFzb24hXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnRzLmRlbmllZCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdjb21tZW50Jzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFjdGlvbi5jb21tZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tbWVudHMucHVzaChbcmVxdWVzdGVkVGl0bGUsIGFjdGlvbi5jb21tZW50XSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnRzWydjb21tZW50ZWQgb24nXSsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0FjdGlvbnNEaWFsb2cuYWRkTG9nRW50cnkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGBUaGUgcmVxdWVzdCB0byBjcmVhdGUgXCIke3JlcXVlc3RlZFRpdGxlfVwiIFx1MjE5MiBcIiR7dGFyZ2V0fVwiIHdhcyBtYXJrZWQgdG8gYmUgY29tbWVudGVkIG9uLCBidXQgbm8gY29tbWVudCB3YXMgcHJvdmlkZWQgc28gaXQgd2lsbCBiZSBza2lwcGVkLmAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd3YXJuaW5nJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdjbG9zZSc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhbGxSZXF1ZXN0c0Nsb3NlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhY3Rpb24uY29tbWVudCkgY29tbWVudHMucHVzaChbcmVxdWVzdGVkVGl0bGUsIGFjdGlvbi5jb21tZW50XSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnRzLmNsb3NlZCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0FjdGlvbnNEaWFsb2cuYWRkTG9nRW50cnkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGBOb3QgYWxsIHJlcXVlc3RzIHRvIFwiJHt0YXJnZXR9XCIgd2VyZSBjbG9zZWQgd2l0aCB0aGUgc2FtZSByZWFzb24sIHRoZSBoYW5kbGluZyBvZiBcIiR7cmVxdWVzdGVkVGl0bGV9XCIgaXMgYmVpbmcgaWdub3JlZC5gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnd2FybmluZycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2VjdGlvbkRhdGEgPSB7IHBhZ2VUZXh0OiBuZXdQYWdlVGV4dCwgLi4uT2JqZWN0LnZhbHVlcyhyZXF1ZXN0cylbMF0ub3JpZ2luYWxUZXh0IH07XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb21tZW50cy5sZW5ndGggPiAwKSBzZWN0aW9uRGF0YSA9IHRoaXMubW9kaWZ5U2VjdGlvbkRhdGEoc2VjdGlvbkRhdGEsIHsgYXBwZW5kOiB0aGlzLm1hcENvbW1lbnRzKGNvbW1lbnRzLCBhbW91bnRPZlBhZ2VzID09PSAxLCBjb21tZW50cy5sZW5ndGggPT09IGFtb3VudE9mUGFnZXMpIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWxsUmVxdWVzdHNBY2NlcHRlZERlbmllZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjbG9zaW5nSWQ6IHN0cmluZztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhY2NlcHRlZFBhZ2VzLmxl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ld1BhZ2VUZXh0ID0gc2VjdGlvbkRhdGEucGFnZVRleHQ7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5iZWZvcmVUZXh0ICsgdGhpcy5wYWdlQ29udGVudCA9PT0gbmV3UGFnZVRleHQpIHJldHVybiBzaG93QWN0aW9uc0RpYWxvZy5hZGRMb2dFbnRyeSgnTm8gcmVxdWVzdHMgaGF2ZSBiZWVuIGhhbmRsZWQgKHBhZ2UgY29udGVudCBpZGVudGljYWwpIScpO1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG1hcHBlZENvdW50cyA9IE9iamVjdC5lbnRyaWVzKGNvdW50cylcbiAgICAgICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoKFssIGNvdW50XSkgPT4gY291bnQgPiAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgLm1hcCgoW2FjdGlvbiwgY291bnRdKSA9PiBgJHthY3Rpb259ICR7Y291bnR9YClcbiAgICAgICAgICAgICAgICAgICAgICAgIC5qb2luKCcsICcpO1xuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZWRpdHNDcmVhdGlvbnNUb01ha2UucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnZWRpdCcsXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGhpcy5wYWdlVGl0bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm06ICgpID0+ICh7IHRleHQ6IG5ld1BhZ2VUZXh0LCBzdW1tYXJ5OiBgSGFuZGxpbmcgQWZDIHJlZGlyZWN0IHJlcXVlc3RzICgke21hcHBlZENvdW50c30pJHt0aGlzLnNjcmlwdE1lc3NhZ2V9YCB9KSxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5tYWtlQWxsRWRpdHNDcmVhdGlvbnMoc2hvd0FjdGlvbnNEaW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GVuZDogJ3t7QWZDLWN8YX19JywgYXBwZW5kOiAnKiB7e3N1YnN0OkFmQyBjYXRlZ29yeX19IH5+fn5cXG57e0FmQy1jfGJ9fScgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVBY2NlcHRlZENhdGVnb3J5KGFjdGlvbkRhdGEpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50cy5hY2NlcHRlZCsrO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdkZW55Jzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWN0aW9uRGF0YSA9IHRoaXMubW9kaWZ5U2VjdGlvbkRhdGEoc2VjdGlvbkRhdGEsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXBlbmQ6ICd7e0FmQy1jfGR9fScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBlbmQ6IGAqICR7dGhpcy5mb3JtYXREZW5pZWRSZWFzb24oYWN0aW9uRGF0YS5kZW55UmVhc29uISl9IH5+fn5cXG57e0FmQy1jfGJ9fWAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50cy5kZW5pZWQrKztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnY29tbWVudCc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFjdGlvbkRhdGEuY29tbWVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VjdGlvbkRhdGEgPSB0aGlzLm1vZGlmeVNlY3Rpb25EYXRhKHNlY3Rpb25EYXRhLCB7IGFwcGVuZDogYCoge3tBZkMgY29tbWVudHwxPSR7YWN0aW9uRGF0YS5jb21tZW50fX19IH5+fn5gIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudHNbJ2NvbW1lbnRlZCBvbiddKys7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0FjdGlvbnNEaWFsb2cuYWRkTG9nRW50cnkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYFRoZSByZXF1ZXN0IHRvIGNyZWF0ZSBcIiR7YWN0aW9uRGF0YS5jYXRlZ29yeX1cIiB3YXMgbWFya2VkIHRvIGJlIGNvbW1lbnRlZCBvbiwgYnV0IG5vIGNvbW1lbnQgd2FzIHByb3ZpZGVkIHNvIGl0IHdpbGwgYmUgc2tpcHBlZC5gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd3YXJuaW5nJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2Nsb3NlJzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWN0aW9uRGF0YSA9IHRoaXMubW9kaWZ5U2VjdGlvbkRhdGEoc2VjdGlvbkRhdGEsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXBlbmQ6IGB7e0FmQy1jfCR7YWN0aW9uRGF0YS5jbG9zaW5nUmVhc29uIS5pZH19fWAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBlbmQ6IChhY3Rpb25EYXRhLmNvbW1lbnQgPyBgKiB7e0FmQyBjb21tZW50fDE9JHthY3Rpb25EYXRhLmNvbW1lbnR9fX0gfn5+fmAgOiAnJykgKyAnXFxue3tBZkMtY3xifScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50cy5jbG9zZWQrKztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld1BhZ2VUZXh0ID0gc2VjdGlvbkRhdGEucGFnZVRleHQ7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5iZWZvcmVUZXh0ICsgdGhpcy5wYWdlQ29udGVudCA9PT0gbmV3UGFnZVRleHQpIHJldHVybiBzaG93QWN0aW9uc0RpYWxvZy5hZGRMb2dFbnRyeSgnTm8gcmVxdWVzdHMgaGF2ZSBiZWVuIGhhbmRsZWQgKHBhZ2UgY29udGVudCBpZGVudGljYWwpIScpO1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG1hcHBlZENvdW50cyA9IE9iamVjdC5lbnRyaWVzKGNvdW50cylcbiAgICAgICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoKFssIGNvdW50XSkgPT4gY291bnQgPiAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgLm1hcCgoW2FjdGlvbiwgY291bnRdKSA9PiBgJHthY3Rpb259ICR7Y291bnR9YClcbiAgICAgICAgICAgICAgICAgICAgICAgIC5qb2luKCcsICcpO1xuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZWRpdHNDcmVhdGlvbnNUb01ha2UucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnZ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ICBjb25zdCByZWFzb25zOiBSZWNvcmQ8c3RyaW5nLCBzdHJpbmdbXT4gPSB7fTtcblxuICAgICAgICAgICAgZm9yIChjb25zdCBbcGFnZSwgcmVhc29uXSBvZiBkZW5pZWRQYWdlcykge1xuICAgICAgICAgICAgICAgIGlmICghcmVhc29uc1tyZWFzb25dKSByZWFzb25zW3JlYXNvbl0gPSBbXTtcbiAgICAgICAgICAgICAgICByZWFzb25zW3JlYXNvbl0ucHVzaChwYWdlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgcmVhc29uc0FycmF5ID0gT2JqZWN0LmVudHJpZXMocmVhc29ucyk7XG5cbiAgICAgICAgICAgIHJldHVybiByZWFzb25zQXJyYXlcbiAgICAgICAgICAgICAgICAubWFwKChbcmVhc29uLCBwYWdlc10pID0+IGAqICR7dGhpcy5mb3JtYXREZW5pZWRSZWFzb24ocmVhc29uKX0ke3JlYXNvbnNBcnJheS5sZW5ndGggPiAxIHx8ICFhbGxSZXF1ZXN0cyA/IGAgKCR7cGFnZXMubWFwKChwYWdlKSA9PiBgW1ske3BhZ2V9XV1gKS5qb2luKCcsICcpfSlgIDogJyd9IH5+fn5gKVxuICAgICAgICAgICAgICAgIC5qb2luKCdcXG4nKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBNYXBzIGEgZ3JvdXAgb2YgY29tbWVudHMuXG4gICAgICAgICAqIEBwYXJhbSBjb21tZW50cyBUaGUgY29tbWVudHMgdG8gbWFwLlxuICAgICAgICAgKiBAcGFyYW0gc2luZ3VsYXJSZXF1ZXN0IFdoZXRoZXIgdGhlIHJlcXVlc3QgaXMgdGhlIG9ubHkgcmVxdWVzdC5cbiAgICAgICAgICogQHBhcmFtIGFsbFJlcXVlc3RzIFdoZXRoZXIgYWxsIHJlcXVlc3RzIGFyZSBiZWluZyBtYXBwZWQuXG4gICAgICAgICAqL1xuICAgICAgICBwcml2YXRlIG1hcENvbW1lbnRzKGNvb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8uZmluZCgoZWRpdG9ySW5mbykgPT4gZWRpdG9ySW5mby5uYW1lID09PSB0YWcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWZvdW5kQXJndW1lbnRFZGl0b3IpIHJldHVybiBge3ske3RhZ319fWA7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbWFwcGVkQXJndW1lbnRzID0gZm91bmRBcmd1bWVudEVkaXRvci5wYXJhbWV0ZXJzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKChwYXJhbWV0ZXIsIGluZGV4KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBwYXJhbWV0ZXIuZWRpdG9yLmdldFZhbHVlKCkudHJpbSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghdmFsdWUpIHJldHVybiBudWxsO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGB8JHtwYXJhbWV0ZXIubmFtZSA9PT0gKGluZGV4ICsgMSkudG9TdHJpbmcoKSA/ICcnIDogYCR7cGFyYW1ldGVyLm5hbWV9PWB9JHt2YWx1ZX1gO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoQm9vbGVhbilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5qb2luKCcnKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYHt7JHt0YWd9JHttYXBwZWRBcmd1bWVudHN9fX1gO1xuICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIDogbnVsbDtcblxuICAgICAgICAgICAgdGhpcy5lZGl0c0NyZWF0aW9uc1RvTWFrZS5wdXNoKFxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogJ2NyZWF0Z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YXRpb25dXSBiYW5uZXIke3RoaXMuc2NyaXB0TWVzc2FnZX1gLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEhhbmRsZXMgdGhlIGNyZWF0aW9uIG9mIHBhZ2VzIHJlbGF0ZWQgdG8gYW4gYWNjZXB0ZWQgY2F0ZWdvcnkgcmVxdWVzdC5cbiAgICAgICAgICogQHBhcmFtIGRhdGEgVGhlIGRhdGEgb2YgdGhlIHJlcXVlc3RlZCBjYXRlZ29yeS5cbiAgICAgICAgICovXG4gICAgICAgIHByaXZhdGUgaGFuZGxlQWNjZXB0ZWRDYXRlZ29yeShkYXRhOiBDYXRlZ29yeUFjdGlvbikge1xuICAgICAgICAgICAgdGhpcy5lZGl0c0NyZWF0aW9uc1RvTWFrZS5wdXNoKFxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogJ2NyZWF0ZScsXG4gICAgICAgICAgICAgICAgICAgIGlzUmVkaXJlY3Q6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogYENhdGVnb3J5OiR7ZGF0YS5jYXRlZ29yeX1gLFxuICAgICAgICAgICAgICAgICAgICB0ZXh0OiBkYXRhLnBhcmVudHMubWFwKChwYXJlbnQpID0+IGBbW0NhdGVnb3J5OiR7cGFyZW50fV1dYCkuam9pbignXFxuJyksXG4gICAgICAgICAgICAgICAgICAgIHN1bW1hcnk6IGBDcmVhdGluZyBjYXRlZ29yeSBhcyByZXF1ZXN0ZWQgYXQgW1tXUDpBRkMvQ11dJHt0aGlzLnNjcmlwdE1lc3NhZ2V9YCxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogJ2NyZWF0ZScsXG4gICAgICAgICAgICAgICAgICAgIGlzUmVkaXJlY3Q6IGZhbHNlLFxuICAgICAgICAgICAgICA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0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93QWN0aW9uc0RpYWxvZy5hZGRMb2dFbnRyeShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYEVycm9yICR7YWN0aW9uLnR5cGUgPT09ICdlZGl0JyA/ICdlZGl0aW5nJyA6ICdjcmVhdGluZyd9ICR7bGlua0VsZW1lbnQub3V0ZXJIVE1MfTogJHtlcnJvckluZm8/LmVycm9yLmluZm8gPz8gJ1Vua25vd24gZXJyb3InfSAoJHtlcnJvckNvZGV9KS5gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZXJyb3InLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICBzaG93QWN0aW9uc0RpYWxvZy5hZGRMb2dFbnRyeShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBgRXJyb3IgJHthY3Rpb24udHlwZSA9PT0gJ2VkaXQnID8gJ2VkaXRpbmcnIDogJ2NyZWF0aW5nJ30gJHtsaW5rRWxlbWVudC5vdXRlckhUTUx9OiAke2Vycm9ySW5mbz8uZXJyb3IuaW5mbyA/PyAnVW5rbm93biBlcnJvcid9ICgke2Vycm9yQ29kZX0pLmAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Vycm9yJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBPYmplY3QuYXNzaWduKEFmY3JjSGVscGVyRGlhbG9nLnByb3RvdHlwZSwgT08udWkuUHJvY2Vzc0RpYWxvZy5wcm90b3R5cGUpO1xufSk7XG4iXSwKICAibWFwcGluZ3MiOiAiOzs7YUFJQSxHQUFHLE9BQU8sTUFBTSxDQUFDLGlCQUFrQixlQU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