var tableSortModule,PLACEHOLDER_SUPPORT;(function(n,t){"use strict";function si(n,t,i){if(!n)throw gi("areq","Argument '{0}' is {1}",t||"?",i||"required");return n}function hi(n,t){return!n&&!t?"":n?t?(c(n)&&(n=n.join(" ")),c(t)&&(t=t.join(" ")),n+" "+t):n:t}function nr(n){var t={};return n&&(n.to||n.from)&&(t.to=n.to,t.from=n.from),t}function h(n,t,r){var u="";return n=c(n)?n:n&&o(n)&&n.length?n.split(/\s+/):[],i(n,function(n,i){n&&n.length>0&&(u+=i>0?" ":"",u+=r?t+n:n+t)}),u}function tr(n,t){var i=n.indexOf(t);t>=0&&n.splice(i,1)}function ir(n){if(n instanceof u)switch(n.length){case 0:return n;case 1:if(n[0].nodeType===k)return n;break;default:return u(vt(n))}if(n.nodeType===k)return u(n)}function vt(n){var t,i;if(!n[0])return n;for(t=0;t<n.length;t++)if(i=n[t],i.nodeType==k)return i}function rr(n,t,r){i(t,function(t){n.addClass(t,r)})}function ur(n,t,r){i(t,function(t){n.removeClass(t,r)})}function y(n){return function(t,i){i.addClass&&(rr(n,t,i.addClass),i.addClass=null);i.removeClass&&(ur(n,t,i.removeClass),i.removeClass=null)}}function d(n){if(n=n||{},!n.$$prepared){var t=n.domOperation||f;n.domOperation=function(){n.$$domOperationFired=!0;t();t=f};n.$$prepared=!0}return n}function p(n,t){ci(n,t);li(n,t)}function ci(n,t){t.from&&(n.css(t.from),t.from=null)}function li(n,t){t.to&&(n.css(t.to),t.to=null)}function g(n,t,i){var r=t.options||{},u=i.options||{},s=(r.addClass||"")+" "+(u.addClass||""),h=(r.removeClass||"")+" "+(u.removeClass||""),e=fr(n.attr("class"),s,h),o;return u.preparationClasses&&(r.preparationClasses=tt(u.preparationClasses,r.preparationClasses),delete u.preparationClasses),o=r.domOperation!==f?r.domOperation:null,dt(r,u),o&&(r.domOperation=o),r.addClass=e.addClass?e.addClass:null,r.removeClass=e.removeClass?e.removeClass:null,t.addClass=r.addClass,t.removeClass=r.removeClass,r}function fr(n,t,r){function s(n){o(n)&&(n=n.split(" "));var t={};return i(n,function(n){n.length&&(t[n]=!0)}),t}var e=1,h=-1,f={},u;return n=s(n),t=s(t),i(t,function(n,t){f[t]=e}),r=s(r),i(r,function(n,t){f[t]=f[t]===e?null:h}),u={addClass:"",removeClass:""},i(f,function(t,i){var r,f;t===e?(r="addClass",f=!n[i]||n[i+et]):t===h&&(r="removeClass",f=n[i]||n[i+ft]);f&&(u[r].length&&(u[r]+=" "),u[r]+=i)}),u}function r(n){return n instanceof u?n[0]:n}function er(n,t,i){var r="";t&&(r=h(t,ti,!0));i.addClass&&(r=tt(r,h(i.addClass,ft)));i.removeClass&&(r=tt(r,h(i.removeClass,et)));r.length&&(i.preparationClasses=r,n.addClass(r))}function or(n,t){t.preparationClasses&&(n.removeClass(t.preparationClasses),t.preparationClasses=null);t.activeClasses&&(n.removeClass(t.activeClasses),t.activeClasses=null)}function nt(n,t){var i=t?"-"+t+"s":"";return w(n,[v,i]),[v,i]}function yt(n,t){var i=t?"paused":"",r=s+ki;return w(n,[r,i]),[r,i]}function w(n,t){var i=t[0],r=t[1];n.style[i]=r}function tt(n,t){return n?t?n+" "+t:n:t}function yr(n){return[at,n+"s"]}function pt(n,t){var i=t?lt:v;return[i,n+"s"]}function ai(n,t,r){var u=Object.create(null),f=n.getComputedStyle(t)||{};return i(r,function(n,t){var i=f[n],r;i&&(r=i.charAt(0),(r==="-"||r==="+"||r>=0)&&(i=pr(i)),i===0&&(i=null),u[t]=i)}),u}function pr(n){var t=0,r=n.split(/\s*,\s*/);return i(r,function(n){n.charAt(n.length-1)=="s"&&(n=n.substring(0,n.length-1));n=parseFloat(n)||0;t=t?Math.max(n,t):n}),t}function wt(n){return n===0||n!=null}function vi(n,t){var i=e,r=n+"s";return t?i+=ct:r+=" linear all",[i,r]}function yi(){var n=Object.create(null);return{flush:function(){n=Object.create(null)},count:function(t){var i=n[t];return i?i.total:0},get:function(t){var i=n[t];return i&&i.value},put:function(t,i){n[t]?n[t].total++:n[t]={total:1,value:i}}}}function pi(n,t,r){i(r,function(i){n[i]=gt(n[i])?n[i]:t.style.getPropertyValue(i)})}var k=1,ft="-add",et="-remove",ti="ng-",wi="-active",bi="-prepare",ii="ng-animate",ot="$$ngAnimateChildren",ri="",e,st,s,ht;n.ontransitionend===void 0&&n.onwebkittransitionend!==void 0?(ri="-webkit-",e="WebkitTransition",st="webkitTransitionEnd transitionend"):(e="transition",st="transitionend");n.onanimationend===void 0&&n.onwebkitanimationend!==void 0?(ri="-webkit-",s="WebkitAnimation",ht="webkitAnimationEnd animationend"):(s="animation",ht="animationend");var ct="Duration",ui="Property",fi="Delay",ei="TimingFunction",ki="PlayState",di=9999,lt=s+fi,at=s+ct,v=e+fi,oi=e+ct,gi=t.$$minErr("ng");var sr=["$$rAF",function(n){function r(n){i=i.concat(n);u()}function u(){var f,r;if(i.length){for(f=i.shift(),r=0;r<f.length;r++)f[r]();t||n(function(){t||u()})}}var i,t;return i=r.queue=[],r.waitUntilQuiet=function(i){t&&t();t=n(function(){t=null;i();u()})},r}],hr=["$interpolate",function(n){return{link:function(t,i,r){function f(n){n=n==="on"||n==="true";i.data(ot,n)}var u=r.ngAnimateChildren;o(u)&&u.length===0?i.data(ot,!0):(f(n(u)(t)),r.$observe("ngAnimateChildren",f))}}}],l="$$animateCss",b=1e3,cr=3,lr=1.5,ar={transitionDuration:oi,transitionDelay:v,transitionProperty:e+ui,animationDuration:at,animationDelay:lt,animationIterationCount:s+"IterationCount"},vr={transitionDuration:oi,transitionDelay:v,animationDuration:at,animationDelay:lt};var wr=["$animateProvider",function(){var n=yi(),t=yi();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(u,o,a,v,k,g,tt,it){function ot(n,t){var i="$$ngAnimateParentKey",r=n.parentNode,u=r[i]||(r[i]=++at);return u+"-"+n.getAttribute("class")+"-"+t}function vt(t,i,r,f){var e=n.get(r);return e||(e=ai(u,t,f),e.animationIterationCount==="infinite"&&(e.animationIterationCount=1)),n.put(r,e),e}function bt(i,r,f,e){var s,c;return n.count(f)>0&&(s=t.get(f),s||(c=h(r,"-stagger"),o.addClass(i,c),s=ai(u,i,e),s.animationDuration=Math.max(s.animationDuration,0),s.transitionDuration=Math.max(s.transitionDuration,0),o.removeClass(i,c),t.put(f,s))),s||{}}function ct(i){rt.push(i);tt.waitUntilQuiet(function(){var r,i;for(n.flush(),t.flush(),r=k(),i=0;i<rt.length;i++)rt[i](r);rt.length=0})}function lt(n,t,i){var r=vt(n,t,i,ar),u=r.animationDelay,f=r.transitionDelay;return r.maxDelay=u&&f?Math.max(u,f):u||f,r.maxDuration=Math.max(r.animationDuration*r.animationIterationCount,r.transitionDuration),r}var ut=y(o),at=0,rt=[];return function(t,u){function or(){ni()}function uu(){ni(!0)}function ni(n){if(!ki&&(!hr||!ri)){ki=!0;ri=!1;y.$$skipPreparationClasses||o.removeClass(t,si);o.removeClass(t,iu);yt(tt,!1);nt(tt,!1);i(at,function(n){tt.style[n[0]]=""});ut(t,y);p(t,y);Object.keys(bi).length&&i(bi,function(n,t){n?tt.style.setProperty(t,n):tt.style.removeProperty(t)});y.onDone&&y.onDone();fi&&fi.length&&t.off(fi.join(" "),eu);var r=t.data(l);r&&(v.cancel(r[0].timer),t.removeData(l));hi&&hi.complete(!n)}}function fu(n){k.blockTransition&&nt(tt,n);k.blockKeyframeAnimation&&yt(tt,!!n)}function sr(){return hi=new a({end:or,cancel:uu}),ct(f),ni(),{$$willAnimate:!1,start:function(){return hi},end:or}}function eu(n){n.stopPropagation();var t=n.originalEvent||n,i=t.$manualTimeStamp||Date.now(),r=parseFloat(t.elapsedTime.toFixed(cr));Math.max(i-pr,0)>=rr&&r>=vt&&(hr=!0,ni())}function cu(){function u(){var n,u,c,w;if(!ki){if(fu(!1),i(at,function(n){var t=n[0],i=n[1];tt.style[t]=i}),ut(t,y),o.addClass(t,iu),k.recalculateTimingStyles){if(gi=tt.className+" "+si,yi=ot(tt,gi),rt=lt(tt,gi,yi),gt=rt.maxDelay,ai=Math.max(gt,0),vt=rt.maxDuration,vt===0){ni();return}k.hasTransitions=rt.transitionDuration>0;k.hasAnimations=rt.animationDuration>0}k.applyAnimationDelay&&(gt=typeof y.delay!="boolean"&&wt(y.delay)?parseFloat(y.delay):gt,ai=Math.max(gt,0),rt.animationDelay=gt,ii=pt(gt,!0),at.push(ii),tt.style[ii[0]]=ii[1]);rr=ai*b;ar=vt*b;y.easing&&(u=y.easing,k.hasTransitions&&(n=e+ei,at.push([n,u]),tt.style[n]=u),k.hasAnimations&&(n=s+ei,at.push([n,u]),tt.style[n]=u));rt.transitionDuration&&fi.push(st);rt.animationDuration&&fi.push(ht);pr=Date.now();var a=rr+lr*ar,p=pr+a,r=t.data(l)||[],h=!0;if(r.length&&(c=r[0],h=p>c.expectedEndTime,h?v.cancel(c.timer):r.push(ni)),h&&(w=v(f,a,!1),r[0]={timer:w,expectedEndTime:p},r.push(ni),t.data(l,r)),fi.length)t.on(fi.join(" "),eu);y.to&&(y.cleanupStyles&&pi(bi,tt,Object.keys(y.to)),li(t,y))}}function f(){var i=t.data(l),n;if(i){for(n=1;n<i.length;n++)i[n]();t.removeData(l)}}if(!ki){if(!tt.parentNode){ni();return}var n=function(n){if(hr)ri&&n&&(ri=!1,ni());else if(ri=!n,rt.animationDuration){var t=yt(tt,ri);ri?at.push(t):tr(at,t)}},r=er>0&&(rt.transitionDuration&&dt.transitionDuration===0||rt.animationDuration&&dt.animationDuration===0)&&Math.max(dt.animationDelay,dt.transitionDelay);r?v(u,Math.floor(r*er*b),!1):u();ir.resume=function(){n(!0)};ir.pause=function(){n(!1)}}}var y=u||{},bi,tt,yi,dt,br,fr,kr,dr,gr,er,nu,rt,gt,k,ii;if(y.$$prepared||(y=d(kt(y))),bi={},tt=r(t),!tt||!tt.parentNode||!it.enabled())return sr();var at=[],ou=t.attr("class"),tu=nr(y),ki,ri,hr,hi,ir,ai,rr,vt,ar,pr,fi=[];if(y.duration===0||!g.animations&&!g.transitions)return sr();var ur=y.event&&c(y.event)?y.event.join(" "):y.event,su=ur&&y.structural,wr="",oi="";su?wr=h(ur,ti,!0):ur&&(wr=ur);y.addClass&&(oi+=h(y.addClass,ft));y.removeClass&&(oi.length&&(oi+=" "),oi+=h(y.removeClass,et));y.applyClassesEarly&&oi.length&&ut(t,y);var si=[wr,oi].join(" ").trim(),gi=ou+" "+si,iu=h(si,wi),ru=tu.to&&Object.keys(tu.to).length>0,hu=(y.keyframeStyle||"").length>0;return!hu&&!ru&&!si?sr():(y.stagger>0?(br=parseFloat(y.stagger),dt={transitionDelay:br,animationDelay:br,transitionDuration:0,animationDuration:0}):(yi=ot(tt,gi),dt=bt(tt,si,yi,vr)),y.$$skipPreparationClasses||o.addClass(t,si),y.transitionStyle&&(kr=[e,y.transitionStyle],w(tt,kr),at.push(kr)),y.duration>=0&&(fr=tt.style[e].length>0,dr=vi(y.duration,fr),w(tt,dr),at.push(dr)),y.keyframeStyle&&(gr=[s,y.keyframeStyle],w(tt,gr),at.push(gr)),er=dt?y.staggerIndex>=0?y.staggerIndex:n.count(yi):0,nu=er===0,nu&&!y.skipBlocking&&nt(tt,di),rt=lt(tt,gi,yi),gt=rt.maxDelay,ai=Math.max(gt,0),vt=rt.maxDuration,k={},k.hasTransitions=rt.transitionDuration>0,k.hasAnimations=rt.animationDuration>0,k.hasTransitionAll=k.hasTransitions&&rt.transitionProperty=="all",k.applyTransitionDuration=ru&&(k.hasTransitions&&!k.hasTransitionAll||k.hasAnimations&&!k.hasTransitions),k.applyAnimationDuration=y.duration&&k.hasAnimations,k.applyTransitionDelay=wt(y.delay)&&(k.applyTransitionDuration||k.hasTransitions),k.applyAnimationDelay=wt(y.delay)&&k.hasAnimations,k.recalculateTimingStyles=oi.length>0,(k.applyTransitionDuration||k.applyAnimationDuration)&&(vt=y.duration?parseFloat(y.duration):vt,k.applyTransitionDuration&&(k.hasTransitions=!0,rt.transitionDuration=vt,fr=tt.style[e+ui].length>0,at.push(vi(vt,fr))),k.applyAnimationDuration&&(k.hasAnimations=!0,rt.animationDuration=vt,at.push(yr(vt)))),vt===0&&!k.recalculateTimingStyles)?sr():(y.delay!=null&&(typeof y.delay!="boolean"&&(ii=parseFloat(y.delay),ai=Math.max(ii,0)),k.applyTransitionDelay&&at.push(pt(ii)),k.applyAnimationDelay&&at.push(pt(ii,!0))),y.duration==null&&rt.transitionDuration>0&&(k.recalculateTimingStyles=k.recalculateTimingStyles||nu),rr=ai*b,ar=vt*b,y.skipBlocking||(k.blockTransition=rt.transitionDuration>0,k.blockKeyframeAnimation=rt.animationDuration>0&&dt.animationDelay>0&&dt.animationDuration===0),y.from&&(y.cleanupStyles&&pi(bi,tt,Object.keys(y.from)),ci(t,y)),k.blockTransition||k.blockKeyframeAnimation?fu(vt):y.skipBlocking||nt(tt,!1),{$$willAnimate:!0,end:or,start:function(){if(!ki)return ir={end:or,cancel:uu,resume:null,pause:null},hi=new a(ir),ct(cu),hi}})}}]}],br=["$$animationProvider",function(n){function c(n){return n.parentNode&&n.parentNode.nodeType===11}n.drivers.push("$$animateCssDriver");var t="ng-animate-shim",s="ng-anchor",e="ng-anchor-out",h="ng-anchor-in";this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(n,l,a,v,p,w,b){function nt(n){return n.replace(/\bng-\S+\b/g,"")}function it(n,t){return o(n)&&(n=n.split(" ")),o(t)&&(t=t.split(" ")),n.filter(function(n){return t.indexOf(n)===-1}).join(" ")}function ut(f,o,c){function d(n){var t={},u=r(n).getBoundingClientRect();return i(["width","height","top","left"],function(n){var i=u[n];switch(n){case"top":i+=k.scrollTop;break;case"left":i+=k.scrollLeft}t[n]=Math.floor(i)+"px"}),t}function ut(){var t=n(v,{addClass:e,delay:!0,from:d(o)});return t.$$willAnimate?t:null}function g(n){return n.attr("class")||""}function tt(){var t=nt(g(c)),r=it(t,w),u=it(w,t),i=n(v,{to:d(c),addClass:h+" "+r,removeClass:e+" "+u,delay:!0});return i.$$willAnimate?i:null}function p(){v.remove();o.removeClass(t);c.removeClass(t)}var v=u(r(o).cloneNode(!0)),w=nt(g(v)),l,y,b;return(o.addClass(t),c.addClass(t),v.addClass(s),rt.append(v),y=ut(),!y&&(l=tt(),!l))?p():(b=y||l,{start:function(){function i(){n&&n.end()}var t,n=b.start();return n.done(function(){if(n=null,!l&&(l=tt(),l))return n=l.start(),n.done(function(){n=null;p();t.complete()}),n;p();t.complete()}),t=new a({end:i,cancel:i})}})}function ft(n,t,r,u){var e=g(n,f),o=g(t,f),s=[];if(i(u,function(n){var i=n.out,u=n["in"],t=ut(r,i,u);t&&s.push(t)}),e||o||s.length!==0)return{start:function(){function r(){i(n,function(n){n.end()})}var n=[],t;return e&&n.push(e.start()),o&&n.push(o.start()),i(s,function(t){n.push(t.start())}),t=new a({end:r,cancel:r}),a.all(n,function(n){t.complete(n)}),t}}}function g(t){var u=t.element,i=t.options||{},r;return t.structural&&(i.event=t.event,i.structural=!0,i.applyClassesEarly=!0,t.event==="leave"&&(i.onDone=i.domOperation)),i.preparationClasses&&(i.event=tt(i.event,i.preparationClasses)),r=n(u,i),r.$$willAnimate?r:null}if(!p.animations&&!p.transitions)return f;var k=b[0].body,d=r(v),rt=u(c(d)||k.contains(d)?d:k),et=y(w);return function(n){return n.from&&n.to?ft(n.from,n.to,n.classes,n.anchors):g(n)}}]}],kr=["$animateProvider",function(n){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(t,r,u){function o(i){var f,e,r,u,o;for(i=c(i)?i:i.split(" "),f=[],e={},r=0;r<i.length;r++)u=i[r],o=n.$$registeredAnimations[u],o&&!e[u]&&(f.push(t.get(o)),e[u]=!0);return f}var e=y(u);return function(n,t,u,s){function b(){s.domOperation();e(n,s)}function tt(){k=!0;b();p(n,s)}function rt(n,t,i,u,e){var s,o;switch(i){case"animate":s=[t,u.from,u.to,e];break;case"setClass":s=[t,g,nt,e];break;case"addClass":s=[t,g,e];break;case"removeClass":s=[t,nt,e];break;default:s=[t,e]}if(s.push(u),o=n.apply(n,s),o)if(ni(o.start)&&(o=o.start()),o instanceof r)o.done(e);else if(ni(o))return o;return f}function c(n,t,u,e,o){var s=[];return i(e,function(i){var e=i[o];e&&s.push(function(){var i,s,h=!1,o=function(n){h||(h=!0,(s||f)(n),i.complete(!n))};return i=new r({end:function(){o()},cancel:function(){o(!0)}}),s=rt(e,n,t,u,function(n){var t=n===!1;o(t)}),i})}),s}function it(n,t,u,f,e){var o=c(n,t,u,f,e),s,h;if(o.length===0&&(e==="beforeSetClass"?(s=c(n,"removeClass",u,f,"beforeRemoveClass"),h=c(n,"addClass",u,f,"beforeAddClass")):e==="setClass"&&(s=c(n,"removeClass",u,f,"removeClass"),h=c(n,"addClass",u,f,"addClass")),s&&(o=o.concat(s)),h&&(o=o.concat(h))),o.length!==0)return function(n){var t=[];return o.length&&i(o,function(n){t.push(n())}),t.length?r.all(t,n):n(),function(n){i(t,function(t){n?t.cancel():t.end()})}}}var k=!1,y,w,h;arguments.length===3&&ut(u)&&(s=u,u=null);s=d(s);u||(u=n.attr("class")||"",s.addClass&&(u+=" "+s.addClass),s.removeClass&&(u+=" "+s.removeClass));var g=s.addClass,nt=s.removeClass,v=o(u),l,a;if(v.length&&(t=="leave"?(w="leave",y="afterLeave"):(w="before"+t.charAt(0).toUpperCase()+t.substr(1),y=t),t!=="enter"&&t!=="move"&&(l=it(n,t,s,v,w)),a=it(n,t,s,v,y)),l||a)return{$$willAnimate:!0,end:function(){return h?h.end():(tt(),h=new r,h.complete(!0)),h},start:function(){function i(n){tt(n);h.complete(n)}function u(n){k||((t||f)(n),i(n))}if(h)return h;h=new r;var t,n=[];return l&&n.push(function(n){t=l(n)}),n.length?n.push(function(n){b();n(!0)}):b(),a&&n.push(function(n){t=a(n)}),h.setHost({end:function(){u()},cancel:function(){u(!0)}}),r.chain(n,i),h}}}}]}],dr=["$$animationProvider",function(n){n.drivers.push("$$animateJsDriver");this.$get=["$$animateJs","$$AnimateRunner",function(n,t){function r(t){var i=t.element,r=t.event,u=t.options,f=t.classes;return n(i,r,f,u)}return function(n){if(n.from&&n.to){var u=r(n.from),f=r(n.to);return!u&&!f?void 0:{start:function(){function e(){return function(){i(n,function(n){n.end()})}}function o(n){r.complete(n)}var n=[],r;return u&&n.push(u.start()),f&&n.push(f.start()),t.all(n,o),r=new t({end:e(),cancel:e()})}}}return r(n)}}]}],it="data-ng-animate",bt="$ngAnimatePin",gr=["$animateProvider",function(t){function b(n){if(!n)return null;var r=n.split(v),t=Object.create(null);return i(r,function(n){t[n]=!0}),t}function w(n,t){if(n&&t){var i=b(t);return n.split(v).some(function(n){return i[n]})}}function l(n,t,i,r){return f[n].some(function(n){return n(t,i,r)})}function s(n,t){var i=(n.addClass||"").length>0,r=(n.removeClass||"").length>0;return t?i&&r:i||r}var h=1,e=2,v=" ",f=this.rules={skip:[],cancel:[],join:[]};f.join.push(function(n,t){return!t.structural&&s(t)});f.skip.push(function(n,t){return!t.structural&&!s(t)});f.skip.push(function(n,t,i){return i.event=="leave"&&t.structural});f.skip.push(function(n,t,i){return i.structural&&i.state===e&&!t.structural});f.cancel.push(function(n,t,i){return i.structural&&t.structural});f.cancel.push(function(n,t,i){return i.state===e&&t.structural});f.cancel.push(function(n,t,i){if(i.structural)return!1;var r=t.addClass,u=t.removeClass,f=i.addClass,e=i.removeClass;return a(r)&&a(u)||a(f)&&a(e)?!1:w(r,e)||w(u,f)});this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow",function(f,v,w,b,nt,tt,ft,et,st){function oi(){var n=!1;return function(t){n?t():v.$$postDigest(function(){n=!0;t()})}}function ii(n,t){return g(n,t,{})}function li(n,t,u){var o=r(t),s=r(n),f=[],e=ct[u];return e&&i(e,function(n){ri.call(n.node,o)?f.push(n.callback):u==="leave"&&ri.call(n.node,s)&&f.push(n.callback)}),f}function ui(n,t,i){var r=vt(t);return n.filter(function(n){var t=n.node===r&&(!i||n.callback===i);return!t})}function fi(n,t){n!=="close"||t[0].parentNode||pt.off(t)}function ai(n,t,u){function ct(t,r,u,e){pt(function(){var t=li(vt,n,r);t.length?f(function(){i(t,function(t){t(n,u,e)});fi(u,n)}):fi(u,n)});t.progress(r,u,e)}function it(t){or(n,a);ti(n,a);p(n,a);a.domOperation();k.complete(!t)}var a=kt(u),nt,vt,k,pt,bt,w,gt,ni,ri,ot,st;if((n=ir(n),n&&(nt=r(n),vt=n.parent()),a=d(a),k=new ft,pt=oi(),c(a.addClass)&&(a.addClass=a.addClass.join(" ")),a.addClass&&!o(a.addClass)&&(a.addClass=null),c(a.removeClass)&&(a.removeClass=a.removeClass.join(" ")),a.removeClass&&!o(a.removeClass)&&(a.removeClass=null),a.from&&!ut(a.from)&&(a.from=null),a.to&&!ut(a.to)&&(a.to=null),!nt)||(bt=[nt.className,a.addClass,a.removeClass].join(" "),!ci(bt)))return it(),k;var rt=["enter","move","leave"].indexOf(t)>=0,yt=b[0].hidden,et=!at||yt||lt.get(nt),y=!et&&ht.get(nt)||{},dt=!!y.state;if(et||dt&&y.state==h||(et=!yi(n,vt,t)),et)return yt&&ct(k,t,"start"),it(),yt&&ct(k,t,"close"),k;if(rt&&vi(n),w={structural:rt,element:n,event:t,addClass:a.addClass,removeClass:a.removeClass,close:it,options:a,runner:k},dt){if(gt=l("skip",n,w,y),gt)return y.state===e?(it(),k):(g(n,y,w),y.runner);if(ni=l("cancel",n,w,y),ni)if(y.state===e)y.runner.end();else if(y.structural)y.close();else return g(n,y,w),y.runner;else if(ri=l("join",n,w,y),ri)if(y.state===e)ii(n,w);else return er(n,rt?t:null,a),t=w.event=y.event,a=g(n,y,w),y.runner}else ii(n,w);return(ot=w.structural,ot||(ot=w.event==="animate"&&Object.keys(w.options.to||{}).length>0||s(w)),!ot)?(it(),wt(n),k):(st=(y.counter||0)+1,w.counter=st,ei(n,h,w),v.$$postDigest(function(){var i=ht.get(nt),u=!i,h,f,o;if(i=i||{},h=n.parent()||[],f=h.length>0&&(i.event==="animate"||i.structural||s(i)),u||i.counter!==st||!f){u&&(ti(n,a),p(n,a));(u||rt&&i.event!==t)&&(a.domOperation(),k.end());f||wt(n);return}t=!i.structural&&s(i,!0)?"setClass":i.event;ei(n,e);o=tt(n,t,i.options);k.setHost(o);ct(k,t,"start",{});o.done(function(i){it(!i);var u=ht.get(nt);u&&u.counter===st&&wt(r(n));ct(k,t,"close",{})})}),k)}function vi(n){var t=r(n),u=t.querySelectorAll("["+it+"]");i(u,function(n){var i=parseInt(n.getAttribute(it)),t=ht.get(n);if(t)switch(i){case e:t.runner.end();case h:ht.remove(n)}})}function wt(n){var t=r(n);t.removeAttribute(it);ht.remove(t)}function yt(n,t){return r(n)===r(t)}function yi(n,t){var v=u(b[0].body),o=yt(n,v)||n[0].nodeName==="HTML",i=yt(n,w),s=!1,f,h=lt.get(r(n)),e=u.data(n[0],bt),y,c,l,p;for(e&&(t=e),t=r(t);t;){if(i||(i=yt(t,w)),t.nodeType!==k)break;if(y=ht.get(t)||{},!s){if(c=lt.get(t),c===!0&&h!==!1){h=!0;break}else c===!1&&(h=!1);s=y.structural}if((a(f)||f===!0)&&(l=u.data(t,ot),gt(l)&&(f=l)),s&&f===!1)break;if(o||(o=yt(t,v)),o&&i)break;if(!i&&(e=u.data(t,bt),e)){t=r(e);continue}t=t.parentNode}return p=(!s||f)&&h!==!0,p&&i&&o}function ei(n,t,i){var u,f,e;i=i||{};i.state=t;u=r(n);u.setAttribute(it,t);f=ht.get(u);e=f?dt(f,i):i;ht.put(u,e)}var ht=new nt,lt=new nt,at=null,hi=v.$watch(function(){return et.totalPendingRequests===0},function(n){n&&(hi(),v.$$postDigest(function(){v.$$postDigest(function(){at===null&&(at=!0)})}))}),ct=Object.create(null),ni=t.classNameFilter(),ci=ni?function(n){return ni.test(n)}:function(){return!0},ti=y(st),ri=n.Node.prototype.contains||function(n){return this===n||!!(this.compareDocumentPosition(n)&16)},pt={on:function(n,t,i){var r=vt(t);ct[n]=ct[n]||[];ct[n].push({node:r,callback:i});u(t).on("$destroy",function(){var u=ht.get(r);u||pt.off(n,t,i)})},off:function(n,t,i){var r,u;if(arguments.length===1&&!o(arguments[0])){t=arguments[0];for(r in ct)ct[r]=ui(ct[r],t);return}(u=ct[n],u)&&(ct[n]=arguments.length===1?null:ui(u,t,i))},pin:function(n,t){si(rt(n),"element","not an element");si(rt(t),"parentElement","not an element");n.data(bt,t)},push:function(n,t,i,r){return i=i||{},i.domOperation=r,ai(n,t,i)},enabled:function(n,t){var u=arguments.length,f,i;return u===0?t=!!at:(f=rt(n),f?(i=r(n),u===1?t=!lt.get(i):lt.put(i,!t)):t=at=!!n),t}};return pt}]}],nu=["$animateProvider",function(){function o(n,t){n.data(e,t)}function s(n){n.removeData(e)}function t(n){return n.data(e)}var n="ng-animate-ref",f=this.drivers=[],e="$$animationRunner";this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(e,h,c,l,a,v){function k(n){function f(n){var e,i,t;if(n.processed)return n;for(n.processed=!0,e=n.domNode,i=e.parentNode,r.put(e,n);i;){if(t=r.get(i),t){t.processed||(t=f(t));break}i=i.parentNode}return(t||u).children.push(n),n}function e(n){for(var u=[],i=[],o,t=0;t<n.children.length;t++)i.push(n.children[t]);var f=i.length,e=0,r=[];for(t=0;t<i.length;t++)o=i[t],f<=0&&(f=e,e=0,u.push(r),r=[]),r.push(o.fn),o.children.forEach(function(n){e++;i.push(n)}),f--;return r.length&&u.push(r),u}for(var u={children:[]},r=new a,i,t=0;t<n.length;t++)i=n[t],r.put(i.domNode,n[t]={domNode:i.domNode,fn:i.fn,children:[]});for(t=0;t<n.length;t++)f(n[t]);return e(u)}var w=[],b=y(e);return function(a,y,g){function ot(t){var u="["+n+"]",f=t.hasAttribute(n)?[t]:t.querySelectorAll(u),r=[];return i(f,function(t){var i=t.getAttribute(n);i&&i.length&&r.push(t)}),r}function st(t){var f=[],e={},s,o;return i(t,function(t,o){var c=t.element,l=r(c),a=t.event,v=["enter","move"].indexOf(a)>=0,s=t.structural?ot(l):[],h;s.length?(h=v?"to":"from",i(s,function(t){var i=t.getAttribute(n);e[i]=e[i]||{};e[i][h]={animationID:o,element:u(t)}})):f.push(t)}),s={},o={},i(e,function(n){var i=n.from,e=n.to,h,c,a;if(!i||!e){h=i?i.animationID:e.animationID;c=h.toString();s[c]||(s[c]=!0,f.push(t[h]));return}var r=t[i.animationID],u=t[e.animationID],l=i.animationID.toString();o[l]||(a=o[l]={structural:!0,beforeStart:function(){r.beforeStart();u.beforeStart()},close:function(){r.close();u.close()},classes:ht(r.classes,u.classes),from:r,to:u,anchors:[]},a.classes.length?f.push(a):(f.push(r),f.push(u)));o[l].anchors.push({out:i.element,"in":e.element})}),f}function ht(n,t){var f,i,r,u;for(n=n.split(" "),t=t.split(" "),f=[],i=0;i<n.length;i++)if(r=n[i],r.substring(0,3)!=="ng-")for(u=0;u<t.length;u++)if(r===t[u]){f.push(r);break}return f.join(" ")}function ct(n){for(var t=f.length-1;t>=0;t--){var r=f[t],u=c.get(r),i=u(n);if(i)return i}}function lt(){a.addClass(ii);nt&&e.addClass(a,nt);it&&(e.removeClass(a,it),it=null)}function at(n,i){function r(n){var r=t(n);r&&r.setHost(i)}n.from&&n.to?(r(n.from.element),r(n.to.element)):r(n.element)}function et(){var n=t(a);n&&(y!=="leave"||!g.$$domOperationFired)&&n.end()}function rt(n){a.off("$destroy",et);s(a);b(a,g);p(a,g);g.domOperation();nt&&e.removeClass(a,nt);a.removeClass(ii);tt.complete(!n)}var ut,tt,ft,nt,it;if(g=d(g),ut=["enter","move","leave"].indexOf(y)>=0,tt=new l({end:function(){rt()},cancel:function(){rt(!0)}}),!f.length)return rt(),tt;o(a,tt);ft=hi(a.attr("class"),hi(g.addClass,g.removeClass));nt=g.tempClasses;nt&&(ft+=" "+nt,g.tempClasses=null);ut&&(it="ng-"+y+bi,e.addClass(a,it));w.push({element:a,classes:ft,event:y,structural:ut,options:g,beforeStart:lt,close:rt});a.on("$destroy",et);return w.length>1?tt:(h.$$postDigest(function(){var u=[],f,n;i(w,function(n){t(n.element)?u.push(n):n.close()});w.length=0;f=st(u);n=[];i(f,function(i){n.push({domNode:r(i.from?i.from.element:i.element),fn:function(){var n,r,e,u,f;i.beforeStart();r=i.close;e=i.anchors?i.from.element||i.to.element:i.element;t(e)&&(u=ct(i),u&&(n=u.start));n?(f=n(),f.done(function(n){r(!n)}),at(i,f)):r()}})});v(k(n))}),tt)}}]}],tu=["$animate","$rootScope",function(n){return{restrict:"A",transclude:"element",terminal:!0,priority:600,link:function(t,i,r,u,f){var o,e;t.$watchCollection(r.ngAnimateSwap||r["for"],function(r){o&&n.leave(o);e&&(e.$destroy(),e=null);(r||r===0)&&(e=t.$new(),f(e,function(t){o=t;n.enter(t,null,i)}))})}}}],kt,dt,i,c,gt,rt,ni,ut,o,a,u,f;t.module("ngAnimate",[],function(){f=t.noop;kt=t.copy;dt=t.extend;u=t.element;i=t.forEach;c=t.isArray;o=t.isString;ut=t.isObject;a=t.isUndefined;gt=t.isDefined;ni=t.isFunction;rt=t.isElement}).directive("ngAnimateSwap",tu).directive("ngAnimateChildren",hr).factory("$$rAFScheduler",sr).provider("$$animateQueue",gr).provider("$$animation",nu).provider("$animateCss",wr).provider("$$animateCssDriver",br).provider("$$animateJs",kr).provider("$$animateJsDriver",dr)})(window,window.angular),function(n,t){"use strict";function f(){function i(t,i,u,f){return function(e,o,s){var h=s.$normalize(i);!n[h]||r(o,u)||s[h]||e.$watch(s[t],function(n){n=f?!n:!!n;o.attr(i,n)})}}var n={ariaHidden:!0,ariaChecked:!0,ariaReadonly:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaValue:!0,tabindex:!0,bindKeypress:!0,bindRoleForClick:!0};this.config=function(i){n=t.extend(n,i)};this.$get=function(){return{config:function(t){return n[t]},$$watchExpr:i}}}var u=t.module("ngAria",["ng"]).provider("$aria",f),i=["BUTTON","A","INPUT","TEXTAREA","SELECT","DETAILS","SUMMARY"],r=function(n,t){if(t.indexOf(n[0].nodeName)!==-1)return!0};u.directive("ngShow",["$aria",function(n){return n.$$watchExpr("ngShow","aria-hidden",[],!0)}]).directive("ngHide",["$aria",function(n){return n.$$watchExpr("ngHide","aria-hidden",[],!1)}]).directive("ngValue",["$aria",function(n){return n.$$watchExpr("ngValue","aria-checked",i,!1)}]).directive("ngChecked",["$aria",function(n){return n.$$watchExpr("ngChecked","aria-checked",i,!1)}]).directive("ngReadonly",["$aria",function(n){return n.$$watchExpr("ngReadonly","aria-readonly",i,!1)}]).directive("ngRequired",["$aria",function(n){return n.$$watchExpr("ngRequired","aria-required",i,!1)}]).directive("ngModel",["$aria",function(n){function t(t,u,f,e){return n.config(u)&&!f.attr(t)&&(e||!r(f,i))}function u(n,t){return!t.attr("role")&&t.attr("type")===n&&t[0].nodeName!=="INPUT"}function f(n){var i=n.type,t=n.role;return(i||t)==="checkbox"||t==="menuitemcheckbox"?"checkbox":(i||t)==="radio"||t==="menuitemradio"?"radio":i==="range"||t==="progressbar"||t==="slider"?"range":""}return{restrict:"A",require:"ngModel",priority:200,compile:function(i,r){var e=f(r,i);return{pre:function(n,t,i,r){e==="checkbox"&&(r.$isEmpty=function(n){return n===!1})},post:function(i,r,f,o){function h(){return o.$modelValue}function c(){var n=f.value==o.$viewValue;r.attr("aria-checked",n)}function l(){r.attr("aria-checked",!o.$isEmpty(o.$viewValue))}var s=t("tabindex","tabindex",r,!1);switch(e){case"radio":case"checkbox":u(e,r)&&r.attr("role",e);t("aria-checked","ariaChecked",r,!1)&&i.$watch(h,e==="radio"?c:l);s&&r.attr("tabindex",0);break;case"range":if(u(e,r)&&r.attr("role","slider"),n.config("ariaValue")){var a=!r.attr("aria-valuemin")&&(f.hasOwnProperty("min")||f.hasOwnProperty("ngMin")),v=!r.attr("aria-valuemax")&&(f.hasOwnProperty("max")||f.hasOwnProperty("ngMax")),y=!r.attr("aria-valuenow");a&&f.$observe("min",function(n){r.attr("aria-valuemin",n)});v&&f.$observe("max",function(n){r.attr("aria-valuemax",n)});y&&i.$watch(h,function(n){r.attr("aria-valuenow",n)})}s&&r.attr("tabindex",0)}!f.hasOwnProperty("ngRequired")&&o.$validators.required&&t("aria-required","ariaRequired",r,!1)&&f.$observe("required",function(){r.attr("aria-required",!!f.required)});t("aria-invalid","ariaInvalid",r,!0)&&i.$watch(function(){return o.$invalid},function(n){r.attr("aria-invalid",!!n)})}}}}}]).directive("ngDisabled",["$aria",function(n){return n.$$watchExpr("ngDisabled","aria-disabled",i,!1)}]).directive("ngMessages",function(){return{restrict:"A",require:"?ngMessages",link:function(n,t){t.attr("aria-live")||t.attr("aria-live","assertive")}}}).directive("ngClick",["$aria","$parse",function(n,t){return{restrict:"A",compile:function(u,f){var e=t(f.ngClick,null,!0);return function(t,u,f){if(!r(u,i)&&(n.config("bindRoleForClick")&&!u.attr("role")&&u.attr("role","button"),n.config("tabindex")&&!u.attr("tabindex")&&u.attr("tabindex",0),n.config("bindKeypress")&&!f.ngKeypress))u.on("keypress",function(n){function r(){e(t,{$event:n})}var i=n.which||n.keyCode;(i===32||i===13)&&t.$apply(r)})}}}}]).directive("ngDblclick",["$aria",function(n){return function(t,u){!n.config("tabindex")||u.attr("tabindex")||r(u,i)||u.attr("tabindex",0)}}])}(window,window.angular),function(n,t){"use strict";function e(n){return t.lowercase(n.nodeName||n[0]&&n[0].nodeName)}function u(n,i){var u=!1,f=!1;this.ngClickOverrideEnabled=function(e){return t.isDefined(e)?(e&&!f&&(f=!0,r.$$moduleName="ngTouch",i.directive("ngClick",r),n.decorator("ngClickDirective",["$delegate",function(n){if(u)n.shift();else for(var t=n.length-1;t>=0;){if(n[t].$$moduleName==="ngTouch"){n.splice(t,1);break}t--}return n}])),u=e,this):u};this.$get=function(){return{ngClickOverrideEnabled:function(){return u}}}}function f(n,r,u){i.directive(n,["$parse","$swipe",function(i,f){var e=75,o=.3,s=30;return function(h,c,l){function w(n){if(!a)return!1;var i=Math.abs(n.y-a.y),t=(n.x-a.x)*r;return v&&i<e&&t>0&&t>s&&i/t<o}var p=i(l[n]),a,v,y=["touch"];t.isDefined(l.ngSwipeDisableMouse)||y.push("mouse");f.bind(c,{start:function(n){a=n;v=!0},cancel:function(){v=!1},end:function(n,t){w(n)&&h.$apply(function(){c.triggerHandler(u);p(h,{$event:t})})}},y)}}])}var i=t.module("ngTouch",[]),r;i.provider("$touch",u);u.$inject=["$provide","$compileProvider"];i.factory("$swipe",[function(){function i(n){var t=n.originalEvent||n,r=t.touches&&t.touches.length?t.touches:[t],i=t.changedTouches&&t.changedTouches[0]||r[0];return{x:i.clientX,y:i.clientY}}function n(n,i){var r=[];return t.forEach(n,function(n){var t=u[n][i];t&&r.push(t)}),r.join(" ")}var r=10,u={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"},pointer:{start:"pointerdown",move:"pointermove",end:"pointerup",cancel:"pointercancel"}};return{bind:function(t,u,f){var o,s,h,c,e=!1,l;f=f||["mouse","touch","pointer"];t.on(n(f,"start"),function(n){h=i(n);e=!0;o=0;s=0;c=h;u.start&&u.start(h,n)});if(l=n(f,"cancel"),l)t.on(l,function(n){e=!1;u.cancel&&u.cancel(n)});t.on(n(f,"move"),function(n){if(e&&h){var t=i(n);if(o+=Math.abs(t.x-c.x),s+=Math.abs(t.y-c.y),c=t,!(o<r)||!(s<r)){if(s>o){e=!1;u.cancel&&u.cancel(n);return}n.preventDefault();u.move&&u.move(t,n)}}});t.on(n(f,"end"),function(n){e&&(e=!1,u.end&&u.end(i(n),n))})}}}]);r=["$parse","$timeout","$rootElement",function(n,i,r){function y(n,t,i,r){return Math.abs(n-i)<h&&Math.abs(t-r)<h}function l(n,t,i){for(var r=0;r<n.length;r+=2)if(y(n[r],n[r+1],t,i))return n.splice(r,r+2),!0;return!1}function p(n){if(!(Date.now()-c>s)){var r=n.touches&&n.touches.length?n.touches:[n],t=r[0].clientX,i=r[0].clientY;t<1&&i<1||f&&f[0]===t&&f[1]===i||(f&&(f=null),e(n.target)==="label"&&(f=[t,i]),l(u,t,i))||(n.stopPropagation(),n.preventDefault(),n.target&&n.target.blur&&n.target.blur())}}function w(n){var t=n.touches&&n.touches.length?n.touches:[n],r=t[0].clientX,f=t[0].clientY;u.push(r,f);i(function(){for(var n=0;n<u.length;n+=2)if(u[n]==r&&u[n+1]==f){u.splice(n,n+2);return}},s,!1)}function b(n,t){u||(r[0].addEventListener("click",p,!0),r[0].addEventListener("touchstart",w,!0),u=[]);c=Date.now();l(u,n,t)}var a=750,v=12,s=2500,h=25,o="ng-click-active",c,u,f;return function(i,r,u){function l(){e=!1;r.removeClass(o)}var y=n(u.ngClick),e=!1,f,s,h,c;r.on("touchstart",function(n){e=!0;f=n.target?n.target:n.srcElement;f.nodeType==3&&(f=f.parentNode);r.addClass(o);s=Date.now();var t=n.originalEvent||n,u=t.touches&&t.touches.length?t.touches:[t],i=u[0];h=i.clientX;c=i.clientY});r.on("touchcancel",function(){l()});r.on("touchend",function(n){var w=Date.now()-s,i=n.originalEvent||n,k=i.changedTouches&&i.changedTouches.length?i.changedTouches:i.touches&&i.touches.length?i.touches:[i],o=k[0],y=o.clientX,p=o.clientY,d=Math.sqrt(Math.pow(y-h,2)+Math.pow(p-c,2));e&&w<a&&d<v&&(b(y,p),f&&f.blur(),t.isDefined(u.disabled)&&u.disabled!==!1||r.triggerHandler("click",[n]));l()});r.onclick=function(){};r.on("click",function(n,t){i.$apply(function(){y(i,{$event:t||n})})});r.on("mousedown",function(){r.addClass(o)});r.on("mousemove mouseup",function(){r.removeClass(o)})}}];f("ngSwipeLeft",-1,"swipeleft");f("ngSwipeRight",1,"swiperight")}(window,window.angular),function(n,t){"use strict";function i(n,i,r){function e(n,r,f){var s,e,o,h;return f=f||{},e=f.expires,s=t.isDefined(f.path)?f.path:u,t.isUndefined(r)&&(e="Thu, 01 Jan 1970 00:00:00 GMT",r=""),t.isString(e)&&(e=new Date(e)),o=encodeURIComponent(n)+"="+encodeURIComponent(r),o+=s?";path="+s:"",o+=f.domain?";domain="+f.domain:"",o+=e?";expires="+e.toUTCString():"",o+=f.secure?";secure":"",h=o.length+1,h>4096&&i.warn("Cookie '"+n+"' possibly not set or overflowed because it was too large ("+h+" > 4096 bytes)!"),o}var u=r.baseHref(),f=n[0];return function(n,t,i){f.cookie=e(n,t,i)}}t.module("ngCookies",["ng"]).provider("$cookies",[function(){function i(i){return i?t.extend({},n,i):n}var n=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(n,r){return{get:function(t){return n()[t]},getObject:function(n){var i=this.get(n);return i?t.fromJson(i):i},getAll:function(){return n()},put:function(n,t,u){r(n,t,i(u))},putObject:function(n,i,r){this.put(n,t.toJson(i),r)},remove:function(n,t){r(n,undefined,i(t))}}}]}]);t.module("ngCookies").factory("$cookieStore",["$cookies",function(n){return{get:function(t){return n.getObject(t)},put:function(t,i){n.putObject(t,i)},remove:function(t){n.remove(t)}}}]);i.$inject=["$document","$log","$browser"];t.module("ngCookies").provider("$$cookieWriter",function(){this.$get=i})}(window,window.angular),function(n){"use strict";function yt(n){if(n==null)return"";switch(typeof n){case"string":return n;case"number":return""+n;default:return at(n)}}function r(n,t){for(var r,u=n.split(/\n/g),i=0;i<u.length;i++)if(r=u[i],t>=r.length)t-=r.length;else return{line:i+1,column:t+1}}function p(n){function t(){return n}var i=y[n];return i!=null?i:(t.$$watchDelegate=function(t,i,r){var u=t.$watch(v,function(){e(i)&&i.call(null,n,n,t);u()},r);return u},y[n]=t,t.exp=n,t.expressions=[],t)}function pt(n,t){function i(n){return n==void 0?n:n-t}function r(t){return i(n(t))}if(t===0)return n;var u;return r.$$watchDelegate=function(t,r,f){return u=t.$watch(n,function(n,u){e(r)&&r.call(null,i(n),i(u),t)},f)},r}function f(n,t){var r=this;if(this.expressionFn=n,this.choices=t,t.other===void 0)throw i("reqother","“other” is a required option.");this.parsedFn=function(n){return r.getResult(n)};this.parsedFn.$$watchDelegate=function(n,t,i){return r.watchDelegate(n,t,i)};this.parsedFn.exp=n.exp;this.parsedFn.expressions=n.expressions}function o(n,t,i,r){var f=this,u;this.scope=t;this.msgSelector=n;this.listener=i;this.objectEquality=r;this.lastMessage=void 0;this.messageFnWatcher=v;u=function(n,t){return f.expressionFnListener(n,t)};this.expressionFnWatcher=t.$watch(n.expressionFn,u,r)}function s(n,t){f.call(this,n,t)}function w(){}function h(n,t,i,r){f.call(this,n,t);this.offset=i;this.pluralCat=r}function b(){}function u(n,t){this.trustedContext=n;this.allOrNothing=t;this.textParts=[];this.expressionFns=[];this.expressionIndices=[];this.partialText="";this.concatParts=null}function c(n,t,i){this.interpolationParts=n;this.scope=t;this.previousResult=void 0;this.listener=i;var r=this;this.expressionFnsWatcher=t.$watchGroup(n.expressionFns,function(n,t){r.watchListener(n,t)})}function l(n,t){t.expressionFn=n.expressionFn;t.expressionMinusOffsetFn=n.expressionMinusOffsetFn;t.pluralOffset=n.pluralOffset;t.choices=n.choices;t.choiceKey=n.choiceKey;t.interpolationParts=n.interpolationParts;t.ruleChoiceKeyword=n.ruleChoiceKeyword;t.msgStartIndex=n.msgStartIndex;t.expressionStartIndex=n.expressionStartIndex}function k(n){l(n,this)}function t(n,t,i,r,u,f,e,o){this.text=n;this.index=t||0;this.$parse=i;this.pluralCat=r;this.stringifier=u;this.mustHaveExpression=!!f;this.trustedContext=e;this.allOrNothing=!!o;this.expressionFn=null;this.expressionMinusOffsetFn=null;this.pluralOffset=null;this.choices=null;this.choiceKey=null;this.interpolationParts=null;this.msgStartIndex=null;this.nestedStateStack=[];this.parsedFn=null;this.rule=null;this.ruleStack=null;this.ruleChoiceKeyword=null;this.interpNestLevel=null;this.expressionStartIndex=null;this.stringStartIndex=null;this.stringQuote=null;this.stringInterestsRe=null;this.angularOperatorStack=null;this.textPart=null}function ct(n){switch(n){case"{":return"}";case"[":return"]";case"(":return")";default:return null}}function dt(n){switch(n){case"}":return"{";case"]":return"[";case")":return"(";default:return null}}var y=Object.create(null),d,g,nt,tt,it,rt,a,ut,ft,et,ot,wt,ht,lt;f.prototype.getMessageFn=function(n){return this.choices[this.categorizeValue(n)]};f.prototype.getResult=function(n){return this.getMessageFn(this.expressionFn(n))(n)};f.prototype.watchDelegate=function(n,t,i){var r=new o(this,n,t,i);return function(){r.cancelWatch()}};o.prototype.expressionFnListener=function(n){var r=this,t,i;this.messageFnWatcher();t=function(n,t){return r.messageFnListener(n,t)};i=this.msgSelector.getMessageFn(n);this.messageFnWatcher=this.scope.$watch(i,t,this.objectEquality)};o.prototype.messageFnListener=function(n,t){e(this.listener)&&this.listener.call(null,n,n===t?n:this.lastMessage,this.scope);this.lastMessage=n};o.prototype.cancelWatch=function(){this.expressionFnWatcher();this.messageFnWatcher()};w.prototype=f.prototype;s.prototype=new w;s.prototype.categorizeValue=function(n){return this.choices[n]!==void 0?n:"other"};b.prototype=f.prototype;h.prototype=new b;h.prototype.categorizeValue=function(n){if(isNaN(n))return"other";if(this.choices[n]!==void 0)return n;var t=this.pluralCat(n-this.offset);return this.choices[t]!==void 0?t:"other"};u.prototype.flushPartialText=function(){this.partialText&&(this.concatParts==null?this.textParts.push(this.partialText):(this.textParts.push(this.concatParts.join("")),this.concatParts=null),this.partialText="")};u.prototype.addText=function(n){n.length&&(this.partialText?this.concatParts?this.concatParts.push(n):this.concatParts=[this.partialText,n]:this.partialText=n)};u.prototype.addExpressionFn=function(n){this.flushPartialText();this.expressionIndices.push(this.textParts.length);this.expressionFns.push(n);this.textParts.push("")};u.prototype.getExpressionValues=function(n){for(var i=new Array(this.expressionFns.length),t=0;t<this.expressionFns.length;t++)i[t]=this.expressionFns[t](n);return i};u.prototype.getResult=function(n){for(var i,t=0;t<this.expressionIndices.length;t++){if(i=n[t],this.allOrNothing&&i===void 0)return;this.textParts[this.expressionIndices[t]]=i}return this.textParts.join("")};u.prototype.toParsedFn=function(n,t){var f=this,r,u;if(this.flushPartialText(),n&&this.expressionFns.length===0)return void 0;if(this.textParts.length===0)return p("");if(this.trustedContext&&this.textParts.length>1&&i.throwNoconcat(t),this.expressionFns.length===0)return this.textParts.length!=1&&this.errorInParseLogic(),p(this.textParts[0]);for(r=function(n){return f.getResult(f.getExpressionValues(n))},r.$$watchDelegate=function(n,t,i){return f.watchDelegate(n,t,i)},r.exp=t,r.expressions=new Array(this.expressionFns.length),u=0;u<this.expressionFns.length;u++)r.expressions[u]=this.expressionFns[u].exp;return r};u.prototype.watchDelegate=function(n,t,i){var r=new c(this,n,t,i);return function(){r.cancelWatch()}};c.prototype.watchListener=function(n,t){var i=this.interpolationParts.getResult(n);e(this.listener)&&this.listener.call(null,i,n===t?i:this.previousResult,this.scope);this.previousResult=i};c.prototype.cancelWatch=function(){this.expressionFnsWatcher()};d=new k(new t("",0,null,null,null,!1,null,!1));t.prototype.pushState=function(){this.nestedStateStack.push(new k(this));l(d,this)};t.prototype.popState=function(){this.nestedStateStack.length===0&&this.errorInParseLogic();var n=this.nestedStateStack.pop();l(n,this)};t.prototype.matchRe=function(n,t){n.lastIndex=this.index;var i=n.exec(this.text);return i!=null&&(t===!0||i.index==this.index)?(this.index=n.lastIndex,i):null};t.prototype.searchRe=function(n){return this.matchRe(n,!0)};t.prototype.consumeRe=function(n){return!!this.matchRe(n)};t.prototype.run=function(n){this.ruleStack=[n];do{for(this.rule=this.ruleStack.pop();this.rule;)this.rule();this.assertRuleOrNull(this.rule)}while(this.ruleStack.length>0)};t.prototype.errorInParseLogic=function(){throw i("logicbug","The messageformat parser has encountered an internal error.  Please file a github issue against the AngularJS project and provide this message text that triggers the bug.  Text: “{0}”",this.text);};t.prototype.assertRuleOrNull=function(n){n===void 0&&this.errorInParseLogic()};g=/\s*(\w+)\s*/g;t.prototype.errorExpecting=function(){var u=this.matchRe(g),n,t;if(u==null){n=r(this.text,this.index);throw i("reqarg","Expected one of “plural” or “select” at line {0}, column {1} of text “{2}”",n.line,n.column,this.text);}if(t=u[1],t=="select"||t=="plural"){n=r(this.text,this.index);throw i("reqcomma","Expected a comma after the keyword “{0}” at line {1}, column {2} of text “{3}”",t,n.line,n.column,this.text);}else{n=r(this.text,this.index);throw i("unknarg","Unsupported keyword “{0}” at line {0}, column {1}. Only “plural” and “select” are currently supported.  Text: “{3}”",t,n.line,n.column,this.text);}};nt=/['"]/g;t.prototype.ruleString=function(){var t=this.matchRe(nt),n;if(t==null){n=r(this.text,this.index);throw i("wantstring","Expected the beginning of a string at line {0}, column {1} in text “{2}”",n.line,n.column,this.text);}this.startStringAtMatch(t)};t.prototype.startStringAtMatch=function(n){this.stringStartIndex=n.index;this.stringQuote=n[0];this.stringInterestsRe=this.stringQuote=="'"?tt:it;this.rule=this.ruleInsideString};tt=/\\(?:\\|'|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|'/g;it=/\\(?:\\|"|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|"/g;t.prototype.ruleInsideString=function(){var n=this.searchRe(this.stringInterestsRe),t,u;if(n==null){t=r(this.text,this.stringStartIndex);throw i("untermstr","The string beginning at line {0}, column {1} is unterminated in text “{2}”",t.line,t.column,this.text);}u=n[0];n==this.stringQuote&&(this.rule=null)};rt=/\s*(plural|select)\s*,\s*/g;t.prototype.rulePluralOrSelect=function(){var n=this.searchRe(rt),t;n==null&&this.errorExpecting();t=n[1];switch(t){case"plural":this.rule=this.rulePluralStyle;break;case"select":this.rule=this.ruleSelectStyle;break;default:this.errorInParseLogic()}};t.prototype.rulePluralStyle=function(){this.choices=Object.create(null);this.ruleChoiceKeyword=this.rulePluralValueOrKeyword;this.rule=this.rulePluralOffset};t.prototype.ruleSelectStyle=function(){this.choices=Object.create(null);this.ruleChoiceKeyword=this.ruleSelectKeyword;this.rule=this.ruleSelectKeyword};a=/[0]|(?:[1-9][0-9]*)/g;ut=new RegExp("\\s*offset\\s*:\\s*("+a.source+")","g");t.prototype.rulePluralOffset=function(){var n=this.matchRe(ut);this.pluralOffset=n==null?0:parseInt(n[1],10);this.expressionMinusOffsetFn=pt(this.expressionFn,this.pluralOffset);this.rule=this.rulePluralValueOrKeyword};t.prototype.assertChoiceKeyIsNew=function(n,t){if(this.choices[n]!==void 0){var u=r(this.text,t);throw i("dupvalue","The choice “{0}” is specified more than once. Duplicate key is at line {1}, column {2} in text “{3}”",n,u.line,u.column,this.text);}};ft=/\s*(\w+)/g;t.prototype.ruleSelectKeyword=function(){var n=this.matchRe(ft);if(n==null){this.parsedFn=new s(this.expressionFn,this.choices).parsedFn;this.rule=null;return}this.choiceKey=n[1];this.assertChoiceKeyIsNew(this.choiceKey,n.index);this.rule=this.ruleMessageText};et=new RegExp("\\s*(?:(?:=("+a.source+"))|(\\w+))","g");t.prototype.rulePluralValueOrKeyword=function(){var n=this.matchRe(et);if(n==null){this.parsedFn=new h(this.expressionFn,this.choices,this.pluralOffset,this.pluralCat).parsedFn;this.rule=null;return}this.choiceKey=n[1]!=null?parseInt(n[1],10):n[2];this.assertChoiceKeyIsNew(this.choiceKey,n.index);this.rule=this.ruleMessageText};ot=/\s*{/g;wt=/}/g;t.prototype.ruleMessageText=function(){if(!this.consumeRe(ot)){var n=r(this.text,this.index);throw i("reqopenbrace","The plural choice “{0}” must be followed by a message in braces at line {1}, column {2} in text “{3}”",this.choiceKey,n.line,n.column,this.text);}this.msgStartIndex=this.index;this.interpolationParts=new u(this.trustedContext,this.allOrNothing);this.rule=this.ruleInInterpolationOrMessageText};var bt=/\\.|{{|}/g,kt=/\\.|{{|#|}/g,st=/\\.|{{/g;t.prototype.advanceInInterpolationOrMessageText=function(){var u=this.index,n,t,f;if(this.ruleChoiceKeyword==null){if(n=this.searchRe(st),n==null)return this.textPart=this.text.substring(u),this.index=this.text.length,null}else if(n=this.searchRe(this.ruleChoiceKeyword==this.rulePluralValueOrKeyword?kt:bt),n==null){t=r(this.text,this.msgStartIndex);throw i("reqendbrace","The plural/select choice “{0}” message starting at line {1}, column {2} does not have an ending closing brace. Text “{3}”",this.choiceKey,t.line,t.column,this.text);}return f=n[0],this.textPart=this.text.substring(u,n.index),f};t.prototype.ruleInInterpolationOrMessageText=function(){var t=this.index,n=this.advanceInInterpolationOrMessageText();if(n==null){this.index=this.text.length;this.interpolationParts.addText(this.text.substring(t));this.rule=null;return}if(n[0]=="\\"){this.interpolationParts.addText(this.textPart+n[1]);return}this.interpolationParts.addText(this.textPart);n=="{{"?(this.pushState(),this.ruleStack.push(this.ruleEndMustacheInInterpolationOrMessage),this.rule=this.ruleEnteredMustache):n=="}"?(this.choices[this.choiceKey]=this.interpolationParts.toParsedFn(!1,this.text),this.rule=this.ruleChoiceKeyword):n=="#"?this.interpolationParts.addExpressionFn(this.expressionMinusOffsetFn):this.errorInParseLogic()};t.prototype.ruleInterpolate=function(){this.interpolationParts=new u(this.trustedContext,this.allOrNothing);this.rule=this.ruleInInterpolation};t.prototype.ruleInInterpolation=function(){var t=this.index,n=this.searchRe(st),i;if(n==null){this.index=this.text.length;this.interpolationParts.addText(this.text.substring(t));this.parsedFn=this.interpolationParts.toParsedFn(this.mustHaveExpression,this.text);this.rule=null;return}if(i=n[0],i[0]=="\\"){this.interpolationParts.addText(this.text.substring(t,n.index)+i[1]);return}this.interpolationParts.addText(this.text.substring(t,n.index));this.pushState();this.ruleStack.push(this.ruleInterpolationEndMustache);this.rule=this.ruleEnteredMustache};t.prototype.ruleInterpolationEndMustache=function(){var n=this.parsedFn;this.popState();this.interpolationParts.addExpressionFn(n);this.rule=this.ruleInInterpolation};t.prototype.ruleEnteredMustache=function(){this.parsedFn=null;this.ruleStack.push(this.ruleEndMustache);this.rule=this.ruleAngularExpression};t.prototype.ruleEndMustacheInInterpolationOrMessage=function(){var n=this.parsedFn;this.popState();this.interpolationParts.addExpressionFn(n);this.rule=this.ruleInInterpolationOrMessageText};ht=/\s*}}/g;t.prototype.ruleEndMustache=function(){var t=this.matchRe(ht),n;if(t==null){n=r(this.text,this.index);throw i("reqendinterp","Expecting end of interpolation symbol, “{0}”, at line {1}, column {2} in text “{3}”","}}",n.line,n.column,this.text);}this.parsedFn==null&&(this.parsedFn=this.$parse(this.expressionFn,this.stringifier),this.parsedFn.exp=this.expressionFn.exp,this.parsedFn.expressions=this.expressionFn.expressions);this.rule=null};t.prototype.ruleAngularExpression=function(){this.angularOperatorStack=[];this.expressionStartIndex=this.index;this.rule=this.ruleInAngularExpression};lt=/[[\]{}()'",]/g;t.prototype.ruleInAngularExpression=function(){var o=this.index,t=this.searchRe(lt),u,e,n,f;if(t==null){if(this.angularOperatorStack.length===0){this.index=this.text.length;this.expressionFn=this.$parse(this.text.substring(this.expressionStartIndex,this.index));this.expressionFn.exp=this.text.substring(this.expressionStartIndex,this.index);this.expressionFn.expressions=this.expressionFn.expressions;this.rule=null;return}e=this.angularOperatorStack[0];throw i("badexpr","Unexpected end of Angular expression.  Expecting operator “{0}” at the end of the text “{1}”",this.getEndOperator(e),this.text);}if(n=t[0],n=="'"||n=='"'){this.ruleStack.push(this.ruleInAngularExpression);this.startStringAtMatch(t);return}if(n==","){if(this.trustedContext){u=r(this.text,this.index);throw i("unsafe","Use of select/plural MessageFormat syntax is currently disallowed in a secure context ({0}).  At line {1}, column {2} of text “{3}”",this.trustedContext,u.line,u.column,this.text);}this.angularOperatorStack.length===0&&(this.expressionFn=this.$parse(this.text.substring(this.expressionStartIndex,t.index)),this.expressionFn.exp=this.text.substring(this.expressionStartIndex,t.index),this.expressionFn.expressions=this.expressionFn.expressions,this.rule=null,this.rule=this.rulePluralOrSelect);return}if(ct(n)!=null){this.angularOperatorStack.unshift(n);return}if(f=dt(n),f==null&&this.errorInParseLogic(),this.angularOperatorStack.length>0){if(f==this.angularOperatorStack[0]){this.angularOperatorStack.shift();return}u=r(this.text,this.index);throw i("badexpr","Unexpected operator “{0}” at line {1}, column {2} in text. Was expecting “{3}”. Text: “{4}”",n,u.line,u.column,ct(this.angularOperatorStack[0]),this.text);}this.index=t.index;this.expressionFn=this.$parse(this.text.substring(this.expressionStartIndex,this.index));this.expressionFn.exp=this.text.substring(this.expressionStartIndex,this.index);this.expressionFn.expressions=this.expressionFn.expressions;this.rule=null};var gt=["$parse","$locale","$sce","$exceptionHandler",function(n,r,u,f){function e(n,t,r){return function(e){try{return e=n?u.getTrusted(n,e):u.valueOf(e),t&&e===void 0?e:yt(e)}catch(o){f(i.interr(r,o))}}}function o(i,u,f,o){var h=e(f,o,i),s=new t(i,0,n,r.pluralCat,h,u,f,o);return s.run(s.ruleInterpolate),s.parsedFn}return{interpolate:o}}],ni=["$$messageFormat","$delegate",function(n,t){if(t.startSymbol()!="{{"||t.endSymbol()!="}}")throw i("nochgmustache","angular-message-format.js currently does not allow you to use custom start and end symbols for interpolation.");var r=n.interpolate;return r.startSymbol=t.startSymbol,r.endSymbol=t.endSymbol,r}],i,e,v,at,vt=n.angular.module("ngMessageFormat",["ng"]);vt.factory("$$messageFormat",gt);vt.config(["$provide",function(t){i=n.angular.$interpolateMinErr;e=n.angular.isFunction;v=n.angular.noop;at=n.angular.toJson;t.decorator("$interpolate",ni)}])}(window,window.angular),function(n,t){"use strict";function e(){function n(n,t){if(n)return u(n)?n.indexOf(t)>=0:n.hasOwnProperty(t)}return["$animate",function(t){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(i,r,f,e,o){var l=r[0],a,y=f.ngMessage||f.when,h=f.ngMessageExp||f.whenExp,c=function(n){a=n?u(n)?n:n.split(/[\s,]+/):null;e.reRender()},s,v;h?(c(i.$eval(h)),i.$watchCollection(h,c)):c(y);e.register(l,v={test:function(t){return n(a,t)},attach:function(){s||o(function(n,i){t.enter(n,null,r);s=n;var u=s.$$attachId=e.getAttachId();s.on("$destroy",function(){s&&s.$$attachId===u&&(e.deregister(l),v.detach());i.$destroy()})})},detach:function(){if(s){var n=s;s=null;t.leave(n)}}})}}}]}var i,u,r,f;t.module("ngMessages",[],function(){i=t.forEach;u=t.isArray;r=t.isString;f=t.element}).directive("ngMessages",["$animate",function(n){function f(n,t){return r(t)&&t.length===0||e(n.$eval(t))}function e(n){return r(n)?n.length:!!n}var t="ng-active",u="ng-inactive";return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(r,o,s){function y(n,t){for(var i=t,u=[],r;i&&i!==n;){if(r=i.$$ngMessageNode,r&&r.length)return c[r];i.childNodes.length&&u.indexOf(i)===-1?(u.push(i),i=i.childNodes[i.childNodes.length-1]):i.previousSibling?i=i.previousSibling:(i=i.parentNode,u.push(i))}}function w(n,t,i){var r=c[i],u;h.head?(u=y(n,t),u?(r.next=u.next,u.next=r):(r.next=h.head,h.head=r)):h.head=r}function b(n,t,i){var r=c[i],u=y(n,t);u?u.next=r.next:h.head=r.next}var h=this,v=0,p=0,c,l,a;this.getAttachId=function(){return p++};c=this.messages={};this.render=function(c){var y,p;c=c||{};l=!1;a=c;for(var g=f(o,s.ngMessagesMultiple)||f(o,s.multiple),w=[],b={},v=h.head,k=!1,d=0;v!=null;)d++,y=v.message,p=!1,k||i(c,function(n,t){if(!p&&e(n)&&y.test(t)){if(b[t])return;b[t]=!0;p=!0;y.attach()}}),p?k=!g:w.push(y),v=v.next;i(w,function(n){n.detach()});w.length!==d?n.setClass(r,t,u):n.setClass(r,u,t)};o.$watchCollection(s.ngMessages||s["for"],h.render);r.on("$destroy",function(){i(c,function(n){n.message.detach()})});this.reRender=function(){l||(l=!0,o.$evalAsync(function(){l&&a&&h.render(a)}))};this.register=function(n,t){var i=v.toString();c[i]={message:t};w(r[0],n,i);n.$$ngMessageNode=i;v++;h.reRender()};this.deregister=function(n){var t=n.$$ngMessageNode;delete n.$$ngMessageNode;b(r[0],n,t);delete c[t];h.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(n,t,i){function u(n,r){var u=i.$$createComment?i.$$createComment("ngMessagesInclude",r):t[0].createComment(" ngMessagesInclude: "+r+" "),e=f(u);n.after(e);n.remove()}return{restrict:"AE",require:"^^ngMessages",link:function(t,f,e){var o=e.ngMessagesInclude||e.src;n(o).then(function(n){t.$$destroyed||(r(n)&&!n.trim()?u(f,o):i(n)(t,function(n){f.after(n);u(f,o)}))})}}}]).directive("ngMessage",e()).directive("ngMessageExp",e())}(window,window.angular),function(n,t){"use strict";function f(n){return n!=null&&n!==""&&n!=="hasOwnProperty"&&u.test("."+n)}function e(n,r){var e,u,o,s;if(!f(r))throw i("badmember",'Dotted member path "@{0}" is invalid.',r);for(e=r.split("."),u=0,o=e.length;u<o&&t.isDefined(n);u++)s=e[u],n=n!==null?n[s]:undefined;return n}function r(n,i){i=i||{};t.forEach(i,function(n,t){delete i[t]});for(var r in n)!n.hasOwnProperty(r)||r.charAt(0)==="$"&&r.charAt(1)==="$"||(i[r]=n[r]);return i}var i=t.$$minErr("$resource"),u=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;t.module("ngResource",["ng"]).provider("$resource",function(){var u=/^https?:\/\/[^\/]*/,n=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};this.$get=["$http","$log","$q","$timeout",function(f,o,s,h){function k(n){return y(n,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function y(n,t){return encodeURIComponent(n).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function p(t,i){this.template=t;this.defaults=l({},n.defaults,i);this.urlParams={}}function w(u,y,k,d){function tt(n,t){var i={};return t=l({},y,t),c(t,function(t,r){a(t)&&(t=t(n));i[r]=t&&t.charAt&&t.charAt(0)=="@"?e(n,t.substr(1)):t}),i}function it(n){return n.resource}function g(n){r(n||{},this)}var nt=new p(u,d);return k=l({},n.defaults.actions,k),g.prototype.toJSON=function(){var n=l({},this);return delete n.$promise,delete n.$resolved,n},c(k,function(u,e){var w=/^(POST|PUT|PATCH)$/i.test(u.method),y=u.timeout,p=t.isDefined(u.cancellable)?u.cancellable:d&&t.isDefined(d.cancellable)?d.cancellable:n.defaults.cancellable;y&&!t.isNumber(y)&&(o.debug("ngResource:\n  Only numeric values are allowed as `timeout`.\n  Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."),delete u.timeout,y=null);g[e]=function(n,o,k,d){var lt={},ft,et,ht,ot;switch(arguments.length){case 4:ht=d;et=k;case 3:case 2:if(a(o)){if(a(n)){et=n;ht=o;break}et=o;ht=k}else{lt=n;ft=o;et=k;break}case 1:a(n)?et=n:w?ft=n:lt=n;break;case 0:break;default:throw i("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length);}var ct=this instanceof g,rt=ct?ft:u.isArray?[]:new g(ft),ut={},vt=u.interceptor&&u.interceptor.response||it,yt=u.interceptor&&u.interceptor.responseError||undefined,st,at;return(c(u,function(n,t){switch(t){default:ut[t]=b(n);break;case"params":case"isArray":case"interceptor":case"cancellable":}}),!ct&&p&&(st=s.defer(),ut.timeout=st.promise,y&&(at=h(st.resolve,y))),w&&(ut.data=ft),nt.setUrlParams(ut,l({},tt(ft,u.params||{}),lt),u.url),ot=f(ut).then(function(n){var f=n.data,o;if(f){if(t.isArray(f)!==!!u.isArray)throw i("badcfg","Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2} (Request: {3} {4})",e,u.isArray?"array":"object",t.isArray(f)?"array":"object",ut.method,ut.url);u.isArray?(rt.length=0,c(f,function(n){typeof n=="object"?rt.push(new g(n)):rt.push(n)})):(o=rt.$promise,r(f,rt),rt.$promise=o)}return n.resource=rt,n},function(n){return(ht||v)(n),s.reject(n)}),ot["finally"](function(){rt.$resolved=!0;!ct&&p&&(rt.$cancelRequest=t.noop,h.cancel(at),st=at=ut.timeout=null)}),ot=ot.then(function(n){var t=vt(n);return(et||v)(t,n.headers),t},yt),!ct)?(rt.$promise=ot,rt.$resolved=!1,p&&(rt.$cancelRequest=st.resolve),rt):ot};g.prototype["$"+e]=function(n,t,i){a(n)&&(i=t,t=n,n={});var r=g[e].call(this,n,this,t,i);return r.$promise||r}}),g.bind=function(n){return w(u,l({},y,n),k)},g}var v=t.noop,c=t.forEach,l=t.extend,b=t.copy,a=t.isFunction;return p.prototype={setUrlParams:function(n,r,f){var o=this,e=f||o.template,s,h,l="",a=o.urlParams={};c(e.split(/\W/),function(n){if(n==="hasOwnProperty")throw i("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(n)&&n&&new RegExp("(^|[^\\\\]):"+n+"(\\W|$)").test(e)&&(a[n]={isQueryParamValue:new RegExp("\\?.*=:"+n+"(?:\\W|$)").test(e)})});e=e.replace(/\\:/g,":");e=e.replace(u,function(n){return l=n,""});r=r||{};c(o.urlParams,function(n,i){s=r.hasOwnProperty(i)?r[i]:o.defaults[i];t.isDefined(s)&&s!==null?(h=n.isQueryParamValue?y(s,!0):k(s),e=e.replace(new RegExp(":"+i+"(\\W|$)","g"),function(n,t){return h+t})):e=e.replace(new RegExp("(/?):"+i+"(\\W|$)","g"),function(n,t,i){return i.charAt(0)=="/"?i:t+i})});o.defaults.stripTrailingSlashes&&(e=e.replace(/\/+$/,"")||"/");e=e.replace(/\/\.(?=\w+($|\?))/,".");n.url=l+e.replace(/\/\\\./,"/.");c(r,function(t,i){o.urlParams[i]||(n.params=n.params||{},n.params[i]=t)})}},w}]})}(window,window.angular),function(n,t,i){"use strict";i.module("angular-pdfjs",[]).run(function(){PDFJS.verbosity=PDFJS.VERBOSITY_LEVELS.errors}).directive("pdfViewer",["$timeout","printService",function(r,u){return{restrict:"A",controller:["$scope","$q",function(r,f){function a(n){n&&(w=null,et=null,lt=null,c=null)}function it(){a(!0);i.extend(o,{page:0,rotation:0,offsetX:0,offsetY:0,scale:1,width:0,height:0});i.extend(e,o,{page:1});i.extend(s,e);h.viewport=null}function ri(){a(!0);i.extend(o,e);i.extend(s,o);r.$applyAsync()}function wt(){return y&&ft&&!c&&!i.equals(o,e)}function ui(n){i.extend(h,{page:1,rotation:n.rotation,offsetX:n.offsetX,offsetY:n.offsetY,scale:n.scale,width:n.width,height:n.height},h);e.width=e.width||h.width;e.height=e.height||h.height}function fi(n){return n?(c=f(function(t,i){w=PDFJS.getDocument(n);w.then(function(n){it();y=n;tt=y.numPages;c=null;t(n)},function(n){it();i(n)})}),c._loadState="document",c):l}function bt(n){return n&&wt()?(c=f(function(t,i){et=n.getPage(e.page);et.then(function(n){a(!0);t(n)},i)}),c._loadState="page",c):l}function kt(n){if(n&&wt()){var t,i;return ui(n.getViewport(1)),ii=n,t=[0,0,h.width,h.height],i=new PDFJS.PageViewport(t,e.scale,e.rotation,e.offsetX,e.offsetY),si(),c=f(function(t,r){lt=n.render({canvasContext:ft,viewport:i}).then(function(){ri();t(!0)},r)}),c._loadState="render",c}return l}function ei(n){return fi(n).then(bt).then(kt).then(function(){r.options.fitToWidth===!0&&dt()}).finally(a).catch(function(n){return a(!0),f.reject(n)})}function oi(){return w?f.when(w.destroy()).then(it):l}function v(){return bt(y).then(kt).finally(a).catch(function(n){return a(!0),f.reject(n)})}function si(){var n,t;if(r.options.fitToWidth===!0)var i=h.height/h.width,n=d.parent().width(),t=n*i;else n=e.rotation%180?e.height:e.width,t=e.rotation%180?e.width:e.height;d.css({width:n+"px",height:t+"px"});g.attr("width",n);g.attr("height",t)}function hi(){return rt(o.page-1)}function ci(){return rt(o.page+1)}function rt(n){return(n=n===0?1:n,n=n>tt?tt:n,s.page=n,n=parseInt(n),!isNaN(n))?(e.page=n,v()):l}function ot(n){return(s.width=n,n=parseFloat(n),!isNaN(n)&&n>0)?(e.width=n,v()):l}function st(n){return(s.height=n,n=parseFloat(n),!isNaN(n)&&n>0)?(e.height=n,v()):l}function li(n){return n=isNaN(parseFloat(n))?at:parseFloat(n),b(o.scale+n)}function ai(n){return n=isNaN(parseFloat(n))?at:parseFloat(n),b(o.scale-n)}function b(n){return(s.scale=n,n=parseFloat(n),!isNaN(n)&&n>0)?(e.scale=n,gt(),v()):l}function dt(n){var i=h.height/h.width,t;return(n=n||d.width(),t=h.scale*n/h.width,e.offsetX=0,e.offsetY=0,n==e.width&&t==e.scale)?v():(ot(n),st(n*i),b(t),ht=t,k(!1),l)}function gt(){return r.options.fitToWidth===!0?(k(!0),e.scale>ht?(k(!0),!0):(k(!1),!1)):!0}function k(n){yt=n}function vi(n){return n=isNaN(parseFloat(n))?nt:parseFloat(n),p(o.offsetX+n,o.offsetY)}function yi(n){return n=isNaN(parseFloat(n))?nt:parseFloat(n),p(o.offsetX-n,o.offsetY)}function pi(n){return n=isNaN(parseFloat(n))?nt:parseFloat(n),p(o.offsetX,o.offsetY+n)}function wi(n){return n=isNaN(parseFloat(n))?nt:parseFloat(n),p(o.offsetX,o.offsetY-n)}function p(n,t){var u=o.rotation%180?o.height:o.width,f=o.rotation%180?o.width:o.height,i=u-(h.rotation%180?h.height:h.width*o.scale),r=f-(h.rotation%180?h.width:h.height*o.scale);return(n=n<i?i:n,n=n>0?0:n,t=t<r?r:t,t=t>0?0:t,s.offsetX=n,s.offsetY=t,n=parseFloat(n),t=parseFloat(t),!isNaN(n)&&!isNaN(t))?(e.offsetX=n,e.offsetY=t,v()):l}function ni(n){return s.offsetX=n,ct({x:n,y:s.offsetY})}function ti(n){return s.offsetY=n,ct({x:s.offsetX,y:n})}function ct(n){return n=n||{},p(n.x,n.y)}function bi(){return ut(o.rotation-vt)}function ki(){return ut(o.rotation+vt)}function ut(n){return(s.rotation=n,n=parseFloat(n),!isNaN(n))?(e.rotation=t.round(n/90)*90,v()):l}function di(n,t){d=n;g=t;ft=g[0].getContext("2d")}function gi(){return y}var d,g,ft,ii,y,w,lt,et,c,at=.25,nt=10,vt=90,tt=0,yt=!1,h={},o={},e={},s={offset:{}},pt=f.defer(),l=pt.promise,ht;r.legacyBrowserPrint=function(){var n=y;n.getPage(1).then(function(t){u.print(n,{width:t.view[2],height:t.view[3]})})};ht=null;n.defineProperties(s.offset,{x:{set:ni,get:function(){return s.offsetX}},y:{set:ti,get:function(){return s.offsetY}}});n.defineProperties(this,{setHeight:{value:st},setWidth:{value:ot},zoomIn:{value:li},zoomOut:{value:ai},zoomTo:{value:b},zoomToFit:{value:dt},isZoomedBeyondFit:{value:gt},panLeft:{value:vi},panRight:{value:yi},panUp:{value:pi},panDown:{value:wi},panTo:{value:p},rotateLeft:{value:bi},rotateRight:{value:ki},rotateTo:{value:ut},nextPage:{value:ci},previousPage:{value:hi},goToPage:{value:rt},loadDocument:{value:ei},cancelLoad:{value:oi},setElements:{value:di},getDocument:{value:gi},total:{set:i.noop,get:function(){return tt}},page:{set:rt,get:function(){return s.page}},width:{set:ot,get:function(){return s.width}},height:{set:st,get:function(){return s.height}},zoom:{set:b,get:function(){return s.scale}},rotation:{set:ut,get:function(){return s.rotation}},offsetX:{set:ni,get:function(){return s.offsetX}},offsetY:{set:ti,get:function(){return s.offsetY}},offset:{set:ct,get:function(){return s.offset}},loading:{set:i.noop,get:function(){return c}},showResetButton:{set:k,get:function(){return yt}}});pt.resolve();it()}],link:function(n,t,u,f){r(function(){function a(n){return{x:n.originalEvent&&n.originalEvent.x||n.clientX||n.originalEvent.touches&&n.originalEvent.touches[0].clientX||n.touches&&n.touches[0].clientX,y:n.originalEvent&&n.originalEvent.y||n.clientY||n.originalEvent.changedTouches&&n.originalEvent.changedTouches[0].clientY||n.touches&&n.touches[0].clientY}}function y(n){f.loadDocument(n)}function p(n){n.preventDefault();n.stopImmediatePropagation();var t=n.originalEvent&&n.originalEvent.wheelDelta||n.wheelDelta;f.zoomIn(t/100)}function w(n){if(f.isZoomedBeyondFit()){var t=a(n);n.preventDefault();n.stopImmediatePropagation();o={x:t.x-c.x,y:t.y-c.y}}}function b(n){f.isZoomedBeyondFit()&&(n.preventDefault(),n.stopImmediatePropagation(),o=null)}function k(n){if(f.isZoomedBeyondFit()){var t=a(n);n.preventDefault();n.stopImmediatePropagation();o&&(f.offset=c={x:t.x-o.x,y:t.y-o.y})}}function v(){l&&r.cancel(l);l=r(function(){f.zoomToFit(t.width())},300)}var o=null,s=i.element("<canvas><\/canvas>"),e=i.element("<div><\/div>"),h=i.extend({mouseZoom:!0,mousePan:!0},n.$eval(u.pdfViewer)),c={x:0,y:0},l;if(n.options=h,f.setElements(e,s),e.append(s),t.append(e),e.css({overflow:"hidden"}),u.id&&(n[u.$normalize(u.id)]=f,n.$broadcast("angularPdfJs.available")),h.mouseZoom)e.on("wheel",p);if(h.mousePan){s.css({cursor:"move"});e.addClass("needsClick");e.on("touchstart mousedown",w);e.on("touchmove mousemove",k);e.on("touchend touchleave touchcancel mouseup mouseleave",b)}window.addEventListener("resize",v);n.$on("$destroy",function(){window.removeEventListener("resize",v)});n.$on("$destroy",function(){e.off()});n.$watch(u.pdfUrl,y)})}}}])}(Object,Math,angular),function(){"use strict";function n(){function n(n,i){var u=document.createElement("div"),e,r,f;this.size=i;this.pdfDocument=n;this.currentPage=-1;this.scratchCanvas=document.createElement("canvas");this.printContainer=u;this.pageStyleSheet=document.createElement("style");this.pageStyleSheet.textContent="@supports ((size:A4) and (size:1pt 1pt)) {@page { size: "+i.width+"pt "+i.height+"pt; margin: 10mm; }body {height:100%}div {width:100% !important;height:100% !important;}}";e=document.querySelector("body");e.appendChild(this.pageStyleSheet);r=this.pageStyleSheet;f=this.scratchCanvas;t(this).then(function(){var n="<!DOCTYPE html>",t;n+="<html>";n+="<head><title>Print<\/title><style>* {margin: 0; padding: 0;}<\/style><\/head>";n+="<body>";n+=u.innerHTML;n+="<\/body>";n+="<\/html>";t=window.open("","","width=780,height=500");t.document.open();t.document.write(n);t.document.close();t.focus();t.print();t.close()}).then(function(){u.textContent="";r&&r.parentNode&&(r.parentNode.removeChild(r),r=null);f.width=f.height=0;f=null;u=null})}function t(n){var u=n.pdfDocument.numPages,t=function(f,e){if(++n.currentPage>=u){f();return}var o=n.currentPage;i(n,o+1,n.size).then(function(t){r(n,t)}).then(function(){t(f,e)},e)}.bind(n);return new Promise(t)}function i(n,t,i){var f=96/72,u=300/72;n.scratchCanvas.width=Math.floor(i.width*u);n.scratchCanvas.height=Math.floor(i.height*u);var e=Math.floor(i.width*f)+"px",o=Math.floor(i.height*f)+"px",r=n.scratchCanvas.getContext("2d");return r.save(),r.fillStyle="rgb(255, 255, 255)",r.fillRect(0,0,n.scratchCanvas.width,n.scratchCanvas.height),r.restore(),n.pdfDocument.getPage(t).then(function(n){var t={canvasContext:r,transform:[u,0,0,u,0,0],viewport:n.getViewport(1),intent:"print"};return n.render(t).promise}).then(function(){return{width:e,height:o}})}function r(n,t){var i=document.createElement("img"),u,r;return i.style.width=t.width,i.style.height=t.height,u=n.scratchCanvas,i.src=u.toDataURL(),r=document.createElement("div"),r.appendChild(i),n.printContainer.appendChild(r),new Promise(function(n,t){i.onload=n;i.onerror=t})}this.print=n}angular.module("angular-pdfjs").service("printService",n);n.$inject=[]}(),function(n,t){"use strict";function l(){function a(n,t){for(var f={},u=n.split(","),i=0;i<u.length;i++)f[t?r(u[i]):u[i]]=!0;return f}function ct(t,i){var e,r,u;t===null||t===undefined?t="":typeof t!="string"&&(t=""+t);l.innerHTML=t;e=5;do{if(e===0)throw f("uinput","Failed to sanitize html because the input is unstable");e--;n.document.documentMode&&p(l);t=l.innerHTML;l.innerHTML=t}while(t!==l.innerHTML);for(r=l.firstChild;r;){switch(r.nodeType){case 1:i.start(r.nodeName.toLowerCase(),lt(r.attributes));break;case 3:i.chars(r.textContent)}if(!(u=r.firstChild)&&(r.nodeType==1&&i.end(r.nodeName.toLowerCase()),u=r.nextSibling,!u))while(u==null){if(r=r.parentNode,r===l)break;u=r.nextSibling;r.nodeType==1&&i.end(r.nodeName.toLowerCase())}r=u}while(r=l.firstChild)l.removeChild(r)}function lt(n){for(var i,r={},t=0,u=n.length;t<u;t++)i=n[t],r[i.name]=i.value;return r}function g(n){return n.replace(/&/g,"&amp;").replace(nt,function(n){var t=n.charCodeAt(0),i=n.charCodeAt(1);return"&#"+((t-55296)*1024+(i-56320)+65536)+";"}).replace(tt,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function at(n,t){var u=!1,i=e(n,n.push);return{start:function(n,f){n=r(n);!u&&et[n]&&(u=n);u||y[n]!==!0||(i("<"),i(n),o(f,function(u,f){var e=r(f),o=n==="img"&&e==="src"||e==="background";ht[e]===!0&&(d[e]!==!0||t(u,o))&&(i(" "),i(f),i('="'),i(g(u)),i('"'))}),i(">"))},end:function(n){n=r(n);u||y[n]!==!0||w[n]===!0||(i("<\/"),i(n),i(">"));n==u&&(u=!1)},chars:function(n){u||i(g(n))}}}function p(t){var u,r,f,e,o,i;if(t.nodeType===n.Node.ELEMENT_NODE)for(u=t.attributes,r=0,f=u.length;r<f;r++)e=u[r],o=e.name.toLowerCase(),(o==="xmlns:ns1"||o.lastIndexOf("ns1:",0)===0)&&(t.removeAttributeNode(e),r--,f--);i=t.firstChild;i&&p(i);i=t.nextSibling;i&&p(i)}var v=!1,l;this.$get=["$$sanitizeUri",function(n){return v&&i(y,ft),function(t){var i=[];return c(t,u(i,function(t,i){return!/^unsafe:/.test(n(t,i))})),i.join("")}}];this.enableSvg=function(n){return s(n)?(v=n,this):v};e=t.bind;i=t.extend;o=t.forEach;s=t.isDefined;r=t.lowercase;h=t.noop;c=ct;u=at;var nt=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,tt=/([^\#-~ |!])/g,w=a("area,br,col,hr,img,wbr"),b=a("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),k=a("rp,rt"),it=i({},k,b),rt=i({},b,a("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")),ut=i({},k,a("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")),ft=a("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"),et=a("script,style"),y=i({},w,rt,ut,it),d=a("background,cite,href,longdesc,src,xlink:href"),ot=a("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"),st=a("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),ht=i({},d,st,ot);(function(n){var t,u,i,r;if(n.document&&n.document.implementation)t=n.document.implementation.createHTMLDocument("inert");else throw f("noinert","Can't create an inert html document");u=t.documentElement||t.getDocumentElement();i=u.getElementsByTagName("body");i.length===1?l=i[0]:(r=t.createElement("html"),l=t.createElement("body"),r.appendChild(l),t.appendChild(r))})(n)}function a(n){var t=[],i=u(t,h);return i.chars(n),t.join("")}var f=t.$$minErr("$sanitize"),e,i,o,s,r,h,c,u;t.module("ngSanitize",[]).provider("$sanitize",l);t.module("ngSanitize").filter("linky",["$sanitize",function(n){var i=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,r=/^mailto:/i,u=t.$$minErr("linky"),f=t.isDefined,e=t.isFunction,o=t.isObject,s=t.isString;return function(t,h,c){function b(n){n&&v.push(a(n))}function d(n,t){var i,r=k(n);v.push("<a ");for(i in r)v.push(i+'="'+r[i]+'" ');!f(h)||"target"in r||v.push('target="',h,'" ');v.push('href="',n.replace(/"/g,"&quot;"),'">');b(t);v.push("<\/a>")}if(t==null||t==="")return t;if(!s(t))throw u("notstring","Expected string but received: {0}",t);for(var k=e(c)?c:o(c)?function(){return c}:function(){return{}},l,y=t,v=[],p,w;l=y.match(i);)p=l[0],l[2]||l[4]||(p=(l[3]?"http://":"mailto:")+p),w=l.index,b(y.substr(0,w)),d(p,l[0].replace(r,"")),y=y.substring(w+l[0].length);return b(y),n(v.join(""))}}])}(window,window.angular);angular.module("selectionModel",[]);angular.module("selectionModel").directive("selectionModelIgnore",[function(){"use strict";return{restrict:"A",link:function(n,t){t.on("click",function(n){n.selectionModelIgnore=!0;n.originalEvent&&(n.originalEvent.selectionModelIgnore=!0)})}}}]);angular.module("selectionModel").directive("selectionModel",["selectionStack","uuidGen","selectionModelOptions",function(n,t,i){"use strict";return{restrict:"A",link:function(r,u,f){var h=i.get(),rt=h.selectedAttribute,ut=h.selectedClass,ft=h.type,et=h.mode,ot=h.cleanupStrategy,p=f.selectionModelType||ft,k=f.selectionModelMode||et,c=/^multi(ple)?(-additive)?$/.test(k),st=/^multi(ple)?-additive/.test(k),o=f.selectionModelSelectedAttribute||rt,d=f.selectionModelSelectedClass||ut,ht=f.selectionModelCleanupStrategy||ot,l=f.selectionModelOnChange,g=f.ngRepeat,b;if(!g)throw"selectionModel must be used along side ngRepeat";var s=r.$eval(f.selectionModelSelectedItems),a=function(){if(!c)return null;var i="data-selection-model-stack-id",n=u.attr(i);return n?n:(n=u.parent().attr(i),n)?(u.attr(i,n),n):(n=t.create(),u.attr(i,n),u.parent().attr(i,n),n)}(),v=g.split(" in "),e=r.$eval(v[0]),nt=function(){if(e[o]?u.addClass(d):u.removeClass(d),"checkbox"===p){var n=u.find("input");n.prop("checked",e[o])}},tt=function(){return r.$eval(v[1])},ct=function(){return r.$eval(v[1].split("|")[0])},y=function(n){var r=angular.isArray(s),f=angular.isArray(n)&&2===n.length,e=ct(),u=0,t=!1,i;r&&(s.length=0);angular.forEach(e,function(e){f?(i=n.indexOf(e),i>-1?(u++,t=!1,n.splice(i,1)):t=1!==u):t=e!==n;t?e[o]=!1:r&&e[o]&&s.push(e)})},lt=function(n){var r=tt(),t=!1,i=!1;n=n||e;angular.forEach(tt(),function(r){i=i||r===e;t=t||r===n;var u=t+i===1;(u||r===e||r===n)&&(r[o]=!0)})},it=function(t){var s,h,l,b;if(!t.selectionModelIgnore&&(!t.originalEvent||!t.originalEvent.selectionModelIgnore)&&!t.selectionModelClickHandled){t.selectionModelClickHandled=!0;var v=t.ctrlKey||t.metaKey||st,w=t.shiftKey,i=t.target||t.srcElement,f="checkbox"===p&&"INPUT"===i.tagName&&"checkbox"===i.type;if("LABEL"===i.tagName)if(s=angular.element(i).attr("for"),s){for(h=u[0].getElementsByTagName("INPUT"),l=h.length;l--;)if(h[l].id===s)return}else if(i.getElementsByTagName("INPUT").length)return;if(f&&t.stopPropagation(),w&&c&&!f){v||r.$apply(function(){y([e,n.peek(a)])});lt(n.peek(a));r.$apply();return}if(v||w||f){b=!e[o];c||y(e);e[o]=b;e[o]&&n.push(a,e);r.$apply();return}y(e);r.$apply();e[o]=!0;n.push(a,e);r.$apply()}},w=function(){if(angular.isArray(s)){var n=s.indexOf(e);e[o]?-1===n&&s.push(e):-1<n&&s.splice(n,1)}};u.on("click",it);if("checkbox"===p&&(b=u.find("input"),b[0]&&"checkbox"===b[0].type))u.find("input").on("click",it);nt();w();"deselect"===ht&&r.$on("$destroy",function(){var n=e[o];e[o]=!1;w();l&&n&&r.$eval(l)});r.$watch(v[0]+"."+o,function(n,t){n!==t&&(c||!n||t||(y(e),e[o]=!0),nt(),w(),l&&r.$eval(l))})}}}]);angular.module("selectionModel").provider("selectionModelOptions",[function(){"use strict";var n={selectedAttribute:"selected",selectedClass:"selected",type:"basic",mode:"single",cleanupStrategy:"none"};this.set=function(t){angular.extend(n,t)};this.$get=function(){return{get:function(){return angular.copy(n)}}}}]);angular.module("selectionModel").service("selectionStack",function(){"use strict";var t={},i=1e3,n={};return t.push=function(t,r){n.hasOwnProperty(t)||(n[t]=[]);var u=n[t];for(u.push(r);u.length>i;)u.shift();return u.length},t.pop=function(t){n.hasOwnProperty(t)||(n[t]=[]);var i=n[t];return i.pop()},t.peek=function(t){n.hasOwnProperty(t)||(n[t]=[]);var i=n[t];return i.length?i[i.length-1]:undefined},t});angular.module("selectionModel").service("uuidGen",function(){"use strict";var t={},n=["0","0","0"];return t.create=function(){for(var t=n.length,i;t;){if(t--,i=n[t].charCodeAt(0),i===57)return n[t]="A",n.join("");if(i===90)n[t]="0";else return n[t]=String.fromCharCode(i+1),n.join("")}return n.unshift("0"),n.join("")},t}),function(){angular.module("angular-storage",["angular-storage.store"]);angular.module("angular-storage.cookieStorage",[]).service("cookieStorage",["$cookies",function(n){this.set=function(t,i){return n.put(t,i)};this.get=function(t){return n.get(t)};this.remove=function(t){return n.remove(t)}}]);angular.module("angular-storage.internalStore",["angular-storage.localStorage","angular-storage.sessionStorage"]).factory("InternalStore",["$log","$injector",function(n,t){function i(n,i,r,u){this.namespace=n||null;(angular.isUndefined(u)||u==null)&&(u=!0);this.useCache=u;this.delimiter=r||".";this.inMemoryCache={};this.storage=t.get(i||"localStorage")}return i.prototype.getNamespacedKey=function(n){return this.namespace?[this.namespace,n].join(this.delimiter):n},i.prototype.set=function(n,t){this.useCache&&(this.inMemoryCache[n]=t);this.storage.set(this.getNamespacedKey(n),JSON.stringify(t))},i.prototype.get=function(t){var r=null,i;if(this.useCache&&t in this.inMemoryCache)return this.inMemoryCache[t];i=this.storage.get(this.getNamespacedKey(t));try{r=typeof i=="undefined"||i==="undefined"?undefined:JSON.parse(i);this.useCache&&(this.inMemoryCache[t]=r)}catch(u){n.error("Error parsing saved value",u);this.remove(t)}return r},i.prototype.remove=function(n){this.useCache&&(this.inMemoryCache[n]=null);this.storage.remove(this.getNamespacedKey(n))},i}]);angular.module("angular-storage.localStorage",["angular-storage.cookieStorage"]).service("localStorage",["$window","$injector",function(n,t){var r,i;try{n.localStorage.setItem("testKey","test");n.localStorage.removeItem("testKey");r=!0}catch(u){r=!1}r?(this.set=function(t,i){return n.localStorage.setItem(t,i)},this.get=function(t){return n.localStorage.getItem(t)},this.remove=function(t){return n.localStorage.removeItem(t)},this.clear=function(){n.localStorage.clear()}):(i=t.get("cookieStorage"),this.set=i.set,this.get=i.get,this.remove=i.remove)}]);angular.module("angular-storage.sessionStorage",["angular-storage.cookieStorage"]).service("sessionStorage",["$window","$injector",function(n,t){var r,i;try{n.sessionStorage.setItem("testKey","test");n.sessionStorage.removeItem("testKey");r=!0}catch(u){r=!1}r?(this.set=function(t,i){return n.sessionStorage.setItem(t,i)},this.get=function(t){return n.sessionStorage.getItem(t)},this.remove=function(t){return n.sessionStorage.removeItem(t)}):(i=t.get("cookieStorage"),this.set=i.set,this.get=i.get,this.remove=i.remove)}]);angular.module("angular-storage.store",["angular-storage.internalStore"]).provider("store",function(){var n="localStorage",t=!0;this.setStore=function(t){t&&angular.isString(t)&&(n=t)};this.setCaching=function(n){t=!!n};this.$get=["InternalStore",function(i){var r=new i(null,n,null,t);return r.getNamespacedStore=function(n,t,r,u){return new i(n,t,r,u)},r}]})}();tableSortModule=angular.module("tableSort",[]);tableSortModule.directive("tsWrapper",["$log","$parse",function(n,t){"use strict";return{scope:!0,controller:["$scope",function(n){n.sortExpression=[];n.headings=[];var i=function(n){return[t(n),null,!1]};this.setSortField=function(t,r){var u,f=i(t);if(n.sortExpression.length===1&&n.sortExpression[0][0]===f[0])n.sortExpression[0][2]?(r.removeClass("tablesort-desc"),r.addClass("tablesort-asc"),n.sortExpression[0][2]=!1):(r.removeClass("tablesort-asc"),r.addClass("tablesort-desc"),n.sortExpression[0][2]=!0);else{for(u=0;u<n.headings.length;u=u+1)n.headings[u].removeClass("tablesort-desc").removeClass("tablesort-asc");r.addClass("tablesort-asc");n.sortExpression=[f]}};this.addSortField=function(t,r){for(var f=!1,e=i(t),u=0;u<n.sortExpression.length;u=u+1)n.sortExpression[u][0]===e[0]&&(n.sortExpression[u][2]?(r.removeClass("tablesort-desc"),r.addClass("tablesort-asc"),n.sortExpression[u][2]=!1):(r.removeClass("tablesort-asc"),r.addClass("tablesort-desc"),n.sortExpression[u][2]=!0),f=!0);f||(r.addClass("tablesort-asc"),n.sortExpression.push(e))};this.setTrackBy=function(t){n.trackBy=t};this.registerHeading=function(t){n.headings.push(t)};n.sortFun=function(t,i){for(var r,u,e,o,f=0;f<n.sortExpression.length;f=f+1){if(r=n.sortExpression[f][0](t),u=n.sortExpression[f][0](i),o=i[n.sortExpression[f][1]],o&&(r=o(r),u=o(u)),r===undefined&&(r=""),u===undefined&&(u=""),e=n.sortExpression[f][2],r>u)return e?-1:1;if(r<u)return e?1:-1}if(n.trackBy){if(r=t[n.trackBy],u=i[n.trackBy],r===undefined&&(r=""),u===undefined&&(u=""),r>u)return e?-1:1;if(r<u)return e?1:-1}return 0}}]}}]);tableSortModule.directive("tsCriteria",function(){return{require:"^tsWrapper",link:function(n,t,i,r){var u=function(u){n.$apply(function(){u.shiftKey?r.addSortField(i.tsCriteria,t):r.setSortField(i.tsCriteria,t)})};t.bind("click",u);t.addClass("tablesort-sortable");"tsDefault"in i&&i.tsDefault!=="0"&&(r.addSortField(i.tsCriteria,t),i.tsDefault=="descending"&&r.addSortField(i.tsCriteria,t));r.registerHeading(t)}}});tableSortModule.directive("tsRepeat",["$compile",function(n){return{terminal:!0,require:"^tsWrapper",priority:1e6,link:function(t,i,r,u){var f=i.clone(),c=i[0].childElementCount,e=f.attr("ng-repeat"),o=null,s=e.match(/\s+track\s+by\s+\S+?\.(\S+)/),h;s&&(o=s[1],u.setTrackBy(o));e=e.replace(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(\s+track\s+by\s+[\s\S]+?)?\s*$/,"$1 in $2 | tablesortOrderBy:sortFun$3");i.html("<td colspan='"+c+"'><\/td>");i[0].className+=" showIfLast";f.removeAttr("ts-repeat");f.attr("ng-repeat",e);h=n(f)(t);i.after(h)}}}]);tableSortModule.filter("tablesortOrderBy",function(){return function(n,t){var r,i;if(n){for(r=[],i=0;i<n.length;i++)r.push(n[i]);return r.sort(t)}}});tableSortModule.filter("parseInt",function(){return function(n){return parseInt(n)}});tableSortModule.filter("parseFloat",function(){return function(n){return parseFloat(n)}});typeof module!="undefined"&&typeof exports!="undefined"&&module.exports===exports&&(module.exports="ui.router"),function(n,t,i){"use strict";function w(n,t){return u(new(u(function(){},{prototype:n})),t)}function g(n){return f(arguments,function(t){t!==n&&f(t,function(t,i){n.hasOwnProperty(i)||(n[i]=t)})}),n}function ui(n,t){var r=[];for(var i in n.path){if(n.path[i]!==t.path[i])break;r.push(n.path[i])}return r}function p(n){if(Object.keys)return Object.keys(n);var t=[];return f(n,function(n,i){t.push(i)}),t}function c(n,t){if(Array.prototype.indexOf)return n.indexOf(t,Number(arguments[2])||0);var r=n.length>>>0,i=Number(arguments[2])||0;for(i=i<0?Math.ceil(i):Math.floor(i),i<0&&(i+=r);i<r;i++)if(i in n&&n[i]===t)return i;return-1}function et(n,t,i,r){var o=ui(i,r),f,h={},l=[],s,e;for(s in o)if(o[s]&&o[s].params&&(f=p(o[s].params),f.length))for(e in f)c(l,f[e])>=0||(l.push(f[e]),h[f[e]]=n[f[e]]);return u({},h,t)}function nt(n,t,i){var f,r,u;if(!i){i=[];for(f in n)i.push(f)}for(r=0;r<i.length;r++)if(u=i[r],n[u]!=t[u])return!1;return!0}function b(n,t){var i={};return f(n,function(n){i[n]=t[n]}),i}function ot(n){var t={},i=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return f(i,function(i){i in n&&(t[i]=n[i])}),t}function k(n){var i={},r=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var t in n)c(r,t)==-1&&(i[t]=n[t]);return i}function tt(n,t){var r=a(n),i=r?[]:{};return f(n,function(n,u){t(n,u)&&(i[r?i.length:u]=n)}),i}function y(n,t){var i=a(n)?[]:{};return f(n,function(n,r){i[r]=t(n,r)}),i}function st(n,t){var h=1,l=2,s={},a=[],v=s,y=u(n.when(s),{$$promises:s,$$values:s});this.study=function(s){function tt(n,i){if(d[i]!==l){if(b.push(i),d[i]===h){b.splice(0,c(b,i));throw new Error("Cyclic dependency: "+b.join(" -> "));}if(d[i]=h,e(n))w.push(i,[function(){return t.get(n)}],a);else{var r=t.annotate(n);f(r,function(n){n!==i&&s.hasOwnProperty(n)&&tt(s[n],n)});w.push(i,n,r)}b.pop();d[i]=l}}function it(n){return o(n)&&n.then&&n.$$promises}if(!o(s))throw new Error("'invocables' must be an object");var nt=p(s||{}),w=[],b=[],d={};return f(s,tt),s=b=d=null,function(e,s,h){function b(){--ft||(rt||g(l,s.$$values),c.$$values=l,c.$$promises=c.$$promises||!0,delete c.$$inheritedValues,d.resolve(l))}function tt(n){c.$$failure=n;d.reject(n)}function et(i,u,o){function v(n){s.reject(n);tt(n)}function y(){if(!r(c.$$failure))try{s.resolve(t.invoke(u,h,l));s.promise.then(function(n){l[i]=n;b()},v)}catch(n){v(n)}}var s=n.defer(),a=0;f(o,function(n){p.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(a++,p[n].then(function(t){l[n]=t;--a||y()},v))});a||y();p[i]=s.promise}var a,ut;if(it(e)&&h===i&&(h=s,s=e,e=null),e){if(!o(e))throw new Error("'locals' must be an object");}else e=v;if(s){if(!it(s))throw new Error("'parent' must be a promise returned by $resolve.resolve()");}else s=y;var d=n.defer(),c=d.promise,p=c.$$promises={},l=u({},e),ft=1+w.length/3,rt=!1;if(r(s.$$failure))return tt(s.$$failure),c;for(s.$$inheritedValues&&g(l,k(s.$$inheritedValues,nt)),u(p,s.$$promises),s.$$values?(rt=g(l,k(s.$$values,nt)),c.$$inheritedValues=k(s.$$values,nt),b()):(s.$$inheritedValues&&(c.$$inheritedValues=k(s.$$inheritedValues,nt)),s.then(b,tt)),a=0,ut=w.length;a<ut;a+=3)e.hasOwnProperty(w[a])?b():et(w[a],w[a+1],w[a+2]);return c}};this.resolve=function(n,t,i,r){return this.study(n)(t,i,r)}}function ht(n,t,i){this.fromConfig=function(n,t,i){return r(n.template)?this.fromString(n.template,t):r(n.templateUrl)?this.fromUrl(n.templateUrl,t):r(n.templateProvider)?this.fromProvider(n.templateProvider,t,i):null};this.fromString=function(n,t){return h(n)?n(t):n};this.fromUrl=function(i,r){return h(i)&&(i=i(r)),i==null?null:n.get(i,{cache:t,headers:{Accept:"text/html"}}).then(function(n){return n.data})};this.fromProvider=function(n,t,r){return i.invoke(n,null,r||{params:t})}}function v(n,t,r){function nt(t,i,r,u){if(g.push(t),d[t])return d[t];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(t))throw new Error("Invalid parameter name '"+t+"' in pattern '"+n+"'");if(b[t])throw new Error("Duplicate parameter name '"+t+"' in pattern '"+n+"'");return b[t]=new l.Param(t,i,r,u),b[t]}function tt(n,t,i,r){var u=["",""],f=n.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return f;switch(i){case!1:u=["(",")"+(r?"?":"")];break;case!0:f=f.replace(/\/$/,"");u=["(?:/(",")|/)?"];break;default:u=["("+i+"|",")?"]}return f+u[0]+t+u[1]}function it(r,u){var e,f,o,h,c;return e=r[2]||r[3],c=t.params[e],o=n.substring(s,r.index),f=u?r[4]:r[4]||(r[1]=="*"?".*":null),f&&(h=l.type(f)||w(l.type("string"),{pattern:new RegExp(f,t.caseInsensitive?"i":i)})),{id:e,regexp:f,segment:o,type:h,cfg:c}}var f,h,e,c,k;t=u({params:{}},o(t)?t:{});var v=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,rt=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,y="^",s=0,a,p=this.segments=[],d=r?r.params:{},b=this.params=r?r.params.$$new():new l.ParamSet,g=[];for(this.source=n;a=v.exec(n);){if(f=it(a,!1),f.segment.indexOf("?")>=0)break;h=nt(f.id,f.type,f.cfg,"path");y+=tt(f.segment,h.type.pattern.source,h.squash,h.isOptional);p.push(f.segment);s=v.lastIndex}if(e=n.substring(s),c=e.indexOf("?"),c>=0){if(k=this.sourceSearch=e.substring(c),e=e.substring(0,c),this.sourcePath=n.substring(0,s+c),k.length>0)for(s=0;a=rt.exec(k);)f=it(a,!0),h=nt(f.id,f.type,f.cfg,"search"),s=v.lastIndex}else this.sourcePath=n,this.sourceSearch="";y+=tt(e)+(t.strict===!1?"/?":"")+"$";p.push(e);this.regexp=new RegExp(y,t.caseInsensitive?"i":i);this.prefix=p[0];this.$$paramNames=g}function s(n){u(this,n)}function ct(){function rt(n){return n!=null?n.toString().replace(/~/g,"~~").replace(/\//g,"~2F"):n}function st(n){return n!=null?n.toString().replace(/~2F/g,"/").replace(/~~/g,"~"):n}function ht(){return{strict:g,caseInsensitive:d}}function et(n){return h(n)||a(n)&&h(n[n.length-1])}function ot(){while(it.length){var i=it.shift();if(i.pattern)throw new Error("You cannot override a type's .pattern at runtime.");t.extend(n[i.name],b.invoke(i.def))}}function k(n){u(this,n||{})}l=this;var d=!1,g=!0,nt=!1;var n={},ut=!0,it=[],b,ft={string:{encode:rt,decode:st,is:function(n){return n==null||!r(n)||typeof n=="string"},pattern:/[^/]*/},int:{encode:rt,decode:function(n){return parseInt(n,10)},is:function(n){return r(n)&&this.decode(n.toString())===n},pattern:/\d+/},bool:{encode:function(n){return n?1:0},decode:function(n){return parseInt(n,10)!==0},is:function(n){return n===!0||n===!1},pattern:/0|1/},date:{encode:function(n){return this.is(n)?[n.getFullYear(),("0"+(n.getMonth()+1)).slice(-2),("0"+n.getDate()).slice(-2)].join("-"):i},decode:function(n){if(this.is(n))return n;var t=this.capture.exec(n);return t?new Date(t[1],t[2]-1,t[3]):i},is:function(n){return n instanceof Date&&!isNaN(n.valueOf())},equals:function(n,t){return this.is(n)&&this.is(t)&&n.toISOString()===t.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:t.toJson,decode:t.fromJson,is:t.isObject,equals:t.equals,pattern:/[^/]*/},any:{encode:t.identity,decode:t.identity,equals:t.equals,pattern:/.*/}};ct.$$getDefaultValue=function(n){if(!et(n.value))return n.value;if(!b)throw new Error("Injectable functions cannot be called at configuration time");return b.invoke(n.value)};this.caseInsensitive=function(n){return r(n)&&(d=n),d};this.strictMode=function(n){return r(n)&&(g=n),g};this.defaultSquashPolicy=function(n){if(!r(n))return nt;if(n!==!0&&n!==!1&&!e(n))throw new Error("Invalid squash policy: "+n+". Valid policies: false, true, arbitrary-string");return nt=n,n};this.compile=function(n,t){return new v(n,u(ht(),t))};this.isMatcher=function(n){if(!o(n))return!1;var t=!0;return f(v.prototype,function(i,u){h(i)&&(t=t&&r(n[u])&&h(n[u]))}),t};this.type=function(t,i,f){if(!r(i))return n[t];if(n.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return n[t]=new s(u({name:t},i)),f&&(it.push({name:t,def:f}),ut||ot()),this};f(ft,function(t,i){n[i]=new s(u({name:i},t))});n=w(n,{});this.$get=["$injector",function(t){return b=t,ut=!1,ot(),f(ft,function(t,i){n[i]||(n[i]=new s(t))}),this}];this.Param=function(f,h,l,v){function rt(n){var t=o(n)?p(n):[],i=c(t,"value")===-1&&c(t,"type")===-1&&c(t,"squash")===-1&&c(t,"array")===-1;return i&&(n={value:n}),n.$$fn=et(n.value)?n.value:function(){return n.value},n}function ut(i,r,u){if(i.type&&r)throw new Error("Param '"+f+"' has two type configurations.");return r?r:i.type?t.isString(i.type)?n[i.type]:i.type instanceof s?i.type:new s(i.type):u==="config"?n.any:n.string}function ft(){var n={array:v==="search"?"auto":!1},t=f.match(/\[\]$/)?{array:!0}:{};return u(n,t,l).array}function ot(n,t){var i=n.squash;if(!t||i===!1)return!1;if(!r(i)||i==null)return nt;if(i===!0||e(i))return i;throw new Error("Invalid squash policy: '"+i+"'. Valid policies: false, true, or arbitrary string");}function st(n,t,r,u){var f,o,s=[{from:"",to:r||t?i:""},{from:null,to:r||t?i:""}];return f=a(n.replace)?n.replace:[],e(u)&&f.push({from:u,to:i}),o=y(f,function(n){return n.from}),tt(s,function(n){return c(o,n.from)===-1}).concat(f)}function ht(){if(!b)throw new Error("Injectable functions cannot be called at configuration time");var n=b.invoke(l.$$fn);if(n!==null&&n!==i&&!k.type.is(n))throw new Error("Default value ("+n+") for parameter '"+k.id+"' is not an instance of Type ("+k.type.name+")");return n}function ct(n){function t(n){return function(t){return t.from===n}}function i(n){var i=y(tt(k.replace,t(n)),function(n){return n.to});return i.length?i[0]:n}return n=i(n),r(n)?k.type.$normalize(n):ht()}function lt(){return"{Param:"+f+" "+h+" squash: '"+g+"' optional: "+d+"}"}var k=this,w;l=rt(l);h=ut(l,h,v);w=ft();h=w?h.$asArray(w,v==="search"):h;h.name!=="string"||w||v!=="path"||l.value!==i||(l.value="");var d=l.value!==i,g=ot(l,d),it=st(l,w,d,g);u(this,{id:f,type:h,location:v,array:w,squash:g,replace:it,isOptional:d,value:ct,dynamic:i,config:l,toString:lt})};k.prototype={$$new:function(){return w(this,u(new k,{$$parent:this}))},$$keys:function(){for(var t=[],i=[],n=this,r=p(k.prototype);n;)i.push(n),n=n.$$parent;return i.reverse(),f(i,function(n){f(p(n),function(n){c(t,n)===-1&&c(r,n)===-1&&t.push(n)})}),t},$$values:function(n){var t={},i=this;return f(i.$$keys(),function(r){t[r]=i[r].value(n&&n[r])}),t},$$equals:function(n,t){var i=!0,r=this;return f(r.$$keys(),function(u){var f=n&&n[u],e=t&&t[u];r[u].type.equals(f,e)||(i=!1)}),i},$$validates:function(n){for(var e=this.$$keys(),r,f,o,s,u=0;u<e.length;u++){if(r=this[e[u]],f=n[e[u]],(f===i||f===null)&&r.isOptional)break;if((o=r.type.$normalize(f),!r.type.is(o))||(s=r.type.encode(o),t.isString(s)&&!r.type.pattern.exec(s)))return!1}return!0},$$parent:i};this.ParamSet=k}function lt(n,f){function p(n){var t=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(n.source);return t!=null?t[1].replace(/\\(.)/g,"$1"):""}function w(n,t){return n.replace(/\$(\$|\d{1,2})/,function(n,i){return t[i==="$"?0:Number(i)]})}function v(n,t,i){if(!i)return!1;var u=n.invoke(t,t,{$match:i});return r(u)?u:!0}function y(r,u,f,h,a){function k(n,t,i){return y==="/"?n:t?y.slice(0,-1)+n:i?y.slice(1)+n:n}function w(n){function u(n){var t=n(f,r);return t?(e(t)&&r.replace().url(t),!0):!1}var c,h,t;if(!n||!n.defaultPrevented){for(c=v&&r.url()===v,v=i,h=o.length,t=0;t<h;t++)if(u(o[t]))return;s&&u(s)}}function b(){return c=c||u.$on("$locationChangeSuccess",w)}var y=h.baseHref(),p=r.url(),v;return l||b(),{sync:function(){w()},listen:function(){return b()},update:function(n){if(n){p=r.url();return}r.url()!==p&&(r.url(p),r.replace())},push:function(n,t,u){var f=n.format(t||{});f!==null&&t&&t["#"]&&(f+="#"+t["#"]);r.url(f);v=u&&u.$$avoidResync?r.url():i;u&&u.replace&&r.replace()},href:function(i,u,f){var o,e,h,s;return i.validates(u)?(o=n.html5Mode(),t.isObject(o)&&(o=o.enabled),o=o&&a.history,e=i.format(u),f=f||{},o||e===null||(e="#"+n.hashPrefix()+e),e!==null&&u&&u["#"]&&(e+="#"+u["#"]),e=k(e,o,f.absolute),!f.absolute||!e)?e:(h=!o&&e?"/":"",s=r.port(),s=s===80||s===443?"":":"+s,[r.protocol(),"://",r.host(),s,h,e].join("")):null}}}var o=[],s=null,l=!1,c;this.rule=function(n){if(!h(n))throw new Error("'rule' must be a function");return o.push(n),this};this.otherwise=function(n){if(e(n)){var t=n;n=function(){return t}}else if(!h(n))throw new Error("'rule' must be a function");return s=n,this};this.when=function(n,t){var i,r=e(t),c,o,s;if(e(n)&&(n=f.compile(n)),!r&&!h(t)&&!a(t))throw new Error("invalid 'handler' in when()");c={matcher:function(n,t){return r&&(i=f.compile(t),t=["$match",function(n){return i.format(n)}]),u(function(i,r){return v(i,t,n.exec(r.path(),r.search()))},{prefix:e(n.prefix)?n.prefix:""})},regex:function(n,t){if(n.global||n.sticky)throw new Error("when() RegExp must not be global or sticky");return r&&(i=t,t=["$match",function(n){return w(i,n)}]),u(function(i,r){return v(i,t,n.exec(r.path()))},{prefix:p(n)})}};o={matcher:f.isMatcher(n),regex:n instanceof RegExp};for(s in o)if(o[s])return this.rule(c[s](n,t));throw new Error("invalid 'what' in when()");};this.deferIntercept=function(n){n===i&&(n=!0);l=n};this.$get=y;y.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function at(n,s){function ht(n){return n.indexOf(".")===0||n.indexOf("^")===0}function g(n,t){var s;if(!n)return i;var h=e(n),u=h?n:n.name,c=ht(u);if(c){if(!t)throw new Error("No reference point given for path '"+u+"'");t=g(t);for(var r=u.split("."),f=0,l=r.length,o=t;f<l;f++){if(r[f]===""&&f===0){o=t;continue}if(r[f]==="^"){if(!o.parent)throw new Error("Path '"+u+"' not valid for state '"+t.name+"'");o=o.parent;continue}break}r=r.slice(f).join(".");u=o.name+(o.name&&r?".":"")+r}return(s=it[u],s&&(h||!h&&(s===n||s.self===n)))?s:i}function ct(n,t){rt[n]||(rt[n]=[]);rt[n].push(t)}function lt(n){for(var t=rt[n]||[];t.length;)ut(t.shift())}function ut(t){var i,u,r;if(t=w(t,{self:t,resolve:t.resolve||{},toString:function(){return this.name}}),i=t.name,!e(i)||i.indexOf("@")>=0)throw new Error("State must have a valid name");if(it.hasOwnProperty(i))throw new Error("State '"+i+"' is already defined");if(u=i.indexOf(".")!==-1?i.substring(0,i.lastIndexOf(".")):e(t.parent)?t.parent:o(t.parent)&&e(t.parent.name)?t.parent.name:"",u&&!it[u])return ct(u,t.self);for(r in k)h(k[r])&&(t[r]=k[r](t,k.$delegates[r]));return it[i]=t,!t[ft]&&t.url&&n.when(t.url,["$match","$stateParams",function(n,i){v.$current.navigable==t&&nt(n,i)||v.transitionTo(t,n,{inherit:!0,location:!1})}]),lt(i),t}function at(n){return n.indexOf("*")>-1}function vt(n){for(var t=n.split("."),i=v.$current.name.split("."),r=0,u=t.length;r<u;r++)t[r]==="*"&&(i[r]="*");return(t[0]==="**"&&(i=i.slice(c(i,t[1])),i.unshift("**")),t[t.length-1]==="**"&&(i.splice(c(i,t[t.length-2])+1,Number.MAX_VALUE),i.push("**")),t.length!=i.length)?!1:i.join("")===t.join("")}function yt(n,t){return e(n)&&!r(t)?k[n]:!h(t)||!e(n)?this:(k[n]&&!k.$delegates[n]&&(k.$delegates[n]=k[n]),k[n]=t,this)}function pt(n,t){return o(n)?t=n:t.name=n,ut(t),this}function st(n,s,c,l,k,rt,ut){function lt(t,i,r,u){var e=n.$broadcast("$stateNotFound",t,i,r),f;return e.defaultPrevented?(ut.update(),st):e.retry?u.$retry?(ut.update(),ht):(f=v.transition=s.when(e.retry),f.then(function(){return f!==v.transition?ot:(t.options.$retry=!0,v.transitionTo(t.to,t.toParams,t.options))},function(){return st}),ut.update(),f):null}function yt(n,i,r,u,e,o){function w(){var i=[];return f(n.views,function(r,u){var f=r.resolve&&r.resolve!==n.resolve?r.resolve:{};f.$template=[function(){return c.load(u,{view:r,locals:e.globals,params:y,notify:o.notify})||""}];i.push(k.resolve(f,e.globals,e.resolve,n).then(function(i){if(h(r.controllerProvider)||a(r.controllerProvider)){var o=t.extend({},f,e.globals);i.$$controller=l.invoke(r.controllerProvider,null,o)}else i.$$controller=r.controller;i.$$state=n;i.$$controllerAs=r.controllerAs;e[u]=i}))}),s.all(i).then(function(){return e.globals})}var y=r?i:b(n.params.$$keys(),i),p={$stateParams:y},v;return e.resolve=k.resolve(n.resolve,p,e.resolve,n),v=[e.resolve.then(function(n){e.globals=n})],u&&v.push(u),s.all(v).then(w).then(function(){return e})}var ot=s.reject(new Error("transition superseded")),ct=s.reject(new Error("transition prevented")),st=s.reject(new Error("transition aborted")),ht=s.reject(new Error("transition failed"));return tt.locals={resolve:null,globals:{$stateParams:{}}},v={params:{},current:tt.self,$current:tt,transition:null},v.reload=function(n){return v.transitionTo(v.current,rt,{reload:n||!0,inherit:!1,notify:!0})},v.go=function(n,t,i){return v.transitionTo(n,t,u({inherit:!0,relative:v.$current},i))},v.transitionTo=function(t,i,f){var st,dt,gt,bt,at,kt;i=i||{};f=u({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var y=v.$current,p=v.params,it=y.path,ni,a=g(t,f.relative),vt=i["#"];if(!r(a)){if(st={to:t,toParams:i,options:f},dt=lt(st,y.self,p,f),dt)return dt;if(t=st.to,i=st.toParams,f=st.options,a=g(t,f.relative),!r(a)){if(!f.relative)throw new Error("No such state '"+t+"'");throw new Error("Could not resolve '"+t+"' from state '"+f.relative+"'");}}if(a[ft])throw new Error("Cannot transition to abstract state '"+t+"'");if(f.inherit&&(i=et(rt,i||{},v.$current,a)),!a.params.$$validates(i))return ht;i=a.params.$$values(i);t=a;var k=t.path,c=0,h=k[c],nt=tt.locals,pt=[];if(f.reload){if(e(f.reload)||o(f.reload)){if(o(f.reload)&&!f.reload.name)throw new Error("Invalid reload state object");if(gt=f.reload===!0?it[0]:g(f.reload),f.reload&&!gt)throw new Error("No such reload state '"+(e(f.reload)?f.reload:f.reload.name)+"'");while(h&&h===it[c]&&h!==gt)nt=pt[c]=h.locals,c++,h=k[c]}}else while(h&&h===it[c]&&h.ownParams.$$equals(i,p))nt=pt[c]=h.locals,c++,h=k[c];if(wt(t,i,y,p,nt,f))return vt&&(i["#"]=vt),v.params=i,d(v.params,rt),d(b(t.params.$$keys(),rt),t.locals.globals.$stateParams),f.location&&t.navigable&&t.navigable.url&&(ut.push(t.navigable.url,i,{$$avoidResync:!0,replace:f.location==="replace"}),ut.update(!0)),v.transition=null,s.when(v.current);if(i=b(t.params.$$keys(),i||{}),vt&&(i["#"]=vt),f.notify&&n.$broadcast("$stateChangeStart",t.self,i,y.self,p,f).defaultPrevented)return n.$broadcast("$stateChangeCancel",t.self,i,y.self,p),v.transition==null&&ut.update(),ct;for(bt=s.when(nt),at=c;at<k.length;at++,h=k[at])nt=pt[at]=w(nt),bt=yt(h,i,h===t,bt,nt,f);return kt=v.transition=bt.then(function(){var r,u,e;if(v.transition!==kt)return ot;for(r=it.length-1;r>=c;r--)e=it[r],e.self.onExit&&l.invoke(e.self.onExit,e.self,e.locals.globals),e.locals=null;for(r=c;r<k.length;r++)u=k[r],u.locals=pt[r],u.self.onEnter&&l.invoke(u.self.onEnter,u.self,u.locals.globals);return v.transition!==kt?ot:(v.$current=t,v.current=t.self,v.params=i,d(v.params,rt),v.transition=null,f.location&&t.navigable&&ut.push(t.navigable.url,t.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:f.location==="replace"}),f.notify&&n.$broadcast("$stateChangeSuccess",t.self,i,y.self,p),ut.update(!0),v.current)},function(r){return v.transition!==kt?ot:(v.transition=null,ni=n.$broadcast("$stateChangeError",t.self,i,y.self,p,r),ni.defaultPrevented||ut.update(),s.reject(r))})},v.is=function(n,t,f){f=u({relative:v.$current},f||{});var e=g(n,f.relative);return r(e)?v.$current!==e?!1:t?nt(e.params.$$values(t),rt):!0:i},v.includes=function(n,t,f){if(f=u({relative:v.$current},f||{}),e(n)&&at(n)){if(!vt(n))return!1;n=v.$current.name}var o=g(n,f.relative);return r(o)?r(v.$current.includes[o.name])?t?nt(o.params.$$values(t),rt,p(t)):!0:!1:i},v.href=function(n,t,f){var e,o;return(f=u({lossy:!0,inherit:!0,absolute:!1,relative:v.$current},f||{}),e=g(n,f.relative),!r(e))?null:(f.inherit&&(t=et(rt,t||{},v.$current,e)),o=e&&f.lossy?e.navigable:e,!o||o.url===i||o.url===null)?null:ut.href(o.url,b(e.params.$$keys().concat("#"),t||{}),{absolute:f.absolute})},v.get=function(n,t){if(arguments.length===0)return y(p(it),function(n){return it[n].self});var i=g(n,t||v.$current);return i&&i.self?i.self:null},v}function wt(n,t,i,r,u,f){function e(n,t,i){function r(t){return n.params[t].location!="search"}var u=n.params.$$keys().filter(r),f=ot.apply({},[n.params].concat(u)),e=new l.ParamSet(f);return e.$$equals(t,i)}if(!f.reload&&n===i&&(u===i.locals||n.self.reloadOnSearch===!1&&e(i,r,t)))return!0}var tt,it={},v,rt={},ft="abstract",k={parent:function(n){if(r(n.parent)&&n.parent)return g(n.parent);var t=/^(.+)\.[^.]+$/.exec(n.name);return t?g(t[1]):tt},data:function(n){return n.parent&&n.parent.data&&(n.data=n.self.data=w(n.parent.data,n.data)),n.data},url:function(n){var t=n.url,i={params:n.params||{}};if(e(t))return t.charAt(0)=="^"?s.compile(t.substring(1),i):(n.parent.navigable||tt).url.concat(t,i);if(!t||s.isMatcher(t))return t;throw new Error("Invalid url '"+t+"' in state '"+n+"'");},navigable:function(n){return n.url?n:n.parent?n.parent.navigable:null},ownParams:function(n){var t=n.url&&n.url.params||new l.ParamSet;return f(n.params||{},function(n,i){t[i]||(t[i]=new l.Param(i,null,n,"config"))}),t},params:function(n){var t=ot(n.ownParams,n.ownParams.$$keys());return n.parent&&n.parent.params?u(n.parent.params.$$new(),t):new l.ParamSet},views:function(n){var t={};return f(r(n.views)?n.views:{"":n},function(i,r){r.indexOf("@")<0&&(r+="@"+n.parent.name);t[r]=i}),t},path:function(n){return n.parent?n.parent.path.concat(n):[]},includes:function(n){var t=n.parent?u({},n.parent.includes):{};return t[n.name]=!0,t},$delegates:{}};tt=ut({name:"",url:"^",views:null,abstract:!0});tt.navigable=null;this.decorator=yt;this.state=pt;this.$get=st;st.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function vt(){function n(n,t){return{load:function(n,i){var r;return i=u({template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}},i),i.view&&(r=t.fromConfig(i.view,i.params,i.locals)),r}}}this.$get=n;n.$inject=["$rootScope","$templateFactory"]}function fi(){var n=!1;this.useAnchorScroll=function(){n=!0};this.$get=["$anchorScroll","$timeout",function(t,i){return n?t:function(n){return i(function(){n[0].scrollIntoView()},0,!1)}}]}function yt(n,i,r,u){function s(){return i.has?function(n){return i.has(n)?i.get(n):null}:function(n){try{return i.get(n)}catch(t){return null}}}function h(n,i){function o(n){return it===1&&rt>=4?!!f.enabled(n):it===1&&rt>=2?!!f.enabled():!!e}var r={enter:function(n,t,i){t.after(n);i()},leave:function(n,t){n.remove();t()}},u;return!n.noanimation?f?{enter:function(n,i,u){o(n)?t.version.minor>2?f.enter(n,null,i).then(u):f.enter(n,null,i,u):r.enter(n,i,u)},leave:function(n,i){o(n)?t.version.minor>2?f.leave(n).then(i):f.leave(n,i):r.leave(n,i)}}:e?(u=e&&e(i,n),{enter:function(n,t,i){u.enter(n,null,t);i()},leave:function(n,t){u.leave(n);t()}}):r:r}var o=s(),e=o("$animator"),f=o("$animate");return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(i,f,e){return function(i,f,o){function b(){function i(){t&&t.remove();n&&n.$destroy()}var t=l,n=s;n&&(n._willBeDestroyed=!0);c?(y.leave(c,function(){i();l=null}),l=c):(i(),l=null);c=null;s=null}function p(h){var p,l=wt(i,o,f,u),d=l&&n.$current&&n.$current.locals[l],k;(h||d!==v)&&!i._willBeDestroyed&&(p=i.$new(),v=n.$current.locals[l],p.$emit("$viewContentLoading",l),k=e(p,function(n){y.enter(n,f,function(){s&&s.$emit("$viewContentAnimationEnded");(t.isDefined(a)&&!a||i.$eval(a))&&r(n)});b()}),c=k,s=p,s.$emit("$viewContentLoaded",l),s.$eval(w))}var l,c,s,v,w=o.onload||"",a=o.autoscroll,y=h(o,i);i.$on("$stateChangeSuccess",function(){p(!1)});p(!0)}}}}function pt(n,t,i,r){return{restrict:"ECA",priority:-400,compile:function(u){var f=u.html();return function(u,e,o){var c=i.$current,l=wt(u,o,e,r),s=c&&c.locals[l],a,h;s&&(e.data("$uiView",{name:l,state:s.$$state}),e.html(s.$template?s.$template:f),a=n(e.contents()),s.$$controller&&(s.$scope=u,s.$element=e,h=t(s.$$controller,s),s.$$controllerAs&&(u[s.$$controllerAs]=h),e.data("$ngControllerController",h),e.children().data("$ngControllerController",h)),a(u))}}}}function wt(n,t,i,r){var u=r(t.uiView||t.name||"")(n),f=i.inheritedData("$uiView");return u.indexOf("@")>=0?u:u+"@"+(f?f.state.name:"")}function bt(n,t){var r=n.match(/^\s*({[^}]*})\s*$/),i;if(r&&(n=t+"("+r[1]+")"),i=n.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!i||i.length!==4)throw new Error("Invalid state ref '"+n+"'");return{state:i[1],paramExpr:i[3]||null}}function kt(n){var t=n.parent().inheritedData("$uiView");if(t&&t.state&&t.state.name)return t.state}function dt(n){var i=Object.prototype.toString.call(n.prop("href"))==="[object SVGAnimatedString]",t=n[0].nodeName==="FORM";return{attr:t?"action":i?"xlink:href":"href",isAnchor:n.prop("tagName").toUpperCase()==="A",clickable:!t}}function gt(n,t,i,r,u){return function(f){var h=f.which||f.button,e=u(),o,s;h>1||f.ctrlKey||f.metaKey||f.shiftKey||n.attr("target")||(o=i(function(){t.go(e.state,e.params,e.options)}),f.preventDefault(),s=r.isAnchor&&!e.href?1:0,f.preventDefault=function(){s--<=0&&i.cancel(o)})}}function ei(n,t){return{relative:kt(n)||t.$current,inherit:!0}}function ni(n,i){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,f,e,o){var h=bt(e.uiSref,n.current.name),s={state:h.state,href:null,params:null},c=dt(f),a=o[1]||o[0],l;(s.options=u(ei(f,n),e.uiSrefOpts?r.$eval(e.uiSrefOpts):{}),l=function(i){i&&(s.params=t.copy(i));s.href=n.href(h.state,s.params,s.options);a&&a.$$addStateInfo(h.state,s.params);s.href!==null&&e.$set(c.attr,s.href)},h.paramExpr&&(r.$watch(h.paramExpr,function(n){n!==s.params&&l(n)},!0),s.params=t.copy(r.$eval(h.paramExpr))),l(),c.clickable)&&f.bind("click",gt(f,n,i,c,function(){return s}))}}}function ti(n,t){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(i,r,u,f){function c(t){e.state=t[0];e.params=t[1];e.options=t[2];e.href=n.href(e.state,e.params,e.options);s&&s.$$addStateInfo(e.state,e.params);e.href&&u.$set(o.attr,e.href)}var o=dt(r),s=f[1]||f[0],l=[u.uiState,u.uiStateParams||null,u.uiStateOpts||null],h="["+l.map(function(n){return n||"null"}).join(", ")+"]",e={state:null,params:null,options:null,href:null};(i.$watch(h,c,!0),c(i.$eval(h)),o.clickable)&&r.bind("click",gt(r,n,t,o,function(){return e}))}}}function ut(n,t,i){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(t,r,u,s){function y(t,i,u){var e=n.get(t,kt(r)),f=b(t,i);h.push({state:e||{name:t},params:i,hash:f});l[f]=u}function b(n,i){if(!e(n))throw new Error("state should be a string");return o(i)?n+ft(i):(i=t.$eval(i),o(i))?n+ft(i):n}function v(){for(var n=0;n<h.length;n++)k(h[n].state,h[n].params)?p(r,l[h[n].hash]):w(r,l[h[n].hash]),d(h[n].state,h[n].params)?p(r,a):w(r,a)}function p(n,t){s(function(){n.addClass(t)})}function w(n,t){n.removeClass(t)}function k(t,i){return n.includes(t.name,i)}function d(t,i){return n.is(t.name,i)}var h=[],l={},a,c;a=i(u.uiSrefActiveEq||"",!1)(t);try{c=t.$eval(u.uiSrefActive)}catch(g){}c=c||i(u.uiSrefActive||"",!1)(t);o(c)&&f(c,function(i,r){if(e(i)){var u=bt(i,n.current.name);y(u.state,t.$eval(u.paramExpr),r)}});this.$$addStateInfo=function(n,t){o(c)&&h.length>0||(y(n,t,c),v())};t.$on("$stateChangeSuccess",v);v()}]}}function ii(n){var t=function(t,i){return n.is(t,i)};return t.$stateful=!0,t}function ri(n){var t=function(t,i,r){return n.includes(t,i,r)};return t.$stateful=!0,t}var r=t.isDefined,h=t.isFunction,e=t.isString,o=t.isObject,a=t.isArray,f=t.forEach,u=t.extend,d=t.copy,ft=t.toJson,l,it,rt;t.module("ui.router.util",["ng"]);t.module("ui.router.router",["ui.router.util"]);t.module("ui.router.state",["ui.router.router","ui.router.util"]);t.module("ui.router",["ui.router.state"]);t.module("ui.router.compat",["ui.router"]);st.$inject=["$q","$injector"];t.module("ui.router.util").service("$resolve",st);ht.$inject=["$http","$templateCache","$injector"];t.module("ui.router.util").service("$templateFactory",ht);v.prototype.concat=function(n,t){var i={caseInsensitive:l.caseInsensitive(),strict:l.strictMode(),squash:l.defaultSquashPolicy()};return new v(this.sourcePath+n+this.sourceSearch,u(i,t),this)};v.prototype.toString=function(){return this.source};v.prototype.exec=function(n,t){function v(n){function t(n){return n.split("").reverse().join("")}function i(n){return n.replace(/\\-/g,"-")}var r=t(n).split(/-(?!\\)/),u=y(r,t);return y(u,i).reverse()}var h=this.regexp.exec(n),u,i;if(!h)return null;t=t||{};var c=this.parameters(),a=c.length,l=this.segments.length-1,s={},o,f,e;if(l!==h.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(o=0;o<l;o++){for(e=c[o],u=this.params[e],i=h[o+1],f=0;f<u.replace.length;f++)u.replace[f].from===i&&(i=u.replace[f].to);i&&u.array===!0&&(i=v(i));r(i)&&(i=u.type.decode(i));s[e]=u.value(i)}for(;o<a;o++){for(e=c[o],s[e]=this.params[e].value(t[e]),u=this.params[e],i=t[e],f=0;f<u.replace.length;f++)u.replace[f].from===i&&(i=u.replace[f].to);r(i)&&(i=u.type.decode(i));s[e]=u.value(i)}return s};v.prototype.parameters=function(n){return r(n)?this.params[n]||null:this.$$paramNames};v.prototype.validates=function(n){return this.params.$$validates(n)};v.prototype.format=function(n){function nt(n){return encodeURIComponent(n).replace(/-/g,function(n){return"%5C%"+n.charCodeAt(0).toString(16).toUpperCase()})}var s,b,k;n=n||{};var h=this.segments,c=this.parameters(),d=this.params;if(!this.validates(n))return null;for(var l=!1,v=h.length-1,g=c.length,i=h[0],r=0;r<g;r++){var tt=r<v,o=c[r],u=d[o],p=u.value(n[o]),w=u.isOptional&&u.type.equals(u.value(),p),f=w?u.squash:!1,t=u.type.encode(p);if(tt)s=h[r+1],b=r+1===v,f===!1?(t!=null&&(i+=a(t)?y(t,nt).join("-"):encodeURIComponent(t)),i+=s):f===!0?(k=i.match(/\/$/)?/\/?(.*)/:/(.*)/,i+=s.match(k)[1]):e(f)&&(i+=f+s),b&&u.squash===!0&&i.slice(-1)==="/"&&(i=i.slice(0,-1));else{if(t==null||w&&f!==!1)continue;if(a(t)||(t=[t]),t.length===0)continue;t=y(t,encodeURIComponent).join("&"+o+"=");i+=(l?"&":"?")+(o+"="+t);l=!0}}return i};s.prototype.is=function(){return!0};s.prototype.encode=function(n){return n};s.prototype.decode=function(n){return n};s.prototype.equals=function(n,t){return n==t};s.prototype.$subPattern=function(){var n=this.pattern.toString();return n.substr(1,n.length-2)};s.prototype.pattern=/.*/;s.prototype.toString=function(){return"{Type:"+this.name+"}"};s.prototype.$normalize=function(n){return this.is(n)?n:this.decode(n)};s.prototype.$asArray=function(n,t){function u(n,t){function u(n,t){return function(){return n[t].apply(n,arguments)}}function e(n){return a(n)?n:r(n)?[n]:[]}function o(n){switch(n.length){case 0:return i;case 1:return t==="auto"?n[0]:n;default:return n}}function s(n){return!n}function f(n,t){return function(i){if(a(i)&&i.length===0)return i;i=e(i);var r=y(i,n);return t===!0?tt(r,s).length===0:o(r)}}function h(n){return function(t,i){var u=e(t),f=e(i),r;if(u.length!==f.length)return!1;for(r=0;r<u.length;r++)if(!n(u[r],f[r]))return!1;return!0}}this.encode=f(u(n,"encode"));this.decode=f(u(n,"decode"));this.is=f(u(n,"is"),!0);this.equals=h(u(n,"equals"));this.pattern=n.pattern;this.$normalize=f(u(n,"$normalize"));this.name=n.name;this.$arrayMode=t}if(!n)return this;if(n==="auto"&&!t)throw new Error("'auto' array mode is for query parameters only");return new u(this,n)};t.module("ui.router.util").provider("$urlMatcherFactory",ct);t.module("ui.router.util").run(["$urlMatcherFactory",function(){}]);lt.$inject=["$locationProvider","$urlMatcherFactoryProvider"];t.module("ui.router.router").provider("$urlRouter",lt);at.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"];t.module("ui.router.state").factory("$stateParams",function(){return{}}).provider("$state",at);vt.$inject=[];t.module("ui.router.state").provider("$view",vt);t.module("ui.router.state").provider("$uiViewScroll",fi);it=t.version.major;rt=t.version.minor;yt.$inject=["$state","$injector","$uiViewScroll","$interpolate"];pt.$inject=["$compile","$controller","$state","$interpolate"];t.module("ui.router.state").directive("uiView",yt);t.module("ui.router.state").directive("uiView",pt);ni.$inject=["$state","$timeout"];ti.$inject=["$state","$timeout"];ut.$inject=["$state","$stateParams","$interpolate"];t.module("ui.router.state").directive("uiSref",ni).directive("uiSrefActive",ut).directive("uiSrefActiveEq",ut).directive("uiState",ti);ii.$inject=["$state"];ri.$inject=["$state"];t.module("ui.router.state").filter("isState",ii).filter("includedByState",ri)}(window,window.angular),function(){angular.module("validation",["validation.provider","validation.directive"])}.call(this),function(){angular.module("validation.provider",[]).provider("$validation",function(){var i,n,o,r,u,t=this,s=function(t){i=t;n=i.get("$rootScope");o=i.get("$http");r=i.get("$q");u=i.get("$timeout")},f={},e={};this.setExpression=function(n){return angular.extend(f,n),t};this.getExpression=function(n){return f[n]};this.setDefaultMsg=function(n){return angular.extend(e,n),t};this.getDefaultMsg=function(n){return e[n]};this.setErrorHTML=function(n){if(n.constructor===Function)return t.getErrorHTML=n,t};this.getErrorHTML=function(n){return'<p role="alert" class="form-control-error"><i class="fa fa-exclamation-triangle"><\/i> '+n+"<\/p>"};this.setSuccessHTML=function(n){if(n.constructor===Function)return t.getSuccessHTML=n,t};this.getSuccessHTML=function(n){return'<p class="form-control-success"><i class="fa  fa-check-circle"><\/i> '+n+"<\/p>"};this.showSuccessMessage=!1;this.showErrorMessage=!0;this.checkValid=function(n){return n.$valid===undefined?!1:n&&n.$valid===!0};this.validate=function(i,f){var e=r.defer(),s=0,h,o;if(i===undefined)return console.error("This is not a regular Form name scope"),e.reject("This is not a regular Form name scope"),e.promise;if(i.validationId)n.$broadcast(i.$name+"submit-"+i.validationId,s++);else if(i.constructor===Array)for(h in i)n.$broadcast(i[h].$name+"submit-"+i[h].validationId,s++);else for(o in i)o[0]!=="$"&&i[o].hasOwnProperty("$dirty")?n.$broadcast(o+"submit-"+i[o].validationId,s++):o[0]!=="$"&&f&&n.$broadcast(o+"submit-"+i[o].validationId,s++);return e.promise.success=function(n){return e.promise.then(function(t){n(t)}),e.promise},e.promise.error=function(n){return e.promise.then(null,function(t){n(t)}),e.promise},u(function(){t.checkValid(i)?e.resolve("success"):e.reject("error")}),e.promise};this.reset=function(t){var r,i;if(t===undefined){console.error("This is not a regular Form name scope");return}if(t.validationId)n.$broadcast(t.$name+"reset-"+t.validationId);else if(t.constructor===Array)for(r in t)n.$broadcast(t[r].$name+"reset-"+t[r].validationId);else for(i in t)i[0]!=="$"&&t[i].hasOwnProperty("$dirty")&&n.$broadcast(i+"reset-"+t[i].validationId)};this.$get=["$injector",function(n){return s(n),{setErrorHTML:this.setErrorHTML,getErrorHTML:this.getErrorHTML,setSuccessHTML:this.setSuccessHTML,getSuccessHTML:this.getSuccessHTML,setExpression:this.setExpression,getExpression:this.getExpression,setDefaultMsg:this.setDefaultMsg,getDefaultMsg:this.getDefaultMsg,showSuccessMessage:this.showSuccessMessage,showErrorMessage:this.showErrorMessage,checkValid:this.checkValid,validate:this.validate,reset:this.reset}}]})}.call(this),function(){angular.module("validation.directive",["validation.provider"]).directive("validator",["$injector",function(n){var t=n.get("$validation"),e=n.get("$q"),f=n.get("$timeout"),o=function(n,i,r,u,f){return t.showSuccessMessage?n.prev(".form-control-status").html(t.getSuccessHTML(i||t.getDefaultMsg(r).success)):n.prev(".form-control-status").html(""),f.$setValidity(f.$name,!0),u&&u(),!0},s=function(n,i,r,u,f){return t.showErrorMessage?n.prev(".form-control-status").html(t.getErrorHTML(i||t.getDefaultMsg(r).error)):n.prev(".form-control-status").html(""),f.$setValidity(f.$name,!1),u&&u(),!1},r=!1,h=function(n,t,i){if(i.validatorRel){var u=i.validatorRel.split("."),r=n.$parent[u[0]][u[1]],e=r.$viewValue;r.$dirty&&(f(function(){r.$setViewValue("")}),f(function(){r.$setViewValue(e)}))}},i=function(n,r,u,f,c,l){var w=c.slice(0),a=w[0].trim(),y=w.slice(1),b=a+"SuccessMessage",k=a+"ErrorMessage",p=t.getExpression(a),v={success:function(){if(o(r,u[b],a,n.validCallback,f),y.length)i(n,r,u,f,y,l);else return h(n,r,u,f,y,l),!0},error:function(){return s(r,u[k],a,n.invalidCallback,f)}};if(p===undefined)if(console.error('You are using undefined validator "%s"',a),y.length)i(n,r,u,f,y,l);else return;return p.constructor===Function?e.all([t.getExpression(a)(l,n,r,u)]).then(function(n){return n&&n.length>0&&n[0]?v.success():v.error()},function(){return v.error()}):p.constructor===RegExp?t.getExpression(a).test(l)?v.success():v.error():v.error()},u=function(){return((1+Math.random())*65536|0).toString(16).substring(1)},c=function(){return u()+u()+u()+u()};return{restrict:"A",require:"ngModel",scope:{model:"=ngModel",initialValidity:"=initialValidity",validCallback:"&",invalidCallback:"&"},link:function(n,t,u,e){var s=function(){},o=u.validator.split(","),l=e.validationId=c(),h;t.before('<span class="form-control-status"><\/span>');h=!1;typeof n.initialValidity=="boolean"&&(h=n.initialValidity);e.$setValidity(e.$name,h);n.$on(e.$name+"reset-"+l,function(){s();r=!1;e.$setViewValue("");e.$setPristine();e.$setValidity(e.$name,!1);e.$render();t.prev(".form-control-status").html("")}),function(){if(n.$on(e.$name+"submit-"+l,function(f,h){var l=e.$viewValue,c=!1;h===0&&(r=!1);c=i(n,t,u,e,o,l);u.validMethod==="submit"&&(s(),s=n.$watch("model",function(r,f){r!==f&&((r===undefined||r===null)&&(r=""),c=i(n,t,u,e,o,r))}));c!==!1||r||(r=!0,t[0].focus())}),u.validMethod==="blur"){t.bind("blur",function(){var r=e.$viewValue;n.$apply(function(){i(n,t,u,e,o,r)})});return}u.validMethod!=="submit"&&u.validMethod!=="submit-only"&&n.$watch("model",function(r){if(e.$pristine&&e.$viewValue)e.$setViewValue(e.$viewValue);else if(e.$pristine){t.prev(".form-control-status").html("");return}i(n,t,u,e,o,r)})}();f(function(){u.$observe("noValidationMessage",function(n){var i=t.next();n=="true"||n===!0?i.css("display","none"):(n=="false"||n===!1)&&i.css("display","block")})})}}}]).directive("validationSubmit",["$injector",function(n){var i=n.get("$validation"),r=n.get("$timeout"),t=n.get("$parse");return{priority:1,require:"?ngClick",link:function(n,u,f){var e=t(f.validationSubmit)(n);r(function(){u.off("click");u.on("click",function(r){r.preventDefault();i.validate(e).success(function(){t(f.ngClick)(n)})})})}}}]).directive("validationReset",["$injector",function(n){var t=n.get("$validation"),i=n.get("$timeout"),r=n.get("$parse");return{link:function(n,u,f){var e=r(f.validationReset)(n);i(function(){u.on("click",function(n){n.preventDefault();t.reset(e)})})}}}])}.call(this);"use strict";var PRISTINE_CLASS="ng-pristine",DIRTY_CLASS="ng-dirty",FROM_DATEPICKER="date-from";angular.module("datePicker",[]).constant("datePickerConfig",{template:"datepicker.html",view:"month",views:["year","month","date","hours","minutes"],step:5}).filter("time",function(){function n(n){return("0"+n.getHours()).slice(-2)+":"+("0"+n.getMinutes()).slice(-2)}return function(t){return!(t instanceof Date)&&(t=new Date(t),isNaN(t.getTime()))?undefined:n(t)}}).directive("datePicker",["datePickerConfig","datePickerUtils",function(n,t){return{require:"?ngModel",template:'<div ng-include="template"><\/div>',scope:{model:"=datePicker",after:"=?",before:"=?"},link:function(i,r,u,f){function c(n,t,i){var u=n.getDate(),r=0,f=i%4==0&&i%100!=0||i%400==0;return r=t==2&&f?29:[31,28,31,30,31,30,31,31,30,31,30,31][t-1],Math.min(u,r)}function s(){var r=i.view,n=i.date;switch(r){case"year":i.years=t.getVisibleYears(n);break;case"month":i.months=t.getVisibleMonths(n);break;case"date":i.weekdays=i.weekdays||t.getDaysOfWeek();i.weeks=t.getVisibleWeeks(n);break;case"hours":i.hours=t.getVisibleHours(n);break;case"minutes":i.minutes=t.getVisibleMinutes(n,e)}}function l(){return i.view!=="date"?i.view:i.model?i.model.getMonth:null}var h;i.date=new Date(i.model||new Date);i.views=n.views.concat();i.view=u.view||n.view;i.now=new Date;i.template=u.template||n.template;i.minDate=i.$parent.minDate?new Date(i.$parent.minDate):!1;i.maxDate=i.$parent.maxDate?new Date(i.$parent.maxDate):!1;var a=i.start&&i.end,e=parseInt(u.step||n.step,10),o=!!u.partial;i.views=i.views.slice(i.views.indexOf(u.maxView||"year"),i.views.indexOf(u.minView||"minutes")+1);(i.views.length===1||i.views.indexOf(i.view)===-1)&&(i.view=i.views[0]);i.setView=function(n){i.views.indexOf(n)!==-1&&(i.view=n)};i.setDate=function(n){var t,r;if(!u.disabled){if(i.date=n,t=i.views[i.views.indexOf(i.view)+1],!t||o||i.model){i.model=new Date(i.model||n);f&&f.$setViewValue(i.date);r=o?"minutes":i.view;switch(r){case"minutes":i.model.setMinutes(n.getMinutes());case"hours":i.model.setHours(n.getHours());case"date":i.model=n;break;case"month":i.model.setMonth(n.getMonth());case"year":i.model.setFullYear(n.getFullYear())}i.$emit("setDate",i.model,i.view)}t&&i.setView(t)}};i.$watch(l,s);i.next=function(n){var t=i.date,u,r,f;n=n||1;switch(i.view){case"year":case"month":t.setFullYear(t.getFullYear()+n);break;case"date":u=t.getFullYear();r=t.getMonth()+n;r>11?(r-=12,u++):r<0&&(r+=12,u--);f=c(t,r+1,u);t.setFullYear(u);t.setDate(f);t.setMonth(r);break;case"hours":case"minutes":t.setHours(t.getHours()+n)}s()};i.isStart=function(n){return i.before&&i.after?t.isSameDay(i.after,n):!1};i.isEnd=function(n){return i.before&&i.after?t.isSameDay(i.before,n):!1};i.prev=function(n){return i.next(-n||-1)};i.isAfter=function(n){return i.after&&t.isAfter(n,i.after)};i.isBefore=function(n){return i.before&&t.isBefore(n,i.before)};i.isSameMonth=function(n){return t.isSameMonth(i.model,n)};i.isSameYear=function(n){return t.isSameYear(i.model,n)};i.isSameDay=function(n){return t.isSameDay(i.model,n)};i.isSameHour=function(n){return t.isSameHour(i.model,n)};i.isSameMinutes=function(n){return t.isSameMinutes(i.model,n)};i.isNow=function(n){var t=!0,r=i.now;switch(i.view){case"minutes":t&=~~(n.getMinutes()/e)==~~(r.getMinutes()/e);case"hours":t&=n.getHours()===r.getHours();case"date":t&=n.getDate()===r.getDate();case"month":t&=n.getMonth()===r.getMonth();case"year":t&=n.getFullYear()===r.getFullYear()}return t};i.inValidRange=function(n){var r=!0;return i.minDate&&t.isAfter(n,i.minDate)&&(r=!1),i.maxDate&&t.isBefore(n,i.maxDate)&&(r=!1),r};h=u.viewid;i.isFromDatePicker=function(){return h!==FROM_DATEPICKER}}}}]).factory("datePickerUtils",function(){return{getVisibleMinutes:function(n,t){n=new Date(n||new Date);n=new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours());for(var i=[],r=n.getTime()+36e5;n.getTime()<r;)i.push(n),n=new Date(n.getTime()+t*6e4);return i},getVisibleWeeks:function(n){var u,f,t,i,r;for(n=new Date(n||new Date),u=n.getMonth(),f=n.getYear(),n.setDate(1),n.setHours(12),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.getDay()===0?n.setDate(-5):n.setDate(n.getDate()-(n.getDay()-1)),n.getDate()===1&&n.setDate(-6),t=[];t.length<6;){if(n.getYear()===f&&n.getMonth()>u)break;for(i=[],r=0;r<7;r++)i.push(new Date(n)),n.setDate(n.getDate()+1);t.push(i)}return t},getVisibleYears:function(n){var i=[],t;for(n=new Date(n||new Date),n.setFullYear(n.getFullYear()-n.getFullYear()%10),t=0;t<12;t++)i.push(new Date(n.getFullYear()+(t-1),0,1));return i},getDaysOfWeek:function(n){var t,i;for(n=new Date(n||new Date),n=new Date(n.getFullYear(),n.getMonth(),n.getDate()),n.setDate(n.getDate()-(n.getDay()-1)),t=[],i=0;i<7;i++)t.push(new Date(n)),n.setDate(n.getDate()+1);return t},getVisibleMonths:function(n){var r,i,t;for(n=new Date(n||new Date),r=n.getFullYear(),i=[],t=0;t<12;t++)i.push(new Date(r,t,1));return i},getVisibleHours:function(n){var t,i;for(n=new Date(n||new Date),n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),t=[],i=0;i<24;i++)t.push(n),n=new Date(n.getTime()+36e5);return t},isAfter:function(n,t){return n&&n.getTime()<=t.getTime()},isBefore:function(n,t){return n.getTime()>=t.getTime()},isSameYear:function(n,t){return n&&n.getFullYear()===t.getFullYear()},isSameMonth:function(n,t){return this.isSameYear(n,t)&&n.getMonth()===t.getMonth()},isSameDay:function(n,t){return this.isSameMonth(n,t)&&n.getDate()===t.getDate()},isSameHour:function(n,t){return this.isSameDay(n,t)&&n.getHours()===t.getHours()},isSameMinutes:function(n,t){return this.isSameHour(n,t)&&n.getMinutes()===t.getMinutes()}}}).constant("dateTimeConfig",{template:function(n){return'<div date-picker="'+n.ngModel+'" '+(n.view?'data-view="'+n.view+'" ':"")+(n.maxView?'data-max-view="'+n.maxView+'" ':"")+(n.template?'data-template="'+n.template+'" ':"")+(n.minView?'data-min-view="'+n.minView+'" ':"")+(n.partial?'data-partial="'+n.partial+'" ':"")+(n.before?'data-before="'+n.before+'" ':"")+(n.after?'data-after="'+n.after+'" ':"")+(n.viewId?'data-viewId="'+n.viewId+'" ':"")+'class="dropdown-menu"><\/div>'},format:"d/M/yyyy",views:["year","month","date"],dismiss:!0,position:"relative"}).directive("dateTimeAppend",function(){return{link:function(n,t){t.bind("click",function(){t.find("input")[0].focus()})}}}).directive("dateTime",["$compile","$document","$filter","dateTimeConfig","$parse","$timeout",function(n,t,i,r,u,f){var o=t.find("body"),s=i("date"),e={date:"DD/MM/YYYY",month:"MMM YYYY",year:"YYYY"},h={date:"d/MM/yyyy",month:"MMM yyyy",year:"yyyy"};return{require:"ngModel",link:function(t,i,c,l){function ut(n){return s(n,it)}function ft(n){var t=moment(n,[e[c.minView],"YYYY-MM-DD"]);return t.isValid()?new Date(t.format("YYYY-MM-DD")):l.$modelValue}function et(n){n.stopPropagation();l.$pristine&&(l.$dirty=!0,l.$pristine=!1,i.removeClass(PRISTINE_CLASS).addClass(DIRTY_CLASS),k&&k.$setDirty(),l.$render())}function w(){p||(a&&(a.remove(),a=null),v&&(v.remove(),v=null))}function b(){if(!a){if(a=n(tt)(t),t.$digest(),t.$on("setDate",function(n){et(n);rt&&w()}),t.$on("$destroy",w),nt==="absolute"){var r=angular.extend(i.offset(),{height:i[0].offsetHeight});a.css({top:r.top+r.height,left:r.left,display:"block",position:nt});o.append(a)}else v=angular.element("<div date-picker-wrapper><\/div>"),i[0].parentElement.appendChild(v[0]),v.append(a),a.css({display:"block"}),p&&a.removeClass("dropdown-menu");a.bind("mousedown",function(n){n.preventDefault()})}}var it=c.format||h[c.minView]||r.format,k=i.inheritedData("$formController"),y=u(c.views)(t)||r.views.concat(),d=c.view||y[0],g=y.indexOf(d),rt=c.dismiss?u(c.dismiss)(t):r.dismiss,a=null,nt=c.position||r.position,v=null,p=angular.isDefined(c.pickerStayOpen),tt;t.minDate=c.minDate||!1;t.maxDate=c.maxDate||!1;g===-1&&y.splice(g,1);y.unshift(d);i.bind("blur change",function(){var n=moment(l.$viewValue,e[c.minView]);n.isValid()||t.$apply(function(){l.$setViewValue(moment(l.$modelValue).format(e[c.minView]));l.$render()})});l.$formatters.push(ut);l.$parsers.unshift(ft);c.viewId=i.attr("id");tt=r.template(c);p?f(function(){b()},1e3):(i.bind("click",b),i.bind("focus",b),i.bind("blur",w))}}}]).directive("dateSingleInput",function(){return{restrict:"A",template:'<input name="{{dateId}}" id="{{dateId}}" class="form-control"                 date-time                 type="datetime"                 ng-model="dateSingleInput"                 max-view="year"                 min-view="date"                 min-date="{{dateMin}}"                 max-date="{{dateMax}}"                 view="date"                 placeholder="dd/mm/yyyy"                 ng-show="!isMobile"                 validator="{{!isMobile ? \'required, minDate, maxDate\' : \'required\'}}"                 min-date-error-message="{{dateMinValidationMsg}}"                 max-date-error-message="{{dateMaxValidationMsg}}"                 autocapitalize="off"                 autocorrect="off"                 autocomplete="off">                 <input type="date" class="form-control-native" ng-model="dateSingleInput" ng-show="isMobile" validator="{{isMobile ? \'required, minDate, maxDate\' : \'required\'}}"                    min-date-error-message="{{dateMinValidationMsg}}"                     max-date-error-message="{{dateMaxValidationMsg}}"                     min-date="{{dateMin}}"                     max-date="{{dateMax}}"                     autocapitalize="off"                     autocorrect="off"                     autocomplete="off">',scope:{dateSingleInput:"=",dateSingleInputChange:"=",dateId:"@",dateMinValidationMsg:"@",dateMaxValidationMsg:"@",dateMin:"=",dateMax:"="},controller:["$scope","$attrs",function(n,t){n.isMobile=hasHtml5Date();n.$watch("dateSingleInput",function(t,i){n.dateSingleInputChange&&n.dateSingleInputChange(t,i)},!0);n.type=t.type||"date"}]}}).directive("dateRangeInputs",function(){return{template:'<div class="form-group form-datepicker-from">                            <label for="'+FROM_DATEPICKER+'" class="sr-only">From<\/label>                            <input id="'+FROM_DATEPICKER+'" class="form-control"                                date-time                                ng-model="start"                                data-after="start"                                type="datetime"                                data-before="end"                                max-view="year"                                min-view="{{type}}"                                min-date="{{dateMin}}"                                 max-date="{{dateMax}}"                                 view="{{type}}"                                range="true"                                ng-show="!isMobile"                                 autocapitalize="off"                                 autocorrect="off"                                 autocomplete="off">                            <input type="date" class="form-control-native" ng-model="start" ng-show="isMobile"                                 autocapitalize="off"                                 autocorrect="off"                                 autocomplete="off">                        <\/div>                        <div class="form-group form-datepicker-to">                            <label for="date-to"> to <\/label>                            <input id="date-to" class="form-control"                                type="datetime"                                date-time                                ng-model="end"                                data-after="start"                                data-before="end"                                max-view="year"                                min-view="{{type}}"                                min-date="{{dateMin}}"                                 max-date="{{dateMax}}"                                 view="{{type}}"                                range="true"                                ng-show="!isMobile"                                 autocapitalize="off"                                 autocorrect="off"                                 autocomplete="off">                            <input type="date" class="form-control-native" ng-model="end" ng-show="isMobile"                                 autocapitalize="off"                                 autocorrect="off"                                 autocomplete="off">                        <\/div>',scope:{start:"=",end:"=",dateMin:"=",dateMax:"=",dateNotBefore:"="},controller:["$scope","$attrs",function(n,t){n.range=!0;n.isMobile=hasHtml5Date();n.type=t.type||"date";n.$watch("start.getTime()",function(t){t&&n.end&&(t>n.end.getTime()&&(n.end=new Date(t)),n.minDate===!1&&(n.minDate=n.dateNotBefore!==undefined?n.dateNotBefore:n.start))});n.$watch("end.getTime()",function(t){t&&t>0&&n.start&&t<n.start.getTime()&&(n.start=new Date(t),n.minDate=n.start)})}]}}).directive("dateRangePlus",function(){var n="[dateRangePlus]";return{template:'<button class="btn btn-default btn-white btn-toggle" type="button" id="filter-date-range" ng-click="toggle()">                            <i class="fa fa-fw fa-lg fa-calendar"><\/i> {{filters.fromDate | date:\'d MMM yy\'}} - {{filters.toDate | date:\'d MMM yy\'}} <span class="caret"><\/span>                        <\/button>                        <div class="cnct-daterange-panel fx-fade" ng-show="open">                            <ul class="cnct-daterange-presets no-list pull-left">                                <li ng-class="{active: currentRange == 0}"><a href="javascript:;" ng-click="setRange(0)">Last 3 months<\/a><\/li>                                <li ng-class="{active: currentRange == 1}"><a href="javascript:;" ng-click="setRange(1)">Last 6 months<\/a><\/li>                                <li ng-class="{active: currentRange == 2}"><a href="javascript:;" ng-click="setRange(2)">Last 12 months<\/a><\/li>                                <li ng-class="{active: currentRange == 3}"><a href="javascript:;" ng-click="setRange(3)">This financial year<\/a><\/li>                                <li ng-class="{active: currentRange == 4}"><a href="javascript:;" ng-click="setRange(4)">Last financial year<\/a><\/li>                                <li ng-class="{active: currentRange == -1}"><a href="javascript:;" ng-click="setRange(-1)">Custom range<\/a><\/li>                            <\/ul>                            <div class="form-group form-datepicker-from form-datepicker-plus">                                        <label for="'+FROM_DATEPICKER+'">From<\/label>                                        <input id="date-to" class="form-control"                                            date-time                                            type="datetime"                                            filters="filters"                                            filters-field="fromDate"                                            ng-model="fromDate"                                            data-after="filters.fromDate"                                            data-before="filters.toDate"                                            max-view="year"                                            min-view="date"                                            min-date="{{dateMin}}"                                             max-date="{{dateMax}}"                                             format="d/MM/yyyy"                                            view="date"                                            picker-stay-open                                            range="true"                                            ng-show="!isMobile"                                             autocapitalize="off"                                             autocorrect="off"                                             autocomplete="off">                                        <input type="date" class="form-control-native" ng-model="fromDate" ng-show="isMobile" ng-change="applyFilter()"                                            autocapitalize="off"                                             autocorrect="off"                                             autocomplete="off">                                    <\/div>                                    <div class="form-group form-datepicker-to form-datepicker-plus">                                        <label for="date-to">To<\/label>                                        <input id="date-to" class="form-control"                                            date-time                                            type="datetime"                                            filters="filters"                                            filters-field="toDate"                                            ng-model="toDate"                                            data-after="filters.fromDate"                                            data-before="filters.toDate"                                            max-view="year"                                            min-view="date"                                            min-date="{{dateMin}}"                                             max-date="{{dateMax}}"                                             format="d/MM/yyyy"                                            view="date"                                            picker-stay-open                                            range="true"                                            ng-show="!isMobile"                                             autocapitalize="off"                                             autocorrect="off"                                             autocomplete="off">                                        <input type="date" class="form-control-native" ng-model="toDate" ng-show="isMobile" ng-change="applyFilter()"                                            autocapitalize="off"                                             autocorrect="off"                                             autocomplete="off">                                    <\/div>                                <\/div>',scope:{filters:"=",fromDate:"=filtersStart",toDate:"=filtersEnd",dateMin:"=",dateMax:"="},link:function(n){var i=$("body"),t=".cnct-daterange";i.off(t).on("click"+t,function(i){n.open&&$(i.target).parents(t).length===0&&(i.preventDefault(),n.toggle(!1))});n.$on("$destroy",function(){i.off(t)})},controller:["$scope","$attrs","$log","$timeout",function(t,i,r,u){t.range=!0;t.isMobile=hasHtml5Date();t.open=!1;t.currentRange=-1;t.type=i.type||"date";t.$watch("fromDate.getTime()",function(i,u){i&&t.toDate&&t.toDate.getTime&&i>t.toDate.getTime()&&(t.toDate=new Date(i),r.warn(n,"RESET fromDate as it was greater than toDate",new Date(i)));t.open&&!moment(i).isSame(u)&&t.$broadcast("filters.apply","fromDate")},!0);t.$watch("toDate.getTime()",function(i,u){i&&i>0&&t.fromDate&&t.fromDate.getTime&&i<t.fromDate.getTime()&&(t.fromDate=new Date(i),r.warn(n,"RESET toDate as it was less than fromDate",new Date(i)));t.open&&!moment(i).isSame(u)&&t.$broadcast("filters.apply","toDate")},!0);t.setRange=function(n){t.currentRange=n;n<0||(t.filters.fromDate=new Date(t.ranges[n].from),t.filters.toDate=new Date(t.ranges[n].to))};t.toggle=function(n){u(function(){t.open=angular.isDefined(n)?n:!t.open})};t.ranges=[{name:"Last 3 months",from:moment().subtract(3,"M"),to:moment()},{name:"Last 6 months",from:moment().subtract(6,"M"),to:moment()},{name:"Last 12 months",from:moment().subtract(12,"M"),to:moment()},{name:"This financial year",from:moment().quarter()>=3?moment().month("July").startOf("month"):moment().subtract(1,"year").month("July").startOf("month"),to:moment().quarter()>=3?moment().add(1,"year").month("June").endOf("month"):moment().month("June").endOf("month")},{name:"Last financial year",from:moment().quarter()>=3?moment().month("July").subtract(1,"year").startOf("month"):moment().subtract(2,"year").month("July").startOf("month"),to:moment().quarter()>=3?moment().month("June").endOf("month"):moment().subtract(1,"year").month("June").endOf("month")}]}]}});angular.module("lr.upload",["lr.upload.formdata","lr.upload.iframe","lr.upload.directives"]);angular.module("lr.upload.directives",[]);angular.module("lr.upload.directives").directive("uploadButton",["upload",function(n){return{restrict:"EA",scope:{data:"=?data",url:"@",param:"@",method:"@",onUpload:"&",onSuccess:"&",onError:"&",onComplete:"&"},link:function(t,i,r){var e=angular.element(i),u=angular.element('<input type="file" />'),f;e.append(u);u.on("change",function(){var f,i;u[0].files&&u[0].files.length===0||(f={url:t.url,method:t.method||"POST",forceIFrameUpload:t.$eval(r.forceIframeUpload)||!1,data:t.data||{}},f.data[t.param||"file"]=u,i=!0,t.$apply(function(){i=t.onUpload({files:u[0].files})}),i||i===undefined?n(f).then(function(n){t.onSuccess({response:n});t.onComplete({response:n})},function(n){t.onError({response:n});t.onComplete({response:n})}):u.val(null))});"required"in r&&r.$observe("required",function(n){var r=n===""?!0:t.$eval(n);u.attr("required",r);i.toggleClass("ng-valid",!r);i.toggleClass("ng-invalid ng-invalid-required",r)});"accept"in r&&r.$observe("accept",function(n){u.attr("accept",n)});n.support.formData&&(f=function(){u.attr("multiple",!!(t.$eval(r.multiple)&&!t.$eval(r.forceIframeUpload)))},r.$observe("multiple",f),r.$observe("forceIframeUpload",f))}}}]);angular.module("lr.upload.formdata",[]).factory("formDataTransform",function(){return function(n){var t=new FormData;return angular.forEach(n,function(n,i){if(angular.isElement(n)){var r=[];angular.forEach(n,function(n){angular.forEach(n.files,function(n){r.push(n)})});r.length!==0&&(r.length>1?angular.forEach(r,function(n,r){t.append(i+"["+r+"]",n)}):t.append(i,r[0]))}else t.append(i,n)}),t}}).factory("formDataUpload",["$http","formDataTransform",function(n,t){return function(i){return i.transformRequest=t,i.headers=angular.extend(i.headers||{},{"Content-Type":undefined}),n(i)}}]);angular.module("lr.upload.iframe",[]).factory("iFrameUpload",["$q","$http","$document","$rootScope",function(n,t,i,r){function u(n,t){if(n.indexOf)return n.indexOf(t);for(var i=0;i<n.length;i++)if(t===n[i])return i;return-1}function f(f){var h=[],c=n.defer(),l=c.promise,o,e,s;angular.forEach(f.data||{},function(n,t){angular.isElement(n)&&(delete f.data[t],n.attr("name",t),h.push(n))});o=/\?/.test(f.url)?"&":"?";f.method==="DELETE"?(f.url=f.url+o+"_method=DELETE",f.method="POST"):f.method==="PUT"?(f.url=f.url+o+"_method=PUT",f.method="POST"):f.method==="PATCH"&&(f.url=f.url+o+"_method=PATCH",f.method="POST");var y=angular.element(i[0].body),a=r.$new(),v="iframe-transport-"+a.$id;a.$destroy();e=angular.element("<form><\/form>");e.attr("target",v);e.attr("action",f.url);e.attr("method",f.method||"POST");e.css("display","none");h.length&&(e.attr("enctype","multipart/form-data"),e.attr("encoding","multipart/form-data"));s=angular.element('<iframe name="'+v+'" src="javascript:false;"><\/iframe>');s.on("load",function(){function i(n,t){var i=[];return angular.isFunction(t)?t(n,i):(angular.forEach(t,function(t){n=t(n,i)}),n)}function n(){var n=u(t.pendingRequests,f);n!==-1&&(t.pendingRequests.splice(n,1),f.$iframeTransportForm.remove(),delete f.$iframeTransportForm)}s.off("load").on("load",function(){var n,r;try{if(r=this.contentWindow?this.contentWindow.document:this.contentDocument,n=angular.element(r.body).text(),!n.length)throw new Error;}catch(u){}e.append(angular.element('<iframe src="javascript:false;"><\/iframe>'));try{n=i(n,t.defaults.transformResponse)}catch(u){}c.resolve({data:n,status:200,headers:[],config:f})});angular.forEach(h,function(n){var t=n.clone(!0);n.after(t);e.append(n)});angular.forEach(f.data,function(n,t){var i=angular.element('<input type="hidden" />');i.attr("name",t);i.val(n);e.append(i)});f.$iframeTransportForm=e;t.pendingRequests.push(f);e[0].submit();l.then(n,n)});return e.append(s),y.append(e),l}return f}]);angular.module("lr.upload").factory("upload",["$window","formDataUpload","iFrameUpload",function(n,t,i){function u(n){return r.formData&&!n.forceIFrameUpload?t(n):i(n)}var r={fileInput:!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(n.navigator.userAgent)||angular.element('<input type="file">').prop("disabled")),fileUpload:!!(n.XMLHttpRequestUpload&&n.FileReader),formData:!!n.FormData};return u.support=r,u}]);angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.transition","ui.bootstrap.typeahead"]);angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-popup.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/tooltip/tooltip-template-popup.html","template/popover/popover-html.html","template/popover/popover-template.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]);angular.module("ui.bootstrap.collapse",[]).directive("collapse",["$animate",function(n){return{link:function(t,i,r){function f(){i.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1);n.addClass(i,"in",{to:{height:i[0].scrollHeight+"px"}}).then(e)}function e(){i.removeClass("collapsing");i.css({height:"auto"})}function o(){if(!i.hasClass("collapse")&&!i.hasClass("in"))return u();i.css({height:i[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0);n.removeClass(i,"in",{to:{height:"0"}}).then(u)}function u(){i.css({height:"0"});i.removeClass("collapsing");i.addClass("collapse")}t.$watch(r.collapse,function(n){n?o():f()})}}}]);angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(n,t,i){this.groups=[];this.closeOthers=function(r){var u=angular.isDefined(t.closeOthers)?n.$eval(t.closeOthers):i.closeOthers;u&&angular.forEach(this.groups,function(n){n!==r&&(n.isOpen=!1)})};this.addGroup=function(n){var t=this;this.groups.push(n);n.$on("$destroy",function(){t.removeGroup(n)})};this.removeGroup=function(n){var t=this.groups.indexOf(n);t!==-1&&this.groups.splice(t,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",controllerAs:"accordion",transclude:!0,replace:!1,templateUrl:function(n,t){return t.templateUrl||"template/accordion/accordion.html"}}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:function(n,t){return t.templateUrl||"template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(n){this.heading=n}},link:function(n,t,i,r){r.addGroup(n);n.openClass=i.openClass||"panel-open";n.panelClass=i.panelClass;n.$watch("isOpen",function(i){t.toggleClass(n.openClass,i);i&&r.closeOthers(n)});n.toggleOpen=function(t){n.isDisabled||t&&t.which!==32||(n.isOpen=!n.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(n,t,i,r,u){r.setHeading(u(n,angular.noop))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(n,t,i,r){n.$watch(function(){return r[i.accordionTransclude]},function(n){n&&(t.find("span").html(""),t.find("span").append(n))})}}});angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(n,t){n.closeable=!!t.close;this.close=n.close}]).directive("alert",function(){return{controller:"AlertController",controllerAs:"alert",templateUrl:function(n,t){return t.templateUrl||"template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}).directive("dismissOnTimeout",["$timeout",function(n){return{require:"alert",link:function(t,i,r,u){n(function(){u.close()},parseInt(r.dismissOnTimeout,10))}}}]);angular.module("ui.bootstrap.bindHtml",[]).value("$bindHtmlUnsafeSuppressDeprecated",!1).directive("bindHtmlUnsafe",["$log","$bindHtmlUnsafeSuppressDeprecated",function(n,t){return function(i,r,u){t||n.warn("bindHtmlUnsafe is now deprecated. Use ngBindHtml instead");r.addClass("ng-binding").data("$binding",u.bindHtmlUnsafe);i.$watch(u.bindHtmlUnsafe,function(n){r.html(n||"")})}}]);angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(n){this.activeClass=n.activeClass||"active";this.toggleEvent=n.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",controllerAs:"buttons",link:function(n,t,i,r){var f=r[0],u=r[1];t.find("input").css({display:"none"});u.$render=function(){t.toggleClass(f.activeClass,angular.equals(u.$modelValue,n.$eval(i.btnRadio)))};t.bind(f.toggleEvent,function(){if(!i.disabled){var r=t.hasClass(f.activeClass);(!r||angular.isDefined(i.uncheckable))&&n.$apply(function(){u.$setViewValue(r?null:n.$eval(i.btnRadio));u.$render()})}})}}}).directive("btnCheckbox",["$document",function(n){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",controllerAs:"button",link:function(t,i,r,u){function o(){return h(r.btnCheckboxTrue,!0)}function s(){return h(r.btnCheckboxFalse,!1)}function h(n,i){var r=t.$eval(n);return angular.isDefined(r)?r:i}var e=u[0],f=u[1];i.find("input").css({display:"none"});f.$render=function(){i.toggleClass(e.activeClass,angular.equals(f.$modelValue,o()))};i.bind(e.toggleEvent,function(){r.disabled||t.$apply(function(){f.$setViewValue(i.hasClass(e.activeClass)?s():o());f.$render()})});i.on("keypress",function(u){r.disabled||u.which!==32||n[0].activeElement!==i[0]||t.$apply(function(){f.$setViewValue(i.hasClass(e.activeClass)?s():o());f.$render()})})}}}]);angular.module("ui.bootstrap.carousel",[]).controller("CarouselController",["$scope","$element","$interval","$animate",function(n,t,i,r){function w(t,i,f){if(!h){if(angular.extend(t,{direction:f,active:!0}),angular.extend(u.currentSlide||{},{direction:f,active:!1}),r.enabled()&&!n.noTransition&&!n.$currentTransition&&t.$element&&u.slides.length>1)if(t.$element.data(a,t.direction),u.currentSlide&&u.currentSlide.$element&&u.currentSlide.$element.data(a,t.direction),n.$currentTransition=!0,y)r.on("addClass",t.$element,function(t,i){i==="close"&&(n.$currentTransition=null,r.off("addClass",t))});else t.$element.one("$animate:close",function(){n.$currentTransition=null});u.currentSlide=t;e=i;c()}}function v(n){if(angular.isUndefined(f[n].index))return f[n];for(var i=f.length,t=0;t<f.length;++t)if(f[t].index==n)return f[t]}function c(){l();var t=+n.interval;!isNaN(t)&&t>0&&(o=i(b,t))}function l(){o&&(i.cancel(o),o=null)}function b(){var t=+n.interval;s&&!isNaN(t)&&t>0&&f.length?n.next():n.pause()}var u=this,f=u.slides=n.slides=[],y=angular.version.minor>=4,p="uib-noTransition",a="uib-slideDirection",e=-1,o,s,h;u.currentSlide=null;h=!1;u.select=n.select=function(t,i){var r=n.indexOfSlide(t);i===undefined&&(i=r>u.getCurrentIndex()?"next":"prev");t&&t!==u.currentSlide&&!n.$currentTransition&&w(t,r,i)};n.$on("$destroy",function(){h=!0});u.getCurrentIndex=function(){return u.currentSlide&&angular.isDefined(u.currentSlide.index)?+u.currentSlide.index:e};n.indexOfSlide=function(n){return angular.isDefined(n.index)?+n.index:f.indexOf(n)};n.next=function(){var t=(u.getCurrentIndex()+1)%f.length;if(t===0&&n.noWrap()){n.pause();return}return u.select(v(t),"next")};n.prev=function(){var t=u.getCurrentIndex()-1<0?f.length-1:u.getCurrentIndex()-1;if(n.noWrap()&&t===f.length-1){n.pause();return}return u.select(v(t),"prev")};n.isActive=function(n){return u.currentSlide===n};n.$watch("interval",c);n.$on("$destroy",l);n.play=function(){s||(s=!0,c())};n.pause=function(){n.noPause||(s=!1,l())};u.addSlide=function(t,i){t.$element=i;f.push(t);f.length===1||t.active?(u.select(f[f.length-1]),f.length==1&&n.play()):t.active=!1};u.removeSlide=function(n){angular.isDefined(n.index)&&f.sort(function(n,t){return+n.index>+t.index});var t=f.indexOf(n);f.splice(t,1);f.length>0&&n.active?t>=f.length?u.select(f[t-1]):u.select(f[t]):e>t&&e--;f.length===0&&(u.currentSlide=null)};n.$watch("noTransition",function(n){t.data(p,n)})}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",controllerAs:"carousel",require:"carousel",templateUrl:function(n,t){return t.templateUrl||"template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:function(n,t){return t.templateUrl||"template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(n,t,i,r){r.addSlide(n,t);n.$on("$destroy",function(){r.removeSlide(n)});n.$watch("active",function(t){t&&r.select(n)})}}}).animation(".item",["$injector","$animate",function(n,t){function f(n,t,i){n.removeClass(t);i&&i()}var r="uib-noTransition",u="uib-slideDirection",i=null;return n.has("$animateCss")&&(i=n.get("$animateCss")),{beforeAddClass:function(n,e,o){if(e=="active"&&n.parent()&&!n.parent().data(r)){var c=!1,s=n.data(u),h=s=="next"?"left":"right",l=f.bind(this,n,h+" "+s,o);return n.addClass(s),i?i(n,{addClass:h}).start().done(l):t.addClass(n,h).then(function(){c||l();o()}),function(){c=!0}}o()},beforeRemoveClass:function(n,e,o){if(e==="active"&&n.parent()&&!n.parent().data(r)){var h=!1,l=n.data(u),s=l=="next"?"left":"right",c=f.bind(this,n,s,o);return i?i(n,{addClass:s}).start().done(c):t.addClass(n,s).then(function(){h||c();o()}),function(){h=!0}}o()}}}]);angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$log","$locale","orderByFilter",function(n,t,i){function f(n){var u=[],t=n.split("");return angular.forEach(r,function(i,r){var f=n.indexOf(r),e,o;if(f>-1){for(n=n.split(""),t[f]="("+i.regex+")",n[f]="$",e=f+1,o=f+r.length;e<o;e++)t[e]="",n[e]="$";n=n.join("");u.push({index:f,apply:i.apply})}}),{regex:new RegExp("^"+t.join("")+"$"),map:i(u,"index")}}function e(n,t,i){return i<1?!1:t===1&&i>28?i===29&&(n%4==0&&n%100!=0||n%400==0):t===3||t===5||t===8||t===10?i<31:!0}var u=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,r;this.parsers={};r={yyyy:{regex:"\\d{4}",apply:function(n){this.year=+n}},yy:{regex:"\\d{2}",apply:function(n){this.year=+n+2e3}},y:{regex:"\\d{1,4}",apply:function(n){this.year=+n}},MMMM:{regex:t.DATETIME_FORMATS.MONTH.join("|"),apply:function(n){this.month=t.DATETIME_FORMATS.MONTH.indexOf(n)}},MMM:{regex:t.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(n){this.month=t.DATETIME_FORMATS.SHORTMONTH.indexOf(n)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(n){this.month=n-1}},M:{regex:"[1-9]|1[0-2]",apply:function(n){this.month=n-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(n){this.date=+n}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(n){this.date=+n}},EEEE:{regex:t.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:t.DATETIME_FORMATS.SHORTDAY.join("|")},HH:{regex:"(?:0|1)[0-9]|2[0-3]",apply:function(n){this.hours=+n}},hh:{regex:"0[0-9]|1[0-2]",apply:function(n){this.hours=+n}},H:{regex:"1?[0-9]|2[0-3]",apply:function(n){this.hours=+n}},h:{regex:"[0-9]|1[0-2]",apply:function(n){this.hours=+n}},mm:{regex:"[0-5][0-9]",apply:function(n){this.minutes=+n}},m:{regex:"[0-9]|[1-5][0-9]",apply:function(n){this.minutes=+n}},sss:{regex:"[0-9][0-9][0-9]",apply:function(n){this.milliseconds=+n}},ss:{regex:"[0-5][0-9]",apply:function(n){this.seconds=+n}},s:{regex:"[0-9]|[1-5][0-9]",apply:function(n){this.seconds=+n}},a:{regex:t.DATETIME_FORMATS.AMPMS.join("|"),apply:function(n){this.hours===12&&(this.hours=0);n==="PM"&&(this.hours+=12)}}};this.parse=function(i,r,o){var s,v,h,y,l;if(!angular.isString(i)||!r)return i;r=t.DATETIME_FORMATS[r]||r;r=r.replace(u,"\\$&");this.parsers[r]||(this.parsers[r]=f(r));var a=this.parsers[r],p=a.regex,w=a.map,c=i.match(p);if(c&&c.length){for(angular.isDate(o)&&!isNaN(o.getTime())?s={year:o.getFullYear(),month:o.getMonth(),date:o.getDate(),hours:o.getHours(),minutes:o.getMinutes(),seconds:o.getSeconds(),milliseconds:o.getMilliseconds()}:(o&&n.warn("dateparser:","baseDate is not a valid date"),s={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0}),h=1,y=c.length;h<y;h++)l=w[h-1],l.apply&&l.apply.call(s,c[h]);return e(s.year,s.month,s.date)&&(v=new Date(s.year,s.month,s.date,s.hours,s.minutes,s.seconds,s.milliseconds||0)),v}}}]);angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(n,t){function i(n,i){return n.currentStyle?n.currentStyle[i]:t.getComputedStyle?t.getComputedStyle(n)[i]:n.style[i]}function r(n){return(i(n,"position")||"static")==="static"}var u=function(t){for(var u=n[0],i=t.offsetParent||u;i&&i!==u&&r(i);)i=i.offsetParent;return i||u};return{position:function(t){var e=this.offset(t),r={top:0,left:0},i=u(t[0]),f;return i!=n[0]&&(r=this.offset(angular.element(i)),r.top+=i.clientTop-i.scrollTop,r.left+=i.clientLeft-i.scrollLeft),f=t[0].getBoundingClientRect(),{width:f.width||t.prop("offsetWidth"),height:f.height||t.prop("offsetHeight"),top:e.top-r.top,left:e.left-r.left}},offset:function(i){var r=i[0].getBoundingClientRect();return{width:r.width||i.prop("offsetWidth"),height:r.height||i.prop("offsetHeight"),top:r.top+(t.pageYOffset||n[0].documentElement.scrollTop),left:r.left+(t.pageXOffset||n[0].documentElement.scrollLeft)}},positionElements:function(n,t,i,r){var a=i.split("-"),h=a[0],e=a[1]||"center",u,c,l,f,o,s;u=r?this.offset(n):this.position(n);c=t.prop("offsetWidth");l=t.prop("offsetHeight");o={center:function(){return u.left+u.width/2-c/2},left:function(){return u.left},right:function(){return u.left+u.width}};s={center:function(){return u.top+u.height/2-l/2},top:function(){return u.top},bottom:function(){return u.top+u.height}};switch(h){case"right":f={top:s[e](),left:o[h]()};break;case"left":f={top:s[e](),left:u.left-c};break;case"bottom":f={top:s[h](),left:o[e]()};break;default:f={top:u.top-l,left:o[e]()}}return f}}}]);angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null,shortcutPropagation:!1}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","datepickerConfig","$datepickerSuppressError",function(n,t,i,r,u,f,e,o){var s=this,h={$setViewValue:angular.noop},c;this.modes=["day","month","year"];angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRange","shortcutPropagation"],function(i,u){s[i]=angular.isDefined(t[i])?u<6?r(t[i])(n.$parent):n.$parent.$eval(t[i]):e[i]});angular.forEach(["minDate","maxDate"],function(r){t[r]?n.$parent.$watch(i(t[r]),function(n){s[r]=n?new Date(n):null;s.refreshView()}):s[r]=e[r]?new Date(e[r]):null});angular.forEach(["minMode","maxMode"],function(r){t[r]?n.$parent.$watch(i(t[r]),function(i){s[r]=angular.isDefined(i)?i:t[r];n[r]=s[r];(r=="minMode"&&s.modes.indexOf(n.datepickerMode)<s.modes.indexOf(s[r])||r=="maxMode"&&s.modes.indexOf(n.datepickerMode)>s.modes.indexOf(s[r]))&&(n.datepickerMode=s[r])}):(s[r]=e[r]||null,n[r]=s[r])});n.datepickerMode=n.datepickerMode||e.datepickerMode;n.uniqueId="datepicker-"+n.$id+"-"+Math.floor(Math.random()*1e4);angular.isDefined(t.initDate)?(this.activeDate=n.$parent.$eval(t.initDate)||new Date,n.$parent.$watch(t.initDate,function(n){n&&(h.$isEmpty(h.$modelValue)||h.$invalid)&&(s.activeDate=n,s.refreshView())})):this.activeDate=new Date;n.isActive=function(t){return s.compare(t.date,s.activeDate)===0?(n.activeDateId=t.uid,!0):!1};this.init=function(n){h=n;h.$render=function(){s.render()}};this.render=function(){if(h.$viewValue){var n=new Date(h.$viewValue),t=!isNaN(n);t?this.activeDate=n:o||u.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')}this.refreshView()};this.refreshView=function(){if(this.element){this._refreshView();var n=h.$viewValue?new Date(h.$viewValue):null;h.$setValidity("dateDisabled",!n||this.element&&!this.isDisabled(n))}};this.createDateObject=function(n,t){var i=h.$viewValue?new Date(h.$viewValue):null;return{date:n,label:f(n,t),selected:i&&this.compare(n,i)===0,disabled:this.isDisabled(n),current:this.compare(n,new Date)===0,customClass:this.customClass(n)}};this.isDisabled=function(i){return this.minDate&&this.compare(i,this.minDate)<0||this.maxDate&&this.compare(i,this.maxDate)>0||t.dateDisabled&&n.dateDisabled({date:i,mode:n.datepickerMode})};this.customClass=function(t){return n.customClass({date:t,mode:n.datepickerMode})};this.split=function(n,t){for(var i=[];n.length>0;)i.push(n.splice(0,t));return i};this.fixTimeZone=function(n){var t=n.getHours();n.setHours(t===23?t+2:0)};n.select=function(t){if(n.datepickerMode===s.minMode){var i=h.$viewValue?new Date(h.$viewValue):new Date(0,0,0,0,0,0,0);i.setFullYear(t.getFullYear(),t.getMonth(),t.getDate());h.$setViewValue(i);h.$render()}else s.activeDate=t,n.datepickerMode=s.modes[s.modes.indexOf(n.datepickerMode)-1]};n.move=function(n){var t=s.activeDate.getFullYear()+n*(s.step.years||0),i=s.activeDate.getMonth()+n*(s.step.months||0);s.activeDate.setFullYear(t,i,1);s.refreshView()};n.toggleMode=function(t){(t=t||1,(n.datepickerMode!==s.maxMode||t!==1)&&(n.datepickerMode!==s.minMode||t!==-1))&&(n.datepickerMode=s.modes[s.modes.indexOf(n.datepickerMode)+t])};n.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};c=function(){s.element[0].focus()};n.$on("datepicker.focus",c);n.keydown=function(t){var i=n.keys[t.which];if(i&&!t.shiftKey&&!t.altKey)if(t.preventDefault(),s.shortcutPropagation||t.stopPropagation(),i==="enter"||i==="space"){if(s.isDisabled(s.activeDate))return;n.select(s.activeDate);c()}else t.ctrlKey&&(i==="up"||i==="down")?(n.toggleMode(i==="up"?1:-1),c()):(s.handleKeyDown(i,t),s.refreshView())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:function(n,t){return t.templateUrl||"template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["datepicker","^ngModel"],controller:"DatepickerController",controllerAs:"datepicker",link:function(n,t,i,r){var u=r[0],f=r[1];u.init(f)}}}).directive("daypicker",["dateFilter",function(n){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(t,i,r,u){function f(n,t){return t===1&&n%4==0&&(n%100!=0||n%400==0)?29:e[t]}function o(n,t){for(var f=new Array(t),i=new Date(n),e=0,r;e<t;)r=new Date(i),u.fixTimeZone(r),f[e++]=r,i.setDate(i.getDate()+1);return f}function s(n){var t=new Date(n),i;return t.setDate(t.getDate()+4-(t.getDay()||7)),i=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((i-t)/864e5)/7)+1}t.showWeeks=u.showWeeks;u.step={months:1};u.element=i;var e=[31,28,31,30,31,30,31,31,30,31,30,31];u._refreshView=function(){var w=u.activeDate.getFullYear(),c=u.activeDate.getMonth(),l=new Date(w,c,1),h=u.startingDay-l.getDay(),a=h>0?7-h:-h,v=new Date(l),i,r,f,y,p,e;for(a>0&&v.setDate(-a+1),i=o(v,42),r=0;r<42;r++)i[r]=angular.extend(u.createDateObject(i[r],u.formatDay),{secondary:i[r].getMonth()!==c,uid:t.uniqueId+"-"+r});for(t.labels=new Array(7),f=0;f<7;f++)t.labels[f]={abbr:n(i[f].date,u.formatDayHeader),full:n(i[f].date,"EEEE")};if(t.title=n(u.activeDate,u.formatDayTitle),t.rows=u.split(i,7),t.showWeeks)for(t.weekNumbers=[],y=(11-u.startingDay)%7,p=t.rows.length,e=0;e<p;e++)t.weekNumbers.push(s(t.rows[e][y].date))};u.compare=function(n,t){return new Date(n.getFullYear(),n.getMonth(),n.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())};u.handleKeyDown=function(n){var t=u.activeDate.getDate(),i;n==="left"?t=t-1:n==="up"?t=t-7:n==="right"?t=t+1:n==="down"?t=t+7:n==="pageup"||n==="pagedown"?(i=u.activeDate.getMonth()+(n==="pageup"?-1:1),u.activeDate.setMonth(i,1),t=Math.min(f(u.activeDate.getFullYear(),u.activeDate.getMonth()),t)):n==="home"?t=1:n==="end"&&(t=f(u.activeDate.getFullYear(),u.activeDate.getMonth()));u.activeDate.setDate(t)};u.refreshView()}}}]).directive("monthpicker",["dateFilter",function(n){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/month.html",require:"^datepicker",link:function(t,i,r,u){u.step={years:1};u.element=i;u._refreshView=function(){for(var f=new Array(12),e=u.activeDate.getFullYear(),r,i=0;i<12;i++)r=new Date(e,i,1),u.fixTimeZone(r),f[i]=angular.extend(u.createDateObject(r,u.formatMonth),{uid:t.uniqueId+"-"+i});t.title=n(u.activeDate,u.formatMonthTitle);t.rows=u.split(f,3)};u.compare=function(n,t){return new Date(n.getFullYear(),n.getMonth())-new Date(t.getFullYear(),t.getMonth())};u.handleKeyDown=function(n){var t=u.activeDate.getMonth(),i;n==="left"?t=t-1:n==="up"?t=t-3:n==="right"?t=t+1:n==="down"?t=t+3:n==="pageup"||n==="pagedown"?(i=u.activeDate.getFullYear()+(n==="pageup"?-1:1),u.activeDate.setFullYear(i)):n==="home"?t=0:n==="end"&&(t=11);u.activeDate.setMonth(t)};u.refreshView()}}}]).directive("yearpicker",["dateFilter",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(n,t,i,r){function f(n){return parseInt((n-1)/u,10)*u+1}var u=r.yearRange;r.step={years:u};r.element=t;r._refreshView=function(){for(var i=new Array(u),e,t=0,o=f(r.activeDate.getFullYear());t<u;t++)e=new Date(o+t,0,1),r.fixTimeZone(e),i[t]=angular.extend(r.createDateObject(e,r.formatYear),{uid:n.uniqueId+"-"+t});n.title=[i[0].label,i[u-1].label].join(" - ");n.rows=r.split(i,5)};r.compare=function(n,t){return n.getFullYear()-t.getFullYear()};r.handleKeyDown=function(n){var t=r.activeDate.getFullYear();n==="left"?t=t-1:n==="up"?t=t-5:n==="right"?t=t+1:n==="down"?t=t+5:n==="pageup"||n==="pagedown"?t+=(n==="pageup"?-1:1)*r.step.years:n==="home"?t=f(r.activeDate.getFullYear()):n==="end"&&(t=f(r.activeDate.getFullYear())+u-1);r.activeDate.setFullYear(t)};r.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"template/datepicker/popup.html",datepickerTemplateUrl:"template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0,onOpenFocus:!0}).directive("datepickerPopup",["$compile","$parse","$document","$rootScope","$position","dateFilter","dateParser","datepickerPopupConfig","$timeout",function(n,t,i,r,u,f,e,o,s){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(h,c,l,a){function it(n){return n.replace(/([A-Z])/g,function(n){return"-"+n.toLowerCase()})}function ot(n){if(angular.isNumber(n)&&(n=new Date(n)),n){if(angular.isDate(n)&&!isNaN(n))return n;if(angular.isString(n)){var t=e.parse(n,v,h.date);return isNaN(t)?undefined:t}return undefined}return null}function st(n,t){var i=n||t,r;return!l.ngRequired&&!i?!0:(angular.isNumber(i)&&(i=new Date(i)),i?angular.isDate(i)&&!isNaN(i)?!0:angular.isString(i)?(r=e.parse(i,v),!isNaN(r)):!1:!0)}var v,rt=angular.isDefined(l.closeOnDateSelection)?h.$parent.$eval(l.closeOnDateSelection):o.closeOnDateSelection,tt=angular.isDefined(l.datepickerAppendToBody)?h.$parent.$eval(l.datepickerAppendToBody):o.appendToBody,ut=angular.isDefined(l.onOpenFocus)?h.$parent.$eval(l.onOpenFocus):o.onOpenFocus,ft=angular.isDefined(l.datepickerPopupTemplateUrl)?l.datepickerPopupTemplateUrl:o.datepickerPopupTemplateUrl,et=angular.isDefined(l.datepickerTemplateUrl)?l.datepickerTemplateUrl:o.datepickerTemplateUrl,g={},b,p,y,w,k,nt,d;if(h.showButtonBar=angular.isDefined(l.showButtonBar)?h.$parent.$eval(l.showButtonBar):o.showButtonBar,h.getText=function(n){return h[n+"Text"]||o[n+"Text"]},h.isDisabled=function(n){return n==="today"&&(n=new Date),h.watchData.minDate&&h.compare(n,g.minDate)<0||h.watchData.maxDate&&h.compare(n,g.maxDate)>0},h.compare=function(n,t){return new Date(n.getFullYear(),n.getMonth(),n.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())},b=!1,o.html5Types[l.type]?(v=o.html5Types[l.type],b=!0):(v=l.datepickerPopup||o.datepickerPopup,l.$observe("datepickerPopup",function(n){var t=n||o.datepickerPopup;if(t!==v&&(v=t,a.$modelValue=null,!v))throw new Error("datepickerPopup must have a date format specified.");})),!v)throw new Error("datepickerPopup must have a date format specified.");if(b&&l.datepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");p=angular.element("<div datepicker-popup-wrap><div datepicker><\/div><\/div>");p.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":ft});y=angular.element(p.children()[0]);y.attr("template-url",et);b&&l.type==="month"&&(y.attr("datepicker-mode",'"month"'),y.attr("min-mode","month"));l.datepickerOptions&&(w=h.$parent.$eval(l.datepickerOptions),w&&w.initDate&&(h.initDate=w.initDate,y.attr("init-date","initDate"),delete w.initDate),angular.forEach(w,function(n,t){y.attr(it(t),n)}));h.watchData={};angular.forEach(["minMode","maxMode","minDate","maxDate","datepickerMode","initDate","shortcutPropagation"],function(n){var i,r;l[n]&&(i=t(l[n]),h.$parent.$watch(i,function(t){h.watchData[n]=t;(n==="minDate"||n==="maxDate")&&(g[n]=new Date(t))}),y.attr(it(n),"watchData."+n),n==="datepickerMode"&&(r=i.assign,h.$watch("watchData."+n,function(n,t){angular.isFunction(r)&&n!==t&&r(h.$parent,n)})))});l.dateDisabled&&y.attr("date-disabled","dateDisabled({ date: date, mode: mode })");l.showWeeks&&y.attr("show-weeks",l.showWeeks);l.customClass&&y.attr("custom-class","customClass({ date: date, mode: mode })");b?a.$formatters.push(function(n){return h.date=n,n}):(a.$$parserName="date",a.$validators.date=st,a.$parsers.unshift(ot),a.$formatters.push(function(n){return h.date=n,a.$isEmpty(n)?n:f(n,v)}));h.dateSelection=function(n){angular.isDefined(n)&&(h.date=n);var t=h.date?f(h.date,v):null;c.val(t);a.$setViewValue(t);rt&&(h.isOpen=!1,c[0].focus())};a.$viewChangeListeners.push(function(){h.date=e.parse(a.$viewValue,v,h.date)});k=function(n){!h.isOpen||c[0].contains(n.target)||p[0].contains(n.target)||h.$apply(function(){h.isOpen=!1})};nt=function(n){n.which===27&&h.isOpen?(n.preventDefault(),n.stopPropagation(),h.$apply(function(){h.isOpen=!1}),c[0].focus()):n.which!==40||h.isOpen||(n.preventDefault(),n.stopPropagation(),h.$apply(function(){h.isOpen=!0}))};c.bind("keydown",nt);h.keydown=function(n){n.which===27&&(h.isOpen=!1,c[0].focus())};h.$watch("isOpen",function(n){n?(h.position=tt?u.offset(c):u.position(c),h.position.top=h.position.top+c.prop("offsetHeight"),s(function(){ut&&h.$broadcast("datepicker.focus");i.bind("click",k)},0,!1)):i.unbind("click",k)});h.select=function(n){if(n==="today"){var t=new Date;angular.isDate(h.date)?(n=new Date(h.date),n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate())):n=new Date(t.setHours(0,0,0,0))}h.dateSelection(n)};h.close=function(){h.isOpen=!1;c[0].focus()};d=n(p)(h);p.remove();tt?i.find("body").append(d):c.after(d);h.$on("$destroy",function(){h.isOpen===!0&&(r.$$phase||h.$apply(function(){h.isOpen=!1}));d.remove();c.unbind("keydown",nt);i.unbind("click",k)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:function(n,t){return t.templateUrl||"template/datepicker/popup.html"}}});angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document","$rootScope",function(n,t){var i=null,r,u;this.open=function(t){i||(n.bind("click",r),n.bind("keydown",u));i&&i!==t&&(i.isOpen=!1);i=t};this.close=function(t){i===t&&(i=null,n.unbind("click",r),n.unbind("keydown",u))};r=function(n){var r,u;i&&(n&&i.getAutoClose()==="disabled"||(r=i.getToggleElement(),n&&r&&r[0].contains(n.target))||(u=i.getDropdownElement(),n&&i.getAutoClose()==="outsideClick"&&u&&u[0].contains(n.target))||(i.isOpen=!1,t.$$phase||i.$apply()))};u=function(n){n.which===27?(i.focusToggleElement(),r()):i.isKeynavEnabled()&&/(38|40)/.test(n.which)&&i.isOpen&&(n.preventDefault(),n.stopPropagation(),i.focusDropdownEntry(n.which))}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate","$position","$document","$compile","$templateRequest",function(n,t,i,r,u,f,e,o,s,h){var c=this,l=n.$new(),a,d=r.openClass,y,p=angular.noop,g=t.onToggle?i(t.onToggle):angular.noop,v=!1,b=!1,w=o.find("body"),k;this.init=function(r){if(c.$element=r,t.isOpen&&(y=i(t.isOpen),p=y.assign,n.$watch(y,function(n){l.isOpen=!!n})),v=angular.isDefined(t.dropdownAppendToBody),b=angular.isDefined(t.keyboardNav),v&&c.dropdownMenu){w.append(c.dropdownMenu);w.addClass("dropdown");r.on("$destroy",function(){c.dropdownMenu.remove()})}};this.toggle=function(n){return l.isOpen=arguments.length?!!n:!l.isOpen};this.isOpen=function(){return l.isOpen};l.getToggleElement=function(){return c.toggleElement};l.getAutoClose=function(){return t.autoClose||"always"};l.getElement=function(){return c.$element};l.isKeynavEnabled=function(){return b};l.focusDropdownEntry=function(n){var t=c.dropdownMenu?angular.element(c.dropdownMenu).find("a"):angular.element(c.$element).find("ul").eq(0).find("a");switch(n){case 40:c.selectedOption=angular.isNumber(c.selectedOption)?c.selectedOption===t.length-1?c.selectedOption:c.selectedOption+1:0;break;case 38:c.selectedOption=angular.isNumber(c.selectedOption)?c.selectedOption===0?0:c.selectedOption-1:t.length-1}t[c.selectedOption].focus()};l.getDropdownElement=function(){return c.dropdownMenu};l.focusToggleElement=function(){c.toggleElement&&c.toggleElement[0].focus()};l.$watch("isOpen",function(t,i){var b,y;if(v&&c.dropdownMenu){var o=e.positionElements(c.$element,c.dropdownMenu,"bottom-left",!0),r={top:o.top+"px",display:t?"block":"none"},k=c.dropdownMenu.hasClass("dropdown-menu-right");k?(r.left="auto",r.right=window.innerWidth-(o.left+c.$element.prop("offsetWidth"))+"px"):(r.left=o.left+"px",r.right="auto");c.dropdownMenu.css(r)}b=v?w:c.$element;f[t?"addClass":"removeClass"](b,d).then(function(){angular.isDefined(t)&&t!==i&&g(n,{open:!!t})});t?(c.dropdownMenuTemplateUrl&&h(c.dropdownMenuTemplateUrl).then(function(n){a=l.$new();s(n.trim())(a,function(n){var t=n;c.dropdownMenu.replaceWith(t);c.dropdownMenu=t})}),l.focusToggleElement(),u.open(l)):(c.dropdownMenuTemplateUrl&&(a&&a.$destroy(),y=angular.element('<ul class="dropdown-menu"><\/ul>'),c.dropdownMenu.replaceWith(y),c.dropdownMenu=y),u.close(l),c.selectedOption=null);angular.isFunction(p)&&p(n,t)});n.$on("$locationChangeSuccess",function(){l.getAutoClose()!=="disabled"&&(l.isOpen=!1)});k=n.$on("$destroy",function(){l.$destroy()});l.$on("$destroy",k)}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(n,t,i,r){r.init(t);t.addClass("dropdown")}}}).directive("dropdownMenu",function(){return{restrict:"AC",require:"?^dropdown",link:function(n,t,i,r){if(r){var u=i.templateUrl;u&&(r.dropdownMenuTemplateUrl=u);r.dropdownMenu||(r.dropdownMenu=t)}}}}).directive("keyboardNav",function(){return{restrict:"A",require:"?^dropdown",link:function(n,t,i,r){t.bind("keydown",function(n){if([38,40].indexOf(n.which)!==-1){n.preventDefault();n.stopPropagation();var t=r.dropdownMenu.find("a");switch(n.which){case 40:r.selectedOption=angular.isNumber(r.selectedOption)?r.selectedOption===t.length-1?r.selectedOption:r.selectedOption+1:0;break;case 38:r.selectedOption=angular.isNumber(r.selectedOption)?r.selectedOption===0?0:r.selectedOption-1:t.length-1}t[r.selectedOption].focus()}})}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(n,t,i,r){if(r){t.addClass("dropdown-toggle");r.toggleElement=t;var u=function(u){u.preventDefault();t.hasClass("disabled")||i.disabled||n.$apply(function(){r.toggle()})};t.bind("click",u);t.attr({"aria-haspopup":!0,"aria-expanded":!1});n.$watch(r.isOpen,function(n){t.attr("aria-expanded",!!n)});n.$on("$destroy",function(){t.unbind("click",u)})}}}});angular.module("ui.bootstrap.modal",[]).factory("$$stackedMap",function(){return{createNew:function(){var n=[];return{add:function(t,i){n.push({key:t,value:i})},get:function(t){for(var i=0;i<n.length;i++)if(t==n[i].key)return n[i]},keys:function(){for(var i=[],t=0;t<n.length;t++)i.push(n[t].key);return i},top:function(){return n[n.length-1]},remove:function(t){for(var r=-1,i=0;i<n.length;i++)if(t==n[i].key){r=i;break}return n.splice(r,1)[0]},removeTop:function(){return n.splice(n.length-1,1)[0]},length:function(){return n.length}}}}}).factory("$$multiMap",function(){return{createNew:function(){var n={};return{entries:function(){return Object.keys(n).map(function(t){return{key:t,value:n[t]}})},get:function(t){return n[t]},hasKey:function(t){return!!n[t]},keys:function(){return Object.keys(n)},put:function(t,i){n[t]||(n[t]=[]);n[t].push(i)},remove:function(t,i){var r=n[t],u;r&&(u=r.indexOf(i),u!==-1&&r.splice(u,1),r.length||delete n[t])}}}}}).directive("modalBackdrop",["$animate","$injector","$modalStack",function(n,t,i){function u(t,u,f){f.modalInClass&&(r?r(u,{addClass:f.modalInClass}).start():n.addClass(u,f.modalInClass),t.$on(i.NOW_CLOSING_EVENT,function(t,i){var e=i();r?r(u,{removeClass:f.modalInClass}).start().then(e):n.removeClass(u,f.modalInClass).then(e)}))}var r=null;return t.has("$animateCss")&&(r=t.get("$animateCss")),{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",compile:function(n,t){return n.addClass(t.backdropClass),u}}}]).directive("modalWindow",["$modalStack","$q","$animate","$injector",function(n,t,i,r){var u=null;return r.has("$animateCss")&&(u=r.get("$animateCss")),{restrict:"EA",scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(n,t){return t.templateUrl||"template/modal/window.html"},link:function(r,f,e){f.addClass(e.windowClass||"");r.size=e.size;r.close=function(t){var i=n.getTop();i&&i.value.backdrop&&i.value.backdrop!=="static"&&t.target===t.currentTarget&&(t.preventDefault(),t.stopPropagation(),n.dismiss(i.key,"backdrop click"))};r.$isRendered=!0;var o=t.defer();e.$observe("modalRender",function(n){n=="true"&&o.resolve()});o.promise.then(function(){var s=null,o;e.modalInClass&&(s=u?u(f,{addClass:e.modalInClass}).start():i.addClass(f,e.modalInClass),r.$on(n.NOW_CLOSING_EVENT,function(n,t){var r=t();u?u(f,{removeClass:e.modalInClass}).start().then(r):i.removeClass(f,e.modalInClass).then(r)}));t.when(s).then(function(){var n=f[0].querySelectorAll("[autofocus]");n.length?n[0].focus():f[0].focus()});o=n.getTop();o&&n.modalRendered(o.key)})}}}]).directive("modalAnimationClass",[function(){return{compile:function(n,t){t.modalAnimation&&n.addClass(t.modalAnimationClass)}}}]).directive("modalTransclude",function(){return{link:function(n,t,i,r,u){u(n.$parent,function(n){t.empty();t.append(n)})}}}).factory("$modalStack",["$animate","$timeout","$document","$compile","$rootScope","$q","$injector","$$multiMap","$$stackedMap",function(n,t,i,r,u,f,e,o,s){function w(){for(var t=-1,i=l.keys(),n=0;n<i.length;n++)l.get(i[n]).value.backdrop&&(t=n);return t}function k(n,t){var u=i.find("body").eq(0),r=l.get(n).value;l.remove(n);d(r.modalDomEl,r.modalScope,function(){var t=r.openedClass||b;p.remove(t,n);u.toggleClass(t,p.hasKey(t))});it();t&&t.focus?t.focus():u.focus()}function it(){if(v&&w()==-1){var n=a;d(v,a,function(){n=null});v=undefined;a=undefined}}function d(t,i,r){function e(){e.done||(e.done=!0,y?y(t,{event:"leave"}).start().then(function(){t.remove()}):n.leave(t),i.$destroy(),r&&r())}var u,o=null,s=function(){return u||(u=f.defer(),o=u.promise),function(){u.resolve()}};return i.$broadcast(h.NOW_CLOSING_EVENT,s),f.when(o).then(e)}function g(n,t,i){return!n.value.modalScope.$broadcast("modal.closing",t,i).defaultPrevented}var y=null;e.has("$animateCss")&&(y=e.get("$animateCss"));var b="modal-open",v,a,l=s.createNew(),p=o.createNew(),h={NOW_CLOSING_EVENT:"modal.stack.now-closing"},c,nt=0,tt="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return u.$watch(w,function(n){a&&(a.index=n)}),i.bind("keydown",function(n){var t,i;if(n.isDefaultPrevented())return n;if(t=l.top(),t&&t.value.keyboard)switch(n.which){case 27:n.preventDefault();u.$apply(function(){h.dismiss(t.key,"escape key press")});break;case 9:h.loadFocusElementList(t);i=!1;n.shiftKey?h.isFocusInFirstItem(n)&&(i=h.focusLastFocusableElement()):h.isFocusInLastItem(n)&&(i=h.focusFirstFocusableElement());i&&(n.preventDefault(),n.stopPropagation())}}),h.open=function(n,t){var k=i[0].activeElement,y=t.openedClass||b,f,s,e,o,c;l.add(n,{deferred:t.deferred,renderDeferred:t.renderDeferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard,openedClass:t.openedClass});p.put(y,n);f=i.find("body").eq(0);s=w();s>=0&&!v&&(a=u.$new(!0),a.index=s,e=angular.element('<div modal-backdrop="modal-backdrop"><\/div>'),e.attr("backdrop-class",t.backdropClass),t.animation&&e.attr("modal-animation","true"),v=r(e)(a),f.append(v));o=angular.element('<div modal-window="modal-window"><\/div>');o.attr({"template-url":t.windowTemplateUrl,"window-class":t.windowClass,size:t.size,index:l.length()-1,animate:"animate"}).html(t.content);t.animation&&o.attr("modal-animation","true");c=r(o)(t.scope);l.top().value.modalDomEl=c;l.top().value.modalOpener=k;f.append(c);f.addClass(y);h.clearFocusListCache()},h.close=function(n,t){var i=l.get(n);return i&&g(i,t,!0)?(i.value.modalScope.$$uibDestructionScheduled=!0,i.value.deferred.resolve(t),k(n,i.value.modalOpener),!0):!i},h.dismiss=function(n,t){var i=l.get(n);return i&&g(i,t,!1)?(i.value.modalScope.$$uibDestructionScheduled=!0,i.value.deferred.reject(t),k(n,i.value.modalOpener),!0):!i},h.dismissAll=function(n){for(var t=this.getTop();t&&this.dismiss(t.key,n);)t=this.getTop()},h.getTop=function(){return l.top()},h.modalRendered=function(n){var t=l.get(n);t&&t.value.renderDeferred.resolve()},h.focusFirstFocusableElement=function(){return c.length>0?(c[0].focus(),!0):!1},h.focusLastFocusableElement=function(){return c.length>0?(c[c.length-1].focus(),!0):!1},h.isFocusInFirstItem=function(n){return c.length>0?(n.target||n.srcElement)==c[0]:!1},h.isFocusInLastItem=function(n){return c.length>0?(n.target||n.srcElement)==c[c.length-1]:!1},h.clearFocusListCache=function(){c=[];nt=0},h.loadFocusElementList=function(n){if((c===undefined||!c.length0)&&n){var t=n.value.modalDomEl;t&&t.length&&(c=t[0].querySelectorAll(tt))}},h}]).provider("$modal",function(){var n={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$templateRequest","$controller","$modalStack",function(t,i,r,u,f,e){function h(n){return n.template?r.when(n.template):u(angular.isFunction(n.templateUrl)?n.templateUrl():n.templateUrl)}function c(n){var i=[];return angular.forEach(n,function(n){angular.isFunction(n)||angular.isArray(n)?i.push(r.when(t.invoke(n))):angular.isString(n)?i.push(r.when(t.get(n))):i.push(r.when(n))}),i}var s={},o=null;return s.getPromiseChain=function(){return o},s.open=function(t){var s=r.defer(),l=r.defer(),v=r.defer(),u={result:s.promise,opened:l.promise,rendered:v.promise,close:function(n){return e.close(u,n)},dismiss:function(n){return e.dismiss(u,n)}},a,y;if(t=angular.extend({},n.options,t),t.resolve=t.resolve||{},!t.template&&!t.templateUrl)throw new Error("One of template or templateUrl options is required.");return a=r.all([h(t)].concat(c(t.resolve))),y=o=r.all([o]).then(function(){return a},function(){return a}).then(function(n){var r=(t.scope||i).$new(),h,o,c;r.$close=u.close;r.$dismiss=u.dismiss;r.$on("$destroy",function(){r.$$uibDestructionScheduled||r.$dismiss("$uibUnscheduledDestruction")});o={};c=1;t.controller&&(o.$scope=r,o.$modalInstance=u,angular.forEach(t.resolve,function(t,i){o[i]=n[c++]}),h=f(t.controller,o),t.controllerAs&&(t.bindToController&&angular.extend(h,r),r[t.controllerAs]=h));e.open(u,{scope:r,deferred:s,renderDeferred:v,content:n[0],animation:t.animation,backdrop:t.backdrop,keyboard:t.keyboard,backdropClass:t.backdropClass,windowClass:t.windowClass,windowTemplateUrl:t.windowTemplateUrl,size:t.size,openedClass:t.openedClass});l.resolve(!0)},function(n){l.reject(n);s.reject(n)}).finally(function(){o===y&&(o=null)}),u},s}]};return n});angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(n,t,i){var u=this,r={$setViewValue:angular.noop},f=t.numPages?i(t.numPages).assign:angular.noop;this.init=function(e,o){r=e;this.config=o;r.$render=function(){u.render()};t.itemsPerPage?n.$parent.$watch(i(t.itemsPerPage),function(t){u.itemsPerPage=parseInt(t,10);n.totalPages=u.calculateTotalPages()}):this.itemsPerPage=o.itemsPerPage;n.$watch("totalItems",function(){n.totalPages=u.calculateTotalPages()});n.$watch("totalPages",function(t){f(n.$parent,t);n.page>t?n.selectPage(t):r.$render()})};this.calculateTotalPages=function(){var t=this.itemsPerPage<1?1:Math.ceil(n.totalItems/this.itemsPerPage);return Math.max(t||0,1)};this.render=function(){n.page=parseInt(r.$viewValue,10)||1};n.selectPage=function(t,i){i&&i.preventDefault();var u=!n.ngDisabled||!i;u&&n.page!==t&&t>0&&t<=n.totalPages&&(i&&i.target&&i.target.blur(),r.$setViewValue(t),r.$render())};n.getText=function(t){return n[t+"Text"]||u.config[t+"Text"]};n.noPrevious=function(){return n.page===1};n.noNext=function(){return n.page===n.totalPages}}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(n,t){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["pagination","?ngModel"],controller:"PaginationController",controllerAs:"pagination",templateUrl:function(n,t){return t.templateUrl||"template/pagination/pagination.html"},replace:!0,link:function(i,r,u,f){function h(n,t,i){return{number:n,text:t,active:i}}function a(n,t){var f=[],i=1,r=t,o=angular.isDefined(e)&&e<t,u,c,l,a;for(o&&(s?(i=Math.max(n-Math.floor(e/2),1),r=i+e-1,r>t&&(r=t,i=r-e+1)):(i=(Math.ceil(n/e)-1)*e+1,r=Math.min(i+e-1,t))),u=i;u<=r;u++)c=h(u,u,u===n),f.push(c);return o&&!s&&(i>1&&(l=h(i-1,"...",!1),f.unshift(l)),r<t&&(a=h(r+1,"...",!1),f.push(a))),f}var o=f[0],c=f[1],e,s,l;c&&(e=angular.isDefined(u.maxSize)?i.$parent.$eval(u.maxSize):t.maxSize,s=angular.isDefined(u.rotate)?i.$parent.$eval(u.rotate):t.rotate,i.boundaryLinks=angular.isDefined(u.boundaryLinks)?i.$parent.$eval(u.boundaryLinks):t.boundaryLinks,i.directionLinks=angular.isDefined(u.directionLinks)?i.$parent.$eval(u.directionLinks):t.directionLinks,o.init(c,t),u.maxSize&&i.$parent.$watch(n(u.maxSize),function(n){e=parseInt(n,10);o.render()}),l=o.render,o.render=function(){l();i.page>0&&i.page<=i.totalPages&&(i.pages=a(i.page,i.totalPages))})}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(n){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["pager","?ngModel"],controller:"PaginationController",controllerAs:"pagination",templateUrl:function(n,t){return t.templateUrl||"template/pagination/pager.html"},replace:!0,link:function(t,i,r,u){var e=u[0],f=u[1];f&&(t.align=angular.isDefined(r.align)?t.$parent.$eval(r.align):n.align,e.init(f,n))}}}]);angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function r(n){var t="-";return n.replace(/[A-Z]/g,function(n,i){return(i?t:"")+n.toLowerCase()})}var i={placement:"top",animation:!0,popupDelay:0,useContentExp:!1},n={mouseenter:"mouseleave",click:"click",focus:"blur",none:""},t={};this.options=function(n){angular.extend(t,n)};this.setTriggers=function(t){angular.extend(n,t)};this.$get=["$window","$compile","$timeout","$document","$position","$interpolate","$rootScope","$parse",function(u,f,e,o,s,h,c,l){return function(u,a,v,y){function b(t){var i=(t||y.trigger||v).split(" "),r=i.map(function(t){return n[t]||t});return{show:i,hide:r}}y=angular.extend({},i,t,y);var k=r(u),p=h.startSymbol(),w=h.endSymbol(),d="<div "+k+'-popup title="'+p+"title"+w+'" '+(y.useContentExp?'content-exp="contentExp()" ':'content="'+p+"content"+w+'" ')+'placement="'+p+"placement"+w+'" popup-class="'+p+"popupClass"+w+'" animation="animation" is-open="isOpen"origin-scope="origScope" ><\/div>';return{restrict:"EA",compile:function(){var n=f(d);return function(t,i,r){function ct(){f.isOpen?et():ft()}function ft(){(!vt||t.$eval(r[a+"Enable"]))&&(pt(),f.popupDelay?v||(v=e(lt,f.popupDelay,!1)):lt())}function et(){it();c.$$phase||c.$digest()}function lt(){if(v=null,w&&(e.cancel(w),w=null),!(y.useContentExp?f.contentExp():f.content))return angular.noop;yt();f.isOpen=!0;g&&g.assign(f.origScope,f.isOpen);c.$$phase||f.$apply();tt()}function it(){f.isOpen=!1;g&&g.assign(f.origScope,f.isOpen);e.cancel(v);v=null;e.cancel(d);d=null;f.animation?w||(w=e(rt,500)):rt()}function yt(){h&&rt();p=f.$new();h=n(p,function(n){nt?o.find("body").append(n):i.after(n)});y.useContentExp&&(p.$watch("contentExp()",function(n){!n&&f.isOpen&&it()}),p.$watch(function(){ut||(ut=!0,p.$$postDigest(function(){ut=!1;f.isOpen&&tt()}))}))}function rt(){w=null;h&&(h.remove(),h=null);p&&(p.$destroy(),p=null)}function pt(){wt();at();bt()}function wt(){f.popupClass=r[a+"Class"]}function at(){var n=r[a+"Placement"];f.placement=angular.isDefined(n)?n:y.placement}function bt(){var t=r[a+"PopupDelay"],n=parseInt(t,10);f.popupDelay=isNaN(n)?y.popupDelay:n}function kt(){var n=r[a+"Trigger"];ot();k=b(n);k.show!=="none"&&k.show.forEach(function(n,t){n===k.hide[t]?i[0].addEventListener(n,ct):n&&(i[0].addEventListener(n,ft),i[0].addEventListener(k.hide[t],et))})}var h,p,w,v,d,nt=angular.isDefined(y.appendToBody)?y.appendToBody:!1,k=b(undefined),vt=angular.isDefined(r[a+"Enable"]),f=t.$new(!0),ut=!1,g=angular.isDefined(r[a+"IsOpen"])?l(r[a+"IsOpen"]):!1,tt=function(){h&&(d||(d=e(function(){h.css({visibility:"hidden",display:"block",top:0,left:0,width:"auto",height:"auto"});var t=s.position(h),n=s.positionElements(i,h,f.placement,nt);n.top+="px";n.left+="px";n.width=t.width+"px";n.visibility="visible";h.css(n);d=null},0,!1)))},ot,st,ht;f.origScope=t;f.isOpen=!1;f.contentExp=function(){return t.$eval(r[u])};y.useContentExp||r.$observe(u,function(n){f.content=n;!n&&f.isOpen?it():tt()});r.$observe("disabled",function(n){v&&n&&(e.cancel(v),v=null);n&&f.isOpen&&it()});r.$observe(a+"Title",function(n){f.title=n;tt()});r.$observe(a+"Placement",function(){f.isOpen&&(at(),tt())});g&&t.$watch(g,function(n){n!==f.isOpen&&ct()});ot=function(){k.show.forEach(function(n){i.unbind(n,ft)});k.hide.forEach(function(n){i.unbind(n,et)})};kt();st=t.$eval(r[a+"Animation"]);f.animation=angular.isDefined(st)?!!st:y.animation;ht=t.$eval(r[a+"AppendToBody"]);nt=angular.isDefined(ht)?ht:nt;nt&&t.$on("$locationChangeSuccess",function(){f.isOpen&&it()});t.$on("$destroy",function(){e.cancel(w);e.cancel(v);e.cancel(d);ot();rt();f=null})}}}}}]}).directive("tooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(n,t,i,r){return{link:function(u,f,e){var a=u.$eval(e.tooltipTemplateTranscludeScope),l=0,o,s,h,c=function(){s&&(s.remove(),s=null);o&&(o.$destroy(),o=null);h&&(n.leave(h).then(function(){s=null}),s=h,h=null)};u.$watch(t.parseAsResourceUrl(e.tooltipTemplateTransclude),function(t){var e=++l;t?(r(t,!0).then(function(r){if(e===l){var u=a.$new(),s=r,v=i(s)(u,function(t){c();n.enter(t,f)});o=u;h=v;o.$emit("$includeContentLoaded",t)}},function(){e===l&&(c(),u.$emit("$includeContentError",t))}),u.$emit("$includeContentRequested",t)):c()});u.$on("$destroy",c)}}}]).directive("tooltipClasses",function(){return{restrict:"A",link:function(n,t,i){n.placement&&t.addClass(n.placement);n.popupClass&&t.addClass(n.popupClass);n.animation()&&t.addClass(i.tooltipAnimationClass)}}}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(n){return n("tooltip","tooltip","mouseenter")}]).directive("tooltipTemplatePopup",function(){return{restrict:"EA",replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/tooltip/tooltip-template-popup.html"}}).directive("tooltipTemplate",["$tooltip",function(n){return n("tooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("tooltipHtmlPopup",function(){return{restrict:"EA",replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-popup.html"}}).directive("tooltipHtml",["$tooltip",function(n){return n("tooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).value("tooltipHtmlUnsafeSuppressDeprecated",!1).directive("tooltipHtmlUnsafe",["$tooltip","tooltipHtmlUnsafeSuppressDeprecated","$log",function(n,t,i){return t||i.warn("tooltip-html-unsafe is now deprecated. Use tooltip-html or tooltip-template instead."),n("tooltipHtmlUnsafe","tooltip","mouseenter")}]);angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverTemplatePopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/popover/popover-template.html"}}).directive("popoverTemplate",["$tooltip",function(n){return n("popoverTemplate","popover","click",{useContentExp:!0})}]).directive("popoverHtmlPopup",function(){return{restrict:"EA",replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover-html.html"}}).directive("popoverHtml",["$tooltip",function(n){return n("popoverHtml","popover","click",{useContentExp:!0})}]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(n){return n("popover","popover","click")}]);angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).value("$progressSuppressWarning",!1).controller("ProgressController",["$scope","$attrs","progressConfig",function(n,t,i){var r=this,u=angular.isDefined(t.animate)?n.$parent.$eval(t.animate):i.animate;this.bars=[];n.max=angular.isDefined(n.max)?n.max:i.max;this.addBar=function(t,i){u||i.css({transition:"none"});this.bars.push(t);t.max=n.max;t.$watch("value",function(){t.recalculatePercentage()});t.recalculatePercentage=function(){t.percent=+(100*t.value/t.max).toFixed(2);var n=r.bars.reduce(function(n,t){return n+t.percent},0);n>100&&(t.percent-=n-100)};t.$on("$destroy",function(){i=null;r.removeBar(t)})};this.removeBar=function(n){this.bars.splice(this.bars.indexOf(n),1)};n.$watch("max",function(){r.bars.forEach(function(t){t.max=n.max;t.recalculatePercentage()})})}]).directive("uibProgress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"template/progressbar/progress.html"}}).directive("progress",["$log","$progressSuppressWarning",function(n,t){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{max:"=?"},templateUrl:"template/progressbar/progress.html",link:function(){t&&n.warn("progress is now deprecated. Use uib-progress instead")}}}]).directive("uibBar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(n,t,i,r){r.addBar(n,t)}}}).directive("bar",["$log","$progressSuppressWarning",function(n,t){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(i,r,u,f){t&&n.warn("bar is now deprecated. Use uib-bar instead");f.addBar(i,r)}}}]).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(n,t,i,r){r.addBar(n,angular.element(t.children()[0]))}}});angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("RatingController",["$scope","$attrs","ratingConfig",function(n,t,i){var r={$setViewValue:angular.noop};this.init=function(u){var f,e;r=u;r.$render=this.render;r.$formatters.push(function(n){return angular.isNumber(n)&&n<<0!==n&&(n=Math.round(n)),n});this.stateOn=angular.isDefined(t.stateOn)?n.$parent.$eval(t.stateOn):i.stateOn;this.stateOff=angular.isDefined(t.stateOff)?n.$parent.$eval(t.stateOff):i.stateOff;f=angular.isDefined(t.titles)?n.$parent.$eval(t.titles):i.titles;this.titles=angular.isArray(f)&&f.length>0?f:i.titles;e=angular.isDefined(t.ratingStates)?n.$parent.$eval(t.ratingStates):new Array(angular.isDefined(t.max)?n.$parent.$eval(t.max):i.max);n.range=this.buildTemplateObjects(e)};this.buildTemplateObjects=function(n){for(var t=0,i=n.length;t<i;t++)n[t]=angular.extend({index:t},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(t)},n[t]);return n};this.getTitle=function(n){return n>=this.titles.length?n+1:this.titles[n]};n.rate=function(t){!n.readonly&&t>=0&&t<=n.range.length&&(r.$setViewValue(r.$viewValue===t?0:t),r.$render())};n.enter=function(t){n.readonly||(n.value=t);n.onHover({value:t})};n.reset=function(){n.value=r.$viewValue;n.onLeave()};n.onKeydown=function(t){/(37|38|39|40)/.test(t.which)&&(t.preventDefault(),t.stopPropagation(),n.rate(n.value+(t.which===38||t.which===39?1:-1)))};this.render=function(){n.value=r.$viewValue}}]).directive("rating",function(){return{restrict:"EA",require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(n,t,i,r){var u=r[0],f=r[1];u.init(f)}}});angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(n){var i=this,t=i.tabs=n.tabs=[],r;i.select=function(n){angular.forEach(t,function(t){t.active&&t!==n&&(t.active=!1,t.onDeselect(),n.selectCalled=!1)});n.active=!0;n.selectCalled||(n.onSelect(),n.selectCalled=!0)};i.addTab=function(n){t.push(n);t.length===1&&n.active!==!1?n.active=!0:n.active?i.select(n):n.active=!1};i.removeTab=function(n){var u=t.indexOf(n),f;n.active&&t.length>1&&!r&&(f=u==t.length-1?u-1:u+1,i.select(t[f]));t.splice(u,1)};n.$on("$destroy",function(){r=!0})}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(n,t,i){n.vertical=angular.isDefined(i.vertical)?n.$parent.$eval(i.vertical):!1;n.justified=angular.isDefined(i.justified)?n.$parent.$eval(i.justified):!1}}}).directive("tab",["$parse","$log",function(n,t){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},link:function(i,r,u,f,e){i.$watch("active",function(n){n&&f.select(i)});i.disabled=!1;u.disable&&i.$parent.$watch(n(u.disable),function(n){i.disabled=!!n});u.disabled&&(t.warn('Use of "disabled" attribute has been deprecated, please use "disable"'),i.$parent.$watch(n(u.disabled),function(n){i.disabled=!!n}));i.select=function(){i.disabled||(i.active=!0)};f.addTab(i);i.$on("$destroy",function(){f.removeTab(i)});i.$transcludeFn=e}}}]).directive("tabHeadingTransclude",function(){return{restrict:"A",require:"^tab",link:function(n,t){n.$watch("headingElement",function(n){n&&(t.html(""),t.append(n))})}}}).directive("tabContentTransclude",function(){function n(n){return n.tagName&&(n.hasAttribute("tab-heading")||n.hasAttribute("data-tab-heading")||n.hasAttribute("x-tab-heading")||n.tagName.toLowerCase()==="tab-heading"||n.tagName.toLowerCase()==="data-tab-heading"||n.tagName.toLowerCase()==="x-tab-heading")}return{restrict:"A",require:"^tabset",link:function(t,i,r){var u=t.$eval(r.tabContentTransclude);u.$transcludeFn(u.$parent,function(t){angular.forEach(t,function(t){n(t)?u.headingElement=t:i.append(t)})})}}});angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(n,t,i,r,u,f){function b(){var t=parseInt(n.hours,10),i=n.showMeridian?t>0&&t<13:t>=0&&t<24;return i?(n.showMeridian&&(t===12&&(t=0),n.meridian===w[1]&&(t=t+12)),t):undefined}function k(){var t=parseInt(n.minutes,10);return t>=0&&t<60?t:undefined}function y(n){return angular.isDefined(n)&&n.toString().length<2?"0"+n:n.toString()}function p(n){g();o.$setViewValue(new Date(e));d(n)}function g(){o.$setValidity("time",!0);n.invalidHours=!1;n.invalidMinutes=!1}function d(t){var i=e.getHours(),r=e.getMinutes();n.showMeridian&&(i=i===0||i===12?12:i%12);n.hours=t==="h"?i:y(i);t!=="m"&&(n.minutes=y(r));n.meridian=e.getHours()<12?w[0]:w[1]}function c(n,t){var i=new Date(n.getTime()+t*6e4),r=new Date(n);return r.setHours(i.getHours(),i.getMinutes()),r}function v(n){e=c(e,n);p()}var e=new Date,o={$setViewValue:angular.noop},w=angular.isDefined(t.meridians)?n.$parent.$eval(t.meridians):f.meridians||u.DATETIME_FORMATS.AMPMS,l,a,s,h;this.init=function(i,r){var s;o=i;o.$render=this.render;o.$formatters.unshift(function(n){return n?new Date(n):null});var u=r.eq(0),e=r.eq(1),h=angular.isDefined(t.mousewheel)?n.$parent.$eval(t.mousewheel):f.mousewheel;h&&this.setupMousewheelEvents(u,e);s=angular.isDefined(t.arrowkeys)?n.$parent.$eval(t.arrowkeys):f.arrowkeys;s&&this.setupArrowkeyEvents(u,e);n.readonlyInput=angular.isDefined(t.readonlyInput)?n.$parent.$eval(t.readonlyInput):f.readonlyInput;this.setupInputEvents(u,e)};l=f.hourStep;t.hourStep&&n.$parent.$watch(i(t.hourStep),function(n){l=parseInt(n,10)});a=f.minuteStep;t.minuteStep&&n.$parent.$watch(i(t.minuteStep),function(n){a=parseInt(n,10)});n.$parent.$watch(i(t.min),function(n){var t=new Date(n);s=isNaN(t)?undefined:t});n.$parent.$watch(i(t.max),function(n){var t=new Date(n);h=isNaN(t)?undefined:t});n.noIncrementHours=function(){var n=c(e,l*60);return n>h||n<e&&n<s};n.noDecrementHours=function(){var n=c(e,-l*60);return n<s||n>e&&n>h};n.noIncrementMinutes=function(){var n=c(e,a);return n>h||n<e&&n<s};n.noDecrementMinutes=function(){var n=c(e,-a);return n<s||n>e&&n>h};n.noToggleMeridian=function(){return e.getHours()<13?c(e,720)>h:c(e,-720)<s};n.showMeridian=f.showMeridian;t.showMeridian&&n.$parent.$watch(i(t.showMeridian),function(t){if(n.showMeridian=!!t,o.$error.time){var i=b(),r=k();angular.isDefined(i)&&angular.isDefined(r)&&(e.setHours(i),p())}else d()});this.setupMousewheelEvents=function(t,i){var r=function(n){n.originalEvent&&(n=n.originalEvent);var t=n.wheelDelta?n.wheelDelta:-n.deltaY;return n.detail||t>0};t.bind("mousewheel wheel",function(t){n.$apply(r(t)?n.incrementHours():n.decrementHours());t.preventDefault()});i.bind("mousewheel wheel",function(t){n.$apply(r(t)?n.incrementMinutes():n.decrementMinutes());t.preventDefault()})};this.setupArrowkeyEvents=function(t,i){t.bind("keydown",function(t){t.which===38?(t.preventDefault(),n.incrementHours(),n.$apply()):t.which===40&&(t.preventDefault(),n.decrementHours(),n.$apply())});i.bind("keydown",function(t){t.which===38?(t.preventDefault(),n.incrementMinutes(),n.$apply()):t.which===40&&(t.preventDefault(),n.decrementMinutes(),n.$apply())})};this.setupInputEvents=function(t,i){if(n.readonlyInput){n.updateHours=angular.noop;n.updateMinutes=angular.noop;return}var r=function(t,i){o.$setViewValue(null);o.$setValidity("time",!1);angular.isDefined(t)&&(n.invalidHours=t);angular.isDefined(i)&&(n.invalidMinutes=i)};n.updateHours=function(){var n=b(),t=k();angular.isDefined(n)&&angular.isDefined(t)?(e.setHours(n),e<s||e>h?r(!0):p("h")):r(!0)};t.bind("blur",function(){!n.invalidHours&&n.hours<10&&n.$apply(function(){n.hours=y(n.hours)})});n.updateMinutes=function(){var n=k(),t=b();angular.isDefined(n)&&angular.isDefined(t)?(e.setMinutes(n),e<s||e>h?r(undefined,!0):p("m")):r(undefined,!0)};i.bind("blur",function(){!n.invalidMinutes&&n.minutes<10&&n.$apply(function(){n.minutes=y(n.minutes)})})};this.render=function(){var t=o.$viewValue;isNaN(t)?(o.$setValidity("time",!1),r.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(t&&(e=t),e<s||e>h?(o.$setValidity("time",!1),n.invalidHours=!0,n.invalidMinutes=!0):g(),d())};n.showSpinners=angular.isDefined(t.showSpinners)?n.$parent.$eval(t.showSpinners):f.showSpinners;n.incrementHours=function(){n.noIncrementHours()||v(l*60)};n.decrementHours=function(){n.noDecrementHours()||v(-l*60)};n.incrementMinutes=function(){n.noIncrementMinutes()||v(a)};n.decrementMinutes=function(){n.noDecrementMinutes()||v(-a)};n.toggleMeridian=function(){n.noToggleMeridian()||v(720*(e.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(n,t){return t.templateUrl||"template/timepicker/timepicker.html"},link:function(n,t,i,r){var f=r[0],u=r[1];u&&f.init(u,t.find("input"))}}});angular.module("ui.bootstrap.transition",[]).value("$transitionSuppressDeprecated",!1).factory("$transition",["$q","$timeout","$rootScope","$log","$transitionSuppressDeprecated",function(n,t,i,r,u){function e(n){for(var t in n)if(o.style[t]!==undefined)return n[t]}u||r.warn("$transition is now deprecated. Use $animate from ngAnimate instead.");var f=function(r,u,e){e=e||{};var s=n.defer(),o=f[e.animation?"animationEndEventName":"transitionEndEventName"],h=function(){i.$apply(function(){r.unbind(o,h);s.resolve(r)})};return o&&r.bind(o,h),t(function(){angular.isString(u)?r.addClass(u):angular.isFunction(u)?u(r):angular.isObject(u)&&r.css(u);o||s.resolve(r)}),s.promise.cancel=function(){o&&r.unbind(o,h);s.reject("Transition cancelled")},s.promise},o=document.createElement("trans");return f.transitionEndEventName=e({WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}),f.animationEndEventName=e({WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"}),f}]);angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position"]).factory("typeaheadParser",["$parse",function(n){var t=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(i){var r=i.match(t);if(!r)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+i+'".');return{itemName:r[3],source:n(r[4]),viewMapper:n(r[2]||r[1]),modelMapper:n(r[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$window","$rootScope","$position","typeaheadParser",function(n,t,i,r,u,f,e,o,s){var h=[9,13,27,38,40],c=200;return{require:["ngModel","^?ngModelOptions"],link:function(l,a,v,y){function dt(){p.moveInProgress||(p.moveInProgress=!0,p.$digest());ct&&r.cancel(ct);ct=r(function(){p.matches.length&&gt();p.moveInProgress=!1;p.$digest()},c)}function gt(){p.position=it?o.offset(a):o.position(a);p.position.top+=a.prop("offsetHeight")}var k=y[0],et=y[1],g=l.$eval(v.typeaheadMinLength),ut,d,b,st,kt,ht,ct,lt,ni,at,vt,ft;g||g===0||(g=1);var yt=l.$eval(v.typeaheadWaitMs)||0,pt=l.$eval(v.typeaheadEditable)!==!1,nt=t(v.typeaheadLoading).assign||angular.noop,ti=t(v.typeaheadOnSelect),ii=angular.isDefined(v.typeaheadSelectOnBlur)?l.$eval(v.typeaheadSelectOnBlur):!1,tt=t(v.typeaheadNoResults).assign||angular.noop,wt=v.typeaheadInputFormatter?t(v.typeaheadInputFormatter):undefined,it=v.typeaheadAppendToBody?l.$eval(v.typeaheadAppendToBody):!1,ri=l.$eval(v.typeaheadFocusFirst)!==!1,ui=v.typeaheadSelectOnExact?l.$eval(v.typeaheadSelectOnExact):!1,bt=t(v.ngModel),fi=t(v.ngModel+"($$$p)"),ei=function(n,t){return angular.isFunction(bt(l))&&et&&et.$options&&et.$options.getterSetter?fi(n,{$$$p:t}):bt.assign(n,t)},w=s.parse(v.typeahead),ot,rt,p=l.$new(),oi=l.$on("$destroy",function(){p.$destroy()});p.$on("$destroy",oi);ut="typeahead-"+p.$id+"-"+Math.floor(Math.random()*1e4);a.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":ut});d=angular.element("<div typeahead-popup><\/div>");d.attr({id:ut,matches:"matches",active:"activeIdx",select:"select(activeIdx)","move-in-progress":"moveInProgress",query:"query",position:"position"});angular.isDefined(v.typeaheadTemplateUrl)&&d.attr("template-url",v.typeaheadTemplateUrl);angular.isDefined(v.typeaheadPopupTemplateUrl)&&d.attr("popup-template-url",v.typeaheadPopupTemplateUrl);b=function(){p.matches=[];p.activeIdx=-1;a.attr("aria-expanded",!1)};st=function(n){return ut+"-option-"+n};p.$watch("activeIdx",function(n){n<0?a.removeAttr("aria-activedescendant"):a.attr("aria-activedescendant",st(n))});kt=function(n,t){return p.matches.length>t&&n?n.toUpperCase()===p.matches[t].label.toUpperCase():!1};ht=function(n){var t={$viewValue:n};nt(l,!0);tt(l,!1);i.when(w.source(l,t)).then(function(i){var u=n===k.$viewValue,r;if(u&&ot)if(i&&i.length>0){for(p.activeIdx=ri?0:-1,tt(l,!1),p.matches.length=0,r=0;r<i.length;r++)t[w.itemName]=i[r],p.matches.push({id:st(r),label:w.viewMapper(p,t),model:i[r]});p.query=n;gt();a.attr("aria-expanded",!0);ui&&p.matches.length===1&&kt(n,0)&&p.select(0)}else b(),tt(l,!0);u&&nt(l,!1)},function(){b();nt(l,!1);tt(l,!0)})};it&&(angular.element(f).bind("resize",dt),u.find("body").bind("scroll",dt));p.moveInProgress=!1;b();p.query=undefined;ni=function(n){lt=r(function(){ht(n)},yt)};at=function(){lt&&r.cancel(lt)};k.$parsers.unshift(function(n){return ot=!0,g===0||n&&n.length>=g?yt>0?(at(),ni(n)):ht(n):(nt(l,!1),at(),b()),pt?n:n?(k.$setValidity("editable",!1),undefined):(k.$setValidity("editable",!0),null)});k.$formatters.push(function(n){var i,r,t={};return pt||k.$setValidity("editable",!0),wt?(t.$model=n,wt(l,t)):(t[w.itemName]=n,i=w.viewMapper(l,t),t[w.itemName]=undefined,r=w.viewMapper(l,t),i!==r?i:n)});p.select=function(n){var t={},i,u;rt=!0;t[w.itemName]=u=p.matches[n].model;i=w.modelMapper(l,t);ei(l,i);k.$setValidity("editable",!0);k.$setValidity("parse",!0);ti(l,{$item:u,$model:i,$label:w.viewMapper(l,t)});b();p.$eval(v.typeaheadFocusOnSelect)!==!1&&r(function(){a[0].focus()},0,!1)};a.bind("keydown",function(n){if(p.matches.length!==0&&h.indexOf(n.which)!==-1){if(p.activeIdx===-1&&(n.which===9||n.which===13)){b();p.$digest();return}n.preventDefault();n.which===40?(p.activeIdx=(p.activeIdx+1)%p.matches.length,p.$digest()):n.which===38?(p.activeIdx=(p.activeIdx>0?p.activeIdx:p.matches.length)-1,p.$digest()):n.which===13||n.which===9?p.$apply(function(){p.select(p.activeIdx)}):n.which===27&&(n.stopPropagation(),b(),p.$digest())}});a.bind("blur",function(){ii&&p.matches.length&&p.activeIdx!==-1&&!rt&&(rt=!0,p.$apply(function(){p.select(p.activeIdx)}));ot=!1;rt=!1});vt=function(n){a[0]!==n.target&&n.which!==3&&p.matches.length!==0&&(b(),e.$$phase||p.$digest())};u.bind("click",vt);l.$on("$destroy",function(){u.unbind("click",vt);it&&ft.remove();d.remove()});ft=n(d)(p);it?u.find("body").append(ft):a.after(ft)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&"},replace:!0,templateUrl:function(n,t){return t.popupTemplateUrl||"template/typeahead/typeahead-popup.html"},link:function(n,t,i){n.templateUrl=i.templateUrl;n.isOpen=function(){return n.matches.length>0};n.isActive=function(t){return n.active==t};n.selectActive=function(t){n.active=t};n.selectMatch=function(t){n.select({activeIdx:t})}}}}).directive("typeaheadMatch",["$templateRequest","$compile","$parse",function(n,t,i){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(r,u,f){var e=i(f.templateUrl)(r.$parent)||"template/typeahead/typeahead-match.html";n(e).then(function(n){t(n.trim())(r,function(n){u.replaceWith(n)})})}}}]).filter("typeaheadHighlight",["$sce","$injector","$log",function(n,t,i){function u(n){return n.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function f(n){return/<.*>/g.test(n)}var r;return r=t.has("$sanitize"),function(t,e){!r&&f(t)&&i.warn("Unsafe use of typeahead please use ngSanitize");var o=e.split(" ");return angular.forEach(o,function(n){t=n?(""+t).replace(new RegExp(u(n),"gi"),"<em>$&<\/em>"):t}),r||(t=n.trustAsHtml(t)),t}}]);angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(n){n.put("template/accordion/accordion-group.html",'<div class="panel {{panelClass || \'panel-default\'}}">\n  <div class="panel-heading" ng-keypress="toggleOpen($event)">\n    <h4 class="panel-title">\n      <a href tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" accordion-transclude="heading"><span ng-class="{\'text-muted\': isDisabled}">{{heading}}<\/span><\/a>\n    <\/h4>\n  <\/div>\n  <div class="panel-collapse collapse" collapse="!isOpen">\n\t  <div class="panel-body" ng-transclude><\/div>\n  <\/div>\n<\/div>\n')}]);angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(n){n.put("template/accordion/accordion.html",'<div class="panel-group" ng-transclude><\/div>')}]);angular.module("template/alert/alert.html",[]).run(["$templateCache",function(n){n.put("template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissible\' : null]" role="alert">\n    <button ng-show="closeable" type="button" class="close" ng-click="close($event)">\n        <span aria-hidden="true">&times;<\/span>\n        <span class="sr-only">Close<\/span>\n    <\/button>\n    <div ng-transclude><\/div>\n<\/div>\n')}]);angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(n){n.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n    <ol class="carousel-indicators" ng-show="slides.length > 1">\n        <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{active: isActive(slide)}" ng-click="select(slide)"><\/li>\n    <\/ol>\n    <div class="carousel-inner" ng-transclude><\/div>\n    <a class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-left"><\/span><\/a>\n    <a class="right carousel-control" ng-click="next()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-right"><\/span><\/a>\n<\/div>\n')}]);angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(n){n.put("template/carousel/slide.html",'<div ng-class="{\n    \'active\': active\n  }" class="item text-center" ng-transclude><\/div>\n')}]);angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(n){n.put("template/datepicker/datepicker.html",'<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n  <daypicker ng-switch-when="day" tabindex="0"><\/daypicker>\n  <monthpicker ng-switch-when="month" tabindex="0"><\/monthpicker>\n  <yearpicker ng-switch-when="year" tabindex="0"><\/yearpicker>\n<\/div>')}]);angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(n){n.put("template/datepicker/day.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"><\/i><\/button><\/th>\n      <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}<\/strong><\/button><\/th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"><\/i><\/button><\/th>\n    <\/tr>\n    <tr>\n      <th ng-if="showWeeks" class="text-center"><\/th>\n      <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}<\/small><\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr ng-repeat="row in rows track by $index">\n      <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}<\/em><\/td>\n      <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n        <button type="button" style="min-width:100%;" class="btn btn-default btn-sm" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}<\/span><\/button>\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n')}]);angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(n){n.put("template/datepicker/month.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"><\/i><\/button><\/th>\n      <th><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}<\/strong><\/button><\/th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"><\/i><\/button><\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr ng-repeat="row in rows track by $index">\n      <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n        <button type="button" style="min-width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}<\/span><\/button>\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n')}]);angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(n){n.put("template/datepicker/popup.html",'<ul class="dropdown-menu" ng-if="isOpen" style="display: block" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n\t<li ng-transclude><\/li>\n\t<li ng-if="showButtonBar" style="padding:10px 9px 2px">\n\t\t<span class="btn-group pull-left">\n\t\t\t<button type="button" class="btn btn-sm btn-info" ng-click="select(\'today\')" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}<\/button>\n\t\t\t<button type="button" class="btn btn-sm btn-danger" ng-click="select(null)">{{ getText(\'clear\') }}<\/button>\n\t\t<\/span>\n\t\t<button type="button" class="btn btn-sm btn-success pull-right" ng-click="close()">{{ getText(\'close\') }}<\/button>\n\t<\/li>\n<\/ul>\n')}]);angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(n){n.put("template/datepicker/year.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"><\/i><\/button><\/th>\n      <th colspan="3"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}<\/strong><\/button><\/th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"><\/i><\/button><\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr ng-repeat="row in rows track by $index">\n      <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}">\n        <button type="button" style="min-width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}<\/span><\/button>\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n')}]);angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(n){n.put("template/modal/backdrop.html",'<div class="modal-backdrop"\n     modal-animation-class="fade"\n     modal-in-class="in"\n     ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n><\/div>\n')}]);angular.module("template/modal/window.html",[]).run(["$templateCache",function(n){n.put("template/modal/window.html",'<div modal-render="{{$isRendered}}" tabindex="-1" role="dialog" class="modal"\n    modal-animation-class="fade"\n    modal-in-class="in"\n\tng-style="{\'z-index\': 1050 + index*10, display: \'block\'}" ng-click="close($event)">\n    <div class="modal-dialog" ng-class="size ? \'modal-\' + size : \'\'"><div class="modal-content" modal-transclude><\/div><\/div>\n<\/div>\n')}]);angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(n){n.put("template/pagination/pager.html",'<ul class="pager">\n  <li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}<\/a><\/li>\n  <li class="pager-display">{{page}} / {{totalPages}}<\/li>  <li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}<\/a><\/li>\n<\/ul>\n')}]);angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(n){n.put("template/pagination/pagination.html",'<ul class="pagination">\n  <li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText(\'first\')}}<\/a><\/li>\n  <li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}<\/a><\/li>\n  <li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)">{{page.text}}<\/a><\/li>\n  <li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}<\/a><\/li>\n  <li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)">{{::getText(\'last\')}}<\/a><\/li>\n<\/ul>\n')}]);angular.module("template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(n){n.put("template/tooltip/tooltip-html-popup.html",'<div class="tooltip"\n  tooltip-animation-class="fade"\n  tooltip-classes\n  ng-class="{ in: isOpen() }">\n  <div class="tooltip-arrow"><\/div>\n  <div class="tooltip-inner" ng-bind-html="contentExp()"><\/div>\n<\/div>\n')}]);angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(n){n.put("template/tooltip/tooltip-html-unsafe-popup.html",'<div class="tooltip"\n  tooltip-animation-class="fade"\n  tooltip-classes\n  ng-class="{ in: isOpen() }">\n  <div class="tooltip-arrow"><\/div>\n  <div class="tooltip-inner" bind-html-unsafe="content"><\/div>\n<\/div>\n')}]);angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(n){n.put("template/tooltip/tooltip-popup.html",'<div class="tooltip"\n  tooltip-animation-class="fade"\n  tooltip-classes\n  ng-class="{ in: isOpen() }">\n  <div class="tooltip-arrow"><\/div>\n  <div class="tooltip-inner" ng-bind="content"><\/div>\n<\/div>\n')}]);angular.module("template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(n){n.put("template/tooltip/tooltip-template-popup.html",'<div class="tooltip"\n  tooltip-animation-class="fade"\n  tooltip-classes\n  ng-class="{ in: isOpen() }">\n  <div class="tooltip-arrow"><\/div>\n  <div class="tooltip-inner"\n    tooltip-template-transclude="contentExp()"\n    tooltip-template-transclude-scope="originScope()"><\/div>\n<\/div>\n')}]);angular.module("template/popover/popover-html.html",[]).run(["$templateCache",function(n){n.put("template/popover/popover-html.html",'<div class="popover"\n  tooltip-animation-class="fade"\n  tooltip-classes\n  ng-class="{ in: isOpen() }">\n  <div class="arrow"><\/div>\n\n  <div class="popover-inner">\n      <h3 class="popover-title" ng-bind="title" ng-if="title"><\/h3>\n      <div class="popover-content" ng-bind-html="contentExp()"><\/div>\n  <\/div>\n<\/div>\n')}]);angular.module("template/popover/popover-template.html",[]).run(["$templateCache",function(n){n.put("template/popover/popover-template.html",'<div class="popover"\n  tooltip-animation-class="fade"\n  tooltip-classes\n  ng-class="{ in: isOpen() }">\n  <div class="arrow"><\/div>\n\n  <div class="popover-inner">\n      <h3 class="popover-title" ng-bind="title" ng-if="title"><\/h3>\n      <div class="popover-content"\n        tooltip-template-transclude="contentExp()"\n        tooltip-template-transclude-scope="originScope()"><\/div>\n  <\/div>\n<\/div>\n')}]);angular.module("template/popover/popover.html",[]).run(["$templateCache",function(n){n.put("template/popover/popover.html",'<div class="popover"\n  tooltip-animation-class="fade"\n  tooltip-classes\n  ng-class="{ in: isOpen() }">\n  <div class="arrow"><\/div>\n\n  <div class="popover-inner">\n      <h3 class="popover-title" ng-bind="title" ng-if="title"><\/h3>\n      <div class="popover-content" ng-bind="content"><\/div>\n  <\/div>\n<\/div>\n')}]);angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(n){n.put("template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" style="min-width: 0;" ng-transclude><\/div>\n')}]);angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(n){n.put("template/progressbar/progress.html",'<div class="progress" ng-transclude><\/div>')}]);angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(n){n.put("template/progressbar/progressbar.html",'<div class="progress">\n  <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" style="min-width: 0;" ng-transclude><\/div>\n<\/div>\n')}]);angular.module("template/rating/rating.html",[]).run(["$templateCache",function(n){n.put("template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">\n    <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})<\/span>\n    <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}" ><\/i>\n<\/span>\n')}]);angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(n){n.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n  <a href ng-click="select()" tab-heading-transclude>{{heading}}<\/a>\n<\/li>\n')}]);angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(n){n.put("template/tabs/tabset.html",'<div>\n  <ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude><\/ul>\n  <div class="tab-content">\n    <div class="tab-pane" \n         ng-repeat="tab in tabs" \n         ng-class="{active: tab.active}"\n         tab-content-transclude="tab">\n    <\/div>\n  <\/div>\n<\/div>\n')}]);angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(n){n.put("template/timepicker/timepicker.html",'<table>\n  <tbody>\n    <tr class="text-center" ng-show="::showSpinners">\n      <td><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"><\/span><\/a><\/td>\n      <td>&nbsp;<\/td>\n      <td><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"><\/span><\/a><\/td>\n      <td ng-show="showMeridian"><\/td>\n    <\/tr>\n    <tr>\n      <td class="form-group" ng-class="{\'has-error\': invalidHours}">\n        <input style="width:50px;" type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2">\n      <\/td>\n      <td>:<\/td>\n      <td class="form-group" ng-class="{\'has-error\': invalidMinutes}">\n        <input style="width:50px;" type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2">\n      <\/td>\n      <td ng-show="showMeridian"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()">{{meridian}}<\/button><\/td>\n    <\/tr>\n    <tr class="text-center" ng-show="::showSpinners">\n      <td><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"><\/span><\/a><\/td>\n      <td>&nbsp;<\/td>\n      <td><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"><\/span><\/a><\/td>\n      <td ng-show="showMeridian"><\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n')}]);angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(n){n.put("template/typeahead/typeahead-match.html",'<a href tabindex="-1" ng-bind-html="match.label | typeaheadHighlight:query"><\/a>\n')}]);angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(n){n.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">\n    <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{::match.id}}">\n        <div typeahead-match index="$index" match="match" query="query" template-url="templateUrl"><\/div>\n    <\/li>\n<\/ul>\n')}]);angular.$$csp()||angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}<\/style>');angular.module("oitozero.ngSweetAlert",[]).factory("SweetAlert",["$timeout","$window",function(n,t){var i=t.swal;return{swal:function(t,r,u){n(function(){typeof r=="function"?i(t,function(t){n(function(){r(t)})},u):i(t,r,u)},200)},adv:function(t){n(function(){i(t)},200)},timed:function(t,r,u,f){n(function(){i({title:t,text:r,type:u,timer:f})},200)},success:function(t,r){n(function(){i(t,r,"success")},200)},error:function(t,r){n(function(){i(t,r,"error")},200)},warning:function(t,r){n(function(){i(t,r,"warning")},200)},info:function(t,r){n(function(){i(t,r,"info")},200)}}}]);angular.module("ngAutocomplete",[]).directive("ngAutocomplete",function(){return{require:"ngModel",scope:{ngModel:"=",options:"=?",details:"=?"},link:function(n,t,i,r){var u,f=!1,o=function(){u={};n.options&&(f=n.options.watchEnter!==!0?!1:!0,n.options.types?(u.types=[],u.types.push(n.options.types),n.gPlace.setTypes(u.types)):n.gPlace.setTypes([]),n.options.bounds?(u.bounds=n.options.bounds,n.gPlace.setBounds(u.bounds)):n.gPlace.setBounds(null),n.options.country?(u.componentRestrictions={country:n.options.country},n.gPlace.setComponentRestrictions(u.componentRestrictions)):n.gPlace.setComponentRestrictions(null))},e;n.gPlace==undefined&&(n.gPlace=new google.maps.places.Autocomplete(t[0],{}));google.maps.event.addListener(n.gPlace,"place_changed",function(){var t=n.gPlace.getPlace();t!==undefined&&(t.address_components!==undefined?n.$apply(function(){n.details=t;n.$emit("placeChanged",t)}):f&&e(t))});e=function(i){var u=new google.maps.places.AutocompleteService;i.name.length>0&&u.getPlacePredictions({input:i.name,offset:i.name.length},function(i){if(i==null||i.length===0)n.$apply(function(){n.details=null});else{var u=new google.maps.places.PlacesService(t[0]);u.getDetails({reference:i[0].reference},function(i,u){u===google.maps.GeocoderStatus.OK&&n.$apply(function(){r.$setViewValue(i.formatted_address);t.val(i.formatted_address);n.details=i;var u=t.on("focusout",function(){t.val(i.formatted_address);t.unbind("focusout")})})})}})};r.$render=function(){var n=r.$viewValue;t.val(n)};n.watchOptions=function(){return n.options};n.$watch(n.watchOptions,function(){o()},!0)}}}),function(){"use strict";angular.module("as.sortable",[]).constant("sortableConfig",{itemClass:"as-sortable-item",handleClass:"as-sortable-item-handle",placeHolderClass:"as-sortable-placeholder",dragClass:"as-sortable-drag",hiddenClass:"as-sortable-hidden",dragging:"as-sortable-dragging"})}(),function(){"use strict";var n=angular.module("as.sortable");n.factory("$helper",["$document","$window",function(n,t){return{height:function(n){return n[0].getBoundingClientRect().height},width:function(n){return n[0].getBoundingClientRect().width},offset:function(i,r){var u=i[0].getBoundingClientRect();return r||(r=n[0].documentElement),{width:u.width||i.prop("offsetWidth"),height:u.height||i.prop("offsetHeight"),top:u.top+(t.pageYOffset||r.scrollTop-r.offsetTop),left:u.left+(t.pageXOffset||r.scrollLeft-r.offsetLeft)}},eventObj:function(n){var t=n;return n.targetTouches!==undefined?t=n.targetTouches.item(0):n.originalEvent!==undefined&&n.originalEvent.targetTouches!==undefined&&(t=n.originalEvent.targetTouches.item(0)),t},isTouchInvalid:function(n){var t=!1;return n.touches!==undefined&&n.touches.length>1?t=!0:n.originalEvent!==undefined&&n.originalEvent.touches!==undefined&&n.originalEvent.touches.length>1&&(t=!0),t},positionStarted:function(n,t,i){var r={};return r.offsetX=n.pageX-this.offset(t,i).left,r.offsetY=n.pageY-this.offset(t,i).top,r.startX=r.lastX=n.pageX,r.startY=r.lastY=n.pageY,r.nowX=r.nowY=r.distX=r.distY=r.dirAx=0,r.dirX=r.dirY=r.lastDirX=r.lastDirY=r.distAxX=r.distAxY=0,r},calculatePosition:function(n,t){n.lastX=n.nowX;n.lastY=n.nowY;n.nowX=t.pageX;n.nowY=t.pageY;n.distX=n.nowX-n.lastX;n.distY=n.nowY-n.lastY;n.lastDirX=n.dirX;n.lastDirY=n.dirY;n.dirX=n.distX===0?0:n.distX>0?1:-1;n.dirY=n.distY===0?0:n.distY>0?1:-1;var i=Math.abs(n.distX)>Math.abs(n.distY)?1:0;n.dirAx!==i?(n.distAxX=0,n.distAxY=0):(n.distAxX+=Math.abs(n.distX),n.dirX!==0&&n.dirX!==n.lastDirX&&(n.distAxX=0),n.distAxY+=Math.abs(n.distY),n.dirY!==0&&n.dirY!==n.lastDirY&&(n.distAxY=0));n.dirAx=i},movePosition:function(n,t,i,r,u,f){var e,o=u==="relative";t.x=n.pageX-i.offsetX;t.y=n.pageY-i.offsetY;r&&(e=this.offset(r,f),o&&(t.x-=e.left,t.y-=e.top,e.left=0,e.top=0),t.x<e.left?t.x=e.left:t.x>=e.width+e.left-this.offset(t).width&&(t.x=e.width+e.left-this.offset(t).width),t.y<e.top?t.y=e.top:t.y>=e.height+e.top-this.offset(t).height&&(t.y=e.height+e.top-this.offset(t).height));t.css({left:t.x+"px",top:t.y+"px"});this.calculatePosition(i,n)},dragItem:function(n){return{index:n.index(),parent:n.sortableScope,source:n,targetElement:null,targetElementOffset:null,sourceInfo:{index:n.index(),itemScope:n.itemScope,sortableScope:n.sortableScope},canMove:function(n,t,i){return this.targetElement!==t?(this.targetElement=t,this.targetElementOffset=i,!0):n.dirX*(i.left-this.targetElementOffset.left)>0||n.dirY*(i.top-this.targetElementOffset.top)>0?(this.targetElementOffset=i,!0):!1},moveTo:function(n,t){this.parent=n;this.isSameParent()&&this.source.index()<t&&!this.sourceInfo.sortableScope.cloning&&(t=t-1);this.index=t},isSameParent:function(){return this.parent.element===this.sourceInfo.sortableScope.element},isOrderChanged:function(){return this.index!==this.sourceInfo.index},eventArgs:function(){return{source:this.sourceInfo,dest:{index:this.index,sortableScope:this.parent}}},apply:function(){this.sourceInfo.sortableScope.cloning?this.parent.options.clone||this.parent.insertItem(this.index,angular.copy(this.source.modelValue)):(this.sourceInfo.sortableScope.removeItem(this.sourceInfo.index),(this.parent.options.allowDuplicates||this.parent.modelValue.indexOf(this.source.modelValue)<0)&&this.parent.insertItem(this.index,this.source.modelValue))}}},noDrag:function(n){return n.attr("no-drag")!==undefined||n.attr("data-no-drag")!==undefined},findAncestor:function(n,t){n=n[0];for(var i=Element.matches||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector;(n=n.parentElement)&&!i.call(n,t););return n?angular.element(n):angular.element(document.body)}}}])}(),function(){"use strict";var n=angular.module("as.sortable");n.controller("as.sortable.sortableController",["$scope",function(n){this.scope=n;n.modelValue=null;n.callbacks=null;n.type="sortable";n.options={longTouch:!1};n.isDisabled=!1;n.insertItem=function(t,i){n.options.allowDuplicates?n.modelValue.splice(t,0,angular.copy(i)):n.modelValue.splice(t,0,i)};n.removeItem=function(t){var i=null;return t>-1&&(i=n.modelValue.splice(t,1)[0]),i};n.isEmpty=function(){return n.modelValue&&n.modelValue.length===0};n.accept=function(t,i,r){return n.callbacks.accept(t,i,r)}}]);n.directive("asSortable",function(){return{require:"ngModel",restrict:"A",scope:!0,controller:"as.sortable.sortableController",link:function(n,t,i,r){var f,u;(f=r,f)&&(f.$render=function(){n.modelValue=f.$modelValue},n.element=t,t.data("_scope",n),u={accept:null,orderChanged:null,itemMoved:null,dragStart:null,dragMove:null,dragCancel:null,dragEnd:null},u.accept=function(){return!0},u.orderChanged=function(){},u.itemMoved=function(){},u.dragStart=function(){},u.dragMove=angular.noop,u.dragCancel=function(){},u.dragEnd=function(){},n.$watch(i.asSortable,function(t){angular.forEach(t,function(t,i){u[i]?typeof t=="function"&&(u[i]=t):n.options[i]=t});n.callbacks=u},!0),angular.isDefined(i.isDisabled)&&n.$watch(i.isDisabled,function(t){angular.isUndefined(t)||(n.isDisabled=t)},!0))}}})}(),function(){"use strict";function t(n,i){return!i||i.nodeName==="HTML"?!1:i.parentNode===n?!0:t(n,i.parentNode)}var n=angular.module("as.sortable");n.controller("as.sortable.sortableItemHandleController",["$scope",function(n){this.scope=n;n.itemScope=null;n.type="handle"}]);n.directive("asSortableItemHandle",["sortableConfig","$helper","$window","$document","$timeout",function(n,i,r,u,f){return{require:"^asSortableItem",scope:!0,restrict:"A",controller:"as.sortable.sortableItemHandleController",link:function(e,o,s,h){function dt(n,t){a.css("display")!=="table-row"&&a.css("display","block");t.sortableScope.options.clone||(n[0].parentNode.insertBefore(a[0],n[0]),l.moveTo(t.sortableScope,t.index()))}function ti(n,t){a.css("display")!=="table-row"&&a.css("display","block");t.sortableScope.options.clone||(n.after(a),l.moveTo(t.sortableScope,t.index()+1))}function gt(n){for(var t;!t&&n.length;)t=n.data("_scope"),t||(n=n.parent());return t}function ni(){e.itemScope.sortableScope.cloning||tt.replaceWith(e.itemScope.element);a.remove();c.remove();c=null;p=!1;v.css("cursor","");v.removeClass("as-sortable-un-selectable")}var c,a,tt,w,l,v,ut,y,b,at,k,d,it,vt,ft,rt,et,yt,ot,g,pt,st,nt,wt,p,bt,kt,ht=!1,ct,lt=!1;g="ontouchstart"in r;pt=/iPad|iPhone|iPod/.test(r.navigator.userAgent)&&!r.MSStream;n.handleClass&&o.addClass(n.handleClass);e.itemScope=h.scope;o.data("_scope",e);e.$watchGroup(["sortableScope.isDisabled","sortableScope.options.longTouch"],function(n){ht!==n[0]?(ht=n[0],ht?et():rt()):lt!==n[1]?(lt=n[1],et(),rt()):rt()});e.$on("$destroy",function(){angular.element(u[0].body).unbind("keydown",ct)});bt=function(n){return typeof e.sortableScope.options.placeholder=="function"?angular.element(e.sortableScope.options.placeholder(n)):typeof e.sortableScope.options.placeholder=="string"?angular.element(e.sortableScope.options.placeholder):angular.element(u[0].createElement(n.element.prop("tagName")))};y=function(n){var t=function(){angular.element(u).unbind("mousemove",f);angular.element(u).unbind("touchmove",f);o.unbind("mouseup",t);o.unbind("touchend",t);o.unbind("touchcancel",t)},r,f=function(u){u.preventDefault();var f=i.eventObj(u);r||(r={clientX:f.clientX,clientY:f.clientY});Math.abs(f.clientX-r.clientX)+Math.abs(f.clientY-r.clientY)>10&&(t(),at(n))};angular.element(u).bind("mousemove",f);angular.element(u).bind("touchmove",f);o.bind("mouseup",t);o.bind("touchend",t);o.bind("touchcancel",t);n.stopPropagation()};at=function(t){var r,f;(g||t.button!==2&&t.which!==3)&&(g&&i.isTouchInvalid(t)||!p&&vt(t)&&(p=!0,t.preventDefault(),r=i.eventObj(t),e.sortableScope=e.sortableScope||e.itemScope.sortableScope,e.callbacks=e.callbacks||e.itemScope.callbacks,e.itemScope.sortableScope.cloning=e.itemScope.sortableScope.options.clone||e.itemScope.sortableScope.options.ctrlClone&&t.ctrlKey?!0:!1,b=angular.element(u[0].querySelector(e.sortableScope.options.scrollableContainer)).length>0?u[0].querySelector(e.sortableScope.options.scrollableContainer):u[0].documentElement,v=e.sortableScope.options.containment?i.findAncestor(o,e.sortableScope.options.containment):angular.element(u[0].body),v.css("cursor","move"),v.css("cursor","-webkit-grabbing"),v.css("cursor","-moz-grabbing"),v.addClass("as-sortable-un-selectable"),ut=e.sortableScope.options.containerPositioning||"absolute",l=i.dragItem(e),f=e.itemScope.element.prop("tagName"),c=angular.element(u[0].createElement(e.sortableScope.element.prop("tagName"))).addClass(e.sortableScope.element.attr("class")).addClass(n.dragClass),c.css("width",i.width(e.itemScope.element)+"px"),c.css("height",i.height(e.itemScope.element)+"px"),a=bt(e.itemScope).addClass(n.placeHolderClass).addClass(e.sortableScope.options.additionalPlaceholderClass),a.css("width",i.width(e.itemScope.element)+"px"),a.css("height",i.height(e.itemScope.element)+"px"),tt=angular.element(u[0].createElement(f)),n.hiddenClass&&tt.addClass(n.hiddenClass),w=i.positionStarted(r,e.itemScope.element,b),e.itemScope.sortableScope.options.clone||e.itemScope.element.after(a),e.itemScope.sortableScope.cloning?c.append(e.itemScope.element.clone()):(e.itemScope.element.after(tt),c.append(e.itemScope.element)),v.append(c),i.movePosition(r,c,w,v,ut,b),e.sortableScope.$apply(function(){e.callbacks.dragStart(l.eventArgs())}),yt()))};vt=function(n){var t,u,r;for(t=angular.element(n.target),u=gt(t),r=u&&u.type==="handle";r&&t[0]!==o[0];)i.noDrag(t)&&(r=!1),t=t.parent();return r};k=function(f){var h,k,d,o,s,nt,y;if((!g||!i.isTouchInvalid(f))&&p&&c){if(f.preventDefault(),h=i.eventObj(f),e.callbacks.dragMove!==angular.noop&&e.sortableScope.$apply(function(){e.callbacks.dragMove(w,v,h)}),k=h.pageX-u[0].documentElement.scrollLeft,d=h.pageY-(r.pageYOffset||u[0].documentElement.scrollTop),c.addClass(n.hiddenClass),s=angular.element(u[0].elementFromPoint(k,d)),c.removeClass(n.hiddenClass),i.movePosition(h,c,w,v,ut,b),c.addClass(n.dragging),o=gt(s),!o||!o.type)return;if(o.type==="handle"&&(o=o.itemScope),o.type!=="item"&&o.type!=="sortable")return;if(o.type==="item"&&o.accept(e,o.sortableScope,o)){if(s=o.element,nt=i.offset(s,b),!l.canMove(w,s,nt))return;y=ft(o.sortableScope.element);y<0?dt(s,o):y<=o.index()?ti(s,o):dt(s,o)}o.type==="sortable"&&o.accept(e,o)&&!t(o.element[0],s[0])&&(kt(s)||o.options.clone||(s[0].appendChild(a[0]),l.moveTo(o,o.modelValue.length)))}};ft=function(t){var r,i;if(t.hasClass(n.placeHolderClass))return 0;for(r=t.children(),i=0;i<r.length;i+=1)if(angular.element(r[i]).hasClass(n.placeHolderClass))return i;return-1};kt=function(n){return ft(n)>=0};d=function(n){p&&(n.preventDefault(),c&&(ni(),l.apply(),e.sortableScope.$apply(function(){l.isSameParent()?l.isOrderChanged()&&e.callbacks.orderChanged(l.eventArgs()):e.callbacks.itemMoved(l.eventArgs())}),e.sortableScope.$apply(function(){e.callbacks.dragEnd(l.eventArgs())}),l=null),ot())};it=function(n){p&&(n.preventDefault(),c&&(ni(),e.sortableScope.$apply(function(){e.callbacks.dragCancel(l.eventArgs())}),l=null),ot())};rt=function(){g&&(lt?pt?(o.bind("touchstart",st),o.bind("touchend",nt),o.bind("touchmove",nt)):o.bind("contextmenu",y):o.bind("touchstart",y));o.bind("mousedown",y)};et=function(){o.unbind("touchstart",st);o.unbind("touchend",nt);o.unbind("touchmove",nt);o.unbind("contextmenu",y);o.unbind("touchstart",y);o.unbind("mousedown",y)};st=function(n){wt=f(function(){y(n)},500)};nt=function(){f.cancel(wt)};ct=function(n){n.keyCode===27&&it(n)};angular.element(u[0].body).bind("keydown",ct);yt=function(){angular.element(u).bind("touchmove",k);angular.element(u).bind("touchend",d);angular.element(u).bind("touchcancel",it);angular.element(u).bind("mousemove",k);angular.element(u).bind("mouseup",d)};ot=function(){angular.element(u).unbind("touchend",d);angular.element(u).unbind("touchcancel",it);angular.element(u).unbind("touchmove",k);angular.element(u).unbind("mouseup",d);angular.element(u).unbind("mousemove",k)}}}}])}(),function(){"use strict";var n=angular.module("as.sortable");n.controller("as.sortable.sortableItemController",["$scope",function(n){this.scope=n;n.sortableScope=null;n.modelValue=null;n.type="item";n.index=function(){return n.$index};n.itemData=function(){return n.sortableScope.modelValue[n.$index]}}]);n.directive("asSortableItem",["sortableConfig",function(n){return{require:["^asSortable","?ngModel"],restrict:"A",controller:"as.sortable.sortableItemController",link:function(t,i,r,u){var e=u[0],f=u[1];n.itemClass&&i.addClass(n.itemClass);t.sortableScope=e.scope;f?f.$render=function(){t.modelValue=f.$modelValue}:t.modelValue=e.scope.modelValue[t.$index];t.element=i;i.data("_scope",t)}}}])}(),function(n,t){typeof module!="undefined"&&module.exports?module.exports=t(require("angular")):typeof define=="function"&&define.amd?define(["angular"],t):t(n.angular)}(window,function(n){n.module("angucomplete-alt",[]).directive("angucompleteAlt",["$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate","$document",function(t,i,r,u,f,e,o,s){function ut(i,u,e,o){function fi(n,t){n&&(typeof n=="object"?(i.searchStr=wt(n),yt({originalObject:n})):typeof n=="string"&&n.length>0?i.searchStr=n:console&&console.error&&console.error("Tried to set "+(!t?"":"initial")+" value of angucomplete to",n,"which is an invalid value"),ot(!0))}function ei(t){n.element(document.querySelector(".brick-panel-open")).length>0||(t.target.id?(v=t.target.id,v===i.id+"_dropdown"&&vt(t)):(v=t.target.className,t.target.closest("[angucomplete-ignore]")||t.target.closest(".angucomplete-ignore")||vt(t)))}function vt(t){n.element(document.querySelector(".brick-panel-open")).length>0||(v=null,i.hideResults(t),document.body.removeEventListener("click",vt),s.unbind("click",ei))}function oi(n){return n.which?n.which:n.keyCode}function yt(n){typeof i.selectedObject=="function"?i.selectedObject(n):i.selectedObject=n;n?ot(!0):ot(!1)}function gi(n){return function(t){return i[n]?i[n](t):t}}function nr(n){yt({originalObject:n});i.clearSelected&&(i.searchStr=null);lt()}function wt(n){return i.titleField.split(",").map(function(t){return ht(n,t)}).join(" ")}function ht(n,t){var u,i,r;if(n&&t)for(u=t.split("."),i=n,r=0;r<u.length;r++)i=i[u[r]];else i=n;return i}function si(n,t){var r,f,e,o,u;if(!n)return null;for(n.match&&n.replace||(n=n.toString()),r=n,o=t.split(" "),u=0;u<o.length;u++)e=new RegExp(o[u].replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),f=r.match(e),f&&(r=r.replace(e,"%{%"+f[0]+"%}%"));return r=r.replace(/%{%/g,'<span class="'+i.matchClass+'">'),r.replace(/%}%/g,"<\/span>")}function ot(n){i.notEmpty=n;pt=i.searchStr;i.fieldRequired&&o&&i.inputName&&o[i.inputName].$setValidity(dt,n)}function tr(n){var t=oi(n);if(t!==p&&t!==y)if(t===l||t===h)n.preventDefault();else if(t===c)n.preventDefault(),!i.showDropdown&&i.searchStr&&i.searchStr.length>=et&&(wi(),i.searching=!0,bi(i.searchStr));else if(t===a)lt(),i.$apply(function(){ft.val(i.searchStr)});else{if(et===0&&!i.searchStr)return;i.searchStr&&i.searchStr!==""?i.searchStr.length>=et&&(wi(),at&&f.cancel(at),i.searching=!0,at=f(function(){bi(i.searchStr)},i.pause)):i.showDropdown=!1;pt&&pt!==i.searchStr&&!i.clearSelected&&i.$apply(function(){yt()})}}function bt(n){!i.overrideSuggestions||i.selectedObject&&i.selectedObject.originalObject===i.searchStr||(n&&n.preventDefault(),f.cancel(at),ct(),nr(i.searchStr))}function ir(n){var t=getComputedStyle(n);return n.offsetHeight+parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}function rr(){return ut.getBoundingClientRect().top+parseInt(getComputedStyle(ut).maxHeight,10)}function hi(){return u[0].querySelectorAll(".angucomplete-row")[i.currentIndex]}function ur(){return hi().getBoundingClientRect().top-(ut.getBoundingClientRect().top+parseInt(getComputedStyle(ut).paddingTop,10))}function ci(n){ut.scrollTop=ut.scrollTop+n}function li(){var n=i.results[i.currentIndex],t=/(<([^>]+)>)/ig;i.matchClass?ft.val(wt(n.originalObject).replace(t,"")):ft.val(n.title.replace(t,""))}function fr(n){var t=oi(n),r=null,u=null;if(t===h&&i.canSubmit){if(ct(),f.cancel(at),i.showDropdown=!1,n.preventDefault(),i.currentIndex>=0&&i.currentIndex<i.results.length){i.selectResult(i.results[i.currentIndex]);return}i.$apply(function(){i.onSubmit()});return}t===h&&i.results?(i.currentIndex>=0&&i.currentIndex<i.results.length?(n.preventDefault(),i.selectResult(i.results[i.currentIndex])):(n.preventDefault(),bt(n)),i.$apply()):t===b&&i.results&&i.canDelete?(i.currentIndex>=0&&i.currentIndex<i.results.length&&i.results[i.currentIndex].originalObject.canDelete&&(n.preventDefault(),i.deleteResult(i.results[i.currentIndex])),i.$apply()):t===c&&i.results?(n.preventDefault(),i.currentIndex+1<i.results.length&&i.showDropdown&&(i.$apply(function(){i.currentIndex++;li()}),gt&&(r=hi(),rr()<r.getBoundingClientRect().bottom&&ci(ir(r))))):t===l&&i.results?(n.preventDefault(),i.currentIndex>=1?(i.$apply(function(){i.currentIndex--;li()}),gt&&(u=ur(),u<0&&ci(u-1))):i.currentIndex===0&&i.$apply(function(){i.currentIndex=-1;ft.val(i.searchStr)})):t===w?i.results&&i.results.length>0&&i.showDropdown?i.currentIndex===-1&&i.overrideSuggestions?bt():(i.currentIndex===-1&&(i.currentIndex=0),i.selectResult(i.results[i.currentIndex]),i.$digest()):i.searchStr&&i.searchStr.length>0&&bt():t===a&&n.preventDefault()}function ai(n){return function(t,r,u,f){r||u||f||!t.data||(t=t.data);i.searching=!1;ni(ht(ti(t),i.remoteUrlDataField),n)}}function vi(n,t,r,u){t!==0&&t!==-1&&(t||r||u||(t=n.status),i.remoteUrlErrorCallback?i.remoteUrlErrorCallback(n,t,r,u):console&&console.error&&console.error("http error"))}function ct(){st&&st.resolve()}function yi(n){var u={},f=i.remoteUrl+encodeURIComponent(n);i.remoteUrlRequestFormatter&&(u={params:i.remoteUrlRequestFormatter(n)},f=i.remoteUrl);!i.remoteUrlRequestWithCredentials||(u.withCredentials=!0);ct();st=t.defer();u.timeout=st.promise;r.get(f,u).success(ai(n)).error(vi)}function pi(n){ct();st=t.defer();i.remoteApiHandler(n,st.promise).then(ai(n)).catch(vi)}function lt(){i.showDropdown=!1;i.results=[];ut&&(ut.scrollTop=0)}function wi(){i.showDropdown=ri;i.currentIndex=i.focusFirst?0:-1;i.results=[]}function er(n){var t,r,u,e,o=i.searchFields.split(","),f=[];for(typeof i.parseInput()!="undefined"&&(n=i.parseInput()(n)),t=0;t<i.localData.length;t++){for(r=!1,u=0;u<o.length;u++)e=ht(i.localData[t],o[u])||"",r=r||e.toString().toLowerCase().indexOf(n.toString().toLowerCase())>=0;r&&(f[f.length]=i.localData[t])}i.searching=!1;ni(f,n)}function or(n,t,r){if(!r)return!1;for(var u in t)if(t.hasOwnProperty(u)&&t[u].toLowerCase()===r.toLowerCase())return i.selectResult(n),!0;return!1}function bi(n){!n||n.length<et||(i.localData?i.$apply(function(){er(n)}):i.remoteApiHandler?pi(n):yi(n))}function ni(n,t){var r,u,f,e,o,h;if(n&&n.length>0)for(i.results=[],r=0;r<n.length;r++)i.titleField&&i.titleField!==""&&(e=o=wt(n[r])),u="",i.descriptionField&&(u=h=ht(n[r],i.descriptionField)),f="",i.imageField&&(f=ht(n[r],i.imageField)),i.matchClass&&(o=si(e,t),h=si(u,t)),i.results[i.results.length]={title:o,description:h,image:f,originalObject:n[r]};else i.results=[];i.autoMatch&&i.results.length===1&&or(i.results[0],{title:e,desc:u||""},i.searchStr)?i.showDropdown=!1:i.results.length!==0||ui?(i.showDropdown=!0,s.bind("click",ei)):i.showDropdown=!1}function ki(){i.localData?ni(i.localData,""):i.remoteApiHandler?pi(""):yi("")}function di(){return i.mobileDevice=window.innerWidth<=500&&window.innerHeight<=800?!0:!1,i.mobileDevice}var ft=u.find("input"),et=k,at=null,kt,dt=tt,ti,pt=null,st=null,ut=u[0].querySelector(".angucomplete-dropdown"),gt=!1,v=null,ii,ri,ui;i.controller={};i.controller.setSearchString=function(n){ft.val(n)};u.on("mousedown",function(n){n.target.id?(v=n.target.id,v===i.id+"_dropdown"&&document.body.addEventListener("click",vt)):(v=n.target.className,n.target.closest("[angucomplete-ignore]")||n.target.closest(".angucomplete-ignore")||document.body.addEventListener("click",vt))});i.currentIndex=i.focusFirst?0:null;i.searching=!1;ii=i.$watch("initialValue",function(n){n&&(ii(),fi(n,!0))});i.$watch("fieldRequired",function(n,t){n!==t&&(n?pt&&i.currentIndex!==-1?ot(!0):ot(!1):o[i.inputName].$setValidity(dt,!0))});i.$on("angucomplete-alt:clearInput",function(n,t){t&&t!==i.id||(i.searchStr=null,yt(),ot(!1),lt())});i.$on("angucomplete-alt:changeInput",function(n,t,r){!t||t!==i.id||fi(r)});i.onFocusHandler=function(){i.focusIn&&i.focusIn();et!==0||i.searchStr&&i.searchStr.length!==0||(i.currentIndex=i.focusFirst?0:i.currentIndex,i.showDropdown=!0,ki())};i.hideResults=function(){v&&(v===i.id+"_dropdown"||v.indexOf("angucomplete")>=0)?v=null:(kt=f(function(){lt();i.$apply(function(){i.searchStr&&i.searchStr.length>0&&ft.val(i.searchStr)})},nt),ct(),i.focusOut&&i.focusOut(),i.overrideSuggestions&&i.searchStr&&i.searchStr.length>0&&i.currentIndex===-1&&bt())};i.resetHideResults=function(){kt&&f.cancel(kt)};i.hoverRow=function(n){i.currentIndex=n};i.selectResult=function(n,t,r){r&&(r.preventDefault(),r.stopPropagation());i.matchClass&&(n.title=wt(n.originalObject),n.description=ht(n.originalObject,i.descriptionField));i.searchStr=i.clearSelected?null:n.title;yt(n);t!==!0&&lt()};i.deleteResult=function(n,t,r){r&&(r.preventDefault(),r.stopPropagation());typeof i.selectedObject=="function"&&(i.deletedObject(n),i.results.splice(i.results.indexOf(i.selectedObject),1))};i.focusQuantitySelector=function(n){if(di()!==!0){if(n.originalObject.SbuCode==="4300"){i.$broadcast("brickInput.toggle",n.originalObject.Id);return}focusOnId("qty-"+n.originalObject.Id,!0)}};i.mobileDevice=!0;di();i.performCustomAction=function(n,t,r,u){r&&(r.preventDefault(),r.stopPropagation());typeof i.selectedObject=="function"&&i.customAction(t,n);u&&i.selectResult(n,!1,r)};i.inputChangeHandler=function(n){return n.length<et?(ct(),lt()):n.length===0&&et===0&&(i.searching=!1,ki()),i.inputChanged&&(n=i.inputChanged(n)),n};i.fieldRequiredClass&&i.fieldRequiredClass!==""&&(dt=i.fieldRequiredClass);i.minlength&&i.minlength!==""&&(et=parseInt(i.minlength,10));i.pause||(i.pause=g);i.clearSelected||(i.clearSelected=!1);i.overrideSuggestions||(i.overrideSuggestions=!1);i.fieldRequired&&o&&(i.initialValue?ot(!0):ot(!1));i.inputType=e.type?e.type:"text";i.textSearching=e.textSearching?e.textSearching:it;i.textNoResults=e.textNoResults?e.textNoResults:rt;ri=i.textSearching==="false"?!1:!0;ui=i.textNoResults==="false"?!1:!0;i.maxlength=e.maxlength?e.maxlength:d;ft.on("keydown",fr);ft.on("keyup",tr);ti=gi("remoteUrlResponseFormatter");f(function(){var n=getComputedStyle(ut);gt=n.maxHeight&&n.overflowY==="auto"});i.$watch(function(n){return n.showDropdown},function(){i.$emit("itemsearch.showdropDown",i.showDropdown)})}var c=40,y=39,l=38,p=37,a=27,h=13,w=9,b=46,k=3,d=524288,g=500,nt=200,tt="autocomplete-required",it="Searching...",rt="No results found",v="/angucomplete-alt/index.html";return e.put(v,'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}">  <input id="{{id}}_value" name="{{inputName}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="searchStr" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(searchStr)"/>  <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="showDropdown">    <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"><\/div>    <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"><\/div>    <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}">      <div ng-if="imageField" class="angucomplete-image-holder">        <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/>        <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"><\/div>      <\/div>      <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"><\/div>      <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}<\/div>      <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"><\/div>      <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}<\/div>    <\/div>  <\/div><\/div>'),{restrict:"EA",require:"^?form",scope:{controller:"=?",selectedObject:"=",deletedObject:"=",customAction:"=",disableInput:"=",initialValue:"=",localData:"=",remoteUrlRequestFormatter:"=",remoteUrlRequestWithCredentials:"@",remoteUrlResponseFormatter:"=",remoteUrlErrorCallback:"=",remoteApiHandler:"=",id:"@",type:"@",placeholder:"@",remoteUrl:"@",remoteUrlDataField:"@",titleField:"@",descriptionField:"@",imageField:"@",inputClass:"@",pause:"@",searchFields:"@",minlength:"@",matchClass:"@",clearSelected:"@",overrideSuggestions:"@",canSubmit:"@",onSubmit:"=",canDelete:"@",fieldRequired:"=",fieldRequiredClass:"@",inputChanged:"=",autoMatch:"@",focusOut:"&",focusIn:"=",inputName:"@",focusFirst:"@",parseInput:"&",tooManyResults:"=?",mobileDevice:"=?"},templateUrl:function(n,t){return t.templateUrl||v},compile:function(n){var t=o.startSymbol(),i=o.endSymbol(),r;return t==="{{"&&i==="}}"||(r=n.html().replace(/\{\{/g,t).replace(/\}\}/g,i),n.html(r)),ut}}}])});angular.module("amChartsDirective",[]).directive("amChart",["$q",function(n){return{restrict:"E",replace:!0,scope:{options:"=",height:"=",width:"="},template:'<div class="amchart"><\/div>',link:function(t,i){var u=i[0].id,r,f;i.attr("id",u);f=function(f){var e=f||t.options,o=t.height||"100%",s=t.width||"100%";i.css({height:o,width:s});r=e.type==="xy"?e.theme?new AmCharts.AmXYChart(AmCharts.themes[e.theme]):new AmCharts.AmXYChart:e.type==="pie"?e.theme?new AmCharts.AmPieChart(AmCharts.themes[e.theme]):new AmCharts.AmPieChart:e.theme?new AmCharts.AmSerialChart(AmCharts.themes[e.theme]):new AmCharts.AmSerialChart;n.when(e.data).then(function(n){function l(){var i,s,u,f,o,t,n;if(e.categoryAxis&&(i=r.categoryAxis,i)){for(i.parseDates=!0,t=Object.keys(e.categoryAxis),n=0;n<t.length;n++)!angular.isObject(e.categoryAxis[t[n]])||angular.isArray(e.categoryAxis[t[n]])?i[t[n]]=e.categoryAxis[t[n]]:console.log("Stripped categoryAxis obj "+t[n]);r.categoryAxis=i}if(s=function(n){for(var u=new AmCharts.ValueAxis,i=Object.keys(n),t=0;t<i.length;t++)typeof n[i[t]]!="object"&&(u[i[t]]=n[i[t]]);r.addValueAxis(u)},e.valueAxes&&e.valueAxes.length>0)for(n=0;n<e.valueAxes.length;n++)s(e.valueAxes[n]);if(u=function(n){var i=new AmCharts.AmGraph,u,t;if(i.valueField=n.valueField||Object.keys(e.data[0])[1],i.balloonText='<span style="font-size:14px">[[category]]: <b>[[value]]<\/b><\/span>',n)for(u=Object.keys(n),t=0;t<u.length;t++)i[u[t]]=n[u[t]];r.addGraph(i)},e.graphs&&e.graphs.length>0)for(n=0;n<e.graphs.length;n++)u(e.graphs[n]);else u();if(f=new AmCharts.ChartCursor,e.chartCursor){for(t=Object.keys(e.chartCursor),n=0;n<t.length;n++)typeof e.chartCursor[t[n]]!="object"&&(f[t[n]]=e.chartCursor[t[n]]);r.addChartCursor(f)}if(e.chartScrollbar){for(o=new AmCharts.ChartScrollbar,t=Object.keys(e.chartScrollbar),n=0;n<t.length;n++)o[t[n]]=e.chartScrollbar[t[n]];r.chartScrollbar=o}}function a(){var i,t,n;if(e.balloon){for(i=new AmBalloon,t=Object.keys(e.chartScrollbar),n=0;n<t.length;n++)i[t[n]]=e.balloon[t[n]];r.balloon=i}}var i,o,f,s,t,h,c;for(r.dataProvider=n,r.columnSpacing=3,r.startDuration=0,r.startEffect="easeInSine",e.dataDateFormat&&(r.dataDateFormat=e.dataDateFormat),r.categoryField=e.categoryField||Object.keys(e.data[0])[0],e.guides&&(r.guides=e.guides),e.rotate&&(r.rotate=e.rotate),r.creditsPosition="top-right",i=Object.keys(e),t=0;t<i.length;t++)typeof e[i[t]]!="object"&&typeof e[i[t]]!="function"&&(r[i[t]]=e[i[t]]);if(e.legend){for(o=new AmCharts.AmLegend,f=Object.keys(e.legend),t=0;t<f.length;t++)o[f[t]]=e.legend[f[t]];r.legend=o}if(e.type==="pie"?a():l(),e.export&&(r.export=e.export),e.events)for(s=Object.keys(e.events),t=0;t<s.length;t++)h=s[t],c=e.events[h],r.addListener(h,c);r.write(u)})};t.$on("amCharts.triggerChartAnimate",function(n,t){t!==i[0].id&&t||r.animateAgain()});t.$on("amCharts.updateData",function(n,t,u){u!==i[0].id&&u||(r.dataProvider=t,r.validateData())});t.$on("amCharts.validateNow",function(n,t,u,f){f!==i[0].id&&f||r.validateNow(t===undefined?!0:t,u===undefined?!1:u)});t.$on("amCharts.renderChart",function(n,t,r){r!==i[0].id&&r||f(t)})}}}]);!function(){"use strict";function n(n,t){return n.module("angularMoment",[]).constant("angularMomentConfig",{preprocess:null,timezone:"",format:null,statefulFilters:!0}).constant("moment",t).constant("amTimeAgoConfig",{withoutSuffix:!1,serverTime:null,titleFormat:null,fullDateThreshold:null,fullDateFormat:null}).directive("amTimeAgo",["$window","moment","amMoment","amTimeAgoConfig","angularMomentConfig",function(t,i,r,u,f){return function(e,o,s){function a(){var n,t,r;return y?n=y:u.serverTime?(t=(new Date).getTime(),r=t-it+u.serverTime,n=i(r)):n=i(),n}function v(){l&&(t.clearTimeout(l),l=null)}function b(n){var f=a().diff(n,"day"),u=w&&f>=w,r,i;(o.text(u?n.format(nt):n.from(a(),p)),g&&!o.attr("title")&&o.attr("title",n.local().format(g)),u)||(r=Math.abs(a().diff(n,"minute")),i=3600,1>r?i=1:60>r?i=30:180>r&&(i=300),l=t.setTimeout(function(){b(n)},1e3*i))}function k(n){ut&&o.attr("datetime",n)}function h(){if(v(),c){var n=r.preprocessDate(c,tt,d);b(n);k(n.toISOString())}}var c,y,l=null,d=f.format,p=u.withoutSuffix,g=u.titleFormat,w=u.fullDateThreshold,nt=u.fullDateFormat,it=(new Date).getTime(),tt=f.preprocess,rt=s.amTimeAgo,ut="TIME"===o[0].nodeName.toUpperCase();e.$watch(rt,function(n){return"undefined"==typeof n||null===n||""===n?(v(),void(c&&(o.text(""),k(""),c=null))):(c=n,void h())});n.isDefined(s.amFrom)&&e.$watch(s.amFrom,function(n){y="undefined"==typeof n||null===n||""===n?null:i(n);h()});n.isDefined(s.amWithoutSuffix)&&e.$watch(s.amWithoutSuffix,function(n){"boolean"==typeof n?(p=n,h()):p=u.withoutSuffix});s.$observe("amFormat",function(n){"undefined"!=typeof n&&(d=n,h())});s.$observe("amPreprocess",function(n){tt=n;h()});s.$observe("amFullDateThreshold",function(n){w=n;h()});s.$observe("amFullDateFormat",function(n){nt=n;h()});e.$on("$destroy",function(){v()});e.$on("amMoment:localeChanged",function(){h()})}}]).service("amMoment",["moment","$rootScope","$log","angularMomentConfig",function(t,i,r,u){this.preprocessors={utc:t.utc,unix:t.unix};this.changeLocale=function(r,u){var f=t.locale(r,u);return n.isDefined(r)&&i.$broadcast("amMoment:localeChanged"),f};this.changeTimezone=function(n){u.timezone=n;i.$broadcast("amMoment:timezoneChanged")};this.preprocessDate=function(i,f,e){return n.isUndefined(f)&&(f=u.preprocess),this.preprocessors[f]?this.preprocessors[f](i,e):(f&&r.warn("angular-moment: Ignoring unsupported value for preprocess: "+f),!isNaN(parseFloat(i))&&isFinite(i)?t(parseInt(i,10)):t(i,e))};this.applyTimezone=function(n,t){return(t=t||u.timezone)?(t.match(/Z|[+-]\d\d:?\d\d/gi)?n=n.utcOffset(t):n.tz?n=n.tz(t):r.warn("angular-moment: named timezone specified but moment.tz() is undefined. Did you forget to include moment-timezone.js?"),n):n}}]).filter("amCalendar",["moment","amMoment","angularMomentConfig",function(n,t,i){function r(i,r,u){if("undefined"==typeof i||null===i)return"";i=t.preprocessDate(i,r);var f=n(i);return f.isValid()?t.applyTimezone(f,u).calendar():""}return r.$stateful=i.statefulFilters,r}]).filter("amDifference",["moment","amMoment","angularMomentConfig",function(n,t,i){function r(i,r,u,f,e,o){var h,s;if("undefined"==typeof i||null===i||(i=t.preprocessDate(i,e),h=n(i),!h.isValid()))return"";if("undefined"==typeof r||null===r)s=n();else if(r=t.preprocessDate(r,o),s=n(r),!s.isValid())return"";return t.applyTimezone(h).diff(t.applyTimezone(s),u,f)}return r.$stateful=i.statefulFilters,r}]).filter("amDateFormat",["moment","amMoment","angularMomentConfig",function(n,t,i){function r(i,r,u,f){if("undefined"==typeof i||null===i)return"";i=t.preprocessDate(i,u);var e=n(i);return e.isValid()?t.applyTimezone(e,f).format(r):""}return r.$stateful=i.statefulFilters,r}]).filter("amDurationFormat",["moment","angularMomentConfig",function(n,t){function i(t,i,r){return"undefined"==typeof t||null===t?"":n.duration(t,i).humanize(r)}return i.$stateful=t.statefulFilters,i}]).filter("amTimeAgo",["moment","amMoment","angularMomentConfig",function(n,t,i){function r(i,r,u,f){var e,o;return"undefined"==typeof i||null===i?"":(i=t.preprocessDate(i,r),e=n(i),e.isValid()?(o=n(f),"undefined"!=typeof f&&o.isValid()?t.applyTimezone(e).from(o,u):t.applyTimezone(e).fromNow(u)):"")}return r.$stateful=i.statefulFilters,r}])}"function"==typeof define&&define.amd?define(["angular","moment"],n):"undefined"!=typeof module&&module&&module.exports?(n(angular,require("moment")),module.exports="angularMoment"):n(angular,("undefined"!=typeof global?global:window).moment)}();PLACEHOLDER_SUPPORT=function(){var n=document.createElement("input");return"placeholder"in n}();angular.module("ngPlaceholder",[]).directive("placeholder",["$timeout",function(n){return{restrict:"A",link:function(t,i,r){var u=r.ngPlaceholder||r.placeholder,f=i[0].form;PLACEHOLDER_SUPPORT||(n(function(){i.val()||(i.val(u),i.addClass("placeholder"))},250),i.bind("focus",function(){i.val()===u&&(i.val(""),i.removeClass("placeholder"))}),i.bind("blur",function(){i.val()===""&&(i.addClass("placeholder"),i.val(u))}),f!==null&&angular.element(f).bind("submit",function(){return i.val()===u&&i.val(""),!0}))}}}]),function(){"use strict";function i(){for(var i="0123456789ABCDEF".split(""),n="#",t=0;t<6;t++)n+=i[Math.floor(Math.random()*16)];return n}function n(n){return n?!0:!1}function r(n,t,i){return angular.element("<svg><\/svg>").attr({xmlns:"http://www.w3.org/2000/svg","pointer-events":"none",width:n,height:t}).css({"background-color":i,width:n+"px",height:t+"px"})}function u(n,t,i,r,u){var f=n.length>2?-n.length*2:0;return angular.element('<text text-anchor="middle"><\/text>').attr({y:"50%",x:"50%",dy:"0.35em","pointer-events":"auto",fill:t,"font-family":i}).html(n).css({"font-weight":r,"font-size":u+f+"px"})}var t=angular.module("ngLetterAvatar",[]);t.constant("defaultSettings",{alphabetcolors:["#5A8770","#B2B7BB","#6FA9AB","#F5AF29","#0088B9","#F18636","#D93A37","#A6B12E","#5C9BBC","#F5888D","#9A89B5","#407887","#9A89B5","#5A8770","#D33F33","#A2B01F","#F0B126","#0087BF","#F18636","#0087BF","#B2B7BB","#72ACAE","#9C8AB4","#5A8770","#EEB424","#407887"],textColor:"#ffffff",defaultBorder:"border:5px solid white",fontsize:24,height:46,width:46,fontWeight:700,charCount:4,fontFamily:"Lato, Arial, sans-serif",base:"data:image/svg+xml;base64,",radius:"border-radius:30px;"});t.directive("ngLetterAvatar",["defaultSettings","$parse",function(t){return{restrict:"AE",scope:{alphabetcolors:"=alphabetcolors",initials:"&"},link:function(f,e,o){function h(n){for(var t=0,i=n.split(" "),r="";t<i.length;t++)r+=i[t][0];return r.toUpperCase()}var s={charCount:n(o.charcount)?o.charcount:t.charCount,textColor:t.textColor,height:n(o.height)?o.height:t.height,width:n(o.width)?o.width:t.width,fontsize:n(o.fontsize)?o.fontsize:t.fontsize,fontWeight:n(o.fontweight)?o.fontweight:t.fontWeight,fontFamily:n(o.fontfamily)?o.fontfamily:t.fontFamily,avatarBorderStyle:o.avatarcustomborder,avatardefaultBorder:o.avatarborder,defaultBorder:t.defaultBorder,shape:o.shape,alphabetcolors:f.alphabetcolors||t.alphabetcolors},c=function(n){var c,p;if(n){n=h(n);n=n.substr(0,s.charCount).toUpperCase();var w=u(n,s.textColor,s.fontFamily,s.fontWeight,s.fontsize,s.charCount),a="",o="";n.charCodeAt(0)<65?o=i():(a=Math.floor((n.charCodeAt(0)-65)%s.alphabetcolors.length),o=s.alphabetcolors[a]);c=r(s.width,s.height,o);c.append(w);var b=angular.element("<div>").append(c.clone()).html(),v=window.btoa(unescape(encodeURIComponent(b))),l,y=t.base,f="";s.avatarBorderStyle?f=s.avatarBorderStyle:s.avatardefaultBorder&&(f=s.defaultBorder);s.shape?s.shape==="round"&&(p=t.radius+f,l="<img src="+y+v+" style='"+p+"' />"):l="<img src="+y+v+" style='"+f+"' />";e.html(l)}};f.$watch(f.initials,function(n){c(n)})}}}])}(),function(n,t,i){"use strict";function e(n){return u(n)?n:Object.keys(n).map(function(t){return n[t]})}function k(n){return n===null}function l(n,t){var r=Object.keys(n);return r.map(function(r){return t[r]!==i&&t[r]==n[r]}).indexOf(!1)==-1}function a(n,t){if(t==="")return n;var i=n.indexOf(t.charAt(0));return i===-1?!1:a(n.substr(i+1),t.substr(1))}function d(n,t,i){var r=0;return n.filter(function(n){var u=y(i)?r<t&&i(n):r<t;return r=u?r+1:r,u})}function h(n,t,i){return i.round(n*i.pow(10,t))/i.pow(10,t)}function g(n,t,i){t=t||[];var f=Object.keys(n);return f.forEach(function(f){var e,o;r(n[f])&&!u(n[f])?(e=i?i+"."+f:i,g(n[f],t,e||f)):(o=i?i+"."+f:f,t.push(o))}),t}function nt(n){return n&&n.$evalAsync&&n.$watch}function tt(){return function(n,t){return n>t}}function it(){return function(n,t){return n>=t}}function rt(){return function(n,t){return n<t}}function ut(){return function(n,t){return n<=t}}function ft(){return function(n,t){return n==t}}function et(){return function(n,t){return n!=t}}function ot(){return function(n,t){return n===t}}function st(){return function(n,t){return n!==t}}function ht(n){return function(t,i){return(t=r(t)?e(t):t,!u(t)||f(i))?!1:t.some(function(t){return r(t)||p(i)?n(i)(t):t===i})}}function v(n,t){return(t=t||0,t>=n.length)?n:u(n[t])?v(n.slice(0,t).concat(n[t],n.slice(t+1)),t):v(n,t+1)}function ct(n){return function(t,i){function h(n,t){return f(t)?!1:n.some(function(n){return c(n,t)})}if(t=r(t)?e(t):t,!u(t))return t;var o=[],s=n(i);return f(i)?t.filter(function(n,t,i){return i.indexOf(n)===t}):t.filter(function(n){var t=s(n);return h(o,t)?!1:(o.push(t),!0)})}}function lt(n,t,i){return t?n+i+lt(n,--t,i):n}var y=t.isDefined,f=t.isUndefined,p=t.isFunction,o=t.isString,s=t.isNumber,r=t.isObject,u=t.isArray,w=t.forEach,b=t.extend,at=t.copy,c=t.equals;String.prototype.contains||(String.prototype.contains=function(){return String.prototype.indexOf.apply(this,arguments)!==-1});t.module("a8m.angular",[]).filter("isUndefined",function(){return function(n){return t.isUndefined(n)}}).filter("isDefined",function(){return function(n){return t.isDefined(n)}}).filter("isFunction",function(){return function(n){return t.isFunction(n)}}).filter("isString",function(){return function(n){return t.isString(n)}}).filter("isNumber",function(){return function(n){return t.isNumber(n)}}).filter("isArray",function(){return function(n){return t.isArray(n)}}).filter("isObject",function(){return function(n){return t.isObject(n)}}).filter("isEqual",function(){return function(n,i){return t.equals(n,i)}});t.module("a8m.conditions",[]).filter({isGreaterThan:tt,">":tt,isGreaterThanOrEqualTo:it,">=":it,isLessThan:rt,"<":rt,isLessThanOrEqualTo:ut,"<=":ut,isEqualTo:ft,"==":ft,isNotEqualTo:et,"!=":et,isIdenticalTo:ot,"===":ot,isNotIdenticalTo:st,"!==":st});t.module("a8m.is-null",[]).filter("isNull",function(){return function(n){return k(n)}});t.module("a8m.after-where",[]).filter("afterWhere",function(){return function(n,t){if(n=r(n)?e(n):n,!u(n)||f(t))return n;var i=n.map(function(n){return l(t,n)}).indexOf(!0);return n.slice(i===-1?0:i)}});t.module("a8m.after",[]).filter("after",function(){return function(n,t){return n=r(n)?e(n):n,u(n)?n.slice(t):n}});t.module("a8m.before-where",[]).filter("beforeWhere",function(){return function(n,t){if(n=r(n)?e(n):n,!u(n)||f(t))return n;var i=n.map(function(n){return l(t,n)}).indexOf(!0);return n.slice(0,i===-1?n.length:++i)}});t.module("a8m.before",[]).filter("before",function(){return function(n,t){return n=r(n)?e(n):n,u(n)?n.slice(0,t?--t:t):n}});t.module("a8m.chunk-by",["a8m.filter-watcher"]).filter("chunkBy",["filterWatcher",function(n){return function(t,i,r){function e(n,t){for(var i=[];n--;)i[n]=t;return i}function o(n,t,i){return u(n)?n.map(function(n,r,u){return r=r*t,n=u.slice(r,r+t),!f(i)&&n.length<t?n.concat(e(t-n.length,i)):n}).slice(0,Math.ceil(n.length/t)):n}return n.isMemoized("chunkBy",arguments)||n.memoize("chunkBy",arguments,this,o(t,i,r))}}]);t.module("a8m.concat",[]).filter("concat",[function(){return function(n,t){if(f(t))return n;if(u(n))return r(t)?n.concat(e(t)):n.concat(t);if(r(n)){var i=e(n);return r(t)?i.concat(e(t)):i.concat(t)}return n}}]);t.module("a8m.contains",[]).filter({contains:["$parse",ht],some:["$parse",ht]});t.module("a8m.count-by",[]).filter("countBy",["$parse",function(n){return function(t,i){var o={},h=n(i),s;return(t=r(t)?e(t):t,!u(t)||f(i))?t:(t.forEach(function(n){s=h(n);o[s]||(o[s]=0);o[s]++}),o)}}]);t.module("a8m.defaults",[]).filter("defaults",["$parse",function(n){return function(t,i){if(t=r(t)?e(t):t,!u(t)||!r(i))return t;var o=g(i);return t.forEach(function(t){o.forEach(function(r){var u=n(r),e=u.assign;f(u(t))&&e(t,u(i))})}),t}}]);t.module("a8m.every",[]).filter("every",["$parse",function(n){return function(t,i){return(t=r(t)?e(t):t,!u(t)||f(i))?!0:t.every(function(t){return r(t)||p(i)?n(i)(t):t===i})}}]);t.module("a8m.filter-by",[]).filter("filterBy",["$parse",function(n){return function(t,h,c){var l;return(c=o(c)||s(c)?String(c).toLowerCase():i,t=r(t)?e(t):t,!u(t)||f(c))?t:t.filter(function(t){return h.some(function(i){if(~i.indexOf("+")){var r=i.replace(new RegExp("\\s","g"),"").split("+");l=r.reduce(function(i,r,u){return u===1?n(i)(t)+" "+n(r)(t):i+" "+n(r)(t)})}else l=n(i)(t);return o(l)||s(l)?String(l).toLowerCase().contains(c):!1})})}}]);t.module("a8m.first",[]).filter("first",["$parse",function(n){return function(t){var h,o,f;return(t=r(t)?e(t):t,!u(t))?t:(f=Array.prototype.slice.call(arguments,1),h=s(f[0])?f[0]:1,o=s(f[0])?s(f[1])?i:f[1]:f[0],f.length?d(t,h,o?n(o):o):t[0])}}]);t.module("a8m.flatten",[]).filter("flatten",function(){return function(n,t){return(t=t||!1,n=r(n)?e(n):n,!u(n))?n:t?[].concat.apply([],n):v(n,0)}});t.module("a8m.fuzzy-by",[]).filter("fuzzyBy",["$parse",function(n){return function(t,i,s,h){var l=h||!1,c,v;return(t=r(t)?e(t):t,!u(t)||f(i)||f(s))?t:(v=n(i),t.filter(function(n){return(c=v(n),!o(c))?!1:(c=l?c:c.toLowerCase(),s=l?s:s.toLowerCase(),a(c,s)!==!1)}))}}]);t.module("a8m.fuzzy",[]).filter("fuzzy",function(){return function(n,t,i){function h(n,t){var u=Object.keys(n),i,r;return 0<u.filter(function(u){return(i=n[u],r)?!0:o(i)?(i=s?i:i.toLowerCase(),r=a(i,t)!==!1):!1}).length}var s=i||!1;return(n=r(n)?e(n):n,!u(n)||f(t))?n:(t=s?t:t.toLowerCase(),n.filter(function(n){return o(n)?(n=s?n:n.toLowerCase(),a(n,t)!==!1):r(n)?h(n,t):!1}))}});t.module("a8m.group-by",["a8m.filter-watcher"]).filter("groupBy",["$parse","filterWatcher",function(n,t){return function(i,u){function e(n,t){var i={},r;return w(n,function(n){r=t(n);i[r]||(i[r]=[]);i[r].push(n)}),i}return!r(i)||f(u)?i:t.isMemoized("groupBy",arguments)||t.memoize("groupBy",arguments,this,e(i,n(u)))}}]);t.module("a8m.is-empty",[]).filter("isEmpty",function(){return function(n){return r(n)?!e(n).length:!n.length}});t.module("a8m.join",[]).filter("join",function(){return function(n,t){return f(n)||!u(n)?n:(f(t)&&(t=" "),n.join(t))}});t.module("a8m.last",[]).filter("last",["$parse",function(n){return function(t){var c,h,o,f=at(t);return(f=r(f)?e(f):f,!u(f))?f:(o=Array.prototype.slice.call(arguments,1),c=s(o[0])?o[0]:1,h=s(o[0])?s(o[1])?i:o[1]:o[0],o.length?d(f.reverse(),c,h?n(h):h).reverse():f[f.length-1])}}]);t.module("a8m.map",[]).filter("map",["$parse",function(n){return function(t,i){return(t=r(t)?e(t):t,!u(t)||f(i))?t:t.map(function(t){return n(i)(t)})}}]);t.module("a8m.omit",[]).filter("omit",["$parse",function(n){return function(t,i){return(t=r(t)?e(t):t,!u(t)||f(i))?t:t.filter(function(t){return!n(i)(t)})}}]);t.module("a8m.pick",[]).filter("pick",["$parse",function(n){return function(t,i){return(t=r(t)?e(t):t,!u(t)||f(i))?t:t.filter(function(t){return n(i)(t)})}}]);t.module("a8m.range",[]).filter("range",function(){return function(n,t){for(var i=0;i<parseInt(t);i++)n.push(i);return n}});t.module("a8m.remove-with",[]).filter("removeWith",function(){return function(n,t){return f(t)?n:(n=r(n)?e(n):n,n.filter(function(n){return!l(t,n)}))}});t.module("a8m.remove",[]).filter("remove",function(){return function(n){n=r(n)?e(n):n;var t=Array.prototype.slice.call(arguments,1);return u(n)?n.filter(function(n){return!t.some(function(t){return c(t,n)})}):n}});t.module("a8m.reverse",[]).filter("reverse",[function(){return function(n){return(n=r(n)?e(n):n,o(n))?n.split("").reverse().join(""):u(n)?n.slice().reverse():n}}]);t.module("a8m.search-field",[]).filter("searchField",["$parse",function(n){return function(t){var f,o,i;return(t=r(t)?e(t):t,i=Array.prototype.slice.call(arguments,1),!u(t)||!i.length)?t:t.map(function(t){return o=i.map(function(i){return f=n(i),f(t)}).join(" "),b(t,{searchField:o})})}}]);t.module("a8m.to-array",[]).filter("toArray",function(){return function(n,t){return r(n)?t?Object.keys(n).map(function(t){return b(n[t],{$key:t})}):e(n):n}});t.module("a8m.unique",[]).filter({unique:["$parse",ct],uniq:["$parse",ct]});t.module("a8m.where",[]).filter("where",function(){return function(n,t){return f(t)?n:(n=r(n)?e(n):n,n.filter(function(n){return l(t,n)}))}});t.module("a8m.xor",[]).filter("xor",["$parse",function(n){return function(t,i,f){function o(t,i){var r=n(f);return i.some(function(n){return f?c(r(n),r(t)):c(n,t)})}return(f=f||!1,t=r(t)?e(t):t,i=r(i)?e(i):i,!u(t)||!u(i))?t:t.concat(i).filter(function(n){return!(o(n,t)&&o(n,i))})}}]);t.module("a8m.math.byteFmt",["a8m.math"]).filter("byteFmt",["$math",function(n){return function(t,i){return s(i)&&isFinite(i)&&i%1==0&&i>=0&&s(t)&&isFinite(t)?t<1024?h(t,i,n)+" B":t<1048576?h(t/1024,i,n)+" KB":t<1073741824?h(t/1048576,i,n)+" MB":h(t/1073741824,i,n)+" GB":"NaN"}}]);t.module("a8m.math.degrees",["a8m.math"]).filter("degrees",["$math",function(n){return function(t,i){if(s(i)&&isFinite(i)&&i%1==0&&i>=0&&s(t)&&isFinite(t)){var r=t*180/n.PI;return n.round(r*n.pow(10,i))/n.pow(10,i)}return"NaN"}}]);t.module("a8m.math.kbFmt",["a8m.math"]).filter("kbFmt",["$math",function(n){return function(t,i){return s(i)&&isFinite(i)&&i%1==0&&i>=0&&s(t)&&isFinite(t)?t<1024?h(t,i,n)+" KB":t<1048576?h(t/1024,i,n)+" MB":h(t/1048576,i,n)+" GB":"NaN"}}]);t.module("a8m.math",[]).factory("$math",["$window",function(n){return n.Math}]);t.module("a8m.math.max",["a8m.math"]).filter("max",["$math","$parse",function(n,t){function i(i,r){var u=i.map(function(n){return t(r)(n)});return u.indexOf(n.max.apply(n,u))}return function(t,r){return u(t)?f(r)?n.max.apply(n,t):t[i(t,r)]:t}}]);t.module("a8m.math.min",["a8m.math"]).filter("min",["$math","$parse",function(n,t){function i(i,r){var u=i.map(function(n){return t(r)(n)});return u.indexOf(n.min.apply(n,u))}return function(t,r){return u(t)?f(r)?n.min.apply(n,t):t[i(t,r)]:t}}]);t.module("a8m.math.percent",["a8m.math"]).filter("percent",["$math","$window",function(n,t){return function(i,r,u){var f=o(i)?t.Number(i):i;return(r=r||100,u=u||!1,!s(f)||t.isNaN(f))?i:u?n.round(f/r*100):f/r*100}}]);t.module("a8m.math.radians",["a8m.math"]).filter("radians",["$math",function(n){return function(t,i){if(s(i)&&isFinite(i)&&i%1==0&&i>=0&&s(t)&&isFinite(t)){var r=t*3.14159265359/180;return n.round(r*n.pow(10,i))/n.pow(10,i)}return"NaN"}}]);t.module("a8m.math.radix",[]).filter("radix",function(){return function(n,t){return!s(n)||!/^[2-9]$|^[1-2]\d$|^3[0-6]$/.test(t)?n:n.toString(t).toUpperCase()}});t.module("a8m.math.shortFmt",["a8m.math"]).filter("shortFmt",["$math",function(n){return function(t,i){return s(i)&&isFinite(i)&&i%1==0&&i>=0&&s(t)&&isFinite(t)?t<1e3?t:t<1e6?h(t/1e3,i,n)+" K":t<1e9?h(t/1e6,i,n)+" M":h(t/1e9,i,n)+" B":"NaN"}}]);t.module("a8m.math.sum",[]).filter("sum",function(){return function(n,t){return u(n)?n.reduce(function(n,t){return n+t},t||0):n}});t.module("a8m.ends-with",[]).filter("endsWith",function(){return function(n,t,i){var r=i||!1,u;return!o(n)||f(t)?n:(n=r?n:n.toLowerCase(),u=n.length-t.length,n.indexOf(r?t:t.toLowerCase(),u)!==-1)}});t.module("a8m.latinize",[]).filter("latinize",[function(){function f(n){return n.replace(/[^\u0000-\u007E]/g,function(n){return u[n]||n})}for(var r,t,i=[{base:"A",letters:"AⒶＡÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷＢḂḄḆɃƂƁ"},{base:"C",letters:"CⒸＣĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹＤḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"ǱǄ"},{base:"Dz",letters:"ǲǅ"},{base:"E",letters:"EⒺＥÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻＦḞƑꝻ"},{base:"G",letters:"GⒼＧǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽＨĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾＩÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿＪĴɈ"},{base:"K",letters:"KⓀＫḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁＬĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"Ǉ"},{base:"Lj",letters:"ǈ"},{base:"M",letters:"MⓂＭḾṀṂⱮƜ"},{base:"N",letters:"NⓃＮǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"Ǌ"},{base:"Nj",letters:"ǋ"},{base:"O",letters:"OⓄＯÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"Œ"},{base:"oe",letters:"œ"},{base:"P",letters:"PⓅＰṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆＱꝖꝘɊ"},{base:"R",letters:"RⓇＲŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈＳẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉＴṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊＵÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋＶṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌＷẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍＸẊẌ"},{base:"Y",letters:"YⓎＹỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏＺŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐａẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑｂḃḅḇƀƃɓ"},{base:"c",letters:"cⓒｃćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓｄḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"ǳǆ"},{base:"e",letters:"eⓔｅèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕｆḟƒꝼ"},{base:"g",letters:"gⓖｇǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗｈĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘｉìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙｊĵǰɉ"},{base:"k",letters:"kⓚｋḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛｌŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"ǉ"},{base:"m",letters:"mⓜｍḿṁṃɱɯ"},{base:"n",letters:"nⓝｎǹńñṅňṇņṋṉƞɲŉꞑꞥ"},{base:"nj",letters:"ǌ"},{base:"o",letters:"oⓞｏòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟｐṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠｑɋꝗꝙ"},{base:"r",letters:"rⓡｒŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢｓßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣｔṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤｕùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥｖṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦｗẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧｘẋẍ"},{base:"y",letters:"yⓨｙỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩｚźẑżžẓẕƶȥɀⱬꝣ"}],u={},n=0;n<i.length;n++)for(r=i[n].letters.split(""),t=0;t<r.length;t++)u[r[t]]=i[n].base;return function(n){return o(n)?f(n):n}}]);t.module("a8m.ltrim",[]).filter("ltrim",function(){return function(n,t){var i=t||"\\s";return o(n)?n.replace(new RegExp("^"+i+"+"),""):n}});t.module("a8m.match",[]).filter("match",function(){return function(n,t,i){var r=new RegExp(t,i);return o(n)?n.match(r):null}});t.module("a8m.repeat",[]).filter("repeat",[function(){return function(n,t,i){var r=~~t;return o(n)?r?lt(n,--t,i||""):n:n}}]);t.module("a8m.rtrim",[]).filter("rtrim",function(){return function(n,t){var i=t||"\\s";return o(n)?n.replace(new RegExp(i+"+$"),""):n}});t.module("a8m.slugify",[]).filter("slugify",[function(){return function(n,t){var i=f(t)?"-":t;return o(n)?n.toLowerCase().replace(/\s+/g,i):n}}]);t.module("a8m.starts-with",[]).filter("startsWith",function(){return function(n,t,i){var r=i||!1;return!o(n)||f(t)?n:(n=r?n:n.toLowerCase(),!n.indexOf(r?t:t.toLowerCase()))}});t.module("a8m.stringular",[]).filter("stringular",function(){return function(n){var t=Array.prototype.slice.call(arguments,1);return n.replace(/{(\d+)}/g,function(n,i){return f(t[i])?n:t[i]})}});t.module("a8m.strip-tags",[]).filter("stripTags",function(){return function(n){return o(n)?n.replace(/<\S[^><]*>/g,""):n}});t.module("a8m.test",[]).filter("test",function(){return function(n,t,i){var r=new RegExp(t,i);return o(n)?r.test(n):n}});t.module("a8m.trim",[]).filter("trim",function(){return function(n,t){var i=t||"\\s";return o(n)?n.replace(new RegExp("^"+i+"+|"+i+"+$","g"),""):n}});t.module("a8m.truncate",[]).filter("truncate",function(){return function(n,t,i,r){return(t=f(t)?n.length:t,r=r||!1,i=i||"",!o(n)||n.length<=t)?n:n.substring(0,r?n.indexOf(" ",t)===-1?n.length:n.indexOf(" ",t):t)+i}});t.module("a8m.ucfirst",[]).filter("ucfirst",[function(){return function(n){return o(n)?n.split(" ").map(function(n){return n.charAt(0).toUpperCase()+n.substring(1)}).join(" "):n}}]);t.module("a8m.uri-component-encode",[]).filter("uriComponentEncode",["$window",function(n){return function(t){return o(t)?n.encodeURIComponent(t):t}}]);t.module("a8m.uri-encode",[]).filter("uriEncode",["$window",function(n){return function(t){return o(t)?n.encodeURI(t):t}}]);t.module("a8m.wrap",[]).filter("wrap",function(){return function(n,t,i){return o(n)&&y(t)?[t,n,i||t].join(""):n}});t.module("a8m.filter-watcher",[]).provider("filterWatcher",function(){this.$get=["$window","$rootScope",function(n,t){function e(t,i){function u(){var t=[];return function(i,u){if(r(u)&&!k(u)){if(~t.indexOf(u))return"[Circular]";t.push(u)}return n==u?"$WINDOW":n.document==u?"$DOCUMENT":nt(u)?"$SCOPE":u}}return[t,JSON.stringify(i,u())].join("#").replace(/"/g,"")}function s(n){var t=n.targetScope.$id;w(i[t],function(n){delete u[n]});delete i[t]}function h(){o(function(){t.$$phase||(u={})},2e3)}function c(n,t){var r=n.$id;return f(i[r])&&(n.$on("$destroy",s),i[r]=[]),i[r].push(t)}function l(n,t){var i=e(n,t);return u[i]}function a(n,t,i,r){var f=e(n,t);return u[f]=r,nt(i)?c(i,f):h(),r}var u={},i={},o=n.setTimeout;return{isMemoized:l,memoize:a}}]});t.module("angular.filter",["a8m.ucfirst","a8m.uri-encode","a8m.uri-component-encode","a8m.slugify","a8m.latinize","a8m.strip-tags","a8m.stringular","a8m.truncate","a8m.starts-with","a8m.ends-with","a8m.wrap","a8m.trim","a8m.ltrim","a8m.rtrim","a8m.repeat","a8m.test","a8m.match","a8m.to-array","a8m.concat","a8m.contains","a8m.unique","a8m.is-empty","a8m.after","a8m.after-where","a8m.before","a8m.before-where","a8m.defaults","a8m.where","a8m.reverse","a8m.remove","a8m.remove-with","a8m.group-by","a8m.count-by","a8m.chunk-by","a8m.search-field","a8m.fuzzy-by","a8m.fuzzy","a8m.omit","a8m.pick","a8m.every","a8m.filter-by","a8m.xor","a8m.map","a8m.first","a8m.last","a8m.flatten","a8m.join","a8m.range","a8m.math","a8m.math.max","a8m.math.min","a8m.math.percent","a8m.math.radix","a8m.math.sum","a8m.math.degrees","a8m.math.radians","a8m.math.byteFmt","a8m.math.kbFmt","a8m.math.shortFmt","a8m.angular","a8m.conditions","a8m.is-null","a8m.filter-watcher"])}(window,window.angular),function(n,t){"use strict";typeof define=="function"&&define.amd?define(["angular"],function(n){t(n)}):typeof exports=="object"?t(require("angular")):t(n.angular)}(this,function(n,t){function k(n,t){var r=[];for(var i in n.path){if(n.path[i]!==t.path[i])break;r.push(n.path[i])}return r}function d(t){if(Object.keys)return Object.keys(t);var i=[];return n.forEach(t,function(n,t){i.push(t)}),i}function et(n,t){var i=[];for(var r in n)t&&t.indexOf(r)!==-1||i.push(r);return i}function g(n,t){if(Array.prototype.indexOf)return n.indexOf(t,Number(arguments[2])||0);var r=n.length>>>0,i=Number(arguments[2])||0;for(i=i<0?Math.ceil(i):Math.floor(i),i<0&&(i+=r);i<r;i++)if(i in n&&n[i]===t)return i;return-1}function ot(n,t,i,r){var f=k(i,r),u,h={},c=[],e,s;for(e in f)if(f[e].params&&(u=w(f[e].params)?f[e].params:d(f[e].params),u.length))for(s in u)g(c,u[s])>=0||(c.push(u[s]),h[u[s]]=n[u[s]]);return o({},h,t)}function st(n,t){return o(new(o(function(){},{prototype:n})),t)}function ht(n){p.push(n)}function nt(){a=t}function it(t,r){var f=r,s=f.inheritParams,a=f.objectKeys,h=f.protoKeys,o=f.forEach,c=f.map,u={},l={},e=!1;this.registerStickyState=function(n){l[n.name]=n};this.enableDebug=this.debugMode=function(t){return n.isDefined(t)&&(e=t),e};this.$get=["$rootScope","$state","$stateParams","$injector","$log",function(t,r,f,l,a){function b(){var t={};return n.forEach(u,function(n){for(var i,u=d(n),r=0;r<u.length;r++)i=u[r].parent,t[i.name]=t[i.name]||[],t[i.name].push(n);t[""]&&(t.__inactives=t[""])}),t}function k(){var n={};return o(u,function(t){o(t.path,function(i){i!==t&&(n[i.name]=n[i.name]||[],n[i.name].push(t))})}),n}function d(n){var t=[];if(!n)return t;do n.sticky&&t.push(n),n=n.parent;while(n);return t.reverse(),t}function g(n,t,i,r){var f,e;return r?"reload":(f=u[n.self.name],!f)?"enter":n.self===i?"reload":(e=p(n.ownParams,t,f.locals.globals.$stateParams),e?"reactivate":"reload")}function y(n,t){var i=u[n.name],r;return i?t?(r=p(n.ownParams,t,i.locals.globals.$stateParams),r?i:null):i:null}function p(n,t,i){return typeof n.$$equals=="function"?n.$$equals(t,i):nt(t,i,n)}function nt(t,i,r){var e,u,f;if(!n.isArray(r)&&n.isObject(r)&&(r=h(r,["$$keys","$$values","$$equals","$$validates","$$new","$$parent"])),!r){r=[];for(e in t)r.push(e)}for(u=0;u<r.length;u++)if(f=r[u],t[f]!=i[f])return!1;return!0}function tt(n){var u=n.fromState.path,e=n.toState.path,o=n.toParams,t=0,i=e[t];for(n.options&&n.options.inherit&&(o=n.toParams=s(f,o||{},r.$current,n.toState));i&&i===u[t]&&p(i.ownParams,o,n.fromParams);)i=e[++t];return{keep:t,retained:u.slice(0,t),exiting:u.slice(t),entering:e.slice(t)}}function w(n,t){return n.name.split(".").length-t.name.split(".").length}var v={getInactiveStates:function(){return c(u,n.identity).sort(w)},getInactiveStatesByParent:function(){return b()},processTransition:function(t){function f(n){return function(t){return n.indexOf(t)===-1}}function a(n,t){return n.concat(t)}function r(n){return function(t){return t[n]}}function c(n){return function(t){return t.type===n}}function y(n){return function(t){return t.parent===n}}function nt(n){return!n.sticky}var i=tt(t),o=v.getInactiveStates(),l,u,s,h=i.keep,d=f(i.entering),it=i.exiting[0]&&i.exiting[0].sticky&&i.entering.length>0,e;u=i.exiting.map(function(n){var t=i.entering.indexOf(n)!==-1,r=it&&!t?"inactivate":"exit";return{type:r,state:n}});e=t.options&&!!t.options.reload;s=i.entering.map(function(n){var i=g(n,t.toParams,t.reloadStateTree,e);return e=e||i==="reload",{type:i,state:n}});var p=i.entering.map(function(n){return o.filter(y(n.parent))}).reduce(a,[]).filter(d).filter(nt).concat(o.filter(y(t.toState))),rt=k(),b=p.map(function(n){return rt[n.name]}).filter(n.isDefined).reduce(a,[]).concat(p).sort(w),ut=u.filter(c("exit")).map(r("state")).concat(b);return l=o.filter(f(ut)).filter(f(i.entering)).concat(u.filter(c("inactivate")).map(r("state"))).sort(w),{keep:h,enter:new Array(h).concat(s.map(r("type"))),exit:new Array(h).concat(u.map(r("type"))),inactives:l,reactivatingStates:s.filter(c("reactivate")).map(r("state")),orphans:b}},stateInactivated:function(n){u[n.self.name]=n;n.self.status="inactive";n.self.onInactivate&&l.invoke(n.self.onInactivate,n.self,n.locals.globals)},stateReactivated:function(n){u[n.self.name]&&delete u[n.self.name];n.self.status="entered";n.self.onReactivate&&l.invoke(n.self.onReactivate,n.self,n.locals.globals)},stateExiting:function(t,r,f){var o={};n.forEach(r,function(n){o[n.self.name]=!0});n.forEach(u,function(r,f){!o[f]&&r.includes[t.name]&&(e&&a.debug("Exiting "+f+" because it's a substate of "+t.name+" and wasn't found in ",o),r.self.onExit&&l.invoke(r.self.onExit,r.self,r.locals.globals),n.forEach(r.locals,function(n,t){delete i.locals[t]}),r.locals=null,r.self.status="exited",delete u[f])});f&&l.invoke(f,t.self,t.locals.globals);t.locals=null;t.self.status="exited";delete u[t.self.name]},stateEntering:function(n,t,i,r){var u=y(n),f;u&&(r||!y(n,t))&&(f=n.locals,this.stateExiting(u),n.locals=f);n.self.status="entered";i&&l.invoke(i,n.self,n.locals.globals)},reset:function(i,u){function o(n){v.reset(n)}var f,e;return i==="*"?(n.forEach(v.getInactiveStates(),o),!0):(f=r.get(i),!f)?!1:(e=y(f,u),!e)?!1:(v.stateExiting(e),t.$broadcast("$viewContentLoading"),!0)}};return v}]}function c(n){return{resolve:{},locals:{globals:r&&r.locals&&r.locals.globals},views:{},self:{},params:{},ownParams:v.hasParamSet?{$$equals:function(){return!0}}:[],surrogateType:n}}var y=n.module("ct.ui.router.extras.core",["ui.router"]),l={},p=[],a,tt;y.config(["$stateProvider","$injector",function(t){t.decorator("parent",function(t,i){return l[t.self.name]=t,t.self.$$state=function(){return l[t.self.name]},n.forEach(p,function(n){n(t)}),i(t)})}]);var e=n.forEach,o=n.extend,w=n.isArray,b=function(n,t){"use strict";var i=[];return e(n,function(n,r){i.push(t(n,r))}),i},rt=function(n){"use strict";return b(n,function(n,t){return t})},ut=function(n,t){"use strict";var i=[];return e(n,function(n,r){t(n,r)&&i.push(n)}),i},ft=function(n,t){"use strict";var i={};return e(n,function(n,r){t(n,r)&&(i[r]=n)}),i};y.provider("uirextras_core",function(){var t={internalStates:l,onStateRegistered:ht,forEach:e,extend:o,isArray:w,map:b,keys:rt,filter:ut,filterObj:ft,ancestors:k,objectKeys:d,protoKeys:et,arraySearch:g,inheritParams:ot,inherit:st};n.extend(this,t);this.$get=function(){return t}});n.module("ct.ui.router.extras.dsr",["ct.ui.router.extras.core"]).config(["$provide",function(n){var t;n.decorator("$state",["$delegate","$q",function(n,i){return t=n.transitionTo,n.transitionTo=function(r,u,f){return f&&f.ignoreDsr&&(a=f.ignoreDsr),t.apply(n,arguments).then(function(n){return nt(),n},function(n){return nt(),i.reject(n)})},n}])}]);n.module("ct.ui.router.extras.dsr").service("$deepStateRedirect",["$rootScope","$state","$injector",function(i,r,u){function h(n){var t=n.name;if(e.hasOwnProperty(t))return e[t];l(t)}function o(t){var r=t.deepStateRedirect||t.dsr,i;return r?(i={dsr:!0},n.isFunction(r)?i.fn=r:n.isObject(r)&&(i=n.extend(i,r)),n.isString(i["default"])&&(i["default"]={state:i["default"]}),i.fn||(i.fn=["$dsr$",function(n){return n.redirect.state!=n.to.state}]),i):{dsr:!1}}function l(n){var i=r.get(n),s,u,h;return i?(s=o(i),s.dsr&&(e[i.name]=c,f[n]===t&&(f[n]={})),u=i.$$state&&i.$$state().parent,u&&(h=l(u.self.name),h&&e[i.name]===t&&(e[i.name]=y)),e[i.name]||!1):!1}function v(i,r){r===!0&&(r=Object.keys(i));(r===null||r===t)&&(r=[]);var u={};return n.forEach(r.sort(),function(n){u[n]=i[n]}),u}function s(t,i){function f(n){return n?n.toString():n}var u=v(t,i),r={};return n.forEach(u,function(n,t){r[t]=f(n)}),n.toJson(r)}var f={},e={},c="Redirect",y="AncestorRedirect";return i.$on("$stateChangeStart",function(t,i,e){var y=o(i),w,l,b,p,k;!a&&(h(i)===c||y["default"])&&(w=s(e,y.params),l=f[i.name][w]||y["default"],l)&&(b={redirect:{state:l.state,params:l.params},to:{state:i.name,params:e}},p=u.invoke(y.fn,i,{$dsr$:b}),p)&&(p.state&&(l=p),t.preventDefault(),k=v(e,y.params),r.go(l.state,n.extend(k,l.params)))}),i.$on("$stateChangeSuccess",function(t,i,u){var c=h(i),e;c&&(e=i.name,n.forEach(f,function(t,h){var c=o(r.get(h)),l=s(u,c.params);i.$$state().includes[h]&&(f[h][l]={state:e,params:n.copy(u)})}))}),{getRedirect:function(n,t){var i=r.get(n);h(i);var e=o(i),c=s(t,e.params),u=f[i.name];return u&&u[c]?u[c]:e["default"]},reset:function(t,i){var u,e;if(t){if(u=r.get(t),!u)throw new Error("Unknown state: "+t);f[u.name]&&(i?(e=s(i,o(u).params),delete f[u.name][e]):f[u.name]={})}else n.forEach(f,function(n,t){f[t]={}})}}}]);n.module("ct.ui.router.extras.dsr").run(["$deepStateRedirect",function(){}]);n.module("ct.ui.router.extras.sticky",["ct.ui.router.extras.core"]);tt=n.module("ct.ui.router.extras.sticky");it.$inject=["$stateProvider","uirextras_coreProvider"];tt.provider("$stickyState",it);var u,l={},r,s=[],f,i,h={},v={hasParamSet:!1};n.module("ct.ui.router.extras.sticky").run(["$stickyState",function(n){u=n}]);n.module("ct.ui.router.extras.sticky").config(["$provide","$stateProvider","$stickyStateProvider","$urlMatcherFactoryProvider","uirextras_coreProvider",function(e,o,l,a,y){function tt(t,i,r){function f(n,t,i){return n[t]?n[t].toUpperCase()+": "+i.self.name:"("+i.self.name+")"}var e=p(r.inactives,function(n){return n.self.name}),o=p(i.toState.path,function(n,t){return f(r.enter,t,n)}),s=p(i.fromState.path,function(n,t){return f(r.exit,t,n)}),h=i.fromState.self.name+": "+n.toJson(i.fromParams)+":  -> "+i.toState.self.name+": "+n.toJson(i.toParams);t.debug("------------------------------------------------------");t.debug("   Current transition: ",h);t.debug("Before transition, inactives are:   : ",p(u.getInactiveStates(),function(n){return n.self.name}));t.debug("After transition,  inactives will be: ",e);t.debug("Transition will exit:  ",s);t.debug("Transition will enter: ",o)}function it(n,t){n.debug("Current state: "+t.self.name+", inactive states: ",p(u.getInactiveStates(),function(n){return n.self.name}));for(var e=function(n,t){return t!="globals"&&t!="resolve"},f=function(n){var t=nt(n.locals,e);return Object.keys(t).length||(t[""]={$$state:{name:null}}),p(t,function(t,i){return{localsFor:n.self.name?n.self.name:"(root)",uiViewName:i||null,filledByState:t.$$state.name}})},r=f(t),i=t.parent;i&&i!==t;)r=r.concat(f(i)),t=i,i=t.parent;n.debug("Views active on each state:");console.table(r.reverse())}var w=y,k=w.internalStates,d=w.inherit,rt=w.inheritParams,b=w.forEach,p=w.map,nt=w.filterObj,g;v.hasParamSet=!!a.ParamSet;i=n.extend(new c("__inactives"),{self:{name:"__inactives"}});r=f=t;s=[];y.onStateRegistered(function(n){n.self.sticky===!0&&l.registerStickyState(n.self)});e.decorator("$state",["$delegate","$log","$q",function(e,o,y){return r=e.$current,k[""]=r,r.parent=i,i.parent=t,i.locals=d(h,i.locals),r.locals=d(i.locals,r.locals),delete i.locals.globals,g=e.transitionTo,e.transitionTo=function(t,w,d){function hi(t){var i=n.extend(new c("reactivate_phase1"),{locals:t.locals});return i.self=n.extend({},t.self),i}function ci(t){var i=n.extend(new c("reactivate_phase2"),t),r=i.self.onEnter;return i.resolve={},i.views={},i.self.onEnter=function(){i.locals=t.locals;u.stateReactivated(t)},nt.addRestoreFunction(function(){t.self.onEnter=r}),i}function li(n){var t=new c("inactivate"),i;return t.self=n.self,i=n.self.onExit,t.self.onExit=function(){u.stateInactivated(n)},nt.addRestoreFunction(function(){n.self.onExit=i}),t}function ai(n,t){var i=n.self.onEnter;return n.self.onEnter=function(){u.stateEntering(n,t,i)},nt.addRestoreFunction(function(){n.self.onEnter=i}),n}function vi(n,t){var i=n.self.onEnter;return n.self.onEnter=function(){u.stateEntering(n,t,i,!0)},nt.addRestoreFunction(function(){n.self.onEnter=i}),n}function fi(n){var t=n.self.onExit;return n.self.onExit=function(){u.stateExiting(n,vt,t)},nt.addRestoreFunction(function(){n.self.onExit=t}),n}var ot=l.debugMode(),ni,ui,nt,ut,ht,yt,pt,ct,lt,ei,et,ft,kt,dt,gt,oi;i.locals||(i.locals=r.locals);ni=s.length;f&&(f(),ot&&o.debug("Restored paths from pending transition"));var st=e.$current,si=e.params,ti=d&&d.relative||e.$current,ii=e.get(t,ti),at,wt,rt,bt=[],vt=[],ri;return w=w||{},arguments[1]=w,ui=function(){},nt=function(){at&&(ut.path=at,at=null);wt&&(st.path=wt,wt=null);n.forEach(nt.restoreFunctions,function(n){n()});nt=ui;f=null;s.splice(ni,1)},nt.restoreFunctions=[],nt.addRestoreFunction=function(n){this.restoreFunctions.push(n)},ii&&(ut=k[ii.name],ut&&(at=ut.path,wt=st.path,ht=d&&d.reload||!1,yt=ht&&(ht===!0?at[0].self:e.get(ht,ti)),d&&ht&&ht!==!0&&delete d.reload,pt={toState:ut,toParams:w||{},fromState:st,fromParams:si||{},options:d,reloadStateTree:yt},s.push(pt),f=nt,yt&&(pt.toParams.$$uirouterextrasreload=Math.random(),ct=yt.$$state().params,lt=yt.$$state().ownParams,v.hasParamSet?(ei=new a.Param("$$uirouterextrasreload"),ct.$$uirouterextrasreload=lt.$$uirouterextrasreload=ei,nt.restoreFunctions.push(function(){delete ct.$$uirouterextrasreload;delete lt.$$uirouterextrasreload})):(ct.push("$$uirouterextrasreload"),lt.push("$$uirouterextrasreload"),nt.restoreFunctions.push(function(){ct.length=ct.length-1;lt.length=lt.length-1}))),rt=u.processTransition(pt),ot&&tt(o,pt,rt),et=ut.path.slice(0,rt.keep),ft=st.path.slice(0,rt.keep),n.forEach(i.locals,function(n,t){t.indexOf("@")!=-1&&delete i.locals[t]}),kt=function(n){return function(t,i){i.indexOf("@")!==-1&&(n[i]=t)}},b(rt.inactives,function(n){b(n.locals,kt(i.locals))}),b(rt.reactivatingStates,function(n){b(n.locals,kt(h))}),nt.addRestoreFunction(function(){b(h,function(n,t){delete h[t]})}),n.forEach(rt.enter,function(n,t){var r,i=ut.path[t];n==="reactivate"?(r=hi(i),et.push(r),ft.push(r),bt.push(ci(i)),ri=i):n==="reload"?(et.push(vi(i)),ri=i):n==="enter"&&et.push(ai(i))}),n.forEach(rt.exit,function(n,t){var i=st.path[t];n==="inactivate"?(ft.push(li(i)),vt.push(i)):n==="exit"&&(ft.push(fi(i)),vt.push(i))}),bt.length&&n.forEach(bt,function(n){et.push(n)}),dt=rt.orphans,ft=ft.concat(p(dt,function(n){return fi(n)})),vt=vt.concat(dt),st.path=ft,ut.path=et,gt=function(n){return(n.surrogateType?n.surrogateType+":":"")+n.self.name},ot&&o.debug("SurrogateFromPath: ",p(ft,gt)),ot&&o.debug("SurrogateToPath:   ",p(et,gt)))),oi=g.apply(e,arguments),oi.then(function(n){return nt(),ot&&it(o,k[n.name],e),n.status="active",n},function(n){return nt(),ot&&n.message!=="transition prevented"&&n.message!=="transition aborted"&&n.message!=="transition superseded"&&(o.debug("transition failed",n),o.debug(n.stack)),y.reject(n)})},e}])}]),function(n,t){function u(t,i,r,u){function p(t,i){var r=n.isObject(t)?t.name:t;return i?f[r]:k[r]}function w(n,t){var r,e,i,s,h,c,u,o;if(t.name)for(r=t.name.split(/\./),t.name.charAt(0)==="."&&(r[0]=n.current.name);r.length;){if(e=r.join("."),n.get(e,{relative:n.current}))return null;if(f[e])return f[e];r.pop()}if(t.url){i=[];for(s in f)h=f[s].urlMatcher,h&&h.exec(t.url)&&i.push(f[s]);for(c=i.slice(0),u=i.length-1;u>=0;u--)for(o=0;o<c.length;o++)i[u]===c[o].parentFutureState&&i.splice(u,1);return i[0]}}function c(n,t){function v(){delete f[t.name]}function y(n){return a==="remove"&&v(),r.reject(n)}var r,o,s,u,h,i,a;if(e=!0,r=n.get("$q"),!t)return o=r.defer(),o.reject("No lazyState passed in "+t),o.promise;if(s=r.when([]),u=t.parentFutureState,u&&f[u.name]&&(s=c(n,f[u.name])),h=t.type,i=l[h],!i)throw Error("No state factory for futureState.type: "+(t&&t.type));return a=i.$options&&i.$options.failedLazyLoadPolicy||"remove",s.then(function(r){var u=n.invoke(i,i,{futureState:t});return u.then(function(n){return v(),n&&r.push(n),r})}).catch(y)}function d(n,i){var r=!1,f=["$rootScope","$urlRouter","$state",function(u,f,s){function l(){r=!0;f.sync();r=!1}if(!v){o().then(l);v=!0;return}var a=w(s,{url:i.path()});if(!a)return n.invoke(h);c(n,a).then(function(n){n.forEach(function(n){n&&(!s.get(n)||n.name&&!s.get(n.name))&&t.state(n)});e=!1;l()},function(){e=!1;l()})}],u;if(!e)return u=r?h:f,n.invoke(u)}var b=u,k=b.internalStates,l={},f={},e=!1,a=[],o,v=!1,y=this,h,s;this.addResolve=function(n){a.push(n)};this.stateFactory=function(n,t){l[n]=t};this.futureState=function(t){var e,o,i,u,s;if(t.stateName&&(t.name=t.stateName),t.urlPrefix&&(t.url="^"+t.urlPrefix),f[t.name]=t,o=t.name.split(/\./).slice(0,-1).join("."),i=p(t.parent||o),i)e=i.url||i.navigable&&i.navigable.url;else if(o==="")e=r.compile("");else{if(u=p(t.parent||o,!0),!u)throw new Error("Couldn't determine parent state of future state. FutureState:"+n.toJson(t));s=u.urlMatcher?u.urlMatcher.source.replace(/\*rest$/,""):"";e=r.compile(s);t.parentFutureState=u}t.url&&(t.urlMatcher=t.url.charAt(0)==="^"?r.compile(t.url.substring(1)+"*rest"):e.concat(t.url+"*rest"))};this.get=function(){return n.extend({},f)};h=["$log","$location",function(){}];i.otherwise(d);i.otherwise=function(t){if(n.isString(t)){var r=t;t=function(){return r}}else if(!n.isFunction(t))throw new Error("'rule' must be a function");return h=["$injector","$location",t],i};s={getResolvePromise:function(){return o()}};this.$get=["$injector","$state","$q","$rootScope","$urlRouter","$timeout","$log",function(i,r,u,f,h,l){function v(){if(f.$on("$stateNotFound",function(n,u,f,o){var s,h;e||(s=w(r,{name:u.to}),s)&&(n.preventDefault(),h=c(i,s),h.then(function(n){n.forEach(function(n){n&&(!r.get(n)||n.name&&!r.get(n.name))&&t.state(n)});r.go(u.to,u.toParams,u.options);e=!1},function(n){console.log("failed to lazy load state ",n);f.name&&r.go(f,o);e=!1}))}),!o){var s=[];n.forEach(a,function(n){s.push(i.invoke(n))});o=function(){return u.all(s)}}o().then(function v(){l(function(){r.transition?r.transition.then(v,v):h.sync()})})}return v(),s.state=t.state,s.futureState=y.futureState,s.get=y.get,s}]}var r=n.module("ct.ui.router.extras.future",["ct.ui.router.extras.core"]),i;u.$inject=["$stateProvider","$urlRouterProvider","$urlMatcherFactoryProvider","uirextras_coreProvider"];r.provider("$futureState",u);i={state:function(n){i.$rootScope&&i.$rootScope.$broadcast("$stateAdded",n)},itsNowRuntimeOhWhatAHappyDay:function(n){i.$rootScope=n},$rootScope:t};r.config(["$stateProvider",function(t){var r=t.state;t.state=function(){var u=r.apply(t,arguments),f=n.isObject(arguments[0])?arguments[0]:arguments[1];return i.state(f),u}}]);r.run(["$futureState",function(n,t){i.itsNowRuntimeOhWhatAHappyDay(t)}])}(n);n.module("ct.ui.router.extras.previous",["ct.ui.router.extras.core","ct.ui.router.extras.transition"]).service("$previousState",["$rootScope","$state","$q",function(n,i,r){var u=null,e=null,f={},o;return n.$on("$transitionStart",function(n,t){function f(){e=null}function o(){u=e}var i=t.from,r=i.state&&i.state.$$state&&i.state.$$state();r&&(e=u,u=t.from,t.promise.then(f)["catch"](o))}),o={get:function(n){return n?f[n]:u},set:function(n,t,r){f[n]={state:i.get(t),params:r}},go:function(n,t){var u=o.get(n);return u?i.go(u.state,u.params,t):r.reject(new Error("no previous state "+(n?"for memo: "+n:"")))},memo:function(n,t,r){f[n]=u||{state:i.get(t),params:r}},forget:function(n){n?delete f[n]:u=t}}}]);n.module("ct.ui.router.extras.previous").run(["$previousState",function(){}]);n.module("ct.ui.router.extras.transition",["ct.ui.router.extras.core"]).config(["$provide",function(t){t.decorator("$state",["$delegate","$rootScope","$q","$injector",function(t,i,r,u){function c(t){var i=u.invoke,r=u.instantiate;return u.invoke=function(r,u,f){return i(r,u,n.extend({$transition$:t},f))},u.instantiate=function(i,u){return r(i,n.extend({$transition$:t},u))},function(){u.invoke=i;u.instantiate=r}}function s(){o.pop()();e.pop();f--}function l(n,t){return function(r){return s(),i.$broadcast("$transitionSuccess",t),n.resolve(r),r}}function a(n,t){return function(u){return s(),i.$broadcast("$transitionError",t,u),n.reject(u),r.reject(u)}}var h=t.transitionTo,f=-1,e=[],o=[];return t.transitionTo=function(){var n=r.defer(),i=e[++f]={promise:n.promise},u;return o[f]=function(){},u=h.apply(t,arguments),u.then(l(n,i),a(n,i))},i.$on("$stateChangeStart",function(t,r,u,s,h){if(!(f>=e.length)){var l=f,a=n.extend(e[l],{to:{state:r,params:u},from:{state:s,params:h}}),v=c(a);o[l]=v;i.$broadcast("$transitionStart",a)}}),t}])}]),function(){"use strict";function i(t,i,r){return{scope:{width:"@",height:"@"},restrict:"AE",template:"<svg><\/svg>",link:function(i,u){function g(t){t=t.map(function(t){return t.name===""?f:n.copy(t)});n.extend(p,t.reduce(function(n,t){return n[t.name]=t,n},{}));t.forEach(function(n){var i=n.name.split(/\./).slice(0,-1).join("."),t=n.name!=i&&p[i];t&&((t.children||(t.children=[])).push(n),n.px=t.px,n.py=t.py,o.push(n))})}function k(){function r(n){var t=n.name.split(".").pop();return n.sticky&&(t+=" (STICKY)"),n.deepStateRedirect&&(t+=" (DSR)"),t}var t,n,i;a=a.data(l.nodes(f),function(n){return n.name});v=v.data(l.links(o),function(n){return n.target.name});y=y.data(e);o.forEach(function(n){n.y=n.depth*70});t=a.enter();y.enter().append("circle").attr("class","active").attr("r",13).attr("cx",function(n){return n.parent.px||100}).attr("cy",function(n){return n.parent.py||100});t.append("circle").attr("class","node").attr("r",9).attr("cx",function(n){return n.parent.px}).attr("cy",function(n){return n.parent.py});t.append("text").attr("class","label").attr("x",function(n){return n.parent.px}).attr("y",function(n){return n.parent.py}).attr("text-anchor",function(){return"middle"}).text(r).style("fill-opacity",1);v.enter().insert("path",".node").attr("class","link").attr("d",function(n){var t={x:n.source.px,y:n.source.py};return w({source:t,target:t})});n=s.transition().duration(d);n.selectAll(".link").attr("d",w);i={entered:"#AF0",exited:"#777",active:"#0f0",inactive:"#55F",future:"#009"};n.selectAll(".node").attr("cx",function(n){return n.px=n.x}).attr("cy",function(n){return n.py=n.y}).attr("r",function(n){return n.status==="active"?15:10}).style("fill",function(n){return i[n.status]||"#FFF"});n.selectAll(".label").attr("x",function(n){return n.px=n.x}).attr("y",function(n){return n.py=n.y-15}).attr("transform",function(n){return"rotate(-25 "+n.x+" "+n.y+")"});n.selectAll(".active").attr("x",function(n){return n.px=n.x}).attr("y",function(n){return n.py=n.y-15})}var p={},h=i.width||400,c=i.height||400,l=d3.layout.tree().size([h-20,c-20]).separation(function(n,t){return n.parent==t.parent?10:25}),f=t.get().filter(function(n){return n.name===""})[0],o=l(f),e;f.parent=f;f.px=f.x=h/2;f.py=f.y=c/2;e={};e.px=e.x=f.px;e.py=e.y=f.py;var w=d3.svg.diagonal(),s=d3.select(u.find("svg")[0]).attr("width",h).attr("height",c).append("g").attr("transform","translate(10, 10)"),a=s.selectAll(".node"),v=s.selectAll(".link"),y=s.selectAll(".active"),b=200,d=200,nt=setInterval(k,b);r(function(){i.states=t.get();n.forEach(o,function(n){var i=t.get(n.name);i&&(n.status=i.status||"exited")})},250);i.$watchCollection("states",function(n,t){var i=(t||[]).map(function(n){return n.name});g((n||[]).filter(function(n){return i.indexOf(n.name)==-1}))});k(b)}}}var t=n.module("ct.ui.router.extras.statevis",["ct.ui.router.extras.core","ct.ui.router.extras.sticky"]);t.directive("stateVis",["$state","$timeout","$interval",i])}();n.module("ct.ui.router.extras",["ct.ui.router.extras.core","ct.ui.router.extras.dsr","ct.ui.router.extras.future","ct.ui.router.extras.previous","ct.ui.router.extras.statevis","ct.ui.router.extras.sticky","ct.ui.router.extras.transition"])}),function(){"use strict";angular.module("ui.tree",[]).constant("treeConfig",{treeClass:"angular-ui-tree",emptyTreeClass:"angular-ui-tree-empty",hiddenClass:"angular-ui-tree-hidden",nodesClass:"angular-ui-tree-nodes",nodeClass:"angular-ui-tree-node",handleClass:"angular-ui-tree-handle",placeholderClass:"angular-ui-tree-placeholder",dragClass:"angular-ui-tree-drag",dragThreshold:3,defaultCollapsed:!1,appendChildOnHover:!0})}(),function(){"use strict";angular.module("ui.tree").controller("TreeHandleController",["$scope","$element",function(n,t){this.scope=n;n.$element=t;n.$nodeScope=null;n.$type="uiTreeHandle"}])}(),function(){"use strict";angular.module("ui.tree").controller("TreeNodeController",["$scope","$element",function(n,t){function i(n){if(!n)return 0;var u=0,t=n.childNodes(),f,e,r;if(!t||t.length===0)return 0;for(r=t.length-1;r>=0;r--)f=t[r],e=1+i(f),u=Math.max(u,e);return u}this.scope=n;n.$element=t;n.$modelValue=null;n.$parentNodeScope=null;n.$childNodesScope=null;n.$parentNodesScope=null;n.$treeScope=null;n.$handleScope=null;n.$type="uiTreeNode";n.$$allowNodeDrop=!1;n.collapsed=!1;n.expandOnHover=!1;n.init=function(i){var r=i[0];n.$treeScope=i[1]?i[1].scope:null;n.$parentNodeScope=r.scope.$nodeScope;n.$modelValue=r.scope.$modelValue[n.$index];n.$parentNodesScope=r.scope;r.scope.initSubNode(n);t.on("$destroy",function(){r.scope.destroySubNode(n)})};n.index=function(){return n.$parentNodesScope.$modelValue.indexOf(n.$modelValue)};n.dragEnabled=function(){return!(n.$treeScope&&!n.$treeScope.dragEnabled)};n.isSibling=function(t){return n.$parentNodesScope==t.$parentNodesScope};n.isChild=function(t){var i=n.childNodes();return i&&i.indexOf(t)>-1};n.prev=function(){var t=n.index();return t>0?n.siblings()[t-1]:null};n.siblings=function(){return n.$parentNodesScope.childNodes()};n.childNodesCount=function(){return n.childNodes()?n.childNodes().length:0};n.hasChild=function(){return n.childNodesCount()>0};n.childNodes=function(){return n.$childNodesScope&&n.$childNodesScope.$modelValue?n.$childNodesScope.childNodes():null};n.accept=function(t,i){return n.$childNodesScope&&n.$childNodesScope.$modelValue&&n.$childNodesScope.accept(t,i)};n.remove=function(){return n.$parentNodesScope.removeNode(n)};n.toggle=function(){n.collapsed=!n.collapsed;n.$treeScope.$callbacks.toggle(n.collapsed,n)};n.collapse=function(){n.collapsed=!0};n.expand=function(){n.collapsed=!1};n.depth=function(){var t=n.$parentNodeScope;return t?t.depth()+1:1};n.maxSubDepth=function(){return n.$childNodesScope?i(n.$childNodesScope):0}}])}(),function(){"use strict";angular.module("ui.tree").controller("TreeNodesController",["$scope","$element",function(n,t){this.scope=n;n.$element=t;n.$modelValue=null;n.$nodeScope=null;n.$treeScope=null;n.$type="uiTreeNodes";n.$nodesMap={};n.nodropEnabled=!1;n.maxDepth=0;n.cloneEnabled=!1;n.initSubNode=function(t){if(!t.$modelValue)return null;n.$nodesMap[t.$modelValue.$$hashKey]=t};n.destroySubNode=function(t){if(!t.$modelValue)return null;n.$nodesMap[t.$modelValue.$$hashKey]=null};n.accept=function(t,i){return n.$treeScope.$callbacks.accept(t,n,i)};n.beforeDrag=function(t){return n.$treeScope.$callbacks.beforeDrag(t)};n.isParent=function(t){return t.$parentNodesScope==n};n.hasChild=function(){return n.$modelValue.length>0};n.safeApply=function(n){var t=this.$root.$$phase;t=="$apply"||t=="$digest"?n&&typeof n=="function"&&n():this.$apply(n)};n.removeNode=function(t){var i=n.$modelValue.indexOf(t.$modelValue);return i>-1?(n.safeApply(function(){n.$modelValue.splice(i,1)[0]}),n.$treeScope.$callbacks.removed(t)):null};n.insertNode=function(t,i){n.safeApply(function(){n.$modelValue.splice(t,0,i)})};n.childNodes=function(){var t,i=[];if(n.$modelValue)for(t=0;t<n.$modelValue.length;t++)i.push(n.$nodesMap[n.$modelValue[t].$$hashKey]);return i};n.depth=function(){return n.$nodeScope?n.$nodeScope.depth():0};n.outOfDepth=function(t){var i=n.maxDepth||n.$treeScope.maxDepth;return i>0?n.depth()+t.maxSubDepth()+1>i:!1}}])}(),function(){"use strict";angular.module("ui.tree").controller("TreeController",["$scope","$element",function(n,t){this.scope=n;n.$element=t;n.$nodesScope=null;n.$type="uiTree";n.$emptyElm=null;n.$callbacks=null;n.dragEnabled=!0;n.emptyPlaceholderEnabled=!0;n.maxDepth=0;n.dragDelay=0;n.cloneEnabled=!1;n.nodropEnabled=!1;n.isEmpty=function(){return n.$nodesScope&&n.$nodesScope.$modelValue&&n.$nodesScope.$modelValue.length===0};n.place=function(t){n.$nodesScope.$element.append(t);n.$emptyElm.remove()};this.resetEmptyElement=function(){(!n.$nodesScope.$modelValue||n.$nodesScope.$modelValue.length===0)&&n.emptyPlaceholderEnabled?t.append(n.$emptyElm):n.$emptyElm.remove()};n.resetEmptyElement=this.resetEmptyElement}])}(),function(){"use strict";angular.module("ui.tree").directive("uiTree",["treeConfig","$window",function(n,t){return{restrict:"A",scope:!0,controller:"TreeController",link:function(i,r,u,f){var e={accept:null,beforeDrag:null},o={},h,s,c;angular.extend(o,n);o.treeClass&&r.addClass(o.treeClass);r.prop("tagName").toLowerCase()==="table"?(i.$emptyElm=angular.element(t.document.createElement("tr")),s=r.find("tr"),c=s.length>0?angular.element(s).children().length:1e6,h=angular.element(t.document.createElement("td")).attr("colspan",c),i.$emptyElm.append(h)):i.$emptyElm=angular.element(t.document.createElement("div"));o.emptyTreeClass&&i.$emptyElm.addClass(o.emptyTreeClass);i.$watch("$nodesScope.$modelValue.length",function(n){angular.isNumber(n)&&f.resetEmptyElement()},!0);i.$watch(u.dragEnabled,function(n){typeof n=="boolean"&&(i.dragEnabled=n)});i.$watch(u.emptyPlaceholderEnabled,function(n){typeof n=="boolean"&&(i.emptyPlaceholderEnabled=n,f.resetEmptyElement())});i.$watch(u.nodropEnabled,function(n){typeof n=="boolean"&&(i.nodropEnabled=n)});i.$watch(u.cloneEnabled,function(n){typeof n=="boolean"&&(i.cloneEnabled=n)});i.$watch(u.maxDepth,function(n){typeof n=="number"&&(i.maxDepth=n)});i.$watch(u.dragDelay,function(n){typeof n=="number"&&(i.dragDelay=n)});e.accept=function(n,t){return!(t.nodropEnabled||t.$treeScope.nodropEnabled||t.outOfDepth(n))};e.beforeDrag=function(){return!0};e.expandTimeoutStart=function(){};e.expandTimeoutCancel=function(){};e.expandTimeoutEnd=function(){};e.removed=function(){};e.dropped=function(){};e.dragStart=function(){};e.dragMove=function(){};e.dragStop=function(){};e.beforeDrop=function(){};e.toggle=function(){};i.$watch(u.uiTree,function(n){angular.forEach(n,function(n,t){e[t]&&typeof n=="function"&&(e[t]=n)});i.$callbacks=e},!0)}}}])}(),function(){"use strict";angular.module("ui.tree").directive("uiTreeHandle",["treeConfig",function(n){return{require:"^uiTreeNode",restrict:"A",scope:!0,controller:"TreeHandleController",link:function(t,i,r,u){var f={};angular.extend(f,n);f.handleClass&&i.addClass(f.handleClass);t!=u.scope&&(t.$nodeScope=u.scope,u.scope.$handleScope=t)}}}])}(),function(){"use strict";angular.module("ui.tree").directive("uiTreeNode",["treeConfig","UiTreeHelper","$window","$document","$timeout","$q",function(n,t,i,r,u,f){return{require:["^uiTreeNodes","^uiTree"],restrict:"A",controller:"TreeNodeController",link:function(e,o,s,h){var y={},ni="ontouchstart"in window,tt,c,v,a,it,l,p,ot,b=null,rt,ut=document.body,d=document.documentElement,g,st,pt,wt,ht,ct,nt,k,lt,at,ft,bt,kt,vt,et,yt,w,dt,gt;angular.extend(y,n);y.nodeClass&&o.addClass(y.nodeClass);e.init(h);e.collapsed=!!t.getNodeAttribute(e,"collapsed")||n.defaultCollapsed;e.expandOnHover=!!t.getNodeAttribute(e,"expandOnHover");e.scrollContainer=t.getNodeAttribute(e,"scrollContainer")||s.scrollContainer||null;e.sourceOnly=e.nodropEnabled||e.$treeScope.nodropEnabled;e.$watch(s.collapsed,function(n){typeof n=="boolean"&&(e.collapsed=n)});e.$watch("collapsed",function(n){t.setNodeAttribute(e,"collapsed",n);s.$set("collapsed",n)});e.$watch(s.expandOnHover,function(n){(typeof n=="boolean"||typeof n=="number")&&(e.expandOnHover=n)});e.$watch("expandOnHover",function(n){t.setNodeAttribute(e,"expandOnHover",n);s.$set("expandOnHover",n)});s.$observe("scrollContainer",function(n){typeof n=="string"&&(e.scrollContainer=n)});e.$watch("scrollContainer",function(n){t.setNodeAttribute(e,"scrollContainer",n);s.$set("scrollContainer",n);p=document.querySelector(n)});e.$on("angular-ui-tree:collapse-all",function(){e.collapsed=!0});e.$on("angular-ui-tree:expand-all",function(){e.collapsed=!1});pt=function(n){if((ni||n.button!==2&&n.which!==3)&&!n.uiTreeDragging&&(!n.originalEvent||!n.originalEvent.uiTreeDragging)){var u=angular.element(n.target),p,nt,f,s,h,ft,b,k,et;if((p=t.treeNodeHandlerContainerOfElement(u),p&&(u=angular.element(p)),nt=o.clone(),k=t.elementIsTreeNode(u),et=t.elementIsTreeNodeHandle(u),k||et)&&(!k||!t.elementContainsTreeNodeHandler(u))&&(f=u.prop("tagName").toLowerCase(),f!="input"&&f!="textarea"&&f!="button"&&f!="select")){for(w=angular.element(n.target);w&&w[0]&&w[0]!==o&&!dt;){if(w[0].attributes&&(dt=w[0].attributes["ui-tree"]),t.nodrag(w))return;w=w.parent()}e.beforeDrag(e)&&(n.uiTreeDragging=!0,n.originalEvent&&(n.originalEvent.uiTreeDragging=!0),n.preventDefault(),h=t.eventObj(n),tt=!0,c=t.dragInfo(e),gt=c.source.$treeScope.$id,s=o.prop("tagName"),s.toLowerCase()==="tr"?(a=angular.element(i.document.createElement(s)),ft=angular.element(i.document.createElement("td")).addClass(y.placeholderClass).attr("colspan",o[0].children.length),a.append(ft)):a=angular.element(i.document.createElement(s)).addClass(y.placeholderClass),it=angular.element(i.document.createElement(s)),y.hiddenClass&&it.addClass(y.hiddenClass),v=t.positionStarted(h,o),a.css("height",t.height(o)+"px"),l=angular.element(i.document.createElement(e.$parentNodesScope.$element.prop("tagName"))).addClass(e.$parentNodesScope.$element.attr("class")).addClass(y.dragClass),l.css("width",t.width(o)+"px"),l.css("z-index",9999),b=(o[0].querySelector(".angular-ui-tree-handle")||o[0]).currentStyle,b&&(document.body.setAttribute("ui-tree-cursor",r.find("body").css("cursor")||""),r.find("body").css({cursor:b.cursor+"!important"})),e.sourceOnly&&a.css("display","none"),o.after(a),o.after(it),c.isClone()&&e.sourceOnly?l.append(nt):l.append(o),r.find("body").append(l),l.css({left:h.pageX-v.offsetX+"px",top:h.pageY-v.offsetY+"px"}),rt={placeholder:a,dragging:l},bt(),e.$apply(function(){e.$treeScope.$callbacks.dragStart(c.eventArgs(rt,v))}),g=Math.max(ut.scrollHeight,ut.offsetHeight,d.clientHeight,d.scrollHeight,d.offsetHeight),st=Math.max(ut.scrollWidth,ut.offsetWidth,d.clientWidth,d.scrollWidth,d.offsetWidth))}}};wt=function(n){var s=t.eventObj(n),h,it,d,nt,w,k,ct,o,lt,at,bt,r,f,ut,ft,ht,kt,vt,dt,ni,pt,wt,ti;if(l){if(n.preventDefault(),i.getSelection?i.getSelection().removeAllRanges():i.document.selection&&i.document.selection.empty(),d=s.pageX-v.offsetX,nt=s.pageY-v.offsetY,d<0&&(d=0),nt<0&&(nt=0),nt+10>g&&(nt=g-10),d+10>st&&(d=st-10),l.css({left:d+"px",top:nt+"px"}),p?(ct=p.getBoundingClientRect(),w=p.scrollTop,k=w+p.clientHeight,ct.bottom<s.clientY&&k<p.scrollHeight&&(ft=Math.min(p.scrollHeight-k,10),p.scrollTop+=ft),ct.top>s.clientY&&w>0&&(ht=Math.min(w,10),p.scrollTop-=ht)):(w=window.pageYOffset||i.document.documentElement.scrollTop,k=w+(window.innerHeight||i.document.clientHeight||i.document.clientHeight),k<s.pageY&&k<g&&(ft=Math.min(g-k,10),window.scrollBy(0,ft)),w>s.pageY&&(ht=Math.min(w,10),window.scrollBy(0,-ht))),t.positionMoved(n,v,tt),tt){tt=!1;return}if(lt=s.pageX-(i.pageXOffset||i.document.body.scrollLeft||i.document.documentElement.scrollLeft)-(i.document.documentElement.clientLeft||0),at=s.pageY-(i.pageYOffset||i.document.body.scrollTop||i.document.documentElement.scrollTop)-(i.document.documentElement.clientTop||0),angular.isFunction(l.hide)?l.hide():(bt=l[0].style.display,l[0].style.display="none"),i.document.elementFromPoint(lt,at),f=angular.element(i.document.elementFromPoint(lt,at)),yt=t.treeNodeHandlerContainerOfElement(f),yt&&(f=angular.element(yt)),angular.isFunction(l.show)?l.show():l[0].style.display=bt,et=!t.elementIsTreeNodeHandle(f)&&!t.elementIsTreeNode(f)&&!t.elementIsTreeNodes(f)&&!t.elementIsTree(f)&&!t.elementIsPlaceholder(f),et&&(a.remove(),b&&(b.resetEmptyElement(),b=null),c.resetParent()),t.elementIsTree(f)?r=f.controller("uiTree").scope:t.elementIsTreeNodeHandle(f)?r=f.controller("uiTreeHandle").scope:t.elementIsTreeNode(f)?r=f.controller("uiTreeNode").scope:t.elementIsTreeNodes(f)?r=f.controller("uiTreeNodes").scope:t.elementIsPlaceholder(f)?r=f.controller("uiTreeNodes").scope:f.controller("uiTreeNode")&&(r=f.controller("uiTreeNode").scope),dt=r&&r.$treeScope&&r.$treeScope.$id&&r.$treeScope.$id===gt,dt&&v.dirAx)v.distX>0&&(h=c.prev(),h&&!h.collapsed&&h.accept(e,h.childNodesCount())&&(h.$childNodesScope.$element.append(a),c.moveTo(h.$childNodesScope,h.childNodes(),h.childNodesCount()))),v.distX<0&&(it=c.next(),it||(o=c.parentNode(),o&&o.$parentNodesScope.accept(e,o.index()+1)&&(o.$element.after(a),c.moveTo(o.$parentNodesScope,o.siblings(),o.index()+1))));else{if(ut=!1,!r)return;if(!r.$treeScope||r.$parent.nodropEnabled||r.$treeScope.nodropEnabled||a.css("display",""),r.$type==="uiTree"&&r.dragEnabled&&(ut=r.isEmpty()),r.$type==="uiTreeHandle"&&(r=r.$nodeScope),r.$type!=="uiTreeNode"&&!ut){y.appendChildOnHover&&(it=c.next(),!it&&ot&&(o=c.parentNode(),o.$element.after(a),c.moveTo(o.$parentNodesScope,o.siblings(),o.index()+1),ot=!1));return}b&&a.parent()[0]!=b.$element[0]&&(b.resetEmptyElement(),b=null);ut?(b=r,r.$nodesScope.accept(e,0)&&(r.place(a),c.moveTo(r.$nodesScope,r.$nodesScope.childNodes(),0))):r.dragEnabled()&&(angular.isDefined(e.expandTimeoutOn)&&e.expandTimeoutOn!==r.id&&(u.cancel(e.expandTimeout),delete e.expandTimeout,delete e.expandTimeoutOn,e.$callbacks.expandTimeoutCancel()),r.collapsed&&(e.expandOnHover===!0||angular.isNumber(e.expandOnHover)&&e.expandOnHover===0?r.collapsed=!1:e.expandOnHover!==!1&&angular.isNumber(e.expandOnHover)&&e.expandOnHover>0&&angular.isUndefined(e.expandTimeoutOn)&&(e.expandTimeoutOn=r.$id,e.$callbacks.expandTimeoutStart(),e.expandTimeout=u(function(){e.$callbacks.expandTimeoutEnd();r.collapsed=!1},e.expandOnHover))),f=r.$element,kt=t.offset(f),pt=t.height(f),wt=r.$childNodesScope?r.$childNodesScope.$element:null,ti=wt?t.height(wt):0,pt-=ti,ni=y.appendChildOnHover?pt*.25:t.height(f)/2,vt=s.pageY<kt.top+ni,r.$parentNodesScope.accept(e,r.index())?vt?(f[0].parentNode.insertBefore(a[0],f[0]),c.moveTo(r.$parentNodesScope,r.siblings(),r.index())):y.appendChildOnHover&&r.accept(e,r.childNodesCount())?(r.$childNodesScope.$element.prepend(a),c.moveTo(r.$childNodesScope,r.childNodes(),0),ot=!0):(f.after(a),c.moveTo(r.$parentNodesScope,r.siblings(),r.index()+1)):!vt&&r.accept(e,r.childNodesCount())?(r.$childNodesScope.$element.append(a),c.moveTo(r.$childNodesScope,r.childNodes(),r.childNodesCount())):(et=!0,c.resetParent()))}e.$apply(function(){e.$treeScope.$callbacks.dragMove(c.eventArgs(rt,v))})}};ht=function(n){var t=c.eventArgs(rt,v);n.preventDefault();kt();u.cancel(e.expandTimeout);e.$treeScope.$apply(function(){f.when(e.$treeScope.$callbacks.beforeDrop(t)).then(function(n){n!==!1&&e.$$allowNodeDrop&&!et?(c.apply(),e.$treeScope.$callbacks.dropped(t)):ft()}).catch(function(){ft()}).finally(function(){it.replaceWith(e.$element);a.remove();l&&(l.remove(),l=null);e.$treeScope.$callbacks.dragStop(t);e.$$allowNodeDrop=!1;c=null;var n=document.body.getAttribute("ui-tree-cursor");n!==null&&(r.find("body").css({cursor:n}),document.body.removeAttribute("ui-tree-cursor"))})})};ct=function(n){e.dragEnabled()&&pt(n)};nt=function(n){wt(n)};k=function(n){e.$$allowNodeDrop=!0;ht(n)};lt=function(n){ht(n)};at=function(){var n;return{exec:function(t,i){i||(i=0);this.cancel();n=u(t,i)},cancel:function(){u.cancel(n)}}}();vt=function(n){n.keyCode===27&&k(n)};ft=function(){o.bind("touchstart mousedown",function(n){e.dragDelay>0?at.exec(function(){ct(n)},e.dragDelay):ct(n)});o.bind("touchend touchcancel mouseup",function(){e.dragDelay>0&&at.cancel()})};ft();bt=function(){angular.element(r).bind("touchend",k);angular.element(r).bind("touchcancel",k);angular.element(r).bind("touchmove",nt);angular.element(r).bind("mouseup",k);angular.element(r).bind("mousemove",nt);angular.element(r).bind("mouseleave",lt);angular.element(r).bind("keydown",vt)};kt=function(){angular.element(r).unbind("touchend",k);angular.element(r).unbind("touchcancel",k);angular.element(r).unbind("touchmove",nt);angular.element(r).unbind("mouseup",k);angular.element(r).unbind("mousemove",nt);angular.element(r).unbind("mouseleave",lt);angular.element(r).unbind("keydown",vt)}}}}])}(),function(){"use strict";angular.module("ui.tree").directive("uiTreeNodes",["treeConfig","$window",function(n){return{require:["ngModel","?^uiTreeNode","^uiTree"],restrict:"A",scope:!0,controller:"TreeNodesController",link:function(t,i,r,u){var f={},e=u[0],o=u[1],s=u[2];angular.extend(f,n);f.nodesClass&&i.addClass(f.nodesClass);o?(o.scope.$childNodesScope=t,t.$nodeScope=o.scope):s.scope.$nodesScope=t;t.$treeScope=s.scope;e&&(e.$render=function(){t.$modelValue=e.$modelValue});t.$watch(function(){return r.maxDepth},function(n){typeof n=="number"&&(t.maxDepth=n)});t.$watch(function(){return r.nodropEnabled},function(n){typeof n!="undefined"&&(t.nodropEnabled=!0)},!0)}}}])}(),function(){"use strict";function n(n,t){if(t===undefined)return null;for(var i=t.parentNode,u=1,r=typeof i.setAttribute=="function"&&i.hasAttribute(n)?i:null;i&&typeof i.setAttribute=="function"&&!i.hasAttribute(n);){if(i=i.parentNode,r=i,i===document.documentElement){r=null;break}u++}return r}angular.module("ui.tree").factory("UiTreeHelper",["$document","$window","treeConfig",function(t,i,r){return{nodesData:{},setNodeAttribute:function(n,t,i){if(!n.$modelValue)return null;var r=this.nodesData[n.$modelValue.$$hashKey];r||(r={},this.nodesData[n.$modelValue.$$hashKey]=r);r[t]=i},getNodeAttribute:function(n,t){if(!n.$modelValue)return null;var i=this.nodesData[n.$modelValue.$$hashKey];return i?i[t]:null},nodrag:function(n){return typeof n.attr("data-nodrag")!="undefined"?n.attr("data-nodrag")!=="false":!1},eventObj:function(n){var t=n;return n.targetTouches!==undefined?t=n.targetTouches.item(0):n.originalEvent!==undefined&&n.originalEvent.targetTouches!==undefined&&(t=n.originalEvent.targetTouches.item(0)),t},dragInfo:function(n){return{source:n,sourceInfo:{cloneModel:n.$treeScope.cloneEnabled===!0?angular.copy(n.$modelValue):undefined,nodeScope:n,index:n.index(),nodesScope:n.$parentNodesScope},index:n.index(),siblings:n.siblings().slice(0),parent:n.$parentNodesScope,resetParent:function(){this.parent=n.$parentNodesScope},moveTo:function(n,t,i){this.parent=n;this.siblings=t.slice(0);var r=this.siblings.indexOf(this.source);r>-1&&(this.siblings.splice(r,1),this.source.index()<i&&i--);this.siblings.splice(i,0,this.source);this.index=i},parentNode:function(){return this.parent.$nodeScope},prev:function(){return this.index>0?this.siblings[this.index-1]:null},next:function(){return this.index<this.siblings.length-1?this.siblings[this.index+1]:null},isClone:function(){return this.source.$treeScope.cloneEnabled===!0},clonedNode:function(n){return angular.copy(n)},isDirty:function(){return this.source.$parentNodesScope!=this.parent||this.source.index()!=this.index},isForeign:function(){return this.source.$treeScope!==this.parent.$treeScope},eventArgs:function(n,t){return{source:this.sourceInfo,dest:{index:this.index,nodesScope:this.parent},elements:n,pos:t}},apply:function(){var n=this.source.$modelValue;this.parent.nodropEnabled||this.parent.$treeScope.nodropEnabled||this.isDirty()&&(this.isClone()&&this.isForeign()?this.parent.insertNode(this.index,this.sourceInfo.cloneModel):(this.source.remove(),this.parent.insertNode(this.index,n)))}}},height:function(n){return n.prop("scrollHeight")},width:function(n){return n.prop("scrollWidth")},offset:function(n){var r=n[0].getBoundingClientRect();return{width:n.prop("offsetWidth"),height:n.prop("offsetHeight"),top:r.top+(i.pageYOffset||t[0].body.scrollTop||t[0].documentElement.scrollTop),left:r.left+(i.pageXOffset||t[0].body.scrollLeft||t[0].documentElement.scrollLeft)}},positionStarted:function(n,t){var i={},r=n.pageX,u=n.pageY;return n.originalEvent&&n.originalEvent.touches&&n.originalEvent.touches.length>0&&(r=n.originalEvent.touches[0].pageX,u=n.originalEvent.touches[0].pageY),i.offsetX=r-this.offset(t).left,i.offsetY=u-this.offset(t).top,i.startX=i.lastX=r,i.startY=i.lastY=u,i.nowX=i.nowY=i.distX=i.distY=i.dirAx=0,i.dirX=i.dirY=i.lastDirX=i.lastDirY=i.distAxX=i.distAxY=0,i},positionMoved:function(n,t,i){var u=n.pageX,f=n.pageY,r;if(n.originalEvent&&n.originalEvent.touches&&n.originalEvent.touches.length>0&&(u=n.originalEvent.touches[0].pageX,f=n.originalEvent.touches[0].pageY),t.lastX=t.nowX,t.lastY=t.nowY,t.nowX=u,t.nowY=f,t.distX=t.nowX-t.lastX,t.distY=t.nowY-t.lastY,t.lastDirX=t.dirX,t.lastDirY=t.dirY,t.dirX=t.distX===0?0:t.distX>0?1:-1,t.dirY=t.distY===0?0:t.distY>0?1:-1,r=Math.abs(t.distX)>Math.abs(t.distY)?1:0,i){t.dirAx=r;t.moving=!0;return}t.dirAx!==r?(t.distAxX=0,t.distAxY=0):(t.distAxX+=Math.abs(t.distX),t.dirX!==0&&t.dirX!==t.lastDirX&&(t.distAxX=0),t.distAxY+=Math.abs(t.distY),t.dirY!==0&&t.dirY!==t.lastDirY&&(t.distAxY=0));t.dirAx=r},elementIsTreeNode:function(n){return typeof n.attr("ui-tree-node")!="undefined"},elementIsTreeNodeHandle:function(n){return typeof n.attr("ui-tree-handle")!="undefined"},elementIsTree:function(n){return typeof n.attr("ui-tree")!="undefined"},elementIsTreeNodes:function(n){return typeof n.attr("ui-tree-nodes")!="undefined"},elementIsPlaceholder:function(n){return n.hasClass(r.placeholderClass)},elementContainsTreeNodeHandler:function(n){return n[0].querySelectorAll("[ui-tree-handle]").length>=1},treeNodeHandlerContainerOfElement:function(t){return n("ui-tree-handle",t[0])}}}])}(),function(n,t){typeof define=="function"&&define.amd?define(["jquery","moment"],t):typeof exports=="object"?module.exports=t(require("jquery"),require("moment")):n.Calendar=t(jQuery,moment)}(this,function(n,t){function i(i){var r=this;this.settings=i;this.calIsOpen=!1;this.presetIsOpen=!1;this.sameDayRange=i.same_day_range||!1;this.element=i.element||n(".daterange");this.selected=null;this.type=this.element.hasClass("daterange--single")?"single":"double";this.required=i.required==!1?!1:!0;this.format=i.format||{};this.format.input=i.format&&i.format.input||"MMMM D, YYYY";this.format.preset=i.format&&i.format.preset||"ll";this.format.jump_month=i.format&&i.format.jump_month||"MMMM";this.format.jump_year=i.format&&i.format.jump_year||"YYYY";this.placeholder=i.placeholder||this.format.input;this.days_array=i.days_array&&i.days_array.length==7?i.days_array:t.weekdaysMin();this.orig_start_date=null;this.orig_end_date=null;this.orig_current_date=null;this.earliest_date=i.earliest_date?t(i.earliest_date):t("January 1, 1900");this.latest_date=i.latest_date?t(i.latest_date):t("December 31, 2900");this.end_date=i.end_date?t(i.end_date):this.type=="double"?t():null;this.start_date=i.start_date?t(i.start_date):this.type=="double"?t(this.end_date,-1,"month"):null;this.current_date=i.current_date?t(i.current_date):this.type=="single"?t():null;this.presets=i.presets==!1||this.type=="single"?!1:!0;this.callback=i.callback||this.calendarSetDates;this.calendarHTML(this.type);n(".dr-presets",this.element).click(function(){r.presetToggle()});n(".dr-list-item",this.element).click(function(){var t=n(".dr-item-aside",this).data("start"),i=n(".dr-item-aside",this).data("end");r.start_date=r.calendarCheckDate(t);r.end_date=r.calendarCheckDate(i);r.calendarSetDates();r.presetToggle();r.calendarSaveDates()});n(".dr-date",this.element).on({click:function(){r.calendarOpen(this)},keyup:function(n){n.keyCode!=9||r.calIsOpen||r.start_date||r.end_date||r.calendarOpen(this)},keydown:function(i){var f,u,e;switch(i.keyCode){case 9:n(r.selected).hasClass("dr-date-start")?(i.preventDefault(),r.calendarCheckDates(),r.calendarSetDates(),n(".dr-date-end",r.element).trigger("click")):(r.calendarCheckDates(),r.calendarSetDates(),r.calendarSaveDates(),r.calendarClose("force"));break;case 13:i.preventDefault();r.calendarCheckDates();r.calendarSetDates();r.calendarSaveDates();r.calendarClose("force");break;case 27:r.calendarSetDates();r.calendarClose("force");break;case 38:i.preventDefault();u="day";i.shiftKey&&(u="week");i.metaKey&&(u="month");f=t(r.current_date).subtract(1,u);n(this).html(f.format(r.format.input));r.current_date=f.toDate();break;case 40:i.preventDefault();u="day";i.shiftKey&&(u="week");i.metaKey&&(u="month");e=t(r.current_date).add(1,u);n(this).html(e.format(r.format.input));r.current_date=e.toDate()}}});n(".dr-month-switcher i",this.element).click(function(){var u=n(".dr-month-switcher span",r.element).data("month"),f=n(".dr-year-switcher span",r.element).data("year"),i=t([f,u,1]),e=i.clone().subtract(1,"month"),o=i.clone().add(1,"month").startOf("day");n(this).hasClass("dr-left")?r.calendarOpen(r.selected,e):n(this).hasClass("dr-right")&&r.calendarOpen(r.selected,o)});n(".dr-year-switcher i",this.element).click(function(){var u=n(".dr-month-switcher span",r.element).data("month"),f=n(".dr-year-switcher span",r.element).data("year"),i=t([f,u,1]),e=i.clone().subtract(1,"year"),o=i.clone().add(1,"year").startOf("day");n(this).hasClass("dr-left")?r.calendarOpen(r.selected,e):n(this).hasClass("dr-right")&&r.calendarOpen(r.selected,o)});n(".dr-dates-dash",this.element).click(function(){n(".dr-date-start",r.element).trigger("click")});this.element.on("click",function(){window.addEventListener("click",function(t){var i=r.element.find(t.target);i.length||(r.presetIsOpen&&r.presetToggle(),r.calIsOpen&&(n(r.selected).hasClass("dr-date-end")&&r.calendarSaveDates(),r.calendarSetDates(),r.calendarClose("force")))})})}function r(i,r,u){var f=t(u).format(r.format.input);i&&n(".dr-date",r.element).not(r.selected).html(i.format(r.format.input));n(r.selected).html(f);r.calendarOpen(r.selected);n(r.selected).hasClass("dr-date-start")?n(".dr-date-end",r.element).trigger("click"):(r.calendarSaveDates(),r.calendarClose("force"))}return i.prototype.presetToggle=function(){this.presetIsOpen==!1?(this.orig_start_date=this.start_date,this.orig_end_date=this.end_date,this.orig_current_date=this.current_date,this.presetIsOpen=!0):this.presetIsOpen&&(this.presetIsOpen=!1);this.calIsOpen==!0&&this.calendarClose();n(".dr-preset-list",this.element).slideToggle(200);n(".dr-input",this.element).toggleClass("dr-active");n(".dr-presets",this.element).toggleClass("dr-active");this.element.toggleClass("dr-active")},i.prototype.presetCreate=function(){var i=this,r=n('<ul class="dr-preset-list" style="display: none;"><\/ul>'),u=typeof i.settings.presets=="object"?i.settings.presets:[{label:"Last 30 days",start:t(i.latest_date).subtract(29,"days"),end:i.latest_date},{label:"Last month",start:t(i.latest_date).subtract(1,"month").startOf("month"),end:t(i.latest_date).subtract(1,"month").endOf("month")},{label:"Last 3 months",start:t(i.latest_date).subtract(3,"month").startOf("month"),end:t(i.latest_date).subtract(1,"month").endOf("month")},{label:"Last 6 months",start:t(i.latest_date).subtract(6,"month").startOf("month"),end:t(i.latest_date).subtract(1,"month").endOf("month")},{label:"Last year",start:t(i.latest_date).subtract(12,"month").startOf("month"),end:t(i.latest_date).subtract(1,"month").endOf("month")},{label:"All time",start:i.earliest_date,end:i.latest_date}];return t(i.latest_date).diff(t(i.latest_date).startOf("month"),"days")>=6&&typeof i.settings.presets!="object"&&u.splice(1,0,{label:"This month",start:t(i.latest_date).startOf("month"),end:i.latest_date}),n.each(u,function(u,f){var e;t(f.start).isBefore(i.earliest_date)&&(f.start=i.earliest_date);t(f.start).isAfter(i.latest_date)&&(f.start=i.latest_date);t(f.end).isBefore(i.earliest_date)&&(f.end=i.earliest_date);t(f.end).isAfter(i.latest_date)&&(f.end=i.latest_date);var o=t(f.start).toISOString(),s=t(f.end).toISOString(),h=t(f.start).format(i.format.preset)+" &ndash; "+t(f.end).format(i.format.preset);n(".dr-preset-list",i.element).length?(e=n(".dr-preset-list .dr-list-item:nth-of-type("+(u+1)+") .dr-item-aside",i.element),e.data("start",o),e.data("end",s),e.html(h)):r.append('<li class="dr-list-item">'+f.label+'<span class="dr-item-aside" data-start="'+o+'" data-end="'+s+'">'+h+"<\/span><\/li>")}),r},i.prototype.calendarSetDates=function(){if(n(".dr-date-start",this.element).html(t(this.start_date).format(this.format.input)),n(".dr-date-end",this.element).html(t(this.end_date).format(this.format.input)),!this.start_date&&!this.end_date){var r=n(".dr-date",this.element).html(),i=t(this.current_date).format(this.format.input);r.length!=0||this.required||(i="");r!=i&&n(".dr-date",this.element).html(i)}},i.prototype.calendarSaveDates=function(){if(this.type=="double"){if(!t(this.orig_end_date).isSame(this.end_date)||!t(this.orig_start_date).isSame(this.start_date))return this.callback()}else if(n(this.selected).html().length&&!t(this.orig_current_date).isSame(this.current_date))return this.callback()},i.prototype.calendarCheckDate=function(i){var r=i?i.replace(/(?:\d)((?:st|nd|rd|th)?,?)/,"").split(" "):[],u;return(i=="today"||i=="now")&&(i=t().isAfter(this.latest_date)?this.latest_date:t()),i=="earliest"&&(i=this.earliest_date),i=="latest"&&(i=this.latest_date),i&&(/\bago\b/.test(i)||/\bahead\b/.test(i))&&(i=this.stringToDate(i)),r.length==2&&(r.push(t().format(this.format.jump_year)),i=r.join(" ")),i&&n.type(i)=="string"&&(u=this.parseDate(i),u.isValid()&&(i=u)),new Date(i)},i.prototype.calendarCheckDates=function(){var f=n(".dr-date-start",this.element).html(),e=n(".dr-date-end",this.element).html(),u=t(this.calendarCheckDate(n(this.selected).html())),i,r;if(f=="ytd"||e=="ytd"?(i=t().startOf("year"),r=t().isAfter(this.latest_date)?this.latest_date:t()):(i=t(this.calendarCheckDate(f)),r=t(this.calendarCheckDate(e))),u.isSame(i)&&i.isAfter(r)&&(r=i.add(6,"day")),u.isSame(r)&&r.isBefore(i)&&(i=r.subtract(6,"day")),(r.isBefore(this.earliest_date)||i.isBefore(this.earliest_date))&&(i=t(this.earliest_date),r=t(this.earliest_date).add(6,"day")),(r.isAfter(this.latest_date)||i.isAfter(this.latest_date))&&(i=t(this.latest_date).subtract(6,"day"),r=t(this.latest_date)),i.isSame(r)&&!this.sameDayRange)return this.calendarSetDates();this.start_date=i.isValid()?i.toDate():this.start_date;this.end_date=r.isValid()?r.toDate():this.end_date;this.current_date=u.isValid()?u.toDate():this.current_date},i.prototype.stringToDate=function(n){var i=n.split(" ");return i[2]=="ago"?t(this.current_date).subtract(i[0],i[1]):i[2]=="ahead"?t(this.current_date).add(i[0],i[1]):this.current_date},i.prototype.calendarOpen=function(i,u){var f=this,e,p=n(".dr-dates",this.element).innerWidth()-8,s,h,c;this.selected=i||this.selected;this.presetIsOpen==!0&&this.presetToggle();this.calIsOpen==!0?this.calendarClose(u?"switcher":undefined):n(this.selected).html().length&&(this.orig_start_date=this.start_date,this.orig_end_date=this.end_date,this.orig_current_date=this.current_date);this.calendarCheckDates();this.calendarCreate(u);this.calendarSetDates();var l=t(u||this.current_date).add(1,"month").startOf("month").startOf("day"),a=t(u||this.current_date).subtract(1,"month").endOf("month"),v=t(u||this.current_date).add(1,"year").startOf("month").startOf("day"),y=t(u||this.current_date).subtract(1,"year").endOf("month"),o=t(u||this.current_date);n(".dr-month-switcher span",this.element).data("month",o.month()).html(o.format(this.format.jump_month));n(".dr-year-switcher span",this.element).data("year",o.year()).html(o.format(this.format.jump_year));n(".dr-switcher i",this.element).removeClass("dr-disabled");l.isAfter(this.latest_date)&&n(".dr-month-switcher .dr-right",this.element).addClass("dr-disabled");a.isBefore(this.earliest_date)&&n(".dr-month-switcher .dr-left",this.element).addClass("dr-disabled");v.isAfter(this.latest_date)&&n(".dr-year-switcher .dr-right",this.element).addClass("dr-disabled");y.isBefore(this.earliest_date)&&n(".dr-year-switcher .dr-left",this.element).addClass("dr-disabled");n(".dr-day",this.element).on({mouseenter:function(){function r(r){e=undefined;f.range(42).forEach(function(u){var s=i.next().data("date"),h=i.prev().data("date"),o=i.data("date");if(!o)return!1;if(h||(h=o),s||(s=o),r=="start"){if(t(s).isSame(f.end_date)||f.sameDayRange&&t(o).isSame(f.end_date))return!1;if(t(o).isAfter(f.end_date)&&(e=e||t(o).add(6,"day").startOf("day"),u>5||(s?t(s).isAfter(f.latest_date):!1)))return n(i).addClass("dr-end"),e=t(o),!1;i=i.next().addClass("dr-maybe")}else if(r=="end"){if(t(h).isSame(f.start_date)||f.sameDayRange&&t(o).isSame(f.start_date))return!1;if(t(o).isBefore(f.start_date)&&(e=e||t(o).subtract(6,"day"),u>5||(h?t(h).isBefore(f.earliest_date):!1)))return n(i).addClass("dr-start"),e=t(o),!1;i=i.prev().addClass("dr-maybe")}})}var i=n(this),u=t(f.start_date),o=t(f.end_date),s=t(f.current_date);n(f.selected).hasClass("dr-date-start")&&(i.addClass("dr-hover dr-hover-before"),n(".dr-start",f.element).css({border:"none","padding-left":"0.3125rem"}),r("start"));n(f.selected).hasClass("dr-date-end")&&(i.addClass("dr-hover dr-hover-after"),n(".dr-end",f.element).css({border:"none","padding-right":"0.3125rem"}),r("end"));f.start_date||f.end_date||i.addClass("dr-maybe");n(".dr-selected",f.element).css("background-color","transparent")},mouseleave:function(){n(this).hasClass("dr-hover-before dr-end")&&n(this).removeClass("dr-end");n(this).hasClass("dr-hover-after dr-start")&&n(this).removeClass("dr-start");n(this).removeClass("dr-hover dr-hover-before dr-hover-after");n(".dr-start, .dr-end",f.element).css({border:"",padding:""});n(".dr-maybe:not(.dr-current)",f.element).removeClass("dr-start dr-end");n(".dr-day",f.element).removeClass("dr-maybe");n(".dr-selected",f.element).css("background-color","")}});if((/iPad|iPhone|iPod/.test(navigator.userAgent)||/Android/.test(navigator.userAgent))&&!window.MSStream){n(".dr-day",this.element).on({touchstart:function(){r(e,f,n(this).data("date"))}});n("div[contenteditable]",this.element).removeAttr("contenteditable")}else n(".dr-day",this.element).on({mousedown:function(){r(e,f,n(this).data("date"))}});n(".dr-calendar",this.element).css("width",236).slideDown(200);n(".dr-input",this.element).addClass("dr-active");n(i).addClass("dr-active").focus();this.element.addClass("dr-active");s=document.getElementsByClassName("dr-calendar");s.length>0&&(h=s[0].getBoundingClientRect(),h.top+236>(window.innerHeight||document.documentElement.clientHeight)&&(c=h.top+436-window.innerHeight,scrollToY(window.pageYOffset+c)));this.calIsOpen=!0},i.prototype.calendarClose=function(t){var i=this;if(!this.calIsOpen||this.presetIsOpen||t=="force"?n(".dr-calendar",this.element).slideUp(200,function(){n(".dr-day",i.element).remove()}):n(".dr-day",this.element).remove(),t=="switcher")return!1;n(".dr-input, .dr-date",this.element).removeClass("dr-active");this.element.removeClass("dr-active");this.calIsOpen=!1},i.prototype.calendarCreate=function(t){var i=this,r=this.calendarArray(this.start_date,this.end_date,this.current_date,t);r.forEach(function(t){var r="dr-day";t.fade&&(r+=" dr-fade");t.start&&(r+=" dr-start");t.end&&(r+=" dr-end");t.current&&(r+=" dr-current");t.selected&&(r+=" dr-selected");t.outside&&(r+=" dr-outside");n(".dr-day-list",i.element).append('<li class="'+r+'" data-date="'+t.date+'">'+t.str+"<\/li>")})},i.prototype.calendarArray=function(n,i,r,u){var e=this;r=t(r||n||i).startOf("day");for(var o=u||r||n||i,s=t(o).startOf("month").startOf("week"),c=t(s).add(41,"days").endOf("day"),h=[],f=t(s);f.isBefore(c);)h.push({str:+f.format("D"),start:n&&f.isSame(n,"day"),end:i&&f.isSame(i,"day"),current:r&&f.isSame(r,"day"),selected:n&&i&&f.isBetween(n,i),date:f.toISOString(),outside:f.isBefore(e.earliest_date)||f.isAfter(e.latest_date),fade:!f.isSame(o,"month")}),f.add(1,"d");return h},i.prototype.calendarHTML=function(i){var r=n('<ul class="dr-days-of-week-list"><\/ul>'),u=this.days_array.splice(t.localeData().firstDayOfWeek()).concat(this.days_array.splice(0,t.localeData().firstDayOfWeek()));return(n.each(u,function(n,t){r.append('<li class="dr-day-of-week">'+t+"<\/li>")}),i=="double")?this.element.append('<div class="dr-input"><div class="dr-dates"><div class="dr-date dr-date-start" contenteditable>'+t(this.start_date).format(this.format.input)+'<\/div><span class="dr-dates-dash">&ndash;<\/span><div class="dr-date dr-date-end" contenteditable>'+t(this.end_date).format(this.format.input)+"<\/div><\/div>"+(this.presets?'<div class="dr-presets"><span class="dr-preset-bar"><\/span><span class="dr-preset-bar"><\/span><span class="dr-preset-bar"><\/span><\/div>':"")+'<\/div><div class="dr-selections"><div class="dr-calendar" style="display: none;"><div class="dr-range-switcher"><div class="dr-switcher dr-month-switcher"><i class="dr-left"><\/i><span>April<\/span><i class="dr-right"><\/i><\/div><div class="dr-switcher dr-year-switcher"><i class="dr-left"><\/i><span>2015<\/span><i class="dr-right"><\/i><\/div><\/div>'+r[0].outerHTML+'<ul class="dr-day-list"><\/ul><\/div>'+(this.presets?this.presetCreate()[0].outerHTML:"")+"<\/div>"):this.element.append('<div class="dr-input"><div class="dr-dates"><div class="dr-date" contenteditable placeholder="'+this.placeholder+'">'+(this.settings.current_date?t(this.current_date).format(this.format.input):"")+'<\/div><\/div><\/div><div class="dr-selections"><div class="dr-calendar" style="display: none;"><div class="dr-range-switcher"><div class="dr-switcher dr-month-switcher"><i class="dr-left"><\/i><span><\/span><i class="dr-right"><\/i><\/div><div class="dr-switcher dr-year-switcher"><i class="dr-left"><\/i><span><\/span><i class="dr-right"><\/i><\/div><\/div>'+r[0].outerHTML+'<ul class="dr-day-list"><\/ul><\/div><\/div>')},i.prototype.parseDate=function(n){return t.defaultZone!=null&&t.hasOwnProperty("tz")?t.tz(n,this.format.input,t.defaultZone.name):t(n,this.format.input)},i.prototype.range=function(n){for(var i=new Array(n),t=0;t<n;t++)i[t]=t;return i},i});!function(){"use strict";var n,t,i="ngclipboard";"object"==typeof module&&module.exports?(n=require("angular"),t=require("clipboard"),module.exports=i):(n=window.angular,t=window.Clipboard);n.module(i,[]).directive("ngclipboard",function(){return{restrict:"A",scope:{ngclipboardSuccess:"&",ngclipboardError:"&"},link:function(n,i){var r=new t(i[0]);r.on("success",function(t){n.$apply(function(){n.ngclipboardSuccess({e:t})})});r.on("error",function(t){n.$apply(function(){n.ngclipboardError({e:t})})})}}})}();!function(n){"use strict";n.module("vcRecaptcha",[])}(angular),function(n){"use strict";function t(){throw new Error('You need to set the "key" attribute to your public reCaptcha key. If you don\'t have a key, please get one from https://www.google.com/recaptcha/admin/create');}n.module("vcRecaptcha").provider("vcRecaptchaService",function(){var r=this,i={};r.onLoadFunctionName="vcRecaptchaApiLoaded";r.setDefaults=function(t){n.copy(t,i)};r.setSiteKey=function(n){i.key=n};r.setTheme=function(n){i.theme=n};r.setStoken=function(n){i.stoken=n};r.setSize=function(n){i.size=n};r.setType=function(n){i.type=n};r.setLang=function(n){i.lang=n};r.setBadge=function(n){i.badge=n};r.setOnLoadFunctionName=function(n){r.onLoadFunctionName=n};r.$get=["$rootScope","$window","$q","$document",function(u,f,e,o){function y(){return s?e.when(s):p}function l(){if(!s)throw new Error("reCaptcha has not been loaded yet.");}var s,v=e.defer(),p=v.promise,c={},a,h;return f.vcRecaptchaApiLoadedCallback=f.vcRecaptchaApiLoadedCallback||[],a=function(){s=f.grecaptcha;v.resolve(s)},(f.vcRecaptchaApiLoadedCallback.push(a),f[r.onLoadFunctionName]=function(){f.vcRecaptchaApiLoadedCallback.forEach(function(n){n()})},n.isDefined(f.grecaptcha))?a():(h=f.document.createElement("script"),h.async=!0,h.defer=!0,h.src="https://www.google.com/recaptcha/api.js?onload="+r.onLoadFunctionName+"&render=explicit",o.find("body").append(h)),{create:function(n,r){return r.sitekey=r.key||i.key,r.theme=r.theme||i.theme,r.stoken=r.stoken||i.stoken,r.size=r.size||i.size,r.type=r.type||i.type,r.hl=r.lang||i.lang,r.badge=r.badge||i.badge,r.sitekey&&40===r.sitekey.length||t(),y().then(function(t){var i=t.render(n,r);return c[i]=n,i})},reload:function(n){l();s.reset(n);u.$broadcast("reCaptchaReset",n)},execute:function(n){l();s.execute(n)},useLang:function(n,t){var u=c[n],i,r;if(!u)throw new Error("reCaptcha Widget ID not exists",n);if(i=u.querySelector("iframe"),!t)return i&&i.src&&/[?&]hl=\w+/.test(i.src)?i.src.replace(/.+[?&]hl=(\w+)([^\w].+)?/,"$1"):null;i&&i.src&&(r=i.src,/[?&]hl=/.test(r)?r=r.replace(/([?&]hl=)\w+/,"$1"+t):r+=(-1===r.indexOf("?")?"?":"&")+"hl="+t,i.src=r)},getResponse:function(n){return l(),s.getResponse(n)},getInstance:function(n){return c[n]},destroy:function(n){delete c[n]}}}]})}(angular),function(n){"use strict";n.module("vcRecaptcha").directive("vcRecaptcha",["$document","$timeout","vcRecaptchaService",function(t,i,r){return{restrict:"A",require:"?^^form",scope:{response:"=?ngModel",key:"=?",stoken:"=?",theme:"=?",size:"=?",type:"=?",lang:"=?",badge:"=?",tabindex:"=?",required:"=?",onCreate:"&",onSuccess:"&",onExpire:"&"},link:function(u,f,e,o){function h(){o&&o.$setValidity("recaptcha",null);l()}function c(){i(function(){u.response="";s();u.onExpire({widgetId:u.widgetId})})}function s(){o&&o.$setValidity("recaptcha",!1===u.required?null:Boolean(u.response))}function l(){r.destroy(u.widgetId);n.element(t[0].querySelectorAll(".pls-container")).parent().remove()}u.widgetId=null;o&&n.isDefined(e.required)&&u.$watch("required",s);var a=u.$watch("key",function(t){var o=function(n){i(function(){u.response=n;s();u.onSuccess({response:n,widgetId:u.widgetId})})};r.create(f[0],{callback:o,key:t,stoken:u.stoken||e.stoken||null,theme:u.theme||e.theme||null,type:u.type||e.type||null,lang:u.lang||e.lang||null,tabindex:u.tabindex||e.tabindex||null,size:u.size||e.size||null,badge:u.badge||e.badge||null,"expired-callback":c}).then(function(t){s();u.widgetId=t;u.onCreate({widgetId:t});u.$on("$destroy",h);u.$on("reCaptchaReset",function(i,r){(n.isUndefined(r)||t===r)&&(u.response="",s())})});a()})}}}])}(angular)