summaryrefslogtreecommitdiffstats
path: root/afm-client
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-05-29 22:00:23 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-05-29 22:00:23 +0200
commit618f4ddab0d701fdedc88936b98d5081b3885392 (patch)
tree8c9f8f993ced44bdc1c59c50cdfe0b3f1ea50701 /afm-client
parent9c964cba1070aca27408b8bacab0d3584365f600 (diff)
sync the dist.prod
Change-Id: Id5cb133267acd1f103e7b95c56a535df5167d2e9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'afm-client')
-rw-r--r--afm-client/dist.prod/bower_components/vendor.min.js2
-rw-r--r--afm-client/dist.prod/opa/AFBclient.min.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/afm-client/dist.prod/bower_components/vendor.min.js b/afm-client/dist.prod/bower_components/vendor.min.js
index b849ecc..786f3eb 100644
--- a/afm-client/dist.prod/bower_components/vendor.min.js
+++ b/afm-client/dist.prod/bower_components/vendor.min.js
@@ -2,7 +2,7 @@
$$start:l,$$end:f})),e.push(p),h=p)}catch($){i($)}return h}function W(e){if(a.hasOwnProperty(e))for(var n,r=t.get(e+s),i=0,o=r.length;o>i;i++)if(n=r[i],n.multiElement)return!0;return!1}function X(t,e){var n=e.$attr,r=t.$attr,i=t.$$element;o(t,function(r,i){"$"!=i.charAt(0)&&(e[i]&&e[i]!==r&&(r+=("style"===i?";":" ")+e[i]),t.$set(i,r,!0,n[i]))}),o(e,function(e,o){"class"==o?(O(i,e),t["class"]=(t["class"]?t["class"]+" ":"")+e):"style"==o?(i.attr("style",i.attr("style")+";"+e),t.style=(t.style?t.style+";":"")+e):"$"==o.charAt(0)||t.hasOwnProperty(o)||(t[o]=e,r[o]=n[o])})}function Y(t,e,n,r,i,a,s,c){var l,f,h=[],p=e[0],m=t.shift(),v=d(m,{templateUrl:null,transclude:null,replace:null,$$originalDirective:m}),g=x(m.templateUrl)?m.templateUrl(e,n):m.templateUrl,$=m.templateNamespace;return e.empty(),u(g).then(function(u){var d,b,w,_;if(u=lt(u),m.replace){if(w=vt(u)?[]:te(J($,pr(u))),d=w[0],1!=w.length||d.nodeType!==br)throw Kr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",m.name,g);b={$attr:{}},et(r,e,d);var x=P(d,[],b);y(m.scope)&&V(x),t=x.concat(t),X(n,b)}else d=p,e.html(u);for(t.unshift(v),l=U(t,d,n,i,e,m,a,s,c),o(r,function(t,n){t==d&&(r[n]=e[0])}),f=M(e[0].childNodes,i);h.length;){var C=h.shift(),E=h.shift(),k=h.shift(),A=h.shift(),S=e[0];if(!C.$$destroyed){if(E!==p){var T=E.className;c.hasElementTranscludeDirective&&m.replace||(S=wt(d)),et(k,nr(E),S),O(nr(S),T)}_=l.transcludeOnThisElement?N(C,l.transclude,A):A,l(f,C,S,r,_)}}h=null}),function(t,e,n,r,i){var o=i;e.$$destroyed||(h?h.push(e,n,r,o):(l.transcludeOnThisElement&&(o=N(e,l.transclude,i)),l(f,e,n,r,o)))}}function Z(t,e){var n=e.priority-t.priority;return 0!==n?n:t.name!==e.name?t.name<e.name?-1:1:t.index-e.index}function G(t,e,n,r){if(e)throw Kr("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}",e.name,n.name,t,H(r))}function K(t,e){var n=r(e,!0);n&&t.push({priority:0,compile:function(t){var e=t.parent(),r=!!e.length;return r&&I.$$addBindingClass(e),function(t,e){var i=e.parent();r||I.$$addBindingClass(i),I.$$addBindingInfo(i,n.expressions),t.$watch(n,function(t){e[0].nodeValue=t})}}})}function J(t,n){switch(t=Gn(t||"html")){case"svg":case"math":var r=e.createElement("div");return r.innerHTML="<"+t+">"+n+"</"+t+">",r.childNodes[0].childNodes;default:return n}}function Q(t,e){if("srcdoc"==e)return A.HTML;var n=D(t);return"xlinkHref"==e||"form"==n&&"action"==e||"img"!=n&&("src"==e||"ngSrc"==e)?A.RESOURCE_URL:void 0}function tt(t,e,n,i,o){var a=Q(t,i);o=h[i]||o;var s=r(n,!0,a,o);if(s){if("multiple"===i&&"select"===D(t))throw Kr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",H(t));e.push({priority:100,compile:function(){return{pre:function(t,e,u){var c=u.$$observers||(u.$$observers={});if(w.test(i))throw Kr("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var l=u[i];l!==n&&(s=l&&r(l,!0,a,o),n=l),s&&(u[i]=s(t),(c[i]||(c[i]=[])).$$inter=!0,(u.$$observers&&u.$$observers[i].$$scope||t).$watch(s,function(t,e){"class"===i&&t!=e?u.$updateClass(t,e):u.$set(i,t)}))}}}})}}function et(t,n,r){var i,o,a=n[0],s=n.length,u=a.parentNode;if(t)for(i=0,o=t.length;o>i;i++)if(t[i]==a){t[i++]=r;for(var c=i,l=c+s-1,f=t.length;f>c;c++,l++)f>l?t[c]=t[l]:delete t[c];t.length-=s-1,t.context===a&&(t.context=r);break}u&&u.replaceChild(r,a);var h=e.createDocumentFragment();h.appendChild(a),nr(r).data(nr(a).data()),rr?(hr=!0,rr.cleanData([a])):delete nr.cache[a[nr.expando]];for(var d=1,p=n.length;p>d;d++){var m=n[d];nr(m).remove(),h.appendChild(m),delete n[d]}n[0]=r,n.length=1}function rt(t,e){return f(function(){return t.apply(null,arguments)},t,e)}function ot(t,e,n,r,o,a){try{t(e,n,r,o,a)}catch(s){i(s,H(n))}}var at=function(t,e){if(e){var n,r,i,o=Object.keys(e);for(n=0,r=o.length;r>n;n++)i=o[n],this[i]=e[i]}else this.$attr={};this.$$element=t};at.prototype={$normalize:Jt,$addClass:function(t){t&&t.length>0&&S.addClass(this.$$element,t)},$removeClass:function(t){t&&t.length>0&&S.removeClass(this.$$element,t)},$updateClass:function(t,e){var n=Qt(t,e);n&&n.length&&S.addClass(this.$$element,n);var r=Qt(e,t);r&&r.length&&S.removeClass(this.$$element,r)},$set:function(t,e,r,a){var s,u=this.$$element[0],c=Nt(u,t),l=Pt(u,t),f=t;if(c?(this.$$element.prop(t,e),a=c):l&&(this[l]=e,f=l),this[t]=e,a?this.$attr[t]=a:(a=this.$attr[t],a||(this.$attr[t]=a=nt(t,"-"))),s=D(this.$$element),"a"===s&&"href"===t||"img"===s&&"src"===t)this[t]=e=T(e,"src"===t);else if("img"===s&&"srcset"===t){for(var h="",d=pr(e),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,m=/\s/.test(d)?p:/(,)/,v=d.split(m),g=Math.floor(v.length/2),$=0;g>$;$++){var y=2*$;h+=T(pr(v[y]),!0),h+=" "+pr(v[y+1])}var b=pr(v[2*$]).split(/\s/);h+=T(pr(b[0]),!0),2===b.length&&(h+=" "+pr(b[1])),this[t]=e=h}r!==!1&&(null===e||e===n?this.$$element.removeAttr(a):this.$$element.attr(a,e));var w=this.$$observers;w&&o(w[f],function(t){try{t(e)}catch(n){i(n)}})},$observe:function(t,e){var n=this,r=n.$$observers||(n.$$observers=ct()),i=r[t]||(r[t]=[]);return i.push(e),C.$evalAsync(function(){!i.$$inter&&n.hasOwnProperty(t)&&e(n[t])}),function(){j(i,e)}}};var st=r.startSymbol(),ut=r.endSymbol(),lt="{{"==st||"}}"==ut?m:function(t){return t.replace(/\{\{/g,st).replace(/}}/g,ut)},ft=/^ngAttr[A-Z]/;return I.$$addBindingInfo=_?function(t,e){var n=t.data("$binding")||[];dr(e)?n=n.concat(e):n.push(e),t.data("$binding",n)}:p,I.$$addBindingClass=_?function(t){O(t,"ng-binding")}:p,I.$$addScopeInfo=_?function(t,e,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";t.data(i,e)}:p,I.$$addScopeClass=_?function(t,e){O(t,e?"ng-isolate-scope":"ng-scope")}:p,I}]}function Jt(t){return mt(t.replace(Jr,""))}function Qt(t,e){var n="",r=t.split(/\s+/),i=e.split(/\s+/);t:for(var o=0;o<r.length;o++){for(var a=r[o],s=0;s<i.length;s++)if(a==i[s])continue t;n+=(n.length>0?" ":"")+a}return n}function te(t){t=nr(t);var e=t.length;if(1>=e)return t;for(;e--;){var n=t[e];n.nodeType===xr&&ar.call(t,e,1)}return t}function ee(){var t={},e=!1,i=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(e,n){at(e,"controller"),y(e)?f(t,e):t[e]=n},this.allowGlobals=function(){e=!0},this.$get=["$injector","$window",function(o,a){function s(t,e,n,i){if(!t||!y(t.$scope))throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,e);t.$scope[e]=n}return function(r,u,c,l){var h,d,p,m;if(c=c===!0,l&&b(l)&&(m=l),b(r)){if(d=r.match(i),!d)throw Qr("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",r);p=d[1],m=m||d[3],r=t.hasOwnProperty(p)?t[p]:st(u.$scope,p,!0)||(e?st(a,p,!0):n),ot(r,p,!0)}if(c){var v=(dr(r)?r[r.length-1]:r).prototype;return h=Object.create(v||null),m&&s(u,m,h,p||r.name),f(function(){return o.invoke(r,h,u,p),h},{instance:h,identifier:m})}return h=o.instantiate(r,u,p),m&&s(u,m,h,p||r.name),h}}]}function ne(){this.$get=["$window",function(t){return nr(t.document)}]}function re(){this.$get=["$log",function(t){return function(e,n){t.error.apply(t,arguments)}}]}function ie(t,e){if(b(t)){var n=t.replace(ii,"").trim();if(n){var r=e("Content-Type");(r&&0===r.indexOf(ti)||oe(n))&&(t=q(n))}}return t}function oe(t){var e=t.match(ni);return e&&ri[e[0]].test(t)}function ae(t){var e,n,r,i=ct();return t?(o(t.split("\n"),function(t){r=t.indexOf(":"),e=Gn(pr(t.substr(0,r))),n=pr(t.substr(r+1)),e&&(i[e]=i[e]?i[e]+", "+n:n)}),i):i}function se(t){var e=y(t)?t:n;return function(n){if(e||(e=ae(t)),n){var r=e[Gn(n)];return void 0===r&&(r=null),r}return e}}function ue(t,e,n,r){return x(r)?r(t,e,n):(o(r,function(r){t=r(t,e,n)}),t)}function ce(t){return t>=200&&300>t}function le(){var t=this.defaults={transformResponse:[ie],transformRequest:[function(t){return!y(t)||A(t)||T(t)||S(t)?t:V(t)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:P(ei),put:P(ei),patch:P(ei)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},e=!1;this.useApplyAsync=function(t){return $(t)?(e=!!t,this):e};var i=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,u,c,l,h,d){function p(e){function i(t){var e=f({},t);return t.data?e.data=ue(t.data,t.headers,t.status,u.transformResponse):e.data=t.data,ce(t.status)?e:h.reject(e)}function a(t){var e,n={};return o(t,function(t,r){x(t)?(e=t(),null!=e&&(n[r]=e)):n[r]=t}),n}function s(e){var n,r,i,o=t.headers,s=f({},e.headers);o=f({},o.common,o[Gn(e.method)]);t:for(n in o){r=Gn(n);for(i in s)if(Gn(i)===r)continue t;s[n]=o[n]}return a(s)}if(!lr.isObject(e))throw r("$http")("badreq","Http request configuration must be an object. Received: {0}",e);var u=f({method:"get",transformRequest:t.transformRequest,transformResponse:t.transformResponse},e);u.headers=s(e),u.method=Jn(u.method);var c=function(e){var r=e.headers,a=ue(e.data,se(r),n,e.transformRequest);return g(a)&&o(r,function(t,e){"content-type"===Gn(e)&&delete r[e]}),g(e.withCredentials)&&!g(t.withCredentials)&&(e.withCredentials=t.withCredentials),w(e,a).then(i,i)},l=[c,n],d=h.when(u);for(o(k,function(t){(t.request||t.requestError)&&l.unshift(t.request,t.requestError),(t.response||t.responseError)&&l.push(t.response,t.responseError)});l.length;){var p=l.shift(),m=l.shift();d=d.then(p,m)}return d.success=function(t){return ot(t,"fn"),d.then(function(e){t(e.data,e.status,e.headers,u)}),d},d.error=function(t){return ot(t,"fn"),d.then(null,function(e){t(e.data,e.status,e.headers,u)}),d},d}function m(t){o(arguments,function(t){p[t]=function(e,n){return p(f(n||{},{method:t,url:e}))}})}function v(t){o(arguments,function(t){p[t]=function(e,n,r){return p(f(r||{},{method:t,url:e,data:n}))}})}function w(r,i){function o(t,n,r,i){function o(){s(n,t,r,i)}d&&(ce(t)?d.put(_,[t,n,ae(r),i]):d.remove(_)),e?l.$applyAsync(o):(o(),l.$$phase||l.$apply())}function s(t,e,n,i){e=e>=-1?e:0,(ce(e)?v.resolve:v.reject)({data:t,status:e,headers:se(n),config:r,statusText:i})}function c(t){s(t.data,t.status,P(t.headers()),t.statusText)}function f(){var t=p.pendingRequests.indexOf(r);-1!==t&&p.pendingRequests.splice(t,1)}var d,m,v=h.defer(),b=v.promise,w=r.headers,_=C(r.url,r.params);if(p.pendingRequests.push(r),b.then(f,f),!r.cache&&!t.cache||r.cache===!1||"GET"!==r.method&&"JSONP"!==r.method||(d=y(r.cache)?r.cache:y(t.cache)?t.cache:E),d&&(m=d.get(_),$(m)?I(m)?m.then(c,c):dr(m)?s(m[1],m[0],P(m[2]),m[3]):s(m,200,{},"OK"):d.put(_,b)),g(m)){var x=an(r.url)?u.cookies()[r.xsrfCookieName||t.xsrfCookieName]:n;x&&(w[r.xsrfHeaderName||t.xsrfHeaderName]=x),a(r.method,_,i,o,w,r.timeout,r.withCredentials,r.responseType)}return b}function C(t,e){if(!e)return t;var n=[];return s(e,function(t,e){null===t||g(t)||(dr(t)||(t=[t]),o(t,function(t){y(t)&&(t=_(t)?t.toISOString():V(t)),n.push(G(e)+"="+G(t))}))}),n.length>0&&(t+=(-1==t.indexOf("?")?"?":"&")+n.join("&")),t}var E=c("$http"),k=[];return o(i,function(t){k.unshift(b(t)?d.get(t):d.invoke(t))}),p.pendingRequests=[],m("get","delete","head","jsonp"),v("post","put","patch"),p.defaults=t,p}]}function fe(){return new t.XMLHttpRequest}function he(){this.$get=["$browser","$window","$document",function(t,e,n){return de(t,fe,t.defer,e.angular.callbacks,n[0])}]}function de(t,e,r,i,a){function s(t,e,n){var r=a.createElement("script"),o=null;return r.type="text/javascript",r.src=t,r.async=!0,o=function(t){Or(r,"load",o),Or(r,"error",o),a.body.removeChild(r),r=null;var s=-1,u="unknown";t&&("load"!==t.type||i[e].called||(t={type:"error"}),u=t.type,s="error"===t.type?404:200),n&&n(s,u)},Tr(r,"load",o),Tr(r,"error",o),a.body.appendChild(r),o}return function(a,u,c,l,f,h,d,m){function v(){b&&b(),w&&w.abort()}function g(e,i,o,a,s){C!==n&&r.cancel(C),b=w=null,e(i,o,a,s),t.$$completeOutstandingRequest(p)}if(t.$$incOutstandingRequestCount(),u=u||t.url(),"jsonp"==Gn(a)){var y="_"+(i.counter++).toString(36);i[y]=function(t){i[y].data=t,i[y].called=!0};var b=s(u.replace("JSON_CALLBACK","angular.callbacks."+y),y,function(t,e){g(l,t,i[y].data,"",e),i[y]=p})}else{var w=e();w.open(a,u,!0),o(f,function(t,e){$(t)&&w.setRequestHeader(e,t)}),w.onload=function(){var t=w.statusText||"",e="response"in w?w.response:w.responseText,n=1223===w.status?204:w.status;0===n&&(n=e?200:"file"==on(u).protocol?404:0),g(l,n,e,w.getAllResponseHeaders(),t)};var _=function(){g(l,-1,null,null,"")};if(w.onerror=_,w.onabort=_,d&&(w.withCredentials=!0),m)try{w.responseType=m}catch(x){if("json"!==m)throw x}w.send(c||null)}if(h>0)var C=r(v,h);else I(h)&&h.then(v)}}function pe(){var t="{{",e="}}";this.startSymbol=function(e){return e?(t=e,this):t},this.endSymbol=function(t){return t?(e=t,this):e},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function o(t){return"\\\\\\"+t}function a(o,a,h,d){function p(n){return n.replace(c,t).replace(l,e)}function m(t){try{return t=T(t),d&&!$(t)?t:O(t)}catch(e){var n=oi("interr","Can't interpolate: {0}\n{1}",o,e.toString());r(n)}}d=!!d;for(var v,y,b,w=0,_=[],C=[],E=o.length,k=[],A=[];E>w;){if(-1==(v=o.indexOf(t,w))||-1==(y=o.indexOf(e,v+s))){w!==E&&k.push(p(o.substring(w)));break}w!==v&&k.push(p(o.substring(w,v))),b=o.substring(v+s,y),_.push(b),C.push(n(b,m)),w=y+u,A.push(k.length),k.push("")}if(h&&k.length>1)throw oi("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",o);if(!a||_.length){var S=function(t){for(var e=0,n=_.length;n>e;e++){if(d&&g(t[e]))return;k[A[e]]=t[e]}return k.join("")},T=function(t){return h?i.getTrusted(h,t):i.valueOf(t)},O=function(t){if(null==t)return"";switch(typeof t){case"string":break;case"number":t=""+t;break;default:t=V(t)}return t};return f(function(t){var e=0,n=_.length,i=new Array(n);try{for(;n>e;e++)i[e]=C[e](t);return S(i)}catch(a){var s=oi("interr","Can't interpolate: {0}\n{1}",o,a.toString());r(s)}},{exp:o,expressions:_,$$watchDelegate:function(t,e,n){var r;return t.$watchGroup(C,function(n,i){var o=S(n);x(e)&&e.call(this,o,n!==i?r:o,t),r=o},n)}})}}var s=t.length,u=e.length,c=new RegExp(t.replace(/./g,o),"g"),l=new RegExp(e.replace(/./g,o),"g");return a.startSymbol=function(){return t},a.endSymbol=function(){return e},a}]}function me(){this.$get=["$rootScope","$window","$q","$$q",function(t,e,n,r){function i(i,a,s,u){var c=e.setInterval,l=e.clearInterval,f=0,h=$(u)&&!u,d=(h?r:n).defer(),p=d.promise;return s=$(s)?s:0,p.then(null,null,i),p.$$intervalId=c(function(){d.notify(f++),s>0&&f>=s&&(d.resolve(f),l(p.$$intervalId),delete o[p.$$intervalId]),h||t.$apply()},a),o[p.$$intervalId]=d,p}var o={};return i.cancel=function(t){return t&&t.$$intervalId in o?(o[t.$$intervalId].reject("canceled"),e.clearInterval(t.$$intervalId),delete o[t.$$intervalId],!0):!1},i}]}function ve(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a",ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"]},pluralCat:function(t){return 1===t?"one":"other"}}}}function ge(t){for(var e=t.split("/"),n=e.length;n--;)e[n]=Z(e[n]);return e.join("/")}function $e(t,e){var n=on(t);e.$$protocol=n.protocol,e.$$host=n.hostname,e.$$port=h(n.port)||si[n.protocol]||null}function ye(t,e){var n="/"!==t.charAt(0);n&&(t="/"+t);var r=on(t);e.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),e.$$search=X(r.search),e.$$hash=decodeURIComponent(r.hash),e.$$path&&"/"!=e.$$path.charAt(0)&&(e.$$path="/"+e.$$path)}function be(t,e){return 0===e.indexOf(t)?e.substr(t.length):void 0}function we(t){var e=t.indexOf("#");return-1==e?t:t.substr(0,e)}function _e(t){return t.replace(/(#.+)|#$/,"$1")}function xe(t){return t.substr(0,we(t).lastIndexOf("/")+1)}function Ce(t){return t.substring(0,t.indexOf("/",t.indexOf("//")+2))}function Ee(t,e,r){this.$$html5=!0,r=r||"",$e(t,this),this.$$parse=function(t){var n=be(e,t);if(!b(n))throw ui("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,e);ye(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var t=Y(this.$$search),n=this.$$hash?"#"+Z(this.$$hash):"";this.$$url=ge(this.$$path)+(t?"?"+t:"")+n,this.$$absUrl=e+this.$$url.substr(1)},this.$$parseLinkUrl=function(i,o){if(o&&"#"===o[0])return this.hash(o.slice(1)),!0;var a,s,u;return(a=be(t,i))!==n?(s=a,u=(a=be(r,a))!==n?e+(be("/",a)||a):t+s):(a=be(e,i))!==n?u=e+a:e==i+"/"&&(u=e),u&&this.$$parse(u),!!u}}function ke(t,e,n){$e(t,this),this.$$parse=function(r){function i(t,e,n){var r,i=/^\/[A-Z]:(\/.*)/;return 0===e.indexOf(n)&&(e=e.replace(n,"")),i.exec(e)?t:(r=i.exec(t),r?r[1]:t)}var o,a=be(t,r)||be(e,r);g(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",g(a)&&(t=r,this.replace())):(o=be(n,a),g(o)&&(o=a)),ye(o,this),this.$$path=i(this.$$path,o,t),this.$$compose()},this.$$compose=function(){var e=Y(this.$$search),r=this.$$hash?"#"+Z(this.$$hash):"";this.$$url=ge(this.$$path)+(e?"?"+e:"")+r,this.$$absUrl=t+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(e,n){return we(t)==we(e)?(this.$$parse(e),!0):!1}}function Ae(t,e,n){this.$$html5=!0,ke.apply(this,arguments),this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return t==we(r)?o=r:(a=be(e,r))?o=t+n+a:e===r+"/"&&(o=e),o&&this.$$parse(o),!!o},this.$$compose=function(){var e=Y(this.$$search),r=this.$$hash?"#"+Z(this.$$hash):"";this.$$url=ge(this.$$path)+(e?"?"+e:"")+r,this.$$absUrl=t+n+this.$$url}}function Se(t){return function(){return this[t]}}function Te(t,e){return function(n){return g(n)?this[t]:(this[t]=e(n),this.$$compose(),this)}}function Oe(){var t="",e={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(e){return $(e)?(t=e,this):t},this.html5Mode=function(t){return O(t)?(e.enabled=t,this):y(t)?(O(t.enabled)&&(e.enabled=t.enabled),O(t.requireBase)&&(e.requireBase=t.requireBase),O(t.rewriteLinks)&&(e.rewriteLinks=t.rewriteLinks),this):e},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,o,a){function s(t,e,n){var i=c.url(),o=c.$$state;try{r.url(t,e,n),c.$$state=r.state()}catch(a){throw c.url(i),c.$$state=o,a}}function u(t,e){n.$broadcast("$locationChangeSuccess",c.absUrl(),t,c.$$state,e)}var c,l,f,h=r.baseHref(),d=r.url();if(e.enabled){if(!h&&e.requireBase)throw ui("nobase","$location in HTML5 mode requires a <base> tag to be present!");f=Ce(d)+(h||"/"),l=i.history?Ee:Ae}else f=we(d),l=ke;var p=xe(f);c=new l(f,p,"#"+t),c.$$parseLinkUrl(d,d),c.$$state=r.state();var m=/^\s*(javascript|mailto):/i;o.on("click",function(t){if(e.rewriteLinks&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&2!=t.which&&2!=t.button){for(var i=nr(t.target);"a"!==D(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;var s=i.prop("href"),u=i.attr("href")||i.attr("xlink:href");y(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=on(s.animVal).href),m.test(s)||!s||i.attr("target")||t.isDefaultPrevented()||c.$$parseLinkUrl(s,u)&&(t.preventDefault(),c.absUrl()!=r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),_e(c.absUrl())!=_e(d)&&r.url(c.absUrl(),!0);var v=!0;return r.onUrlChange(function(t,e){return g(be(p,t))?void(a.location.href=t):(n.$evalAsync(function(){var r,i=c.absUrl(),o=c.$$state;c.$$parse(t),c.$$state=e,r=n.$broadcast("$locationChangeStart",t,i,e,o).defaultPrevented,c.absUrl()===t&&(r?(c.$$parse(i),c.$$state=o,s(i,!1,o)):(v=!1,u(i,o)))}),void(n.$$phase||n.$digest()))}),n.$watch(function(){var t=_e(r.url()),e=_e(c.absUrl()),o=r.state(),a=c.$$replace,l=t!==e||c.$$html5&&i.history&&o!==c.$$state;(v||l)&&(v=!1,n.$evalAsync(function(){var e=c.absUrl(),r=n.$broadcast("$locationChangeStart",e,t,c.$$state,o).defaultPrevented;c.absUrl()===e&&(r?(c.$$parse(t),c.$$state=o):(l&&s(e,a,o===c.$$state?null:c.$$state),u(t,o)))})),c.$$replace=!1}),c}]}function Ie(){var t=!0,e=this;this.debugEnabled=function(e){return $(e)?(t=e,this):t},this.$get=["$window",function(n){function r(t){return t instanceof Error&&(t.stack?t=t.message&&-1===t.stack.indexOf(t.message)?"Error: "+t.message+"\n"+t.stack:t.stack:t.sourceURL&&(t=t.message+"\n"+t.sourceURL+":"+t.line)),t}function i(t){var e=n.console||{},i=e[t]||e.log||p,a=!1;try{a=!!i.apply}catch(s){}return a?function(){var t=[];return o(arguments,function(e){t.push(r(e))}),i.apply(e,t)}:function(t,e){i(t,null==e?"":e)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var n=i("debug");return function(){t&&n.apply(e,arguments)}}()}}]}function ze(t,e){if("__defineGetter__"===t||"__defineSetter__"===t||"__lookupGetter__"===t||"__lookupSetter__"===t||"__proto__"===t)throw li("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",e);return t}function Me(t,e){if(t+="",!b(t))throw li("iseccst","Cannot convert object to primitive value! Expression: {0}",e);return t}function De(t,e){if(t){if(t.constructor===t)throw li("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",e);if(t.window===t)throw li("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",e);if(t.children&&(t.nodeName||t.prop&&t.attr&&t.find))throw li("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",e);if(t===Object)throw li("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",e)}return t}function je(t,e){if(t){if(t.constructor===t)throw li("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",e);if(t===fi||t===hi||t===di)throw li("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",e)}}function Ne(t){return t.constant}function Pe(t,e,n,r,i){De(t,i),De(e,i);for(var o,a=n.split("."),s=0;a.length>1;s++){o=ze(a.shift(),i);var u=0===s&&e&&e[o]||t[o];u||(u={},t[o]=u),t=De(u,i)}return o=ze(a.shift(),i),De(t[o],i),t[o]=r,r}function Re(t){return"constructor"==t}function Fe(t,e,r,i,o,a,s){ze(t,a),ze(e,a),ze(r,a),ze(i,a),ze(o,a);var u=function(t){return De(t,a)},c=s||Re(t)?u:m,l=s||Re(e)?u:m,f=s||Re(r)?u:m,h=s||Re(i)?u:m,d=s||Re(o)?u:m;return function(a,s){var u=s&&s.hasOwnProperty(t)?s:a;return null==u?u:(u=c(u[t]),e?null==u?n:(u=l(u[e]),r?null==u?n:(u=f(u[r]),i?null==u?n:(u=h(u[i]),o?null==u?n:u=d(u[o]):u):u):u):u)}}function Be(t,e){return function(n,r){return t(n,r,De,e)}}function Le(t,e,r){var i=e.expensiveChecks,a=i?bi:yi,s=a[t];if(s)return s;var u=t.split("."),c=u.length;if(e.csp)s=6>c?Fe(u[0],u[1],u[2],u[3],u[4],r,i):function(t,e){var o,a=0;do o=Fe(u[a++],u[a++],u[a++],u[a++],u[a++],r,i)(t,e),e=n,t=o;while(c>a);return o};else{var l="";i&&(l+="s = eso(s, fe);\nl = eso(l, fe);\n");var f=i;o(u,function(t,e){ze(t,r);var n=(e?"s":'((l&&l.hasOwnProperty("'+t+'"))?l:s)')+"."+t;(i||Re(t))&&(n="eso("+n+", fe)",f=!0),l+="if(s == null) return undefined;\ns="+n+";\n"}),l+="return s;";var h=new Function("s","l","eso","fe",l);h.toString=v(l),f&&(h=Be(h,r)),s=h}return s.sharedGetter=!0,s.assign=function(e,n,r){return Pe(e,r,t,n,t)},a[t]=s,s}function Ue(t){return x(t.valueOf)?t.valueOf():wi.call(t)}function Ve(){var t=ct(),e=ct();this.$get=["$filter","$sniffer",function(n,r){function i(t){var e=t;return t.sharedGetter&&(e=function(e,n){return t(e,n)},e.literal=t.literal,e.constant=t.constant,e.assign=t.assign),e}function a(t,e){for(var n=0,r=t.length;r>n;n++){var i=t[n];i.constant||(i.inputs?a(i.inputs,e):-1===e.indexOf(i)&&e.push(i))}return e}function s(t,e){return null==t||null==e?t===e:"object"==typeof t&&(t=Ue(t),"object"==typeof t)?!1:t===e||t!==t&&e!==e}function u(t,e,n,r){var i,o=r.$$inputs||(r.$$inputs=a(r.inputs,[]));if(1===o.length){var u=s;return o=o[0],t.$watch(function(t){var e=o(t);return s(e,u)||(i=r(t),u=e&&Ue(e)),i},e,n)}for(var c=[],l=0,f=o.length;f>l;l++)c[l]=s;return t.$watch(function(t){for(var e=!1,n=0,a=o.length;a>n;n++){var u=o[n](t);(e||(e=!s(u,c[n])))&&(c[n]=u&&Ue(u))}return e&&(i=r(t)),i},e,n)}function c(t,e,n,r){var i,o;return i=t.$watch(function(t){return r(t)},function(t,n,r){o=t,x(e)&&e.apply(this,arguments),$(t)&&r.$$postDigest(function(){$(o)&&i()})},n)}function l(t,e,n,r){function i(t){var e=!0;return o(t,function(t){$(t)||(e=!1)}),e}var a,s;return a=t.$watch(function(t){return r(t)},function(t,n,r){s=t,x(e)&&e.call(this,t,n,r),i(t)&&r.$$postDigest(function(){i(s)&&a()})},n)}function f(t,e,n,r){var i;return i=t.$watch(function(t){return r(t)},function(t,n,r){x(e)&&e.apply(this,arguments),i()},n)}function h(t,e){if(!e)return t;var n=t.$$watchDelegate,r=n!==l&&n!==c,i=r?function(n,r){var i=t(n,r);return e(i,n,r)}:function(n,r){var i=t(n,r),o=e(i,n,r);return $(i)?o:i};return t.$$watchDelegate&&t.$$watchDelegate!==u?i.$$watchDelegate=t.$$watchDelegate:e.$stateful||(i.$$watchDelegate=u,i.inputs=[t]),i}var d={csp:r.csp,expensiveChecks:!1},m={csp:r.csp,expensiveChecks:!0};return function(r,o,a){var s,v,g;switch(typeof r){case"string":g=r=r.trim();var $=a?e:t;if(s=$[g],!s){":"===r.charAt(0)&&":"===r.charAt(1)&&(v=!0,r=r.substring(2));var y=a?m:d,b=new gi(y),w=new $i(b,n,y);s=w.parse(r),s.constant?s.$$watchDelegate=f:v?(s=i(s),s.$$watchDelegate=s.literal?l:c):s.inputs&&(s.$$watchDelegate=u),$[g]=s}return h(s,o);case"function":return h(r,o);default:return h(p,o)}}}]}function qe(){this.$get=["$rootScope","$exceptionHandler",function(t,e){return We(function(e){t.$evalAsync(e)},e)}]}function He(){this.$get=["$browser","$exceptionHandler",function(t,e){return We(function(e){t.defer(e)},e)}]}function We(t,e){function i(t,e,n){function r(e){return function(n){i||(i=!0,e.call(t,n))}}var i=!1;return[r(e),r(n)]}function a(){this.$$state={status:0}}function s(t,e){return function(n){e.call(t,n)}}function u(t){var r,i,o;o=t.pending,t.processScheduled=!1,t.pending=n;for(var a=0,s=o.length;s>a;++a){i=o[a][0],r=o[a][t.status];try{x(r)?i.resolve(r(t.value)):1===t.status?i.resolve(t.value):i.reject(t.value)}catch(u){i.reject(u),e(u)}}}function c(e){!e.processScheduled&&e.pending&&(e.processScheduled=!0,t(function(){u(e)}))}function l(){this.promise=new a,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function f(t){var e=new l,n=0,r=dr(t)?[]:{};return o(t,function(t,i){n++,g(t).then(function(t){r.hasOwnProperty(i)||(r[i]=t,--n||e.resolve(r))},function(t){r.hasOwnProperty(i)||e.reject(t)})}),0===n&&e.resolve(r),e.promise}var h=r("$q",TypeError),d=function(){return new l};a.prototype={then:function(t,e,n){var r=new l;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,t,e,n]),this.$$state.status>0&&c(this.$$state),r.promise},"catch":function(t){return this.then(null,t)},"finally":function(t,e){return this.then(function(e){return v(e,!0,t)},function(e){return v(e,!1,t)},e)}},l.prototype={resolve:function(t){this.promise.$$state.status||(t===this.promise?this.$$reject(h("qcycle","Expected promise to be resolved with value other than itself '{0}'",t)):this.$$resolve(t))},$$resolve:function(t){var n,r;r=i(this,this.$$resolve,this.$$reject);try{(y(t)||x(t))&&(n=t&&t.then),x(n)?(this.promise.$$state.status=-1,n.call(t,r[0],r[1],this.notify)):(this.promise.$$state.value=t,this.promise.$$state.status=1,c(this.promise.$$state))}catch(o){r[1](o),e(o)}},reject:function(t){this.promise.$$state.status||this.$$reject(t)},$$reject:function(t){this.promise.$$state.value=t,this.promise.$$state.status=2,c(this.promise.$$state)},notify:function(n){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&t(function(){for(var t,i,o=0,a=r.length;a>o;o++){i=r[o][0],t=r[o][3];try{i.notify(x(t)?t(n):n)}catch(s){e(s)}}})}};var p=function(t){var e=new l;return e.reject(t),e.promise},m=function(t,e){var n=new l;return e?n.resolve(t):n.reject(t),n.promise},v=function(t,e,n){var r=null;try{x(n)&&(r=n())}catch(i){return m(i,!1)}return I(r)?r.then(function(){return m(t,e)},function(t){return m(t,!1)}):m(t,e)},g=function(t,e,n,r){var i=new l;return i.resolve(t),i.promise.then(e,n,r)},$=function b(t){function e(t){r.resolve(t)}function n(t){r.reject(t)}if(!x(t))throw h("norslvr","Expected resolverFn, got '{0}'",t);if(!(this instanceof b))return new b(t);var r=new l;return t(e,n),r.promise};return $.defer=d,$.reject=p,$.when=g,$.all=f,$}function Xe(){this.$get=["$window","$timeout",function(t,e){function n(){for(var t=0;t<l.length;t++){var e=l[t];e&&(l[t]=null,e())}c=l.length=0}function r(t){var e=l.length;return c++,l.push(t),0===e&&(u=s(n)),function(){e>=0&&(l[e]=null,e=null,0===--c&&u&&(u(),u=null,l.length=0))}}var i=t.requestAnimationFrame||t.webkitRequestAnimationFrame,o=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.webkitCancelRequestAnimationFrame,a=!!i,s=a?function(t){var e=i(t);return function(){o(e)}}:function(t){var n=e(t,16.66,!1);return function(){e.cancel(n)}};r.supported=a;var u,c=0,l=[];return r}]}function Ye(){function t(t){function e(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$id=c(),this.$$ChildScope=null}return e.prototype=t,e}var e=10,n=r("$rootScope"),a=null,s=null;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,u,l,f){function h(t){t.currentScope.$$destroyed=!0}function d(){this.$id=c(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings=null}function m(t){if(C.$$phase)throw n("inprog","{0} already in progress",C.$$phase);C.$$phase=t}function v(){C.$$phase=null}function $(t,e,n){do t.$$listenerCount[n]-=e,0===t.$$listenerCount[n]&&delete t.$$listenerCount[n];while(t=t.$parent)}function b(){}function w(){for(;A.length;)try{A.shift()()}catch(t){u(t)}s=null}function _(){null===s&&(s=f.defer(function(){C.$apply(w)}))}d.prototype={constructor:d,$new:function(e,n){var r;return n=n||this,e?(r=new d,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=t(this)),r=new this.$$ChildScope),r.$parent=n,r.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=r,n.$$childTail=r):n.$$childHead=n.$$childTail=r,(e||n!=this)&&r.$on("$destroy",h),r},$watch:function(t,e,n){var r=l(t);if(r.$$watchDelegate)return r.$$watchDelegate(this,e,n,r);var i=this,o=i.$$watchers,s={fn:e,last:b,get:r,exp:t,eq:!!n};return a=null,x(e)||(s.fn=p),o||(o=i.$$watchers=[]),o.unshift(s),function(){j(o,s),a=null}},$watchGroup:function(t,e){function n(){u=!1,c?(c=!1,e(i,i,s)):e(i,r,s)}var r=new Array(t.length),i=new Array(t.length),a=[],s=this,u=!1,c=!0;if(!t.length){var l=!0;return s.$evalAsync(function(){l&&e(i,i,s)}),function(){l=!1}}return 1===t.length?this.$watch(t[0],function(t,n,o){i[0]=t,r[0]=n,e(i,t===n?i:r,o)}):(o(t,function(t,e){var o=s.$watch(t,function(t,o){i[e]=t,r[e]=o,u||(u=!0,s.$evalAsync(n))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(t,e){function n(t){o=t;var e,n,r,s,u;if(!g(o)){if(y(o))if(i(o)){a!==d&&(a=d,v=a.length=0,f++),e=o.length,v!==e&&(f++,a.length=v=e);for(var c=0;e>c;c++)u=a[c],s=o[c],r=u!==u&&s!==s,r||u===s||(f++,a[c]=s)}else{a!==p&&(a=p={},v=0,f++),e=0;for(n in o)o.hasOwnProperty(n)&&(e++,s=o[n],u=a[n],n in a?(r=u!==u&&s!==s,r||u===s||(f++,a[n]=s)):(v++,a[n]=s,f++));if(v>e){f++;for(n in a)o.hasOwnProperty(n)||(v--,delete a[n])}}else a!==o&&(a=o,f++);return f;
}}function r(){if(m?(m=!1,e(o,o,u)):e(o,s,u),c)if(y(o))if(i(o)){s=new Array(o.length);for(var t=0;t<o.length;t++)s[t]=o[t]}else{s={};for(var n in o)Kn.call(o,n)&&(s[n]=o[n])}else s=o}n.$stateful=!0;var o,a,s,u=this,c=e.length>1,f=0,h=l(t,n),d=[],p={},m=!0,v=0;return this.$watch(h,r)},$digest:function(){var t,r,i,o,c,l,h,d,p,g,$=e,y=this,_=[];m("$digest"),f.$$checkUrlChange(),this===C&&null!==s&&(f.defer.cancel(s),w()),a=null;do{for(l=!1,d=y;E.length;){try{g=E.shift(),g.scope.$eval(g.expression,g.locals)}catch(A){u(A)}a=null}t:do{if(o=d.$$watchers)for(c=o.length;c--;)try{if(t=o[c])if((r=t.get(d))===(i=t.last)||(t.eq?R(r,i):"number"==typeof r&&"number"==typeof i&&isNaN(r)&&isNaN(i))){if(t===a){l=!1;break t}}else l=!0,a=t,t.last=t.eq?N(r,null):r,t.fn(r,i===b?r:i,d),5>$&&(p=4-$,_[p]||(_[p]=[]),_[p].push({msg:x(t.exp)?"fn: "+(t.exp.name||t.exp.toString()):t.exp,newVal:r,oldVal:i}))}catch(A){u(A)}if(!(h=d.$$childHead||d!==y&&d.$$nextSibling))for(;d!==y&&!(h=d.$$nextSibling);)d=d.$parent}while(d=h);if((l||E.length)&&!$--)throw v(),n("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,_)}while(l||E.length);for(v();k.length;)try{k.shift()()}catch(A){u(A)}},$destroy:function(){if(!this.$$destroyed){var t=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==C){for(var e in this.$$listenerCount)$(this,this.$$listenerCount[e],e);t.$$childHead==this&&(t.$$childHead=this.$$nextSibling),t.$$childTail==this&&(t.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(t,e){return l(t)(this,e)},$evalAsync:function(t,e){C.$$phase||E.length||f.defer(function(){E.length&&C.$digest()}),E.push({scope:this,expression:t,locals:e})},$$postDigest:function(t){k.push(t)},$apply:function(t){try{return m("$apply"),this.$eval(t)}catch(e){u(e)}finally{v();try{C.$digest()}catch(e){throw u(e),e}}},$applyAsync:function(t){function e(){n.$eval(t)}var n=this;t&&A.push(e),_()},$on:function(t,e){var n=this.$$listeners[t];n||(this.$$listeners[t]=n=[]),n.push(e);var r=this;do r.$$listenerCount[t]||(r.$$listenerCount[t]=0),r.$$listenerCount[t]++;while(r=r.$parent);var i=this;return function(){var r=n.indexOf(e);-1!==r&&(n[r]=null,$(i,1,t))}},$emit:function(t,e){var n,r,i,o=[],a=this,s=!1,c={name:t,targetScope:a,stopPropagation:function(){s=!0},preventDefault:function(){c.defaultPrevented=!0},defaultPrevented:!1},l=F([c],arguments,1);do{for(n=a.$$listeners[t]||o,c.currentScope=a,r=0,i=n.length;i>r;r++)if(n[r])try{n[r].apply(null,l)}catch(f){u(f)}else n.splice(r,1),r--,i--;if(s)return c.currentScope=null,c;a=a.$parent}while(a);return c.currentScope=null,c},$broadcast:function(t,e){var n=this,r=n,i=n,o={name:t,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[t])return o;for(var a,s,c,l=F([o],arguments,1);r=i;){for(o.currentScope=r,a=r.$$listeners[t]||[],s=0,c=a.length;c>s;s++)if(a[s])try{a[s].apply(null,l)}catch(f){u(f)}else a.splice(s,1),s--,c--;if(!(i=r.$$listenerCount[t]&&r.$$childHead||r!==n&&r.$$nextSibling))for(;r!==n&&!(i=r.$$nextSibling);)r=r.$parent}return o.currentScope=null,o}};var C=new d,E=C.$$asyncQueue=[],k=C.$$postDigestQueue=[],A=C.$$applyAsyncQueue=[];return C}]}function Ze(){var t=/^\s*(https?|ftp|mailto|tel|file):/,e=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(e){return $(e)?(t=e,this):t},this.imgSrcSanitizationWhitelist=function(t){return $(t)?(e=t,this):e},this.$get=function(){return function(n,r){var i,o=r?e:t;return i=on(n).href,""===i||i.match(o)?n:"unsafe:"+i}}}function Ge(t){if("self"===t)return t;if(b(t)){if(t.indexOf("***")>-1)throw _i("iwcard","Illegal sequence *** in string matcher. String: {0}",t);return t=mr(t).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+t+"$")}if(C(t))return new RegExp("^"+t.source+"$");throw _i("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Ke(t){var e=[];return $(t)&&o(t,function(t){e.push(Ge(t))}),e}function Je(){this.SCE_CONTEXTS=xi;var t=["self"],e=[];this.resourceUrlWhitelist=function(e){return arguments.length&&(t=Ke(e)),t},this.resourceUrlBlacklist=function(t){return arguments.length&&(e=Ke(t)),e},this.$get=["$injector",function(r){function i(t,e){return"self"===t?an(e):!!t.exec(e.href)}function o(n){var r,o,a=on(n.toString()),s=!1;for(r=0,o=t.length;o>r;r++)if(i(t[r],a)){s=!0;break}if(s)for(r=0,o=e.length;o>r;r++)if(i(e[r],a)){s=!1;break}return s}function a(t){var e=function(t){this.$$unwrapTrustedValue=function(){return t}};return t&&(e.prototype=new t),e.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},e.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},e}function s(t,e){var r=h.hasOwnProperty(t)?h[t]:null;if(!r)throw _i("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",t,e);if(null===e||e===n||""===e)return e;if("string"!=typeof e)throw _i("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",t);return new r(e)}function u(t){return t instanceof f?t.$$unwrapTrustedValue():t}function c(t,e){if(null===e||e===n||""===e)return e;var r=h.hasOwnProperty(t)?h[t]:null;if(r&&e instanceof r)return e.$$unwrapTrustedValue();if(t===xi.RESOURCE_URL){if(o(e))return e;throw _i("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",e.toString())}if(t===xi.HTML)return l(e);throw _i("unsafe","Attempting to use an unsafe value in a safe context.")}var l=function(t){throw _i("unsafe","Attempting to use an unsafe value in a safe context.")};r.has("$sanitize")&&(l=r.get("$sanitize"));var f=a(),h={};return h[xi.HTML]=a(f),h[xi.CSS]=a(f),h[xi.URL]=a(f),h[xi.JS]=a(f),h[xi.RESOURCE_URL]=a(h[xi.URL]),{trustAs:s,getTrusted:c,valueOf:u}}]}function Qe(){var t=!0;this.enabled=function(e){return arguments.length&&(t=!!e),t},this.$get=["$parse","$sceDelegate",function(e,n){if(t&&8>er)throw _i("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var r=P(xi);r.isEnabled=function(){return t},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,t||(r.trustAs=r.getTrusted=function(t,e){return e},r.valueOf=m),r.parseAs=function(t,n){var i=e(n);return i.literal&&i.constant?i:e(n,function(e){return r.getTrusted(t,e)})};var i=r.parseAs,a=r.getTrusted,s=r.trustAs;return o(xi,function(t,e){var n=Gn(e);r[mt("parse_as_"+n)]=function(e){return i(t,e)},r[mt("get_trusted_"+n)]=function(e){return a(t,e)},r[mt("trust_as_"+n)]=function(e){return s(t,e)}}),r}]}function tn(){this.$get=["$window","$document",function(t,e){var n,r,i={},o=h((/android (\d+)/.exec(Gn((t.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((t.navigator||{}).userAgent),s=e[0]||{},u=/^(Moz|webkit|ms)(?=[A-Z])/,c=s.body&&s.body.style,l=!1,f=!1;if(c){for(var d in c)if(r=u.exec(d)){n=r[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in c&&"webkit"),l=!!("transition"in c||n+"Transition"in c),f=!!("animation"in c||n+"Animation"in c),!o||l&&f||(l=b(s.body.style.webkitTransition),f=b(s.body.style.webkitAnimation))}return{history:!(!t.history||!t.history.pushState||4>o||a),hasEvent:function(t){if("input"===t&&11>=er)return!1;if(g(i[t])){var e=s.createElement("div");i[t]="on"+t in e}return i[t]},csp:vr(),vendorPrefix:n,transitions:l,animations:f,android:o}}]}function en(){this.$get=["$templateCache","$http","$q","$sce",function(t,e,n,r){function i(o,a){function s(t){if(!a)throw Kr("tpload","Failed to load template: {0}",o);return n.reject(t)}i.totalPendingRequests++,b(o)&&t.get(o)||(o=r.getTrustedResourceUrl(o));var u=e.defaults&&e.defaults.transformResponse;dr(u)?u=u.filter(function(t){return t!==ie}):u===ie&&(u=null);var c={cache:t,transformResponse:u};return e.get(o,c)["finally"](function(){i.totalPendingRequests--}).then(function(t){return t.data},s)}return i.totalPendingRequests=0,i}]}function nn(){this.$get=["$rootScope","$browser","$location",function(t,e,n){var r={};return r.findBindings=function(t,e,n){var r=t.getElementsByClassName("ng-binding"),i=[];return o(r,function(t){var r=lr.element(t).data("$binding");r&&o(r,function(r){if(n){var o=new RegExp("(^|\\s)"+mr(e)+"(\\s|\\||$)");o.test(r)&&i.push(t)}else-1!=r.indexOf(e)&&i.push(t)})}),i},r.findModels=function(t,e,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var o=n?"=":"*=",a="["+r[i]+"model"+o+'"'+e+'"]',s=t.querySelectorAll(a);if(s.length)return s}},r.getLocation=function(){return n.url()},r.setLocation=function(e){e!==n.url()&&(n.url(e),t.$digest())},r.whenStable=function(t){e.notifyWhenNoOutstandingRequests(t)},r}]}function rn(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(t,e,n,r,i){function o(o,s,u){var c,l=$(u)&&!u,f=(l?r:n).defer(),h=f.promise;return c=e.defer(function(){try{f.resolve(o())}catch(e){f.reject(e),i(e)}finally{delete a[h.$$timeoutId]}l||t.$apply()},s),h.$$timeoutId=c,a[c]=f,h}var a={};return o.cancel=function(t){return t&&t.$$timeoutId in a?(a[t.$$timeoutId].reject("canceled"),delete a[t.$$timeoutId],e.defer.cancel(t.$$timeoutId)):!1},o}]}function on(t){var e=t;return er&&(Ci.setAttribute("href",e),e=Ci.href),Ci.setAttribute("href",e),{href:Ci.href,protocol:Ci.protocol?Ci.protocol.replace(/:$/,""):"",host:Ci.host,search:Ci.search?Ci.search.replace(/^\?/,""):"",hash:Ci.hash?Ci.hash.replace(/^#/,""):"",hostname:Ci.hostname,port:Ci.port,pathname:"/"===Ci.pathname.charAt(0)?Ci.pathname:"/"+Ci.pathname}}function an(t){var e=b(t)?on(t):t;return e.protocol===Ei.protocol&&e.host===Ei.host}function sn(){this.$get=v(t)}function un(t){function e(r,i){if(y(r)){var a={};return o(r,function(t,n){a[n]=e(n,t)}),a}return t.factory(r+n,i)}var n="Filter";this.register=e,this.$get=["$injector",function(t){return function(e){return t.get(e+n)}}],e("currency",hn),e("date",En),e("filter",cn),e("json",kn),e("limitTo",An),e("lowercase",Oi),e("number",dn),e("orderBy",Sn),e("uppercase",Ii)}function cn(){return function(t,e,n){if(!dr(t))return t;var r,i,o=null!==e?typeof e:"null";switch(o){case"function":r=e;break;case"boolean":case"null":case"number":case"string":i=!0;case"object":r=ln(e,n,i);break;default:return t}return t.filter(r)}}function ln(t,e,n){var r,i=y(t)&&"$"in t;return e===!0?e=R:x(e)||(e=function(t,e){return g(t)?!1:null===t||null===e?t===e:y(t)||y(e)?!1:(t=Gn(""+t),e=Gn(""+e),-1!==t.indexOf(e))}),r=function(r){return i&&!y(r)?fn(r,t.$,e,!1):fn(r,t,e,n)}}function fn(t,e,n,r,i){var o=null!==t?typeof t:"null",a=null!==e?typeof e:"null";if("string"===a&&"!"===e.charAt(0))return!fn(t,e.substring(1),n,r);if(dr(t))return t.some(function(t){return fn(t,e,n,r)});switch(o){case"object":var s;if(r){for(s in t)if("$"!==s.charAt(0)&&fn(t[s],e,n,!0))return!0;return i?!1:fn(t,e,n,!1)}if("object"===a){for(s in e){var u=e[s];if(!x(u)&&!g(u)){var c="$"===s,l=c?t:t[s];if(!fn(l,u,n,c,c))return!1}}return!0}return n(t,e);case"function":return!1;default:return n(t,e)}}function hn(t){var e=t.NUMBER_FORMATS;return function(t,n,r){return g(n)&&(n=e.CURRENCY_SYM),g(r)&&(r=e.PATTERNS[1].maxFrac),null==t?t:pn(t,e.PATTERNS[1],e.GROUP_SEP,e.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function dn(t){var e=t.NUMBER_FORMATS;return function(t,n){return null==t?t:pn(t,e.PATTERNS[0],e.GROUP_SEP,e.DECIMAL_SEP,n)}}function pn(t,e,n,r,i){if(!isFinite(t)||y(t))return"";var o=0>t;t=Math.abs(t);var a=t+"",s="",u=[],c=!1;if(-1!==a.indexOf("e")){var l=a.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&&l[3]>i+1?t=0:(s=a,c=!0)}if(c)i>0&&1>t&&(s=t.toFixed(i),t=parseFloat(s));else{var f=(a.split(ki)[1]||"").length;g(i)&&(i=Math.min(Math.max(e.minFrac,f),e.maxFrac)),t=+(Math.round(+(t.toString()+"e"+i)).toString()+"e"+-i);var h=(""+t).split(ki),d=h[0];h=h[1]||"";var p,m=0,v=e.lgSize,$=e.gSize;if(d.length>=v+$)for(m=d.length-v,p=0;m>p;p++)(m-p)%$===0&&0!==p&&(s+=n),s+=d.charAt(p);for(p=m;p<d.length;p++)(d.length-p)%v===0&&0!==p&&(s+=n),s+=d.charAt(p);for(;h.length<i;)h+="0";i&&"0"!==i&&(s+=r+h.substr(0,i))}return 0===t&&(o=!1),u.push(o?e.negPre:e.posPre,s,o?e.negSuf:e.posSuf),u.join("")}function mn(t,e,n){var r="";for(0>t&&(r="-",t=-t),t=""+t;t.length<e;)t="0"+t;return n&&(t=t.substr(t.length-e)),r+t}function vn(t,e,n,r){return n=n||0,function(i){var o=i["get"+t]();return(n>0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),mn(o,e,r)}}function gn(t,e){return function(n,r){var i=n["get"+t](),o=Jn(e?"SHORT"+t:t);return r[o][i]}}function $n(t){var e=-1*t.getTimezoneOffset(),n=e>=0?"+":"";return n+=mn(Math[e>0?"floor":"ceil"](e/60),2)+mn(Math.abs(e%60),2)}function yn(t){var e=new Date(t,0,1).getDay();return new Date(t,0,(4>=e?5:12)-e)}function bn(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function wn(t){return function(e){var n=yn(e.getFullYear()),r=bn(e),i=+r-+n,o=1+Math.round(i/6048e5);return mn(o,t)}}function _n(t,e){return t.getHours()<12?e.AMPMS[0]:e.AMPMS[1]}function xn(t,e){return t.getFullYear()<=0?e.ERAS[0]:e.ERAS[1]}function Cn(t,e){return t.getFullYear()<=0?e.ERANAMES[0]:e.ERANAMES[1]}function En(t){function e(t){var e;if(e=t.match(n)){var r=new Date(0),i=0,o=0,a=e[8]?r.setUTCFullYear:r.setFullYear,s=e[8]?r.setUTCHours:r.setHours;e[9]&&(i=h(e[9]+e[10]),o=h(e[9]+e[11])),a.call(r,h(e[1]),h(e[2])-1,h(e[3]));var u=h(e[4]||0)-i,c=h(e[5]||0)-o,l=h(e[6]||0),f=Math.round(1e3*parseFloat("0."+(e[7]||0)));return s.call(r,u,c,l,f),r}return t}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,i){var a,s,u="",c=[];if(r=r||"mediumDate",r=t.DATETIME_FORMATS[r]||r,b(n)&&(n=Ti.test(n)?h(n):e(n)),w(n)&&(n=new Date(n)),!_(n))return n;for(;r;)s=Si.exec(r),s?(c=F(c,s,1),r=c.pop()):(c.push(r),r=null);return i&&"UTC"===i&&(n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+n.getTimezoneOffset())),o(c,function(e){a=Ai[e],u+=a?a(n,t.DATETIME_FORMATS):e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}}function kn(){return function(t,e){return g(e)&&(e=2),V(t,e)}}function An(){return function(t,e){return w(t)&&(t=t.toString()),dr(t)||b(t)?(e=Math.abs(Number(e))===1/0?Number(e):h(e),e?e>0?t.slice(0,e):t.slice(e):b(t)?"":[]):t}}function Sn(t){return function(e,n,r){function o(t,e){for(var r=0;r<n.length;r++){var i=n[r](t,e);if(0!==i)return i}return 0}function a(t,e){return e?function(e,n){return t(n,e)}:t}function s(t){switch(typeof t){case"number":case"boolean":case"string":return!0;default:return!1}}function u(t){return null===t?"null":"function"==typeof t.valueOf&&(t=t.valueOf(),s(t))?t:"function"==typeof t.toString&&(t=t.toString(),s(t))?t:""}function c(t,e){var n=typeof t,r=typeof e;return n===r&&"object"===n&&(t=u(t),e=u(e)),n===r?("string"===n&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e?0:e>t?-1:1):r>n?-1:1}return i(e)?(n=dr(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(e){var n=!1,r=e||m;if(b(e)){if(("+"==e.charAt(0)||"-"==e.charAt(0))&&(n="-"==e.charAt(0),e=e.substring(1)),""===e)return a(c,n);if(r=t(e),r.constant){var i=r();return a(function(t,e){return c(t[i],e[i])},n)}}return a(function(t,e){return c(r(t),r(e))},n)}),or.call(e).sort(a(o,r))):e}}function Tn(t){return x(t)&&(t={link:t}),t.restrict=t.restrict||"AC",v(t)}function On(t,e){t.$name=e}function In(t,e,r,i,a){var s=this,u=[],c=s.$$parentForm=t.parent().controller("form")||Di;s.$error={},s.$$success={},s.$pending=n,s.$name=a(e.name||e.ngForm||"")(r),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,c.$addControl(s),s.$rollbackViewValue=function(){o(u,function(t){t.$rollbackViewValue()})},s.$commitViewValue=function(){o(u,function(t){t.$commitViewValue()})},s.$addControl=function(t){at(t.$name,"input"),u.push(t),t.$name&&(s[t.$name]=t)},s.$$renameControl=function(t,e){var n=t.$name;s[n]===t&&delete s[n],s[e]=t,t.$name=e},s.$removeControl=function(t){t.$name&&s[t.$name]===t&&delete s[t.$name],o(s.$pending,function(e,n){s.$setValidity(n,null,t)}),o(s.$error,function(e,n){s.$setValidity(n,null,t)}),o(s.$$success,function(e,n){s.$setValidity(n,null,t)}),j(u,t)},Wn({ctrl:this,$element:t,set:function(t,e,n){var r=t[e];if(r){var i=r.indexOf(n);-1===i&&r.push(n)}else t[e]=[n]},unset:function(t,e,n){var r=t[e];r&&(j(r,n),0===r.length&&delete t[e])},parentForm:c,$animate:i}),s.$setDirty=function(){i.removeClass(t,go),i.addClass(t,$o),s.$dirty=!0,s.$pristine=!1,c.$setDirty()},s.$setPristine=function(){i.setClass(t,go,$o+" "+ji),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,o(u,function(t){t.$setPristine()})},s.$setUntouched=function(){o(u,function(t){t.$setUntouched()})},s.$setSubmitted=function(){i.addClass(t,ji),s.$submitted=!0,c.$setSubmitted()}}function zn(t){t.$formatters.push(function(e){return t.$isEmpty(e)?e:e.toString()})}function Mn(t,e,n,r,i,o){Dn(t,e,n,r,i,o),zn(r)}function Dn(t,e,n,r,i,o){var a=Gn(e[0].type);if(!i.android){var s=!1;e.on("compositionstart",function(t){s=!0}),e.on("compositionend",function(){s=!1,u()})}var u=function(t){if(c&&(o.defer.cancel(c),c=null),!s){var i=e.val(),u=t&&t.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(i=pr(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,u)}};if(i.hasEvent("input"))e.on("input",u);else{var c,l=function(t,e,n){c||(c=o.defer(function(){c=null,e&&e.value===n||u(t)}))};e.on("keydown",function(t){var e=t.keyCode;91===e||e>15&&19>e||e>=37&&40>=e||l(t,this,this.value)}),i.hasEvent("paste")&&e.on("paste cut",l)}e.on("change",u),r.$render=function(){e.val(r.$isEmpty(r.$viewValue)?"":r.$viewValue)}}function jn(t,e){if(_(t))return t;if(b(t)){Hi.lastIndex=0;var n=Hi.exec(t);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,u=0,c=yn(r),l=7*(i-1);return e&&(o=e.getHours(),a=e.getMinutes(),s=e.getSeconds(),u=e.getMilliseconds()),new Date(r,0,c.getDate()+l,o,a,s,u)}}return NaN}function Nn(t,e){return function(n,r){var i,a;if(_(n))return n;if(b(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),Fi.test(n))return new Date(n);if(t.lastIndex=0,i=t.exec(n))return i.shift(),a=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(i,function(t,n){n<e.length&&(a[e[n]]=+t)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function Pn(t,e,r,i){return function(o,a,s,u,c,l,f){function h(t){return t&&!(t.getTime&&t.getTime()!==t.getTime())}function d(t){return $(t)?_(t)?t:r(t):n}Rn(o,a,s,u),Dn(o,a,s,u,c,l);var p,m=u&&u.$options&&u.$options.timezone;if(u.$$parserName=t,u.$parsers.push(function(t){if(u.$isEmpty(t))return null;if(e.test(t)){var i=r(t,p);return"UTC"===m&&i.setMinutes(i.getMinutes()-i.getTimezoneOffset()),i}return n}),u.$formatters.push(function(t){if(t&&!_(t))throw _o("datefmt","Expected `{0}` to be a date",t);if(h(t)){if(p=t,p&&"UTC"===m){var e=6e4*p.getTimezoneOffset();p=new Date(p.getTime()+e)}return f("date")(t,i,m)}return p=null,""}),$(s.min)||s.ngMin){var v;u.$validators.min=function(t){return!h(t)||g(v)||r(t)>=v},s.$observe("min",function(t){v=d(t),u.$validate()})}if($(s.max)||s.ngMax){var y;u.$validators.max=function(t){return!h(t)||g(y)||r(t)<=y},s.$observe("max",function(t){y=d(t),u.$validate()})}}}function Rn(t,e,r,i){var o=e[0],a=i.$$hasNativeValidators=y(o.validity);a&&i.$parsers.push(function(t){var r=e.prop(Zn)||{};return r.badInput&&!r.typeMismatch?n:t})}function Fn(t,e,r,i,o,a){if(Rn(t,e,r,i),Dn(t,e,r,i,o,a),i.$$parserName="number",i.$parsers.push(function(t){return i.$isEmpty(t)?null:Ui.test(t)?parseFloat(t):n}),i.$formatters.push(function(t){if(!i.$isEmpty(t)){if(!w(t))throw _o("numfmt","Expected `{0}` to be a number",t);t=t.toString()}return t}),$(r.min)||r.ngMin){var s;i.$validators.min=function(t){return i.$isEmpty(t)||g(s)||t>=s},r.$observe("min",function(t){$(t)&&!w(t)&&(t=parseFloat(t,10)),s=w(t)&&!isNaN(t)?t:n,i.$validate()})}if($(r.max)||r.ngMax){var u;i.$validators.max=function(t){return i.$isEmpty(t)||g(u)||u>=t},r.$observe("max",function(t){$(t)&&!w(t)&&(t=parseFloat(t,10)),u=w(t)&&!isNaN(t)?t:n,i.$validate()})}}function Bn(t,e,n,r,i,o){Dn(t,e,n,r,i,o),zn(r),r.$$parserName="url",r.$validators.url=function(t,e){var n=t||e;return r.$isEmpty(n)||Bi.test(n)}}function Ln(t,e,n,r,i,o){Dn(t,e,n,r,i,o),zn(r),r.$$parserName="email",r.$validators.email=function(t,e){var n=t||e;return r.$isEmpty(n)||Li.test(n)}}function Un(t,e,n,r){g(n.name)&&e.attr("name",c());var i=function(t){e[0].checked&&r.$setViewValue(n.value,t&&t.type)};e.on("click",i),r.$render=function(){var t=n.value;e[0].checked=t==r.$viewValue},n.$observe("value",r.$render)}function Vn(t,e,n,r,i){var o;if($(r)){if(o=t(r),!o.constant)throw _o("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return o(e)}return i}function qn(t,e,n,r,i,o,a,s){var u=Vn(s,t,"ngTrueValue",n.ngTrueValue,!0),c=Vn(s,t,"ngFalseValue",n.ngFalseValue,!1),l=function(t){r.$setViewValue(e[0].checked,t&&t.type)};e.on("click",l),r.$render=function(){e[0].checked=r.$viewValue},r.$isEmpty=function(t){return t===!1},r.$formatters.push(function(t){return R(t,u)}),r.$parsers.push(function(t){return t?u:c})}function Hn(t,e){return t="ngClass"+t,["$animate",function(n){function r(t,e){var n=[];t:for(var r=0;r<t.length;r++){for(var i=t[r],o=0;o<e.length;o++)if(i==e[o])continue t;n.push(i)}return n}function i(t){if(dr(t))return t;if(b(t))return t.split(" ");if(y(t)){var e=[];return o(t,function(t,n){t&&(e=e.concat(n.split(" ")))}),e}return t}return{restrict:"AC",link:function(a,s,u){function c(t){var e=f(t,1);u.$addClass(e)}function l(t){var e=f(t,-1);u.$removeClass(e)}function f(t,e){var n=s.data("$classCounts")||{},r=[];return o(t,function(t){(e>0||n[t])&&(n[t]=(n[t]||0)+e,n[t]===+(e>0)&&r.push(t))}),s.data("$classCounts",n),r.join(" ")}function h(t,e){var i=r(e,t),o=r(t,e);i=f(i,1),o=f(o,-1),i&&i.length&&n.addClass(s,i),o&&o.length&&n.removeClass(s,o)}function d(t){if(e===!0||a.$index%2===e){var n=i(t||[]);if(p){if(!R(t,p)){var r=i(p);h(r,n)}}else c(n)}p=P(t)}var p;a.$watch(u[t],d,!0),u.$observe("class",function(e){d(a.$eval(u[t]))}),"ngClass"!==t&&a.$watch("$index",function(n,r){var o=1&n;if(o!==(1&r)){var s=i(a.$eval(u[t]));o===e?c(s):l(s)}})}}}]}function Wn(t){function e(t,e,u){e===n?r("$pending",t,u):i("$pending",t,u),O(e)?e?(f(s.$error,t,u),l(s.$$success,t,u)):(l(s.$error,t,u),f(s.$$success,t,u)):(f(s.$error,t,u),f(s.$$success,t,u)),s.$pending?(o(wo,!0),s.$valid=s.$invalid=n,a("",null)):(o(wo,!1),s.$valid=Xn(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var c;c=s.$pending&&s.$pending[t]?n:s.$error[t]?!1:s.$$success[t]?!0:null,a(t,c),h.$setValidity(t,c,s)}function r(t,e,n){s[t]||(s[t]={}),l(s[t],e,n)}function i(t,e,r){s[t]&&f(s[t],e,r),Xn(s[t])&&(s[t]=n)}function o(t,e){e&&!c[t]?(d.addClass(u,t),c[t]=!0):!e&&c[t]&&(d.removeClass(u,t),c[t]=!1)}function a(t,e){t=t?"-"+nt(t,"-"):"",o(mo+t,e===!0),o(vo+t,e===!1)}var s=t.ctrl,u=t.$element,c={},l=t.set,f=t.unset,h=t.parentForm,d=t.$animate;c[vo]=!(c[mo]=u.hasClass(mo)),s.$setValidity=e}function Xn(t){if(t)for(var e in t)return!1;return!0}var Yn=/^\/(.+)\/([a-z]*)$/,Zn="validity",Gn=function(t){return b(t)?t.toLowerCase():t},Kn=Object.prototype.hasOwnProperty,Jn=function(t){return b(t)?t.toUpperCase():t},Qn=function(t){return b(t)?t.replace(/[A-Z]/g,function(t){return String.fromCharCode(32|t.charCodeAt(0))}):t},tr=function(t){return b(t)?t.replace(/[a-z]/g,function(t){return String.fromCharCode(-33&t.charCodeAt(0))}):t};"i"!=="I".toLowerCase()&&(Gn=Qn,Jn=tr);var er,nr,rr,ir,or=[].slice,ar=[].splice,sr=[].push,ur=Object.prototype.toString,cr=r("ng"),lr=t.angular||(t.angular={}),fr=0;er=e.documentMode,p.$inject=[],m.$inject=[];var hr,dr=Array.isArray,pr=function(t){return b(t)?t.trim():t},mr=function(t){return t.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},vr=function(){if($(vr.isActive_))return vr.isActive_;var t=!(!e.querySelector("[ng-csp]")&&!e.querySelector("[data-ng-csp]"));if(!t)try{new Function("")}catch(n){t=!0}return vr.isActive_=t},gr=["ng-","data-ng-","ng:","x-ng-"],$r=/[A-Z]/g,yr=!1,br=1,wr=2,_r=3,xr=8,Cr=9,Er=11,kr={full:"1.3.20",major:1,minor:3,dot:20,codeName:"shallow-translucence"};bt.expando="ng339";var Ar=bt.cache={},Sr=1,Tr=function(t,e,n){t.addEventListener(e,n,!1)},Or=function(t,e,n){t.removeEventListener(e,n,!1)};bt._data=function(t){return this.cache[t[this.expando]]||{}};var Ir=/([\:\-\_]+(.))/g,zr=/^moz([A-Z])/,Mr={mouseleave:"mouseout",mouseenter:"mouseover"},Dr=r("jqLite"),jr=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Nr=/<|&#?\w+;/,Pr=/<([\w:]+)/,Rr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Fr={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Fr.optgroup=Fr.option,Fr.tbody=Fr.tfoot=Fr.colgroup=Fr.caption=Fr.thead,Fr.th=Fr.td;var Br=bt.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===e.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),bt(t).on("load",r))},toString:function(){var t=[];return o(this,function(e){t.push(""+e)}),"["+t.join(", ")+"]"},eq:function(t){return nr(t>=0?this[t]:this[this.length+t])},length:0,push:sr,sort:[].sort,splice:[].splice},Lr={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(t){Lr[Gn(t)]=t});var Ur={};o("input,select,option,textarea,button,form,details".split(","),function(t){Ur[t]=!0});var Vr={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:kt,removeData:Ct},function(t,e){bt[e]=t}),o({data:kt,inheritedData:zt,scope:function(t){return nr.data(t,"$scope")||zt(t.parentNode||t,["$isolateScope","$scope"])},isolateScope:function(t){return nr.data(t,"$isolateScope")||nr.data(t,"$isolateScopeNoTemplate")},controller:It,injector:function(t){return zt(t,"$injector")},removeAttr:function(t,e){t.removeAttribute(e)},hasClass:At,css:function(t,e,n){return e=mt(e),$(n)?void(t.style[e]=n):t.style[e]},attr:function(t,e,r){var i=t.nodeType;if(i!==_r&&i!==wr&&i!==xr){var o=Gn(e);if(Lr[o]){if(!$(r))return t[e]||(t.attributes.getNamedItem(e)||p).specified?o:n;r?(t[e]=!0,t.setAttribute(e,o)):(t[e]=!1,t.removeAttribute(o))}else if($(r))t.setAttribute(e,r);else if(t.getAttribute){var a=t.getAttribute(e,2);return null===a?n:a}}},prop:function(t,e,n){return $(n)?void(t[e]=n):t[e]},text:function(){function t(t,e){if(g(e)){var n=t.nodeType;return n===br||n===_r?t.textContent:""}t.textContent=e}return t.$dv="",t}(),val:function(t,e){if(g(e)){if(t.multiple&&"select"===D(t)){var n=[];return o(t.options,function(t){t.selected&&n.push(t.value||t.text)}),0===n.length?null:n}return t.value}t.value=e},html:function(t,e){return g(e)?t.innerHTML:(_t(t,!0),void(t.innerHTML=e))},empty:Mt},function(t,e){bt.prototype[e]=function(e,r){var i,o,a=this.length;if(t!==Mt&&(2==t.length&&t!==At&&t!==It?e:r)===n){if(y(e)){for(i=0;a>i;i++)if(t===kt)t(this[i],e);else for(o in e)t(this[i],o,e[o]);return this}for(var s=t.$dv,u=s===n?Math.min(a,1):a,c=0;u>c;c++){var l=t(this[c],e,r);s=s?s+l:l}return s}for(i=0;a>i;i++)t(this[i],e,r);return this}}),o({removeData:Ct,on:function Zo(t,e,n,r){if($(r))throw Dr("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(gt(t)){var i=Et(t,!0),o=i.events,a=i.handle;a||(a=i.handle=Rt(t,o));for(var s=e.indexOf(" ")>=0?e.split(" "):[e],u=s.length;u--;){e=s[u];var c=o[e];c||(o[e]=[],"mouseenter"===e||"mouseleave"===e?Zo(t,Mr[e],function(t){var n=this,r=t.relatedTarget;(!r||r!==n&&!n.contains(r))&&a(t,e)}):"$destroy"!==e&&Tr(t,e,a),c=o[e]),c.push(n)}}},off:xt,one:function(t,e,n){t=nr(t),t.on(e,function r(){t.off(e,n),t.off(e,r)}),t.on(e,n)},replaceWith:function(t,e){var n,r=t.parentNode;_t(t),o(new bt(e),function(e){n?r.insertBefore(e,n.nextSibling):r.replaceChild(e,t),n=e})},children:function(t){var e=[];return o(t.childNodes,function(t){t.nodeType===br&&e.push(t)}),e},contents:function(t){return t.contentDocument||t.childNodes||[]},append:function(t,e){var n=t.nodeType;if(n===br||n===Er){e=new bt(e);for(var r=0,i=e.length;i>r;r++){var o=e[r];t.appendChild(o)}}},prepend:function(t,e){if(t.nodeType===br){var n=t.firstChild;o(new bt(e),function(e){t.insertBefore(e,n)})}},wrap:function(t,e){e=nr(e).eq(0).clone()[0];var n=t.parentNode;n&&n.replaceChild(e,t),e.appendChild(t)},remove:Dt,detach:function(t){Dt(t,!0)},after:function(t,e){var n=t,r=t.parentNode;e=new bt(e);for(var i=0,o=e.length;o>i;i++){var a=e[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:Tt,removeClass:St,toggleClass:function(t,e,n){e&&o(e.split(" "),function(e){var r=n;g(r)&&(r=!At(t,e)),(r?Tt:St)(t,e)})},parent:function(t){var e=t.parentNode;return e&&e.nodeType!==Er?e:null},next:function(t){return t.nextElementSibling},find:function(t,e){return t.getElementsByTagName?t.getElementsByTagName(e):[]},clone:wt,triggerHandler:function(t,e,n){var r,i,a,s=e.type||e,u=Et(t),c=u&&u.events,l=c&&c[s];l&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:s,target:t},e.type&&(r=f(r,e)),i=P(l),a=n?[r].concat(n):[r],o(i,function(e){r.isImmediatePropagationStopped()||e.apply(t,a)}))}},function(t,e){bt.prototype[e]=function(e,n,r){for(var i,o=0,a=this.length;a>o;o++)g(i)?(i=t(this[o],e,n,r),$(i)&&(i=nr(i))):Ot(i,t(this[o],e,n,r));return $(i)?i:this},bt.prototype.bind=bt.prototype.on,bt.prototype.unbind=bt.prototype.off}),Lt.prototype={put:function(t,e){this[Bt(t,this.nextUid)]=e},get:function(t){return this[Bt(t,this.nextUid)]},remove:function(t){var e=this[t=Bt(t,this.nextUid)];return delete this[t],e}};var qr=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Hr=/,/,Wr=/^\s*(_?)(\S+?)\1\s*$/,Xr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Yr=r("$injector");qt.$$annotate=Vt;var Zr=r("$animate"),Gr=["$provide",function(t){this.$$selectors={},this.register=function(e,n){var r=e+"-animation";if(e&&"."!=e.charAt(0))throw Zr("notcsel","Expecting class selector starting with '.' got '{0}'.",e);this.$$selectors[e.substr(1)]=r,t.factory(r,n)},this.classNameFilter=function(t){return 1===arguments.length&&(this.$$classNameFilter=t instanceof RegExp?t:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(t,e,n){function r(e){var r,i=t.defer();return i.promise.$$cancelFn=function(){r&&r()},n.$$postDigest(function(){r=e(function(){i.resolve()})}),i.promise}function i(t,e){var n=[],r=[],i=ct();return o((t.attr("class")||"").split(/\s+/),function(t){i[t]=!0}),o(e,function(t,e){var o=i[e];t===!1&&o?r.push(e):t!==!0||o||n.push(e)}),n.length+r.length>0&&[n.length?n:null,r.length?r:null]}function a(t,e,n){for(var r=0,i=e.length;i>r;++r){var o=e[r];t[o]=n}}function s(){return c||(c=t.defer(),e(function(){c.resolve(),c=null})),c.promise}function u(t,e){if(lr.isObject(e)){var n=f(e.from||{},e.to||{});t.css(n)}}var c;return{animate:function(t,e,n){return u(t,{from:e,to:n}),s()},enter:function(t,e,n,r){return u(t,r),n?n.after(t):e.prepend(t),s()},leave:function(t,e){return u(t,e),t.remove(),s()},move:function(t,e,n,r){return this.enter(t,e,n,r)},addClass:function(t,e,n){return this.setClass(t,e,[],n)},$$addClassImmediately:function(t,e,n){return t=nr(t),e=b(e)?e:dr(e)?e.join(" "):"",o(t,function(t){Tt(t,e)}),u(t,n),s()},removeClass:function(t,e,n){return this.setClass(t,[],e,n);
},$$removeClassImmediately:function(t,e,n){return t=nr(t),e=b(e)?e:dr(e)?e.join(" "):"",o(t,function(t){St(t,e)}),u(t,n),s()},setClass:function(t,e,n,o){var s=this,u="$$animateClasses",c=!1;t=nr(t);var l=t.data(u);l?o&&l.options&&(l.options=lr.extend(l.options||{},o)):(l={classes:{},options:o},c=!0);var f=l.classes;return e=dr(e)?e:e.split(" "),n=dr(n)?n:n.split(" "),a(f,e,!0),a(f,n,!1),c&&(l.promise=r(function(e){var n=t.data(u);if(t.removeData(u),n){var r=i(t,n.classes);r&&s.$$setClassImmediately(t,r[0],r[1],n.options)}e()}),t.data(u,l)),l.promise},$$setClassImmediately:function(t,e,n,r){return e&&this.$$addClassImmediately(t,e),n&&this.$$removeClassImmediately(t,n),u(t,r),s()},enabled:p,cancel:p}}]}],Kr=r("$compile");Kt.$inject=["$provide","$$sanitizeUriProvider"];var Jr=/^((?:x|data)[\:\-_])/i,Qr=r("$controller"),ti="application/json",ei={"Content-Type":ti+";charset=utf-8"},ni=/^\[|^\{(?!\{)/,ri={"[":/]$/,"{":/}$/},ii=/^\)\]\}',?\n/,oi=r("$interpolate"),ai=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,si={http:80,https:443,ftp:21},ui=r("$location"),ci={$$html5:!1,$$replace:!1,absUrl:Se("$$absUrl"),url:function(t){if(g(t))return this.$$url;var e=ai.exec(t);return(e[1]||""===t)&&this.path(decodeURIComponent(e[1])),(e[2]||e[1]||""===t)&&this.search(e[3]||""),this.hash(e[5]||""),this},protocol:Se("$$protocol"),host:Se("$$host"),port:Se("$$port"),path:Te("$$path",function(t){return t=null!==t?t.toString():"","/"==t.charAt(0)?t:"/"+t}),search:function(t,e){switch(arguments.length){case 0:return this.$$search;case 1:if(b(t)||w(t))t=t.toString(),this.$$search=X(t);else{if(!y(t))throw ui("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");t=N(t,{}),o(t,function(e,n){null==e&&delete t[n]}),this.$$search=t}break;default:g(e)||null===e?delete this.$$search[t]:this.$$search[t]=e}return this.$$compose(),this},hash:Te("$$hash",function(t){return null!==t?t.toString():""}),replace:function(){return this.$$replace=!0,this}};o([Ae,ke,Ee],function(t){t.prototype=Object.create(ci),t.prototype.state=function(e){if(!arguments.length)return this.$$state;if(t!==Ee||!this.$$html5)throw ui("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=g(e)?null:e,this}});var li=r("$parse"),fi=Function.prototype.call,hi=Function.prototype.apply,di=Function.prototype.bind,pi=ct();o({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(t,e){t.constant=t.literal=t.sharedGetter=!0,pi[e]=t}),pi["this"]=function(t){return t},pi["this"].sharedGetter=!0;var mi=f(ct(),{"+":function(t,e,r,i){return r=r(t,e),i=i(t,e),$(r)?$(i)?r+i:r:$(i)?i:n},"-":function(t,e,n,r){return n=n(t,e),r=r(t,e),($(n)?n:0)-($(r)?r:0)},"*":function(t,e,n,r){return n(t,e)*r(t,e)},"/":function(t,e,n,r){return n(t,e)/r(t,e)},"%":function(t,e,n,r){return n(t,e)%r(t,e)},"===":function(t,e,n,r){return n(t,e)===r(t,e)},"!==":function(t,e,n,r){return n(t,e)!==r(t,e)},"==":function(t,e,n,r){return n(t,e)==r(t,e)},"!=":function(t,e,n,r){return n(t,e)!=r(t,e)},"<":function(t,e,n,r){return n(t,e)<r(t,e)},">":function(t,e,n,r){return n(t,e)>r(t,e)},"<=":function(t,e,n,r){return n(t,e)<=r(t,e)},">=":function(t,e,n,r){return n(t,e)>=r(t,e)},"&&":function(t,e,n,r){return n(t,e)&&r(t,e)},"||":function(t,e,n,r){return n(t,e)||r(t,e)},"!":function(t,e,n){return!n(t,e)},"=":!0,"|":!0}),vi={n:"\n",f:"\f",r:"\r",t:" ",v:"\x0B","'":"'",'"':'"'},gi=function(t){this.options=t};gi.prototype={constructor:gi,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index<this.text.length;){var e=this.text.charAt(this.index);if('"'===e||"'"===e)this.readString(e);else if(this.isNumber(e)||"."===e&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(e))this.readIdent();else if(this.is(e,"(){}[].,;:?"))this.tokens.push({index:this.index,text:e}),this.index++;else if(this.isWhitespace(e))this.index++;else{var n=e+this.peek(),r=n+this.peek(2),i=mi[e],o=mi[n],a=mi[r];if(i||o||a){var s=a?r:o?n:e;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(t,e){return-1!==e.indexOf(t)},peek:function(t){var e=t||1;return this.index+e<this.text.length?this.text.charAt(this.index+e):!1},isNumber:function(t){return t>="0"&&"9">=t&&"string"==typeof t},isWhitespace:function(t){return" "===t||"\r"===t||" "===t||"\n"===t||"\x0B"===t||" "===t},isIdent:function(t){return t>="a"&&"z">=t||t>="A"&&"Z">=t||"_"===t||"$"===t},isExpOperator:function(t){return"-"===t||"+"===t||this.isNumber(t)},throwError:function(t,e,n){n=n||this.index;var r=$(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,n)+"]":" "+n;throw li("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,r,this.text)},readNumber:function(){for(var t="",e=this.index;this.index<this.text.length;){var n=Gn(this.text.charAt(this.index));if("."==n||this.isNumber(n))t+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))t+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==t.charAt(t.length-1))t+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=t.charAt(t.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:e,text:t,constant:!0,value:Number(t)})},readIdent:function(){for(var t=this.index;this.index<this.text.length;){var e=this.text.charAt(this.index);if(!this.isIdent(e)&&!this.isNumber(e))break;this.index++}this.tokens.push({index:t,text:this.text.slice(t,this.index),identifier:!0})},readString:function(t){var e=this.index;this.index++;for(var n="",r=t,i=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(r+=o,i){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{var s=vi[o];n+=s||o}i=!1}else if("\\"===o)i=!0;else{if(o===t)return this.index++,void this.tokens.push({index:e,text:r,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",e)}};var $i=function(t,e,n){this.lexer=t,this.$filter=e,this.options=n};$i.ZERO=f(function(){return 0},{sharedGetter:!0,constant:!0}),$i.prototype={constructor:$i,parse:function(t){this.text=t,this.tokens=this.lexer.lex(t);var e=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),e.literal=!!e.literal,e.constant=!!e.constant,e},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.peek().identifier&&this.peek().text in pi?t=pi[this.consume().text]:this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var e,n;e=this.expect("(","[",".");)"("===e.text?(t=this.functionCall(t,n),n=null):"["===e.text?(n=t,t=this.objectIndex(t)):"."===e.text?(n=t,t=this.fieldAccess(t)):this.throwError("IMPOSSIBLE");return t},throwError:function(t,e){throw li("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},peekToken:function(){if(0===this.tokens.length)throw li("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,n,r){return this.peekAhead(0,t,e,n,r)},peekAhead:function(t,e,n,r,i){if(this.tokens.length>t){var o=this.tokens[t],a=o.text;if(a===e||a===n||a===r||a===i||!e&&!n&&!r&&!i)return o}return!1},expect:function(t,e,n,r){var i=this.peek(t,e,n,r);return i?(this.tokens.shift(),i):!1},consume:function(t){if(0===this.tokens.length)throw li("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},unaryFn:function(t,e){var n=mi[t];return f(function(t,r){return n(t,r,e)},{constant:e.constant,inputs:[e]})},binaryFn:function(t,e,n,r){var i=mi[e];return f(function(e,r){return i(e,r,t,n)},{constant:t.constant&&n.constant,inputs:!r&&[t,n]})},identifier:function(){for(var t=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)t+=this.consume().text+this.consume().text;return Le(t,this.options,this.text)},constant:function(){var t=this.consume().value;return f(function(){return t},{constant:!0,literal:!0})},statements:function(){for(var t=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&t.push(this.filterChain()),!this.expect(";"))return 1===t.length?t[0]:function(e,n){for(var r,i=0,o=t.length;o>i;i++)r=t[i](e,n);return r}},filterChain:function(){for(var t,e=this.expression();t=this.expect("|");)e=this.filter(e);return e},filter:function(t){var e,r,i=this.$filter(this.consume().text);if(this.peek(":"))for(e=[],r=[];this.expect(":");)e.push(this.expression());var o=[t].concat(e||[]);return f(function(o,a){var s=t(o,a);if(r){r[0]=s;for(var u=e.length;u--;)r[u+1]=e[u](o,a);return i.apply(n,r)}return i(s)},{constant:!i.$stateful&&o.every(Ne),inputs:!i.$stateful&&o})},expression:function(){return this.assignment()},assignment:function(){var t,e,n=this.ternary();return(e=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,e.index)+"] can not be assigned to",e),t=this.ternary(),f(function(e,r){return n.assign(e,t(e,r),r)},{inputs:[n,t]})):n},ternary:function(){var t,e,n=this.logicalOR();if((e=this.expect("?"))&&(t=this.assignment(),this.consume(":"))){var r=this.assignment();return f(function(e,i){return n(e,i)?t(e,i):r(e,i)},{constant:n.constant&&t.constant&&r.constant})}return n},logicalOR:function(){for(var t,e=this.logicalAND();t=this.expect("||");)e=this.binaryFn(e,t.text,this.logicalAND(),!0);return e},logicalAND:function(){for(var t,e=this.equality();t=this.expect("&&");)e=this.binaryFn(e,t.text,this.equality(),!0);return e},equality:function(){for(var t,e=this.relational();t=this.expect("==","!=","===","!==");)e=this.binaryFn(e,t.text,this.relational());return e},relational:function(){for(var t,e=this.additive();t=this.expect("<",">","<=",">=");)e=this.binaryFn(e,t.text,this.additive());return e},additive:function(){for(var t,e=this.multiplicative();t=this.expect("+","-");)e=this.binaryFn(e,t.text,this.multiplicative());return e},multiplicative:function(){for(var t,e=this.unary();t=this.expect("*","/","%");)e=this.binaryFn(e,t.text,this.unary());return e},unary:function(){var t;return this.expect("+")?this.primary():(t=this.expect("-"))?this.binaryFn($i.ZERO,t.text,this.unary()):(t=this.expect("!"))?this.unaryFn(t.text,this.unary()):this.primary()},fieldAccess:function(t){var e=this.identifier();return f(function(r,i,o){var a=o||t(r,i);return null==a?n:e(a)},{assign:function(n,r,i){var o=t(n,i);return o||t.assign(n,o={},i),e.assign(o,r)}})},objectIndex:function(t){var e=this.text,r=this.expression();return this.consume("]"),f(function(i,o){var a,s=t(i,o),u=Me(r(i,o),e);return ze(u,e),s?a=De(s[u],e):n},{assign:function(n,i,o){var a=ze(Me(r(n,o),e),e),s=De(t(n,o),e);return s||t.assign(n,s={},o),s[a]=i}})},functionCall:function(t,e){var r=[];if(")"!==this.peekToken().text)do r.push(this.expression());while(this.expect(","));this.consume(")");var i=this.text,o=r.length?[]:null;return function(a,s){var u=e?e(a,s):$(e)?n:a,c=t(a,s,u)||p;if(o)for(var l=r.length;l--;)o[l]=De(r[l](a,s),i);De(u,i),je(c,i);var f=c.apply?c.apply(u,o):c(o[0],o[1],o[2],o[3],o[4]);return o&&(o.length=0),De(f,i)}},arrayDeclaration:function(){var t=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),f(function(e,n){for(var r=[],i=0,o=t.length;o>i;i++)r.push(t[i](e,n));return r},{literal:!0,constant:t.every(Ne),inputs:t})},object:function(){var t=[],e=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.consume();n.constant?t.push(n.value):n.identifier?t.push(n.text):this.throwError("invalid key",n),this.consume(":"),e.push(this.expression())}while(this.expect(","));return this.consume("}"),f(function(n,r){for(var i={},o=0,a=e.length;a>o;o++)i[t[o]]=e[o](n,r);return i},{literal:!0,constant:e.every(Ne),inputs:e})}};var yi=ct(),bi=ct(),wi=Object.prototype.valueOf,_i=r("$sce"),xi={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Kr=r("$compile"),Ci=e.createElement("a"),Ei=on(t.location.href);un.$inject=["$provide"],hn.$inject=["$locale"],dn.$inject=["$locale"];var ki=".",Ai={yyyy:vn("FullYear",4),yy:vn("FullYear",2,0,!0),y:vn("FullYear",1),MMMM:gn("Month"),MMM:gn("Month",!0),MM:vn("Month",2,1),M:vn("Month",1,1),dd:vn("Date",2),d:vn("Date",1),HH:vn("Hours",2),H:vn("Hours",1),hh:vn("Hours",2,-12),h:vn("Hours",1,-12),mm:vn("Minutes",2),m:vn("Minutes",1),ss:vn("Seconds",2),s:vn("Seconds",1),sss:vn("Milliseconds",3),EEEE:gn("Day"),EEE:gn("Day",!0),a:_n,Z:$n,ww:wn(2),w:wn(1),G:xn,GG:xn,GGG:xn,GGGG:Cn},Si=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Ti=/^\-?\d+$/;En.$inject=["$locale"];var Oi=v(Gn),Ii=v(Jn);Sn.$inject=["$parse"];var zi=v({restrict:"E",compile:function(t,e){return e.href||e.xlinkHref||e.name?void 0:function(t,e){if("a"===e[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===ur.call(e.prop("href"))?"xlink:href":"href";e.on("click",function(t){e.attr(n)||t.preventDefault()})}}}}),Mi={};o(Lr,function(t,e){if("multiple"!=t){var n=Jt("ng-"+e);Mi[n]=function(){return{restrict:"A",priority:100,link:function(t,r,i){t.$watch(i[n],function(t){i.$set(e,!!t)})}}}}}),o(Vr,function(t,e){Mi[e]=function(){return{priority:100,link:function(t,n,r){if("ngPattern"===e&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(Yn);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}t.$watch(r[e],function(t){r.$set(e,t)})}}}}),o(["src","srcset","href"],function(t){var e=Jt("ng-"+t);Mi[e]=function(){return{priority:99,link:function(n,r,i){var o=t,a=t;"href"===t&&"[object SVGAnimatedString]"===ur.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(e,function(e){return e?(i.$set(a,e),void(er&&o&&r.prop(o,i[a]))):void("href"===t&&i.$set(a,null))})}}}});var Di={$addControl:p,$$renameControl:On,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},ji="ng-submitted";In.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Ni=function(t){return["$timeout",function(e){var r={name:"form",restrict:t?"EAC":"E",controller:In,compile:function(r,i){r.addClass(go).addClass(mo);var o=i.name?"name":t&&i.ngForm?"ngForm":!1;return{pre:function(t,r,i,a){if(!("action"in i)){var s=function(e){t.$apply(function(){a.$commitViewValue(),a.$setSubmitted()}),e.preventDefault()};Tr(r[0],"submit",s),r.on("$destroy",function(){e(function(){Or(r[0],"submit",s)},0,!1)})}var u=a.$$parentForm;o&&(Pe(t,null,a.$name,a,a.$name),i.$observe(o,function(e){a.$name!==e&&(Pe(t,null,a.$name,n,a.$name),u.$$renameControl(a,e),Pe(t,null,a.$name,a,a.$name))})),r.on("$destroy",function(){u.$removeControl(a),o&&Pe(t,null,i[o],n,a.$name),f(a,Di)})}}}};return r}]},Pi=Ni(),Ri=Ni(!0),Fi=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Bi=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Li=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Ui=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Vi=/^(\d{4})-(\d{2})-(\d{2})$/,qi=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Hi=/^(\d{4})-W(\d\d)$/,Wi=/^(\d{4})-(\d\d)$/,Xi=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Yi={text:Mn,date:Pn("date",Vi,Nn(Vi,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":Pn("datetimelocal",qi,Nn(qi,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:Pn("time",Xi,Nn(Xi,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:Pn("week",Hi,jn,"yyyy-Www"),month:Pn("month",Wi,Nn(Wi,["yyyy","MM"]),"yyyy-MM"),number:Fn,url:Bn,email:Ln,radio:Un,checkbox:qn,hidden:p,button:p,submit:p,reset:p,file:p},Zi=["$browser","$sniffer","$filter","$parse",function(t,e,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){s[0]&&(Yi[Gn(a.type)]||Yi.text)(i,o,a,s[0],e,t,n,r)}}}}],Gi=/^(true|false|\d+)$/,Ki=function(){return{restrict:"A",priority:100,compile:function(t,e){return Gi.test(e.ngValue)?function(t,e,n){n.$set("value",t.$eval(n.ngValue))}:function(t,e,n){t.$watch(n.ngValue,function(t){n.$set("value",t)})}}}},Ji=["$compile",function(t){return{restrict:"AC",compile:function(e){return t.$$addBindingClass(e),function(e,r,i){t.$$addBindingInfo(r,i.ngBind),r=r[0],e.$watch(i.ngBind,function(t){r.textContent=t===n?"":t})}}}}],Qi=["$interpolate","$compile",function(t,e){return{compile:function(r){return e.$$addBindingClass(r),function(r,i,o){var a=t(i.attr(o.$attr.ngBindTemplate));e.$$addBindingInfo(i,a.expressions),i=i[0],o.$observe("ngBindTemplate",function(t){i.textContent=t===n?"":t})}}}}],to=["$sce","$parse","$compile",function(t,e,n){return{restrict:"A",compile:function(r,i){var o=e(i.ngBindHtml),a=e(i.ngBindHtml,function(t){return(t||"").toString()});return n.$$addBindingClass(r),function(e,r,i){n.$$addBindingInfo(r,i.ngBindHtml),e.$watch(a,function(){r.html(t.getTrustedHtml(o(e))||"")})}}}}],eo=v({restrict:"A",require:"ngModel",link:function(t,e,n,r){r.$viewChangeListeners.push(function(){t.$eval(n.ngChange)})}}),no=Hn("",!0),ro=Hn("Odd",0),io=Hn("Even",1),oo=Tn({compile:function(t,e){e.$set("ngCloak",n),t.removeClass("ng-cloak")}}),ao=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],so={},uo={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(t){var e=Jt("ng-"+t);so[e]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,o){var a=n(o[e],null,!0);return function(e,n){n.on(t,function(n){var i=function(){a(e,{$event:n})};uo[t]&&r.$$phase?e.$evalAsync(i):e.$apply(i)})}}}}]});var co=["$animate",function(t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,u,c;n.$watch(i.ngIf,function(n){n?u||a(function(n,o){u=o,n[n.length++]=e.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},t.enter(n,r.parent(),r)}):(c&&(c.remove(),c=null),u&&(u.$destroy(),u=null),s&&(c=ut(s.clone),t.leave(c).then(function(){c=null}),s=null))})}}}],lo=["$templateRequest","$anchorScroll","$animate",function(t,e,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:lr.noop,compile:function(r,i){var o=i.ngInclude||i.src,a=i.onload||"",s=i.autoscroll;return function(r,i,u,c,l){var f,h,d,p=0,m=function(){h&&(h.remove(),h=null),f&&(f.$destroy(),f=null),d&&(n.leave(d).then(function(){h=null}),h=d,d=null)};r.$watch(o,function(o){var u=function(){!$(s)||s&&!r.$eval(s)||e()},h=++p;o?(t(o,!0).then(function(t){if(h===p){var e=r.$new();c.template=t;var s=l(e,function(t){m(),n.enter(t,null,i).then(u)});f=e,d=s,f.$emit("$includeContentLoaded",o),r.$eval(a)}},function(){h===p&&(m(),r.$emit("$includeContentError",o))}),r.$emit("$includeContentRequested",o)):(m(),c.template=null)})}}}}],fo=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){return/SVG/.test(r[0].toString())?(r.empty(),void t($t(o.template,e).childNodes)(n,function(t){r.append(t)},{futureParentElement:r})):(r.html(o.template),void t(r.contents())(n))}}}],ho=Tn({priority:450,compile:function(){return{pre:function(t,e,n){t.$eval(n.ngInit)}}}}),po=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(t,e,r,i){var a=e.attr(r.$attr.ngList)||", ",s="false"!==r.ngTrim,u=s?pr(a):a,c=function(t){if(!g(t)){var e=[];return t&&o(t.split(u),function(t){t&&e.push(s?pr(t):t)}),e}};i.$parsers.push(c),i.$formatters.push(function(t){return dr(t)?t.join(a):n}),i.$isEmpty=function(t){return!t||!t.length}}}},mo="ng-valid",vo="ng-invalid",go="ng-pristine",$o="ng-dirty",yo="ng-untouched",bo="ng-touched",wo="ng-pending",_o=r("ngModel"),xo=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(t,e,r,i,a,s,u,c,l,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=f(r.name||"",!1)(t);var h,d=a(r.ngModel),m=d.assign,v=d,y=m,b=null,_=this;this.$$setOptions=function(t){if(_.$options=t,t&&t.getterSetter){var e=a(r.ngModel+"()"),n=a(r.ngModel+"($$$p)");v=function(t){var n=d(t);return x(n)&&(n=e(t)),n},y=function(t,e){x(d(t))?n(t,{$$$p:_.$modelValue}):m(t,_.$modelValue)}}else if(!d.assign)throw _o("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,H(i))},this.$render=p,this.$isEmpty=function(t){return g(t)||""===t||null===t||t!==t};var C=i.inheritedData("$formController")||Di,E=0;Wn({ctrl:this,$element:i,set:function(t,e){t[e]=!0},unset:function(t,e){delete t[e]},parentForm:C,$animate:s}),this.$setPristine=function(){_.$dirty=!1,_.$pristine=!0,s.removeClass(i,$o),s.addClass(i,go)},this.$setDirty=function(){_.$dirty=!0,_.$pristine=!1,s.removeClass(i,go),s.addClass(i,$o),C.$setDirty()},this.$setUntouched=function(){_.$touched=!1,_.$untouched=!0,s.setClass(i,yo,bo)},this.$setTouched=function(){_.$touched=!0,_.$untouched=!1,s.setClass(i,bo,yo)},this.$rollbackViewValue=function(){u.cancel(b),_.$viewValue=_.$$lastCommittedViewValue,_.$render()},this.$validate=function(){if(!w(_.$modelValue)||!isNaN(_.$modelValue)){var t=_.$$lastCommittedViewValue,e=_.$$rawModelValue,r=_.$valid,i=_.$modelValue,o=_.$options&&_.$options.allowInvalid;_.$$runValidators(e,t,function(t){o||r===t||(_.$modelValue=t?e:n,_.$modelValue!==i&&_.$$writeModelToScope())})}},this.$$runValidators=function(t,e,r){function i(){var t=_.$$parserName||"parse";return h!==n?(h||(o(_.$validators,function(t,e){u(e,null)}),o(_.$asyncValidators,function(t,e){u(e,null)})),u(t,h),h):(u(t,null),!0)}function a(){var n=!0;return o(_.$validators,function(r,i){var o=r(t,e);n=n&&o,u(i,o)}),n?!0:(o(_.$asyncValidators,function(t,e){u(e,null)}),!1)}function s(){var r=[],i=!0;o(_.$asyncValidators,function(o,a){var s=o(t,e);if(!I(s))throw _o("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);u(a,n),r.push(s.then(function(){u(a,!0)},function(t){i=!1,u(a,!1)}))}),r.length?l.all(r).then(function(){c(i)},p):c(!0)}function u(t,e){f===E&&_.$setValidity(t,e)}function c(t){f===E&&r(t)}E++;var f=E;return i()&&a()?void s():void c(!1)},this.$commitViewValue=function(){var t=_.$viewValue;u.cancel(b),(_.$$lastCommittedViewValue!==t||""===t&&_.$$hasNativeValidators)&&(_.$$lastCommittedViewValue=t,_.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function e(){_.$modelValue!==a&&_.$$writeModelToScope()}var r=_.$$lastCommittedViewValue,i=r;if(h=g(i)?n:!0)for(var o=0;o<_.$parsers.length;o++)if(i=_.$parsers[o](i),g(i)){h=!1;break}w(_.$modelValue)&&isNaN(_.$modelValue)&&(_.$modelValue=v(t));var a=_.$modelValue,s=_.$options&&_.$options.allowInvalid;_.$$rawModelValue=i,s&&(_.$modelValue=i,e()),_.$$runValidators(i,_.$$lastCommittedViewValue,function(t){s||(_.$modelValue=t?i:n,e())})},this.$$writeModelToScope=function(){y(t,_.$modelValue),o(_.$viewChangeListeners,function(t){try{t()}catch(n){e(n)}})},this.$setViewValue=function(t,e){_.$viewValue=t,(!_.$options||_.$options.updateOnDefault)&&_.$$debounceViewValueCommit(e)},this.$$debounceViewValueCommit=function(e){var n,r=0,i=_.$options;i&&$(i.debounce)&&(n=i.debounce,w(n)?r=n:w(n[e])?r=n[e]:w(n["default"])&&(r=n["default"])),u.cancel(b),r?b=u(function(){_.$commitViewValue()},r):c.$$phase?_.$commitViewValue():t.$apply(function(){_.$commitViewValue()})},t.$watch(function(){var e=v(t);if(e!==_.$modelValue&&(_.$modelValue===_.$modelValue||e===e)){_.$modelValue=_.$$rawModelValue=e,h=n;for(var r=_.$formatters,i=r.length,o=e;i--;)o=r[i](o);_.$viewValue!==o&&(_.$viewValue=_.$$lastCommittedViewValue=o,_.$render(),_.$$runValidators(e,o,p))}return e})}],Co=["$rootScope",function(t){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:xo,priority:1,compile:function(e){return e.addClass(go).addClass(yo).addClass(mo),{pre:function(t,e,n,r){var i=r[0],o=r[1]||Di;i.$$setOptions(r[2]&&r[2].$options),o.$addControl(i),n.$observe("name",function(t){i.$name!==t&&o.$$renameControl(i,t)}),t.$on("$destroy",function(){o.$removeControl(i)})},post:function(e,n,r,i){var o=i[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(t){o.$$debounceViewValueCommit(t&&t.type)}),n.on("blur",function(n){o.$touched||(t.$$phase?e.$evalAsync(o.$setTouched):e.$apply(o.$setTouched))})}}}}}],Eo=/(\s+|^)default(\s+|$)/,ko=function(){return{restrict:"A",controller:["$scope","$attrs",function(t,e){var r=this;this.$options=t.$eval(e.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=pr(this.$options.updateOn.replace(Eo,function(){return r.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},Ao=Tn({terminal:!0,priority:1e3}),So=["$locale","$interpolate",function(t,e){var n=/{}/g,r=/^when(Minus)?(.+)$/;return{restrict:"EA",link:function(i,a,s){function u(t){a.text(t||"")}var c,l=s.count,f=s.$attr.when&&a.attr(s.$attr.when),h=s.offset||0,d=i.$eval(f)||{},p={},m=e.startSymbol(),v=e.endSymbol(),g=m+l+"-"+h+v,$=lr.noop;o(s,function(t,e){var n=r.exec(e);if(n){var i=(n[1]?"-":"")+Gn(n[2]);d[i]=a.attr(s.$attr[e])}}),o(d,function(t,r){p[r]=e(t.replace(n,g))}),i.$watch(l,function(e){var n=parseFloat(e),r=isNaN(n);r||n in d||(n=t.pluralCat(n-h)),n===c||r&&isNaN(c)||($(),$=i.$watch(p[n],u),c=n)})}}}],To=["$parse","$animate",function(t,a){var s="$$NG_REMOVED",u=r("ngRepeat"),c=function(t,e,n,r,i,o,a){t[n]=r,i&&(t[i]=o),t.$index=e,t.$first=0===e,t.$last=e===a-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0===(1&e))},l=function(t){return t.clone[0]},f=function(t){return t.clone[t.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,h){var d=h.ngRepeat,p=e.createComment(" end ngRepeat: "+d+" "),m=d.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!m)throw u("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",d);var v=m[1],g=m[2],$=m[3],y=m[4];if(m=v.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!m)throw u("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",v);var b=m[3]||m[1],w=m[2];if($&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test($)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test($)))throw u("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",$);var _,x,C,E,k={$id:Bt};return y?_=t(y):(C=function(t,e){return Bt(e)},E=function(t){return t}),function(t,e,r,h,m){_&&(x=function(e,n,r){return w&&(k[w]=e),k[b]=n,k.$index=r,_(t,k)});var v=ct();t.$watchCollection(g,function(r){var h,g,y,_,k,A,S,T,O,I,z,M,D=e[0],j=ct();if($&&(t[$]=r),i(r))O=r,T=x||C;else{T=x||E,O=[];for(var N in r)r.hasOwnProperty(N)&&"$"!=N.charAt(0)&&O.push(N);O.sort()}for(_=O.length,z=new Array(_),h=0;_>h;h++)if(k=r===O?h:O[h],A=r[k],S=T(k,A,h),v[S])I=v[S],delete v[S],j[S]=I,z[h]=I;else{if(j[S])throw o(z,function(t){t&&t.scope&&(v[t.id]=t)}),u("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",d,S,A);z[h]={id:S,scope:n,clone:n},j[S]=!0}for(var P in v){if(I=v[P],M=ut(I.clone),a.leave(M),M[0].parentNode)for(h=0,g=M.length;g>h;h++)M[h][s]=!0;I.scope.$destroy()}for(h=0;_>h;h++)if(k=r===O?h:O[h],A=r[k],I=z[h],I.scope){y=D;do y=y.nextSibling;while(y&&y[s]);l(I)!=y&&a.move(ut(I.clone),null,nr(D)),D=f(I),c(I.scope,h,b,A,w,k,_)}else m(function(t,e){I.scope=e;var n=p.cloneNode(!1);t[t.length++]=n,a.enter(t,null,nr(D)),D=n,I.clone=t,j[I.id]=I,c(I.scope,h,b,A,w,k,_)});v=j})}}}}],Oo="ng-hide",Io="ng-hide-animate",zo=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngShow,function(e){t[e?"removeClass":"addClass"](n,Oo,{tempClasses:Io})})}}}],Mo=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngHide,function(e){t[e?"addClass":"removeClass"](n,Oo,{tempClasses:Io})})}}}],Do=Tn(function(t,e,n){t.$watch(n.ngStyle,function(t,n){n&&t!==n&&o(n,function(t,n){e.css(n,"")}),t&&e.css(t)},!0)}),jo=["$animate",function(t){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,a){var s=i.ngSwitch||i.on,u=[],c=[],l=[],f=[],h=function(t,e){return function(){t.splice(e,1)}};n.$watch(s,function(n){var r,i;for(r=0,i=l.length;i>r;++r)t.cancel(l[r]);for(l.length=0,r=0,i=f.length;i>r;++r){var s=ut(c[r].clone);f[r].$destroy();var d=l[r]=t.leave(s);d.then(h(l,r))}c.length=0,f.length=0,(u=a.cases["!"+n]||a.cases["?"])&&o(u,function(n){n.transclude(function(r,i){f.push(i);var o=n.element;r[r.length++]=e.createComment(" end ngSwitchWhen: ");var a={clone:r};c.push(a),t.enter(r,o.parent(),o)})})})}}}],No=Tn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:e})}}),Po=Tn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:e})}}),Ro=Tn({restrict:"EAC",link:function(t,e,n,i,o){if(!o)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",H(e));o(function(t){e.empty(),e.append(t)})}}),Fo=["$templateCache",function(t){return{restrict:"E",terminal:!0,compile:function(e,n){if("text/ng-template"==n.type){var r=n.id,i=e[0].text;t.put(r,i)}}}}],Bo=r("ngOptions"),Lo=v({restrict:"A",terminal:!0}),Uo=["$compile","$parse",function(t,r){var i=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,s={$setViewValue:p};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(t,e,n){var r,i,o=this,a={},u=s;o.databound=n.ngModel,o.init=function(t,e,n){u=t,r=e,i=n},o.addOption=function(e,n){at(e,'"option value"'),a[e]=!0,u.$viewValue==e&&(t.val(e),i.parent()&&i.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},o.removeOption=function(t){this.hasOption(t)&&(delete a[t],u.$viewValue===t&&this.renderUnknownOption(t))},o.renderUnknownOption=function(e){var n="? "+Bt(e)+" ?";i.val(n),t.prepend(i),t.val(n),i.prop("selected",!0)},o.hasOption=function(t){return a.hasOwnProperty(t)},e.$on("$destroy",function(){o.renderUnknownOption=p})}],link:function(s,u,c,l){function f(t,e,n,r){n.$render=function(){var t=n.$viewValue;r.hasOption(t)?(C.parent()&&C.remove(),e.val(t),""===t&&p.prop("selected",!0)):null==t&&p?e.val(""):r.renderUnknownOption(t)},e.on("change",function(){t.$apply(function(){C.parent()&&C.remove(),n.$setViewValue(e.val())})})}function h(t,e,n){var r;n.$render=function(){var t=new Lt(n.$viewValue);o(e.find("option"),function(e){e.selected=$(t.get(e.value))})},t.$watch(function(){R(r,n.$viewValue)||(r=P(n.$viewValue),n.$render())}),e.on("change",function(){t.$apply(function(){var t=[];o(e.find("option"),function(e){
-e.selected&&t.push(e.value)}),n.$setViewValue(t)})})}function d(e,s,u){function c(t,n,r){return R[A]=r,O&&(R[O]=n),t(e,R)}function l(){e.$apply(function(){var t,n=M(e)||[];if(g)t=[],o(s.val(),function(e){e=j?N[e]:e,t.push(f(e,n[e]))});else{var r=j?N[s.val()]:s.val();t=f(r,n[r])}u.$setViewValue(t),C()})}function f(t,e){if("?"===t)return n;if(""===t)return null;var r=T?T:z;return c(r,t,e)}function h(){var t,n=M(e);if(n&&dr(n)){t=new Array(n.length);for(var r=0,i=n.length;i>r;r++)t[r]=c(k,r,n[r]);return t}if(n){t={};for(var o in n)n.hasOwnProperty(o)&&(t[o]=c(k,o,n[o]))}return t}function d(t){var e;if(g)if(j&&dr(t)){e=new Lt([]);for(var n=0;n<t.length;n++)e.put(c(j,null,t[n]),!0)}else e=new Lt(t);else j&&(t=c(j,null,t));return function(n,r){var i;return i=j?j:T?T:z,g?$(e.remove(c(i,n,r))):t===c(i,n,r)}}function p(){w||(e.$$postDigest(C),w=!0)}function v(t,e,n){t[e]=t[e]||0,t[e]+=n?1:-1}function C(){w=!1;var t,n,r,i,l,f,h,p,y,C,E,A,S,T,z,D,F,B={"":[]},L=[""],U=u.$viewValue,V=M(e)||[],q=O?a(V):V,H={},W=d(U),X=!1;for(N={},A=0;C=q.length,C>A;A++)h=A,O&&(h=q[A],"$"===h.charAt(0))||(p=V[h],t=c(I,h,p)||"",(n=B[t])||(n=B[t]=[],L.push(t)),S=W(h,p),X=X||S,D=c(k,h,p),D=$(D)?D:"",F=j?j(e,R):O?q[A]:A,j&&(N[F]=h),n.push({id:F,label:D,selected:S}));for(g||(b||null===U?B[""].unshift({id:"",label:"",selected:!X}):X||B[""].unshift({id:"?",label:"",selected:!0})),E=0,y=L.length;y>E;E++){for(t=L[E],n=B[t],P.length<=E?(i={element:x.clone().attr("label",t),label:n.label},l=[i],P.push(l),s.append(i.element)):(l=P[E],i=l[0],i.label!=t&&i.element.attr("label",i.label=t)),T=null,A=0,C=n.length;C>A;A++)r=n[A],(f=l[A+1])?(T=f.element,f.label!==r.label&&(v(H,f.label,!1),v(H,r.label,!0),T.text(f.label=r.label),T.prop("label",f.label)),f.id!==r.id&&T.val(f.id=r.id),T[0].selected!==r.selected&&(T.prop("selected",f.selected=r.selected),er&&T.prop("selected",f.selected))):(""===r.id&&b?z=b:(z=_.clone()).val(r.id).prop("selected",r.selected).attr("selected",r.selected).prop("label",r.label).text(r.label),l.push(f={element:z,label:r.label,id:r.id,selected:r.selected}),v(H,r.label,!0),T?T.after(z):i.element.append(z),T=z);for(A++;l.length>A;)r=l.pop(),v(H,r.label,!1),r.element.remove()}for(;P.length>E;){for(n=P.pop(),A=1;A<n.length;++A)v(H,n[A].label,!1);n[0].element.remove()}o(H,function(t,e){t>0?m.addOption(e):0>t&&m.removeOption(e)})}var E;if(!(E=y.match(i)))throw Bo("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",y,H(s));var k=r(E[2]||E[1]),A=E[4]||E[6],S=/ as /.test(E[0])&&E[1],T=S?r(S):null,O=E[5],I=r(E[3]||""),z=r(E[2]?E[1]:A),M=r(E[7]),D=E[8],j=D?r(E[8]):null,N={},P=[[{element:s,label:""}]],R={};b&&(t(b)(e),b.removeClass("ng-scope"),b.remove()),s.empty(),s.on("change",l),u.$render=C,e.$watchCollection(M,p),e.$watchCollection(h,p),g&&e.$watchCollection(function(){return u.$modelValue},p)}if(l[1]){for(var p,m=l[0],v=l[1],g=c.multiple,y=c.ngOptions,b=!1,w=!1,_=nr(e.createElement("option")),x=nr(e.createElement("optgroup")),C=_.clone(),E=0,k=u.children(),A=k.length;A>E;E++)if(""===k[E].value){p=b=k.eq(E);break}m.init(v,b,C),g&&(v.$isEmpty=function(t){return!t||0===t.length}),y?d(s,u,v):g?h(s,u,v):f(s,u,v,m)}}}}],Vo=["$interpolate",function(t){var e={addOption:p,removeOption:p};return{restrict:"E",priority:100,compile:function(n,r){if(g(r.value)){var i=t(n.text(),!0);i||r.$set("value",n.text())}return function(t,n,r){var o="$selectController",a=n.parent(),s=a.data(o)||a.parent().data(o);s&&s.databound||(s=e),i?t.$watch(i,function(t,e){r.$set("value",t),e!==t&&s.removeOption(e),s.addOption(t,n)}):s.addOption(r.value,n),n.on("$destroy",function(){s.removeOption(r.value)})}}}}],qo=v({restrict:"E",terminal:!1}),Ho=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){r&&(n.required=!0,r.$validators.required=function(t,e){return!n.required||!r.$isEmpty(e)},n.$observe("required",function(){r.$validate()}))}}},Wo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,i,o){if(o){var a,s=i.ngPattern||i.pattern;i.$observe("pattern",function(t){if(b(t)&&t.length>0&&(t=new RegExp("^"+t+"$")),t&&!t.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,t,H(e));a=t||n,o.$validate()}),o.$validators.pattern=function(t,e){return o.$isEmpty(e)||g(a)||a.test(e)}}}}},Xo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=-1;n.$observe("maxlength",function(t){var e=h(t);i=isNaN(e)?-1:e,r.$validate()}),r.$validators.maxlength=function(t,e){return 0>i||r.$isEmpty(e)||e.length<=i}}}}},Yo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=0;n.$observe("minlength",function(t){i=h(t)||0,r.$validate()}),r.$validators.minlength=function(t,e){return r.$isEmpty(e)||e.length>=i}}}}};return t.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(rt(),dt(lr),void nr(e).ready(function(){J(e,Q)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>'),function(t,e,n){"use strict";e.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(){var t="$$ngAnimateChildren";return function(n,r,i){var o=i.ngAnimateChildren;e.isString(o)&&0===o.length?r.data(t,!0):n.$watch(o,function(e){r.data(t,!!e)})}}).factory("$$animateReflow",["$$rAF","$document",function(t,e){var n=e[0].body;return function(e){return t(function(){e(n.offsetWidth)})}}]).config(["$provide","$animateProvider",function(r,i){function o(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.nodeType==v)return n}}function a(t){return t&&e.element(t)}function s(t){return e.element(o(t))}function u(t,e){return o(t)==o(e)}var c,l=e.noop,f=e.forEach,h=i.$$selectors,d=e.isArray,p=e.isString,m=e.isObject,v=1,g="$$ngAnimateState",$="$$ngAnimateChildren",y="ng-animate",b={running:!0};r.decorator("$animate",["$delegate","$$q","$injector","$sniffer","$rootElement","$$asyncCallback","$rootScope","$document","$templateRequest","$$jqLite",function(t,n,r,v,w,_,x,C,E,k){function A(t,e){var n=t.data(g)||{};return e&&(n.running=!0,n.structural=!0,t.data(g,n)),n.disabled||n.running&&n.structural}function S(t){var e,r=n.defer();return r.promise.$$cancelFn=function(){e&&e()},x.$$postDigest(function(){e=t(function(){r.resolve()})}),r.promise}function T(t){return m(t)?(t.tempClasses&&p(t.tempClasses)&&(t.tempClasses=t.tempClasses.split(/\s+/)),t):void 0}function O(t,e,n){n=n||{};var r={};f(n,function(t,e){f(e.split(" "),function(e){r[e]=t})});var i=Object.create(null);f((t.attr("class")||"").split(/\s+/),function(t){i[t]=!0});var o=[],a=[];return f(e&&e.classes||[],function(t,e){var n=i[e],s=r[e]||{};t===!1?(n||"addClass"==s.event)&&a.push(e):t===!0&&(n&&"removeClass"!=s.event||o.push(e))}),o.length+a.length>0&&[o.join(" "),a.join(" ")]}function I(t){if(t){var e=[],n={},i=t.substr(1).split(".");(v.transitions||v.animations)&&e.push(r.get(h[""]));for(var o=0;o<i.length;o++){var a=i[o],s=h[a];s&&!n[a]&&(e.push(r.get(s)),n[a]=!0)}return e}}function z(t,n,r,i){function o(t,e){var n=t[e],r=t["before"+e.charAt(0).toUpperCase()+e.substr(1)];return n||r?("leave"==e&&(r=n,n=null),_.push({event:e,fn:n}),y.push({event:e,fn:r}),!0):void 0}function a(e,n,o){function a(t){if(n){if((n[t]||l)(),++h<s.length)return;n=null}o()}var s=[];f(e,function(t){t.fn&&s.push(t)});var h=0;f(s,function(e,o){var s=function(){a(o)};switch(e.event){case"setClass":n.push(e.fn(t,u,c,s,i));break;case"animate":n.push(e.fn(t,r,i.from,i.to,s));break;case"addClass":n.push(e.fn(t,u||r,s,i));break;case"removeClass":n.push(e.fn(t,c||r,s,i));break;default:n.push(e.fn(t,s,i))}}),n&&0===n.length&&o()}var s=t[0];if(s){i&&(i.to=i.to||{},i.from=i.from||{});var u,c;d(r)&&(u=r[0],c=r[1],u?c?r=u+" "+c:(r=u,n="addClass"):(r=c,n="removeClass"));var h="setClass"==n,p=h||"addClass"==n||"removeClass"==n||"animate"==n,m=t.attr("class"),v=m+" "+r;if(B(v)){var g=l,$=[],y=[],b=l,w=[],_=[],x=(" "+v).replace(/\s+/g,".");return f(I(x),function(t){var e=o(t,n);!e&&h&&(o(t,"addClass"),o(t,"removeClass"))}),{node:s,event:n,className:r,isClassBased:p,isSetClassOperation:h,applyStyles:function(){i&&t.css(e.extend(i.from||{},i.to||{}))},before:function(t){g=t,a(y,$,function(){g=l,t()})},after:function(t){b=t,a(_,w,function(){b=l,t()})},cancel:function(){$&&(f($,function(t){(t||l)(!0)}),g(!0)),w&&(f(w,function(t){(t||l)(!0)}),b(!0))}}}}}function M(t,n,r,i,o,a,s,u){function h(e){var i="$animate:"+e;x&&x[i]&&x[i].length>0&&_(function(){r.triggerHandler(i,{event:t,className:n})})}function d(){h("before")}function p(){h("after")}function m(){h("close"),u()}function v(){v.hasBeenRun||(v.hasBeenRun=!0,a())}function $(){if(!$.hasBeenRun){w&&w.applyStyles(),$.hasBeenRun=!0,s&&s.tempClasses&&f(s.tempClasses,function(t){c.removeClass(r,t)});var e=r.data(g);e&&(w&&w.isClassBased?j(r,n):(_(function(){var e=r.data(g)||{};M==e.index&&j(r,n,t)}),r.data(g,e))),m()}}var b=l,w=z(r,t,n,s);if(!w)return v(),d(),p(),$(),b;t=w.event,n=w.className;var x=e.element._data(w.node);if(x=x&&x.events,i||(i=o?o.parent():r.parent()),N(r,i))return v(),d(),p(),$(),b;var C=r.data(g)||{},E=C.active||{},k=C.totalActive||0,A=C.last,S=!1;if(k>0){var T=[];if(w.isClassBased){if("setClass"==A.event)T.push(A),j(r,n);else if(E[n]){var O=E[n];O.event==t?S=!0:(T.push(O),j(r,n))}}else if("leave"==t&&E["ng-leave"])S=!0;else{for(var I in E)T.push(E[I]);C={},j(r,!0)}T.length>0&&f(T,function(t){t.cancel()})}if(!w.isClassBased||w.isSetClassOperation||"animate"==t||S||(S="addClass"==t==r.hasClass(n)),S)return v(),d(),p(),m(),b;E=C.active||{},k=C.totalActive||0,"leave"==t&&r.one("$destroy",function(t){var n=e.element(this),r=n.data(g);if(r){var i=r.active["ng-leave"];i&&(i.cancel(),j(n,"ng-leave"))}}),c.addClass(r,y),s&&s.tempClasses&&f(s.tempClasses,function(t){c.addClass(r,t)});var M=R++;return k++,E[n]=w,r.data(g,{last:w,active:E,index:M,totalActive:k}),d(),w.before(function(e){var i=r.data(g);e=e||!i||!i.active[n]||w.isClassBased&&i.active[n].event!=t,v(),e===!0?$():(p(),w.after($))}),w.cancel}function D(t){var n=o(t);if(n){var r=e.isFunction(n.getElementsByClassName)?n.getElementsByClassName(y):n.querySelectorAll("."+y);f(r,function(t){t=e.element(t);var n=t.data(g);n&&n.active&&f(n.active,function(t){t.cancel()})})}}function j(t,e){if(u(t,w))b.disabled||(b.running=!1,b.structural=!1);else if(e){var n=t.data(g)||{},r=e===!0;!r&&n.active&&n.active[e]&&(n.totalActive--,delete n.active[e]),(r||!n.totalActive)&&(c.removeClass(t,y),t.removeData(g))}}function N(t,n){if(b.disabled)return!0;if(u(t,w))return b.running;var r,i,o;do{if(0===n.length)break;var a=u(n,w),s=a?b:n.data(g)||{};if(s.disabled)return!0;if(a&&(o=!0),r!==!1){var c=n.data($);e.isDefined(c)&&(r=c)}i=i||s.running||s.last&&!s.last.isClassBased}while(n=n.parent());return!o||!r&&i}c=k,w.data(g,b);var P=x.$watch(function(){return E.totalPendingRequests},function(t,e){0===t&&(P(),x.$$postDigest(function(){x.$$postDigest(function(){b.running=!1})}))}),R=0,F=i.classNameFilter(),B=F?function(t){return F.test(t)}:function(){return!0};return{animate:function(t,e,n,r,i){return r=r||"ng-inline-animate",i=T(i)||{},i.from=n?e:null,i.to=n?n:e,S(function(e){return M("animate",r,s(t),null,null,l,i,e)})},enter:function(n,r,i,o){return o=T(o),n=e.element(n),r=a(r),i=a(i),A(n,!0),t.enter(n,r,i),S(function(t){return M("enter","ng-enter",s(n),r,i,l,o,t)})},leave:function(n,r){return r=T(r),n=e.element(n),D(n),A(n,!0),S(function(e){return M("leave","ng-leave",s(n),null,null,function(){t.leave(n)},r,e)})},move:function(n,r,i,o){return o=T(o),n=e.element(n),r=a(r),i=a(i),D(n),A(n,!0),t.move(n,r,i),S(function(t){return M("move","ng-move",s(n),r,i,l,o,t)})},addClass:function(t,e,n){return this.setClass(t,e,[],n)},removeClass:function(t,e,n){return this.setClass(t,[],e,n)},setClass:function(n,r,i,a){a=T(a);var u="$$animateClasses";if(n=e.element(n),n=s(n),A(n))return t.$$setClassImmediately(n,r,i,a);var c,l=n.data(u),h=!!l;return l||(l={},l.classes={}),c=l.classes,r=d(r)?r:r.split(" "),f(r,function(t){t&&t.length&&(c[t]=!0)}),i=d(i)?i:i.split(" "),f(i,function(t){t&&t.length&&(c[t]=!1)}),h?(a&&l.options&&(l.options=e.extend(l.options||{},a)),l.promise):(n.data(u,l={classes:c,options:a}),l.promise=S(function(e){var r,i,a,s=o(n);if(s&&(r=n.data(u),n.removeData(u),a=n.parent(),i=s.parentNode),!i||i.$$NG_REMOVED||s.$$NG_REMOVED)return void e();var c=n.data(g)||{},l=O(n,r,c.active);return l?M("setClass",l,n,a,null,function(){l[0]&&t.$$addClassImmediately(n,l[0]),l[1]&&t.$$removeClassImmediately(n,l[1])},r.options,e):e()}))},cancel:function(t){t.$$cancelFn()},enabled:function(t,e){switch(arguments.length){case 2:if(t)j(e);else{var n=e.data(g)||{};n.disabled=!0,e.data(g,n)}break;case 1:b.disabled=!t;break;default:t=!b.disabled}return!!t}}}]),i.register("",["$window","$sniffer","$timeout","$$animateReflow",function(r,i,a,s){function u(){j||(j=s(function(){Y=[],j=null,W={}}))}function h(t,e){j&&j(),Y.push(e),j=s(function(){f(Y,function(t){t()}),Y=[],j=null,W={}})}function m(t,n){var r=o(t);t=e.element(r),K.push(t);var i=Date.now()+n;G>=i||(a.cancel(Z),G=i,Z=a(function(){g(K),K=[]},n,!1))}function g(t){f(t,function(t){var e=t.data(U);e&&f(e.closeAnimationFns,function(t){t()})})}function $(t,e){var n=e?W[e]:null;if(!n){var i=0,o=0,a=0,s=0;f(t,function(t){if(t.nodeType==v){var e=r.getComputedStyle(t)||{},n=e[O+N];i=Math.max(y(n),i);var u=e[O+R];o=Math.max(y(u),o);e[z+R];s=Math.max(y(e[z+R]),s);var c=y(e[z+N]);c>0&&(c*=parseInt(e[z+F],10)||1),a=Math.max(c,a)}}),n={total:0,transitionDelay:o,transitionDuration:i,animationDelay:s,animationDuration:a},e&&(W[e]=n)}return n}function y(t){var e=0,n=p(t)?t.split(/\s*,\s*/):[];return f(n,function(t){e=Math.max(parseFloat(t)||0,e)}),e}function b(t){var e=t.parent(),n=e.data(L);return n||(e.data(L,++X),n=X),n+"-"+o(t).getAttribute("class")}function w(t,e,n,r){var i=["ng-enter","ng-leave","ng-move"].indexOf(n)>=0,a=b(e),s=a+" "+n,u=W[s]?++W[s].total:0,l={};if(u>0){var f=n+"-stagger",h=a+" "+f,d=!W[h];d&&c.addClass(e,f),l=$(e,h),d&&c.removeClass(e,f)}c.addClass(e,n);var p=e.data(U)||{},m=$(e,s),v=m.transitionDuration,g=m.animationDuration;if(i&&0===v&&0===g)return c.removeClass(e,n),!1;var y=r||i&&v>0,w=g>0&&l.animationDelay>0&&0===l.animationDuration,_=p.closeAnimationFns||[];e.data(U,{stagger:l,cacheKey:s,running:p.running||0,itemIndex:u,blockTransition:y,closeAnimationFns:_});var E=o(e);return y&&(x(E,!0),r&&e.css(r)),w&&C(E,!0),!0}function _(t,e,n,r,i){function s(){e.off(R,u),c.removeClass(e,d),c.removeClass(e,p),N&&a.cancel(N),S(e,n);var t=o(e);for(var r in g)t.style.removeProperty(g[r])}function u(t){t.stopPropagation();var e=t.originalEvent||t,n=e.$manualTimeStamp||e.timeStamp||Date.now(),i=parseFloat(e.elapsedTime.toFixed(V));Math.max(n-P,0)>=z&&i>=T&&r()}var l=o(e),h=e.data(U);if(-1==l.getAttribute("class").indexOf(n)||!h)return void r();var d="",p="";f(n.split(" "),function(t,e){var n=(e>0?" ":"")+t;d+=n+"-active",p+=n+"-pending"});var v="",g=[],y=h.itemIndex,b=h.stagger,w=0;if(y>0){var _=0;b.transitionDelay>0&&0===b.transitionDuration&&(_=b.transitionDelay*y);var E=0;b.animationDelay>0&&0===b.animationDuration&&(E=b.animationDelay*y,g.push(D+"animation-play-state")),w=Math.round(100*Math.max(_,E))/100}w||(c.addClass(e,d),h.blockTransition&&x(l,!1));var k=h.cacheKey+" "+d,A=$(e,k),T=Math.max(A.transitionDuration,A.animationDuration);if(0===T)return c.removeClass(e,d),S(e,n),void r();!w&&i&&Object.keys(i).length>0&&(A.transitionDuration||(e.css("transition",A.animationDuration+"s linear all"),g.push("transition")),e.css(i));var O=Math.max(A.transitionDelay,A.animationDelay),z=O*H;if(g.length>0){var j=l.getAttribute("style")||"";";"!==j.charAt(j.length-1)&&(j+=";"),l.setAttribute("style",j+" "+v)}var N,P=Date.now(),R=M+" "+I,F=(O+T)*q,B=(w+F)*H;return w>0&&(c.addClass(e,p),N=a(function(){N=null,A.transitionDuration>0&&x(l,!1),A.animationDuration>0&&C(l,!1),c.addClass(e,d),c.removeClass(e,p),i&&(0===A.transitionDuration&&e.css("transition",A.animationDuration+"s linear all"),e.css(i),g.push("transition"))},w*H,!1)),e.on(R,u),h.closeAnimationFns.push(function(){s(),r()}),h.running++,m(e,B),s}function x(t,e){t.style[O+P]=e?"none":""}function C(t,e){t.style[z+B]=e?"paused":""}function E(t,e,n,r){return w(t,e,n,r)?function(t){t&&S(e,n)}:void 0}function k(t,e,n,r,i){return e.data(U)?_(t,e,n,r,i):(S(e,n),void r())}function A(t,e,n,r,i){var o=E(t,e,n,i.from);if(!o)return u(),void r();var a=o;return h(e,function(){a=k(t,e,n,r,i.to)}),function(t){(a||l)(t)}}function S(t,e){c.removeClass(t,e);var n=t.data(U);n&&(n.running&&n.running--,n.running&&0!==n.running||t.removeData(U))}function T(t,e){var n="";return t=d(t)?t:t.split(/\s+/),f(t,function(t,r){t&&t.length>0&&(n+=(r>0?" ":"")+t+e)}),n}var O,I,z,M,D="";t.ontransitionend===n&&t.onwebkittransitionend!==n?(D="-webkit-",O="WebkitTransition",I="webkitTransitionEnd transitionend"):(O="transition",I="transitionend"),t.onanimationend===n&&t.onwebkitanimationend!==n?(D="-webkit-",z="WebkitAnimation",M="webkitAnimationEnd animationend"):(z="animation",M="animationend");var j,N="Duration",P="Property",R="Delay",F="IterationCount",B="PlayState",L="$$ngAnimateKey",U="$$ngAnimateCSS3Data",V=3,q=1.5,H=1e3,W={},X=0,Y=[],Z=null,G=0,K=[];return{animate:function(t,e,n,r,i,o){return o=o||{},o.from=n,o.to=r,A("animate",t,e,i,o)},enter:function(t,e,n){return n=n||{},A("enter",t,"ng-enter",e,n)},leave:function(t,e,n){return n=n||{},A("leave",t,"ng-leave",e,n)},move:function(t,e,n){return n=n||{},A("move",t,"ng-move",e,n)},beforeSetClass:function(t,e,n,r,i){i=i||{};var o=T(n,"-remove")+" "+T(e,"-add"),a=E("setClass",t,o,i.from);return a?(h(t,r),a):(u(),void r())},beforeAddClass:function(t,e,n,r){r=r||{};var i=E("addClass",t,T(e,"-add"),r.from);return i?(h(t,n),i):(u(),void n())},beforeRemoveClass:function(t,e,n,r){r=r||{};var i=E("removeClass",t,T(e,"-remove"),r.from);return i?(h(t,n),i):(u(),void n())},setClass:function(t,e,n,r,i){i=i||{},n=T(n,"-remove"),e=T(e,"-add");var o=n+" "+e;return k("setClass",t,o,r,i.to)},addClass:function(t,e,n,r){return r=r||{},k("addClass",t,T(e,"-add"),n,r.to)},removeClass:function(t,e,n,r){return r=r||{},k("removeClass",t,T(e,"-remove"),n,r.to)}}}])}])}(window,window.angular),function(t,e,n){"use strict";e.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(t,r){function i(){var t,i,o,u;for(t in s)l(a[t])&&(r.cookies(t,n),delete s[t]);for(t in a)i=a[t],e.isString(i)||(i=""+i,a[t]=i),i!==s[t]&&(r.cookies(t,i),s[t]=i,u=!0);if(u){o=r.cookies();for(t in a)a[t]!==o[t]&&(l(o[t])?(delete a[t],delete s[t]):a[t]=s[t]=o[t])}}var o,a={},s={},u=!1,c=e.copy,l=e.isUndefined;return r.addPollFn(function(){var e=r.cookies();o!=e&&(o=e,c(e,s),c(e,a),u&&t.$apply())})(),u=!0,t.$watch(i),a}]).factory("$cookieStore",["$cookies",function(t){return{get:function(n){var r=t[n];return r?e.fromJson(r):r},put:function(n,r){t[n]=e.toJson(r)},remove:function(e){delete t[e]}}}])}(window,window.angular),angular.module("ui-notification",[]),angular.module("ui-notification").provider("Notification",function(){this.options={delay:5e3,startTop:10,startRight:10,verticalSpacing:10,horizontalSpacing:10,positionX:"right",positionY:"top",replaceMessage:!1,templateUrl:"angular-ui-notification.html"},this.setOptions=function(t){if(!angular.isObject(t))throw new Error("Options should be an object!");this.options=angular.extend({},this.options,t)},this.$get=["$timeout","$http","$compile","$templateCache","$rootScope","$injector","$sce","$q","$window",function(t,e,n,r,i,o,a,s,u){var c=this.options,l=c.startTop,f=c.startRight,h=c.verticalSpacing,d=c.horizontalSpacing,p=c.delay,m=[],v=!1,g=function(o,g){var $=s.defer();return"object"!=typeof o&&(o={message:o}),o.scope=o.scope?o.scope:i,o.template=o.templateUrl?o.templateUrl:c.templateUrl,o.delay=angular.isUndefined(o.delay)?p:o.delay,o.type=g?g:"",o.positionY=o.positionY?o.positionY:c.positionY,o.positionX=o.positionX?o.positionX:c.positionX,o.replaceMessage=o.replaceMessage?o.replaceMessage:c.replaceMessage,e.get(o.template,{cache:r}).success(function(e){var r=o.scope.$new();r.message=a.trustAsHtml(o.message),r.title=a.trustAsHtml(o.title),r.t=o.type.substr(0,1),r.delay=o.delay;var i=function(){for(var t=0,e=0,n=l,r=f,i=[],a=m.length-1;a>=0;a--){var s=m[a];if(o.replaceMessage&&a<m.length-1)s.addClass("killed");else{var u=parseInt(s[0].offsetHeight),c=parseInt(s[0].offsetWidth),p=i[s._positionY+s._positionX];v+u>window.innerHeight&&(p=l,e++,t=0);var v=n=p?0===t?p:p+h:l,g=r+e*(d+c);s.css(s._positionY,v+"px"),"center"==s._positionX?s.css("left",parseInt(window.innerWidth/2-c/2)+"px"):s.css(s._positionX,g+"px"),i[s._positionY+s._positionX]=v+u,t++}}},s=n(e)(r);s._positionY=o.positionY,s._positionX=o.positionX,s.addClass(o.type),s.bind("webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd click",function(t){t=t.originalEvent||t,("click"===t.type||"opacity"===t.propertyName&&t.elapsedTime>=1)&&(s.remove(),m.splice(m.indexOf(s),1),i())}),angular.isNumber(o.delay)&&t(function(){s.addClass("killed")},o.delay),angular.element(document.getElementsByTagName("body")).append(s);var c=-(parseInt(s[0].offsetHeight)+50);s.css(s._positionY,c+"px"),m.push(s),r._templateElement=s,r.kill=function(e){e?(m.splice(m.indexOf(r._templateElement),1),r._templateElement.remove(),t(i)):r._templateElement.addClass("killed")},t(i),v||(angular.element(u).bind("resize",function(){t(i)}),v=!0),$.resolve(r)}).error(function(t){throw new Error("Template ("+o.template+") could not be loaded. "+t)}),$.promise};return g.primary=function(t){return this(t,"primary")},g.error=function(t){return this(t,"error")},g.success=function(t){return this(t,"success")},g.info=function(t){return this(t,"info")},g.warning=function(t){return this(t,"warning")},g.clearAll=function(){angular.forEach(m,function(t){t.addClass("killed")})},g}]}),angular.module("ui-notification").run(["$templateCache",function(t){t.put("angular-ui-notification.html",'<div class="ui-notification"><h3 ng-show="title" ng-bind-html="title"></h3><div class="message" ng-bind-html="message"></div></div>')}]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(t,e,n){"use strict";function r(t,e){return V(new(V(function(){},{prototype:t})),e)}function i(t){return U(arguments,function(e){e!==t&&U(e,function(e,n){t.hasOwnProperty(n)||(t[n]=e)})}),t}function o(t,e){var n=[];for(var r in t.path){if(t.path[r]!==e.path[r])break;n.push(t.path[r])}return n}function a(t){if(Object.keys)return Object.keys(t);var e=[];return U(t,function(t,n){e.push(n)}),e}function s(t,e){if(Array.prototype.indexOf)return t.indexOf(e,Number(arguments[2])||0);var n=t.length>>>0,r=Number(arguments[2])||0;for(r=0>r?Math.ceil(r):Math.floor(r),0>r&&(r+=n);n>r;r++)if(r in t&&t[r]===e)return r;return-1}function u(t,e,n,r){var i,u=o(n,r),c={},l=[];for(var f in u)if(u[f]&&u[f].params&&(i=a(u[f].params),i.length))for(var h in i)s(l,i[h])>=0||(l.push(i[h]),c[i[h]]=t[i[h]]);return V({},c,e)}function c(t,e,n){if(!n){n=[];for(var r in t)n.push(r)}for(var i=0;i<n.length;i++){var o=n[i];if(t[o]!=e[o])return!1}return!0}function l(t,e){var n={};return U(t,function(t){n[t]=e[t]}),n}function f(t){var e={},n=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return U(n,function(n){n in t&&(e[n]=t[n])}),e}function h(t){var e={},n=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var r in t)-1==s(n,r)&&(e[r]=t[r]);return e}function d(t,e){var n=L(t),r=n?[]:{};return U(t,function(t,i){e(t,i)&&(r[n?r.length:i]=t)}),r}function p(t,e){var n=L(t)?[]:{};return U(t,function(t,r){n[r]=e(t,r)}),n}function m(t,e){var r=1,o=2,u={},c=[],l=u,f=V(t.when(u),{$$promises:u,$$values:u});this.study=function(u){function d(t,n){if($[n]!==o){if(g.push(n),$[n]===r)throw g.splice(0,s(g,n)),new Error("Cyclic dependency: "+g.join(" -> "));if($[n]=r,F(t))v.push(n,[function(){return e.get(t)}],c);else{var i=e.annotate(t);U(i,function(t){t!==n&&u.hasOwnProperty(t)&&d(u[t],t)}),v.push(n,t,i)}g.pop(),$[n]=o}}function p(t){return B(t)&&t.then&&t.$$promises}if(!B(u))throw new Error("'invocables' must be an object");var m=a(u||{}),v=[],g=[],$={};return U(u,d),u=g=$=null,function(r,o,a){function s(){--b||(w||i(y,o.$$values),g.$$values=y,g.$$promises=g.$$promises||!0,delete g.$$inheritedValues,d.resolve(y))}function u(t){g.$$failure=t,d.reject(t)}function c(n,i,o){function c(t){f.reject(t),u(t)}function l(){if(!P(g.$$failure))try{f.resolve(e.invoke(i,a,y)),f.promise.then(function(t){y[n]=t,s()},c)}catch(t){c(t)}}var f=t.defer(),h=0;U(o,function(t){$.hasOwnProperty(t)&&!r.hasOwnProperty(t)&&(h++,$[t].then(function(e){y[t]=e,--h||l()},c))}),h||l(),$[n]=f.promise}if(p(r)&&a===n&&(a=o,o=r,r=null),r){if(!B(r))throw new Error("'locals' must be an object")}else r=l;if(o){if(!p(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else o=f;var d=t.defer(),g=d.promise,$=g.$$promises={},y=V({},r),b=1+v.length/3,w=!1;if(P(o.$$failure))return u(o.$$failure),g;o.$$inheritedValues&&i(y,h(o.$$inheritedValues,m)),V($,o.$$promises),o.$$values?(w=i(y,h(o.$$values,m)),g.$$inheritedValues=h(o.$$values,m),s()):(o.$$inheritedValues&&(g.$$inheritedValues=h(o.$$inheritedValues,m)),o.then(s,u));for(var _=0,x=v.length;x>_;_+=3)r.hasOwnProperty(v[_])?s():c(v[_],v[_+1],v[_+2]);return g}},this.resolve=function(t,e,n,r){return this.study(t)(e,n,r)}}function v(t,e,n){this.fromConfig=function(t,e,n){return P(t.template)?this.fromString(t.template,e):P(t.templateUrl)?this.fromUrl(t.templateUrl,e):P(t.templateProvider)?this.fromProvider(t.templateProvider,e,n):null},this.fromString=function(t,e){return R(t)?t(e):t},this.fromUrl=function(n,r){return R(n)&&(n=n(r)),null==n?null:t.get(n,{cache:e,headers:{Accept:"text/html"}}).then(function(t){return t.data})},this.fromProvider=function(t,e,r){return n.invoke(t,null,r||{params:e})}}function g(t,e,i){function o(e,n,r,i){if(v.push(e),p[e])return p[e];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(e))throw new Error("Invalid parameter name '"+e+"' in pattern '"+t+"'");if(m[e])throw new Error("Duplicate parameter name '"+e+"' in pattern '"+t+"'");return m[e]=new W.Param(e,n,r,i),m[e]}function a(t,e,n,r){var i=["",""],o=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!e)return o;switch(n){case!1:i=["(",")"+(r?"?":"")];break;case!0:o=o.replace(/\/$/,""),i=["(?:/(",")|/)?"];break;default:i=["("+n+"|",")?"]}return o+i[0]+e+i[1]}function s(i,o){var a,s,u,c,l;return a=i[2]||i[3],l=e.params[a],u=t.substring(h,i.index),s=o?i[4]:i[4]||("*"==i[1]?".*":null),s&&(c=W.type(s)||r(W.type("string"),{pattern:new RegExp(s,e.caseInsensitive?"i":n)})),{id:a,regexp:s,segment:u,type:c,cfg:l}}e=V({params:{}},B(e)?e:{});var u,c=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,f="^",h=0,d=this.segments=[],p=i?i.params:{},m=this.params=i?i.params.$$new():new W.ParamSet,v=[];this.source=t;for(var g,$,y;(u=c.exec(t))&&(g=s(u,!1),!(g.segment.indexOf("?")>=0));)$=o(g.id,g.type,g.cfg,"path"),f+=a(g.segment,$.type.pattern.source,$.squash,$.isOptional),d.push(g.segment),h=c.lastIndex;y=t.substring(h);var b=y.indexOf("?");if(b>=0){var w=this.sourceSearch=y.substring(b);if(y=y.substring(0,b),this.sourcePath=t.substring(0,h+b),w.length>0)for(h=0;u=l.exec(w);)g=s(u,!0),$=o(g.id,g.type,g.cfg,"search"),h=c.lastIndex}else this.sourcePath=t,this.sourceSearch="";f+=a(y)+(e.strict===!1?"/?":"")+"$",d.push(y),this.regexp=new RegExp(f,e.caseInsensitive?"i":n),this.prefix=d[0],this.$$paramNames=v}function $(t){V(this,t)}function y(){function t(t){return null!=t?t.toString().replace(/~/g,"~~").replace(/\//g,"~2F"):t}function i(t){return null!=t?t.toString().replace(/~2F/g,"/").replace(/~~/g,"~"):t}function o(){return{strict:m,caseInsensitive:h}}function u(t){return R(t)||L(t)&&R(t[t.length-1])}function c(){for(;_.length;){var t=_.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");e.extend(b[t.name],f.invoke(t.def))}}function l(t){V(this,t||{})}W=this;var f,h=!1,m=!0,v=!1,b={},w=!0,_=[],x={string:{encode:t,decode:i,is:function(t){return null==t||!P(t)||"string"==typeof t},pattern:/[^\/]*/},"int":{encode:t,decode:function(t){return parseInt(t,10)},is:function(t){return P(t)&&this.decode(t.toString())===t},pattern:/\d+/},bool:{encode:function(t){return t?1:0},decode:function(t){return 0!==parseInt(t,10)},is:function(t){return t===!0||t===!1},pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):n},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):n},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return this.is(t)&&this.is(e)&&t.toISOString()===e.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:e.toJson,decode:e.fromJson,is:e.isObject,equals:e.equals,pattern:/[^\/]*/},any:{encode:e.identity,decode:e.identity,equals:e.equals,pattern:/.*/}};y.$$getDefaultValue=function(t){if(!u(t.value))return t.value;if(!f)throw new Error("Injectable functions cannot be called at configuration time");return f.invoke(t.value)},this.caseInsensitive=function(t){return P(t)&&(h=t),h},this.strictMode=function(t){return P(t)&&(m=t),m},this.defaultSquashPolicy=function(t){if(!P(t))return v;if(t!==!0&&t!==!1&&!F(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return v=t,t},this.compile=function(t,e){return new g(t,V(o(),e))},this.isMatcher=function(t){if(!B(t))return!1;var e=!0;return U(g.prototype,function(n,r){R(n)&&(e=e&&P(t[r])&&R(t[r]))}),e},this.type=function(t,e,n){if(!P(e))return b[t];if(b.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return b[t]=new $(V({name:t},e)),n&&(_.push({name:t,def:n}),w||c()),this},U(x,function(t,e){b[e]=new $(V({name:e},t))}),b=r(b,{}),this.$get=["$injector",function(t){return f=t,w=!1,c(),U(x,function(t,e){b[e]||(b[e]=new $(t))}),this}],this.Param=function(t,r,i,o){function c(t){var e=B(t)?a(t):[],n=-1===s(e,"value")&&-1===s(e,"type")&&-1===s(e,"squash")&&-1===s(e,"array");return n&&(t={value:t}),t.$$fn=u(t.value)?t.value:function(){return t.value},t}function l(n,r,i){if(n.type&&r)throw new Error("Param '"+t+"' has two type configurations.");return r?r:n.type?e.isString(n.type)?b[n.type]:n.type instanceof $?n.type:new $(n.type):"config"===i?b.any:b.string}function h(){var e={array:"search"===o?"auto":!1},n=t.match(/\[\]$/)?{array:!0}:{};return V(e,n,i).array}function m(t,e){var n=t.squash;if(!e||n===!1)return!1;if(!P(n)||null==n)return v;if(n===!0||F(n))return n;throw new Error("Invalid squash policy: '"+n+"'. Valid policies: false, true, or arbitrary string")}function g(t,e,r,i){var o,a,u=[{from:"",to:r||e?n:""},{from:null,to:r||e?n:""}];return o=L(t.replace)?t.replace:[],F(i)&&o.push({from:i,to:n}),a=p(o,function(t){return t.from}),d(u,function(t){return-1===s(a,t.from)}).concat(o)}function y(){if(!f)throw new Error("Injectable functions cannot be called at configuration time");var t=f.invoke(i.$$fn);if(null!==t&&t!==n&&!x.type.is(t))throw new Error("Default value ("+t+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return t}function w(t){function e(t){return function(e){return e.from===t}}function n(t){var n=p(d(x.replace,e(t)),function(t){return t.to});return n.length?n[0]:t}return t=n(t),P(t)?x.type.$normalize(t):y()}function _(){return"{Param:"+t+" "+r+" squash: '"+k+"' optional: "+E+"}"}var x=this;i=c(i),r=l(i,r,o);var C=h();r=C?r.$asArray(C,"search"===o):r,
+e.selected&&t.push(e.value)}),n.$setViewValue(t)})})}function d(e,s,u){function c(t,n,r){return R[A]=r,O&&(R[O]=n),t(e,R)}function l(){e.$apply(function(){var t,n=M(e)||[];if(g)t=[],o(s.val(),function(e){e=j?N[e]:e,t.push(f(e,n[e]))});else{var r=j?N[s.val()]:s.val();t=f(r,n[r])}u.$setViewValue(t),C()})}function f(t,e){if("?"===t)return n;if(""===t)return null;var r=T?T:z;return c(r,t,e)}function h(){var t,n=M(e);if(n&&dr(n)){t=new Array(n.length);for(var r=0,i=n.length;i>r;r++)t[r]=c(k,r,n[r]);return t}if(n){t={};for(var o in n)n.hasOwnProperty(o)&&(t[o]=c(k,o,n[o]))}return t}function d(t){var e;if(g)if(j&&dr(t)){e=new Lt([]);for(var n=0;n<t.length;n++)e.put(c(j,null,t[n]),!0)}else e=new Lt(t);else j&&(t=c(j,null,t));return function(n,r){var i;return i=j?j:T?T:z,g?$(e.remove(c(i,n,r))):t===c(i,n,r)}}function p(){w||(e.$$postDigest(C),w=!0)}function v(t,e,n){t[e]=t[e]||0,t[e]+=n?1:-1}function C(){w=!1;var t,n,r,i,l,f,h,p,y,C,E,A,S,T,z,D,F,B={"":[]},L=[""],U=u.$viewValue,V=M(e)||[],q=O?a(V):V,H={},W=d(U),X=!1;for(N={},A=0;C=q.length,C>A;A++)h=A,O&&(h=q[A],"$"===h.charAt(0))||(p=V[h],t=c(I,h,p)||"",(n=B[t])||(n=B[t]=[],L.push(t)),S=W(h,p),X=X||S,D=c(k,h,p),D=$(D)?D:"",F=j?j(e,R):O?q[A]:A,j&&(N[F]=h),n.push({id:F,label:D,selected:S}));for(g||(b||null===U?B[""].unshift({id:"",label:"",selected:!X}):X||B[""].unshift({id:"?",label:"",selected:!0})),E=0,y=L.length;y>E;E++){for(t=L[E],n=B[t],P.length<=E?(i={element:x.clone().attr("label",t),label:n.label},l=[i],P.push(l),s.append(i.element)):(l=P[E],i=l[0],i.label!=t&&i.element.attr("label",i.label=t)),T=null,A=0,C=n.length;C>A;A++)r=n[A],(f=l[A+1])?(T=f.element,f.label!==r.label&&(v(H,f.label,!1),v(H,r.label,!0),T.text(f.label=r.label),T.prop("label",f.label)),f.id!==r.id&&T.val(f.id=r.id),T[0].selected!==r.selected&&(T.prop("selected",f.selected=r.selected),er&&T.prop("selected",f.selected))):(""===r.id&&b?z=b:(z=_.clone()).val(r.id).prop("selected",r.selected).attr("selected",r.selected).prop("label",r.label).text(r.label),l.push(f={element:z,label:r.label,id:r.id,selected:r.selected}),v(H,r.label,!0),T?T.after(z):i.element.append(z),T=z);for(A++;l.length>A;)r=l.pop(),v(H,r.label,!1),r.element.remove()}for(;P.length>E;){for(n=P.pop(),A=1;A<n.length;++A)v(H,n[A].label,!1);n[0].element.remove()}o(H,function(t,e){t>0?m.addOption(e):0>t&&m.removeOption(e)})}var E;if(!(E=y.match(i)))throw Bo("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",y,H(s));var k=r(E[2]||E[1]),A=E[4]||E[6],S=/ as /.test(E[0])&&E[1],T=S?r(S):null,O=E[5],I=r(E[3]||""),z=r(E[2]?E[1]:A),M=r(E[7]),D=E[8],j=D?r(E[8]):null,N={},P=[[{element:s,label:""}]],R={};b&&(t(b)(e),b.removeClass("ng-scope"),b.remove()),s.empty(),s.on("change",l),u.$render=C,e.$watchCollection(M,p),e.$watchCollection(h,p),g&&e.$watchCollection(function(){return u.$modelValue},p)}if(l[1]){for(var p,m=l[0],v=l[1],g=c.multiple,y=c.ngOptions,b=!1,w=!1,_=nr(e.createElement("option")),x=nr(e.createElement("optgroup")),C=_.clone(),E=0,k=u.children(),A=k.length;A>E;E++)if(""===k[E].value){p=b=k.eq(E);break}m.init(v,b,C),g&&(v.$isEmpty=function(t){return!t||0===t.length}),y?d(s,u,v):g?h(s,u,v):f(s,u,v,m)}}}}],Vo=["$interpolate",function(t){var e={addOption:p,removeOption:p};return{restrict:"E",priority:100,compile:function(n,r){if(g(r.value)){var i=t(n.text(),!0);i||r.$set("value",n.text())}return function(t,n,r){var o="$selectController",a=n.parent(),s=a.data(o)||a.parent().data(o);s&&s.databound||(s=e),i?t.$watch(i,function(t,e){r.$set("value",t),e!==t&&s.removeOption(e),s.addOption(t,n)}):s.addOption(r.value,n),n.on("$destroy",function(){s.removeOption(r.value)})}}}}],qo=v({restrict:"E",terminal:!1}),Ho=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){r&&(n.required=!0,r.$validators.required=function(t,e){return!n.required||!r.$isEmpty(e)},n.$observe("required",function(){r.$validate()}))}}},Wo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,i,o){if(o){var a,s=i.ngPattern||i.pattern;i.$observe("pattern",function(t){if(b(t)&&t.length>0&&(t=new RegExp("^"+t+"$")),t&&!t.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,t,H(e));a=t||n,o.$validate()}),o.$validators.pattern=function(t,e){return o.$isEmpty(e)||g(a)||a.test(e)}}}}},Xo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=-1;n.$observe("maxlength",function(t){var e=h(t);i=isNaN(e)?-1:e,r.$validate()}),r.$validators.maxlength=function(t,e){return 0>i||r.$isEmpty(e)||e.length<=i}}}}},Yo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=0;n.$observe("minlength",function(t){i=h(t)||0,r.$validate()}),r.$validators.minlength=function(t,e){return r.$isEmpty(e)||e.length>=i}}}}};return t.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(rt(),dt(lr),void nr(e).ready(function(){J(e,Q)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>'),function(t,e,n){"use strict";e.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(){var t="$$ngAnimateChildren";return function(n,r,i){var o=i.ngAnimateChildren;e.isString(o)&&0===o.length?r.data(t,!0):n.$watch(o,function(e){r.data(t,!!e)})}}).factory("$$animateReflow",["$$rAF","$document",function(t,e){var n=e[0].body;return function(e){return t(function(){e(n.offsetWidth)})}}]).config(["$provide","$animateProvider",function(r,i){function o(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.nodeType==v)return n}}function a(t){return t&&e.element(t)}function s(t){return e.element(o(t))}function u(t,e){return o(t)==o(e)}var c,l=e.noop,f=e.forEach,h=i.$$selectors,d=e.isArray,p=e.isString,m=e.isObject,v=1,g="$$ngAnimateState",$="$$ngAnimateChildren",y="ng-animate",b={running:!0};r.decorator("$animate",["$delegate","$$q","$injector","$sniffer","$rootElement","$$asyncCallback","$rootScope","$document","$templateRequest","$$jqLite",function(t,n,r,v,w,_,x,C,E,k){function A(t,e){var n=t.data(g)||{};return e&&(n.running=!0,n.structural=!0,t.data(g,n)),n.disabled||n.running&&n.structural}function S(t){var e,r=n.defer();return r.promise.$$cancelFn=function(){e&&e()},x.$$postDigest(function(){e=t(function(){r.resolve()})}),r.promise}function T(t){return m(t)?(t.tempClasses&&p(t.tempClasses)&&(t.tempClasses=t.tempClasses.split(/\s+/)),t):void 0}function O(t,e,n){n=n||{};var r={};f(n,function(t,e){f(e.split(" "),function(e){r[e]=t})});var i=Object.create(null);f((t.attr("class")||"").split(/\s+/),function(t){i[t]=!0});var o=[],a=[];return f(e&&e.classes||[],function(t,e){var n=i[e],s=r[e]||{};t===!1?(n||"addClass"==s.event)&&a.push(e):t===!0&&(n&&"removeClass"!=s.event||o.push(e))}),o.length+a.length>0&&[o.join(" "),a.join(" ")]}function I(t){if(t){var e=[],n={},i=t.substr(1).split(".");(v.transitions||v.animations)&&e.push(r.get(h[""]));for(var o=0;o<i.length;o++){var a=i[o],s=h[a];s&&!n[a]&&(e.push(r.get(s)),n[a]=!0)}return e}}function z(t,n,r,i){function o(t,e){var n=t[e],r=t["before"+e.charAt(0).toUpperCase()+e.substr(1)];return n||r?("leave"==e&&(r=n,n=null),_.push({event:e,fn:n}),y.push({event:e,fn:r}),!0):void 0}function a(e,n,o){function a(t){if(n){if((n[t]||l)(),++h<s.length)return;n=null}o()}var s=[];f(e,function(t){t.fn&&s.push(t)});var h=0;f(s,function(e,o){var s=function(){a(o)};switch(e.event){case"setClass":n.push(e.fn(t,u,c,s,i));break;case"animate":n.push(e.fn(t,r,i.from,i.to,s));break;case"addClass":n.push(e.fn(t,u||r,s,i));break;case"removeClass":n.push(e.fn(t,c||r,s,i));break;default:n.push(e.fn(t,s,i))}}),n&&0===n.length&&o()}var s=t[0];if(s){i&&(i.to=i.to||{},i.from=i.from||{});var u,c;d(r)&&(u=r[0],c=r[1],u?c?r=u+" "+c:(r=u,n="addClass"):(r=c,n="removeClass"));var h="setClass"==n,p=h||"addClass"==n||"removeClass"==n||"animate"==n,m=t.attr("class"),v=m+" "+r;if(B(v)){var g=l,$=[],y=[],b=l,w=[],_=[],x=(" "+v).replace(/\s+/g,".");return f(I(x),function(t){var e=o(t,n);!e&&h&&(o(t,"addClass"),o(t,"removeClass"))}),{node:s,event:n,className:r,isClassBased:p,isSetClassOperation:h,applyStyles:function(){i&&t.css(e.extend(i.from||{},i.to||{}))},before:function(t){g=t,a(y,$,function(){g=l,t()})},after:function(t){b=t,a(_,w,function(){b=l,t()})},cancel:function(){$&&(f($,function(t){(t||l)(!0)}),g(!0)),w&&(f(w,function(t){(t||l)(!0)}),b(!0))}}}}}function M(t,n,r,i,o,a,s,u){function h(e){var i="$animate:"+e;x&&x[i]&&x[i].length>0&&_(function(){r.triggerHandler(i,{event:t,className:n})})}function d(){h("before")}function p(){h("after")}function m(){h("close"),u()}function v(){v.hasBeenRun||(v.hasBeenRun=!0,a())}function $(){if(!$.hasBeenRun){w&&w.applyStyles(),$.hasBeenRun=!0,s&&s.tempClasses&&f(s.tempClasses,function(t){c.removeClass(r,t)});var e=r.data(g);e&&(w&&w.isClassBased?j(r,n):(_(function(){var e=r.data(g)||{};M==e.index&&j(r,n,t)}),r.data(g,e))),m()}}var b=l,w=z(r,t,n,s);if(!w)return v(),d(),p(),$(),b;t=w.event,n=w.className;var x=e.element._data(w.node);if(x=x&&x.events,i||(i=o?o.parent():r.parent()),N(r,i))return v(),d(),p(),$(),b;var C=r.data(g)||{},E=C.active||{},k=C.totalActive||0,A=C.last,S=!1;if(k>0){var T=[];if(w.isClassBased){if("setClass"==A.event)T.push(A),j(r,n);else if(E[n]){var O=E[n];O.event==t?S=!0:(T.push(O),j(r,n))}}else if("leave"==t&&E["ng-leave"])S=!0;else{for(var I in E)T.push(E[I]);C={},j(r,!0)}T.length>0&&f(T,function(t){t.cancel()})}if(!w.isClassBased||w.isSetClassOperation||"animate"==t||S||(S="addClass"==t==r.hasClass(n)),S)return v(),d(),p(),m(),b;E=C.active||{},k=C.totalActive||0,"leave"==t&&r.one("$destroy",function(t){var n=e.element(this),r=n.data(g);if(r){var i=r.active["ng-leave"];i&&(i.cancel(),j(n,"ng-leave"))}}),c.addClass(r,y),s&&s.tempClasses&&f(s.tempClasses,function(t){c.addClass(r,t)});var M=R++;return k++,E[n]=w,r.data(g,{last:w,active:E,index:M,totalActive:k}),d(),w.before(function(e){var i=r.data(g);e=e||!i||!i.active[n]||w.isClassBased&&i.active[n].event!=t,v(),e===!0?$():(p(),w.after($))}),w.cancel}function D(t){var n=o(t);if(n){var r=e.isFunction(n.getElementsByClassName)?n.getElementsByClassName(y):n.querySelectorAll("."+y);f(r,function(t){t=e.element(t);var n=t.data(g);n&&n.active&&f(n.active,function(t){t.cancel()})})}}function j(t,e){if(u(t,w))b.disabled||(b.running=!1,b.structural=!1);else if(e){var n=t.data(g)||{},r=e===!0;!r&&n.active&&n.active[e]&&(n.totalActive--,delete n.active[e]),(r||!n.totalActive)&&(c.removeClass(t,y),t.removeData(g))}}function N(t,n){if(b.disabled)return!0;if(u(t,w))return b.running;var r,i,o;do{if(0===n.length)break;var a=u(n,w),s=a?b:n.data(g)||{};if(s.disabled)return!0;if(a&&(o=!0),r!==!1){var c=n.data($);e.isDefined(c)&&(r=c)}i=i||s.running||s.last&&!s.last.isClassBased}while(n=n.parent());return!o||!r&&i}c=k,w.data(g,b);var P=x.$watch(function(){return E.totalPendingRequests},function(t,e){0===t&&(P(),x.$$postDigest(function(){x.$$postDigest(function(){b.running=!1})}))}),R=0,F=i.classNameFilter(),B=F?function(t){return F.test(t)}:function(){return!0};return{animate:function(t,e,n,r,i){return r=r||"ng-inline-animate",i=T(i)||{},i.from=n?e:null,i.to=n?n:e,S(function(e){return M("animate",r,s(t),null,null,l,i,e)})},enter:function(n,r,i,o){return o=T(o),n=e.element(n),r=a(r),i=a(i),A(n,!0),t.enter(n,r,i),S(function(t){return M("enter","ng-enter",s(n),r,i,l,o,t)})},leave:function(n,r){return r=T(r),n=e.element(n),D(n),A(n,!0),S(function(e){return M("leave","ng-leave",s(n),null,null,function(){t.leave(n)},r,e)})},move:function(n,r,i,o){return o=T(o),n=e.element(n),r=a(r),i=a(i),D(n),A(n,!0),t.move(n,r,i),S(function(t){return M("move","ng-move",s(n),r,i,l,o,t)})},addClass:function(t,e,n){return this.setClass(t,e,[],n)},removeClass:function(t,e,n){return this.setClass(t,[],e,n)},setClass:function(n,r,i,a){a=T(a);var u="$$animateClasses";if(n=e.element(n),n=s(n),A(n))return t.$$setClassImmediately(n,r,i,a);var c,l=n.data(u),h=!!l;return l||(l={},l.classes={}),c=l.classes,r=d(r)?r:r.split(" "),f(r,function(t){t&&t.length&&(c[t]=!0)}),i=d(i)?i:i.split(" "),f(i,function(t){t&&t.length&&(c[t]=!1)}),h?(a&&l.options&&(l.options=e.extend(l.options||{},a)),l.promise):(n.data(u,l={classes:c,options:a}),l.promise=S(function(e){var r,i,a,s=o(n);if(s&&(r=n.data(u),n.removeData(u),a=n.parent(),i=s.parentNode),!i||i.$$NG_REMOVED||s.$$NG_REMOVED)return void e();var c=n.data(g)||{},l=O(n,r,c.active);return l?M("setClass",l,n,a,null,function(){l[0]&&t.$$addClassImmediately(n,l[0]),l[1]&&t.$$removeClassImmediately(n,l[1])},r.options,e):e()}))},cancel:function(t){t.$$cancelFn()},enabled:function(t,e){switch(arguments.length){case 2:if(t)j(e);else{var n=e.data(g)||{};n.disabled=!0,e.data(g,n)}break;case 1:b.disabled=!t;break;default:t=!b.disabled}return!!t}}}]),i.register("",["$window","$sniffer","$timeout","$$animateReflow",function(r,i,a,s){function u(){j||(j=s(function(){Y=[],j=null,W={}}))}function h(t,e){j&&j(),Y.push(e),j=s(function(){f(Y,function(t){t()}),Y=[],j=null,W={}})}function m(t,n){var r=o(t);t=e.element(r),K.push(t);var i=Date.now()+n;G>=i||(a.cancel(Z),G=i,Z=a(function(){g(K),K=[]},n,!1))}function g(t){f(t,function(t){var e=t.data(U);e&&f(e.closeAnimationFns,function(t){t()})})}function $(t,e){var n=e?W[e]:null;if(!n){var i=0,o=0,a=0,s=0;f(t,function(t){if(t.nodeType==v){var e=r.getComputedStyle(t)||{},n=e[O+N];i=Math.max(y(n),i);var u=e[O+R];o=Math.max(y(u),o);e[z+R];s=Math.max(y(e[z+R]),s);var c=y(e[z+N]);c>0&&(c*=parseInt(e[z+F],10)||1),a=Math.max(c,a)}}),n={total:0,transitionDelay:o,transitionDuration:i,animationDelay:s,animationDuration:a},e&&(W[e]=n)}return n}function y(t){var e=0,n=p(t)?t.split(/\s*,\s*/):[];return f(n,function(t){e=Math.max(parseFloat(t)||0,e)}),e}function b(t){var e=t.parent(),n=e.data(L);return n||(e.data(L,++X),n=X),n+"-"+o(t).getAttribute("class")}function w(t,e,n,r){var i=["ng-enter","ng-leave","ng-move"].indexOf(n)>=0,a=b(e),s=a+" "+n,u=W[s]?++W[s].total:0,l={};if(u>0){var f=n+"-stagger",h=a+" "+f,d=!W[h];d&&c.addClass(e,f),l=$(e,h),d&&c.removeClass(e,f)}c.addClass(e,n);var p=e.data(U)||{},m=$(e,s),v=m.transitionDuration,g=m.animationDuration;if(i&&0===v&&0===g)return c.removeClass(e,n),!1;var y=r||i&&v>0,w=g>0&&l.animationDelay>0&&0===l.animationDuration,_=p.closeAnimationFns||[];e.data(U,{stagger:l,cacheKey:s,running:p.running||0,itemIndex:u,blockTransition:y,closeAnimationFns:_});var E=o(e);return y&&(x(E,!0),r&&e.css(r)),w&&C(E,!0),!0}function _(t,e,n,r,i){function s(){e.off(R,u),c.removeClass(e,d),c.removeClass(e,p),N&&a.cancel(N),S(e,n);var t=o(e);for(var r in g)t.style.removeProperty(g[r])}function u(t){t.stopPropagation();var e=t.originalEvent||t,n=e.$manualTimeStamp||e.timeStamp||Date.now(),i=parseFloat(e.elapsedTime.toFixed(V));Math.max(n-P,0)>=z&&i>=T&&r()}var l=o(e),h=e.data(U);if(-1==l.getAttribute("class").indexOf(n)||!h)return void r();var d="",p="";f(n.split(" "),function(t,e){var n=(e>0?" ":"")+t;d+=n+"-active",p+=n+"-pending"});var v="",g=[],y=h.itemIndex,b=h.stagger,w=0;if(y>0){var _=0;b.transitionDelay>0&&0===b.transitionDuration&&(_=b.transitionDelay*y);var E=0;b.animationDelay>0&&0===b.animationDuration&&(E=b.animationDelay*y,g.push(D+"animation-play-state")),w=Math.round(100*Math.max(_,E))/100}w||(c.addClass(e,d),h.blockTransition&&x(l,!1));var k=h.cacheKey+" "+d,A=$(e,k),T=Math.max(A.transitionDuration,A.animationDuration);if(0===T)return c.removeClass(e,d),S(e,n),void r();!w&&i&&Object.keys(i).length>0&&(A.transitionDuration||(e.css("transition",A.animationDuration+"s linear all"),g.push("transition")),e.css(i));var O=Math.max(A.transitionDelay,A.animationDelay),z=O*H;if(g.length>0){var j=l.getAttribute("style")||"";";"!==j.charAt(j.length-1)&&(j+=";"),l.setAttribute("style",j+" "+v)}var N,P=Date.now(),R=M+" "+I,F=(O+T)*q,B=(w+F)*H;return w>0&&(c.addClass(e,p),N=a(function(){N=null,A.transitionDuration>0&&x(l,!1),A.animationDuration>0&&C(l,!1),c.addClass(e,d),c.removeClass(e,p),i&&(0===A.transitionDuration&&e.css("transition",A.animationDuration+"s linear all"),e.css(i),g.push("transition"))},w*H,!1)),e.on(R,u),h.closeAnimationFns.push(function(){s(),r()}),h.running++,m(e,B),s}function x(t,e){t.style[O+P]=e?"none":""}function C(t,e){t.style[z+B]=e?"paused":""}function E(t,e,n,r){return w(t,e,n,r)?function(t){t&&S(e,n)}:void 0}function k(t,e,n,r,i){return e.data(U)?_(t,e,n,r,i):(S(e,n),void r())}function A(t,e,n,r,i){var o=E(t,e,n,i.from);if(!o)return u(),void r();var a=o;return h(e,function(){a=k(t,e,n,r,i.to)}),function(t){(a||l)(t)}}function S(t,e){c.removeClass(t,e);var n=t.data(U);n&&(n.running&&n.running--,n.running&&0!==n.running||t.removeData(U))}function T(t,e){var n="";return t=d(t)?t:t.split(/\s+/),f(t,function(t,r){t&&t.length>0&&(n+=(r>0?" ":"")+t+e)}),n}var O,I,z,M,D="";t.ontransitionend===n&&t.onwebkittransitionend!==n?(D="-webkit-",O="WebkitTransition",I="webkitTransitionEnd transitionend"):(O="transition",I="transitionend"),t.onanimationend===n&&t.onwebkitanimationend!==n?(D="-webkit-",z="WebkitAnimation",M="webkitAnimationEnd animationend"):(z="animation",M="animationend");var j,N="Duration",P="Property",R="Delay",F="IterationCount",B="PlayState",L="$$ngAnimateKey",U="$$ngAnimateCSS3Data",V=3,q=1.5,H=1e3,W={},X=0,Y=[],Z=null,G=0,K=[];return{animate:function(t,e,n,r,i,o){return o=o||{},o.from=n,o.to=r,A("animate",t,e,i,o)},enter:function(t,e,n){return n=n||{},A("enter",t,"ng-enter",e,n)},leave:function(t,e,n){return n=n||{},A("leave",t,"ng-leave",e,n)},move:function(t,e,n){return n=n||{},A("move",t,"ng-move",e,n)},beforeSetClass:function(t,e,n,r,i){i=i||{};var o=T(n,"-remove")+" "+T(e,"-add"),a=E("setClass",t,o,i.from);return a?(h(t,r),a):(u(),void r())},beforeAddClass:function(t,e,n,r){r=r||{};var i=E("addClass",t,T(e,"-add"),r.from);return i?(h(t,n),i):(u(),void n())},beforeRemoveClass:function(t,e,n,r){r=r||{};var i=E("removeClass",t,T(e,"-remove"),r.from);return i?(h(t,n),i):(u(),void n())},setClass:function(t,e,n,r,i){i=i||{},n=T(n,"-remove"),e=T(e,"-add");var o=n+" "+e;return k("setClass",t,o,r,i.to)},addClass:function(t,e,n,r){return r=r||{},k("addClass",t,T(e,"-add"),n,r.to)},removeClass:function(t,e,n,r){return r=r||{},k("removeClass",t,T(e,"-remove"),n,r.to)}}}])}])}(window,window.angular),function(t,e,n){"use strict";e.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(t,r){function i(){var t,i,o,u;for(t in s)l(a[t])&&(r.cookies(t,n),delete s[t]);for(t in a)i=a[t],e.isString(i)||(i=""+i,a[t]=i),i!==s[t]&&(r.cookies(t,i),s[t]=i,u=!0);if(u){o=r.cookies();for(t in a)a[t]!==o[t]&&(l(o[t])?(delete a[t],delete s[t]):a[t]=s[t]=o[t])}}var o,a={},s={},u=!1,c=e.copy,l=e.isUndefined;return r.addPollFn(function(){var e=r.cookies();o!=e&&(o=e,c(e,s),c(e,a),u&&t.$apply())})(),u=!0,t.$watch(i),a}]).factory("$cookieStore",["$cookies",function(t){return{get:function(n){var r=t[n];return r?e.fromJson(r):r},put:function(n,r){t[n]=e.toJson(r)},remove:function(e){delete t[e]}}}])}(window,window.angular),angular.module("ui-notification",[]),angular.module("ui-notification").provider("Notification",function(){this.options={delay:5e3,startTop:10,startRight:10,verticalSpacing:10,horizontalSpacing:10,positionX:"right",positionY:"top",replaceMessage:!1,templateUrl:"angular-ui-notification.html"},this.setOptions=function(t){if(!angular.isObject(t))throw new Error("Options should be an object!");this.options=angular.extend({},this.options,t)},this.$get=["$timeout","$http","$compile","$templateCache","$rootScope","$injector","$sce","$q","$window",function(t,e,n,r,i,o,a,s,u){var c=this.options,l=c.startTop,f=c.startRight,h=c.verticalSpacing,d=c.horizontalSpacing,p=c.delay,m=[],v=!1,g=function(o,g){var $=s.defer();return"object"!=typeof o&&(o={message:o}),o.scope=o.scope?o.scope:i,o.template=o.templateUrl?o.templateUrl:c.templateUrl,o.delay=angular.isUndefined(o.delay)?p:o.delay,o.type=g?g:"",o.positionY=o.positionY?o.positionY:c.positionY,o.positionX=o.positionX?o.positionX:c.positionX,o.replaceMessage=o.replaceMessage?o.replaceMessage:c.replaceMessage,e.get(o.template,{cache:r}).success(function(e){var r=o.scope.$new();r.message=a.trustAsHtml(o.message),r.title=a.trustAsHtml(o.title),r.t=o.type.substr(0,1),r.delay=o.delay;var i=function(){for(var t=0,e=0,n=l,r=f,i=[],a=m.length-1;a>=0;a--){var s=m[a];if(o.replaceMessage&&a<m.length-1)s.addClass("killed");else{var u=parseInt(s[0].offsetHeight),c=parseInt(s[0].offsetWidth),p=i[s._positionY+s._positionX];v+u>window.innerHeight&&(p=l,e++,t=0);var v=n=p?0===t?p:p+h:l,g=r+e*(d+c);s.css(s._positionY,v+"px"),"center"==s._positionX?s.css("left",parseInt(window.innerWidth/2-c/2)+"px"):s.css(s._positionX,g+"px"),i[s._positionY+s._positionX]=v+u,t++}}},s=n(e)(r);s._positionY=o.positionY,s._positionX=o.positionX,s.addClass(o.type),s.bind("webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd click",function(t){t=t.originalEvent||t,("click"===t.type||"opacity"===t.propertyName&&t.elapsedTime>=1)&&(s.remove(),m.splice(m.indexOf(s),1),i())}),angular.isNumber(o.delay)&&t(function(){s.addClass("killed")},o.delay),angular.element(document.getElementsByTagName("body")).append(s);var c=-(parseInt(s[0].offsetHeight)+50);s.css(s._positionY,c+"px"),m.push(s),r._templateElement=s,r.kill=function(e){e?(m.splice(m.indexOf(r._templateElement),1),r._templateElement.remove(),t(i)):r._templateElement.addClass("killed")},t(i),v||(angular.element(u).bind("resize",function(){t(i)}),v=!0),$.resolve(r)}).error(function(t){throw new Error("Template ("+o.template+") could not be loaded. "+t)}),$.promise};return g.primary=function(t){return this(t,"primary")},g.error=function(t){return this(t,"error")},g.success=function(t){return this(t,"success")},g.info=function(t){return this(t,"info")},g.warning=function(t){return this(t,"warning")},g.clearAll=function(){angular.forEach(m,function(t){t.addClass("killed")})},g}]}),angular.module("ui-notification").run(["$templateCache",function(t){t.put("angular-ui-notification.html",'<div class="ui-notification"><h3 ng-show="title" ng-bind-html="title"></h3><div class="message" ng-bind-html="message"></div></div>')}]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(t,e,n){"use strict";function r(t,e){return V(new(V(function(){},{prototype:t})),e)}function i(t){return U(arguments,function(e){e!==t&&U(e,function(e,n){t.hasOwnProperty(n)||(t[n]=e)})}),t}function o(t,e){var n=[];for(var r in t.path){if(t.path[r]!==e.path[r])break;n.push(t.path[r])}return n}function a(t){if(Object.keys)return Object.keys(t);var e=[];return U(t,function(t,n){e.push(n)}),e}function s(t,e){if(Array.prototype.indexOf)return t.indexOf(e,Number(arguments[2])||0);var n=t.length>>>0,r=Number(arguments[2])||0;for(r=0>r?Math.ceil(r):Math.floor(r),0>r&&(r+=n);n>r;r++)if(r in t&&t[r]===e)return r;return-1}function u(t,e,n,r){var i,u=o(n,r),c={},l=[];for(var f in u)if(u[f]&&u[f].params&&(i=a(u[f].params),i.length))for(var h in i)s(l,i[h])>=0||(l.push(i[h]),c[i[h]]=t[i[h]]);return V({},c,e)}function c(t,e,n){if(!n){n=[];for(var r in t)n.push(r)}for(var i=0;i<n.length;i++){var o=n[i];if(t[o]!=e[o])return!1}return!0}function l(t,e){var n={};return U(t,function(t){n[t]=e[t]}),n}function f(t){var e={},n=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return U(n,function(n){n in t&&(e[n]=t[n])}),e}function h(t){var e={},n=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var r in t)-1==s(n,r)&&(e[r]=t[r]);return e}function d(t,e){var n=L(t),r=n?[]:{};return U(t,function(t,i){e(t,i)&&(r[n?r.length:i]=t)}),r}function p(t,e){var n=L(t)?[]:{};return U(t,function(t,r){n[r]=e(t,r)}),n}function m(t,e){var r=1,o=2,u={},c=[],l=u,f=V(t.when(u),{$$promises:u,$$values:u});this.study=function(u){function d(t,n){if($[n]!==o){if(g.push(n),$[n]===r)throw g.splice(0,s(g,n)),new Error("Cyclic dependency: "+g.join(" -> "));if($[n]=r,F(t))v.push(n,[function(){return e.get(t)}],c);else{var i=e.annotate(t);U(i,function(t){t!==n&&u.hasOwnProperty(t)&&d(u[t],t)}),v.push(n,t,i)}g.pop(),$[n]=o}}function p(t){return B(t)&&t.then&&t.$$promises}if(!B(u))throw new Error("'invocables' must be an object");var m=a(u||{}),v=[],g=[],$={};return U(u,d),u=g=$=null,function(r,o,a){function s(){--b||(w||i(y,o.$$values),g.$$values=y,g.$$promises=g.$$promises||!0,delete g.$$inheritedValues,d.resolve(y))}function u(t){g.$$failure=t,d.reject(t)}function c(n,i,o){function c(t){f.reject(t),u(t)}function l(){if(!P(g.$$failure))try{f.resolve(e.invoke(i,a,y)),f.promise.then(function(t){y[n]=t,s()},c)}catch(t){c(t)}}var f=t.defer(),h=0;U(o,function(t){$.hasOwnProperty(t)&&!r.hasOwnProperty(t)&&(h++,$[t].then(function(e){y[t]=e,--h||l()},c))}),h||l(),$[n]=f.promise}if(p(r)&&a===n&&(a=o,o=r,r=null),r){if(!B(r))throw new Error("'locals' must be an object")}else r=l;if(o){if(!p(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else o=f;var d=t.defer(),g=d.promise,$=g.$$promises={},y=V({},r),b=1+v.length/3,w=!1;if(P(o.$$failure))return u(o.$$failure),g;o.$$inheritedValues&&i(y,h(o.$$inheritedValues,m)),V($,o.$$promises),o.$$values?(w=i(y,h(o.$$values,m)),g.$$inheritedValues=h(o.$$values,m),s()):(o.$$inheritedValues&&(g.$$inheritedValues=h(o.$$inheritedValues,m)),o.then(s,u));for(var _=0,x=v.length;x>_;_+=3)r.hasOwnProperty(v[_])?s():c(v[_],v[_+1],v[_+2]);return g}},this.resolve=function(t,e,n,r){return this.study(t)(e,n,r)}}function v(t,e,n){this.fromConfig=function(t,e,n){return P(t.template)?this.fromString(t.template,e):P(t.templateUrl)?this.fromUrl(t.templateUrl,e):P(t.templateProvider)?this.fromProvider(t.templateProvider,e,n):null},this.fromString=function(t,e){return R(t)?t(e):t},this.fromUrl=function(n,r){return R(n)&&(n=n(r)),null==n?null:t.get(n,{cache:e,headers:{Accept:"text/html"}}).then(function(t){return t.data})},this.fromProvider=function(t,e,r){return n.invoke(t,null,r||{params:e})}}function g(t,e,i){function o(e,n,r,i){if(v.push(e),p[e])return p[e];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(e))throw new Error("Invalid parameter name '"+e+"' in pattern '"+t+"'");if(m[e])throw new Error("Duplicate parameter name '"+e+"' in pattern '"+t+"'");return m[e]=new W.Param(e,n,r,i),m[e]}function a(t,e,n,r){var i=["",""],o=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!e)return o;switch(n){case!1:i=["(",")"+(r?"?":"")];break;case!0:o=o.replace(/\/$/,""),i=["(?:/(",")|/)?"];break;default:i=["("+n+"|",")?"]}return o+i[0]+e+i[1]}function s(i,o){var a,s,u,c,l;return a=i[2]||i[3],l=e.params[a],u=t.substring(h,i.index),s=o?i[4]:i[4]||("*"==i[1]?".*":null),s&&(c=W.type(s)||r(W.type("string"),{pattern:new RegExp(s,e.caseInsensitive?"i":n)})),{id:a,regexp:s,segment:u,type:c,cfg:l}}e=V({params:{}},B(e)?e:{});var u,c=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,f="^",h=0,d=this.segments=[],p=i?i.params:{},m=this.params=i?i.params.$$new():new W.ParamSet,v=[];this.source=t;for(var g,$,y;(u=c.exec(t))&&(g=s(u,!1),!(g.segment.indexOf("?")>=0));)$=o(g.id,g.type,g.cfg,"path"),f+=a(g.segment,$.type.pattern.source,$.squash,$.isOptional),d.push(g.segment),h=c.lastIndex;y=t.substring(h);var b=y.indexOf("?");if(b>=0){var w=this.sourceSearch=y.substring(b);if(y=y.substring(0,b),this.sourcePath=t.substring(0,h+b),w.length>0)for(h=0;u=l.exec(w);)g=s(u,!0),$=o(g.id,g.type,g.cfg,"search"),h=c.lastIndex}else this.sourcePath=t,this.sourceSearch="";f+=a(y)+(e.strict===!1?"/?":"")+"$",d.push(y),this.regexp=new RegExp(f,e.caseInsensitive?"i":n),this.prefix=d[0],this.$$paramNames=v}function $(t){V(this,t)}function y(){function t(t){return null!=t?t.toString().replace(/~/g,"~~").replace(/\//g,"~2F"):t}function i(t){return null!=t?t.toString().replace(/~2F/g,"/").replace(/~~/g,"~"):t}function o(){return{strict:m,caseInsensitive:h}}function u(t){return R(t)||L(t)&&R(t[t.length-1])}function c(){for(;_.length;){var t=_.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");e.extend(b[t.name],f.invoke(t.def))}}function l(t){V(this,t||{})}W=this;var f,h=!1,m=!0,v=!1,b={},w=!0,_=[],x={string:{encode:t,decode:i,is:function(t){return null==t||!P(t)||"string"==typeof t},pattern:/[^/]*/},"int":{encode:t,decode:function(t){return parseInt(t,10)},is:function(t){return P(t)&&this.decode(t.toString())===t},pattern:/\d+/},bool:{encode:function(t){return t?1:0},decode:function(t){return 0!==parseInt(t,10)},is:function(t){return t===!0||t===!1},pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):n},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):n},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return this.is(t)&&this.is(e)&&t.toISOString()===e.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:e.toJson,decode:e.fromJson,is:e.isObject,equals:e.equals,pattern:/[^/]*/},any:{encode:e.identity,decode:e.identity,equals:e.equals,pattern:/.*/}};y.$$getDefaultValue=function(t){if(!u(t.value))return t.value;if(!f)throw new Error("Injectable functions cannot be called at configuration time");return f.invoke(t.value)},this.caseInsensitive=function(t){return P(t)&&(h=t),h},this.strictMode=function(t){return P(t)&&(m=t),m},this.defaultSquashPolicy=function(t){if(!P(t))return v;if(t!==!0&&t!==!1&&!F(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return v=t,t},this.compile=function(t,e){return new g(t,V(o(),e))},this.isMatcher=function(t){if(!B(t))return!1;var e=!0;return U(g.prototype,function(n,r){R(n)&&(e=e&&P(t[r])&&R(t[r]))}),e},this.type=function(t,e,n){if(!P(e))return b[t];if(b.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return b[t]=new $(V({name:t},e)),n&&(_.push({name:t,def:n}),w||c()),this},U(x,function(t,e){b[e]=new $(V({name:e},t))}),b=r(b,{}),this.$get=["$injector",function(t){return f=t,w=!1,c(),U(x,function(t,e){b[e]||(b[e]=new $(t))}),this}],this.Param=function(t,r,i,o){function c(t){var e=B(t)?a(t):[],n=-1===s(e,"value")&&-1===s(e,"type")&&-1===s(e,"squash")&&-1===s(e,"array");return n&&(t={value:t}),t.$$fn=u(t.value)?t.value:function(){return t.value},t}function l(n,r,i){if(n.type&&r)throw new Error("Param '"+t+"' has two type configurations.");return r?r:n.type?e.isString(n.type)?b[n.type]:n.type instanceof $?n.type:new $(n.type):"config"===i?b.any:b.string}function h(){var e={array:"search"===o?"auto":!1},n=t.match(/\[\]$/)?{array:!0}:{};return V(e,n,i).array}function m(t,e){var n=t.squash;if(!e||n===!1)return!1;if(!P(n)||null==n)return v;if(n===!0||F(n))return n;throw new Error("Invalid squash policy: '"+n+"'. Valid policies: false, true, or arbitrary string")}function g(t,e,r,i){var o,a,u=[{from:"",to:r||e?n:""},{from:null,to:r||e?n:""}];return o=L(t.replace)?t.replace:[],F(i)&&o.push({from:i,to:n}),a=p(o,function(t){return t.from}),d(u,function(t){return-1===s(a,t.from)}).concat(o)}function y(){if(!f)throw new Error("Injectable functions cannot be called at configuration time");var t=f.invoke(i.$$fn);if(null!==t&&t!==n&&!x.type.is(t))throw new Error("Default value ("+t+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return t}function w(t){function e(t){return function(e){return e.from===t}}function n(t){var n=p(d(x.replace,e(t)),function(t){return t.to});return n.length?n[0]:t}return t=n(t),P(t)?x.type.$normalize(t):y()}function _(){return"{Param:"+t+" "+r+" squash: '"+k+"' optional: "+E+"}"}var x=this;i=c(i),r=l(i,r,o);var C=h();r=C?r.$asArray(C,"search"===o):r,
"string"!==r.name||C||"path"!==o||i.value!==n||(i.value="");var E=i.value!==n,k=m(i,E),A=g(i,C,E,k);V(this,{id:t,type:r,location:o,array:C,squash:k,replace:A,isOptional:E,value:w,dynamic:n,config:i,toString:_})},l.prototype={$$new:function(){return r(this,V(new l,{$$parent:this}))},$$keys:function(){for(var t=[],e=[],n=this,r=a(l.prototype);n;)e.push(n),n=n.$$parent;return e.reverse(),U(e,function(e){U(a(e),function(e){-1===s(t,e)&&-1===s(r,e)&&t.push(e)})}),t},$$values:function(t){var e={},n=this;return U(n.$$keys(),function(r){e[r]=n[r].value(t&&t[r])}),e},$$equals:function(t,e){var n=!0,r=this;return U(r.$$keys(),function(i){var o=t&&t[i],a=e&&e[i];r[i].type.equals(o,a)||(n=!1)}),n},$$validates:function(t){var r,i,o,a,s,u=this.$$keys();for(r=0;r<u.length&&(i=this[u[r]],o=t[u[r]],o!==n&&null!==o||!i.isOptional);r++){if(a=i.type.$normalize(o),!i.type.is(a))return!1;if(s=i.type.encode(a),e.isString(s)&&!i.type.pattern.exec(s))return!1}return!0},$$parent:n},this.ParamSet=l}function b(t,r){function i(t){var e=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(t.source);return null!=e?e[1].replace(/\\(.)/g,"$1"):""}function o(t,e){return t.replace(/\$(\$|\d{1,2})/,function(t,n){return e["$"===n?0:Number(n)]})}function a(t,e,n){if(!n)return!1;var r=t.invoke(e,e,{$match:n});return P(r)?r:!0}function s(r,i,o,a,s){function h(t,e,n){return"/"===v?t:e?v.slice(0,-1)+t:n?v.slice(1)+t:t}function d(t){function e(t){var e=t(o,r);return e?(F(e)&&r.replace().url(e),!0):!1}if(!t||!t.defaultPrevented){m&&r.url()===m;m=n;var i,a=c.length;for(i=0;a>i;i++)if(e(c[i]))return;l&&e(l)}}function p(){return u=u||i.$on("$locationChangeSuccess",d)}var m,v=a.baseHref(),g=r.url();return c.sort(function(t,e){var n=t.prefix?t.prefix.length:0,r=e.prefix?e.prefix.length:0;return r-n}),f||p(),{sync:function(){d()},listen:function(){return p()},update:function(t){return t?void(g=r.url()):void(r.url()!==g&&(r.url(g),r.replace()))},push:function(t,e,i){var o=t.format(e||{});null!==o&&e&&e["#"]&&(o+="#"+e["#"]),r.url(o),m=i&&i.$$avoidResync?r.url():n,i&&i.replace&&r.replace()},href:function(n,i,o){if(!n.validates(i))return null;var a=t.html5Mode();e.isObject(a)&&(a=a.enabled),a=a&&s.history;var u=n.format(i);if(o=o||{},a||null===u||(u="#"+t.hashPrefix()+u),null!==u&&i&&i["#"]&&(u+="#"+i["#"]),u=h(u,a,o.absolute),!o.absolute||!u)return u;var c=!a&&u?"/":"",l=r.port();return l=80===l||443===l?"":":"+l,[r.protocol(),"://",r.host(),l,c,u].join("")}}}var u,c=[],l=null,f=!1;this.rule=function(t){if(!R(t))throw new Error("'rule' must be a function");return c.push(t),this},this.otherwise=function(t){if(F(t)){var e=t;t=function(){return e}}else if(!R(t))throw new Error("'rule' must be a function");return l=t,this},this.when=function(t,e){var n,s=F(e);if(F(t)&&(t=r.compile(t)),!s&&!R(e)&&!L(e))throw new Error("invalid 'handler' in when()");var u={matcher:function(t,e){return s&&(n=r.compile(e),e=["$match",function(t){return n.format(t)}]),V(function(n,r){return a(n,e,t.exec(r.path(),r.search()))},{prefix:F(t.prefix)?t.prefix:""})},regex:function(t,e){if(t.global||t.sticky)throw new Error("when() RegExp must not be global or sticky");return s&&(n=e,e=["$match",function(t){return o(n,t)}]),V(function(n,r){return a(n,e,t.exec(r.path()))},{prefix:i(t)})}},c={matcher:r.isMatcher(t),regex:t instanceof RegExp};for(var l in c)if(c[l])return this.rule(u[l](t,e));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(t){t===n&&(t=!0),f=t},this.$get=s,s.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function w(t,i){function o(t){return 0===t.indexOf(".")||0===t.indexOf("^")}function h(t,e){if(!t)return n;var r=F(t),i=r?t:t.name,a=o(i);if(a){if(!e)throw new Error("No reference point given for path '"+i+"'");e=h(e);for(var s=i.split("."),u=0,c=s.length,l=e;c>u;u++)if(""!==s[u]||0!==u){if("^"!==s[u])break;if(!l.parent)throw new Error("Path '"+i+"' not valid for state '"+e.name+"'");l=l.parent}else l=e;s=s.slice(u).join("."),i=l.name+(l.name&&s?".":"")+s}var f=E[i];return!f||!r&&(r||f!==t&&f.self!==t)?n:f}function d(t,e){k[t]||(k[t]=[]),k[t].push(e)}function m(t){for(var e=k[t]||[];e.length;)v(e.shift())}function v(e){e=r(e,{self:e,resolve:e.resolve||{},toString:function(){return this.name}});var n=e.name;if(!F(n)||n.indexOf("@")>=0)throw new Error("State must have a valid name");if(E.hasOwnProperty(n))throw new Error("State '"+n+"' is already defined");var i=-1!==n.indexOf(".")?n.substring(0,n.lastIndexOf(".")):F(e.parent)?e.parent:B(e.parent)&&F(e.parent.name)?e.parent.name:"";if(i&&!E[i])return d(i,e.self);for(var o in S)R(S[o])&&(e[o]=S[o](e,S.$delegates[o]));return E[n]=e,!e[A]&&e.url&&t.when(e.url,["$match","$stateParams",function(t,n){C.$current.navigable==e&&c(t,n)||C.transitionTo(e,t,{inherit:!0,location:!1})}]),m(n),e}function g(t){return t.indexOf("*")>-1}function $(t){for(var e=t.split("."),n=C.$current.name.split("."),r=0,i=e.length;i>r;r++)"*"===e[r]&&(n[r]="*");return"**"===e[0]&&(n=n.slice(s(n,e[1])),n.unshift("**")),"**"===e[e.length-1]&&(n.splice(s(n,e[e.length-2])+1,Number.MAX_VALUE),n.push("**")),e.length!=n.length?!1:n.join("")===e.join("")}function y(t,e){return F(t)&&!P(e)?S[t]:R(e)&&F(t)?(S[t]&&!S.$delegates[t]&&(S.$delegates[t]=S[t]),S[t]=e,this):this}function b(t,e){return B(t)?e=t:e.name=t,v(e),this}function w(t,i,o,s,f,d,m,v,y){function b(e,n,r,o){var a=t.$broadcast("$stateNotFound",e,n,r);if(a.defaultPrevented)return m.update(),T;if(!a.retry)return null;if(o.$retry)return m.update(),O;var s=C.transition=i.when(a.retry);return s.then(function(){return s!==C.transition?k:(e.options.$retry=!0,C.transitionTo(e.to,e.toParams,e.options))},function(){return T}),m.update(),s}function w(t,n,r,a,u,c){function h(){var n=[];return U(t.views,function(r,i){var a=r.resolve&&r.resolve!==t.resolve?r.resolve:{};a.$template=[function(){return o.load(i,{view:r,locals:u.globals,params:d,notify:c.notify})||""}],n.push(f.resolve(a,u.globals,u.resolve,t).then(function(n){if(R(r.controllerProvider)||L(r.controllerProvider)){var o=e.extend({},a,u.globals);n.$$controller=s.invoke(r.controllerProvider,null,o)}else n.$$controller=r.controller;n.$$state=t,n.$$controllerAs=r.controllerAs,u[i]=n}))}),i.all(n).then(function(){return u.globals})}var d=r?n:l(t.params.$$keys(),n),p={$stateParams:d};u.resolve=f.resolve(t.resolve,p,u.resolve,t);var m=[u.resolve.then(function(t){u.globals=t})];return a&&m.push(a),i.all(m).then(h).then(function(t){return u})}var k=i.reject(new Error("transition superseded")),S=i.reject(new Error("transition prevented")),T=i.reject(new Error("transition aborted")),O=i.reject(new Error("transition failed"));return x.locals={resolve:null,globals:{$stateParams:{}}},C={params:{},current:x.self,$current:x,transition:null},C.reload=function(t){return C.transitionTo(C.current,d,{reload:t||!0,inherit:!1,notify:!0})},C.go=function(t,e,n){return C.transitionTo(t,e,V({inherit:!0,relative:C.$current},n))},C.transitionTo=function(e,n,o){n=n||{},o=V({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},o||{});var a,c=C.$current,f=C.params,p=c.path,v=h(e,o.relative),g=n["#"];if(!P(v)){var $={to:e,toParams:n,options:o},y=b($,c.self,f,o);if(y)return y;if(e=$.to,n=$.toParams,o=$.options,v=h(e,o.relative),!P(v)){if(!o.relative)throw new Error("No such state '"+e+"'");throw new Error("Could not resolve '"+e+"' from state '"+o.relative+"'")}}if(v[A])throw new Error("Cannot transition to abstract state '"+e+"'");if(o.inherit&&(n=u(d,n||{},C.$current,v)),!v.params.$$validates(n))return O;n=v.params.$$values(n),e=v;var E=e.path,T=0,I=E[T],z=x.locals,M=[];if(o.reload){if(F(o.reload)||B(o.reload)){if(B(o.reload)&&!o.reload.name)throw new Error("Invalid reload state object");var D=o.reload===!0?p[0]:h(o.reload);if(o.reload&&!D)throw new Error("No such reload state '"+(F(o.reload)?o.reload:o.reload.name)+"'");for(;I&&I===p[T]&&I!==D;)z=M[T]=I.locals,T++,I=E[T]}}else for(;I&&I===p[T]&&I.ownParams.$$equals(n,f);)z=M[T]=I.locals,T++,I=E[T];if(_(e,n,c,f,z,o))return g&&(n["#"]=g),C.params=n,q(C.params,d),q(l(e.params.$$keys(),d),e.locals.globals.$stateParams),o.location&&e.navigable&&e.navigable.url&&(m.push(e.navigable.url,n,{$$avoidResync:!0,replace:"replace"===o.location}),m.update(!0)),C.transition=null,i.when(C.current);if(n=l(e.params.$$keys(),n||{}),g&&(n["#"]=g),o.notify&&t.$broadcast("$stateChangeStart",e.self,n,c.self,f,o).defaultPrevented)return t.$broadcast("$stateChangeCancel",e.self,n,c.self,f),null==C.transition&&m.update(),S;for(var j=i.when(z),N=T;N<E.length;N++,I=E[N])z=M[N]=r(z),j=w(I,n,I===e,j,z,o);var R=C.transition=j.then(function(){var r,i,a;if(C.transition!==R)return k;for(r=p.length-1;r>=T;r--)a=p[r],a.self.onExit&&s.invoke(a.self.onExit,a.self,a.locals.globals),a.locals=null;for(r=T;r<E.length;r++)i=E[r],i.locals=M[r],i.self.onEnter&&s.invoke(i.self.onEnter,i.self,i.locals.globals);return C.transition!==R?k:(C.$current=e,C.current=e.self,C.params=n,q(C.params,d),C.transition=null,o.location&&e.navigable&&m.push(e.navigable.url,e.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===o.location}),o.notify&&t.$broadcast("$stateChangeSuccess",e.self,n,c.self,f),m.update(!0),C.current)},function(r){return C.transition!==R?k:(C.transition=null,a=t.$broadcast("$stateChangeError",e.self,n,c.self,f,r),a.defaultPrevented||m.update(),i.reject(r))});return R},C.is=function(t,e,r){r=V({relative:C.$current},r||{});var i=h(t,r.relative);return P(i)?C.$current!==i?!1:e?c(i.params.$$values(e),d):!0:n},C.includes=function(t,e,r){if(r=V({relative:C.$current},r||{}),F(t)&&g(t)){if(!$(t))return!1;t=C.$current.name}var i=h(t,r.relative);return P(i)?P(C.$current.includes[i.name])?e?c(i.params.$$values(e),d,a(e)):!0:!1:n},C.href=function(t,e,r){r=V({lossy:!0,inherit:!0,absolute:!1,relative:C.$current},r||{});var i=h(t,r.relative);if(!P(i))return null;r.inherit&&(e=u(d,e||{},C.$current,i));var o=i&&r.lossy?i.navigable:i;return o&&o.url!==n&&null!==o.url?m.href(o.url,l(i.params.$$keys().concat("#"),e||{}),{absolute:r.absolute}):null},C.get=function(t,e){if(0===arguments.length)return p(a(E),function(t){return E[t].self});var n=h(t,e||C.$current);return n&&n.self?n.self:null},C}function _(t,e,n,r,i,o){function a(t,e,n){function r(e){return"search"!=t.params[e].location}var i=t.params.$$keys().filter(r),o=f.apply({},[t.params].concat(i)),a=new W.ParamSet(o);return a.$$equals(e,n)}return!o.reload&&t===n&&(i===n.locals||t.self.reloadOnSearch===!1&&a(n,r,e))?!0:void 0}var x,C,E={},k={},A="abstract",S={parent:function(t){if(P(t.parent)&&t.parent)return h(t.parent);var e=/^(.+)\.[^.]+$/.exec(t.name);return e?h(e[1]):x},data:function(t){return t.parent&&t.parent.data&&(t.data=t.self.data=r(t.parent.data,t.data)),t.data},url:function(t){var e=t.url,n={params:t.params||{}};if(F(e))return"^"==e.charAt(0)?i.compile(e.substring(1),n):(t.parent.navigable||x).url.concat(e,n);if(!e||i.isMatcher(e))return e;throw new Error("Invalid url '"+e+"' in state '"+t+"'")},navigable:function(t){return t.url?t:t.parent?t.parent.navigable:null},ownParams:function(t){var e=t.url&&t.url.params||new W.ParamSet;return U(t.params||{},function(t,n){e[n]||(e[n]=new W.Param(n,null,t,"config"))}),e},params:function(t){return t.parent&&t.parent.params?V(t.parent.params.$$new(),t.ownParams):new W.ParamSet},views:function(t){var e={};return U(P(t.views)?t.views:{"":t},function(n,r){r.indexOf("@")<0&&(r+="@"+t.parent.name),e[r]=n}),e},path:function(t){return t.parent?t.parent.path.concat(t):[]},includes:function(t){var e=t.parent?V({},t.parent.includes):{};return e[t.name]=!0,e},$delegates:{}};x=v({name:"",url:"^",views:null,"abstract":!0}),x.navigable=null,this.decorator=y,this.state=b,this.$get=w,w.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function _(){function t(t,e){return{load:function(t,n){var r,i={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return n=V(i,n),n.view&&(r=e.fromConfig(n.view,n.params,n.locals)),r}}}this.$get=t,t.$inject=["$rootScope","$templateFactory"]}function x(){var t=!1;this.useAnchorScroll=function(){t=!0},this.$get=["$anchorScroll","$timeout",function(e,n){return t?e:function(t){return n(function(){t[0].scrollIntoView()},0,!1)}}]}function C(t,n,r,i){function o(){return n.has?function(t){return n.has(t)?n.get(t):null}:function(t){try{return n.get(t)}catch(e){return null}}}function a(t,n){var r=function(){return{enter:function(t,e,n){e.after(t),n()},leave:function(t,e){t.remove(),e()}}};if(c)return{enter:function(t,n,r){e.version.minor>2?c.enter(t,null,n).then(r):c.enter(t,null,n,r)},leave:function(t,n){e.version.minor>2?c.leave(t).then(n):c.leave(t,n)}};if(u){var i=u&&u(n,t);return{enter:function(t,e,n){i.enter(t,null,e),n()},leave:function(t,e){i.leave(t),e()}}}return r()}var s=o(),u=s("$animator"),c=s("$animate"),l={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(n,o,s){return function(n,o,u){function c(){function t(){e&&e.remove(),n&&n.$destroy()}var e=f,n=d;n&&(n._willBeDestroyed=!0),h?(g.leave(h,function(){t(),f=null}),f=h):(t(),f=null),h=null,d=null}function l(a){var l,f=k(n,u,o,i),$=f&&t.$current&&t.$current.locals[f];if((a||$!==p)&&!n._willBeDestroyed){l=n.$new(),p=t.$current.locals[f],l.$emit("$viewContentLoading",f);var y=s(l,function(t){g.enter(t,o,function(){d&&d.$emit("$viewContentAnimationEnded"),(e.isDefined(v)&&!v||n.$eval(v))&&r(t)}),c()});h=y,d=l,d.$emit("$viewContentLoaded",f),d.$eval(m)}}var f,h,d,p,m=u.onload||"",v=u.autoscroll,g=a(u,n);n.$on("$stateChangeSuccess",function(){l(!1)}),l(!0)}}};return l}function E(t,e,n,r){return{restrict:"ECA",priority:-400,compile:function(i){var o=i.html();return function(i,a,s){var u=n.$current,c=k(i,s,a,r),l=u&&u.locals[c];if(l){a.data("$uiView",{name:c,state:l.$$state}),a.html(l.$template?l.$template:o);var f=t(a.contents());if(l.$$controller){l.$scope=i,l.$element=a;var h=e(l.$$controller,l);l.$$controllerAs&&(i[l.$$controllerAs]=h),a.data("$ngControllerController",h),a.children().data("$ngControllerController",h)}f(i)}}}}}function k(t,e,n,r){var i=r(e.uiView||e.name||"")(t),o=n.inheritedData("$uiView");return i.indexOf("@")>=0?i:i+"@"+(o?o.state.name:"")}function A(t,e){var n,r=t.match(/^\s*({[^}]*})\s*$/);if(r&&(t=e+"("+r[1]+")"),n=t.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!n||4!==n.length)throw new Error("Invalid state ref '"+t+"'");return{state:n[1],paramExpr:n[3]||null}}function S(t){var e=t.parent().inheritedData("$uiView");return e&&e.state&&e.state.name?e.state:void 0}function T(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),n="FORM"===t[0].nodeName;return{attr:n?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!n}}function O(t,e,n,r,i){return function(o){var a=o.which||o.button,s=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||t.attr("target"))){var u=n(function(){e.go(s.state,s.params,s.options)});o.preventDefault();var c=r.isAnchor&&!s.href?1:0;o.preventDefault=function(){c--<=0&&n.cancel(u)}}}}function I(t,e){return{relative:S(t)||e.$current,inherit:!0}}function z(t,n){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,i,o,a){var s=A(o.uiSref,t.current.name),u={state:s.state,href:null,params:null},c=T(i),l=a[1]||a[0];u.options=V(I(i,t),o.uiSrefOpts?r.$eval(o.uiSrefOpts):{});var f=function(n){n&&(u.params=e.copy(n)),u.href=t.href(s.state,u.params,u.options),l&&l.$$addStateInfo(s.state,u.params),null!==u.href&&o.$set(c.attr,u.href)};s.paramExpr&&(r.$watch(s.paramExpr,function(t){t!==u.params&&f(t)},!0),u.params=e.copy(r.$eval(s.paramExpr))),f(),c.clickable&&i.bind("click",O(i,t,n,c,function(){return u}))}}}function M(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,r,i,o){function a(e){f.state=e[0],f.params=e[1],f.options=e[2],f.href=t.href(f.state,f.params,f.options),u&&u.$$addStateInfo(ref.state,f.params),f.href&&i.$set(s.attr,f.href)}var s=T(r),u=o[1]||o[0],c=[i.uiState,i.uiStateParams||null,i.uiStateOpts||null],l="["+c.map(function(t){return t||"null"}).join(", ")+"]",f={state:null,params:null,options:null,href:null};n.$watch(l,a,!0),a(n.$eval(l)),s.clickable&&r.bind("click",O(r,t,e,s,function(){return f}))}}}function D(t,e,n){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(e,r,i,o){function a(e,n,i){var o=t.get(e,S(r)),a=s(e,n);m.push({state:o||{name:e},params:n,hash:a}),v[a]=i}function s(t,n){if(!F(t))throw new Error("state should be a string");return B(n)?t+H(n):(n=e.$eval(n),B(n)?t+H(n):t)}function u(){for(var t=0;t<m.length;t++)f(m[t].state,m[t].params)?c(r,v[m[t].hash]):l(r,v[m[t].hash]),h(m[t].state,m[t].params)?c(r,d):l(r,d)}function c(t,e){o(function(){t.addClass(e)})}function l(t,e){t.removeClass(e)}function f(e,n){return t.includes(e.name,n)}function h(e,n){return t.is(e.name,n)}var d,p,m=[],v={};d=n(i.uiSrefActiveEq||"",!1)(e);try{p=e.$eval(i.uiSrefActive)}catch(g){}p=p||n(i.uiSrefActive||"",!1)(e),B(p)&&U(p,function(n,r){if(F(n)){var i=A(n,t.current.name);a(i.state,e.$eval(i.paramExpr),r)}}),this.$$addStateInfo=function(t,e){B(p)&&m.length>0||(a(t,e,p),u())},e.$on("$stateChangeSuccess",u),u()}]}}function j(t){var e=function(e,n){return t.is(e,n)};return e.$stateful=!0,e}function N(t){var e=function(e,n,r){return t.includes(e,n,r)};return e.$stateful=!0,e}var P=e.isDefined,R=e.isFunction,F=e.isString,B=e.isObject,L=e.isArray,U=e.forEach,V=e.extend,q=e.copy,H=e.toJson;e.module("ui.router.util",["ng"]),e.module("ui.router.router",["ui.router.util"]),e.module("ui.router.state",["ui.router.router","ui.router.util"]),e.module("ui.router",["ui.router.state"]),e.module("ui.router.compat",["ui.router"]),m.$inject=["$q","$injector"],e.module("ui.router.util").service("$resolve",m),v.$inject=["$http","$templateCache","$injector"],e.module("ui.router.util").service("$templateFactory",v);var W;g.prototype.concat=function(t,e){var n={caseInsensitive:W.caseInsensitive(),strict:W.strictMode(),squash:W.defaultSquashPolicy()};return new g(this.sourcePath+t+this.sourceSearch,V(n,e),this)},g.prototype.toString=function(){return this.source},g.prototype.exec=function(t,e){function n(t){function e(t){return t.split("").reverse().join("")}function n(t){return t.replace(/\\-/g,"-")}var r=e(t).split(/-(?!\\)/),i=p(r,e);return p(i,n).reverse()}var r=this.regexp.exec(t);if(!r)return null;e=e||{};var i,o,a,s=this.parameters(),u=s.length,c=this.segments.length-1,l={};if(c!==r.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var f,h;for(i=0;c>i;i++){for(a=s[i],f=this.params[a],h=r[i+1],o=0;o<f.replace.length;o++)f.replace[o].from===h&&(h=f.replace[o].to);h&&f.array===!0&&(h=n(h)),P(h)&&(h=f.type.decode(h)),l[a]=f.value(h)}for(;u>i;i++){for(a=s[i],l[a]=this.params[a].value(e[a]),f=this.params[a],h=e[a],o=0;o<f.replace.length;o++)f.replace[o].from===h&&(h=f.replace[o].to);P(h)&&(h=f.type.decode(h)),l[a]=f.value(h)}return l},g.prototype.parameters=function(t){return P(t)?this.params[t]||null:this.$$paramNames},g.prototype.validates=function(t){return this.params.$$validates(t)},g.prototype.format=function(t){function e(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})}t=t||{};var n=this.segments,r=this.parameters(),i=this.params;if(!this.validates(t))return null;var o,a=!1,s=n.length-1,u=r.length,c=n[0];for(o=0;u>o;o++){var l=s>o,f=r[o],h=i[f],d=h.value(t[f]),m=h.isOptional&&h.type.equals(h.value(),d),v=m?h.squash:!1,g=h.type.encode(d);if(l){var $=n[o+1],y=o+1===s;if(v===!1)null!=g&&(c+=L(g)?p(g,e).join("-"):encodeURIComponent(g)),c+=$;else if(v===!0){var b=c.match(/\/$/)?/\/?(.*)/:/(.*)/;c+=$.match(b)[1]}else F(v)&&(c+=v+$);y&&h.squash===!0&&"/"===c.slice(-1)&&(c=c.slice(0,-1))}else{if(null==g||m&&v!==!1)continue;if(L(g)||(g=[g]),0===g.length)continue;g=p(g,encodeURIComponent).join("&"+f+"="),c+=(a?"&":"?")+(f+"="+g),a=!0}}return c},$.prototype.is=function(t,e){return!0},$.prototype.encode=function(t,e){return t},$.prototype.decode=function(t,e){return t},$.prototype.equals=function(t,e){return t==e},$.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},$.prototype.pattern=/.*/,$.prototype.toString=function(){return"{Type:"+this.name+"}"},$.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},$.prototype.$asArray=function(t,e){function r(t,e){function r(t,e){return function(){return t[e].apply(t,arguments)}}function i(t){return L(t)?t:P(t)?[t]:[]}function o(t){switch(t.length){case 0:return n;case 1:return"auto"===e?t[0]:t;default:return t}}function a(t){return!t}function s(t,e){return function(n){if(L(n)&&0===n.length)return n;n=i(n);var r=p(n,t);return e===!0?0===d(r,a).length:o(r)}}function u(t){return function(e,n){var r=i(e),o=i(n);if(r.length!==o.length)return!1;for(var a=0;a<r.length;a++)if(!t(r[a],o[a]))return!1;return!0}}this.encode=s(r(t,"encode")),this.decode=s(r(t,"decode")),this.is=s(r(t,"is"),!0),this.equals=u(r(t,"equals")),this.pattern=t.pattern,this.$normalize=s(r(t,"$normalize")),this.name=t.name,this.$arrayMode=e}if(!t)return this;if("auto"===t&&!e)throw new Error("'auto' array mode is for query parameters only");return new r(this,t)},e.module("ui.router.util").provider("$urlMatcherFactory",y),e.module("ui.router.util").run(["$urlMatcherFactory",function(t){}]),b.$inject=["$locationProvider","$urlMatcherFactoryProvider"],e.module("ui.router.router").provider("$urlRouter",b),w.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],e.module("ui.router.state").factory("$stateParams",function(){return{}}).provider("$state",w),_.$inject=[],e.module("ui.router.state").provider("$view",_),e.module("ui.router.state").provider("$uiViewScroll",x),C.$inject=["$state","$injector","$uiViewScroll","$interpolate"],E.$inject=["$compile","$controller","$state","$interpolate"],e.module("ui.router.state").directive("uiView",C),e.module("ui.router.state").directive("uiView",E),z.$inject=["$state","$timeout"],M.$inject=["$state","$timeout"],D.$inject=["$state","$stateParams","$interpolate"],e.module("ui.router.state").directive("uiSref",z).directive("uiSrefActive",D).directive("uiSrefActiveEq",D).directive("uiState",M),j.$inject=["$state"],N.$inject=["$state"],e.module("ui.router.state").filter("isState",j).filter("includedByState",N)}(window,window.angular),function(){"use strict";function t(e,r){function i(t,e){return function(){return t.apply(e,arguments)}}var o;if(r=r||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=r.touchBoundary||10,this.layer=e,this.tapDelay=r.tapDelay||200,this.tapTimeout=r.tapTimeout||700,!t.notNeeded(e)){for(var a=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],s=this,u=0,c=a.length;c>u;u++)s[a[u]]=i(s[a[u]],s);n&&(e.addEventListener("mouseover",this.onMouse,!0),e.addEventListener("mousedown",this.onMouse,!0),e.addEventListener("mouseup",this.onMouse,!0)),e.addEventListener("click",this.onClick,!0),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(e.removeEventListener=function(t,n,r){var i=Node.prototype.removeEventListener;"click"===t?i.call(e,t,n.hijacked||n,r):i.call(e,t,n,r)},e.addEventListener=function(t,n,r){var i=Node.prototype.addEventListener;"click"===t?i.call(e,t,n.hijacked||(n.hijacked=function(t){t.propagationStopped||n(t)}),r):i.call(e,t,n,r)}),"function"==typeof e.onclick&&(o=e.onclick,e.addEventListener("click",function(t){o(t)},!1),e.onclick=null)}}var e=navigator.userAgent.indexOf("Windows Phone")>=0,n=navigator.userAgent.indexOf("Android")>0&&!e,r=/iP(ad|hone|od)/.test(navigator.userAgent)&&!e,i=r&&/OS 4_\d(_\d)?/.test(navigator.userAgent),o=r&&/OS [6-7]_\d/.test(navigator.userAgent),a=navigator.userAgent.indexOf("BB10")>0;t.prototype.needsClick=function(t){switch(t.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(t.disabled)return!0;break;case"input":if(r&&"file"===t.type||t.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(t.className)},t.prototype.needsFocus=function(t){switch(t.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!n;case"input":switch(t.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},t.prototype.sendClick=function(t,e){var n,r;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),r=e.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(t),!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,t.dispatchEvent(n)},t.prototype.determineEventType=function(t){return n&&"select"===t.tagName.toLowerCase()?"mousedown":"click"},t.prototype.focus=function(t){var e;r&&t.setSelectionRange&&0!==t.type.indexOf("date")&&"time"!==t.type&&"month"!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},t.prototype.updateScrollParent=function(t){var e,n;if(e=t.fastClickScrollParent,!e||!e.contains(t)){n=t;do{if(n.scrollHeight>n.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},t.prototype.getTargetElementFromEventTarget=function(t){return t.nodeType===Node.TEXT_NODE?t.parentNode:t},t.prototype.onTouchStart=function(t){var e,n,o;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),n=t.targetTouches[0],r){if(o=window.getSelection(),o.rangeCount&&!o.isCollapsed)return!0;if(!i){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=n.pageX,this.touchStartY=n.pageY,t.timeStamp-this.lastClickTime<this.tapDelay&&t.preventDefault(),!0},t.prototype.touchHasMoved=function(t){var e=t.changedTouches[0],n=this.touchBoundary;return Math.abs(e.pageX-this.touchStartX)>n||Math.abs(e.pageY-this.touchStartY)>n?!0:!1},t.prototype.onTouchMove=function(t){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(t.target)||this.touchHasMoved(t))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},t.prototype.findControl=function(t){return void 0!==t.control?t.control:t.htmlFor?document.getElementById(t.htmlFor):t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},t.prototype.onTouchEnd=function(t){var e,a,s,u,c,l=this.targetElement;if(!this.trackingClick)return!0;if(t.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(t.timeStamp-this.trackingClickStart>this.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=t.timeStamp,a=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,o&&(c=t.changedTouches[0],l=document.elementFromPoint(c.pageX-window.pageXOffset,c.pageY-window.pageYOffset)||l,l.fastClickScrollParent=this.targetElement.fastClickScrollParent),s=l.tagName.toLowerCase(),"label"===s){if(e=this.findControl(l)){if(this.focus(l),n)return!1;l=e}}else if(this.needsFocus(l))return t.timeStamp-a>100||r&&window.top!==window&&"input"===s?(this.targetElement=null,!1):(this.focus(l),this.sendClick(l,t),r&&"select"===s||(this.targetElement=null,t.preventDefault()),!1);return r&&!i&&(u=l.fastClickScrollParent,u&&u.fastClickLastScrollTop!==u.scrollTop)?!0:(this.needsClick(l)||(t.preventDefault(),this.sendClick(l,t)),!1)},t.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},t.prototype.onMouse=function(t){return this.targetElement?t.forwardedTouchEvent?!0:t.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(t.stopImmediatePropagation?t.stopImmediatePropagation():t.propagationStopped=!0,t.stopPropagation(),t.preventDefault(),!1):!0:!0},t.prototype.onClick=function(t){var e;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===t.target.type&&0===t.detail?!0:(e=this.onMouse(t),e||(this.targetElement=null),e)},t.prototype.destroy=function(){var t=this.layer;n&&(t.removeEventListener("mouseover",this.onMouse,!0),t.removeEventListener("mousedown",this.onMouse,!0),t.removeEventListener("mouseup",this.onMouse,!0)),t.removeEventListener("click",this.onClick,!0),t.removeEventListener("touchstart",this.onTouchStart,!1),t.removeEventListener("touchmove",this.onTouchMove,!1),t.removeEventListener("touchend",this.onTouchEnd,!1),t.removeEventListener("touchcancel",this.onTouchCancel,!1)},t.notNeeded=function(t){var e,r,i,o;if("undefined"==typeof window.ontouchstart)return!0;if(r=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!n)return!0;if(e=document.querySelector("meta[name=viewport]")){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(r>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(a&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(e=document.querySelector("meta[name=viewport]")))){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===t.style.msTouchAction||"manipulation"===t.style.touchAction?!0:(o=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],o>=27&&(e=document.querySelector("meta[name=viewport]"),e&&(-1!==e.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===t.style.touchAction||"manipulation"===t.style.touchAction?!0:!1)},t.attach=function(e,n){return new t(e,n)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return t}):"undefined"!=typeof module&&module.exports?(module.exports=t.attach,module.exports.FastClick=t):window.FastClick=t}(),!function(t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):"undefined"!=typeof window?window.IconicJS=t():"undefined"!=typeof global?global.IconicJS=t():"undefined"!=typeof self&&(self.IconicJS=t())}(function(){var t;return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);throw new Error("Cannot find module '"+a+"'")}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e){var n=(t("./modules/polyfills"),t("./modules/svg-injector")),r=t("./modules/extend"),i=t("./modules/responsive"),o=t("./modules/position"),a=t("./modules/container"),s=t("./modules/log"),u={},c=window.iconicSmartIconApis={},l=("file:"===window.location.protocol,0),f=function(t,e,i){e=r({},u,e||{});var o={evalScripts:e.evalScripts,pngFallback:e.pngFallback};o.each=function(t){if(t)if("string"==typeof t)s.debug(t);else if(t instanceof SVGSVGElement){var n=t.getAttribute("data-icon");if(n&&c[n]){var r=c[n](t);for(var i in r)t[i]=r[i]}/iconic-bg-/.test(t.getAttribute("class"))&&a.addBackground(t),h(t),l++,e&&e.each&&"function"==typeof e.each&&e.each(t)}},"string"==typeof t&&(t=document.querySelectorAll(t)),n(t,o,i)},h=function(t){var e=[];t?"string"==typeof t?e=document.querySelectorAll(t):void 0!==t.length?e=t:"object"==typeof t&&e.push(t):e=document.querySelectorAll("svg.iconic"),Array.prototype.forEach.call(e,function(t){t instanceof SVGSVGElement&&(t.update&&t.update(),i.refresh(t),o.refresh(t))})},d=function(){u.debug&&console.time&&console.time("autoInjectSelector - "+u.autoInjectSelector);
var t=l;f(u.autoInjectSelector,{},function(){if(u.debug&&console.timeEnd&&console.timeEnd("autoInjectSelector - "+u.autoInjectSelector),s.debug("AutoInjected: "+(l-t)),i.refreshAll(),u.autoInjectDone&&"function"==typeof u.autoInjectDone){var e=l-t;u.autoInjectDone(e)}})},p=function(t){t&&""!==t&&"complete"!==document.readyState?document.addEventListener("DOMContentLoaded",d):document.removeEventListener("DOMContentLoaded",d)},m=function(t){return t=t||{},r(u,t),p(u.autoInjectSelector),s.enableDebug(u.debug),window._Iconic?window._Iconic:{inject:f,update:h,smartIconApis:c,svgInjectedCount:l}};e.exports=m,window._Iconic=new m({autoInjectSelector:"img.iconic",evalScripts:"once",pngFallback:!1,each:null,autoInjectDone:null,debug:!1})},{"./modules/container":2,"./modules/extend":3,"./modules/log":4,"./modules/polyfills":5,"./modules/position":6,"./modules/responsive":7,"./modules/svg-injector":8}],2:[function(t,e){var n=function(t){var e=t.getAttribute("class").split(" "),n=-1!==e.indexOf("iconic-fluid"),r=[],i=["iconic-bg"];Array.prototype.forEach.call(e,function(t){switch(t){case"iconic-sm":case"iconic-md":case"iconic-lg":r.push(t),n||i.push(t.replace(/-/,"-bg-"));break;case"iconic-fluid":r.push(t),i.push(t.replace(/-/,"-bg-"));break;case"iconic-bg-circle":case"iconic-bg-rounded-rect":case"iconic-bg-badge":i.push(t);break;default:r.push(t)}}),t.setAttribute("class",r.join(" "));var o=t.parentNode,a=Array.prototype.indexOf.call(o.childNodes,t),s=document.createElement("span");s.setAttribute("class",i.join(" ")),s.appendChild(t),o.insertBefore(s,o.childNodes[a])};e.exports={addBackground:n}},{}],3:[function(t,e){e.exports=function(t){return Array.prototype.forEach.call(Array.prototype.slice.call(arguments,1),function(e){if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}),t}},{}],4:[function(t,e){var n=!1,r=function(t){console&&console.log&&console.log(t)},i=function(t){r("Iconic INFO: "+t)},o=function(t){r("Iconic WARNING: "+t)},a=function(t){n&&r("Iconic DEBUG: "+t)},s=function(t){n=t};e.exports={info:i,warn:o,debug:a,enableDebug:s}},{}],5:[function(){Array.prototype.forEach||(Array.prototype.forEach=function(t,e){"use strict";if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;var n,r=this.length>>>0;for(n=0;r>n;++n)n in this&&t.call(e,this[n],n,this)}),function(){if(Event.prototype.preventDefault||(Event.prototype.preventDefault=function(){this.returnValue=!1}),Event.prototype.stopPropagation||(Event.prototype.stopPropagation=function(){this.cancelBubble=!0}),!Element.prototype.addEventListener){var t=[],e=function(e,n){var r=this,i=function(t){t.target=t.srcElement,t.currentTarget=r,n.handleEvent?n.handleEvent(t):n.call(r,t)};if("DOMContentLoaded"==e){var o=function(t){"complete"==document.readyState&&i(t)};if(document.attachEvent("onreadystatechange",o),t.push({object:this,type:e,listener:n,wrapper:o}),"complete"==document.readyState){var a=new Event;a.srcElement=window,o(a)}}else this.attachEvent("on"+e,i),t.push({object:this,type:e,listener:n,wrapper:i})},n=function(e,n){for(var r=0;r<t.length;){var i=t[r];if(i.object==this&&i.type==e&&i.listener==n){"DOMContentLoaded"==e?this.detachEvent("onreadystatechange",i.wrapper):this.detachEvent("on"+e,i.wrapper);break}++r}};Element.prototype.addEventListener=e,Element.prototype.removeEventListener=n,HTMLDocument&&(HTMLDocument.prototype.addEventListener=e,HTMLDocument.prototype.removeEventListener=n),Window&&(Window.prototype.addEventListener=e,Window.prototype.removeEventListener=n)}}()},{}],6:[function(t,e){var n=function(t){var e=t.getAttribute("data-position");if(e&&""!==e){var n,r,i,o,a,s,u,c=t.getAttribute("width"),l=t.getAttribute("height"),f=e.split("-"),h=t.querySelectorAll("g.iconic-container");Array.prototype.forEach.call(h,function(t){if(n=t.getAttribute("data-width"),r=t.getAttribute("data-height"),n!==c||r!==l){if(i=t.getAttribute("transform"),o=1,i){var e=i.match(/scale\((\d)/);o=e&&e[1]?e[1]:1}a=Math.floor((c/o-n)/2),s=Math.floor((l/o-r)/2),Array.prototype.forEach.call(f,function(t){switch(t){case"top":s=0;break;case"bottom":s=l/o-r;break;case"left":a=0;break;case"right":a=c/o-n;break;case"center":break;default:console&&console.log&&console.log("Unknown position: "+t)}}),u=0===s?a:a+" "+s,u="translate("+u+")",i?/translate/.test(i)?i=i.replace(/translate\(.*?\)/,u):i+=" "+u:i=u,t.setAttribute("transform",i)}})}};e.exports={refresh:n}},{}],7:[function(t,e){var n=/(iconic-sm\b|iconic-md\b|iconic-lg\b)/,r=function(t,e){var n="undefined"!=typeof window.getComputedStyle&&window.getComputedStyle(t,null).getPropertyValue(e);return!n&&t.currentStyle&&(n=t.currentStyle[e.replace(/([a-z])\-([a-z])/,function(t,e,n){return e+n.toUpperCase()})]||t.currentStyle[e]),n},i=function(t){var e=t.style.display;t.style.display="block";var n=parseFloat(r(t,"width").slice(0,-2)),i=parseFloat(r(t,"height").slice(0,-2));return t.style.display=e,{width:n,height:i}},o=function(){var t="/* Iconic Responsive Support Styles */\n.iconic-property-fill, .iconic-property-text {stroke: none !important;}\n.iconic-property-stroke {fill: none !important;}\nsvg.iconic.iconic-fluid {height:100% !important;width:100% !important;}\nsvg.iconic.iconic-sm:not(.iconic-size-md):not(.iconic-size-lg), svg.iconic.iconic-size-sm{width:16px;height:16px;}\nsvg.iconic.iconic-md:not(.iconic-size-sm):not(.iconic-size-lg), svg.iconic.iconic-size-md{width:32px;height:32px;}\nsvg.iconic.iconic-lg:not(.iconic-size-sm):not(.iconic-size-md), svg.iconic.iconic-size-lg{width:128px;height:128px;}\nsvg.iconic-sm > g.iconic-md, svg.iconic-sm > g.iconic-lg, svg.iconic-md > g.iconic-sm, svg.iconic-md > g.iconic-lg, svg.iconic-lg > g.iconic-sm, svg.iconic-lg > g.iconic-md {display: none;}\nsvg.iconic.iconic-icon-sm > g.iconic-lg, svg.iconic.iconic-icon-md > g.iconic-lg {display:none;}\nsvg.iconic-sm:not(.iconic-icon-md):not(.iconic-icon-lg) > g.iconic-sm, svg.iconic-md.iconic-icon-sm > g.iconic-sm, svg.iconic-lg.iconic-icon-sm > g.iconic-sm {display:inline;}\nsvg.iconic-md:not(.iconic-icon-sm):not(.iconic-icon-lg) > g.iconic-md, svg.iconic-sm.iconic-icon-md > g.iconic-md, svg.iconic-lg.iconic-icon-md > g.iconic-md {display:inline;}\nsvg.iconic-lg:not(.iconic-icon-sm):not(.iconic-icon-md) > g.iconic-lg, svg.iconic-sm.iconic-icon-lg > g.iconic-lg, svg.iconic-md.iconic-icon-lg > g.iconic-lg {display:inline;}";navigator&&navigator.userAgent&&/MSIE 10\.0/.test(navigator.userAgent)&&(t+="svg.iconic{zoom:1.0001;}");var e=document.createElement("style");e.id="iconic-responsive-css",e.type="text/css",e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t)),(document.head||document.getElementsByTagName("head")[0]).appendChild(e)},a=function(t){if(/iconic-fluid/.test(t.getAttribute("class"))){var e,r=i(t),o=t.viewBox.baseVal.width/t.viewBox.baseVal.height;e=1===o?Math.min(r.width,r.height):1>o?r.width:r.height;var a;a=32>e?"iconic-sm":e>=32&&128>e?"iconic-md":"iconic-lg";var s=t.getAttribute("class"),u=n.test(s)?s.replace(n,a):s+" "+a;t.setAttribute("class",u)}},s=function(){var t=document.querySelectorAll(".injected-svg.iconic-fluid");Array.prototype.forEach.call(t,function(t){a(t)})};document.addEventListener("DOMContentLoaded",function(){o()}),window.addEventListener("resize",function(){s()}),e.exports={refresh:a,refreshAll:s}},{}],8:[function(e,n,r){!function(e,i){"use strict";function o(t){t=t.split(" ");for(var e={},n=t.length,r=[];n--;)e.hasOwnProperty(t[n])||(e[t[n]]=1,r.unshift(t[n]));return r.join(" ")}var a="file:"===e.location.protocol,s=i.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"),u=Array.prototype.forEach||function(t,e){if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;var n,r=this.length>>>0;for(n=0;r>n;++n)n in this&&t.call(e,this[n],n,this)},c={},l=0,f=[],h=[],d={},p=function(t){return t.cloneNode(!0)},m=function(t,e){h[t]=h[t]||[],h[t].push(e)},v=function(t){for(var e=0,n=h[t].length;n>e;e++)!function(e){setTimeout(function(){h[t][e](p(c[t]))},0)}(e)},g=function(t,n){if(void 0!==c[t])c[t]instanceof SVGSVGElement?n(p(c[t])):m(t,n);else{if(!e.XMLHttpRequest)return n("Browser does not support XMLHttpRequest"),!1;c[t]={},m(t,n);var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState){if(404===r.status||null===r.responseXML)return n("Unable to load SVG file: "+t),a&&n("Note: SVG injection ajax calls do not work locally without adjusting security setting in your browser. Or consider using a local webserver."),n(),!1;if(!(200===r.status||a&&0===r.status))return n("There was a problem injecting the SVG: "+r.status+" "+r.statusText),!1;if(r.responseXML instanceof Document)c[t]=r.responseXML.documentElement;else if(DOMParser&&DOMParser instanceof Function){var e;try{var i=new DOMParser;e=i.parseFromString(r.responseText,"text/xml")}catch(o){e=void 0}if(!e||e.getElementsByTagName("parsererror").length)return n("Unable to parse SVG file: "+t),!1;c[t]=e.documentElement}v(t)}},r.open("GET",t),r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()}},$=function(t,n,r,i){var a=t.getAttribute("data-src")||t.getAttribute("src");if(!/svg$/i.test(a))return void i("Attempted to inject a file with a non-svg extension: "+a);if(!s){var c=t.getAttribute("data-fallback")||t.getAttribute("data-png");return void(c?(t.setAttribute("src",c),i(null)):r?(t.setAttribute("src",r+"/"+a.split("/").pop().replace(".svg",".png")),i(null)):i("This browser does not support SVG and no PNG fallback was defined."))}-1===f.indexOf(t)&&(f.push(t),t.setAttribute("src",""),g(a,function(r){if("undefined"==typeof r||"string"==typeof r)return i(r),!1;var s=t.getAttribute("id");s&&r.setAttribute("id",s);var c=t.getAttribute("title");c&&r.setAttribute("title",c);var h=[].concat(r.getAttribute("class")||[],"injected-svg",t.getAttribute("class")||[]).join(" ");r.setAttribute("class",o(h));var p=t.getAttribute("style");p&&r.setAttribute("style",p);var m=[].filter.call(t.attributes,function(t){return/^data-\w[\w\-]*$/.test(t.name)});u.call(m,function(t){t.name&&t.value&&r.setAttribute(t.name,t.value)});for(var v,g=r.querySelectorAll("defs clipPath[id]"),$=0,y=g.length;y>$;$++){v=g[$].id+"-"+l;for(var b=r.querySelectorAll('[clip-path*="'+g[$].id+'"]'),w=0,_=b.length;_>w;w++)b[w].setAttribute("clip-path","url(#"+v+")");g[$].id=v}r.removeAttribute("xmlns:a");for(var x,C,E=r.querySelectorAll("script"),k=[],A=0,S=E.length;S>A;A++)C=E[A].getAttribute("type"),C&&"application/ecmascript"!==C&&"application/javascript"!==C||(x=E[A].innerText||E[A].textContent,k.push(x),r.removeChild(E[A]));if(k.length>0&&("always"===n||"once"===n&&!d[a])){for(var T=0,O=k.length;O>T;T++)new Function(k[T])(e);d[a]=!0}t.parentNode.replaceChild(r,t),delete f[f.indexOf(t)],t=null,l++,i(r)}))},y=function(t,e,n){e=e||{};var r=e.evalScripts||"always",i=e.pngFallback||!1,o=e.each;if(void 0!==t.length){var a=0;u.call(t,function(e){$(e,r,i,function(e){o&&"function"==typeof o&&o(e),n&&t.length===++a&&n(a)})})}else t?$(t,r,i,function(e){o&&"function"==typeof o&&o(e),n&&n(1),t=null}):n&&n(0)};"object"==typeof n&&"object"==typeof n.exports?n.exports=r=y:"function"==typeof t&&t.amd?t(function(){return y}):"object"==typeof e&&(e.SVGInjector=y)}(window,document)},{}]},{},[1])(1)}),function(){"use strict";function t(){function t(t,e){e?t.addClass(a):t.removeClass(a)}function e(t,e,r,u){function c(){h(t),p(),t[0].style.transitionDuration="",t.removeClass($?"":a),d(),m=!1}function l(t){h(t),angular.element(t).off(s.join(" ")),m=!1}function f(t){var e={el:t,animation:v},r=n.filter(function(e){return e.el===t});if(r.length>0){var i=r[0].el[0];r[0].animation.cancelAnimation(i)}n.push(e)}function h(t){var e;n.filter(function(n,r){n.el===t&&(e=r)});e>=0&&n.splice(e,1)}function d(){return t[0].offsetWidth}function p(){t[0].style.transitionDuration=0,t.removeClass(i.join(" ")+" "+o.join(" ")+" "+r+" "+u)}var m=!0,v=this;v.cancelAnimation=l;var g=e?r:u,$=e,y=$?i[0]:i[1],b=$?o[0]:o[1];f(t),p(),t.addClass(g),t.addClass(y),t.addClass(a),d(),t[0].style.transitionDuration="",t.addClass(b),t.one(s.join(" "),function(){c()}),setTimeout(function(){m&&c()},3e3)}var n=[],r={},i=["ng-enter","ng-leave"],o=["ng-enter-active","ng-leave-active"],a="is-active",s=["webkitAnimationEnd","mozAnimationEnd","MSAnimationEnd","oanimationend","animationend","webkitTransitionEnd","otransitionend","transitionend"];return r.animate=e,r.toggleAnimation=t,r}angular.module("foundation.core.animation",[]).service("FoundationAnimation",t)}(),function(){"use strict";function t(t){function e(t,e){return l[t]||(l[t]=[]),l[t].push(e),!0}function n(t,e){void 0!==l[t]&&delete l[t],"function"==typeof e&&e.call(this)}function r(t,e){l[t]||(l[t]=[]),l[t].forEach(function(t){t(e)})}function i(){return f}function o(t){return f=angular.extend(f,t)}function a(){var t="";do{t+="zf-uuid-";for(var e=0;15>e;e++)t+=Math.floor(16*Math.random()).toString(16)}while(!h.indexOf(t));return h.push(t),t}function s(e,n){t.toggleAnimate(e,n)}function u(t){var e=this;t=t||{};var n=document.querySelectorAll(".is-active[zf-closable]"),r=document.querySelectorAll("[zf-closable] > .is-active");n.length&&angular.forEach(n,function(n){t.exclude!==n.id&&e.publish(n.id,"close")}),r.length&&angular.forEach(r,function(n){var r=n.parentNode.id;t.exclude!==r&&e.publish(r,"close")})}function c(e,n,r,i){t.animate(e,n,r,i)}var l={},f={},h=[],d={};return d.subscribe=e,d.unsubscribe=n,d.publish=r,d.getSettings=i,d.modifySettings=o,d.generateUuid=a,d.toggleAnimate=s,d.closeActiveElements=u,d.animate=c,d}function e(t){function e(e){t.publish(e,"show")}function n(e){t.publish(e,"hide")}var r={};return r.activate=e,r.deactivate=n,r}function n(){function t(t,e){var n=null;return function(){var r=this,i=arguments;null===n&&(n=setTimeout(function(){t.apply(r,i),n=null},e))}}var e={};return e.throttle=t,e}angular.module("foundation.core",["foundation.core.animation"]).service("FoundationApi",t).service("FoundationAdapter",e).factory("Utils",n),t.$inject=["FoundationAnimation"],e.$inject=["FoundationApi"]}(),function(){"use strict";function t(t,e){function n(n,r){function i(t,e,n,r,i){if(r.animation){if(!r.animation.leave&&!e.animation.leave)return;o(t,e,r)}}function o(t,e,n){p?(f(),r.addClass(n.animation.leave)):(l(),f(),r.removeClass(n.animation.leave))}function a(){d.leave&&r.removeClass(d.leave),l()}function s(){l(),e.includes(c())&&d.enter&&r.addClass(d.enter)}function u(t){t.targetScope===n&&d.enter&&r.removeClass(d.enter),p=!0}function c(){var t=r.data("$uiView"),e=t&&t.state&&t.state.self;return e&&angular.extend(d,e.animation),e}function l(){r.parent().removeClass("position-absolute"),h!==!0&&(r.parent()[0].style.height=null)}function f(){var t=parseInt(r.parent()[0].style.height),e=parseInt(window.getComputedStyle(r[0],null).getPropertyValue("height")),n=t>0?t:e>0?e:"";t>0&&(h=!0),r.parent()[0].style.height=n+"px",r.parent().addClass("position-absolute")}var h,d={},p=!1,m=[t.$on("$stateChangeStart",i),t.$on("$stateChangeError",a),n.$on("$stateChangeSuccess",s),n.$on("$viewContentAnimationEnded",u)],v=n.$on("$destroy",function(){angular.forEach(m,function(t){angular.isFunction(t)&&t()}),v()})}var r={restrict:"ECA",priority:-400,link:n};return r}angular.module("foundation.dynamicRouting.animations",["foundation.dynamicRouting"]).directive("uiView",t),t.$inject=["$rootScope","$state"]}(),function(){"use strict";function t(t){function e(t){var e={vars:{}};return t.data&&("object"==typeof t.data.vars&&(e.vars=t.data.vars),delete t.data.vars,angular.extend(e,t.data)),delete t.data,angular.extend(e.vars,t),e}function n(t,e){return{templateUrl:t,controller:r(e)}}function r(t){var e=t.controller||"DefaultController";return/\w\s+as\s+\w/.test(e)||(e+=" as PageCtrl"),e}function i(t){var e={};return t.animationIn&&(e.enter=t.animationIn),t.animationOut&&(e.leave=t.animationOut),e}var o={};this.registerDynamicRoutes=function(a){var s=a||foundationRoutes;angular.forEach(s,function(n){if(n.hasComposed)angular.isDefined(o[n.parent])||(o[n.parent]={children:{}}),n.controller&&(n.controller=r(n)),o[n.parent].children[n.name]=n;else if(n.composed)angular.isDefined(o[n.name])||(o[n.name]={children:{}}),n.controller&&(n.controller=r(n)),angular.extend(o[n.name],n);else{var a={url:n.url,templateUrl:n.path,"abstract":n["abstract"]||!1,parent:n.parent||"",controller:r(n),data:e(n),animation:i(n)};t.state(n.name,a)}}),angular.forEach(o,function(r){var o={url:r.url,parent:r.parent||"","abstract":r["abstract"]||!1,data:e(r),animation:i(r),views:{"":n(r.path,r)}};angular.forEach(r.children,function(t){o.views[t.name+"@"+r.name]=n(t.path,r)}),t.state(r.name,o)})},this.$get=angular.noop}function e(t,e,n){var r={};angular.forEach(e,function(t,e){r[e]=t}),t.params=r,t.current=n.current.name,n.current.views?(t.vars=n.current.data.vars,t.composed=n.current.data.vars.children):t.vars=n.current.data.vars}function n(t){t.registerDynamicRoutes(foundationRoutes)}function r(t,e,n){t.$state=e,t.$stateParams=n}angular.module("foundation.dynamicRouting",["ui.router"]).provider("$FoundationState",t).controller("DefaultController",e).config(n).run(r),t.$inject=["$stateProvider"],e.$inject=["$scope","$stateParams","$state"],n.$inject=["$FoundationStateProvider"],r.$inject=["$rootScope","$state","$stateParams"]}(),function(){"use strict";function t(t){t.init()}function e(t,e,n){function r(){var r,i;t.headerHelper(["foundation-mq"]),i=t.getStyle(".foundation-mq","font-family"),r=t.parseStyleToObject(i);for(var a in r)r[a]="only screen and (min-width: "+r[a].replace("rem","em")+")";e.modifySettings({mediaQueries:angular.extend(r,o)}),window.addEventListener("resize",n.throttle(function(){e.publish("resize","window resized")},50))}var i={},o={"default":"only screen",landscape:"only screen and (orientation: landscape)",portrait:"only screen and (orientation: portrait)",retina:"only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx)"};return i.init=r,i}function n(){function t(t){for(var e=t.length,n=angular.element(document.querySelectorAll("head"));e--;)n.append('<meta class="'+t[e]+'" />')}function e(t,e){var n=document.querySelectorAll(t)[0],r=window.getComputedStyle(n,null);return r.getPropertyValue("font-family")}function n(t){var e={};return"string"!=typeof t?e:(t=t.trim().slice(1,-1))?e=t.split("&").reduce(function(t,e){var n=e.replace(/\+/g," ").split("="),r=n[0],i=n[1];return r=decodeURIComponent(r),i=void 0===i?null:decodeURIComponent(i),t.hasOwnProperty(r)?Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i,t},{}):e}var r={};return r.headerHelper=t,r.getStyle=e,r.parseStyleToObject=n,r}function r(t){function e(){return t.getSettings().mediaQueries}function n(t){var e=t.length,n=i.getMediaQueries(),r=[];if(e>0)for(;e--;){var o,a=t[e].media;o=n[a]?matchMedia(n[a]):matchMedia(a),o.matches&&r.push({ind:e})}return r}function r(t){var e=[],n=[],r=t.children(),i=0;return angular.forEach(r,function(t){var r=angular.element(t);r.attr("src")&&r.attr("src").match(/.html$/)?e[i]={media:r.attr("media"),src:r.attr("src")}:(n[i]=r,e[i]={media:r.attr("media"),templ:i}),i++}),{scenarios:e,templates:n}}var i=[];return i.getMediaQueries=e,i.match=n,i.collectScenariosFromElement=r,i}angular.module("foundation.mediaquery",["foundation.core"]).run(t).factory("FoundationMQInit",e).factory("mqHelpers",n).service("FoundationMQ",r),t.$inject=["FoundationMQInit"],e.$inject=["mqHelpers","FoundationApi","Utils"],r.$inject=["FoundationApi"]}(),angular.module("markdown",[]).directive("markdown",function(){return{restrict:"A",link:function(t,e,n,r){e.html(marked(e.html()))}}}),function(){var t={};angular.forEach(["clipPath","colorProfile","src","cursor","fill","filter","marker","markerStart","markerMid","markerEnd","mask","stroke"],function(e){t[e]=["$rootScope","$location","$interpolate","$sniffer","urlResolve","computeSVGAttrValue","svgAttrExpressions",function(t,n,r,i,o,a,s){return{restrict:"A",link:function(r,o,u){function c(){var t=a(l);t&&u[e]!==t&&u.$set(e,t)}var l;s.SVG_ELEMENT.test(o[0]&&o[0].toString())&&n.$$html5&&i.history&&(l=u[e],u.$observe(e,c),t.$on("$locationChangeSuccess",c))}}}]}),angular.module("ngSVGAttributes",[]).factory("urlResolve",[function(){var t=document.createElement("a");return function(e){return t.setAttribute("href",e),t}}]).value("svgAttrExpressions",{FUNC_URI:/^url\((.*)\)$/,SVG_ELEMENT:/SVG[a-zA-Z]*Element/,HASH_PART:/#.*/}).factory("computeSVGAttrValue",["$location","$sniffer","svgAttrExpressions","urlResolve",function(t,e,n,r){return function(e){var i,o;return(i=n.FUNC_URI.exec(e))&&(o=0===i[1].indexOf("#")?t.absUrl().replace(n.HASH_PART,"")+i[1]:r(i[1])),o?"url("+o+")":null}}]).directive(t)}(),function(){"use strict";function t(t){var e=this,n=e.sections=t.sections=[],r=(e.multiOpen=t.multiOpen=t.multiOpen||!1,e.collapsible=t.collapsible=t.multiOpen||t.collapsible||!0),i=e.autoOpen=t.autoOpen=t.autoOpen||!0;e.select=function(t){n.forEach(function(n){e.multiOpen?n.scope===t&&(n.scope.active=!n.scope.active):n.scope===t?n.scope.active=r?!n.scope.active:!0:n.scope.active=!1})},e.addSection=function(t){n.push({scope:t}),1===n.length&&i===!0&&(n[0].active=!0,n[0].scope.active=!0)},e.closeAll=function(){n.forEach(function(t){t.scope.active=!1})}}function e(){function t(t,e,n,r){t.multiOpen=r.multiOpen="true"===t.multiOpen?!0:!1,t.collapsible=r.collapsible="true"===t.collapsible?!0:!1,t.autoOpen=r.autoOpen="true"===t.autoOpen?!0:!1}var e={restrict:"EA",transclude:"true",replace:!0,templateUrl:"components/accordion/accordion.html",controller:"ZfAccordionController",scope:{multiOpen:"@?",collapsible:"@?",autoOpen:"@?"},link:t};return e}function n(){function t(t,e,n,r,i){t.active=!1,r.addSection(t),t.activate=function(){r.select(t)}}var e={restrict:"EA",templateUrl:"components/accordion/accordion-item.html",transclude:!0,scope:{title:"@"},require:"^zfAccordion",replace:!0,controller:function(){},link:t};return e}angular.module("foundation.accordion",[]).controller("ZfAccordionController",t).directive("zfAccordion",e).directive("zfAccordionItem",n),t.$inject=["$scope"]}(),function(){"use strict";function t(t){function e(e){t.publish(e,"show")}function n(e){t.publish(e,"hide")}var r={};return r.activate=e,r.deactivate=n,r}function e(t,e){function n(t){var e=t.target,n=!1;do if(e.classList&&e.classList.contains("action-sheet-container")){n=!0;break}while(e=e.parentNode);if(!n){if(t.target.attributes["zf-toggle"]||t.target.attributes["zf-hard-toggle"])return;r()}}function r(){a.hide(),s.hide(),a.$apply(),s.$apply()}function i(){a.toggle(),s.toggle(),a.$apply(),s.$apply()}var o=this,a=o.content=t.content,s=o.container=t.container;angular.element(document.body);o.registerContent=function(t){a=t,a.active=!1},o.registerContainer=function(t){s=t,s.active=!1},o.toggle=i,o.hide=r,o.registerListener=function(){document.body.addEventListener("click",n)},o.deregisterListener=function(){document.body.removeEventListener("click",n)}}function n(t){function e(){function e(t,e,n){n.$set("zf-closable","actionsheet")}function n(e,n,r,i){var o=r.id||t.generateUuid();r.$set("id",o),e.active=!1,t.subscribe(o,function(t){"toggle"===t&&i.toggle(),("hide"===t||"close"===t)&&i.hide()}),i.registerContainer(e),e.toggle=function(){e.active=!e.active},e.hide=function(){e.active=!1}}return{pre:e,post:n}}var n={restrict:"EA",transclude:!0,replace:!0,templateUrl:"components/actionsheet/actionsheet.html",controller:"ZfActionSheetController",compile:e};return n}function r(t){function e(t,e,n,r){t.active=!1,t.position=t.position||"bottom",r.registerContent(t),t.toggle=function(){t.active=!t.active,t.active?r.registerListener():r.deregisterListener()},t.hide=function(){t.active=!1,r.deregisterListener()}}var n={restrict:"EA",transclude:!0,replace:!0,templateUrl:"components/actionsheet/actionsheet-content.html",require:"^zfActionSheet",scope:{position:"@?"},link:e};return n}function i(t){function e(t,e,n,r){e.on("click",function(t){r.toggle(),t.preventDefault()})}var n={restrict:"EA",transclude:!0,replace:!0,templateUrl:"components/actionsheet/actionsheet-button.html",require:"^zfActionSheet",scope:{title:"@?"},link:e};return n}angular.module("foundation.actionsheet",["foundation.core"]).controller("ZfActionSheetController",e).directive("zfActionSheet",n).directive("zfAsContent",r).directive("zfAsButton",i).service("FoundationActionSheet",t),t.$inject=["FoundationApi"],e.$inject=["$scope","FoundationApi"],n.$inject=["FoundationApi"],r.$inject=["FoundationApi"],i.$inject=["FoundationApi"]}(),function(){"use strict";function t(t){function e(e,n,r){var i="";if(r.zfClose)i=r.zfClose;else{for(var o=!1,a=n.parent();o===!1;)"BODY"==a[0].nodeName&&(o=""),"undefined"!=typeof a.attr("zf-closable")&&a.attr("zf-closable")!==!1&&(o=a),a=a.parent();i=o.attr("id")}n.on("click",function(e){t.publish(i,"close"),e.preventDefault()})}var n={restrict:"A",link:e};return n}function e(t){function e(e,n,r){n.on("click",function(e){t.publish(r.zfOpen,"open"),e.preventDefault()})}var n={restrict:"A",link:e};return n}function n(t){function e(e,n,r){n.on("click",function(e){t.publish(r.zfToggle,"toggle"),e.preventDefault()})}var n={restrict:"A",link:e};return n}function r(t){function e(e,n,r){n.on("keyup",function(e){27===e.keyCode&&t.closeActiveElements(),e.preventDefault()})}var n={restrict:"A",link:e};return n}function i(t){function e(e,n,r){var i,o;switch(Hammer&&(o=new Hammer(n[0]),o.get("swipe").set({direction:Hammer.DIRECTION_ALL,threshold:5,velocity:.5})),r.zfSwipeClose){case"right":i="swiperight";break;case"left":i="swipeleft";break;case"up":i="swipeup";break;case"down":i="swipedown";break;default:i="swipe"}o.on(i,function(){t.publish(r.id,"close")})}var n={restrict:"A",link:e};return n}function o(t){function e(e,n,r){n.on("click",function(e){t.closeActiveElements({exclude:r.zfHardToggle}),t.publish(r.zfHardToggle,"toggle"),e.preventDefault()})}var n={restrict:"A",link:e};return n}angular.module("foundation.common",["foundation.core"]).directive("zfClose",t).directive("zfOpen",e).directive("zfToggle",n).directive("zfEscClose",r).directive("zfSwipeClose",i).directive("zfHardToggle",o),t.$inject=["FoundationApi"],e.$inject=["FoundationApi"],n.$inject=["FoundationApi"],r.$inject=["FoundationApi"],i.$inject=["FoundationApi"],o.$inject=["FoundationApi"]}(),function(){"use strict";function t(){var t="assets/img/iconic/";this.setAssetPath=function(e){t=angular.isString(e)?e:t},this.$get=function(){function e(){return r}function n(){return t}var r=new IconicJS,i={getAccess:e,getAssetPath:n};return i}}function e(t,e,n){function r(){function r(e,n,r){if(a=e.iconDir?e.iconDir:t.getAssetPath(),"/"!==a.charAt(a.length-1)&&(a+="/"),e.dynSrc?r.$set("data-src",e.dynSrc):e.dynIcon?r.$set("data-src",a+e.dynIcon+".svg"):e.icon?r.$set("data-src",a+e.icon+".svg"):r.$set("data-src",r.src),!n.hasClass("iconic-sm")&&!n.hasClass("iconic-md")&&!n.hasClass("iconic-lg")){var i;switch(e.size){case"small":i="iconic-sm";break;case"medium":i="iconic-md";break;case"large":i="iconic-lg";break;default:i="iconic-fluid"}n.addClass(i)}o=n[0].outerHTML}function i(r,i,s){function u(t){l&&(l.empty(),l.append(angular.element(o)),l.attr("data-src",t),c(l[0]))}function c(t){f.inject(t,{each:function(t){var e=angular.element(t);l=n(e)(e.scope())}})}var l,f=t.getAccess();c(i[0]),e.subscribe("resize",function(){f.update(i[0])}),r.dynSrc&&r.$watch("dynSrc",function(t,e){t&&t!==e&&u(r.dynSrc)}),r.dynIcon&&r.$watch("dynIcon",function(t,e){t&&t!==e&&u(a+r.dynIcon+".svg")})}var o,a;return{pre:r,post:i}}var i={restrict:"A",template:"<img ng-transclude>",transclude:!0,replace:!0,scope:{dynSrc:"=?",dynIcon:"=?",size:"@?",icon:"@",iconDir:"@?"},compile:r};return i}angular.module("foundation.iconic",[]).provider("Iconic",t).directive("zfIconic",e),e.$inject=["Iconic","FoundationApi","$compile"]}(),function(){"use strict";function t(t,e,n,r,i){function o(o,a,s,u,c){function l(t){return e.get(t,{cache:n})}function f(t){var e=i.collectScenariosFromElement(t);m=e.scenarios,v=e.templates}function h(t){return!p||p!==t}var d,p,m,v;i.getMediaQueries();r.subscribe("resize",function(e){c(function(e,n){m&&v||f(e);var r=i.match(m),o=0===r.length?null:m[r[0].ind];if(o&&h(o)){if(d&&(d.$destroy(),d=null),"undefined"!=typeof o.templ){d=n;var s=document.createElement("div");s.appendChild(v[o.templ][0]),a.html(s.innerHTML),t(a.contents())(d),p=o}else{var u=l(o.src);u.success(function(t){d=n,a.html(t)}).then(function(){t(a.contents())(d),p=o})}}})}),r.publish("resize","initial resize")}var a={restrict:"EA",transclude:"element",scope:{position:"@"},replace:!0,template:"<div></div>",link:o};return a}angular.module("foundation.interchange",["foundation.core","foundation.mediaquery"]).directive("zfInterchange",t),t.$inject=["$compile","$http","$templateCache","FoundationApi","FoundationMQ"]}(),function(){"use strict";function t(t,e){function n(e){t.publish(e,"show")}function r(e){t.publish(e,"hide")}function i(t){return new e(t)}var o={};return o.activate=n,o.deactivate=r,o.newModal=i,o}function e(t){function e(e,n,r){function i(t,e,n,r){n.$set("zf-closable",a)}function o(e,n,r){function i(){e.overlay||n.css("background","transparent"),t.animate(n,e.active,c,l),t.animate(a,e.active,s,u)}function o(){e.active&&e.show()}var a=angular.element(n.children()[0]);e.active=e.active||!1,e.overlay="false"===r.overlay?!1:!0,e.overlayClose="false"===r.overlayClose?!1:!0;var s=r.animationIn||"fadeIn",u=r.animationOut||"fadeOut",c="fadeIn",l="fadeOut";e.hideOverlay=function(){e.overlayClose&&e.hide()},e.hide=function(){e.active=!1,i()},e.show=function(){e.active=!0,i(),a.tabIndex=-1,a[0].focus()},e.toggle=function(){e.active=!e.active,i()},o(),t.subscribe(r.id,function(t){"show"===t||"open"===t?e.show():"close"===t||"hide"===t?e.hide():"toggle"===t&&e.toggle(),e.$root&&!e.$root.$$phase&&e.$apply()})}var a="modal";return{pre:i,post:o}}var n={restrict:"EA",templateUrl:"components/modal/modal.html",transclude:!0,scope:!0,replace:!0,compile:e};return n}function n(t,e,n,r,i,o,a){function s(s){function u(){if(C)throw"Error: Modal was destroyed. Delete the object and create a new ModalFactory instance."}function c(){u(),i(function(){h(!0),a.publish(_,"show")},0,!1)}function l(){u(),i(function(){h(!1),a.publish(_,"hide")},0,!1)}function f(){u(),i(function(){h(!0),a.publish(_,"toggle")},0,!1)}function h(t){o.when(g).then(function(){if(!x&&m.length>0){w.append(v);$.active=t,r(v)($),x=!0}})}function d(){if(!document.getElementById(_)){m='<zf-modal id="'+_+'">'+m+"</zf-modal>",v=angular.element(m),$=n.$new();for(var t=0;t<E.length;t++){var e=E[t];if(s[e])switch(e){case"animationIn":v.attr("animation-in",s[e]);break;case"animationOut":v.attr("animation-out",s[e]);break;default:v.attr(e,s[e])}}if(s.contentScope){y=s.contentScope;for(var e in s.contentScope)s.contentScope.hasOwnProperty(e)&&($[e]=s.contentScope[e])}}}function p(){b.deactivate(),setTimeout(function(){$.$destroy(),v.remove(),C=!0},3e3),a.unsubscribe(_)}var m,v,g,$,y,b=this,w=angular.element(s.container||document.body),_=s.id||a.generateUuid(),x=!1,C=!1,E=["animationIn","animationOut","overlay","overlayClose"];return s.templateUrl?g=t.get(s.templateUrl,{cache:e}).then(function(t){m=t.data,d()}):s.template&&(g=!0,m=s.template,d()),b.activate=c,b.deactivate=l,b.toggle=f,b.destroy=p,{activate:c,deactivate:l,toggle:f,destroy:p}}return s}angular.module("foundation.modal",["foundation.core"]).directive("zfModal",e).factory("ModalFactory",n),t.$inject=["FoundationApi","ModalFactory"],e.$inject=["FoundationApi"],n.$inject=["$http","$templateCache","$rootScope","$compile","$timeout","$q","FoundationApi"]}(),function(){"use strict";function t(t,e){function n(e){t.publish(e,"show")}function r(e){t.publish(e,"hide")}var i={};return i.activate=n,i.deactivate=r,i}function e(t,e){var n=this;n.notifications=t.notifications=t.notifications||[],n.addNotification=function(n){var r=e.generateUuid();
n.id=r,t.notifications.push(n)},n.removeNotification=function(e){t.notifications.forEach(function(n){if(n.id===e){var r=t.notifications.indexOf(n);t.notifications.splice(r,1)}})},n.clearAll=function(){for(;t.notifications.length>0;)t.notifications.pop()}}function n(t){function e(e,n,r,i){e.position=e.position?e.position.split(" ").join("-"):"top-right",t.subscribe(r.id,function(t){"clearall"===t?i.clearAll():(i.addNotification(t),e.$root.$$phase||e.$apply())})}var n={restrict:"EA",templateUrl:"components/notification/notification-set.html",controller:"ZfNotificationController",replace:!0,scope:{position:"@"},link:e};return n}function r(t){function e(){function e(t,e,n){n.$set("zf-closable","notification")}function n(e,n,r,i){e.active=!1;var o,a=r.animationIn||"fadeIn",s=r.animationOut||"fadeOut";setTimeout(function(){e.active=!0,t.animate(n,e.active,a,s)},50),e.hide=function(){e.active=!1,t.animate(n,e.active,a,s),setTimeout(function(){i.removeNotification(e.notifId)},50)},e.autoclose&&setTimeout(function(){e.active&&e.hide()},parseInt(e.autoclose)),Hammer&&(o=new Hammer(n[0]),o.get("swipe").set({direction:Hammer.DIRECTION_ALL,threshold:5,velocity:.5})),o.on("swipe",function(){e.active&&e.hide()})}return{pre:e,post:n}}var n={restrict:"EA",templateUrl:"components/notification/notification.html",replace:!0,transclude:!0,require:"^zfNotificationSet",controller:function(){},scope:{title:"=?",content:"=?",image:"=?",notifId:"=",color:"=?",autoclose:"=?"},compile:e};return n}function i(t){function e(){function e(t,e,n,i){n.$set("zf-closable",r)}function n(e,n,r,i){e.position=r.position?r.position.split(" ").join("-"):"top-right";var o=r.animationIn||"fadeIn",a=r.animationOut||"fadeOut";t.subscribe(r.id,function(r){"show"==r||"open"==r?(e.show(),e.autoclose&&setTimeout(function(){e.active&&e.hide()},parseInt(e.autoclose))):"close"==r||"hide"==r?e.hide():"toggle"==r&&(e.toggle(),e.autoclose&&setTimeout(function(){e.active&&e.toggle()},parseInt(e.autoclose))),t.animate(n,e.active,o,a),e.$apply()}),e.hide=function(){e.active=!1,t.animate(n,e.active,o,a)},e.show=function(){e.active=!0,t.animate(n,e.active,o,a)},e.toggle=function(){e.active=!e.active,t.animate(n,e.active,o,a)}}var r="notification";return{pre:e,post:n}}var n={restrict:"EA",templateUrl:"components/notification/notification-static.html",replace:!0,transclude:!0,scope:{title:"@?",content:"@?",image:"@?",color:"@?",autoclose:"@?"},compile:e};return n}function o(t){function e(e,n,r,i){n.on("click",function(n){t.publish(r.zfNotify,{title:e.title,content:e.content,color:e.color,image:e.image,autoclose:e.autoclose}),n.preventDefault()})}var n={restrict:"A",scope:{title:"@?",content:"@?",color:"@?",image:"@?",autoclose:"@?"},link:e};return n}function a(t,e,n,r,i,o){function a(t){function e(){if(y)throw"Error: Notification Set was destroyed. Delete the object and create a new NotificationFactory instance."}function a(t){e(),i(function(){o.publish(g,t)},0,!1)}function s(){e(),i(function(){o.publish(g,"clearall")},0,!1)}function u(t){if(!$&&f.length>0){v.append(h);d.active=t,r(h)(d),$=!0}}function c(){if(!document.getElementById(g)){f='<zf-notification-set id="'+g+'"></zf-notification-set>',h=angular.element(f),d=n.$new();for(var e=0;e<b.length;e++)t[b[e]]&&h.attr(b[e],t[b[e]]);if(t.contentScope){p=t.contentScope;for(var r in p)p.hasOwnProperty(r)&&(d[r]=p[r])}u(!0)}}function l(){m.clearAll(),setTimeout(function(){d.$destroy(),h.remove(),y=!0},3e3),o.unsubscribe(g)}var f,h,d,p,m=this,v=angular.element(t.container||document.body),g=t.id||o.generateUuid(),$=!1,y=!1,b=["position"];return c(),m.addNotification=a,m.clearAll=s,m.destroy=l,{addNotification:a,clearAll:s,destroy:l}}return a}angular.module("foundation.notification",["foundation.core"]).controller("ZfNotificationController",e).directive("zfNotificationSet",n).directive("zfNotification",r).directive("zfNotificationStatic",i).directive("zfNotify",o).factory("NotificationFactory",a).service("FoundationNotification",t),t.$inject=["FoundationApi","NotificationFactory"],e.$inject=["$scope","FoundationApi"],n.$inject=["FoundationApi"],r.$inject=["FoundationApi"],i.$inject=["FoundationApi"],o.$inject=["FoundationApi"],a.$inject=["$http","$templateCache","$rootScope","$compile","$timeout","FoundationApi"]}(),function(){"use strict";function t(t){function e(e){t.publish(e,"show")}function n(e){t.publish(e,"hide")}var r={};return r.activate=e,r.deactivate=n,r}function e(t){function e(e,n,r){function i(t,e,n,r){n.$set("zf-closable",a),document.body.classList.add("has-off-canvas")}function o(e,n,r){e.position=e.position||"left",e.active=!1,t.subscribe(r.id,function(t){"show"===t||"open"===t?e.show():"close"===t||"hide"===t?e.hide():"toggle"===t&&e.toggle(),e.$root.$$phase||e.$apply()}),e.hide=function(){e.active=!1},e.show=function(){e.active=!0},e.toggle=function(){e.active=!e.active}}var a="offcanvas";return{pre:i,post:o}}var n={restrict:"EA",templateUrl:"components/offcanvas/offcanvas.html",transclude:!0,scope:{position:"@"},replace:!0,compile:e};return n}angular.module("foundation.offcanvas",["foundation.core"]).directive("zfOffcanvas",e).service("FoundationOffcanvas",t),t.$inject=["FoundationApi"],e.$inject=["FoundationApi"]}(),function(){"use strict";function t(t){function e(e){t.publish(e,"show")}function n(e){t.publish(e,"hide")}var r={};return r.activate=e,r.deactivate=n,r}function e(t,e){function n(n,r,i){function o(t,e,n,r){n.$set("zf-closable",s),t.position=t.position||"left",t.positionClass="panel-"+t.position}function a(n,r,i){n.active=!1;var o,a,s=t.getSettings().mediaQueries;"left"===n.position?(o=i.animationIn||"slideInRight",a=i.animationOut||"slideOutLeft"):"right"===n.position?(o=i.animationIn||"slideInLeft",a=i.animationOut||"slideOutRight"):"top"===n.position?(o=i.animationIn||"slideInDown",a=i.animationOut||"slideOutUp"):"bottom"===n.position&&(o=i.animationIn||"slideInUp",a=i.animationOut||"slideOutBottom"),t.subscribe(i.id,function(t){var i=e.getComputedStyle(r[0]).getPropertyValue("position");"absolute"===i&&("show"==t||"open"==t?n.show():"close"==t||"hide"==t?n.hide():"toggle"==t&&n.toggle(),n.$root.$$phase||n.$apply())}),n.hide=function(){n.active&&(n.active=!1,t.animate(r,n.active,o,a))},n.show=function(){n.active||(n.active=!0,t.animate(r,n.active,o,a))},n.toggle=function(){n.active=!n.active,t.animate(r,n.active,o,a)},r.on("click",function(e){var i=e.srcElement;!matchMedia(s.medium).matches&&i.href&&i.href.length>0&&(n.hide(),t.animate(r,n.active,o,a))})}var s="panel";return{pre:o,post:a}}var r={restrict:"EA",templateUrl:"components/panel/panel.html",transclude:!0,scope:{position:"@?"},replace:!0,compile:n};return r}angular.module("foundation.panel",["foundation.core"]).directive("zfPanel",e).service("FoundationPanel",t),t.$inject=["FoundationApi"],e.$inject=["FoundationApi","$window"]}(),function(){"use strict";function t(t){function e(e){t.publish(e,"show")}function n(e){t.publish(e,"hide")}var r={};return r.activate=e,r.deactivate=n,r}function e(t){function e(){function e(t,e,n){n.$set("zf-closable","popup")}function n(e,n,r){function i(t){s||(e.target=e.target?document.getElementById(e.target):document.getElementById(t),u=new Tether({element:n[0],target:e.target,attachment:o,targetAttachment:a,enable:!1}),s=!0)}e.active=!1,e.target=e.target||!1;var o=e.pinTo||"top center",a=e.pinAt||"bottom center",s=!1,u={};t.subscribe(r.id,function(t){"show"===t[0]||"open"===t[0]?e.show(t[1]):"close"===t[0]||"hide"===t[0]?e.hide():"toggle"===t[0]&&e.toggle(t[1]),e.$apply()}),e.hide=function(){e.active=!1,i(),u.disable()},e.show=function(t){e.active=!0,i(t),u.enable()},e.toggle=function(t){e.active=!e.active,i(t),e.active?u.enable():u.disable()}}return{pre:e,post:n}}var n={restrict:"EA",transclude:!0,replace:!0,templateUrl:"components/popup/popup.html",scope:{pinTo:"@?",pinAt:"@?",target:"@?"},compile:e};return n}function n(t){function e(e,n,r){var i=r.zfPopupToggle,o=r.id||t.generateUuid();r.$set("id",o),n.on("click",function(e){t.publish(i,["toggle",o]),e.preventDefault()})}var n={restrict:"A",link:e};return n}angular.module("foundation.popup",["foundation.core"]).directive("zfPopup",e).directive("zfPopupToggle",n).service("FoundationPopup",t),t.$inject=["FoundationApi"],e.$inject=["FoundationApi"],n.$inject=["FoundationApi"]}(),function(){"use strict";function t(t){function e(e){t.publish(e,"show")}var n={};return n.activate=e,n}function e(t,e){var n=this,r=n.tabs=t.tabs=[],i="";n.select=function(t){r.forEach(function(n){n.active=!1,n.scope.active=!1,n.scope===t&&(e.publish(i,["activate",n]),n.active=!0,n.scope.active=!0)})},n.addTab=function(t){r.push({scope:t,active:!1,parentContent:n.id}),1===r.length&&(r[0].active=!0,t.active=!0)},n.getId=function(){return i},n.setId=function(t){i=t}}function n(t){function e(e,n,r,i){e.id=r.id||t.generateUuid(),e.showTabContent="true"!==e.displaced,r.$set("id",e.id),i.setId(e.id);var o=function(){t.publish(e.id+"-tabs",e.tabs)};t.subscribe(e.id+"-get-tabs",function(){o()})}var n={restrict:"EA",transclude:"true",replace:!0,templateUrl:"components/tabs/tabs.html",controller:"ZfTabsController",scope:{displaced:"@?"},link:e};return n}function r(t){function e(e,n,r,i){e.tabs=e.tabs||[];var o=e.target;t.subscribe(o,function(t){if("activate"===t[0]){t[1];e.tabs.forEach(function(t){t.scope.active=!1,t.active=!1,t.scope.id===o&&(t.scope.active=!0,t.active=!0)})}}),0===e.tabs.length&&(t.subscribe(o+"-tabs",function(t){e.tabs=t}),t.publish(o+"-get-tabs",""))}var n={restrict:"A",transclude:"true",replace:!0,scope:{tabs:"=?",target:"@"},templateUrl:"components/tabs/tab-content.html",link:e};return n}function i(t){function e(e,n,r,i,o){e.id=r.id||t.generateUuid(),e.active=!1,e.transcludeFn=o,i.addTab(e),t.subscribe(e.id,function(t){("show"===t||"open"===t||"activate"===t)&&e.makeActive()}),e.makeActive=function(){i.select(e)}}var n={restrict:"EA",templateUrl:"components/tabs/tab.html",transclude:!0,scope:{title:"@"},require:"^zfTabs",replace:!0,link:e};return n}function o(t){function e(e,n,r,i,o){var a=e.$eval(r.tab);a.scope.id;a.scope.transcludeFn(a.scope,function(t){n.append(t)}),t.subscribe(a.scope.id,function(n){t.publish(a.parentContent,["activate",a.scope.id]),e.$apply()})}var n={restrict:"EA",transclude:"true",link:e};return n}function a(t){function e(e,n,r,i){function o(){n.parent().children().removeClass("is-active"),n.addClass("is-active")}var a=r.zfTabHref;t.subscribe(a,function(t){("activate"===t||"show"===t||"open"===t)&&o()}),n.on("click",function(e){t.publish(a,"activate"),o(),e.preventDefault()})}var n={restrict:"A",replace:!1,link:e};return n}function s(t){function e(t,e,n,r,i){var o=e.children();angular.element(o[0]).addClass("is-active")}var n={restrict:"A",replace:!1,link:e};return n}function u(t){function e(e,n,r){function i(t){var e=n.children();angular.forEach(e,function(e){var n=angular.element(e);n.removeClass("is-active"),n.attr("id")===t&&n.addClass("is-active")})}var o=[],a=n.children();angular.forEach(a,function(e){if(e.id){var n=e.id;if(o.push(n),t.subscribe(n,function(t){("activate"===t||"show"===t||"open"===t)&&i(n)}),1===o.length){var r=angular.element(e);r.addClass("is-active")}}})}return{restrict:"A",link:e}}angular.module("foundation.tabs",["foundation.core"]).controller("ZfTabsController",e).directive("zfTabs",n).directive("zfTabContent",r).directive("zfTab",i).directive("zfTabIndividual",o).directive("zfTabHref",a).directive("zfTabCustom",s).directive("zfTabContentCustom",u).service("FoundationTabs",t),t.$inject=["FoundationApi"],e.$inject=["$scope","FoundationApi"],n.$inject=["FoundationApi"],r.$inject=["FoundationApi"],i.$inject=["FoundationApi"],o.$inject=["FoundationApi"],a.$inject=["FoundationApi"],s.$inject=["FoundationApi"],u.$inject=["FoundationApi"]}(),function(){"use strict";angular.module("foundation",["foundation.core","foundation.mediaquery","foundation.accordion","foundation.actionsheet","foundation.common","foundation.iconic","foundation.interchange","foundation.modal","foundation.notification","foundation.offcanvas","foundation.panel","foundation.popup","foundation.tabs"])}(),function(t,e,n,r){"use strict";function i(t,e,n){return setTimeout(c(t,n),e)}function o(t,e,n){return Array.isArray(t)?(a(t,n[e],n),!0):!1}function a(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==r)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function s(e,n,r){var i="DEPRECATED METHOD: "+n+"\n"+r+" AT \n";return function(){var n=new Error("get-stack-trace"),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,i,r),e.apply(this,arguments)}}function u(t,e,n){var r,i=e.prototype;r=t.prototype=Object.create(i),r.constructor=t,r._super=i,n&&st(r,n)}function c(t,e){return function(){return t.apply(e,arguments)}}function l(t,e){return typeof t==lt?t.apply(e?e[0]||r:r,e):t}function f(t,e){return t===r?e:t}function h(t,e,n){a(v(e),function(e){t.addEventListener(e,n,!1)})}function d(t,e,n){a(v(e),function(e){t.removeEventListener(e,n,!1)})}function p(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function m(t,e){return t.indexOf(e)>-1}function v(t){return t.trim().split(/\s+/g)}function g(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return-1}function $(t){return Array.prototype.slice.call(t,0)}function y(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];g(i,a)<0&&r.push(t[o]),i[o]=a,o++}return n&&(r=e?r.sort(function(t,n){return t[e]>n[e]}):r.sort()),r}function b(t,e){for(var n,i,o=e[0].toUpperCase()+e.slice(1),a=0;a<ut.length;){if(n=ut[a],i=n?n+o:e,i in t)return i;a++}return r}function w(){return vt++}function _(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}function x(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){l(t.options.enable,[t])&&n.handler(e)},this.init()}function C(t){var e,n=t.options.inputClass;return new(e=n?n:yt?R:bt?L:$t?V:P)(t,E)}function E(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,o=e&kt&&r-i===0,a=e&(St|Tt)&&r-i===0;n.isFirst=!!o,n.isFinal=!!a,o&&(t.session={}),n.eventType=e,k(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function k(t,e){var n=t.session,r=e.pointers,i=r.length;n.firstInput||(n.firstInput=T(e)),i>1&&!n.firstMultiple?n.firstMultiple=T(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,u=e.center=O(r);e.timeStamp=dt(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=D(s,u),e.distance=M(s,u),A(n,e),e.offsetDirection=z(e.deltaX,e.deltaY);var c=I(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=ht(c.x)>ht(c.y)?c.x:c.y,e.scale=a?N(a.pointers,r):1,e.rotation=a?j(a.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,S(n,e);var l=t.element;p(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function A(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};(e.eventType===kt||o.eventType===St)&&(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}function S(t,e){var n,i,o,a,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(e.eventType!=Tt&&(u>Et||s.velocity===r)){var c=e.deltaX-s.deltaX,l=e.deltaY-s.deltaY,f=I(u,c,l);i=f.x,o=f.y,n=ht(f.x)>ht(f.y)?f.x:f.y,a=z(c,l),t.lastInterval=e}else n=s.velocity,i=s.velocityX,o=s.velocityY,a=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=o,e.direction=a}function T(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:ft(t.pointers[n].clientX),clientY:ft(t.pointers[n].clientY)},n++;return{timeStamp:dt(),pointers:e,center:O(e),deltaX:t.deltaX,deltaY:t.deltaY}}function O(t){var e=t.length;if(1===e)return{x:ft(t[0].clientX),y:ft(t[0].clientY)};for(var n=0,r=0,i=0;e>i;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:ft(n/e),y:ft(r/e)}}function I(t,e,n){return{x:e/t||0,y:n/t||0}}function z(t,e){return t===e?Ot:ht(t)>=ht(e)?0>t?It:zt:0>e?Mt:Dt}function M(t,e,n){n||(n=Rt);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function D(t,e,n){n||(n=Rt);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}function j(t,e){return D(e[1],e[0],Ft)+D(t[1],t[0],Ft)}function N(t,e){return M(e[0],e[1],Ft)/M(t[0],t[1],Ft)}function P(){this.evEl=Lt,this.evWin=Ut,this.allow=!0,this.pressed=!1,x.apply(this,arguments)}function R(){this.evEl=Ht,this.evWin=Wt,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function F(){this.evTarget=Yt,this.evWin=Zt,this.started=!1,x.apply(this,arguments)}function B(t,e){var n=$(t.touches),r=$(t.changedTouches);return e&(St|Tt)&&(n=y(n.concat(r),"identifier",!0)),[n,r]}function L(){this.evTarget=Kt,this.targetIds={},x.apply(this,arguments)}function U(t,e){var n=$(t.touches),r=this.targetIds;if(e&(kt|At)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=$(t.changedTouches),s=[],u=this.target;if(o=n.filter(function(t){return p(t.target,u)}),e===kt)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),e&(St|Tt)&&delete r[a[i].identifier],i++;return s.length?[y(o.concat(s),"identifier",!0),s]:void 0}function V(){x.apply(this,arguments);var t=c(this.handler,this);this.touch=new L(this.manager,t),this.mouse=new P(this.manager,t)}function q(t,e){this.manager=t,this.set(e)}function H(t){if(m(t,re))return re;var e=m(t,ie),n=m(t,oe);return e&&n?re:e||n?e?ie:oe:m(t,ne)?ne:ee}function W(t){this.options=st({},this.defaults,t||{}),this.id=w(),this.manager=null,this.options.enable=f(this.options.enable,!0),this.state=ae,this.simultaneous={},this.requireFail=[]}function X(t){return t&fe?"cancel":t&ce?"end":t&ue?"move":t&se?"start":""}function Y(t){return t==Dt?"down":t==Mt?"up":t==It?"left":t==zt?"right":""}function Z(t,e){var n=e.manager;return n?n.get(t):t}function G(){W.apply(this,arguments)}function K(){G.apply(this,arguments),this.pX=null,this.pY=null}function J(){G.apply(this,arguments)}function Q(){W.apply(this,arguments),this._timer=null,this._input=null}function tt(){G.apply(this,arguments)}function et(){G.apply(this,arguments)}function nt(){W.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function rt(t,e){return e=e||{},e.recognizers=f(e.recognizers,rt.defaults.preset),new it(t,e)}function it(t,e){this.options=st({},rt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.element=t,this.input=C(this),this.touchAction=new q(this,this.options.touchAction),ot(this,!0),a(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function ot(t,e){var n=t.element;n.style&&a(t.options.cssProps,function(t,r){n.style[b(n.style,r)]=e?t:""})}function at(t,n){var r=e.createEvent("Event");r.initEvent(t,!0,!0),r.gesture=n,n.target.dispatchEvent(r)}var st,ut=["","webkit","Moz","MS","ms","o"],ct=e.createElement("div"),lt="function",ft=Math.round,ht=Math.abs,dt=Date.now;st="function"!=typeof Object.assign?function(t){if(t===r||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==r&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(e[o]=i[o])}return e}:Object.assign;var pt=s(function(t,e,n){for(var i=Object.keys(e),o=0;o<i.length;)(!n||n&&t[i[o]]===r)&&(t[i[o]]=e[i[o]]),o++;return t},"extend","Use `assign`."),mt=s(function(t,e){return pt(t,e,!0)},"merge","Use `assign`."),vt=1,gt=/mobile|tablet|ip(ad|hone|od)|android/i,$t="ontouchstart"in t,yt=b(t,"PointerEvent")!==r,bt=$t&&gt.test(navigator.userAgent),wt="touch",_t="pen",xt="mouse",Ct="kinect",Et=25,kt=1,At=2,St=4,Tt=8,Ot=1,It=2,zt=4,Mt=8,Dt=16,jt=It|zt,Nt=Mt|Dt,Pt=jt|Nt,Rt=["x","y"],Ft=["clientX","clientY"];x.prototype={handler:function(){},init:function(){this.evEl&&h(this.element,this.evEl,this.domHandler),this.evTarget&&h(this.target,this.evTarget,this.domHandler),this.evWin&&h(_(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&d(this.element,this.evEl,this.domHandler),this.evTarget&&d(this.target,this.evTarget,this.domHandler),this.evWin&&d(_(this.element),this.evWin,this.domHandler)}};var Bt={mousedown:kt,mousemove:At,mouseup:St},Lt="mousedown",Ut="mousemove mouseup";u(P,x,{handler:function(t){var e=Bt[t.type];e&kt&&0===t.button&&(this.pressed=!0),e&At&&1!==t.which&&(e=St),this.pressed&&this.allow&&(e&St&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:xt,srcEvent:t}))}});var Vt={pointerdown:kt,pointermove:At,pointerup:St,pointercancel:Tt,pointerout:Tt},qt={2:wt,3:_t,4:xt,5:Ct},Ht="pointerdown",Wt="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Ht="MSPointerDown",Wt="MSPointerMove MSPointerUp MSPointerCancel"),u(R,x,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=Vt[r],o=qt[t.pointerType]||t.pointerType,a=o==wt,s=g(e,t.pointerId,"pointerId");i&kt&&(0===t.button||a)?0>s&&(e.push(t),s=e.length-1):i&(St|Tt)&&(n=!0),0>s||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))}});var Xt={touchstart:kt,touchmove:At,touchend:St,touchcancel:Tt},Yt="touchstart",Zt="touchstart touchmove touchend touchcancel";u(F,x,{handler:function(t){var e=Xt[t.type];if(e===kt&&(this.started=!0),this.started){var n=B.call(this,t,e);e&(St|Tt)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:wt,srcEvent:t})}}});var Gt={touchstart:kt,touchmove:At,touchend:St,touchcancel:Tt},Kt="touchstart touchmove touchend touchcancel";u(L,x,{handler:function(t){var e=Gt[t.type],n=U.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:wt,srcEvent:t})}}),u(V,x,{handler:function(t,e,n){var r=n.pointerType==wt,i=n.pointerType==xt;if(r)this.mouse.allow=!1;else if(i&&!this.mouse.allow)return;e&(St|Tt)&&(this.mouse.allow=!0),this.callback(t,e,n)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Jt=b(ct.style,"touchAction"),Qt=Jt!==r,te="compute",ee="auto",ne="manipulation",re="none",ie="pan-x",oe="pan-y";q.prototype={set:function(t){t==te&&(t=this.compute()),Qt&&this.manager.element.style&&(this.manager.element.style[Jt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return a(this.manager.recognizers,function(e){l(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),H(t.join(" "))},preventDefaults:function(t){if(!Qt){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var r=this.actions,i=m(r,re),o=m(r,oe),a=m(r,ie);if(i){var s=1===t.pointers.length,u=t.distance<2,c=t.deltaTime<250;if(s&&u&&c)return}if(!a||!o)return i||o&&n&jt||a&&n&Nt?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var ae=1,se=2,ue=4,ce=8,le=ce,fe=16,he=32;W.prototype={defaults:{},set:function(t){return st(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(o(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=Z(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return o(t,"dropRecognizeWith",this)?this:(t=Z(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(o(t,"requireFailure",this))return this;var e=this.requireFail;return t=Z(t,this),-1===g(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(o(t,"dropRequireFailure",this))return this;t=Z(t,this);var e=g(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){n.manager.emit(e,t)}var n=this,r=this.state;ce>r&&e(n.options.event+X(r)),e(n.options.event),t.additionalEvent&&e(t.additionalEvent),r>=ce&&e(n.options.event+X(r))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=he)},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(he|ae)))return!1;t++}return!0},recognize:function(t){var e=st({},t);return l(this.options.enable,[this,e])?(this.state&(le|fe|he)&&(this.state=ae),this.state=this.process(e),void(this.state&(se|ue|ce|fe)&&this.tryEmit(e))):(this.reset(),void(this.state=he))},process:function(t){},getTouchAction:function(){},reset:function(){}},u(G,W,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,r=e&(se|ue),i=this.attrTest(t);return r&&(n&Tt||!i)?e|fe:r||i?n&St?e|ce:e&se?e|ue:se:he}}),u(K,G,{defaults:{event:"pan",threshold:10,pointers:1,direction:Pt},getTouchAction:function(){var t=this.options.direction,e=[];return t&jt&&e.push(oe),t&Nt&&e.push(ie),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,a=t.deltaY;return i&e.direction||(e.direction&jt?(i=0===o?Ot:0>o?It:zt,n=o!=this.pX,r=Math.abs(t.deltaX)):(i=0===a?Ot:0>a?Mt:Dt,n=a!=this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},attrTest:function(t){return G.prototype.attrTest.call(this,t)&&(this.state&se||!(this.state&se)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Y(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),u(J,G,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[re]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&se)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),u(Q,W,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ee]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,o=t.deltaTime>e.time;if(this._input=t,!r||!n||t.eventType&(St|Tt)&&!o)this.reset();else if(t.eventType&kt)this.reset(),this._timer=i(function(){this.state=le,this.tryEmit()},e.time,this);else if(t.eventType&St)return le;return he},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===le&&(t&&t.eventType&St?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=dt(),this.manager.emit(this.options.event,this._input)))}}),u(tt,G,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[re]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&se)}}),u(et,G,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:jt|Nt,pointers:1},getTouchAction:function(){return K.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(jt|Nt)?e=t.overallVelocity:n&jt?e=t.overallVelocityX:n&Nt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&ht(e)>this.options.velocity&&t.eventType&St},emit:function(t){var e=Y(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),u(nt,W,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ne]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,o=t.deltaTime<e.time;if(this.reset(),t.eventType&kt&&0===this.count)return this.failTimeout();if(r&&o&&n){if(t.eventType!=St)return this.failTimeout();var a=this.pTime?t.timeStamp-this.pTime<e.interval:!0,s=!this.pCenter||M(this.pCenter,t.center)<e.posThreshold;this.pTime=t.timeStamp,this.pCenter=t.center,s&&a?this.count+=1:this.count=1,this._input=t;var u=this.count%e.taps;if(0===u)return this.hasRequireFailures()?(this._timer=i(function(){this.state=le,this.tryEmit()},e.interval,this),se):le}return he},failTimeout:function(){return this._timer=i(function(){this.state=he},this.options.interval,this),he},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==le&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),rt.VERSION="2.0.6",rt.defaults={domEvents:!1,touchAction:te,enable:!0,inputTarget:null,inputClass:null,preset:[[tt,{enable:!1}],[J,{enable:!1},["rotate"]],[et,{direction:jt}],[K,{direction:jt},["swipe"]],[nt],[nt,{event:"doubletap",taps:2},["tap"]],[Q]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var de=1,pe=2;it.prototype={set:function(t){return st(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?pe:de},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var n,r=this.recognizers,i=e.curRecognizer;(!i||i&&i.state&le)&&(i=e.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],e.stopped===pe||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(t),!i&&n.state&(se|ue|ce)&&(i=e.curRecognizer=n),o++}},get:function(t){if(t instanceof W)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(o(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(o(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=g(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){var n=this.handlers;return a(v(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this},off:function(t,e){var n=this.handlers;return a(v(t),function(t){e?n[t]&&n[t].splice(g(n[t],e),1):delete n[t]}),this},emit:function(t,e){this.options.domEvents&&at(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](e),r++}},destroy:function(){this.element&&ot(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},st(rt,{INPUT_START:kt,INPUT_MOVE:At,INPUT_END:St,INPUT_CANCEL:Tt,STATE_POSSIBLE:ae,STATE_BEGAN:se,STATE_CHANGED:ue,STATE_ENDED:ce,STATE_RECOGNIZED:le,STATE_CANCELLED:fe,STATE_FAILED:he,DIRECTION_NONE:Ot,DIRECTION_LEFT:It,DIRECTION_RIGHT:zt,DIRECTION_UP:Mt,DIRECTION_DOWN:Dt,DIRECTION_HORIZONTAL:jt,DIRECTION_VERTICAL:Nt,DIRECTION_ALL:Pt,Manager:it,Input:x,TouchAction:q,TouchInput:L,MouseInput:P,PointerEventInput:R,TouchMouseInput:V,SingleTouchInput:F,Recognizer:W,AttrRecognizer:G,Tap:nt,Pan:K,Swipe:et,Pinch:J,Rotate:tt,Press:Q,on:h,off:d,each:a,merge:mt,extend:pt,assign:st,inherit:u,bindFn:c,prefixed:b});var me="undefined"!=typeof t?t:"undefined"!=typeof self?self:{};me.Hammer=rt,"function"==typeof define&&define.amd?define(function(){return rt}):"undefined"!=typeof module&&module.exports?module.exports=rt:t[n]=rt}(window,document,"Hammer"),!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.JSZip=t()}}(function(){return function t(e,n,r){function i(a,s){
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="?"> &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(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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpZGdldHMvUmFuZ2VTbGlkZXJzL1JhbmdlU2xpZGVyTW9kLmpzIiwid2lkZ2V0cy9Ob3RpZmljYXRpb25zL1Rva2VuUmVmcmVzaFN2Yy5qcyIsIndpZGdldHMvTm90aWZpY2F0aW9ucy9Nb2RhbE5vdGlmaWNhdGlvbi5qcyIsIndpZGdldHMvTmF2aWdhdGlvbi9MaW5rQnV0dG9uLmpzIiwid2lkZ2V0cy9Gb3JtSW5wdXQvVXBsb2FkQXBwbGkuanMiLCJ3aWRnZXRzL0Zvcm1JbnB1dC9JbnB1dFRleHQuanMiLCJ3aWRnZXRzL0Zvcm1JbnB1dC9JbnB1dFBhc3N3b3JkLmpzIiwid2lkZ2V0cy9BY3Rpb25CdXR0b25zL1N1Ym1pdEJ1dHRvbi5qcyIsIndpZGdldHMvQWN0aW9uQnV0dG9ucy9BcHBsaUJ1dHRvbi5qcyIsInBhZ2VzL0Rhc2hib2FyZC9EYXNoYm9hcmRNb2R1bGUuanMiLCJzZXJ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S52YWx1ZTtcbiAgICAgICAgICAgc2NvcGUudmFsdWUgPSBbdW5kZWZpbmVkLHVuZGVmaW5lZF07XG4gICAgICAgICAgICR0aW1lb3V0IChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgIHNjb3BlLnNldFZhbHVlKHZhbHVlWzBdLDApO1xuICAgICAgICAgICAgICAgaWYgKHNjb3BlLmR1YWwpICBzY29wZS5zZXRWYWx1ZSh2YWx1ZVsxXSwxKTtcbiAgICAgICAgICAgfSwgdGltZXIpO1xuICAgICAgICB9O1xuXG4gICAgICAgIC8vIGhhbmRsZXIgdG8gY2hhbmdlIGNsYXNzIGZyb20gc2xpZGVyIGhhbmRsZVxuICAgICAgICBzY29wZS51cGRhdGVDbGFzcyA9IGZ1bmN0aW9uIChjbGFzc2UsIHN0YXR1cykge1xuXG4gICAgICAgICAgICBpZiAoc3RhdHVzKSBlbGVtZW50LmFkZENsYXNzIChjbGFzc2UpO1xuICAgICAgICAgICAgZWxzZSAgZWxlbWVudC5yZW1vdmVDbGFzcyAoY2xhc3NlKTtcbiAgICAgICAgfTtcblxuICAgICAgICBzY29wZS5zZXREaXNhYmxlID0gZnVuY3Rpb24gKGRpc2FibGVkKSB7XG5cbiAgICAgICAgICAgIGlmIChkaXNhYmxlZCkge1xuICAgICAgICAgICAgICAgIGVsZW1lbnQuYWRkQ2xhc3MgKFwiZGlzYWJsZVwiKTtcbiAgICAgICAgICAgICAgICBzY29wZS5oYW5kbGVzWzBdLmNzcyAoJ3Zpc2liaWxpdHknLCdoaWRkZW4nKTtcbiAgICAgICAgICAgICAgICBpZiAoc2NvcGUuZHVhbCkge1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5oYW5kbGVzWzFdLmNzcyAoJ3Zpc2liaWxpdHknLCdoaWRkZW4nKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGVsZW1lbnQucmVtb3ZlQ2xhc3MgKFwiZGlzYWJs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zZSB7XG4gICAgICAgICAgICAgICAgb2Zmc2V0ID0gc2NvcGUuYm91bmRzLmJhci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS53aWR0aCAqICh2YWx1ZSAtIHNjb3BlLm5vdExlc3MpIC8gKHNjb3BlLm5vdE1vcmUgLSBzY29wZS5ub3RMZXNzKTtcbiAgICAgICAgICAgICAgICBzY29wZS5zdG9wLmNzcyh7J3JpZ2h0JzogMCwgJ3dpZHRoJzogKHNjb3BlLmJvdW5kcy5iYXIuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkud2lkdGggIC0gb2Zmc2V0KSArICdweCd9KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc2NvcGUuc3RvcFZhbHVlPSB2YWx1ZTtcbiAgICAgICAgfTtcblxuICAgICAgICBzY29wZS50cmFuc2xhdGUgPSBmdW5jdGlvbiAob2Zmc2V0LCBoYW5kbGUpIHtcbiAgICAgICAgICAgIHZhciBzdGFydDtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHNjb3BlLnZlcnRpY2FsKSB7XG4gICAgICAgICAgICAgICAgLy8gdGFrZSBoYW5kbGUgc2l6ZSBpbiBhY2NvdW50IHRvIGNvbXB1dGUgbWlkZGxlXG4gICAgICAgICAgICAgICAgdmFyIHZvZmZzZXQgPSBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLmhlaWdodCAtIG9mZnNldDtcblxuICAgICAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbaGFuZGxlXS5jc3Moe1xuICAgICAgICAgICAgICAgICAgICAnLXdlYmtpdC10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWSgnICsgdm9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAnLW1vei10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWSgnICsgdm9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAnLW1zLXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVZKCcgKyB2b2Zmc2V0ICsgJ3B4KScsXG4gICAgICAgICAgICAgICAgICAgICctby10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWSgnICsgdm9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAndHJhbnNmb3JtJzogJ3RyYW5zbGF0ZVkoJyArIHZvZmZzZXQgKyAncHgpJ1xuICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICBpZiAoIXNjb3BlLmR1YWwpIHNjb3BlLnNsaWRlci5jc3MoJ2hlaWdodCcsIG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgICAgZWxzZSBpZiAoc2NvcGUucmVsYXRpdmVbMV0gJiYgc2NvcGUucmVsYXRpdmVbMF0pIHtcbiAgICAgICAgICAgICAgICAgICB2YXIgaGVpZ2h0ID0gKHNjb3BlLnJlbGF0aXZlWzFdIC0gc2NvcGUucmVsYXRpdmVbMF0pICogIHNjb3BlLmJvdW5kcy5iYXIuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkuaGVpZ2h0O1xuICAgICAgICAgICAgICAgICAgIHN0YXJ0ICA9IChzY29wZS5yZWxhdGl2ZVswXSAqICBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLmhlaWdodCk7XG4gICAgICAgICAgICAgICAgICAgc2NvcGUuc2xpZGVyLmNzcyAoeydib3R0b20nOiBzdGFydCsncHgnLCdoZWlnaHQnOiBoZWlnaHQgKyAncHgnfSk7XG4gICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1toYW5kbGVdLmNzcyh7XG4gICAgICAgICAgICAgICAgICAgICctd2Via2l0LXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJyxcbiAgICAgICAgICAgICAgICAgICAgJy1tb3otdHJhbnNmb3JtJzogJ3RyY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blxuICAgICAgICBzY29wZS5mb2N1c0NCID0gZnVuY3Rpb24gKGluc2lkZSkge1xuICAgICAgICAgICAgaWYgKGluc2lkZSkge1xuICAgICAgICAgICAgICAgICRkb2N1bWVudC5vbigna2V5ZG93bicsc2NvcGUua2V5ZG93bik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICRkb2N1bWVudC51bmJpbmQoJ2tleWRvd24nLHNjb3BlLmtleWRvd24pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIC8vIGJhciB3YXMgdG91Y2ggbGV0IG1vdmUgaGFuZGxlIHRvIHRoaXMgcG9pbnRcbiAgICAgICAgc2NvcGUudG91Y2hCYXJDQiA9IGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgdmFyIGhhbmRsZT0wO1xuICAgICAgICAgICAgdmFyIHJlbGF0aXZlO1xuICAgICAgICAgICAgdmFyIHRvdWNoZXMgPSBldmVudC5jaGFuZ2VkVG91Y2hlcztcbiAgICAgICAgICAgIHZhciBvbGR2YWx1ZSA9IHNjb3BlLnZhbHVlW2hhbmRsZV07XG5cbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG5cbiAgICAgICAgICAgIC8vIGlmIHdlIGhhdmUgdHdvIGhhbmRsZXMgc2VsZWN0IGNsb3Nlc3Qgb25lIGZyb20gdG91Y2ggcG9pbnRcbiAgICAgICAgICAgIGlmIChzY29wZS5kdWFsKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnZlcnRpY2FsKSByZWxhdGl2ZSA9ICh0b3VjaGVzWzBdLnBhZ2VZIC0gc2NvcGUuYm91bmRzLmJhci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5ib3R0b20pIC8gc2NvcGUuYm91bmRzLmJhci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5oZWlnaHQ7XG4gICAgICAgICAgICAgICAgZWxzZSByZWxhdGl2ZT0gKHR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cmdldCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIHRydWUgOlxuICAgICAgICAgICAgICAgICAgICBjYXNlICdoYW5kbGUnIDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmRpc3BsYXlzID0gc2NvcGUuaGFuZGxlcztcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbMF0uYWRkQ2xhc3MoJ2liei1yYW5nZS1zbGlkZXItZGlzcGxheScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLmR1YWwpIHNjb3BlLmhhbmRsZXNbMV0uYWRkQ2xhc3MoJ2liei1yYW5nZS1zbGlkZXItZGlzcGxheScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5kaXNwbGF5cyA9ICBbJGRvY3VtZW50LmdldEVsZW1lbnRCeUlkIChhdHRycy5kaXNwbGF5VGFyZ2V0KV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHNjb3BlLmRpc3BsYXlzPVtdO1xuXG4gICAgICAgICAgICAvLyBleHRyYWN0IGluaXRpYWwgdmFsdWVzIGZyb20gYXR0cnMgYW5kIHBhcnNlIGludG8gaW50XG4gICAgICAgICAgICBpZiAoIWF0dHJzLmluaXRpYWwpIHtcbiAgICAgICAgICAgICAgICBzY29wZS5pbml0aWFsICA9IFtzY29wZS5uZ01vZGVsLCBzY29wZS5uZ01vZGVsXTsgLy8gaW5pdGlhbGl6ZSB0byBtb2RlbCB2YWx1ZXNcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIGluaXRpYWwgID0gYXR0cnMuaW5pdGlhbC5zcGxpdCgnLCcpO1xuICAgICAgICAgICAgICAgIHNjb3BlLmluaXRpYWwgPSBbXG4gICAgICAgICAgICAgICAgICAgIGluaXRpYWxbMF0gIT09IHVuZGVmaW5lZCA/IHBhcnNlSW50IChpbml0aWFsWzBdKSA6IHNjb3BlLm5vdExlc3MsXG4gICAgICAgICAgICAgICAgICAgIGluaXRpYWxbMV0gIT09IHVuZGVmaW5lZCA/IHBhcnNlSW50IChpbml0aWFsWzFdKSA6IHNjb3BlLm5vdE1vcmVcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBNb25pdG9yIGFueSBjaGFuZ2VzIG9uIHN0YXJ0L3N0b3AgZGF0ZXMuXG4gICAgICAgICAgICBzY29wZS4kd2F0Y2goJ3N0YXJ0QXQnLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICBpZiAoc2NvcGUudmFsdWUgPCBzY29wZS5zdGFydEF0ICkge1xuICAgICAgICAgICAgICAgICAgICAvL3Njb3BlLnNldFZhbHVlIChzY29wZS5zdGFydEF0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnN0YXJ0QXQpIHNjb3BlLnNldFN0YXJ0IChzY29wZS5zdGFydEF0KTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBzY29wZS4kd2F0Y2goJ3N0b3BBdCcgLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICBpZiAoc2NvcGUudmFsdWUgPiBzY29wZS5zdG9wQXQpIHtcbiAgICAgICAgICAgICAgICAgICAgLy9zY29wZS5zZXRWYWx1ZSAoc2NvcGUuc3RvcEF0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnN0b3BBdCkgc2NvcGUuc2V0U3RvcCAoc2NvcGUuc3RvcEF0KTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAvLyBmaW5pc2ggd2lkZ2V0IGluaXRpYWxpc2F0aW9uXG4gICAgICAgICAgICBzY29wZS5pbml0aWFsU2V0dGluZ3MgKHNjb3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AgICAgICAkbG9nLmxvZyhcIk9QQSBleGl0XCIpOyAgICAgICAgICAgIFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH07XG4gICAgICAgICAgICAgICAgIFxuICAgICAgICBzY29wZS5vbmxpbmUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBlbGVtLmFkZENsYXNzICAgIChcIm9ubGluZVwiKTtcbiAgICAgICAgICAgIGVsZW0ucmVtb3ZlQ2xhc3MgKFwib2ZmbGluZVwiKTtcbiAgICAgICAgICAgIHNjb3BlLmxvZ2dlZD10cnVlO1xuICAgICAgICB9O1xuXG4gICAgICAgIHNjb3BlLm9mZmxpbmUgPSBmdW5jdGlvbigpe1xuICAgICAgICAgICAgZWxlbS5hZGRDbGFzcyAgICAoXCJvZmZsaW5lXCIpO1xuICAgICAgICAgICAgZWxlbS5yZW1vdmVDbGFzcyAoXCJvbmxpbmVcIik7XG4gICAgICAgICAgICBzY29wZS5sb2dnZWQ9ZmFsc2U7XG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICBzY29wZS5vbmVycm9yID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICBpZiAoc2NvcGUubG9nZ2VkICE9PSBmYWxzZSkgIHtcbiAgICAgICAgICAgICAgICBOb3RpZmljYXRpb24ud2FybmluZyAoe21lc3NhZ2U6IFwiQXBwRnJhbWV3b3JrIEJpbmRlciBMb3N0XCIsIGRlbGF5OiA1MDAwfSk7XG4gICAgICAgICAgICAgICAgc2NvcGUub2ZmbGluZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2NvcGUuc3RhdHVzID0gMDtcbiAgICAgICAgfTtcbiAgICAgICAgXG4gICAgICAgIHNjb3BlLm9uc3VjY2VzcyA9IGZ1bmN0aW9uKGpyZXNwKSB7XG4gICAgICAgICAgICBpZiAoanJlc3AucmVxdWVzdC50b2tlbikgQXBwQ29uZmlnLnNlc3Npb24udG9rZW4gPSBqcmVzcC5yZXF1ZXN0LnRva2VuO1xuICAgICAgICAgICAgaWYgKGpyZXNwLnJlcXVlc3QudXVpZCkgIEFwcENvbmZpZy5zZXNzaW9uLnV1aWQgID0ganJlc3AucmVxdWVzdC51dWlkO1xuICAgICAgICAgICAgaWYgKGpyZXNwLnJlcXVlc3QudGltZW91dCkgIEFwcENvbmZpZy5zZXNzaW9uLnRpbWVvdXQgID0ganJlc3AucmVxdWVzdC50aW1lb3V0O1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoc2NvcGUubG9nZ2VkICE9PSB0cnVlKSAge1xuICAgICAgICAgICAgICAgIE5vdGlmaWNhdGlvbi5zdWNjZXNzICh7bWVzc2FnZTogXCJBcHBGcmFtZXdvcmsgQmluZGVyIEJhY2sgdG8gTGl2ZVwiLCBkZWxheTogMzAwMH0pO1xuICAgICAgICAgICAgICAgIHNjb3BlLm9ubGluZSgpO1xuICAgICAgICAgICAgICAgIGlmIChzY29wZS5jYWxsYmFjaykgc2NvcGUuY2FsbGJhY2soanJlc3ApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2NvcGUuc3RhdHVzID0gMTtcbiAgICAgICAgfTtcblxuICAgICAgICAvLyBDaGVjayBCaW5kZXIgc3RhdHVzXG4gICAgICAgIHNjb3BlLmdldHBpbmcgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgQXBwQ2FsbC5nZXQgKFwidG9rZW5cIiwgXCJwaW5nXCIsIHsvKnF1ZXJ5Ki99LGZ1bmN0aW9uKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuc3RhdHVzID09PSAyMDApIHNjb3BlLm9uc3VjY2VzcyAocmVzdWx0LmRhdGEpO1xuICAgICAgICAgICAgICAgIGVsc2UgIHNjb3BlLm9uZXJyb3IoKTtcbiAgICAgICAgICAgICAgICAvLyByZXN0YXJ0IGEgbmV3IHRpbWVyIGZvciBuZXh0IHBpbmdcbiAgICAgICAgICAgICAgICAkdGltZW91dCAoc2NvcGUuZ2V0cGluZywgQXBwQ29uZmlnLnNlc3Npb24ucGluZ3JhdGUqMTAwMCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfTtcbiAgICAgICAgXG4gICAgICAgIC8vIENoZWNrIEJpbmRlciBzdGF0dXNcbiAgICAgICAgc2NvcGUucmVmcmVzaCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJ0b2tlblwiLCBcInJlZnJlc2hcIiwgey8qcXVlcnkqL30sZnVuY3Rpb24ocmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5zdGF0dXMgPT09IDIwMCkgc2NvcGUub25zdWNjZXNzIChyZXN1bHQuZGF0YSk7XG4gICAgICAgICAgICAgICAgZWxzZSAgc2NvcGUub25lcnJvcigpO1xuICAgICAgICAgICAgICAgIC8vIHJlc3RhcnQgYSBuZXcgdGltZXIgZm9yIG5leHQgcmVmcmVzaFxuICAgICAgICAgICAgICAgICR0aW1lb3V0IChzY29wZS5yZWZyZXNoLCBBcHBDb25maWcuc2Vzc2lvbi50aW1lb3V0ICoyNTApO1xuICAgICAgICAgICAgfSk7ICAgICAgICAgICAgXG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICAvLyBJbml0aWFsIGNvbm5lY3Rpb25cbiAgICAgICAgc2NvcGUudGtjcmVhdGUgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgQXBwQ2FsbC5nZXQgKFwidG9rZW5cIiwgXCJjcmVhdGVcIiwge3Rva2VuOiBBcHBDb25maWcuc2Vzc2lvbi5pbml0aWFsfSxmdW5jdGlvbihyZXN1bHQpIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0LnN0YXR1cyA9PT0gMjAwKSBzY29wZS5vbnN1Y2Nlc3MgKHJlc3VsdC5kYXRhKTtcbiAgICAgICAgICAgICAgICBlbHNlICBzY29wZS5vbmVycm9yKC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gICAgICAgICAvLyBkZWxheSB0aXAgZGlzcGxheSB0byBhdm9pZCBibGlua2luZyB3aGVuIG1vdmluZyBtb3VzZSBmYXN0XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGRpc3BsYXkgKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gYWN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2NvcGUuc2hvdykgc2NvcGUubW9kYWwuY3NzKHtvcGFjaXR5OiAxLCB2aXNpYmlsaXR5Oid2aXNpYmxlJ30pOyAgXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5zaG93ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLnRpbWVvdXQgPSAkdGltZW91dChhY3Rpb24sIHNjb3BlLmRlbGF5KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY2xvc2UgKCkge1xuICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLnNob3cgPSBmYWxzZTsgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICBzY29wZS5tb2RhbC5jc3Moe29wYWNpdHk6IDAsIHZpc2liaWxpdHk6J2hpZGRlbid9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBcblxuICAgICAgICAgICAgICAgICAgICAvLyBhanVzdCBpY29uIG9yIHVzZSBkZWZhdWx0XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmljb24gID0gYXR0cnMuaWNvbiB8fCAnZmktbGlnaHRidWxiJztcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSBQYXJlbnQgZWxlbWVudCB0byBnZXQgbW91c2UgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUucGFyZW50LmFkZENsYXNzICgnYXMtbW9kYWwtdGlwJyk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdjbGljaycsIGNsb3NlKTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUucGFyZW50LmJpbmQoJ2ZvY3VzJywgZGlzcGxheSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdtb3VzZW92ZXInLCBkaXNwbGF5KTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUucGFyZW50LmJpbmQoJ21vdXNlbGVhdmUnLCBjbG9zZSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdibHVyJywgY2xvc2UpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuZGVsYXkgPSBhdHRycy5kZWxheSB8fCAxMDAwOyAvLyB3YWl0IDFzIGJlZm9yZSBkaXNwbGF5aW5nIHRpcFxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RyaWN0OiAnRScsXG4gICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiB0bXBsLFxuICAgICAgICAgICAgICAgICAgICBsaW5rOiBteW1ldGhvZHMsXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlOiB7dGlwOiBcIj1cIn0gLy8gdGlwIG1heSBub3QgYmUgZGVmaW5lZCB3aGVuIHdpZGdldCBpcyBkaXNwbGF5XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1dKTtcbn0pKCk7XG4iLCIvKiBcbiAqIENvcHlyaWdodCAoQykgMjAxNSBcIklvVC5iemhcIlxuICogQXV0aG9yIFwiRnVsdXAgQXIgRm9sbFwiXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjY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rZWQoKVwiPicgK1xuICAgICAgICAgICAgJzxpIGNsYXNzPVwie3tpY29ufX1cIj48L2k+JyArXG4gICAgICAgICAgICAnPHNwYW4+e3tsYWJlbH19PC9zcGFuPicgK1xuICAgICAgICAgICAgJzwvc3Bhbj4nO1xuXG5cbiAgICBhbmd1bGFyLm1vZHVsZSgnTGlua0J1dHRvbicsIFtdKVxuICAgICAgICAgICAgLmRpcmVjdGl2ZSgnbGlua0J1dHRvbicsIFtcIiRsb2NhdGlvblwiLCBmdW5jdGlvbiAoJGxvY2F0aW9uKSB7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gbXltZXRob2RzKHNjb3BlLCBlbGVtLCBhdHRycykge1xuXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmNsaWNrZWQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghYXR0cnMucXVlcnkpICRsb2NhdGlvbi5wYXRoKGF0dHJzLmhyZWYpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSAkbG9jYXRpb24ucGF0aChhdHRycy5ocmVmKS5zZWFyY2goYXR0cnMucXVlcnkpO1xuICAgICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIGFqdXN0IGljb24gb3IgdXNlIGRlZmF1bHRcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaWNvbiA9IGF0dHJzLmljb24gICB8fCAnZmktbGluayc7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmxhYmVsID0gYXR0cnMubGFiZWwgfHwgJ0p1bXAnO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5ocmVmICA9IGF0dHJzLmhyZWYgIHx8ICcvaG9tZSc7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAvLyBhZGQgbGFiZWwgYXMgY2xhc3NcbiAgICAgICAgIC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bigpIHtcbiAgICAgICAgICAgICAgICBzY29wZS5tb2RhbC5kZWFjdGl2YXRlKCk7XG4gICAgICAgICAgICAgICAgJHRpbWVvdXQgKGZ1bmN0aW9uKCkge3Njb3BlLm1vZGFsLmRlc3Ryb3koKTt9LCAxMDAwKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIHJlYWRlckNCID0gZnVuY3Rpb24gKHVwbG9hZCkge1xuICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gRmlsZSB1cGxvYWQgZmFpbCBoYW5kbGUgZXJyb3JcbiAgICAgICAgICAgICAgICBpZiAoISB1cGxvYWQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGhhbmRsZS5maWxlLnNpemUgPiBzY29wZS5tYXhzaXplKjEwMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGljb24gPSBzY29wZS5pc3Rvb2JpZztcbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlPSB0bXBsRXJyb3I7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGlmIChpc05hTihoYW5kbGUuZmlsZS5zaXplKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXBwaWNvbiA9IHNjb3BlLmlzbm90dmFsaWQ7IFxuICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU9IHRtcGxFcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgICAgICAgICAgdmFyIHppcGFwcCA9IG5ldyBKU1ppcCAodXBsb2FkLnRhcmdldC5yZXN1bHQpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdGh1bWJuYWlsID0gemlwYXBwLmZpbGUoXCJpY29uXzEyOC5wbmdcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gQ2hlY2sgaXMgd2UgaGF2ZSBhIHRodW1ibmFpbCB3aXRoaW4gbG9hZGVkIFppcGZpbGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0aHVtYm5haWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIlRoaXMgaXMgbm90IGEgdmFsaWQgQXBwbGljYXRpb24gRnJhbWV3b3JrIEFQUFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGljb24gPSBzY29wZS5pc25vdHZhbGlkO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU9IHRtcGxFcnJvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy9zY29wZS5pbWdFbGVtWzBdLnNyYyA9IHdpbmRvdy5VUkwuY3JlYXRlT2JqZWN0VVJMKG5ldyBCbG9iKFt0aHVtYm5haWwuYXNBcnJheUJ1ZmZlcigpXSwge3R5cGU6IFwiaW1hZ2VcIn0pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGljb24gPSB3aW5kb3cuVVJMLmNyZWF0ZU9iamVjdFVSTChuZXcgQmxvYihbdGh1bWJuYWlsLmFzQXJyYXlCdWZmZXIoKV0sIHt0eXBlOiBcImltYWdlXCJ9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZSA9IHRtcGxNb2RhbDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAvLyByZWZlcmVuY2UgaHR0cDovL2ZvdW5kYXRpb24uenVyYi5jb20vYXBwcy9kb2NzLyMhL2FuZ3VsYXItbW9kdWxlc1xuICAgICAgICAgICAgICAgIHZhciBjb25maWcgPSB7XG4gICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbkluOiAnc2xpZGVJbkZyb21Ub3AnLFxuICAgICAgICAgICAgICAgICAgICBjb250ZW50U2NvcGU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3MgOiBzdWNjZXNzLFxuICAgICAgICAgICAgICAgICAgICAgICAgYWJhbmRvbiA6IGFiYW5kb24sXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uICAgIDogYXBwaWNvbixcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcG5hbWUgOiBoYW5kbGUuYmFzZW5hbWVcbiAgICAgICAgICAgICAgICAgICAgfSwgdGVtcGxhdGUgOiB0ZW1wbGF0ZVxuICAgICAgICAgICAgICAgIH07IFxuICAgICAgICAgICAgICAgIC8vIFBvcHVwIE1vZGFsIHRvIHJlbmRlciBhcHBsaWNhdGlvbiBkYXRhXG4gICAgICAgICAgICAgICAgc2NvcGUubW9kYWwgPSBuZXcgTW9kYWxGYWN0b3J5KGNvbmZpZyk7XG4gICAgICAgICAgICAgICAgc2NvcGUubW9kYWwuYWN0aXZhdGUgKCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgXG4gICAgICAgICAgICAvLyBMb2FkIGZpbGUgd2l0aGluIGJyb3dzZXIgYW5kIGlmIE9LIGNhbGwgcmVhZGVyQ0JcbiAgICAgICAgICAgIGhhbmRsZSA9IG5ldyBMb2FkRmlsZVN2YyAoc2NvcGUsIGZpbGVzLCByZWFkZXJDQik7XG4gICAgICAgICAgICBjb25zb2xlLmxvZyAoaGFuZGxlKTtcbiAgICAgICAgfTtcblxuICAgICAgICAvLyBJbml0aWFsbGl6ZSBkZWZhdWx0IHZhbHVlcyBmcm9tIGF0dHJpYnV0ZXMgdmFsdWVzXG4gICAgICAgIHNjb3BlLm5hbWU9IGF0dHJzLm5hbWUgfHwgJ2FwcGxpJztcbiAgICAgICAgc2NvcGUuY2F0ZWdvcnk9IGF0dHJzLmNhdGVnb3J5IC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3BlLnZhbHVlLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgICAgIC8vIGNoZWNrIG1pbmltdW0gbGVuZ2h0XG4gICAgICAgICAgICBpZiAoXCJtaW5sZW5cIiBpbiBhdHRycykge1xuICAgICAgICAgICAgICBpZiAoc2NvcGUudmFsdWUubGVuZ3RoIDwgYXR0cnMubWlubGVuKSB7XG4gICAgICAgICAgICAgICAgIHNjb3BlLnN0YXR1cz0naW52YWxpZCc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm1zZz1zY29wZS5uYW1lICsgJzogTWluaW51bSBMZW5naD0gJyArIGF0dHJzLm1pbmxlbiArICcgQ2hhcmFjdGVycyc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKCdlbWFpbCcgaW4gYXR0cnMpIHtcbiAgICAgICAgICAgIGlmICghZW1haWxwYXRlcm4udGVzdCAoc2NvcGUudmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgc2NvcGUuc3RhdHVzPSdpbnZhbGlkJztcbiAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9J2ludmFsaWQgZW1haWwgYWRkcmVzcyc7XG4gICAgICAgICAgICAgICAgc2NvcGUuZXJyb3I9dHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgIH1cbiAgICAgICAgIFxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKHNjb3BlLnJlcXVpcmVkKSB7XG4gICAgICAgICAgICAgICAgIHNjb3BlLnN0YXR1cz0naW52YWxpZCc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm1zZz1zY29wZS5uYW1lICsgJzogUmVxdWlyZWQgQXR0cmlidXRlJztcbiAgICAgICAgICAgICAgICAgc2NvcGUuZXJyb3I9dHJ1ZTsgXG4gIC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zY29wZS5sNGFjb3VudGVyID0gc2NvcGUucGFyZW50LmRhdGEgKFwibDRhY291bnRlclwiKTtcbiAgICAgICAgIGlmICghc2NvcGUubDRhY291bnRlcikgeyBcbiAgICAgICAgICAgIHNjb3BlLmw0YWNvdW50ZXIgPSAge3JlcXVpcmVkOjEsIHZhbGlkYXRlZDowfTtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiRmllbGQgXCIrc2NvcGUubmFtZStcIiBpcyByZXF1aXJlZCAoMXN0KVwiKTtcbiAgICAgICAgICAgIHNjb3BlLnBhcmVudC5kYXRhIChcImw0YWNvdW50ZXJcIiwgc2NvcGUubDRhY291bnRlcik7IFxuICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIkZpZWxkIFwiK3Njb3BlLm5hbWUrXCIgaXMgcmVxdWlyZWRcIik7XG4gICAgICAgICAgICAgc2NvcGUubDRhY291bnRlci5yZXF1aXJlZCArKztcbiAgICAgICAgIH1cbiAgICAgfVxuICAgICAgICAgXG4gICAgIC8vIHJlZnJlc2ggdmFsaWRhdGlvbiBlYWNoIHRpbWUgY29udHJvbGVyIHVwZGF0ZSB2YWx1ZVxuICAgICBzY29wZS4kd2F0Y2ggKCd2YWx1ZScsIGZ1bmN0aW9uKCl7XG4gICAgICAgICBpZihzY29wZS52YWx1ZSkgc2NvcGUudmFsaWRhdGUoKTsgfVxuICAgICApO1xuICAgIFxuICAgIH1cbiAgICBcbiAgICByZXR1cm4ge1xuICAgICAgICByZXN0cmljdDogJ0UnLFxuICAgICAgICB0ZW1wbGF0ZTogdG1wbCxcbiAgICAgICAgbGluazogbXltZXRob2RzLFxuICAgICAgICBzY29wZToge1xuICAgICAgICAgICAgY2FsbGJhY2sgOiAnPScsXG4gICAgICAgICAgICB2YWx1ZTogJz0nXG4gICAgICAgIH1cbiAgICB9O1xufV0pO1xuXG5jb25zb2xlLmxvZyAoXCJJbnB1dFRleHQgTG9hZGVkXCIpO1xufSko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mdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBteW1ldGhvZHMoc2NvcGUsIGVsZW0sIGF0dHJzKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gYWp1c3QgaWNvbiBvciB1c2UgZGVmYXVsdFxuICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uID0gYXR0cnMuaWNvbiB8fCAnZmktZm9vdCc7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmxhYmVsID0gYXR0cnMubGFiZWwgfHwgJ05leHQnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gYWRkIGxhYmVsIGFzIGNsYXNzXG4gICAgICAgICAgICAgICAgICAgIGVsZW0uYWRkQ2xhc3MgKHNjb3BlLmxhYmVsLnRvTG93ZXJDYXNlKCkpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gbm90ZTogY2xpY2tlZCBpbiBpbXBvcnRlZCBhbmQgd2hlbiB0ZW1wbGF0ZSBpcyBjbGlja2VkXG4gICAgICAgICAgICAgICAgICAgIC8vIGl0IHdpbGwgY2FsbCBjbGlja2VkIG1ldGhvZCBwYXNzZWQgaW4gcGFyYW0uXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RyaWN0OiAnRScsXG4gICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiB0bXBsLFxuICAgICAgICAgICAgICAgICAgICBsaW5rOiBteW1ldGhvZHMsXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlOiB7Y2xpY2tlZCA6ICc9J31cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSk7XG59KSgpO1xuIiwiLyogXG4gKiBDb3B5cmlnaHQgKEMpIDIwMTUgXCJJb1QuYnpoXCJcbiAqIEF1d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uXCIsIFwiJHRpbWVvdXRcIiwgXCIkd2luZG93XCIsIFwiJGxvY2F0aW9uXCIsIFwidXJscXVlcnlcIiwgZnVuY3Rpb24gKEFwcENvbmZpZywgQXBwQ2FsbCwgTW9kYWxGYWN0b3J5LCBOb3RpZmljYXRpb24sICR0aW1lb3V0LCAkd2luZG93LCAkbG9jYXRpb24sIHVybHF1ZXJ5KSB7XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBteW1ldGhvZHMoc2NvcGUsIGVsZW0sIGF0dHJzKSB7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnJ1bnN0YXR1cyA9IFwic3RvcFwiO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5ydW5tb2RlICAgPSB1cmxxdWVyeS5ydW5tb2RlIHx8IFwiYXV0b1wiO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5jbGlja2VkID0gZnVuY3Rpb24gKCkge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbm90aWZ5RXJyb3IgPSBmdW5jdGlvbihhY3Rpb24sIHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTm90aWZpY2F0aW9uLmVycm9yICh7bWVzc2FnZTogXCJGYWlsIC9hcGkvYWZtLW1haW5cIiArIGFjdGlvbiArIFwiPVwiICsgc2NvcGUubGFiZWwgKyBcIiBSdW5JRD1cIisgc2NvcGUuYXBwSUQsIGRlbGF5OiA1MDAwfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxlbS5hZGRDbGFzcyAoXCJmYWlsXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW0ucmVtb3ZlQ2xhc3MgKFwic3VjY2Vzc1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5jYWxsYmFjayAoc2NvcGUuYXBwSUQsIGFjdGlvbiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5vdGlmeVN1Y2Nlc3MgPSBmdW5jdGlvbiAoYWN0aW9uLCByZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW0ucmVtb3ZlQ2xhc3MgKFwiZmFpbFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5ydW5JRCA9IHJlc3BvbnNlLmRhdGEucmVzcG9uc2UucnVuaWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuY2FsbGJhY2sgKHNjb3BlLmFwcElELCBhY3Rpb24sIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjbG9zZU1vZEFwcCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZEFwcC5kZWFjdGl2YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRpbWVvdXQgKGZ1bmN0aW9uKCkge3Njb3BlLm1vZEFwcC5kZXN0cm95KCk7fSwgMTAwMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY2xvc2VNb2RJbmZvID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kSW5mby5kZWFjdGl2YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRpbWVvdXQgKGZ1bmN0aW9uKCkge3Njb3BlLm1vZEluZm8uZGVzdHJveSgpO30sIDEwMDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGFjdGlvbk1vZGFsID0gZnVuY3Rpb24oYWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiTW9kYWwgQWN0aW9uPSVzXCIsIGFjdGlvbik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJzdGFydFwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLnJ1bnN0YXR1cyAhPT0gXCJzdG9wXCIpIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFwcENhbGwuZ2V0IChcImFmbS1tYWluXCIsIFwic3RhcnRcIiwge2lkOiBzY29wZS5hcHBJRCwgbW9kZTogc2NvcGUucnVubW9kZX0sIGZ1bmN0aW9uKHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnN0YXR1cyAhPT0gMjAwIHx8IHJlc3BvbnNlLmRhdGEuanR5cGUgIT09IFwiYWZiLXJlcGx5XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90aWZ5RXJyb3IgKFwic3RhcnRcIiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLnJ1bnN0YXR1cz1cInN0YXJ0XCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90aWZ5U3VjY2VzcyAoYWN0aW9uLCByZXNwb25zZSk7XG5cdFx0XHRcdFx0aWYocmVzcG9uc2UuZGF0YS5yZXNwb25zZS51cmkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLndpbmFwcD0gJHdpbmRvdy5vcGVuKHJlc3BvbnNlLmRhdGEucmVzcG9uc2UudXJpLnJlcGxhY2UoXCIlaFwiLCAkbG9jYXRpb24uaG9zdCgpKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInN0b3BcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY29wZS5ydW5zdGF0dXMgIT09IFwic3RhcnRcIikgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJhZm0tbWFpblwiLCBcInRlcm1pbmF0ZVwiLCB7cnVuaWQ6IHNjb3BlLnJ1bklEfSwgZnVuY3Rpb24ocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uuc3RhdHVzICE9PSAyMDAgfHwgcmVzcG9uc2UuZGF0YS5qdHlwZSAhPT0gXCJhZmItcmVwbHlcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3RpZnlFcnJvciAoXCJzdG9wXCIsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5ydW5zdGF0dXM9XCJzdG9wXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYgYSByZW1vdGUgd2luZG93IGFwcCB3YXMgb3BlbiBsZXQncyBjbG9zZSBpdFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY29wZS53aW5hcHApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyAoXCJDbG9zaW5nIEFwcGxpY2F0aW9uIFdpbmRvdyBsYWJlbD0lcyBpZD0lc1wiLCBzY29wZS5sYWJlbCwgc2NvcGUuYXBwSUQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLndpbmFwcC5jbG9zZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLndpbmFwcD1mYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90aWZ5U3VjY2VzcyAoYWN0aW9uLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwiaW5mb1wiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQXBwQ2FsbC5nZXQgKFwiYWZtLW1haW5cIiwgXCJkZXRhaWxcIiwge2lkOiBzY29wZS5hcHBJRH0sIGZ1bmN0aW9uKHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnN0YXR1cyAhPT0gMjAwIHx8IHJlc3BvbnNlLmRhdGEuanR5cGUgIT09IFwiYWZiLXJlcGx5XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90aWZ5RXJyb3IgKFwiZGV0YWlsXCIsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZWZlcmVuY2UgaHR0cDovL2ZvdW5kYXRpb24uenVyYi5jb20vYXBwcy9kb2NzLyMhL2FuZ3VsYXItbW9kdWxlc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjb25maWcgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbkluOiAnc2xpZGVJbkZyb21Ub3AnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50U2NvcGU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb3NlICAgOiBjbG9zZU1vZEluZm8sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uICAgIDogc2NvcGUuaWNvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsICAgOiBzY29wZS5hcHBJRCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRldGFpbCAgOiByZXNwb25zZS5kYXRhLnJlc3BvbnNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHRlbXBsYXRlIDogdG1wbERldGFpbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07IFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFBvcHVwIE1vZGFsIHRvIHJlbmRlciBhcHBsaWNhdGlvbiBkYXRhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kSW5mbyA9IG5ldyBNb2RhbEZhY3RvcnkoY29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5tb2RJbmZvLmFjdGl2YXRlICgpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJ1bmluc3RhbGxcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY29wZS5ydW5zdGF0dXMgIT09IFwic3RvcFwiKSByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJhZm0tbWFpblwiLCBcInVuaW5zdGFsbFwiLCB7aWQ6IHNjb3BlLmFwcElEfSwgZnVuY3Rpb24ocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uuc3RhdHVzICE9PSAyMDAgfHwgcmVzcG9uc2UuZGF0YS5qdHlwZSAhPT0gXCJhZmItcmVwbHlcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3RpZnlFcnJvciAoXCJ1bmluc3RhbGxcIiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeVN1Y2Nlc3MgKGFjdGlvbiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiQWN0aW9uTW9kYWwgdW5rbm93biBhY3Rpb249WyVzXVwiLCBhY3Rpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb3NlTW9kQXBwKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyByZWZlcmVuY2UgaHR0cDovL2ZvdW5kYXRpb24uenVyYi5jb20vYXBwcy9kb2NzLyMhL2FuZ3VsYXItbW9kdWxlc1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvbmZpZyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb25JbjogJ3NsaWRlSW5Gcm9tVG9wJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50U2NvcGU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uICAgOiBhY3Rpb25Nb2RhbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnVuc3RhdHVzOiBzY29wZS5ydW5zdGF0dXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb3NlICAgIDogY2xvc2VNb2RBcHAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb24gICAgIDogc2NvcGUuaWNvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWwgICAgOiBzY29wZS5sYWJlbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHRlbXBsYXRlICA6IHRtcGxNb2RhbFxuICAgICAgICAgICAgICAgICAgICAgICAgfTsgXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBQb3B1cCBNb2RhbCB0byByZW5kZXIgYXBwbGljYXRpb24gZGF0YVxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kQXBwID0gbmV3IE1vZGFsRmFjdG9yeShjb25maWcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kQXBwLmFjdGl2YXRlICgpO1xuICAgICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIGV4dHJhY3QgYXBwbGljYXRpb24gaW5mb3JtYXRpb24gZnJvbSBBcHBJRCtTdG9yZVxuICAgICAgICAgICAgICAgICAgICBpZiAoYXR0cnMuaGFuZGxlICYmIHNjb3BlLnN0b3JlIFthdHRycy5oYW5kbGVdLm5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmljb24gID0gQXBwQ29uZmlnLnBhdGhzLmljb25zICsgYXR0cnMuaGFuZGxlOyAvL3Njb3BlLnN0b3JlIFthdHRycy5oYW5kbGVdLm5hbWUudG9Mb3dlckNhc2UoKSArICctaWNvLnBuZyc7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IHNjb3BlLnN0b3JlIFthdHRycy5oYW5kbGVdLm5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5hcHBJRD0gYXR0cnMuaGFuZGxlO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmljb24gID0gQXBwQ29uZmlnLnBhdGhzLmljb25zICsgJ3czYy1pY28ucG5nJztcbiAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IGF0dHJzLmhhbmRsZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gYWRkIGxhYmVsIGFzIGNsYXNzXG4gICAgICAgICAgICAgICAgICAgIGVsZW0uYWRkQ2xhc3MgKHNjb3BlLmxhYmVsLnRvTG93ZXJDYXNlKCkpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gbm90ZTogY2xpY2tlZCBpbiBpbXBvcnRlZCBhbmQgd2hlbiB0ZW1wbGF0ZSBpcyBjbGlja2VkXG4gICAgICAgICAgICAgICAgICAgIC8vIGl0IHdpbGwgY2FsbCBjbGlja2VkIG1ldGhvZCBwYXNzZWQgaW4gcGFyYW0uXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RyaWN0OiAnRScsXG4gICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiB0bXBsQXBwbGksXG4gICAgICAgICAgICAgICAgICAgIGxpbms6IG15bWV0aG9kcyxcbiAgICAgICAgICAgICAgICAgICAgc2NvcGU6IHtjYWxsYmFjazogJz0nLCBzdG9yZTogJz0nfVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XSk7XG59KSgpO1xuIiwi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vbGxlciBvbmx5IHVwZGF0ZSBkZWJ1ZyBVSSB6b25lXG4gICAgICAgICAgICAgICAgc2NvcGUucmVxdWVzdCAgPSBhY3Rpb247IFxuICAgICAgICAgICAgICAgIHNjb3BlLmVycmNvZGUgID0gcmVzcG9uc2Uuc3RhdHVzO1xuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5kYXRhKSBzY29wZS5yZXNwb25zZSA9IHJlc3BvbnNlLmRhdGE7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gT24gYXBwIHdhcyByZW1vdmVkIGxldCdzIHVwZGF0ZSBydW5uYWJsZSBsaXN0XG4gICAgICAgICAgICAgICAgaWYgKGFjdGlvbiA9PT0gXCJ1bmluc3RhbGxcIikgIHNjb3BlLkdldFJ1bm5hYmxlcygpO1xuICAgICAgICB9O1xuICAgICAgICBcbiAgICAgICAgc2NvcGUuR2V0UnVubmFibGVzID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICBjb25zb2xlLmxvZyAoXCJEYXNoYm9hcmQgR2V0UnVubmFibGVzXCIpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJhZm0tbWFpblwiLCBcInJ1bm5hYmxlc1wiLCB7LypxdWVyeSovfSwgZnVuY3Rpb24ocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAvLyB1cGRhdGUgZGVidWcgVUkgem9uZVxuICAgICAgICAgICAgICAgIHNjb3BlLnJlcXVlc3QgID0gXCIvYXBpL2FmbS1tYWluL3J1bm5hYmxlXCI7IFxuICAgICAgICAgICAgICAgIHNjb3BlLnJlc3BvbnNlID0gcmVzcG9uc2UuZGF0YTtcbiAgICAgICAgICAgICAgICBzY29wZS5lcnJjb2RlICA9IHJlc3BvbnNlLnN0YXR1cztcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uuc3RhdHVzICE9PSAyMDApIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiSG9vcCBHZXRSdW5uYWJsZSBmYWlsZWRcIik7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gQ2hlY2sgdGhpcyBpcyBhIHZhbGlkIHJlc3BvbnNlIGZyb20gQmluZGVyXG4gICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmRhdGEuanR5cGUgIT0gXCJhZmItcmVwbHlcIikge1xuICAgICAgICAgICAgICAgICAgTm90aWZpY2F0aW9uLmVycm9yICh7bWVzc2FnZTogXCJJbnZhbGlkIFJlc3BvbmQgdG8gL29wYS9hZm0tbWFpbi9ydW5uYWJsZSByZXNwb25zZS5kYXRhPVwiK3Jlc3BvbnNlLmRhdGEsIGRlbGF5OiA1MDAwfSk7IFxuICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAvLyBsb29wIG9uIHJ1bm5hYmxlIGFwcGxpY2F0aW9uIHRvIHByZXBhcmUgZm9yIGRpc3BsYXlcbiAgICAgICAgICAgICAgICB2YXIgIGFwcGxpSURzPVtdO1xuICAgICAgICAgICAgICAgIHZhciAgcnVubmFibGVzID0gcmVzcG9uc2UuZGF0YS5yZXNwb25zZS5ydW5uYWJsZXM7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaWR4PTA7IGlkeCA8IHJ1bm5hYmxlcy5sZW5ndGg7IGlkeCArKykge1xuICAgICAgICAgICAgICAgICAgICBhcHBsaUlEc1tpZHhdID0gcnVubmFibGVzIFtpZHhdLmlkO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5hcHBsaVN0b3JlIFtydW5uYWJsZXMgW2lkeF0uaWRdID0gIHJ1bm5hYmxlcyBbaWR4XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2NvcGUuYXBwbGlJRHMgPSBhcHBsaUlEczsgLy8gYXZvaWQgcGFydGlhbCB1cGRhdGUgdG8gbGltaXQgVUkgcmVmcmVzaFxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgfSk7ICAgICAgICAgICAgXG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICBzY29wZS5GaWxlVXBsb2FkZWQgPSBmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nIChcImZpbGUgVXBsb2FkZWRcIik7XG4gICAgICAgICAgICAvLyBDYW5ub3QgZGlzcGxheSBwb3N0IHJlc3VsdHMgYXMgR2V0UnVubmFibGUgd2lsbCBvdmVybG9hZCB0aGVtIGF5bmNocm9ub3VzbHlcbiAgICAgICAgICAgIHNjb3BlLnJlcXVlc3QgID0gXCIvYXBpL2FmbS1tYWluL2luc3RhbGxcIjsgXG4gICAgICAgICAgICBzY29wZS5yZXNwb25zZSA9IHJlc3BvbnNlLmhlYWRlcnM7XG4gICAgICAgICAgICBzY29wZS5lcnJjb2RlICA9IHJlc3BvbnNlLnN0YXR1cztcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgLy8gZXZlcnl0aGluZyBsb29rcyBPSyB1cGRhdGUgYXBwIGxpc3RcbiAgICAgICAgICAgIHNjb3BlLkdldFJ1bm5hYmxlcygpO1xuICAgICAgICB9O1xuICAgICAgICBcbiAgICAgICAgc2NvcGUuQXV0b1N0YXJ0ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiQXV0b1N0YXJ0IHJlcXVlc3RpbmcgQXBwcyBsaXN0XCIpO1xuICAgICAgICAgICAgc2NvcGUuR2V0UnVubmFibGVzKCk7XG4gICAgICAgIH07XG4gICAgICAgICAgXG4gICB9XSk7XG5cbmNvbnNvbGUubG9nIChcIkRhc2hib2FyZCBDb250cm9sbGVyIExvYWRlZFwiKTtcbn0pKCk7I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JblBhcmVudCAodGFyZ2V0LCAnZGl2Jyk7XG4gKiBcbiAqL1xuXG5cbihmdW5jdGlvbiAoKSB7XG4gICAgJ3VzZSBzdHJpY3QnO1xuXG5cbiAgICAgICAgICBcbiAgICAvLyBfYWxsIG1vZHVsZXMgb25seSByZWZlcmVuY2UgZGVwZW5kZW5jaWVzXG4gICAgYW5ndWxhci5tb2R1bGUoJ0pRdWVyeUVtdScsIFtdKVxuXG4gICAgICAgICAgICAvLyBGYWN0b3J5IGlzIGEgc2luZ2xldG9uIGFuZCBzaGFyZSBpdHMgY29udGV4dCB3aXRoaW4gYWxsIGluc3RhbmNlcy5cbiAgICAgICAgICAgIC5mYWN0b3J5KCdKUWVtdScsIGZ1bmN0aW9uICgpIHtcblxuICAgICAgICAgICAgICAgIHZhciBGaW5kSW5QYXJlbnQgPSBmdW5jdGlvbiAoZWxlbWVudCwgc2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBhcmVudCA9IGVsZW1lbnQ7XG4gICAgICAgICAgICAgICAgICAgIHZhciBzZWFyY2ggPSBzZWxlY3Rvci50b1VwcGVyQ2FzZSgpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAocGFyZW50WzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VhcmNoID09PSBwYXJlbnRbMF0udGFnTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwYXJlbnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9ICAvLyBIVE1MRGl2RWxlbWVudCBwcm9wZXJ0aWVzXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnQgPSBwYXJlbnQucGFyZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciAgRmluZEJ5VGFnPSBmdW5jdGlvbiAoZWxlbWVudCwgdGFnLCBzZWxlY3Rvcikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHR5cGUgICA9IHRhZy50b0xvd2VyQ2FzZSgpKyBcIk5hbWVcIjtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNoaWxkcmVuID0gZWxlbWVudC5jaGlsZHJlbigpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hpbGRyZW5bMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWFyY2ggPT09IGNoaWxkcmVuWzBdW3R5cGVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoaWxkcmVuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW4gPSBjaGlsZHJlbi5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciAgRmluZEJ5Q2xhc3M9IGZ1bmN0aW9uIChlbGVtZW50LCBzZWxlY3Rvcikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNoaWxkcmVuID0gZWxlbWVudC5jaGlsZHJlbigpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hpbGRyZW5bMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjaGlsZHJlbi5oYXNDbGFzcyhzZWFyY2gpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoaWxkcmVuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW4gPSBjaGlsZHJlbi5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgdmFyIG15TWV0aG9kcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgRmluZEluUGFyZW50OiBGaW5kSW5QYXJlbnQsXG4gICAgICAgICAgICAgICAgICAgIEZpbmRCeVRhZzogRmluZEJ5VGFnLFxuICAgICAgICAgICAgICAgICAgICBGaW5kQnlDbGFzczogRmluZEJ5Q2xhc3NcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG15TWV0aG9kcztcbiAgICAgICAgICAgIH0pO1xuXG59KSgpOyIsInZhciBmb3VuZGF0aW9uUm91dGVzID0gW3tcIm5hbWVcIjpcIkRhc2hib2FyZFwiLFwidXJsXCI6XCIvZGFzaGJvYXJkXCIsXCJjb250cm9sbGVyXCI6XCJEYXNoYm9hcmRDb250cm9sbGVyIGFzIGN0cmxcIixcImFuaW1hdGlvbkluXCI6XCJzbGlkZUluUmlnaHRcIixcInBhdGhcIjpcInBhZ2VzL0Rhc2hib2FyZC9EYXNoYm9hcmQuaHRtbFwifV07IFxuIiwiKGZ1bmN0aW9uICgpIHtcbiAgICAndXNlIHN0cmljdCc7XG5cbiAgICAvLyBfYWxsIG1vZHVsZXMgb25seSByZWZlcmVuY2UgZGVwZW5kZW5jaWVzXG4gICAgYW5ndWxhci5tb2R1bGUoJ0FwcENvbmZpZycsIFtdKVxuICAgIFxuICAgICAgICAgICAgLy8gRmFjdG9yeSBpcyBhIHNpbmdsZXRvbiBhbmQgc2hhcmUgaXRzIGNvbnRleHQgd2l0aGluIGFsbCBpbnN0YW5jZXMuXG4gICAgICAgICAgICAuZmFjdG9yeSgnQXBwQ29uZmlnJywgW1widXJscXVlcnlcIiwgZnVuY3Rpb24gKHVybHF1ZXJ5KSB7XG5cbiAgICAgICAgICAgICAgICAvLyBjb25zb2xlLmxvZyAoXCJVUkw9XCIrICRsb2NhdGlvbi51cmwoKSArIFwiIFF1ZXJ5PVwiICsgbG9jYXRpb24uaHJlZisgXCIgd2luZG93PVwiICsgZG9jdW1lbnQucmVmZXJyZXIpO1xuXG4gICAgICAgICAgICAgICAgdmFyIG15Q29uZmlnID0ge1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgcGF0aHM6IHsgLy8gV2FybmluZyBwYXRocyBzaG91bGQgZW5kIHdpdGggL1xuICAgICAgICAgICAgICAgICAgICAgICAgaW1hZ2UgOiAnaW1hZ2VzLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29ucyA6ICcvaWNvbnMvJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF2YXRhcjogJ2ltYWdlcy9hdmF0YXJzLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdWRpbyA6ICdpbWFnZXMvYXVkaW8vJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGxpIDogJ2ltYWdlcy9hcHBsaS8nXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHNlc3Npb246IHsgLy8gVGhvc2UgZGF0YSBhcmUgdXBkYXRlZCBieSBzZXNzaW9uIHNlcnZpY2VcbiAgICAgICAgICAgICAgICAgICAgICAgaW5pdGlhbCA6IHVybHF1ZXJ5LnRva2VuIHx8ICcxMjM0NTY3ODknLCAgLy8gdHlwaWNhbCBkZXYgaW5pdGlhbCB0b2tlblxuICAgICAgICAgICAgICAgICAgICAgICB0aW1lb3V0IDogMzYwMCwgICAgICAgICAvLyB0aW1lb3V0IGlzIHVwZGF0ZWQgY2xpZW50IHNlc3NpbiBjb250ZXh0IGNyZWF0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgIHBpbmdyYXRlOiAxNSwgICAgICAgICAgIC8vIFBpbmcgcmF0ZSB0byBjaGVjayBpZiBzZXJ2ZXIgaXMgc3RpbGwgYWxpdmVcbiAgICAgICAgICAgICAgICAgICAgICAgdXVpZCAgICA6ICcnLCAgICAgICAgICAgLy8gdXVpZCBtYXAgd2l0aCBjb29raWUgb3IgbG9uZyB0ZXJtIHNlc3Npb24gYWNjZXNzIGtleVxuICAgICAgICAgICAgICAgICAgICAgICB0b2tlbiAgIDogJycgICAgICAgICAgICAvLyB3aWxsIGJlIHJldHVybmVkIGZyb20gYXV0aGVudGljYXRpb24gICAgXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG15Q29uZmlnO1xuICAgICAgICAgICAgfV0pXG5cbiAgICAgICAgICAgIC8vIEZhY3RvcnkgaXMgYSBzaW5nbGV0b24gYW5kIHNoYXJlIGl0cyBjb250ZXh0IHdpdGhpbiBhbGwgaW5zdGFuY2VzLlxuICAgICAgICAgICAgLmZhY3RvcnkoJ0FwcENhbGwnLCBbXCIkaHR0cFwiLCBcIkFwcENvbmZpZ1wiLCBcIiRsb2dcIiwgZnVuY3Rpb24gKCRodHRwLCBBcHBDb25maWcsICRsb2cpIHtcbiAgICAgICAgICAgICAgICB2YXIgbXlDYWxscyA9IHtcbiAgICAgICAgICAgICAgICAgICAgZ2V0IDogZnVuY3Rpb24ocGx1Z2luLCBhY3Rpb24sIHF1ZXJ5LCBjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFxdWVyeS50b2tlbikgcXVlcnkudG9rZW4gPSBBcHBDb25maWcuc2Vzc2lvbi50b2tlbjsgLy8gYWRkIHRva2VuIHRvIHByb3ZpZGVkIHF1ZXJ5XG4gICAgICAgICAgICAgICAgICAgICAgICAkaHR0cC5nZXQoJy9hcGkvJyArIHBsdWdpbiArICcvJyArIGFjdGlvbiAsIHtwYXJhbXM6IHF1ZXJ5fSkudGhlb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yZXNoPicpO31dKTtcbn0pKCk7XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
+!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="?"> &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(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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpZGdldHMvUmFuZ2VTbGlkZXJzL1JhbmdlU2xpZGVyTW9kLmpzIiwid2lkZ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dm9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAnLW1vei10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWSgnICsgdm9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAnLW1zLXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVZKCcgKyB2b2Zmc2V0ICsgJ3B4KScsXG4gICAgICAgICAgICAgICAgICAgICctby10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWSgnICsgdm9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAndHJhbnNmb3JtJzogJ3RyYW5zbGF0ZVkoJyArIHZvZmZzZXQgKyAncHgpJ1xuICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICBpZiAoIXNjb3BlLmR1YWwpIHNjb3BlLnNsaWRlci5jc3MoJ2hlaWdodCcsIG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgICAgZWxzZSBpZiAoc2NvcGUucmVsYXRpdmVbMV0gJiYgc2NvcGUucmVsYXRpdmVbMF0pIHtcbiAgICAgICAgICAgICAgICAgICB2YXIgaGVpZ2h0ID0gKHNjb3BlLnJlbGF0aXZlWzFdIC0gc2NvcGUucmVsYXRpdmVbMF0pICogIHNjb3BlLmJvdW5kcy5iYXIuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkuaGVpZ2h0O1xuICAgICAgICAgICAgICAgICAgIHN0YXJ0ICA9IChzY29wZS5yZWxhdGl2ZVswXSAqICBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLmhlaWdodCk7XG4gICAgICAgICAgICAgICAgICAgc2NvcGUuc2xpZGVyLmNzcyAoeydib3R0b20nOiBzdGFydCsncHgnLCdoZWlnaHQnOiBoZWlnaHQgKyAncHgnfSk7XG4gICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1toYW5kbGVdLmNzcyh7XG4gICAgICAgICAgICAgICAgICAgICctd2Via2l0LXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJyxcbiAgICAgICAgICAgICAgICAgICAgJy1tb3otdHJhbnNmb3JtJzogJ3RyYW5zbGF0ZVgoJyArIG9mZnNldCArICdweCknLFxuICAgICAgICAgICAgICAgICAgICAnLW1zLXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJyxcbiAgICAgICAgICAgICAgICAgICAgJy1vLXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJyxcbiAgICAgICAgICAgICAgICAgICAgJ3RyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJ1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGlmICghc2NvcGUuZHVhbCkgc2NvcGUuc2xpZGVyLmNzcygnd2lkdGgnLG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHNjb3BlLnJlbGF0aXZlWzFdICYmIHNjb3BlLnJlbGF0aXZlWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB3aWR0aCA9IChzY29wZS5yZWxhdGl2ZVsxXSAtIHNjb3BlLnJlbGF0aXZlWzBdKSAqICBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLndpZHRoO1xuICAgICAgICAgICAgICAgICAgICBzdGFydCA9IChzY29wZS5yZWxhdGl2ZVswXSAqICBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLndpZHRoKTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuc2xpZGVyLmNzcyAoeydsZWZ0Jzogc3RhcnQrJ3B4Jywnd2lkdGgnOiB3aWR0aCArICdweCd9KTtcbiAgICAgICAgICAgICAgICB9XG4gIC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3BlLnNldFZhbHVlIChzY29wZS52YWx1ZVswXSAsIDEpO1xuICAgICAgICAgICAgICAgIGVsc2Ugc2NvcGUuc2V0VmFsdWUoc2NvcGUudmFsdWVbMV0sMCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cblxuICAgICAgICBzY29wZS5mb2N1c0NCID0gZnVuY3Rpb24gKGluc2lkZSkge1xuICAgICAgICAgICAgaWYgKGluc2lkZSkge1xuICAgICAgICAgICAgICAgICRkb2N1bWVudC5vbigna2V5ZG93bicsc2NvcGUua2V5ZG93bik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICRkb2N1bWVudC51bmJpbmQoJ2tleWRvd24nLHNjb3BlLmtleWRvd24pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIC8vIGJhciB3YXMgdG91Y2ggbGV0IG1vdmUgaGFuZGxlIHRvIHRoaXMgcG9pbnRcbiAgICAgICAgc2NvcGUudG91Y2hCYXJDQiA9IGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgdmFyIGhhbmRsZT0wO1xuICAgICAgICAgICAgdmFyIHJlbGF0aXZlO1xuICAgICAgICAgICAgdmFyIHRvdWNoZXMgPSBldmVudC5jaGFuZ2VkVG91Y2hlcztcbiAgICAgICAgICAgIHZhciBvbGR2YWx1ZSA9IHNjb3BlLnZhbHVlW2hhbmRsZV07XG5cbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG5cbiAgICAgICAgICAgIC8vIGlmIHdlIGhhdmUgdHdvIGhhbmRsZXMgc2VsZWN0IGNsb3Nlc3Qgb25lIGZyb20gdG91Y2ggcG9pbnRcbiAgICAgICAgICAgIGlmIChzY29wZS5kdWFsKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnZlcnRpY2FsKSByZWxhdGl2ZSA9ICh0b3VjaGVzWzBdLnBhZ2VZIC0gc2NvcGUuYm91bmRzLmJhci5nZXR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SA9PT0gJ3RydWUnKSBzY29wZS5zZXREaXNhYmxlKHRydWUpO1xuXG4gICAgICAgICAgICBpZiAoYXR0cnMuZGlzcGxheVRhcmdldCkge1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoYXR0cnMuZGlzcGxheVRhcmdldCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIHRydWUgOlxuICAgICAgICAgICAgICAgICAgICBjYXNlICdoYW5kbGUnIDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmRpc3BsYXlzID0gc2NvcGUuaGFuZGxlcztcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbMF0uYWRkQ2xhc3MoJ2liei1yYW5nZS1zbGlkZXItZGlzcGxheScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLmR1YWwpIHNjb3BlLmhhbmRsZXNbMV0uYWRkQ2xhc3MoJ2liei1yYW5nZS1zbGlkZXItZGlzcGxheScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5kaXNwbGF5cyA9ICBbJGRvY3VtZW50LmdldEVsZW1lbnRCeUlkIChhdHRycy5kaXNwbGF5VGFyZ2V0KV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHNjb3BlLmRpc3BsYXlzPVtdO1xuXG4gICAgICAgICAgICAvLyBleHRyYWN0IGluaXRpYWwgdmFsdWVzIGZyb20gYXR0cnMgYW5kIHBhcnNlIGludG8gaW50XG4gICAgICAgICAgICBpZiAoIWF0dHJzLmluaXRpYWwpIHtcbiAgICAgICAgICAgICAgICBzY29wZS5pbml0aWFsICA9IFtzY29wZS5uZ01vZGVsLCBzY29wZS5uZ01vZGVsXTsgLy8gaW5pdGlhbGl6ZSB0byBtb2RlbCB2YWx1ZXNcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIGluaXRpYWwgID0gYXR0cnMuaW5pdGlhbC5zcGxpdCgnLCcpO1xuICAgICAgICAgICAgICAgIHNjb3BlLmluaXRpYWwgPSBbXG4gICAgICAgICAgICAgICAgICAgIGluaXRpYWxbMF0gIT09IHVuZGVmaW5lZCA/IHBhcnNlSW50IChpbml0aWFsWzBdKSA6IHNjb3BlLm5vdExlc3MsXG4gICAgICAgICAgICAgICAgICAgIGluaXRpYWxbMV0gIT09IHVuZGVmaW5lZCA/IHBhcnNlSW50IChpbml0aWFsWzFdKSA6IHNjb3BlLm5vdE1vcmVcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBNb25pdG9yIGFueSBjaGFuZ2VzIG9uIHN0YXJ0L3N0b3AgZGF0ZXMuXG4gICAgICAgICAgICBzY29wZS4kd2F0Y2goJ3N0YXJ0QXQnLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICBpZiAoc2NvcGUudmFsdWUgPCBzY29wZS5zdGFydEF0ICkge1xuICAgICAgICAgICAgICAgICAgICAvL3Njb3BlLnNldFZhbHVlIChzY29wZS5zdGFydEF0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnN0YXJ0QXQpIHNjb3BlLnNldFN0YXJ0IChzY29wZS5zdGFydEF0KTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBzY29wZS4kd2F0Y2goJ3N0b3BBdCcgLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICBpZiAoc2NvcGUudmFsdWUgPiBzY29wZS5zdG9wQXQpIHtcbiAgICAgICAgICAgICAgICAgICAgLy9zY29wZS5zZXRWYWx1ZSAoc2NvcGUuc3RvcEF0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnN0b3BBdCkgc2NvcGUuc2V0U3RvcCAoc2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5vbmJlZm9yZXVubG9hZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIEFwcENhbGwuZ2V0IChzY29wZS5wbHVnaW4sIFwibG9nb3V0XCIsIHsvKnF1ZXJ5Ki99LCBmdW5jdGlvbiAoKSB7ICAgIFxuICAgICAgICAgICAgJGxvZy5sb2coXCJPUEEgZXhpdFwiKTsgICAgICAgICAgICBcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9O1xuICAgICAgICAgICAgICAgICBcbiAgICAgICAgc2NvcGUub25saW5lID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgZWxlbS5hZGRDbGFzcyAgICAoXCJvbmxpbmVcIik7XG4gICAgICAgICAgICBlbGVtLnJlbW92ZUNsYXNzIChcIm9mZmxpbmVcIik7XG4gICAgICAgICAgICBzY29wZS5sb2dnZWQ9dHJ1ZTtcbiAgICAgICAgfTtcblxuICAgICAgICBzY29wZS5vZmZsaW5lID0gZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIGVsZW0uYWRkQ2xhc3MgICAgKFwib2ZmbGluZVwiKTtcbiAgICAgICAgICAgIGVsZW0ucmVtb3ZlQ2xhc3MgKFwib25saW5lXCIpO1xuICAgICAgICAgICAgc2NvcGUubG9nZ2VkPWZhbHNlO1xuICAgICAgICB9O1xuICAgICAgICBcbiAgICAgICAgc2NvcGUub25lcnJvciA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgaWYgKHNjb3BlLmxvZ2dlZCAhPT0gZmFsc2UpICB7XG4gICAgICAgICAgICAgICAgTm90aWZpY2F0aW9uLndhcm5pbmcgKHttZXNzYWdlOiBcIkFwcEZyYW1ld29yayBCaW5kZXIgTG9zdFwiLCBkZWxheTogNTAwMH0pO1xuICAgICAgICAgICAgICAgIHNjb3BlLm9mZmxpbmUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNjb3BlLnN0YXR1cyA9IDA7XG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICBzY29wZS5vbnN1Y2Nlc3MgPSBmdW5jdGlvbihqcmVzcCwgZXJyY29kZSkge1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoZXJyY29kZSAhPT0gMjAwIHx8IGpyZXNwLnJlcXVlc3Quc3RhdHVzICE9PSBcInN1Y2Nlc3NcIikge1xuICAgICAgICAgICAgICAgIE5vdGlmaWNhdGlvbi53YXJuaW5nICh7bWVzc2FnZTogXCJhdXRvLWNvbm5lY3QgOlwiICsganJlc3AucmVxdWVzdC5pbmZvLCBkZWxheTogMTAwMDB9KTtcbiAgICAgICAgICAgICAgICBzY29wZS5vZmZsaW5lKCk7IFxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHNjb3BlLmxvZ2dlZCAhPT0gdHJ1ZSkgIHtcbiAgICAgICAgICAgICAgICBOb3RpZmljYXRpb24uc3VjY2VzcyAoe21lc3NhZ2U6IFwiQXBwRnJhbWV3b3JrIEJpbmRlciBDb25uZWN0ZWRcIiwgZGVsYXk6IDMwMDB9KTtcbiAgICAgICAgICAgICAgICBzY29wZS5vbmxpbmUoKTtcbiAgICAgICAgICAgICAgICBpZiAoc2NvcGUuY2FsbGJhY2spIHNjb3BlLmNhbGxiYWNrKGpyZXNwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgc2NvcGUuc3RhdHVzID0gMTsgICAgICAgICAgICBcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9O1xuXG4gICAgICAgIC8vIENoZWNrIEJpbmRlciBzdGF0dXNcbiAgICAgICAgc2NvcGUuZ2V0cGluZyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBBcHBDYWxsLmdldCAoc2NvcGUucGx1Z2luLCBcInBpbmdcIiwgey8qcXVlcnkqL30sZnVuY3Rpb24oanJlc3AsIGVycmNvZGUpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXJyY29kZSAhPT0gMjAwIHx8IGpyZXNwLnJlcXVlc3Quc3RhdHVzICE9PSBcInN1Y2Nlc3NcIikge1xuICAgICAgICAgICAgICAgICAgICBOb3RpZmljYXRpb24ud2FybmluZyAoe21lc3NhZ2U6IGpyZXNwLnJlcXVlc3QuaW5mbywgZGVsYXk6IDUwMDB9KTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUub2ZmbGluZSgpOyBcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyByZXN0YXJ0IGEgbmV3IHRpbWVyIGZvciBuZXh0IHBpbmdcbiAgICAgICAgICAgICAgICAkdGltZW91dCAoc2NvcGUuZ2V0cGluZywgQXBwQ29uZmlnLnNlc3Npb24ucGluZ3JhdGUqMTAwMCk7XG4gICAgICAgICAgICB9LCBzY29wZS5vbmVycm9yKTtcbiAgICAgICAgfTtcbiAgICAgICAgXG4gICAgICAgIC8vIENoZWNrIEJpbmRlciBzdGF0dXNcbiAgICAgICAgc2NvcGUucmVmcmVzaCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBBcHBDYWxsLmdldCAoc2NvcGUucGx1Z2luLCBcInJlZnJlc2hcIiwgey8qcXVlcnkqL30sIGZ1bmN0aW9uKGpyZXNwLCBlcnJjb2RlKSB7XG5cbiAgICAgICAgICAgICAgICBzY29wZS5vbnN1Y2Nlc3MgKGpyZXNwLCBlcnJjb2RlKTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAvLyByZXN0YXJ0IGEgbmV3IHRpbWVyIGZvciBuZXh0IHJlZnJlc2hcbiAgICAgICAgICAgICAgICAkdGltZW91dCAoc2NvcGUucmVmcmVzaCwgQXBwQ29uZmlnLnNlc3Npb24udGltZW91dCAqMjUwKTtcbiAgICAgICAgICAgIH0sIHNjb3BlLm9uZXJyb3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biAoKSB7XG4gICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgdmFyIHRtcGwgPSAnPGRpdiBjbGFzcz1cInRpcC1tb2RhbC1wb3B1cFwiPicgK1xuICAgICAgICAgICAgJzxpIGNsYXNzPVwie3tpY29ufX1cIj48L2k+JyArXG4gICAgICAgICAgICAnPHNwYW4+e3t0aXB9fTwvc3Bhbj4nICtcbiAgICAgICAgICAgICc8L3NwYW4+PC9kaXY+JyA7XG5cbiAgICBhbmd1bGFyLm1vZHVsZSgnTW9kYWxOb3RpZmljYXRpb24nLCBbXSlcbiAgICAgICAgICAgIC5kaXJlY3RpdmUoJ3RpcE1vZGFsJywgW1wiJHRpbWVvdXRcIiwgZnVuY3Rpb24gKCR0aW1lb3V0KSB7XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBteW1ldGhvZHMoc2NvcGUsIGVsZW0sIGF0dHJzKSB7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudCA9IGVsZW0ucGFyZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZGFsICAgID0gZWxlbS5maW5kKFwiZGl2XCIpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gZGVsYXkgdGlwIGRpc3BsYXkgdG8gYXZvaWQgYmxpbmtpbmcgd2hlbiBtb3ZpbmcgbW91c2UgZmFzdFxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBkaXNwbGF5ICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFjdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLnNob3cpIHNjb3BlLm1vZGFsLmNzcyh7b3BhY2l0eTogMSwgdmlzaWJpbGl0eTondmlzaWJsZSd9KTsgIFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuc2hvdyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS50aW1lb3V0ID0gJHRpbWVvdXQoYWN0aW9uLCBzY29wZS5kZWxheSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNsb3NlICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICBzY29wZS5zaG93ID0gZmFsc2U7ICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kYWwuY3NzKHtvcGFjaXR5OiAwLCB2aXNpYmlsaXR5OidoaWRkZW4nfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG5cbiAgICAgICAgICAgICAgICAgICAgLy8gYWp1c3QgaWNvbiBvciB1c2UgZGVmYXVsdFxuICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uICA9IGF0dHJzLmljb24gfHwgJ2ZpLWxpZ2h0YnVsYic7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgUGFyZW50IGVsZW1lbnQgdG8gZ2V0IG1vdXNlIGV2ZW50XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5hZGRDbGFzcyAoJ2FzLW1vZGFsLXRpcCcpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnY2xpY2snLCBjbG9zZSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdmb2N1cycsIGRpc3BsYXkpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnbW91c2VvdmVyJywgZGlzcGxheSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdtb3VzZWxlYXZlJywgY2xvc2UpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYX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ICAgICAgICAgICAgICAgICAgICBzY29wZS5jbGlja2VkID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWF0dHJzLnF1ZXJ5KSAkbG9jYXRpb24ucGF0aChhdHRycy5ocmVmKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgJGxvY2F0aW9uLnBhdGgoYXR0cnMuaHJlZikuc2VhcmNoKGF0dHJzLnF1ZXJ5KTtcbiAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBhanVzdCBpY29uIG9yIHVzZSBkZWZhdWx0XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmljb24gPSBhdHRycy5pY29uICAgfHwgJ2ZpLWxpbmsnO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IGF0dHJzLmxhYmVsIHx8ICdKdW1wJztcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaHJlZiAgPSBhdHRycy5ocmVmICB8fCAnL2hvbWUnO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gYWRkIGxhYmVsIGFzIGNsYXNzXG4gICAgICAgICAgICAgICAgICAgIGVsZW0uYWRkQ2xhc3MgKHNjb3BlLmxhYmVsLnRvTG93ZXJDYXNlKCkpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RyaWN0OiAnRScsXG4gICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiB0bXBsLFxuICAgICAgICAgICAgICAgICAgICBsaW5rOiBteW1ldGhvZHMsXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlOiB7fVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XSk7XG59KSgpO1xuIiwiXG4vKiBcbiAqIENvcHlyaWdodCAoQykgMjAxNSBcIklvV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Bsb2FkIGlzIGRlbGVnYXRlZCB0byBhIHNoYXJlZCBmdW5jdGlvblxuICAgICAgICBzY29wZS5VcExvYWRGaWxlPWZ1bmN0aW9uIChmaWxlcykge1xuICAgICAgICAgICAgdmFyIGhhbmRsZTsgXG4gICAgICAgICAgICB2YXIgYXBwaWNvbjtcbiAgICAgICAgICAgIHZhciB0ZW1wbGF0ZTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIHN1Y2Nlc3MgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAvLyBUaGlzIExvb2tzIE9LIGxldCdzIFBvc3QgWGZvcm0vRmlsZVxuICAgICAgICAgICAgICAgIGhhbmRsZS5wb3N0ZmlsZShhdHRycy5wb3N0dXJsICsgXCI/dG9rZW49XCIgKyBBcHBDb25maWcuc2Vzc2lvbi50b2tlbik7XG5cbiAgICAgICAgICAgICAgICBzY29wZS5tb2RhbC5kZWFjdGl2YXRlKCk7XG4gICAgICAgICAgICAgICAgJHRpbWVvdXQgKGZ1bmN0aW9uKCkge3Njb3BlLm1vZGFsLmRlc3Ryb3koKTt9LCAxMDAwKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciBhYmFuZG9uID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgc2NvcGUubW9kYWwuZGVhY3RpdmF0ZSgpO1xuICAgICAgICAgICAgICAgICR0aW1lb3V0IChmdW5jdGlvbigpIHtzY29wZS5tb2RhbC5kZXN0cm95KCk7fSwgMTAwMCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciByZWFkZXJDQiA9IGZ1bmN0aW9uICh1cGxvYWQpIHtcbiAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIC8vIEZpbGUgdXBsb2FkIGZhaWwgaGFuZGxlIGVycm9yXG4gICAgICAgICAgICAgICAgaWYgKCEgdXBsb2FkKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChoYW5kbGUuZmlsZS5zaXplID4gc2NvcGUubWF4c2l6ZSoxMDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBpY29uID0gc2NvcGUuaXN0b29iaWc7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZT0gdG1wbEVycm9yO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICBpZiAoaXNOYU4oaGFuZGxlLmZpbGUuc2l6ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGljb24gPSBzY29wZS5pc25vdHZhbGlkOyBcbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlPSB0bXBsRXJyb3I7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgICAgIHZhciB6aXBhcHAgPSBuZXcgSlNaaXAgKHVwbG9hZC50YXJnZXQucmVzdWx0KTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRodW1ibmFpbCA9IHppcGFwcC5maWxlKFwiaWNvbl8xMjgucG5nXCIpO1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIENoZWNrIGlzIHdlIGhhdmUgYSB0aHVtYm5haWwgd2l0aGluIGxvYWRlZCBaaXBmaWxlXG4gICAgICAgICAgICAgICAgICAgIGlmICghdGh1bWJuYWlsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyAoXCJUaGlzIGlzIG5vdCBhIHZhbGlkIEFwcGxpY2F0aW9uIEZyYW1ld29yayBBUFBcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBpY29uID0gc2NvcGUuaXNub3R2YWxpZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlPSB0bXBsRXJyb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vc2NvcGUuaW1nRWxlbVswXS5zcmMgPSB3aW5kb3cuVVJMLmNyZWF0ZU9iamVjdFVSTChuZXcgQmxvYihbdGh1bWJuYWlsLmFzQXJyYXlCdWZmZXIoKV0sIHt0eXBlOiBcImltYWdlXCJ9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBpY29uID0gd2luZG93LlVSTC5jcmVhdGVPYmplY3RVUkwobmV3IEJsb2IoW3RodW1ibmFpbC5hc0FycmF5QnVmZmVyKCldLCB7dHlwZTogXCJpbWFnZVwifSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGUgPSB0bXBsTW9kYWw7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gcmVmZXJlbmNlIGh0dHA6Ly9mb3VuZGF0aW9uLnp1cmIuY29tL2FwcHMvZG9jcy8jIS9hbmd1bGFyLW1vZHVsZXNcbiAgICAgICAgICAgICAgICB2YXIgY29uZmlnID0ge1xuICAgICAgICAgICAgICAgICAgICBhbmltYXRpb25JbjogJ3NsaWRlSW5Gcm9tVG9wJyxcbiAgICAgICAgICAgICAgICAgICAgY29udGVudFNjb3BlOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdWNjZXNzIDogc3VjY2VzcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFiYW5kb24gOiBhYmFuZG9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbiAgICA6IGFwcGljb24sXG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBuYW1lIDogaGFuZGxlLmJhc2VuYW1lXG4gICAgICAgICAgICAgICAgICAgIH0sIHRlbXBsYXRlIDogdGVtcGxhdGVcbiAgICAgICAgICAgICA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aGVkIGFueW1vcmVcbiAgICAgICAgIHNjb3BlLnBhcmVudC5yZW1vdmVDbGFzcyAoXCJuZy1wcmlzdGluZVwiKTtcblxuICAgICAgICAgLy8gaWYgdmFsdWUgbm90IG51bGwgY2xlYW4gdXAgc3RyaW5nXG4gICAgICAgICBpZiAoc2NvcGUudmFsdWUpIHtcbiAgICAgICAgICAgICBzY29wZS5lcnJvcj1mYWxzZTsgXG4gICAgICAgICAgICAvLyByZW1vdmUgbGVhZGluZyBhbmQgdHJhaWxsaW5nIHNwYWNlXG4gICAgICAgICAgICBzY29wZS52YWx1ZSA9IHNjb3BlLnZhbHVlLnRyaW0oKTtcbiAgICAgICAgIFxuICAgICAgICAgICAgLy8gcmVtb3ZlIGFueSBzcGFjZSBpcyBub3QgYWxsb3dlZFxuICAgICAgICAgICAgaWYgKCdub3NwYWNlJyBpbiBhdHRycykge1xuICAgICAgICAgICAgICAgc2NvcGUudmFsdWU9c2NvcGUudmFsdWUucmVwbGFjZSgvXFxzL2csICcnKTsgICAgXG4gICAgICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgICAgIGlmICgnbG93ZXJjYXNlJyBpbiBhdHRycykge1xuICAgICAgICAgICAgICAgc2NvcGUudmFsdWUgPSBzY29wZS52YWx1ZS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgXG4gICAgICAgICAgICAvLyBjaGVjayBtaW5pbXVtIGxlbmdodFxuICAgICAgICAgICAgaWYgKFwibWlubGVuXCIgaW4gYXR0cnMpIHtcbiAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlLmxlbmd0aCA8IGF0dHJzLm1pbmxlbikge1xuICAgICAgICAgICAgICAgICBzY29wZS5zdGF0dXM9J2ludmFsaWQnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9c2NvcGUubmFtZSArICc6IE1pbmludW0gTGVuZ2g9ICcgKyBhdHRycy5taW5sZW4gKyAnIENoYXJhY3RlcnMnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJvcj10cnVlO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmICgnZW1haWwnIGluIGF0dHJzKSB7XG4gICAgICAgICAgICBpZiAoIWVtYWlscGF0ZXJuLnRlc3QgKHNjb3BlLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgIHNjb3BlLnN0YXR1cz0naW52YWxpZCc7XG4gICAgICAgICAgICAgICAgc2NvcGUuZXJybXNnPSdpbnZhbGlkIGVtYWlsIGFkZHJlc3MnO1xuICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChzY29wZS5yZXF1aXJlZCkge1xuICAgICAgICAgICAgICAgICBzY29wZS5zdGF0dXM9J2ludmFsaWQnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9c2NvcGUubmFtZSArICc6IFJlcXVpcmVkIEF0dHJpYnV0ZSc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7IFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgIC8vIElmIGxvY2FsIGNvbnRyb2wgZmFpbCBsZXQncyByZWZ1c2UgaW5wdXRcbiAgICAgICAgIGlmIChzY29wZS5lcnJvcikge1xuICAgICAgICAgICAgIGlmIChzY29wZS5yZXF1aXJlZCAmJiBzY29wZS52YWxpZCkge1xuICAgICAgICAgICAgICAgICBzY29wZS52YWxpZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICBpZiAoc2NvcGUubDRhY291bnRlci52YWxpZGF0ZWQgPiAwKSBzY29wZS5sNGFjb3VudGVyLnZhbGlkYXRlZCAtLTtcbiAgICAgICAgICAgICB9IFxuICAgICAgICAgICAgIC8vIH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FkZCBsYWJlbCBhcyBjbGFzc1xuICAgICAgICAgICAgICAgICAgICBlbGVtLmFkZENsYXNzIChzY29wZS5sYWJlbC50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIG5vdGU6IGNsaWNrZWQgaW4gaW1wb3J0ZWQgYW5kIHdoZW4gdGVtcGxhdGUgaXMgY2xpY2tlZFxuICAgICAgICAgICAgICAgICAgICAvLyBpdCB3aWxsIGNhbGwgY2xpY2tlZCBtZXRob2QgcGFzc2VkIGluIHBhcmFtLlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICByZXN0cmljdDogJ0UnLFxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogdG1wbCxcbiAgICAgICAgICAgICAgICAgICAgbGluazogbXltZXRob2RzLFxuICAgICAgICAgICAgICAgICAgICBzY29wZToge2NsaWNrZWQgOiAnPSd9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0pO1xufSkoKTtcbiIsIi8qIFxuICogQ29weXJpZ2h0IChDKSAyMDE1IFwiSW9ULmJ6aFwiXG4gKiBBdXRob3IgXCJGdWx1cCBBciBGb2xsXCJcbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeVxuICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnlcbiAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlIExpY2Vuc2UsIG9yXG4gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLlx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kZSAgID0gdXJscXVlcnkucnVubW9kZSB8fCBcImF1dG9cIjtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuY2xpY2tlZCA9IGZ1bmN0aW9uICgpIHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5vdGlmeUVycm9yID0gZnVuY3Rpb24oYWN0aW9uLCBqcmVzcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5vdGlmaWNhdGlvbi5lcnJvciAoe21lc3NhZ2U6IFwiRmFpbCAvYXBpL2FmbS1tYWluXCIgKyBhY3Rpb24gKyBcIj1cIiArIHNjb3BlLmxhYmVsICsgXCIgUnVuSUQ9XCIrIHNjb3BlLmFwcElELCBkZWxheTogNTAwMH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW0uYWRkQ2xhc3MgKFwiZmFpbFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtLnJlbW92ZUNsYXNzIChcInN1Y2Nlc3NcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuY2FsbGJhY2sgKHNjb3BlLmFwcElELCBhY3Rpb24sIGpyZXNwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBub3RpZnlTdWNjZXNzID0gZnVuY3Rpb24gKGFjdGlvbiwganJlc3ApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtLnJlbW92ZUNsYXNzIChcImZhaWxcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUucnVuSUQgPSBqcmVzcC5yZXNwb25zZS5ydW5pZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5jYWxsYmFjayAoc2NvcGUuYXBwSUQsIGFjdGlvbiwganJlc3ApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNsb3NlTW9kQXBwID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kQXBwLmRlYWN0aXZhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGltZW91dCAoZnVuY3Rpb24oKSB7c2NvcGUubW9kQXBwLmRlc3Ryb3koKTt9LCAxMDAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjbG9zZU1vZEluZm8gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5tb2RJbmZvLmRlYWN0aXZhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGltZW91dCAoZnVuY3Rpb24oKSB7c2NvcGUubW9kSW5mby5kZXN0cm95KCk7fSwgMTAwMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgYWN0aW9uTW9kYWwgPSBmdW5jdGlvbihhY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyAoXCJNb2RhbCBBY3Rpb249JXNcIiwgYWN0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGFjdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInN0YXJ0XCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2NvcGUucnVuc3RhdHVzICE9PSBcInN0b3BcIikgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQXBwQ2FsbC5nZXQgKFwiYWZtLW1haW5cIiwgXCJzdGFydFwiLCB7aWQ6IHNjb3BlLmFwcElELCBtb2RlOiBzY29wZS5ydW5tb2RlfSwgZnVuY3Rpb24oanJlc3AsIGVycmNvZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyY29kZSAhPT0gMjAwIHx8IGpyZXNwLmp0eXBlICE9PSBcImFmYi1yZXBseVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeUVycm9yIChcInN0YXJ0XCIsIGpyZXNwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5ydW5zdGF0dXM9XCJzdGFydFwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeVN1Y2Nlc3MgKGFjdGlvbiwganJlc3ApO1xuXHRcdFx0XHRcdGlmKGpyZXNwLnJlc3BvbnNlLnVyaSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUud2luYXBwPSAkd2luZG93Lm9wZW4oanJlc3AucmVzcG9uc2UudXJpLnJlcGxhY2UoXCIlaFwiLCAkbG9jYXRpb24uaG9zdCgpKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInN0b3BcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY29wZS5ydW5zdGF0dXMgIT09IFwic3RhcnRcIikgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJhZm0tbWFpblwiLCBcInRlcm1pbmF0ZVwiLCB7cnVuaWQ6IHNjb3BlLnJ1bklEfSwgZnVuY3Rpb24oanJlc3AsIGVycmNvZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyY29kZSAhPT0gMjAwIHx8IGpyZXNwLmp0eXBlICE9PSBcImFmYi1yZXBseVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeUVycm9yIChcInN0b3BcIiwganJlc3ApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLnJ1bnN0YXR1cz1cInN0b3BcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpZiBhIHJlbW90ZSB3aW5kb3cgYXBwIHdhcyBvcGVuIGxldCdzIGNsb3NlIGl0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLndpbmFwcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIkNsb3NpbmcgQXBwbGljYXRpb24gV2luZG93IGxhYmVsPSVzIGlkPSVzXCIsIHNjb3BlLmxhYmVsLCBzY29wZS5hcHBJRCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUud2luYXBwLmNsb3NlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUud2luYXBwPWZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3RpZnlTdWNjZXNzIChhY3Rpb24sIGpyZXNwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJpbmZvXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJhZm0tbWFpblwiLCBcImRldGFpbFwiLCB7aWQ6IHNjb3BlLmFwcElEfSwgZnVuY3Rpb24oanJlc3AsIGVycmNvZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyY29kZSAhPT0gMjAwIHx8IGpyZXNwLmp0eXBlICE9PSBcImFmYi1yZXBseVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeUVycm9yIChcImRldGFpbFwiLCBqcmVzcCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVmZXJlbmNlIGh0dHA6Ly9mb3VuZGF0aW9uLnp1cmIuY29tL2FwcHMvZG9jcy8jIS9hbmd1bGFyLW1vZHVsZXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29uZmlnID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb25JbjogJ3NsaWRlSW5Gcm9tVG9wJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudFNjb3BlOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZSAgIDogY2xvc2VNb2RJbmZvLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbiAgICA6IHNjb3BlLmljb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbCAgIDogc2NvcGUuYXBwSUQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXRhaWwgIDoganJlc3AucmVzcG9uc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgdGVtcGxhdGUgOiB0bXBsRGV0YWlsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gUG9wdXAgTW9kYWwgdG8gcmVuZGVyIGFwcGxpY2F0aW9uIGRhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5tb2RJbmZvID0gbmV3IE1vZGFsRmFjdG9yeShjb25maWcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZEluZm8uYWN0aXZhdGUgKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcInVuaW5zdGFsbFwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLnJ1bnN0YXR1cyAhPT0gXCJzdG9wXCIpIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFwcENhbGwuZ2V0IChcImFmbS1tYWluXCIsIFwidW5pbnN0YWxsXCIsIHtpZDogc2NvcGUuYXBwSUR9LCBmdW5jdGlvbihqcmVzcCwgZXJyY29kZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcnJjb2RlICE9PSAyMDAgfHwganJlc3AuanR5cGUgIT09IFwiYWZiLXJlcGx5XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90aWZ5RXJyb3IgKFwidW5pbnN0YWxsXCIsIGpyZXNwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3RpZnlTdWNjZXNzIChhY3Rpb24sIGpyZXNwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIkFjdGlvbk1vZGFsIHVua25vd24gYWN0aW9uPVslc11cIiwgYWN0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZU1vZEFwcCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVmZXJlbmNlIGh0dHA6Ly9mb3VuZGF0aW9uLnp1cmIuY29tL2FwcHMvZG9jcy8jIS9hbmd1bGFyLW1vZHVsZXNcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjb25maWcgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uSW46ICdzbGlkZUluRnJvbVRvcCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudFNjb3BlOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbiAgIDogYWN0aW9uTW9kYWwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bnN0YXR1czogc2NvcGUucnVuc3RhdHVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZSAgICA6IGNsb3NlTW9kQXBwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uICAgICA6IHNjb3BlLmljb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsICAgIDogc2NvcGUubGFiZWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB0ZW1wbGF0ZSAgOiB0bXBsTW9kYWxcbiAgICAgICAgICAgICAgICAgICAgICAgIH07IFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gUG9wdXAgTW9kYWwgdG8gcmVuZGVyIGFwcGxpY2F0aW9uIGRhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZEFwcCA9IG5ldyBNb2RhbEZhY3RvcnkoY29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZEFwcC5hY3RpdmF0ZSAoKTtcbiAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBleHRyYWN0IGFwcGxpY2F0aW9uIGluZm9ybWF0aW9uIGZyb20gQXBwSUQrU3RvcmVcbiAgICAgICAgICAgICAgICAgICAgaWYgKGF0dHJzLmhhbmRsZSAmJiBzY29wZS5zdG9yZSBbYXR0cnMuaGFuZGxlXS5uYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uICA9IEFwcENvbmZpZy5wYXRocy5pY29ucyArIGF0dHJzLmhhbmRsZTsgLy9zY29wZS5zdG9yZSBbYXR0cnMuaGFuZGxlXS5uYW1lLnRvTG93ZXJDYXNlKCkgKyAnLWljby5wbmcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubGFiZWwgPSBzY29wZS5zdG9yZSBbYXR0cnMuaGFuZGxlXS5uYW1lO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuYXBwSUQ9IGF0dHJzLmhhbmRsZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uICA9IEFwcENvbmZpZy5wYXRocy5pY29ucyArICd3M2MtaWNvLnBuZyc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubGFiZWwgPSBhdHRycy5oYW5kbGU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIGFkZCBsYWJlbCBhcyBjbGFzc1xuICAgICAgICAgICAgICAgICAgICBlbGVtLmFkZENsYXNzIChzY29wZS5sYWJlbC50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICA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cgKFwiRGFzaGJvYXJkIEdldFJ1bm5hYmxlc1wiKTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgQXBwQ2FsbC5nZXQgKFwiYWZtLW1haW5cIiwgXCJydW5uYWJsZXNcIiwgey8qcXVlcnkqL30sIGZ1bmN0aW9uKGpyZXNwLCBlcnJjb2RlKSB7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gdXBkYXRlIGRlYnVnIFVJIHpvbmVcbiAgICAgICAgICAgICAgICBzY29wZS5yZXF1ZXN0ICA9IFwiL2FwaS9hZm0tbWFpbi9ydW5uYWJsZVwiOyBcbiAgICAgICAgICAgICAgICBzY29wZS5yZXNwb25zZSA9IGpyZXNwLnJlc3BvbnNlO1xuICAgICAgICAgICAgICAgIHNjb3BlLmVycmNvZGUgID0ganJlc3AucmVxdWVzdC5zdGF0dXM7XG5cbiAgICAgICAgICAgICAgICAvLyBDaGVjayBpZiB0aGlzIGlzIGEgcmVzcG9uc2UgZnJvbSBBR0wgYXBwbGljYXRpb24gZnJhbWV3b3JrIGJpbmRlclxuICAgICAgICAgICAgICAgIGlmIChqcmVzcC5qdHlwZSAhPT0gXCJhZmItcmVwbHlcIikge1xuICAgICAgICAgICAgICAgICAgTm90aWZpY2F0aW9uLmVycm9yICh7bWVzc2FnZTogXCJJbnZhbGlkIFJlc3BvbmQgdG8gL29wYS9hZm0tbWFpbi9ydW5uYWJsZSByZXNwb25zZS5kYXRhPVwiK3Jlc3BvbnNlLmRhdGEsIGRlbGF5OiA1MDAwfSk7IFxuICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIENoZWNrIGZvciBzdWNjZXNzXG4gICAgICAgICAgICAgICAgaWYgKGpyZXNwLnJlcXVlc3Quc3RhdHVzICE9PSBcInN1Y2Nlc3NcIikge1xuICAgICAgICAgICAgICAgICAgICBOb3RpZmljYXRpb24uZXJyb3IgKHttZXNzYWdlOiBcImFmbS1tYWluL3J1bm5hYmxlXCIgKyBqcmVzcC5yZXF1ZXN0LmluZm8sIGRlbGF5OiA1MDAwfSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIC8vIGxvb3Agb24gcnVubmFibGUgYXBwbGljYXRpb24gdG8gcHJlcGFyZSBmb3IgZGlzcGxheVxuICAgICAgICAgICAgICAgIHZhciAgYXBwbGlJRHM9W107XG4gICAgICAgICAgICAgICAgdmFyICBydW5uYWJsZXMgPSBqcmVzcC5yZXNwb25zZS5ydW5uYWJsZXM7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaWR4PTA7IGlkeCA8IHJ1bm5hYmxlcy5sZW5ndGg7IGlkeCArKykge1xuICAgICAgICAgICAgICAgICAgICBhcHBsaUlEc1tpZHhdID0gcnVubmFibGVzIFtpZHhdLmlkO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5hcHBsaVN0b3JlIFtydW5uYWJsZXMgW2lkeF0uaWRdID0gIHJ1bm5hYmxlcyBbaWR4XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2NvcGUuYXBwbGlJRHMgPSBhcHBsaUlEczsgLy8gYXZvaWQgcGFydGlhbCB1cGRhdGUgdG8gbGltaXQgVUkgcmVmcmVzaFxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgfSk7ICAgICAgICAgICAgXG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICBzY29wZS5GaWxlVXBsb2FkZWQgPSBmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nIChcImZpbGUgVXBsb2FkZWRcIik7XG4gICAgICAgICAgICAvLyBDYW5ub3QgZGlzcGxheSBwb3N0IHJlc3VsdHMgYXMgR2V0UnVubmFibGUgd2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aW9uICgpIHtcblxuICAgICAgICAgICAgICAgIHZhciBGaW5kSW5QYXJlbnQgPSBmdW5jdGlvbiAoZWxlbWVudCwgc2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBhcmVudCA9IGVsZW1lbnQ7XG4gICAgICAgICAgICAgICAgICAgIHZhciBzZWFyY2ggPSBzZWxlY3Rvci50b1VwcGVyQ2FzZSgpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAocGFyZW50WzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VhcmNoID09PSBwYXJlbnRbMF0udGFnTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwYXJlbnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9ICAvLyBIVE1MRGl2RWxlbWVudCBwcm9wZXJ0aWVzXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnQgPSBwYXJlbnQucGFyZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciAgRmluZEJ5VGFnPSBmdW5jdGlvbiAoZWxlbWVudCwgdGFnLCBzZWxlY3Rvcikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHR5cGUgICA9IHRhZy50b0xvd2VyQ2FzZSgpKyBcIk5hbWVcIjtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNoaWxkcmVuID0gZWxlbWVudC5jaGlsZHJlbigpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hpbGRyZW5bMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWFyY2ggPT09IGNoaWxkcmVuWzBdW3R5cGVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoaWxkcmVuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW4gPSBjaGlsZHJlbi5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciAgRmluZEJ5Q2xhc3M9IGZ1bmN0aW9uIChlbGVtZW50LCBzZWxlY3Rvcikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNoaWxkcmVuID0gZWxlbWVudC5jaGlsZHJlbigpO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoY2hpbGRyZW5bMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjaGlsZHJlbi5oYXNDbGFzcyhzZWFyY2gpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoaWxkcmVuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW4gPSBjaGlsZHJlbi5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgdmFyIG15TWV0aG9kcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgRmluZEluUGFyZW50OiBGaW5kSW5QYXJlbnQsXG4gICAgICAgICAgICAgICAgICAgIEZpbmRCeVRhZzogRmluZEJ5VGFnLFxuICAgICAgICAgICAgICAgICAgICBGaW5kQnlDbGFzczogRmluZEJ5Q2xhc3NcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgcmV0dXJ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ICBpY29ucyA6ICcvaWNvbnMvJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF2YXRhcjogJ2ltYWdlcy9hdmF0YXJzLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdWRpbyA6ICdpbWFnZXMvYXVkaW8vJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGxpIDogJ2ltYWdlcy9hcHBsaS8nXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHNlc3Npb246IHsgLy8gVGhvc2UgZGF0YSBhcmUgdXBkYXRlZCBieSBzZXNzaW9uIHNlcnZpY2VcbiAgICAgICAgICAgICAgICAgICAgICAgaW5pdGlhbCA6IHVybHF1ZXJ5LnRva2VuIHx8ICcxMjM0NTY3ODknLCAgLy8gdHlwaWNhbCBkZXYgaW5pdGlhbCB0b2tlblxuICAgICAgICAgICAgICAgICAgICAgICB0aW1lb3V0IDogMzYwMCwgICAgICAgICAvLyB0aW1lb3V0IGlzIHVwZGF0ZWQgY2xpZW50IHNlc3NpbiBjb250ZXh0IGNyZWF0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgIHBpbmdyYXRlOiAxNSwgICAgICAgICAgIC8vIFBpbmcgcmF0ZSB0byBjaGVjayBpZiBzZXJ2ZXIgaXMgc3RpbGwgYWxpdmVcbiAgICAgICAgICAgICAgICAgICAgICAgdXVpZCAgICA6ICcnLCAgICAgICAgICAgLy8gdXVpZCBtYXAgd2l0aCBjb29raWUgb3IgbG9uZyB0ZXJtIHNlc3Npb24gYWNjZXNzIGtleVxuICAgICAgICAgICAgICAgICAgICAgICB0b2tlbiAgIDogJycgICAgICAgICAgICAvLyB3aWxsIGJlIHJldHVybmVkIGZyb20gYXV0aGVudGljYXRpb24gICAgXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG15Q29uZmlnO1xuICAgICAgICAgICAgfV0pXG5cbiAgICAgICAgICAgLy8gRmFjdG9yeSBpcyBhIHNpbmdsZXRvbiBhbmQgc2hhcmUgaXRzIGNvbnRleHQgd2l0aGluIGFsbCBpbnN0YW5jZXMuXG4gICAgICAgICAgICAuZmFjdG9yeSgnQXBwQ2FsbCcsIFtcIiRodHRwXCIsIFwiQXBwQ29uZmlnXCIsIFwiJGxvZ1wiLCBmdW5jdGlvbiAoJGh0dHAsIEFwcENvbmZpZywgJGxvZykge1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciBteUNhbGxzID0ge1xuICAgICAgICAgICAgICAgICAgICBnZXQgOiBmdW5jdGlvbihwbHVnaW4sIGFjdGlvbiwgcXVlcnksIGNicmVzcG9uc2UsIGNiZXJyb3IpIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9uZXJyb3IgPSBmdW5jdGlvbihyZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjYmVycm9yKSBjYmVycm9yKHJlc3BvbnNlLmRhdGEsIHJlc3BvbnNlLnN0YXR1cywgcmVzcG9uc2UuY29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGNicmVzcG9uc2UocmVzcG9uc2UuZGF0YSwgcmVzcG9uc2Uuc3RhdHVzLCByZXNwb25zZS5jb25maWcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9uc3VjY2VzcyA9ZnVuY3Rpb24ocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXJlc3BvbnNlLmRhdGEgfHwgIXJlc3BvbnNlLmRhdGEucmVxdWVzdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmVycm9yIChyZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlcXVlc3Q9cmVzcG9uc2UuZGF0YS5yZXF1ZXN0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIHRva2VuIHdhcyB1cGRhdGVkIGtlZXAgaXQgd2l0aGluIGFwcGxpY2F0aW9uIGNhY2hlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlcXVlc3QudG9rZW4pIEFwcENvbmZpZy5zZXNzaW9uLnRva2VuID0gcmVxdWVzdC50b2tlbjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVxdWVzdC51dWlkKSAgQXBwQ29uZmlnLnNlc3Npb24udXVpZCAgPSByZXF1ZXN0LnV1aWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlcXVlc3QudGltZW91dCkgQXBwQ29uZmlnLnNlc3Npb24udGltZW91dCA9IHJlcXVlc3QudGltZW91dDtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNicmVzcG9uc2UocmVzcG9uc2UuZGF0YSwgcmVzcG9uc2Uuc3RhdHVzLCByZXNwb25zZS5jb25maWcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXF1ZXJ5LnRva2VuKSBxdWVyeS50b2tlbiA9IEFwcENvbmZpZy5zZX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