!function(){"use strict";function e(e){var t=[],a=[];this.getId=function(){return e.sliderid},this.getCbHandle=function(){return e.cbhandle},this.getView=function(n){return n||(n=0),e.value[n]===t[n]?a[n]:(t[n]=e.value[n],e.formatter?a[n]=e.formatter(e.value[n],e.ctrlhandle):a[n]=e.value[n],a[n])},this.updateClass=function(t,a){e.updateClass(t,a)},this.forceRefresh=function(t){e.forceRefresh(t)},this.getValue=function(t){return t||(t=0),e.value[t]},this.getRelative=function(t){return t||(t=0),e.relative[t]},this.setValue=function(t,a){a||(a=0),e.setValue(t,a)},this.setDisable=function(t){e.setDisable(t)}}var t=angular.module("RangeSlider",[]);t.directive("rangeSlider",["$log","$document","$timeout",function(t,a,n){function i(t,i,s,l){t.initWidget=function(e){e.byStep&&(t.byStep=parseInt(e.byStep)),e.notMore&&(t.notMore=parseInt(e.notMore)),e.notLess&&(t.notLess=parseInt(e.notLess)),e.id&&(t.sliderid=e.id),void 0!==e.value&&(t.value=e.value,t.forceRefresh(50))},t.forceRefresh=function(e){var a=t.value;t.value=[void 0,void 0],n(function(){t.setValue(a[0],0),t.dual&&t.setValue(a[1],1)},e)},t.updateClass=function(e,t){t?i.addClass(e):i.removeClass(e)},t.setDisable=function(e){e?(i.addClass("disable"),t.handles[0].css("visibility","hidden"),t.dual&&t.handles[1].css("visibility","hidden")):(i.removeClass("disable"),t.handles[0].css("visibility","visible"),t.dual&&t.handles[1].css("visibility","visible"))},t.normalize=function(e){var a,n=t.notMore-t.notLess,i=e*n;if(t.byStep>0){var s=(i-i%t.byStep)/t.byStep,l=i%t.byStep,o=l>=.5*t.byStep?t.byStep:0;return a=s*t.byStep+o+t.notLess}if(t.byStep<0){var r=Math.pow(10,-1*t.byStep);return a=t.notLess+parseInt(i*r)/r}return i},t.getValue=function(e,a){t.vertical?t.relative[a]=(e-t.bounds.handles[a].getBoundingClientRect().height)/(t.bounds.bar.getBoundingClientRect().height-t.bounds.handles[a].getBoundingClientRect().height):t.relative[a]=e/(t.bounds.bar.getBoundingClientRect().width-t.bounds.handles[a].getBoundingClientRect().width);var n=t.normalize(t.relative[a]);n!==t.value[a]&&(nt.stopValue&&(n=t.stopValue),t.formatter?t.viewValue=t.formatter(n,t.ctrlhandle):t.viewValue=n,t.displays[a]&&t.displays[a].html(t.viewValue),t.value[a]=n,l&&l.$setViewValue(t.viewValue),t.$apply(),n>t.startValue&&nt.value[0]&&(t.dual?t.setValue(e,1):t.setValue(e,0)),t.vertical?(a=t.bounds.bar.getBoundingClientRect().height*(e-t.notLess)/(t.notMore-t.notLess),t.start.css("height",a+"px")):(a=t.bounds.bar.getBoundingClientRect().width*(e-t.notLess)/(t.notMore-t.notLess),t.start.css("width",a+"px")),t.startValue=e},t.setStop=function(e){var a;et.notMore&&(e=t.notMore),e0&&t.$apply(t.setValue(t.value[t.actif]+t.byStep,t.actif)),t.byStep<0&&t.$apply(t.setValue(t.value[t.actif]+1/Math.pow(10,-1*t.byStep),t.actif)),t.callback&&t.callback(t.value[t.actif],t.ctrlhandle);break;case 37:case 40:t.byStep>0&&t.$apply(t.setValue(t.value[t.actif]-t.byStep,t.actif)),t.byStep<0&&t.$apply(t.setValue(t.value[t.actif]-1/Math.pow(10,-1*t.byStep),t.actif)),t.callback&&t.callback(t.value[t.actif],t.ctrlhandle);break;case 27:t.handles[t.actif][0].blur()}},t.moveHandle=function(e,a,n){var i;t.vertical?(i=t.bounds.bar.getBoundingClientRect().bottom-n,i>t.bounds.bar.getBoundingClientRect().height&&(i=t.bounds.bar.getBoundingClientRect().height),ii&&(i=0),a+t.bounds.handles[e].getBoundingClientRect().width>t.bounds.bar.getBoundingClientRect().right&&(i=t.bounds.bar.getBoundingClientRect().width-t.bounds.handles[e].getBoundingClientRect().width)),t.getValue(i,e),t.dual&&t.value[0]>t.value[1]&&(0===e?t.setValue(t.value[0],1):t.setValue(t.value[1],0))},t.focusCB=function(e){e?a.on("keydown",t.keydown):a.unbind("keydown",t.keydown)},t.touchBarCB=function(e){var a,n=0,i=e.changedTouches,s=t.value[n];if(e.preventDefault(),t.dual){a=t.vertical?(i[0].pageY-t.bounds.bar.getBoundingClientRect().bottom)/t.bounds.bar.getBoundingClientRect().height:(i[0].pageX-t.bounds.bar.getBoundingClientRect().left)/t.bounds.bar.getBoundingClientRect().width;var l=Math.abs(a-t.relative[0]),o=Math.abs(a-t.relative[1]);l>o&&(n=1)}t.moveHandle(n,i[0].pageX,i[0].pageY),t.callback&&s!==t.value[n]&&t.callback(t.value[n],t.ctrlhandle)},t.touchHandleCB=function(e,n){function s(e){e.preventDefault();for(var a=e.changedTouches,i=0;it.stopAt,t.stopAt&&t.setStop(t.stopAt)}),t.initialSettings(t.initial)},t.init(),t.$watch("inithook",function(){t.inithook&&t.inithook(t.ctrlhandle)}),t.$watch("initvalues",function(){t.initvalues&&t.initWidget(t.initvalues)}),t.$watch("ngModel",function(e){t.setValue(e,0)})}var s='
';return{restrict:"E",scope:{startAt:"=",stopAt:"=",callback:"=",formatter:"=",inithook:"=",cbhandle:"=",initvalues:"=",ngModel:"="},require:"?ngModel",template:s,replace:!0,link:i}}])}(),function(){"use strict";var e='
afb://{{hostname}}:{{httpdport}}
';angular.module("TokenRefresh",["AppConfig","ModalNotification"]).directive("tokenRefresh",["$timeout","$http","$location","Notification","AppConfig",function(t,a,n,i,s){function l(e,l,o){e.status=void 0,e.online=function(){l.addClass("online"),l.removeClass("offline")},e.offline=function(){l.addClass("offline"),l.removeClass("online")},e.onerror=function(t,a,n){e.status!==!1&&(i.warning({message:"AppFramework Binder Lost",delay:5e3}),e.offline()),e.status=0},e.onsuccess=function(t,a,n,l){e.status!==!0&&(t.request.token&&(s.session.token=t.request.token),t.request.uuid&&(s.session.uuid=t.request.uuid),t.request.timeout&&(s.session.timeout=t.request.timeout),i.success({message:"AppFramework Binder Back to Live",delay:3e3}),e.online(),e.callback&&e.callback()),e.status=1},e.getping=function(){var n=a.get(s.session.ping+"?token="+s.session.token);n.success(e.onsuccess),n.error(e.onerror),t(e.getping,1e3*s.session.pingrate)},e.refresh=function(){var n=a.get(s.session.refresh+"?token="+s.session.token);n.success(e.onsuccess),n.error(e.onerror),t(e.refresh,250*s.session.timeout)},e.tkcreate=function(){var t=a.get(s.session.create+"?token="+s.session.initial);t.success(e.onsuccess),t.error(e.onerror)},e.icon=o.icon||"fi-lightbulb",e.hostname=n.host(),e.httpdport=n.port(),e.autolog=JSON.parse(o.autolog||!1),e.autolog&&e.tkcreate(),t(e.getping,1e3*s.session.pingrate),t(e.refresh,250*s.session.timeout)}return{template:e,scope:{callback:"="},restrict:"E",link:l}}])}(),function(){"use strict";var e='
{{tip}}
';angular.module("ModalNotification",[]).directive("tipModal",["$timeout",function(t){function a(e,a,n){function i(){function a(){e.show&&e.modal.css({opacity:1,visibility:"visible"})}e.show=!0,e.timeout=t(a,e.delay)}function s(){e.show=!1,e.modal.css({opacity:0,visibility:"hidden"})}e.parent=a.parent(),e.modal=a.find("div"),e.icon=n.icon||"fi-lightbulb",e.parent.addClass("as-modal-tip"),e.parent.bind("click",s),e.parent.bind("focus",i),e.parent.bind("mouseover",i),e.parent.bind("mouseleave",s),e.parent.bind("blur",s),e.delay=n.delay||1e3}return{restrict:"E",template:e,link:a,scope:{tip:"="}}}])}(),function(){"use strict";var e='{{label}}';angular.module("LinkButton",[]).directive("linkButton",["$location",function(t){function a(e,a,n){e.clicked=function(){n.query?t.path(n.href).search(n.query):t.path(n.href)},e.icon=n.icon||"fi-link",e.label=n.label||"Jump",e.href=n.href||"/home",a.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:a,scope:{}}}])}(),function(){"use strict";function e(e,t,a){var n=new XMLHttpRequest,i=new FormData;n.upload.onprogress=function(t){var a=Math.round(t.lengthComputable?100*t.loaded/t.total:0);e.slider&&e.slider.setValue(a)},n.onload=function(){e.divElem.addClass("success"),e.divElem.removeClass("error");var t={status:n.status,headers:n.getAllResponseHeaders()};e.callback(t)},n.onerror=function(){e.divElem.addClass("error"),e.divElem.removeClass("success")},n.onabort=function(){e.divElem.addClass("error"),e.divElem.removeClass("success");var t={status:n.status,headers:n.getAllResponseHeaders()};e.callback(t)},this.postfile=function(e){n.open("POST",e,!0),n.send(i)};for(var s=0;s1024*e.maxsize)setTimeout(a,100);else{var l=new FileReader;l.readAsArrayBuffer(this.file),l.onload=a,i.append(e.name,this.file,this.file.name)}}var t='
{{label}}
',a='Upload Application {{appname}} ?
',n='Invalid Application {{appname}} ?
';angular.module("UploadFiles",["AppConfig","ModalNotification","RangeSlider"]).directive("uploadAppli",["AppConfig","JQemu","Notification","ModalFactory","$timeout",function(i,s,l,o,r){function u(t,s,l){if(t.inputElem=s.find("input"),t.divElem=s.find("div"),t.imgClicked=function(){t.inputElem[0].click()},t.SliderInitCB=function(e){t.slider=e},t.UpLoadFile=function(s){var u,c,d,p=function(){u.postfile(l.posturl+"?token="+i.session.token),t.modal.deactivate(),r(function(){t.modal.destroy()},1e3)},f=function(){t.modal.deactivate(),r(function(){t.modal.destroy()},1e3)},g=function(e){if(e){var i=new JSZip(e.target.result),s=i.file("icon_128.png");s?(c=window.URL.createObjectURL(new Blob([s.asArrayBuffer()],{type:"image"})),d=a):(c=t.isnotvalid,d=n)}else u.file.size>1024*t.maxsize&&(c=t.istoobig,d=n),isNaN(u.file.size)&&(c=t.isnotvalid,d=n);var l={animationIn:"slideInFromTop",contentScope:{success:p,abandon:f,icon:c,appname:u.basename},template:d};t.modal=new o(l),t.modal.activate()};u=new e(t,s,g)},t.name=l.name||"appli",t.category=l.category||"appli",t.mimetype=l.accept||".wgt",t.maxsize=l.maxsize||1e5,t.regexp=new RegExp(l.accept+".*","i"),t.icon=l.icon||"fi-upload",t.label=l.label||"Upload",l.thumbnail?t.isnotvalid=i.paths[t.category]+l.isnotvalid:t.isnotvalid=i.paths[t.category]+"w3c-widget.png",l.istoobig?t.istoobig=i.paths[t.category]+l.istoobig:t.istoobig=i.paths[t.category]+"istoobig.png",t.noslider=l.noslider||!1,!l.posturl)throw new TypeError("file-upload %s posturl=/api/xxxx/xxxx required",t.attrs)}return{restrict:"E",template:t,link:u,scope:{callback:"="}}}])}(),function(){"use strict";var e='{{errmsg}}',t=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;angular.module("InputText",["JQueryEmu"]).directive("inputText",["JQemu",function(a){function n(e,n,i){e.error=!1,e.valid=!1,e.status="untouch",e.input=n.find("input"),e.required=0,"required"in i&&(e.required=1,n.addClass("required")),e.selected=function(){e.error=!1,e.errmsg=!1,e.status="touch"},e.validate=function(){e.parent.removeClass("ng-pristine"),e.value?(e.error=!1,e.value=e.value.trim(),"nospace"in i&&(e.value=e.value.replace(/\s/g,"")),"lowercase"in i&&(e.value=e.value.toLowerCase()),"minlen"in i&&e.value.length0&&e.l4acounter.validated--),e.callback(i.name,null,e.done)):(e.required&&!e.valid&&e.l4acounter.validated++,e.status="valid",e.valid=!0,e.callback(i.name,e.value,e.done))},e.done=function(t){for(var a in t)e[a]=t[a]},e.label=i.label,e.name=i.name,e.placeholder=i.placeholder,e.type=i.type||"text",e.tip=i.tip,e.parent=a.parent(n,"FORM"),"email"in i&&(i.lowercase=!0,i.nospace=!0,i.minlen=6),e.required&&(e.l4acounter=e.parent.data("l4acounter"),e.l4acounter?e.l4acounter.required++:(e.l4acounter={required:1,validated:0},e.parent.data("l4acounter",e.l4acounter))),e.$watch("value",function(){e.value&&e.validate()})}return{restrict:"E",template:e,link:n,scope:{callback:"=",value:"="}}}])}(),function(){"use strict";var e=' ';angular.module("InputPassword",[]).directive("inputPassword",function(){function t(e,t,a){e.valid1=function(t,a){e.firstpwd=a},e.valid2=function(t,n,i){e.firstpwd!==n?i({valid:!1,status:"invalid",errmsg:"both password should match"}):e.callback(a.name,n)},e.done=function(t){for(var a in t)e[a]=t[a]},e.name=a.name,e.label1=a.label||"Password",e.label2=a.label||"Password Verification",e.place1=a.placeholder1||"User Password",e.tip1=a.tip||"Choose a Password",e.place2=a.placeholder1||"Password Verification",e.tip2=a.tip||"Confirme your Password",e.minlen=a.minlen||10,"required"in a&&(e.required="required")}return{restrict:"E",template:e,link:t,scope:{callback:"="}}})}(),function(){"use strict";var e='
{{label}}
';angular.module("SubmitButton",[]).directive("submitButton",function(){function t(e,t,a){e.icon=a.icon||"fi-foot",e.label=a.label||"Next",t.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:t,scope:{clicked:"="}}})}(),function(){"use strict";var e='
{{label}}
',t='×Application {{name}}';angular.module("AppliButton",[]).directive("appliButton",["AppConfig","AppCall","ModalFactory","Notification","$timeout",function(a,n,i,s,l){function o(e,o,r){e.clicked=function(){var a=function(t,a){s.error({message:"Fail /api/afm-main"+t+"="+e.label+" RunID="+e.appID,delay:5e3}),o.addClass("fail"),o.removeClass("success"),e.callback(e.appliID,t,a)},r=function(t,a){o.removeClass("fail"),e.runID=a.data.response.runid,e.callback(e.appliID,"/api/afm-main/start",a)},u=function(){e.modal.deactivate(),l(function(){e.modal.destroy()},1e3)},c=function(t){switch(t){case"start":n.get("afm-main","start",{id:e.appliID},function(e){return 200!==e.status||"AJB_reply"!==e.data.request.jtype?void a("start",e):void r("start",e)});break;case"stop":n.get("afm-main","stop",{id:e.runID},function(e){return 200!==e.status||"AJB_reply"!==e.data.request.jtype?void a("stop",e):void r("stop",e)});break;case"info":n.get("afm-main","detail",{id:e.appID},function(e){return 200!==e.status||"AJB_reply"!==e.data.request.jtype?void a("detail",e):void r("detail",e)})}u()},d={animationIn:"slideInFromTop",contentScope:{action:c,close:u,icon:e.icon,label:e.label},template:t};e.modal=new i(d),e.modal.activate()},r.handle&&e.store[r.handle].name?(e.icon=a.paths.icons+e.store[r.handle].name.toLowerCase()+"-ico.png",e.label=e.store[r.handle].name,e.appliID=r.handle):(e.icon=a.paths.icons+"w3c-ico.png",e.label=r.handle),o.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:o,scope:{callback:"=",store:"="}}}])}(),function(){"use strict";angular.module("DashboardModule",["SubmitButton","TokenRefresh","AppliButton"]).controller("DashboardController",["AppCall","Notification",function(e,t){var a=this;a.uuid="none",a.token="none",a.session="none",a.status="err-no",a.appliIDs=[],a.appliStore={},a.AppliCB=function(e,t,n){a.request=t,a.errcode=n.status,n.data&&(a.response=n.data)},a.GetRunnables=function(){e.get("afm-main","runnables",{},function(e){if(a.request="/api/afm-main/runnable",a.response=e.data,a.errcode=e.status,200===e.status){if("AJB_reply"!==e.data.request.jtype&&"runnables"!==e.data.request.api)return void t.error({message:"Invalid Respond to /opa/afm-main/runnable response.data="+e.data,delay:5e3});for(var n=[],i=e.data.response.runnables,s=0;s\n \n \n\n')}])}(),function(){angular.module("AFBclient").run(["$templateCache",function(e){e.put("pages/Dashboard/Dashboard.html",'

Application Framework Manager Simple Client

req= {{ctrl.request}} res= {{ctrl.response}} status= {{ctrl.errcode}}
')}])}(); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpZGdldHMvUmFuZ2VTbGlkZXJzL1JhbmdlU2xpZGVyTW9kLmpzIiwid2lkZ2V0cy9Ob3RpZmljYXRpb25zL1Rva2VuUmVmcmVzaFN2Yy5qcyIsIndpZGdldHMvTm90aWZpY2F0aW9ucy9Nb2RhbE5vdGlmaWNhdGlvbi5qcyIsIndpZGdldHMvTmF2aWdhdGlvbi9MaW5rQnV0dG9uLmpzIiwid2lkZ2V0cy9Gb3JtSW5wdXQvVXBsb2FkQXBwbGkuanMiLCJ3aWRnZXRzL0Zvcm1JbnB1dC9JbnB1dFRleHQuanMiLCJ3aWRnZXRzL0Zvcm1JbnB1dC9JbnB1dFBhc3N3b3JkLmpzIiwid2lkZ2V0cy9BY3Rpb25CdXR0b25zL1N1Ym1pdEJ1dHRvbi5qcyIsIndpZGdldHMvQWN0aW9uQnV0dG9ucy9BcHBsaUJ1dHRvbi5qcyIsInBhZ2VzL0Rhc2hib2FyZC9EYXNoYm9hcmRNb2R1bGUuanMiLCJzZ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GVsZW1lbnQuYWRkQ2xhc3MgKGNsYXNzZSk7XG4gICAgICAgICAgICBlbHNlICBlbGVtZW50LnJlbW92ZUNsYXNzIChjbGFzc2UpO1xuICAgICAgICB9O1xuXG4gICAgICAgIHNjb3BlLnNldERpc2FibGUgPSBmdW5jdGlvbiAoZGlzYWJsZWQpIHtcblxuICAgICAgICAgICAgaWYgKGRpc2FibGVkKSB7XG4gICAgICAgICAgICAgICAgZWxlbWVudC5hZGRDbGFzcyAoXCJkaXNhYmxlXCIpO1xuICAgICAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbMF0uY3NzICgndmlzaWJpbGl0eScsJ2hpZGRlbicpO1xuICAgICAgICAgICAgICAgIGlmIChzY29wZS5kdWFsKSB7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbMV0uY3NzICgndmlzaWJpbGl0eScsJ2hpZGRlbicpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZWxlbWVudC5yZW1vdmVDbGFzcyAoXCJkaXNhYmxlXCIpO1xuICAgICAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbMF0uY3NzICgndmlzaWJpbGl0eScsJ3Zpc2libGUnKTtcbiAgICAgICAgICAgICAgICBpZiAoc2NvcGUuZHVhbCkgc2NvcGUuaGFuZGxlc1sxXS5jc3MgKCd2aXNpYmlsaXR5JywndmlzaWJsZScpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgIH07XG5cbiAgICAgICAgc2NvcGUubm9ybWFsaXplID0gZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB2YXIgcmVzdWx0O1xuICAgICAgICAgICAgdmFyIHJhbmdlID0gc2NvcGUubm90TW9yZSAtIHNjb3BlLm5vdExlc3M7XG4gICAgICAgICAgICB2YXIgcG9pbnQgPSB2YWx1ZSAqIHJhbmdlO1xuXG4gICAgICAgICAgICAvLyBpZiBzdGVwIGlzIHBvc2l0aXZlIGxldCdzIHJvdW5kIHN0ZXAgYnkgc3RlcFxuICAgICAgICAgICAgaWYgKHNjb3BlLmJ5U3RlcCA+ICAwKSB7XG4gICAgICAgICAgICAgICAgdmFyIG1vZCA9IChwb2ludCAtIChwb2ludCAlIHNjb3BlLmJ5U3RlcCkpIC8gc2NvcGUuYnlTdGVwO1xuICAgICAgICAgICAgICAgIHZhciByZW0gPSBwb2ludCAlIHNjb3BlLmJ5U3RlcDtcblxuICAgICAgICAgICAgICAgIHZhciByb3VuZCA9IChyZW0gPj0gc2NvcGUuYnlTdGVwICogMC41ID8gc2NvcGUuYnlTdGVwIDogMCk7XG4gICAgICAgICAgICAgICAgcmVzdWx0PSAobW9kICogc2NvcGUuYnlTdGVwICsgcm91bmQpICsgc2NvcGUubm90TGVzcztcbiAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nIChcInJhbmdlPSVkIHZhbHVlPSVkIHBvaW50PSVkIG1vZD0lZCByZW09JWQgcm91bmQ9JWQgcmVzdWx0PSVkXCIsIHJhbmdlLCB2YWx1ZSwgcG9pbnQsIG1vZCwgcmVtLCByb3VuZCwgcmVzdWx0KVxuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIGlmIHN0ZXAgaXMgbmVnYXRpdmUgcmV0dXJuIHJvdW5kIHRvIGFza2VkIGRlY2ltYWxcbiAgICAgICAgICAgIGlmIChzY29wZS5ieVN0ZXAgPCAgMCkge1xuICAgICAgICAgICAgICAgIHZhciBwb3dlciAgPSAgTWF0aC5wb3cgKDEwLChzY29wZS5ieVN0ZXAgKiAtMSkpO1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHNjb3BlLm5vdExlc3MgKyBwYXJzZUludCAocG9pbnQgKiBwb3dlcikgLyBwb3dlcjtcbiAgICAgICAgICAgICAgICByZXR1cm4gKHJlc3VsdCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC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uICAgICAgICAgICAgdmFyIG9mZnNldDtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHZhbHVlIDwgc2NvcGUudmFsdWVbMF0pIHtcbiAgICAgICAgICAgICAgICBpZiAoIXNjb3BlLmR1YWwpIHNjb3BlLnNldFZhbHVlICh2YWx1ZSwwKTtcbiAgICAgICAgICAgICAgICBlbHNlIHNjb3BlLnNldFZhbHVlICh2YWx1ZSwxKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHNjb3BlLnZlcnRpY2FsKSB7XG4gICAgICAgICAgICAgICAgb2Zmc2V0ID0gc2NvcGUuYm91bmRzLmJhci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5oZWlnaHQgKiAodmFsdWUgLSBzY29wZS5ub3RMZXNzKSAvIChzY29wZS5ub3RNb3JlIC0gc2NvcGUubm90TGVzcyk7XG4gICAgICAgICAgICAgICAgc2NvcGUuc3RhcnQuY3NzKCdoZWlnaHQnLG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBvZmZzZXQgPSBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLndpZHRoICogKHZhbHVlIC0gc2NvcGUubm90TGVzcykgLyAoc2NvcGUubm90TW9yZSAtIHNjb3BlLm5vdExlc3MpO1xuICAgICAgICAgICAgICAgIHNjb3BlLnN0b3AuY3NzKHsncmlnaHQnOiAwLCAnd2lkdGgnOiAoc2NvcGUuYm91bmRzLmJhci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS53aWR0aCAgLSBvZmZzZXQpICsgJ3B4J30pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzY29wZS5zdG9wVmFsdWU9IHZhbHVlO1xuICAgICAgICB9O1xuXG4gICAgICAgIHNjb3BlLnRyYW5zbGF0ZSA9IGZ1bmN0aW9uIChvZmZzZXQsIGhhbmRsZSkge1xuICAgICAgIC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ZS5yZWxhdGl2ZVswXSkgKiAgc2NvcGUuYm91bmRzLmJhci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5oZWlnaHQ7XG4gICAgICAgICAgICAgICAgICAgc3RhcnQgID0gKHNjb3BlLnJlbGF0aXZlWzBdICogIHNjb3BlLmJvdW5kcy5iYXIuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkuaGVpZ2h0KTtcbiAgICAgICAgICAgICAgICAgICBzY29wZS5zbGlkZXIuY3NzICh7J2JvdHRvbSc6IHN0YXJ0KydweCcsJ2hlaWdodCc6IGhlaWdodCArICdweCd9KTtcbiAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgICAgICBzY29wZS5oYW5kbGVzW2hhbmRsZV0uY3NzKHtcbiAgICAgICAgICAgICAgICAgICAgJy13ZWJraXQtdHJhbnNmb3JtJzogJ3RyYW5zbGF0ZVgoJyArIG9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAnLW1vei10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWCgnICsgb2Zmc2V0ICsgJ3B4KScsXG4gICAgICAgICAgICAgICAgICAgICctbXMtdHJhbnNmb3JtJzogJ3RyYW5zbGF0ZVgoJyArIG9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAnLW8tdHJhbnNmb3JtJzogJ3RyYW5zbGF0ZVgoJyArIG9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAndHJhbnNmb3JtJzogJ3RyYW5zbGF0ZVgoJyArIG9mZnNldCArICdweCknXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgaWYgKCFzY29wZS5kdWFsKSBzY29wZS5zbGlkZXIuY3NzKCd3aWR0aCcsb2Zmc2V0ICsgJ3B4Jyk7XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoc2NvcGUucmVsYXRpdmVbMV0gJiYgc2NvcGUucmVsYXRpdmVbMF0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5zdGFydFZhbHVlID0gLUluZmluaXR5O1xuICAgICAgICAgICAgc2NvcGUuc3RvcFZhbHVlICA9IEluZmluaXR5O1xuICAgICAgICAgICAgc2NvcGUuYnlTdGVwICAgPSBwYXJzZUludChhdHRycy5ieVN0ZXApIHx8IDE7XG4gICAgICAgICAgICBzY29wZS52ZXJ0aWNhbCA9IGF0dHJzLnZlcnRpY2FsICAgfHwgZmFsc2U7XG4gICAgICAgICAgICBzY29wZS5kdWFsICAgICA9IGF0dHJzLmR1YWxIYW5kbGVzfHwgZmFsc2U7XG4gICAgICAgICAgICBzY29wZS50cmlnZ2VyX2lucHV0X2NoYW5nZT0gZmFsc2U7XG4gICAgICAgICAgICBzY29wZS5ub3RNb3JlICA9IHBhcnNlSW50KGF0dHJzLm5vdE1vcmUpICAgfHwgMTAwO1xuICAgICAgICAgICAgc2NvcGUubm90TGVzcyAgPSBwYXJzZUludChhdHRycy5ub3RMZXNzKSAgIHx8IDA7XG5cbiAgICAgICAgICAgIGlmIChzY29wZS52ZXJ0aWNhbCkgZWxlbWVudC5hZGRDbGFzcyhcInZlcnRpY2FsLXJhbmdlXCIpO1xuXG4gICAgICAgICAgICBzY29wZS5oYW5kbGVzPSBbc2NvcGUuZmluZCgnLmhhbmRsZS1taW4nKSwgc2NvcGUuZmluZCgnLmhhbmRsZS1tYXgnKV07XG4gICAgICAgICAgICBzY29wZS5iYXIgICAgPSBlbGVtZW50O1xuICAgICAgICAgICAgc2NvcGUuc2xpZGVyID0gc2NvcGUuZmluZCgnLnJhbmdlLXNsaWRlci1hY3RpdmUtc2VnbWVudCcpO1xuICAgICAgICAgICAgc2NvcGUuc3RhcnQgID0gc2NvcGUuZmluZCgnLmliei1yYW5nZS1zbGlkZXItc3RhcnQnKTtcbiAgICAgICAgICAgIHNjb3BlLnN0b3AgICA9IHNjb3BlLmZpbmQoJy5pYnotcmFuZ2Utc2xpZGVyLXN0b3AnKTtcbiAgICAgICAgICAgIHNjb3BlLmRpc2FibGU9IGF0dHJzLmRpc2FibGUgfHwgZmFsc2U7XG5cbiAgICAgICAgICAgIHNjb3BlLmN0cmxoYW5kbGUgPSBuZXcgUmFuZ2VTbGlkZXJIYW5kbGUgKHNjb3BlKTtcblxuICAgICAgICAgICAgLy8gcHJlcGFyZSBET00gb2JqZWN0IHBvaW50ZXIgdG8gY29tcHV0ZSBzaXplIGR5bmFtaWNhbGx5XG4gICAgICAgICAgICBzY29wZS5ib3VuZHMgPSB7XG4gICAgICAgICAgICAgICAgYmFyICAgIDogZWxlbWVudFswXSxcbiAgICAgICAgICAgICAgICBoYW5kbGVzOiBbc2NvcGUuaGFuZGxlc1swXVswXSwgc2NvcGUuaGFuZGxlc1sxXVswXV1cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGlmIChhdHRycy5kaXNhYmxlID09PSAndHJ1ZScpIHNjb3BlLnNldERpc2FibGUodHJ1ZSk7XG5cbiAgICAgICAgICAgIGlmIChhdHRycy5kaXNwbGF5VGFyZ2V0KSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChhdHRycy5kaXNwbGF5VGFyZ2V0KSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgdHJ1ZSA6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ2hhbmRsZScgOlxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuZGlzcGxheXMgPSBzY29wZS5oYW5kbGVzO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1swXS5hZGRDbGFzcygnaWJ6LXJhbmdlLXNsaWRlci1kaXNwbGF5Jyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2NvcGUuZHVhbCkgc2NvcGUuaGFuZGxlc1sxXS5hZGRDbGFzcygnaWJ6LXJhbmdlLXNsaWRlci1kaXNwbGF5Jyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmRpc3BsYXlzID0gIFskZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQgKGF0dHJzLmRpc3BsYXlUYXJnZXQpXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Ugc2NvcGUuZGlzcGxheXM9W107XG5cbiAgICAgICAgICAgIC8vIGV4dHJhY3QgaW5pdGlhbCB2YWx1ZXMgZnJvbSBhdHRycyBhbmQgcGFyc2UgaW50byBpbnRcbiAgICAgICAgICAgIGlmICghYXR0cnMuaW5pdGlhbCkge1xuICAgICAgICAgICAgICAgIHNjb3BlLmluaXRpYWwgID0gW3Njb3BlLm5nTW9kZWwsIHNjb3BlLm5nTW9kZWxdOyAvLyBpbml0aWFsaXplIHRvIG1vZGVsIHZhbHVlc1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgaW5pdGlhbCAgPSBhdHRycy5pbml0aWFsLnNwbGl0KCcsJyk7XG4gICAgICAgICAgICAgICAgc2NvcGUuaW5pdGlhbCA9IFtcbiAgICAgICAgICAgICAgICAgICAgaW5pdGlhbFswXSAhPT0gdW5kZWZpbmVkID8gcGFyc2VJbnQgKGluaXRpYWxbMF0pIDogc2NvcGUubm90TGVzcyxcbiAgICAgICAgICAgICAgICAgICAgaW5pdGlhbFsxXSAhPT0gdW5kZWZpbmVkID8gcGFyc2VJbnQgKGluaXRpYWxbMV0pIDogc2NvcGUubm90TW9yZVxuICAgICAgICAgICAgICAgIF07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIE1vbml0b3IgYW55IGNoYW5nZXMgb24gc3RhcnQvc3RvcCBkYXRlcy5cbiAgICAgICAgICAgIHNjb3BlLiR3YXRjaCgnc3RhcnRBdCcsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIGlmIChzY29wZS52YWx1ZSA8IHNjb3BlLnN0YXJ0QXQgKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vc2NvcGUuc2V0VmFsdWUgKHNjb3BlLnN0YXJ0QXQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc2NvcGUuc3RhcnRBdCkgc2NvcGUuc2V0U3RhcnQgKHNjb3BlLnN0YXJ0QXQpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIHNjb3BlLiR3YXRjaCgnc3RvcEF0JyAsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIGlmIChzY29wZS52YWx1ZSA+IHNjb3BlLnN0b3BBdCkge1xuICAgICAgICAgICAgICAgICAgICAvL3Njb3BlLnNldFZhbHVlIChzY29wZS5zdG9wQXQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc2NvcGUuc3RvcEF0KSBzY29wZS5zZXRTdG9wIChzY29wZS5zdG9wQXQpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIC8vIGZpbmlzaCB3aWRnZXQgaW5pdGlhbGlzYXRpb25cbiAgICAgICAgICAgIHNjb3BlLmluaXRpYWxTZXR0aW5ncyAoc2NvcGUuaW5pdGlhbCk7XG5cbiAgICAgICAgfTtcblxuICAgICAgICBzY29wZS5pbml0KCk7XG4gICAgICAgIFxuICAgICAgICAgLy8gc2xpZGVyIGlzIHJlYWR5IHByb3ZpZGUgY29udHJvbCBoYW5kbGUgdG8gYXBwbGljYXRpb24gY29udHJvbGxlclxuICAgICAgICBzY29wZS4kd2F0Y2ggKCdpbml0aG9vaycsIGZ1bmN0aW9uICgpIHsgICAgICAgICAvLyBpbml0IFZhbHVlcyBtYXkgYXJyaXZlIGxhdGVcbiAgICAgICAgICAgIGlmIChzY29wZS5pbml0aG9vaykgc2NvcGUuaW5pdGhvb2sgKHNjb3BlLmN0cmxoYW5kbGUpO1xuICAgICAgICB9KTtcblxuICAgICAgICBzY29wZS4kd2F0Y2ggKCdpbml0dmFsdWVzJywgZnVuY3Rpb24gKCkgeyBcdC8vIG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ICAgICAgICB9O1xuICAgICAgICBcbiAgICAgICAgc2NvcGUub25zdWNjZXNzID0gZnVuY3Rpb24oZGF0YSwgZXJyY29kZSwgaGVhZGVycywgY29uZmlnKSB7XG4gICAgICAgICAgICBpZiAoc2NvcGUuc3RhdHVzICE9PSB0cnVlKSAge1xuICAgICAgICAgICAgICAgIGlmIChkYXRhLnJlcXVlc3QudG9rZW4pIEFwcENvbmZpZy5zZXNzaW9uLnRva2VuID0gZGF0YS5yZXF1ZXN0LnRva2VuO1xuICAgICAgICAgICAgICAgIGlmIChkYXRhLnJlcXVlc3QudXVpZCkgIEFwcENvbmZpZy5zZXNzaW9uLnV1aWQgID0gZGF0YS5yZXF1ZXN0LnV1aWQ7XG4gICAgICAgICAgICAgICAgaWYgKGRhdGEucmVxdWVzdC50aW1lb3V0KSAgQXBwQ29uZmlnLnNlc3Npb24udGltZW91dCAgPSBkYXRhLnJlcXVlc3QudGltZW91dDtcblxuICAgICAgICAgICAgICAgIE5vdGlmaWNhdGlvbi5zdWNjZXNzICh7bWVzc2FnZTogXCJBcHBGcmFtZXdvcmsgQmluZGVyIEJhY2sgdG8gTGl2ZVwiLCBkZWxheTogMzAwMH0pO1xuICAgICAgICAgICAgICAgIHNjb3BlLm9ubGluZSgpO1xuICAgICAgICAgICAgICAgIGlmIChzY29wZS5jYWxsYmFjaykgc2NvcGUuY2FsbGJhY2soKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNjb3BlLnN0YXR1cyA9IDE7XG4gICAgICAgIH07XG5cbiAgICAgICAgLy8gQ2hlY2sgQmluZGVyIHN0YXR1c1xuICAgICAgICBzY29wZS5nZXRwaW5nID0gZnVuY3Rpb24oKSB7XG5cbiAgICAgICAgICAgIHZhciBoYW5kbGVyID0gJGh0dHAuZ2V0KEFwcENvbmZpZy5zZXNzaW9uLnBpbmcrJz90b2tlbj0nKyBBcHBDb25maWcuc2Vzc2lvbi50b2tlbik7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgI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gICAgICAgICAgICAgIGZ1bmN0aW9uIG15bWV0aG9kcyhzY29wZSwgZWxlbSwgYXR0cnMpIHtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUucGFyZW50ID0gZWxlbS5wYXJlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kYWwgICAgPSBlbGVtLmZpbmQoXCJkaXZcIik7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgIFxuICAgICAgICAgICAgICAgICAgICAvLyBkZWxheSB0aXAgZGlzcGxheSB0byBhdm9pZCBibGlua2luZyB3aGVuIG1vdmluZyBtb3VzZSBmYXN0XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGRpc3BsYXkgKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gYWN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2NvcGUuc2hvdykgc2NvcGUubW9kYWwuY3NzKHtvcGFjaXR5OiAxLCB2aXNpYmlsaXR5Oid2aXNpYmxlJ30pOyAgXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5zaG93ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLnRpbWVvdXQgPSAkdGltZW91dChhY3Rpb24sIHNjb3BlLmRlbGF5KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY2xvc2UgKCkge1xuICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLnNob3cgPSBmYWxzZTsgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICBzY29wZS5tb2RhbC5jc3Moe29wYWNpdHk6IDAsIHZpc2liaWxpdHk6J2hpZGRlbid9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBcblxuICAgICAgICAgICAgICAgICAgICAvLyBhanVzdCBpY29uIG9yIHVzZSBkZWZhdWx0XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmljb24gID0gYXR0cnMuaWNvbiB8fCAnZmktbGlnaHRidWxiJztcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSBQYXJlbnQgZWxlbWVudCB0byBnZXQgbW91c2UgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUucGFyZW50LmFkZENsYXNzICgnYXMtbW9kYWwtdGlwJyk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdjbGljaycsIGNsb3NlKTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUucGFyZW50LmJpbmQoJ2ZvY3VzJywgZGlzcGxheSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdtb3VzZW92ZXInLCBkaXNwbGF5KTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUucGFyZW50LmJpbmQoJ21vdXNlbGVhdmUnLCBjbG9zZSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdibHVyJywgY2xvc2UpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuZGVsYXkgPSBhdHRycy5kZWxheSB8fCAxMDAwOyAvLyB3YWl0IDFzIGJlZm9yZSBkaXNwbGF5aW5nIHRpcFxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RyaWN0OiAnRScsXG4gICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiB0bXBsLFxuICAgICAgICAgICAgICAgICAgICBsaW5rOiBteW1ldGhvZHMsXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlOiB7dGlwOiBcIj1cIn0gLy8gdGlwIG1heSBub3QgYmU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mdudS5vcmcvbGljZW5zZXMvPi5cbiAqIFxuICogQnVnczogSW5wdXQgd2l0aCBDYWxsYmFjayBTSE9VTEQgQkUgZ2V0ICdyZXF1aXJlZCcgY2xhc3NcbiAqL1xuXG4oZnVuY3Rpb24gKCkge1xuICAgICd1c2Ugc3RyaWN0JztcblxuICAgIHZhciB0bXBsID0gJzxzcGFuIHRpdGxlPVwiR290bzoge3tocmVmfX1cIiBuZy1jbGljaz1cImNsaWNrZWQoKVwiPicgK1xuICAgICAgICAgICAgJzxpIGNsYXNzPVwie3tpY29ufX1cIj48L2k+JyArXG4gICAgICAgICAgICAnPHNwYW4+e3tsYWJlbH19PC9zcGFuPicgK1xuICAgICAgICAgICAgJzwvc3Bhbj4nO1xuXG5cbiAgICBhbmd1bGFyLm1vZHVsZSgnTGlua0J1dHRvbicsIFtdKVxuICAgICAgICAgICAgLmRpcmVjdGl2ZSgnbGlua0J1dHRvbicsIFtcIiRsb2NhdGlvblwiLCBmdW5jdGlvbiAoJGxvY2F0aW9uKSB7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gbXltZXRob2RzKHNjb3BlLCBlbGVtLCBhdHRycykge1xuXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmNsaWNrZWQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghYXR0cnMucXVlcnkpICRsb2NhdGlvbi5wYXRoKGF0dHJzLmhyZWYpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSAkbG9jYXRpb24ucGF0aChhdHRycy5ocmVmKS5zZWFyY2goYXR0cnMucXVlcnkpO1xuICAgICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIGFqdXN0IGljb24gb3IgdXNlIGRlZmF1bHRcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaWNvbiA9IGF0dHJzLmljb24gICB8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vbmZpZy5zZXNzaW9uLnRva2VuKTtcblxuICAgICAgICAgICAgICAgIHNjb3BlLm1vZGFsLmRlYWN0aXZhdGUoKTtcbiAgICAgICAgICAgICAgICAkdGltZW91dCAoZnVuY3Rpb24oKSB7c2NvcGUubW9kYWwuZGVzdHJveSgpO30sIDEwMDApO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIGFiYW5kb24gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICBzY29wZS5tb2RhbC5kZWFjdGl2YXRlKCk7XG4gICAgICAgICAgICAgICAgJHRpbWVvdXQgKGZ1bmN0aW9uKCkge3Njb3BlLm1vZGFsLmRlc3Ryb3koKTt9LCAxMDAwKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIHJlYWRlckNCID0gZnVuY3Rpb24gKHVwbG9hZCkge1xuICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gRmlsZSB1cGxvYWQgZmFpbCBoYW5kbGUgZXJyb3JcbiAgICAgICAgICAgICAgICBpZiAoISB1cGxvYWQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGhhbmRsZS5maWxlLnNpemUgPiBzY29wZS5tYXhzaXplKjEwMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGljb24gPSBzY29wZS5pc3Rvb2JpZztcbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlPSB0bXBsRXJyb3I7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGlmIChpc05hTihoYW5kbGUuZmlsZS5zaXplKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXBwaWNvbiA9IHNjb3BlLmlzbm90dmFsaWQ7IFxuICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU9IHRtcGxFcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgICAgICAgICAgdmFyIHppcGFwcCA9IG5ldyBKU1ppcCAodXBsb2FkLnRhcmdldC5yZXN1bHQpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdGh1bWJuYWlsID0gemlwYXBwLmZpbGUoXCJpY29uXzEyOC5wbmdcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gQ2hlY2sgaXMgd2UgaGF2ZSBhIHRodW1ibmFpbCB3aXRoaW4gbG9hZGVkIFppcGZpbGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0aHVtYm5haWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIlRoaXMgaXMgbm90IGEgdmFsaWQgQXBwbGljYXRpb24gRnJhbWV3b3JrIEFQUFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGljb24gPSBzY29wZS5pc25vdHZhbGlkO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU9IHRtcGxFcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy9zY29wZS5pbWdFbGVtWzBdLnNyYyA9IHdpbmRvdy5VUkwuY3JlYXRlT2JqZWN0VVJMKG5ldyBCbG9iKFt0aHVtYm5haWwuYXNBcnJheUJ1ZmZlcigpXSwge3R5cGU6IFwiaW1hZ2VcIn0pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGljb24gPSB3aW5kb3cuVVJMLmNyZWF0ZU9iamVjdFVSTChuZXcgQmxvYihbdGh1bWJuYWlsLmFzQXJyYXlCdWZmZXIoKV0sIHt0eXBlOiBcImltYWdlXCJ9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZSA9IHRtcGxNb2RhbDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAvLyByZWZlcmVuY2UgaHR0cDovL2ZvdW5kYXRpb24uenVyYi5jb20vYXBwcy9kb2NzLyMhL2FuZ3VsYXItbW9kdWxlc1xuICAgICAgICAgICAgICAgIHZhciBjb25maWcgPSB7XG4gICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbkluOiAnc2xpZGVJbkZyb21Ub3AnLFxuICAgICAgICAgICAgICAgICAgICBjb250ZW50U2NvcGU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3MgOiBzdWNjZXNzLFxuICAgICAgICAgICAgICAgICAgICAgICAgYWJhbmRvbiA6IGFiYW5kb24sXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uICAgIDogYXBwaWNvbixcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcG5hbWUgOiBoYW5kbGUuYmFzZW5hbWVcbiAgICAgICAgICAgICAgICAgICAgfSwgdGVtcGxhdGUgOiB0ZW1wbGF0ZVxuICAgICAgICAgICAgICAgIH07IFxuICAgICAgICAgICAgICAgIC8vIFBvcHVwIE1vZGFsIHRvIHJlbmRlciBhcHBsaWNhdGlvbiBkYXRhXG4gICAgICAgICAgICAgICAgc2NvcGUubW9kYWwgPSBuZXcgTW9kYWxGYWN0b3J5KGNvbmZpZyk7XG4gICAgICAgICAgICAgICAgc2NvcGUubW9kYWwuYWN0aXZhdGUgKCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgXG4gICAgICAgICAgICAvLyBMb2FkIGZpbGUgd2l0aGluIGJyb3dzZXIgYW5kIGlmIE9LIGNhbGwgcmVhZGVyQ0JcbiAgICAgICAgICAgIGhhbmRsZSA9IG5ldyBMb2FkRmlsZVN2YyAoc2NvcGUsIGZpbGVzLCByZWFkZXJDQik7XG4gICAgICAg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gICAgICAgICAgICBpZiAoJ25vc3BhY2UnIGluIGF0dHJzKSB7XG4gICAgICAgICAgICAgICBzY29wZS52YWx1ZT1zY29wZS52YWx1ZS5yZXBsYWNlKC9cXHMvZywgJycpOyAgICBcbiAgICAgICAgICAgIH1cbiAgICAgICAgIFxuICAgICAgICAgICAgaWYgKCdsb3dlcmNhc2UnIGluIGF0dHJzKSB7XG4gICAgICAgICAgICAgICBzY29wZS52YWx1ZSA9IHNjb3BlLnZhbHVlLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgICAgIC8vIGNoZWNrIG1pbmltdW0gbGVuZ2h0XG4gICAgICAgICAgICBpZiAoXCJtaW5sZW5cIiBpbiBhdHRycykge1xuICAgICAgICAgICAgICBpZiAoc2NvcGUudmFsdWUubGVuZ3RoIDwgYXR0cnMubWlubGVuKSB7XG4gICAgICAgICAgICAgICAgIHNjb3BlLnN0YXR1cz0naW52YWxpZCc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm1zZz1zY29wZS5uYW1lICsgJzogTWluaW51bSBMZW5naD0gJyArIGF0dHJzLm1pbmxlbiArICcgQ2hhcmFjdGVycyc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKCdlbWFpbCcgaW4gYXR0cnMpIHtcbiAgICAgICAgICAgIGlmICghZW1haWxwYXRlcm4udGVzdCAoc2NvcGUudmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgc2NvcGUuc3RhdHVzPSdpbnZhbGlkJztcbiAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9J2ludmFsaWQgZW1haWwgYWRkcmVzcyc7XG4gICAgICAgICAgICAgICAgc2NvcGUuZXJyb3I9dHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgIH1cbiAgICAgICAgIFxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKHNjb3BlLnJlcXVpcmVkKSB7XG4gICAgICAgICAgICAgICAgIHNjb3BlLnN0YXR1cz0naW52YWxpZCc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm1zZz1zY29wZS5uYW1lICsgJzogUmVxdWlyZWQgQXR0cmlidXRlJztcbiAgICAgICAgICAgICAgICAgc2NvcGUuZXJyb3I9dHJ1ZTsgXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgLy8gSWYgbG9jYWwgY29udHJvbCBmYWlsIGxldCdzIHJlZnVzZSBpbnB1dFxuICAgICAgICAgaWYgKHNjb3BlLmVycm9yKSB7XG4gICAgICAgICAgICAgaWYgKHNjb3BlLnJlcXVpcmVkICYmIHNjb3BlLnZhbGlkKSB7XG4gICAgICAgICAgICAgICAgIHNjb3BlLnZhbGlkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgIGlmIChzY29wZS5sNGFjb3VudGVyLnZhbGlkYXRlZCA+IDApIHNjb3BlLmw0YWNvdW50ZXIudmFsaWRhdGVkIC0tO1xuICAgICAgICAgICAgIH0gXG4gICAgICAgICAgICAgLy8gdXNlIGNhbGwgdG8gdXBkYXRlIGZvcm0gc2NvcGUgb24gZm9ybSBjb21wbGV0ZW5lc3NcbiAgICAgICAgICAgICBzY29wZS5jYWxsYmFjayAoYXR0cnMubmFtZSwgbnVsbCwgc2NvcGUuZG9uZSk7XG4gICAgICAgICB9IGVsc2UgeyBcbiAgICAgICAgICAgICAvLyBsb2NhbGNoZWNrIGlzIE9LIGJhY2t1cCBtYXkgbmV2ZXJ0aGVsZXNzIGNoYW5nZSBzdGF0dXMgdG8gZmFsc2VcbiAgICAgICAgICAgIGlmIChzY29wZS5yZXF1aXJlZCAgJiYgIXNjb3BlLnZhbGlkKSBzY29wZS5sNGFjb3VudGVyLnZhbGlkYXRlZCArKztcbiAgICAgICA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IGxvd2VyY2FzZSBhbmQgbm9zcGFjZSAgIFxuICAgICBpZiAoXCJlbWFpbFwiIGluIGF0dHJzKSB7XG4gICAgICAgIGF0dHJzLmxvd2VyY2FzZT10cnVlOyBcbiAgICAgICAgYXR0cnMubm9zcGFjZT10cnVlOyBcbiAgICAgICAgYXR0cnMubWlubGVuPTY7IFxuICAgICB9XG5cbiAgICAgaWYgKHNjb3BlLnJlcXVpcmVkKSB7XG4gICAgICAgICBzY29wZS5sNGFjb3VudGVyID0gc2NvcGUucGFyZW50LmRhdGEgKFwibDRhY291bnRlclwiKTtcbiAgICAgICAgIGlmICghc2NvcGUubDRhY291bnRlcikgeyBcbiAgICAgICAgICAgIHNjb3BlLmw0YWNvdW50ZXIgPSAge3JlcXVpcmVkOjEsIHZhbGlkYXRlZDowfTtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiRmllbGQgXCIrc2NvcGUubmFtZStcIiBpcyByZXF1aXJlZCAoMXN0KVwiKTtcbiAgICAgICAgICAgIHNjb3BlLnBhcmVudC5kYXRhIChcImw0YWNvdW50ZXJcIiwgc2NvcGUubDRhY291bnRlcik7IFxuICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIkZpZWxkIFwiK3Njb3BlLm5hbWUrXCIgaXMgcmVxdWlyZWRcIik7XG4gICAgICAgICAgICAgc2NvcGUubDRhY291bnRlci5yZXF1aXJlZCArKztcbiAgICAgICAgIH1cbiAgICAgfVxuICAgICAgICAgXG4gICAgIC8vIHJlZnJlc2ggdmFsaWRhdGlvbiBlYWNoIHRpbWUgY29udHJvbGVyIHVwZGF0ZSB2YWx1ZVxuICAgICBzY29wZS4kd2F0Y2ggKCd2YWx1ZScsIGZ1bmN0aW9uKCl7XG4gICAgICAgICBpZihzY29wZS52YWx1ZSkgc2NvcGUudmFsaWRhdGUoKTsgfVxuICAgICApO1xuICAgIFxuICAgIH1cbiAgICBcbiAgICByZXR1cm4ge1xuICAgICAgICByZ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ZWQoKVwiPicgK1xuICAgICAgICAgICAgJzxpIGNsYXNzPVwie3tpY29ufX1cIj48L2k+JyArXG4gICAgICAgICAgICAnPHNwYW4+e3tsYWJlbH19PC9zcGFuPicgK1xuICAgICAgICAgICAgJzwvZGl2Pic7XG5cbiAgICBhbmd1bGFyLm1vZHVsZSgnU3VibWl0QnV0dG9uJywgW10pXG4gICAgICAgICAgICAuZGlyZWN0aXZlKCdzdWJtaXRCdXR0b24nLCBmdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBteW1ldGhvZHMoc2NvcGUsIGVsZW0sIGF0dHJzKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gYWp1c3QgaWNvbiBvciB1c2UgZGVmYXVsdFxuICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uID0gYXR0cnMuaWNvbiB8fCAnZmktZm9vdCc7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmxhYmVsID0gYXR0cnMubGFiZWwgfHwgJ05leHQnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gYWRkIGxhYmVsIGFzIGNsYXNzXG4gICAgICAgICAgICAgICAgICAgIGVsZW0uYWRkQ2xhc3MgKHNjb3BlLmxhYmVsLnRvTG93ZXJDYXNlKCkpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gbm90ZTogY2xpY2tlZCBpbiBpbXBvcnRlZCBhbmQgd2hlbiB0ZW1wbGF0ZSBpcyBjbGlja2VkXG4gICAgICAgICAgICAgICAgICAgIC8vIGl0IHdpbGwgY2FsbCBjbGlja2VkIG1ldGhvZCBwYXNzZWQgaW4gcGFyYW0uXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RyaWN0OiAnRScsXG4gICAgICAgICAgICA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PGEgbmctY2xpY2s9YWN0aW9uKFwiaW5mb1wiKT48aSBjbGFzcz1cImZpLWluZm9cIj4gSW5mbzwvaT48L2E+PC9saT4nICtcbiAgICAgICAgICAgICc8L3VsPicgK1xuICAgICAgICAgICAgJyc7XG5cbiAgICBhbmd1bGFyLm1vZHVsZSgnQXBwbGlCdXR0b24nLCBbXSlcbiAgICAgICAgICAgIC5kaXJlY3RpdmUoJ2FwcGxpQnV0dG9uJywgW1wiQXBwQ29uZmlnXCIsIFwiQXBwQ2FsbFwiLCBcIk1vZGFsRmFjdG9yeVwiLCBcIk5vdGlmaWNhdGlvblwiLCBcIiR0aW1lb3V0XCIsIGZ1bmN0aW9uIChBcHBDb25maWcsIEFwcENhbGwsIE1vZGFsRmFjdG9yeSwgTm90aWZpY2F0aW9uLCAkdGltZW91dCkge1xuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gbXltZXRob2RzKHNjb3BlLCBlbGVtLCBhdHRycykge1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5jbGlja2VkID0gZnVuY3Rpb24gKCkge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbm90aWZ5RXJyb3IgPSBmdW5jdGlvbihhcGksIHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTm90aWZpY2F0aW9uLmVycm9yICh7bWVzc2FnZTogXCJGYWlsIC9hcGkvYWZtLW1haW5cIiArIGFwaSArIFwiPVwiICsgc2NvcGUubGFiZWwgKyBcIiBSdW5JRD1cIisgc2NvcGUuYXBwSUQsIGRlbGF5OiA1MDAwfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxlbS5hZGRDbGFzcyAoXCJmYWlsXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW0ucmVtb3ZlQ2xhc3MgKFwic3VjY2Vzc1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5jYWxsYmFjayAoc2NvcGUuYXBwbGlJRCwgYXBpLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbm90aWZ5U3VjY2VzcyA9IGZ1bmN0aW9uIChhcGksIHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxlbS5yZW1vdmVDbGFzcyAoXCJmYWlsXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLnJ1bklEID0gcmVzcG9uc2UuZGF0YS5yZXNwb25zZS5ydW5pZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5jYWxsYmFjayAoc2NvcGUuYXBwbGlJRCwgXCIvYXBpL2FmbS1tYWluL3N0YXJ0XCIsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjbG9zZU1vZGFsID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiTW9kYWwgQ2xvc2luZ1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5tb2RhbC5kZWFjdGl2YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRpbWVvdXQgKGZ1bmN0aW9uKCkge3Njb3BlLm1vZGFsLmRlc3Ryb3koKTt9LCAxMDAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhY3Rpb25Nb2RhbCA9IGZ1bmN0aW9uKGFjdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIk1vZGFsIEFjdGlvbj0lc1wiLCBhY3Rpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoYWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwic3RhcnRcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFwcENhbGwuZ2V0IChcImFmbS1tYWluXCIsIFwic3RhcnRcIiwge2lkOiBzY29wZS5hcHBsaUlEfSwgZnVuY3Rpb24ocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uuc3RhdHVzICE9PSAyMDAgfHwgcmVzcG9uc2UuZGF0YS5yZXF1ZXN0Lmp0eXBlICE9PSBcIkFKQl9yZXBseVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeUVycm9yIChcInN0YXJ0XCIsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3RpZnlTdWNjZXNzIChcInN0YXJ0XCIsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInN0b3BcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFwcENhbGwuZ2V0IChcImFmbS1tYWluXCIsIFwic3RvcFwiLCB7aWQ6IHNjb3BlLnJ1bklEfSwgZnVuY3Rpb24ocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uuc3RhdHVzICE9PSAyMDAgfHwgcmVzcG9uc2UuZGF0YS5yZXF1ZXN0Lmp0eXBlICE9PSBcIkFKQl9yZXBseVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeUVycm9yIChcInN0b3BcIiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeVN1Y2Nlc3MgKFwic3RvcFwiLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwiaW5mb1wiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQXBwQ2FsbC5nZXQgKFwiYWZtLW1haW5cIiwgXCJkZXRhaWxcIiwge2lkOiBzY29wZS5hcHBJRH0sIGZ1bmN0aW9uKHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnN0YXR1cyAhPT0gMjAwIHx8IHJlc3BvbnNlLmRhdGEucmVxdWVzdC5qdHlwZSAhPT0gXCJBSkJfcmVwbHlcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3RpZnlFcnJvciAoXCJkZXRhaWxcIiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeVN1Y2Nlc3MgKFwiZGV0YWlsXCIsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIkFjdGlvbk1vZGFsIHVua25vd24gYWN0aW9uPVslc11cIiwgYWN0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZU1vZGFsKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyByZWZlcmVuY2UgaHR0cDovL2ZvdW5kYXRpb24uenVyYi5jb20vYXBwcy9kb2NzLyMhL2FuZ3VsYXItbW9kdWxlc1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvbmZpZyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb25JbjogJ3NsaWRlSW5Gcm9tVG9wJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50U2NvcGU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uICA6IGFjdGlvbk1vZGFsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZSAgIDogY2xvc2VNb2RhbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbiAgICA6IHNjb3BlLmljb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsICAgOiBzY29wZS5sYWJlbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHRlbXBsYXRlIDogdG1wbE1vZGFsXG4gICAgICAgICAgICAgICAgICAgICAgICB9OyBcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFBvcHVwIE1vZGFsIHRvIHJlbmRlciBhcHBsaWNhdGlvbiBkYXRhXG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5tb2RhbCA9IG5ldyBNb2RhbEZhY3RvcnkoY29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZGFsLmFjdGl2YXRlICgpO1xuICAgICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIGV4dHJhY3QgYXBwbGljYXRpb24gaW5mb3JtYXRpb24gZnJvbSBBcHBJRCtTdG9yZVxuICAgICAgICAgICAgICAgICAgICBpZiAoYXR0cnMuaGFuZGxlICYmIHNjb3BlLnN0b3JlIFthdHRycy5oYW5kbGVdLm5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmljb24gID0gQXBwQ29uZmlnLnBhdGhzLmljb25zICsgc2NvcGUuc3RvcmUgW2F0dHJzLmhhbmRsZV0ubmFtZS50b0xvd2VyQ2FzZSgpICsgJy1pY28ucG5nJztcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmxhYmVsID0gc2NvcGUuc3RvcmUgW2F0dHJzLmhhbmRsZV0ubmFtZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmFwcGxpSUQ9IGF0dHJzLmhhbmRsZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uICA9IEFwcENvbmZpZy5wYXRocy5pY29ucyArICd3M2MtaWNvLnBuZyc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubGFiZWwgPSBhdHRycy5oYW5kbGU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIGFkZCBsYWJlbCBhcyBjbGFzc1xuICAgICAgICAgICAgICAgICAgICBlbGVtLmFkZENsYXNzIChzY29wZS5sYWJlbC50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIG5vdGU6IGNsaWNrZWQgaW4gaW1wb3J0ZWQgYW5kIHdoZW4gdGVtcGxhdGUgaXMgY2xpY2tlZFxuICAgICAgICAgICAgICAgICAgICAvLyBpdCB3aWxsIGNhbGwgY2xpY2tlZCBtZXRob2QgcGFzc2VkIGluIHBhcmFtLlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICByZXN0cmljdDogJ0UnLFxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogdG1wbEFwcGxpLFxuICAgICAgICAgICAgICAgICAgICBsaW5rOiBteW1ldGhvZHMsXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlOiB7Y2FsbGJhY2s6ICc9Jywgc3RvcmU6ICc9J31cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfV0pO1xufSkoKTtcbiIsIihmdW5jdGlvbigpIHtc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RhdGUgZGVidWcgVUkgem9uZVxuICAgICAgICAgICAgICAgIHNjb3BlLnJlcXVlc3QgID0gYWN0aW9uOyBcbiAgICAgICAgICAgICAgICBzY29wZS5lcnJjb2RlICA9IHJlc3BvbnNlLnN0YXR1cztcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2UuZGF0YSkgc2NvcGUucmVzcG9uc2UgPSByZXNwb25zZS5kYXRhO1xuICAgICAgICB9O1xuICAgICAgICBcbiAgICAgICAgc2NvcGUuR2V0UnVubmFibGVzID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICBjb25zb2xlLmxvZyAoXCJEYXNoYm9hcmQgR2V0UnVubmFibGVzXCIpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJhZm0tbWFpblwiLCBcInJ1bm5hYmxlc1wiLCB7LypxdWVyeSovfSwgZnVuY3Rpb24ocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAvLyB1cGRhdGUgZGVidWcgVUkgem9uZVxuICAgICAgICAgICAgICAgIHNjb3BlLnJlcXVlc3QgID0gXCIvYXBpL2FmbS1tYWluL3J1bm5hYmxlXCI7IFxuICAgICAgICAgICAgICAgIHNjb3BlLnJlc3BvbnNlID0gcmVzcG9uc2UuZGF0YTtcbiAgICAgICAgICAgICAgICBzY29wZS5lcnJjb2RlICA9IHJlc3BvbnNlLnN0YXR1cztcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uuc3RhdHVzICE9PSAyMDApIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiSG9vcCBHZXRSdW5uYWJsZSBmYWlsZWRcIik7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gQ2hlY2sgdGhpcyBpcyBhIHZhbGlkIHJlc3BvbnNlIGZyb20gQmluZGVyXG4gICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmRhdGEucmVxdWVzdC5qdHlwZSAhPT0gXCJBSkJfcmVwbHlcIiAmJiByZXNwb25zZS5kYXRhLnJlcXVlc3QuYXBpICE9PSBcInJ1bm5hYmxlc1wiKSB7XG4gICAgICAgICAgICAgICAgICBOb3RpZmljYXRpb24uZXJyb3IgKHttZXNzYWdlOiBcIkludmFsaWQgUmVzcG9uZCB0byAvb3BhL2FmbS1tYWluL3J1bm5hYmxlIHJlc3BvbnNlLmRhdGE9XCIrcmVzcG9uc2UuZGF0YSwgZGVsYXk6IDUwMDB9KTsgXG4gICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIC8vIGxvb3Agb24gcnVubmFibGUgYXBwbGljYXRpb24gdG8gcHJlcGFyZSBmb3IgZGlzcGxheVxuICAgICAgICAgICAgICAgIHZhciAgYXBwbGlJRHM9W107XG4gICAgICAgICAgICAgICAgdmFyICBydW5uYWJsZXMgPSByZXNwb25zZS5kYXRhLnJlc3BvbnNlLnJ1bm5hYmxlcztcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpZHg9MDsgaWR4IDwgcnVubmFibGVzLmxlbmd0aDsgaWR4ICsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGFwcGxpSURzW2lkeF0gPSBydW5uYWJsZXMgW2lkeF0uaWQ7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmFwcGxpU3RvcmUgW3J1bm5hYmxlcyBbaWR4XS5pZF0gPSAgcnVubmFibGVzIFtpZHhdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBzY29wZS5hcHBsaUlEcyA9IGFwcGxpSURzOyAvLyBhdm9pZCBwYXJ0aWFsIHVwZGF0ZSB0byBsaW1pdCBVSSByZWZyZXNoXG4gICAgICAgICAgICAgICAgXG4gICAgICAgIC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G1vZHVsZXMgb25seSByZWZlcmVuY2UgZGVwZW5kZW5jaWVzXG4gICAgYW5ndWxhci5tb2R1bGUoJ0pRdWVyeUVtdScsIFtdKVxuXG4gICAgICAgICAgICAvLyBGYWN0b3J5IGlzIGEgc2luZ2xldG9uIGFuZCBzaGFyZSBpdHMgY29udGV4dCB3aXRoaW4gYWxsIGluc3RhbmNlcy5cbiAgICAgICAgICAgIC5mYWN0b3J5KCdKUWVtdScsIGZ1bmN0aW9uICgpIHtcblxuICAgICAgICAgICAgICAgIHZhciBGaW5kSW5QYXJlbnQgPSBmdW5jdGlvbiAoZWxlbWVudCwgc2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBhcmVudCA9IGVsZW1lbnQ7XG4gICAgICAgICAgICAgICAgICAgIHZhciBzZWFyY2ggPSBzZWxlY3Rvci50b1VwcGVyQ2FzZSgpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAocGFyZW50WzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VhcmNoID09PSBwYXJlbnRbMF0udGFnTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwYXJlbnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9ICAvLyBIVE1MRGl2RWxlbWVudCBwcm9wZXJ0aWVzXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnQgPSBwYXJlbnQucGFyZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciAgRmluZEJ5VGFnPSBmdW5jdGlvbiAoZWxlbWVudCwgdGFnLCBzZWxlY3Rvcikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHR5cGUgICA9IHRhZy50b0xvd2VyQ2FzZSgpKyBcIk5hbWVcIjtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNoaWxkcmVuID0gZWxlbWVudC5jaGlsZHJlbigpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hpbGRyZW5bMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWFyY2ggPT09IGNoaWxkcmVuWzBdW3R5cGVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoaWxkcmVuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW4gPSBjaGlsZHJlbi5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciAgRmluZEJ5Q2xhc3M9IGZ1bmN0aW9uIChlbGVtZW50LCBzZWxlY3Rvcikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNoaWxkcmVuID0gZWxlbWVudC5jaGlsZHJlbigpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hpbGRyZW5bMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjaGlsZHJlbi5oYXNDbGFzcyhzZWFyY2gpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoaWxkcmVuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW4gPSBjaGlsZHJlbi5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgIC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blxuICAgICAgICAgICAgICAgIHZhciBteUNvbmZpZyA9IHtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHBhdGhzOiB7IC8vIFdhcm5pbmcgcGF0aHMgc2hvdWxkIGVuZCB3aXRoIC9cbiAgICAgICAgICAgICAgICAgICAgICAgIGltYWdlIDogJ2ltYWdlcy8nLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbnMgOiAnaW1hZ2VzL2ljb25zLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdmF0YXI6ICdpbWFnZXMvYXZhdGFycy8nLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXVkaW8gOiAnaW1hZ2VzL2F1ZGlvLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBsaSA6ICdpbWFnZXMvYXBwbGkvJ1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgbXlhcGk6IHsgLy8gV2FybmluZyBwYXRocyBzaG91bGQgZW5kIHdpdGggL1xuICAgICAgICAgICAgICAgICAgICAgICB0b2tlbiA6ICcvYXBpL215cGx1Z2luL3h4eHgnXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICBzZXNzaW9uOiB7IC8vIFRob3NlIGRhdGEgYXJlIHVwZGF0ZWQgYnkgc2Vzc2lvbiBzZXJ2aWNlXG4gICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZSAgOiAnL2FwaS90b2tlbi9jcmVhdGUnLFxuICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoIDogJy9hcGkvdG9rZW4vcmVmcmVzaCcsXG4gICAgICAgICAgICAgICAgICAgICAgIGNoZWNrICAgOiAnL2FwaS90b2tlbi9jaGVjaycsXG4gICAgICAgICAgICAgICAgICAgICAgIHJlc2V0ICAgOiAnL2FwaS90b2tlbi9yZXNldCcsXG4gICAgICAgICAgICAgICAgICAgICAgIHBpbmcgICAgOiAnL2FwaS90b2tlbi9jaGVjaycsXG4gICAgICAgICAgICAgICAgICAgICAgIGluaXRpYWwgOiAnMTIzNDU2Nzg5JywgIC8vIHR5cGljYWwgZGV2IGluaXRpYWwgdG9rZW5cbiAgICAgICAgICAgICAgICAgICAgICAgdGltZW91dCA6IDM2MDAsICAgICAgICAgLy8gdGltZW91dCBpcyB1cGRhdGVkIGNsaWVudCBzZXNzaW4gY29udGV4dCBjcmVhdGlvblxuICAgICAgICAgICAgICAgICAgICAgICBwaW5ncmF0ZTogNjAsICAgICAgICAgICAvLyBQaW5nIHJhdGUgdG8gY2hlY2sgaWYgc2VydmVyIGlzIHN0aWxsIGFsaXZlXG4gICAgICAgICAgICAgICAgICAgICAgIHV1aWQgICAgOiAnJywgICAgICAgICAgIC8vIHV1aWQgbWFwIHdpdGggY29va2llIG9yIGxvbmcgdGVybSBzZXNzaW9uIGFjY2VzcyBrZXlcbiAgICAgICAgICAgICAgICAgICAgICAgdG9rZW4gICA6ICcnICAgICAgICAgICAgLy8gd2lsbCBiZSByZXR1cm5lZCBmcm9tIGF1dGhlbnRpY2F0aW9uICAgIFxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIHJldHVybiBteUNvbmZpZztcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgIC8vIEZhY3RvcnkgaXMgYSBzaW5nbGV0b24gYW5kIHNoYXJlIGl0cyBjb250ZXh0IHdpdGhpbiBhbGwgaW5zdGFuY2VzLlxuICAgICAgICAgICAgLmZhY3RvcnkoJ0FwcENhbGwnLCBbXCIkaHR0cFwiLCBcIkFwcENvbmZpZ1wiLCBmdW5jdGlvbiAoJGh0dHAsIEFwcENvbmZpZykge1xuICAgICAgICAgICAgICAgIHZhciBteUNhbGxzID0ge1xuICAgICAgICAgICAgICAgICAgICBnZXQgOiBmdW5jdGlvbihwbHVnaW4sIGFjdGlvbiwgcXVlcnksIGNhbGxiYWNrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBxdWVyeS50b2tlbiA9IEFwcENvbmZpZy5zZXNzaW9uLnRva2VuOyAvLyBhZGQgdG9rZW4gdG8gcHJvdmlkZWQgcXVlcnkgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICRodHRwLmdldCgnL2FwaS8nICsgcGx1Z2luICsgJy8nICsgYWN0aW9uICwge3BhcmFtczogcXVlcnl9KS50aGVuIChjYWxsYmFjaywgY2FsbGJhY2spO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHJldHVybiBteUNhbGxzO1xuICAgICAgICAgICAgfV0pO1xuICAgIFxuIFxufSkoKTsiLCIoZnVuY3Rpb24oKSB7XG4gICd1c2Ugc3RyaWN0JztcblxuICBhbmd1bGFyLm1vZHVsZSgnQUZCY2xpZW50JywgWyAvLyBXYXJuaW5nOiBBcHBuYW1lIHNob3VsZCBmaXQgd2l0aCBndWxwZmlsZS5qcyAmIGluZGV4Lmh0bWxcbiAgICAndWkucm91dGVyJyxcbiAgICAnbmdBbmltYXRlJyxcblxuICAgIC8vZm91bmRhdGlvblxuICAgICdmb3VuZGF0aW9uJyxcbiAgICAnZm91bmRhdGlvbi5keW5hbWljUm91dGluZycsXG4gICAgJ2ZvdW5kYXRpb24uZHluYW1pY1JvdXRpbmcuYW5pbWF0aW9ucycsXG4gICAgXG4gICAgLy8gZXh0ZXJuYWwgY29tcG9uZW50c1xuICAgICd1aS1ub3RpZmljYXRpb24nLFxuICAgIFxuICAgIC8vIEFwcGxpY2F0aW9uIENvbXBvbmVudHNcbiAgICAnQXBwQ29uZmlnJyxcbiAgICAnSlF1ZXJ5RW11JyxcbiAgICAnRGFzaGJvYXJkTW9kdWxlJyxcbiAgICAnVXBsb2FkRmlsZXMnLFxuICAgICdMaW5rQnV0dG9uJyxcbiAgICAnVG9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