1d9a736b4157012bb3cc378a5c09b19cc45d29a5
[src/app-framework-demo.git] / AFBclient.min.js
1 !function(){"use strict";var e='<div  ng-click="clicked()"> <span><i class="{{icon}}"></i><span>{{label}}</span></span></div>';angular.module("SubmitButton",[]).directive("submitButton",function(){function t(e,t,n){e.icon=n.icon||"fi-foot",e.label=n.label||"Next",t.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:t,scope:{clicked:"="}}})}(),function(){"use strict";function e(e){var t=[],n=[];this.getId=function(){return e.sliderid},this.getCbHandle=function(){return e.cbhandle},this.getView=function(a){return a||(a=0),e.value[a]===t[a]?n[a]:(t[a]=e.value[a],e.formatter?n[a]=e.formatter(e.value[a],e.ctrlhandle):n[a]=e.value[a],n[a])},this.updateClass=function(t,n){e.updateClass(t,n)},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,n){n||(n=0),e.setValue(t,n)},this.setDisable=function(t){e.setDisable(t)}}var t=angular.module("RangeSlider",[]);t.directive("rangeSlider",["$log","$document","$timeout",function(t,n,a){function i(t,i,s,o){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 n=t.value;t.value=[void 0,void 0],a(function(){t.setValue(n[0],0),t.dual&&t.setValue(n[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 n,a=t.notMore-t.notLess,i=e*a;if(t.byStep>0){var s=(i-i%t.byStep)/t.byStep,o=i%t.byStep,l=o>=.5*t.byStep?t.byStep:0;return n=s*t.byStep+l+t.notLess}if(t.byStep<0){var r=Math.pow(10,-1*t.byStep);return n=t.notLess+parseInt(i*r)/r}return i},t.getValue=function(e,n){t.vertical?t.relative[n]=(e-t.bounds.handles[n].getBoundingClientRect().height)/(t.bounds.bar.getBoundingClientRect().height-t.bounds.handles[n].getBoundingClientRect().height):t.relative[n]=e/(t.bounds.bar.getBoundingClientRect().width-t.bounds.handles[n].getBoundingClientRect().width);var a=t.normalize(t.relative[n]);a!==t.value[n]&&(a<t.startValue&&(a=t.startValue),a>t.stopValue&&(a=t.stopValue),t.formatter?t.viewValue=t.formatter(a,t.ctrlhandle):t.viewValue=a,t.displays[n]&&t.displays[n].html(t.viewValue),t.value[n]=a,o&&o.$setViewValue(t.viewValue),t.$apply(),a>t.startValue&&a<t.stopValue&&t.translate(e,n))},t.setStart=function(e){var n;e>t.value[0]&&(t.dual?t.setValue(e,1):t.setValue(e,0)),t.vertical?(n=t.bounds.bar.getBoundingClientRect().height*(e-t.notLess)/(t.notMore-t.notLess),t.start.css("height",n+"px")):(n=t.bounds.bar.getBoundingClientRect().width*(e-t.notLess)/(t.notMore-t.notLess),t.start.css("width",n+"px")),t.startValue=e},t.setStop=function(e){var n;e<t.value[0]&&(t.dual?t.setValue(e,1):t.setValue(e,0)),t.vertical?(n=t.bounds.bar.getBoundingClientRect().height*(e-t.notLess)/(t.notMore-t.notLess),t.start.css("height",n+"px")):(n=t.bounds.bar.getBoundingClientRect().width*(e-t.notLess)/(t.notMore-t.notLess),t.stop.css({right:0,width:t.bounds.bar.getBoundingClientRect().width-n+"px"})),t.stopValue=e},t.translate=function(e,n){var a;if(t.vertical){var i=t.bounds.bar.getBoundingClientRect().height-e;if(t.handles[n].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;a=t.relative[0]*t.bounds.bar.getBoundingClientRect().height,t.slider.css({bottom:a+"px",height:s+"px"})}}else t.slider.css("height",e+"px")}else if(t.handles[n].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 o=(t.relative[1]-t.relative[0])*t.bounds.bar.getBoundingClientRect().width;a=t.relative[0]*t.bounds.bar.getBoundingClientRect().width,t.slider.css({left:a+"px",width:o+"px"})}}else t.slider.css("width",e+"px")},t.setValue=function(e,n){var a;e!==t.value[n]&&(void 0===e&&(e=0),e>t.notMore&&(e=t.notMore),e<t.notLess&&(e=t.notLess),t.vertical?(t.relative[n]=(e-t.notLess)/(t.notMore-t.notLess),0===n&&(a=t.relative[n]*t.bounds.bar.getBoundingClientRect().height+t.bounds.handles[n].getBoundingClientRect().height/2),1===n&&(a=t.relative[n]*t.bounds.bar.getBoundingClientRect().height)):(t.relative[n]=(e-t.notLess)/(t.notMore-t.notLess),a=t.relative[n]*(t.bounds.bar.getBoundingClientRect().width-t.bounds.handles[n].getBoundingClientRect().width)),t.translate(a,n),t.value[n]=e,t.formatter?t.viewValue=t.formatter(e,void 0):t.viewValue=e,o&&o.$setViewValue(t.viewValue),t.displays[n]&&t.displays[n].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,n,a){var i;t.vertical?(i=t.bounds.bar.getBoundingClientRect().bottom-a,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=n-t.bounds.bar.getBoundingClientRect().left,0>i&&(i=0),n+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?n.on("keydown",t.keydown):n.unbind("keydown",t.keydown)},t.touchBarCB=function(e){var n,a=0,i=e.changedTouches,s=t.value[a];if(e.preventDefault(),t.dual){n=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 o=Math.abs(n-t.relative[0]),l=Math.abs(n-t.relative[1]);o>l&&(a=1)}t.moveHandle(a,i[0].pageX,i[0].pageY),t.callback&&s!==t.value[a]&&t.callback(t.value[a],t.ctrlhandle)},t.touchHandleCB=function(e,a){function s(e){e.preventDefault();for(var n=e.changedTouches,i=0;i<n.length;i++)t.moveHandle(a,n[i].pageX,n[i].pageY)}function o(e){n.unbind("touchmove",s),n.unbind("touchend",o),i.on("touchstart",t.touchBarCB),t.callback&&l!==t.value[a]&&t.callback(t.value[a],t.ctrlhandle)}var l=t.value[a];e.preventDefault(),n.on("touchmove",s),n.on("touchend",o),i.unbind("touchstart",t.touchBarCB)},t.handleCB=function(e,a){function i(e){t.moveHandle(a,e.clientX,e.clientY)}function o(){n.unbind("mousemove",i),n.unbind("mouseup",o),t.callback&&l!==t.value[a]&&t.callback(t.value[a],t.ctrlhandle)}if(!s.automatic){var l=t.value[a];e.preventDefault(),n.on("mousemove",i),n.on("mouseup",o),t.handles[a][0].focus(),t.actif=a}},t.find=function(e,t){var n;n=t?t[0].querySelector(e):i[0].querySelector(e);var a=angular.element(n);return a},t.initialSettings=function(e){var n;t.value=[],t.relative=[],null===t.precision&&(n=(""+t.byStep).match(/\.([\d]*)/),t.precision=n&&n[1]?n[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=[n.getElementById(s.displayTarget)]}else t.displays=[];if(s.initial){var a=s.initial.split(",");t.initial=[void 0!==a[0]?parseInt(a[0]):t.notLess,void 0!==a[1]?parseInt(a[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",["ConfigApp","ModalNotification"]).directive("tokenRefresh",["$timeout","$http","$location","Notification","ConfigApp",function(t,n,a,i,s){function o(e,o,l){e.status=void 0,e.online=function(){o.addClass("online"),o.removeClass("offline")},e.offline=function(){o.addClass("offline"),o.removeClass("online")},e.onerror=function(t,n,a){e.status!==!1&&(i.warning({message:"AppFramework Binder Lost",delay:5e3}),e.offline()),e.status=0},e.onsuccess=function(t,n,a,o){e.status!==!0&&(t.request.token&&(s.session.token=t.request.token),t.request.uuid&&(s.session.uuid=t.request.uuid),t.request.timeout&&(s.session.timeout=t.request.timeout),i.success({message:"AppFramework Binder Back to Live",delay:3e3}),e.online()),e.status=1},e.getping=function(){var a=n.get(s.session.ping+"?token="+s.session.token);a.success(e.onsuccess),a.error(e.onerror),t(e.getping,1e3*s.session.pingrate)},e.refresh=function(){var a=n.get(s.session.refresh+"?token="+s.session.token);a.success(e.onsuccess),a.error(e.onerror),t(e.refresh,250*s.session.timeout)},e.tkcreate=function(){var t=n.get(s.session.create+"?token="+s.session.initial);t.success(e.onsuccess),t.error(e.onerror)},e.icon=l.icon||"fi-lightbulb",e.hostname=a.host(),e.httpdport=a.port(),e.autolog=JSON.parse(l.autolog||!1),e.autolog&&e.tkcreate(),t(e.getping,1e3*s.session.pingrate),t(e.refresh,250*s.session.timeout)}return{template:e,scope:{callback:"="},restrict:"E",link:o}}])}(),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 n(e,n,a){function i(){function n(){e.show&&e.modal.css({opacity:1,visibility:"visible"})}e.show=!0,e.timeout=t(n,e.delay)}function s(){e.show=!1,e.modal.css({opacity:0,visibility:"hidden"})}e.parent=n.parent(),e.modal=n.find("div"),e.icon=a.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=a.delay||1e3}return{restrict:"E",template:e,link:n,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 n(e,n,a){e.clicked=function(){a.query?t.path(a.href).search(a.query):t.path(a.href)},e.icon=a.icon||"fi-link",e.label=a.label||"Jump",e.href=a.href||"/home",n.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:n,scope:{}}}])}(),function(){"use strict";function e(e,t,n,a,i){var s=new XMLHttpRequest,o=new FormData,l=function(e){i(e)};s.upload.onprogress=function(t){var n=Math.round(t.lengthComputable?100*t.loaded/t.total:0);e.slider&&e.slider.setValue(n)},s.onload=function(){t.addClass("success"),t.removeClass("error");var n={status:s.status,headers:s.getAllResponseHeaders()};e.callback(n)},s.onerror=function(){t.addClass("error"),t.removeClass("success");var n={status:s.status,headers:s.getAllResponseHeaders()};e.callback(n)},s.onabort=function(){t.addClass("error"),t.removeClass("success");var n={status:s.status,headers:s.getAllResponseHeaders()};e.callback(n)};for(var r=0;r<a.length;r++){var u=a[r];if(u.type.match(e.mimetype)){if(u.size>1024*e.maxsize)return e.thumbnail=e.istoobig,void e.$apply("thumbnail");if(isNaN(u.size))return e.thumbnail=e.isnotvalid,void e.$apply("thumbnail");if(e.Basename=u.name.split("/").reverse()[0],e.imgElem[0].file=u,i){var c=new FileReader;c.readAsArrayBuffer(u),c.onload=l}o.append(e.name,u,u.name)}}s.open("POST",n,!0),s.send(o)}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()"><img id="{{name}}-img" src="{{thumbnail}}"><range-slider ng-show="!noslider" id="{{name}}-slider" automatic=true inithook="SliderInitCB"></range-slider></div>';angular.module("UploadFiles",["ConfigApp","ModalNotification","RangeSlider"]).directive("uploadImage",["ConfigApp","JQemu","Notification",function(n,a,i){function s(t,a,i){if(t.imgElem=a.find("img"),t.inputElem=a.find("input"),t.imgClicked=function(){t.inputElem[0].click()},t.SliderInitCB=function(e){t.slider=e},t.UpLoadFile=function(s){var o=function(e){return t.imgElem[0].src=window.URL.createObjectURL(new Blob([e.target.result],{type:"image"})),!0},l=i.posturl+"?token="+n.session.token;new e(t,a,l,s,o)},t.name=i.name||"avatar",t.category=i.category||"image",t.mimetype=(i.accept||"image")+"/*",t.maxsize=i.maxsize||100,t.regexp=new RegExp(i.accept+".*","i"),i.thumbnail?t.thumbnail=n.paths[t.category]+i.thumbnail:t.thumbnail=n.paths[t.category]+"tux-bzh.png",i.thumbnail?t.isnotvalid=n.paths[t.category]+i.isnotvalid:t.isnotvalid=n.paths[t.category]+"isnotvalid.png",i.istoobig?t.istoobig=n.paths[t.category]+i.istoobig:t.istoobig=n.paths[t.category]+"istoobig.png",t.noslider=i.noslider||!1,!i.posturl)throw new TypeError("file-upload %s posturl=/api/xxxx/xxxx required",t.attrs)}return{restrict:"E",template:t,link:s,scope:{callback:"="}}}]).directive("uploadAudio",["ConfigApp","JQemu","Notification",function(n,a,i){function s(t,a,i){if(t.imgElem=a.find("img"),t.inputElem=a.find("input"),t.imgClicked=function(){t.inputElem[0].click()},t.SliderInitCB=function(e){t.slider=e},t.UpLoadFile=function(s){var o=i.posturl+"?token="+n.session.token;new e(t,a,o,s,!1)},t.name=i.name||"audio",t.category=i.category||"audio",t.mimetype=(i.accept||"audio")+"/*",t.maxsize=i.maxsize||1e4,t.regexp=new RegExp(i.accept+".*","i"),i.thumbnail?t.thumbnail=n.paths[t.category]+i.thumbnail:t.thumbnail=n.paths[t.category]+"upload-music.png",i.thumbnail?t.isnotvalid=n.paths[t.category]+i.isnotvalid:t.isnotvalid=n.paths[t.category]+"isnotvalid.png",i.istoobig?t.istoobig=n.paths[t.category]+i.istoobig:t.istoobig=n.paths[t.category]+"istoobig.png",t.noslider=i.noslider||!1,!i.posturl)throw new TypeError("file-upload %s posturl=/api/xxxx/xxxx required",t.attrs)}return{restrict:"E",template:t,link:s,scope:{callback:"="}}}]).directive("uploadAppli",["ConfigApp","JQemu","Notification",function(n,a,i){function s(t,a,i){if(t.imgElem=a.find("img"),t.inputElem=a.find("input"),t.imgClicked=function(){t.inputElem[0].click()},t.SliderInitCB=function(e){t.slider=e},t.UpLoadFile=function(s){var o=function(e){var a=new JSZip(e.target.result),i=a.file("afa-pkg/thumbnail.jpg");return i?(t.imgElem[0].src=window.URL.createObjectURL(new Blob([i.asArrayBuffer()],{type:"image"})),!0):(t.thumbnail=n.paths[t.category]+"isnotvalid.png",t.$apply("thumbnail"),!1)},l=i.posturl+"?token="+n.session.token;new e(t,a,l,s,o)},t.name=i.name||"appli",t.category=i.category||"appli",t.mimetype=i.accept||".zip",t.maxsize=i.maxsize||1e5,t.regexp=new RegExp(i.accept+".*","i"),i.thumbnail?t.thumbnail=n.paths[t.category]+i.thumbnail:t.thumbnail=n.paths[t.category]+"upload-appli.png",i.thumbnail?t.isnotvalid=n.paths[t.category]+i.isnotvalid:t.isnotvalid=n.paths[t.category]+"isnotvalid.png",i.istoobig?t.istoobig=n.paths[t.category]+i.istoobig:t.istoobig=n.paths[t.category]+"istoobig.png",t.noslider=i.noslider||!1,!i.posturl)throw new TypeError("file-upload %s posturl=/api/xxxx/xxxx required",t.attrs)}return{restrict:"E",template:t,link:s,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="?"> &nbsp; </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(n){function a(e,a,i){e.error=!1,e.valid=!1,e.status="untouch",e.input=a.find("input"),e.required=0,"required"in i&&(e.required=1,a.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 n in t)e[n]=t[n]},e.label=i.label,e.name=i.name,e.placeholder=i.placeholder,e.type=i.type||"text",e.tip=i.tip,e.parent=n.parent(a,"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:a,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,n){e.valid1=function(t,n){e.firstpwd=n},e.valid2=function(t,a,i){e.firstpwd!==a?i({valid:!1,status:"invalid",errmsg:"both password should match"}):e.callback(n.name,a)},e.done=function(t){for(var n in t)e[n]=t[n]},e.name=n.name,e.label1=n.label||"Password",e.label2=n.label||"Password Verification",e.place1=n.placeholder1||"User Password",e.tip1=n.tip||"Choose a Password",e.place2=n.placeholder1||"Password Verification",e.tip2=n.tip||"Confirme your Password",e.minlen=n.minlen||10,"required"in n&&(e.required="required")}return{restrict:"E",template:e,link:t,scope:{callback:"="}}})}(),function(){"use strict";angular.module("SampleModule",["SubmitButton","UploadFiles"]).controller("SampleController",["$http",function(e){var t=this;t.FileUploaded=function(e){}}])}(),function(){"use strict";angular.module("HomeModule",["SubmitButton","TokenRefresh"]).controller("HomeController",["$http","ConfigApp",function(e,t){var n=this;n.uuid="none",n.token="none",n.session="none",n.status="err-no",n.ProcessResponse=function(e,a,i,s){var o="API"+e.request.api.replace("-","_");n.status="err-ok",n.errcode=a,n.request=e.request,n.response=e.response,e.request.token&&(t.session.token=e.request.token),e.request.uuid&&(t.session.uuid=e.request.uuid),e.request.timeout&&(t.session.timeout=e.request.timeout),("APIcreate"===o||"APIreset"===o)&&(n.APIreset="",n.APIcreate="",n.APIrefresh="",n.APIcheck=""),n[o]="success",e.request.token&&(n.token=e.request.token)},n.ProcessError=function(e,t,a,i){var s="API"+e.request.api.replace("-","_");n.status="err-fx",n.errcode=t,n.request=e.request,n.response="",n[s]="fail"},n.OpenSession=function(){var a={},i=e.post(t.session.create+"?token="+t.session.initial,a);i.success(n.ProcessResponse),i.error(n.ProcessError)},n.CheckSession=function(){var a={},i=e.post(t.session.check+"?token="+t.session.token,a);i.success(n.ProcessResponse),i.error(n.ProcessError)},n.RefreshSession=function(){var a={},i=e.post(t.session.refresh+"?token="+t.session.token,a);i.success(n.ProcessResponse),i.error(n.ProcessError)},n.ResetSession=function(){var a={},i=e.post(t.session.reset+"?token="+t.session.token,a);i.success(n.ProcessResponse),i.error(n.ProcessError)}}])}(),function(){"use strict";angular.module("JQueryEmu",[]).factory("JQemu",function(){var e=function(e,t){for(var n=e,a=t.toUpperCase();n[0];){if(a===n[0].tagName)return n;n=n.parent()}},t=function(e,t,n){for(var a=n.toLowerCase(),i=t.toLowerCase()+"Name",s=e.children();s[0];){if(a===s[0][i])return s;s=s.next()}},n=function(e,t){for(var n=t.toLowerCase(),a=e.children();a[0];){if(a.hasClass(n))return a;a=a.next()}},a={FindInParent:e,FindByTag:t,FindByClass:n};return a})}();var foundationRoutes=[{name:"mysample",url:"/sample",controller:"SampleController as ctrl",animationIn:"slideInRight",path:"pages/Sample/Sample.html"},{name:"myhome",url:"/home",controller:"HomeController as ctrl",animationIn:"slideInRight",path:"pages/Home/Home.html"}];!function(){"use strict";angular.module("ConfigApp",[]).factory("ConfigApp",["$location","$window",function(e,t){var n={paths:{image:"images/",avatar:"images/avatars/",audio:"images/audio/",appli:"images/appli/"},myapi:{token:"/api/myplugin/xxxx"},session:{create:"/api/token/create",refresh:"/api/token/refresh",check:"/api/token/check",reset:"/api/token/reset",ping:"/api/token/check",initial:"123456789",timeout:3600,pingrate:60,uuid:"",token:""}};return n}])}(),function(){"use strict";function e(e,t,n){e.otherwise("/home"),t.html5Mode(!0).hashPrefix("!")}function t(){FastClick.attach(document.body)}angular.module("AFBclient",["ui.router","ngAnimate","foundation","foundation.dynamicRouting","foundation.dynamicRouting.animations","ui-notification","ConfigApp","JQueryEmu","HomeModule","SampleModule","UploadFiles","LinkButton","TokenRefresh","RangeSlider","ModalNotification"]).config(e).run(t),e.$inject=["$urlRouterProvider","$locationProvider"]}(),function(){angular.module("AFBclient").run(["$templateCache",function(e){e.put("pages/Sample/Sample.html",'<h1><img class="logo" src="images/logo/triskel_iot_bzhx250.png" alt="IoT.bzh Logo" style="height:150px"> Post File Upload</h1><div class="sample-box box-content"><upload-image name="avatar" category="avatar" thumbnail="tux-visitor.png" maxsize="100" posturl="/api/post/upload-image" callback="ctrl.FileUploaded" accept="image" title="Change your Avatar"></upload-image><upload-audio name="music" posturl="/api/post/upload-music" callback="ctrl.FileUploaded" title="Upload your Music"></upload-audio><upload-appli name="appli" posturl="/api/post/upload-appli" callback="ctrl.FileUploaded" title="Upload AGL App"></upload-appli></div><link-button href="home" icon="fi-home" label="home"></link-button>')}])}(),function(){angular.module("AFBclient").run(["$templateCache",function(e){e.put("pages/Home/Home.html",'<h3><img class="logo" src="images/logo/triskel_iot_bzhx250.png" alt="IoT.bzh Logo" style="height:150px"> App Framework Binder Simple Client</h3><token-refresh autolog="true"></token-refresh><div class="button-box box-content"><submit-button class="session-button {{ctrl.APIcreate}}" icon="fi-unlock" label="Open" clicked="ctrl.OpenSession"></submit-button><submit-button class="session-button {{ctrl.APIcheck}}" icon="fi-checkbox" label="Check" clicked="ctrl.CheckSession"></submit-button><submit-button class="session-button {{ctrl.APIrefresh}}" icon="fi-arrows-compress" label="Refresh" clicked="ctrl.RefreshSession"></submit-button><submit-button class="session-button {{ctrl.APIreset}}" icon="fi-lock" label="Close" clicked="ctrl.ResetSession"></submit-button></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><link-button href="sample" icon="fi-home" label="sample"></link-button>')}])}();
2 //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpZGdldHMvQnV0dG9ucy9TdWJtaXRCdXR0b25zL1N1Ym1pdEJ1dHRvbnMuanMiLCJ3aWRnZXRzL1JhbmdlU2xpZGVycy9SYW5nZVNsaWRlck1vZC5qcyIsIndpZGdldHMvTm90aWZpY2F0aW9ucy9Ub2tlblJlZnJlc2hTdmMuanMiLCJ3aWRnZXRzL05vdGlmaWNhdGlvbnMvTW9kYWxOb3RpZmljYXRpb24uanMiLCJ3aWRnZXRzL05hdmlnYXRpb24vTGlua0J1dHRvbi5qcyIsIndpZGdldHMvRm9ybUlucHV0L1VwbG9hZEZpbGVzLmpzIiwid2lkZ2V0cy9Gb3JtSW5wdXQvSW5wdXRUZXh0LmpzIiwid2lkZ2V0cy9Gb3JtSW5wdXQvSW5wdXRQYXNzd29yZC5qcyIsInBhZ2VzL1NhbXBsZS9TYW1wbGVNb2R1bGUuanMiLCJwYWdlcy9Ib21lL0hvbWVNb2R1bGUuanMiLCJzZXJ2aWNlcy9KUXVlcnlFbXUuanMiLCJldGMvcm91dGVzLmpzIiwiZ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1xuXG4gICAgYW5ndWxhci5tb2R1bGUoJ1N1Ym1pdEJ1dHRvbicsIFtdKVxuICAgICAgICAgICAgLmRpcmVjdGl2ZSgnc3VibWl0QnV0dG9uJywgZnVuY3Rpb24gKCkge1xuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gbXltZXRob2RzKHNjb3BlLCBlbGVtLCBhdHRycykge1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIGFqdXN0IGljb24gb3IgdXNlIGRlZmF1bHRcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaWNvbiA9IGF0dHJzLmljb24gfHwgJ2ZpLWZvb3QnO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IGF0dHJzLmxhYmVsIHx8ICdOZXh0JztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIGFkZCBsYWJlbCBhcyBjbGFzc1xuICAgICAgICAgICAgICAgICAgICBlbGVtLmFkZENsYXNzIChzY29wZS5sYWJlbC50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIG5vdGU6IGNsaWNrZWQgaW4gaW1wb3J0ZWQgYW5kIHdoZW4gdGVtcGxhdGUgaXMgY2xpY2tlZFxuICAgICAgICAgICAgICAgICAgICAvLyBpdCB3aWxsIGNhbGwgY2xpY2tlZCBtZXRob2QgcGFzc2VkIGluIHBhcmFtLlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICByZXN0cmljdDogJ0UnLFxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogdG1wbCxcbiAgICAgICAgICAgICAgICAgICAgbGluazogbXltZXRob2RzLFxuICAgICAgICAgICAgICAgICAgICBzY29wZToge2NsaWNrZWQgOiAnPSd9XG4gICAgICAgICAgICAgICAgfTt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gICAgICAgfTtcblxuICAgICAgICAvLyBoYW5kbGVyIHRvIGNoYW5nZSBjbGFzcyBmcm9tIHNsaWRlciBoYW5kbGVcbiAgICAgICAgc2NvcGUudXBkYXRlQ2xhc3MgPSBmdW5jdGlvbiAoY2xhc3NlLCBzdGF0dXMpIHtcblxuICAgICAgICAgICAgaWYgKHN0YXR1cykgZWxlbWVudC5hZGRDbGFzcyAoY2xhc3NlKTtcbiAgICAgICAgICAgIGVsc2UgIGVsZW1lbnQucmVtb3ZlQ2xhc3MgKGNsYXNzZSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgc2NvcGUuc2V0RGlzYWJsZSA9IGZ1bmN0aW9uIChkaXNhYmxlZCkge1xuXG4gICAgICAgICAgICBpZiAoZGlzYWJsZWQpIHtcbiAgICAgICAgICAgICAgICBlbGVtZW50LmFkZENsYXNzIChcImRpc2FibGVcIik7XG4gICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1swXS5jc3MgKCd2aXNpYmlsaXR5JywnaGlkZGVuJyk7XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLmR1YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1sxXS5jc3MgKCd2aXNpYmlsaXR5JywnaGlkZGVuJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBlbGVtZW50LnJlbW92ZUNsYXNzIChcImRpc2FibGVcIik7XG4gICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1swXS5jc3MgKCd2aXNpYmlsaXR5JywndmlzaWJsZScpO1xuICAgICAgICAgICAgICAgIGlmIChzY29wZS5kdWFsKSBzY29wZS5oYW5kbGVzWzFdLmNzcyAoJ3Zpc2liaWxpdHknLCd2aXNpYmxlJyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgfTtcblxuICAgICAgICBzY29wZS5ub3JtYWxpemUgPSBmdW5jdGlvbiAodmFsdWUpIH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saXplIChzY29wZS5yZWxhdGl2ZVtoYW5kbGVdKTtcblxuXG4gICAgICAgICAgICAvLyBpZiBpbnRlcm5hbCB2YWx1ZSBjaGFuZ2UgdXBkYXRlIG9yIG1vZGVsXG4gICAgICAgICAgICBpZiAobmV3dmFsdWUgIT09IHNjb3BlLnZhbHVlW2hhbmRsZV0pIHtcbiAgICAgICAgICAgICAgICBpZiAobmV3dmFsdWUgPCBzY29wZS5zdGFydFZhbHVlKSBuZXd2YWx1ZT1zY29wZS5zdGFydFZhbHVlO1xuICAgICAgICAgICAgICAgIGlmIChuZXd2YWx1ZSA+IHNjb3BlLnN0b3BWYWx1ZSkgIG5ld3ZhbHVlPXNjb3BlLnN0b3BWYWx1ZTtcblxuXG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLmZvcm1hdHRlcikge1xuICAgICAgICAgICAgICAgICAgICBzY29wZS52aWV3VmFsdWUgPSBzY29wZS5mb3JtYXR0ZXIgKG5ld3ZhbHVlLCBzY29wZS5jdHJsaGFuZGxlKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzY29wZS52aWV3VmFsdWUgPSBuZXd2YWx1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLmRpc3BsYXlzW2hhbmRsZV0pIHtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuZGlzcGxheXNbaGFuZGxlXS5odG1sIChzY29wZS52aWV3VmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIHVwZGF0ZSBleHRlcm5hbCByZXByZXNlbnRhdGlvbiBvZiB0aGUgbW9kZWxcbiAgICAgICAgICAgICAgICBzY29wZS52YWx1ZVtoYW5kbGVdID0gbmV3dmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKG1vZGVsKSBtb2RlbC4kc2V0Vmlld1ZhbHVlIChzY29wZS52aWV3VmFsdWUpO1xuICAgICAgIC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LG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzY29wZS5zdGFydFZhbHVlPSB2YWx1ZTtcbiAgICAgICAgfTtcblxuICAgICAgICBzY29wZS5zZXRTdG9wID0gZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB2YXIgb2Zmc2V0O1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAodmFsdWUgPCBzY29wZS52YWx1ZVswXSkge1xuICAgICAgICAgICAgICAgIGlmICghc2NvcGUuZHVhbCkgc2NvcGUuc2V0VmFsdWUgKHZhbHVlLDApO1xuICAgICAgICAgICAgICAgIGVsc2Ugc2NvcGUuc2V0VmFsdWUgKHZhbHVlLDEpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoc2NvcGUudmVydGljYWwpIHtcbiAgICAgICAgICAgICAgICBvZmZzZXQgPSBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLmhlaWdodCAqICh2YWx1ZSAtIHNjb3BlLm5vdExlc3MpIC8gKHNjb3BlLm5vdE1vcmUgLSBzY29wZS5ub3RMZXNzKTtcbiAgICAgICAgICAgICAgICBzY29wZS5zdGFydC5jc3MoJ2hlaWdodCcsb2Zmc2V0ICsgJ3B4Jyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG9mZnNldCA9IHNjb3BlLmJvdW5kcy5iYXIuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkud2lkdGggKiAodmFsdWUgLSBzY29wZS5ub3RMZXNzKSAvIChzY29wZS5ub3RNb3JlIC0gc2NvcGUubm90TGVzcyk7XG4gICAgICAgICAgICAgICAgc2NvcGUuc3RvcC5jc3MoeydyaWdodCc6IDAsICd3aWR0aCc6IChzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLndpZHRoICAtIG9mZnNldCkgKyAncHgnfSk7XG4gICA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MuaGFuZGxlc1toYW5kbGVdLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLndpZHRoKSA+IHNjb3BlLmJvdW5kcy5iYXIuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkucmlnaHQpIHtcbiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0ID0gc2NvcGUuYm91bmRzLmJhci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS53aWR0aCAtIHNjb3BlLmJvdW5kcy5oYW5kbGVzW2hhbmRsZV0uZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkud2lkdGg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzY29wZS5nZXRWYWx1ZSAgKG9mZnNldCwgaGFuZGxlKTtcblxuICAgICAgICAgICAgLy8gcHJldmVudCBkdWFsIGhhbmRsZSB0byBjcm9zc1xuICAgICAgICAgICAgaWYgKHNjb3BlLmR1YWwgJiYgc2NvcGUudmFsdWUgWzBdID4gc2NvcGUudmFsdWVbMV0pIHtcbiAgICAgICAgICAgICAgICBpZiAoaGFuZGxlID09PSAwKSBzY29wZS5zZXRWYWx1ZSAoc2NvcGUudmFsdWVbMF0gLCAxKTtcbiAgICAgICAgICAgICAgICBlbHNlIHNjb3BlLnNldFZhbHVlKHNjb3BlLnZhbHVlWzFdLDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG5cbiAgICAgICAgc2NvcGUuZm9jdXNDQiA9IGZ1bmN0aW9uIChpbnNpZGUpIHtcbiAgICAgICAgICAgIGlmIChpbnNpZGUpIHtcbiAgICAgICAgICAgICAgICAkZG9jdW1lbnQub24oJ2tleWRvd24nLHNjb3BlLmtleWRvd24pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAkZG9jdW1lbnQudW5iaW5kKCdrZXlkb3duJyxzY29wZS5rZXlkb3duKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICAvL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Btb3VzZSBldmVudCB0byB0cmFjayBoYW5kbGVcbiAgICAgICAgICAgIGNsaWNrZXZlbnQucHJldmVudERlZmF1bHQoKTtcblxuICAgICAgICAgICAgJGRvY3VtZW50Lm9uKCdtb3VzZW1vdmUnLG1vdXNlbW92ZSk7XG4gICAgICAgICAgICAkZG9jdW1lbnQub24oJ21vdXNldXAnLCBtb3VzZXVwKTtcbiAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbaGFuZGxlXVswXS5mb2N1cygpO1xuICAgICAgICAgICAgc2NvcGUuYWN0aWY9aGFuZGxlO1xuXG4gICAgICAgICAgICAvLyBzbGlkZXIgaGFuZGxlIGlzIG1vdmluZ1xuICAgICAgICAgICAgZnVuY3Rpb24gbW91c2Vtb3ZlKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgc2NvcGUubW92ZUhhbmRsZSAoaGFuZGxlLCBldmVudC5jbGllbnRYLCBldmVudC5jbGllbnRZKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gbW91c2UgaXMgdXAgZGFucyBsZWF2ZSBzbGlkZXIgc2VuZCByZXNpemUgZXZlbnRzXG4gICAgICAgICAgICBmdW5jdGlvbiBtb3VzZXVwKCkge1xuICAgICAgICAgICAgICAgICRkb2N1bWVudC51bmJpbmQoJ21vdXNlbW92ZScsIG1vdXNlbW92ZSk7XG4gICAgICAgICAgICAgICAgJGRvY3VtZW50LnVuYmluZCgnbW91c2V1cCcsIG1vdXNldXApO1xuXG4gICAgICAgICAgICAgICAgLy8gaWYgdmFsdWUgY2hhbmdlIG5vdGlmeSBhcHBsaWNhdGlvbiBjYWxsYmFja1xuICAgICAgICAgICAgICAgIGlmIChzY29wZS5jYWxsYmFjayAmJiBvbGR2YWx1ZSAhPT0gc2NvcGUudmFsdWVbaGFuZGxlXSkgc2NvcGUuY2FsbGJhY2sgKHNjb3BlLnZhbHVlW2hhbmRsZV0sIHNjb3BlLmN0cmxoYW5kbGUpO1xuICAgICAgICAgICAgfV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29wZS5maW5kKCcuaWJ6LXJhbmdlLXNsaWRlci1zdGFydCcpO1xuICAgICAgICAgICAgc2NvcGUuc3RvcCAgID0gc2NvcGUuZmluZCgnLmliei1yYW5nZS1zbGlkZXItc3RvcCcpO1xuICAgICAgICAgICAgc2NvcGUuZGlzYWJsZT0gYXR0cnMuZGlzYWJsZSB8fCBmYWxzZTtcblxuICAgICAgICAgICAgc2NvcGUuY3RybGhhbmRsZSA9IG5ldyBSYW5nZVNsaWRlckhhbmRsZSAoc2NvcGUpO1xuXG4gICAgICAgICAgICAvLyBwcmVwYXJlIERPTSBvYmplY3QgcG9pbnRlciB0byBjb21wdXRlIHNpemUgZHluYW1pY2FsbHlcbiAgICAgICAgICAgIHNjb3BlLmJvdW5kcyA9IHtcbiAgICAgICAgICAgICAgICBiYXIgICAgOiBlbGVtZW50WzBdLFxuICAgICAgICAgICAgICAgIGhhbmRsZXM6IFtzY29wZS5oYW5kbGVzWzBdWzBdLCBzY29wZS5oYW5kbGVzWzFdWzBdXVxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgaWYgKGF0dHJzLmRpc2FibGUgPT09ICd0cnVlJykgc2NvcGUuc2V0RGlzYWJsZSh0cnVlKTtcblxuICAgICAgICAgICAgaWYgKGF0dHJzLmRpc3BsYXlUYXJnZXQpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKGF0dHJzLmRpc3BsYXlUYXJnZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSB0cnVlIDpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnaGFuZGxlJyA6XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5kaXNwbGF5cyA9IHNjb3BlLmhhbmRsZXM7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5oYW5kbGVzWzBdLmFkZENsYXNzKCdpYnotcmFuZ2Utc2xpZGVyLWRpc3BsYXknKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY29wZS5kdWFsKSBzY29wZS5oYW5kbGVzWzFdLmFkZENsYXNzKCdpYnotcmFuZ2Utc2xpZGVyLWRpc3BsYXknKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuZGlzcGxheXMgPSAgWyRkb2N1bWVudC5nZXRFbGVtZW50QnlJZCAoYXR0cnMuZGlzcGxheVRhcmdldCldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBzY29wZS5kaXNwbGF5cz1bXTtcblxuICAgICAgICAgICAgLy8gZXh0cmFjdCBpbml0aWFsIHZhbHVlcyBmcm9tIGF0dHJzIGFuZCBwYXJzZSBpbnRvIGludFxuICAgICAgICAgICAgaWYgKCFhdHRycy5pbml0aWFsKSB7XG4gICAgICAgICAgICAgICAgc2NvcGUuaW5pdGlhbCAgPSBbc2NvcGUubmdNb2RlbCwgc2NvcGUubmdNb2RlbF07IC8vIGluaXRpYWxpemUgdG8gbW9kZWwgdmFsdWVzXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBpbml0aWFsICA9IGF0dHJzLmluaXRpYWwuc3BsaXQoJywnKTtcbiAgICAgICAgICAgICAgICBzY29wZS5pbml0aWFsID0gW1xuICAgICAgICAgICAgICAgICAgICBpbml0aWFsWzBdICE9PSB1bmRlZmluZWQgPyBwYXJzZUludCAoaW5pdGlhbFswXSkgOiBzY29wZS5ub3RMZXNzLFxuICAgICAgICAgICAgICAgICAgICBpbml0aWFsWzFdICE9PSB1bmRlZmluZWQgPyBwYXJzZUludCAoaW5pdGlhbFsxXSkgOiBzY29wZS5ub3RNb3JlXG4gICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gTW9uaXRvciBhbnkgY2hhbmdlcyBvbiBzdGFydC9zdG9wIGRhdGVzLlxuICAgICAgICAgICAgc2NvcGUuJHdhdGNoKCdzdGFydEF0JywgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlIDwgc2NvcGUuc3RhcnRBdCApIHtcbiAgICAgICAgICAgICAgICAgICAgLy9zY29wZS5zZXRWYWx1ZSAoc2NvcGUuc3RhcnRBdCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzY29wZS5zdGFydEF0KSBzY29wZS5zZXRTdGFydCAoc2NvcGUuc3RhcnRBdCk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgc2NvcGUuJHdhdGNoKCdzdG9wQXQnICwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlID4gc2NvcGUuc3RvcEF0KSB7XG4gICAgICAgICAgICAgICAgICAgIC8vc2NvcGUuc2V0VmFsdWUgKHNjb3BlLnN0b3BBdCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzY29wZS5zdG9wQXQpIHNjb3BlLnNldFN0b3AgKHNjb3BlLnN0b3BBdCk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgLy8gZmluaXNoIHdpZGdldCBpbml0aWFsaXNhdGlvblxuICAgICAgICAgICAgc2NvcGUuaW5pdGlhbFNldHRpbmdzIChzY29wZS5pbml0aWFsKTtcblxuICAgICAgICB9O1xuXG4gICAgICAgIHNjb3BlLmluaXQoKTtcbiAgICAgICAgXG4gICAgICAgICAvLyBzbGlkZXIgaXMgcmVhZHkgcHJvdmlkZSBjb250cm9sIGhhbmRsZSB0byBhcHBsaWNhdGlvbiBjb250cm9sbGVyXG4gICAgICAgIHNjb3BlLiR3YXRjaCAoJ2luaXRob29rJywgZnVuY3Rpb24gKCkgeyAgICAgICAgIC8vIGluaXQgVmFsdWVzIG1heSBhcnJpdmUgbGF0ZVxuICAgICAgICAgICAgaWYgKHNjb3BlLmluaXRob29rKSBzY29w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cgKHttZXNzYWdlOiBcIkFwcEZyYW1ld29yayBCaW5kZXIgTG9zdFwiLCBkZWxheTogNTAwMH0pO1xuICAgICAgICAgICAgICAgIHNjb3BlLm9mZmxpbmUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNjb3BlLnN0YXR1cyA9IDA7XG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICBzY29wZS5vbnN1Y2Nlc3MgPSBmdW5jdGlvbihkYXRhLCBlcnJjb2RlLCBoZWFkZXJzLCBjb25maWcpIHtcbiAgICAgICAgICAgIGlmIChzY29wZS5zdGF0dXMgIT09IHRydWUpICB7XG4gICAgICAgICAgICAgICAgaWYgKGRhdGEucmVxdWVzdC50b2tlbikgQ29uZmlnQXBwLnNlc3Npb24udG9rZW4gPSBkYXRhLnJlcXVlc3QudG9rZW47XG4gICAgICAgICAgICAgICAgaWYgKGRhdGEucmVxdWVzdC51dWlkKSAgQ29uZmlnQXBwLnNlc3Npb24udXVpZCAgPSBkYXRhLnJlcXVlc3QudXVpZDtcbiAgICAgICAgICAgICAgICBpZiAoZGF0YS5yZXF1ZXN0LnRpbWVvdXQpICBDb25maWdBcHAuc2Vzc2lvbi50aW1lb3V0ICA9IGRhdGEucmVxdWVzdC50aW1lb3V0O1xuXG4gICAgICAgICAgICAgICAgTm90aWZpY2F0aW9uLnN1Y2Nlc3MgKHttZXNzYWdlOiBcIkFwcEZyYW1ld29yayBCaW5kZXIgQmFjayB0byBMaXZlXCIsIGRlbGF5OiAzMDAwfSk7XG4gICAgICAgICAgICAgICAgc2NvcGUub25saW5lKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzY29wZS5zdGF0dXMgPSAxO1xuICAgICAgICB9O1xuXG4gICAgICAgIC8vIENoZWNrIEJpbmRlciBzdGF0dXNcbiAgICAgICAgc2NvcGUuZ2V0cGluZyA9IGZ1bmN0aW9uKCkge1xuXG4gICAgICAgICAgICB2YXIgaGFuZGxlciA9ICRodHRwLmdldChDb25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nLCBbXSlcbiAgICAgICAgICAgIC5kaXJlY3RpdmUoJ3RpcE1vZGFsJywgW1wiJHRpbWVvdXRcIiwgZnVuY3Rpb24gKCR0aW1lb3V0KSB7XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBteW1ldGhvZHMoc2NvcGUsIGVsZW0sIGF0dHJzKSB7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudCA9IGVsZW0ucGFyZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZGFsICAgID0gZWxlbS5maW5kKFwiZGl2XCIpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gZGVsYXkgdGlwIGRpc3BsYXkgdG8gYXZvaWQgYmxpbmtpbmcgd2hlbiBtb3ZpbmcgbW91c2UgZmFzdFxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBkaXNwbGF5ICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFjdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLnNob3cpIHNjb3BlLm1vZGFsLmNzcyh7b3BhY2l0eTogMSwgdmlzaWJpbGl0eTondmlzaWJsZSd9KTsgIFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuc2hvdyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS50aW1lb3V0ID0gJHRpbWVvdXQoYWN0aW9uLCBzY29wZS5kZWxheSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNsb3NlICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICBzY29wZS5zaG93ID0gZmFsc2U7ICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kYWwuY3NzKHtvcGFjaXR5OiAwLCB2aXNpYmlsaXR5OidoaWRkZW4nfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG5cbiAgICAgICAgICAgICAgICAgICAgLy8gYWp1c3QgaWNvbiBvciB1c2UgZGVmYXVsdFxuICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uICA9IGF0dHJzLmljb24gfHwgJ2ZpLWxpZ2h0YnVsYic7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgUGFyZW50IGVsZW1lbnQgdG8gZ2V0IG1vdXNlIGV2ZW50XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5hZGRDbGFzcyAoJ2FzLW1vZGFsLXRpcCcpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnY2xpY2snLCBjbG9zZSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdmb2N1cycsIGRpc3BsYXkpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnbW91c2VvdmVyJywgZGlzcGxheSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdtb3VzZWxlYXZlJywgY2xvc2UpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnYmx1cicsIGNsb3NlKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmRlbGF5ID0gYXR0cnMuZGVsYXkgfHwgMTAwMDsgLy8gd2FpdCAxcyBiZWZvcmUgZGlzcGxheWluZyB0aXBcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICByZXN0cmljdDogJ0UnLFxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0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TtcblxuICAgICAgICAgICAgICAgICAgICAvLyBhanVzdCBpY29uIG9yIHVzZSBkZWZhdWx0XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmljb24gPSBhdHRycy5pY29uICAgfHwgJ2ZpLWxpbmsnO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IGF0dHJzLmxhYmVsIHx8ICdKdW1wJztcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaHJlZiAgPSBhdHRycy5ocmVmICB8fCAnL2hvbWUnO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gYWRkIGxhYmVsIGFzIGNsYXNzXG4gICAgICAgICAgICAgICAgICAgIGVsZW0uYWRkQ2xhc3MgKHNjb3BlLmxhYmVsLnRvTG93ZXJDYXNlKCkpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RyaWN0OiAnRScsXG4gICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiB0bXBsLFxuICAgICAgICAgICAgICAgICAgICBsaW5rOiBteW1ldGhvZHMsXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlOiB7fVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XSk7XG59KSgpO1xuIiwiXG4vKiBcbiAqIENvcHlyaWdodCAoQykgMjAxNSBcIklvVC5iemhcIlxuICogQXV0aG9yIFwiRnVsdXAgQXIgRm9sbFwiXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnlcbiAqIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5XG4gKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXR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xzZTsgXG4gICAgICAgIHNjb3BlLmVycm1zZz1mYWxzZTsgXG4gICAgICAgIHNjb3BlLnN0YXR1cyA9ICd0b3VjaCc7XG4gICAgIH07ICAgXG4gICAgICAgICAgICBcbiAgICAgc2NvcGUudmFsaWRhdGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICBcbiAgICAgICAgIC8vIGdldCB2YWx1ZSBmcm9tIGlucHV0IGZpZWxkIGJ5cGFzc2luZyBBbmd1bGFyIG5nLW1vZGVsXG4gICAgICAgICBjb25zb2xlLmxvZyAoXCJDbGlja2VkIElucHV0VGV4dCBuYW1lPSVzIHZhbHVlPSVzIHZhbGlkPSVzXCIsIHNjb3BlLm5hbWUsIHNjb3BlLnZhbHVlLCBzY29wZS52YWxpZCk7ICAgICAgICBcblxuICAgICAgICAgLy8gZm9ybSBpcyBub3QgdW50b3VjaGVkIGFueW1vcmVcbiAgICAgICAgIHNjb3BlLnBhcmVudC5yZW1vdmVDbGFzcyAoXCJuZy1wcmlzdGluZVwiKTtcblxuICAgICAgICAgLy8gaWYgdmFsdWUgbm90IG51bGwgY2xlYW4gdXAgc3RyaW5nXG4gICAgICAgICBpZiAoc2NvcGUudmFsdWUpIHtcbiAgICAgICAgICAgICBzY29wZS5lcnJvcj1mYWxzZTsgXG4gICAgICAgICAgICAvLyByZW1vdmUgbGVhZGluZyBhbmQgdHJhaWxsaW5nIHNwYWNlXG4gICAgICAgICAgICBzY29wZS52YWx1ZSA9IHNjb3BlLnZhbHVlLnRyaW0oKTtcbiAgICAgICAgIFxuICAgICAgICAgICAgLy8gcmVtb3ZlIGFueSBzcGFjZSBpcyBub3QgYWxsb3dlZFxuICAgICAgICAgICAgaWYgKCdub3NwYWNlJyBpbiBhdHRycykge1xuICAgICAgICAgICAgICAgc2NvcGUudmFsdWU9c2NvcGUudmFsdWUucmVwbGFjZSgvXFxzL2csICcnKTsgICAgXG4gICAgICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgICAgIGlmICgnbG93ZXJjYXNlJyBpbiBhdHRycykge1xuICAgICAgICAgICAgICAgc2NvcGUudmFsdWUgPSBzY29wZS52YWx1ZS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgXG4gICAgICAgICAgICAvLyBjaGVjayBtaW5pbXVtIGxlbmdodFxuICAgICAgICAgICAgaWYgKFwibWlubGVuXCIgaW4gYXR0cnMpIHtcbiAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlLmxlbmd0aCA8IGF0dHJzLm1pbmxlbikge1xuICAgICAgICAgICAgICAgICBzY29wZS5zdGF0dXM9J2ludmFsaWQnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9c2NvcGUubmFtZSArICc6IE1pbmludW0gTGVuZ2g9ICcgKyBhdHRycy5taW5sZW4gKyAnIENoYXJhY3RlcnMnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJvcj10cnVlO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmICgnZW1haWwnIGluIGF0dHJzKSB7XG4gICAgICAgICAgICBpZiAoIWVtYWlscGF0ZXJuLnRlc3QgKHNjb3BlLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgIHNjb3BlLnN0YXR1cz0naW52YWxpZCc7XG4gICAgICAgICAgICAgICAgc2NvcGUuZXJybXNnPSdpbnZhbGlkIGVtYWlsIGFkZHJlc3MnO1xuICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChzY29wZS5yZXF1aXJlZCkge1xuICAgICAgICAgICAgICAgICBzY29wZS5zdGF0dXM9J2ludmFsaWQnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9c2NvcGUubmFtZSArICc6IFJlcXVpcmVkIEF0dHJpYnV0ZSc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7IFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgIC8vIElmIGxvY2FsIGNvbnRyb2wgZmFpbCBsZXQncyByZWZ1c2UgaW5wdXRcbiAgICAgICAgIGlmIChzY29wZS5lcnJvcikge1xuICAgICAgICAgICAgIGlmIChzY29wZS5yZXF1aXJlZCAmJiBzY29wZS52YWxpZCkge1xuICAgICAgICAgICAgICAgICBzY29wZS52YWxpZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICBpZiAoc2NvcGUubDRhY291bnRlci52YWxpZGF0ZWQgPiAwKSBzY29wZS5sNGFjb3VudGVyLnZhbGlkYXRlZCAtLTtcbiAgICAgICAgICAgICB9IFxuICAgICAgICAgICAgIC8vIHVzZSBjYWxsIHRvIHVwZGF0ZSBmb3JtIHNjb3BlIG9uIGZvcm0gY29tcGxldGVuZXNzXG4gICAgICAgICAgICAgc2NvcGUuY2FsbGJhY2sgKGF0dHJzLm5hbWUsIG51bGwsIHNjb3BlLmRvbmUpO1xuICAgICAgICAgfSBlbHNlIHsgXG4gICAgICAgICAgICAgLy8gbG9jYWxjaGVjayBpcyBPSyBiYWNrdXAgbWF5IG5ldmVydGhlbGVzcyBjaGFuZ2Ugc3RhdHVzIHRvIGZhbHNlXG4gICAgICAgICAgICBpZiAoc2NvcGUucmVxdWlyZWQgICYmICFzY29wZS52YWxpZCkgc2NvcGUubDRhY291bnRlci52YWxpZGF0ZWQgKys7XG4gICAgICAgICAgICBzY29wZS5zdGF0dXM9J3ZhbGlkJztcbiAgICAgICAgICAgIHNjb3BlLnZhbGlkPXRydWU7XG4gICAgICAgICAgICBzY29wZS5jYWxsYmFjayAoYXR0cnMubmFtZSwgc2NvcGUudmFsdWUsIHNjb3BlLmRvbmUpO1xuICAgICAgICAgfVxuICAgICAgICAgIFxuICAgICB9O1xuICAgICBcbiAgICAgLy8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iQVBJY3JlYXRlXCIgfHwgYXBpbmFtZSA9PT0gXCJBUElyZXNldFwiKSB7XG4gICAgICAgICAgICAgICAgc2NvcGUuQVBJcmVzZXQgID0nJztcbiAgICAgICAgICAgICAgICBzY29wZS5BUEljcmVhdGUgPScnO1xuICAgICAgICAgICAgICAgIHNjb3BlLkFQSXJlZnJlc2g9Jyc7XG4gICAgICAgICAgICAgICAgc2NvcGUuQVBJY2hlY2sgID0nJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNjb3BlW2FwaW5hbWVdPVwic3VjY2Vzc1wiO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICAvLyBJZiB3ZSBoYXZlIGEgbmV3IHRva2VuIGxldCdzIHVwZGF0ZSBpdFxuICAgICAgICAgICAgaWYgKGRhdGEucmVxdWVzdC50b2tlbikgc2NvcGUudG9rZW49ZGF0YS5yZXF1ZXN0LnRva2VuO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBjb25zb2xlLmxvZyAoXCJPSzogXCIrIEpTT04uc3RyaW5naWZ5KGRhdGEpKTtcbiAgICAgICAgfTtcbiAgICAgICAgXG4gICAgICAgIHNjb3BlLlByb2Nlc3NFcnJvcj0gZnVuY3Rpb24oZGF0YSwgZXJyY29kZSwgaGVhZGVycywgY29uZmlnKSB7XG4gICAgICAgICAgICB2YXIgYXBpbmFtZT0gJ0FQSScrZGF0YS5yZXF1ZXN0LmFwaS5yZXBsYWNlKCctJywnXycpO1xuICAgICAgICAgICAgc2NvcGUuc3RhdHVzICAgPSBcImVyci1meFwiO1xuICAgICAgICAgICAgc2NvcGUuZXJyY29kZSAgPSBlcnJjb2RlO1xuICAgICAgICAgICAgc2NvcGUucmVxdWVzdCAgPSBkYXRhLnJlcXVlc3Q7XG4gICAgICAgICAgICBzY29wZS5yZXNwb25zZSA9IFwiXCI7XG4gICAgICAgICAgICBzY29wZVthcGluYW1lXT1cImZhaWxcIjtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgY29uc29s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HRhcmdldD0gYW5ndWxhci5lbGVtZW50KGV2ZW50LmN1cnJlbnRUYXJnZXQpO1xuICAgICB2YXIgYnV0dG9uPSBKUWVtdS5GaW5kSW5QYXJlbnQgKHRhcmdldCwgJ2RpdicpO1xuICogXG4gKi9cblxuXG4oZnVuY3Rpb24gKCkge1xuICAgICd1c2Ugc3RyaWN0JztcblxuXG4gICAgICAgICAgXG4gICAgLy8gX2FsbCBtb2R1bGVzIG9ubHkgcmVmZXJlbmNlIGRlcGVuZGVuY2llc1xuICAgIGFuZ3VsYXIubW9kdWxlKCdKUXVlcnlFbXUnLCBbXSlcblxuICAgICAgICAgICAgLy8gRmFjdG9yeSBpcyBhIHNpbmdsZXRvbiBhbmQgc2hhcmUgaXRzIGNvbnRleHQgd2l0aGluIGFsbCBpbnN0YW5jZXMuXG4gICAgICAgICAgICAuZmFjdG9yeSgnSlFlbXUnLCBmdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgICAgICB2YXIgRmluZEluUGFyZW50ID0gZnVuY3Rpb24gKGVsZW1lbnQsIHNlbGVjdG9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnQgPSBlbGVtZW50O1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9VcHBlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHBhcmVudFswXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlYXJjaCA9PT0gcGFyZW50WzBdLnRhZ05hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGFyZW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50ID0gcGFyZW50LnBhcmVudCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICB2YXIgIEZpbmRCeVRhZz0gZnVuY3Rpb24gKGVsZW1lbnQsIHRhZywgc2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNlYXJjaCA9IHNlbGVjdG9yLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0eXBlICAgPSB0YWcudG9Mb3dlckNhc2UoKSsgXCJOYW1lXCI7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjaGlsZHJlbiA9IGVsZW1lbnQuY2hpbGRyZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGNoaWxkcmVuWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VhcmNoID09PSBjaGlsZHJlblswXVt0eXBlXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGlsZHJlbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gIC8vIEhUTUxEaXZFbGVtZW50IHByb3BlcnRpZXNcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkcmVuID0gY2hpbGRyZW4ubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICB2YXIgIEZpbmRCeUNsYXNzPSBmdW5jdGlvbiAoZWxlbWVudCwgc2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNlYXJjaCA9IHNlbGVjdG9yLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjaGlsZHJlbiA9IGVsZW1lbnQuY2hpbGRyZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGNoaWxkcmVuWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2hpbGRyZW4uaGFzQ2xhc3Moc2VhcmNoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGlsZHJlbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gIC8vIEhUTUxEaXZFbGVtZW50IHByb3BlcnRpZXNcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkcmVuID0gY2hpbGRyZW4ubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIHZhciBteU1ldGhvZHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIEZpbmRJblBhcmVudDogRmluZEluUGFyZW50LFxuICAgICAgICAgICAgICAgICAgICBGaW5kQnlUYWc6IEZpbmRCeVRhZyxcbiAgICAgICAgICAgICAgICAgICAgRmluZEJ5Q2xhc3M6IEZpbmRCeUNsYXNzXG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIHJldHVybiBteU1ldGhvZHM7XG4gICAgICAgICAgICB9KTtcblxufSkoKTsiLCJ2YXIgZm91bmRhdGlvblJvdXRlcyA9IFt7XCJuYW1lXCI6XCJteXNhbXBsZVwiLFwidXJsXCI6XCIvc2FtcGxlXCIsXCJjb250cm9sbGVyXCI6XCJTYW1wbGVDb250cm9sbGVyIGFzIGN0cmxcIixcImFuaW1hdGlvbkluXCI6XCJzbGlkZUluUmlnaHRcIixcInBhdGhcIjpcInBhZ2VzL1NhbXBsZS9TYW1wbGUuaHRtbFwifSx7XCJuYW1lXCI6XCJteWhvbWVcIixcInVybFwiOlwiL2hvbWVcIixcImNvbnRyb2xsZXJcIjpcIkhvbWVDb250cm9sbGVyIGFzIGN0cmxcIixcImFuaW1hdGlvbkluXCI6XCJzbGlkZUluUmlnaHRcIixcInBhdGhcIjpcInBhZ2VzL0hvbWUvSG9tZS5odG1sXCJ9XTsgXG4iLCIoZnVuY3Rpb24gKCkge1xuICAgICd1c2Ugc3RyaWN0JztcblxuICAgIC8vIF9hbGwgbW9kdWxlcyBvbmx5IHJlZmVyZW5jZSBkZXBlbmRlbmNpZXNcbiAgICBhbmd1bGFyLm1vZHVsZSgnQ29uZmlnQXBwJywgW10pXG5cbiAgICAgICAgICAgIC8vIEZhY3RvcnkgaXMgYSBzaW5nbGV0b24gYW5kIHNoYXJlIGl0cyBjb250ZXh0IHdpdGhpbiBhbGwgaW5zdGFuY2VzLlxuICAgICAgICAgICAgLmZhY3RvcnkoJ0NvbmZpZ0FwcCcsIFtcIiRsb2NhdGlvblwiLCBcIiR3aW5kb3dcIiwgZnVuY3Rpb24gKCRsb2NhdGlvbiwgJHdpbmRvdykge1xuXG4gICAgICAgICAgICAgICAgLy8gY29uc29sZS5sb2cgKFwiVVJMPVwiKyAkbG9jYXRpb24udXJsKCkgKyBcIiBRdWVyeT1cIiArIGxvY2F0aW9uLmhyZWYrIFwiIHdpbmRvdz1cIiArIGRvY3VtZW50LnJlZmVycmVyKTtcblxuICAgICAgICAgICAgICAgIHZhciBteUNvbmZpZyA9IHtcbiAgICAgICAgICAgICAgICAgICAgcGF0aHM6IHsgLy8gV2FybmluZyBwYXRocyBzaG91bGQgZW5kIHdpdGggL1xuICAgICAgICAgICAgICAgICAgICAgICAgaW1hZ2UgOiAnaW1hZ2VzLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdmF0YXI6ICdpbWFnZXMvYXZhdGFycy8nLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXVkaW8gOiAnaW1hZ2VzL2F1ZGlvLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBsaSA6ICdpbWFnZXMvYXBwbGkvJ1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgbXlhcGk6IHsgLy8gV2FybmluZyBwYXRocyBzaG91bGQgZW5kIHdpdGggL1xuICAgICAgICAgICAgICAgICAgICAgICB0b2tlbiA6ICcvYXBpL215cGx1Z2luL3h4eHgnXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICBzZXNzaW9uOiB7IC8vIFRob3NlIGRhdGEgYXJlIHVwZGF0ZWQgYnkgc2Vzc2lvbiBzZXJ2aWNlXG4gICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZSAgOiAnL2FwaS90b2tlbi9jcmVhdGUnLFxuICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoIDogJy9hcGkvdG9rZW4vcmVmcmVzaCcsXG4gICAgICAgICAgICAgICAgICAgICAgIGNoZWNrICAgOiAnL2FwaS90b2tlbi9jaGVjaycsXG4gICAgICAgICAgICAgICAgICAgICAgIHJlc2V0ICAgOiAnL2FwaS90b2tlbi9yZXNldCcsXG4gICAgICAgICAgICAgICAgICAgICAgIHBpbmcgICAgOiAnL2FwaS90b2tlbi9jaGVjaycsXG4gICAgICAgICAgICAgICAgICAgICAgIGluaXRpYWwgOiAnMTIzNDU2Nzg5JywgIC8vIHR5cGljYWwgZGV2IGluaXRpYWwgdG9rZW5cbiAgICAgICAgICAgICAgICAgICAgICAgdGltZW91dCA6IDM2MDAsICAgICAgICAgLy8gdGltZW91dCBpcyB1cGRhdGVkIGNsaWVudCBzZXNzaW4gY29udGV4dCBjcmVhdGlvblxuICAgICAgICAgICAgICAgICAgICAgICBwaW5ncmF0ZTogNjAsICAgICAgICAgICAvLyBQaW5nIHJhdGUgdG8gY2hlY2sgaWYgc2VydmVyIGlzIHN0aWxsIGFsaXZlXG4gICAgICAgICAgICAgICAgICAgICAgIHV1aWQgICAgOiAnJywgICAgICAgICAgIC8vIHV1aWQgbWFwIHdpdGggY29va2llIG9yIGxvbmcgdGVybSBzZXNzaW9uIGFjY2VzcyBrZXlcbiAgICAgICAgICAgICAgICAgICAgICAgdG9rZW4gICA6ICcnICAgICAgICAgICAgLy8gd2lsbCBiZSByZXR1cm5lZCBmcm9tIGF1dGhlbnRpY2F0aW9uICAgIFxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcblxuIC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