/* Minification failed. Returning unminified contents. (180,501-508): run-time error JS1019: Can't have 'break' outside of loop: break a */ /* AngularJS v1.7.2 (c) 2010-2018 Google, Inc. http://angularjs.org License: MIT */ (function(D){'use strict';function qe(a){if(G(a))u(a.objectMaxDepth)&&(Wb.objectMaxDepth=Xb(a.objectMaxDepth)?a.objectMaxDepth:NaN),u(a.urlErrorParamsEnabled)&&Ga(a.urlErrorParamsEnabled)&&(Wb.urlErrorParamsEnabled=a.urlErrorParamsEnabled);else return Wb}function Xb(a){return aa(a)&&0c)return"...";var d=b.$$hashKey,f;if(F(a)){f=0;for(var g=a.length;f").append(a).html();try{return a[0].nodeType===Ma?O(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+O(b)})}catch(d){return O(b)}}function Uc(a){try{return decodeURIComponent(a)}catch(b){}}function gc(a){var b={};q((a||"").split("&"), function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=Uc(e),u(e)&&(f=u(f)?Uc(f):!0,sa.call(b,e)?F(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function hc(a){var b=[];q(a,function(a,c){F(a)?q(a,function(a){b.push(ka(c,!0)+(!0===a?"":"="+ka(a,!0)))}):b.push(ka(c,!0)+(!0===a?"":"="+ka(a,!0)))});return b.length?b.join("&"):""}function gb(a){return ka(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ka(a, b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function xe(a,b){var d,c,e=Ia.length;for(c=0;c protocol indicates an extension, document.location.href does not match."))}function Vc(a,b,d){G(d)||(d={});d=P({strictDi:!1},d);var c=function(){a=y(a);if(a.injector()){var c=a[0]===D.document?"document":Aa(a);throw Ha("btstrpd",c.replace(//,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider", function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=hb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;D&&e.test(D.name)&&(d.debugInfoEnabled=!0,D.name=D.name.replace(e,""));if(D&&!f.test(D.name))return c();D.name=D.name.replace(f,"");fa.resumeBootstrap=function(a){q(a,function(a){b.push(a)});return c()};z(fa.resumeDeferredBootstrap)&& fa.resumeDeferredBootstrap()}function Ae(){D.name="NG_ENABLE_DEBUG_INFO!"+D.name;D.location.reload()}function Be(a){a=fa.element(a).injector();if(!a)throw Ha("test");return a.get("$$testability")}function Wc(a,b){b=b||"_";return a.replace(Ce,function(a,c){return(c?b:"")+a.toLowerCase()})}function De(){var a;if(!Xc){var b=sb();(tb=v(b)?D.jQuery:b?D[b]:void 0)&&tb.fn.on?(y=tb,P(tb.fn,{scope:Sa.scope,isolateScope:Sa.isolateScope,controller:Sa.controller,injector:Sa.injector,inheritedData:Sa.inheritedData})): y=W;a=y.cleanData;y.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=y._data(f).events)&&c.$destroy&&y(f).triggerHandler("$destroy");a(b)};fa.element=y;Xc=!0}}function ib(a,b,d){if(!a)throw Ha("areq",b||"?",d||"required");return a}function ub(a,b,d){d&&F(a)&&(a=a[a.length-1]);ib(z(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Na(a,b){if("hasOwnProperty"===a)throw Ha("badname",b);}function Ee(a,b,d){if(!b)return a;b=b.split("."); for(var c,e=a,f=b.length,g=0;g")+c[2];for(c=c[0];c--;)d=d.lastChild;f=eb(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";q(f,function(a){e.appendChild(a)});return e}function W(a){if(a instanceof W)return a;var b;B(a)&&(a=Q(a),b=!0);if(!(this instanceof W)){if(b&&"<"!==a.charAt(0))throw mc("nosel");return new W(a)}if(b){b=D.document;var d;a=(d=jg.exec(a))?[b.createElement(d[1])]: (d=fd(a,b))?d.childNodes:[];nc(this,a)}else z(a)?gd(a):nc(this,a)}function oc(a){return a.cloneNode(!0)}function Ab(a,b){!b&&kc(a)&&y.cleanData([a]);a.querySelectorAll&&y.cleanData(a.querySelectorAll("*"))}function hd(a){for(var b in a)return!1;return!0}function id(a){var b=a.ng339,d=b&&Oa[b],c=d&&d.events,d=d&&d.data;d&&!hd(d)||c&&!hd(c)||(delete Oa[b],a.ng339=void 0)}function jd(a,b,d,c){if(u(c))throw mc("offargs");var e=(c=Bb(a))&&c.events,f=c&&c.handle;if(f){if(b){var g=function(b){var c=e[b]; u(d)&&db(c||[],d);u(d)&&c&&0l&&this.remove(n.key);return b}},get:function(a){if(l";b=Ba.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function u(a,b){try{a.addClass(b)}catch(c){}}function N(a,b,c,d,e){a instanceof y||(a=y(a)); var f=Z(a,b,a,c,d,e);N.$$addScopeClass(a);var g=null;return function(b,c,d){if(!a)throw ba("multilink");ib(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ta(d)&&ga.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==g?y(ia(g,y("
").append(a).html())):c?Sa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller", k[l].instance);N.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);c||(a=f=null);return d}}function Z(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,n,E;if(H)for(E=Array(c.length),m=0;ms.priority)break;if(Z=s.scope)s.templateUrl||(G(Z)?($("new/isolated scope",w||H,s,I),w=s):$("new/isolated scope",w,s,I)),H=H||s;J=s.name;if(!u&&(s.replace&&(s.templateUrl||s.template)||s.transclude&& !s.$$tlb)){for(Z=x+1;u=a[Z++];)if(u.transclude&&!u.$$tlb||u.replace&&(u.templateUrl||u.template)){Pa=!0;break}u=!0}!s.templateUrl&&s.controller&&(C=C||U(),$("'"+J+"' controller",C[J],s,I),C[J]=s);if(Z=s.transclude)if(ma=!0,s.$$tlb||($("transclusion",t,s,I),t=s),"element"===Z)la=!0,n=s.priority,M=I,I=d.$$element=y(N.$$createComment(J,d[J])),b=I[0],ja(f,ya.call(M,0),b),Y=sc(Pa,M,e,n,g&&g.name,{nonTlbTranscludeDirective:t});else{var xa=U();if(G(Z)){M=D.document.createDocumentFragment();var O=U(),T=U(); q(Z,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;O[a]=b;xa[b]=null;T[b]=c});q(I.contents(),function(a){var b=O[wa(ta(a))];b?(T[b]=!0,xa[b]=xa[b]||D.document.createDocumentFragment(),xa[b].appendChild(a)):M.appendChild(a)});q(T,function(a,b){if(!a)throw ba("reqslot",b);});for(var X in xa)xa[X]&&(xa[X]=sc(Pa,xa[X].childNodes,e));M=M.childNodes}else M=y(oc(b)).contents();I.empty();Y=sc(Pa,M,e,void 0,void 0,{needsNewScope:s.$$isolateScope||s.$$newScope});Y.$$slots=xa}if(s.template)if(A= !0,$("template",R,s,I),R=s,Z=z(s.template)?s.template(I,d):s.template,Z=Ia(Z),s.replace){g=s;M=lc.test(Z)?sd(ia(s.templateNamespace,Q(Z))):[];b=M[0];if(1!==M.length||1!==b.nodeType)throw ba("tplrt",J,"");ja(f,I,b);B={$attr:{}};Z=rc(b,[],B);var fa=a.splice(x+1,a.length-(x+1));(w||H)&&da(Z,w,H);a=a.concat(Z).concat(fa);ea(d,B);B=a.length}else I.html(Z);if(s.templateUrl)A=!0,$("template",R,s,I),R=s,s.replace&&(g=s),p=ha(a.splice(x,a.length-x),I,d,f,ma&&Y,h,k,{controllerDirectives:C,newScopeDirective:H!== s&&H,newIsolateScopeDirective:w,templateDirective:R,nonTlbTranscludeDirective:t}),B=a.length;else if(s.compile)try{va=s.compile(I,d,Y);var ca=s.$$originalDirective||s;z(va)?m(null,Ra(ca,va),Ua,La):va&&m(Ra(ca,va.pre),Ra(ca,va.post),Ua,La)}catch(ga){c(ga,Aa(I))}s.terminal&&(p.terminal=!0,n=Math.max(n,s.priority))}p.scope=H&&!0===H.scope;p.transcludeOnThisElement=ma;p.templateOnThisElement=A;p.transclude=Y;l.hasElementTranscludeDirective=la;return p}function S(a,b,c,d){var e;if(B(b)){var f=b.match(l); b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e=g?c.inheritedData(h):c.data(h)}if(!e&&!f)throw ba("ctreq",b,a);}else if(F(b))for(e=[],g=0,f=b.length;gc.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=ac(c,{$$start:k,$$end:l}));if(!c.$$bindings){var H=m=c,E=c.name,C={isolateScope:null,bindToController:null};G(H.scope)&& (!0===H.bindToController?(C.bindToController=d(H.scope,E,!0),C.isolateScope={}):C.isolateScope=d(H.scope,E,!1));G(H.bindToController)&&(C.bindToController=d(H.bindToController,E,!0));if(C.bindToController&&!H.controller)throw ba("noctrl",E);m=m.$$bindings=C;G(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c);m=c}}return m}function X(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d"+b+"";return c.childNodes[0].childNodes;default:return b}}function na(a,b){if("srcdoc"===b)return R.HTML; var c=ta(a);if("src"===b||"ngSrc"===b)return-1===["img","video","audio","source","track"].indexOf(c)?R.RESOURCE_URL:R.MEDIA_URL;if("xlinkHref"===b)return"image"===c?R.MEDIA_URL:"a"===c?R.URL:R.RESOURCE_URL;if("form"===c&&"action"===b||"base"===c&&"href"===b||"link"===c&&"href"===b)return R.RESOURCE_URL;if("a"===c&&("href"===b||"ngHref"===b))return R.URL}function oa(a,c,d,e,f){var g=na(a,e),k=h[e]||f,l=b(d,!f,g,k);if(l){if("multiple"===e&&"select"===ta(a))throw ba("selmulti",Aa(a));if(m.test(e))throw ba("nodomevents"); c.push({priority:100,compile:function(){return{pre:function(a,c,f){c=f.$$observers||(f.$$observers=U());var h=f[e];h!==d&&(l=h&&b(h,!0,g,k),d=h);l&&(f[e]=l(a),(c[e]||(c[e]=[])).$$inter=!0,(f.$$observers&&f.$$observers[e].$$scope||a).$watch(l,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function ja(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===Ma&&""===d.nodeValue.trim())&&zg.call(a,b,1)}return a}function wg(a,b){if(b&&B(b))return b;if(B(a)){var d=vd.exec(a);if(d)return d[3]}}function Cf(){var a={};this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,d){Na(b,"controller");G(b)?P(a, b):a[b]=d};this.$get=["$injector",function(b){function d(a,b,d,g){if(!a||!G(a.$scope))throw L("$controller")("noscp",g,b);a.$scope[b]=d}return function(c,e,f,g){var k,h,l;f=!0===f;g&&B(g)&&(l=g);if(B(c)){g=c.match(vd);if(!g)throw wd("ctrlfmt",c);h=g[1];l=l||g[3];c=a.hasOwnProperty(h)?a[h]:Ee(e.$scope,h,!0);if(!c)throw wd("ctrlreg",h);ub(c,h,!0)}if(f)return f=(F(c)?c[c.length-1]:c).prototype,k=Object.create(f||null),l&&d(e,l,k,h||c.name),P(function(){var a=b.invoke(c,k,e,h);a!==k&&(G(a)||z(a))&&(k= a,l&&d(e,l,k,h||c.name));return k},{instance:k,identifier:l});k=b.instantiate(c,e,h);l&&d(e,l,k,h||c.name);return k}}]}function Df(){this.$get=["$window",function(a){return y(a.document)}]}function Ef(){this.$get=["$document","$rootScope",function(a,b){function d(){e=c.hidden}var c=a[0],e=c&&c.hidden;a.on("visibilitychange",d);b.$on("$destroy",function(){a.off("visibilitychange",d)});return function(){return e}}]}function Ff(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]} function uc(a){return G(a)?$(a)?a.toISOString():fb(a):a}function Kf(){this.$get=function(){return function(a){if(!a)return"";var b=[];Pc(a,function(a,c){null===a||v(a)||z(a)||(F(a)?q(a,function(a){b.push(ka(c)+"="+ka(uc(a)))}):b.push(ka(c)+"="+ka(uc(a))))});return b.join("&")}}}function Lf(){this.$get=function(){return function(a){function b(a,e,f){F(a)?q(a,function(a,c){b(a,e+"["+(G(a)?c:"")+"]")}):G(a)&&!$(a)?Pc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):(z(a)&&(a=a()),d.push(ka(e)+"="+(null== a?"":ka(uc(a)))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function vc(a,b){if(B(a)){var d=a.replace(Ag,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(xd),e;(e=c)||(e=(e=d.match(Bg))&&Cg[e[0]].test(d));if(e)try{a=Sc(d)}catch(f){if(!c)return a;throw Lb("baddata",a,f);}}}return a}function yd(a){var b=U(),d;B(a)?q(a.split("\n"),function(a){d=a.indexOf(":");var e=O(Q(a.substr(0,d)));a=Q(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):G(a)&&q(a,function(a,d){var f=O(d),g=Q(a); f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function zd(a){var b;return function(d){b||(b=yd(a));return d?(d=b[O(d)],void 0===d&&(d=null),d):b}}function Ad(a,b,d,c){if(z(c))return c(a,b,d);q(c,function(c){a=c(a,b,d)});return a}function Jf(){var a=this.defaults={transformResponse:[vc],transformRequest:[function(a){return G(a)&&"[object File]"!==ga.call(a)&&"[object Blob]"!==ga.call(a)&&"[object FormData]"!==ga.call(a)?fb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ja(wc),put:ja(wc), patch:ja(wc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},b=!1;this.useApplyAsync=function(a){return u(a)?(b=!!a,this):b};var d=this.interceptors=[],c=this.xsrfWhitelistedOrigins=[];this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(e,f,g,k,h,l,m,p){function n(b){function c(a,b){for(var d=0,e=b.length;da?b:l.reject(b)}if(!G(b))throw L("$http")("badreq",b);if(!B(p.valueOf(b.url)))throw L("$http")("badreq",b.url);var g=P({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer,jsonpCallbackParam:a.jsonpCallbackParam}, b);g.headers=function(b){var c=a.headers,e=P({},b.headers),f,g,h,c=P({},c.common,c[O(b.method)]);a:for(f in c){g=O(f);for(h in e)if(O(h)===g)continue a;e[f]=c[f]}return d(e,ja(b))}(b);g.method=wb(g.method);g.paramSerializer=B(g.paramSerializer)?m.get(g.paramSerializer):g.paramSerializer;e.$$incOutstandingRequestCount();var h=[],k=[];b=l.resolve(g);q(V,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&k.push(a.response,a.responseError)});b= c(b,h);b=b.then(function(b){var c=b.headers,d=Ad(b.data,zd(c),void 0,b.transformRequest);v(d)&&q(c,function(a,b){"content-type"===O(b)&&delete c[b]});v(b.withCredentials)&&!v(a.withCredentials)&&(b.withCredentials=a.withCredentials);return t(b,d).then(f,f)});b=c(b,k);return b=b.finally(function(){e.$$completeOutstandingRequest(x)})}function t(c,d){function e(a){if(a){var c={};q(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function k(a, c,d,e,f){function g(){m(c,a,d,e,f)}Y&&(200<=a&&300>a?Y.put(N,[a,c,yd(d),e,f]):Y.remove(N));b?h.$applyAsync(g):(g(),h.$$phase||h.$apply())}function m(a,b,d,e,f){b=-1<=b?b:0;(200<=b&&300>b?V.resolve:V.reject)({data:a,status:b,headers:zd(d),config:c,statusText:e,xhrStatus:f})}function t(a){m(a.data,a.status,ja(a.headers()),a.statusText,a.xhrStatus)}function J(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var V=l.defer(),M=V.promise,Y,r,va=c.headers,Pa="jsonp"===O(c.method), N=c.url;Pa?N=p.getTrustedResourceUrl(N):B(N)||(N=p.valueOf(N));N=s(N,c.paramSerializer(c.params));Pa&&(N=C(N,c.jsonpCallbackParam));n.pendingRequests.push(c);M.then(J,J);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(Y=G(c.cache)?c.cache:G(a.cache)?a.cache:w);Y&&(r=Y.get(N),u(r)?r&&z(r.then)?r.then(t,t):F(r)?m(r[1],r[0],ja(r[2]),r[3],r[4]):m(r,200,{},"OK","complete"):Y.put(N,M));v(r)&&((r=K(c.url)?g()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(va[c.xsrfHeaderName||a.xsrfHeaderName]= r),f(c.method,N,d,k,va,c.timeout,c.withCredentials,c.responseType,e(c.eventHandlers),e(c.uploadEventHandlers)));return M}function s(a,b){0=l&&(K.resolve(w),C(q.$$intervalId),delete g[q.$$intervalId]);V||a.$apply()},h);g[q.$$intervalId]=K;return q}var g={};f.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$intervalId"))throw Fg("badprom");if(!g.hasOwnProperty(a.$$intervalId))return!1;a=a.$$intervalId;var c=g[a];c.promise.$$state.pur=!0;c.reject("canceled");b.clearInterval(a);delete g[a];return!0}; return f}]}function xc(a){a=a.split("/");for(var b=a.length;b--;)a[b]=gb(a[b].replace(/%2F/g,"/"));return a.join("/")}function Bd(a,b){var d=oa(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=ea(d.port)||Gg[d.protocol]||null}function Cd(a,b,d){if(Hg.test(a))throw kb("badpath",a);var c="/"!==a.charAt(0);c&&(a="/"+a);a=oa(a);for(var c=(c&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname).split("/"),e=c.length;e--;)c[e]=decodeURIComponent(c[e]),d&&(c[e]=c[e].replace(/\//g,"%2F")); d=c.join("/");b.$$path=d;b.$$search=gc(a.search);b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function yc(a,b){return a.slice(0,b.length)===b}function qa(a,b){if(yc(b,a))return b.substr(a.length)}function Da(a){var b=a.indexOf("#");return-1===b?a:a.substr(0,b)}function lb(a){return a.replace(/(#.+)|#$/,"$1")}function zc(a,b,d){this.$$html5=!0;d=d||"";Bd(a,this);this.$$parse=function(a){var d=qa(b,a);if(!B(d))throw kb("ipthprfx",a,b);Cd(d,this,!0); this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=hc(this.$$search),d=this.$$hash?"#"+gb(this.$$hash):"";this.$$url=xc(this.$$path)+(a?"?"+a:"")+d;this.$$absUrl=b+this.$$url.substr(1);this.$$urlUpdatedByLocation=!0};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;u(f=qa(a,c))?(g=f,g=d&&u(f=qa(d,f))?b+(qa("/",f)||f):a+g):u(f=qa(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function Ac(a,b,d){Bd(a,this);this.$$parse= function(c){var e=qa(a,c)||qa(b,c),f;v(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",v(e)&&(a=c,this.replace())):(f=qa(d,e),v(f)&&(f=e));Cd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;yc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$compose=function(){var b=hc(this.$$search),e=this.$$hash?"#"+gb(this.$$hash):"";this.$$url=xc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+(this.$$url?d+this.$$url:"");this.$$urlUpdatedByLocation=!0};this.$$parseLinkUrl= function(b,d){return Da(a)===Da(b)?(this.$$parse(b),!0):!1}}function Dd(a,b,d){this.$$html5=!0;Ac.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a===Da(c)?f=c:(g=qa(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$compose=function(){var b=hc(this.$$search),e=this.$$hash?"#"+gb(this.$$hash):"";this.$$url=xc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+d+this.$$url;this.$$urlUpdatedByLocation=!0}}function Mb(a){return function(){return this[a]}} function Ed(a,b){return function(d){if(v(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Pf(){var a="!",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return u(b)?(a=b,this):a};this.html5Mode=function(a){if(Ga(a))return b.enabled=a,this;if(G(a)){Ga(a.enabled)&&(b.enabled=a.enabled);Ga(a.requireBase)&&(b.requireBase=a.requireBase);if(Ga(a.rewriteLinks)||B(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser", "$sniffer","$rootElement","$window",function(d,c,e,f,g){function k(a,b,d){var e=l.url(),f=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(g){throw l.url(e),l.$$state=f,g;}}function h(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,b)}var l,m;m=c.baseHref();var p=c.url(),n;if(b.enabled){if(!m&&b.requireBase)throw kb("nobase");n=p.substring(0,p.indexOf("/",p.indexOf("//")+2))+(m||"/");m=e.history?zc:Dd}else n=Da(p),m=Ac;var t=n.substr(0,Da(n).lastIndexOf("/")+1);l=new m(n,t,"#"+ a);l.$$parseLinkUrl(p,p);l.$$state=c.state();var s=/^\s*(javascript|mailto):/i;f.on("click",function(a){var e=b.rewriteLinks;if(e&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var g=y(a.target);"a"!==ta(g[0]);)if(g[0]===f[0]||!(g=g.parent())[0])return;if(!B(e)||!v(g.attr(e))){var e=g.prop("href"),h=g.attr("href")||g.attr("xlink:href");G(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=oa(e.animVal).href);s.test(e)||!e||g.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(e, h)||(a.preventDefault(),l.absUrl()!==c.url()&&d.$apply())}}});lb(l.absUrl())!==lb(p)&&c.url(l.absUrl(),!0);var C=!0;c.onUrlChange(function(a,b){yc(a,t)?(d.$evalAsync(function(){var c=l.absUrl(),e=l.$$state,f;a=lb(a);l.$$parse(a);l.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;l.absUrl()===a&&(f?(l.$$parse(c),l.$$state=e,k(c,!1,e)):(C=!1,h(c,e)))}),d.$$phase||d.$digest()):g.location.href=a});d.$watch(function(){if(C||l.$$urlUpdatedByLocation){l.$$urlUpdatedByLocation=!1; var a=lb(c.url()),b=lb(l.absUrl()),f=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&e.history&&f!==l.$$state;if(C||m)C=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,f).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=f):(m&&k(b,g,f===l.$$state?null:l.$$state),h(a,f)))})}l.$$replace=!1});return l}]}function Qf(){var a=!0,b=this;this.debugEnabled=function(b){return u(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){cc(a)&&(a.stack&& f?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||x;return function(){var a=[];q(arguments,function(b){a.push(c(b))});return Function.prototype.apply.call(e,b,a)}}var f=Ca||/\bEdge\//.test(d.navigator&&d.navigator.userAgent);return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b, arguments)}}()}}]}function Ig(a){return a+""}function Jg(a,b){return"undefined"!==typeof a?a:b}function Fd(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Kg(a,b){switch(a.type){case r.MemberExpression:if(a.computed)return!1;break;case r.UnaryExpression:return 1;case r.BinaryExpression:return"+"!==a.operator?1:!1;case r.CallExpression:return!1}return void 0===b?Gd:b}function S(a,b,d){var c,e,f=a.isPure=Kg(a,d);switch(a.type){case r.Program:c=!0;q(a.body,function(a){S(a.expression, b,f);c=c&&a.expression.constant});a.constant=c;break;case r.Literal:a.constant=!0;a.toWatch=[];break;case r.UnaryExpression:S(a.argument,b,f);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case r.BinaryExpression:S(a.left,b,f);S(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case r.LogicalExpression:S(a.left,b,f);S(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case r.ConditionalExpression:S(a.test, b,f);S(a.alternate,b,f);S(a.consequent,b,f);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case r.Identifier:a.constant=!1;a.toWatch=[a];break;case r.MemberExpression:S(a.object,b,f);a.computed&&S(a.property,b,f);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=a.constant?[]:[a];break;case r.CallExpression:c=d=a.filter?!b(a.callee.name).$stateful:!1;e=[];q(a.arguments,function(a){S(a,b,f);c=c&&a.constant;e.push.apply(e, a.toWatch)});a.constant=c;a.toWatch=d?e:[a];break;case r.AssignmentExpression:S(a.left,b,f);S(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case r.ArrayExpression:c=!0;e=[];q(a.elements,function(a){S(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=e;break;case r.ObjectExpression:c=!0;e=[];q(a.properties,function(a){S(a.value,b,f);c=c&&a.value.constant;e.push.apply(e,a.value.toWatch);a.computed&&(S(a.key,b,!1),c=c&&a.key.constant,e.push.apply(e, a.key.toWatch))});a.constant=c;a.toWatch=e;break;case r.ThisExpression:a.constant=!1;a.toWatch=[];break;case r.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Hd(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Id(a){return a.type===r.Identifier||a.type===r.MemberExpression}function Jd(a){if(1===a.body.length&&Id(a.body[0].expression))return{type:r.AssignmentExpression,left:a.body[0].expression,right:{type:r.NGValueParameter},operator:"="}} function Kd(a){this.$filter=a}function Ld(a){this.$filter=a}function Nb(a,b,d){this.ast=new r(a,d);this.astCompiler=d.csp?new Ld(b):new Kd(b)}function Bc(a){return z(a.valueOf)?a.valueOf():Lg.call(a)}function Rf(){var a=U(),b={"true":!0,"false":!1,"null":null,undefined:void 0},d,c;this.addLiteral=function(a,c){b[a]=c};this.setIdentifierFns=function(a,b){d=a;c=b;return this};this.$get=["$filter",function(e){function f(b,c){var d,f;switch(typeof b){case "string":return f=b=b.trim(),d=a[f],d||(d=new Ob(s), d=(new Nb(d,e,s)).parse(b),a[f]=p(d)),t(d,c);case "function":return t(b,c);default:return t(x,c)}}function g(a,b,c){return null==a||null==b?a===b:"object"!==typeof a||(a=Bc(a),"object"!==typeof a||c)?a===b||a!==a&&b!==b:!1}function k(a,b,c,d,e){var f=d.inputs,h;if(1===f.length){var k=g,f=f[0];return a.$watch(function(a){var b=f(a);g(b,k,f.isPure)||(h=d(a,void 0,void 0,[b]),k=b&&Bc(b));return h},b,c,e)}for(var l=[],m=[],p=0,n=f.length;p=c.$$state.status&&e&&e.length&&a(function(){for(var a,c,f=0,g=e.length;fa)for(b in l++,f)sa.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$$pure=g(a).literal;c.$stateful=!c.$$pure;var d=this,e,f,h,k=1q&&(y=4-q,v[y]||(v[y]=[]),v[y].push({msg:z(a.exp)? "fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:h}));else if(a===c){t=!1;break a}}catch(B){f(B)}if(!(n=!w.$$suspended&&w.$$watchersCount&&w.$$childHead||w!==A&&w.$$nextSibling))for(;w!==A&&!(n=w.$$nextSibling);)w=w.$parent}while(w=n);if((t||K.length)&&!q--)throw r.$$phase=null,d("infdig",b,v);}while(t||K.length);for(r.$$phase=null;ECa)throw pa("iequirks");var c=ja(da);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b}, c.valueOf=Qa);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;q(da,function(a,b){var d=O(b);c[("parse_as_"+d).replace(Dc,yb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Dc,yb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Dc,yb)]=function(b){return g(a,b)}});return c}]}function Xf(){this.$get=["$window","$document",function(a,b){var d={},c=!((!a.nw||!a.nw.process)&&a.chrome&& (a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,e=ea((/android (\d+)/.exec(O((a.navigator||{}).userAgent))||[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},k=g.body&&g.body.style,h=!1,l=!1;k&&(h=!!("transition"in k||"webkitTransition"in k),l=!!("animation"in k||"webkitAnimation"in k));return{history:!(!c||4>e||f),hasEvent:function(a){if("input"===a&&Ca)return!1;if(v(d[a])){var b=g.createElement("div");d[a]= "on"+a in b}return d[a]},csp:Ba(),transitions:h,animations:l,android:e}}]}function Zf(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(b,d,c,e,f){function g(k,h){g.totalPendingRequests++;if(!B(k)||v(d.get(k)))k=f.getTrustedResourceUrl(k);var l=c.defaults&&c.defaults.transformResponse;F(l)?l=l.filter(function(a){return a!==vc}):l===vc&&(l=null);return c.get(k,P({cache:d,transformResponse:l},a)).finally(function(){g.totalPendingRequests--}).then(function(a){return d.put(k, a.data)},function(a){h||(a=Ng("tpload",k,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function $f(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];q(a,function(a){var c=fa.element(a).data("$binding");c&&q(c,function(c){d?(new RegExp("(^|\\s)"+Nd(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g= ["ng-","data-ng-","ng\\:"],k=0;kc&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)===Fc;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Fc;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Xd&&(d=d.splice(0,Xd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function Wg(a, b,d,c){var e=a.d,f=e.length-a.i;b=v(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;fk;)h.unshift(0),k++;0=b.lgSize&&k.unshift(h.splice(-b.lgSize,h.length).join(""));h.length>b.gSize;)k.unshift(h.splice(-b.gSize,h.length).join(""));h.length&&k.unshift(h.join(""));h=k.join(d);f.length&&(h+=c+f.join(""));e&&(h+="e+"+e)}return 0>a&&!g?b.negPre+h+b.negSuf:b.posPre+ h+b.posSuf}function Pb(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length-d)f+=d;0===f&&-12===d&&(f=12);return Pb(f,b,c,e)}}function mb(a,b,d){return function(c,e){var f=c["get"+a](),g=wb((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Yd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Zd(a){return function(b){var d= Yd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Pb(b,a)}}function Gc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Sd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear:a.setFullYear,h=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=ea(b[9]+b[10]),g=ea(b[9]+b[11]));k.call(a,ea(b[1]),ea(b[2])-1,ea(b[3]));f=ea(b[4]||0)-f;g=ea(b[5]||0)-g;k=ea(b[6]||0);b=Math.round(1E3*parseFloat("0."+ (b[7]||0)));h.call(a,f,g,k,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,f){var g="",k=[],h,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;B(c)&&(c=Xg.test(c)?ea(c):b(c));aa(c)&&(c=new Date(c));if(!$(c)||!isFinite(c.getTime()))return c;for(;d;)(l=Yg.exec(d))?(k=eb(k,l,1),d=k.pop()):(k.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=ec(f,m),c=fc(c,f,!0));q(k,function(b){h=Zg[b];g+=h?h(c,a.DATETIME_FORMATS, m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Qg(){return function(a,b){v(b)&&(b=2);return fb(a,b)}}function Rg(){return function(a,b,d){b=Infinity===Math.abs(Number(b))?Number(b):ea(b);if(ha(b))return a;aa(a)&&(a=a.toString());if(!ra(a))return a;d=!d||isNaN(d)?0:ea(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Hc(a,d,d+b):0===d?Hc(a,b,a.length):Hc(a,Math.max(0,d+b),d)}}function Hc(a,b,d){return B(a)?a.slice(b,d):ya.call(a,b,d)}function Ud(a){function b(b){return b.map(function(b){var c= 1,d=Qa;if(z(b))d=b;else if(B(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e=d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,h=b.type;if(d===h){var h=a.value,l=b.value;"string"===d?(h=h.toLowerCase(),l=l.toLowerCase()):"object"===d&&(G(h)&&(h=a.index),G(l)&&(l=b.index));h!==l&&(c= hb||37<=b&&40>=b|| m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut drop",m)}b.on("change",l);if(de[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!h){var b=this.validity,c=b.badInput,d=b.typeMismatch;h=f.defer(function(){h=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Rb(a,b){return function(d,c){var e,f;if($(d))return d;if(B(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length- 1)&&(d=d.substring(1,d.length-1));if($g.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},q(e,function(a,c){cf.yyyy&&e.setFullYear(f.yyyy),e}return NaN}}function pb(a,b,d,c){return function(e,f,g,k,h,l,m){function p(a){return a&& !(a.getTime&&a.getTime()!==a.getTime())}function n(a){return u(a)&&!$(a)?t(a)||void 0:a}function t(a,b){var c=k.$options.getOption("timezone");q&&q!==c&&(b=Tc(b,ec(q)));var e=d(a,b);!isNaN(e)&&c&&(e=fc(e,c));return e}Jc(e,f,g,k,a);Xa(e,f,g,k,h,l);var s,q;k.$parsers.push(function(c){if(k.$isEmpty(c))return null;if(b.test(c))return t(c,s);k.$$parserName=a});k.$formatters.push(function(a){if(a&&!$(a))throw qb("datefmt",a);if(p(a)){s=a;var b=k.$options.getOption("timezone");b&&(q=b,s=fc(s,b,!0));return m("date")(a, c,b)}q=s=null;return""});if(u(g.min)||g.ngMin){var w;k.$validators.min=function(a){return!p(a)||v(w)||d(a)>=w};g.$observe("min",function(a){w=n(a);k.$validate()})}if(u(g.max)||g.ngMax){var r;k.$validators.max=function(a){return!p(a)||v(r)||d(a)<=r};g.$observe("max",function(a){r=n(a);k.$validate()})}}}function Jc(a,b,d,c,e){(c.$$hasNativeValidators=G(b[0].validity))&&c.$parsers.push(function(a){var d=b.prop("validity")||{};if(d.badInput||d.typeMismatch)c.$$parserName=e;else return a})}function ee(a){a.$parsers.push(function(b){if(a.$isEmpty(b))return null; if(ah.test(b))return parseFloat(b);a.$$parserName="number"});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!aa(b))throw qb("numfmt",b);b=b.toString()}return b})}function Ya(a){u(a)&&!aa(a)&&(a=parseFloat(a));return ha(a)?void 0:a}function Kc(a){var b=a.toString(),d=b.indexOf(".");return-1===d?-1a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function fe(a,b,d){a=Number(a);var c=(a|0)!==a,e=(b|0)!==b,f=(d|0)!==d;if(c||e||f){var g=c?Kc(a):0,k=e?Kc(b):0,h=f?Kc(d):0,g=Math.max(g,k, h),g=Math.pow(10,g);a*=g;b*=g;d*=g;c&&(a=Math.round(a));e&&(b=Math.round(b));f&&(d=Math.round(d))}return 0===(a-b)%d}function ge(a,b,d,c,e){if(u(c)){a=a(c);if(!a.constant)throw qb("constexpr",d,c);return a(b)}return e}function Lc(a,b){function d(a,b){if(!a||!a.length)return[];if(!b||!b.length)return a;var c=[],d=0;a:for(;d(?:<\/\1>|)$/, lc=/<|&#?\w+;/,hg=/<([\w:-]+)/,ig=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,na={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};na.optgroup=na.option;na.tbody=na.tfoot=na.colgroup=na.caption=na.thead;na.th=na.td;var pg=D.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)& 16)},Sa=W.prototype={ready:gd,toString:function(){var a=[];q(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?y(this[a]):y(this[this.length+a])},length:0,push:dh,sort:[].sort,splice:[].splice},Ib={};q("multiple selected checked disabled readOnly required open".split(" "),function(a){Ib[O(a)]=a});var nd={};q("input select option textarea button form details".split(" "),function(a){nd[a]=!0});var ud={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max", ngPattern:"pattern",ngStep:"step"};q({data:qc,removeData:pc,hasData:function(a){for(var b in Oa[a.ng339])return!0;return!1},cleanData:function(a){for(var b=0,d=a.length;b/,sg=/^[^(]*\(\s*([^)]*)\)/m,gh=/,/,hh=/^\s*(_?)(\S+?)\1\s*$/,qg=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ja=L("$injector");hb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw B(d)&&d||(d=a.name||tg(a)),Ja("strictdi",d);b=pd(a);q(b[1].split(gh),function(a){a.replace(hh,function(a,b,d){c.push(d)})})}a.$inject=c}}else F(a)?(b=a.length-1,ub(a[b],"fn"),c=a.slice(0,b)):ub(a,"fn", !0);return c};var ie=L("$animate"),wf=function(){this.$get=x},xf=function(){var a=new Jb,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=B(b)?b.split(" "):F(b)?b:[],q(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){q(b,function(b){var c=a.get(b);if(c){var d=ug(b.attr("class")),e="",f="";q(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});q(b,function(a){e&&Fb(a,e);f&&Eb(a,f)});a.delete(b)}});b.length=0}return{enabled:x, on:x,off:x,pin:x,push:function(g,k,h,l){l&&l();h=h||{};h.from&&g.css(h.from);h.to&&g.css(h.to);if(h.addClass||h.removeClass)if(k=h.addClass,l=h.removeClass,h=a.get(g)||{},k=e(h,k,!0),l=e(h,l,!1),k||l)a.set(g,h),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},uf=["$provide",function(a){var b=this,d=null,c=null;this.$$registeredAnimations=Object.create(null);this.register=function(c,d){if(c&&"."!==c.charAt(0))throw ie("notcsel",c);var g=c+"-animation";b.$$registeredAnimations[c.substr(1)]= g;a.factory(g,d)};this.customFilter=function(a){1===arguments.length&&(c=z(a)?a:null);return c};this.classNameFilter=function(a){if(1===arguments.length&&(d=a instanceof RegExp?a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,ie("nongcls","ng-animate");return d};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var e;a:{for(e=0;e <= >= && || ! = |".split(" "),function(a){Ub[a]=!0});var kh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Ob=function(a){this.options=a};Ob.prototype={constructor:Ob,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<= a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a; var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=u(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw Za("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index","<=",">=");)a={type:r.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:r.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(), b;b=this.expect("*","/","%");)a={type:r.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:r.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=za(this.selfReferential[this.consume().text]): this.options.literals.hasOwnProperty(this.peek().text)?a={type:r.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:r.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:r.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")): "."===b.text?a={type:r.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:r.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier", a);return{type:r.Identifier,name:a.text}},constant:function(){return{type:r.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:r.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:r.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"), b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"),b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");return{type:r.ObjectExpression,properties:a}},throwError:function(a,b){throw Za("syntax",b.text,a,b.index+ 1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw Za("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw Za("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1}, expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:r.ThisExpression},$locals:{type:r.LocalsExpression}}};var Gd=2;Kd.prototype={compile:function(a){var b=this;this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};S(a,b.$filter);var d="",c;this.stage="assign";if(c=Jd(a))this.state.computing="assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign", "s,v,l");c=Hd(a.body);b.stage="inputs";q(c,function(a,c){var d="fn"+c;b.state[d]={vars:[],body:[],own:{}};b.state.computing=d;var k=b.nextId();b.recurse(a,k);b.return_(k);b.state.inputs.push({name:d,isPure:a.isPure});a.watchId=c});this.state.computing="fn";this.stage="main";this.recurse(a);a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter, Ig,Jg,Fd);this.state=this.stage=void 0;return a},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;q(b,function(b){a.push("var "+b.name+"="+d.generateFunction(b.name,"s"));b.isPure&&a.push(b.name,".isPure="+JSON.stringify(b.isPure)+";")});b.length&&a.push("fn.inputs=["+b.map(function(a){return a.name}).join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this; q(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,c,e,f){var g,k,h=this,l,m,p;c=c||x;if(!f&&u(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case r.Program:q(a.body, function(b,c){h.recurse(b.expression,void 0,void 0,function(a){k=a});c!==a.body.length-1?h.current().body.push(k,";"):h.return_(k)});break;case r.Literal:m=this.escape(a.value);this.assign(b,m);c(b||m);break;case r.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){k=a});m=a.operator+"("+this.ifDefined(k,0)+")";this.assign(b,m);c(m);break;case r.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){k=a});m="+"===a.operator? this.plus(g,k):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(k,0):"("+g+")"+a.operator+"("+k+")";this.assign(b,m);c(m);break;case r.LogicalExpression:b=b||this.nextId();h.recurse(a.left,b);h.if_("&&"===a.operator?b:h.not(b),h.lazyRecurse(a.right,b));c(b);break;case r.ConditionalExpression:b=b||this.nextId();h.recurse(a.test,b);h.if_(b,h.lazyRecurse(a.alternate,b),h.lazyRecurse(a.consequent,b));c(b);break;case r.Identifier:b=b||this.nextId();d&&(d.context="inputs"===h.stage?"s":this.assign(this.nextId(), this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",a.name)),function(){h.if_("inputs"===h.stage||"s",function(){e&&1!==e&&h.if_(h.isNull(h.nonComputedMember("s",a.name)),h.lazyAssign(h.nonComputedMember("s",a.name),"{}"));h.assign(b,h.nonComputedMember("s",a.name))})},b&&h.lazyAssign(b,h.nonComputedMember("l",a.name)));c(b);break;case r.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();h.recurse(a.object, g,void 0,function(){h.if_(h.notNull(g),function(){a.computed?(k=h.nextId(),h.recurse(a.property,k),h.getStringValue(k),e&&1!==e&&h.if_(h.not(h.computedMember(g,k)),h.lazyAssign(h.computedMember(g,k),"{}")),m=h.computedMember(g,k),h.assign(b,m),d&&(d.computed=!0,d.name=k)):(e&&1!==e&&h.if_(h.isNull(h.nonComputedMember(g,a.property.name)),h.lazyAssign(h.nonComputedMember(g,a.property.name),"{}")),m=h.nonComputedMember(g,a.property.name),h.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){h.assign(b, "undefined")});c(b)},!!e);break;case r.CallExpression:b=b||this.nextId();a.filter?(k=h.filter(a.callee.name),l=[],q(a.arguments,function(a){var b=h.nextId();h.recurse(a,b);l.push(b)}),m=k+"("+l.join(",")+")",h.assign(b,m),c(b)):(k=h.nextId(),g={},l=[],h.recurse(a.callee,k,g,function(){h.if_(h.notNull(k),function(){q(a.arguments,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m=g.name?h.member(g.context,g.name,g.computed)+"("+l.join(",")+")":k+"("+l.join(",")+ ")";h.assign(b,m)},function(){h.assign(b,"undefined")});c(b)}));break;case r.AssignmentExpression:k=this.nextId();g={};this.recurse(a.left,void 0,g,function(){h.if_(h.notNull(g.context),function(){h.recurse(a.right,k);m=h.member(g.context,g.name,g.computed)+a.operator+k;h.assign(b,m);c(b||m)})},1);break;case r.ArrayExpression:l=[];q(a.elements,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(b||m);break;case r.ObjectExpression:l= [];p=!1;q(a.properties,function(a){a.computed&&(p=!0)});p?(b=b||this.nextId(),this.assign(b,"{}"),q(a.properties,function(a){a.computed?(g=h.nextId(),h.recurse(a.key,g)):g=a.key.type===r.Identifier?a.key.name:""+a.key.value;k=h.nextId();h.recurse(a.value,k);h.assign(h.member(b,g,a.computed),k)})):(q(a.properties,function(b){h.recurse(b.value,a.constant?void 0:h.nextId(),void 0,function(a){l.push(h.escape(b.key.type===r.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b, m));c(b||m);break;case r.ThisExpression:this.assign(b,"s");c(b||"s");break;case r.LocalsExpression:this.assign(b,"l");c(b||"l");break;case r.NGValueParameter:this.assign(b,"v"),c(b||"v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]= this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},isNull:function(a){return a+"==null"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a, b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g, stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(B(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(aa(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Za("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}}; Ld.prototype={compile:function(a){var b=this;S(a,b.$filter);var d,c;if(d=Jd(a))c=this.recurse(d);d=Hd(a.body);var e;d&&(e=[],q(d,function(a,c){var d=b.recurse(a);d.isPure=a.isPure;a.input=d;e.push(d);a.watchId=c}));var f=[];q(a.body,function(a){f.push(b.recurse(a.expression))});a=0===a.body.length?x:1===a.body.length?f[0]:function(a,b){var c;q(f,function(d){c=d(a,b)});return c};c&&(a.assign=function(a,b,d){return c(a,d,b)});e&&(a.inputs=e);return a},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input, a.watchId);switch(a.type){case r.Literal:return this.value(a.value,b);case r.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case r.BinaryExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case r.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case r.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent), b);case r.Identifier:return f.identifier(a.name,b,d);case r.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d):this.nonComputedMember(c,e,b,d);case r.CallExpression:return g=[],q(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var p=[],n=0;n":function(a,b,d){return function(c,e, f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f, g,k){e=a(e,f,g,k)?b(e,f,g,k):d(e,f,g,k);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d){return function(c,e,f,g){c=e&&a in e?e:c;d&&1!==d&&c&&null==c[a]&&(c[a]={});e=c?c[a]:void 0;return b?{context:c,name:a,value:e}:e}},computedMember:function(a,b,d,c){return function(e,f,g,k){var h=a(e,f,g,k),l,m;null!=h&&(l=b(e,f,g,k),l+="",c&&1!==c&&h&&!h[l]&&(h[l]={}),m=h[l]);return d?{context:h,name:l,value:m}:m}},nonComputedMember:function(a, b,d,c){return function(e,f,g,k){e=a(e,f,g,k);c&&1!==c&&e&&null==e[b]&&(e[b]={});f=null!=e?e[b]:void 0;return d?{context:e,name:b,value:f}:f}},inputs:function(a,b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};Nb.prototype={constructor:Nb,parse:function(a){a=this.getAst(a);var b=this.astCompiler.compile(a.ast),d=a.ast;b.literal=0===d.body.length||1===d.body.length&&(d.body[0].expression.type===r.Literal||d.body[0].expression.type===r.ArrayExpression||d.body[0].expression.type===r.ObjectExpression); b.constant=a.ast.constant;b.oneTime=a.oneTime;return b},getAst:function(a){var b=!1;a=a.trim();":"===a.charAt(0)&&":"===a.charAt(1)&&(b=!0,a=a.substring(2));return{ast:this.ast.ast(a),oneTime:b}}};var pa=L("$sce"),da={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Dc=/_([a-z])/g,Ng=L("$templateRequest"),Og=L("$timeout"),T=D.document.createElement("a"),Pd=oa(D.location.href),Va;Qd.$inject=["$document"];ed.$inject=["$provide"];var Xd=22,Wd=".",Fc="0";Rd.$inject= ["$locale"];Td.$inject=["$locale"];var Zg={yyyy:X("FullYear",4,0,!1,!0),yy:X("FullYear",2,0,!0,!0),y:X("FullYear",1,0,!1,!0),MMMM:mb("Month"),MMM:mb("Month",!0),MM:X("Month",2,1),M:X("Month",1,1),LLLL:mb("Month",!1,!0),dd:X("Date",2),d:X("Date",1),HH:X("Hours",2),H:X("Hours",1),hh:X("Hours",2,-12),h:X("Hours",1,-12),mm:X("Minutes",2),m:X("Minutes",1),ss:X("Seconds",2),s:X("Seconds",1),sss:X("Milliseconds",3),EEEE:mb("Day"),EEE:mb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]}, Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Pb(Math[0=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},Yg=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,Xg=/^-?\d+$/;Sd.$inject=["$locale"];var Sg=ia(O),Tg=ia(wb);Ud.$inject=["$parse"];var Ke=ia({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e= "[object SVGAnimatedString]"===ga.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),xb={};q(Ib,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=wa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});xb[c]=function(){return{restrict:"A",priority:100,link:e}}}});q(ud,function(a,b){xb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&& (c=e.ngPattern.match(ch))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});q(["src","srcset","href"],function(a){var b=wa("ng-"+a);xb[b]=function(){return{priority:99,link:function(d,c,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===ga.call(c.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null);e.$observe(b,function(b){b?(e.$set(g,b),Ca&&f&&c.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}});var nb={$addControl:x,$$renameControl:function(a, b){a.$name=b},$removeControl:x,$setValidity:x,$setDirty:x,$setPristine:x,$setSubmitted:x,$$setSubmitted:x};Qb.$inject=["$element","$attrs","$scope","$animate","$interpolate"];Qb.prototype={$rollbackViewValue:function(){q(this.$$controls,function(a){a.$rollbackViewValue()})},$commitViewValue:function(){q(this.$$controls,function(a){a.$commitViewValue()})},$addControl:function(a){Na(a.$name,"input");this.$$controls.push(a);a.$name&&(this[a.$name]=a);a.$$parentForm=this},$$renameControl:function(a,b){var d= a.$name;this[d]===a&&delete this[d];this[b]=a;a.$name=b},$removeControl:function(a){a.$name&&this[a.$name]===a&&delete this[a.$name];q(this.$pending,function(b,d){this.$setValidity(d,null,a)},this);q(this.$error,function(b,d){this.$setValidity(d,null,a)},this);q(this.$$success,function(b,d){this.$setValidity(d,null,a)},this);db(this.$$controls,a);a.$$parentForm=nb},$setDirty:function(){this.$$animate.removeClass(this.$$element,$a);this.$$animate.addClass(this.$$element,Vb);this.$dirty=!0;this.$pristine= !1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,$a,Vb+" ng-submitted");this.$dirty=!1;this.$pristine=!0;this.$submitted=!1;q(this.$$controls,function(a){a.$setPristine()})},$setUntouched:function(){q(this.$$controls,function(a){a.$setUntouched()})},$setSubmitted:function(){for(var a=this;a.$$parentForm&&a.$$parentForm!==nb;)a=a.$$parentForm;a.$$setSubmitted()},$$setSubmitted:function(){this.$$animate.addClass(this.$$element,"ng-submitted");this.$submitted= !0;q(this.$$controls,function(a){a.$$setSubmitted&&a.$$setSubmitted()})}};be({clazz:Qb,set:function(a,b,d){var c=a[b];c?-1===c.indexOf(d)&&c.push(d):a[b]=[d]},unset:function(a,b,d){var c=a[b];c&&(db(c,d),0===c.length&&delete a[b])}});var je=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||x}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Qb,compile:function(d,f){d.addClass($a).addClass(ob);var g=f.name? "name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var p=f[0];if(!("action"in e)){var n=function(b){a.$apply(function(){p.$commitViewValue();p.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",n);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",n)},0,!1)})}(f[1]||p.$$parentForm).$addControl(p);var t=g?c(p.$name):x;g&&(t(a,p),e.$observe(g,function(b){p.$name!==b&&(t(a,void 0),p.$$parentForm.$$renameControl(p,b),t=c(p.$name),t(a,p))}));d.on("$destroy", function(){p.$$parentForm.$removeControl(p);t(a,void 0);P(p,nb)})}}}}}]},Le=je(),Xe=je(!0),$g=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,lh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,mh=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,ah=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/, ke=/^(\d{4,})-(\d{2})-(\d{2})$/,le=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Nc=/^(\d{4,})-W(\d\d)$/,me=/^(\d{4,})-(\d\d)$/,ne=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,de=U();q(["date","datetime-local","month","time","week"],function(a){de[a]=!0});var oe={text:function(a,b,d,c,e,f){Xa(a,b,d,c,e,f);Ic(c)},date:pb("date",ke,Rb(ke,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":pb("datetimelocal",le,Rb(le,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:pb("time", ne,Rb(ne,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:pb("week",Nc,function(a,b){if($(a))return a;if(B(a)){Nc.lastIndex=0;var d=Nc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,k=0,h=Yd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),k=b.getMilliseconds());return new Date(c,0,h.getDate()+e,d,f,g,k)}}return NaN},"yyyy-Www"),month:pb("month",me,Rb(me,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f){Jc(a,b,d,c,"number");ee(c);Xa(a,b,d,c,e,f);var g,k;if(u(d.min)||d.ngMin)c.$validators.min= function(a,b){return c.$isEmpty(b)||v(g)||b>=g},d.$observe("min",function(a){g=Ya(a);c.$validate()});if(u(d.max)||d.ngMax)c.$validators.max=function(a,b){return c.$isEmpty(b)||v(k)||b<=k},d.$observe("max",function(a){k=Ya(a);c.$validate()});if(u(d.step)||d.ngStep){var h;c.$validators.step=function(a,b){return c.$isEmpty(b)||v(h)||fe(b,g||0,h)};d.$observe("step",function(a){h=Ya(a);c.$validate()})}},url:function(a,b,d,c,e,f){Xa(a,b,d,c,e,f);Ic(c);c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)|| lh.test(d)}},email:function(a,b,d,c,e,f){Xa(a,b,d,c,e,f);Ic(c);c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||mh.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==Q(d.ngTrim);v(d.name)&&b.attr("name",++rb);b.on("change",function(a){var g;b[0].checked&&(g=d.value,e&&(g=Q(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=Q(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a,c){b.attr(a,d[a]); d.$observe(a,c)}function k(a){p=Ya(a);ha(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function h(a){n=Ya(a);ha(c.$modelValue)||(m?(a=b.val(),n=p},g("min",k));e&&(c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||v(n)||b<=n},g("max",h));f&&(c.$validators.step=m?function(){return!s.stepMismatch}:function(a,b){return c.$isEmpty(b)||v(t)||fe(b,p||0,t)},g("step",l))},checkbox:function(a, b,d,c,e,f,g,k){var h=ge(k,a,"ngTrueValue",d.ngTrueValue,!0),l=ge(k,a,"ngFalseValue",d.ngFalseValue,!1);b.on("change",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return ua(a,h)});c.$parsers.push(function(a){return a?h:l})},hidden:x,button:x,submit:x,reset:x,file:x},Zc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e, f,g,k){k[0]&&(oe[O(g.type)]||oe.text)(e,f,g,k[0],b,a,d,c)}}}}],nh=/^(true|false|\d+)$/,qf=function(){function a(a,d,c){var e=u(c)?c:9===Ca?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return nh.test(d.ngValue)?function(b,d,f){b=b.$eval(f.ngValue);a(d,f,b)}:function(b,d,f){b.$watch(f.ngValue,function(b){a(d,f,b)})}}}},Pe=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c, e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=ic(a)})}}}}],Re=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=v(a)?"":a})}}}}],Qe=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)}); d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],pf=ia({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Se=Lc("",!0),Ue=Lc("Odd",0),Te=Lc("Even",1),Ve=Wa({compile:function(a,b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),We=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],dd={},oh={blur:!0,focus:!0}; q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=wa("ng-"+a);dd[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(e,f){var g=d(f[b]);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};oh[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var Ze=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600, terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var k,h,l;d.$watch(e.ngIf,function(d){d?h||g(function(d,f){h=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);k={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),h&&(h.$destroy(),h=null),k&&(l=vb(k.clone),a.leave(l).done(function(a){!1!==a&&(l=null)}),k=null))})}}}],$e=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:fa.noop,compile:function(c, e){var f=e.ngInclude||e.src,g=e.onload||"",k=e.autoscroll;return function(c,e,m,p,n){var t=0,s,q,r,v=function(){q&&(q.remove(),q=null);s&&(s.$destroy(),s=null);r&&(d.leave(r).done(function(a){!1!==a&&(q=null)}),q=r,r=null)};c.$watch(f,function(f){var m=function(a){!1===a||!u(k)||k&&!c.$eval(k)||b()},q=++t;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&q===t){var b=c.$new();p.template=a;a=n(b,function(a){v();d.enter(a,null,e).done(m)});s=b;r=a;s.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){c.$$destroyed|| q!==t||(v(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(v(),p.template=null)})}}}}],sf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){ga.call(d[0]).match(/SVG/)?(d.empty(),a(fd(e.template,D.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],af=Wa({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),of=function(){return{restrict:"A", priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?Q(e):e;c.$parsers.push(function(a){if(!v(a)){var b=[];a&&q(a.split(g),function(a){a&&b.push(f?Q(a):a)});return b}});c.$formatters.push(function(a){if(F(a))return a.join(e)});c.$isEmpty=function(a){return!a||!a.length}}}},ob="ng-valid",ae="ng-invalid",$a="ng-pristine",Vb="ng-dirty",qb=L("ngModel");Sb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" "); Sb.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var a=this.$$parse(this.$$attr.ngModel+"()"),b=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(b){var c=this.$$parsedNgModel(b);z(c)&&(c=a(b));return c};this.$$ngModelSet=function(a,c){z(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw qb("nonassign",this.$$attr.ngModel,Aa(this.$$element));},$render:x,$isEmpty:function(a){return v(a)|| ""===a||null===a||a!==a},$$updateEmptyClasses:function(a){this.$isEmpty(a)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element,"ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,Vb);this.$$animate.addClass(this.$$element,$a)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element, $a);this.$$animate.addClass(this.$$element,Vb);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched=!0;this.$untouched=!1;this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce);this.$viewValue=this.$$lastCommittedViewValue;this.$render()},$validate:function(){if(!ha(this.$modelValue)){var a= this.$$lastCommittedViewValue,b=this.$$rawModelValue,d=this.$valid,c=this.$modelValue,e=this.$options.getOption("allowInvalid"),f=this;this.$$runValidators(b,a,function(a){e||d===a||(f.$modelValue=a?b:void 0,f.$modelValue!==c&&f.$$writeModelToScope())})}},$$runValidators:function(a,b,d){function c(){var c=!0;q(h.$validators,function(d,e){var g=Boolean(d(a,b));c=c&&g;f(e,g)});return c?!0:(q(h.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;q(h.$asyncValidators,function(e, g){var h=e(a,b);if(!h||!z(h.then))throw qb("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?h.$$q.all(c).then(function(){g(d)},x):g(!0)}function f(a,b){k===h.$$currentValidationRunId&&h.$setValidity(a,b)}function g(a){k===h.$$currentValidationRunId&&d(a)}this.$$currentValidationRunId++;var k=this.$$currentValidationRunId,h=this;(function(){var a=h.$$parserName;if(v(h.$$parserValid))f(a,null);else return h.$$parserValid||(q(h.$validators,function(a, b){f(b,null)}),q(h.$asyncValidators,function(a,b){f(b,null)})),f(a,h.$$parserValid),h.$$parserValid;return!0})()?c()?e():g(!1):g(!1)},$commitViewValue:function(){var a=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce);if(this.$$lastCommittedViewValue!==a||""===a&&this.$$hasNativeValidators)this.$$updateEmptyClasses(a),this.$$lastCommittedViewValue=a,this.$pristine&&this.$setDirty(),this.$$parseAndValidate()},$$parseAndValidate:function(){var a=this.$$lastCommittedViewValue,b=this;this.$$parserValid= v(a)?void 0:!0;this.$setValidity(this.$$parserName,null);this.$$parserName="parse";if(this.$$parserValid)for(var d=0;de||c.$isEmpty(b)||b.length<=e}}}}},bd=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=0;d.$observe("minlength",function(a){e=ea(a)||0;c.$validate()});c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=e}}}}};D.angular.bootstrap?D.console&&console.log("WARNING: Tried to load AngularJS more than once."): (De(),He(fa),fa.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2, minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),y(function(){ye(D.document,Vc)}))})(window);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''); //# sourceMappingURL=angular.min.js.map ; /* AngularJS v1.7.2 (c) 2010-2018 Google, Inc. http://angularjs.org License: MIT */ (function(s,c){'use strict';function P(c){var h=[];C(h,E).chars(c);return h.join("")}var D=c.$$minErr("$sanitize"),F,h,G,H,I,q,E,J,K,C;c.module("ngSanitize",[]).provider("$sanitize",function(){function f(a,e){return B(a.split(","),e)}function B(a,e){var d={},b;for(b=0;b/g,">")}function A(a){for(;a;){if(a.nodeType===s.Node.ELEMENT_NODE)for(var e=a.attributes,d=0,b=e.length;d"))},end:function(a){a=q(a);d||!0!==m[a]||!0===r[a]||(b(""));a==d&&(d=!1)},chars:function(a){d|| b(L(a))}}};J=s.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)};var z=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=/([^#-~ |!])/g,r=f("area,br,col,hr,img,wbr"),x=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),p=f("rp,rt"),n=h({},p,x),x=h({},x,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),p=h({},p,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")), l=f("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=f("script,style"),m=h({},r,x,p,n),O=f("background,cite,href,longdesc,src,xlink:href,xml:base"),n=f("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"), p=f("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan", !0),M=h({},O,p,n),N=function(a,e){function d(b){b=""+b;try{var d=(new a.DOMParser).parseFromString(b,"text/html").body;d.firstChild.remove();return d}catch(e){}}function b(a){c.innerHTML=a;e.documentMode&&A(c);return c}var g;if(e&&e.implementation)g=e.implementation.createHTMLDocument("inert");else throw D("noinert");var c=(g.documentElement||g.getDocumentElement()).querySelector("body");c.innerHTML='';return c.querySelector("svg")? (c.innerHTML='

',c.querySelector("svg img")?d:b):function(b){b=""+b;try{b=encodeURI(b)}catch(d){return}var e=new a.XMLHttpRequest;e.responseType="document";e.open("GET","data:text/html;charset=utf-8,"+b,!1);e.send(null);b=e.response.body;b.firstChild.remove();return b}}(s,s.document)}).info({angularVersion:"1.7.2"});c.module("ngSanitize").filter("linky",["$sanitize",function(f){var h=/((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i, t=/^mailto:/i,q=c.$$minErr("linky"),s=c.isDefined,A=c.isFunction,v=c.isObject,y=c.isString;return function(c,z,u){function r(c){c&&l.push(P(c))}function x(c,g){var f,a=p(c);l.push("');r(g);l.push("")}if(null==c||""===c)return c;if(!y(c))throw q("notstring",c);for(var p=A(u)?u:v(u)?function(){return u}:function(){return{}},n=c,l=[],w,m;c=n.match(h);)w=c[0],c[2]|| c[4]||(w=(c[3]?"http://":"mailto:")+w),m=c.index,r(n.substr(0,m)),x(w,c[0].replace(t,"")),n=n.substring(m+c[0].length);r(n);return f(l.join(""))}}])})(window,window.angular); //# sourceMappingURL=angular-sanitize.min.js.map ; /* AngularJS v1.7.2 (c) 2010-2018 Google, Inc. http://angularjs.org License: MIT */ (function(n,e){'use strict';function m(d,k,l){var a=l.baseHref(),h=d[0];return function(f,b,c){var d,g;c=c||{};g=c.expires;d=e.isDefined(c.path)?c.path:a;e.isUndefined(b)&&(g="Thu, 01 Jan 1970 00:00:00 GMT",b="");e.isString(g)&&(g=new Date(g));b=encodeURIComponent(f)+"="+encodeURIComponent(b);b=b+(d?";path="+d:"")+(c.domain?";domain="+c.domain:"");b+=g?";expires="+g.toUTCString():"";b+=c.secure?";secure":"";b+=c.samesite?";samesite="+c.samesite:"";c=b.length+1;4096 4096 bytes)!");h.cookie=b}}e.module("ngCookies",["ng"]).info({angularVersion:"1.7.2"}).provider("$cookies",[function(){var d=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(k,l){return{get:function(a){return k()[a]},getObject:function(a){return(a=this.get(a))?e.fromJson(a):a},getAll:function(){return k()},put:function(a,h,f){l(a,h,f?e.extend({},d,f):d)},putObject:function(a,d,f){this.put(a,e.toJson(d),f)},remove:function(a,h){l(a,void 0,h?e.extend({},d,h):d)}}}]}]);m.$inject= ["$document","$log","$browser"];e.module("ngCookies").provider("$$cookieWriter",function(){this.$get=m})})(window,window.angular); //# sourceMappingURL=angular-cookies.min.js.map ; /*! angular-block-ui v0.2.1 (c) 2015 (null) McNull https://github.com/McNull/angular-block-ui License: MIT */ !function(t){function e(e){try{t.module(e)}catch(n){return!1}return!0}function n(t,n,o){function r(){t.$on("$locationChangeStart",function(t){n.$_blockLocationChange&&n.state().blockCount>0&&t.preventDefault()}),t.$on("$locationChangeSuccess",function(){n.$_blockLocationChange=o.blockBrowserNavigation})}if(o.blockBrowserNavigation)if(e("ngRoute"))var c=t.$on("$viewContentLoaded",function(){c(),r()});else r()}var o=t.module("blockUI",[]);o.config(["$provide","$httpProvider",function(t,e){t.decorator("$exceptionHandler",["$delegate","$injector",function(t,e){var n,o;return function(r,c){if(o=o||e.get("blockUIConfig"),o.resetOnException)try{n=n||e.get("blockUI"),n.instances.reset()}catch(i){console.log("$exceptionHandler",r)}t(r,c)}}]),e.interceptors.push("blockUIHttpInterceptor")}]),o.run(["$document","blockUIConfig","$templateCache",function(t,e,n){e.autoInjectBodyBlock&&t.find("body").attr("block-ui","main"),e.template&&(e.templateUrl="$$block-ui-template$$",n.put(e.templateUrl,e.template))}]),o.config(["$provide",function(t){t.decorator("$location",r)}]);var r=["$delegate","blockUI","blockUIConfig",function(e,n,o){function r(t){var o=e[t];e[t]=function(){var t=o.apply(e,arguments);return t===e&&(n.$_blockLocationChange=!1),t}}if(o.blockBrowserNavigation){n.$_blockLocationChange=!0;var c=["url","path","search","hash","state"];t.forEach(c,r)}return e}];o.directive("blockUiContainer",["blockUIConfig","blockUiContainerLinkFn",function(t,e){return{scope:!0,restrict:"A",templateUrl:t.templateUrl,compile:function(){return e}}}]).factory("blockUiContainerLinkFn",["blockUI","blockUIUtils",function(){return function(t,e){var n=e.inheritedData("block-ui");if(!n)throw new Error("No parent block-ui service instance located.");t.state=n.state()}}]),o.directive("blockUi",["blockUiCompileFn",function(t){return{scope:!0,restrict:"A",compile:t}}]).factory("blockUiCompileFn",["blockUiPreLinkFn",function(t){return function(e){return e.append('

'),{pre:t}}}]).factory("blockUiPreLinkFn",["blockUI","blockUIUtils","blockUIConfig",function(t,e,o){return function(r,c,i){c.hasClass("block-ui")||c.addClass(o.cssClass),i.$observe("blockUiMessageClass",function(t){r.$_blockUiMessageClass=t});var a=i.blockUi||"_"+r.$id,l=t.instances.get(a);if("main"===a)n(r,l,o);else{var s=c.inheritedData("block-ui");s&&(l._parent=s)}r.$on("$destroy",function(){l.release()}),l.addRef(),r.$_blockUiState=l.state(),r.$watch("$_blockUiState.blocking",function(t){c.attr("aria-busy",!!t),c.toggleClass("block-ui-visible",!!t)}),r.$watch("$_blockUiState.blockCount > 0",function(t){c.toggleClass("block-ui-active",!!t)});var u=i.blockUiPattern;if(u){var f=e.buildRegExp(u);l.pattern(f)}c.data("block-ui",l)}}]),o.constant("blockUIConfig",{templateUrl:"angular-block-ui/angular-block-ui.ng.html",delay:250,message:"Loading ...",autoBlock:!0,resetOnException:!0,requestFilter:t.noop,autoInjectBodyBlock:!0,cssClass:"block-ui block-ui-anim-fade",blockBrowserNavigation:!1}),o.factory("blockUIHttpInterceptor",["$q","$injector","blockUIConfig","$templateCache",function(t,e,n,o){function r(){a=a||e.get("blockUI")}function c(t){n.autoBlock&&t&&!t.$_noBlock&&t.$_blocks&&(r(),t.$_blocks.stop())}function i(e){try{c(e.config)}catch(n){console.log("httpRequestError",n)}return t.reject(e)}var a;return{request:function(t){if(n.autoBlock&&("GET"!=t.method||!o.get(t.url))){var e=n.requestFilter(t);e===!1?t.$_noBlock=!0:(r(),t.$_blocks=a.instances.locate(t),t.$_blocks.start(e))}return t},requestError:i,response:function(t){return t&&c(t.config),t},responseError:i}}]),o.factory("blockUI",["blockUIConfig","$timeout","blockUIUtils","$document",function(e,n,o,r){function c(c){var l,u=this,f={id:c,blockCount:0,message:e.message,blocking:!1},k=[];this._id=c,this._refs=0,this.start=function(c){function s(){l=null,f.blocking=!0}c=c||{},t.isString(c)?c={message:c}:t.forEach(a,function(t){if(c[t])throw new Error("The property "+t+" is reserved for the block state.")}),t.extend(f,c),f.message=f.blockCount>0?c.message||f.message||e.message:c.message||e.message,f.blockCount++;var k=t.element(r[0].activeElement);k.length&&o.isElementInBlockScope(k,u)&&(u._restoreFocus=k[0],n(function(){u._restoreFocus&&u._restoreFocus!==i[0]&&u._restoreFocus.blur()})),l||0===e.delay?0===e.delay&&s():l=n(s,e.delay)},this._cancelStartTimeout=function(){l&&(n.cancel(l),l=null)},this.stop=function(){f.blockCount=Math.max(0,--f.blockCount),0===f.blockCount&&u.reset(!0)},this.isBlocking=function(){return f.blocking},this.message=function(t){f.message=t},this.pattern=function(t){return void 0!==t&&(u._pattern=t),u._pattern},this.reset=function(e){if(u._cancelStartTimeout(),f.blockCount=0,f.blocking=!1,u._restoreFocus&&(!r[0].activeElement||r[0].activeElement===i[0])){try{u._restoreFocus.focus()}catch(o){!function(){var t=u._restoreFocus;n(function(){if(t)try{t.focus()}catch(e){}},100)}()}u._restoreFocus=null}try{e&&t.forEach(k,function(t){t()})}finally{k.length=0}},this.done=function(t){k.push(t)},this.state=function(){return f},this.addRef=function(){u._refs+=1},this.release=function(){--u._refs<=0&&s.instances._destroy(u)}}var i=r.find("body"),a=["id","blockCount","blocking"],l=[];l.get=function(t){if(!isNaN(t))throw new Error("BlockUI id cannot be a number");var e=l[t];return e||(e=l[t]=new c(t),l.push(e)),e},l._destroy=function(e){if(t.isString(e)&&(e=l[e]),e){e.reset();var n=o.indexOf(l,e);l.splice(n,1),delete l[e.state().id]}},l.locate=function(t){var e=[];o.forEachFnHook(e,"start"),o.forEachFnHook(e,"stop");for(var n=l.length;n--;){var r=l[n],c=r._pattern;c&&c.test(t.url)&&e.push(r)}return 0===e.length&&e.push(s),e},o.forEachFnHook(l,"reset");var s=l.get("main");return s.addRef(),s.instances=l,s}]),o.factory("blockUIUtils",function(){var e=t.element,n={buildRegExp:function(t){var e,n=t.match(/^\/(.*)\/([gim]*)$/);if(!n)throw Error("Incorrect regular expression format: "+t);return e=new RegExp(n[1],n[2])},forEachFn:function(t,e,n){for(var o=t.length;o--;){var r=t[o];r[e].apply(r,n)}},forEachFnHook:function(t,e){t[e]=function(){n.forEachFn(this,e,arguments)}},isElementInBlockScope:function(t,e){for(var n=t.inheritedData("block-ui");n;){if(n===e)return!0;n=n._parent}return!1},findElement:function(t,o,r){var c=null;if(o(t))c=t;else{var i;i=r?t.parent():t.children();for(var a=i.length;!c&&a--;)c=n.findElement(e(i[a]),o,r)}return c},indexOf:function(t,e,n){for(var o=n||0,r=t.length;r>o;o++)if(t[o]===e)return o;return-1}};return n}),t.module("blockUI").run(["$templateCache",function(t){t.put("angular-block-ui/angular-block-ui.ng.html",'
{{ state.message }}
')}])}(angular); //# sourceMappingURL=angular-block-ui.min.js.map; !function (e, t, n) { "use strict"; !function o(e, t, n) { function a(s, l) { if (!t[s]) { if (!e[s]) { var i = "function" == typeof require && require; if (!l && i) return i(s, !0); if (r) return r(s, !0); var u = new Error("Cannot find module '" + s + "'"); throw u.code = "MODULE_NOT_FOUND", u } var c = t[s] = { exports: {} }; e[s][0].call(c.exports, function (t) { var n = e[s][1][t]; return a(n ? n : t) }, c, c.exports, o, e, t, n) } return t[s].exports } for (var r = "function" == typeof require && require, s = 0; s < n.length; s++)a(n[s]); return a }({ 1: [function (o) { var a, r, s, l, i = function (e) { return e && e.__esModule ? e : { "default": e } }, u = o("./modules/handle-dom"), c = o("./modules/utils"), d = o("./modules/handle-swal-dom"), f = o("./modules/handle-click"), p = o("./modules/handle-key"), m = i(p), v = o("./modules/default-params"), y = i(v), h = o("./modules/set-params"), g = i(h); s = l = function () { function o(e) { var t = s; return t[e] === n ? y["default"][e] : t[e] } var s = arguments[0]; if (u.addClass(t.body, "stop-scrolling"), d.resetInput(), s === n) return c.logStr("SweetAlert expects at least 1 attribute!"), !1; var l = c.extend({}, y["default"]); switch (typeof s) { case "string": l.title = s, l.text = arguments[1] || "", l.type = arguments[2] || ""; break; case "object": if (s.title === n) return c.logStr('Missing "title" argument!'), !1; l.title = s.title; for (var i in y["default"]) l[i] = o(i); l.confirmButtonText = l.showCancelButton ? "Confirm" : y["default"].confirmButtonText, l.confirmButtonText = o("confirmButtonText"), l.doneFunction = arguments[1] || null; break; default: return c.logStr('Unexpected type of argument! Expected "string" or "object", got ' + typeof s), !1 }g["default"](l), d.fixVerticalPosition(), d.openModal(arguments[1]); for (var p = d.getModal(), v = p.querySelectorAll("button"), h = ["onclick", "onmouseover", "onmouseout", "onmousedown", "onmouseup", "onfocus"], b = function (e) { return f.handleButton(e, l, p) }, w = 0; w < v.length; w++)for (var C = 0; C < h.length; C++){ var S = h[C]; v[w][S] = b } d.getOverlay().onclick = b, a = e.onkeydown; var x = function (e) { return m["default"](e, l, p) }; e.onkeydown = x, e.onfocus = function () { setTimeout(function () { r !== n && (r.focus(), r = n) }, 0) } }, s.setDefaults = l.setDefaults = function (e) { if (!e) throw new Error("userParams is required"); if ("object" != typeof e) throw new Error("userParams has to be a object"); c.extend(y["default"], e) }, s.close = l.close = function () { var o = d.getModal(); u.fadeOut(d.getOverlay(), 5), u.fadeOut(o, 5), u.removeClass(o, "showSweetAlert"), u.addClass(o, "hideSweetAlert"), u.removeClass(o, "visible"); var s = o.querySelector(".sa-icon.sa-success"); u.removeClass(s, "animate"), u.removeClass(s.querySelector(".sa-tip"), "animateSuccessTip"), u.removeClass(s.querySelector(".sa-long"), "animateSuccessLong"); var l = o.querySelector(".sa-icon.sa-error"); u.removeClass(l, "animateErrorIcon"), u.removeClass(l.querySelector(".sa-x-mark"), "animateXMark"); var i = o.querySelector(".sa-icon.sa-warning"); return u.removeClass(i, "pulseWarning"), u.removeClass(i.querySelector(".sa-body"), "pulseWarningIns"), u.removeClass(i.querySelector(".sa-dot"), "pulseWarningIns"), setTimeout(function () { var e = o.getAttribute("data-custom-class"); u.removeClass(o, e) }, 300), u.removeClass(t.body, "stop-scrolling"), e.onkeydown = a, e.previousActiveElement && e.previousActiveElement.focus(), r = n, clearTimeout(o.timeout), !0 }, s.showInputError = l.showInputError = function (e) { var t = d.getModal(), n = t.querySelector(".sa-input-error"); u.addClass(n, "show"); var o = t.querySelector(".sa-error-container"); u.addClass(o, "show"), o.querySelector("p").innerHTML = e, t.querySelector("input").focus() }, s.resetInputError = l.resetInputError = function (e) { if (e && 13 === e.keyCode) return !1; var t = d.getModal(), n = t.querySelector(".sa-input-error"); u.removeClass(n, "show"); var o = t.querySelector(".sa-error-container"); u.removeClass(o, "show") }, "undefined" != typeof e ? e.sweetAlert = e.swal = s : c.logStr("SweetAlert is a frontend module!") }, { "./modules/default-params": 2, "./modules/handle-click": 3, "./modules/handle-dom": 4, "./modules/handle-key": 5, "./modules/handle-swal-dom": 6, "./modules/set-params": 8, "./modules/utils": 9 }], 2: [function (e, t, n) { Object.defineProperty(n, "__esModule", { value: !0 }); var o = { title: "", text: "", type: null, allowOutsideClick: !1, showConfirmButton: !0, showCancelButton: !1, closeOnConfirm: !0, closeOnCancel: !0, confirmButtonText: "OK", confirmButtonColor: "#AEDEF4", cancelButtonText: "Cancel", imageUrl: null, imageSize: null, timer: null, customClass: "", html: !1, animation: !0, allowEscapeKey: !0, inputType: "text", inputPlaceholder: "", inputValue: "" }; n["default"] = o, t.exports = n["default"] }, {}], 3: [function (t, n, o) { Object.defineProperty(o, "__esModule", { value: !0 }); var a = t("./utils"), r = (t("./handle-swal-dom"), t("./handle-dom")), s = function (t, n, o) { function s(e) { m && n.confirmButtonColor && (p.style.backgroundColor = e) } var u, c, d, f = t || e.event, p = f.target || f.srcElement, m = -1 !== p.className.indexOf("confirm"), v = -1 !== p.className.indexOf("sweet-overlay"), y = r.hasClass(o, "visible"), h = n.doneFunction && "true" === o.getAttribute("data-has-done-function"); switch (m && n.confirmButtonColor && (u = n.confirmButtonColor, c = a.colorLuminance(u, -.04), d = a.colorLuminance(u, -.14)), f.type) { case "mouseover": s(c); break; case "mouseout": s(u); break; case "mousedown": s(d); break; case "mouseup": s(c); break; case "focus": var g = o.querySelector("button.confirm"), b = o.querySelector("button.cancel"); m ? b.style.boxShadow = "none" : g.style.boxShadow = "none"; break; case "click": var w = o === p, C = r.isDescendant(o, p); if (!w && !C && y && !n.allowOutsideClick) break; m && h && y ? l(o, n) : h && y || v ? i(o, n) : r.isDescendant(o, p) && "BUTTON" === p.tagName && sweetAlert.close() } }, l = function (e, t) { var n = !0; r.hasClass(e, "show-input") && (n = e.querySelector("input").value, n || (n = "")), t.doneFunction(n), t.closeOnConfirm && sweetAlert.close() }, i = function (e, t) { var n = String(t.doneFunction).replace(/\s/g, ""), o = "function(" === n.substring(0, 9) && ")" !== n.substring(9, 10); o && t.doneFunction(!1), t.closeOnCancel && sweetAlert.close() }; o["default"] = { handleButton: s, handleConfirm: l, handleCancel: i }, n.exports = o["default"] }, { "./handle-dom": 4, "./handle-swal-dom": 6, "./utils": 9 }], 4: [function (n, o, a) { Object.defineProperty(a, "__esModule", { value: !0 }); var r = function (e, t) { return new RegExp(" " + t + " ").test(" " + e.className + " ") }, s = function (e, t) { r(e, t) || (e.className += " " + t) }, l = function (e, t) { var n = " " + e.className.replace(/[\t\r\n]/g, " ") + " "; if (r(e, t)) { for (; n.indexOf(" " + t + " ") >= 0;)n = n.replace(" " + t + " ", " "); e.className = n.replace(/^\s+|\s+$/g, "") } }, i = function (e) { var n = t.createElement("div"); return n.appendChild(t.createTextNode(e)), n.innerHTML }, u = function (e) { e.style.opacity = "", e.style.display = "block" }, c = function (e) { if (e && !e.length) return u(e); for (var t = 0; t < e.length; ++t)u(e[t]) }, d = function (e) { e.style.opacity = "", e.style.display = "none" }, f = function (e) { if (e && !e.length) return d(e); for (var t = 0; t < e.length; ++t)d(e[t]) }, p = function (e, t) { for (var n = t.parentNode; null !== n;){ if (n === e) return !0; n = n.parentNode } return !1 }, m = function (e) { e.style.left = "-9999px", e.style.display = "block"; var t, n = e.clientHeight; return t = "undefined" != typeof getComputedStyle ? parseInt(getComputedStyle(e).getPropertyValue("padding-top"), 10) : parseInt(e.currentStyle.padding), e.style.left = "", e.style.display = "none", "-" + parseInt((n + t) / 2) + "px" }, v = function (e, t) { if (+e.style.opacity < 1) { t = t || 16, e.style.opacity = 0, e.style.display = "block"; var n = +new Date, o = function (e) { function t() { return e.apply(this, arguments) } return t.toString = function () { return e.toString() }, t }(function () { e.style.opacity = +e.style.opacity + (new Date - n) / 100, n = +new Date, +e.style.opacity < 1 && setTimeout(o, t) }); o() } e.style.display = "block" }, y = function (e, t) { t = t || 16, e.style.opacity = 1; var n = +new Date, o = function (e) { function t() { return e.apply(this, arguments) } return t.toString = function () { return e.toString() }, t }(function () { e.style.opacity = +e.style.opacity - (new Date - n) / 100, n = +new Date, +e.style.opacity > 0 ? setTimeout(o, t) : e.style.display = "none" }); o() }, h = function (n) { if ("function" == typeof MouseEvent) { var o = new MouseEvent("click", { view: e, bubbles: !1, cancelable: !0 }); n.dispatchEvent(o) } else if (t.createEvent) { var a = t.createEvent("MouseEvents"); a.initEvent("click", !1, !1), n.dispatchEvent(a) } else t.createEventObject ? n.fireEvent("onclick") : "function" == typeof n.onclick && n.onclick() }, g = function (t) { "function" == typeof t.stopPropagation ? (t.stopPropagation(), t.preventDefault()) : e.event && e.event.hasOwnProperty("cancelBubble") && (e.event.cancelBubble = !0) }; a.hasClass = r, a.addClass = s, a.removeClass = l, a.escapeHtml = i, a._show = u, a.show = c, a._hide = d, a.hide = f, a.isDescendant = p, a.getTopMargin = m, a.fadeIn = v, a.fadeOut = y, a.fireClick = h, a.stopEventPropagation = g }, {}], 5: [function (t, o, a) { Object.defineProperty(a, "__esModule", { value: !0 }); var r = t("./handle-dom"), s = t("./handle-swal-dom"), l = function (t, o, a) { var l = t || e.event, i = l.keyCode || l.which, u = a.querySelector("button.confirm"), c = a.querySelector("button.cancel"), d = a.querySelectorAll("button[tabindex]"); if (-1 !== [9, 13, 32, 27].indexOf(i)) { for (var f = l.target || l.srcElement, p = -1, m = 0; m < d.length; m++)if (f === d[m]) { p = m; break } 9 === i ? (f = -1 === p ? u : p === d.length - 1 ? d[0] : d[p + 1], r.stopEventPropagation(l), f.focus(), o.confirmButtonColor && s.setFocusStyle(f, o.confirmButtonColor)) : 13 === i ? ("INPUT" === f.tagName && (f = u, u.focus()), f = -1 === p ? u : n) : 27 === i && o.allowEscapeKey === !0 ? (f = c, r.fireClick(f, l)) : f = n } }; a["default"] = l, o.exports = a["default"] }, { "./handle-dom": 4, "./handle-swal-dom": 6 }], 6: [function (n, o, a) { var r = function (e) { return e && e.__esModule ? e : { "default": e } }; Object.defineProperty(a, "__esModule", { value: !0 }); var s = n("./utils"), l = n("./handle-dom"), i = n("./default-params"), u = r(i), c = n("./injected-html"), d = r(c), f = ".sweet-alert", p = ".sweet-overlay", m = function () { var e = t.createElement("div"); for (e.innerHTML = d["default"]; e.firstChild;)t.body.appendChild(e.firstChild) }, v = function (e) { function t() { return e.apply(this, arguments) } return t.toString = function () { return e.toString() }, t }(function () { var e = t.querySelector(f); return e || (m(), e = v()), e }), y = function () { var e = v(); return e ? e.querySelector("input") : void 0 }, h = function () { return t.querySelector(p) }, g = function (e, t) { var n = s.hexToRgb(t); e.style.boxShadow = "0 0 2px rgba(" + n + ", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)" }, b = function (n) { var o = v(); l.fadeIn(h(), 10), l.show(o), l.addClass(o, "showSweetAlert"), l.removeClass(o, "hideSweetAlert"), e.previousActiveElement = t.activeElement; var a = o.querySelector("button.confirm"); a.focus(), setTimeout(function () { l.addClass(o, "visible") }, 500); var r = o.getAttribute("data-timer"); if ("null" !== r && "" !== r) { var s = n; o.timeout = setTimeout(function () { var e = (s || null) && "true" === o.getAttribute("data-has-done-function"); e ? s(null) : sweetAlert.close() }, r) } }, w = function () { var e = v(), t = y(); l.removeClass(e, "show-input"), t.value = u["default"].inputValue, t.setAttribute("type", u["default"].inputType), t.setAttribute("placeholder", u["default"].inputPlaceholder), C() }, C = function (e) { if (e && 13 === e.keyCode) return !1; var t = v(), n = t.querySelector(".sa-input-error"); l.removeClass(n, "show"); var o = t.querySelector(".sa-error-container"); l.removeClass(o, "show") }, S = function () { var e = v(); e.style.marginTop = l.getTopMargin(v()) }; a.sweetAlertInitialize = m, a.getModal = v, a.getOverlay = h, a.getInput = y, a.setFocusStyle = g, a.openModal = b, a.resetInput = w, a.resetInputError = C, a.fixVerticalPosition = S }, { "./default-params": 2, "./handle-dom": 4, "./injected-html": 7, "./utils": 9 }], 7: [function (e, t, n) { Object.defineProperty(n, "__esModule", { value: !0 }); var o = '
\n \n \n \n \n
\n \n \n
\n \n \n\n
\n
\n

Title

\n

Text

\n
\n \n
\n
\n
!
\n

Not valid!

\n
\n \n \n
'; n["default"] = o, t.exports = n["default"] }, {}], 8: [function (e, t, o) { Object.defineProperty(o, "__esModule", { value: !0 }); var a = e("./utils"), r = e("./handle-swal-dom"), s = e("./handle-dom"), l = ["error", "warning", "info", "success", "input", "prompt"], i = function (e) { var t = r.getModal(), o = t.querySelector("h2"), i = t.querySelector("p"), u = t.querySelector("button.cancel"), c = t.querySelector("button.confirm"); if (o.innerHTML = e.html ? e.title : s.escapeHtml(e.title).split("\n").join("
"), i.innerHTML = e.html ? e.text : s.escapeHtml(e.text || "").split("\n").join("
"), e.text && s.show(i), e.customClass) s.addClass(t, e.customClass), t.setAttribute("data-custom-class", e.customClass); else { var d = t.getAttribute("data-custom-class"); s.removeClass(t, d), t.setAttribute("data-custom-class", "") } if (s.hide(t.querySelectorAll(".sa-icon")), e.type && !a.isIE8()) { var f = function () { for (var o = !1, a = 0; a < l.length; a++)if (e.type === l[a]) { o = !0; break } if (!o) return logStr("Unknown alert type: " + e.type), { v: !1 }; var i = ["success", "error", "warning", "info"], u = n; -1 !== i.indexOf(e.type) && (u = t.querySelector(".sa-icon.sa-" + e.type), s.show(u)); var c = r.getInput(); switch (e.type) { case "success": s.addClass(u, "animate"), s.addClass(u.querySelector(".sa-tip"), "animateSuccessTip"), s.addClass(u.querySelector(".sa-long"), "animateSuccessLong"); break; case "error": s.addClass(u, "animateErrorIcon"), s.addClass(u.querySelector(".sa-x-mark"), "animateXMark"); break; case "warning": s.addClass(u, "pulseWarning"), s.addClass(u.querySelector(".sa-body"), "pulseWarningIns"), s.addClass(u.querySelector(".sa-dot"), "pulseWarningIns"); break; case "input": case "prompt": c.setAttribute("type", e.inputType), c.value = e.inputValue, c.setAttribute("placeholder", e.inputPlaceholder), s.addClass(t, "show-input"), setTimeout(function () { c.focus(), c.addEventListener("keyup", swal.resetInputError) }, 400) } }(); if ("object" == typeof f) return f.v } if (e.imageUrl) { var p = t.querySelector(".sa-icon.sa-custom"); p.style.backgroundImage = "url(" + e.imageUrl + ")", s.show(p); var m = 80, v = 80; if (e.imageSize) { var y = e.imageSize.toString().split("x"), h = y[0], g = y[1]; h && g ? (m = h, v = g) : logStr("Parameter imageSize expects value with format WIDTHxHEIGHT, got " + e.imageSize) } p.setAttribute("style", p.getAttribute("style") + "width:" + m + "px; height:" + v + "px") } t.setAttribute("data-has-cancel-button", e.showCancelButton), e.showCancelButton ? u.style.display = "inline-block" : s.hide(u), t.setAttribute("data-has-confirm-button", e.showConfirmButton), e.showConfirmButton ? c.style.display = "inline-block" : s.hide(c), e.cancelButtonText && (u.innerHTML = s.escapeHtml(e.cancelButtonText)), e.confirmButtonText && (c.innerHTML = s.escapeHtml(e.confirmButtonText)), e.confirmButtonColor && (c.style.backgroundColor = e.confirmButtonColor, r.setFocusStyle(c, e.confirmButtonColor)), t.setAttribute("data-allow-outside-click", e.allowOutsideClick); var b = e.doneFunction ? !0 : !1; t.setAttribute("data-has-done-function", b), e.animation ? "string" == typeof e.animation ? t.setAttribute("data-animation", e.animation) : t.setAttribute("data-animation", "pop") : t.setAttribute("data-animation", "none"), t.setAttribute("data-timer", e.timer) }; o["default"] = i, t.exports = o["default"] }, { "./handle-dom": 4, "./handle-swal-dom": 6, "./utils": 9 }], 9: [function (t, n, o) { Object.defineProperty(o, "__esModule", { value: !0 }); var a = function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); return e }, r = function (e) { var t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e); return t ? parseInt(t[1], 16) + ", " + parseInt(t[2], 16) + ", " + parseInt(t[3], 16) : null }, s = function () { return e.attachEvent && !e.addEventListener }, l = function (t) { e.console && e.console.log("SweetAlert: " + t) }, i = function (e, t) { e = String(e).replace(/[^0-9a-f]/gi, ""), e.length < 6 && (e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]), t = t || 0; var n, o, a = "#"; for (o = 0; 3 > o; o++)n = parseInt(e.substr(2 * o, 2), 16), n = Math.round(Math.min(Math.max(0, n + n * t), 255)).toString(16), a += ("00" + n).substr(n.length); return a }; o.extend = a, o.hexToRgb = r, o.isIE8 = s, o.logStr = l, o.colorLuminance = i }, {}] }, {}, [1]), "function" == typeof define && define.amd ? define(function () { return sweetAlert }) : "undefined" != typeof module && module.exports && (module.exports = sweetAlert) }(window, document); ; (function () { var warnTextNode // extend swal with a function for adding forms swal.withForm = function () { // initialize with field values supplied on `swal.withForm` call var swalForm = new SwalForm(arguments[0].formFields) // make form values inserted by the user available at `doneFunction` swalForm.addWayToGetFormValuesInDoneFunction(arguments) // Prepare arguments with the form html and html flag arguments[0].text = swalForm.generateHtmlForm(arguments[0].text) arguments[0].html = true // forward arguments swal.apply({}, arguments) swalForm.allowClickingDirectlyOnInputs() swalForm.focusOnFirstInput() swalForm.markFirstRadioButtons() swalForm.addTabOrder() } // constructor for helper object function SwalForm(formFields) { this.formFields = formFields } // helper methods extend(SwalForm.prototype, { formClass: 'swal-form', generateHtmlForm: function (text) { var form = { clazz: this.formClass, innerHtml: this.formFields.map(toFormTag.bind(this)).reduce(toSingleString) } return t("

" + text + "

{innerHtml}
", form) function toFormTag(field) { var input = Input(field) // to separate groups of checkboxes and radiobuttons in different lines var conditionalLineBreak = (input.isRadioOrCheckbox() && this.lastFieldName !== field.name) ? '
' : '' this.lastFieldName = field.name return conditionalLineBreak + input.toHtml() } }, addWayToGetFormValuesInDoneFunction: function (swalArgs) { var swalFormInstance = this var doneFunction = swalArgs[1] swalArgs[1] = function (isConfirm) { // make form values available at `this` variable inside doneFunction this.swalForm = swalFormInstance.getFormValues(isConfirm) if (doneFunction.apply(this, arguments) !== false) { // clean form to not interfere in normals sweet alerts document.querySelector('.swal-form').innerHTML = '' } } }, getFormValues: function (isConfirm) { var inputHtmlCollection = document.getElementsByClassName('swal-form-field-custom') var inputArray = [].slice.call(inputHtmlCollection) return inputArray .filter(uncheckedRadiosAndCheckboxes) .map(toValuableAttrs) .reduce(toSingleObject, {}) function uncheckedRadiosAndCheckboxes(tag) { return (isRadioOrCheckbox(tag) ? tag.checked : true) } function toValuableAttrs(tag) { var attr = {} attr[tag.id || tag.name] = tag.value if (isConfirm && tag.dataset.swalFormsRequired && !tag.value) { var warnMsg = 'Missing required attribute: ' + (tag.name || tag.id) warnTextNode && warnTextNode.remove && warnTextNode.remove() warnTextNode = document.createTextNode(warnMsg) document.querySelector('.swal-form').appendChild(warnTextNode) throw new Error(warnMsg) } return attr } function toSingleObject(obj1, obj2) { return extendPreventingOverrides(obj1, obj2) // for checkboxes we want to obtain all selected values in an array function extendPreventingOverrides(a, b) { Object.keys(b).forEach(addContentFromBtoA) return a function addContentFromBtoA(key) { if (a.hasOwnProperty(key)) { mergeIntoAnArray(a, b, key) } else { a[key] = b[key] } } } function mergeIntoAnArray(a, b, key) { if (Array.isArray(a[key])) { a[key].push(b[key]) } else { a[key] = [a[key], b[key]] } } } }, allowClickingDirectlyOnInputs: function () { // sweet-alert attaches an onblur handler which prevents clicks on of non // button elements until click is made on the modal document.querySelector('.sweet-alert button.confirm').onblur = function () { } document.querySelector('.sweet-alert button.cancel').onblur = function () { } }, getSelector: function () { var firstField = this.formFields[0] return (firstField.id ? t('#{id}', firstField) : t("[name='{name}']", firstField)) }, focusOnFirstInput: function () { setTimeout(focus.bind(this)) function focus() { document.querySelector(this.getSelector()).focus() } }, markFirstRadioButtons: function () { setTimeout(markAsChecked.bind(this)) function markAsChecked() { document.querySelector(this.getSelector()).checked = true } }, addTabOrder: function () { var formFields = Array.prototype.slice.call(document.querySelectorAll('.swal-form .swal-form-field')) formFields.forEach(addToTabNavigation) function addToTabNavigation(formField, index) { var myInput = formField var nextInput = formFields[index + 1] var keyHandler = function (e) { var TABKEY = 9 if (e.keyCode === TABKEY) { var next = this setTimeout(function () { next.focus() }) } } if (myInput.addEventListener) { myInput.addEventListener('keydown', keyHandler.bind(nextInput), false) } else if (myInput.attachEvent) { myInput.attachEvent('onkeydown', keyHandler.bind(nextInput)) /* damn IE hack */ } } } }) function isRadioOrCheckbox(tag) { return tag.type === 'radio' || tag.type === 'checkbox' } function extend(o1, o2) { for (var key in o2) { if (o2.hasOwnProperty(key)) { o1[key] = o2[key] } } return o1 } function Input(field) { var input = { id: field.id || '', name: field.name || '', label: field.label || '', clazz: field.clazz || '', placeholder: field.placeholder || camelCaseToHuman(field.id), value: field.value || '', type: field.type || 'text', options: field.options || [], required: field.required, isRadioOrCheckbox: function () { return isRadioOrCheckbox(input) }, toHtml: function () { var inputTag if (input.type !== 'select') { inputTag = t("', input) } else { inputTag = t("' } var labelTag = t("", input) return labelTag + inputTag function toHtmlOptions(optionsString, option) { option.selected = option.selected ? ' selected' : '' return optionsString + t("", option) } } } // Should this label be set to title or id instead of value? input.label = input.isRadioOrCheckbox() && input.label === '' ? input.value : input.label input.clazz += input.isRadioOrCheckbox() ? ' patch-swal-styles-for-inputs' : 'nice-input' return input function camelCaseToHuman(arg) { if (arg) { return arg .replace(/([A-Z])/g, ' $1') // insert a space before all caps .replace(/^./, function (str) { return str.toUpperCase() }) // uppercase the first character } else { return '' } } } // string interpolation hack function t(template, data) { for (var key in data) { template = template.replace(new RegExp('{' + key + '}', 'g'), data[key] || '') } return template } function toSingleString(s1, s2) { return s1 + s2 } swal.withFormAsync = function (options) { return new Promise(function (resolve, reject) { swal.withForm(options, function (isConfirm) { this._isConfirm = isConfirm resolve(this) }) }) } })(); /** @fileOverview @toc */ (function (root, factory) { "use strict"; /*global define*/ if (typeof define === 'function' && define.amd) { define(['angular', 'sweetalert'], factory); // AMD } else if (typeof module === 'object' && module.exports) { module.exports = factory(require('angular'), require('sweetalert')); // Node } else { factory(root.angular, root.swal); // Browser } }(this, function (angular, swal) { "use strict"; angular.module('oitozero.ngSweetAlert', []) .factory('SweetAlert', [ '$rootScope', function ( $rootScope ) { //public methods var self = { swal: function ( arg1, arg2, arg3 ) { $rootScope.$evalAsync(function(){ if( typeof(arg2) === 'function' ) { swal( arg1, function(isConfirm){ $rootScope.$evalAsync( function(){ arg2(isConfirm); }); }, arg3 ); } else { swal( arg1, arg2, arg3 ); } }); }, success: function(title, message) { $rootScope.$evalAsync(function(){ swal( title, message, 'success' ); }); }, error: function(title, message) { $rootScope.$evalAsync(function(){ swal( title, message, 'error' ); }); }, warning: function(title, message) { $rootScope.$evalAsync(function(){ swal( title, message, 'warning' ); }); }, info: function(title, message) { $rootScope.$evalAsync(function(){ swal( title, message, 'info' ); }); }, showInputError: function(message) { $rootScope.$evalAsync(function(){ swal.showInputError( message ); }); }, close: function() { $rootScope.$evalAsync(function(){ swal.close(); }); } }; return self; }]); })); ; /* * AngularJs Fullcalendar Wrapper for the JQuery FullCalendar * API @ http://arshaw.com/fullcalendar/ * * Angular Calendar Directive that takes in the [eventSources] nested array object as the ng-model and watches it deeply changes. * Can also take in multiple event urls as a source object(s) and feed the events per view. * The calendar will watch any eventSource array and update itself when a change is made. * */ angular.module('ui.calendar', []) .constant('uiCalendarConfig', { calendars : {} }) .controller('uiCalendarCtrl', ['$scope', '$locale', function ($scope, $locale) { var sources = $scope.eventSources; var extraEventSignature = $scope.calendarWatchEvent ? $scope.calendarWatchEvent : angular.noop; var wrapFunctionWithScopeApply = function (functionToWrap) { return function () { // This may happen outside of angular context, so create one if outside. if ($scope.$root.$$phase) { return functionToWrap.apply(this, arguments); } var args = arguments; var that = this; return $scope.$root.$apply( function () { return functionToWrap.apply(that, args); } ); }; }; var eventSerialId = 1; // @return {String} fingerprint of the event object and its properties this.eventFingerprint = function (e) { if (!e._id) { e._id = eventSerialId++; } var extraSignature = extraEventSignature({ event : e }) || ''; var start = moment.isMoment(e.start) ? e.start.unix() : (e.start ? moment(e.start).unix() : ''); var end = moment.isMoment(e.end) ? e.end.unix() : (e.end ? moment(e.end).unix() : ''); // This extracts all the information we need from the event. http://jsperf.com/angular-calendar-events-fingerprint/3 return [e._id, e.id || '', e.title || '', e.url || '', start, end, e.allDay || '', e.className || '', extraSignature].join(''); }; var sourceSerialId = 1; var sourceEventsSerialId = 1; // @return {String} fingerprint of the source object and its events array this.sourceFingerprint = function (source) { var fp = '' + (source.__id || (source.__id = sourceSerialId++)); var events = angular.isObject(source) && source.events; if (events) { fp = fp + '-' + (events.__id || (events.__id = sourceEventsSerialId++)); } return fp; }; // @return {Array} all events from all sources this.allEvents = function () { return Array.prototype.concat.apply( [], (sources || []).reduce( function (previous, source) { if (angular.isArray(source)) { previous.push(source); } else if (angular.isObject(source) && angular.isArray(source.events)) { var extEvent = Object.keys(source).filter( function (key) { return (key !== '_id' && key !== 'events'); } ); source.events.forEach( function (event) { angular.extend(event, extEvent); } ); previous.push(source.events); } return previous; }, [] ) ); }; // Track changes in array of objects by assigning id tokens to each element and watching the scope for changes in the tokens // @param {Array|Function} arraySource array of objects to watch // @param tokenFn {Function} that returns the token for a given object // @return {Object} // subscribe: function(scope, function(newTokens, oldTokens)) // called when source has changed. return false to prevent individual callbacks from firing // onAdded/Removed/Changed: // when set to a callback, called each item where a respective change is detected this.changeWatcher = function (arraySource, tokenFn) { var self; var getTokens = function () { return ((angular.isFunction(arraySource) ? arraySource() : arraySource) || []).reduce( function (rslt, el) { var token = tokenFn(el); map[token] = el; rslt.push(token); return rslt; }, [] ); }; // @param {Array} a // @param {Array} b // @return {Array} elements in that are in a but not in b // @example // subtractAsSets([6, 100, 4, 5], [4, 5, 7]) // [6, 100] var subtractAsSets = function (a, b) { var obj = (b || []).reduce( function (rslt, val) { rslt[val] = true; return rslt; }, Object.create(null) ); return (a || []).filter( function (val) { return !obj[val]; } ); }; // Map objects to tokens and vice-versa var map = {}; // Compare newTokens to oldTokens and call onAdded, onRemoved, and onChanged handlers for each affected event respectively. var applyChanges = function (newTokens, oldTokens) { var i; var token; var replacedTokens = {}; var removedTokens = subtractAsSets(oldTokens, newTokens); for (i = 0; i < removedTokens.length; i++) { var removedToken = removedTokens[i]; var el = map[removedToken]; delete map[removedToken]; var newToken = tokenFn(el); // if the element wasn't removed but simply got a new token, its old token will be different from the current one if (newToken === removedToken) { self.onRemoved(el); } else { replacedTokens[newToken] = removedToken; self.onChanged(el); } } var addedTokens = subtractAsSets(newTokens, oldTokens); for (i = 0; i < addedTokens.length; i++) { token = addedTokens[i]; if (!replacedTokens[token]) { self.onAdded(map[token]); } } }; self = { subscribe : function (scope, onArrayChanged) { scope.$watch(getTokens, function (newTokens, oldTokens) { var notify = !(onArrayChanged && onArrayChanged(newTokens, oldTokens) === false); if (notify) { applyChanges(newTokens, oldTokens); } }, true); }, onAdded : angular.noop, onChanged : angular.noop, onRemoved : angular.noop }; return self; }; this.getFullCalendarConfig = function (calendarSettings, uiCalendarConfig) { var config = {}; angular.extend(config, uiCalendarConfig); angular.extend(config, calendarSettings); angular.forEach(config, function (value, key) { if (typeof value === 'function') { config[key] = wrapFunctionWithScopeApply(config[key]); } }); return config; }; this.getLocaleConfig = function (fullCalendarConfig) { if (!fullCalendarConfig.lang && !fullCalendarConfig.locale || fullCalendarConfig.useNgLocale) { // Configure to use locale names by default var tValues = function (data) { // convert {0: "Jan", 1: "Feb", ...} to ["Jan", "Feb", ...] return (Object.keys(data) || []).reduce( function (rslt, el) { rslt.push(data[el]); return rslt; }, [] ); }; var dtf = $locale.DATETIME_FORMATS; return { monthNames : tValues(dtf.MONTH), monthNamesShort : tValues(dtf.SHORTMONTH), dayNames : tValues(dtf.DAY), dayNamesShort : tValues(dtf.SHORTDAY) }; } return {}; }; } ]) .directive('uiCalendar', ['uiCalendarConfig', function (uiCalendarConfig) { return { restrict : 'A', scope : { eventSources : '=ngModel', calendarWatchEvent : '&' }, controller : 'uiCalendarCtrl', link : function (scope, elm, attrs, controller) { var sources = scope.eventSources; var sourcesChanged = false; var calendar; var eventSourcesWatcher = controller.changeWatcher(sources, controller.sourceFingerprint); var eventsWatcher = controller.changeWatcher(controller.allEvents, controller.eventFingerprint); var options = null; function getOptions () { var calendarSettings = attrs.uiCalendar ? scope.$parent.$eval(attrs.uiCalendar) : {}; var fullCalendarConfig = controller.getFullCalendarConfig(calendarSettings, uiCalendarConfig); var localeFullCalendarConfig = controller.getLocaleConfig(fullCalendarConfig); angular.extend(localeFullCalendarConfig, fullCalendarConfig); options = { eventSources : sources }; angular.extend(options, localeFullCalendarConfig); //remove calendars from options options.calendars = null; var options2 = {}; for (var o in options) { if (o !== 'eventSources') { options2[o] = options[o]; } } return JSON.stringify(options2); } scope.destroyCalendar = function () { if (calendar && calendar.fullCalendar) { calendar.fullCalendar('destroy'); } if (attrs.calendar) { calendar = uiCalendarConfig.calendars[attrs.calendar] = angular.element(elm).html(''); } else { calendar = angular.element(elm).html(''); } }; scope.initCalendar = function () { if (!calendar) { calendar = $(elm).html(''); } calendar.fullCalendar(options); if (attrs.calendar) { uiCalendarConfig.calendars[attrs.calendar] = calendar; } }; scope.$on('$destroy', function () { scope.destroyCalendar(); }); eventSourcesWatcher.onAdded = function (source) { if (calendar && calendar.fullCalendar) { calendar.fullCalendar(options); if (attrs.calendar) { uiCalendarConfig.calendars[attrs.calendar] = calendar; } calendar.fullCalendar('addEventSource', source); sourcesChanged = true; } }; eventSourcesWatcher.onRemoved = function (source) { if (calendar && calendar.fullCalendar) { calendar.fullCalendar('removeEventSource', source); sourcesChanged = true; } }; eventSourcesWatcher.onChanged = function () { if (calendar && calendar.fullCalendar) { calendar.fullCalendar('refetchEvents'); sourcesChanged = true; } }; eventsWatcher.onAdded = function (event) { if (calendar && calendar.fullCalendar) { calendar.fullCalendar('renderEvent', event, !!event.stick); } }; eventsWatcher.onRemoved = function (event) { if (calendar && calendar.fullCalendar) { calendar.fullCalendar('removeEvents', event._id); } }; eventsWatcher.onChanged = function (event) { if (calendar && calendar.fullCalendar) { var clientEvents = calendar.fullCalendar('clientEvents', event._id); for (var i = 0; i < clientEvents.length; i++) { var clientEvent = clientEvents[i]; clientEvent = angular.extend(clientEvent, event); calendar.fullCalendar('updateEvent', clientEvent); } } }; eventSourcesWatcher.subscribe(scope); eventsWatcher.subscribe(scope, function () { if (sourcesChanged === true) { sourcesChanged = false; // return false to prevent onAdded/Removed/Changed handlers from firing in this case return false; } }); scope.$watch(getOptions, function (newValue, oldValue) { if (newValue !== oldValue) { scope.destroyCalendar(); scope.initCalendar(); } else if ((newValue && angular.isUndefined(calendar))) { scope.initCalendar(); } }); } }; } ] ); ; /*! * ui-select * http://github.com/angular-ui/ui-select * Version: 0.19.7 - 2017-04-15T14:28:36.649Z * License: MIT */ (function () { "use strict"; var KEY = { TAB: 9, ENTER: 13, ESC: 27, SPACE: 32, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, SHIFT: 16, CTRL: 17, ALT: 18, PAGE_UP: 33, PAGE_DOWN: 34, HOME: 36, END: 35, BACKSPACE: 8, DELETE: 46, COMMAND: 91, MAP: { 91: "COMMAND", 8: "BACKSPACE", 9: "TAB", 13: "ENTER", 16: "SHIFT", 17: "CTRL", 18: "ALT", 19: "PAUSEBREAK", 20: "CAPSLOCK", 27: "ESC", 32: "SPACE", 33: "PAGE_UP", 34: "PAGE_DOWN", 35: "END", 36: "HOME", 37: "LEFT", 38: "UP", 39: "RIGHT", 40: "DOWN", 43: "+", 44: "PRINTSCREEN", 45: "INSERT", 46: "DELETE", 48: "0", 49: "1", 50: "2", 51: "3", 52: "4", 53: "5", 54: "6", 55: "7", 56: "8", 57: "9", 59: ";", 61: "=", 65: "A", 66: "B", 67: "C", 68: "D", 69: "E", 70: "F", 71: "G", 72: "H", 73: "I", 74: "J", 75: "K", 76: "L", 77: "M", 78: "N", 79: "O", 80: "P", 81: "Q", 82: "R", 83: "S", 84: "T", 85: "U", 86: "V", 87: "W", 88: "X", 89: "Y", 90: "Z", 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7", 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111: "/", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "NUMLOCK", 145: "SCROLLLOCK", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'" }, isControl: function (e) { var k = e.which; switch (k) { case KEY.COMMAND: case KEY.SHIFT: case KEY.CTRL: case KEY.ALT: return true; } if (e.metaKey || e.ctrlKey || e.altKey) return true; return false; }, isFunctionKey: function (k) { k = k.which ? k.which : k; return k >= 112 && k <= 123; }, isVerticalMovement: function (k) { return ~[KEY.UP, KEY.DOWN].indexOf(k); }, isHorizontalMovement: function (k) { return ~[KEY.LEFT, KEY.RIGHT, KEY.BACKSPACE, KEY.DELETE].indexOf(k); }, toSeparator: function (k) { var sep = { ENTER: "\n", TAB: "\t", SPACE: " " }[k]; if (sep) return sep; // return undefined for special keys other than enter, tab or space. // no way to use them to cut strings. return KEY[k] ? undefined : k; } }; function isNil(value) { return angular.isUndefined(value) || value === null; } /** * Add querySelectorAll() to jqLite. * * jqLite find() is limited to lookups by tag name. * TODO This will change with future versions of AngularJS, to be removed when this happens * * See jqLite.find - why not use querySelectorAll? https://github.com/angular/angular.js/issues/3586 * See feat(jqLite): use querySelectorAll instead of getElementsByTagName in jqLite.find https://github.com/angular/angular.js/pull/3598 */ if (angular.element.prototype.querySelectorAll === undefined) { angular.element.prototype.querySelectorAll = function (selector) { return angular.element(this[0].querySelectorAll(selector)); }; } /** * Add closest() to jqLite. */ if (angular.element.prototype.closest === undefined) { angular.element.prototype.closest = function (selector) { var elem = this[0]; var matchesSelector = elem.matches || elem.webkitMatchesSelector || elem.mozMatchesSelector || elem.msMatchesSelector; while (elem) { if (matchesSelector.bind(elem)(selector)) { return elem; } else { elem = elem.parentElement; } } return false; }; } var latestId = 0; var uis = angular.module('ui.select', []) .constant('uiSelectConfig', { theme: 'bootstrap', searchEnabled: true, sortable: false, placeholder: '', // Empty by default, like HTML tag "); $compile(focusser)(scope); $select.focusser = focusser; //Input that will handle focus $select.focusInput = focusser; element.parent().append(focusser); focusser.bind("focus", function () { scope.$evalAsync(function () { $select.focus = true; }); }); focusser.bind("blur", function () { scope.$evalAsync(function () { $select.focus = false; }); }); focusser.bind("keydown", function (e) { if (e.which === KEY.BACKSPACE && $select.backspaceReset !== false) { e.preventDefault(); e.stopPropagation(); $select.select(undefined); scope.$apply(); return; } if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC) { return; } if (e.which == KEY.DOWN || e.which == KEY.UP || e.which == KEY.ENTER || e.which == KEY.SPACE) { e.preventDefault(); e.stopPropagation(); $select.activate(); } scope.$digest(); }); focusser.bind("keyup input", function (e) { if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC || e.which == KEY.ENTER || e.which === KEY.BACKSPACE) { return; } $select.activate(focusser.val()); //User pressed some regular key, so we pass it to the search input focusser.val(''); scope.$digest(); }); } }; }]); // Make multiple matches sortable uis.directive('uiSelectSort', ['$timeout', 'uiSelectConfig', 'uiSelectMinErr', function ($timeout, uiSelectConfig, uiSelectMinErr) { return { require: ['^^uiSelect', '^ngModel'], link: function (scope, element, attrs, ctrls) { if (scope[attrs.uiSelectSort] === null) { throw uiSelectMinErr('sort', 'Expected a list to sort'); } var $select = ctrls[0]; var $ngModel = ctrls[1]; var options = angular.extend({ axis: 'horizontal' }, scope.$eval(attrs.uiSelectSortOptions)); var axis = options.axis; var draggingClassName = 'dragging'; var droppingClassName = 'dropping'; var droppingBeforeClassName = 'dropping-before'; var droppingAfterClassName = 'dropping-after'; scope.$watch(function () { return $select.sortable; }, function (newValue) { if (newValue) { element.attr('draggable', true); } else { element.removeAttr('draggable'); } }); element.on('dragstart', function (event) { element.addClass(draggingClassName); (event.dataTransfer || event.originalEvent.dataTransfer).setData('text', scope.$index.toString()); }); element.on('dragend', function () { removeClass(draggingClassName); }); var move = function (from, to) { /*jshint validthis: true */ this.splice(to, 0, this.splice(from, 1)[0]); }; var removeClass = function (className) { angular.forEach($select.$element.querySelectorAll('.' + className), function (el) { angular.element(el).removeClass(className); }); }; var dragOverHandler = function (event) { event.preventDefault(); var offset = axis === 'vertical' ? event.offsetY || event.layerY || (event.originalEvent ? event.originalEvent.offsetY : 0) : event.offsetX || event.layerX || (event.originalEvent ? event.originalEvent.offsetX : 0); if (offset < (this[axis === 'vertical' ? 'offsetHeight' : 'offsetWidth'] / 2)) { removeClass(droppingAfterClassName); element.addClass(droppingBeforeClassName); } else { removeClass(droppingBeforeClassName); element.addClass(droppingAfterClassName); } }; var dropTimeout; var dropHandler = function (event) { event.preventDefault(); var droppedItemIndex = parseInt((event.dataTransfer || event.originalEvent.dataTransfer).getData('text'), 10); // prevent event firing multiple times in firefox $timeout.cancel(dropTimeout); dropTimeout = $timeout(function () { _dropHandler(droppedItemIndex); }, 20); }; var _dropHandler = function (droppedItemIndex) { var theList = scope.$eval(attrs.uiSelectSort); var itemToMove = theList[droppedItemIndex]; var newIndex = null; if (element.hasClass(droppingBeforeClassName)) { if (droppedItemIndex < scope.$index) { newIndex = scope.$index - 1; } else { newIndex = scope.$index; } } else { if (droppedItemIndex < scope.$index) { newIndex = scope.$index; } else { newIndex = scope.$index + 1; } } move.apply(theList, [droppedItemIndex, newIndex]); $ngModel.$setViewValue(Date.now()); scope.$apply(function () { scope.$emit('uiSelectSort:change', { array: theList, item: itemToMove, from: droppedItemIndex, to: newIndex }); }); removeClass(droppingClassName); removeClass(droppingBeforeClassName); removeClass(droppingAfterClassName); element.off('drop', dropHandler); }; element.on('dragenter', function () { if (element.hasClass(draggingClassName)) { return; } element.addClass(droppingClassName); element.on('dragover', dragOverHandler); element.on('drop', dropHandler); }); element.on('dragleave', function (event) { if (event.target != element) { return; } removeClass(droppingClassName); removeClass(droppingBeforeClassName); removeClass(droppingAfterClassName); element.off('dragover', dragOverHandler); element.off('drop', dropHandler); }); } }; }]); uis.directive('uisOpenClose', ['$parse', '$timeout', function ($parse, $timeout) { return { restrict: 'A', require: 'uiSelect', link: function (scope, element, attrs, $select) { $select.onOpenCloseCallback = $parse(attrs.uisOpenClose); scope.$watch('$select.open', function (isOpen, previousState) { if (isOpen !== previousState) { $timeout(function () { $select.onOpenCloseCallback(scope, { isOpen: isOpen }); }); } }); } }; }]); /** * Parses "repeat" attribute. * * Taken from AngularJS ngRepeat source code * See https://github.com/angular/angular.js/blob/v1.2.15/src/ng/directive/ngRepeat.js#L211 * * Original discussion about parsing "repeat" attribute instead of fully relying on ng-repeat: * https://github.com/angular-ui/ui-select/commit/5dd63ad#commitcomment-5504697 */ uis.service('uisRepeatParser', ['uiSelectMinErr', '$parse', function (uiSelectMinErr, $parse) { var self = this; /** * Example: * expression = "address in addresses | filter: {street: $select.search} track by $index" * itemName = "address", * source = "addresses | filter: {street: $select.search}", * trackByExp = "$index", */ self.parse = function (expression) { var match; //var isObjectCollection = /\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)/.test(expression); // If an array is used as collection // if (isObjectCollection){ // 000000000000000000000000000000111111111000000000000000222222222222220033333333333333333333330000444444444444444444000000000000000055555555555000000000000000000000066666666600000000 match = expression.match(/^\s*(?:([\s\S]+?)\s+as\s+)?(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(\s*[\s\S]+?)?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/); // 1 Alias // 2 Item // 3 Key on (key,value) // 4 Value on (key,value) // 5 Source expression (including filters) // 6 Track by if (!match) { throw uiSelectMinErr('iexp', "Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.", expression); } var source = match[5], filters = ''; // When using (key,value) ui-select requires filters to be extracted, since the object // is converted to an array for $select.items // (in which case the filters need to be reapplied) if (match[3]) { // Remove any enclosing parenthesis source = match[5].replace(/(^\()|(\)$)/g, ''); // match all after | but not after || var filterMatch = match[5].match(/^\s*(?:[\s\S]+?)(?:[^\|]|\|\|)+([\s\S]*)\s*$/); if (filterMatch && filterMatch[1].trim()) { filters = filterMatch[1]; source = source.replace(filters, ''); } } return { itemName: match[4] || match[2], // (lhs) Left-hand side, keyName: match[3], //for (key, value) syntax source: $parse(source), filters: filters, trackByExp: match[6], modelMapper: $parse(match[1] || match[4] || match[2]), repeatExpression: function (grouped) { var expression = this.itemName + ' in ' + (grouped ? '$group.items' : '$select.items'); if (this.trackByExp) { expression += ' track by ' + this.trackByExp; } return expression; } }; }; self.getGroupNgRepeatExpression = function () { return '$group in $select.groups track by $group.name'; }; }]); }()); angular.module("ui.select").run(["$templateCache", function ($templateCache) { $templateCache.put("bootstrap/choices.tpl.html", "
    0\">
  • 0\">
"); $templateCache.put("bootstrap/match-multiple.tpl.html", " × "); $templateCache.put("bootstrap/match.tpl.html", "
{{$select.placeholder}}
"); $templateCache.put("bootstrap/no-choice.tpl.html", "
"); $templateCache.put("bootstrap/select-multiple.tpl.html", "
"); $templateCache.put("bootstrap/select.tpl.html", "
"); $templateCache.put("select2/choices.tpl.html", "
"); $templateCache.put("select2/match-multiple.tpl.html", "
  • "); $templateCache.put("select2/match.tpl.html", "{{$select.placeholder}} "); $templateCache.put("select2/no-choice.tpl.html", "
    "); $templateCache.put("select2/select-multiple.tpl.html", "
    "); $templateCache.put("select2/select.tpl.html", "
    "); $templateCache.put("selectize/choices.tpl.html", "
    "); $templateCache.put("selectize/match-multiple.tpl.html", "
    ×
    "); $templateCache.put("selectize/match.tpl.html", "
    {{$select.placeholder}}
    "); $templateCache.put("selectize/no-choice.tpl.html", "
    "); $templateCache.put("selectize/select-multiple.tpl.html", "
    "); $templateCache.put("selectize/select.tpl.html", "
    "); }]);; /** * dirPagination - AngularJS module for paginating (almost) anything. * * * Credits * ======= * * Daniel Tabuenca: https://groups.google.com/d/msg/angular/an9QpzqIYiM/r8v-3W1X5vcJ * for the idea on how to dynamically invoke the ng-repeat directive. * * I borrowed a couple of lines and a few attribute names from the AngularUI Bootstrap project: * https://github.com/angular-ui/bootstrap/blob/master/src/pagination/pagination.js * * Copyright 2014 Michael Bromley */ (function () { /** * Config */ var moduleName = 'angularUtils.directives.dirPagination'; var DEFAULT_ID = '__default'; /** * Module */ angular.module(moduleName, []) .directive('dirPaginate', ['$compile', '$parse', 'paginationService', dirPaginateDirective]) .directive('dirPaginateNoCompile', noCompileDirective) .directive('dirPaginationControls', ['paginationService', 'paginationTemplate', dirPaginationControlsDirective]) .filter('itemsPerPage', ['paginationService', itemsPerPageFilter]) .service('paginationService', paginationService) .provider('paginationTemplate', paginationTemplateProvider) .run(['$templateCache', dirPaginationControlsTemplateInstaller]); function dirPaginateDirective($compile, $parse, paginationService) { return { terminal: true, multiElement: true, priority: 100, compile: dirPaginationCompileFn }; function dirPaginationCompileFn(tElement, tAttrs) { var expression = tAttrs.dirPaginate; // regex taken directly from https://github.com/angular/angular.js/blob/v1.4.x/src/ng/directive/ngRepeat.js#L339 var match = expression.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/); var filterPattern = /\|\s*itemsPerPage\s*:\s*(.*\(\s*\w*\)|([^\)]*?(?=\s+as\s+))|[^\)]*)/; if (match[2].match(filterPattern) === null) { throw 'pagination directive: the \'itemsPerPage\' filter must be set.'; } var itemsPerPageFilterRemoved = match[2].replace(filterPattern, ''); var collectionGetter = $parse(itemsPerPageFilterRemoved); addNoCompileAttributes(tElement); // If any value is specified for paginationId, we register the un-evaluated expression at this stage for the benefit of any // dir-pagination-controls directives that may be looking for this ID. var rawId = tAttrs.paginationId || DEFAULT_ID; paginationService.registerInstance(rawId); return function dirPaginationLinkFn(scope, element, attrs) { // Now that we have access to the `scope` we can interpolate any expression given in the paginationId attribute and // potentially register a new ID if it evaluates to a different value than the rawId. var paginationId = $parse(attrs.paginationId)(scope) || attrs.paginationId || DEFAULT_ID; // (TODO: this seems sound, but I'm reverting as many bug reports followed it's introduction in 0.11.0. // Needs more investigation.) // In case rawId != paginationId we deregister using rawId for the sake of general cleanliness // before registering using paginationId // paginationService.deregisterInstance(rawId); paginationService.registerInstance(paginationId); var repeatExpression = getRepeatExpression(expression, paginationId); addNgRepeatToElement(element, attrs, repeatExpression); removeTemporaryAttributes(element); var compiled = $compile(element); var currentPageGetter = makeCurrentPageGetterFn(scope, attrs, paginationId); paginationService.setCurrentPageParser(paginationId, currentPageGetter, scope); if (typeof attrs.totalItems !== 'undefined') { paginationService.setAsyncModeTrue(paginationId); scope.$watch(function () { return $parse(attrs.totalItems)(scope); }, function (result) { if (0 <= result) { paginationService.setCollectionLength(paginationId, result); } }); } else { paginationService.setAsyncModeFalse(paginationId); scope.$watchCollection(function () { return collectionGetter(scope); }, function (collection) { if (collection) { var collectionLength = (collection instanceof Array) ? collection.length : Object.keys(collection).length; paginationService.setCollectionLength(paginationId, collectionLength); } }); } // Delegate to the link function returned by the new compilation of the ng-repeat compiled(scope); // (TODO: Reverting this due to many bug reports in v 0.11.0. Needs investigation as the // principle is sound) // When the scope is destroyed, we make sure to remove the reference to it in paginationService // so that it can be properly garbage collected // scope.$on('$destroy', function destroyDirPagination() { // paginationService.deregisterInstance(paginationId); // }); }; } /** * If a pagination id has been specified, we need to check that it is present as the second argument passed to * the itemsPerPage filter. If it is not there, we add it and return the modified expression. * * @param expression * @param paginationId * @returns {*} */ function getRepeatExpression(expression, paginationId) { var repeatExpression, idDefinedInFilter = !!expression.match(/(\|\s*itemsPerPage\s*:[^|]*:[^|]*)/); if (paginationId !== DEFAULT_ID && !idDefinedInFilter) { repeatExpression = expression.replace(/(\|\s*itemsPerPage\s*:\s*[^|\s]*)/, "$1 : '" + paginationId + "'"); } else { repeatExpression = expression; } return repeatExpression; } /** * Adds the ng-repeat directive to the element. In the case of multi-element (-start, -end) it adds the * appropriate multi-element ng-repeat to the first and last element in the range. * @param element * @param attrs * @param repeatExpression */ function addNgRepeatToElement(element, attrs, repeatExpression) { if (element[0].hasAttribute('dir-paginate-start') || element[0].hasAttribute('data-dir-paginate-start')) { // using multiElement mode (dir-paginate-start, dir-paginate-end) attrs.$set('ngRepeatStart', repeatExpression); element.eq(element.length - 1).attr('ng-repeat-end', true); } else { attrs.$set('ngRepeat', repeatExpression); } } /** * Adds the dir-paginate-no-compile directive to each element in the tElement range. * @param tElement */ function addNoCompileAttributes(tElement) { angular.forEach(tElement, function (el) { if (el.nodeType === 1) { angular.element(el).attr('dir-paginate-no-compile', true); } }); } /** * Removes the variations on dir-paginate (data-, -start, -end) and the dir-paginate-no-compile directives. * @param element */ function removeTemporaryAttributes(element) { angular.forEach(element, function (el) { if (el.nodeType === 1) { angular.element(el).removeAttr('dir-paginate-no-compile'); } }); element.eq(0).removeAttr('dir-paginate-start').removeAttr('dir-paginate').removeAttr('data-dir-paginate-start').removeAttr('data-dir-paginate'); element.eq(element.length - 1).removeAttr('dir-paginate-end').removeAttr('data-dir-paginate-end'); } /** * Creates a getter function for the current-page attribute, using the expression provided or a default value if * no current-page expression was specified. * * @param scope * @param attrs * @param paginationId * @returns {*} */ function makeCurrentPageGetterFn(scope, attrs, paginationId) { var currentPageGetter; if (attrs.currentPage) { currentPageGetter = $parse(attrs.currentPage); } else { // If the current-page attribute was not set, we'll make our own. // Replace any non-alphanumeric characters which might confuse // the $parse service and give unexpected results. // See https://github.com/michaelbromley/angularUtils/issues/233 var defaultCurrentPage = (paginationId + '__currentPage').replace(/\W/g, '_'); scope[defaultCurrentPage] = 1; currentPageGetter = $parse(defaultCurrentPage); } return currentPageGetter; } } /** * This is a helper directive that allows correct compilation when in multi-element mode (ie dir-paginate-start, dir-paginate-end). * It is dynamically added to all elements in the dir-paginate compile function, and it prevents further compilation of * any inner directives. It is then removed in the link function, and all inner directives are then manually compiled. */ function noCompileDirective() { return { priority: 5000, terminal: true }; } function dirPaginationControlsTemplateInstaller($templateCache) { $templateCache.put('angularUtils.directives.dirPagination.template', ''); } function dirPaginationControlsDirective(paginationService, paginationTemplate) { var numberRegex = /^\d+$/; var DDO = { restrict: 'AE', scope: { maxSize: '=?', onPageChange: '&?', paginationId: '=?', autoHide: '=?' }, link: dirPaginationControlsLinkFn }; // We need to check the paginationTemplate service to see whether a template path or // string has been specified, and add the `template` or `templateUrl` property to // the DDO as appropriate. The order of priority to decide which template to use is // (highest priority first): // 1. paginationTemplate.getString() // 2. attrs.templateUrl // 3. paginationTemplate.getPath() var templateString = paginationTemplate.getString(); if (templateString !== undefined) { DDO.template = templateString; } else { DDO.templateUrl = function (elem, attrs) { return attrs.templateUrl || paginationTemplate.getPath(); }; } return DDO; function dirPaginationControlsLinkFn(scope, element, attrs) { // rawId is the un-interpolated value of the pagination-id attribute. This is only important when the corresponding dir-paginate directive has // not yet been linked (e.g. if it is inside an ng-if block), and in that case it prevents this controls directive from assuming that there is // no corresponding dir-paginate directive and wrongly throwing an exception. var rawId = attrs.paginationId || DEFAULT_ID; var paginationId = scope.paginationId || attrs.paginationId || DEFAULT_ID; if (!paginationService.isRegistered(paginationId) && !paginationService.isRegistered(rawId)) { var idMessage = (paginationId !== DEFAULT_ID) ? ' (id: ' + paginationId + ') ' : ' '; if (window.console) { console.warn('Pagination directive: the pagination controls' + idMessage + 'cannot be used without the corresponding pagination directive, which was not found at link time.'); } } if (!scope.maxSize) { scope.maxSize = 9; } scope.autoHide = scope.autoHide === undefined ? true : scope.autoHide; scope.directionLinks = angular.isDefined(attrs.directionLinks) ? scope.$parent.$eval(attrs.directionLinks) : true; scope.boundaryLinks = angular.isDefined(attrs.boundaryLinks) ? scope.$parent.$eval(attrs.boundaryLinks) : false; var paginationRange = Math.max(scope.maxSize, 5); scope.pages = []; scope.pagination = { last: 1, current: 1 }; scope.range = { lower: 1, upper: 1, total: 1 }; scope.$watch('maxSize', function (val) { if (val) { paginationRange = Math.max(scope.maxSize, 5); generatePagination(); } }); scope.$watch(function () { if (paginationService.isRegistered(paginationId)) { return (paginationService.getCollectionLength(paginationId) + 1) * paginationService.getItemsPerPage(paginationId); } }, function (length) { if (0 < length) { generatePagination(); } }); scope.$watch(function () { if (paginationService.isRegistered(paginationId)) { return (paginationService.getItemsPerPage(paginationId)); } }, function (current, previous) { if (current != previous && typeof previous !== 'undefined') { goToPage(scope.pagination.current); } }); scope.$watch(function () { if (paginationService.isRegistered(paginationId)) { return paginationService.getCurrentPage(paginationId); } }, function (currentPage, previousPage) { if (currentPage != previousPage) { goToPage(currentPage); } }); scope.setCurrent = function (num) { if (paginationService.isRegistered(paginationId) && isValidPageNumber(num)) { num = parseInt(num, 10); paginationService.setCurrentPage(paginationId, num); } }; /** * Custom "track by" function which allows for duplicate "..." entries on long lists, * yet fixes the problem of wrongly-highlighted links which happens when using * "track by $index" - see https://github.com/michaelbromley/angularUtils/issues/153 * @param id * @param index * @returns {string} */ scope.tracker = function (id, index) { return id + '_' + index; }; function goToPage(num) { if (paginationService.isRegistered(paginationId) && isValidPageNumber(num)) { var oldPageNumber = scope.pagination.current; scope.pages = generatePagesArray(num, paginationService.getCollectionLength(paginationId), paginationService.getItemsPerPage(paginationId), paginationRange); scope.pagination.current = num; updateRangeValues(); // if a callback has been set, then call it with the page number as the first argument // and the previous page number as a second argument if (scope.onPageChange) { scope.onPageChange({ newPageNumber: num, oldPageNumber: oldPageNumber }); } } } function generatePagination() { if (paginationService.isRegistered(paginationId)) { var page = parseInt(paginationService.getCurrentPage(paginationId)) || 1; scope.pages = generatePagesArray(page, paginationService.getCollectionLength(paginationId), paginationService.getItemsPerPage(paginationId), paginationRange); scope.pagination.current = page; scope.pagination.last = scope.pages[scope.pages.length - 1]; if (scope.pagination.last < scope.pagination.current) { scope.setCurrent(scope.pagination.last); } else { updateRangeValues(); } } } /** * This function updates the values (lower, upper, total) of the `scope.range` object, which can be used in the pagination * template to display the current page range, e.g. "showing 21 - 40 of 144 results"; */ function updateRangeValues() { if (paginationService.isRegistered(paginationId)) { var currentPage = paginationService.getCurrentPage(paginationId), itemsPerPage = paginationService.getItemsPerPage(paginationId), totalItems = paginationService.getCollectionLength(paginationId); scope.range.lower = (currentPage - 1) * itemsPerPage + 1; scope.range.upper = Math.min(currentPage * itemsPerPage, totalItems); scope.range.total = totalItems; } } function isValidPageNumber(num) { return (numberRegex.test(num) && (0 < num && num <= scope.pagination.last)); } } /** * Generate an array of page numbers (or the '...' string) which is used in an ng-repeat to generate the * links used in pagination * * @param currentPage * @param rowsPerPage * @param paginationRange * @param collectionLength * @returns {Array} */ function generatePagesArray(currentPage, collectionLength, rowsPerPage, paginationRange) { var pages = []; var totalPages = Math.ceil(collectionLength / rowsPerPage); var halfWay = Math.ceil(paginationRange / 2); var position; if (currentPage <= halfWay) { position = 'start'; } else if (totalPages - halfWay < currentPage) { position = 'end'; } else { position = 'middle'; } var ellipsesNeeded = paginationRange < totalPages; var i = 1; while (i <= totalPages && i <= paginationRange) { var pageNumber = calculatePageNumber(i, currentPage, paginationRange, totalPages); var openingEllipsesNeeded = (i === 2 && (position === 'middle' || position === 'end')); var closingEllipsesNeeded = (i === paginationRange - 1 && (position === 'middle' || position === 'start')); if (ellipsesNeeded && (openingEllipsesNeeded || closingEllipsesNeeded)) { pages.push('...'); } else { pages.push(pageNumber); } i++; } return pages; } /** * Given the position in the sequence of pagination links [i], figure out what page number corresponds to that position. * * @param i * @param currentPage * @param paginationRange * @param totalPages * @returns {*} */ function calculatePageNumber(i, currentPage, paginationRange, totalPages) { var halfWay = Math.ceil(paginationRange / 2); if (i === paginationRange) { return totalPages; } else if (i === 1) { return i; } else if (paginationRange < totalPages) { if (totalPages - halfWay < currentPage) { return totalPages - paginationRange + i; } else if (halfWay < currentPage) { return currentPage - halfWay + i; } else { return i; } } else { return i; } } } /** * This filter slices the collection into pages based on the current page number and number of items per page. * @param paginationService * @returns {Function} */ function itemsPerPageFilter(paginationService) { return function (collection, itemsPerPage, paginationId) { if (typeof (paginationId) === 'undefined') { paginationId = DEFAULT_ID; } if (!paginationService.isRegistered(paginationId)) { throw 'pagination directive: the itemsPerPage id argument (id: ' + paginationId + ') does not match a registered pagination-id.'; } var end; var start; if (angular.isObject(collection)) { itemsPerPage = parseInt(itemsPerPage) || 9999999999; if (paginationService.isAsyncMode(paginationId)) { start = 0; } else { start = (paginationService.getCurrentPage(paginationId) - 1) * itemsPerPage; } end = start + itemsPerPage; paginationService.setItemsPerPage(paginationId, itemsPerPage); if (collection instanceof Array) { // the array just needs to be sliced return collection.slice(start, end); } else { // in the case of an object, we need to get an array of keys, slice that, then map back to // the original object. var slicedObject = {}; angular.forEach(keys(collection).slice(start, end), function (key) { slicedObject[key] = collection[key]; }); return slicedObject; } } else { return collection; } }; } /** * Shim for the Object.keys() method which does not exist in IE < 9 * @param obj * @returns {Array} */ function keys(obj) { if (!Object.keys) { var objKeys = []; for (var i in obj) { if (obj.hasOwnProperty(i)) { objKeys.push(i); } } return objKeys; } else { return Object.keys(obj); } } /** * This service allows the various parts of the module to communicate and stay in sync. */ function paginationService() { var instances = {}; var lastRegisteredInstance; this.registerInstance = function (instanceId) { if (typeof instances[instanceId] === 'undefined') { instances[instanceId] = { asyncMode: false }; lastRegisteredInstance = instanceId; } }; this.deregisterInstance = function (instanceId) { delete instances[instanceId]; }; this.isRegistered = function (instanceId) { return (typeof instances[instanceId] !== 'undefined'); }; this.getLastInstanceId = function () { return lastRegisteredInstance; }; this.setCurrentPageParser = function (instanceId, val, scope) { instances[instanceId].currentPageParser = val; instances[instanceId].context = scope; }; this.setCurrentPage = function (instanceId, val) { instances[instanceId].currentPageParser.assign(instances[instanceId].context, val); }; this.getCurrentPage = function (instanceId) { var parser = instances[instanceId].currentPageParser; return parser ? parser(instances[instanceId].context) : 1; }; this.setItemsPerPage = function (instanceId, val) { instances[instanceId].itemsPerPage = val; }; this.getItemsPerPage = function (instanceId) { return instances[instanceId].itemsPerPage; }; this.setCollectionLength = function (instanceId, val) { instances[instanceId].collectionLength = val; }; this.getCollectionLength = function (instanceId) { return instances[instanceId].collectionLength; }; this.setAsyncModeTrue = function (instanceId) { instances[instanceId].asyncMode = true; }; this.setAsyncModeFalse = function (instanceId) { instances[instanceId].asyncMode = false; }; this.isAsyncMode = function (instanceId) { return instances[instanceId].asyncMode; }; } /** * This provider allows global configuration of the template path used by the dir-pagination-controls directive. */ function paginationTemplateProvider() { var templatePath = 'angularUtils.directives.dirPagination.template'; var templateString; /** * Set a templateUrl to be used by all instances of * @param {String} path */ this.setPath = function (path) { templatePath = path; }; /** * Set a string of HTML to be used as a template by all instances * of . If both a path *and* a string have been set, * the string takes precedence. * @param {String} str */ this.setString = function (str) { templateString = str; }; this.$get = function () { return { getPath: function () { return templatePath; }, getString: function () { return templateString; } }; }; } })();; /*! angular-google-chart 2015-11-29 */ /* * @description Google Chart Api Directive Module for AngularJS * @version 0.1.0 * @author GitHub Contributors * @license MIT * @year 2013 */ /* global angular */ (function(){ angular.module('googlechart', []) .run(registerResizeEvent); registerResizeEvent.$inject = ['$rootScope', '$window']; function registerResizeEvent($rootScope, $window){ angular.element($window).bind('resize', function () { $rootScope.$emit('resizeMsg'); }); } })(); /* global angular, google */ (function(){ angular.module('googlechart') .factory('FormatManager', formatManagerFactory); function formatManagerFactory(){ // Handles the processing of Google Charts API Formats function FormatManager($google){ var self = this; var oldFormatTemplates = {}; self.iFormats = {}; // Holds instances of formats (ie. self.iFormats.date[0] = new $google.visualization.DateFormat(params)) self.applyFormats = applyFormats; // apply formats of type to datatable function apply(tFormats, dataTable){ var i, formatType; for (formatType in tFormats){ if (tFormats.hasOwnProperty(formatType)){ for (i = 0; i < self.iFormats[formatType].length; i++) { if (tFormats[formatType][i].columnNum < dataTable.getNumberOfColumns()) { self.iFormats[formatType][i].format(dataTable, tFormats[formatType][i].columnNum); } } } } } function applyFormat(formatType, FormatClass, tFormats){ var i; if (angular.isArray(tFormats[formatType])) { // basic change detection; no need to run if no changes if (!angular.equals(tFormats[formatType], oldFormatTemplates[formatType])) { oldFormatTemplates[formatType] = tFormats[formatType]; self.iFormats[formatType] = []; if (formatType === 'color') { instantiateColorFormatters(tFormats); } else { for (i = 0; i < tFormats[formatType].length; i++) { self.iFormats[formatType].push(new FormatClass( tFormats[formatType][i]) ); } } } } } function applyFormats(dataTable, tFormats, customFormatters) { var formatType, FormatClass, requiresHtml = false; if (!angular.isDefined(tFormats) || !angular.isDefined(dataTable)){ return { requiresHtml: false }; } for (formatType in tFormats){ if (tFormats.hasOwnProperty(formatType)){ FormatClass = getFormatClass(formatType, customFormatters); if (!angular.isFunction(FormatClass)){ // if no class constructor was returned, // there's no point in completing cycle continue; } applyFormat(formatType, FormatClass, tFormats); //Many formatters require HTML tags to display special formatting if (formatType === 'arrow' || formatType === 'bar' || formatType === 'color') { requiresHtml = true; } } } apply(tFormats, dataTable); return { requiresHtml: requiresHtml }; } function instantiateColorFormatters(tFormats){ var t, colorFormat, i, data, formatType = 'color'; for (t = 0; t < tFormats[formatType].length; t++) { colorFormat = new $google.visualization.ColorFormat(); for (i = 0; i < tFormats[formatType][t].formats.length; i++) { data = tFormats[formatType][t].formats[i]; if (typeof (data.fromBgColor) !== 'undefined' && typeof (data.toBgColor) !== 'undefined') { colorFormat.addGradientRange(data.from, data.to, data.color, data.fromBgColor, data.toBgColor); } else { colorFormat.addRange(data.from, data.to, data.color, data.bgcolor); } } self.iFormats[formatType].push(colorFormat); } } function getFormatClass(formatType, customFormatters){ var className = formatType.charAt(0).toUpperCase() + formatType.slice(1).toLowerCase() + "Format"; if ($google.visualization.hasOwnProperty(className)){ return google.visualization[className]; } else if (angular.isDefined(customFormatters) && customFormatters.hasOwnProperty(formatType)) { return customFormatters[formatType]; } return; } } return FormatManager; } })(); /* global angular, google */ (function() { angular.module('googlechart') .controller('GoogleChartController', GoogleChartController); GoogleChartController.$inject = ['$scope', '$element', '$attrs', '$injector', '$timeout', '$window', '$rootScope', 'GoogleChartService']; function GoogleChartController($scope, $element, $attrs, $injector, $timeout, $window, $rootScope, GoogleChartService) { var self = this; var resizeHandler; var googleChartService; init(); function cleanup() { resizeHandler(); } function draw() { if (!draw.triggered && (self.chart !== undefined)) { draw.triggered = true; $timeout(setupAndDraw, 0, true); } else if (self.chart !== undefined) { $timeout.cancel(draw.recallTimeout); draw.recallTimeout = $timeout(draw, 10); } } // Watch function calls this. function drawAsync() { googleChartService.getReadyPromise() .then(draw); } //setupAndDraw() calls this. function drawChartWrapper() { googleChartService.draw(); draw.triggered = false; } function init() { // Instantiate service googleChartService = new GoogleChartService(); self.registerChartListener = googleChartService.registerChartListener; self.registerWrapperListener = googleChartService.registerWrapperListener; self.registerServiceListener = googleChartService.registerServiceListener; /* Watches, to refresh the chart when its data, formatters, options, view, or type change. All other values intentionally disregarded to avoid double calls to the draw function. Please avoid making changes to these objects directly from this directive.*/ $scope.$watch(watchValue, watchHandler, true); // true is for deep object equality checking // Redraw the chart if the window is resized resizeHandler = $rootScope.$on('resizeMsg', drawAsync); //Cleanup resize handler. $scope.$on('$destroy', cleanup); } function setupAndDraw() { googleChartService.setup($element, self.chart.type, self.chart.data, self.chart.view, self.chart.options, self.chart.formatters, self.chart.customFormatters); $timeout(drawChartWrapper); } function watchHandler() { self.chart = $scope.$eval($attrs.chart); drawAsync(); } function watchValue() { var chartObject = $scope.$eval($attrs.chart); if (angular.isDefined(chartObject) && angular.isObject(chartObject)) { return { customFormatters: chartObject.customFormatters, data: chartObject.data, formatters: chartObject.formatters, options: chartObject.options, type: chartObject.type, view: chartObject.view }; } } } })(); /* global angular */ (function(){ angular.module('googlechart') .directive('agcBeforeDraw', onReadyDirective); function onReadyDirective(){ return { restrict: 'A', scope: false, require: 'googleChart', link: function(scope, element, attrs, googleChartController){ callback.$inject=['chartWrapper']; function callback(chartWrapper){ scope.$apply(function (){ scope.$eval(attrs.agcBeforeDraw, {chartWrapper: chartWrapper}); }); } googleChartController.registerServiceListener('beforeDraw', callback, this); } }; } })(); (function(){ angular.module('googlechart') .directive('agcOnClick', onClickDirective); function onClickDirective(){ return { restrict: 'A', scope: false, require: 'googleChart', link: function(scope, element, attrs, googleChartController){ callback.$inject = ['args', 'chart', 'chartWrapper']; function callback(args, chart, chartWrapper){ scope.$apply(function (){ scope.$eval(attrs.agcOnClick, {args: args, chart: chart, chartWrapper: chartWrapper}); }); } googleChartController.registerChartListener('click', callback, this); } }; } })(); /* global angular */ (function(){ angular.module('googlechart') .directive('agcOnError', onErrorDirective); function onErrorDirective(){ return{ restrict: 'A', scope: false, require: 'googleChart', link: function(scope, element, attrs, googleChartController){ callback.$inject = ['chartWrapper', 'chart', 'args']; function callback(chartWrapper, chart, args){ var returnValues = { chartWrapper: chartWrapper, chart: chart, args: args, error: args[0], err: args[0], id: args[0].id, message: args[0].message }; scope.$apply(function(){ scope.$eval(attrs.agcOnError, returnValues); }); } googleChartController.registerWrapperListener('error', callback, this); } }; } })(); /* global angular */ (function(){ angular.module('googlechart') .directive('agcOnMouseout', agcOnMouseoutDirective); function agcOnMouseoutDirective(){ return { restrict: 'A', scope: false, require: 'googleChart', link: function(scope, element, attrs, googleChartController){ callback.$inject = ['args', 'chart', 'chartWrapper']; function callback(args, chart, chartWrapper){ var returnParams = { chartWrapper: chartWrapper, chart: chart, args: args, column: args[0].column, row: args[0].row }; scope.$apply(function () { scope.$eval(attrs.agcOnMouseout, returnParams); }); } googleChartController.registerChartListener('onmouseout', callback, this); } }; } })(); /* global angular */ (function(){ angular.module('googlechart') .directive('agcOnMouseover', agcOnMouseoverDirective); function agcOnMouseoverDirective(){ return { restrict: 'A', scope: false, require: 'googleChart', link: function(scope, element, attrs, googleChartController){ callback.$inject = ['args', 'chart', 'chartWrapper']; function callback(args, chart, chartWrapper){ var returnParams = { chartWrapper: chartWrapper, chart: chart, args: args, column: args[0].column, row: args[0].row }; scope.$apply(function () { scope.$eval(attrs.agcOnMouseover, returnParams); }); } googleChartController.registerChartListener('onmouseover', callback, this); } }; } })(); /* global angular */ (function(){ angular.module('googlechart') .directive('agcOnReady', onReadyDirective); function onReadyDirective(){ return { restrict: 'A', scope: false, require: 'googleChart', link: function(scope, element, attrs, googleChartController){ callback.$inject=['chartWrapper']; function callback(chartWrapper){ scope.$apply(function (){ scope.$eval(attrs.agcOnReady, {chartWrapper: chartWrapper}); }); } googleChartController.registerWrapperListener('ready', callback, this); } }; } })(); /* global angular */ (function(){ angular.module('googlechart') .directive('agcOnSelect', onSelectDirective); function onSelectDirective(){ return { restrict: 'A', scope: false, require: 'googleChart', link: function(scope, element, attrs, googleChartController){ callback.$inject = ['chartWrapper', 'chart']; function callback(chartWrapper, chart){ var selectEventRetParams = { selectedItems: chart.getSelection() }; // This is for backwards compatibility for people using 'selectedItem' that only wanted the first selection. selectEventRetParams.selectedItem = selectEventRetParams.selectedItems[0]; selectEventRetParams.chartWrapper = chartWrapper; selectEventRetParams.chart = chart; scope.$apply(function () { scope.$eval(attrs.agcOnSelect, selectEventRetParams); }); } googleChartController.registerWrapperListener('select', callback, this); } }; } })(); /* global angular, google */ /* jshint -W072 */ (function(){ angular.module('googlechart') .directive('googleChart', googleChartDirective); googleChartDirective.$inject = []; function googleChartDirective() { return { restrict: 'A', scope: false, controller: 'GoogleChartController' }; } })(); /* global angular */ (function(){ angular.module('googlechart') .value('googleChartApiConfig', { version: '1', optionalSettings: { packages: ['corechart'] } }); })(); /* global angular */ (function(){ angular.module('googlechart') .factory('googleChartApiPromise', googleChartApiPromiseFactory); googleChartApiPromiseFactory.$inject = ['$rootScope', '$q', 'googleChartApiConfig', 'googleJsapiUrl']; function googleChartApiPromiseFactory($rootScope, $q, apiConfig, googleJsapiUrl) { apiConfig.optionalSettings = apiConfig.optionalSettings || {}; var apiReady = $q.defer(); var onLoad = function () { // override callback function var settings = { callback: function () { var oldCb = apiConfig.optionalSettings.callback; $rootScope.$apply(function () { apiReady.resolve(google); }); if (angular.isFunction(oldCb)) { oldCb.call(this); } } }; settings = angular.extend({}, apiConfig.optionalSettings, settings); window.google.load('visualization', apiConfig.version, settings); }; var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.setAttribute('type', 'text/javascript'); script.src = googleJsapiUrl; if (script.addEventListener) { // Standard browsers (including IE9+) script.addEventListener('load', onLoad, false); } else { // IE8 and below script.onreadystatechange = function () { if (script.readyState === 'loaded' || script.readyState === 'complete') { script.onreadystatechange = null; onLoad(); } }; } head.appendChild(script); return apiReady.promise; } })(); /* global angular */ (function() { angular.module('googlechart') .factory('GoogleChartService', GoogleChartServiceFactory); GoogleChartServiceFactory.$inject = ['googleChartApiPromise', '$injector', '$q', 'FormatManager']; function GoogleChartServiceFactory(googleChartApiPromise, $injector, $q, FormatManager) { function GoogleChartService() { var self = this; self.draw = draw; self.getChartWrapper = getChartWrapper; self.getData = getData; self.getElement = getElement; self.getOption = getOption; self.getOptions = getOptions; self.getView = getView; self.getReadyPromise = getReadyPromise; self.isApiReady = isApiReady; self.registerChartListener = registerChartListener; self.registerServiceListener = registerServiceListener; self.registerWrapperListener = registerWrapperListener; self.setData = setData; self.setElement = setElement; self.setOption = setOption; self.setOptions = setOptions; self.setup = setup; self.setView = setView; var $google, _apiPromise, _apiReady, _chartWrapper, _element, _chartType, _data, _view, _options, _formatters, _innerVisualization, _formatManager, _needsUpdate = true, _customFormatters, _serviceDeferred, serviceListeners = {}, wrapperListeners = {}, chartListeners = {}; _init(); function _activateServiceEvent(eventName) { var i; if (angular.isArray(serviceListeners[eventName])) { for (i = 0; i < serviceListeners[eventName].length; i++) { serviceListeners[eventName][i](); } } } function _apiLoadFail(reason) { // Not sure what to do if this does happen. // Post your suggestions in the issues tracker at // https://github.com/angular-google-chart/angular-google-chart/ return reason; } function _apiLoadSuccess(g) { $google = g; _apiReady = true; _serviceDeferred.resolve(); return g; } function _continueSetup() { if (!angular.isDefined(_chartWrapper)) { _chartWrapper = new $google.visualization.ChartWrapper({ chartType: _chartType, dataTable: _data, view: _view, options: _options, containerId: _element[0] }); _registerListenersWithGoogle(_chartWrapper, wrapperListeners); } else { _chartWrapper.setChartType(_chartType); _chartWrapper.setDataTable(_data); _chartWrapper.setView(_view); _chartWrapper.setOptions(_options); } if (!_formatManager) { _formatManager = new FormatManager($google); } if (_formatManager.applyFormats(_chartWrapper.getDataTable(), _formatters, _customFormatters).requiresHtml) { _chartWrapper.setOption('allowHtml', true); } _needsUpdate = false; } // Credit for this solution: // http://stackoverflow.com/a/20125572/3771976 function _getSetDescendantProp(obj, desc, value) { var arr = desc ? desc.split(".") : []; while (arr.length && obj) { var comp = arr.shift(); var match = new RegExp("(.+)\\[([0-9]*)\\]").exec(comp); if (value) { if (obj[comp] === undefined) { obj[comp] = {}; } if (arr.length === 0) { obj[comp] = value; } } obj = obj[comp]; } return obj; } function _handleReady() { // When the chartWrapper is ready, check to see if the inner chart // has changed. If it has, re-register listeners onto that chart. if (_innerVisualization !== _chartWrapper.getChart()) { _innerVisualization = _chartWrapper.getChart(); _registerListenersWithGoogle(_innerVisualization, chartListeners); } } function _init() { _apiReady = false; _serviceDeferred = $q.defer(); //keeps the resulting promise to chain on other actions _apiPromise = googleChartApiPromise .then(_apiLoadSuccess) .catch(_apiLoadFail); registerWrapperListener('ready', _handleReady, self); } function _registerListener(listenerCollection, eventName, listenerFn, listenerObject) { // This is the function that will be invoked by the charts API. // Passing the wrapper function allows the use of DI for // for the called function. var listenerWrapper = function() { var locals = { chartWrapper: _chartWrapper, chart: _chartWrapper.getChart(), args: arguments }; $injector.invoke(listenerFn, listenerObject || this, locals); }; if (angular.isDefined(listenerCollection) && angular.isObject(listenerCollection)) { if (!angular.isArray(listenerCollection[eventName])) { listenerCollection[eventName] = []; } listenerCollection[eventName].push(listenerWrapper); return function() { if (angular.isDefined(listenerWrapper.googleListenerHandle)) { $google.visualization.events.removeListener(listenerWrapper.googleListenerHandle); } var fnIndex = listenerCollection[eventName].indexOf(listenerWrapper); listenerCollection[eventName].splice(fnIndex, 1); if (listenerCollection[eventName].length === 0) { listenerCollection[eventName] = undefined; } }; } } function _registerListenersWithGoogle(eventSource, listenerCollection) { for (var eventName in listenerCollection) { if (listenerCollection.hasOwnProperty(eventName) && angular.isArray(listenerCollection[eventName])) { for (var fnIterator = 0; fnIterator < listenerCollection[eventName].length; fnIterator++) { if (angular.isFunction(listenerCollection[eventName][fnIterator])) { listenerCollection[eventName][fnIterator].googleListenerHandle = $google.visualization.events.addListener(eventSource, eventName, listenerCollection[eventName][fnIterator]); } } } } } function _runDrawCycle() { _activateServiceEvent('beforeDraw'); _chartWrapper.draw(); } /* This function does this: - waits for API to load, if not already loaded - sets up ChartWrapper object (create or update) - schedules timeout event to draw chart */ function draw() { if (_needsUpdate) { _apiPromise = _apiPromise.then(_continueSetup); } _apiPromise = _apiPromise.then(_runDrawCycle()); } function getChartWrapper() { // Most get functions on this interface return copies, // this one should return reference so as to expose the //chart api to users return _chartWrapper; } function getData() { var data = _data || {}; return angular.copy(data); } function getElement() { return _element; } function getOption(name) { var options = _options || {}; return _getSetDescendantProp(options, name); } function getOptions() { var options = _options || {}; return angular.copy(options); } function getReadyPromise() { return _serviceDeferred.promise; } function getView() { var view = _view || {}; return angular.copy(view); } function isApiReady() { return _apiReady; } function registerChartListener(eventName, listenerFn, listenerObject) { return _registerListener(chartListeners, eventName, listenerFn, listenerObject); } function registerServiceListener(eventName, listenerFn, listenerObject) { return _registerListener(serviceListeners, eventName, listenerFn, listenerObject); } function registerWrapperListener(eventName, listenerFn, listenerObject) { return _registerListener(wrapperListeners, eventName, listenerFn, listenerObject); } function setData(data) { if (angular.isDefined(data)) { _data = angular.copy(data); _needsUpdate = true; } } function setElement(element) { if (angular.isElement(element) && _element !== element) { _element = element; // clear out the chartWrapper because we're going to need a new one _chartWrapper = null; _needsUpdate = true; } } function setOption(name, value) { _options = _options || {}; _getSetDescendantProp(_options, name, angular.copy(value)); _needsUpdate = true; } function setOptions(options) { if (angular.isDefined(options)) { _options = angular.copy(options); _needsUpdate = true; } } function setup(element, chartType, data, view, options, formatters, customFormatters) { // Keep values if already set, // can call setup() with nulls to keep // existing values _element = element || _element; _chartType = chartType || _chartType; _data = data || _data; _view = view || _view; _options = options || _options; _formatters = formatters || _formatters; _customFormatters = customFormatters || _customFormatters; _apiPromise = _apiPromise.then(_continueSetup); } function setView(view) { _view = angular.copy(view); } } return GoogleChartService; } })(); /* global angular */ (function(){ angular.module('googlechart') .provider('googleJsapiUrl', googleJsapiUrlProvider); function googleJsapiUrlProvider() { var protocol = 'https:'; var url = '//www.google.com/jsapi'; this.setProtocol = function (newProtocol) { protocol = newProtocol; }; this.setUrl = function (newUrl) { url = newUrl; }; this.$get = function () { return (protocol ? protocol : '') + url; }; } })();; (function () { 'use strict'; angular.module('ngMask', []); })(); (function () { 'use strict'; angular.module('ngMask') .directive('mask', ['$log', '$timeout', 'MaskService', function ($log, $timeout, MaskService) { return { restrict: 'A', require: 'ngModel', compile: function ($element, $attrs) { if (!$attrs.mask || !$attrs.ngModel) { $log.info('Mask and ng-model attributes are required!'); return; } var maskService = MaskService.create(); var timeout; var promise; function setSelectionRange(selectionStart) { if (typeof selectionStart !== 'number') { return; } // using $timeout: // it should run after the DOM has been manipulated by Angular // and after the browser renders (which may cause flicker in some cases) $timeout.cancel(timeout); timeout = $timeout(function () { var selectionEnd = selectionStart + 1; var input = $element[0]; if (input.setSelectionRange) { input.focus(); input.setSelectionRange(selectionStart, selectionEnd); } else if (input.createTextRange) { var range = input.createTextRange(); range.collapse(true); range.moveEnd('character', selectionEnd); range.moveStart('character', selectionStart); range.select(); } }); } return { pre: function ($scope, $element, $attrs, controller) { promise = maskService.generateRegex({ mask: $attrs.mask, // repeat mask expression n times repeat: ($attrs.repeat || $attrs.maskRepeat), // clean model value - without divisors clean: (($attrs.clean || $attrs.maskClean) === 'true'), // limit length based on mask length limit: (($attrs.limit || $attrs.maskLimit || 'true') === 'true'), // how to act with a wrong value restrict: ($attrs.restrict || $attrs.maskRestrict || 'select'), //select, reject, accept // set validity mask validate: (($attrs.validate || $attrs.maskValidate || 'true') === 'true'), // default model value model: $attrs.ngModel, // default input value value: $attrs.ngValue }); }, post: function ($scope, $element, $attrs, controller) { var timeout; var options = maskService.getOptions(); function parseViewValue(value) { var untouchedValue = value; options = maskService.getOptions(); // set default value equal 0 value = value || ''; // get view value object var viewValue = maskService.getViewValue(value); // get mask without question marks var maskWithoutOptionals = options['maskWithoutOptionals'] || ''; // get view values capped // used on view var viewValueWithDivisors = viewValue.withDivisors(true); // used on model var viewValueWithoutDivisors = viewValue.withoutDivisors(true); try { // get current regex var regex = maskService.getRegex(viewValueWithDivisors.length - 1); var fullRegex = maskService.getRegex(maskWithoutOptionals.length - 1); // current position is valid var validCurrentPosition = regex.test(viewValueWithDivisors) || fullRegex.test(viewValueWithDivisors); // difference means for select option var diffValueAndViewValueLengthIsOne = (value.length - viewValueWithDivisors.length) === 1; var diffMaskAndViewValueIsGreaterThanZero = (maskWithoutOptionals.length - viewValueWithDivisors.length) > 0; if (options.restrict !== 'accept') { if (options.restrict === 'select' && (!validCurrentPosition || diffValueAndViewValueLengthIsOne)) { var lastCharInputed = value[(value.length - 1)]; var lastCharGenerated = viewValueWithDivisors[(viewValueWithDivisors.length - 1)]; if ((lastCharInputed !== lastCharGenerated) && diffMaskAndViewValueIsGreaterThanZero) { viewValueWithDivisors = viewValueWithDivisors + lastCharInputed; } var wrongPosition = maskService.getFirstWrongPosition(viewValueWithDivisors); if (angular.isDefined(wrongPosition)) { setSelectionRange(wrongPosition); } } else if (options.restrict === 'reject' && !validCurrentPosition) { viewValue = maskService.removeWrongPositions(viewValueWithDivisors); viewValueWithDivisors = viewValue.withDivisors(true); viewValueWithoutDivisors = viewValue.withoutDivisors(true); // setSelectionRange(viewValueWithDivisors.length); } } if (!options.limit) { viewValueWithDivisors = viewValue.withDivisors(false); viewValueWithoutDivisors = viewValue.withoutDivisors(false); } // Set validity if (options.validate && controller.$dirty) { if (fullRegex.test(viewValueWithDivisors) || controller.$isEmpty(untouchedValue)) { controller.$setValidity('mask', true); } else { controller.$setValidity('mask', false); } } // Update view and model values if (value !== viewValueWithDivisors) { controller.$setViewValue(angular.copy(viewValueWithDivisors), 'input'); controller.$render(); } } catch (e) { $log.error('[mask - parseViewValue]'); throw e; } // Update model, can be different of view value if (options.clean) { return viewValueWithoutDivisors; } else { return viewValueWithDivisors; } } var callParseViewValue = function () { parseViewValue(); controller.$parsers.push(parseViewValue); // $evalAsync from a directive // it should run after the DOM has been manipulated by Angular // but before the browser renders if (options.value) { $scope.$evalAsync(function ($scope) { controller.$setViewValue(angular.copy(options.value), 'input'); controller.$render(); }); } } $element.on('click input paste keyup', function () { timeout = $timeout(function () { // Manual debounce to prevent multiple execution $timeout.cancel(timeout); parseViewValue($element.val()); $scope.$apply(); }, 100); }); // Register the watch to observe remote loading or promised data // Deregister calling returned function var watcher = $scope.$watch($attrs.ngModel, function (newValue, oldValue) { if (angular.isDefined(newValue)) { parseViewValue(newValue); watcher(); } }); $scope.$watch(function () { return [$attrs.mask]; }, function () { promise = maskService.generateRegex({ mask: $attrs.mask, // repeat mask expression n times repeat: ($attrs.repeat || $attrs.maskRepeat), // clean model value - without divisors clean: (($attrs.clean || $attrs.maskClean) === 'true'), // limit length based on mask length limit: (($attrs.limit || $attrs.maskLimit || 'true') === 'true'), // how to act with a wrong value restrict: ($attrs.restrict || $attrs.maskRestrict || 'select'), //select, reject, accept // set validity mask validate: (($attrs.validate || $attrs.maskValidate || 'true') === 'true'), // default model value model: $attrs.ngModel, // default input value value: $attrs.ngValue }).then(function () { $element.triggerHandler('click'); }); promise.then(callParseViewValue); }, true); promise.then(callParseViewValue); } } } } }]); })(); (function () { 'use strict'; angular.module('ngMask') .factory('MaskService', ['$q', 'OptionalService', 'UtilService', function ($q, OptionalService, UtilService) { function create() { var options; var maskWithoutOptionals; var maskWithoutOptionalsLength = 0; var maskWithoutOptionalsAndDivisorsLength = 0; var optionalIndexes = []; var optionalDivisors = {}; var optionalDivisorsCombinations = []; var divisors = []; var divisorElements = {}; var regex = []; var patterns = { '9': /[0-9]/, '8': /[0-8]/, '7': /[0-7]/, '6': /[0-6]/, '5': /[0-5]/, '4': /[0-4]/, '3': /[0-3]/, '2': /[0-2]/, '1': /[0-1]/, '0': /[0]/, '*': /./, 'w': /\w/, 'W': /\W/, 'd': /\d/, 'D': /\D/, 's': /\s/, 'S': /\S/, 'b': /\b/, 'A': /[A-Z]/, 'a': /[a-z]/, 'Z': /[A-ZÇÀÁÂÃÈÉÊẼÌÍÎĨÒÓÔÕÙÚÛŨ]/, 'z': /[a-zçáàãâéèêẽíìĩîóòôõúùũüû]/, '@': /[a-zA-Z]/, '#': /[a-zA-ZçáàãâéèêẽíìĩîóòôõúùũüûÇÀÁÂÃÈÉÊẼÌÍÎĨÒÓÔÕÙÚÛŨ]/, '%': /[0-9a-zA-ZçáàãâéèêẽíìĩîóòôõúùũüûÇÀÁÂÃÈÉÊẼÌÍÎĨÒÓÔÕÙÚÛŨ]/ }; // REGEX function generateIntermetiateElementRegex(i, forceOptional) { var charRegex; try { var element = maskWithoutOptionals[i]; var elementRegex = patterns[element]; var hasOptional = isOptional(i); if (elementRegex) { charRegex = '(' + elementRegex.source + ')'; } else { // is a divisor if (!isDivisor(i)) { divisors.push(i); divisorElements[i] = element; } charRegex = '(' + '\\' + element + ')'; } } catch (e) { throw e; } if (hasOptional || forceOptional) { charRegex += '?'; } return new RegExp(charRegex); } function generateIntermetiateRegex(i, forceOptional) { var elementRegex var elementOptionalRegex; try { var intermetiateElementRegex = generateIntermetiateElementRegex(i, forceOptional); elementRegex = intermetiateElementRegex; var hasOptional = isOptional(i); var currentRegex = intermetiateElementRegex.source; if (hasOptional && ((i + 1) < maskWithoutOptionalsLength)) { var intermetiateRegex = generateIntermetiateRegex((i + 1), true).elementOptionalRegex(); currentRegex += intermetiateRegex.source; } elementOptionalRegex = new RegExp(currentRegex); } catch (e) { throw e; } return { elementRegex: function () { return elementRegex; }, elementOptionalRegex: function () { // from element regex, gets the flow of regex until first not optional return elementOptionalRegex; } }; } function generateRegex(opts) { var deferred = $q.defer(); maskWithoutOptionals = null; maskWithoutOptionalsLength = 0; maskWithoutOptionalsAndDivisorsLength = 0; optionalIndexes = []; optionalDivisors = {}; optionalDivisorsCombinations = []; divisors = []; divisorElements = {}; regex = []; options = opts; try { var mask = opts['mask']; var repeat = opts['repeat']; if (!mask) return; if (repeat) { mask = Array((parseInt(repeat) + 1)).join(mask); } optionalIndexes = OptionalService.getOptionals(mask).fromMaskWithoutOptionals(); options['maskWithoutOptionals'] = maskWithoutOptionals = OptionalService.removeOptionals(mask); maskWithoutOptionalsLength = maskWithoutOptionals.length; var cumulativeRegex; for (var i = 0; i < maskWithoutOptionalsLength; i++) { var charRegex = generateIntermetiateRegex(i); var elementRegex = charRegex.elementRegex(); var elementOptionalRegex = charRegex.elementOptionalRegex(); var newRegex = cumulativeRegex ? cumulativeRegex.source + elementOptionalRegex.source : elementOptionalRegex.source; newRegex = new RegExp(newRegex); cumulativeRegex = cumulativeRegex ? cumulativeRegex.source + elementRegex.source : elementRegex.source; cumulativeRegex = new RegExp(cumulativeRegex); regex.push(newRegex); } generateOptionalDivisors(); maskWithoutOptionalsAndDivisorsLength = removeDivisors(maskWithoutOptionals).length; deferred.resolve({ options: options, divisors: divisors, divisorElements: divisorElements, optionalIndexes: optionalIndexes, optionalDivisors: optionalDivisors, optionalDivisorsCombinations: optionalDivisorsCombinations }); } catch (e) { deferred.reject(e); throw e; } return deferred.promise; } function getRegex(index) { var currentRegex; try { currentRegex = regex[index] ? regex[index].source : ''; } catch (e) { throw e; } return (new RegExp('^' + currentRegex + '$')); } // DIVISOR function isOptional(currentPos) { return UtilService.inArray(currentPos, optionalIndexes); } function isDivisor(currentPos) { return UtilService.inArray(currentPos, divisors); } function generateOptionalDivisors() { function sortNumber(a, b) { return a - b; } var sortedDivisors = divisors.sort(sortNumber); var sortedOptionals = optionalIndexes.sort(sortNumber); for (var i = 0; i < sortedDivisors.length; i++) { var divisor = sortedDivisors[i]; for (var j = 1; j <= sortedOptionals.length; j++) { var optional = sortedOptionals[(j - 1)]; if (optional >= divisor) { break; } if (optionalDivisors[divisor]) { optionalDivisors[divisor] = optionalDivisors[divisor].concat(divisor - j); } else { optionalDivisors[divisor] = [(divisor - j)]; } // get the original divisor for alternative divisor divisorElements[(divisor - j)] = divisorElements[divisor]; } } } function removeDivisors(value) { value = value.toString(); try { if (divisors.length > 0 && value) { var keys = Object.keys(divisorElements); var elments = []; for (var i = keys.length - 1; i >= 0; i--) { var divisor = divisorElements[keys[i]]; if (divisor) { elments.push(divisor); } } elments = UtilService.uniqueArray(elments); // remove if it is not pattern var regex = new RegExp(('[' + '\\' + elments.join('\\') + ']'), 'g'); return value.replace(regex, ''); } else { return value; } } catch (e) { throw e; } } function insertDivisors(array, combination) { function insert(array, output) { var out = output; for (var i = 0; i < array.length; i++) { var divisor = array[i]; if (divisor < out.length) { out.splice(divisor, 0, divisorElements[divisor]); } } return out; } var output = array; var divs = divisors.filter(function (it) { var optionalDivisorsKeys = Object.keys(optionalDivisors).map(function (it) { return parseInt(it); }); return !UtilService.inArray(it, combination) && !UtilService.inArray(it, optionalDivisorsKeys); }); if (!angular.isArray(array) || !angular.isArray(combination)) { return output; } // insert not optional divisors output = insert(divs, output); // insert optional divisors output = insert(combination, output); return output; } function tryDivisorConfiguration(value) { var output = value.split(''); var defaultDivisors = true; // has optional? if (optionalIndexes.length > 0) { var lazyArguments = []; var optionalDivisorsKeys = Object.keys(optionalDivisors); // get all optional divisors as array of arrays [[], [], []...] for (var i = 0; i < optionalDivisorsKeys.length; i++) { var val = optionalDivisors[optionalDivisorsKeys[i]]; lazyArguments.push(val); } // generate all possible configurations if (optionalDivisorsCombinations.length === 0) { UtilService.lazyProduct(lazyArguments, function () { // convert arguments to array optionalDivisorsCombinations.push(Array.prototype.slice.call(arguments)); }); } for (var i = optionalDivisorsCombinations.length - 1; i >= 0; i--) { var outputClone = angular.copy(output); outputClone = insertDivisors(outputClone, optionalDivisorsCombinations[i]); // try validation var viewValueWithDivisors = outputClone.join(''); var regex = getRegex(maskWithoutOptionals.length - 1); if (regex.test(viewValueWithDivisors)) { defaultDivisors = false; output = outputClone; break; } } } if (defaultDivisors) { output = insertDivisors(output, divisors); } return output.join(''); } // MASK function getOptions() { return options; } function getViewValue(value) { try { var outputWithoutDivisors = removeDivisors(value); var output = tryDivisorConfiguration(outputWithoutDivisors); return { withDivisors: function (capped) { if (capped) { return output.substr(0, maskWithoutOptionalsLength); } else { return output; } }, withoutDivisors: function (capped) { if (capped) { return outputWithoutDivisors.substr(0, maskWithoutOptionalsAndDivisorsLength); } else { return outputWithoutDivisors; } } }; } catch (e) { throw e; } } // SELECTOR function getWrongPositions(viewValueWithDivisors, onlyFirst) { var pos = []; if (!viewValueWithDivisors) { return 0; } for (var i = 0; i < viewValueWithDivisors.length; i++) { var pattern = getRegex(i); var value = viewValueWithDivisors.substr(0, (i + 1)); if (pattern && !pattern.test(value)) { pos.push(i); if (onlyFirst) { break; } } } return pos; } function getFirstWrongPosition(viewValueWithDivisors) { return getWrongPositions(viewValueWithDivisors, true)[0]; } function removeWrongPositions(viewValueWithDivisors) { var wrongPositions = getWrongPositions(viewValueWithDivisors, false); var newViewValue = viewValueWithDivisors; for (var i = 0; i < wrongPositions.length; i++) { var wrongPosition = wrongPositions[i]; var viewValueArray = viewValueWithDivisors.split(''); viewValueArray.splice(wrongPosition, 1); newViewValue = viewValueArray.join(''); } return getViewValue(newViewValue); } return { getViewValue: getViewValue, generateRegex: generateRegex, getRegex: getRegex, getOptions: getOptions, removeDivisors: removeDivisors, getFirstWrongPosition: getFirstWrongPosition, removeWrongPositions: removeWrongPositions } } return { create: create } }]); })(); (function () { 'use strict'; angular.module('ngMask') .factory('OptionalService', [function () { function getOptionalsIndexes(mask) { var indexes = []; try { var regexp = /\?/g; var match = []; while ((match = regexp.exec(mask)) != null) { // Save the optional char indexes.push((match.index - 1)); } } catch (e) { throw e; } return { fromMask: function () { return indexes; }, fromMaskWithoutOptionals: function () { return getOptionalsRelativeMaskWithoutOptionals(indexes); } }; } function getOptionalsRelativeMaskWithoutOptionals(optionals) { var indexes = []; for (var i = 0; i < optionals.length; i++) { indexes.push(optionals[i] - i); } return indexes; } function removeOptionals(mask) { var newMask; try { newMask = mask.replace(/\?/g, ''); } catch (e) { throw e; } return newMask; } return { removeOptionals: removeOptionals, getOptionals: getOptionalsIndexes } }]); })(); (function () { 'use strict'; angular.module('ngMask') .factory('UtilService', [function () { // sets: an array of arrays // f: your callback function // context: [optional] the `this` to use for your callback // http://phrogz.net/lazy-cartesian-product function lazyProduct(sets, f, context) { if (!context) { context = this; } var p = []; var max = sets.length - 1; var lens = []; for (var i = sets.length; i--;) { lens[i] = sets[i].length; } function dive(d) { var a = sets[d]; var len = lens[d]; if (d === max) { for (var i = 0; i < len; ++i) { p[d] = a[i]; f.apply(context, p); } } else { for (var i = 0; i < len; ++i) { p[d] = a[i]; dive(d + 1); } } p.pop(); } dive(0); } function inArray(i, array) { var output; try { output = array.indexOf(i) > -1; } catch (e) { throw e; } return output; } function uniqueArray(array) { var u = {}; var a = []; for (var i = 0, l = array.length; i < l; ++i) { if (u.hasOwnProperty(array[i])) { continue; } a.push(array[i]); u[array[i]] = 1; } return a; } return { lazyProduct: lazyProduct, inArray: inArray, uniqueArray: uniqueArray } }]); })();;