diff options
Diffstat (limited to 'afm-client/dist.prod/opa')
-rw-r--r-- | afm-client/dist.prod/opa/AFBclient.min.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/afm-client/dist.prod/opa/AFBclient.min.js b/afm-client/dist.prod/opa/AFBclient.min.js index f34a116..3de8576 100644 --- a/afm-client/dist.prod/opa/AFBclient.min.js +++ b/afm-client/dist.prod/opa/AFBclient.min.js @@ -1,2 +1,2 @@ -!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]&&(n<t.startValue&&(n=t.startValue),n>t.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&&n<t.stopValue&&t.translate(e,a))},t.setStart=function(e){var a;e>t.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;e<t.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.stop.css({right:0,width:t.bounds.bar.getBoundingClientRect().width-a+"px"})),t.stopValue=e},t.translate=function(e,a){var n;if(t.vertical){var i=t.bounds.bar.getBoundingClientRect().height-e;if(t.handles[a].css({"-webkit-transform":"translateY("+i+"px)","-moz-transform":"translateY("+i+"px)","-ms-transform":"translateY("+i+"px)","-o-transform":"translateY("+i+"px)",transform:"translateY("+i+"px)"}),t.dual){if(t.relative[1]&&t.relative[0]){var s=(t.relative[1]-t.relative[0])*t.bounds.bar.getBoundingClientRect().height;n=t.relative[0]*t.bounds.bar.getBoundingClientRect().height,t.slider.css({bottom:n+"px",height:s+"px"})}}else t.slider.css("height",e+"px")}else if(t.handles[a].css({"-webkit-transform":"translateX("+e+"px)","-moz-transform":"translateX("+e+"px)","-ms-transform":"translateX("+e+"px)","-o-transform":"translateX("+e+"px)",transform:"translateX("+e+"px)"}),t.dual){if(t.relative[1]&&t.relative[0]){var l=(t.relative[1]-t.relative[0])*t.bounds.bar.getBoundingClientRect().width;n=t.relative[0]*t.bounds.bar.getBoundingClientRect().width,t.slider.css({left:n+"px",width:l+"px"})}}else t.slider.css("width",e+"px")},t.setValue=function(e,a){var n;e!==t.value[a]&&(void 0===e&&(e=0),e>t.notMore&&(e=t.notMore),e<t.notLess&&(e=t.notLess),t.vertical?(t.relative[a]=(e-t.notLess)/(t.notMore-t.notLess),0===a&&(n=t.relative[a]*t.bounds.bar.getBoundingClientRect().height+t.bounds.handles[a].getBoundingClientRect().height/2),1===a&&(n=t.relative[a]*t.bounds.bar.getBoundingClientRect().height)):(t.relative[a]=(e-t.notLess)/(t.notMore-t.notLess),n=t.relative[a]*(t.bounds.bar.getBoundingClientRect().width-t.bounds.handles[a].getBoundingClientRect().width)),t.translate(n,a),t.value[a]=e,t.formatter?t.viewValue=t.formatter(e,void 0):t.viewValue=e,l&&l.$setViewValue(t.viewValue),t.displays[a]&&t.displays[a].html(t.viewValue))},t.keydown=function(e){switch(e.keyCode){case 39:case 38: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 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),i<t.bounds.handles[e].getBoundingClientRect().height&&(i=t.bounds.handles[e].getBoundingClientRect().height)):(i=a-t.bounds.bar.getBoundingClientRect().left,0>i&&(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;i<a.length;i++)t.moveHandle(n,a[i].pageX,a[i].pageY)}function l(e){a.unbind("touchmove",s),a.unbind("touchend",l),i.on("touchstart",t.touchBarCB),t.callback&&o!==t.value[n]&&t.callback(t.value[n],t.ctrlhandle)}var o=t.value[n];e.preventDefault(),a.on("touchmove",s),a.on("touchend",l),i.unbind("touchstart",t.touchBarCB)},t.handleCB=function(e,n){function i(e){t.moveHandle(n,e.clientX,e.clientY)}function l(){a.unbind("mousemove",i),a.unbind("mouseup",l),t.callback&&o!==t.value[n]&&t.callback(t.value[n],t.ctrlhandle)}if(!s.automatic){var o=t.value[n];e.preventDefault(),a.on("mousemove",i),a.on("mouseup",l),t.handles[n][0].focus(),t.actif=n}},t.find=function(e,t){var a;a=t?t[0].querySelector(e):i[0].querySelector(e);var n=angular.element(a);return n},t.initialSettings=function(e){var a;t.value=[],t.relative=[],null===t.precision&&(a=(""+t.byStep).match(/\.([\d]*)/),t.precision=a&&a[1]?a[1].length:0),i.on("touchstart",t.touchBarCB),t.handles[0].on("touchstart",function(e){t.touchHandleCB(e,0)}),t.dual&&(t.handles[1].addClass("range-slider-handle"),t.handles[1].on("touchstart",function(e){t.touchHandleCB(e,1)}),t.initvalues||t.setValue(e[1],1)),t.initvalues?t.initWidget(t.initvalues):t.setValue(e[0],0)},t.init=function(){if(t.sliderid=s.id||"slider-"+parseInt(1e3*Math.random()),t.startValue=-(1/0),t.stopValue=1/0,t.byStep=parseInt(s.byStep)||1,t.vertical=s.vertical||!1,t.dual=s.dualHandles||!1,t.trigger_input_change=!1,t.notMore=parseInt(s.notMore)||100,t.notLess=parseInt(s.notLess)||0,t.vertical&&i.addClass("vertical-range"),t.handles=[t.find(".handle-min"),t.find(".handle-max")],t.bar=i,t.slider=t.find(".range-slider-active-segment"),t.start=t.find(".ibz-range-slider-start"),t.stop=t.find(".ibz-range-slider-stop"),t.disable=s.disable||!1,t.ctrlhandle=new e(t),t.bounds={bar:i[0],handles:[t.handles[0][0],t.handles[1][0]]},"true"===s.disable&&t.setDisable(!0),s.displayTarget)switch(s.displayTarget){case!0:case"handle":t.displays=t.handles,t.handles[0].addClass("ibz-range-slider-display"),t.dual&&t.handles[1].addClass("ibz-range-slider-display");break;default:t.displays=[a.getElementById(s.displayTarget)]}else t.displays=[];if(s.initial){var n=s.initial.split(",");t.initial=[void 0!==n[0]?parseInt(n[0]):t.notLess,void 0!==n[1]?parseInt(n[1]):t.notMore]}else t.initial=[t.ngModel,t.ngModel];t.$watch("startAt",function(){t.value<t.startAt,t.startAt&&t.setStart(t.startAt)}),t.$watch("stopAt",function(){t.value>t.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='<div class="ibz-range-slider range-slider" title="{{title}}"data-slider><span class="range-slider-handle handle-min" ng-mousedown="handleCB($event,0)" ng-focus="focusCB(true)" ng-blur="focusCB(false)" role="slider" tabindex="0"></span><span class="handle-max" ng-mousedown="handleCB($event,1)" ng-focus="focusCB(true)" ng-blur="focusCB(false)" role="slider" tabindex="0"></span><span class="range-slider-active-segment"></span><span class="ibz-range-slider-start" ></span> <span class="ibz-range-slider-stop"></span> <input id={{sliderid}} type="hidden"></div>';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='<div class="afb-monitor" ng-click="getping()"><span class="afb-refresh-token" >afb://{{hostname}}:{{httpdport}}</span><i class="{{icon}}"></i></div>';angular.module("TokenRefresh",["AppConfig","ModalNotification"]).directive("tokenRefresh",["$log","$window","$timeout","$location","Notification","AppConfig","AppCall",function(t,a,n,i,s,l,o){function r(e,r,u){e.logged=void 0,a.onbeforeunload=function(){o.get("token","reset",{},function(){t.log("OPA exit")})},e.online=function(){r.addClass("online"),r.removeClass("offline"),e.logged=!0},e.offline=function(){r.addClass("offline"),r.removeClass("online"),e.logged=!1},e.onerror=function(){e.logged!==!1&&(s.warning({message:"AppFramework Binder Lost",delay:5e3}),e.offline()),e.status=0},e.onsuccess=function(t){t.request.token&&(l.session.token=t.request.token),t.request.uuid&&(l.session.uuid=t.request.uuid),t.request.timeout&&(l.session.timeout=t.request.timeout),e.logged!==!0&&(s.success({message:"AppFramework Binder Back to Live",delay:3e3}),e.online(),e.callback&&e.callback(t)),e.status=1},e.getping=function(){o.get("token","ping",{},function(t){200===t.status?e.onsuccess(t.data):e.onerror(),n(e.getping,1e3*l.session.pingrate)})},e.refresh=function(){o.get("token","refresh",{},function(t){200===t.status?e.onsuccess(t.data):e.onerror(),n(e.refresh,250*l.session.timeout)})},e.tkcreate=function(){o.get("token","create",{token:l.session.initial},function(t){200===t.status?e.onsuccess(t.data):e.onerror()})},e.icon=u.icon||"fi-lightbulb",e.hostname=i.host(),e.httpdport=i.port(),e.autolog=JSON.parse(u.autolog||!1),e.autolog&&e.tkcreate(),n(e.getping,1e3*l.session.pingrate),n(e.refresh,250*l.session.timeout)}return{template:e,scope:{callback:"="},restrict:"E",link:r}}])}(),function(){"use strict";var e='<div class="tip-modal-popup"><i class="{{icon}}"></i><span>{{tip}}</span></span></div>';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='<span title="Goto: {{href}}" ng-click="clicked()"><i class="{{icon}}"></i><span>{{label}}</span></span>';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;s<t.length;s++)if(this.file=t[s],this.basename=this.file.name.split("/").reverse()[0],isNaN(this.file.size)||this.file.size>1024*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='<input type="file" name="{{name}}-input" onchange="angular.element(this).scope().UpLoadFile(this.files)" accept="{{mimetype}}" style="display:none"><div class="upload-file" ng-click="imgClicked()"><i class="{{icon}}"></i> <span>{{label}}</span><range-slider ng-show="!noslider" id="{{name}}-slider" automatic=true inithook="SliderInitCB"></range-slider></div>',a='<span class="modal-text">Upload Application <b>{{appname}}</b> ?</span><div><img ng-src="{{icon}}"><submit-button icon="fi-x" label="Cancel" clicked="abandon"></submit-button><submit-button icon="fi-like" label="Install" clicked="success"></submit-button> </div>',n='<span class="modal-text">Invalid Application <b>{{appname}}</b> ?</span><div><img ng-src="{{icon}}"><submit-button icon="fi-x" label="Close" clicked="abandon"></submit-button></div>';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='<tip-modal tip="tip"></tip-modal><label for="{{name}}-intext">{{label}} <i ng-show="required" ng-click="ToBeDefined" class="required {{status}} fi-checkbox" title="Free Value But Mandatory Argument" alt="?"> </i></label><input type="{{type}}" id="{{name}}-intext" placeholder="{{placeholder}}" class="status-{{status}}" ng-model="value" ng-blur="validate()" ng-focus="selected()" ng-model-options="{ updateOn: \'default blur\', debounce: {default: 500, blur: 0} }"><alert data-ng-show="!valid&&errmsg">{{errmsg}}</alert>',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.length<i.minlen&&(e.status="invalid",e.errmsg=e.name+": Mininum Lengh= "+i.minlen+" Characters",e.error=!0),"email"in i&&(t.test(e.value)||(e.status="invalid",e.errmsg="invalid email address",e.error=!0))):e.required&&(e.status="invalid",e.errmsg=e.name+": Required Attribute",e.error=!0),e.error?(e.required&&e.valid&&(e.valid=!1,e.l4acounter.validated>0&&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='<input-text class="password" tip="{{tip1}}" placeholder="{{place1}}"label="{{label1}}" callback="valid1" name="{{name}}-1" value="pass1" required minlen="{{minlen}}" type="password" ></input-text><input-text class="password" tip="tip2" placeholder="{{place2}}"label="{{label2}}" callback="valid2" name="{{name}}-2" value="pass2" required minlen="{{minlen}}" type="password" > </input-text>';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='<div ng-click="clicked()"><i class="{{icon}}"></i><span>{{label}}</span></div>';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='<div ng-click="clicked()"><img ng-src="{{icon}}"><span>{{label}}</span></div>',t='<b class="close-button" ng-click="close()">×</b><img ng-src="{{icon}}"><span class="modal-text">Application <b>{{label}}</b></span><ul class="vertical icon-left primary menu-bar appli-menu-start"><li class=start-{{runstatus}}><a ng-click=action("start")><i class="fi-check"> Start</i></a></li><li class=stop-{{runstatus}}><a ng-click=action("stop")><i class="fi-x"> Stop</i></a></li><li><a ng-click=action("info")><i class="fi-info"> Info</i></a></li><li class=start-{{runstatus}}><a ng-click=action("uninstall")><i class="fi-x"> Uninstall</i></a></li></ul>',a='<b class="close-button" ng-click="close()">×</b><img ng-src="{{icon}}"><span class="modal-text">Application <b>{{label}}</b></span><ul class="vertical icon-left appli-menu-info"><li><i class="fi-paperclip"> Name : {{detail.name}} </i></li><li><i class="fi-info"> Description {{detail.description}}</i></li><li><i class="fi-torso"> Author : {{detail.author}}</i></li></ul>';angular.module("AppliButton",[]).directive("appliButton",["AppConfig","AppCall","ModalFactory","Notification","$timeout","$window","$location","urlquery",function(n,i,s,l,o,r,u,c){function d(e,d,p){e.runstatus="stop",e.runmode=c.runmode||"auto",e.clicked=function(){var n=function(t,a){l.error({message:"Fail /api/afm-main"+t+"="+e.label+" RunID="+e.appID,delay:5e3}),d.addClass("fail"),d.removeClass("success"),e.callback(e.appID,t,a)},c=function(t,a){d.removeClass("fail"),e.runID=a.data.response.runid,e.callback(e.appID,t,a)},p=function(){e.modApp.deactivate(),o(function(){e.modApp.destroy()},1e3)},f=function(){e.modInfo.deactivate(),o(function(){e.modInfo.destroy()},1e3)},g=function(t){switch(t){case"start":if("stop"!==e.runstatus)return;i.get("afm-main","start",{id:e.appID,mode:e.runmode},function(a){return 200!==a.status||"afb-reply"!==a.data.jtype?void n("start",a):(e.runstatus="start",c(t,a),void(a.data.response.uri&&(e.winapp=r.open(a.data.response.uri.replace("%h",u.host())))))});break;case"stop":if("start"!==e.runstatus)return;i.get("afm-main","terminate",{runid:e.runID},function(a){return 200!==a.status||"afb-reply"!==a.data.jtype?void n("stop",a):(e.runstatus="stop",e.winapp&&(e.winapp.close(),e.winapp=!1),void c(t,a))});break;case"info":i.get("afm-main","detail",{id:e.appID},function(t){if(200!==t.status||"afb-reply"!==t.data.jtype)return void n("detail",t);var i={animationIn:"slideInFromTop",contentScope:{close:f,icon:e.icon,label:e.appID,detail:t.data.response},template:a};e.modInfo=new s(i),e.modInfo.activate()});break;case"uninstall":if("stop"!==e.runstatus)return;i.get("afm-main","uninstall",{id:e.appID},function(e){return 200!==e.status||"afb-reply"!==e.data.jtype?void n("uninstall",e):void c(t,e)})}p()},m={animationIn:"slideInFromTop",contentScope:{action:g,runstatus:e.runstatus,close:p,icon:e.icon,label:e.label},template:t};e.modApp=new s(m),e.modApp.activate()},p.handle&&e.store[p.handle].name?(e.icon=n.paths.icons+p.handle,e.label=e.store[p.handle].name,e.appID=p.handle):(e.icon=n.paths.icons+"w3c-ico.png",e.label=p.handle),d.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:d,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),"uninstall"===t&&a.GetRunnables()},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("afb-reply"!=e.data.jtype)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<i.length;s++)n[s]=i[s].id,a.appliStore[i[s].id]=i[s];a.appliIDs=n}})},a.FileUploaded=function(e){a.request="/api/afm-main/install",a.response=e.headers,a.errcode=e.status,a.GetRunnables()},a.AutoStart=function(){a.GetRunnables()}}])}(),function(){"use strict";angular.module("JQueryEmu",[]).factory("JQemu",function(){var e=function(e,t){for(var a=e,n=t.toUpperCase();a[0];){if(n===a[0].tagName)return a;a=a.parent()}},t=function(e,t,a){for(var n=a.toLowerCase(),i=t.toLowerCase()+"Name",s=e.children();s[0];){if(n===s[0][i])return s;s=s.next()}},a=function(e,t){for(var a=t.toLowerCase(),n=e.children();n[0];){if(n.hasClass(a))return n;n=n.next()}},n={FindInParent:e,FindByTag:t,FindByClass:a};return n})}();var foundationRoutes=[{name:"Dashboard",url:"/dashboard",controller:"DashboardController as ctrl",animationIn:"slideInRight",path:"pages/Dashboard/Dashboard.html"}];!function(){"use strict";angular.module("AppConfig",[]).factory("AppConfig",["urlquery",function(e){var t={paths:{image:"images/",icons:"/icons/",avatar:"images/avatars/",audio:"images/audio/",appli:"images/appli/"},session:{initial:e.token||"123456789",timeout:3600,pingrate:15,uuid:"",token:""}};return t}]).factory("AppCall",["$http","AppConfig","$log",function(e,t,a){var n={get:function(a,n,i,s){i.token||(i.token=t.session.token),e.get("/api/"+a+"/"+n,{params:i}).then(s,s)}};return n}])}(),function(){"use strict";function e(){var e={};return location.search.substr(1).split("&").forEach(function(t){var a=t.split("=")[0],n=decodeURIComponent(t.split("=")[1]);a in e?e[a].push(n):e[a]=[n]}),e}function t(e,t,a){e.otherwise("/dashboard"),t.html5Mode(!0).hashPrefix("!")}function a(){FastClick.attach(document.body)}angular.module("AFBclient",["ui.router","ngAnimate","foundation","foundation.dynamicRouting","foundation.dynamicRouting.animations","ui-notification","AppConfig","JQueryEmu","DashboardModule","UploadFiles","LinkButton","TokenRefresh","RangeSlider","ModalNotification"]).value("urlquery",e()).config(t).run(a),t.$inject=["$urlRouterProvider","$locationProvider"],angular.module("foundation").run(["$templateCache",function(e){e.put("components/modal/modal.html",'<div\n class="modal-overlay"\n ng-click="hideOverlay()">\n <aside\n class="modal"\n ng-click="$event.stopPropagation();"\n ng-transclude>\n </aside>\n</div>\n')}])}(),function(){angular.module("AFBclient").run(["$templateCache",function(e){e.put("pages/Dashboard/Dashboard.html",'<h3><img class="logo" src="images/logo/triskel_iot_bzhx250.png" alt="IoT.bzh Logo" style="height:150px"> Application Framework Manager Simple Client</h3><div class="button-box box-content"><appli-button ng-repeat="appliID in ctrl.appliIDs" store="ctrl.appliStore" handle="{{appliID}}" callback="ctrl.AppliCB"></appli-button><upload-appli class="ibz-right" label="Upload" name="widget" icon="fi-upload" posturl="/api/afm-main/install" callback="ctrl.FileUploaded" title="Upload AGL App"></upload-appli></div><div class="message-box box-content vertical grid-frame"><div class="response"><span class="grid-content noscroll req {{ctrl.status}}">req= {{ctrl.request}}</span> <span class="grid-content noscroll res {{ctrl.status}}">res= {{ctrl.response}}</span> <span class="grid-content noscroll status {{ctrl.status}}">status= {{ctrl.errcode}}</span></div></div><token-refresh autolog="true" callback="ctrl.AutoStart"></token-refresh>')}])}(); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpZGdldHMvUmFuZ2VTbGlkZXJzL1JhbmdlU2xpZGVyTW9kLmpzIiwid2lkZ2V0cy9Ob3RpZmljYXRpb25zL1Rva2VuUmVmcmVzaFN2Yy5qcyIsIndpZGdldHMvTm90aWZpY2F0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lcDtcbiAgICAgICAgICAgICAgICB2YXIgcmVtID0gcG9pbnQgJSBzY29wZS5ieVN0ZXA7XG5cbiAgICAgICAgICAgICAgICB2YXIgcm91bmQgPSAocmVtID49IHNjb3BlLmJ5U3RlcCAqIDAuNSA/IHNjb3BlLmJ5U3RlcCA6IDApO1xuICAgICAgICAgICAgICAgIHJlc3VsdD0gKG1vZCAqIHNjb3BlLmJ5U3RlcCArIHJvdW5kKSArIHNjb3BlLm5vdExlc3M7XG4gICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZyAoXCJyYW5nZT0lZCB2YWx1ZT0lZCBwb2ludD0lZCBtb2Q9JWQgcmVtPSVkIHJvdW5kPSVkIHJlc3VsdD0lZFwiLCByYW5nZSwgdmFsdWUsIHBvaW50LCBtb2QsIHJlbSwgcm91bmQsIHJlc3VsdClcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBpZiBzdGVwIGlzIG5lZ2F0aXZlIHJldHVybiByb3VuZCB0byBhc2tlZCBkZWNpbWFsXG4gICAgICAgICAgICBpZiAoc2NvcGUuYnlTdGVwIDwgIDApIHtcbiAgICAgICAgICAgICAgICB2YXIgcG93ZXIgID0gIE1hdGgucG93ICgxMCwoc2NvcGUuYnlTdGVwICogLTEpKTtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBzY29wZS5ub3RMZXNzICsgcGFyc2VJbnQgKHBvaW50ICogcG93ZXIpIC8gcG93ZXI7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChyZXN1bHQpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBpZiBzdGVwIGlzIG51bGwgcmV0dXJuIGZ1bGwgdmFsdWVcbiAgICAgICAgICAgIHJldHVybiBwb2ludDtcbiAgICAgICB9O1xuXG4gICAgICAgIC8vIHJldHVybiBjdXJyZW50IHZhbHVlXG4gICAgICAgIHNjb3BlLmdldFZhbHVlID0gZnVuY3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kZGxlXG4gICAgICAgICAgICAgICAgdmFyIHZvZmZzZXQgPSBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLmhlaWdodCAtIG9mZnNldDtcblxuICAgICAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbaGFuZGxlXS5jc3Moe1xuICAgICAgICAgICAgICAgICAgICAnLXdlYmtpdC10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWSgnICsgdm9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAnLW1vei10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWSgnICsgdm9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAnLW1zLXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVZKCcgKyB2b2Zmc2V0ICsgJ3B4KScsXG4gICAgICAgICAgICAgICAgICAgICctby10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWSgnICsgdm9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAndHJhbnNmb3JtJzogJ3RyYW5zbGF0ZVkoJyArIHZvZmZzZXQgKyAncHgpJ1xuICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICBpZiAoIXNjb3BlLmR1YWwpIHNjb3BlLnNsaWRlci5jc3MoJ2hlaWdodCcsIG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgICAgZWxzZSBpZiAoc2NvcGUucmVsYXRpdmVbMV0gJiYgc2NvcGUucmVsYXRpdmVbMF0pIHtcbiAgICAgICAgICAgICAgICAgICB2YXIgaGVpZ2h0ID0gKHNjb3BlLnJlbGF0aXZlWzFdIC0gc2NvcGUucmVsYXRpdmVbMF0pICogIHNjb3BlLmJvdW5kcy5iYXIuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkuaGVpZ2h0O1xuICAgICAgICAgICAgICAgICAgIHN0YXJ0ICA9IChzY29wZS5yZWxhdGl2ZVswXSAqICBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLmhlaWdodCk7XG4gICAgICAgICAgICAgICAgICAgc2NvcGUuc2xpZGVyLmNzcyAoeydib3R0b20nOiBzdGFydCsncHgnLCdoZWlnaHQnOiBoZWlnaHQgKyAncHgnfSk7XG4gICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1toYW5kbGVdLmNzcyh7XG4gICAgICAgICAgICAgICAgICAgICctd2Via2l0LXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJyxcbiAgICAgICAgICAgICAgICAgICAgJy1tb3otdHJhbnNmb3JtJzogJ3RyYW5zbGF0ZVgoJyArIG9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAnLW1zLXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJyxcbiAgICAgICAgICAgICAgICAgICAgJy1vLXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJyxcbiAgICAgICAgICAgICAgICAgICAgJ3RyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJ1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGlmICghc2NvcGUuZHVhbCkgc2NvcGUuc2xpZGVyLmNzcygnd2lkdGgnLG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHNjb3BlLnJlbGF0aXZlWzFdICYmIHNjb3BlLnJlbGF0aXZlWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB3aWR0aCA9IChzY29wZS5yZWxhdGl2ZVsxXSAtIHNjb3BlLnJlbGF0aXZlWzBdKSAqICBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLndpZHRoO1xuICAgICA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biAgICAgICAgICAgIHNjb3BlLmdldFZhbHVlICAob2Zmc2V0LCBoYW5kbGUpO1xuXG4gICAgICAgICAgICAvLyBwcmV2ZW50IGR1YWwgaGFuZGxlIHRvIGNyb3NzXG4gICAgICAgICAgICBpZiAoc2NvcGUuZHVhbCAmJiBzY29wZS52YWx1ZSBbMF0gPiBzY29wZS52YWx1ZVsxXSkge1xuICAgICAgICAgICAgICAgIGlmIChoYW5kbGUgPT09IDApIHNjb3BlLnNldFZhbHVlIChzY29wZS52YWx1ZVswXSAsIDEpO1xuICAgICAgICAgICAgICAgIGVsc2Ugc2NvcGUuc2V0VmFsdWUoc2NvcGUudmFsdWVbMV0sMCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cblxuICAgICAgICBzY29wZS5mb2N1c0NCID0gZnVuY3Rpb24gKGluc2lkZSkge1xuICAgICAgICAgICAgaWYgKGluc2lkZSkge1xuICAgICAgICAgICAgICAgICRkb2N1bWVudC5vbigna2V5ZG93bicsc2NvcGUua2V5ZG93bik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICRkb2N1bWVudC51bmJpbmQoJ2tleWRvd24nLHNjb3BlLmtleWRvd24pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIC8vIGJhciB3YXMgdG91Y2ggbGV0IG1vdmUgaGFuZGxlIHRvIHRoaXMgcG9pbnRcbiAgICAgICAgc2NvcGUudG91Y2hCYXJDQiA9IGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgdmFyIGhhbmRsZT0wO1xuICAgICAgICAgICAgdmFyIHJlbGF0aXZlO1xuICAgICAgICAgICAgdmFyIHRvdWNoZXMgPSBldmVudC5jaGFuZ2VkVG91Y2hlcztcbiAgICAgICAgICAgIHZhciBvbGR2YWx1ZSA9IHNjb3BlLnZhbHVlW2hhbmRsZV07XG5cbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG5cbiAg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gc2l6ZSBkeW5hbWljYWxseVxuICAgICAgICAgICAgc2NvcGUuYm91bmRzID0ge1xuICAgICAgICAgICAgICAgIGJhciAgICA6IGVsZW1lbnRbMF0sXG4gICAgICAgICAgICAgICAgaGFuZGxlczogW3Njb3BlLmhhbmRsZXNbMF1bMF0sIHNjb3BlLmhhbmRsZXNbMV1bMF1dXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBpZiAoYXR0cnMuZGlzYWJsZSA9PT0gJ3RydWUnKSBzY29wZS5zZXREaXNhYmxlKHRydWUpO1xuXG4gICAgICAgICAgICBpZiAoYXR0cnMuZGlzcGxheVRhcmdldCkge1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoYXR0cnMuZGlzcGxheVRhcmdldCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIHRydWUgOlxuICAgICAgICAgICAgICAgICAgICBjYXNlICdoYW5kbGUnIDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmRpc3BsYXlzID0gc2NvcGUuaGFuZGxlcztcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbMF0uYWRkQ2xhc3MoJ2liei1yYW5nZS1zbGlkZXItZGlzcGxheScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLmR1YWwpIHNjb3BlLmhhbmRsZXNbMV0uYWRkQ2xhc3MoJ2liei1yYW5nZS1zbGlkZXItZGlzcGxheScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5kaXNwbGF5cyA9ICBbJGRvY3VtZW50LmdldEVsZW1lbnRCeUlkIChhdHRycy5kaXNwbGF5VGFyZ2V0KV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHNjb3BlLmRpc3BsYXlzPVtdO1xuXG4gICAgICAgICAgICAvLyBleHRyYWN0IGluaXRpYWwgdmFsdWVzIGZyb20gYXR0cnMgYW5kIHBhcnNlIGludG8gaW50XG4gICAgICAgICAgICBpZiAoIWF0dHJzLmluaXRpYWwpIHtcbiAgICAgICAgICAgICAgICBzY29wZS5pbml0aWFsICA9IFtzY29wZS5uZ01vZGVsLCBzY29wZS5uZ01vZGVsXTsgLy8gaW5pdGlhbGl6ZSB0byBtb2RlbCB2YWx1ZXNcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIGluaXRpYWwgID0gYXR0cnMuaW5pdGlhbC5zcGxpdCgnLCcpO1xuICAgICAgICAgICAgICAgIHNjb3BlLmluaXRpYWwgPSBbXG4gICAgICAgICAgICAgICAgICAgIGluaXRpYWxbMF0gIT09IHVuZGVmaW5lZCA/IHBhcnNlSW50IChpbml0aWFsWzBdKSA6IHNjb3BlLm5vdExlc3MsXG4gICAgICAgICAgICAgICAgICAgIGluaXRpYWxbMV0gIT09IHVuZGVmaW5lZCA/IHBhcnNlSW50IChpbml0aWFsWzFdKSA6IHNjb3BlLm5vdE1vcmVcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBNb25pdG9yIGFueSBjaGFuZ2VzIG9uIHN0YXJ0L3N0b3AgZGF0ZXMuXG4gICAgICAgICAgICBzY29wZS4kd2F0Y2goJ3N0YXJ0QXQnLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICBpZiAoc2NvcGUudmFsdWUgPCBzY29wZS5zdGFydEF0ICkge1xuICAgICAgICAgICAgICAgICAgICAvL3Njb3BlLnNldFZhbHVlIChzY29wZS5zdGFydEF0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnN0YXJ0QXQpIHNjb3BlLnNldFN0YXJ0IChzY29wZS5zdGFydEF0KTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBzY29wZS4kd2F0Y2goJ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AgICAgICAgICBOb3RpZmljYXRpb24ud2FybmluZyAoe21lc3NhZ2U6IFwiQXBwRnJhbWV3b3JrIEJpbmRlciBMb3N0XCIsIGRlbGF5OiA1MDAwfSk7XG4gICAgICAgICAgICAgICAgc2NvcGUub2ZmbGluZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2NvcGUuc3RhdHVzID0gMDtcbiAgICAgICAgfTtcbiAgICAgICAgXG4gICAgICAgIHNjb3BlLm9uc3VjY2VzcyA9IGZ1bmN0aW9uKGpyZXNwKSB7XG4gICAgICAgICAgICBpZiAoanJlc3AucmVxdWVzdC50b2tlbikgQXBwQ29uZmlnLnNlc3Npb24udG9rZW4gPSBqcmVzcC5yZXF1ZXN0LnRva2VuO1xuICAgICAgICAgICAgaWYgKGpyZXNwLnJlcXVlc3QudXVpZCkgIEFwcENvbmZpZy5zZXNzaW9uLnV1aWQgID0ganJlc3AucmVxdWVzdC51dWlkO1xuICAgICAgICAgICAgaWYgKGpyZXNwLnJlcXVlc3QudGltZW91dCkgIEFwcENvbmZpZy5zZXNzaW9uLnRpbWVvdXQgID0ganJlc3AucmVxdWVzdC50aW1lb3V0O1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoc2NvcGUubG9nZ2VkICE9PSB0cnVlKSAge1xuICAgICAgICAgICAgICAgIE5vdGlmaWNhdGlvbi5zdWNjZXNzICh7bWVzc2FnZTogXCJBcHBGcmFtZXdvcmsgQmluZGVyIEJhY2sgdG8gTGl2ZVwiLCBkZWxheTogMzAwMH0pO1xuICAgICAgICAgICAgICAgIHNjb3BlLm9ubGluZSgpO1xuICAgICAgICAgICAgICAgIGlmIChzY29wZS5jYWxsYmFjaykgc2NvcGUuY2FsbGJhY2soanJlc3ApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2NvcGUuc3RhdHVzID0gMTtcbiAgICAgICAgfTtcblxuICAgICAgICAvLyBDaGVjayBCaW5kZXIgc3RhdHVzXG4gICAgICAgIHNjb3BlLmdldHBpbmcgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgQXBwQ2FsbC5nZXQgKFwidG9rZW5cIiwgXCJwaW5nXCIsIHsvKnF1ZXJ5Ki99LGZ1bmN0aW9uKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuc3RhdHVzID09PSAyMDApIHNjb3BlLm9uc3VjY2VzcyAocmVzdWx0LmRhdGEpO1xuICAgICAgICAgICAgICAgIGVsc2UgIHNjb3BlLm9uZXJyb3IoKTtcbiAgICAgICAgICAgICAgICAvLyByZXN0YXJ0IGEgbmV3IHRpbWVyIGZvciBuZXh0IHBpbmdcbiAgICAgICAgICAgICAgICAkdGltZW91dCAoc2NvcGUuZ2V0cGluZywgQXBwQ29uZmlnLnNlc3Npb24ucGluZ3JhdGUqMTAwMCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfTtcbiAgICAgICAgXG4gICAgICAgIC8vIENoZWNrIEJpbmRlciBzdGF0dXNcbiAgICAgICAgc2NvcGUucmVmcmVzaCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJ0b2tlblwiLCBcInJlZnJlc2hcIiwgey8qcXVlcnkqL30sZnVuY3Rpb24ocmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5zdGF0dXMgPT09IDIwMCkgc2NvcGUub25zdWNjZXNzIChyZXN1bHQuZGF0YSk7XG4gICAgICAgICAgICAgICAgZWxzZSAgc2NvcGUub25lcnJvcigpO1xuICAgICAgICAgICAgICAgIC8vIHJlc3RhcnQgYSBuZXcgdGltZXIgZm9yIG5leHQgcmVmcmVzaFxuICAgICAgICAgICAgICAgICR0aW1lb3V0IChzY29wZS5yZWZyZXNoLCBBcHBDb25maWcuc2Vzc2lvbi50aW1lb3V0ICoyNTApO1xuICAgICAgICAgICAgfSk7ICAgICAgICAgICAgXG4gICAgICA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3VsYXIubW9kdWxlKCdNb2RhbE5vdGlmaWNhdGlvbicsIFtdKVxuICAgICAgICAgICAgLmRpcmVjdGl2ZSgndGlwTW9kYWwnLCBbXCIkdGltZW91dFwiLCBmdW5jdGlvbiAoJHRpbWVvdXQpIHtcblxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG15bWV0aG9kcyhzY29wZSwgZWxlbSwgYXR0cnMpIHtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUucGFyZW50ID0gZWxlbS5wYXJlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kYWwgICAgPSBlbGVtLmZpbmQoXCJkaXZcIik7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgIFxuICAgICAgICAgICAgICAgICAgICAvLyBkZWxheSB0aXAgZGlzcGxheSB0byBhdm9pZCBibGlua2luZyB3aGVuIG1vdmluZyBtb3VzZSBmYXN0XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGRpc3BsYXkgKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gYWN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2NvcGUuc2hvdykgc2NvcGUubW9kYWwuY3NzKHtvcGFjaXR5OiAxLCB2aXNpYmlsaXR5Oid2aXNpYmxlJ30pOyAgXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5zaG93ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLnRpbWVvdXQgPSAkdGltZW91dChhY3Rpb24sIHNjb3BlLmRlbGF5KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY2xvc2UgKCkge1xuICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLnNob3cgPSBmYWxzZTsgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICBzY29wZS5tb2RhbC5jc3Moe29wYWNpdHk6IDAsIHZpc2liaWxpdHk6J2hpZGRlbid9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBcblxuICAgICAgICAgICAgICAgICAgICAvLyBhanVzdCBpY29uIG9yIHVzZSBkZWZhdWx0XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmljb24gID0gYXR0cnMuaWNvbiB8fCAnZmktbGlnaHRidWxiJztcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSBQYXJlbnQgZWxlbWVudCB0byBnZXQgbW91c2UgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUucGFyZW50LmFkZENsYXNzICgnYXMtbW9kYWwtdGlwJyk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdjbGljaycsIGNsb3NlKTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUucGFyZW50LmJpbmQoJ2ZvY3VzJywgZGlzcGxheSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdtb3VzZW92ZXInLCBkaXNwbGF5KTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUucGFyZW50LmJpbmQoJ21vdXNlbGVhdmUnLCBjbG9zZSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdibHVyJywgY2xvc2UpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuZGVsYXkgPSBhdHRycy5kZWxheSB8fCAxMDAwOyAvLyB3YWl0IDFzIGJlZm9yZSBkaXNwbGF5aW5nIHRpcFxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RyaWN0OiAnRScsXG4gICAgICAgICA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pO1xuICAgICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIGFqdXN0IGljb24gb3IgdXNlIGRlZmF1bHRcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaWNvbiA9IGF0dHJzLmljb24gICB8fCAnZmktbGluayc7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmxhYmVsID0gYXR0cnMubGFiZWwgfHwgJ0p1bXAnO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5ocmVmICA9IGF0dHJzLmhyZWYgIHx8ICcvaG9tZSc7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAvLyBhZGQgbGFiZWwgYXMgY2xhc3NcbiAgICAgICAgICAgICAgICAgICAgZWxlbS5hZGRDbGFzcyAoc2NvcGUubGFiZWwudG9Mb3dlckNhc2UoKSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdHJpY3Q6ICdFJyxcbiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IHRtcGwsXG4gICAgICAgICAgICAgICAgICAgIGxpbms6IG15bWV0aG9kcyxcbiAgICAgICAgICAgICAgICAgICAgc2NvcGU6IHt9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1dKTtcbn0pKCk7XG4iLCJcbi8qIFxuICogQ29weXJpZ2h0IChDKSAyMDE1IFwiSW9ULmJ6aFwiXG4gKiBBdXRob3IgXCJGdWx1cCBBciBGb2xsXCJcbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeVxuICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnlcbiAqIHRoZSBGcmVl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AgICAgICAgICAgIC8vIFRoaXMgTG9va3MgT0sgbGV0J3MgUG9zdCBYZm9ybS9GaWxlXG4gICAgICAgICAgICAgICAgaGFuZGxlLnBvc3RmaWxlKGF0dHJzLnBvc3R1cmwgKyBcIj90b2tlbj1cIiArIEFwcENvbmZpZy5zZXNzaW9uLnRva2VuKTtcblxuICAgICAgICAgICAgICAgIHNjb3BlLm1vZGFsLmRlYWN0aXZhdGUoKTtcbiAgICAgICAgICAgICAgICAkdGltZW91dCAoZnVuY3Rpb24oKSB7c2NvcGUubW9kYWwuZGVzdHJveSgpO30sIDEwMDApO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIGFiYW5kb24gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICBzY29wZS5tb2RhbC5kZWFjdGl2YXRlKCk7XG4gICAgICAgICAgICAgICAgJHRpbWVvdXQgKGZ1bmN0aW9uKCkge3Njb3BlLm1vZGFsLmRlc3Ryb3koKTt9LCAxMDAwKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIHJlYWRlckNCID0gZnVuY3Rpb24gKHVwbG9hZCkge1xuICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gRmlsZSB1cGxvYWQgZmFpbCBoYW5kbGUgZXJyb3JcbiAgICAgICAgICAgICAgICBpZiAoISB1cGxvYWQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGhhbmRsZS5maWxlLnNpemUgPiBzY29wZS5tYXhzaXplKjEwMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGljb24gPSBzY29wZS5pc3Rvb2JpZztcbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlPSB0bXBsRXJyb3I7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGlmIChpc05hTihoYW5kbGUuZmlsZS5zaXplKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXBwaWNvbiA9IHNjb3BlLmlzbm90dmFsaWQ7IFxuICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU9IHRtcGxFcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgICAgICAgICAgdmFyIHppcGFwcCA9IG5ldyBKU1ppcCAodXBsb2FkLnRhcmdldC5yZXN1bHQpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdGh1bWJuYWlsID0gemlwYXBwLmZpbGUoXCJpY29uXzEyOC5wbmdcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gQ2hlY2sgaXMgd2UgaGF2ZSBhIHRodW1ibmFpbCB3aXRoaW4gbG9hZGVkIFppcGZpbGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0aHVtYm5haWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIlRoaXMgaXMgbm90IGEgdmFsaWQgQXBwbGljYXRpb24gRnJhbWV3b3JrIEFQUFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGljb24gPSBzY29wZS5pc25vdHZhbGlkO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU9IHRtcGxFcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy9zY29wZS5pbWdFbGVtWzBdLnNyYyA9IHdpbmRvdy5VUkwuY3JlYXRlT2JqZWN0VVJMKG5ldyBCbG9iKFt0aHVtYm5haWwuYXNBcnJheUJ1ZmZlcigpXSwge3R5cGU6IFwiaW1hZ2VcIn0pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGljb24gPSB3aW5kb3cuVVJMLmNyZWF0ZU9iamVjdFVSTChuZXcgQmxvYihbdGh1bWJuYWlsLmFzQXJyYXlCdWZmZXIoKV0sIHt0eXBlOiBcImltYWdlXCJ9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZSA9IHRtcGxNb2RhbDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAvLyByZWZlcmVuY2UgaHR0cDovL2ZvdW5kYXRpb24uenVyYi5jb20vYXBwcy9kb2NzLyMhL2FuZ3VsYXItbW9kdWxlc1xuICAgICAgICAgICAgICAgIHZhciBjb25maWcgPSB7XG4gICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbkluOiAnc2xpZGVJbkZyb21Ub3AnLFxuICAgICAgICAgICAgICAgICAgICBjb250ZW50U2NvcGU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3MgOiBzdWNjZXNzLFxuICAgICAgICAgICAgICAgICAgICAgICAgYWJhbmRvbiA6IGFiYW5kb24sXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uICAgIDogYXBwaWNvbixcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcG5hbWUgOiBoYW5kbGUuYmFzZW5hbWVcbiAgICAgICAgICAgICAgICAgICAgfSwgdGVtcGxhdGUgOiB0ZW1wbGF0ZVxuICAgICAgICAgICAgICAgIH07IFxuICAgICAgICAgICAgICAgIC8vIFBvcHVwIE1vZGFsIHRvIHJlbmRlciBhcHBsaWNhdGlvbiBkYXRhXG4gICAgICAgICAgICAgICAgc2NvcGUubW9kYWwgPSBuZXcgTW9kYWxGYWN0b3J5KGNvbmZpZyk7XG4gICAgICAgICAgICAgICAgc2NvcGUubW9kYWwuYWN0aXZhdGUgKCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgXG4gICAgICAgICAgICAvLyBMb2FkIGZp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pbGxpbmcgc3BhY2VcbiAgICAgICAgICAgIHNjb3BlLnZhbHVlID0gc2NvcGUudmFsdWUudHJpbSgpO1xuICAgICAgICAgXG4gICAgICAgICAgICAvLyByZW1vdmUgYW55IHNwYWNlIGlzIG5vdCBhbGxvd2VkXG4gICAgICAgICAgICBpZiAoJ25vc3BhY2UnIGluIGF0dHJzKSB7XG4gICAgICAgICAgICAgICBzY29wZS52YWx1ZT1zY29wZS52YWx1ZS5yZXBsYWNlKC9cXHMvZywgJycpOyAgICBcbiAgICAgICAgICAgIH1cbiAgICAgICAgIFxuICAgICAgICAgICAgaWYgKCdsb3dlcmNhc2UnIGluIGF0dHJzKSB7XG4gICAgICAgICAgICAgICBzY29wZS52YWx1ZSA9IHNjb3BlLnZhbHVlLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgICAgIC8vIGNoZWNrIG1pbmltdW0gbGVuZ2h0XG4gICAgICAgICAgICBpZiAoXCJtaW5sZW5cIiBpbiBhdHRycykge1xuICAgICAgICAgICAgICBpZiAoc2NvcGUudmFsdWUubGVuZ3RoIDwgYXR0cnMubWlubGVuKSB7XG4gICAgICAgICAgICAgICAgIHNjb3BlLnN0YXR1cz0naW52YWxpZCc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm1zZz1zY29wZS5uYW1lICsgJzogTWluaW51bSBMZW5naD0gJyArIGF0dHJzLm1pbmxlbiArICcgQ2hhcmFjdGVycyc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKCdlbWFpbCcgaW4gYXR0cnMpIHtcbiAgICAgICAgICAgIGlmICghZW1haWxwYXRlcm4udGVzdCAoc2NvcGUudmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgc2NvcGUuc3RhdHVzPSdpbnZhbGlkJztcbiAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9J2ludmFsaWQgZW1haWwgYWRkcmVzcyc7XG4gICAgICAgICAgICAgICAgc2NvcGUuZXJyb3I9dHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgIH1cbiAgICAgICAgIFxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKHNjb3BlLnJlcXVpcmVkKSB7XG4gICAgICAgICAgICAgICAgIHNjb3BlLnN0YXR1cz0naW52YWxpZCc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm1zZz1zY29wZS5uYW1lICsgJzogUmVxdWlyZWQgQXR0cmlidXRlJztcbiAgICAgICAgICAgICAgICAgc2NvcGUuZXJyb3I9dHJ1ZTsgXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgLy8gSWYgbG9jYWwgY29udHJvbCBmYWlsIGxldCdzIHJlZnVzZSBpbnB1dFxuICAgICAgICAgaWYgKHNjb3BlLmVycm9yKSB7XG4gICAgICAgICAgICAgaWYgKHNjb3BlLnJlcXVpcmVkICYmIHNjb3BlLnZhbGlkKSB7XG4gICAgICAgICAgICAgICAgIHNjb3BlLnZhbGlkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgIGlmIChzY29wZS5sNGFjb3VudGVyLnZhbGlkYXRlZCA+IDApIHNjb3BlLmw0YWNvdW50ZXIudmFsaWRhdGVkIC0tO1xuICAgICAgICAgICAgIH0gXG4gICAgICAgICAgICAgLy8gdXNlIGNhbGwgdG8gdXBkYXRlIGZvcm0gc2NvcGUgb24gZm9ybSBjb21wbGV0ZW5lc3NcbiAgICAgICAgICAgICBzY29wZS5jYWxsYmFjayAoYXR0cnMubmFtZSwgbnVsbCwgc2NvcGUuZG9uZSk7XG4gICAgICAgICB9IGVsc2UgeyBcbiAgICAgICAgICAgICAvLyBsb2NhbGNoZWNrIGlzIE9LIGJhY2t1cCBtYXkgbmV2ZXJ0aGV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gU0hPVUxEIEJFIGdldCAncmVxdWlyZWQnIGNsYXNzXG4gKi9cblxuKGZ1bmN0aW9uICgpIHtcbiAgICAndXNlIHN0cmljdCc7XG5cbiAgICB2YXIgdG1wbCA9ICc8ZGl2ICBuZy1jbGljaz1cImNsaWNrZWQoKVwiPicgK1xuICAgICAgICAgICAgJzxpIGNsYXNzPVwie3tpY29ufX1cIj48L2k+JyArXG4gICAgICAgICAgICAnPHNwYW4+e3tsYWJlbH19PC9zcGFuPicgK1xuICAgICAgICAgICAgJzwvZGl2Pic7XG5cbiAgICBhbmd1bGFyLm1vZHVsZSgnU3VibWl0QnV0dG9uJywgW10pXG4gICAgICAgICAgICAuZGlyZWN0aXZlKCdzdWJtaXRCdXR0b24nLCBmdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBteW1ldGhvZHMoc2NvcGUsIGVsZW0sIGF0dHJzKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gYWp1c3QgaWNvbiBvciB1c2UgZGVmYXVsdFxuICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uID0gYXR0cnMuaWNvbiB8fCAnZmktZm9vdCc7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmxhYmVsID0gYXR0cnMubGFiZWwgfHwgJ05leHQnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gYWRkIGxhYmVsIGFzIGNsYXNzXG4gICAgICAgICAgICAgICAgICAgIGVsZW0uYWRkQ2xhc3MgKHNjb3BlLmxhYmVsLnRvTG93ZXJDYXNlKCkpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gbm90ZTogY2xpY2tlZCBpbiBpbXBvcnRlZCBhbmQgd2hlbiB0ZW1wbGF0ZSBpcyBjbGlja2VkXG4gICAgICAgICAgICAgICAgICAgIC8vIGl0IHdpbGwgY2FsbCBjbGlja2VkIG1ldGhvZC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sIC9hcGkvYWZtLW1haW5cIiArIGFjdGlvbiArIFwiPVwiICsgc2NvcGUubGFiZWwgKyBcIiBSdW5JRD1cIisgc2NvcGUuYXBwSUQsIGRlbGF5OiA1MDAwfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxlbS5hZGRDbGFzcyAoXCJmYWlsXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW0ucmVtb3ZlQ2xhc3MgKFwic3VjY2Vzc1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5jYWxsYmFjayAoc2NvcGUuYXBwSUQsIGFjdGlvbiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5vdGlmeVN1Y2Nlc3MgPSBmdW5jdGlvbiAoYWN0aW9uLCByZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW0ucmVtb3ZlQ2xhc3MgKFwiZmFpbFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5ydW5JRCA9IHJlc3BvbnNlLmRhdGEucmVzcG9uc2UucnVuaWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuY2FsbGJhY2sgKHNjb3BlLmFwcElELCBhY3Rpb24sIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjbG9zZU1vZEFwcCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZEFwcC5kZWFjdGl2YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRpbWVvdXQgKGZ1bmN0aW9uKCkge3Njb3BlLm1vZEFwcC5kZXN0cm95KCk7fSwgMTAwMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY2xvc2VNb2RJbmZvID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kSW5mby5kZWFjdGl2YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRpbWVvdXQgKGZ1bmN0aW9uKCkge3Njb3BlLm1vZEluZm8uZGVzdHJveSgpO30sIDEwMDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGFjdGlvbk1vZGFsID0gZnVuY3Rpb24oYWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiTW9kYWwgQWN0aW9uPSVzXCIsIGFjdGlvbik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJzdGFydFwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLnJ1bnN0YXR1cyAhPT0gXCJzdG9wXCIpIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFwcENhbGwuZ2V0IChcImFmbS1tYWluXCIsIFwic3RhcnRcIiwge2lkOiBzY29wZS5hcHBJRCwgbW9kZTogc2NvcGUucnVubW9kZX0sIGZ1bmN0aW9uKHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnN0YXR1cyAhPT0gMjAwIHx8IHJlc3BvbnNlLmRhdGEuanR5cGUgIT09IFwiYWZiLXJlcGx5XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90aWZ5RXJyb3IgKFwic3RhcnRcIiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLnJ1bnN0YXR1cz1cInN0YXJ0XCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90aWZ5U3VjY2VzcyAoYWN0aW9uLCByZXNwb25zZSk7XG5cdFx0XHRcdFx0aWYocmVzcG9uc2UuZGF0YS5yZXNwb25zZS51cmkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLndpbmFwcD0gJHdpbmRvdy5vcGVuKHJlc3BvbnNlLmRhdGEucmVzcG9uc2UudXJpLnJlcGxhY2UoXCIlaFwiLCAkbG9jYXRpb24uaG9zdCgpKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInN0b3BcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY29wZS5ydW5zdGF0dXMgIT09IFwic3RhcnRcIikgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJhZm0tbWFpblwiLCBcInRlcm1pbmF0ZVwiLCB7cnVuaWQ6IHNjb3BlLnJ1bklEfSwgZnVuY3Rpb24ocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uuc3RhdHVzICE9PSAyMDAgfHwgcmVzcG9uc2UuZGF0YS5qdHlwZSAhPT0gXCJhZmItcmVwbHlcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3RpZnlFcnJvciAoXCJzdG9wXCIsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5ydW5zdGF0dXM9XCJzdG9wXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYgYSByZW1vdGUgd2luZG93IGFwcCB3YXMgb3BlbiBsZXQncyBjbG9zZSBpdFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY29wZS53aW5hcHApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyAoXCJDbG9zaW5nIEFwcGxpY2F0aW9uIFdpbmRvdyBsYWJlbD0lcyBpZD0lc1wiLCBzY29wZS5sYWJlbCwgc2NvcGUuYXBwSUQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLndpbmFwcC5jbG9zZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLndpbmFwcD1mYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90aWZ5U3VjY2VzcyAoYWN0aW9uLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwiaW5mb1wiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQXBwQ2FsbC5nZXQgKFwiYWZtLW1haW5cIiwgXCJkZXRhaWxcIiwge2lkOiBzY29wZS5hcHBJRH0sIGZ1bmN0aW9uKHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnN0YXR1cyAhPT0gMjAwIHx8IHJlc3BvbnNlLmRhdGEuanR5cGUgIT09IFwiYWZiLXJlcGx5XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90aWZ5RXJyb3IgKFwiZGV0YWlsXCIsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZWZlcmVuY2UgaHR0cDovL2ZvdW5kYXRpb24uenVyYi5jb20vYXBwcy9kb2NzLyMhL2FuZ3VsYXItbW9kdWxlc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjb25maWcgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbkluOiAnc2xpZGVJbkZyb21Ub3AnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50U2NvcGU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb3NlICAgOiBjbG9zZU1vZEluZm8sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uICAgIDogc2NvcGUuaWNvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsICAgOiBzY29wZS5hcHBJRCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRldGFpbCAgOiByZXNwb25zZS5kYXRhLnJlc3BvbnNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHRlbXBsYXRlIDogdG1wbERldGFpbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07IFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFBvcHVwIE1vZGFsIHRvIHJlbmRlciBhcHBsaWNhdGlvbiBkYXRhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kSW5mbyA9IG5ldyBNb2RhbEZhY3RvcnkoY29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5tb2RJbmZvLmFjdGl2YXRlICgpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJ1bmluc3RhbGxcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY29wZS5ydW5zdGF0dXMgIT09IFwic3RvcFwiKSByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJhZm0tbWFpblwiLCBcInVuaW5zdGFsbFwiLCB7aWQ6IHNjb3BlLmFwcElEfSwgZnVuY3Rpb24ocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uuc3RhdHVzICE9PSAyMDAgfHwgcmVzcG9uc2UuZGF0YS5qdHlwZSAhPT0gXCJhZmItcmVwbHlcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3RpZnlFcnJvciAoXCJ1bmluc3RhbGxcIiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeVN1Y2Nlc3MgKGFjdGlvbiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiQWN0aW9uTW9kYWwgdW5rbm93biBhY3Rpb249WyVzXVwiLCBhY3Rpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb3NlTW9kQXBwKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyByZWZlcmVuY2UgaHR0cDovL2ZvdW5kYXRpb24uenVyYi5jb20vYXBwcy9kb2NzLyMhL2FuZ3VsYXItbW9kdWxlc1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvbmZpZyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb25JbjogJ3NsaWRlSW5Gcm9tVG9wJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50U2NvcGU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uICAgOiBhY3Rpb25Nb2RhbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnVuc3RhdHVzOiBzY29wZS5ydW5zdGF0dXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb3NlICAgIDogY2xvc2VNb2RBcHAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb24gICAgIDogc2NvcGUuaWNvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWwgICAgOiBzY29wZS5sYWJlbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHRlbXBsYXRlICA6IHRtcGxNb2RhbFxuICAgICAgICAgICAgICAgICAgICAgICAgfTsgXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBQb3B1cCBNb2RhbCB0byByZW5kZXIgYXBwbGljYXRpb24gZGF0YVxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kQXBwID0gbmV3IE1vZGFsRmFjdG9yeShjb25maWcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kQXBwLmFjdGl2YXRlICgpO1xuICAgICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIGV4dHJhY3QgYXBwbGljYXRpb24gaW5mb3JtYXRpb24gZnJvbSBBcHBJRCtTdG9yZVxuICAgICAgICAgICAgICAgICAgICBpZiAoYXR0cnMuaGFuZGxlICYmIHNjb3BlLnN0b3JlIFthdHRycy5oYW5kbGVdLm5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmljb24gID0gQXBwQ29uZmlnLnBhdGhzLmljb25zICsgYXR0cnMuaGFuZGxlOyAvL3Njb3BlLnN0b3JlIFthdHRycy5oYW5kbGVdLm5hbWUudG9Mb3dlckNhc2UoKSArICctaWNvLnBuZyc7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IHNjb3BlLnN0b3JlIFthdHRycy5oYW5kbGVdLm5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5hcHBJRD0gYXR0cnMuaGFuZGxlO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmljb24gID0gQXBwQ29uZmlnLnBhdGhzLmljb25zICsgJ3czYy1pY28ucG5nJztcbiAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IGF0dHJzLmhhbmRsZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gYWRkIGxhYmVsIGFzIGNsYXNzXG4gICAgICAgICAgICAgICAgICAgIGVsZW0uYWRkQ2xhc3MgKHNjb3BlLmxhYmVsLnRvTG93ZXJDYXNlKCkpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gbm90ZTogY2xpY2tlZCBpbiBpbXBvcnRlZCBhbmQgd2hlbiB0ZW1wbGF0ZSBpcyBjbGlja2VkXG4gICAgICAgICAgICAgICAgICAg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Vzc2lvbj1cIm5vbmVcIjtcbiAgICAgICAgc2NvcGUuc3RhdHVzID1cImVyci1ub1wiO1xuICAgICAgICBzY29wZS5hcHBsaUlEcyA9W107IC8vIGFycmF5IHRvIGhvbGQgYXBwbGljYXRpb25zIElEXG4gICAgICAgIHNjb3BlLmFwcGxpU3RvcmU9e307IC8vIGFycmF5IHRvIGhvbGQgYXBwbGljYXRpb25zIGpzb24gZGVzY3JpcHRpb25cblxuICAgICAgIFxuICAgICAgICBzY29wZS5BcHBsaUNCID0gZnVuY3Rpb24oYXBwbGlJRCwgYWN0aW9uLCByZXNwb25zZSkge1xuICAgICAgICAgICAgICAgIC8vIEFjdGlvbiBpcyBkb25lIHdpdGhpbiBXaWRnZXQgQ29udHJvbGxlciBvbmx5IHVwZGF0ZSBkZWJ1ZyBVSSB6b25lXG4gICAgICAgICAgICAgICAgc2NvcGUucmVxdWVzdCAgPSBhY3Rpb247IFxuICAgICAgICAgICAgICAgIHNjb3BlLmVycmNvZGUgID0gcmVzcG9uc2Uuc3RhdHVzO1xuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5kYXRhKSBzY29wZS5yZXNwb25zZSA9IHJlc3BvbnNlLmRhdGE7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gT24gYXBwIHdhcyByZW1vdmVkIGxldCdzIHVwZGF0ZSBydW5uYWJsZSBsaXN0XG4gICAgICAgICAgICAgICAgaWYgKGFjdGlvbiA9PT0gXCJ1bmluc3RhbGxcIikgIHNjb3BlLkdldFJ1bm5hYmxlcygpO1xuICAgICAgICB9O1xuICAgICAgICBcbiAgICAgICAgc2NvcGUuR2V0UnVubmFibGVzID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICBjb25zb2xlLmxvZyAoXCJEYXNoYm9hcmQgR2V0UnVubmFibGVzXCIpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJhZm0tbWFpblwiLCBcInJ1bm5hYmxlc1wiLCB7LypxdWVyeSovfSwgZnVuY3Rpb24ocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAvLyB1cGRhdGUgZGVidWcgVUkgem9uZVxuICAgICAgICAgICAgICAgIHNjb3BlLnJlcXVlc3QgID0gXCIvYXBpL2FmbS1tYWluL3J1bm5hYmxlXCI7IFxuICAgICAgICAgICAgICAgIHNjb3BlLnJlc3BvbnNlID0gcmVzcG9uc2UuZGF0YTtcbiAgICAgICAgICAgICAgICBzY29wZS5lcnJjb2RlICA9IHJlc3BvbnNlLnN0YXR1cztcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uuc3RhdHVzICE9PSAyMDApIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiSG9vcCBHZXRSdW5uYWJsZSBmYWlsZWRcIik7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gQ2hlY2sgdGhpcyBpcyBhIHZhbGlkIHJlc3BvbnNlIGZyb20gQmluZGVyXG4gICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmRhdGEuanR5cGUgIT0gXCJhZmItcmVwbHlcIikge1xuICAgICAgICAgICAgICAgICAgTm90aWZpY2F0aW9uLmVycm9yICh7bWVzc2FnZTogXCJJbnZhbGlkIFJlc3BvbmQgdG8gL29wYS9hZm0tbWFpbi9ydW5uYWJsZSByZXNwb25zZS5kYXRhPVwiK3Jlc3BvbnNlLmRhdGEsIGRlbGF5OiA1MDAwfSk7IFxuICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAvLyBsb29wIG9uIHJ1bm5hYmxlIGFwcGxpY2F0aW9uIHRvIHByZXBhcmUgZm9yIGRpc3BsYXlcbiAgICAgICAgICAgICAgICB2YXIgIGFwcGxpSURzPVtdO1xuICAgICAgICAgICAgICAgIHZhciAgcnVubmFibGVzID0gcmVzcG9uc2UuZGF0YS5yZXNwb25zZS5ydW5uYWJsZXM7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaWR4PTA7IGlkeCA8IHJ1bm5hYmxlcy5sZW5ndGg7IGlkeCArKykge1xuICAgICAgICAgICAgICAgICAgICBhcHBsaUlEc1tpZHhdID0gcnVubmFibGVzIFtpZHhdLmlkO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5hcHBsaVN0b3JlIFtydW5uYWJsZXMgW2lkeF0uaWRdID0gIHJ1bm5hYmxlcyBbaWR4XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2NvcGUuYXBwbGlJRHMgPSBhcHBsaUlEczsgLy8gYXZvaWQgcGFydGlhbCB1cGRhdGUgdG8gbGltaXQgVUkgcmVmcmVzaFxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgfSk7ICAgICAgICAgICAgXG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICBzY29wZS5GaWxlVXBsb2FkZWQgPSBmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nIChcImZpbGUgVXBsb2FkZWRcIik7XG4gICAgICAgICAgICAvLyBDYW5ub3QgZGlzcGxheSBwb3N0IHJlc3VsdHMgYXMgR2V0UnVubmFibGUgd2lsbCBvdmVybG9hZCB0aGVtIGF5bmNocm9ub3VzbHlcbiAgICAgICAgICAgIHNjb3BlLnJlcXVlc3QgID0gXCIvYXBpL2FmbS1tYWluL2luc3RhbGxcIjsgXG4gICAgICAgICAgICBzY29wZS5yZXNwb25zZSA9IHJlc3BvbnNlLmhlYWRlcnM7XG4gICAgICAgICAgICBzY29wZS5lcnJjb2RlICA9IHJlc3BvbnNlLnN0YXR1cztcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgLy8gZXZlcnl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ICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VhcmNoID09PSBwYXJlbnRbMF0udGFnTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwYXJlbnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9ICAvLyBIVE1MRGl2RWxlbWVudCBwcm9wZXJ0aWVzXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnQgPSBwYXJlbnQucGFyZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciAgRmluZEJ5VGFnPSBmdW5jdGlvbiAoZWxlbWVudCwgdGFnLCBzZWxlY3Rvcikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHR5cGUgICA9IHRhZy50b0xvd2VyQ2FzZSgpKyBcIk5hbWVcIjtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNoaWxkcmVuID0gZWxlbWVudC5jaGlsZHJlbigpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hpbGRyZW5bMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWFyY2ggPT09IGNoaWxkcmVuWzBdW3R5cGVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoaWxkcmVuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW4gPSBjaGlsZHJlbi5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciAgRmluZEJ5Q2xhc3M9IGZ1bmN0aW9uIChlbGVtZW50LCBzZWxlY3Rvcikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNoaWxkcmVuID0gZWxlbWVudC5jaGlsZHJlbigpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hpbGRyZW5bMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjaGlsZHJlbi5oYXNDbGFzcyhzZWFyY2gpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoaWxkcmVuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW4gPSBjaGlsZHJlbi5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgdmFyIG15TWV0aG9kcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgRmluZEluUGFyZW50OiBGaW5kSW5QYXJlbnQsXG4gICAgICAgICAgICAgICAgICAgIEZpbmRCeVRhZzogRmluZEJ5VGFnLFxuICAgICAgICAgICAgICAgICAgICBGaW5kQnlDbGFzczogRmluZEJ5Q2xhc3NcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG15TWV0aG9kcztcbiAgICAgICAgICAgIH0pO1xuXG59KSgpOyIsInZhciBmb3VuZGF0aW9uUm91dGVzID0gW3tcIm5hbWVcIjpcIkRhc2hib2FyZFwiLFwidXJsXCI6XCIvZGFzaGJvYXJkXCIsXCJjb250cm9sbGVyXCI6XCJEYXNoYm9hcmRDb250cm9sbGVyIGFzIGN0cmxcIixcImFuaW1hdGlvbkluXCI6XCJzbGlkZUluUmlnaHRcIixcInBhdGhcIjpcInBhZ2VzL0Rhc2hib2FyZC9EYXNoYm9hcmQuaHRtbFwifV07IFxuIiwiKGZ1bmN0aW9uICgpIHtcbiAgICAndXNlIHN0cmljdCc7XG5cbiAgICAvLyBfYWxsIG1vZHVsZXMgb25seSByZWZlcmVuY2UgZGVwZW5kZW5jaWVzXG4gICAgYW5ndWxhci5tb2R1bGUoJ0FwcENvbmZpZycsIFtdKVxuICAgIFxuICAgICAgICAgICAgLy8gRmFjdG9yeSBpcyBhIHNpbmdsZXRvbiBhbmQgc2hhcmUgaXRzIGNvbnRleHQgd2l0aGluIGFsbCBpbnN0YW5jZXMuXG4gICAgICAgICAgICAuZmFjdG9yeSgnQXBwQ29uZmlnJywgW1widXJscXVlcnlcIiwgZnVuY3Rpb24gKHVybHF1ZXJ5KSB7XG5cbiAgICAgICAgICAgICAgICAvLyBjb25zb2xlLmxvZyAoXCJVUkw9XCIrICRsb2NhdGlvbi51cmwoKSArIFwiIFF1ZXJ5PVwiICsgbG9jYXRpb24uaHJlZisgXCIgd2luZG93PVwiICsgZG9jdW1lbnQucmVmZXJyZXIpO1xuXG4gICAgICAgICAgICAgICAgdmFyIG15Q29uZmlnID0ge1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgcGF0aHM6IHsgLy8gV2FybmluZyBwYXRocyBzaG91bGQgZW5kIHdpdGggL1xuICAgICAgICAgICAgICAgICAgICAgICAgaW1hZ2UgOiAnaW1hZ2VzLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29ucyA6ICcvaWNvbnMvJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF2YXRhcjogJ2ltYWdlcy9hdmF0YXJzLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdWRpbyA6ICdpbWFnZXMvYXVkaW8vJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGxpIDogJ2ltYWdlcy9hcHBsaS8nXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHNlc3Npb246IHsgLy8gVGhvc2UgZGF0YSBhcmUgdXBkYXRlZCBieSBzZXNzaW9uIHNlcnZpY2VcbiAgICAgICAgICAgICAgICAgICAgICAgaW5pdGlhbCA6IHVybHF1ZXJ5LnRva2VuIHx8ICcxMjM0NTY3ODknLCAgLy8gdHlwaWNhbCBkZXYgaW5pdGlhbCB0b2tlblxuICAgICAgICAgICAgICAgICAgICAgICB0aW1lb3V0IDogMzYwMCwgICAgICAgICAvLyB0aW1lb3V0IGlzIHVwZGF0ZWQgY2xpZW50IHNlc3NpbiBjb250ZXh0IGNyZWF0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgIHBpbmdyYXRlOiAxNSwgICAgICAgICAgIC8vIFBpbmcgcmF0ZSB0byBjaGVjayBpZiBzZXJ2ZXIgaXMgc3RpbGwgYWxpdmVcbiAgICAgICAgICAgICAgICAgICAgICAgdXVpZCAgICA6ICcnLCAgICAgICAgICAgLy8gdXVpZCBtYXAgd2l0aCBjb29raWUgb3IgbG9uZyB0ZXJtIHNlc3Npb24gYWNjZXNzIGtleVxuICAgICAgICAgICAgICAgICAgICAgICB0b2tlbiAgIDogJycgICAgICAgICAgICAvLyB3aWxsIGJlIHJldHVybmVkIGZyb20gYXV0aGVudGljYXRpb24gICAgXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG15Q29uZmlnO1xuICAgICAgICAgICAgfV0pXG5cbiAgICAgICAgICAgIC8vIEZhY3RvcnkgaXMgYSBzaW5nbGV0b24gYW5kIHNoYXJlIGl0cyBjb250ZXh0IHdpdGhpbiBhbGwgaW5zdGFuY2VzLlxuICAgICAgICAgICAgLmZhY3RvcnkoJ0FwcENhbGwnLCBbXCIkaHR0cFwiLCBcIkFwcENvbmZpZ1wiLCBcIiRsb2dcIiwgZnVuY3Rpb24gKCRodHRwLCBBcHBDb25maWcsIC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nJlcT0ge3tjdHJsLnJlcXVlc3R9fTwvc3Bhbj4gPHNwYW4gY2xhc3M9XCJncmlkLWNvbnRlbnQgbm9zY3JvbGwgcmVzIHt7Y3RybC5zdGF0dXN9fVwiPnJlcz0ge3tjdHJsLnJlc3BvbnNlfX08L3NwYW4+IDxzcGFuIGNsYXNzPVwiZ3JpZC1jb250ZW50IG5vc2Nyb2xsIHN0YXR1cyB7e2N0cmwuc3RhdHVzfX1cIj5zdGF0dXM9IHt7Y3RybC5lcnJjb2RlfX08L3NwYW4+PC9kaXY+PC9kaXY+PHRva2VuLXJlZnJlc2ggYXV0b2xvZz1cInRydWVcIiBjYWxsYmFjaz1cImN0cmwuQXV0b1N0YXJ0XCI+PC90b2tlbi1yZWZyZXNoPicpO31dKTtcbn0pKCk7XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= +!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]&&(n<t.startValue&&(n=t.startValue),n>t.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&&n<t.stopValue&&t.translate(e,a))},t.setStart=function(e){var a;e>t.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;e<t.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.stop.css({right:0,width:t.bounds.bar.getBoundingClientRect().width-a+"px"})),t.stopValue=e},t.translate=function(e,a){var n;if(t.vertical){var i=t.bounds.bar.getBoundingClientRect().height-e;if(t.handles[a].css({"-webkit-transform":"translateY("+i+"px)","-moz-transform":"translateY("+i+"px)","-ms-transform":"translateY("+i+"px)","-o-transform":"translateY("+i+"px)",transform:"translateY("+i+"px)"}),t.dual){if(t.relative[1]&&t.relative[0]){var s=(t.relative[1]-t.relative[0])*t.bounds.bar.getBoundingClientRect().height;n=t.relative[0]*t.bounds.bar.getBoundingClientRect().height,t.slider.css({bottom:n+"px",height:s+"px"})}}else t.slider.css("height",e+"px")}else if(t.handles[a].css({"-webkit-transform":"translateX("+e+"px)","-moz-transform":"translateX("+e+"px)","-ms-transform":"translateX("+e+"px)","-o-transform":"translateX("+e+"px)",transform:"translateX("+e+"px)"}),t.dual){if(t.relative[1]&&t.relative[0]){var l=(t.relative[1]-t.relative[0])*t.bounds.bar.getBoundingClientRect().width;n=t.relative[0]*t.bounds.bar.getBoundingClientRect().width,t.slider.css({left:n+"px",width:l+"px"})}}else t.slider.css("width",e+"px")},t.setValue=function(e,a){var n;e!==t.value[a]&&(void 0===e&&(e=0),e>t.notMore&&(e=t.notMore),e<t.notLess&&(e=t.notLess),t.vertical?(t.relative[a]=(e-t.notLess)/(t.notMore-t.notLess),0===a&&(n=t.relative[a]*t.bounds.bar.getBoundingClientRect().height+t.bounds.handles[a].getBoundingClientRect().height/2),1===a&&(n=t.relative[a]*t.bounds.bar.getBoundingClientRect().height)):(t.relative[a]=(e-t.notLess)/(t.notMore-t.notLess),n=t.relative[a]*(t.bounds.bar.getBoundingClientRect().width-t.bounds.handles[a].getBoundingClientRect().width)),t.translate(n,a),t.value[a]=e,t.formatter?t.viewValue=t.formatter(e,void 0):t.viewValue=e,l&&l.$setViewValue(t.viewValue),t.displays[a]&&t.displays[a].html(t.viewValue))},t.keydown=function(e){switch(e.keyCode){case 39:case 38: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 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),i<t.bounds.handles[e].getBoundingClientRect().height&&(i=t.bounds.handles[e].getBoundingClientRect().height)):(i=a-t.bounds.bar.getBoundingClientRect().left,0>i&&(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;i<a.length;i++)t.moveHandle(n,a[i].pageX,a[i].pageY)}function l(e){a.unbind("touchmove",s),a.unbind("touchend",l),i.on("touchstart",t.touchBarCB),t.callback&&o!==t.value[n]&&t.callback(t.value[n],t.ctrlhandle)}var o=t.value[n];e.preventDefault(),a.on("touchmove",s),a.on("touchend",l),i.unbind("touchstart",t.touchBarCB)},t.handleCB=function(e,n){function i(e){t.moveHandle(n,e.clientX,e.clientY)}function l(){a.unbind("mousemove",i),a.unbind("mouseup",l),t.callback&&o!==t.value[n]&&t.callback(t.value[n],t.ctrlhandle)}if(!s.automatic){var o=t.value[n];e.preventDefault(),a.on("mousemove",i),a.on("mouseup",l),t.handles[n][0].focus(),t.actif=n}},t.find=function(e,t){var a;a=t?t[0].querySelector(e):i[0].querySelector(e);var n=angular.element(a);return n},t.initialSettings=function(e){var a;t.value=[],t.relative=[],null===t.precision&&(a=(""+t.byStep).match(/\.([\d]*)/),t.precision=a&&a[1]?a[1].length:0),i.on("touchstart",t.touchBarCB),t.handles[0].on("touchstart",function(e){t.touchHandleCB(e,0)}),t.dual&&(t.handles[1].addClass("range-slider-handle"),t.handles[1].on("touchstart",function(e){t.touchHandleCB(e,1)}),t.initvalues||t.setValue(e[1],1)),t.initvalues?t.initWidget(t.initvalues):t.setValue(e[0],0)},t.init=function(){if(t.sliderid=s.id||"slider-"+parseInt(1e3*Math.random()),t.startValue=-(1/0),t.stopValue=1/0,t.byStep=parseInt(s.byStep)||1,t.vertical=s.vertical||!1,t.dual=s.dualHandles||!1,t.trigger_input_change=!1,t.notMore=parseInt(s.notMore)||100,t.notLess=parseInt(s.notLess)||0,t.vertical&&i.addClass("vertical-range"),t.handles=[t.find(".handle-min"),t.find(".handle-max")],t.bar=i,t.slider=t.find(".range-slider-active-segment"),t.start=t.find(".ibz-range-slider-start"),t.stop=t.find(".ibz-range-slider-stop"),t.disable=s.disable||!1,t.ctrlhandle=new e(t),t.bounds={bar:i[0],handles:[t.handles[0][0],t.handles[1][0]]},"true"===s.disable&&t.setDisable(!0),s.displayTarget)switch(s.displayTarget){case!0:case"handle":t.displays=t.handles,t.handles[0].addClass("ibz-range-slider-display"),t.dual&&t.handles[1].addClass("ibz-range-slider-display");break;default:t.displays=[a.getElementById(s.displayTarget)]}else t.displays=[];if(s.initial){var n=s.initial.split(",");t.initial=[void 0!==n[0]?parseInt(n[0]):t.notLess,void 0!==n[1]?parseInt(n[1]):t.notMore]}else t.initial=[t.ngModel,t.ngModel];t.$watch("startAt",function(){t.value<t.startAt,t.startAt&&t.setStart(t.startAt)}),t.$watch("stopAt",function(){t.value>t.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='<div class="ibz-range-slider range-slider" title="{{title}}"data-slider><span class="range-slider-handle handle-min" ng-mousedown="handleCB($event,0)" ng-focus="focusCB(true)" ng-blur="focusCB(false)" role="slider" tabindex="0"></span><span class="handle-max" ng-mousedown="handleCB($event,1)" ng-focus="focusCB(true)" ng-blur="focusCB(false)" role="slider" tabindex="0"></span><span class="range-slider-active-segment"></span><span class="ibz-range-slider-start" ></span> <span class="ibz-range-slider-stop"></span> <input id={{sliderid}} type="hidden"></div>';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='<div class="afb-monitor" ng-click="getping()"><span class="afb-refresh-token" >afb://{{hostname}}:{{httpdport}}</span><i class="{{icon}}"></i></div>';angular.module("TokenRefresh",["AppConfig","ModalNotification"]).directive("tokenRefresh",["$log","$window","$timeout","$location","Notification","AppConfig","AppCall",function(t,a,n,i,s,l,o){function r(e,r,u){e.logged=void 0,a.onbeforeunload=function(){o.get(e.plugin,"logout",{},function(){t.log("OPA exit")})},e.online=function(){r.addClass("online"),r.removeClass("offline"),e.logged=!0},e.offline=function(){r.addClass("offline"),r.removeClass("online"),e.logged=!1},e.onerror=function(){e.logged!==!1&&(s.warning({message:"AppFramework Binder Lost",delay:5e3}),e.offline()),e.status=0},e.onsuccess=function(t,a){return 200!==a||"success"!==t.request.status?(s.warning({message:"auto-connect :"+t.request.info,delay:1e4}),e.offline(),!1):(e.logged!==!0&&(s.success({message:"AppFramework Binder Connected",delay:3e3}),e.online(),e.callback&&e.callback(t)),e.status=1,!0)},e.getping=function(){o.get(e.plugin,"ping",{},function(t,a){return 200!==a||"success"!==t.request.status?(s.warning({message:t.request.info,delay:5e3}),void e.offline()):void n(e.getping,1e3*l.session.pingrate)},e.onerror)},e.refresh=function(){o.get(e.plugin,"refresh",{},function(t,a){e.onsuccess(t,a),n(e.refresh,250*l.session.timeout)},e.onerror)},e.loggin=function(){o.get(e.plugin,"connect",{token:l.session.initial},function(t,a){e.onsuccess(t,a)&&(n(e.getping,1e3*l.session.pingrate),n(e.refresh,250*l.session.timeout))},e.onerror)},e.plugin=u.plugin||"auth",e.icon=u.icon||"fi-lightbulb",e.hostname=i.host(),e.httpdport=i.port(),e.autolog=JSON.parse(u.autolog||!1),e.autolog&&e.loggin()}return{template:e,scope:{callback:"="},restrict:"E",link:r}}])}(),function(){"use strict";var e='<div class="tip-modal-popup"><i class="{{icon}}"></i><span>{{tip}}</span></span></div>';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='<span title="Goto: {{href}}" ng-click="clicked()"><i class="{{icon}}"></i><span>{{label}}</span></span>';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;s<t.length;s++)if(this.file=t[s],this.basename=this.file.name.split("/").reverse()[0],isNaN(this.file.size)||this.file.size>1024*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='<input type="file" name="{{name}}-input" onchange="angular.element(this).scope().UpLoadFile(this.files)" accept="{{mimetype}}" style="display:none"><div class="upload-file" ng-click="imgClicked()"><i class="{{icon}}"></i> <span>{{label}}</span><range-slider ng-show="!noslider" id="{{name}}-slider" automatic=true inithook="SliderInitCB"></range-slider></div>',a='<span class="modal-text">Upload Application <b>{{appname}}</b> ?</span><div><img ng-src="{{icon}}"><submit-button icon="fi-x" label="Cancel" clicked="abandon"></submit-button><submit-button icon="fi-like" label="Install" clicked="success"></submit-button> </div>',n='<span class="modal-text">Invalid Application <b>{{appname}}</b> ?</span><div><img ng-src="{{icon}}"><submit-button icon="fi-x" label="Close" clicked="abandon"></submit-button></div>';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='<tip-modal tip="tip"></tip-modal><label for="{{name}}-intext">{{label}} <i ng-show="required" ng-click="ToBeDefined" class="required {{status}} fi-checkbox" title="Free Value But Mandatory Argument" alt="?"> </i></label><input type="{{type}}" id="{{name}}-intext" placeholder="{{placeholder}}" class="status-{{status}}" ng-model="value" ng-blur="validate()" ng-focus="selected()" ng-model-options="{ updateOn: \'default blur\', debounce: {default: 500, blur: 0} }"><alert data-ng-show="!valid&&errmsg">{{errmsg}}</alert>',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.length<i.minlen&&(e.status="invalid",e.errmsg=e.name+": Mininum Lengh= "+i.minlen+" Characters",e.error=!0),"email"in i&&(t.test(e.value)||(e.status="invalid",e.errmsg="invalid email address",e.error=!0))):e.required&&(e.status="invalid",e.errmsg=e.name+": Required Attribute",e.error=!0),e.error?(e.required&&e.valid&&(e.valid=!1,e.l4acounter.validated>0&&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='<input-text class="password" tip="{{tip1}}" placeholder="{{place1}}"label="{{label1}}" callback="valid1" name="{{name}}-1" value="pass1" required minlen="{{minlen}}" type="password" ></input-text><input-text class="password" tip="tip2" placeholder="{{place2}}"label="{{label2}}" callback="valid2" name="{{name}}-2" value="pass2" required minlen="{{minlen}}" type="password" > </input-text>';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='<div ng-click="clicked()"><i class="{{icon}}"></i><span>{{label}}</span></div>';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='<div ng-click="clicked()"><img ng-src="{{icon}}"><span>{{label}}</span></div>',t='<b class="close-button" ng-click="close()">×</b><img ng-src="{{icon}}"><span class="modal-text">Application <b>{{label}}</b></span><ul class="vertical icon-left primary menu-bar appli-menu-start"><li class=start-{{runstatus}}><a ng-click=action("start")><i class="fi-check"> Start</i></a></li><li class=stop-{{runstatus}}><a ng-click=action("stop")><i class="fi-x"> Stop</i></a></li><li><a ng-click=action("info")><i class="fi-info"> Info</i></a></li><li class=start-{{runstatus}}><a ng-click=action("uninstall")><i class="fi-x"> Uninstall</i></a></li></ul>',a='<b class="close-button" ng-click="close()">×</b><img ng-src="{{icon}}"><span class="modal-text">Application <b>{{label}}</b></span><ul class="vertical icon-left appli-menu-info"><li><i class="fi-paperclip"> Name : {{detail.name}} </i></li><li><i class="fi-info"> Description {{detail.description}}</i></li><li><i class="fi-torso"> Author : {{detail.author}}</i></li></ul>';angular.module("AppliButton",[]).directive("appliButton",["AppConfig","AppCall","ModalFactory","Notification","$timeout","$window","$location","urlquery",function(n,i,s,l,o,r,u,c){function d(e,d,p){e.runstatus="stop",e.runmode=c.runmode||"auto",e.clicked=function(){var n=function(t,a){l.error({message:"Fail /api/afm-main"+t+"="+e.label+" RunID="+e.appID,delay:5e3}),d.addClass("fail"),d.removeClass("success"),e.callback(e.appID,t,a)},c=function(t,a){d.removeClass("fail"),e.runID=a.response.runid,e.callback(e.appID,t,a)},p=function(){e.modApp.deactivate(),o(function(){e.modApp.destroy()},1e3)},f=function(){e.modInfo.deactivate(),o(function(){e.modInfo.destroy()},1e3)},g=function(t){switch(t){case"start":if("stop"!==e.runstatus)return;i.get("afm-main","start",{id:e.appID,mode:e.runmode},function(a,i){return 200!==i||"afb-reply"!==a.jtype?void n("start",a):(e.runstatus="start",c(t,a),void(a.response.uri&&(e.winapp=r.open(a.response.uri.replace("%h",u.host())))))});break;case"stop":if("start"!==e.runstatus)return;i.get("afm-main","terminate",{runid:e.runID},function(a,i){return 200!==i||"afb-reply"!==a.jtype?void n("stop",a):(e.runstatus="stop",e.winapp&&(e.winapp.close(),e.winapp=!1),void c(t,a))});break;case"info":i.get("afm-main","detail",{id:e.appID},function(t,i){if(200!==i||"afb-reply"!==t.jtype)return void n("detail",t);var l={animationIn:"slideInFromTop",contentScope:{close:f,icon:e.icon,label:e.appID,detail:t.response},template:a};e.modInfo=new s(l),e.modInfo.activate()});break;case"uninstall":if("stop"!==e.runstatus)return;i.get("afm-main","uninstall",{id:e.appID},function(e,a){return 200!==a||"afb-reply"!==e.jtype?void n("uninstall",e):void c(t,e)})}p()},m={animationIn:"slideInFromTop",contentScope:{action:g,runstatus:e.runstatus,close:p,icon:e.icon,label:e.label},template:t};e.modApp=new s(m),e.modApp.activate()},p.handle&&e.store[p.handle].name?(e.icon=n.paths.icons+p.handle,e.label=e.store[p.handle].name,e.appID=p.handle):(e.icon=n.paths.icons+"w3c-ico.png",e.label=p.handle),d.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:d,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),"uninstall"===t&&a.GetRunnables()},a.GetRunnables=function(){e.get("afm-main","runnables",{},function(e,n){if(a.request="/api/afm-main/runnable",a.response=e.response,a.errcode=e.request.status,"afb-reply"!==e.jtype)return void t.error({message:"Invalid Respond to /opa/afm-main/runnable response.data="+response.data,delay:5e3});if("success"!==e.request.status)return void t.error({message:"afm-main/runnable"+e.request.info,delay:5e3});for(var i=[],s=e.response.runnables,l=0;l<s.length;l++)i[l]=s[l].id,a.appliStore[s[l].id]=s[l];a.appliIDs=i})},a.FileUploaded=function(e){a.request="/api/afm-main/install",a.response=e.headers,a.errcode=e.status,a.GetRunnables()},a.AutoStart=function(){a.GetRunnables()}}])}(),function(){"use strict";angular.module("JQueryEmu",[]).factory("JQemu",function(){var e=function(e,t){for(var a=e,n=t.toUpperCase();a[0];){if(n===a[0].tagName)return a;a=a.parent()}},t=function(e,t,a){for(var n=a.toLowerCase(),i=t.toLowerCase()+"Name",s=e.children();s[0];){if(n===s[0][i])return s;s=s.next()}},a=function(e,t){for(var a=t.toLowerCase(),n=e.children();n[0];){if(n.hasClass(a))return n;n=n.next()}},n={FindInParent:e,FindByTag:t,FindByClass:a};return n})}();var foundationRoutes=[{name:"Dashboard",url:"/dashboard",controller:"DashboardController as ctrl",animationIn:"slideInRight",path:"pages/Dashboard/Dashboard.html"}];!function(){"use strict";angular.module("AppConfig",[]).factory("AppConfig",["urlquery",function(e){var t={paths:{image:"images/",icons:"/icons/",avatar:"images/avatars/",audio:"images/audio/",appli:"images/appli/"},session:{initial:e.token||"123456789",timeout:3600,pingrate:15,uuid:"",token:""}};return t}]).factory("AppCall",["$http","AppConfig","$log",function(e,t,a){var n={get:function(a,n,i,s,l){var o=function(e){l?l(e.data,e.status,e.config):s(e.data,e.status,e.config)},r=function(e){if(!e.data||!e.data.request)return void o(e);var a=e.data.request;a.token&&(t.session.token=a.token),a.uuid&&(t.session.uuid=a.uuid),a.timeout&&(t.session.timeout=a.timeout),s(e.data,e.status,e.config)};i.token||(i.token=t.session.token),i.reqid||(i.reqid=n);e.get("/api/"+a+"/"+n,{params:i}).then(r,o)}};return n}])}(),function(){"use strict";function e(){var e={};return location.search.substr(1).split("&").forEach(function(t){var a=t.split("=")[0],n=decodeURIComponent(t.split("=")[1]);a in e?e[a].push(n):e[a]=[n]}),e}function t(e,t,a){e.otherwise("/dashboard"),t.html5Mode(!0).hashPrefix("!")}function a(){FastClick.attach(document.body)}angular.module("AFBclient",["ui.router","ngAnimate","foundation","foundation.dynamicRouting","foundation.dynamicRouting.animations","ui-notification","AppConfig","JQueryEmu","DashboardModule","UploadFiles","LinkButton","TokenRefresh","RangeSlider","ModalNotification"]).value("urlquery",e()).config(t).run(a),t.$inject=["$urlRouterProvider","$locationProvider"],angular.module("foundation").run(["$templateCache",function(e){e.put("components/modal/modal.html",'<div\n class="modal-overlay"\n ng-click="hideOverlay()">\n <aside\n class="modal"\n ng-click="$event.stopPropagation();"\n ng-transclude>\n </aside>\n</div>\n')}])}(),function(){angular.module("AFBclient").run(["$templateCache",function(e){e.put("pages/Dashboard/Dashboard.html",'<h3><img class="logo" src="images/logo/triskel_iot_bzhx250.png" alt="IoT.bzh Logo" style="height:150px"> Application Framework Manager Simple Client</h3><div class="button-box box-content"><appli-button ng-repeat="appliID in ctrl.appliIDs" store="ctrl.appliStore" handle="{{appliID}}" callback="ctrl.AppliCB"></appli-button><upload-appli class="ibz-right" label="Upload" name="widget" icon="fi-upload" posturl="/api/afm-main/install" callback="ctrl.FileUploaded" title="Upload AGL App"></upload-appli></div><div class="message-box box-content vertical grid-frame"><div class="response"><span class="grid-content noscroll req {{ctrl.status}}">req= {{ctrl.request}}</span> <span class="grid-content noscroll res {{ctrl.status}}">res= {{ctrl.response}}</span> <span class="grid-content noscroll status {{ctrl.status}}">status= {{ctrl.errcode}}</span></div></div><token-refresh autolog="true" callback="ctrl.AutoStart"></token-refresh>')}])}(); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpZGdldHMvUmFuZ2VTbGlkZXJzL1JhbmdlU2xpZGVyTW9kLmpzIiwid2lkZ2V0cy9Ob3RpZmljYXRpb25zL1Rva2VuUmVmcmVzaFN2Yy5qcyIsIndpZGdldHMvTm90aWZpY2F0aW9ucy9Nb2RhbE5vdGlmaWNhdGlvbi5qcyIsIndpZGdldHMvTmF2aWdhdGlvbi9MaW5rQnV0dG9uLmpzIiwid2lkZ2V0cy9Gb3JtSW5wdXQvVXBsb2FkQXBwbGkuanMiLCJ3aWRnZXRzL0Zvcm1JbnB1dC9JbnB1dFRleHQuanMiLCJ3aWRnZXRzL0Zvcm1JbnB1dC9JbnB1dFBhc3N3b3JkLmpzIiwid2lkZ2V0cy9BY3Rpb25CdXR0b25zL1N1Ym1pdEJ1dHRvbi5qcyIsIndpZGdldHMvQWN0aW9uQnV0dG9ucy9BcHBsaUJ1dHRvbi5qcyIsInBhZ2VzL0Rhc2hib2FyZC9EYXNoYm9hcmRNb2R1bGUuanMiLCJzZXJ2aWNlcy9KUXVlcnlFbXUuanMiLCJldGMvcm91dGVzLmpzIiwiZXRjL0FwcENvbmZpZy5qcyIsImFwcC5qcyIsInBhZ2VzL0Rhc2hib2FyZC9EYXNoYm9hcmQuanMiXSwibmFtZXMiOlsiUmFuZ2VTbGlkZXJIYW5kbGUiLCJzY29wZSIsImludGVybmFscyIsImV4dGVybmF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O1xuXG4gICAgICAgICAgICAvLyBodWdlbHkgYnV0IGluIHNvbWUgY2FzZSBET00gaXMgbm90IGZpbmlzaCB3aGVuIHdlIHRyeSB0byBzZXQgdmFsdWVzICEhIVxuICAgICAgICAgICAgaWYgKGluaXR2YWx1ZXMudmFsdWUgIT09IHVuZGVmaW5lZCkgICB7XG4gICAgICAgICAgICAgICAgc2NvcGUudmFsdWUgPSBpbml0dmFsdWVzLnZhbHVlO1xuICAgICAgICAgICAgICAgIHNjb3BlLmZvcmNlUmVmcmVzaCAoNTApOyAvLyB3YWl0IDUwbXMgZm9yIERPTSB0byBiZSByZWFkeVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIC8vIHRoaXMgZnVuY3Rpb24gcmVjb21wdXRlIHNsaWRlIHBvc2l0aW9uaW5nXG4gICAgICAgIHNjb3BlLmZvcmNlUmVmcmVzaCA9IGZ1bmN0aW9uICh0aW1lcikge1xuICAgICAgICAgICB2YXIgdmFsdWUgPSBzY29wZS52YWx1ZTtcbiAgICAgICAgICAgc2NvcGUudmFsdWUgPSBbdW5kZWZpbmVkLHVuZGVmaW5lZF07XG4gICAgICAgICAgICR0aW1lb3V0IChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgIHNjb3BlLnNldFZhbHVlKHZhbHVlWzBdLDApO1xuICAgICAgICAgICAgICAgaWYgKHNjb3BlLmR1YWwpICBzY29wZS5zZXRWYWx1ZSh2YWx1ZVsxXSwxKTtcbiAgICAgICAgICAgfSwgdGltZXIpO1xuICAgICAgICB9O1xuXG4gICAgICAgIC8vIGhhbmRsZXIgdG8gY2hhbmdlIGNsYXNzIGZyb20gc2xpZGVyIGhhbmRsZVxuICAgICAgICBzY29wZS51cGRhdGVDbGFzcyA9IGZ1bmN0aW9uIChjbGFzc2UsIHN0YXR1cykge1xuXG4gICAgICAgICAgICBpZiAoc3RhdHVzKSBlbGVtZW50LmFkZENsYXNzIChjbGFzc2UpO1xuICAgICAgICAgICAgZWx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cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHNjb3BlLnZlcnRpY2FsKSB7XG4gICAgICAgICAgICAgICAgLy8gdGFrZSBoYW5kbGUgc2l6ZSBpbiBhY2NvdW50IHRvIGNvbXB1dGUgbWlkZGxlXG4gICAgICAgICAgICAgICAgdmFyIHZvZmZzZXQgPSBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLmhlaWdodCAtIG9mZnNldDtcblxuICAgICAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbaGFuZGxlXS5jc3Moe1xuICAgICAgICAgICAgICAgICAgICAnLXdlYmtpdC10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWSgnICsgdm9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAnLW1vei10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWSgnICsgdm9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAnLW1zLXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVZKCcgKyB2b2Zmc2V0ICsgJ3B4KScsXG4gICAgICAgICAgICAgICAgICAgICctby10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWSgnICsgdm9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAndHJhbnNmb3JtJzogJ3RyYW5zbGF0ZVkoJyArIHZvZmZzZXQgKyAncHgpJ1xuICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICBpZiAoIXNjb3BlLmR1YWwpIHNjb3BlLnNsaWRlci5jc3MoJ2hlaWdodCcsIG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgICAgZWxzZSBpZiAoc2NvcGUucmVsYXRpdmVbMV0gJiYgc2NvcGUucmVsYXRpdmVbMF0pIHtcbiAgICAgICAgICAgICAgICAgICB2YXIgaGVpZ2h0ID0gKHNjb3BlLnJlbGF0aXZlWzFdIC0gc2NvcGUucmVsYXRpdmVbMF0pICogIHNjb3BlLmJvdW5kcy5iYXIuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkuaGVpZ2h0O1xuICAgICAgICAgICAgICAgICAgIHN0YXJ0ICA9IChzY29wZS5yZWxhdGl2ZVswXSAqICBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLmhlaWdodCk7XG4gICAgICAgICAgICAgICAgICAgc2NvcGUuc2xpZGVyLmNzcyAoeydib3R0b20nOiBzdGFydCsncHgnLCdoZWlnaHQnOiBoZWlnaHQgKyAncHgnfSk7XG4gICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1toYW5kbGVdLmNzcyh7XG4gICAgICAgICAgICAgICAgICAgICctd2Via2l0LXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJyxcbiAgICAgICAgICAgICAgICAgICAgJy1tb3otdHJhbnNmb3JtJzogJ3RyYW5zbGF0ZVgoJyArIG9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAnLW1zLXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJyxcbiAgICAgICAgICAgICAgICAgICAgJy1vLXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJyxcbiAgICAgICAgICAgICAgICAgICAgJ3RyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJ1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGlmICghc2NvcGUuZHVhbCkgc2NvcGUuc2xpZGVyLmNzcygnd2lkdGgnLG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHNjb3BlLnJlbGF0aXZlWzFdICYmIHNjb3BlLnJlbGF0aXZlWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgIHZ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50UmVjdCgpLndpZHRoIC0gc2NvcGUuYm91bmRzLmhhbmRsZXNbaGFuZGxlXS5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS53aWR0aDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNjb3BlLmdldFZhbHVlICAob2Zmc2V0LCBoYW5kbGUpO1xuXG4gICAgICAgICAgICAvLyBwcmV2ZW50IGR1YWwgaGFuZGxlIHRvIGNyb3NzXG4gICAgICAgICAgICBpZiAoc2NvcGUuZHVhbCAmJiBzY29wZS52YWx1ZSBbMF0gPiBzY29wZS52YWx1ZVsxXSkge1xuICAgICAgICAgICAgICAgIGlmIChoYW5kbGUgPT09IDApIHNjb3BlLnNldFZhbHVlIChzY29wZS52YWx1ZVswXSAsIDEpO1xuICAgICAgICAgICAgICAgIGVsc2Ugc2NvcGUuc2V0VmFsdWUoc2NvcGUudmFsdWVbMV0sMCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cblxuICAgICAgICBzY29wZS5mb2N1c0NCID0gZnVuY3Rpb24gKGluc2lkZSkge1xuICAgICAgICAgICAgaWYgKGluc2lkZSkge1xuICAgICAgICAgICAgICAgICRkb2N1bWVudC5vbigna2V5ZG93bicsc2NvcGUua2V5ZG93bik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICRkb2N1bWVudC51bmJpbmQoJ2tleWRvd24nLHNjb3BlLmtleWRvd24pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIC8vIGJhciB3YXMgdG91Y2ggbGV0IG1vdmUgaGFuZGxlIHRvIHRoaXMgcG9pbnRcbiAgICAgICAgc2NvcGUudG91Y2hCYXJDQiA9IGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgdmFyIGhhbmRsZT0wO1xuICAgICAgICAgICAgdmFyIHJlbGF0aXZlO1xuICAgICAgICAgICAgdmFyIHRvdWNoZXMgPSBldmVudC5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gICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmdW5jdGlvbiB0b3VjaGVuZChldmVudCkge1xuICAgICAgICAgICAgICAgJGRvY3VtZW50LnVuYmluZCgndG91Y2htb3ZlJyx0b3VjaG1vdmUpO1xuICAgICAgICAgICAgICAgJGRvY3VtZW50LnVuYmluZCgndG91Y2hlbmQnICx0b3VjaGVuZCk7XG4gICAgICAgICAgICAgICBlbGVtZW50Lm9uKCd0b3VjaHN0YXJ0Jywgc2NvcGUudG91Y2hCYXJDQik7XG5cbiAgICAgICAgICAgICAgICAvLyBpZiB2YWx1ZSBjaGFuZ2Ugbm90aWZ5IGFwcGxpY2F0aW9uIGNhbGxiYWNrXG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLmNhbGxiYWNrICYmIG9sZHZhbHVlICE9PSBzY29wZS52YWx1ZVtoYW5kbGVdKSBzY29wZS5jYWxsYmFjayAoc2NvcGUudmFsdWVbaGFuZGxlXSwgc2NvcGUuY3RybGhhbmRsZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgc2NvcGUuaGFuZGxlQ0IgPSBmdW5jdGlvbiAoY2xpY2tldmVudCwgaGFuZGxlKSB7XG5cbiAgICAgICAgICAgIGlmIChhdHRycy5hdXRvbWF0aWMpIHJldHVybjtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIG9sZHZhbHVlID0gc2NvcGUudmFsdWVbaGFuZGxlXTtcbiAgICAgICAgICAgIC8vIHJlZ2lzdGVyIG1vdXNlIGV2ZW50IHRvIHRyYWNrIGhhbmRsZVxuICAgICAgICAgICAgY2xpY2tldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuXG4gICAgICAgICAgICAkZG9jdW1lbnQub24oJ21vdXNlbW92ZScsbW91c2Vtb3ZlKTtcbiAgICAgICAgICAgICRkb2N1bWVudC5vbignbW91c2V1cCcsIG1vdXNldXApO1xuICAgICAgICAgICAgc2NvcGUuaGFuZ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AgICAgICBzY29wZS5jdHJsaGFuZGxlID0gbmV3IFJhbmdlU2xpZGVySGFuZGxlIChzY29wZSk7XG5cbiAgICAgICAgICAgIC8vIHByZXBhcmUgRE9NIG9iamVjdCBwb2ludGVyIHRvIGNvbXB1dGUgc2l6ZSBkeW5hbWljYWxseVxuICAgICAgICAgICAgc2NvcGUuYm91bmRzID0ge1xuICAgICAgICAgICAgICAgIGJhciAgICA6IGVsZW1lbnRbMF0sXG4gICAgICAgICAgICAgICAgaGFuZGxlczogW3Njb3BlLmhhbmRsZXNbMF1bMF0sIHNjb3BlLmhhbmRsZXNbMV1bMF1dXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBpZiAoYXR0cnMuZGlzYWJsZSA9PT0gJ3RydWUnKSBzY29wZS5zZXREaXNhYmxlKHRydWUpO1xuXG4gICAgICAgICAgICBpZiAoYXR0cnMuZGlzcGxheVRhcmdldCkge1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoYXR0cnMuZGlzcGxheVRhcmdldCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIHRydWUgOlxuICAgICAgICAgICAgICAgICAgICBjYXNlICdoYW5kbGUnIDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmRpc3BsYXlzID0gc2NvcGUuaGFuZGxlcztcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbMF0uYWRkQ2xhc3MoJ2liei1yYW5nZS1zbGlkZXItZGlzcGxheScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLmR1YWwpIHNjb3BlLmhhbmRsZXNbMV0uYWRkQ2xhc3MoJ2liei1yYW5nZS1zbGlkZXItZGlzcGxheScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5kaXNwbGF5cyA9ICBbJGRvY3VtZW50LmdldEVsZW1lbnRCeUlkIChhdHRycy5kaXNwbGF5VGFyZ2V0KV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHNjb3BlLmRpc3BsYXlzPVtdO1xuXG4gICAgICAgICAgICAvLyBleHRyYWN0IGluaXRpYWwgdmFsdWVzIGZyb20gYXR0cnMgYW5kIHBhcnNlIGludG8gaW50XG4gICAgICAgICAgICBpZiAoIWF0dHJzLmluaXRpYWwpIHtcbiAgICAgICAgICAgICAgICBzY29wZS5pbml0aWFsICA9IFtzY29wZS5uZ01vZGVsLCBzY29wZS5uZ01vZGVsXTsgLy8gaW5pdGlhbGl6ZSB0byBtb2RlbCB2YWx1ZXNcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIGluaXRpYWwgID0gYXR0cnMuaW5pdGlhbC5zcGxpdCgnLCcpO1xuICAgICAgICAgICAgICAgIHNjb3BlLmluaXRpYWwgPSBbXG4gICAgICAgICAgICAgICAgICAgIGluaXRpYWxbMF0gIT09IHVuZGVmaW5lZCA/IHBhcnNlSW50IChpbml0aWFsWzBdKSA6IHNjb3BlLm5vdExlc3MsXG4gICAgICAgICAgICAgICAgICAgIGluaXRpYWxbMV0gIT09IHVuZGVmaW5lZCA/IHBhcnNlSW50IChpbml0aWFsWzFdKSA6IHNjb3BlLm5vdE1vcmVcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBNb25pdG9yIGFueSBjaGFuZ2VzIG9uIHN0YXJ0L3N0b3AgZGF0ZXMuXG4gICAgICAgICAgICBzY29wZS4kd2F0Y2goJ3N0YXJ0QXQnLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICBpZiAoc2NvcGUudmFsdWUgPCBzY29wZS5zdGFydEF0ICkge1xuICAgICAgICAgICAgICAgICAgICAvL3Njb3BlLnNldFZhbHVlIChzY29wZS5zdGFydEF0KTtcbiAgICAgICAgICAgICAgICB9XG4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PWZhbHNlO1xuICAgICAgICB9O1xuICAgICAgICBcbiAgICAgICAgc2NvcGUub25lcnJvciA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgaWYgKHNjb3BlLmxvZ2dlZCAhPT0gZmFsc2UpICB7XG4gICAgICAgICAgICAgICAgTm90aWZpY2F0aW9uLndhcm5pbmcgKHttZXNzYWdlOiBcIkFwcEZyYW1ld29yayBCaW5kZXIgTG9zdFwiLCBkZWxheTogNTAwMH0pO1xuICAgICAgICAgICAgICAgIHNjb3BlLm9mZmxpbmUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNjb3BlLnN0YXR1cyA9IDA7XG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICBzY29wZS5vbnN1Y2Nlc3MgPSBmdW5jdGlvbihqcmVzcCwgZXJyY29kZSkge1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoZXJyY29kZSAhPT0gMjAwIHx8IGpyZXNwLnJlcXVlc3Quc3RhdHVzICE9PSBcInN1Y2Nlc3NcIikge1xuICAgICAgICAgICAgICAgIE5vdGlmaWNhdGlvbi53YXJuaW5nICh7bWVzc2FnZTogXCJhdXRvLWNvbm5lY3QgOlwiICsganJlc3AucmVxdWVzdC5pbmZvLCBkZWxheTogMTAwMDB9KTtcbiAgICAgICAgICAgICAgICBzY29wZS5vZmZsaW5lKCk7IFxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHNjb3BlLmxvZ2dlZCAhPT0gdHJ1ZSkgIHtcbiAgICAgICAgICAgICAgICBOb3RpZmljYXRpb24uc3VjY2VzcyAoe21lc3NhZ2U6IFwiQXBwRnJhbWV3b3JrIEJpbmRlciBDb25uZWN0ZWRcIiwgZGVsYXk6IDMwMDB9KTtcbiAgICAgICAgICAgICAgICBzY29wZS5vbmxpbmUoKTtcbiAgICAgICAgICAgICAgICBpZiAoc2NvcGUuY2FsbGJhY2spIHNjb3BlLmNhbGxiYWNrKGpyZXNwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgc2NvcGUuc3RhdHVzID0gMTsgICAgICAgICAgICBcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9O1xuXG4gICAgICAgIC8vIENoZWNrIEJpbmRlciBzdGF0dXNcbiAgICAgICAgc2NvcGUuZ2V0cGluZyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBBcHBDYWxsLmdldCAoc2NvcGUucGx1Z2luLCBcInBpbmdcIiwgey8qcXVlcnkqL30sZnVuY3Rpb24oanJlc3AsIGVycmNvZGUpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXJyY29kZSAhPT0gMjAwIHx8IGpyZXNwLnJlcXVlc3Quc3RhdHVzICE9PSBcInN1Y2Nlc3NcIikge1xuICAgICAgICAgICAgICAgICAgICBOb3RpZmljYXRpb24ud2FybmluZyAoe21lc3NhZ2U6IGpyZXNwLnJlcXVlc3QuaW5mbywgZGVsYXk6IDUwMDB9KTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUub2ZmbGluZSgpOyBcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyByZXN0YXJ0IGEgbmV3IHRpbWVyIGZvciBuZXh0IHBpbmdcbiAgICAgICAgICAgICAgICAkdGltZW91dCAoc2NvcGUuZ2V0cGluZywgQXBwQ29uZmlnLnNlc3Npb24ucGluZ3JhdGUqMTAwMCk7XG4gICAgICAgICAgICB9LCBzY29wZS5vbmVycm9yKTtcbiAgICAgICAgfTtcbiAgICAgICAgXG4gICAgICAgIC8vIENoZWNrIEJpbmRlciBzdGF0dXNcbiAgICAgICAgc2NvcGUucmVmcmVzaCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBBcHB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y8gZGVsYXkgdGlwIGRpc3BsYXkgdG8gYXZvaWQgYmxpbmtpbmcgd2hlbiBtb3ZpbmcgbW91c2UgZmFzdFxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBkaXNwbGF5ICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFjdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLnNob3cpIHNjb3BlLm1vZGFsLmNzcyh7b3BhY2l0eTogMSwgdmlzaWJpbGl0eTondmlzaWJsZSd9KTsgIFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuc2hvdyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS50aW1lb3V0ID0gJHRpbWVvdXQoYWN0aW9uLCBzY29wZS5kZWxheSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNsb3NlICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICBzY29wZS5zaG93ID0gZmFsc2U7ICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kYWwuY3NzKHtvcGFjaXR5OiAwLCB2aXNpYmlsaXR5OidoaWRkZW4nfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG5cbiAgICAgICAgICAgICAgICAgICAgLy8gYWp1c3QgaWNvbiBvciB1c2UgZGVmYXVsdFxuICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uICA9IGF0dHJzLmljb24gfHwgJ2ZpLWxpZ2h0YnVsYic7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgUGFyZW50IGVsZW1lbnQgdG8gZ2V0IG1vdXNlIGV2ZW50XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5hZGRDbGFzcyAoJ2FzLW1vZGFsLXRpcCcpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnY2xpY2snLCBjbG9zZSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdmb2N1cycsIGRpc3BsYXkpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnbW91c2VvdmVyJywgZGlzcGxheSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdtb3VzZWxlYXZlJywgY2xvc2UpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnYmx1cicsIGNsb3NlKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmRlbGF5ID0gYXR0cnMuZGVsYXkgfHwgMTAwMDsgLy8gd2FpdCAxcyBiZWZvcmUgZGlzcGxheWluZyB0aXBcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICByZXN0cmljdDogJ0UnLFxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogdG1wbCxcbiAgICAgICAgICAgICAgICAgICAgbGluazogbXltZXRob2RzLFxuICAgICAgICAgICAgICAgICAgICBzY29wZToge3RpcDogXCI9XCJ9IC8vIHRpcCBtYXkgbm90IGJlIGRlZmluZWQgd2hlbiB3aWRnZXQgaXMgZGlzcGxheVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XSk7XG59KSgpO1xuIiwiLyogXG4gKiBDb3B5cmlnaHQgKEMpIDIwMTUgXCJJb1QuYnpoXCJcbiAqIEF1dGhvciBcIkZ1bHVwIEFyIEZvbGxcIlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOiB5b3U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j4nICtcbiAgICAgICAgICAgICc8aSBjbGFzcz1cInt7aWNvbn19XCI+PC9pPicgK1xuICAgICAgICAgICAgJzxzcGFuPnt7bGFiZWx9fTwvc3Bhbj4nICtcbiAgICAgICAgICAgICc8L3NwYW4+JztcblxuXG4gICAgYW5ndWxhci5tb2R1bGUoJ0xpbmtCdXR0b24nLCBbXSlcbiAgICAgICAgICAgIC5kaXJlY3RpdmUoJ2xpbmtCdXR0b24nLCBbXCIkbG9jYXRpb25cIiwgZnVuY3Rpb24gKCRsb2NhdGlvbikge1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG15bWV0aG9kcyhzY29wZSwgZWxlbSwgYXR0cnMpIHtcblxuICAgICAgICAgICAgICAgICAgICBzY29wZS5jbGlja2VkID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWF0dHJzLnF1ZXJ5KSAkbG9jYXRpb24ucGF0aChhdHRycy5ocmVmKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgJGxvY2F0aW9uLnBhdGgoYXR0cnMuaHJlZikuc2VhcmNoKGF0dHJzLnF1ZXJ5KTtcbiAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBhanVzdCBpY29uIG9yIHVzZSBkZWZhdWx0XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmljb24gPSBhdHRycy5pY29uICAgfHwgJ2ZpLWxpbmsnO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IGF0dHJzLmxhYmVsIHx8ICdKdW1wJztcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaHJlZiAgPSBhdHRycy5ocmVmICB8fCAnL2hvbWUnO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gYWRkIGxhYmVsIGFzIGNsYXNzXG4gICAgICAgICA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ZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgc2NvcGUubW9kYWwuZGVhY3RpdmF0ZSgpO1xuICAgICAgICAgICAgICAgICR0aW1lb3V0IChmdW5jdGlvbigpIHtzY29wZS5tb2RhbC5kZXN0cm95KCk7fSwgMTAwMCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciByZWFkZXJDQiA9IGZ1bmN0aW9uICh1cGxvYWQpIHtcbiAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIC8vIEZpbGUgdXBsb2FkIGZhaWwgaGFuZGxlIGVycm9yXG4gICAgICAgICAgICAgICAgaWYgKCEgdXBsb2FkKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChoYW5kbGUuZmlsZS5zaXplID4gc2NvcGUubWF4c2l6ZSoxMDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBpY29uID0gc2NvcGUuaXN0b29iaWc7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZT0gdG1wbEVycm9yO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICBpZiAoaXNOYU4oaGFuZGxlLmZpbGUuc2l6ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGljb24gPSBzY29wZS5pc25vdHZhbGlkOyBcbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlPSB0bXBsRXJyb3I7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgICAgIHZhciB6aXBhcHAgPSBuZXcgSlNaaXAgKHVwbG9hZC50YXJnZXQucmVzdWx0KTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRodW1ibmFpbCA9IHppcGFwcC5maWxlKFwiaWNvbl8xMjgucG5nXCIpO1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIENoZWNrIGlzIHdlIGhhdmUgYSB0aHVtYm5haWwgd2l0aGluIGxvYWRlZCBaaXBmaWxlXG4gICAgICAgICAgICAgICAgICAgIGlmICghdGh1bWJuYWlsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyAoXCJUaGlzIGlzIG5vdCBhIHZhbGlkIEFwcGxpY2F0aW9uIEZyYW1ld29yayBBUFBcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBpY29uID0gc2NvcGUuaXNub3R2YWxpZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlPSB0bXBsRXJyb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vc2NvcGUuaW1nRWxlbVswXS5zcmMgPSB3aW5kb3cuVVJMLmNyZWF0ZU9iamVjdFVSTChuZXcgQmxvYihbdGh1bWJuYWlsLmFzQXJyYXlCdWZmZXIoKV0sIHt0eXBlOiBcImltYWdlXCJ9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBpY29uID0gd2luZG93LlVSTC5jcmVhdGVPYmplY3RVUkwobmV3IEJsb2IoW3RodW1ibmFpbC5hc0FycmF5QnVmZmVyKCldLCB7dHlwZTogXCJpbWFnZVwifSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGUgPSB0bXBsTW9kYWw7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gcmVmZXJlbmNlIGh0dHA6Ly9mb3VuZGF0aW9uLnp1cmIuY29tL2FwcHMvZG9jcy8jIS9hbmd1bGFyLW1vZHVsZXNcbiAgICAgICAgICAgICAgICB2YXIgY29uZmlnID0ge1xuICAgICAgICAgICAgICAgICAgICBhbmltYXRpb25JbjogJ3NsaWRlSW5Gcm9tVG9wJyxcbiAgICAgICAgICAgICAgICAgICAgY29udGVudFNjb3BlOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdWNjZXNzIDogc3VjY2VzcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFiYW5kb24gOiBhYmFuZG9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbiAgICA6IGFwcGljb24sXG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBuYW1lIDogaGFuZGxlLmJhc2VuYW1lXG4gICAgICAgICAgICAgICAgICAgIH0sIHRlbXBsYXRlIDogdGVtcGxhdGVcbiAgICAgICAgICAgICAgICB9OyBcbiAgICAgICAgICAgICAgICAvLyBQb3B1cCBNb2RhbCB0byByZW5kZXIgYXBwbGljYXRpb24gZGF0YVxuICAgICAgICAgICAgICAgIHNjb3BlLm1vZGFsID0gbmV3IE1vZGFsRmFjdG9yeShjb25maWcpO1xuICAgICAgICAgICAgICAgIHNjb3BlLm1vZGFsLmFjdGl2YXRlICgpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgLy8gTG9hZCBmaWxlIHdpdGhpbiBicm93c2VyIGFuZCBpZiBPSyBjYWxsIHJlYWRlckNCXG4gICAgICAgICAgICBoYW5kbGUgPSBuZXcgTG9hZEZpbGVTdmMgKHNjb3BlLCBmaWxlcywgcmVhZGVyQ0IpO1xuICAgICAgICAgICAgY29uc29sZS5sb2cgKGhhbmRsZSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgLy8gSW5pdGlhbGxpemUgZGVmYXVsdCB2YWx1ZXMgZnJvbSBhdHRyaWJ1dGVzIHZhbHVlc1xuICAgICAgICBzY29wZS5uYW1lPSBhdHRycy5uYW1lIHx8ICdhcHBsaSc7XG4gICAgICAgIHNjb3BlLmNhdGVnb3J5PSBhdHRycy5jYXRlZ29yeSAgfHwgJ2FwcGxpJzt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cyA9ICd0b3VjaCc7XG4gICAgIH07ICAgXG4gICAgICAgICAgICBcbiAgICAgc2NvcGUudmFsaWRhdGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICBcbiAgICAgICAgIC8vIGdldCB2YWx1ZSBmcm9tIGlucHV0IGZpZWxkIGJ5cGFzc2luZyBBbmd1bGFyIG5nLW1vZGVsXG4gICAgICAgICBjb25zb2xlLmxvZyAoXCJDbGlja2VkIElucHV0VGV4dCBuYW1lPSVzIHZhbHVlPSVzIHZhbGlkPSVzXCIsIHNjb3BlLm5hbWUsIHNjb3BlLnZhbHVlLCBzY29wZS52YWxpZCk7ICAgICAgICBcblxuICAgICAgICAgLy8gZm9ybSBpcyBub3QgdW50b3VjaGVkIGFueW1vcmVcbiAgICAgICAgIHNjb3BlLnBhcmVudC5yZW1vdmVDbGFzcyAoXCJuZy1wcmlzdGluZVwiKTtcblxuICAgICAgICAgLy8gaWYgdmFsdWUgbm90IG51bGwgY2xlYW4gdXAgc3RyaW5nXG4gICAgICAgICBpZiAoc2NvcGUudmFsdWUpIHtcbiAgICAgICAgICAgICBzY29wZS5lcnJvcj1mYWxzZTsgXG4gICAgICAgICAgICAvLyByZW1vdmUgbGVhZGluZyBhbmQgdHJhaWxsaW5nIHNwYWNlXG4gICAgICAgICAgICBzY29wZS52YWx1ZSA9IHNjb3BlLnZhbHVlLnRyaW0oKTtcbiAgICAgICAgIFxuICAgICAgICAgICAgLy8gcmVtb3ZlIGFueSBzcGFjZSBpcyBub3QgYWxsb3dlZFxuICAgICAgICAgICAgaWYgKCdub3NwYWNlJyBpbiBhdHRycykge1xuICAgICAgICAgICAgICAgc2NvcGUudmFsdWU9c2NvcGUudmFsdWUucmVwbGFjZSgvXFxzL2csICcnKTsgICAgXG4gICAgICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgICAgIGlmICgnbG93ZXJjYXNlJyBpbiBhdHRycykge1xuICAgICAgICAgICAgICAgc2NvcGUudmFsdWUgPSBzY29wZS52YWx1ZS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgXG4gICAgICAgICAgICAvLyBjaGVjayBtaW5pbXVtIGxlbmdodFxuICAgICAgICAgICAgaWYgKFwibWlubGVuXCIgaW4gYXR0cnMpIHtcbiAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlLmxlbmd0aCA8IGF0dHJzLm1pbmxlbikge1xuICAgICAgICAgICAgICAgICBzY29wZS5zdGF0dXM9J2ludmFsaWQnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9c2NvcGUubmFtZSArICc6IE1pbmludW0gTGVuZ2g9ICcgKyBhdHRycy5taW5sZW4gKyAnIENoYXJhY3RlcnMnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJvcj10cnVlO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmICgnZW1haWwnIGluIGF0dHJzKSB7XG4gICAgICAgICAgICBpZiAoIWVtYWlscGF0ZXJuLnRlc3QgKHNjb3BlLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgIHNjb3BlLnN0YXR1cz0naW52YWxpZCc7XG4gICAgICAgICAgICAgICAgc2NvcGUuZXJybXNnPSdpbnZhbGlkIGVtYWlsIGFkZHJlc3MnO1xuICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChzY29wZS5yZXF1aXJlZCkge1xuICAgICAgICAgICAgICAgICBzY29wZS5zdGF0dXM9J2ludmFsaWQnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9c2NvcGUubmFtZSArICc6IFJlcXVpcmVkIEF0dHJpYnV0ZSc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7IFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgIC8vIElmIGxvY2FsIGNvbnRyb2wgZmFpbCBsZXQncyByZWZ1c2UgaW5wdXRcbiAgICAgICAgIGlmIChzY29wZS5lcnJvcikge1xuICAgICAgICAgICAgIGlmIChzY29wZS5yZXF1aXJlZCAmJiBzY29wZS52YWxpZCkge1xuICAgICAgICAgICAgICAgICBzY29wZS52YWxpZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICBpZiAoc2NvcGUubDRhY291bnRlci52YWxpZGF0ZWQgPiAwKSBzY29wZS5sNGFjb3VudGVyLnZhbGlkYXRlZCAtLTtcbiAgICAgICAgICAgICB9IFxuICAgICAgICAgICAgIC8vIHVzZSBjYWxsIHRvIHVwZGF0ZSBmb3JtIHNjb3BlIG9uIGZvcm0gY29tcGxldGVuZXNzXG4gICAgICAgICAgICAgc2NvcGUuY2FsbGJhY2sgKGF0dHJzLm5hbWUsIG51bGwsIHNjb3BlLmRvbmUpO1xuICAgICAgICAgfSBlbHNlIHsgXG4gICAgICAgICAgICAgLy8gbG9jYWxjaGVjayBpcyBPSyBiYWNrdXAgbWF5IG5ldmVydGhlbGVzcyBjaGFuZ2Ugc3RhdHVzIHRvIGZhbHNlXG4gICAgICAgICAgICBpZiAoc2NvcGUucmVxdWlyZWQgICYmICFzY29wZS52YWxpZCkgc2NvcGUubDRhY291bnRlci52YWxpZGF0ZWQgKys7XG4gICAgICAgICAgICBzY29wZS5zdGF0dXM9J3ZhbGlkJztcbiAgICAgICAgICAgIHNjb3BlLnZhbGlkPXRydWU7XG4gICAgICAgICAgICBzY29wZS5jYWxsYmFjayAoYXR0cnMubmFtZSwgc2NvcGUudmFsdWUsIHNjb3BlLmRvbmUpO1xuICAgICAgICAgfVxuICAgICAgICAgIFxuICAgICB9O1xuICAgICBcbiAgICAgLy8gdGhpcyBtZXRob2QgY2FuIGJlIGNhbGxlZCBmcm9tIGNvbnRyb2xsZXIgdG8gdXBkYXRlI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l2ZSgnc3VibWl0QnV0dG9uJywgZnVuY3Rpb24gKCkge1xuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gbXltZXRob2RzKHNjb3BlLCBlbGVtLCBhdHRycykge1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIGFqdXN0IGljb24gb3IgdXNlIGRlZmF1bHRcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaWNvbiA9IGF0dHJzLmljb24gfHwgJ2ZpLWZvb3QnO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IGF0dHJzLmxhYmVsIHx8ICdOZXh0JztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIGFkZCBsYWJlbCBhcyBjbGFzc1xuICAgICAgICAgICAgICAgICAgICBlbGVtLmFkZENsYXNzIChzY29wZS5sYWJlbC50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIG5vdGU6IGNsaWNrZWQgaW4gaW1wb3J0ZWQgYW5kIHdoZW4gdGVtcGxhdGUgaXMgY2xpY2tlZFxuICAgICAgICAgICAgICAgICAgICAvLyBpdCB3aWxsIGNhbGwgY2xpY2tlZCBtZXRob2QgcGFzc2VkIGluIHBhcmFtLlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICByZXN0cmljdDogJ0UnLFxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogdG1wbCxcbiAgICAgICAgICAgICAgICAgICAgbGluazogbXltZXRob2RzLFxuICAgICAgICAgICAgICAgICAgICBzY29wZToge2NsaWNrZWQgOiAnPSd9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0pO1xufSkoKTtcbiIsIi8qIFxuICogQ29weXJpZ2h0IChDKSAyMDE1IFwiSW9ULmJ6aF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GlmaWNhdGlvblwiLCBcIiR0aW1lb3V0XCIsIFwiJHdpbmRvd1wiLCBcIiRsb2NhdGlvblwiLCBcInVybHF1ZXJ5XCIsIGZ1bmN0aW9uIChBcHBDb25maWcsIEFwcENhbGwsIE1vZGFsRmFjdG9yeSwgTm90aWZpY2F0aW9uLCAkdGltZW91dCwgJHdpbmRvdywgJGxvY2F0aW9uLCB1cmxxdWVyeSkge1xuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gbXltZXRob2RzKHNjb3BlLCBlbGVtLCBhdHRycykge1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5ydW5zdGF0dXMgPSBcInN0b3BcIjtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUucnVubW9kZSAgID0gdXJscXVlcnkucnVubW9kZSB8fCBcImF1dG9cIjtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuY2xpY2tlZCA9IGZ1bmN0aW9uICgpIHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5vdGlmeUVycm9yID0gZnVuY3Rpb24oYWN0aW9uLCBqcmVzcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5vdGlmaWNhdGlvbi5lcnJvciAoe21lc3NhZ2U6IFwiRmFpbCAvYXBpL2FmbS1tYWluXCIgKyBhY3Rpb24gKyBcIj1cIiArIHNjb3BlLmxhYmVsICsgXCIgUnVuSUQ9XCIrIHNjb3BlLmFwcElELCBkZWxheTogNTAwMH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW0uYWRkQ2xhc3MgKFwiZmFpbFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtLnJlbW92ZUNsYXNzIChcInN1Y2Nlc3NcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuY2FsbGJhY2sgKHNjb3BlLmFwcElELCBhY3Rpb24sIGpyZXNwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBub3RpZnlTdWNjZXNzID0gZnVuY3Rpb24gKGFjdGlvbiwganJlc3ApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtLnJlbW92ZUNsYXNzIChcImZhaWxcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUucnVuSUQgPSBqcmVzcC5yZXNwb25zZS5ydW5pZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5jYWxsYmFjayAoc2NvcGUuYXBwSUQsIGFjdGlvbiwganJlc3ApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNsb3NlTW9kQXBwID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kQXBwLmRlYWN0aXZhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGltZW91dCAoZnVuY3Rpb24oKSB7c2NvcGUubW9kQXBwLmRlc3Ryb3koKTt9LCAxMDAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjbG9zZU1vZEluZm8gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5tb2RJbmZvLmRlYWN0aXZhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGltZW91dCAoZnVuY3Rpb24oKSB7c2NvcGUubW9kSW5mby5kZXN0cm95KCk7fSwgMTAwMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgYWN0aW9uTW9kYWwgPSBmdW5jdGlvbihhY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyAoXCJNb2RhbCBBY3Rpb249JXNcIiwgYWN0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGFjdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInN0YXJ0XCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2NvcGUucnVuc3RhdHVzICE9PSBcInN0b3BcIikgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQXBwQ2FsbC5nZXQgKFwiYWZtLW1haW5cIiwgXCJzdGFydFwiLCB7aWQ6IHNjb3BlLmFwcElELCBtb2RlOiBzY29wZS5ydW5tb2RlfSwgZnVuY3Rpb24oanJlc3AsIGVycmNvZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyY29kZSAhPT0gMjAwIHx8IGpyZXNwLmp0eXBlICE9PSBcImFmYi1yZXBseVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeUVycm9yIChcInN0YXJ0XCIsIGpyZXNwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5ydW5zdGF0dXM9XCJzdGFydFwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeVN1Y2Nlc3MgKGFjdGlvbiwganJlc3ApO1xuXHRcdFx0XHRcdGlmKGpyZXNwLnJlc3BvbnNlLnVyaSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUud2luYXBwPSAkd2luZG93Lm9wZW4oanJlc3AucmVzcG9uc2UudXJpLnJlcGxhY2UoXCIlaFwiLCAkbG9jYXRpb24uaG9zdCgpKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInN0b3BcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY29wZS5ydW5zdGF0dXMgIT09IFwic3RhcnRcIikgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJhZm0tbWFpblwiLCBcInRlcm1pbmF0ZVwiLCB7cnVuaWQ6IHNjb3BlLnJ1bklEfSwgZnVuY3Rpb24oanJlc3AsIGVycmNvZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyY29kZSAhPT0gMjAwIHx8IGpyZXNwLmp0eXBlICE9PSBcImFmYi1yZXBseVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeUVycm9yIChcInN0b3BcIiwganJlc3ApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLnJ1bnN0YXR1cz1cInN0b3BcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpZiBhIHJlbW90ZSB3aW5kb3cgYXBwIHdhcyBvcGVuIGxldCdzIGNsb3NlIGl0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLndpbmFwcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIkNsb3NpbmcgQXBwbGljYXRpb24gV2luZG93IGxhYmVsPSVzIGlkPSVzXCIsIHNjb3BlLmxhYmVsLCBzY29wZS5hcHBJRCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUud2luYXBwLmNsb3NlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUud2luYXBwPWZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3RpZnlTdWNjZXNzIChhY3Rpb24sIGpyZXNwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJpbmZvXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJhZm0tbWFpblwiLCBcImRldGFpbFwiLCB7aWQ6IHNjb3BlLmFwcElEfSwgZnVuY3Rpb24oanJlc3AsIGVycmNvZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyY29kZSAhPT0gMjAwIHx8IGpyZXNwLmp0eXBlICE9PSBcImFmYi1yZXBseVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeUVycm9yIChcImRldGFpbFwiLCBqcmVzcCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVmZXJlbmNlIGh0dHA6Ly9mb3VuZGF0aW9uLnp1cmIuY29tL2FwcHMvZG9jcy8jIS9hbmd1bGFyLW1vZHVsZXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29uZmlnID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb25JbjogJ3NsaWRlSW5Gcm9tVG9wJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudFNjb3BlOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZSAgIDogY2xvc2VNb2RJbmZvLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbiAgICA6IHNjb3BlLmljb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbCAgIDogc2NvcGUuYXBwSUQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXRhaWwgIDoganJlc3AucmVzcG9uc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgdGVtcGxhdGUgOiB0bXBsRGV0YWlsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gUG9wdXAgTW9kYWwgdG8gcmVuZGVyIGFwcGxpY2F0aW9uIGRhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5tb2RJbmZvID0gbmV3IE1vZGFsRmFjdG9yeShjb25maWcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZEluZm8uYWN0aXZhdGUgKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInVuaW5zdGFsbFwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLnJ1bnN0YXR1cyAhPT0gXCJzdG9wXCIpIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFwcENhbGwuZ2V0IChcImFmbS1tYWluXCIsIFwidW5pbnN0YWxsXCIsIHtpZDogc2NvcGUuYXBwSUR9LCBmdW5jdGlvbihqcmVzcCwgZXJyY29kZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcnJjb2RlICE9PSAyMDAgfHwganJlc3AuanR5cGUgIT09IFwiYWZiLXJlcGx5XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90aWZ5RXJyb3IgKFwidW5pbnN0YWxsXCIsIGpyZXNwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3RpZnlTdWNjZXNzIChhY3Rpb24sIGpyZXNwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIkFjdGlvbk1vZGFsIHVua25vd24gYWN0aW9uPVslc11cIiwgYWN0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZU1vZEFwcCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVmZXJlbmNlIGh0dHA6Ly9mb3VuZGF0aW9uLnp1cmIuY29tL2FwcHMvZG9jcy8jIS9hbmd1bGFyLW1vZHVsZXNcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjb25maWcgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uSW46ICdzbGlkZUluRnJvbVRvcCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudFNjb3BlOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbiAgIDogYWN0aW9uTW9kYWwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bnN0YXR1czogc2NvcGUucnVuc3RhdHVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZSAgICA6IGNsb3NlTW9kQXBwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uICAgICA6IHNjb3BlLmljb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsICAgIDogc2NvcGUubGFiZWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB0ZW1wbGF0ZSAgOiB0bXBsTW9kYWxcbiAgICAgICAgICAgICAgICAgICAgICAgIH07IFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gUG9wdXAgTW9kYWwgdG8gcmVuZGVyIGFwcGxpY2F0aW9uIGRhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZEFwcCA9IG5ldyBNb2RhbEZhY3RvcnkoY29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZEFwcC5hY3RpdmF0ZSAoKTtcbiAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBleHRyYWN0IGFwcGxpY2F0aW9uIGluZm9ybWF0aW9uIGZyb20gQXBwSUQrU3RvcmVcbiAgICAgICAgICAgICAgICAgICAgaWYgKGF0dHJzLmhhbmRsZSAmJiBzY29wZS5zdG9yZSBbYXR0cnMuaGFuZGxlXS5uYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uICA9IEFwcENvbmZpZy5wYXRocy5pY29ucyArIGF0dHJzLmhhbmRsZTsgLy9zY29wZS5zdG9yZSBbYXR0cnMuaGFuZGxlXS5uYW1lLnRvTG93ZXJDYXNlKCkgKyAnLWljby5wbmcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubGFiZWwgPSBzY29wZS5zdG9yZSBbYXR0cnMuaGFuZGxlXS5uYW1lO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuYXBwSUQ9IGF0dHJzLmhhbmRsZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uICA9IEFwcENvbmZpZy5wYXRocy5pY29ucyArICd3M2MtaWNvLnBuZyc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubGFiZWwgPSBhdHRycy5oYW5kbGU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIGFkZCBsYWJlbCBhcyBjbGFzc1xuICAgICAgICAgICAgICAgICAgICBlbGVtLmFkZENsYXNzIChzY29wZS5sYWJlbC50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIG5vdGU6IGNsaWNrZWQgaW4gaW1wb3J0ZWQgYW5kIHdoZW4gdGVtcGxhdGUgaXMgY2xpY2tlZFxuICAgICAgICAgICAgICAgICAgICAvLyBpdCB3aWxsIGNhbGwgY2xpY2tlZCBtZXRob2QgcGFzc2VkIGluIHBhcmFtLlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICByZXN0cmljdDogJ0UnLFxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogdG1wbEFwcGxpLFxuICAgICAgICAgICAgICAgICAgICBsaW5rOiBteW1ldGhvZHMsXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlOiB7Y2FsbGJhY2s6ICc9Jywgc3RvcmU6ICc9J31cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfV0pO1xufSkoKTtcbiIsIihmdW5jdGlvbigpIHtcbid1c2Ugc3RyaWN0JztcblxuLy8gV0FSTklORzogbWFrZSBzdXJlIHRoYW4gYXBwL2Zyb250ZW5kL3NlcnZpY2VzL0FwcENvbmZpZy5qcyBtYXRjaCB5b3VyIHNlcnZlclxuXG4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XR1cztcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2UuZGF0YSkgc2NvcGUucmVzcG9uc2UgPSByZXNwb25zZS5kYXRhO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIC8vIE9uIGFwcCB3YXMgcmVtb3ZlZCBsZXQncyB1cGRhdGUgcnVubmFibGUgbGlzdFxuICAgICAgICAgICAgICAgIGlmIChhY3Rpb24gPT09IFwidW5pbnN0YWxsXCIpICBzY29wZS5HZXRSdW5uYWJsZXMoKTtcbiAgICAgICAgfTtcbiAgICAgICAgXG4gICAgICAgIHNjb3BlLkdldFJ1bm5hYmxlcyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiRGFzaGJvYXJkIEdldFJ1bm5hYmxlc1wiKTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgQXBwQ2FsbC5nZXQgKFwiYWZtLW1haW5cIiwgXCJydW5uYWJsZXNcIiwgey8qcXVlcnkqL30sIGZ1bmN0aW9uKGpyZXNwLCBlcnJjb2RlKSB7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gdXBkYXRlIGRlYnVnIFVJIHpvbmVcbiAgICAgICAgICAgICAgICBzY29wZS5yZXF1ZXN0ICA9IFwiL2FwaS9hZm0tbWFpbi9ydW5uYWJsZVwiOyBcbiAgICAgICAgICAgICAgICBzY29wZS5yZXNwb25zZSA9IGpyZXNwLnJlc3BvbnNlO1xuICAgICAgICAgICAgICAgIHNjb3BlLmVycmNvZGUgID0ganJlc3AucmVxdWVzdC5zdGF0dXM7XG5cbiAgICAgICAgICAgICAgICAvLyBDaGVjayBpZiB0aGlzIGlzIGEgcmVzcG9uc2UgZnJvbSBBR0wgYXBwbGljYXRpb24gZnJhbWV3b3JrIGJpbmRlclxuICAgICAgICAgICAgICAgIGlmIChqcmVzcC5qdHlwZSAhPT0gXCJhZmItcmVwbHlcIikge1xuICAgICAgICAgICAgICAgICAgTm90aWZpY2F0aW9uLmVycm9yICh7bWVzc2FnZTogXCJJbnZhbGlkIFJlc3BvbmQgdG8gL29wYS9hZm0tbWFpbi9ydW5uYWJsZSByZXNwb25zZS5kYXRhPVwiK3Jlc3BvbnNlLmRhdGEsIGRlbGF5OiA1MDAwfSk7IFxuICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIENoZWNrIGZvciBzdWNjZXNzXG4gICAgICAgICAgICAgICAgaWYgKGpyZXNwLnJlcXVlc3Quc3RhdHVzICE9PSBcInN1Y2Nlc3NcIikge1xuICAgICAgICAgICAgICAgICAgICBOb3RpZmljYXRpb24uZXJyb3IgKHttZXNzYWdlOiBcImFmbS1tYWluL3J1bm5hYmxlXCIgKyBqcmVzcC5yZXF1ZXN0LmluZm8sIGRlbGF5OiA1MDAwfSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIC8vIGxvb3Agb24gcnVubmFibGUgYXBwbGljYXRpb24gdG8gcHJlcGFyZSBmb3IgZGlzcGxheVxuICAgICAgICAgICAgICAgIHZhciAgYXBwbGlJRHM9W107XG4gICAgICAgICAgICAgICAgdmFyICBydW5uYWJsZXMgPSBqcmVzcC5yZXNwb25zZS5ydW5uYWJsZXM7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaWR4PTA7IGlkeCA8IHJ1bm5hYmxlcy5sZW5ndGg7IGlkeCArKykge1xuICAgICAgICAgICAgICAgICAgICBhcHBsaUlEc1tpZHhdID0gcnVubmFibGVzIFtpZHhdLmlkO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5hcHBsaVN0b3JlIFtydW5uYWJsZXMgW2lkeF0uaWRdID0gIHJ1bm5hYmxlcyBbaWR4XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2NvcGUuYXBwbGlJRHMgPSBhcHBsaUlEczsgLy8gYXZvaWQgcGFydGlhbCB1cGRhdGUgdG8gbGltaXQgVUkgcmVmcmVzaFxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgfSk7ICAgICAgICAgICAgXG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICBzY29wZS5GaWxlVXBsb2FkZWQgPSBmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nIChcImZpbGUgVXBsb2FkZWRcIik7XG4gICAgICAgICAgICAvLyBDYW5ub3QgZGlzcGxheSBwb3N0IHJlc3VsdHMgYXMgR2V0UnVubmFibGUgd2lsbCBvdmVybG9hZCB0aGVtIGF5bmNocm9ub3VzbHlcbiAgICAgICAgICAgIHNjb3BlLnJlcXVlc3QgID0gXCIvYXBpL2FmbS1tYWluL2luc3RhbGxcIjsgXG4gICAgICAgICAgICBzY29wZS5yZXNwb25zZSA9IHJlc3BvbnNlLmhlYWRlcnM7XG4gICAgICAgICAgICBzY29wZS5lcnJjb2RlICA9IHJlc3BvbnNlLnN0YXR1cztcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgLy8gZXZlcnl0aGluZyBsb29rcyBPSyB1cGRhdGUgYXBwIGxpc3RcbiAgICAgICAgICAgIHNjb3BlLkdldFJ1bm5hYmxlcygpO1xuICAgICAgICB9O1xuICAgICAgICBcbiAgICAgICAgc2NvcGUuQXV0b1N0YXJ0ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiQXV0b1N0YXJ0IHJlcXVlc3RpbmcgQXBwcyBsaXN0XCIpO1xuICAgICAgICAgICAgc2NvcGUuR2V0UnVubmFibGVzKCk7XG4gICAgICAgIH07XG4gICAgICAgICAgXG4gICB9XSk7XG5cbmNvbnNvbGUubG9nIChcIkRhc2hib2FyZCBDb250cm9sbGVyIExvYWRlZFwiKTtcbn0pKCk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mRJblBhcmVudCAodGFyZ2V0LCAnZGl2Jyk7XG4gKiBcbiAqL1xuXG5cbihmdW5jdGlvbiAoKSB7XG4gICAgJ3VzZSBzdHJpY3QnO1xuXG5cbiAgICAgICAgICBcbiAgICAvLyBfYWxsIG1vZHVsZXMgb25seSByZWZlcmVuY2UgZGVwZW5kZW5jaWVzXG4gICAgYW5ndWxhci5tb2R1bGUoJ0pRdWVyeUVtdScsIFtdKVxuXG4gICAgICAgICAgICAvLyBGYWN0b3J5IGlzIGEgc2luZ2xldG9uIGFuZCBzaGFyZSBpdHMgY29udGV4dCB3aXRoaW4gYWxsIGluc3RhbmNlcy5cbiAgICAgICAgICAgIC5mYWN0b3J5KCdKUWVtdScsIGZ1bmN0aW9uICgpIHtcblxuICAgICAgICAgICAgICAgIHZhciBGaW5kSW5QYXJlbnQgPSBmdW5jdGlvbiAoZWxlbWVudCwgc2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBhcmVudCA9IGVsZW1lbnQ7XG4gICAgICAgICAgICAgICAgICAgIHZhciBzZWFyY2ggPSBzZWxlY3Rvci50b1VwcGVyQ2FzZSgpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAocGFyZW50WzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VhcmNoID09PSBwYXJlbnRbMF0udGFnTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwYXJlbnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9ICAvLyBIVE1MRGl2RWxlbWVudCBwcm9wZXJ0aWVzXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnQgPSBwYXJlbnQucGFyZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciAgRmluZEJ5VGFnPSBmdW5jdGlvbiAoZWxlbWVudCwgdGFnLCBzZWxlY3Rvcikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHR5cGUgICA9IHRhZy50b0xvd2VyQ2FzZSgpKyBcIk5hbWVcIjtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNoaWxkcmVuID0gZWxlbWVudC5jaGlsZHJlbigpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hpbGRyZW5bMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWFyY2ggPT09IGNoaWxkcmVuWzBdW3R5cGVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoaWxkcmVuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW4gPSBjaGlsZHJlbi5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciAgRmluZEJ5Q2xhc3M9IGZ1bmN0aW9uIChlbGVtZW50LCBzZWxlY3Rvcikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNoaWxkcmVuID0gZWxlbWVudC5jaGlsZHJlbigpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hpbGRyZW5bMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjaGlsZHJlbi5oYXNDbGFzcyhzZWFyY2gpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoaWxkcmVuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW4gPSBjaGlsZHJlbi5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgdmFyIG15TWV0aG9kcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgRmluZEluUGFyZW50OiBGaW5kSW5QYXJlbnQsXG4gICAgICAgICAgICAgICAgICAgIEZpbmRCeVRhZzogRmluZEJ5VGFnLFxuICAgICAgICAgICAgICAgICAgICBGaW5kQnlDbGFzczogRmluZEJ5Q2xhc3NcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG15TWV0aG9kcztcbiAgICAgICAgICAgIH0pO1xuXG59KSgpOyIsInZhciBmb3VuZGF0aW9uUm91dGVzID0gW3tcIm5hbWVcIjpcIkRhc2hib2FyZFwiLFwidXJsXCI6XCIvZGFzaGJvYXJkXCIsXCJjb250cm9sbGVyXCI6XCJEYXNoYm9hcmRDb250cm9sbGVyIGFzIGN0cmxcIixcImFuaW1hdGlvbkluXCI6XCJzbGlkZUluUmlnaHRcIixcInBhdGhcIjpcInBhZ2VzL0Rhc2hib2FyZC9EYXNoYm9hcmQuaHRtbFwifV07IFxuIiwiKGZ1bmN0aW9uICgpIHtcbiAgICAndXNlIHN0cmljdCc7XG5cbiAgICAvLyBfYWxsIG1vZHVsZXMgb25seSByZWZlcmVuY2UgZGVwZW5kZW5jaWVzXG4gICAgYW5ndWxhci5tb2R1bGUoJ0FwcENvbmZpZycsIFtdKVxuICAgIFxuICAgICAgICAgICAgLy8gRmFjdG9yeSBpcyBhIHNpbmdsZXRvbiBhbmQgc2hhcmUgaXRzIGNvbnRleHQgd2l0aGluIGFsbCBpbnN0YW5jZXMuXG4gICAgICAgICAgICAuZmFjdG9yeSgnQXBwQ29uZmlnJywgW1widXJscXVlcnlcIiwgZnVuY3Rpb24gKHVybHF1ZXJ5KSB7XG5cbiAgICAgICAgICAgICAgICAvLyBjb25zb2xlLmxvZyAoXCJVUkw9XCIrICRsb2NhdGlvbi51cmwoKSArIFwiIFF1ZXJ5PVwiICsgbG9jYXRpb24uaHJlZisgXCIgd2luZG93PVwiICsgZG9jdW1lbnQucmVmZXJyZXIpO1xuXG4gICAgICAgICAgICAgICAgdmFyIG15Q29uZmlnID0ge1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgcGF0aHM6IHsgLy8gV2FybmluZyBwYXRocyBzaG91bGQgZW5kIHdpdGggL1xuICAgICAgICAgICAgICAgICAgICAgICAgaW1hZ2UgOiAnaW1hZ2VzLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29ucyA6ICcvaWNvbnMvJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF2YXRhcjogJ2ltYWdlcy9hdmF0YXJzLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdWRpbyA6ICdpbWFnZXMvYXVkaW8vJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGxpIDogJ2ltYWdlcy9hcHBsaS8nXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHNlc3Npb246IHsgLy8gVGhvc2UgZGF0YSBhcmUgdXBkYXRlZCBieSBzZXNzaW9uIHNlcnZpY2VcbiAgICAgICAgICAgICAgICAgICAgICAgaW5pdGlhbCA6IHVybHF1ZXJ5LnRva2VuIHx8ICcxMjM0NTY3ODknLCAgLy8gdHlwaWNhbCBkZXYgaW5pdGlhbCB0b2tlblxuICAgICAgICAgICAgICAgICAgICAgICB0aW1lb3V0IDogMzYwMCwgICAgICAgICAvLyB0aW1lb3V0IGlzIHVwZGF0ZWQgY2xpZW50IHNlc3NpbiBjb250ZXh0IGNyZWF0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgIHBpbmdyYXRlOiAxNSwgICAgICAgICAgIC8vIFBpbmcgcmF0ZSB0byBjaGVjayBpZiBzZXJ2ZXIgaXMgc3RpbGwgYWxpdmVcbiAgICAgICAgICAgICAgICAgICAgICAgdXVpZCAgICA6ICcnLCAgICAgICAgICAgLy8gdXVpZCBtYXAgd2l0aCBjb29raWUgb3IgbG9uZyB0ZXJtIHNlc3Npb24gYWNjZXNzIGtleVxuICAgICAgICAgICAgICAgICAgICAgICB0b2tlbiAgIDogJycgICAgICAgICAgICAvLyB3aWxsIGJlIHJldHVybmVkIGZyb20gYXV0aGVudGljYXRpb24gICAgXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG15Q29uZmlnO1xuICAgICAgICAgICAgfV0pXG5cbiAgICAgICAgICAgLy8gRmFjdG9yeSBpcyBhIHNpbmdsZXRvbiBhbmQgc2hhcmUgaXRzIGNvbnRleHQgd2l0aGluIGFsbCBpbnN0YW5jZXMuXG4gICAgICAgICAgICAuZmFjdG9yeSgnQXBwQ2FsbCcsIFtcIiRodHRwXCIsIFwiQXBwQ29uZmlnXCIsIFwiJGxvZ1wiLCBmdW5jdGlvbiAoJGh0dHAsIEFwcENvbmZpZywgJGxvZykge1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciBteUNhbGxzID0ge1xuICAgICAgICAgICAgICAgICAgICBnZXQgOiBmdW5jdGlvbihwbHVnaW4sIGFjdGlvbiwgcXVlcnksIGNicmVzcG9uc2UsIGNiZXJyb3IpIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9uZXJyb3IgPSBmdW5jdGlvbihyZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjYmVycm9yKSBjYmVycm9yKHJlc3BvbnNlLmRhdGEsIHJlc3BvbnNlLnN0YXR1cywgcmVzcG9uc2UuY29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGNicmVzcG9uc2UocmVzcG9uc2UuZGF0YSwgcmVzcG9uc2Uuc3RhdHVzLCByZXNwb25zZS5jb25maWcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9uc3VjY2VzcyA9ZnVuY3Rpb24ocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXJlc3BvbnNlLmRhdGEgfHwgIXJlc3BvbnNlLmRhdGEucmVxdWVzdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmVycm9yIChyZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlcXVlc3Q9cmVzcG9uc2UuZGF0YS5yZXF1ZXN0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIHRva2VuIHdhcyB1cGRhdGVkIGtlZXAgaXQgd2l0aGluIGFwcGxpY2F0aW9uIGNhY2hlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlcXVlc3QudG9rZW4pIEFwcENvbmZpZy5zZXNzaW9uLnRva2VuID0gcmVxdWVzdC50b2tlbjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVxdWVzdC51dWlkKSAgQXBwQ29uZmlnLnNlc3Npb24udXVpZCAgPSByZXF1ZXN0LnV1aWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlcXVlc3QudGltZW91dCkgQXBwQ29uZmlnLnNlc3Npb24udGltZW91dCA9IHJlcXVlc3QudGltZW91dDtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNicmVzcG9uc2UocmVzcG9uc2UuZGF0YSwgcmVzcG9uc2Uuc3RhdHVzLCByZXNwb25zZS5jb25maWcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXF1ZXJ5LnRva2VuKSBxdWVyeS50b2tlbiA9IEFwcENvbmZpZy5zZXNzaW9uLnRva2VuOyAvLyBhZGQgdG9rZW4gdG8gcHJvdmlkZWQgcXVlcnlcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcXVlcnkucmVxaWQpIHF1ZXJ5LnJlcWlkID0gYWN0aW9uOyAvLyB1c2UgYWN0aW9uIGFzIGRlZmF1bHQgcmVxdWVzdElEXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaGFuZGxlPSAkaHR0cC5nZXQoJy9hcGkvJyArIHBsdWdpbiArICcvJyArIGFjdGlvbiAsIHtwYXJhbXM6IHF1ZXJ5fSkudGhlbihvbnN1Y2Nlc3MsIG9uZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHJldHVybiBteUNhbGxzO1xuICAgICAgICAgICAgfV0pO1xufSkoKTtcbiIsIihmdW5jdGlvbigpIHtcbiAgJ3VzZSBzdHJpY3QnO1xuICBcbiAgICBmdW5jdGlvbiAgUGFyc2VRdWVyeVN0cmluZyAoKSB7XG4gICAgICB2YXIgcWQgPSB7fTtcbiAgICAgIGxvY2F0aW9uLnNlYXJjaC5zdWJzdHIoMSkuc3BsaXQoX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