!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("angular")):"function"==typeof define&&define.amd?define(["exports","angular"],t):t(e["@uirouter/angularjs"]={},e.angular)}(this,function(g,e){"use strict";var t=angular,C=e&&e.module?e:t;function u(n){var e=[].slice.apply(arguments,[1]),r=n.length;return function e(t){return t.length>=r?n.apply(null,t):function(){return e(t.concat([].slice.apply(arguments)))}}(e)}function n(){var n=arguments,r=n.length-1;return function(){for(var e=r,t=n[r].apply(this,arguments);e--;)t=n[e].call(this,t);return t}}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.apply(null,[].slice.call(arguments).reverse())}var w=function(t){return function(e){return e&&e[t]}},v=u(function(e,t,n){return n&&n[e]===t}),S=function(e){return l.apply(null,e.split(".").map(w))},d=function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,e)}};function r(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.apply(null,e)&&r.apply(null,e)}}function i(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.apply(null,e)||r.apply(null,e)}}var c=function(n){return function(e){return e.reduce(function(e,t){return e&&!!n(t)},!0)}},p=function(n){return function(e){return e.reduce(function(e,t){return e||!!n(t)},!1)}},h=function(t){return function(e){return null!=e&&e.constructor===t||e instanceof t}},o=function(t){return function(e){return t===e}},f=function(e){return function(){return e}};function a(t,n){return function(e){return e[t].apply(e,n)}}function m(n){return function(e){for(var t=0;t<n.length;t++)if(n[t][0](e))return n[t][1](e)}}var s=Object.prototype.toString,y=function(t){return function(e){return typeof e===t}},b=y("undefined"),k=d(b),$=function(e){return null===e},_=i($,b),D=y("function"),x=y("number"),O=y("string"),T=function(e){return null!==e&&"object"==typeof e},E=Array.isArray,A=function(e){return"[object Date]"===s.call(e)},P=function(e){return"[object RegExp]"===s.call(e)};function M(e){if(E(e)&&e.length){var t=e.slice(0,-1),n=e.slice(-1);return!(t.filter(d(O)).length||n.filter(d(D)).length)}return D(e)}var R=r(T,l(w("then"),D)),I=function(e){return function(){throw new Error(e+"(): No coreservices implementation for UI-Router is loaded.")}},V={$q:void 0,$injector:void 0},F="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||void 0,L=F.angular||{},j=L.fromJson||JSON.parse.bind(JSON),H=L.toJson||JSON.stringify.bind(JSON),Y=L.forEach||function(t,n,e){if(E(t))return t.forEach(n,e);Object.keys(t).forEach(function(e){return n(t[e],e)})},N=Object.assign||Oe,q=L.equals||Te;function U(e){return e}function z(){}function B(t,r,n,e,i){void 0===i&&(i=!1);var o=function(e){return t()[e].bind(n())};return(e=e||Object.keys(t())).reduce(function(e,t){var n;return e[t]=i?(n=t,function(){return r[n]=o(n),r[n].apply(null,arguments)}):o(t),e},r)}var W=function(e,t){return N(Object.create(e),t)},G=u(K);function K(e,t){return-1!==e.indexOf(t)}var Q=u(Z);function Z(e,t){var n=e.indexOf(t);return 0<=n&&e.splice(n,1),e}var X=u(J);function J(e,t){return e.push(t),t}var ee=function(t){return t.slice().forEach(function(e){"function"==typeof e&&e(),Q(t,e)})};function te(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=N.apply(void 0,[{}].concat(t.reverse()));return N(r,ie(e||{},Object.keys(r)))}var ne=function(e,t){return N(e,t)};function re(e,t){var n=[];for(var r in e.path){if(e.path[r]!==t.path[r])break;n.push(e.path[r])}return n}function ie(e,t){var n={};for(var r in e)-1!==t.indexOf(r)&&(n[r]=e[r]);return n}function oe(n,e){return Object.keys(n).filter(d(G(e))).reduce(function(e,t){return e[t]=n[t],e},{})}function ae(e,t){return ce(e,w(t))}function se(e,n){var t=E(e),r=t?[]:{},i=t?function(e){return r.push(e)}:function(e,t){return r[t]=e};return Y(e,function(e,t){n(e,t)&&i(e,t)}),r}function le(e,n){var r;return Y(e,function(e,t){r||n(e,t)&&(r=e)}),r}var ue=ce;function ce(e,n,r){return r=r||(E(e)?[]:{}),Y(e,function(e,t){return r[t]=n(e,t)}),r}var de=function(t){return Object.keys(t).map(function(e){return t[e]})},pe=function(e,t){return e&&t},he=function(e,t){return e||t},fe=function(e,t){return e.concat(t)},ge=function(e,t){return E(t)?e.concat(t.reduce(ge,[])):me(e,t)};function me(e,t){return e.push(t),e}var ve=function(e,t){return G(e,t)?e:me(e,t)},ye=function(e){return e.reduce(fe,[])},we=function(e){return e.reduce(ge,[])},be=_e,$e=_e;function _e(n,r){return void 0===r&&(r="assert failure"),function(e){var t=n(e);if(!t)throw new Error(D(r)?r(e):r);return t}}var Ce=function(t){return Object.keys(t).map(function(e){return[e,t[e]]})};function Se(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)return[];for(var n=e.reduce(function(e,t){return Math.min(t.length,e)},9007199254740991),r=[],i=function(t){switch(e.length){case 1:r.push([e[0][t]]);break;case 2:r.push([e[0][t],e[1][t]]);break;case 3:r.push([e[0][t],e[1][t],e[2][t]]);break;case 4:r.push([e[0][t],e[1][t],e[2][t],e[3][t]]);break;default:r.push(e.map(function(e){return e[t]}))}},o=0;o<n;o++)i(o);return r}function ke(e,t){var n,r;if(E(t)&&(n=t[0],r=t[1]),!O(n))throw new Error("invalid parameters to applyPairs");return e[n]=r,e}function De(e){return e.length&&e[e.length-1]||void 0}function xe(e,t){return t&&Object.keys(t).forEach(function(e){return delete t[e]}),t||(t={}),N(t,e)}function Oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n)for(var r=Object.keys(n),i=0;i<r.length;i++)e[r[i]]=n[r[i]]}return e}function Te(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;var n=typeof e;if(n!==typeof t||"object"!==n)return!1;var r,i,o=[e,t];if(c(E)(o))return i=t,(r=e).length===i.length&&Se(r,i).reduce(function(e,t){return e&&Te(t[0],t[1])},!0);if(c(A)(o))return e.getTime()===t.getTime();if(c(P)(o))return e.toString()===t.toString();if(c(D)(o))return!0;if([D,E,A,P].map(p).reduce(function(e,t){return e||!!t(o)},!1))return!1;var a={};for(var s in e){if(!Te(e[s],t[s]))return!1;a[s]=!0}for(var s in t)if(!a[s])return!1;return!0}var Ee,Ae=function(e){return e.catch(function(e){return 0})&&e},Pe=function(e){return Ae(V.$q.reject(e))},Me=function(){function t(e){this.text=e,this.glob=e.split(".");var t=this.text.split(".").map(function(e){return"**"===e?"(?:|(?:\\.[^.]*)*)":"*"===e?"\\.[^.]*":"\\."+e}).join("");this.regexp=new RegExp("^"+t+"$")}return t.is=function(e){return!!/[!,*]+/.exec(e)},t.fromString=function(e){return t.is(e)?new t(e):null},t.prototype.matches=function(e){return this.regexp.test("."+e)},t}(),Re=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=null),this._items=e,this._limit=t,this._evictListeners=[],this.onEvict=X(this._evictListeners)}return e.prototype.enqueue=function(e){var t=this._items;return t.push(e),this._limit&&t.length>this._limit&&this.evict(),e},e.prototype.evict=function(){var t=this._items.shift();return this._evictListeners.forEach(function(e){return e(t)}),t},e.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},e.prototype.clear=function(){var e=this._items;return this._items=[],e},e.prototype.size=function(){return this._items.length},e.prototype.remove=function(e){var t=this._items.indexOf(e);return-1<t&&this._items.splice(t,1)[0]},e.prototype.peekTail=function(){return this._items[this._items.length-1]},e.prototype.peekHead=function(){if(this.size())return this._items[0]},e}();(Ee=g.RejectType||(g.RejectType={}))[Ee.SUPERSEDED=2]="SUPERSEDED",Ee[Ee.ABORTED=3]="ABORTED",Ee[Ee.INVALID=4]="INVALID",Ee[Ee.IGNORED=5]="IGNORED",Ee[Ee.ERROR=6]="ERROR";var Ie=0,Ve=function(){function r(e,t,n){this.$id=Ie++,this.type=e,this.message=t,this.detail=n}return r.isRejectionPromise=function(e){return e&&"function"==typeof e.then&&h(r)(e._transitionRejection)},r.superseded=function(e,t){var n=new r(g.RejectType.SUPERSEDED,"The transition has been superseded by a different transition",e);return t&&t.redirected&&(n.redirected=!0),n},r.redirected=function(e){return r.superseded(e,{redirected:!0})},r.invalid=function(e){return new r(g.RejectType.INVALID,"This transition is invalid",e)},r.ignored=function(e){return new r(g.RejectType.IGNORED,"The transition was ignored",e)},r.aborted=function(e){return new r(g.RejectType.ABORTED,"The transition has been aborted",e)},r.errored=function(e){return new r(g.RejectType.ERROR,"The transition errored",e)},r.normalize=function(e){return h(r)(e)?e:r.errored(e)},r.prototype.toString=function(){var e,t=(e=this.detail)&&e.toString!==Object.prototype.toString?e.toString():Ue(e);return"Transition Rejection($id: "+this.$id+" type: "+this.type+", message: "+this.message+", detail: "+t+")"},r.prototype.toPromise=function(){return N(Pe(this),{_transitionRejection:this})},r}();function Fe(e,t){return t.length<=e?t:t.substr(0,e-3)+"..."}function Le(e,t){for(;t.length<e;)t+=" ";return t}function je(e){return e.replace(/^([A-Z])/,function(e){return e.toLowerCase()}).replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function He(e){var t=Ye(e),n=t.match(/^(function [^ ]+\([^)]*\))/),r=n?n[1]:t,i=e.name||"";return i&&r.match(/function \(/)?"function "+i+r.substr(9):r}function Ye(e){var t=E(e)?e.slice(-1)[0]:e;return t&&t.toString()||"undefined"}var Ne=Ve.isRejectionPromise,qe=m([[b,f("undefined")],[$,f("null")],[R,f("[Promise]")],[Ne,function(e){return e._transitionRejection.toString()}],[function(e){return T(e)&&!E(e)&&e.constructor!==Object&&D(e.toString)},function(e){return e.toString()}],[M,He],[f(!0),U]]);function Ue(e){var t=[];function n(e){if(T(e)){if(-1!==t.indexOf(e))return"[circular ref]";t.push(e)}return qe(e)}return b(e)?n(e):JSON.stringify(e,function(e,t){return n(t)}).replace(/\\"/g,'"')}var ze=function(n){return function(e){if(!e)return["",""];var t=e.indexOf(n);return-1===t?[e,""]:[e.substr(0,t),e.substr(t+1)]}},Be=new RegExp("^(?:[a-z]+:)?//[^/]+/"),We=function(e){return e.replace(/\/[^/]*$/,"")},Ge=ze("#"),Ke=ze("?"),Qe=ze("="),Ze=function(e){return e?e.replace(/^#/,""):""};function Xe(e){var t=new RegExp("("+e+")","g");return function(e){return e.split(t).filter(U)}}function Je(e,t){return O(De(e))&&O(t)?e.slice(0,-1).concat(De(e)+t):me(e,t)}function et(e){if(!e)return"ui-view (defunct)";var t=e.creationContext?e.creationContext.name||"(root)":"(none)";return"[ui-view#"+e.id+" "+e.$type+":"+e.fqn+" ("+e.name+"@"+t+")]"}function tt(e){return x(e)?g.Category[e]:g.Category[g.Category[e]]}var nt,rt=Function.prototype.bind.call(console.log,console),it=D(console.table)?console.table.bind(console):rt.bind(console);(nt=g.Category||(g.Category={}))[nt.RESOLVE=0]="RESOLVE",nt[nt.TRANSITION=1]="TRANSITION",nt[nt.HOOK=2]="HOOK",nt[nt.UIVIEW=3]="UIVIEW",nt[nt.VIEWCONFIG=4]="VIEWCONFIG";var ot=S("$id"),at=S("router.$id"),st=function(e){return"Transition #"+ot(e)+"-"+at(e)},lt=function(){function e(){this._enabled={},this.approximateDigests=0}return e.prototype._set=function(t,e){var n=this;e.length||(e=Object.keys(g.Category).map(function(e){return parseInt(e,10)}).filter(function(e){return!isNaN(e)}).map(function(e){return g.Category[e]})),e.map(tt).forEach(function(e){return n._enabled[e]=t})},e.prototype.enable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._set(!0,e)},e.prototype.disable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._set(!1,e)},e.prototype.enabled=function(e){return!!this._enabled[tt(e)]},e.prototype.traceTransitionStart=function(e){this.enabled(g.Category.TRANSITION)&&console.log(st(e)+": Started -> "+Ue(e))},e.prototype.traceTransitionIgnored=function(e){this.enabled(g.Category.TRANSITION)&&console.log(st(e)+": Ignored <> "+Ue(e))},e.prototype.traceHookInvocation=function(e,t,n){if(this.enabled(g.Category.HOOK)){var r=S("traceData.hookType")(n)||"internal",i=S("traceData.context.state.name")(n)||S("traceData.context")(n)||"unknown",o=He(e.registeredHook.callback);console.log(st(t)+": Hook -> "+r+" context: "+i+", "+Fe(200,o))}},e.prototype.traceHookResult=function(e,t,n){this.enabled(g.Category.HOOK)&&console.log(st(t)+": <- Hook returned: "+Fe(200,Ue(e)))},e.prototype.traceResolvePath=function(e,t,n){this.enabled(g.Category.RESOLVE)&&console.log(st(n)+": Resolving "+e+" ("+t+")")},e.prototype.traceResolvableResolved=function(e,t){this.enabled(g.Category.RESOLVE)&&console.log(st(t)+": <- Resolved "+e+" to: "+Fe(200,Ue(e.data)))},e.prototype.traceError=function(e,t){this.enabled(g.Category.TRANSITION)&&console.log(st(t)+": <- Rejected "+Ue(t)+", reason: "+e)},e.prototype.traceSuccess=function(e,t){this.enabled(g.Category.TRANSITION)&&console.log(st(t)+": <- Success "+Ue(t)+", final state: "+e.name)},e.prototype.traceUIViewEvent=function(e,t,n){void 0===n&&(n=""),this.enabled(g.Category.UIVIEW)&&console.log("ui-view: "+Le(30,e)+" "+et(t)+n)},e.prototype.traceUIViewConfigUpdated=function(e,t){this.enabled(g.Category.UIVIEW)&&this.traceUIViewEvent("Updating",e," with ViewConfig from context='"+t+"'")},e.prototype.traceUIViewFill=function(e,t){this.enabled(g.Category.UIVIEW)&&this.traceUIViewEvent("Fill",e," with: "+Fe(200,t))},e.prototype.traceViewSync=function(e){if(this.enabled(g.Category.VIEWCONFIG)){var a="uiview component fqn",t=e.map(function(e){var t,n=e.uiView,r=e.viewConfig,i=n&&n.fqn,o=r&&r.viewDecl.$context.name+": ("+r.viewDecl.$name+")";return(t={})[a]=i,t["view config state (view name)"]=o,t}).sort(function(e,t){return(e[a]||"").localeCompare(t[a]||"")});it(t)}},e.prototype.traceViewServiceEvent=function(e,t){var n,r,i;this.enabled(g.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+e+" "+(r=(n=t).viewDecl,i=r.$context.name||"(root)","[View#"+n.$id+" from '"+i+"' state]: target ui-view: '"+r.$uiViewName+"@"+r.$uiViewContextAnchor+"'"))},e.prototype.traceViewServiceUIViewEvent=function(e,t){this.enabled(g.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+e+" "+et(t))},e}(),ut=new lt,ct=function(){function e(e){this.pattern=/.*/,this.inherit=!0,N(this,e)}return e.prototype.is=function(e,t){return!0},e.prototype.encode=function(e,t){return e},e.prototype.decode=function(e,t){return e},e.prototype.equals=function(e,t){return e==t},e.prototype.$subPattern=function(){var e=this.pattern.toString();return e.substr(1,e.length-2)},e.prototype.toString=function(){return"{ParamType:"+this.name+"}"},e.prototype.$normalize=function(e){return this.is(e)?e:this.decode(e)},e.prototype.$asArray=function(e,t){if(!e)return this;if("auto"===e&&!t)throw new Error("'auto' array mode is for query parameters only");return new dt(this,e)},e}();function dt(r,i){var o=this;function a(e){return E(e)?e:k(e)?[e]:[]}function s(n,r){return function(e){if(E(e)&&0===e.length)return e;var t=ce(a(e),n);return!0===r?0===se(t,function(e){return!e}).length:function(e){switch(e.length){case 0:return;case 1:return"auto"===i?e[0]:e;default:return e}}(t)}}function l(o){return function(e,t){var n=a(e),r=a(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!o(n[i],r[i]))return!1;return!0}}["encode","decode","equals","$normalize"].forEach(function(e){var t=r[e].bind(r),n="equals"===e?l:s;o[e]=n(t)}),N(this,{dynamic:r.dynamic,name:r.name,pattern:r.pattern,inherit:r.inherit,raw:r.raw,is:s(r.is.bind(r),!0),$arrayMode:i})}var pt,ht=Object.prototype.hasOwnProperty,ft=function(e){return 0===["value","type","squash","array","dynamic"].filter(ht.bind(e||{})).length};function gt(e,t,n){var r=!1===n.reloadOnSearch&&t===g.DefType.SEARCH||void 0,i=[n.dynamic,r].find(k),o=k(i)?{dynamic:i}:{},a=function(e){function t(){return e.value}e=ft(e)?{value:e}:e,t.__cacheable=!0;var n=M(e.value)?e.value:t;return N(e,{$$fn:n})}(n&&n.params&&n.params[e]);return N(o,a)}(pt=g.DefType||(g.DefType={}))[pt.PATH=0]="PATH",pt[pt.SEARCH=1]="SEARCH",pt[pt.CONFIG=2]="CONFIG";var mt,vt=function(){function r(e,t,n,r,i){var o=gt(e,n,i);t=function(e,t,n,r,i){if(e.type&&t&&"string"!==t.name)throw new Error("Param '"+r+"' has two type configurations.");if(e.type&&t&&"string"===t.name&&i.type(e.type))return i.type(e.type);if(t)return t;if(e.type)return e.type instanceof ct?e.type:i.type(e.type);var o=n===g.DefType.CONFIG?"any":n===g.DefType.PATH?"path":n===g.DefType.SEARCH?"query":"string";return i.type(o)}(o,t,n,e,r.paramTypes);var a,s,l=(a={array:n===g.DefType.SEARCH&&"auto"},s=e.match(/\[\]$/)?{array:!0}:{},N(a,s,o).array);t=l?t.$asArray(l,n===g.DefType.SEARCH):t;var u=void 0!==o.value||n===g.DefType.SEARCH,c=k(o.dynamic)?!!o.dynamic:!!t.dynamic,d=k(o.raw)?!!o.raw:!!t.raw,p=function(e,t,n){var r=e.squash;if(!t||!1===r)return!1;if(!k(r)||null==r)return n;if(!0===r||O(r))return r;throw new Error("Invalid squash policy: '"+r+"'. Valid policies: false, true, or arbitrary string")}(o,u,r.defaultSquashPolicy()),h=function(e,t,n,r){var i=[{from:"",to:n||t?void 0:""},{from:null,to:n||t?void 0:""}],o=E(e.replace)?e.replace:[];O(r)&&o.push({from:r,to:void 0});var a=ce(o,w("from"));return se(i,function(e){return-1===a.indexOf(e.from)}).concat(o)}(o,l,u,p),f=k(o.inherit)?!!o.inherit:!!t.inherit;N(this,{id:e,type:t,location:n,isOptional:u,dynamic:c,raw:d,squash:p,replace:h,inherit:f,array:l,config:o})}return r.values=function(e,t){void 0===t&&(t={});for(var n={},r=0,i=e;r<i.length;r++){var o=i[r];n[o.id]=o.value(t[o.id])}return n},r.changed=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e.filter(function(e){return!e.type.equals(t[e.id],n[e.id])})},r.equals=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),0===r.changed(e,t,n).length},r.validates=function(e,t){return void 0===t&&(t={}),e.map(function(e){return e.validates(t[e.id])}).reduce(pe,!0)},r.prototype.isDefaultValue=function(e){return this.isOptional&&this.type.equals(this.value(),e)},r.prototype.value=function(e){var i=this;return e=function(e){for(var t=0,n=i.replace;t<n.length;t++){var r=n[t];if(r.from===e)return r.to}return e}(e),b(e)?function(){if(i._defaultValueCache)return i._defaultValueCache.defaultValue;if(!V.$injector)throw new Error("Injectable functions cannot be called at configuration time");var e=V.$injector.invoke(i.config.$$fn);if(null!=e&&!i.type.is(e))throw new Error("Default value ("+e+") for parameter '"+i.id+"' is not an instance of ParamType ("+i.type.name+")");return i.config.$$fn.__cacheable&&(i._defaultValueCache={defaultValue:e}),e}():this.type.$normalize(e)},r.prototype.isSearch=function(){return this.location===g.DefType.SEARCH},r.prototype.validates=function(e){if((b(e)||null===e)&&this.isOptional)return!0;var t=this.type.$normalize(e);if(!this.type.is(t))return!1;var n=this.type.encode(t);return!(O(n)&&!this.type.pattern.exec(n))},r.prototype.toString=function(){return"{Param:"+this.id+" "+this.type+" squash: '"+this.squash+"' optional: "+this.isOptional+"}"},r}(),yt=function(){function e(){this.enqueue=!0,this.typeQueue=[],this.defaultTypes=ie(e.prototype,["hash","string","query","path","int","bool","date","json","any"]);this.types=W(ce(this.defaultTypes,function(e,t){return new ct(N({name:t},e))}),{})}return e.prototype.dispose=function(){this.types={}},e.prototype.type=function(e,t,n){if(!k(t))return this.types[e];if(this.types.hasOwnProperty(e))throw new Error("A type named '"+e+"' has already been defined.");return this.types[e]=new ct(N({name:e},t)),n&&(this.typeQueue.push({name:e,def:n}),this.enqueue||this._flushTypeQueue()),this},e.prototype._flushTypeQueue=function(){for(;this.typeQueue.length;){var e=this.typeQueue.shift();if(e.pattern)throw new Error("You cannot override a type's .pattern at runtime.");N(this.types[e.name],V.$injector.invoke(e.def))}},e}();mt=function(e){var t=function(e){return null!=e?e.toString():e},n={encode:t,decode:t,is:h(String),pattern:/.*/,equals:function(e,t){return e==t}};return N({},n,e)},N(yt.prototype,{string:mt({}),path:mt({pattern:/[^/]*/}),query:mt({}),hash:mt({inherit:!1}),int:mt({decode:function(e){return parseInt(e,10)},is:function(e){return!_(e)&&this.decode(e.toString())===e},pattern:/-?\d+/}),bool:mt({encode:function(e){return e?1:0},decode:function(e){return 0!==parseInt(e,10)},is:h(Boolean),pattern:/0|1/}),date:mt({encode:function(e){return this.is(e)?[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("-"):void 0},decode:function(e){if(this.is(e))return e;var t=this.capture.exec(e);return t?new Date(t[1],t[2]-1,t[3]):void 0},is:function(e){return e instanceof Date&&!isNaN(e.valueOf())},equals:function(n,r){return["getFullYear","getMonth","getDate"].reduce(function(e,t){return e&&n[t]()===r[t]()},!0)},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:mt({encode:H,decode:j,is:h(Object),equals:q,pattern:/[^/]*/}),any:mt({encode:U,decode:U,is:function(){return!0},equals:q})});var wt=function(){function e(e){void 0===e&&(e={}),N(this,e)}return e.prototype.$inherit=function(e,t,n){var r,i=re(t,n),o={},a=[];for(var s in i)if(i[s]&&i[s].params&&(r=Object.keys(i[s].params)).length)for(var l in r)0<=a.indexOf(r[l])||(a.push(r[l]),o[r[l]]=this[r[l]]);return N({},o,e)},e}(),bt=function(){function r(e){if(e instanceof r){var t=e;this.state=t.state,this.paramSchema=t.paramSchema.slice(),this.paramValues=N({},t.paramValues),this.resolvables=t.resolvables.slice(),this.views=t.views&&t.views.slice()}else{var n=e;this.state=n,this.paramSchema=n.parameters({inherit:!1}),this.paramValues={},this.resolvables=n.resolvables.map(function(e){return e.clone()})}}return r.prototype.clone=function(){return new r(this)},r.prototype.applyRawParams=function(r){return this.paramValues=this.paramSchema.reduce(function(e,t){return ke(e,[(n=t).id,n.value(r[n.id])]);var n},{}),this},r.prototype.parameter=function(e){return le(this.paramSchema,v("id",e))},r.prototype.equals=function(e,t){var n=this.diff(e,t);return n&&0===n.length},r.prototype.diff=function(e,t){if(this.state!==e.state)return!1;var n=t?t(this):this.paramSchema;return vt.changed(n,this.paramValues,e.paramValues)},r.clone=function(e){return e.clone()},r}(),$t=function(){function r(e,t,n,r){this._stateRegistry=e,this._identifier=t,this._identifier=t,this._params=N({},n||{}),this._options=N({},r||{}),this._definition=e.matcher.find(t,this._options.relative)}return r.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},r.prototype.identifier=function(){return this._identifier},r.prototype.params=function(){return this._params},r.prototype.$state=function(){return this._definition},r.prototype.state=function(){return this._definition&&this._definition.self},r.prototype.options=function(){return this._options},r.prototype.exists=function(){return!(!this._definition||!this._definition.self)},r.prototype.valid=function(){return!this.error()},r.prototype.error=function(){var e=this.options().relative;if(this._definition||!e)return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'";var t=e.name?e.name:e;return"Could not resolve '"+this.name()+"' from state '"+t+"'"},r.prototype.toString=function(){return"'"+this.name()+"'"+Ue(this.params())},r.prototype.withState=function(e){return new r(this._stateRegistry,e,this._params,this._options)},r.prototype.withParams=function(e,t){void 0===t&&(t=!1);var n=t?e:N({},this._params,e);return new r(this._stateRegistry,this._identifier,n,this._options)},r.prototype.withOptions=function(e,t){void 0===t&&(t=!1);var n=t?e:N({},this._options,e);return new r(this._stateRegistry,this._identifier,this._params,n)},r.isDef=function(e){return e&&e.state&&(O(e.state)||O(e.state.name))},r}(),_t=function(){function p(){}return p.makeTargetState=function(e,t){var n=De(t).state;return new $t(e,n,t.map(w("paramValues")).reduce(ne,{}),{})},p.buildPath=function(e){var t=e.params();return e.$state().path.map(function(e){return new bt(e).applyRawParams(t)})},p.buildToPath=function(e,t){var n=p.buildPath(t);return t.options().inherit?p.inheritParams(e,n,Object.keys(t.params())):n},p.applyViewConfigs=function(i,o,t){o.filter(function(e){return G(t,e.state)}).forEach(function(t){var e=de(t.state.views||{}),n=p.subPath(o,function(e){return e===t}),r=e.map(function(e){return i.createViewConfig(n,e)});t.views=r.reduce(fe,[])})},p.inheritParams=function(l,e,u){void 0===u&&(u=[]);var c=l.map(function(e){return e.paramSchema}).reduce(fe,[]).filter(function(e){return!e.inherit}).map(w("id"));return e.map(function(e){var t=N({},e&&e.paramValues),n=ie(t,u);t=oe(t,u);var r,i,o,a=oe((r=l,i=e.state,o=le(r,v("state",i)),N({},o&&o.paramValues)||{}),c),s=N(t,a,n);return new bt(e.state).applyRawParams(s)})},p.treeChanges=function(e,r,t){for(var n,i,o,a,s,l,u=Math.min(e.length,r.length),c=0;c<u&&e[c].state!==t&&(n=e[c],i=r[c],n.equals(i,p.nonDynamicParams));)c++;a=(o=e).slice(0,c),s=o.slice(c);var d=a.map(function(e,t){var n=e.clone();return n.paramValues=r[t].paramValues,n});return l=r.slice(c),{from:o,to:d.concat(l),retained:a,retainedWithToParams:d,exiting:s,entering:l}},p.matching=function(e,t,i){var o=!1;return Se(e,t).reduce(function(e,t){var n=t[0],r=t[1];return(o=o||!n.equals(r,i))?e:e.concat(n)},[])},p.equals=function(e,t,n){return e.length===t.length&&p.matching(e,t,n).length===e.length},p.subPath=function(e,t){var n=le(e,t),r=e.indexOf(n);return-1===r?void 0:e.slice(0,r+1)},p.nonDynamicParams=function(e){return e.state.parameters({inherit:!1}).filter(function(e){return!e.dynamic})},p.paramValues=function(e){return e.reduce(function(e,t){return N(e,t.paramValues)},{})},p}(),Ct={when:{LAZY:"LAZY",EAGER:"EAGER"},async:{WAIT:"WAIT",NOWAIT:"NOWAIT",RXWAIT:"RXWAIT"}},St={when:"LAZY",async:"WAIT"},kt=function(){function a(e,t,n,r,i){if(this.resolved=!1,this.promise=void 0,e instanceof a)N(this,e);else if(D(t)){if(_(e))throw new Error("new Resolvable(): token argument is required");if(!D(t))throw new Error("new Resolvable(): resolveFn argument must be a function");this.token=e,this.policy=r,this.resolveFn=t,this.deps=n||[],this.data=i,this.resolved=void 0!==i,this.promise=this.resolved?V.$q.when(this.data):void 0}else if(T(e)&&e.token&&(e.hasOwnProperty("resolveFn")||e.hasOwnProperty("data"))){var o=e;return new a(o.token,o.resolveFn,o.deps,o.policy,o.data)}}return a.prototype.getPolicy=function(e){var t=this.policy||{},n=e&&e.resolvePolicy||{};return{when:t.when||n.when||St.when,async:t.async||n.async||St.async}},a.prototype.resolve=function(t,n){var r=this,e=V.$q,i=t.findNode(this),o=i&&i.state,a="RXWAIT"===this.getPolicy(o).async?function(e){var t=e.cache(1);return t.take(1).toPromise().then(function(){return t})}:U;return this.promise=e.when().then(function(){return e.all(t.getDependencies(r).map(function(e){return e.get(t,n)}))}).then(function(e){return r.resolveFn.apply(null,e)}).then(a).then(function(e){return r.data=e,r.resolved=!0,r.resolveFn=null,ut.traceResolvableResolved(r,n),r.data})},a.prototype.get=function(e,t){return this.promise||this.resolve(e,t)},a.prototype.toString=function(){return"Resolvable(token: "+Ue(this.token)+", requires: ["+this.deps.map(Ue)+"])"},a.prototype.clone=function(){return new a(this)},a.fromData=function(e,t){return new a(e,function(){return t},null,null,t)},a}(),Dt=Ct.when,xt=[Dt.EAGER,Dt.LAZY],Ot=[Dt.EAGER],Tt="Native Injector",Et=function(){function e(e){this._path=e}return e.prototype.getTokens=function(){return this._path.reduce(function(e,t){return e.concat(t.resolvables.map(function(e){return e.token}))},[]).reduce(ve,[])},e.prototype.getResolvable=function(t){return De(this._path.map(function(e){return e.resolvables}).reduce(fe,[]).filter(function(e){return e.token===t}))},e.prototype.getPolicy=function(e){var t=this.findNode(e);return e.getPolicy(t.state)},e.prototype.subContext=function(t){return new e(_t.subPath(this._path,function(e){return e.state===t}))},e.prototype.addResolvables=function(e,t){var n=le(this._path,v("state",t)),r=e.map(function(e){return e.token});n.resolvables=n.resolvables.filter(function(e){return-1===r.indexOf(e.token)}).concat(e)},e.prototype.resolvePath=function(e,s){var l=this;void 0===e&&(e="LAZY");var u=(G(xt,e)?e:"LAZY")===Ct.when.EAGER?Ot:xt;ut.traceResolvePath(this._path,e,s);var c=function(t,n){return function(e){return G(t,l.getPolicy(e)[n])}},t=this._path.reduce(function(e,t){var n=t.resolvables.filter(c(u,"when")),r=n.filter(c(["NOWAIT"],"async")),i=n.filter(d(c(["NOWAIT"],"async"))),o=l.subContext(t.state),a=function(t){return t.get(o,s).then(function(e){return{token:t.token,value:e}})};return r.forEach(a),e.concat(i.map(a))},[]);return V.$q.all(t)},e.prototype.injector=function(){return this._injector||(this._injector=new At(this))},e.prototype.findNode=function(t){return le(this._path,function(e){return G(e.resolvables,t)})},e.prototype.getDependencies=function(t){var r=this,n=this.findNode(t),i=(_t.subPath(this._path,function(e){return e===n})||this._path).reduce(function(e,t){return e.concat(t.resolvables)},[]).filter(function(e){return e!==t});return t.deps.map(function(t){var e=i.filter(function(e){return e.token===t});if(e.length)return De(e);var n=r.injector().getNative(t);if(b(n))throw new Error("Could not find Dependency Injection token: "+Ue(t));return new kt(t,function(){return n},[],n)})},e}(),At=function(){function e(e){this.context=e,this.native=this.get(Tt)||V.$injector}return e.prototype.get=function(e){var t=this.context.getResolvable(e);if(t){if("NOWAIT"===this.context.getPolicy(t).async)return t.get(this.context);if(!t.resolved)throw new Error("Resolvable async .get() not complete:"+Ue(t.token));return t.data}return this.getNative(e)},e.prototype.getAsync=function(e){var t=this.context.getResolvable(e);return t?t.get(this.context):V.$q.when(this.native.get(e))},e.prototype.getNative=function(e){return this.native&&this.native.get(e)},e}();function Pt(e){return e.name}function Mt(e){return e.self.$$state=function(){return e},e.self}function Rt(e){return e.parent&&e.parent.data&&(e.data=e.self.data=W(e.parent.data,e.data)),e.data}var It=function(o,a){return function(e){var t=e.self;t&&t.url&&t.name&&t.name.match(/\.\*\*$/)&&(t.url+="{remainder:any}");var n=e.parent,r=function(e){if(!O(e))return!1;var t="^"===e.charAt(0);return{val:t?e.substring(1):e,root:t}}(t.url),i=r?o.compile(r.val,{state:t}):t.url;if(!i)return null;if(!o.isMatcher(i))throw new Error("Invalid url '"+i+"' in state '"+e+"'");return r&&r.root?i:(n&&n.navigable||a()).url.append(i)}};function Vt(e){return e.parent?e.parent.path.concat(e):[e]}function Ft(e){var t=e.parent?N({},e.parent.includes):{};return t[e.name]=!0,t}function Lt(e){var t,n,r=function(e){return e.provide||e.token},i=m([[w("resolveFn"),function(e){return new kt(r(e),e.resolveFn,e.deps,e.policy)}],[w("useFactory"),function(e){return new kt(r(e),e.useFactory,e.deps||e.dependencies,e.policy)}],[w("useClass"),function(e){return new kt(r(e),function(){return new e.useClass},[],e.policy)}],[w("useValue"),function(e){return new kt(r(e),function(){return e.useValue},[],e.policy,e.useValue)}],[w("useExisting"),function(e){return new kt(r(e),U,[e.useExisting],e.policy)}]]),o=m([[l(w("val"),O),function(e){return new kt(e.token,U,[e.val],e.policy)}],[l(w("val"),E),function(e){return new kt(e.token,De(e.val),e.val.slice(0,-1),e.policy)}],[l(w("val"),D),function(e){return new kt(e.token,e.val,(t=e.val,n=V.$injector,t.$inject||n&&n.annotate(t,n.strictDi)||"deferred"),e.policy);var t,n}]]),a=m([[h(kt),function(e){return e}],[function(e){return!(!e.token||!e.resolveFn)},i],[function(e){return!(!e.provide&&!e.token||!(e.useValue||e.useFactory||e.useExisting||e.useClass))},i],[function(e){return!!(e&&e.val&&(O(e.val)||E(e.val)||D(e.val)))},o],[f(!0),function(e){throw new Error("Invalid resolve value: "+Ue(e))}]]),s=e.resolve;return(E(s)?s:(t=s,n=e.resolvePolicy||{},Object.keys(t||{}).map(function(e){return{token:e,val:t[e],deps:void 0,policy:n[e]}}))).map(a)}var jt,Ht,Yt=function(){function e(t,e){this.matcher=t;var r,n,i=this,o=function(){return t.find("")},a=function(e){return""===e.name};this.builders={name:[Pt],self:[Mt],parent:[function(e){return a(e)?null:t.find(i.parentName(e))||o()}],data:[Rt],url:[It(e,o)],navigable:[(n=a,function(e){return!n(e)&&e.url?e:e.parent?e.parent.navigable:null})],params:[(r=e.paramFactory,function(n){var e=n.url&&n.url.parameters({inherit:!1})||[],t=de(ue(oe(n.params||{},e.map(w("id"))),function(e,t){return r.fromConfig(t,null,n.self)}));return e.concat(t).map(function(e){return[e.id,e]}).reduce(ke,{})})],views:[],path:[Vt],includes:[Ft],resolvables:[Lt]}}return e.prototype.builder=function(e,t){var n=this.builders,r=n[e]||[];return O(e)&&!k(t)?1<r.length?r:r[0]:O(e)&&D(t)?(n[e]=r,n[e].push(t),function(){return n[e].splice(n[e].indexOf(t,1))&&null}):void 0},e.prototype.build=function(e){var t=this.matcher,n=this.builders,r=this.parentName(e);if(r&&!t.find(r,void 0,!1))return null;for(var i in n)if(n.hasOwnProperty(i)){var o=n[i].reduce(function(t,n){return function(e){return n(e,t)}},z);e[i]=o(e)}return e},e.prototype.parentName=function(e){var t=e.name||"",n=t.split(".");if("**"===n.pop()&&n.pop(),n.length){if(e.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+t+")");return n.join(".")}return e.parent?O(e.parent)?e.parent:e.parent.name:""},e.prototype.name=function(e){var t=e.name;if(-1!==t.indexOf(".")||!e.parent)return t;var n=O(e.parent)?e.parent:e.parent.name;return n?n+"."+t:t},e}(),Nt=function(){function n(e){return n.create(e||{})}return n.create=function(e){e=n.isStateClass(e)?new e:e;var t=W(W(e,n.prototype));return e.$$state=function(){return t},t.self=e,t.__stateObjectCache={nameGlob:Me.fromString(t.name)},t},n.prototype.is=function(e){return this===e||this.self===e||this.fqn()===e},n.prototype.fqn=function(){if(!(this.parent&&this.parent instanceof this.constructor))return this.name;var e=this.parent.fqn();return e?e+"."+this.name:this.name},n.prototype.root=function(){return this.parent&&this.parent.root()||this},n.prototype.parameters=function(t){return((t=te(t,{inherit:!0,matchingKeys:null})).inherit&&this.parent&&this.parent.parameters()||[]).concat(de(this.params)).filter(function(e){return!t.matchingKeys||t.matchingKeys.hasOwnProperty(e.id)})},n.prototype.parameter=function(e,t){return void 0===t&&(t={}),this.url&&this.url.parameter(e,t)||le(de(this.params),v("id",e))||t.inherit&&this.parent&&this.parent.parameter(e)},n.prototype.toString=function(){return this.fqn()},n.isStateClass=function(e){return D(e)&&!0===e.__uiRouterState},n.isState=function(e){return T(e.__stateObjectCache)},n}(),qt=function(){function e(e){this._states=e}return e.prototype.isRelative=function(e){return 0===(e=e||"").indexOf(".")||0===e.indexOf("^")},e.prototype.find=function(e,t,n){if(void 0===n&&(n=!0),e||""===e){var r=O(e),i=r?e:e.name;this.isRelative(i)&&(i=this.resolvePath(i,t));var o=this._states[i];if(o&&(r||!(r||o!==e&&o.self!==e)))return o;if(r&&n){var a=de(this._states).filter(function(e){return e.__stateObjectCache.nameGlob&&e.__stateObjectCache.nameGlob.matches(i)});return 1<a.length&&console.log("stateMatcher.find: Found multiple matches for "+i+" using glob: ",a.map(function(e){return e.name})),a[0]}}},e.prototype.resolvePath=function(e,t){if(!t)throw new Error("No reference point given for path '"+e+"'");for(var n=this.find(t),r=e.split("."),i=r.length,o=0,a=n;o<i;o++)if(""!==r[o]||0!==o){if("^"!==r[o])break;if(!a.parent)throw new Error("Path '"+e+"' not valid for state '"+n.name+"'");a=a.parent}else a=n;var s=r.slice(o).join(".");return a.name+(a.name&&s?".":"")+s},e}(),Ut=function(){function e(e,t,n,r,i){this.$registry=e,this.$urlRouter=t,this.states=n,this.builder=r,this.listeners=i,this.queue=[],this.matcher=e.matcher}return e.prototype.dispose=function(){this.queue=[]},e.prototype.register=function(e){var t=this.queue,n=Nt.create(e),r=n.name;if(!O(r))throw new Error("State must have a valid name");if(this.states.hasOwnProperty(r)||G(t.map(w("name")),r))throw new Error("State '"+r+"' is already defined");return t.push(n),this.flush(),n},e.prototype.flush=function(){for(var t=this,e=this.queue,n=this.states,r=this.builder,i=[],o=[],a={},s=function(e){return t.states.hasOwnProperty(e)&&t.states[e]},l=function(){i.length&&t.listeners.forEach(function(e){return e("registered",i.map(function(e){return e.self}))})};0<e.length;){var u=e.shift(),c=u.name,d=r.build(u),p=o.indexOf(u);if(d){var h=s(c);if(h&&h.name===c)throw new Error("State '"+c+"' is already defined");var f=s(c+".**");f&&this.$registry.deregister(f),n[c]=u,this.attachRoute(u),0<=p&&o.splice(p,1),i.push(u)}else{var g=a[c];if(a[c]=e.length,0<=p&&g===e.length)return e.push(u),l(),n;p<0&&o.push(u),e.push(u)}}return l(),n},e.prototype.attachRoute=function(e){!e.abstract&&e.url&&this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(e))},e}(),zt=function(){function e(e){this._router=e,this.states={},this.listeners=[],this.matcher=new qt(this.states),this.builder=new Yt(this.matcher,e.urlMatcherFactory),this.stateQueue=new Ut(this,e.urlRouter,this.states,this.builder,this.listeners),this._registerRoot()}return e.prototype._registerRoot=function(){(this._root=this.stateQueue.register({name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},abstract:!0})).navigable=null},e.prototype.dispose=function(){var t=this;this.stateQueue.dispose(),this.listeners=[],this.get().forEach(function(e){return t.get(e)&&t.deregister(e)})},e.prototype.onStatesChanged=function(e){return this.listeners.push(e),function(){Q(this.listeners)(e)}.bind(this)},e.prototype.root=function(){return this._root},e.prototype.register=function(e){return this.stateQueue.register(e)},e.prototype._deregisterTree=function(e){var n=this,r=this.get().map(function(e){return e.$$state()}),i=function(t){var e=r.filter(function(e){return-1!==t.indexOf(e.parent)});return 0===e.length?e:e.concat(i(e))},t=i([e]),o=[e].concat(t).reverse();return o.forEach(function(e){var t=n._router.urlRouter;t.rules().filter(v("state",e)).forEach(t.removeRule.bind(t)),delete n.states[e.name]}),o},e.prototype.deregister=function(e){var t=this.get(e);if(!t)throw new Error("Can't deregister state; not found: "+e);var n=this._deregisterTree(t.$$state());return this.listeners.forEach(function(e){return e("deregistered",n.map(function(e){return e.self}))}),n},e.prototype.get=function(e,t){var n=this;if(0===arguments.length)return Object.keys(this.states).map(function(e){return n.states[e].self});var r=this.matcher.find(e,t);return r&&r.self||null},e.prototype.decorator=function(e,t){return this.builder.builder(e,t)},e}();(jt=g.TransitionHookPhase||(g.TransitionHookPhase={}))[jt.CREATE=0]="CREATE",jt[jt.BEFORE=1]="BEFORE",jt[jt.RUN=2]="RUN",jt[jt.SUCCESS=3]="SUCCESS",jt[jt.ERROR=4]="ERROR",(Ht=g.TransitionHookScope||(g.TransitionHookScope={}))[Ht.TRANSITION=0]="TRANSITION",Ht[Ht.STATE=1]="STATE";var Bt={current:z,transition:null,traceData:{},bind:null},Wt=function(){function o(e,t,n,r){var i=this;this.transition=e,this.stateContext=t,this.registeredHook=n,this.options=r,this.isSuperseded=function(){return i.type.hookPhase===g.TransitionHookPhase.RUN&&!i.options.transition.isActive()},this.options=te(r,Bt),this.type=n.eventType}return o.chain=function(e,t){return e.reduce(function(e,t){return e.then(function(){return t.invokeHook()})},t||V.$q.when())},o.invokeHooks=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].invokeHook();if(R(r)){var i=e.slice(n+1);return o.chain(i,r).then(t)}}return t()},o.runAllHooks=function(e){e.forEach(function(e){return e.invokeHook()})},o.prototype.logError=function(e){this.transition.router.stateService.defaultErrorHandler()(e)},o.prototype.invokeHook=function(){var t=this,n=this.registeredHook;if(!n._deregistered){var e=this.getNotCurrentRejection();if(e)return e;var r=this.options;ut.traceHookInvocation(this,this.transition,r);var i=function(e){return n.eventType.getErrorHandler(t)(e)},o=function(e){return n.eventType.getResultHandler(t)(e)};try{var a=n.callback.call(r.bind,t.transition,t.stateContext);return!this.type.synchronous&&R(a)?a.catch(function(e){return Ve.normalize(e).toPromise()}).then(o,i):o(a)}catch(e){return i(Ve.normalize(e))}finally{n.invokeLimit&&++n.invokeCount>=n.invokeLimit&&n.deregister()}}},o.prototype.handleHookResult=function(e){var t=this,n=this.getNotCurrentRejection();return n||(R(e)?e.then(function(e){return t.handleHookResult(e)}):(ut.traceHookResult(e,this.transition,this.options),!1===e?Ve.aborted("Hook aborted transition").toPromise():h($t)(e)?Ve.redirected(e).toPromise():void 0))},o.prototype.getNotCurrentRejection=function(){var e=this.transition.router;return e._disposed?Ve.aborted("UIRouter instance #"+e.$id+" has been stopped (disposed)").toPromise():this.transition._aborted?Ve.aborted().toPromise():this.isSuperseded()?Ve.superseded(this.options.current()).toPromise():void 0},o.prototype.toString=function(){var e=this.options,t=this.registeredHook;return(S("traceData.hookType")(e)||"internal")+" context: "+(S("traceData.context.state.name")(e)||S("traceData.context")(e)||"unknown")+", "+Fe(200,Ye(t.callback))},o.HANDLE_RESULT=function(t){return function(e){return t.handleHookResult(e)}},o.LOG_REJECTED_RESULT=function(t){return function(e){R(e)&&e.catch(function(e){return t.logError(Ve.normalize(e))})}},o.LOG_ERROR=function(t){return function(e){return t.logError(e)}},o.REJECT_ERROR=function(e){return function(e){return Pe(e)}},o.THROW_ERROR=function(e){return function(e){throw e}},o}();function Gt(e,t){var i=O(t)?[t]:t;return!!(D(i)?i:function(e){for(var t=i,n=0;n<t.length;n++){var r=new Me(t[n]);if(r&&r.matches(e.name)||!r&&t[n]===e.name)return!0}return!1})(e)}var Kt=function(){function e(e,t,n,r,i,o){void 0===o&&(o={}),this.tranSvc=e,this.eventType=t,this.callback=n,this.matchCriteria=r,this.removeHookFromRegistry=i,this.invokeCount=0,this._deregistered=!1,this.priority=o.priority||0,this.bind=o.bind||null,this.invokeLimit=o.invokeLimit}return e.prototype._matchingNodes=function(e,t){if(!0===t)return e;var n=e.filter(function(e){return Gt(e.state,t)});return n.length?n:null},e.prototype._getDefaultMatchCriteria=function(){return ue(this.tranSvc._pluginapi._getPathTypes(),function(){return!0})},e.prototype._getMatchingNodes=function(o){var a=this,s=N(this._getDefaultMatchCriteria(),this.matchCriteria);return de(this.tranSvc._pluginapi._getPathTypes()).reduce(function(e,t){var n=t.scope===g.TransitionHookScope.STATE,r=o[t.name]||[],i=n?r:[De(r)];return e[t.name]=a._matchingNodes(i,s[t.name]),e},{})},e.prototype.matches=function(e){var t=this._getMatchingNodes(e);return de(t).every(U)?t:null},e.prototype.deregister=function(){this.removeHookFromRegistry(this),this._deregistered=!0},e}();function Qt(e,i,o){var a=(e._registeredHooks=e._registeredHooks||{})[o.name]=[],s=Q(a);function t(e,t,n){void 0===n&&(n={});var r=new Kt(i,o,t,e,s,n);return a.push(r),r.deregister.bind(r)}return e[o.name]=t}var Zt=function(){function e(e){this.transition=e}return e.prototype.buildHooksForPhase=function(e){var t=this;return this.transition.router.transitionService._pluginapi._getEvents(e).map(function(e){return t.buildHooks(e)}).reduce(fe,[]).filter(U)},e.prototype.buildHooks=function(o){var a=this.transition,e=a.treeChanges(),t=this.getMatchingHooks(o,e);if(!t)return[];var s={transition:a,current:a.options().current};return t.map(function(i){return i.matches(e)[o.criteriaMatchPath.name].map(function(e){var t=N({bind:i.bind,traceData:{hookType:o.name,context:e}},s),n=o.criteriaMatchPath.scope===g.TransitionHookScope.STATE?e.state.self:null,r=new Wt(a,n,i,t);return{hook:i,node:e,transitionHook:r}})}).reduce(fe,[]).sort(function(i){void 0===i&&(i=!1);return function(e,t){var n=i?-1:1,r=(e.node.state.path.length-t.node.state.path.length)*n;return 0!==r?r:t.hook.priority-e.hook.priority}}(o.reverseSort)).map(function(e){return e.transitionHook})},e.prototype.getMatchingHooks=function(t,n){var e=t.hookPhase===g.TransitionHookPhase.CREATE,r=this.transition.router.transitionService;return(e?[r]:[this.transition,r]).map(function(e){return e.getHooks(t.name)}).filter(be(E,"broken event named: "+t.name)).reduce(fe,[]).filter(function(e){return e.matches(n)})},e}();var Xt=w("self"),Jt=function(){function t(e,t,n){var r=this;if(this._deferred=V.$q.defer(),this.promise=this._deferred.promise,this._registeredHooks={},this._hookBuilder=new Zt(this),this.isActive=function(){return r.router.globals.transition===r},this.router=n,!(this._targetState=t).valid())throw new Error(t.error());this._options=N({current:f(this)},t.options()),this.$id=n.transitionService._transitionCount++;var i=_t.buildToPath(e,t);this._treeChanges=_t.treeChanges(e,i,this._options.reloadState),this.createTransitionHookRegFns();var o=this._hookBuilder.buildHooksForPhase(g.TransitionHookPhase.CREATE);Wt.invokeHooks(o,function(){return null}),this.applyViewConfigs(n)}return t.prototype.onBefore=function(e,t,n){},t.prototype.onStart=function(e,t,n){},t.prototype.onExit=function(e,t,n){},t.prototype.onRetain=function(e,t,n){},t.prototype.onEnter=function(e,t,n){},t.prototype.onFinish=function(e,t,n){},t.prototype.onSuccess=function(e,t,n){},t.prototype.onError=function(e,t,n){},t.prototype.createTransitionHookRegFns=function(){var t=this;this.router.transitionService._pluginapi._getEvents().filter(function(e){return e.hookPhase!==g.TransitionHookPhase.CREATE}).forEach(function(e){return Qt(t,t.router.transitionService,e)})},t.prototype.getHooks=function(e){return this._registeredHooks[e]},t.prototype.applyViewConfigs=function(e){var t=this._treeChanges.entering.map(function(e){return e.state});_t.applyViewConfigs(e.transitionService.$view,this._treeChanges.to,t)},t.prototype.$from=function(){return De(this._treeChanges.from).state},t.prototype.$to=function(){return De(this._treeChanges.to).state},t.prototype.from=function(){return this.$from().self},t.prototype.to=function(){return this.$to().self},t.prototype.targetState=function(){return this._targetState},t.prototype.is=function(e){return e instanceof t?this.is({to:e.$to().name,from:e.$from().name}):!(e.to&&!Gt(this.$to(),e.to)||e.from&&!Gt(this.$from(),e.from))},t.prototype.params=function(e){return void 0===e&&(e="to"),Object.freeze(this._treeChanges[e].map(w("paramValues")).reduce(ne,{}))},t.prototype.paramsChanged=function(){var e=this.params("from"),n=this.params("to"),t=[].concat(this._treeChanges.to).concat(this._treeChanges.from).map(function(e){return e.paramSchema}).reduce(ge,[]).reduce(ve,[]);return vt.changed(t,e,n).reduce(function(e,t){return e[t.id]=n[t.id],e},{})},t.prototype.injector=function(t,e){void 0===e&&(e="to");var n=this._treeChanges[e];return t&&(n=_t.subPath(n,function(e){return e.state===t||e.state.name===t})),new Et(n).injector()},t.prototype.getResolveTokens=function(e){return void 0===e&&(e="to"),new Et(this._treeChanges[e]).getTokens()},t.prototype.addResolvable=function(e,t){void 0===t&&(t=""),e=h(kt)(e)?e:new kt(e);var n="string"==typeof t?t:t.name,r=this._treeChanges.to,i=le(r,function(e){return e.state.name===n});new Et(r).addResolvables([e],i.state)},t.prototype.redirectedFrom=function(){return this._options.redirectedFrom||null},t.prototype.originalTransition=function(){var e=this.redirectedFrom();return e&&e.originalTransition()||this},t.prototype.options=function(){return this._options},t.prototype.entering=function(){return ce(this._treeChanges.entering,w("state")).map(Xt)},t.prototype.exiting=function(){return ce(this._treeChanges.exiting,w("state")).map(Xt).reverse()},t.prototype.retained=function(){return ce(this._treeChanges.retained,w("state")).map(Xt)},t.prototype.views=function(e,t){void 0===e&&(e="entering");var n=this._treeChanges[e];return(n=t?n.filter(v("state",t)):n).map(w("views")).filter(U).reduce(fe,[])},t.prototype.treeChanges=function(e){return e?this._treeChanges[e]:this._treeChanges},t.prototype.redirect=function(e){for(var t=1,n=this;null!=(n=n.redirectedFrom());)if(20<++t)throw new Error("Too many consecutive Transition redirects (20+)");var r={redirectedFrom:this,source:"redirect"};"url"===this.options().source&&!1!==e.options().location&&(r.location="replace");var i=N({},this.options(),e.options(),r);e=e.withOptions(i,!0);var o,a=this.router.transitionService.create(this._treeChanges.from,e),s=this._treeChanges.entering,l=a._treeChanges.entering;return _t.matching(l,s,_t.nonDynamicParams).filter(d((o=e.options().reloadState,function(e){return o&&e.state.includes[o.name]}))).forEach(function(e,t){e.resolvables=s[t].resolvables}),a},t.prototype._changedParams=function(){var e=this._treeChanges;if(!this._options.reload&&(!e.exiting.length&&!e.entering.length&&e.to.length===e.from.length&&!Se(e.to,e.from).map(function(e){return e[0].state!==e[1].state}).reduce(he,!1))){var t=e.to.map(function(e){return e.paramSchema}),n=[e.to,e.from].map(function(e){return e.map(function(e){return e.paramValues})});return Se(t,n[0],n[1]).map(function(e){var t=e[0],n=e[1],r=e[2];return vt.changed(t,n,r)}).reduce(fe,[])}},t.prototype.dynamic=function(){var e=this._changedParams();return!!e&&e.map(function(e){return e.dynamic}).reduce(he,!1)},t.prototype.ignored=function(){return!!this._ignoredReason()},t.prototype._ignoredReason=function(){var e=this.router.globals.transition,r=this._options.reloadState,t=function(e,t){if(e.length!==t.length)return!1;var n=_t.matching(e,t);return e.length===n.filter(function(e){return!r||!e.state.includes[r.name]}).length},n=this.treeChanges(),i=e&&e.treeChanges();return i&&t(i.to,n.to)&&t(i.exiting,n.exiting)?"SameAsPending":0===n.exiting.length&&0===n.entering.length&&t(n.from,n.to)?"SameAsCurrent":void 0},t.prototype.run=function(){var t=this,n=Wt.runAllHooks,r=function(e){return t._hookBuilder.buildHooksForPhase(e)},e=r(g.TransitionHookPhase.BEFORE);return Wt.invokeHooks(e,function(){var e=t.router.globals;return e.lastStartedTransitionId=t.$id,e.transition=t,e.transitionHistory.enqueue(t),ut.traceTransitionStart(t),V.$q.when(void 0)}).then(function(){var e=r(g.TransitionHookPhase.RUN);return Wt.invokeHooks(e,function(){return V.$q.when(void 0)})}).then(function(){ut.traceSuccess(t.$to(),t),t.success=!0,t._deferred.resolve(t.to()),n(r(g.TransitionHookPhase.SUCCESS))},function(e){ut.traceError(e,t),t.success=!1,t._deferred.reject(e),t._error=e,n(r(g.TransitionHookPhase.ERROR))}),this.promise},t.prototype.valid=function(){return!this.error()||void 0!==this.success},t.prototype.abort=function(){b(this.success)&&(this._aborted=!0)},t.prototype.error=function(){var e=this.$to();if(e.self.abstract)return Ve.invalid("Cannot transition to abstract state '"+e.name+"'");var t=e.parameters(),n=this.params(),r=t.filter(function(e){return!e.validates(n[e.id])});if(r.length){var i=r.map(function(e){return"["+e.id+":"+Ue(n[e.id])+"]"}).join(", "),o="The following parameter values are not valid for state '"+e.name+"': "+i;return Ve.invalid(o)}return!1===this.success?this._error:void 0},t.prototype.toString=function(){var e=this.from(),t=this.to(),n=function(e){return null!==e["#"]&&void 0!==e["#"]?e:oe(e,["#"])};return"Transition#"+this.$id+"( '"+(T(e)?e.name:e)+"'"+Ue(n(this._treeChanges.from.map(w("paramValues")).reduce(ne,{})))+" -> "+(this.valid()?"":"(X) ")+"'"+(T(t)?t.name:t)+"'"+Ue(n(this.params()))+" )"},t.diToken=t}();function en(e,t){var n=["",""],r=e.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return r;switch(t.squash){case!1:n=["(",")"+(t.isOptional?"?":"")];break;case!0:r=r.replace(/\/$/,""),n=["(?:/(",")|/)?"];break;default:n=["("+t.squash+"|",")?"]}return r+n[0]+t.type.pattern.source+n[1]}var tn=Xe("/"),nn={state:{params:{}},strict:!0,caseInsensitive:!0},rn=function(){function m(o,a,e,t){var s=this;this._cache={path:[this]},this._children=[],this._params=[],this._segments=[],this._compiled=[],this.config=t=te(t,nn),this.pattern=o;for(var n,r,i,l=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,u=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,c=[],d=0,p=function(e){if(!m.nameValidator.test(e))throw new Error("Invalid parameter name '"+e+"' in pattern '"+o+"'");if(le(s._params,v("id",e)))throw new Error("Duplicate parameter name '"+e+"' in pattern '"+o+"'")},h=function(e,t){var n,r=e[2]||e[3],i=t?e[4]:e[4]||("*"===e[1]?"[\\s\\S]*":null);return{id:r,regexp:i,segment:o.substring(d,e.index),type:i?a.type(i)||(n=i,W(a.type(t?"query":"path"),{pattern:new RegExp(n,s.config.caseInsensitive?"i":void 0)})):null}};(n=l.exec(o))&&!(0<=(r=h(n,!1)).segment.indexOf("?"));)p(r.id),this._params.push(e.fromPath(r.id,r.type,t.state)),this._segments.push(r.segment),c.push([r.segment,De(this._params)]),d=l.lastIndex;var f=(i=o.substring(d)).indexOf("?");if(0<=f){var g=i.substring(f);if(i=i.substring(0,f),0<g.length)for(d=0;n=u.exec(g);)p((r=h(n,!0)).id),this._params.push(e.fromSearch(r.id,r.type,t.state)),d=l.lastIndex}this._segments.push(i),this._compiled=c.map(function(e){return en.apply(null,e)}).concat(en(i))}return m.encodeDashes=function(e){return encodeURIComponent(e).replace(/-/g,function(e){return"%5C%"+e.charCodeAt(0).toString(16).toUpperCase()})},m.pathSegmentsAndParams=function(e){return Se(e._segments,e._params.filter(function(e){return e.location===g.DefType.PATH}).concat(void 0)).reduce(fe,[]).filter(function(e){return""!==e&&k(e)})},m.queryParams=function(e){return e._params.filter(function(e){return e.location===g.DefType.SEARCH})},m.compare=function(e,t){var n=function(e){return e._cache.weights=e._cache.weights||(t=e,t._cache.segments=t._cache.segments||t._cache.path.map(m.pathSegmentsAndParams).reduce(fe,[]).reduce(Je,[]).map(function(e){return O(e)?tn(e):e}).reduce(fe,[])).map(function(e){return"/"===e?1:O(e)?2:e instanceof vt?3:void 0});var t},r=n(e),i=n(t);!function(e,t,n){for(var r=Math.max(e.length,t.length);e.length<r;)e.push(n);for(;t.length<r;)t.push(n)}(r,i,0);var o,a,s=Se(r,i);for(a=0;a<s.length;a++)if(0!==(o=s[a][0]-s[a][1]))return o;return 0},m.prototype.append=function(e){return this._children.push(e),e._cache={path:this._cache.path.concat(e),parent:this,pattern:null},e},m.prototype.isRoot=function(){return this._cache.path[0]===this},m.prototype.toString=function(){return this.pattern},m.prototype.exec=function(e,r,t,n){var i=this;void 0===r&&(r={}),void 0===n&&(n={});var o,a,s,l=(o=this._cache,a="pattern",s=function(){return new RegExp(["^",ye(i._cache.path.map(w("_compiled"))).join(""),!1===i.config.strict?"/?":"","$"].join(""),i.config.caseInsensitive?"i":void 0)},o[a]=o[a]||s()).exec(e);if(!l)return null;var u,c=this.parameters(),d=c.filter(function(e){return!e.isSearch()}),p=c.filter(function(e){return e.isSearch()}),h=this._cache.path.map(function(e){return e._segments.length-1}).reduce(function(e,t){return e+t}),f={};if(h!==l.length-1)throw new Error("Unbalanced capture group in route '"+this.pattern+"'");for(var g=0;g<h;g++){for(var m=d[g],v=l[g+1],y=0;y<m.replace.length;y++)m.replace[y].from===v&&(v=m.replace[y].to);v&&!0===m.array&&(void 0,v=ce(ce((u=function(e){return e.split("").reverse().join("")})(v).split(/-(?!\\)/),u),function(e){return e.replace(/\\-/g,"-")}).reverse()),k(v)&&(v=m.type.decode(v)),f[m.id]=m.value(v)}return p.forEach(function(e){for(var t=r[e.id],n=0;n<e.replace.length;n++)e.replace[n].from===t&&(t=e.replace[n].to);k(t)&&(t=e.type.decode(t)),f[e.id]=e.value(t)}),t&&(f["#"]=t),f},m.prototype.parameters=function(e){return void 0===e&&(e={}),!1===e.inherit?this._params:ye(this._cache.path.map(function(e){return e._params}))},m.prototype.parameter=function(r,e){var i=this;void 0===e&&(e={});var t=this._cache.parent;return function(){for(var e=0,t=i._params;e<t.length;e++){var n=t[e];if(n.id===r)return n}}()||!1!==e.inherit&&t&&t.parameter(r,e)||null},m.prototype.validates=function(r){return r=r||{},this.parameters().filter(function(e){return r.hasOwnProperty(e.id)}).map(function(e){return n=r[(t=e).id],!t||t.validates(n);var t,n}).reduce(pe,!0)},m.prototype.format=function(a){void 0===a&&(a={});var e=this._cache.path,t=e.map(m.pathSegmentsAndParams).reduce(fe,[]).map(function(e){return O(e)?e:r(e)}),n=e.map(m.queryParams).reduce(fe,[]).map(r);if(t.concat(n).filter(function(e){return!1===e.isValid}).length)return null;function r(e){var t=e.value(a[e.id]),n=e.validates(t),r=e.isDefaultValue(t),i=!!r&&e.squash,o=e.type.encode(t);return{param:e,value:t,isValid:n,isDefaultValue:r,squash:i,encoded:o}}var i=t.reduce(function(e,t){if(O(t))return e+t;var n=t.squash,r=t.encoded,i=t.param;return!0===n?e.match(/\/$/)?e.slice(0,-1):e:O(n)?e+n:!1!==n?e:null==r?e:E(r)?e+ce(r,m.encodeDashes).join("-"):i.raw?e+r:e+encodeURIComponent(r)},""),o=n.map(function(e){var t=e.param,n=e.squash,r=e.encoded,i=e.isDefaultValue;if(!(null==r||i&&!1!==n)&&(E(r)||(r=[r]),0!==r.length))return t.raw||(r=ce(r,encodeURIComponent)),r.map(function(e){return t.id+"="+e})}).filter(U).reduce(fe,[]).join("&");return i+(o?"?"+o:"")+(a["#"]?"#"+a["#"]:"")},m.nameValidator=/^\w+([-.]+\w+)*(?:\[\])?$/,m}(),on=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},an=function(){function e(e){this.umf=e}return e.prototype.fromConfig=function(e,t,n){return new vt(e,t,g.DefType.CONFIG,this.umf,n)},e.prototype.fromPath=function(e,t,n){return new vt(e,t,g.DefType.PATH,this.umf,n)},e.prototype.fromSearch=function(e,t,n){return new vt(e,t,g.DefType.SEARCH,this.umf,n)},e}(),sn=function(){function e(){this.paramTypes=new yt,this._isCaseInsensitive=!1,this._isStrictMode=!0,this._defaultSquashPolicy=!1,this.paramFactory=new an(this),N(this,{UrlMatcher:rn,Param:vt})}return e.prototype.caseInsensitive=function(e){return this._isCaseInsensitive=k(e)?e:this._isCaseInsensitive},e.prototype.strictMode=function(e){return this._isStrictMode=k(e)?e:this._isStrictMode},e.prototype.defaultSquashPolicy=function(e){if(k(e)&&!0!==e&&!1!==e&&!O(e))throw new Error("Invalid squash policy: "+e+". Valid policies: false, true, arbitrary-string");return this._defaultSquashPolicy=k(e)?e:this._defaultSquashPolicy},e.prototype.compile=function(e,t){var n=t&&!t.state&&t.params;t=n?on({state:{params:n}},t):t;var r={strict:this._isStrictMode,caseInsensitive:this._isCaseInsensitive};return new rn(e,this.paramTypes,this.paramFactory,N(r,t))},e.prototype.isMatcher=function(n){if(!T(n))return!1;var r=!0;return Y(rn.prototype,function(e,t){D(e)&&(r=r&&k(n[t])&&D(n[t]))}),r},e.prototype.type=function(e,t,n){var r=this.paramTypes.type(e,t,n);return k(t)?this:r},e.prototype.$get=function(){return this.paramTypes.enqueue=!1,this.paramTypes._flushTypeQueue(),this},e.prototype.dispose=function(){this.paramTypes.dispose()},e}(),ln=function(){function e(e){this.router=e}return e.prototype.compile=function(e){return this.router.urlMatcherFactory.compile(e)},e.prototype.create=function(e,t){var n=this,r=Nt.isState,i=m([[O,function(e){return i(n.compile(e))}],[h(rn),function(e){return n.fromUrlMatcher(e,t)}],[r,function(e){return n.fromState(e,n.router)}],[h(RegExp),function(e){return n.fromRegExp(e,t)}],[D,function(e){return new un(e,t)}]]),o=i(e);if(!o)throw new Error("invalid 'what' in when()");return o},e.prototype.fromUrlMatcher=function(n,t){var e=t;O(t)&&(t=this.router.urlMatcherFactory.compile(t)),h(rn)(t)&&(e=function(e){return t.format(e)});var r={urlMatcher:n,matchPriority:function(t){var e=n.parameters().filter(function(e){return e.isOptional});return e.length?e.filter(function(e){return t[e.id]}).length/e.length:1e-6},type:"URLMATCHER"};return N(new un(function(e){var t=n.exec(e.path,e.search,e.hash);return n.validates(t)&&t},e),r)},e.prototype.fromState=function(r,i){var e={state:r,type:"STATE"};return N(this.fromUrlMatcher(r.url,function(e){var t=i.stateService,n=i.globals;t.href(r,e)!==t.href(n.current,n.params)&&t.transitionTo(r,e,{inherit:!0,source:"url"})}),e)},e.prototype.fromRegExp=function(t,e){if(t.global||t.sticky)throw new Error("Rule RegExp must not be global or sticky");var n=O(e)?function(n){return e.replace(/\$(\$|\d{1,2})/,function(e,t){return n["$"===t?0:Number(t)]})}:e,r={regexp:t,type:"REGEXP"};return N(new un(function(e){return t.exec(e.path)},n),r)},e.isUrlRule=function(t){return t&&["type","match","handler"].every(function(e){return k(t[e])})},e}(),un=function(e,t){var n=this;this.match=e,this.type="RAW",this.matchPriority=function(e){return 0-n.$id},this.handler=t||U};var cn;cn=function(e,t){var n,r,i,o,a,s,l,u,c=(n=e,(t.priority||0)-(n.priority||0));return 0!==c?c:(r=t,0!==(c=((i={STATE:4,URLMATCHER:4,REGEXP:3,RAW:2,OTHER:1})[e.type]||0)-(i[r.type]||0))?c:(a=t,0!==(c=(o=e).urlMatcher&&a.urlMatcher?rn.compare(o.urlMatcher,a.urlMatcher):0)?c:(l=t,(u={STATE:!0,URLMATCHER:!0})[(s=e).type]&&u[l.type]?0:(s.$id||0)-(l.$id||0))))};var dn=function(){function t(e){this._sortFn=cn,this._rules=[],this.interceptDeferred=!1,this._id=0,this._sorted=!1,this._router=e,this.urlRuleFactory=new ln(e),B(f(t.prototype),this,f(this))}return t.prototype.dispose=function(){this.listen(!1),this._rules=[],delete this._otherwiseFn},t.prototype.sort=function(e){this._rules=this.stableSort(this._rules,this._sortFn=e||this._sortFn),this._sorted=!0},t.prototype.ensureSorted=function(){this._sorted||this.sort()},t.prototype.stableSort=function(e,r){var t=e.map(function(e,t){return{elem:e,idx:t}});return t.sort(function(e,t){var n=r(e.elem,t.elem);return 0===n?e.idx-t.idx:n}),t.map(function(e){return e.elem})},t.prototype.match=function(e){var t=this;this.ensureSorted(),e=N({path:"",search:{},hash:""},e);var n=this.rules();this._otherwiseFn&&n.push(this._otherwiseFn);for(var r,i,o,a=0;a<n.length&&(!r||0===this._sortFn(n[a],r.rule));a++){var s=(i=n[a],void 0,(o=i.match(e,t._router))&&{match:o,rule:i,weight:i.matchPriority(o)});r=!r||s&&s.weight>r.weight?s:r}return r},t.prototype.sync=function(e){if(!e||!e.defaultPrevented){var t=this._router,n=t.urlService,r=t.stateService,i={path:n.path(),search:n.search(),hash:n.hash()},o=this.match(i);m([[O,function(e){return n.url(e,!0)}],[$t.isDef,function(e){return r.go(e.state,e.params,e.options)}],[h($t),function(e){return r.go(e.state(),e.params(),e.options())}]])(o&&o.rule.handler(o.match,i,t))}},t.prototype.listen=function(e){var t=this;if(!1!==e)return this._stopFn=this._stopFn||this._router.urlService.onChange(function(e){return t.sync(e)});this._stopFn&&this._stopFn(),delete this._stopFn},t.prototype.update=function(e){var t=this._router.locationService;e?this.location=t.url():t.url()!==this.location&&t.url(this.location,!0)},t.prototype.push=function(e,t,n){var r=n&&!!n.replace;this._router.urlService.url(e.format(t||{}),r)},t.prototype.href=function(e,t,n){var r=e.format(t);if(null==r)return null;n=n||{absolute:!1};var i,o,a,s,l=this._router.urlService.config,u=l.html5Mode();if(u||null===r||(r="#"+l.hashPrefix()+r),i=r,o=u,a=n.absolute,r="/"===(s=l.baseHref())?i:o?We(s)+i:a?s.slice(1)+i:i,!n.absolute||!r)return r;var c=!u&&r?"/":"",d=l.port(),p=80===d||443===d?"":":"+d;return[l.protocol(),"://",l.host(),p,c,r].join("")},t.prototype.rule=function(e){var t=this;if(!ln.isUrlRule(e))throw new Error("invalid rule");return e.$id=this._id++,e.priority=e.priority||0,this._rules.push(e),this._sorted=!1,function(){return t.removeRule(e)}},t.prototype.removeRule=function(e){Q(this._rules,e)},t.prototype.rules=function(){return this.ensureSorted(),this._rules.slice()},t.prototype.otherwise=function(e){var t=pn(e);this._otherwiseFn=this.urlRuleFactory.create(f(!0),t),this._sorted=!1},t.prototype.initial=function(e){var t=pn(e);this.rule(this.urlRuleFactory.create(function(e,t){return 0===t.globals.transitionHistory.size()&&!!/^\/?$/.exec(e.path)},t))},t.prototype.when=function(e,t,n){var r=this.urlRuleFactory.create(e,t);return k(n&&n.priority)&&(r.priority=n.priority),this.rule(r),r},t.prototype.deferIntercept=function(e){void 0===e&&(e=!0),this.interceptDeferred=e},t}();function pn(e){if(!(D(e)||O(e)||h($t)(e)||$t.isDef(e)))throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property");return D(e)?e:f(e)}var hn=function(){function l(e){var n=this;this.router=e,this._uiViews=[],this._viewConfigs=[],this._viewConfigFactories={},this._listeners=[],this._pluginapi={_rootViewContext:this._rootViewContext.bind(this),_viewConfigFactory:this._viewConfigFactory.bind(this),_registeredUIView:function(t){return le(n._uiViews,function(e){return n.router.$id+"."+e.id===t})},_registeredUIViews:function(){return n._uiViews},_activeViewConfigs:function(){return n._viewConfigs},_onSync:function(e){return n._listeners.push(e),function(){return Q(n._listeners,e)}}}}return l.normalizeUIViewTarget=function(e,t){void 0===t&&(t="");var n=t.split("@"),r=n[0]||"$default",i=O(n[1])?n[1]:"^",o=/^(\^(?:\.\^)*)\.(.*$)/.exec(r);o&&(i=o[1],r=o[2]),"!"===r.charAt(0)&&(r=r.substr(1),i="");/^(\^(?:\.\^)*)$/.exec(i)?i=i.split(".").reduce(function(e,t){return e.parent},e).name:"."===i&&(i=e.name);return{uiViewName:r,uiViewContextAnchor:i}},l.prototype._rootViewContext=function(e){return this._rootContext=e||this._rootContext},l.prototype._viewConfigFactory=function(e,t){this._viewConfigFactories[e]=t},l.prototype.createViewConfig=function(e,t){var n=this._viewConfigFactories[t.$type];if(!n)throw new Error("ViewService: No view config factory registered for type "+t.$type);var r=n(e,t);return E(r)?r:[r]},l.prototype.deactivateViewConfig=function(e){ut.traceViewServiceEvent("<- Removing",e),Q(this._viewConfigs,e)},l.prototype.activateViewConfig=function(e){ut.traceViewServiceEvent("-> Registering",e),this._viewConfigs.push(e)},l.prototype.sync=function(){var n=this,r=this._uiViews.map(function(e){return[e.fqn,e]}).reduce(ke,{});function i(e){for(var t=e.viewDecl.$context,n=0;++n&&t.parent;)t=t.parent;return n}var o=u(function(e,t,n,r){return t*(e(n)-e(r))}),e=this._uiViews.sort(o(function(e){var t=function(e){return e&&e.parent?t(e.parent)+1:1};return 1e4*e.fqn.split(".").length+t(e.creationContext)},1)).map(function(e){var t=n._viewConfigs.filter(l.matches(r,e));return 1<t.length&&t.sort(o(i,-1)),{uiView:e,viewConfig:t[0]}}),t=e.map(function(e){return e.viewConfig}),a=this._viewConfigs.filter(function(e){return!G(t,e)}).map(function(e){return{uiView:void 0,viewConfig:e}});e.forEach(function(e){-1!==n._uiViews.indexOf(e.uiView)&&e.uiView.configUpdated(e.viewConfig)});var s=e.concat(a);this._listeners.forEach(function(e){return e(s)}),ut.traceViewSync(s)},l.prototype.registerUIView=function(t){ut.traceViewServiceUIViewEvent("-> Registering",t);var e=this._uiViews;return e.filter(function(e){return e.fqn===t.fqn&&e.$type===t.$type}).length&&ut.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){-1!==e.indexOf(t)?(ut.traceViewServiceUIViewEvent("<- Deregistering",t),Q(e)(t)):ut.traceViewServiceUIViewEvent("Tried removing non-registered uiView",t)}},l.prototype.available=function(){return this._uiViews.map(w("fqn"))},l.prototype.active=function(){return this._uiViews.filter(w("$config")).map(w("name"))},l.matches=function(s,l){return function(e){if(l.$type!==e.viewDecl.$type)return!1;var t=e.viewDecl,n=t.$uiViewName.split("."),r=l.fqn.split(".");if(!q(n,r.slice(0-n.length)))return!1;var i=1-n.length||void 0,o=r.slice(0,i).join("."),a=s[o].creationContext;return t.$uiViewContextAnchor===(a&&a.name)}},l}(),fn=function(){function e(){this.params=new wt,this.lastStartedTransitionId=-1,this.transitionHistory=new Re([],1),this.successfulTransitions=new Re([],1)}return e.prototype.dispose=function(){this.transitionHistory.clear(),this.successfulTransitions.clear(),this.transition=null},e}(),gn=function(e){return e.reduce(function(e,t){return e[t]=I(t),e},{dispose:z})},mn=["url","path","search","hash","onChange"],vn=["port","protocol","host","baseHref","html5Mode","hashPrefix"],yn=["type","caseInsensitive","strictMode","defaultSquashPolicy"],wn=["sort","when","initial","otherwise","rules","rule","removeRule"],bn=["deferIntercept","listen","sync","match"],$n=function(){function e(e,t){void 0===t&&(t=!0),this.router=e,this.rules={},this.config={};var n=function(){return e.locationService};B(n,this,n,mn,t);var r=function(){return e.locationConfig};B(r,this.config,r,vn,t);var i=function(){return e.urlMatcherFactory};B(i,this.config,i,yn);var o=function(){return e.urlRouter};B(o,this.rules,o,wn),B(o,this,o,bn)}return e.prototype.url=function(e,t,n){},e.prototype.path=function(){},e.prototype.search=function(){},e.prototype.hash=function(){},e.prototype.onChange=function(e){},e.prototype.parts=function(){return{path:this.path(),search:this.search(),hash:this.hash()}},e.prototype.dispose=function(){},e.prototype.sync=function(e){},e.prototype.listen=function(e){},e.prototype.deferIntercept=function(e){},e.prototype.match=function(e){},e.locationServiceStub=gn(mn),e.locationConfigStub=gn(vn),e}(),_n=0,Cn=function(){function e(e,t){void 0===e&&(e=$n.locationServiceStub),void 0===t&&(t=$n.locationConfigStub),this.locationService=e,this.locationConfig=t,this.$id=_n++,this._disposed=!1,this._disposables=[],this.trace=ut,this.viewService=new hn(this),this.globals=new fn,this.transitionService=new zn(this),this.urlMatcherFactory=new sn,this.urlRouter=new dn(this),this.stateRegistry=new zt(this),this.stateService=new Bn(this),this.urlService=new $n(this),this._plugins={},this.viewService._pluginapi._rootViewContext(this.stateRegistry.root()),this.globals.$current=this.stateRegistry.root(),this.globals.current=this.globals.$current.self,this.disposable(this.globals),this.disposable(this.stateService),this.disposable(this.stateRegistry),this.disposable(this.transitionService),this.disposable(this.urlRouter),this.disposable(e),this.disposable(t)}return e.prototype.disposable=function(e){this._disposables.push(e)},e.prototype.dispose=function(e){var t=this;e&&D(e.dispose)?e.dispose(this):(this._disposed=!0,this._disposables.slice().forEach(function(e){try{"function"==typeof e.dispose&&e.dispose(t),Q(t._disposables,e)}catch(e){}}))},e.prototype.plugin=function(e,t){void 0===t&&(t={});var n=new e(this,t);if(!n.name)throw new Error("Required property `name` missing on plugin: "+n);return this._disposables.push(n),this._plugins[n.name]=n},e.prototype.getPlugin=function(e){return e?this._plugins[e]:de(this._plugins)},e}();function Sn(t){t.addResolvable(kt.fromData(Cn,t.router),""),t.addResolvable(kt.fromData(Jt,t),""),t.addResolvable(kt.fromData("$transition$",t),""),t.addResolvable(kt.fromData("$stateParams",t.params()),""),t.entering().forEach(function(e){t.addResolvable(kt.fromData("$state$",e),e)})}var kn=G(["$transition$",Jt]),Dn=function(e){var t=de(e.treeChanges()).reduce(fe,[]).reduce(ve,[]),n=function(e){return kn(e.token)?kt.fromData(e.token,null):e};t.forEach(function(e){e.resolvables=e.resolvables.map(n)})},xn=function(t){var e=t.to().redirectTo;if(e){var n=t.router.stateService;return D(e)?V.$q.when(e(t)).then(r):r(e)}function r(e){if(e)return e instanceof $t?e:O(e)?n.target(e,t.params(),t.options()):e.state||e.params?n.target(e.state||t.to(),e.params||t.params(),t.options()):void 0}};function On(n){return function(e,t){return(0,t.$$state()[n])(e,t)}}var Tn=On("onExit"),En=On("onRetain"),An=On("onEnter"),Pn=function(e){return new Et(e.treeChanges().to).resolvePath("EAGER",e).then(z)},Mn=function(e,t){return new Et(e.treeChanges().to).subContext(t.$$state()).resolvePath("LAZY",e).then(z)},Rn=function(e){return new Et(e.treeChanges().to).resolvePath("LAZY",e).then(z)},In=function(e){var t=V.$q,n=e.views("entering");if(n.length)return t.all(n.map(function(e){return t.when(e.load())})).then(z)},Vn=function(e){var t=e.views("entering"),n=e.views("exiting");if(t.length||n.length){var r=e.router.viewService;n.forEach(function(e){return r.deactivateViewConfig(e)}),t.forEach(function(e){return r.activateViewConfig(e)}),r.sync()}},Fn=function(e){var t=e.router.globals,n=function(){t.transition===e&&(t.transition=null)};e.onSuccess({},function(){t.successfulTransitions.enqueue(e),t.$current=e.$to(),t.current=t.$current.self,xe(e.params(),t.params)},{priority:1e4}),e.promise.then(n,n)},Ln=function(e){var t=e.options(),n=e.router.stateService,r=e.router.urlRouter;if("url"!==t.source&&t.location&&n.$current.navigable){var i={replace:"replace"===t.location};r.push(n.$current.navigable.url,n.params,i)}r.update(!0)},jn=function(a){var s=a.router;var e=a.entering().filter(function(e){return!!e.$$state().lazyLoad}).map(function(e){return Hn(a,e)});return V.$q.all(e).then(function(){if("url"!==a.originalTransition().options().source){var e=a.targetState();return s.stateService.target(e.identifier(),e.params(),e.options())}var t=s.urlService,n=t.match(t.parts()),r=n&&n.rule;if(r&&"STATE"===r.type){var i=r.state,o=n.match;return s.stateService.target(i,o,a.options())}s.urlService.sync()})};function Hn(t,n){var r=n.$$state().lazyLoad,e=r._promise;if(!e){e=r._promise=V.$q.when(r(t,n)).then(function(e){e&&Array.isArray(e.states)&&e.states.forEach(function(e){return t.router.stateRegistry.register(e)});return e}).then(function(e){return delete n.lazyLoad,delete n.$$state().lazyLoad,delete r._promise,e},function(e){return delete r._promise,V.$q.reject(e)})}return e}var Yn=function(e,t,n,r,i,o,a,s){void 0===i&&(i=!1),void 0===o&&(o=Wt.HANDLE_RESULT),void 0===a&&(a=Wt.REJECT_ERROR),void 0===s&&(s=!1),this.name=e,this.hookPhase=t,this.hookOrder=n,this.criteriaMatchPath=r,this.reverseSort=i,this.getResultHandler=o,this.getErrorHandler=a,this.synchronous=s};function Nn(e){var t=e._ignoredReason();if(t){ut.traceTransitionIgnored(e);var n=e.router.globals.transition;return"SameAsCurrent"===t&&n&&n.abort(),Ve.ignored().toPromise()}}function qn(e){if(!e.valid())throw new Error(e.error().toString())}var Un={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,custom:{},current:function(){return null},source:"unknown"},zn=function(){function e(e){this._transitionCount=0,this._eventTypes=[],this._registeredHooks={},this._criteriaPaths={},this._router=e,this.$view=e.viewService,this._deregisterHookFns={},this._pluginapi=B(f(this),{},f(this),["_definePathType","_defineEvent","_getPathTypes","_getEvents","getHooks"]),this._defineCorePaths(),this._defineCoreEvents(),this._registerCoreTransitionHooks(),e.globals.successfulTransitions.onEvict(Dn)}return e.prototype.onCreate=function(e,t,n){},e.prototype.onBefore=function(e,t,n){},e.prototype.onStart=function(e,t,n){},e.prototype.onExit=function(e,t,n){},e.prototype.onRetain=function(e,t,n){},e.prototype.onEnter=function(e,t,n){},e.prototype.onFinish=function(e,t,n){},e.prototype.onSuccess=function(e,t,n){},e.prototype.onError=function(e,t,n){},e.prototype.dispose=function(e){de(this._registeredHooks).forEach(function(t){return t.forEach(function(e){e._deregistered=!0,Q(t,e)})})},e.prototype.create=function(e,t){return new Jt(e,t,this._router)},e.prototype._defineCoreEvents=function(){var e=g.TransitionHookPhase,t=Wt,n=this._criteriaPaths;this._defineEvent("onCreate",e.CREATE,0,n.to,!1,t.LOG_REJECTED_RESULT,t.THROW_ERROR,!0),this._defineEvent("onBefore",e.BEFORE,0,n.to),this._defineEvent("onStart",e.RUN,0,n.to),this._defineEvent("onExit",e.RUN,100,n.exiting,!0),this._defineEvent("onRetain",e.RUN,200,n.retained),this._defineEvent("onEnter",e.RUN,300,n.entering),this._defineEvent("onFinish",e.RUN,400,n.to),this._defineEvent("onSuccess",e.SUCCESS,0,n.to,!1,t.LOG_REJECTED_RESULT,t.LOG_ERROR,!0),this._defineEvent("onError",e.ERROR,0,n.to,!1,t.LOG_REJECTED_RESULT,t.LOG_ERROR,!0)},e.prototype._defineCorePaths=function(){var e=g.TransitionHookScope.STATE,t=g.TransitionHookScope.TRANSITION;this._definePathType("to",t),this._definePathType("from",t),this._definePathType("exiting",e),this._definePathType("retained",e),this._definePathType("entering",e)},e.prototype._defineEvent=function(e,t,n,r,i,o,a,s){void 0===i&&(i=!1),void 0===o&&(o=Wt.HANDLE_RESULT),void 0===a&&(a=Wt.REJECT_ERROR),void 0===s&&(s=!1);var l=new Yn(e,t,n,r,i,o,a,s);this._eventTypes.push(l),Qt(this,this,l)},e.prototype._getEvents=function(t){return(k(t)?this._eventTypes.filter(function(e){return e.hookPhase===t}):this._eventTypes.slice()).sort(function(e,t){var n=e.hookPhase-t.hookPhase;return 0===n?e.hookOrder-t.hookOrder:n})},e.prototype._definePathType=function(e,t){this._criteriaPaths[e]={name:e,scope:t}},e.prototype._getPathTypes=function(){return this._criteriaPaths},e.prototype.getHooks=function(e){return this._registeredHooks[e]},e.prototype._registerCoreTransitionHooks=function(){var e=this._deregisterHookFns;e.addCoreResolves=this.onCreate({},Sn),e.ignored=this.onBefore({},Nn,{priority:-9999}),e.invalid=this.onBefore({},qn,{priority:-1e4}),e.redirectTo=this.onStart({to:function(e){return!!e.redirectTo}},xn),e.onExit=this.onExit({exiting:function(e){return!!e.onExit}},Tn),e.onRetain=this.onRetain({retained:function(e){return!!e.onRetain}},En),e.onEnter=this.onEnter({entering:function(e){return!!e.onEnter}},An),e.eagerResolve=this.onStart({},Pn,{priority:1e3}),e.lazyResolve=this.onEnter({entering:f(!0)},Mn,{priority:1e3}),e.resolveAll=this.onFinish({},Rn,{priority:1e3}),e.loadViews=this.onFinish({},In),e.activateViews=this.onSuccess({},Vn),e.updateGlobals=this.onCreate({},Fn),e.updateUrl=this.onSuccess({},Ln,{priority:9999}),e.lazyLoad=this.onBefore({entering:function(e){return!!e.lazyLoad}},jn)},e}(),Bn=function(){function n(e){this.router=e,this.invalidCallbacks=[],this._defaultErrorHandler=function(e){e instanceof Error&&e.stack?(console.error(e),console.error(e.stack)):e instanceof Ve?(console.error(e.toString()),e.detail&&e.detail.stack&&console.error(e.detail.stack)):console.error(e)};var t=Object.keys(n.prototype).filter(d(G(["current","$current","params","transition"])));B(f(n.prototype),this,f(this),t)}return Object.defineProperty(n.prototype,"transition",{get:function(){return this.router.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"params",{get:function(){return this.router.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"current",{get:function(){return this.router.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"$current",{get:function(){return this.router.globals.$current},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){this.defaultErrorHandler(z),this.invalidCallbacks=[]},n.prototype._handleInvalidTargetState=function(e,n){var r=this,i=_t.makeTargetState(this.router.stateRegistry,e),t=this.router.globals,o=function(){return t.transitionHistory.peekTail()},a=o(),s=new Re(this.invalidCallbacks.slice()),l=new Et(e).injector(),u=function(e){if(e instanceof $t){var t=e;return(t=r.target(t.identifier(),t.params(),t.options())).valid()?o()!==a?Ve.superseded().toPromise():r.transitionTo(t.identifier(),t.params(),t.options()):Ve.invalid(t.error()).toPromise()}};return function t(){var e=s.dequeue();return void 0===e?Ve.invalid(n.error()).toPromise():V.$q.when(e(n,i,l)).then(u).then(function(e){return e||t()})}()},n.prototype.onInvalid=function(e){return this.invalidCallbacks.push(e),function(){Q(this.invalidCallbacks)(e)}.bind(this)},n.prototype.reload=function(e){return this.transitionTo(this.current,this.params,{reload:!k(e)||e,inherit:!1,notify:!1})},n.prototype.go=function(e,t,n){var r=te(n,{relative:this.$current,inherit:!0},Un);return this.transitionTo(e,t,r)},n.prototype.target=function(e,t,n){if(void 0===n&&(n={}),T(n.reload)&&!n.reload.name)throw new Error("Invalid reload state object");var r=this.router.stateRegistry;if(n.reloadState=!0===n.reload?r.root():r.matcher.find(n.reload,n.relative),n.reload&&!n.reloadState)throw new Error("No such reload state '"+(O(n.reload)?n.reload:n.reload.name)+"'");return new $t(this.router.stateRegistry,e,t,n)},n.prototype.getCurrentPath=function(){var e=this,t=this.router.globals.successfulTransitions.peekTail();return t?t.treeChanges().to:[new bt(e.router.stateRegistry.root())]},n.prototype.transitionTo=function(e,t,n){var o=this;void 0===t&&(t={}),void 0===n&&(n={});var a=this.router,s=a.globals;n=te(n,Un);n=N(n,{current:function(){return s.transition}});var r=this.target(e,t,n),i=this.getCurrentPath();if(!r.exists())return this._handleInvalidTargetState(i,r);if(!r.valid())return Pe(r.error());var l=function(i){return function(e){if(e instanceof Ve){var t=a.globals.lastStartedTransitionId===i.$id;if(e.type===g.RejectType.IGNORED)return t&&a.urlRouter.update(),V.$q.when(s.current);var n=e.detail;if(e.type===g.RejectType.SUPERSEDED&&e.redirected&&n instanceof $t){var r=i.redirect(n);return r.run().catch(l(r))}if(e.type===g.RejectType.ABORTED)return t&&a.urlRouter.update(),V.$q.reject(e)}return o.defaultErrorHandler()(e),V.$q.reject(e)}},u=this.router.transitionService.create(i,r),c=u.run().catch(l(u));return Ae(c),N(c,{transition:u})},n.prototype.is=function(e,t,n){n=te(n,{relative:this.$current});var r=this.router.stateRegistry.matcher.find(e,n.relative);if(k(r)){if(this.$current!==r)return!1;if(!t)return!0;var i=r.parameters({inherit:!0,matchingKeys:t});return vt.equals(i,vt.values(i,t),this.params)}},n.prototype.includes=function(e,t,n){n=te(n,{relative:this.$current});var r=O(e)&&Me.fromString(e);if(r){if(!r.matches(this.$current.name))return!1;e=this.$current.name}var i=this.router.stateRegistry.matcher.find(e,n.relative),o=this.$current.includes;if(k(i)){if(!k(o[i.name]))return!1;if(!t)return!0;var a=i.parameters({inherit:!0,matchingKeys:t});return vt.equals(a,vt.values(a,t),this.params)}},n.prototype.href=function(e,t,n){n=te(n,{lossy:!0,inherit:!0,absolute:!1,relative:this.$current}),t=t||{};var r=this.router.stateRegistry.matcher.find(e,n.relative);if(!k(r))return null;n.inherit&&(t=this.params.$inherit(t,this.$current,r));var i=r&&n.lossy?r.navigable:r;return i&&void 0!==i.url&&null!==i.url?this.router.urlRouter.href(i.url,t,{absolute:n.absolute}):null},n.prototype.defaultErrorHandler=function(e){return this._defaultErrorHandler=e||this._defaultErrorHandler},n.prototype.get=function(e,t){var n=this.router.stateRegistry;return 0===arguments.length?n.get():n.get(e,t||this.$current)},n.prototype.lazyLoad=function(e,t){var n=this.get(e);if(!n||!n.lazyLoad)throw new Error("Can not lazy load "+e);var r=this.getCurrentPath(),i=_t.makeTargetState(this.router.stateRegistry,r);return Hn(t=t||this.router.transitionService.create(r,i),n)},n}(),Wn={when:function(n){return new Promise(function(e,t){return e(n)})},reject:function(n){return new Promise(function(e,t){t(n)})},defer:function(){var n={};return n.promise=new Promise(function(e,t){n.resolve=e,n.reject=t}),n},all:function(e){if(E(e))return Promise.all(e);if(T(e)){var t=Object.keys(e).map(function(t){return e[t].then(function(e){return{key:t,val:e}})});return Wn.all(t).then(function(e){return e.reduce(function(e,t){return e[t.key]=t.val,e},{})})}}},Gn={},Kn=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Qn=/([^\s,]+)/g,Zn={get:function(e){return Gn[e]},has:function(e){return null!=Zn.get(e)},invoke:function(e,t,n){var r=N({},Gn,n||{}),i=Zn.annotate(e),o=be(function(e){return r.hasOwnProperty(e)},function(e){return"DI can't find injectable: '"+e+"'"}),a=i.filter(o).map(function(e){return r[e]});return D(e)?e.apply(t,a):e.slice(-1)[0].apply(t,a)},annotate:function(e){if(!M(e))throw new Error("Not an injectable function: "+e);if(e&&e.$inject)return e.$inject;if(E(e))return e.slice(0,-1);var t=e.toString().replace(Kn,"");return t.slice(t.indexOf("(")+1,t.indexOf(")")).match(Qn)||[]}},Xn=function(e,t){var n=t[0],r=t[1];return e.hasOwnProperty(n)?E(e[n])?e[n].push(r):e[n]=[e[n],r]:e[n]=r,e},Jn=function(e){return e.split("&").filter(U).map(Qe).reduce(Xn,{})};function er(e){var t=function(e){return e||""},n=Ge(e).map(t),r=n[0],i=n[1],o=Ke(r).map(t);return{path:o[0],search:o[1],hash:i,url:e}}var tr=function(e){var t=e.path(),n=e.search(),r=e.hash(),i=Object.keys(n).map(function(t){var e=n[t];return(E(e)?e:[e]).map(function(e){return t+"="+e})}).reduce(fe,[]).join("&");return t+(i?"?"+i:"")+(r?"#"+r:"")};function nr(r,i,o,a){return function(e){var t=e.locationService=new o(e),n=e.locationConfig=new a(e,i);return{name:r,service:t,configuration:n,dispose:function(e){e.dispose(t),e.dispose(n)}}}}var rr,ir,or,ar=function(){function e(e,t){var n=this;this.fireAfterUpdate=t,this._listeners=[],this._listener=function(t){return n._listeners.forEach(function(e){return e(t)})},this.hash=function(){return er(n._get()).hash},this.path=function(){return er(n._get()).path},this.search=function(){return Jn(er(n._get()).search)},this._location=F.location,this._history=F.history}return e.prototype.url=function(t,e){return void 0===e&&(e=!0),k(t)&&t!==this._get()&&(this._set(null,null,t,e),this.fireAfterUpdate&&this._listeners.forEach(function(e){return e({url:t})})),tr(this)},e.prototype.onChange=function(e){var t=this;return this._listeners.push(e),function(){return Q(t._listeners,e)}},e.prototype.dispose=function(e){ee(this._listeners)},e}(),sr=(rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}rr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),lr=function(n){function e(e){var t=n.call(this,e,!1)||this;return F.addEventListener("hashchange",t._listener,!1),t}return sr(e,n),e.prototype._get=function(){return Ze(this._location.hash)},e.prototype._set=function(e,t,n,r){this._location.hash=n},e.prototype.dispose=function(e){n.prototype.dispose.call(this,e),F.removeEventListener("hashchange",this._listener)},e}(ar),ur=(ir=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}ir(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),cr=function(t){function e(e){return t.call(this,e,!0)||this}return ur(e,t),e.prototype._get=function(){return this._url},e.prototype._set=function(e,t,n,r){this._url=n},e}(ar),dr=(or=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}or(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),pr=function(n){function e(e){var t=n.call(this,e,!0)||this;return t._config=e.urlService.config,F.addEventListener("popstate",t._listener,!1),t}return dr(e,n),e.prototype._getBasePrefix=function(){return We(this._config.baseHref())},e.prototype._get=function(){var e=this._location,t=e.pathname,n=e.hash,r=e.search;r=Ke(r)[1],n=Ge(n)[1];var i=this._getBasePrefix(),o=t===this._config.baseHref(),a=t.substr(0,i.length)===i;return(t=o?"/":a?t.substring(i.length):t)+(r?"?"+r:"")+(n?"#"+n:"")},e.prototype._set=function(e,t,n,r){var i=this._getBasePrefix(),o=n&&"/"!==n[0]?"/":"",a=""===n||"/"===n?this._config.baseHref():i+o+n;r?this._history.replaceState(e,t,a):this._history.pushState(e,t,a)},e.prototype.dispose=function(e){n.prototype.dispose.call(this,e),F.removeEventListener("popstate",this._listener)},e}(ar),hr=function(){var t=this;this.dispose=z,this._baseHref="",this._port=80,this._protocol="http",this._host="localhost",this._hashPrefix="",this.port=function(){return t._port},this.protocol=function(){return t._protocol},this.host=function(){return t._host},this.baseHref=function(){return t._baseHref},this.html5Mode=function(){return!1},this.hashPrefix=function(e){return k(e)?t._hashPrefix=e:t._hashPrefix}},fr=function(){function e(e,t){void 0===t&&(t=!1),this._isHtml5=t,this._baseHref=void 0,this._hashPrefix=""}return e.prototype.port=function(){return location.port?Number(location.port):"https"===this.protocol()?443:80},e.prototype.protocol=function(){return location.protocol.replace(/:/g,"")},e.prototype.host=function(){return location.hostname},e.prototype.html5Mode=function(){return this._isHtml5},e.prototype.hashPrefix=function(e){return k(e)?this._hashPrefix=e:this._hashPrefix},e.prototype.baseHref=function(e){return k(e)&&(this._baseHref=e),b(this._baseHref)&&(this._baseHref=this.getBaseHref()),this._baseHref},e.prototype.getBaseHref=function(){var e=document.getElementsByTagName("base")[0];return e&&e.href?e.href.replace(/^(https?:)?\/\/[^/]*/,""):location.pathname||"/"},e.prototype.dispose=function(){},e}();function gr(e){return V.$injector=Zn,{name:"vanilla.services",$q:V.$q=Wn,$injector:Zn,dispose:function(){return null}}}var mr=nr("vanilla.hashBangLocation",!1,lr,fr),vr=nr("vanilla.pushStateLocation",!0,pr,fr),yr=nr("vanilla.memoryLocation",!1,cr,hr),wr=function(){function e(){}return e.prototype.dispose=function(e){},e}(),br=Object.freeze({root:F,fromJson:j,toJson:H,forEach:Y,extend:N,equals:q,identity:U,noop:z,createProxyFunctions:B,inherit:W,inArray:G,_inArray:K,removeFrom:Q,_removeFrom:Z,pushTo:X,_pushTo:J,deregAll:ee,defaults:te,mergeR:ne,ancestors:re,pick:ie,omit:oe,pluck:ae,filter:se,find:le,mapObj:ue,map:ce,values:de,allTrueR:pe,anyTrueR:he,unnestR:fe,flattenR:ge,pushR:me,uniqR:ve,unnest:ye,flatten:we,assertPredicate:be,assertMap:$e,assertFn:_e,pairs:Ce,arrayTuples:Se,applyPairs:ke,tail:De,copy:xe,_extend:Oe,silenceUncaughtInPromise:Ae,silentRejection:Pe,notImplemented:I,services:V,Glob:Me,curry:u,compose:n,pipe:l,prop:w,propEq:v,parse:S,not:d,and:r,or:i,all:c,any:p,is:h,eq:o,val:f,invoke:a,pattern:m,isUndefined:b,isDefined:k,isNull:$,isNullOrUndefined:_,isFunction:D,isNumber:x,isString:O,isObject:T,isArray:E,isDate:A,isRegExp:P,isInjectable:M,isPromise:R,Queue:Re,maxLength:Fe,padString:Le,kebobString:je,functionToString:He,fnToString:Ye,stringify:Ue,beforeAfterSubstr:ze,hostRegex:Be,stripLastPathElement:We,splitHash:Ge,splitQuery:Ke,splitEqual:Qe,trimHashVal:Ze,splitOnDelim:Xe,joinNeighborsR:Je,get Category(){return g.Category},Trace:lt,trace:ut,get DefType(){return g.DefType},Param:vt,ParamTypes:yt,StateParams:wt,ParamType:ct,PathNode:bt,PathUtils:_t,resolvePolicies:Ct,defaultResolvePolicy:St,Resolvable:kt,NATIVE_INJECTOR_TOKEN:Tt,ResolveContext:Et,resolvablesBuilder:Lt,StateBuilder:Yt,StateObject:Nt,StateMatcher:qt,StateQueueManager:Ut,StateRegistry:zt,StateService:Bn,TargetState:$t,get TransitionHookPhase(){return g.TransitionHookPhase},get TransitionHookScope(){return g.TransitionHookScope},HookBuilder:Zt,matchState:Gt,RegisteredHook:Kt,makeEvent:Qt,get RejectType(){return g.RejectType},Rejection:Ve,Transition:Jt,TransitionHook:Wt,TransitionEventType:Yn,defaultTransOpts:Un,TransitionService:zn,UrlMatcher:rn,ParamFactory:an,UrlMatcherFactory:sn,UrlRouter:dn,UrlRuleFactory:ln,BaseUrlRule:un,UrlService:$n,ViewService:hn,UIRouterGlobals:fn,UIRouter:Cn,$q:Wn,$injector:Zn,BaseLocationServices:ar,HashLocationService:lr,MemoryLocationService:cr,PushStateLocationService:pr,MemoryLocationConfig:hr,BrowserLocationConfig:fr,keyValsToObjectR:Xn,getParams:Jn,parseUrl:er,buildUrl:tr,locationPluginFactory:nr,servicesPlugin:gr,hashLocationPlugin:mr,pushStateLocationPlugin:vr,memoryLocationPlugin:yr,UIRouterPluginBase:wr});function $r(){var n=null;return function(e,t){return n=n||V.$injector.get("$templateFactory"),[new kr(e,t,n)]}}var _r=function(e,n){return e.reduce(function(e,t){return e||k(n[t])},!1)};function Cr(r){if(!r.parent)return{};var i=["component","bindings","componentProvider"],o=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),e=i.concat(o);if(k(r.views)&&_r(e,r))throw new Error("State '"+r.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level. Move the following properties into a view (in the 'views' object): "+e.filter(function(e){return k(r[e])}).join(", "));var a={},t=r.views||{$default:ie(r,e)};return Y(t,function(e,t){if(t=t||"$default",O(e)&&(e={component:e}),e=N({},e),_r(i,e)&&_r(o,e))throw new Error("Cannot combine: "+i.join("|")+" with: "+o.join("|")+" in stateview: '"+t+"@"+r.name+"'");e.resolveAs=e.resolveAs||"$resolve",e.$type="ng1",e.$context=r,e.$name=t;var n=hn.normalizeUIViewTarget(e.$context,e.$name);e.$uiViewName=n.uiViewName,e.$uiViewContextAnchor=n.uiViewContextAnchor,a[t]=e}),a}var Sr=0,kr=function(){function e(e,t,n){var r=this;this.path=e,this.viewDecl=t,this.factory=n,this.$id=Sr++,this.loaded=!1,this.getTemplate=function(e,t){return r.component?r.factory.makeComponentTemplate(e,t,r.component,r.viewDecl.bindings):r.template}}return e.prototype.load=function(){var t=this,e=V.$q,n=new Et(this.path),r=this.path.reduce(function(e,t){return N(e,t.paramValues)},{}),i={template:e.when(this.factory.fromConfig(this.viewDecl,r,n)),controller:e.when(this.getController(n))};return e.all(i).then(function(e){return ut.traceViewServiceEvent("Loaded",t),t.controller=e.controller,N(t,e.template),t})},e.prototype.getController=function(e){var t=this.viewDecl.controllerProvider;if(!M(t))return this.viewDecl.controller;var n=V.$injector.annotate(t),r=E(t)?De(t):t;return new kt("",r,n).get(e)},e}(),Dr=function(){function e(){var r=this;this._useHttp=C.version.minor<3,this.$get=["$http","$templateCache","$injector",function(e,t,n){return r.$templateRequest=n.has&&n.has("$templateRequest")&&n.get("$templateRequest"),r.$http=e,r.$templateCache=t,r}]}return e.prototype.useHttpService=function(e){this._useHttp=e},e.prototype.fromConfig=function(e,t,n){var r=function(e){return V.$q.when(e).then(function(e){return{template:e}})},i=function(e){return V.$q.when(e).then(function(e){return{component:e}})};return k(e.template)?r(this.fromString(e.template,t)):k(e.templateUrl)?r(this.fromUrl(e.templateUrl,t)):k(e.templateProvider)?r(this.fromProvider(e.templateProvider,t,n)):k(e.component)?i(e.component):k(e.componentProvider)?i(this.fromComponentProvider(e.componentProvider,t,n)):r("<ui-view></ui-view>")},e.prototype.fromString=function(e,t){return D(e)?e(t):e},e.prototype.fromUrl=function(e,t){return D(e)&&(e=e(t)),null==e?null:this._useHttp?this.$http.get(e,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(e){return e.data}):this.$templateRequest(e)},e.prototype.fromProvider=function(e,t,n){var r=V.$injector.annotate(e),i=E(e)?De(e):e;return new kt("",i,r).get(n)},e.prototype.fromComponentProvider=function(e,t,n){var r=V.$injector.annotate(e),i=E(e)?De(e):e;return new kt("",i,r).get(n)},e.prototype.makeComponentTemplate=function(l,u,e,c){c=c||{};var d=3<=C.version.minor?"::":"",p=function(e){var t=je(e);return/^(x|data)-/.exec(t)?"x-"+t:t},t=function(e){var t=V.$injector.get(e+"Directive");if(!t||!t.length)throw new Error("Unable to find component named '"+e+"'");return t.map(xr).reduce(fe,[])}(e).map(function(e){var t=e.name,n=e.type,r=p(t);if(l.attr(r)&&!c[t])return r+"='"+l.attr(r)+"'";var i=c[t]||t;if("@"===n)return r+"='{{"+d+"$resolve."+i+"}}'";if("&"!==n)return r+"='"+d+"$resolve."+i+"'";var o=u.getResolvable(i),a=o&&o.data,s=a&&V.$injector.annotate(a)||[];return r+"='$resolve."+i+(E(a)?"["+(a.length-1)+"]":"")+"("+s.join(",")+")'"}).join(" "),n=p(e);return"<"+n+" "+t+"></"+n+">"},e}();var xr=function(e){return T(e.bindToController)?Or(e.bindToController):Or(e.scope)},Or=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@&])[?]?(.*)/.exec(t[e])]}).filter(function(e){return k(e)&&E(e[1])}).map(function(e){return{name:e[1][2]||e[0],type:e[1][1]}})},Tr=function(){function n(e,t){this.stateRegistry=e,this.stateService=t,B(f(n.prototype),this,f(this))}return n.prototype.decorator=function(e,t){return this.stateRegistry.decorator(e,t)||this},n.prototype.state=function(e,t){return T(e)?t=e:t.name=e,this.stateRegistry.register(t),this},n.prototype.onInvalid=function(e){return this.stateService.onInvalid(e)},n}(),Er=function(n){return function(e,t){var i=e[n],o="onExit"===n?"from":"to";return i?function(e,t){var n=new Et(e.treeChanges(o)).subContext(t.$$state()),r=N(Wr(n),{$state$:t,$transition$:e});return V.$injector.invoke(i,this,r)}:void 0}},Ar=function(){function e(e){this._urlListeners=[],this.$locationProvider=e;var t=f(e);B(t,this,t,["hashPrefix"])}return e.monkeyPatchPathParameterType=function(e){var t=e.urlMatcherFactory.type("path");t.encode=function(e){return null!=e?e.toString().replace(/(~|\/)/g,function(e){return{"~":"~~","/":"~2F"}[e]}):e},t.decode=function(e){return null!=e?e.toString().replace(/(~~|~2F)/g,function(e){return{"~~":"~","~2F":"/"}[e]}):e}},e.prototype.dispose=function(){},e.prototype.onChange=function(e){var t=this;return this._urlListeners.push(e),function(){return Q(t._urlListeners)(e)}},e.prototype.html5Mode=function(){var e=this.$locationProvider.html5Mode();return(e=T(e)?e.enabled:e)&&this.$sniffer.history},e.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},e.prototype.url=function(e,t,n){return void 0===t&&(t=!1),k(e)&&this.$location.url(e),t&&this.$location.replace(),n&&this.$location.state(n),this.$location.url()},e.prototype._runtimeServices=function(e,t,n,r,i){var o=this;this.$location=t,this.$sniffer=n,this.$browser=r,this.$window=i,e.$on("$locationChangeSuccess",function(t){return o._urlListeners.forEach(function(e){return e(t)})});var a=f(t);B(a,this,a,["replace","path","search","hash"]),B(a,this,a,["port","protocol","host"])},e}(),Pr=function(){function n(e){this._router=e,this._urlRouter=e.urlRouter}return n.injectableHandler=function(t,n){return function(e){return V.$injector.invoke(n,null,{$match:e,$stateParams:t.globals.params})}},n.prototype.$get=function(){var e=this._urlRouter;return e.update(!0),e.interceptDeferred||e.listen(),e},n.prototype.rule=function(e){var t=this;if(!D(e))throw new Error("'rule' must be a function");var n=new un(function(){return e(V.$injector,t._router.locationService)},U);return this._urlRouter.rule(n),this},n.prototype.otherwise=function(e){var t=this,n=this._urlRouter;if(O(e))n.otherwise(e);else{if(!D(e))throw new Error("'rule' must be a string or function");n.otherwise(function(){return e(V.$injector,t._router.locationService)})}return this},n.prototype.when=function(e,t){return(E(t)||D(t))&&(t=n.injectableHandler(this._router,t)),this._urlRouter.when(e,t),this},n.prototype.deferIntercept=function(e){this._urlRouter.deferIntercept(e)},n}();C.module("ui.router.angular1",[]);var Mr=C.module("ui.router.init",["ng"]),Rr=C.module("ui.router.util",["ui.router.init"]),Ir=C.module("ui.router.router",["ui.router.util"]),Vr=C.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),Fr=C.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),Lr=(C.module("ui.router.compat",["ui.router"]),null);function jr(e){(Lr=this.router=new Cn).stateProvider=new Tr(Lr.stateRegistry,Lr.stateService),Lr.stateRegistry.decorator("views",Cr),Lr.stateRegistry.decorator("onExit",Er("onExit")),Lr.stateRegistry.decorator("onRetain",Er("onRetain")),Lr.stateRegistry.decorator("onEnter",Er("onEnter")),Lr.viewService._pluginapi._viewConfigFactory("ng1",$r());var s=Lr.locationService=Lr.locationConfig=new Ar(e);function t(e,t,n,r,i,o,a){return s._runtimeServices(i,e,r,t,n),delete Lr.router,delete Lr.$get,Lr}return Ar.monkeyPatchPathParameterType(Lr),((Lr.router=Lr).$get=t).$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],Lr}jr.$inject=["$locationProvider"];var Hr=function(n){return["$uiRouterProvider",function(e){var t=e.router[n];return t.$get=function(){return t},t}]};function Yr(t,e,n){if(V.$injector=t,V.$q=e,!t.hasOwnProperty("strictDi"))try{t.invoke(function(e){})}catch(e){t.strictDi=!!/strict mode/.exec(e&&e.toString())}n.stateRegistry.get().map(function(e){return e.$$state().resolvables}).reduce(fe,[]).filter(function(e){return"deferred"===e.deps}).forEach(function(e){return e.deps=t.annotate(e.resolveFn,t.strictDi)})}Yr.$inject=["$injector","$q","$uiRouter"];function Nr(e){e.$watch(function(){ut.approximateDigests++})}Nr.$inject=["$rootScope"],Mr.provider("$uiRouter",jr),Ir.provider("$urlRouter",["$uiRouterProvider",function(e){return e.urlRouterProvider=new Pr(e)}]),Rr.provider("$urlService",Hr("urlService")),Rr.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return Lr.urlMatcherFactory}]),Rr.provider("$templateFactory",function(){return new Dr}),Vr.provider("$stateRegistry",Hr("stateRegistry")),Vr.provider("$uiRouterGlobals",Hr("globals")),Vr.provider("$transitions",Hr("transitionService")),Vr.provider("$state",["$uiRouterProvider",function(){return N(Lr.stateProvider,{$get:function(){return Lr.stateService}})}]),Vr.factory("$stateParams",["$uiRouter",function(e){return e.globals.params}]),Fr.factory("$view",function(){return Lr.viewService}),Fr.service("$trace",function(){return ut}),Fr.run(Nr),Rr.run(["$urlMatcherFactory",function(e){}]),Vr.run(["$state",function(e){}]),Ir.run(["$urlRouter",function(e){}]),Mr.run(Yr);var qr,Ur,zr,Br,Wr=function(n){return n.getTokens().filter(O).map(function(e){var t=n.getResolvable(e);return[e,"NOWAIT"===n.getPolicy(t).async?t.promise:t.data]}).reduce(ke,{})};function Gr(e){var t,n=e.match(/^\s*({[^}]*})\s*$/);if(n&&(e="("+n[1]+")"),!(t=e.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/))||4!==t.length)throw new Error("Invalid state ref '"+e+"'");return{state:t[1]||null,paramExpr:t[3]||null}}function Kr(e){var t=e.parent().inheritedData("$uiView"),n=S("$cfg.path")(t);return n?De(n).state.name:void 0}function Qr(e,t,n){var r,i=n.uiState||e.current.name,o=N((r=e,{relative:Kr(t)||r.$current,inherit:!0,source:"sref"}),n.uiStateOpts||{}),a=e.href(i,n.uiStateParams,o);return{uiState:i,uiStateParams:n.uiStateParams,uiStateOpts:o,href:a}}function Zr(e){var t="[object SVGAnimatedString]"===Object.prototype.toString.call(e.prop("href")),n="FORM"===e[0].nodeName;return{attr:n?"action":t?"xlink:href":"href",isAnchor:"A"===e.prop("tagName").toUpperCase(),clickable:!n}}function Xr(o,a,s,l,u){return function(e){var t=e.which||e.button,n=u();if(!(1<t||e.ctrlKey||e.metaKey||e.shiftKey||o.attr("target"))){var r=s(function(){o.attr("disabled")||a.go(n.uiState,n.uiStateParams,n.uiStateOpts)});e.preventDefault();var i=l.isAnchor&&!n.href?1:0;e.preventDefault=function(){i--<=0&&s.cancel(r)}}}}function Jr(i,e,o,t){var a;t&&(a=t.events),E(a)||(a=["click"]);for(var n=i.on?"on":"bind",r=0,s=a;r<s.length;r++){var l=s[r];i[n](l,o)}e.$on("$destroy",function(){for(var e=i.off?"off":"unbind",t=0,n=a;t<n.length;t++){var r=n[t];i[e](r,o)}})}function ei(r){var e=function(e,t,n){return r.is(e,t,n)};return e.$stateful=!0,e}function ti(r){var e=function(e,t,n){return r.includes(e,t,n)};return e.$stateful=!0,e}function ni(g,m,v,e,y,t){var w=S("viewDecl.controllerAs"),b=S("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(e){var f=e.html();return e.empty(),function(t,n){var e=n.data("$uiView");if(!e)return n.html(f),void g(n.contents())(t);var r=e.$cfg||{viewDecl:{},getTemplate:z},i=r.path&&new Et(r.path);n.html(r.getTemplate(n,i)||f),ut.traceUIViewFill(e.$uiView,n.html());var o=g(n.contents()),a=r.controller,s=w(r),l=b(r),u=i&&Wr(i);if(t[l]=u,a){var c=m(a,N({},u,{$scope:t,$element:n}));s&&(t[s]=c,t[s][l]=u),n.data("$ngControllerController",c),n.children().data("$ngControllerController",c),oi(y,v,c,t,r)}if(O(r.component))var d=je(r.component),p=new RegExp("^(x-|data-)?"+d+"$","i"),h=t.$watch(function(){var e=[].slice.call(n[0].children).filter(function(e){return e&&e.tagName&&p.exec(e.tagName)});return e&&C.element(e).data("$"+r.component+"Controller")},function(e){e&&(oi(y,v,e,t,r),h())});o(t)}}}}qr=["$uiRouter","$timeout",function(p,h){var f=p.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(e,t,n,r){var i,o=Zr(t),a=r[1]||r[0],s=null,l={},u=function(){return Qr(f,t,l)},c=Gr(n.uiSref);function d(){var e=u();s&&s(),a&&(s=a.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&n.$set(o.attr,e.href)}l.uiState=c.state,l.uiStateOpts=n.uiSrefOpts?e.$eval(n.uiSrefOpts):{},c.paramExpr&&(e.$watch(c.paramExpr,function(e){l.uiStateParams=N({},e),d()},!0),l.uiStateParams=N({},e.$eval(c.paramExpr))),d(),e.$on("$destroy",p.stateRegistry.onStatesChanged(d)),e.$on("$destroy",p.transitionService.onSuccess({},d)),o.clickable&&(i=Xr(t,f,h,o,u),Jr(t,e,i,l.uiStateOpts))}}}],Ur=["$uiRouter","$timeout",function(h,f){var g=h.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,e,r,t){var i,o=Zr(e),a=t[1]||t[0],s=null,l={},u=function(){return Qr(g,e,l)},c=["uiState","uiStateParams","uiStateOpts"],d=c.reduce(function(e,t){return e[t]=z,e},{});function p(){var e=u();s&&s(),a&&(s=a.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&r.$set(o.attr,e.href)}c.forEach(function(t){l[t]=r[t]?n.$eval(r[t]):null,r.$observe(t,function(e){d[t](),d[t]=n.$watch(e,function(e){l[t]=e,p()},!0)})}),p(),n.$on("$destroy",h.stateRegistry.onStatesChanged(p)),n.$on("$destroy",h.transitionService.onSuccess({},p)),o.clickable&&(i=Xr(e,g,f,o,u),Jr(e,n,i,l.uiStateOpts))}}}],zr=["$state","$stateParams","$interpolate","$uiRouter",function(f,e,g,m){return{restrict:"A",controller:["$scope","$element","$attrs",function(s,l,e){var u,r,t,n,i,c=[];u=g(e.uiSrefActiveEq||"",!1)(s);try{r=s.$eval(e.uiSrefActive)}catch(e){}function o(e){e.promise.then(h,z)}function a(){d(r)}function d(e){T(e)&&(c=[],Y(e,function(e,t){var n=function(e,t){var n=Gr(e);p(n.state,s.$eval(n.paramExpr),t)};O(e)?n(e,t):E(e)&&Y(e,function(e){n(e,t)})}))}function p(e,t,n){var r={state:f.get(e,Kr(l))||{name:e},params:t,activeClass:n};return c.push(r),function(){Q(c)(r)}}function h(){var t=function(e){return e.split(/\s/).filter(U)},e=function(e){return e.map(function(e){return e.activeClass}).map(t).reduce(fe,[])},n=e(c).concat(t(u)).reduce(ve,[]),r=e(c.filter(function(e){return f.includes(e.state.name,e.params)})),i=!!c.filter(function(e){return f.is(e.state.name,e.params)}).length?t(u):[],o=r.concat(i).reduce(ve,[]),a=n.filter(function(e){return!G(o,e)});s.$evalAsync(function(){o.forEach(function(e){return l.addClass(e)}),a.forEach(function(e){return l.removeClass(e)})})}d(r=r||g(e.uiSrefActive||"",!1)(s)),this.$$addStateInfo=function(e,t){if(!(T(r)&&0<c.length)){var n=p(e,t,r);return h(),n}},s.$on("$destroy",(t=m.stateRegistry.onStatesChanged(a),n=m.transitionService.onStart({},o),i=s.$on("$stateChangeSuccess",h),function(){t(),n(),i()})),m.globals.transition&&o(m.globals.transition),h()}]}}],C.module("ui.router.state").directive("uiSref",qr).directive("uiSrefActive",zr).directive("uiSrefActiveEq",zr).directive("uiState",Ur),ei.$inject=["$state"],ti.$inject=["$state"],C.module("ui.router.state").filter("isState",ei).filter("includedByState",ti),Br=["$view","$animate","$uiViewScroll","$interpolate","$q",function(i,o,y,w,b){var $={$cfg:{viewDecl:{$context:i._pluginapi._rootViewContext()}},$uiView:{}},_={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,t,v){return function(a,s,e){var l,u,c,d,t,p=e.onload||"",h=e.autoscroll,f={enter:function(e,t,n){2<C.version.minor?o.enter(e,null,t).then(n):o.enter(e,null,t,n)},leave:function(e,t){2<C.version.minor?o.leave(e).then(t):o.leave(e,t)}},n=s.inheritedData("$uiView")||$,g=w(e.uiView||e.name||"")(a)||"$default",m={$type:"ng1",id:_.count++,name:g,fqn:n.$uiView.fqn?n.$uiView.fqn+"."+g:g,config:null,configUpdated:function(e){if(e&&!(e instanceof kr))return;if(t=d,n=e,t===n)return;var t,n;ut.traceUIViewConfigUpdated(m,e&&e.viewDecl&&e.viewDecl.$context),r(d=e)},get creationContext(){var e=S("$cfg.viewDecl.$context")(n),t=S("$uiView.creationContext")(n);return e||t}};function r(e){var t=a.$new(),n=b.defer(),r=b.defer(),i={$cfg:e,$uiView:m},o={$animEnter:n.promise,$animLeave:r.promise,$$animLeave:r};t.$emit("$viewContentLoading",g),u=v(t,function(e){e.data("$uiViewAnim",o),e.data("$uiView",i),f.enter(e,s,function(){n.resolve(),c&&c.$emit("$viewContentAnimationEnded"),(k(h)&&!h||a.$eval(h))&&y(e)}),function(){if(l&&(ut.traceUIViewEvent("Removing (previous) el",l.data("$uiView")),l.remove(),l=null),c&&(ut.traceUIViewEvent("Destroying scope",m),c.$destroy(),c=null),u){var e=u.data("$uiViewAnim");ut.traceUIViewEvent("Animate out",e),f.leave(u,function(){e.$$animLeave.resolve(),l=null}),l=u,u=null}}()}),(c=t).$emit("$viewContentLoaded",e||d),c.$eval(p)}ut.traceUIViewEvent("Linking",m),s.data("$uiView",{$uiView:m}),r(),t=i.registerUIView(m),a.$on("$destroy",function(){ut.traceUIViewEvent("Destroying/Unregistering",m),t()})}}};return _}],ni.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var ri="function"==typeof C.module("ui.router").component,ii=0;function oi(r,e,u,t,n){!D(u.$onInit)||n.viewDecl.component&&ri||u.$onInit();var c=De(n.path).state.self,i={bind:u};if(D(u.uiOnParamsChanged)){var d=new Et(n.path).getResolvable("$transition$").data;t.$on("$destroy",e.onSuccess({},function(e){if(e!==d&&-1===e.exiting().indexOf(c)){var n=e.params("to"),r=e.params("from"),t=function(e){return e.paramSchema},i=e.treeChanges("to").map(t).reduce(fe,[]),o=e.treeChanges("from").map(t).reduce(fe,[]),a=i.filter(function(e){var t=o.indexOf(e);return-1===t||!o[t].type.equals(n[e.id],r[e.id])});if(a.length){var s=a.map(function(e){return e.id}),l=se(n,function(e,t){return-1!==s.indexOf(t)});u.uiOnParamsChanged(l,e)}}},i))}if(D(u.uiCanExit)){var o=ii++,a="_uiCanExitIds",s=function(e){return!!e&&(e[a]&&!0===e[a][o]||s(e.redirectedFrom()))},l={exiting:c.name};t.$on("$destroy",e.onBefore(l,function(e){var t,n=e[a]=e[a]||{};return s(e)||(t=r.when(u.uiCanExit(e))).then(function(e){return n[o]=!1!==e}),t},i))}}C.module("ui.router.state").directive("uiView",Br),C.module("ui.router.state").directive("uiView",ni),C.module("ui.router.state").provider("$uiViewScroll",function(){var n=!1;this.useAnchorScroll=function(){n=!0},this.$get=["$anchorScroll","$timeout",function(e,t){return n?e:function(e){return t(function(){e[0].scrollIntoView()},0,!1)}}]});g.default="ui.router",g.core=br,g.watchDigests=Nr,g.getLocals=Wr,g.getNg1ViewConfigFactory=$r,g.ng1ViewsBuilder=Cr,g.Ng1ViewConfig=kr,g.StateProvider=Tr,g.UrlRouterProvider=Pr,g.root=F,g.fromJson=j,g.toJson=H,g.forEach=Y,g.extend=N,g.equals=q,g.identity=U,g.noop=z,g.createProxyFunctions=B,g.inherit=W,g.inArray=G,g._inArray=K,g.removeFrom=Q,g._removeFrom=Z,g.pushTo=X,g._pushTo=J,g.deregAll=ee,g.defaults=te,g.mergeR=ne,g.ancestors=re,g.pick=ie,g.omit=oe,g.pluck=ae,g.filter=se,g.find=le,g.mapObj=ue,g.map=ce,g.values=de,g.allTrueR=pe,g.anyTrueR=he,g.unnestR=fe,g.flattenR=ge,g.pushR=me,g.uniqR=ve,g.unnest=ye,g.flatten=we,g.assertPredicate=be,g.assertMap=$e,g.assertFn=_e,g.pairs=Ce,g.arrayTuples=Se,g.applyPairs=ke,g.tail=De,g.copy=xe,g._extend=Oe,g.silenceUncaughtInPromise=Ae,g.silentRejection=Pe,g.notImplemented=I,g.services=V,g.Glob=Me,g.curry=u,g.compose=n,g.pipe=l,g.prop=w,g.propEq=v,g.parse=S,g.not=d,g.and=r,g.or=i,g.all=c,g.any=p,g.is=h,g.eq=o,g.val=f,g.invoke=a,g.pattern=m,g.isUndefined=b,g.isDefined=k,g.isNull=$,g.isNullOrUndefined=_,g.isFunction=D,g.isNumber=x,g.isString=O,g.isObject=T,g.isArray=E,g.isDate=A,g.isRegExp=P,g.isInjectable=M,g.isPromise=R,g.Queue=Re,g.maxLength=Fe,g.padString=Le,g.kebobString=je,g.functionToString=He,g.fnToString=Ye,g.stringify=Ue,g.beforeAfterSubstr=ze,g.hostRegex=Be,g.stripLastPathElement=We,g.splitHash=Ge,g.splitQuery=Ke,g.splitEqual=Qe,g.trimHashVal=Ze,g.splitOnDelim=Xe,g.joinNeighborsR=Je,g.Trace=lt,g.trace=ut,g.Param=vt,g.ParamTypes=yt,g.StateParams=wt,g.ParamType=ct,g.PathNode=bt,g.PathUtils=_t,g.resolvePolicies=Ct,g.defaultResolvePolicy=St,g.Resolvable=kt,g.NATIVE_INJECTOR_TOKEN=Tt,g.ResolveContext=Et,g.resolvablesBuilder=Lt,g.StateBuilder=Yt,g.StateObject=Nt,g.StateMatcher=qt,g.StateQueueManager=Ut,g.StateRegistry=zt,g.StateService=Bn,g.TargetState=$t,g.HookBuilder=Zt,g.matchState=Gt,g.RegisteredHook=Kt,g.makeEvent=Qt,g.Rejection=Ve,g.Transition=Jt,g.TransitionHook=Wt,g.TransitionEventType=Yn,g.defaultTransOpts=Un,g.TransitionService=zn,g.UrlMatcher=rn,g.ParamFactory=an,g.UrlMatcherFactory=sn,g.UrlRouter=dn,g.UrlRuleFactory=ln,g.BaseUrlRule=un,g.UrlService=$n,g.ViewService=hn,g.UIRouterGlobals=fn,g.UIRouter=Cn,g.$q=Wn,g.$injector=Zn,g.BaseLocationServices=ar,g.HashLocationService=lr,g.MemoryLocationService=cr,g.PushStateLocationService=pr,g.MemoryLocationConfig=hr,g.BrowserLocationConfig=fr,g.keyValsToObjectR=Xn,g.getParams=Jn,g.parseUrl=er,g.buildUrl=tr,g.locationPluginFactory=nr,g.servicesPlugin=gr,g.hashLocationPlugin=mr,g.pushStateLocationPlugin=vr,g.memoryLocationPlugin=yr,g.UIRouterPluginBase=wr,Object.defineProperty(g,"__esModule",{value:!0})}),function($,l){"use strict";var _=["ng","oc.lazyLoad"],C={},S=[],k=[],u=[],D=[],x=$.noop,O={},T=[];$.module("oc.lazyLoad",["ng"]).provider("$ocLazyLoad",["$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider",function(e,t,n,r,i,o){function c(e,t,n){if(t){var r,i,o,a=[];for(r=t.length-1;0<=r;r--)if(i=t[r],$.isString(i)||(i=h(i)),i&&-1===T.indexOf(i)&&(!f[i]||-1!==u.indexOf(i))){var s=-1===_.indexOf(i);if(o=A(i),s&&(_.push(i),c(e,o.requires,n)),0<o._runBlocks.length)for(O[i]=[];0<o._runBlocks.length;)O[i].push(o._runBlocks.shift());$.isDefined(O[i])&&(s||n.rerun)&&(a=a.concat(O[i])),d(e,o._invokeQueue,i,n.reconfig),d(e,o._configBlocks,i,n.reconfig),x(s?"ocLazyLoad.moduleLoaded":"ocLazyLoad.moduleReloaded",i),t.pop(),T.push(i)}var l=e.getInstanceInjector();$.forEach(a,function(e){l.invoke(e)})}}function p(e,a){function s(e){return $.isArray(e)?b(e.toString()):$.isObject(e)?b(w(e)):$.isDefined(e)&&null!==e?b(e.toString()):e}var n=e[2][0],l=e[1],u=!1;$.isUndefined(C[a])&&(C[a]={}),$.isUndefined(C[a][l])&&(C[a][l]={});var r=function(e,t){var n,r,i,o;C[a][l].hasOwnProperty(e)||(C[a][l][e]=[]),n=t,r=C[a][l][e],o=!0,r.length&&(i=s(n),$.forEach(r,function(e){o=o&&s(e)!==i})),o&&(u=!0,C[a][l][e].push(t),x("ocLazyLoad.componentLoaded",[a,l,e]))};if($.isString(n))r(n,e[2][1]);else{if(!$.isObject(n))return!1;$.forEach(n,function(e,t){$.isString(e)?r(e,n[1]):r(t,e)})}return u}function d(e,t,n,r){var i,o,a,s;if(t)for(i=0,o=t.length;i<o;i++)if(a=t[i],$.isArray(a)){if(null!==e){if(!e.hasOwnProperty(a[0]))throw new Error("unsupported provider "+a[0]);s=e[a[0]]}var l=p(a,n);if("invoke"!==a[1])l&&$.isDefined(s)&&s[a[1]].apply(s,a[2]);else{var u=function(e){var t=S.indexOf(n+"-"+e);(-1===t||r)&&(-1===t&&S.push(n+"-"+e),$.isDefined(s)&&s[a[1]].apply(s,a[2]))};if($.isFunction(a[2][0]))u(a[2][0]);else if($.isArray(a[2][0]))for(var c=0,d=a[2][0].length;c<d;c++)$.isFunction(a[2][0][c])&&u(a[2][0][c])}}}function h(e){var t=null;return $.isString(e)?t=e:$.isObject(e)&&e.hasOwnProperty("name")&&$.isString(e.name)&&(t=e.name),t}function a(e){if(!$.isString(e))return!1;try{return A(e)}catch(e){if(/No module/.test(e)||-1<e.message.indexOf("$injector:nomod"))return!1}}var f={},s={$controllerProvider:e,$compileProvider:n,$filterProvider:r,$provide:t,$injector:i,$animateProvider:o},g=!1,m=!1,v=[],y={};v.push=function(e){-1===this.indexOf(e)&&Array.prototype.push.apply(this,arguments)},this.config=function(e){$.isDefined(e.modules)&&($.isArray(e.modules)?$.forEach(e.modules,function(e){f[e.name]=e}):f[e.modules.name]=e.modules),$.isDefined(e.debug)&&(g=e.debug),$.isDefined(e.events)&&(m=e.events)},this._init=function(r){if(0===k.length){var t=[r],i=["ng:app","ng-app","x-ng-app","data-ng-app"],o=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/,n=function(e){return e&&t.push(e)};$.forEach(i,function(e){i[e]=!0,n(document.getElementById(e)),e=e.replace(":","\\:"),void 0!==r[0]&&r[0].querySelectorAll&&($.forEach(r[0].querySelectorAll("."+e),n),$.forEach(r[0].querySelectorAll("."+e+"\\:"),n),$.forEach(r[0].querySelectorAll("["+e+"]"),n))}),$.forEach(t,function(e){if(0===k.length){var t=" "+r.className+" ",n=o.exec(t);n?k.push((n[2]||"").replace(/\s+/g,",")):$.forEach(e.attributes,function(e){0===k.length&&i[e.name]&&k.push(e.value)})}})}0!==k.length||(l.jasmine||l.mocha)&&$.isDefined($.mock)||console.error("No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.");$.forEach(k,function(e){!function e(t){if(-1===_.indexOf(t)){_.push(t);var n=$.module(t);d(null,n._invokeQueue,t),d(null,n._configBlocks,t),$.forEach(n.requires,e)}}(e)}),k=[],D.pop()};var w=function(t){try{return JSON.stringify(t)}catch(e){var n=[];return JSON.stringify(t,function(e,t){if($.isObject(t)&&null!==t){if(-1!==n.indexOf(t))return;n.push(t)}return t})}},b=function(e){var t,n,r=0;if(0==e.length)return r;for(t=0,n=e.length;t<n;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return r};this.$get=["$log","$rootElement","$rootScope","$cacheFactory","$q",function(n,e,r,t,l){function u(e){var t=l.defer();return n.error(e.message),t.reject(e),t.promise}var i,o=t("ocLazyLoad");return g||((n={}).error=$.noop,n.warn=$.noop,n.info=$.noop),s.getInstanceInjector=function(){return i||(i=e.data("$injector")||$.injector())},{_broadcast:x=function(e,t){m&&r.$broadcast(e,t),g&&n.info(e,t)},_$log:n,_getFilesCache:function(){return o},toggleWatch:function(e){e?D.push(!0):D.pop()},getModuleConfig:function(e){if(!$.isString(e))throw new Error("You need to give the name of the module to get");return f[e]?$.copy(f[e]):null},setModuleConfig:function(e){if(!$.isObject(e))throw new Error("You need to give the module config object to set");return f[e.name]=e},getModules:function(){return _},isLoaded:function(e){var t,n;if($.isString(e)&&(e=[e]),$.isArray(e)){var r,i;for(r=0,i=e.length;r<i;r++)if(t=e[r],n=void 0,(n=-1<_.indexOf(t))||(n=!!a(t)),!n)return!1;return!0}throw new Error("You need to define the module(s) name(s)")},_getModuleName:h,_getModule:function(t){try{return A(t)}catch(e){throw(/No module/.test(e)||-1<e.message.indexOf("$injector:nomod"))&&(e.message='The module "'+w(t)+'" that you are trying to load does not exist. '+e.message),e}},moduleExists:a,_loadDependencies:function(r,i){var e,t,o,a=[],s=this;if(null===(r=s._getModuleName(r)))return l.when();try{e=s._getModule(r)}catch(e){return u(e)}return t=s.getRequires(e),$.forEach(t,function(t){if($.isString(t)){var e=s.getModuleConfig(t);if(null===e)return void v.push(t);(t=e).name=void 0}if(s.moduleExists(t.name))return 0!==(o=t.files.filter(function(e){return s.getModuleConfig(t.name).files.indexOf(e)<0})).length&&s._$log.warn('Module "',r,'" attempted to redefine configuration for dependency. "',t.name,'"\n Additional Files Loaded:',o),$.isDefined(s.filesLoader)?void a.push(s.filesLoader(t,i).then(function(){return s._loadDependencies(t)})):u(new Error("Error: New dependencies need to be loaded from external files ("+t.files+"), but no loader has been defined."));if($.isArray(t)){var n=[];$.forEach(t,function(e){var t=s.getModuleConfig(e);null===t?n.push(e):t.files&&(n=n.concat(t.files))}),0<n.length&&(t={files:n})}else $.isObject(t)&&t.hasOwnProperty("name")&&t.name&&(s.setModuleConfig(t),v.push(t.name));if($.isDefined(t.files)&&0!==t.files.length){if(!$.isDefined(s.filesLoader))return u(new Error('Error: the module "'+t.name+'" is defined in external files ('+t.files+"), but no loader has been defined."));a.push(s.filesLoader(t,i).then(function(){return s._loadDependencies(t)}))}}),l.all(a)},inject:function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],t=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],r=this,i=l.defer();if($.isDefined(e)&&null!==e){if($.isArray(e)){var o=[];return $.forEach(e,function(e){o.push(r.inject(e,n,t))}),l.all(o)}r._addToLoadList(r._getModuleName(e),!0,t)}if(0<k.length){var a=k.slice();!function e(t){v.push(t),y[t]=i.promise,r._loadDependencies(t,n).then(function(){try{T=[],c(s,v,n)}catch(e){return r._$log.error(e.message),void i.reject(e)}0<k.length?e(k.shift()):i.resolve(a)},function(e){i.reject(e)})}(k.shift())}else{if(n&&n.name&&y[n.name])return y[n.name];i.resolve()}return i.promise},getRequires:function(e){var t=[];return $.forEach(e.requires,function(e){-1===_.indexOf(e)&&t.push(e)}),t},_invokeQueue:d,_registerInvokeList:p,_register:c,_addToLoadList:E,_unregister:function(e){$.isDefined(e)&&$.isArray(e)&&$.forEach(e,function(e){C[e]=void 0})}}}],this._init($.element(l.document))}]);var r=$.bootstrap;$.bootstrap=function(e,t,n){return _=["ng","oc.lazyLoad"],C={},S=[],k=[],u=[],D=[],x=$.noop,O={},T=[],$.forEach(t.slice(),function(e){E(e,!0,!0)}),r(e,t,n)};var E=function(e,t,n){(0<D.length||t)&&$.isString(e)&&-1===k.indexOf(e)&&(k.push(e),n&&u.push(e))},A=$.module;$.module=function(e,t,n){return E(e,!1,!0),A(e,t,n)},"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="oc.lazyLoad")}(angular,window),function(u){"use strict";u.module("oc.lazyLoad").directive("ocLazyLoad",["$ocLazyLoad","$compile","$animate","$parse","$timeout",function(o,a,s,l,e){return{restrict:"A",terminal:!0,priority:1e3,compile:function(e,t){var i=e[0].innerHTML;return e.html(""),function(t,n,e){var r=l(e.ocLazyLoad);t.$watch(function(){return r(t)||e.ocLazyLoad},function(e){u.isDefined(e)&&o.load(e).then(function(){s.enter(i,n),a(n.contents())(t)})},!0)}}}}])}(angular),function(C){"use strict";C.module("oc.lazyLoad").config(["$provide",function(e){e.decorator("$ocLazyLoad",["$delegate","$q","$window","$interval",function(v,y,w,b){var $=!1,_=w.document.getElementsByTagName("head")[0]||w.document.getElementsByTagName("body")[0];return v.buildElement=function(e,t,n){var r,i,o=y.defer(),a=v._getFilesCache(),s=function(e){var t=(new Date).getTime();return 0<=e.indexOf("?")?"&"===e.substring(0,e.length-1)?e+"_dc="+t:e+"&_dc="+t:e+"?_dc="+t};switch(C.isUndefined(a.get(t))&&a.put(t,o.promise),e){case"css":(r=w.document.createElement("link")).type="text/css",r.rel="stylesheet",r.href=!1===n.cache?s(t):t;break;case"js":(r=w.document.createElement("script")).src=!1===n.cache?s(t):t;break;default:a.remove(t),o.reject(new Error('Requested type "'+e+'" is not known. Could not inject "'+t+'"'))}r.onload=r.onreadystatechange=function(e){r.readyState&&!/^c|loade/.test(r.readyState)||i||(r.onload=r.onreadystatechange=null,i=1,v._broadcast("ocLazyLoad.fileLoaded",t),o.resolve(r))},r.onerror=function(){a.remove(t),o.reject(new Error("Unable to load "+t))},r.async=n.serie?0:1;var l=_.lastChild;if(n.insertBefore){var u=C.element(C.isDefined(window.jQuery)?n.insertBefore:document.querySelector(n.insertBefore));u&&0<u.length&&(l=u[0])}if(l.parentNode.insertBefore(r,l),"css"==e){var c=w.navigator.userAgent.toLowerCase();if(-1<c.indexOf("phantomjs/1.9"))$=!0;else if(/iP(hone|od|ad)/.test(w.navigator.platform)){var d=w.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),p=parseFloat([parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3]||0,10)].join("."));$=p<6}else if(-1<c.indexOf("android")){var h=parseFloat(c.slice(c.indexOf("android")+8));$=h<4.4}else if(-1<c.indexOf("safari")){var f=c.match(/version\/([\.\d]+)/i);$=f&&f[1]&&parseFloat(f[1])<6}if($)var g=1e3,m=b(function(){try{r.sheet.cssRules,b.cancel(m),r.onload()}catch(e){--g<=0&&r.onerror()}},20)}return o.promise},v}])}])}(angular),function(m){"use strict";m.module("oc.lazyLoad").config(["$provide",function(e){e.decorator("$ocLazyLoad",["$delegate","$q",function(f,g){return f.filesLoader=function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=[],o=[],a=[],s=[],l=null,u=f._getFilesCache();f.toggleWatch(!0),m.extend(r,e);var t=function(e){var t,n=null;if(m.isObject(e)&&(n=e.type,e=e.path),l=u.get(e),m.isUndefined(l)||!1===r.cache){if(null!==(t=/^(css|less|html|htm|js)?(?=!)/.exec(e))&&(n=t[1],e=e.substr(t[1].length+1,e.length)),!n)if(null!==(t=/[.](css|less|html|htm|js)?((\?|#).*)?$/.exec(e)))n=t[1];else{if(f.jsLoader.hasOwnProperty("ocLazyLoadLoader")||!f.jsLoader.hasOwnProperty("requirejs"))return void f._$log.error("File type could not be determined. "+e);n="js"}"css"!==n&&"less"!==n||-1!==i.indexOf(e)?"html"!==n&&"htm"!==n||-1!==o.indexOf(e)?"js"===n||-1===a.indexOf(e)?a.push(e):f._$log.error("File type is not valid. "+e):o.push(e):i.push(e)}else l&&s.push(l)};if(r.serie?t(r.files.shift()):m.forEach(r.files,function(e){t(e)}),0<i.length){var n=g.defer();f.cssLoader(i,function(e){m.isDefined(e)&&f.cssLoader.hasOwnProperty("ocLazyLoadLoader")?(f._$log.error(e),n.reject(e)):n.resolve()},r),s.push(n.promise)}if(0<o.length){var c=g.defer();f.templatesLoader(o,function(e){m.isDefined(e)&&f.templatesLoader.hasOwnProperty("ocLazyLoadLoader")?(f._$log.error(e),c.reject(e)):c.resolve()},r),s.push(c.promise)}if(0<a.length){var d=g.defer();f.jsLoader(a,function(e){m.isDefined(e)&&(f.jsLoader.hasOwnProperty("ocLazyLoadLoader")||f.jsLoader.hasOwnProperty("requirejs"))?(f._$log.error(e),d.reject(e)):d.resolve()},r),s.push(d.promise)}if(0!==s.length)return r.serie&&0<r.files.length?g.all(s).then(function(){return f.filesLoader(e,r)}):g.all(s).finally(function(e){return f.toggleWatch(!1),e});var p=g.defer(),h="Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.";return f._$log.error(h),p.reject(h),p.promise},f.load=function(e){var t,n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=this,i=null,o=[],a=g.defer(),s=m.copy(e),l=m.copy(n);if(m.isArray(s))return m.forEach(s,function(e){o.push(r.load(e,l))}),g.all(o).then(function(e){a.resolve(e)},function(e){a.reject(e)}),a.promise;if(m.isString(s)?(i=r.getModuleConfig(s))||(i={files:[s]}):m.isObject(s)&&(i=m.isDefined(s.path)&&m.isDefined(s.type)?{files:[s]}:r.setModuleConfig(s)),null===i)return t='Module "'+(r._getModuleName(s)||"unknown")+'" is not configured, cannot load.',f._$log.error(t),a.reject(new Error(t)),a.promise;m.isDefined(i.template)&&(m.isUndefined(i.files)&&(i.files=[]),m.isString(i.template)?i.files.push(i.template):m.isArray(i.template)&&i.files.concat(i.template));var u=m.extend({},l,i);return m.isUndefined(i.files)&&m.isDefined(i.name)&&f.moduleExists(i.name)?f.inject(i.name,u,!0):(f.filesLoader(i,u).then(function(){f.inject(null,u).then(function(e){a.resolve(e)},function(e){a.reject(e)})},function(e){a.reject(e)}),a.promise)},f}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(e){e.decorator("$ocLazyLoad",["$delegate","$q",function(i,o){return i.cssLoader=function(e,t,n){var r=[];a.forEach(e,function(e){r.push(i.buildElement("css",e,n))}),o.all(r).then(function(){t()},function(e){t(e)})},i.cssLoader.ocLazyLoadLoader=!0,i}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(e){e.decorator("$ocLazyLoad",["$delegate","$q",function(i,o){return i.jsLoader=function(e,t,n){var r=[];a.forEach(e,function(e){r.push(i.buildElement("js",e,n))}),o.all(r).then(function(){t()},function(e){t(e)})},i.jsLoader.ocLazyLoadLoader=!0,i}])}])}(angular),function(c){"use strict";c.module("oc.lazyLoad").config(["$provide",function(e){e.decorator("$ocLazyLoad",["$delegate","$templateCache","$q","$http",function(n,s,l,u){return n.templatesLoader=function(e,t,i){var o=[],a=n._getFilesCache();return c.forEach(e,function(n){var r=l.defer();o.push(r.promise),u.get(n,i).then(function(e){var t=e.data;c.isString(t)&&0<t.length&&c.forEach(c.element(t),function(e){"SCRIPT"===e.nodeName&&"text/ng-template"===e.type&&s.put(e.id,e.innerHTML)}),c.isUndefined(a.get(n))&&a.put(n,!0),r.resolve()}).catch(function(e){r.reject(new Error('Unable to load template file "'+n+'": '+e.data))})}),l.all(o).then(function(){t()},function(e){t(e)})},n.templatesLoader.ocLazyLoadLoader=!0,n}])}])}(angular),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n;if(null==this)throw new TypeError('"this" is null or not defined');var r=Object(this),i=r.length>>>0;if(0===i)return-1;var o=+t||0;if(Math.abs(o)===1/0&&(o=0),i<=o)return-1;for(n=Math.max(0<=o?o:i-Math.abs(o),0);n<i;){if(n in r&&r[n]===e)return n;n++}return-1}),function(){"use strict";angular.module("angular-loading-bar",["cfp.loadingBarInterceptor"]),angular.module("chieffancypants.loadingBar",["cfp.loadingBarInterceptor"]),angular.module("cfp.loadingBarInterceptor",["cfp.loadingBar"]).config(["$httpProvider",function(h){var e=["$q","$cacheFactory","$timeout","$rootScope","$log","cfpLoadingBar",function(t,o,n,r,i,a){function s(){n.cancel(u),a.complete(),c=d=0}function l(e){var t,n=o.get("$http"),r=h.defaults;!e.cache&&!r.cache||!1===e.cache||"GET"!==e.method&&"JSONP"!==e.method||(t=angular.isObject(e.cache)?e.cache:angular.isObject(r.cache)?r.cache:n);var i=void 0!==t&&void 0!==t.get(e.url);return void 0!==e.cached&&i!==e.cached?e.cached:e.cached=i}var u,c=0,d=0,p=a.latencyThreshold;return{request:function(e){return e.ignoreLoadingBar||l(e)||(r.$broadcast("cfpLoadingBar:loading",{url:e.url}),0===c&&(u=n(function(){a.start()},p)),c++,a.set(d/c)),e},response:function(e){return e&&e.config?e.config.ignoreLoadingBar||l(e.config)||(d++,r.$broadcast("cfpLoadingBar:loaded",{url:e.config.url,result:e}),c<=d?s():a.set(d/c)):i.error("Broken interceptor detected: Config object not supplied in response:\n https://github.com/chieffancypants/angular-loading-bar/pull/50"),e},responseError:function(e){return e&&e.config?e.config.ignoreLoadingBar||l(e.config)||(d++,r.$broadcast("cfpLoadingBar:loaded",{url:e.config.url,result:e}),c<=d?s():a.set(d/c)):i.error("Broken interceptor detected: Config object not supplied in rejection:\n https://github.com/chieffancypants/angular-loading-bar/pull/50"),t.reject(e)}}}];h.interceptors.push(e)}]),angular.module("cfp.loadingBar",[]).provider("cfpLoadingBar",function(){this.autoIncrement=!0,this.includeSpinner=!0,this.includeBar=!0,this.latencyThreshold=100,this.startSize=.02,this.parentSelector="body",this.spinnerTemplate='<div id="loading-bar-spinner"><div class="spinner-icon"></div></div>',this.loadingBarTemplate='<div id="loading-bar"><div class="bar"><div class="peg"></div></div></div>',this.$get=["$injector","$document","$timeout","$rootScope",function(i,o,a,s){function l(e){if(m){var t=100*e+"%";f.css("width",t),v=e,y&&(a.cancel(c),c=a(function(){n()},250))}}function n(){if(!(1<=r())){var e,t=r();e=0<=t&&t<.25?(3*Math.random()+3)/100:.25<=t&&t<.65?3*Math.random()/100:.65<=t&&t<.9?2*Math.random()/100:.9<=t&&t<.99?.005:0,l(r()+e)}}function r(){return v}function t(){v=0,m=!1}var u,c,d,p=this.parentSelector,h=angular.element(this.loadingBarTemplate),f=h.find("div").eq(0),g=angular.element(this.spinnerTemplate),m=!1,v=0,y=this.autoIncrement,w=this.includeSpinner,b=this.includeBar,$=this.startSize;return{start:function(){if(u||(u=i.get("$animate")),a.cancel(d),!m){var e=o[0],t=e.querySelector?e.querySelector(p):o.find(p)[0];t||(t=e.getElementsByTagName("body")[0]);var n=angular.element(t),r=t.lastChild&&angular.element(t.lastChild);s.$broadcast("cfpLoadingBar:started"),m=!0,b&&u.enter(h,n,r),w&&u.enter(g,n,h),l($)}},set:l,status:r,inc:n,complete:function(){u||(u=i.get("$animate")),s.$broadcast("cfpLoadingBar:completed"),l(1),a.cancel(d),d=a(function(){var e=u.leave(h,t);e&&e.then&&e.then(t),u.leave(g)},500)},autoIncrement:this.autoIncrement,includeSpinner:this.includeSpinner,latencyThreshold:this.latencyThreshold,parentSelector:this.parentSelector,startSize:this.startSize}}]})}(),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","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.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-unsafe-popup.html","template/tooltip/tooltip-popup.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.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(a,s,l){function e(e){for(var t in e)if(void 0!==n.style[t])return e[t]}var u=function(e,t,n){n=n||{};var r=a.defer(),i=u[n.animation?"animationEndEventName":"transitionEndEventName"],o=function(){l.$apply(function(){e.unbind(i,o),r.resolve(e)})};return i&&e.bind(i,o),s(function(){angular.isString(t)?e.addClass(t):angular.isFunction(t)?t(e):angular.isObject(t)&&e.css(t),i||r.resolve(e)}),r.promise.cancel=function(){i&&e.unbind(i,o),r.reject("Transition cancelled")},r.promise},n=document.createElement("trans");return u.transitionEndEventName=e({WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}),u.animationEndEventName=e({WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"}),u}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(l){return{link:function(e,r,t){function n(e){function t(){a===n&&(a=void 0)}var n=l(r,e);return a&&a.cancel(),(a=n).then(t,t),n}function i(){r.removeClass("collapsing"),r.addClass("collapse in"),r.css({height:"auto"})}function o(){r.removeClass("collapsing"),r.addClass("collapse")}var a,s=!0;e.$watch(t.collapse,function(e){e?s?(s=!1,o(),r.css({height:0})):(r.css({height:r[0].scrollHeight+"px"}),r[0].offsetWidth,r.removeClass("collapse in").addClass("collapsing"),n({height:0}).then(o)):s?(s=!1,i()):(r.removeClass("collapse").addClass("collapsing"),n({height:r[0].scrollHeight+"px"}).then(i))})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(e,n,r){this.groups=[],this.closeOthers=function(t){(angular.isDefined(n.closeOthers)?e.$eval(n.closeOthers):r.closeOthers)&&angular.forEach(this.groups,function(e){e!==t&&(e.isOpen=!1)})},this.addGroup=function(e){var t=this;this.groups.push(e),e.$on("$destroy",function(){t.removeGroup(e)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(t,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(e){this.heading=e}},link:function(t,e,n,r){r.addGroup(t),t.$watch("isOpen",function(e){e&&r.closeOthers(t)}),t.toggleOpen=function(){t.isDisabled||(t.isOpen=!t.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(e,t,n,r,i){r.setHeading(i(e,function(){}))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(e,t,n,r){e.$watch(function(){return r[n.accordionTransclude]},function(e){e&&(t.html(""),t.append(e))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(e,t){e.closeable="close"in t,this.close=e.close}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}).directive("dismissOnTimeout",["$timeout",function(i){return{require:"alert",link:function(e,t,n,r){i(function(){r.close()},parseInt(n.dismissOnTimeout,10))}}}]),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.bindHtmlUnsafe),e.$watch(n.bindHtmlUnsafe,function(e){t.html(e||"")})}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(e){this.activeClass=e.activeClass||"active",this.toggleEvent=e.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(t,n,r,e){var i=e[0],o=e[1];o.$render=function(){n.toggleClass(i.activeClass,angular.equals(o.$modelValue,t.$eval(r.btnRadio)))},n.bind(i.toggleEvent,function(){var e=n.hasClass(i.activeClass);(!e||angular.isDefined(r.uncheckable))&&t.$apply(function(){o.$setViewValue(e?null:t.$eval(r.btnRadio)),o.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(r,e,t,n){function i(){return o(t.btnCheckboxTrue,!0)}function o(e,t){var n=r.$eval(e);return angular.isDefined(n)?n:t}var a=n[0],s=n[1];s.$render=function(){e.toggleClass(a.activeClass,angular.equals(s.$modelValue,i()))},e.bind(a.toggleEvent,function(){r.$apply(function(){s.$setViewValue(e.hasClass(a.activeClass)?o(t.btnCheckboxFalse,!1):i()),s.$render()})})}}}),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$interval","$transition",function(a,t,n,s){function l(){r();var e=+a.interval;!isNaN(e)&&0<e&&(o=n(i,e))}function r(){o&&(n.cancel(o),o=null)}function i(){var e=+a.interval;u&&!isNaN(e)&&0<e?a.next():a.pause()}var o,u,c=this,d=c.slides=a.slides=[],p=-1;c.currentSlide=null;var h=!1;c.select=a.select=function(n,r){function e(){var e,t;h||(c.currentSlide&&angular.isString(r)&&!a.noTransition&&n.$element?(n.$element.addClass(r),n.$element[0].offsetWidth,angular.forEach(d,function(e){angular.extend(e,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(n,{direction:r,active:!0,entering:!0}),angular.extend(c.currentSlide||{},{direction:r,leaving:!0}),a.$currentTransition=s(n.$element,{}),e=n,t=c.currentSlide,a.$currentTransition.then(function(){i(e,t)},function(){i(e,t)})):i(n,c.currentSlide),c.currentSlide=n,p=o,l())}function i(e,t){angular.extend(e,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(t||{},{direction:"",active:!1,leaving:!1,entering:!1}),a.$currentTransition=null}var o=d.indexOf(n);void 0===r&&(r=p<o?"next":"prev"),n&&n!==c.currentSlide&&(a.$currentTransition?(a.$currentTransition.cancel(),t(e)):e())},a.$on("$destroy",function(){h=!0}),c.indexOfSlide=function(e){return d.indexOf(e)},a.next=function(){var e=(p+1)%d.length;return a.$currentTransition?void 0:c.select(d[e],"next")},a.prev=function(){var e=p-1<0?d.length-1:p-1;return a.$currentTransition?void 0:c.select(d[e],"prev")},a.isActive=function(e){return c.currentSlide===e},a.$watch("interval",l),a.$on("$destroy",r),a.play=function(){u||(u=!0,l())},a.pause=function(){a.noPause||(u=!1,r())},c.addSlide=function(e,t){e.$element=t,d.push(e),1===d.length||e.active?(c.select(d[d.length-1]),1==d.length&&a.play()):e.active=!1},c.removeSlide=function(e){var t=d.indexOf(e);d.splice(t,1),0<d.length&&e.active?c.select(t>=d.length?d[t-1]:d[t]):t<p&&p--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?"},link:function(t,e,n,r){r.addSlide(t,e),t.$on("$destroy",function(){r.removeSlide(t)}),t.$watch("active",function(e){e&&r.select(t)})}}}),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(v,y){this.parsers={};var w={yyyy:{regex:"\\d{4}",apply:function(e){this.year=+e}},yy:{regex:"\\d{2}",apply:function(e){this.year=+e+2e3}},y:{regex:"\\d{1,4}",apply:function(e){this.year=+e}},MMMM:{regex:v.DATETIME_FORMATS.MONTH.join("|"),apply:function(e){this.month=v.DATETIME_FORMATS.MONTH.indexOf(e)}},MMM:{regex:v.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(e){this.month=v.DATETIME_FORMATS.SHORTMONTH.indexOf(e)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(e){this.month=e-1}},M:{regex:"[1-9]|1[0-2]",apply:function(e){this.month=e-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},EEEE:{regex:v.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:v.DATETIME_FORMATS.SHORTDAY.join("|")}};this.parse=function(e,t){if(!angular.isString(e)||!t)return e;var o,a,s;t=v.DATETIME_FORMATS[t]||t,this.parsers[t]||(this.parsers[t]=(a=[],s=(o=t).split(""),angular.forEach(w,function(e,t){var n=o.indexOf(t);if(-1<n){o=o.split(""),s[n]="("+e.regex+")",o[n]="$";for(var r=n+1,i=n+t.length;r<i;r++)s[r]="",o[r]="$";o=o.join(""),a.push({index:n,apply:e.apply})}}),{regex:new RegExp("^"+s.join("")+"$"),map:y(a,"index")}));var n,r,i,l=this.parsers[t],u=l.regex,c=l.map,d=e.match(u);if(d&&d.length){for(var p,h={year:1900,month:0,date:1,hours:0},f=1,g=d.length;f<g;f++){var m=c[f-1];m.apply&&m.apply.call(h,d[f])}return n=h.year,i=h.date,(1===(r=h.month)&&28<i?29===i&&(n%4==0&&n%100!=0||n%400==0):3!==r&&5!==r&&8!==r&&10!==r||i<31)&&(p=new Date(h.year,h.month,h.date,h.hours)),p}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(o,r){function a(e){return"static"===(n="position",((t=e).currentStyle?t.currentStyle[n]:r.getComputedStyle?r.getComputedStyle(t)[n]:t.style[n])||"static");var t,n}return{position:function(e){var t=this.offset(e),n={top:0,left:0},r=function(e){for(var t=o[0],n=e.offsetParent||t;n&&n!==t&&a(n);)n=n.offsetParent;return n||t}(e[0]);r!=o[0]&&((n=this.offset(angular.element(r))).top+=r.clientTop-r.scrollTop,n.left+=r.clientLeft-r.scrollLeft);var i=e[0].getBoundingClientRect();return{width:i.width||e.prop("offsetWidth"),height:i.height||e.prop("offsetHeight"),top:t.top-n.top,left:t.left-n.left}},offset:function(e){var t=e[0].getBoundingClientRect();return{width:t.width||e.prop("offsetWidth"),height:t.height||e.prop("offsetHeight"),top:t.top+(r.pageYOffset||o[0].documentElement.scrollTop),left:t.left+(r.pageXOffset||o[0].documentElement.scrollLeft)}},positionElements:function(e,t,n,r){var i,o,a,s,l=n.split("-"),u=l[0],c=l[1]||"center";i=r?this.offset(e):this.position(e),o=t.prop("offsetWidth"),a=t.prop("offsetHeight");var d={center:function(){return i.left+i.width/2-o/2},left:function(){return i.left},right:function(){return i.left+i.width}},p={center:function(){return i.top+i.height/2-a/2},top:function(){return i.top},bottom:function(){return i.top+i.height}};switch(u){case"right":s={top:p[c](),left:d[u]()};break;case"left":s={top:p[c](),left:i.left-o};break;case"bottom":s={top:p[u](),left:d[c]()};break;default:s={top:i.top-a,left:d[c]()}}return s}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).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}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$timeout","$log","dateFilter","datepickerConfig",function(n,r,e,i,t,o,a,s){var l=this,u={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange"],function(e,t){l[e]=angular.isDefined(r[e])?t<8?i(r[e])(n.$parent):n.$parent.$eval(r[e]):s[e]}),angular.forEach(["minDate","maxDate"],function(t){r[t]?n.$parent.$watch(e(r[t]),function(e){l[t]=e?new Date(e):null,l.refreshView()}):l[t]=s[t]?new Date(s[t]):null}),n.datepickerMode=n.datepickerMode||s.datepickerMode,n.uniqueId="datepicker-"+n.$id+"-"+Math.floor(1e4*Math.random()),this.activeDate=angular.isDefined(r.initDate)?n.$parent.$eval(r.initDate):new Date,n.isActive=function(e){return 0===l.compare(e.date,l.activeDate)&&(n.activeDateId=e.uid,!0)},this.init=function(e){(u=e).$render=function(){l.render()}},this.render=function(){if(u.$modelValue){var e=new Date(u.$modelValue),t=!isNaN(e);t?this.activeDate=e:o.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.'),u.$setValidity("date",t)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var e=u.$modelValue?new Date(u.$modelValue):null;u.$setValidity("date-disabled",!e||this.element&&!this.isDisabled(e))}},this.createDateObject=function(e,t){var n=u.$modelValue?new Date(u.$modelValue):null;return{date:e,label:a(e,t),selected:n&&0===this.compare(e,n),disabled:this.isDisabled(e),current:0===this.compare(e,new Date)}},this.isDisabled=function(e){return this.minDate&&this.compare(e,this.minDate)<0||this.maxDate&&0<this.compare(e,this.maxDate)||r.dateDisabled&&n.dateDisabled({date:e,mode:n.datepickerMode})},this.split=function(e,t){for(var n=[];0<e.length;)n.push(e.splice(0,t));return n},n.select=function(e){if(n.datepickerMode===l.minMode){var t=u.$modelValue?new Date(u.$modelValue):new Date(0,0,0,0,0,0,0);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),u.$setViewValue(t),u.$render()}else l.activeDate=e,n.datepickerMode=l.modes[l.modes.indexOf(n.datepickerMode)-1]},n.move=function(e){var t=l.activeDate.getFullYear()+e*(l.step.years||0),n=l.activeDate.getMonth()+e*(l.step.months||0);l.activeDate.setFullYear(t,n,1),l.refreshView()},n.toggleMode=function(e){e=e||1,n.datepickerMode===l.maxMode&&1===e||n.datepickerMode===l.minMode&&-1===e||(n.datepickerMode=l.modes[l.modes.indexOf(n.datepickerMode)+e])},n.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var c=function(){t(function(){l.element[0].focus()},0,!1)};n.$on("datepicker.focus",c),n.keydown=function(e){var t=n.keys[e.which];if(t&&!e.shiftKey&&!e.altKey)if(e.preventDefault(),e.stopPropagation(),"enter"===t||"space"===t){if(l.isDisabled(l.activeDate))return;n.select(l.activeDate),c()}else!e.ctrlKey||"up"!==t&&"down"!==t?(l.handleKeyDown(t,e),l.refreshView()):(n.toggleMode("up"===t?1:-1),c())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(e,t,n,r){var i=r[0],o=r[1];o&&i.init(o)}}}).directive("daypicker",["dateFilter",function(h){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(d,e,t,p){function r(e,t){return 1!==t||e%4!=0||e%100==0&&e%400!=0?n[t]:29}d.showWeeks=p.showWeeks,p.step={months:1},p.element=e;var n=[31,28,31,30,31,30,31,31,30,31,30,31];p._refreshView=function(){var e=p.activeDate.getFullYear(),t=p.activeDate.getMonth(),n=new Date(e,t,1),r=p.startingDay-n.getDay(),i=0<r?7-r:-r,o=new Date(n);0<i&&o.setDate(1-i);for(var a=function(e,t){var n=new Array(t),r=new Date(e),i=0;for(r.setHours(12);i<t;)n[i++]=new Date(r),r.setDate(r.getDate()+1);return n}(o,42),s=0;s<42;s++)a[s]=angular.extend(p.createDateObject(a[s],p.formatDay),{secondary:a[s].getMonth()!==t,uid:d.uniqueId+"-"+s});d.labels=new Array(7);for(var l=0;l<7;l++)d.labels[l]={abbr:h(a[l].date,p.formatDayHeader),full:h(a[l].date,"EEEE")};if(d.title=h(p.activeDate,p.formatDayTitle),d.rows=p.split(a,7),d.showWeeks){d.weekNumbers=[];for(var u=function(e){var t=new Date(e);t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1}(d.rows[0][0].date),c=d.rows.length;d.weekNumbers.push(u++)<c;);}},p.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())},p.handleKeyDown=function(e){var t=p.activeDate.getDate();if("left"===e)t-=1;else if("up"===e)t-=7;else if("right"===e)t+=1;else if("down"===e)t+=7;else if("pageup"===e||"pagedown"===e){var n=p.activeDate.getMonth()+("pageup"===e?-1:1);p.activeDate.setMonth(n,1),t=Math.min(r(p.activeDate.getFullYear(),p.activeDate.getMonth()),t)}else"home"===e?t=1:"end"===e&&(t=r(p.activeDate.getFullYear(),p.activeDate.getMonth()));p.activeDate.setDate(t)},p.refreshView()}}}]).directive("monthpicker",["dateFilter",function(o){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/month.html",require:"^datepicker",link:function(r,e,t,i){i.step={years:1},i.element=e,i._refreshView=function(){for(var e=new Array(12),t=i.activeDate.getFullYear(),n=0;n<12;n++)e[n]=angular.extend(i.createDateObject(new Date(t,n,1),i.formatMonth),{uid:r.uniqueId+"-"+n});r.title=o(i.activeDate,i.formatMonthTitle),r.rows=i.split(e,3)},i.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth())-new Date(t.getFullYear(),t.getMonth())},i.handleKeyDown=function(e){var t=i.activeDate.getMonth();if("left"===e)t-=1;else if("up"===e)t-=3;else if("right"===e)t+=1;else if("down"===e)t+=3;else if("pageup"===e||"pagedown"===e){var n=i.activeDate.getFullYear()+("pageup"===e?-1:1);i.activeDate.setFullYear(n)}else"home"===e?t=0:"end"===e&&(t=11);i.activeDate.setMonth(t)},i.refreshView()}}}]).directive("yearpicker",["dateFilter",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(r,e,t,i){function o(e){return parseInt((e-1)/a,10)*a+1}var a=i.yearRange;i.step={years:a},i.element=e,i._refreshView=function(){for(var e=new Array(a),t=0,n=o(i.activeDate.getFullYear());t<a;t++)e[t]=angular.extend(i.createDateObject(new Date(n+t,0,1),i.formatYear),{uid:r.uniqueId+"-"+t});r.title=[e[0].label,e[a-1].label].join(" - "),r.rows=i.split(e,5)},i.compare=function(e,t){return e.getFullYear()-t.getFullYear()},i.handleKeyDown=function(e){var t=i.activeDate.getFullYear();"left"===e?t-=1:"up"===e?t-=5:"right"===e?t+=1:"down"===e?t+=5:"pageup"===e||"pagedown"===e?t+=("pageup"===e?-1:1)*i.step.years:"home"===e?t=o(i.activeDate.getFullYear()):"end"===e&&(t=o(i.activeDate.getFullYear())+a-1),i.activeDate.setFullYear(t)},i.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(f,g,m,v,y,w,b){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(r,t,i,n){function o(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function a(e){if(!e)return n.$setValidity("date",!0),null;if(angular.isDate(e)&&!isNaN(e))return n.$setValidity("date",!0),e;if(angular.isString(e)){var t=w.parse(e,s)||new Date(e);return isNaN(t)?void n.$setValidity("date",!1):(n.$setValidity("date",!0),t)}n.$setValidity("date",!1)}var s,l=angular.isDefined(i.closeOnDateSelection)?r.$parent.$eval(i.closeOnDateSelection):b.closeOnDateSelection,u=angular.isDefined(i.datepickerAppendToBody)?r.$parent.$eval(i.datepickerAppendToBody):b.appendToBody;r.showButtonBar=angular.isDefined(i.showButtonBar)?r.$parent.$eval(i.showButtonBar):b.showButtonBar,r.getText=function(e){return r[e+"Text"]||b[e+"Text"]},i.$observe("datepickerPopup",function(e){s=e||b.datepickerPopup,n.$render()});var e=angular.element("<div datepicker-popup-wrap><div datepicker></div></div>");e.attr({"ng-model":"date","ng-change":"dateSelection()"});var c=angular.element(e.children()[0]);i.datepickerOptions&&angular.forEach(r.$parent.$eval(i.datepickerOptions),function(e,t){c.attr(o(t),e)}),r.watchData={},angular.forEach(["minDate","maxDate","datepickerMode"],function(t){if(i[t]){var e=g(i[t]);if(r.$parent.$watch(e,function(e){r.watchData[t]=e}),c.attr(o(t),"watchData."+t),"datepickerMode"===t){var n=e.assign;r.$watch("watchData."+t,function(e,t){e!==t&&n(r.$parent,e)})}}}),i.dateDisabled&&c.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),n.$parsers.unshift(a),r.dateSelection=function(e){angular.isDefined(e)&&(r.date=e),n.$setViewValue(r.date),n.$render(),l&&(r.isOpen=!1,t[0].focus())},t.bind("input change keyup",function(){r.$apply(function(){r.date=n.$modelValue})}),n.$render=function(){var e=n.$viewValue?y(n.$viewValue,s):"";t.val(e),r.date=a(n.$modelValue)};var d=function(e){r.isOpen&&e.target!==t[0]&&r.$apply(function(){r.isOpen=!1})},p=function(e){r.keydown(e)};t.bind("keydown",p),r.keydown=function(e){27===e.which?(e.preventDefault(),e.stopPropagation(),r.close()):40!==e.which||r.isOpen||(r.isOpen=!0)},r.$watch("isOpen",function(e){e?(r.$broadcast("datepicker.focus"),r.position=u?v.offset(t):v.position(t),r.position.top=r.position.top+t.prop("offsetHeight"),m.bind("click",d)):m.unbind("click",d)}),r.select=function(e){if("today"===e){var t=new Date;angular.isDate(n.$modelValue)?(e=new Date(n.$modelValue)).setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):e=new Date(t.setHours(0,0,0,0))}r.dateSelection(e)},r.close=function(){r.isOpen=!1,t[0].focus()};var h=f(e)(r);e.remove(),u?m.find("body").append(h):t.after(h),r.$on("$destroy",function(){h.remove(),t.unbind("keydown",p),m.unbind("click",d)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(e,t){t.bind("click",function(e){e.preventDefault(),e.stopPropagation()})}}}),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(t){var n=null;this.open=function(e){n||(t.bind("click",r),t.bind("keydown",i)),n&&n!==e&&(n.isOpen=!1),n=e},this.close=function(e){n===e&&(n=null,t.unbind("click",r),t.unbind("keydown",i))};var r=function(e){if(n){var t=n.getToggleElement();e&&t&&t[0].contains(e.target)||n.$apply(function(){n.isOpen=!1})}},i=function(e){27===e.which&&(n.focusToggleElement(),r())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(n,t,r,e,i,o){var a,s=this,l=n.$new(),u=e.openClass,c=angular.noop,d=t.onToggle?r(t.onToggle):angular.noop;this.init=function(e){s.$element=e,t.isOpen&&(a=r(t.isOpen),c=a.assign,n.$watch(a,function(e){l.isOpen=!!e}))},this.toggle=function(e){return l.isOpen=arguments.length?!!e:!l.isOpen},this.isOpen=function(){return l.isOpen},l.getToggleElement=function(){return s.toggleElement},l.focusToggleElement=function(){s.toggleElement&&s.toggleElement[0].focus()},l.$watch("isOpen",function(e,t){o[e?"addClass":"removeClass"](s.$element,u),e?(l.focusToggleElement(),i.open(l)):i.close(l),c(n,e),angular.isDefined(e)&&e!==t&&d(n,{open:!!e})}),n.$on("$locationChangeSuccess",function(){l.isOpen=!1}),n.$on("$destroy",function(){l.$destroy()})}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(e,t,n,r){r.init(t)}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(t,n,r,i){if(i){i.toggleElement=n;var e=function(e){e.preventDefault(),n.hasClass("disabled")||r.disabled||t.$apply(function(){i.toggle()})};n.bind("click",e),n.attr({"aria-haspopup":!0,"aria-expanded":!1}),t.$watch(i.isOpen,function(e){n.attr("aria-expanded",!!e)}),t.$on("$destroy",function(){n.unbind("click",e)})}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var r=[];return{add:function(e,t){r.push({key:e,value:t})},get:function(e){for(var t=0;t<r.length;t++)if(e==r[t].key)return r[t]},keys:function(){for(var e=[],t=0;t<r.length;t++)e.push(r[t].key);return e},top:function(){return r[r.length-1]},remove:function(e){for(var t=-1,n=0;n<r.length;n++)if(e==r[n].key){t=n;break}return r.splice(t,1)[0]},removeTop:function(){return r.splice(r.length-1,1)[0]},length:function(){return r.length}}}}}).directive("modalBackdrop",["$timeout",function(r){return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",link:function(e,t,n){e.backdropClass=n.backdropClass||"",e.animate=!1,r(function(){e.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout",function(r,i){return{restrict:"EA",scope:{index:"@",animate:"="},replace:!0,transclude:!0,templateUrl:function(e,t){return t.templateUrl||"template/modal/window.html"},link:function(e,t,n){t.addClass(n.windowClass||""),e.size=n.size,i(function(){e.animate=!0,t[0].querySelectorAll("[autofocus]").length||t[0].focus()}),e.close=function(e){var t=r.getTop();t&&t.value.backdrop&&"static"!=t.value.backdrop&&e.target===e.currentTarget&&(e.preventDefault(),e.stopPropagation(),r.dismiss(t.key,"backdrop click"))}}}}]).directive("modalTransclude",function(){return{link:function(e,t,n,r,i){i(e.$parent,function(e){t.empty(),t.append(e)})}}}).factory("$modalStack",["$transition","$timeout","$document","$compile","$rootScope","$$stackedMap",function(s,l,u,c,d,e){function p(){for(var e=-1,t=m.keys(),n=0;n<t.length;n++)m.get(t[n]).value.backdrop&&(e=n);return e}function r(e){var t=u.find("body").eq(0),n=m.get(e).value;m.remove(e),i(n.modalDomEl,n.modalScope,300,function(){n.modalScope.$destroy(),t.toggleClass(g,0<m.length()),function(){if(h&&-1==p()){var e=f;i(h,f,150,function(){e.$destroy(),e=null}),f=h=void 0}}()})}function i(e,t,n,r){function i(){i.done||(i.done=!0,e.remove(),r&&r())}t.animate=!1;var o=s.transitionEndEventName;if(o){var a=l(i,n);e.bind(o,function(){l.cancel(a),i(),t.$apply()})}else l(i)}var h,f,g="modal-open",m=e.createNew(),n={};return d.$watch(p,function(e){f&&(f.index=e)}),u.bind("keydown",function(e){var t;27===e.which&&((t=m.top())&&t.value.keyboard&&(e.preventDefault(),d.$apply(function(){n.dismiss(t.key,"escape key press")})))}),n.open=function(e,t){m.add(e,{deferred:t.deferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard});var n=u.find("body").eq(0),r=p();if(0<=r&&!h){(f=d.$new(!0)).index=r;var i=angular.element("<div modal-backdrop></div>");i.attr("backdrop-class",t.backdropClass),h=c(i)(f),n.append(h)}var o=angular.element("<div modal-window></div>");o.attr({"template-url":t.windowTemplateUrl,"window-class":t.windowClass,size:t.size,index:m.length()-1,animate:"animate"}).html(t.content);var a=c(o)(t.scope);m.top().value.modalDomEl=a,n.append(a),n.addClass(g)},n.close=function(e,t){var n=m.get(e);n&&(n.value.deferred.resolve(t),r(e))},n.dismiss=function(e,t){var n=m.get(e);n&&(n.value.deferred.reject(t),r(e))},n.dismissAll=function(e){for(var t=this.getTop();t;)this.dismiss(t.key,e),t=this.getTop()},n.getTop=function(){return m.top()},n}]).provider("$modal",function(){var g={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(l,u,c,d,p,h,f){var e={};return e.open=function(o){var a=c.defer(),e=c.defer(),s={result:a.promise,opened:e.promise,close:function(e){f.close(s,e)},dismiss:function(e){f.dismiss(s,e)}};if((o=angular.extend({},g.options,o)).resolve=o.resolve||{},!o.template&&!o.templateUrl)throw new Error("One of template or templateUrl options is required.");var t,n,r,i=c.all([(r=o,r.template?c.when(r.template):d.get(angular.isFunction(r.templateUrl)?r.templateUrl():r.templateUrl,{cache:p}).then(function(e){return e.data}))].concat((t=o.resolve,n=[],angular.forEach(t,function(e){(angular.isFunction(e)||angular.isArray(e))&&n.push(c.when(l.invoke(e)))}),n)));return i.then(function(n){var e=(o.scope||u).$new();e.$close=s.close,e.$dismiss=s.dismiss;var t,r={},i=1;o.controller&&(r.$scope=e,r.$modalInstance=s,angular.forEach(o.resolve,function(e,t){r[t]=n[i++]}),t=h(o.controller,r),o.controllerAs&&(e[o.controllerAs]=t)),f.open(s,{scope:e,deferred:a,content:n[0],backdrop:o.backdrop,keyboard:o.keyboard,backdropClass:o.backdropClass,windowClass:o.windowClass,windowTemplateUrl:o.windowTemplateUrl,size:o.size})},function(e){a.reject(e)}),i.then(function(){e.resolve(!0)},function(){e.reject(!1)}),s},e}]};return g}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(n,r,i){var o=this,a={$setViewValue:angular.noop},t=r.numPages?i(r.numPages).assign:angular.noop;this.init=function(e,t){a=e,this.config=t,a.$render=function(){o.render()},r.itemsPerPage?n.$parent.$watch(i(r.itemsPerPage),function(e){o.itemsPerPage=parseInt(e,10),n.totalPages=o.calculateTotalPages()}):this.itemsPerPage=t.itemsPerPage},this.calculateTotalPages=function(){var e=this.itemsPerPage<1?1:Math.ceil(n.totalItems/this.itemsPerPage);return Math.max(e||0,1)},this.render=function(){n.page=parseInt(a.$viewValue,10)||1},n.selectPage=function(e){n.page!==e&&0<e&&e<=n.totalPages&&(a.$setViewValue(e),a.$render())},n.getText=function(e){return n[e+"Text"]||o.config[e+"Text"]},n.noPrevious=function(){return 1===n.page},n.noNext=function(){return n.page===n.totalPages},n.$watch("totalItems",function(){n.totalPages=o.calculateTotalPages()}),n.$watch("totalPages",function(e){t(n.$parent,e),n.page>e?n.selectPage(e):a.$render()})}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(s,l){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@"},require:["pagination","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(e,t,n,r){function c(e,t,n){return{number:e,text:t,active:n}}var i=r[0],o=r[1];if(o){var d=angular.isDefined(n.maxSize)?e.$parent.$eval(n.maxSize):l.maxSize,p=angular.isDefined(n.rotate)?e.$parent.$eval(n.rotate):l.rotate;e.boundaryLinks=angular.isDefined(n.boundaryLinks)?e.$parent.$eval(n.boundaryLinks):l.boundaryLinks,e.directionLinks=angular.isDefined(n.directionLinks)?e.$parent.$eval(n.directionLinks):l.directionLinks,i.init(o,l),n.maxSize&&e.$parent.$watch(s(n.maxSize),function(e){d=parseInt(e,10),i.render()});var a=i.render;i.render=function(){a(),0<e.page&&e.page<=e.totalPages&&(e.pages=function(e,t){var n=[],r=1,i=t,o=angular.isDefined(d)&&d<t;o&&(p?t<(i=(r=Math.max(e-Math.floor(d/2),1))+d-1)&&(r=(i=t)-d+1):(r=(Math.ceil(e/d)-1)*d+1,i=Math.min(r+d-1,t)));for(var a=r;a<=i;a++){var s=c(a,a,a===e);n.push(s)}if(o&&!p){if(1<r){var l=c(r-1,"...",!1);n.unshift(l)}if(i<t){var u=c(i+1,"...",!1);n.push(u)}}return n}(e.page,e.totalPages))}}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(a){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@"},require:["pager","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(e,t,n,r){var i=r[0],o=r[1];o&&(e.align=angular.isDefined(n.align)?e.$parent.$eval(n.align):a.align,i.init(o,a))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){var s={placement:"top",animation:!0,popupDelay:0},l={mouseenter:"mouseleave",click:"click",focus:"blur"},u={};this.options=function(e){angular.extend(u,e)},this.setTriggers=function(e){angular.extend(l,e)},this.$get=["$window","$compile","$timeout","$document","$position","$interpolate",function(e,o,x,O,T,a){return function(C,S,n){function k(e){var t=e||D.trigger||n;return{show:t,hide:l[t]||t}}var D=angular.extend({},s,u),e=C.replace(/[A-Z]/g,function(e,t){return(t?"-":"")+e.toLowerCase()}),t=a.startSymbol(),r=a.endSymbol(),i="<div "+e+'-popup title="'+t+"title"+r+'" content="'+t+"content"+r+'" placement="'+t+"placement"+r+'" animation="animation" is-open="isOpen"></div>';return{restrict:"EA",compile:function(){var _=o(i);return function(r,t,i){function e(){m.isOpen?o():n()}function n(){var e,t,n;(!g||r.$eval(i[S+"Enable"]))&&(n=i[S+"Placement"],m.placement=angular.isDefined(n)?n:D.placement,e=i[S+"PopupDelay"],t=parseInt(e,10),m.popupDelay=isNaN(t)?D.popupDelay:t,m.popupDelay?p||(p=x(a,m.popupDelay,!1)).then(function(e){e()}):a()())}function o(){r.$apply(function(){s()})}function a(){return p=null,d&&(x.cancel(d),d=null),m.content?(u&&l(),c=m.$new(),(u=_(c,function(e){h?O.find("body").append(e):t.after(e)})).css({top:0,left:0,display:"block"}),m.$digest(),v(),m.isOpen=!0,m.$digest(),v):angular.noop}function s(){m.isOpen=!1,x.cancel(p),p=null,m.animation?d||(d=x(l,500)):l()}function l(){d=null,u&&(u.remove(),u=null),c&&(c.$destroy(),c=null)}var u,c,d,p,h=!!angular.isDefined(D.appendToBody)&&D.appendToBody,f=k(void 0),g=angular.isDefined(i[S+"Enable"]),m=r.$new(!0),v=function(){var e=T.positionElements(t,u,m.placement,h);e.top+="px",e.left+="px",u.css(e)};m.isOpen=!1,i.$observe(C,function(e){!(m.content=e)&&m.isOpen&&s()}),i.$observe(S+"Title",function(e){m.title=e});var y,w=function(){t.unbind(f.show,n),t.unbind(f.hide,o)};y=i[S+"Trigger"],w(),(f=k(y)).show===f.hide?t.bind(f.show,e):(t.bind(f.show,n),t.bind(f.hide,o));var b=r.$eval(i[S+"Animation"]);m.animation=angular.isDefined(b)?!!b:D.animation;var $=r.$eval(i[S+"AppendToBody"]);(h=angular.isDefined($)?$:h)&&r.$on("$locationChangeSuccess",function(){m.isOpen&&s()}),r.$on("$destroy",function(){x.cancel(d),x.cancel(p),w(),l(),m=null})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(e){return e("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(e){return e("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(e){return e("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig",function(n,e,t){var r=this,i=angular.isDefined(e.animate)?n.$parent.$eval(e.animate):t.animate;this.bars=[],n.max=angular.isDefined(e.max)?n.$parent.$eval(e.max):t.max,this.addBar=function(t,e){i||e.css({transition:"none"}),this.bars.push(t),t.$watch("value",function(e){t.percent=+(100*e/n.max).toFixed(2)}),t.$on("$destroy",function(){e=null,r.removeBar(t)})},this.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1)}}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{},templateUrl:"template/progressbar/progress.html"}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(e,t,n,r){r.addBar(e,t)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(e,t,n,r){r.addBar(e,angular.element(t.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","ratingConfig",function(n,r,i){var o={$setViewValue:angular.noop};this.init=function(e){(o=e).$render=this.render,this.stateOn=angular.isDefined(r.stateOn)?n.$parent.$eval(r.stateOn):i.stateOn,this.stateOff=angular.isDefined(r.stateOff)?n.$parent.$eval(r.stateOff):i.stateOff;var t=angular.isDefined(r.ratingStates)?n.$parent.$eval(r.ratingStates):new Array(angular.isDefined(r.max)?n.$parent.$eval(r.max):i.max);n.range=this.buildTemplateObjects(t)},this.buildTemplateObjects=function(e){for(var t=0,n=e.length;t<n;t++)e[t]=angular.extend({index:t},{stateOn:this.stateOn,stateOff:this.stateOff},e[t]);return e},n.rate=function(e){!n.readonly&&0<=e&&e<=n.range.length&&(o.$setViewValue(e),o.$render())},n.enter=function(e){n.readonly||(n.value=e),n.onHover({value:e})},n.reset=function(){n.value=o.$viewValue,n.onLeave()},n.onKeydown=function(e){/(37|38|39|40)/.test(e.which)&&(e.preventDefault(),e.stopPropagation(),n.rate(n.value+(38===e.which||39===e.which?1:-1)))},this.render=function(){n.value=o.$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(e,t,n,r){var i=r[0],o=r[1];o&&i.init(o)}}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(e){var r,i=this,o=i.tabs=e.tabs=[];i.select=function(t){angular.forEach(o,function(e){e.active&&e!==t&&(e.active=!1,e.onDeselect())}),t.active=!0,t.onSelect()},i.addTab=function(e){o.push(e),1===o.length?e.active=!0:e.active&&i.select(e)},i.removeTab=function(e){var t=o.indexOf(e);if(e.active&&1<o.length&&!r){var n=t==o.length-1?t-1:t+1;i.select(o[n])}o.splice(t,1)},e.$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(e,t,n){e.vertical=!!angular.isDefined(n.vertical)&&e.$parent.$eval(n.vertical),e.justified=!!angular.isDefined(n.justified)&&e.$parent.$eval(n.justified)}}}).directive("tab",["$parse",function(o){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(e,t,i){return function(t,e,n,r){t.$watch("active",function(e){e&&r.select(t)}),t.disabled=!1,n.disabled&&t.$parent.$watch(o(n.disabled),function(e){t.disabled=!!e}),t.select=function(){t.disabled||(t.active=!0)},r.addTab(t),t.$on("$destroy",function(){r.removeTab(t)}),t.$transcludeFn=i}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(e,t){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}]).directive("tabContentTransclude",function(){return{restrict:"A",require:"^tabset",link:function(e,n,t){var r=e.$eval(t.tabContentTransclude);r.$transcludeFn(r.$parent,function(e){angular.forEach(e,function(e){var t;(t=e).tagName&&(t.hasAttribute("tab-heading")||t.hasAttribute("data-tab-heading")||"tab-heading"===t.tagName.toLowerCase()||"data-tab-heading"===t.tagName.toLowerCase())?r.headingElement=e:n.append(e)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(i,o,e,t,n,a){function r(){var e=parseInt(i.hours,10);return(i.showMeridian?0<e&&e<13:0<=e&&e<24)?(i.showMeridian&&(12===e&&(e=0),i.meridian===g[1]&&(e+=12)),e):void 0}function s(){var e=parseInt(i.minutes,10);return 0<=e&&e<60?e:void 0}function l(e){return angular.isDefined(e)&&e.toString().length<2?"0"+e:e}function u(e){c(),f.$setViewValue(new Date(h)),d(e)}function c(){f.$setValidity("time",!0),i.invalidHours=!1,i.invalidMinutes=!1}function d(e){var t=h.getHours(),n=h.getMinutes();i.showMeridian&&(t=0===t||12===t?12:t%12),i.hours="h"===e?t:l(t),i.minutes="m"===e?n:l(n),i.meridian=h.getHours()<12?g[0]:g[1]}function p(e){var t=new Date(h.getTime()+6e4*e);h.setHours(t.getHours(),t.getMinutes()),u()}var h=new Date,f={$setViewValue:angular.noop},g=angular.isDefined(o.meridians)?i.$parent.$eval(o.meridians):a.meridians||n.DATETIME_FORMATS.AMPMS;this.init=function(e,t){(f=e).$render=this.render;var n=t.eq(0),r=t.eq(1);(angular.isDefined(o.mousewheel)?i.$parent.$eval(o.mousewheel):a.mousewheel)&&this.setupMousewheelEvents(n,r),i.readonlyInput=angular.isDefined(o.readonlyInput)?i.$parent.$eval(o.readonlyInput):a.readonlyInput,this.setupInputEvents(n,r)};var m=a.hourStep;o.hourStep&&i.$parent.$watch(e(o.hourStep),function(e){m=parseInt(e,10)});var v=a.minuteStep;o.minuteStep&&i.$parent.$watch(e(o.minuteStep),function(e){v=parseInt(e,10)}),i.showMeridian=a.showMeridian,o.showMeridian&&i.$parent.$watch(e(o.showMeridian),function(e){if(i.showMeridian=!!e,f.$error.time){var t=r(),n=s();angular.isDefined(t)&&angular.isDefined(n)&&(h.setHours(t),u())}else d()}),this.setupMousewheelEvents=function(e,t){var n=function(e){e.originalEvent&&(e=e.originalEvent);var t=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||0<t};e.bind("mousewheel wheel",function(e){i.$apply(n(e)?i.incrementHours():i.decrementHours()),e.preventDefault()}),t.bind("mousewheel wheel",function(e){i.$apply(n(e)?i.incrementMinutes():i.decrementMinutes()),e.preventDefault()})},this.setupInputEvents=function(e,t){if(i.readonlyInput)return i.updateHours=angular.noop,void(i.updateMinutes=angular.noop);var n=function(e,t){f.$setViewValue(null),f.$setValidity("time",!1),angular.isDefined(e)&&(i.invalidHours=e),angular.isDefined(t)&&(i.invalidMinutes=t)};i.updateHours=function(){var e=r();angular.isDefined(e)?(h.setHours(e),u("h")):n(!0)},e.bind("blur",function(){!i.invalidHours&&i.hours<10&&i.$apply(function(){i.hours=l(i.hours)})}),i.updateMinutes=function(){var e=s();angular.isDefined(e)?(h.setMinutes(e),u("m")):n(void 0,!0)},t.bind("blur",function(){!i.invalidMinutes&&i.minutes<10&&i.$apply(function(){i.minutes=l(i.minutes)})})},this.render=function(){var e=f.$modelValue?new Date(f.$modelValue):null;isNaN(e)?(f.$setValidity("time",!1),t.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.')):(e&&(h=e),c(),d())},i.incrementHours=function(){p(60*m)},i.decrementHours=function(){p(60*-m)},i.incrementMinutes=function(){p(v)},i.decrementMinutes=function(){p(-v)},i.toggleMeridian=function(){p(720*(h.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(e,t,n,r){var i=r[0],o=r[1];o&&i.init(o,t.find("input"))}}}),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(n){var r=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(e){var t=e.match(r);if(!t)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+e+'".');return{itemName:t[3],source:n(t[4]),viewMapper:n(t[2]||t[1]),modelMapper:n(t[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(k,D,x,O,T,E,A){var P=[9,13,27,38,40];return{require:"ngModel",link:function(o,a,e,s){var l,n=o.$eval(e.typeaheadMinLength)||1,r=o.$eval(e.typeaheadWaitMs)||0,i=!1!==o.$eval(e.typeaheadEditable),u=D(e.typeaheadLoading).assign||angular.noop,c=D(e.typeaheadOnSelect),d=e.typeaheadInputFormatter?D(e.typeaheadInputFormatter):void 0,p=!!e.typeaheadAppendToBody&&o.$eval(e.typeaheadAppendToBody),h=!1!==o.$eval(e.typeaheadFocusFirst),f=D(e.ngModel).assign,g=A.parse(e.typeahead),m=o.$new();o.$on("$destroy",function(){m.$destroy()});var t="typeahead-"+m.$id+"-"+Math.floor(1e4*Math.random());a.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":t});var v=angular.element("<div typeahead-popup></div>");v.attr({id:t,matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(e.typeaheadTemplateUrl)&&v.attr("template-url",e.typeaheadTemplateUrl);var y=function(){m.matches=[],m.activeIdx=-1,a.attr("aria-expanded",!1)},w=function(e){return t+"-option-"+e};m.$watch("activeIdx",function(e){e<0?a.removeAttr("aria-activedescendant"):a.attr("aria-activedescendant",w(e))});var b=function(r){var i={$viewValue:r};u(o,!0),x.when(g.source(o,i)).then(function(e){var t=r===s.$viewValue;if(t&&l)if(0<e.length){m.activeIdx=h?0:-1;for(var n=m.matches.length=0;n<e.length;n++)i[g.itemName]=e[n],m.matches.push({id:w(n),label:g.viewMapper(m,i),model:e[n]});m.query=r,m.position=p?E.offset(a):E.position(a),m.position.top=m.position.top+a.prop("offsetHeight"),a.attr("aria-expanded",!0)}else y();t&&u(o,!1)},function(){y(),u(o,!1)})};y(),m.query=void 0;var $,_=function(){$&&O.cancel($)};s.$parsers.unshift(function(e){return l=!0,e&&e.length>=n?0<r?(_(),t=e,$=O(function(){b(t)},r)):b(e):(u(o,!1),_(),y()),i?e:e?void s.$setValidity("editable",!1):(s.$setValidity("editable",!0),e);var t}),s.$formatters.push(function(e){var t,n={};return d?(n.$model=e,d(o,n)):(n[g.itemName]=e,t=g.viewMapper(o,n),n[g.itemName]=void 0,t!==g.viewMapper(o,n)?t:e)}),m.select=function(e){var t,n,r={};r[g.itemName]=n=m.matches[e].model,t=g.modelMapper(o,r),f(o,t),s.$setValidity("editable",!0),c(o,{$item:n,$model:t,$label:g.viewMapper(o,r)}),y(),O(function(){a[0].focus()},0,!1)},a.bind("keydown",function(e){0!==m.matches.length&&-1!==P.indexOf(e.which)&&(-1!=m.activeIdx||13!==e.which&&9!==e.which)&&(e.preventDefault(),40===e.which?(m.activeIdx=(m.activeIdx+1)%m.matches.length,m.$digest()):38===e.which?(m.activeIdx=(0<m.activeIdx?m.activeIdx:m.matches.length)-1,m.$digest()):13===e.which||9===e.which?m.$apply(function(){m.select(m.activeIdx)}):27===e.which&&(e.stopPropagation(),y(),m.$digest()))}),a.bind("blur",function(){l=!1});var C=function(e){a[0]!==e.target&&(y(),m.$digest())};T.bind("click",C),o.$on("$destroy",function(){T.unbind("click",C),p&&S.remove()});var S=k(v)(m);p?T.find("body").append(S):a.after(S)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(t,e,n){t.templateUrl=n.templateUrl,t.isOpen=function(){return 0<t.matches.length},t.isActive=function(e){return t.active==e},t.selectActive=function(e){t.active=e},t.selectMatch=function(e){t.select({activeIdx:e})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(i,o,a,s){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(t,n,e){var r=s(e.templateUrl)(t.$parent)||"template/typeahead/typeahead-match.html";i.get(r,{cache:o}).success(function(e){n.replaceWith(a(e.trim())(t))})}}}]).filter("typeaheadHighlight",function(){return function(e,t){return t?(""+e).replace(new RegExp(t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"gi"),"<strong>$&</strong>"):e}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion-group.html",'<div class="panel panel-default">\n <div class="panel-heading">\n <h4 class="panel-title">\n <a href 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="!isOpen">\n\t <div class="panel-body" ng-transclude></div>\n </div>\n</div>\n')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion.html",'<div class="panel-group" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(e){e.put("template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissable\' : null]" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close()">\n <span aria-hidden="true">×</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(e){e.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 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(e){e.put("template/carousel/slide.html","<div ng-class=\"{\n 'active': leaving || (active && !entering),\n 'prev': (next || active) && direction=='prev',\n 'next': (next || active) && direction=='next',\n 'right': direction=='prev',\n 'left': direction=='next'\n }\" class=\"item text-center\" ng-transclude></div>\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(e){e.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(e){e.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()" 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-show="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-show="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}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="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(e){e.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()" 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}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="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(e){e.put("template/datepicker/popup.html",'<ul class="dropdown-menu" ng-style="{display: (isOpen && \'block\') || \'none\', top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)">\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\')">{{ 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(e){e.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()" 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}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="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(e){e.put("template/modal/backdrop.html",'<div class="modal-backdrop fade {{ backdropClass }}"\n ng-class="{in: animate}"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(e){e.put("template/modal/window.html",'<div tabindex="-1" role="dialog" class="modal fade" ng-class="{in: animate}" ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}" ng-click="close($event)">\n <div class="modal-dialog" ng-class="{\'modal-sm\': size == \'sm\', \'modal-lg\': size == \'lg\'}"><div class="modal-content" modal-transclude></div></div>\n</div>')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious(), previous: align}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext(), next: align}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n</ul>')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="boundaryLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(1)">{{getText(\'first\')}}</a></li>\n <li ng-if="directionLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active}"><a href ng-click="selectPage(page.number)">{{page.text}}</a></li>\n <li ng-if="directionLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n <li ng-if="boundaryLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(totalPages)">{{getText(\'last\')}}</a></li>\n</ul>')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-html-unsafe-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\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(e){e.put("template/tooltip/tooltip-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(e){e.put("template/popover/popover.html",'<div class="popover {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-show="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(e){e.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 + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/progress.html",'<div class="progress" ng-transclude></div>')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(e){e.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 + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>\n</div>')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(e){e.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 <i ng-repeat="r in range track by $index" 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\')">\n <span class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n </i>\n</span>')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(e){e.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(e){e.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(e){e.put("template/timepicker/timepicker.html",'<table>\n\t<tbody>\n\t\t<tr class="text-center">\n\t\t\t<td><a ng-click="incrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n\t\t\t<td> </td>\n\t\t\t<td><a ng-click="incrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n\t\t\t<td ng-show="showMeridian"></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidHours}">\n\t\t\t\t<input type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-mousewheel="incrementHours()" ng-readonly="readonlyInput" maxlength="2">\n\t\t\t</td>\n\t\t\t<td>:</td>\n\t\t\t<td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidMinutes}">\n\t\t\t\t<input type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2">\n\t\t\t</td>\n\t\t\t<td ng-show="showMeridian"><button type="button" class="btn btn-default text-center" ng-click="toggleMeridian()">{{meridian}}</button></td>\n\t\t</tr>\n\t\t<tr class="text-center">\n\t\t\t<td><a ng-click="decrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n\t\t\t<td> </td>\n\t\t\t<td><a ng-click="decrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n\t\t\t<td ng-show="showMeridian"></td>\n\t\t</tr>\n\t</tbody>\n</table>\n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-match.html",'<a tabindex="-1" bind-html-unsafe="match.label | typeaheadHighlight:query"></a>')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen()" 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')}]),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function p(){return e.apply(null,arguments)}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function l(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function u(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function g(e,t){for(var n in t)f(t,n)&&(e[n]=t[n]);return f(t,"toString")&&(e.toString=t.toString),f(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,n,r){return Dt(e,t,n,r,!0).utc()}function v(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function y(e){if(null==e._isValid){var t=v(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function w(e){var t=m(NaN);return null!=e?g(v(t),e):v(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var o=p.momentProperties=[];function b(e,t){var n,r,i;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=v(t)),u(t._locale)||(e._locale=t._locale),0<o.length)for(n=0;n<o.length;n++)u(i=t[r=o[n]])||(e[r]=i);return e}var t=!1;function $(e){b(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,p.updateOffset(this),t=!1)}function _(e){return e instanceof $||null!=e&&null!=e._isAMomentObject}function C(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function S(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=C(t)),n}function a(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&S(e[r])!==S(t[r]))&&a++;return a+o}function k(e){!1===p.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(i,o){var a=!0;return g(function(){if(null!=p.deprecationHandler&&p.deprecationHandler(null,i),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e="","object"==typeof arguments[n]){for(var r in e+="\n["+n+"] ",arguments[0])e+=r+": "+arguments[0][r]+", ";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}k(i+"\nArguments: "+Array.prototype.slice.call(t).join("")+"\n"+(new Error).stack),a=!1}return o.apply(this,arguments)},o)}var r,D={};function x(e,t){null!=p.deprecationHandler&&p.deprecationHandler(e,t),D[e]||(k(t),D[e]=!0)}function O(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function T(e,t){var n,r=g({},e);for(n in t)f(t,n)&&(l(e[n])&&l(t[n])?(r[n]={},g(r[n],e[n]),g(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)f(e,n)&&!f(t,n)&&l(e[n])&&(r[n]=g({},r[n]));return r}function E(e){null!=e&&this.set(e)}p.suppressDeprecationWarnings=!1,p.deprecationHandler=null,r=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)f(e,t)&&n.push(t);return n};var A={};function P(e,t){var n=e.toLowerCase();A[n]=A[n+"s"]=A[t]=e}function M(e){return"string"==typeof e?A[e]||A[e.toLowerCase()]:void 0}function R(e){var t,n,r={};for(n in e)f(e,n)&&(t=M(n))&&(r[t]=e[n]);return r}var I={};function V(e,t){I[e]=t}function F(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var L=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,j=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,H={},Y={};function N(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(Y[e]=i),t&&(Y[t[0]]=function(){return F(i.apply(this,arguments),t[1],t[2])}),n&&(Y[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function q(e,t){return e.isValid()?(t=U(t,e.localeData()),H[t]=H[t]||function(r){var e,i,t,o=r.match(L);for(e=0,i=o.length;e<i;e++)Y[o[e]]?o[e]=Y[o[e]]:o[e]=(t=o[e]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(e){var t,n="";for(t=0;t<i;t++)n+=O(o[t])?o[t].call(e,r):o[t];return n}}(t),H[t](e)):e.localeData().invalidDate()}function U(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(j.lastIndex=0;0<=n&&j.test(e);)e=e.replace(j,r),j.lastIndex=0,n-=1;return e}var z=/\d/,B=/\d\d/,W=/\d{3}/,G=/\d{4}/,K=/[+-]?\d{6}/,Q=/\d\d?/,Z=/\d\d\d\d?/,X=/\d\d\d\d\d\d?/,J=/\d{1,3}/,ee=/\d{1,4}/,te=/[+-]?\d{1,6}/,ne=/\d+/,re=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,oe=/Z|[+-]\d\d(?::?\d\d)?/gi,ae=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,se={};function le(e,n,r){se[e]=O(n)?n:function(e,t){return e&&r?r:n}}function ue(e,t){return f(se,e)?se[e](t._strict,t._locale):new RegExp(ce(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})))}function ce(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var de={};function pe(e,n){var t,r=n;for("string"==typeof e&&(e=[e]),c(n)&&(r=function(e,t){t[n]=S(e)}),t=0;t<e.length;t++)de[e[t]]=r}function he(e,i){pe(e,function(e,t,n,r){n._w=n._w||{},i(e,n._w,n,r)})}var fe=0,ge=1,me=2,ve=3,ye=4,we=5,be=6,$e=7,_e=8;function Ce(e){return Se(e)?366:365}function Se(e){return e%4==0&&e%100!=0||e%400==0}N("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),N(0,["YY",2],0,function(){return this.year()%100}),N(0,["YYYY",4],0,"year"),N(0,["YYYYY",5],0,"year"),N(0,["YYYYYY",6,!0],0,"year"),P("year","y"),V("year",1),le("Y",re),le("YY",Q,B),le("YYYY",ee,G),le("YYYYY",te,K),le("YYYYYY",te,K),pe(["YYYYY","YYYYYY"],fe),pe("YYYY",function(e,t){t[fe]=2===e.length?p.parseTwoDigitYear(e):S(e)}),pe("YY",function(e,t){t[fe]=p.parseTwoDigitYear(e)}),pe("Y",function(e,t){t[fe]=parseInt(e,10)}),p.parseTwoDigitYear=function(e){return S(e)+(68<S(e)?1900:2e3)};var ke,De=xe("FullYear",!0);function xe(t,n){return function(e){return null!=e?(Te(this,t,e),p.updateOffset(this,n),this):Oe(this,t)}}function Oe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Te(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Se(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ee(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ee(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?Se(e)?29:28:31-r%7%2}ke=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},N("M",["MM",2],"Mo",function(){return this.month()+1}),N("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),N("MMMM",0,0,function(e){return this.localeData().months(this,e)}),P("month","M"),V("month",8),le("M",Q),le("MM",Q,B),le("MMM",function(e,t){return t.monthsShortRegex(e)}),le("MMMM",function(e,t){return t.monthsRegex(e)}),pe(["M","MM"],function(e,t){t[ge]=S(e)-1}),pe(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[ge]=i:v(n).invalidMonth=e});var Ae=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Pe="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Me="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Re(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=S(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Ee(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ie(e){return null!=e?(Re(this,e),p.updateOffset(this,!0),this):Oe(this,"Month")}var Ve=ae;var Fe=ae;function Le(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],o=[];for(t=0;t<12;t++)n=m([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]=ce(r[t]),i[t]=ce(i[t]);for(t=0;t<24;t++)o[t]=ce(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function je(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function He(e,t,n){var r=7+t-n;return-((7+je(e,0,r).getUTCDay()-t)%7)+r-1}function Ye(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+He(e,r,i);return a=s<=0?Ce(o=e-1)+s:s>Ce(e)?(o=e+1,s-Ce(e)):(o=e,s),{year:o,dayOfYear:a}}function Ne(e,t,n){var r,i,o=He(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+qe(i=e.year()-1,t,n):a>qe(e.year(),t,n)?(r=a-qe(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function qe(e,t,n){var r=He(e,t,n),i=He(e+1,t,n);return(Ce(e)-r+i)/7}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),V("week",5),V("isoWeek",5),le("w",Q),le("ww",Q,B),le("W",Q),le("WW",Q,B),he(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=S(e)});N("d",0,"do","day"),N("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),N("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),N("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),V("day",11),V("weekday",11),V("isoWeekday",11),le("d",Q),le("e",Q),le("E",Q),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),he(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:v(n).invalidWeekday=e}),he(["d","e","E"],function(e,t,n,r){t[r]=S(e)});var Ue="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Be="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var We=ae;var Ge=ae;var Ke=ae;function Qe(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),l.push(o),u.push(r),u.push(i),u.push(o);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=ce(s[t]),l[t]=ce(l[t]),u[t]=ce(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ze(){return this.hours()%12||12}function Xe(e,t){N(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Je(e,t){return t._meridiemParse}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,Ze),N("k",["kk",2],0,function(){return this.hours()||24}),N("hmm",0,0,function(){return""+Ze.apply(this)+F(this.minutes(),2)}),N("hmmss",0,0,function(){return""+Ze.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),N("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),N("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),P("hour","h"),V("hour",13),le("a",Je),le("A",Je),le("H",Q),le("h",Q),le("k",Q),le("HH",Q,B),le("hh",Q,B),le("kk",Q,B),le("hmm",Z),le("hmmss",X),le("Hmm",Z),le("Hmmss",X),pe(["H","HH"],ve),pe(["k","kk"],function(e,t,n){var r=S(e);t[ve]=24===r?0:r}),pe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),pe(["h","hh"],function(e,t,n){t[ve]=S(e),v(n).bigHour=!0}),pe("hmm",function(e,t,n){var r=e.length-2;t[ve]=S(e.substr(0,r)),t[ye]=S(e.substr(r)),v(n).bigHour=!0}),pe("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ve]=S(e.substr(0,r)),t[ye]=S(e.substr(r,2)),t[we]=S(e.substr(i)),v(n).bigHour=!0}),pe("Hmm",function(e,t,n){var r=e.length-2;t[ve]=S(e.substr(0,r)),t[ye]=S(e.substr(r))}),pe("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ve]=S(e.substr(0,r)),t[ye]=S(e.substr(r,2)),t[we]=S(e.substr(i))});var et,tt=xe("Hours",!0),nt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Pe,monthsShort:Me,week:{dow:0,doy:6},weekdays:Ue,weekdaysMin:Be,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},rt={},it={};function ot(e){return e?e.toLowerCase().replace("_","-"):e}function at(e){var t=null;if(!rt[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=et._abbr,require("./locale/"+e),st(t)}catch(e){}return rt[e]}function st(e,t){var n;return e&&((n=u(t)?ut(e):lt(e,t))?et=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),et._abbr}function lt(e,t){if(null===t)return delete rt[e],null;var n,r=nt;if(t.abbr=e,null!=rt[e])x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=rt[e]._config;else if(null!=t.parentLocale)if(null!=rt[t.parentLocale])r=rt[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;r=n._config}return rt[e]=new E(T(r,t)),it[e]&&it[e].forEach(function(e){lt(e.name,e.config)}),st(e),rt[e]}function ut(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!s(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o<e.length;){for(t=(i=ot(e[o]).split("-")).length,n=(n=ot(e[o+1]))?n.split("-"):null;0<t;){if(r=at(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&a(i,n,!0)>=t-1)break;t--}o++}return et}(e)}function ct(e){var t,n=e._a;return n&&-2===v(e).overflow&&(t=n[ge]<0||11<n[ge]?ge:n[me]<1||n[me]>Ee(n[fe],n[ge])?me:n[ve]<0||24<n[ve]||24===n[ve]&&(0!==n[ye]||0!==n[we]||0!==n[be])?ve:n[ye]<0||59<n[ye]?ye:n[we]<0||59<n[we]?we:n[be]<0||999<n[be]?be:-1,v(e)._overflowDayOfYear&&(t<fe||me<t)&&(t=me),v(e)._overflowWeeks&&-1===t&&(t=$e),v(e)._overflowWeekday&&-1===t&&(t=_e),v(e).overflow=t),e}function dt(e,t,n){return null!=e?e:null!=t?t:n}function pt(e){var t,n,r,i,o,a=[];if(!e._d){var s,l;for(s=e,l=new Date(p.now()),r=s._useUTC?[l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()]:[l.getFullYear(),l.getMonth(),l.getDate()],e._w&&null==e._a[me]&&null==e._a[ge]&&function(e){var t,n,r,i,o,a,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,a=4,n=dt(t.GG,e._a[fe],Ne(xt(),1,4).year),r=dt(t.W,1),((i=dt(t.E,1))<1||7<i)&&(l=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var u=Ne(xt(),o,a);n=dt(t.gg,e._a[fe],u.year),r=dt(t.w,u.week),null!=t.d?((i=t.d)<0||6<i)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||6<t.e)&&(l=!0)):i=o}r<1||r>qe(n,o,a)?v(e)._overflowWeeks=!0:null!=l?v(e)._overflowWeekday=!0:(s=Ye(n,r,i,o,a),e._a[fe]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=dt(e._a[fe],r[fe]),(e._dayOfYear>Ce(o)||0===e._dayOfYear)&&(v(e)._overflowDayOfYear=!0),n=je(o,0,e._dayOfYear),e._a[ge]=n.getUTCMonth(),e._a[me]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ve]&&0===e._a[ye]&&0===e._a[we]&&0===e._a[be]&&(e._nextDay=!0,e._a[ve]=0),e._d=(e._useUTC?je:function(e,t,n,r,i,o,a){var s=new Date(e,t,n,r,i,o,a);return e<100&&0<=e&&isFinite(s.getFullYear())&&s.setFullYear(e),s}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ve]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(v(e).weekdayMismatch=!0)}}var ht=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/Z|[+-]\d\d(?::?\d\d)?/,mt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],vt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],yt=/^\/?Date\((\-?\d+)/i;function wt(e){var t,n,r,i,o,a,s=e._i,l=ht.exec(s)||ft.exec(s);if(l){for(v(e).iso=!0,t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(l[1])){i=mt[t][0],r=!1!==mt[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=vt.length;t<n;t++)if(vt[t][1].exec(l[3])){o=(l[2]||" ")+vt[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(l[4]){if(!gt.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),St(e)}else e._isValid=!1}var bt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function $t(e,t,n,r,i,o){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Me.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}var _t={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ct(e){var t,n,r,i=bt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var o=$t(i[4],i[3],i[2],i[5],i[6],i[7]);if(t=i[1],n=o,r=e,t&&ze.indexOf(t)!==new Date(n[0],n[1],n[2]).getDay()&&(v(r).weekdayMismatch=!0,!(r._isValid=!1)))return;e._a=o,e._tzm=function(e,t,n){if(e)return _t[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(i[8],i[9],i[10]),e._d=je.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),v(e).rfc2822=!0}else e._isValid=!1}function St(e){if(e._f!==p.ISO_8601)if(e._f!==p.RFC_2822){e._a=[],v(e).empty=!0;var t,n,r,i,o,a,s,l,u=""+e._i,c=u.length,d=0;for(r=U(e._f,e._locale).match(L)||[],t=0;t<r.length;t++)i=r[t],(n=(u.match(ue(i,e))||[])[0])&&(0<(o=u.substr(0,u.indexOf(n))).length&&v(e).unusedInput.push(o),u=u.slice(u.indexOf(n)+n.length),d+=n.length),Y[i]?(n?v(e).empty=!1:v(e).unusedTokens.push(i),a=i,l=e,null!=(s=n)&&f(de,a)&&de[a](s,l._a,l,a)):e._strict&&!n&&v(e).unusedTokens.push(i);v(e).charsLeftOver=c-d,0<u.length&&v(e).unusedInput.push(u),e._a[ve]<=12&&!0===v(e).bigHour&&0<e._a[ve]&&(v(e).bigHour=void 0),v(e).parsedDateParts=e._a.slice(0),v(e).meridiem=e._meridiem,e._a[ve]=function(e,t,n){var r;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0)),t)}(e._locale,e._a[ve],e._meridiem),pt(e),ct(e)}else Ct(e);else wt(e)}function kt(e){var t,n,r,i,o=e._i,a=e._f;return e._locale=e._locale||ut(e._l),null===o||void 0===a&&""===o?w({nullInput:!0}):("string"==typeof o&&(e._i=o=e._locale.preparse(o)),_(o)?new $(ct(o)):(d(o)?e._d=o:s(a)?function(e){var t,n,r,i,o;if(0===e._f.length)return v(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)o=0,t=b({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],St(t),y(t)&&(o+=v(t).charsLeftOver,o+=10*v(t).unusedTokens.length,v(t).score=o,(null==r||o<r)&&(r=o,n=t));g(e,n||t)}(e):a?St(e):u(n=(t=e)._i)?t._d=new Date(p.now()):d(n)?t._d=new Date(n.valueOf()):"string"==typeof n?(r=t,null===(i=yt.exec(r._i))?(wt(r),!1===r._isValid&&(delete r._isValid,Ct(r),!1===r._isValid&&(delete r._isValid,p.createFromInputFallback(r)))):r._d=new Date(+i[1])):s(n)?(t._a=h(n.slice(0),function(e){return parseInt(e,10)}),pt(t)):l(n)?function(e){if(!e._d){var t=R(e._i);e._a=h([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),pt(e)}}(t):c(n)?t._d=new Date(n):p.createFromInputFallback(t),y(e)||(e._d=null),e))}function Dt(e,t,n,r,i){var o,a={};return!0!==n&&!1!==n||(r=n,n=void 0),(l(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||s(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=r,(o=new $(ct(kt(a))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function xt(e,t,n,r){return Dt(e,t,n,r,!1)}p.createFromInputFallback=n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),p.ISO_8601=function(){},p.RFC_2822=function(){};var Ot=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=xt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:w()}),Tt=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=xt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:w()});function Et(e,t){var n,r;if(1===t.length&&s(t[0])&&(t=t[0]),!t.length)return xt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var At=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Pt(e){var t=R(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||0,a=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===ke.call(At,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<At.length;++r)if(e[At[r]]){if(n)return!1;parseFloat(e[At[r]])!==S(e[At[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=ut(),this._bubble()}function Mt(e){return e instanceof Pt}function Rt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function It(e,n){N(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+F(~~(e/60),2)+n+F(~~e%60,2)})}It("Z",":"),It("ZZ",""),le("Z",oe),le("ZZ",oe),pe(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ft(oe,e)});var Vt=/([\+\-]|\d\d)/gi;function Ft(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Vt)||["-",0,0],i=60*r[1]+S(r[2]);return 0===i?0:"+"===r[0]?i:-i}function Lt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(_(e)||d(e)?e.valueOf():xt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),p.updateOffset(n,!1),n):xt(e).local()}function jt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Ht(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}p.updateOffset=function(){};var Yt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Nt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function qt(e,t){var n,r,i,o=e,a=null;return Mt(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:c(e)?(o={},t?o[t]=e:o.milliseconds=e):(a=Yt.exec(e))?(n="-"===a[1]?-1:1,o={y:0,d:S(a[me])*n,h:S(a[ve])*n,m:S(a[ye])*n,s:S(a[we])*n,ms:S(Rt(1e3*a[be]))*n}):(a=Nt.exec(e))?(n="-"===a[1]?-1:(a[1],1),o={y:Ut(a[2],n),M:Ut(a[3],n),w:Ut(a[4],n),d:Ut(a[5],n),h:Ut(a[6],n),m:Ut(a[7],n),s:Ut(a[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Lt(t,e),e.isBefore(t)?n=zt(e,t):((n=zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(xt(o.from),xt(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),r=new Pt(o),Mt(e)&&f(e,"_locale")&&(r._locale=e._locale),r}function Ut(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function zt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Bt(r,i){return function(e,t){var n;return null===t||isNaN(+t)||(x(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),Wt(this,qt(e="string"==typeof e?+e:e,t),r),this}}function Wt(e,t,n,r){var i=t._milliseconds,o=Rt(t._days),a=Rt(t._months);e.isValid()&&(r=null==r||r,a&&Re(e,Oe(e,"Month")+a*n),o&&Te(e,"Date",Oe(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&p.updateOffset(e,o||a))}qt.fn=Pt.prototype,qt.invalid=function(){return qt(NaN)};var Gt=Bt(1,"add"),Kt=Bt(-1,"subtract");function Qt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Zt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ut(e))&&(this._locale=t),this)}p.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",p.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Xt=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Jt(){return this._locale}function en(e,t){N(0,[e,e.length],0,t)}function tn(e,t,n,r,i){var o;return null==e?Ne(this,r,i).year:((o=qe(e,r,i))<t&&(t=o),function(e,t,n,r,i){var o=Ye(e,t,n,r,i),a=je(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,r,i))}N(0,["gg",2],0,function(){return this.weekYear()%100}),N(0,["GG",2],0,function(){return this.isoWeekYear()%100}),en("gggg","weekYear"),en("ggggg","weekYear"),en("GGGG","isoWeekYear"),en("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),V("weekYear",1),V("isoWeekYear",1),le("G",re),le("g",re),le("GG",Q,B),le("gg",Q,B),le("GGGG",ee,G),le("gggg",ee,G),le("GGGGG",te,K),le("ggggg",te,K),he(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=S(e)}),he(["gg","GG"],function(e,t,n,r){t[r]=p.parseTwoDigitYear(e)}),N("Q",0,"Qo","quarter"),P("quarter","Q"),V("quarter",7),le("Q",z),pe("Q",function(e,t){t[ge]=3*(S(e)-1)}),N("D",["DD",2],"Do","date"),P("date","D"),V("date",9),le("D",Q),le("DD",Q,B),le("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),pe(["D","DD"],me),pe("Do",function(e,t){t[me]=S(e.match(Q)[0])});var nn=xe("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),V("dayOfYear",4),le("DDD",J),le("DDDD",W),pe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=S(e)}),N("m",["mm",2],0,"minute"),P("minute","m"),V("minute",14),le("m",Q),le("mm",Q,B),pe(["m","mm"],ye);var rn=xe("Minutes",!1);N("s",["ss",2],0,"second"),P("second","s"),V("second",15),le("s",Q),le("ss",Q,B),pe(["s","ss"],we);var on,an=xe("Seconds",!1);for(N("S",0,0,function(){return~~(this.millisecond()/100)}),N(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,function(){return 10*this.millisecond()}),N(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),N(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),N(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),N(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),N(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),P("millisecond","ms"),V("millisecond",16),le("S",J,z),le("SS",J,B),le("SSS",J,W),on="SSSS";on.length<=9;on+="S")le(on,ne);function sn(e,t){t[be]=S(1e3*("0."+e))}for(on="S";on.length<=9;on+="S")pe(on,sn);var ln=xe("Milliseconds",!1);N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");var un=$.prototype;function cn(e){return e}un.add=Gt,un.calendar=function(e,t){var n=e||xt(),r=Lt(n,this).startOf("day"),i=p.calendarFormat(this,r)||"sameElse",o=t&&(O(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,xt(n)))},un.clone=function(){return new $(this)},un.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=Lt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=M(t)){case"year":o=Qt(this,r)/12;break;case"month":o=Qt(this,r);break;case"quarter":o=Qt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:C(o)},un.endOf=function(e){return void 0===(e=M(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},un.format=function(e){e||(e=this.isUtc()?p.defaultFormatUtc:p.defaultFormat);var t=q(this,e);return this.localeData().postformat(t)},un.from=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||xt(e).isValid())?qt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},un.fromNow=function(e){return this.from(xt(),e)},un.to=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||xt(e).isValid())?qt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},un.toNow=function(e){return this.to(xt(),e)},un.get=function(e){return O(this[e=M(e)])?this[e]():this},un.invalidAt=function(){return v(this).overflow},un.isAfter=function(e,t){var n=_(e)?e:xt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=M(u(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},un.isBefore=function(e,t){var n=_(e)?e:xt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=M(u(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},un.isBetween=function(e,t,n,r){return("("===(r=r||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===r[1]?this.isBefore(t,n):!this.isAfter(t,n))},un.isSame=function(e,t){var n,r=_(e)?e:xt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=M(t||"millisecond"))?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},un.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},un.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},un.isValid=function(){return y(this)},un.lang=Xt,un.locale=Zt,un.localeData=Jt,un.max=Tt,un.min=Ot,un.parsingFlags=function(){return g({},v(this))},un.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:I[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=R(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(O(this[e=M(e)]))return this[e](t);return this},un.startOf=function(e){switch(e=M(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},un.subtract=Kt,un.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]},un.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}},un.toDate=function(){return new Date(this.valueOf())},un.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?q(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",q(n,"Z")):q(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},un.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},un.toJSON=function(){return this.isValid()?this.toISOString():null},un.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},un.unix=function(){return Math.floor(this.valueOf()/1e3)},un.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},un.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},un.year=De,un.isLeapYear=function(){return Se(this.year())},un.weekYear=function(e){return tn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},un.isoWeekYear=function(e){return tn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},un.quarter=un.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},un.month=Ie,un.daysInMonth=function(){return Ee(this.year(),this.month())},un.week=un.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},un.isoWeek=un.isoWeeks=function(e){var t=Ne(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},un.weeksInYear=function(){var e=this.localeData()._week;return qe(this.year(),e.dow,e.doy)},un.isoWeeksInYear=function(){return qe(this.year(),1,4)},un.date=nn,un.day=un.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-r,"d")):r},un.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},un.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var t,n,r=(t=e,n=this.localeData(),"string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t);return this.day(this.day()%7?r:r-7)},un.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},un.hour=un.hours=tt,un.minute=un.minutes=rn,un.second=un.seconds=an,un.millisecond=un.milliseconds=ln,un.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:jt(this);if("string"==typeof e){if(null===(e=Ft(oe,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=jt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Wt(this,qt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,p.updateOffset(this,!0),this._changeInProgress=null)),this},un.utc=function(e){return this.utcOffset(0,e)},un.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(jt(this),"m")),this},un.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ft(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},un.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?xt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},un.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},un.isLocal=function(){return!!this.isValid()&&!this._isUTC},un.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},un.isUtc=Ht,un.isUTC=Ht,un.zoneAbbr=function(){return this._isUTC?"UTC":""},un.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},un.dates=n("dates accessor is deprecated. Use date instead.",nn),un.months=n("months accessor is deprecated. Use month instead",Ie),un.years=n("years accessor is deprecated. Use year instead",De),un.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),un.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e={};if(b(e,this),(e=kt(e))._a){var t=e._isUTC?m(e._a):xt(e._a);this._isDSTShifted=this.isValid()&&0<a(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var dn=E.prototype;function pn(e,t,n,r){var i=ut(),o=m().set(r,t);return i[n](o,e)}function hn(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return pn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=pn(e,r,n,"month");return i}function fn(e,t,n,r){t=("boolean"==typeof e?c(t)&&(n=t,t=void 0):(t=e,e=!1,c(n=t)&&(n=t,t=void 0)),t||"");var i,o=ut(),a=e?o._week.dow:0;if(null!=n)return pn(t,(n+a)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=pn(t,(i+a)%7,r,"day");return s}dn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return O(r)?r.call(t,n):r},dn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},dn.invalidDate=function(){return this._invalidDate},dn.ordinal=function(e){return this._ordinal.replace("%d",e)},dn.preparse=cn,dn.postformat=cn,dn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return O(i)?i(e,t,n,r):i.replace(/%d/i,e)},dn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return O(n)?n(t):n.replace(/%s/i,t)},dn.set=function(e){var t,n;for(n in e)O(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},dn.months=function(e,t){return e?s(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ae).test(t)?"format":"standalone"][e.month()]:s(this._months)?this._months:this._months.standalone},dn.monthsShort=function(e,t){return e?s(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ae.test(t)?"format":"standalone"][e.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},dn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=ke.call(this._shortMonthsParse,a))?i:null:-1!==(i=ke.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=ke.call(this._shortMonthsParse,a))?i:-1!==(i=ke.call(this._longMonthsParse,a))?i:null:-1!==(i=ke.call(this._longMonthsParse,a))?i:-1!==(i=ke.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},dn.monthsRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||Le.call(this),e?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=Fe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},dn.monthsShortRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||Le.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=Ve),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},dn.week=function(e){return Ne(e,this._week.dow,this._week.doy).week},dn.firstDayOfYear=function(){return this._week.doy},dn.firstDayOfWeek=function(){return this._week.dow},dn.weekdays=function(e,t){return e?s(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:s(this._weekdays)?this._weekdays:this._weekdays.standalone},dn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},dn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},dn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=ke.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ke.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=ke.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=ke.call(this._weekdaysParse,a))?i:-1!==(i=ke.call(this._shortWeekdaysParse,a))?i:-1!==(i=ke.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ke.call(this._shortWeekdaysParse,a))?i:-1!==(i=ke.call(this._weekdaysParse,a))?i:-1!==(i=ke.call(this._minWeekdaysParse,a))?i:null:-1!==(i=ke.call(this._minWeekdaysParse,a))?i:-1!==(i=ke.call(this._weekdaysParse,a))?i:-1!==(i=ke.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},dn.weekdaysRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=We),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},dn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ge),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},dn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ke),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},dn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},dn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},st("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===S(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),p.lang=n("moment.lang is deprecated. Use moment.locale instead.",st),p.langData=n("moment.langData is deprecated. Use moment.localeData instead.",ut);var gn=Math.abs;function mn(e,t,n,r){var i=qt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function vn(e){return e<0?Math.floor(e):Math.ceil(e)}function yn(e){return 4800*e/146097}function wn(e){return 146097*e/4800}function bn(e){return function(){return this.as(e)}}var $n=bn("ms"),_n=bn("s"),Cn=bn("m"),Sn=bn("h"),kn=bn("d"),Dn=bn("w"),xn=bn("M"),On=bn("y");function Tn(e){return function(){return this.isValid()?this._data[e]:NaN}}var En=Tn("milliseconds"),An=Tn("seconds"),Pn=Tn("minutes"),Mn=Tn("hours"),Rn=Tn("days"),In=Tn("months"),Vn=Tn("years");var Fn=Math.round,Ln={ss:44,s:45,m:45,h:22,d:26,M:11};var jn=Math.abs;function Hn(e){return(0<e)-(e<0)||+e}function Yn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=jn(this._milliseconds)/1e3,r=jn(this._days),i=jn(this._months);t=C((e=C(n/60))/60),n%=60,e%=60;var o=C(i/12),a=i%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var p=d<0?"-":"",h=Hn(this._months)!==Hn(d)?"-":"",f=Hn(this._days)!==Hn(d)?"-":"",g=Hn(this._milliseconds)!==Hn(d)?"-":"";return p+"P"+(o?h+o+"Y":"")+(a?h+a+"M":"")+(s?f+s+"D":"")+(l||u||c?"T":"")+(l?g+l+"H":"")+(u?g+u+"M":"")+(c?g+c+"S":"")}var Nn=Pt.prototype;return Nn.isValid=function(){return this._isValid},Nn.abs=function(){var e=this._data;return this._milliseconds=gn(this._milliseconds),this._days=gn(this._days),this._months=gn(this._months),e.milliseconds=gn(e.milliseconds),e.seconds=gn(e.seconds),e.minutes=gn(e.minutes),e.hours=gn(e.hours),e.months=gn(e.months),e.years=gn(e.years),this},Nn.add=function(e,t){return mn(this,e,t,1)},Nn.subtract=function(e,t){return mn(this,e,t,-1)},Nn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=M(e))||"year"===e)return t=this._days+r/864e5,n=this._months+yn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(wn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Nn.asMilliseconds=$n,Nn.asSeconds=_n,Nn.asMinutes=Cn,Nn.asHours=Sn,Nn.asDays=kn,Nn.asWeeks=Dn,Nn.asMonths=xn,Nn.asYears=On,Nn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12):NaN},Nn._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return 0<=o&&0<=a&&0<=s||o<=0&&a<=0&&s<=0||(o+=864e5*vn(wn(s)+a),s=a=0),l.milliseconds=o%1e3,e=C(o/1e3),l.seconds=e%60,t=C(e/60),l.minutes=t%60,n=C(t/60),l.hours=n%24,s+=i=C(yn(a+=C(n/24))),a-=vn(wn(i)),r=C(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},Nn.clone=function(){return qt(this)},Nn.get=function(e){return e=M(e),this.isValid()?this[e+"s"]():NaN},Nn.milliseconds=En,Nn.seconds=An,Nn.minutes=Pn,Nn.hours=Mn,Nn.days=Rn,Nn.weeks=function(){return C(this.days()/7)},Nn.months=In,Nn.years=Vn,Nn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t,n,r,i,o,a,s,l,u,c,d,p=this.localeData(),h=(n=!e,r=p,i=qt(t=this).abs(),o=Fn(i.as("s")),a=Fn(i.as("m")),s=Fn(i.as("h")),l=Fn(i.as("d")),u=Fn(i.as("M")),c=Fn(i.as("y")),(d=o<=Ln.ss&&["s",o]||o<Ln.s&&["ss",o]||a<=1&&["m"]||a<Ln.m&&["mm",a]||s<=1&&["h"]||s<Ln.h&&["hh",s]||l<=1&&["d"]||l<Ln.d&&["dd",l]||u<=1&&["M"]||u<Ln.M&&["MM",u]||c<=1&&["y"]||["yy",c])[2]=n,d[3]=0<+t,d[4]=r,function(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}.apply(null,d));return e&&(h=p.pastFuture(+this,h)),p.postformat(h)},Nn.toISOString=Yn,Nn.toString=Yn,Nn.toJSON=Yn,Nn.locale=Zt,Nn.localeData=Jt,Nn.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Yn),Nn.lang=Xt,N("X",0,0,"unix"),N("x",0,0,"valueOf"),le("x",re),le("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),pe("x",function(e,t,n){n._d=new Date(S(e))}),p.version="2.22.2",e=xt,p.fn=un,p.min=function(){return Et("isBefore",[].slice.call(arguments,0))},p.max=function(){return Et("isAfter",[].slice.call(arguments,0))},p.now=function(){return Date.now?Date.now():+new Date},p.utc=m,p.unix=function(e){return xt(1e3*e)},p.months=function(e,t){return hn(e,t,"months")},p.isDate=d,p.locale=st,p.invalid=w,p.duration=qt,p.isMoment=_,p.weekdays=function(e,t,n){return fn(e,t,n,"weekdays")},p.parseZone=function(){return xt.apply(null,arguments).parseZone()},p.localeData=ut,p.isDuration=Mt,p.monthsShort=function(e,t){return hn(e,t,"monthsShort")},p.weekdaysMin=function(e,t,n){return fn(e,t,n,"weekdaysMin")},p.defineLocale=lt,p.updateLocale=function(e,t){if(null!=t){var n,r,i=nt;null!=(r=at(e))&&(i=r._config),(n=new E(t=T(i,t))).parentLocale=rt[e],rt[e]=n,st(e)}else null!=rt[e]&&(null!=rt[e].parentLocale?rt[e]=rt[e].parentLocale:null!=rt[e]&&delete rt[e]);return rt[e]},p.locales=function(){return r(rt)},p.weekdaysShort=function(e,t,n){return fn(e,t,n,"weekdaysShort")},p.normalizeUnits=M,p.relativeTimeRounding=function(e){return void 0===e?Fn:"function"==typeof e&&(Fn=e,!0)},p.relativeTimeThreshold=function(e,t){return void 0!==Ln[e]&&(void 0===t?Ln[e]:(Ln[e]=t,"s"===e&&(Ln.ss=t-1),!0))},p.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},p.prototype=un,p.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},p}),function(e,t){"use strict";"undefined"!=typeof module&&module.exports?(t("undefined"==typeof angular?require("angular"):angular,"undefined"==typeof moment?require("moment"):moment),module.exports="ui.bootstrap.datetimepicker"):"function"==typeof define&&define.amd?define(["angular","moment"],t):t(e.angular,e.moment)}(this,function(d,p){"use strict";function e(){return function(e,t,n){var r,i;switch(e){case"Date":r=o(function(e){return a(e).toDate()});break;case"moment":r=o(a);break;case"milliseconds":r=o(function(e){return p.utc(e,t,p.locale(),n).valueOf()});break;default:r=o((i=e,function(e){return a(e).format(i)}))}return r;function o(t){return function(e){return d.isUndefined(e)||""===e||null===e?null:t(e)}}function a(e){return p(e,t,p.locale(),n)}}}function t(c){return{require:"ngModel",restrict:"A",scope:{dateFormats:"="},link:function(e,t,n,r){if(d.isDefined(e.dateFormats)&&!d.isString(e.dateFormats)&&!d.isArray(e.dateFormats))throw new Error("date-formats must be a single string or an array of strings i.e. date-formats=\"['YYYY-MM-DD']\" ");if(d.isDefined(n.modelType)&&(!d.isString(n.modelType)||0===n.modelType.length))throw new Error('model-type must be "Date", "moment", "milliseconds", or a moment format string');var i=n.dateTimeInput||p.defaultFormat,o=void 0===n.dateParseStrict||"true"===n.dateParseStrict,a=n.modelType||"Date",s=[n.dateTimeInput,a].concat(e.dateFormats).concat([p.ISO_8601]).filter(u),l=[a].concat(s).filter(u);function u(e,t,n){return-1===["Date","moment","milliseconds",void 0].indexOf(e)&&n.indexOf(e)===t}r.$parsers.unshift(c(a,s,o)),r.$formatters.push(function(e){if(d.isUndefined(e)||""===e||null===e)return null;{if(d.isDate(e))return p(e).format(i);if(d.isNumber(e))return p.utc(e).format(i)}return p(e,l,p.locale(),o).format(i)}),r.$validators.dateTimeInput=function(e,t){if(d.isUndefined(t)||""===t||null===t)return!0;return p(t,s,p.locale(),o).isValid()},t.bind("blur",function(){function e(){return!0}function t(e,t){return t(e)}r.$viewValue=r.$formatters.filter(e).reverse().reduce(t,r.$modelValue),r.$render()})}}}d.module("ui.dateTimeInput",[]).service("dateTimeParserFactory",e).directive("dateTimeInput",t),e.$inject=[],t.$inject=["dateTimeParserFactory"]}),function(e,t){"use strict";"undefined"!=typeof module&&module.exports?(t("undefined"==typeof angular?require("angular"):angular,"undefined"==typeof moment?require("moment"):moment),module.exports="ui.bootstrap.datetimepicker"):"function"==typeof define&&define.amd?define(["angular","moment"],t):t(e.angular,e.moment)}(this,function(a,b){"use strict";function e(i,o){var e={bindToController:!1,controller:t,controllerAs:"dateTimePickerController",replace:!0,require:"ngModel",restrict:"E",scope:{beforeRender:"&",onSetTime:"&"},templateUrl:"templates/datetimepicker.html"};function t(u,e,n){var m=e.controller("ngModel"),v=t();u.screenReader=v.screenReader,u.changeView=function(e,t,n){n&&(n.stopPropagation(),n.preventDefault());if(e&&t.utcDateValue>-1/0&&t.selectable&&c[e]){var r=c[e](t.utcDateValue),i=[];if(r.weeks)for(var o=0;o<r.weeks.length;o+=1)for(var a=r.weeks[o],s=0;s<a.dates.length;s+=1){var l=a.dates[s];i.push(l)}u.beforeRender({$view:r.currentView,$dates:r.dates||i,$leftDate:r.leftDate,$upDate:r.previousViewDate,$rightDate:r.rightDate}),u.data=r}},m.$render=function(){u.changeView(v.startView,new w({utcDateValue:function(e){var t=new Date;if(e){var n=r(e);if(!n.isValid())throw new Error("Invalid date: "+e);t=n.toDate()}return t.getTime()-6e4*t.getTimezoneOffset()}(m.$viewValue)}))},v.configureOn&&u.$on(v.configureOn,function(){v=t(),u.screenReader=v.screenReader,m.$render()}),v.renderOn&&u.$on(v.renderOn,m.$render);var c={year:function(e){for(var t=b.utc(e).startOf("year"),n=10*parseInt(t.year()/10,10),r=b.utc(d(e)).subtract(1,"year").startOf("year"),i="YYYY",o=y(m.$modelValue,i),a=b().format(i),s={currentView:"year",nextView:"year"===v.minView?"setTime":"month",previousViewDate:new w({utcDateValue:null,display:n+"-"+(n+9)}),leftDate:new w({utcDateValue:b.utc(r).subtract(9,"year").valueOf()}),rightDate:new w({utcDateValue:b.utc(r).add(11,"year").valueOf()}),dates:[]},l=0;l<12;l+=1){var u=b.utc(r).add(l,"years"),c={active:u.format(i)===o,current:u.format(i)===a,display:u.format(i),future:u.year()>n+9,past:u.year()<n,utcDateValue:u.valueOf()};s.dates.push(new w(c))}return s},month:function(e){for(var t=b.utc(e).startOf("year"),n=d(e),r="YYYY-MMM",i=y(m.$modelValue,r),o=b().format(r),a={previousView:"year",currentView:"month",nextView:"month"===v.minView?"setTime":"day",previousViewDate:new w({utcDateValue:n.valueOf(),display:t.format("YYYY")}),leftDate:new w({utcDateValue:b.utc(t).subtract(1,"year").valueOf()}),rightDate:new w({utcDateValue:b.utc(t).add(1,"year").valueOf()}),dates:[]},s=0;s<12;s+=1){var l=b.utc(t).add(s,"months"),u={active:l.format(r)===i,current:l.format(r)===o,display:l.format("MMM"),utcDateValue:l.valueOf()};a.dates.push(new w(u))}return a},day:function(e){for(var t=b.utc(e),n=b.utc(t).startOf("month"),r=b.utc(t).startOf("year"),i=b.utc(t).endOf("month"),o=b.utc(n).subtract(Math.abs(n.weekday()),"days"),a="YYYY-MMM-DD",s=y(m.$modelValue,a),l=b().format(a),u={previousView:"month",currentView:"day",nextView:"day"===v.minView?"setTime":"hour",previousViewDate:new w({utcDateValue:r.valueOf(),display:n.format("YYYY-MMM")}),leftDate:new w({utcDateValue:b.utc(n).subtract(1,"months").valueOf()}),rightDate:new w({utcDateValue:b.utc(n).add(1,"months").valueOf()}),dayNames:[],weeks:[]},c=0;c<7;c+=1)u.dayNames.push(b.utc().weekday(c).format("dd"));for(var d=0;d<6;d+=1){for(var p={dates:[]},h=0;h<7;h+=1){var f=b.utc(o).add(7*d+h,"days"),g={active:f.format(a)===s,current:f.format(a)===l,display:f.format("D"),future:f.isAfter(i),past:f.isBefore(n),utcDateValue:f.valueOf()};p.dates.push(new w(g))}u.weeks.push(p)}return u},hour:function(e){for(var t=b.utc(e).startOf("day"),n=b.utc(t).startOf("month"),r="YYYY-MM-DD H",i=y(m.$modelValue,r),o=b().format(r),a={previousView:"day",currentView:"hour",nextView:"hour"===v.minView?"setTime":"minute",previousViewDate:new w({utcDateValue:n.valueOf(),display:t.format("ll")}),leftDate:new w({utcDateValue:b.utc(t).subtract(1,"days").valueOf()}),rightDate:new w({utcDateValue:b.utc(t).add(1,"days").valueOf()}),dates:[]},s=0;s<24;s+=1){var l=b.utc(t).add(s,"hours"),u={active:l.format(r)===i,current:l.format(r)===o,display:l.format("LT"),utcDateValue:l.valueOf()};a.dates.push(new w(u))}return a},minute:function(e){for(var t=b.utc(e).startOf("hour"),n=b.utc(t).startOf("day"),r="YYYY-MM-DD H:mm",i=y(m.$modelValue,r),o=b().format(r),a={previousView:"hour",currentView:"minute",nextView:"setTime",previousViewDate:new w({utcDateValue:n.valueOf(),display:t.format("lll")}),leftDate:new w({utcDateValue:b.utc(t).subtract(1,"hours").valueOf()}),rightDate:new w({utcDateValue:b.utc(t).add(1,"hours").valueOf()}),dates:[]},s=60/v.minuteStep,l=0;l<s;l+=1){var u=b.utc(t).add(l*v.minuteStep,"minute"),c={active:u.format(r)===i,current:u.format(r)===o,display:u.format("LT"),utcDateValue:u.valueOf()};a.dates.push(new w(c))}return a},setTime:function(e){var t=new Date(e),n=new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds());switch(v.modelType){case"Date":break;case"moment":n=b([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]);break;case"milliseconds":n=e;break;default:n=b([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]).format(v.modelType)}var r=m.$modelValue;m.$setViewValue(n),v.dropdownSelector&&jQuery(v.dropdownSelector).dropdown("toggle");return u.onSetTime({newDate:n,oldDate:r}),c[v.startView](e)}};function d(e){var t=10*parseInt(b.utc(e).year()/10,10);return b.utc(e).year(t).startOf("year")}function y(e,t){return e?r(e).format(t):""}function r(e){return b(e,a.isString(e)?v.parseFormat:void 0)}function t(){var e={};n.datetimepickerConfig&&(e=u.$parent.$eval(n.datetimepickerConfig));var t=a.extend({},i,e);return o.validate(t),t}}function w(){var e=new Date(arguments[0].utcDateValue),t=6e4*e.getTimezoneOffset();this.utcDateValue=e.getTime(),this.selectable=!0,this.localDateValue=function(){return this.utcDateValue+t};var n=["active","current","display","future","past","selectable","utcDateValue"],r=arguments[0];Object.keys(r).filter(function(e){return 0<=n.indexOf(e)}).forEach(function(e){this[e]=r[e]},this)}return t.$inject=["$scope","$element","$attrs"],e}function t(i){return{validate:function(e){var t=["configureOn","dropdownSelector","minuteStep","minView","modelType","parseFormat","renderOn","startView","screenReader"],n=Object.keys(e).filter(function(e){return t.indexOf(e)<0});if(n.length)throw new Error("Invalid options: "+n.join(", "));var r=["minute","hour","day","month","year"];if(r.indexOf(e.startView)<0)throw new Error("invalid startView value: "+e.startView);if(r.indexOf(e.minView)<0)throw new Error("invalid minView value: "+e.minView);if(r.indexOf(e.minView)>r.indexOf(e.startView))throw new Error("startView must be greater than minView");if(!a.isNumber(e.minuteStep))throw new Error("minuteStep must be numeric");if(e.minuteStep<=0||60<=e.minuteStep)throw new Error("minuteStep must be greater than zero and less than 60");if(null!==e.configureOn&&!a.isString(e.configureOn))throw new Error("configureOn must be a string");if(null!==e.configureOn&&e.configureOn.length<1)throw new Error("configureOn must not be an empty string");if(null!==e.renderOn&&!a.isString(e.renderOn))throw new Error("renderOn must be a string");if(null!==e.renderOn&&e.renderOn.length<1)throw new Error("renderOn must not be an empty string");if(null!==e.modelType&&!a.isString(e.modelType))throw new Error("modelType must be a string");if(null!==e.modelType&&e.modelType.length<1)throw new Error("modelType must not be an empty string");"Date"!==e.modelType&&"moment"!==e.modelType&&"milliseconds"!==e.modelType&&(e.parseFormat=e.modelType);if(null!==e.dropdownSelector&&!a.isString(e.dropdownSelector))throw new Error("dropdownSelector must be a string");null===e.dropdownSelector||"undefined"!=typeof jQuery&&"function"==typeof jQuery().dropdown||(i.error("Please DO NOT specify the dropdownSelector option unless you are using jQuery AND Bootstrap.js. Please include jQuery AND Bootstrap.js, or write code to close the dropdown in the on-set-time callback. \n\nThe dropdownSelector configuration option is being removed because it will not function properly."),delete e.dropdownSelector)}}}a.module("ui.bootstrap.datetimepicker",[]).service("dateTimePickerConfig",function(){var e={bg:{previous:"предишна",next:"следваща"},ca:{previous:"anterior",next:"següent"},da:{previous:"forrige",next:"næste"},de:{previous:"vorige",next:"weiter"},"en-au":{previous:"previous",next:"next"},"en-gb":{previous:"previous",next:"next"},en:{previous:"previous",next:"next"},"es-us":{previous:"atrás",next:"siguiente"},es:{previous:"atrás",next:"siguiente"},fi:{previous:"edellinen",next:"seuraava"},fr:{previous:"précédent",next:"suivant"},hu:{previous:"előző",next:"következő"},it:{previous:"precedente",next:"successivo"},ja:{previous:"前へ",next:"次へ"},ml:{previous:"മുൻപുള്ളത്",next:"അടുത്തത്"},nl:{previous:"vorige",next:"volgende"},pl:{previous:"poprzednia",next:"następna"},"pt-br":{previous:"anteriores",next:"próximos"},pt:{previous:"anterior",next:"próximo"},ro:{previous:"anterior",next:"următor"},ru:{previous:"предыдущая",next:"следующая"},sk:{previous:"predošlá",next:"ďalšia"},sv:{previous:"föregående",next:"nästa"},tr:{previous:"önceki",next:"sonraki"},uk:{previous:"назад",next:"далі"},"zh-cn":{previous:"上一页",next:"下一页"},"zh-tw":{previous:"上一頁",next:"下一頁"}}[b.locale().toLowerCase()];return a.extend({},{configureOn:null,dropdownSelector:null,minuteStep:5,minView:"minute",modelType:"Date",parseFormat:"YYYY-MM-DDTHH:mm:ss.SSSZZ",renderOn:null,startView:"day"},{screenReader:e})}).service("dateTimePickerValidator",t).directive("datetimepicker",e),e.$inject=["dateTimePickerConfig","dateTimePickerValidator"],t.$inject=["$log"]}),angular.module("rzTable",[]),angular.module("rzTable").directive("rzTable",["resizeStorage","$injector","$parse",function(g,i,u){function e(e){}function c(n,r,i){return function(e,t){!0!==i.busy&&void 0!==t&&t!==e&&(d(n),p(n,r,i))}}function d(e){k=!0,l.map(function(e){e.remove()}),l=[]}function p(e,t,n){if(!n.busy){b=$(e).find("th"),v=n.mode,y=!angular.isDefined(n.saveTableSizes)||n.saveTableSizes,w=n.profile;var r=function(t,e){try{var n=e.rzMode?t.mode:"BasicResizer",r=i.get(n);return r}catch(e){return console.error("The resizer "+t.mode+" was not found"),null}}(n,t);r&&(S=new r(e,b,h),y&&(D=g.loadTableSizes(e,n.mode,n.profile)),s=S.handles(b),a=S.ctrlColumns,S.setup(),(o=D)&&($(C).width("auto"),a.each(function(e,t){var n=angular.element(t).scope(),r=n.rzCol||$(t).attr("id"),i=o[r];$(t).css({width:i})}),S.onTableReady()),s.each(function(e,t){!function(e,t,n){var r=$("<div>",{class:e.options.handleClass||"rz-handle"});$(n).prepend(r),l.push(r);var i=S.handleMiddleware(r,n);p=e,h=r,f=i,$(h).mousedown(function(e){k&&(S.onFirstDrag(f,h),S.onTableReady(),k=!1),p.options.onResizeStarted&&p.options.onResizeStarted(f);var t={};S.intervene&&(((t=S.intervene.selector(f)).column=t).orgWidth=$(t).width()),e.preventDefault(),$(h).addClass(p.options.handleClassActive||"rz-handle-active");var n,r,i,o,a,s,l,u,c=e.clientX,d=$(f).width();o=p,a=f,s=c,l=d,u=t,_=function(e){var t=e.clientX,n=t-s,r=S.calculate(l,n);if(!(r<m(a)||S.restrict(r,n))){if(S.intervene){var i=S.intervene.calculator(u.orgWidth,n);if(i<m(u.column))return;if(S.intervene.restrict(i,n))return;$(u.column).width(i)}o.options.onResizeInProgress&&o.options.onResizeInProgress(a,r,n),$(a).width(r)}},$(window).mousemove(_),$(window).one("mouseup",(n=p,r=f,i=h,function(){$(i).removeClass(n.options.handleClassActive||"rz-handle-active"),_&&$(window).unbind("mousemove",_),n.options.onResizeEnded&&n.options.onResizeEnded(r),S.onEndDrag(),y&&(D||(D={}),$(b).each(function(e,t){var n=angular.element(t).scope(),r=n.rzCol||$(t).attr("id");r&&(D[r]=S.saveAttr(t))}),g.saveTableSizes(C,v,w,D))}))});var p,h,f}(n,0,t)}))}var o}function m(e){return parseInt($(e).css("min-width"))||0}var v,y,w,b=null,a=null,s=null,_=null,l=[],C=null,h=null,S=null,k=!0,D=null;return e.$inject=["$scope","$attrs","$element"],{restrict:"A",link:function(e,t,n){var r,i,o,a,s,l;C=t,h=e.container?$(e.container):$(C).parent(),e.options=n.rzOptions&&e.options||{},$(C).addClass(e.options.tableClass||"rz-table"),p(C,n,e),function(t,e,n){if(e.rzModel){var r=u(e.rzModel);r.assign(n.$parent,{update:function(){d(),p(t,e,n)},reset:function(){var e;e=t,$(e).outerWidth("100%"),$(e).find("th").width("auto"),this.clearStorageActive(),this.update()},clearStorage:function(){g.clearAll()},clearStorageActive:function(){g.clearCurrent(t,v,w)}})}}(C,n,e),a=C,s=n,(l=e).$watch(function(){return $(a).find("th").length},c(a,s,l)),r=C,i=n,(o=e).$watch("profile",c(r,i,o)),o.$watch("mode",c(r,i,o)),o.$watch("busy",c(r,i,o))},controller:e,scope:{mode:"=rzMode",profile:"=?rzProfile",busy:"=?rzBusy",saveTableSizes:"=?rzSave",options:"=?rzOptions",model:"=rzModel",container:"@rzContainer"}}}]),angular.module("rzTable").directive("rzCol",[function(){return{restrict:"A",priority:650,link:function(e,t,n){e.rzCol=e.$eval(n.rzCol)},require:"^^rzTable",scope:!0}}]),angular.module("rzTable").service("resizeStorage",["$window",function(a){function s(e,t,n){return e.attr("id")?r+"."+e.attr("id")+"."+t+(n?"."+n:""):void console.error("Table has no id",e)}var r="ngColumnResize";this.loadTableSizes=function(e,t,n){var r=s(e,t,n),i=a.localStorage.getItem(r);return JSON.parse(i)},this.saveTableSizes=function(e,t,n,r){var i=s(e,t,n);if(i){var o=JSON.stringify(r);a.localStorage.setItem(i,o)}},this.clearAll=function(){for(var e=[],t=0;t<a.localStorage.length;++t){var n=localStorage.key(t);n&&n.startsWith(r)&&e.push(n)}e.map(function(e){a.localStorage.removeItem(e)})},this.clearCurrent=function(e,t,n){var r=s(e,t,n);r&&a.localStorage.removeItem(r)}}]),angular.module("rzTable").factory("ResizerModel",[function(){function e(e,t,n){this.table=e,this.columns=t,this.container=n,this.handleColumns=this.handles(),this.ctrlColumns=this.ctrlColumns()}return e.prototype.setup=function(){$(this.container).css({overflowX:"hidden"})},e.prototype.onTableReady=function(){$(this.table).outerWidth("100%")},e.prototype.getMinWidth=function(e){return parseInt($(e).css("min-width"))||0},e.prototype.handles=function(){return this.columns},e.prototype.ctrlColumns=function(){return this.handleColumns},e.prototype.onFirstDrag=function(){$(this.ctrlColumns).each(function(e,t){$(t).width($(t).width())})},e.prototype.handleMiddleware=function(e,t){return t},e.prototype.restrict=function(e){return!1},e.prototype.calculate=function(e,t){return e+t},e.prototype.onEndDrag=function(){},e.prototype.saveAttr=function(e){return $(e).outerWidth()},e}]),angular.module("rzTable").factory("BasicResizer",["ResizerModel",function(r){function e(e,t,n){r.call(this,e,t,n),this.ctrlColumns=this.columns,this.intervene={selector:i,calculator:o,restrict:a}}function i(e){return $(e).next()}function o(e,t){return e-t}function a(e){return e<25}return(e.prototype=Object.create(r.prototype)).setup=function(){$(this.container).css({overflowX:"hidden"}),$(this.table).css({width:"100%"})},e.prototype.handles=function(){return $(this.columns).not(":last")},e.prototype.onFirstDrag=function(){this.onEndDrag()},e.prototype.onEndDrag=function(){var r=$(this.table).outerWidth(),i=[];$(this.columns).each(function(e,t){var n=$(t).outerWidth()/r*100+"%";i.push(function(){$(t).css({width:n})})}),i.map(function(e){e()})},e.prototype.saveAttr=function(e){return $(e)[0].style.width},e}]),angular.module("rzTable").factory("FixedResizer",["ResizerModel",function(r){function e(e,t,n){r.call(this,e,t,n),this.fixedColumn=$(e).find("th").first(),this.bound=!1}return(e.prototype=Object.create(r.prototype)).setup=function(){$(this.container).css({overflowX:"hidden"}),$(this.table).css({width:"100%"}),$(this.columns).first().css({width:"auto"})},e.prototype.handles=function(){return $(this.columns).not(":last")},e.prototype.ctrlColumns=function(){return $(this.columns).not(":first")},e.prototype.onFirstDrag=function(){$(this.ctrlColumns).each(function(e,t){$(t).width($(t).width())})},e.prototype.handleMiddleware=function(e,t){return $(t).next()},e.prototype.restrict=function(e,t){return this.bound&&this.bound<t?this.bound=!1:!!(this.bound&&this.bound>t)||(this.fixedColumn.width()<=this.getMinWidth(this.fixedColumn)?(this.bound=t,$(this.fixedColumn).width(this.minWidth),!0):void 0)},e.prototype.onEndDrag=function(){this.bound=!1},e.prototype.calculate=function(e,t){return e-t},e}]),angular.module("rzTable").factory("OverflowResizer",["ResizerModel",function(r){function e(e,t,n){r.call(this,e,t,n)}return(e.prototype=Object.create(r.prototype)).setup=function(){$(this.container).css({overflow:"auto"})},e.prototype.onTableReady=function(){$(this.table).width(1)},e}]),function(e,t){"function"==typeof define&&define.amd?define(["angular"],t):"object"==typeof module&&module.exports?module.exports=t(require("angular")):e.angularClipboard=t(e.angular)}(this,function(i){return i.module("angular-clipboard",[]).factory("clipboard",["$document","$window",function(s,l){return{copyText:function(e,t){var n,r,i=l.pageXOffset||s[0].documentElement.scrollLeft,o=l.pageYOffset||s[0].documentElement.scrollTop,a=(n=e,(r=s[0].createElement("textarea")).style.position="absolute",r.style.fontSize="12pt",r.style.border="0",r.style.padding="0",r.style.margin="0",r.style.left="-10000px",r.style.top=(l.pageYOffset||s[0].documentElement.scrollTop)+"px",r.textContent=n,r);s[0].body.appendChild(a),function(e){try{s[0].body.style.webkitUserSelect="initial";var t=s[0].getSelection();t.removeAllRanges();var n=document.createRange();n.selectNodeContents(e),t.addRange(n),e.select(),e.setSelectionRange(0,999999);try{if(!s[0].execCommand("copy"))throw"failure copy"}finally{t.removeAllRanges()}}finally{s[0].body.style.webkitUserSelect=""}}(a),l.scrollTo(i,o),s[0].body.removeChild(a)},supported:"queryCommandSupported"in s[0]&&s[0].queryCommandSupported("copy")}}]).directive("clipboard",["clipboard",function(r){return{restrict:"A",scope:{onCopied:"&",onError:"&",text:"=",supported:"=?"},link:function(t,n){t.supported=r.supported,n.on("click",function(e){try{r.copyText(t.text,n[0]),i.isFunction(t.onCopied)&&t.$evalAsync(t.onCopied())}catch(e){i.isFunction(t.onError)&&t.$evalAsync(t.onError({err:e}))}})}}}])}),function(e,t){"function"==typeof define&&define.amd?define("sifter",t):"object"==typeof exports?module.exports=t():e.Sifter=t()}(this,function(){var e=function(e,t){this.items=e,this.settings=t||{diacritics:!0}};e.prototype.tokenize=function(e){if(!(e=s(String(e||"").toLowerCase()))||!e.length)return[];var t,n,r,i,o=[],a=e.split(/ +/);for(t=0,n=a.length;t<n;t++){if(r=l(a[t]),this.settings.diacritics)for(i in u)u.hasOwnProperty(i)&&(r=r.replace(new RegExp(i,"g"),u[i]));o.push({string:a[t],regex:new RegExp(r,"i")})}return o},e.prototype.iterator=function(e,t){(a(e)?Array.prototype.forEach||function(e){for(var t=0,n=this.length;t<n;t++)e(this[t],t,this)}:function(e){for(var t in this)this.hasOwnProperty(t)&&e(this[t],t,this)}).apply(e,[t])},e.prototype.getScoreFunction=function(e,t){var i,o,a,s;e=this.prepareSearch(e,t),o=e.tokens,i=e.options.fields,a=o.length,s=e.options.nesting;var l,u=function(e,t){var n,r;return e?-1===(r=(e=String(e||"")).search(t.regex))?0:(n=t.string.length/e.length,0===r&&(n+=.5),n):0},c=(l=i.length)?1===l?function(e,t){return u(f(t,i[0],s),e)}:function(e,t){for(var n=0,r=0;n<l;n++)r+=u(f(t,i[n],s),e);return r/l}:function(){return 0};return a?1===a?function(e){return c(o[0],e)}:"and"===e.options.conjunction?function(e){for(var t,n=0,r=0;n<a;n++){if((t=c(o[n],e))<=0)return 0;r+=t}return r/a}:function(e){for(var t=0,n=0;t<a;t++)n+=c(o[t],e);return n/a}:function(){return 0}},e.prototype.getSortFunction=function(e,n){var t,r,i,o,a,s,l,u,c,d,p;if(p=!(e=(i=this).prepareSearch(e,n)).query&&n.sort_empty||n.sort,c=function(e,t){return"$score"===e?t.score:f(i.items[t.id],e,n.nesting)},a=[],p)for(t=0,r=p.length;t<r;t++)(e.query||"$score"!==p[t].field)&&a.push(p[t]);if(e.query){for(d=!0,t=0,r=a.length;t<r;t++)if("$score"===a[t].field){d=!1;break}d&&a.unshift({field:"$score",direction:"desc"})}else for(t=0,r=a.length;t<r;t++)if("$score"===a[t].field){a.splice(t,1);break}for(u=[],t=0,r=a.length;t<r;t++)u.push("desc"===a[t].direction?-1:1);return(s=a.length)?1===s?(o=a[0].field,l=u[0],function(e,t){return l*h(c(o,e),c(o,t))}):function(e,t){var n,r,i;for(n=0;n<s;n++)if(i=a[n].field,r=u[n]*h(c(i,e),c(i,t)))return r;return 0}:null},e.prototype.prepareSearch=function(e,t){if("object"==typeof e)return e;var n=(t=o({},t)).fields,r=t.sort,i=t.sort_empty;return n&&!a(n)&&(t.fields=[n]),r&&!a(r)&&(t.sort=[r]),i&&!a(i)&&(t.sort_empty=[i]),{options:t,query:String(e||"").toLowerCase(),tokens:this.tokenize(e),total:0,items:[]}},e.prototype.search=function(e,n){var r,i,t,o;return i=this.prepareSearch(e,n),n=i.options,e=i.query,o=n.score||this.getScoreFunction(i),e.length?this.iterator(this.items,function(e,t){r=o(e),(!1===n.filter||0<r)&&i.items.push({score:r,id:t})}):this.iterator(this.items,function(e,t){i.items.push({score:1,id:t})}),(t=this.getSortFunction(i,n))&&i.items.sort(t),i.total=i.items.length,"number"==typeof n.limit&&(i.items=i.items.slice(0,n.limit)),i};var h=function(e,t){return"number"==typeof e&&"number"==typeof t?t<e?1:e<t?-1:0:(e=n(String(e||"")),(t=n(String(t||"")))<e?1:e<t?-1:0)},o=function(e,t){var n,r,i,o;for(n=1,r=arguments.length;n<r;n++)if(o=arguments[n])for(i in o)o.hasOwnProperty(i)&&(e[i]=o[i]);return e},f=function(e,t,n){if(e&&t){if(!n)return e[t];for(var r=t.split(".");r.length&&(e=e[r.shift()]););return e}},s=function(e){return(e+"").replace(/^\s+|\s+$|/g,"")},l=function(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},a=Array.isArray||"undefined"!=typeof $&&$.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},u={a:"[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]",b:"[b␢βΒB฿𐌁ᛒ]",c:"[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕᴄCc]",d:"[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅDdð]",e:"[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇEeɘǝƏƐε]",f:"[fƑƒḞḟ]",g:"[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]",h:"[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]",i:"[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪIi]",j:"[jȷĴĵɈɉʝɟʲ]",k:"[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]",l:"[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟLl]",n:"[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴNnŊŋ]",o:"[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]",p:"[pṔṕṖṗⱣᵽƤƥᵱ]",q:"[qꝖꝗʠɊɋꝘꝙq̃]",r:"[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]",s:"[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]",t:"[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]",u:"[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ∪]",v:"[vṼṽṾṿƲʋꝞꝟⱱʋ]",w:"[wẂẃẀẁŴŵẄẅẆẇẈẉ]",x:"[xẌẍẊẋχ]",y:"[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]",z:"[zŹźẐẑŽžŻżẒẓẔẕƵƶ]"},n=function(){var e,t,n,r,i="",o={};for(n in u)if(u.hasOwnProperty(n))for(i+=r=u[n].substring(2,u[n].length-1),e=0,t=r.length;e<t;e++)o[r.charAt(e)]=n;var a=new RegExp("["+i+"]","g");return function(e){return e.replace(a,function(e){return o[e]}).toLowerCase()}}();return e}),function(e,t){"function"==typeof define&&define.amd?define("microplugin",t):"object"==typeof exports?module.exports=t():e.MicroPlugin=t()}(this,function(){var e={mixin:function(r){r.plugins={},r.prototype.initializePlugins=function(e){var t,n,r,i=[];if(this.plugins={names:[],settings:{},requested:{},loaded:{}},o.isArray(e))for(t=0,n=e.length;t<n;t++)"string"==typeof e[t]?i.push(e[t]):(this.plugins.settings[e[t].name]=e[t].options,i.push(e[t].name));else if(e)for(r in e)e.hasOwnProperty(r)&&(this.plugins.settings[r]=e[r],i.push(r));for(;i.length;)this.require(i.shift())},r.prototype.loadPlugin=function(e){var t=this.plugins,n=r.plugins[e];if(!r.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');t.requested[e]=!0,t.loaded[e]=n.fn.apply(this,[this.plugins.settings[e]||{}]),t.names.push(e)},r.prototype.require=function(e){var t=this.plugins;if(!this.plugins.loaded.hasOwnProperty(e)){if(t.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');this.loadPlugin(e)}return t.loaded[e]},r.define=function(e,t){r.plugins[e]={name:e,fn:t}}}},o={isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}};return e}),function(e,t){"function"==typeof define&&define.amd?define("selectize",["jquery","sifter","microplugin"],t):"object"==typeof exports?module.exports=t(require("jquery"),require("sifter"),require("microplugin")):e.Selectize=t(e.jQuery,e.Sifter,e.MicroPlugin)}(this,function(S,d,e){"use strict";var k=function(e,t){if("string"!=typeof t||t.length){var l="string"==typeof t?new RegExp(t,"i"):t,u=function(e){var t=0;if(3===e.nodeType){var n=e.data.search(l);if(0<=n&&0<e.data.length){var r=e.data.match(l),i=document.createElement("span");i.className="highlight";var o=e.splitText(n),a=(o.splitText(r[0].length),o.cloneNode(!0));i.appendChild(a),o.parentNode.replaceChild(i,o),t=1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&("highlight"!==e.className||"SPAN"!==e.tagName))for(var s=0;s<e.childNodes.length;++s)s+=u(e.childNodes[s]);return t};return e.each(function(){u(this)})}};S.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;var e=this.parentNode;e.replaceChild(this.firstChild,this),e.normalize()}).end()};var r=function(){};r.prototype={on:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t)},off:function(e,t){var n=arguments.length;return 0===n?delete this._events:1===n?delete this._events[e]:(this._events=this._events||{},void(e in this._events!=!1&&this._events[e].splice(this._events[e].indexOf(t),1)))},trigger:function(e){if(this._events=this._events||{},e in this._events!=!1)for(var t=0;t<this._events[e].length;t++)this._events[e][t].apply(this,Array.prototype.slice.call(arguments,1))}},r.mixin=function(e){for(var t=["on","off","trigger"],n=0;n<t.length;n++)e.prototype[t[n]]=r.prototype[t[n]]};var $=/Mac/.test(navigator.userAgent),_=$?91:17,C=$?18:17,D=!/android/i.test(window.navigator.userAgent)&&!!document.createElement("input").validity,u=function(e){return void 0!==e},x=function(e){return null==e?null:"boolean"==typeof e?e?"1":"0":e+""},s=function(e){return(e+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},t={before:function(e,t,n){var r=e[t];e[t]=function(){return n.apply(e,arguments),r.apply(e,arguments)}},after:function(t,e,n){var r=t[e];t[e]=function(){var e=r.apply(t,arguments);return n.apply(t,arguments),e}}},n=function(t,n,e){var r,i=t.trigger,o={};for(r in t.trigger=function(){var e=arguments[0];if(-1===n.indexOf(e))return i.apply(t,arguments);o[e]=arguments},e.apply(t,[]),t.trigger=i,o)o.hasOwnProperty(r)&&i.apply(t,o[r])},f=function(e){var t={};if("selectionStart"in e)t.start=e.selectionStart,t.length=e.selectionEnd-t.start;else if(document.selection){e.focus();var n=document.selection.createRange(),r=document.selection.createRange().text.length;n.moveStart("character",-e.value.length),t.start=n.text.length-r,t.length=r}return t},O=function(p){var h=null,e=function(e,t){var n,r,i,o,a,s,l,u,c,d;(t=t||{},(e=e||window.event||{}).metaKey||e.altKey)||(t.force||!1!==p.data("grow"))&&(n=p.val(),e.type&&"keydown"===e.type.toLowerCase()&&(i=48<=(r=e.keyCode)&&r<=57||65<=r&&r<=90||96<=r&&r<=111||186<=r&&r<=222||32===r,46===r||8===r?(u=f(p[0])).length?n=n.substring(0,u.start)+n.substring(u.start+u.length):8===r&&u.start?n=n.substring(0,u.start-1)+n.substring(u.start+1):46===r&&void 0!==u.start&&(n=n.substring(0,u.start)+n.substring(u.start+1)):i&&(s=e.shiftKey,l=String.fromCharCode(e.keyCode),n+=l=s?l.toUpperCase():l.toLowerCase())),o=p.attr("placeholder"),!n&&o&&(n=o),d=p,(a=((c=n)?(w.$testInput||(w.$testInput=S("<span />").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).appendTo("body")),w.$testInput.text(c),function(e,t,n){var r,i,o={};if(n)for(r=0,i=n.length;r<i;r++)o[n[r]]=e.css(n[r]);else o=e.css();t.css(o)}(d,w.$testInput,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]),w.$testInput.width()):0)+4)!==h&&(h=a,p.width(a),p.triggerHandler("resize")))};p.on("keydown keyup update blur",e),e()},w=function(e,t){var n,r,i,o,a=this;(o=e[0]).selectize=a;var s,l,u,c=window.getComputedStyle&&window.getComputedStyle(o,null);if(i=(i=c?c.getPropertyValue("direction"):o.currentStyle&&o.currentStyle.direction)||e.parents("[dir]:first").attr("dir")||"",S.extend(a,{order:0,settings:t,$input:e,tabIndex:e.attr("tabindex")||"",tagType:"select"===o.tagName.toLowerCase()?1:2,rtl:/rtl/i.test(i),eventNS:".selectize"+ ++w.count,highlightedValue:null,isBlurring:!1,isOpen:!1,isDisabled:!1,isRequired:e.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===t.loadThrottle?a.onSearchChange:(s=a.onSearchChange,l=t.loadThrottle,function(){var e=this,t=arguments;window.clearTimeout(u),u=window.setTimeout(function(){s.apply(e,t)},l)})}),a.sifter=new d(this.options,{diacritics:t.diacritics}),a.settings.options){for(n=0,r=a.settings.options.length;n<r;n++)a.registerOption(a.settings.options[n]);delete a.settings.options}if(a.settings.optgroups){for(n=0,r=a.settings.optgroups.length;n<r;n++)a.registerOptionGroup(a.settings.optgroups[n]);delete a.settings.optgroups}a.settings.mode=a.settings.mode||(1===a.settings.maxItems?"single":"multi"),"boolean"!=typeof a.settings.hideSelected&&(a.settings.hideSelected="multi"===a.settings.mode),a.initializePlugins(a.settings.plugins),a.setupCallbacks(),a.setupTemplates(),a.setup()};return r.mixin(w),void 0!==e?e.mixin(w):function(e,t){t||(t={});console.error("Selectize: "+e),t.explanation&&(console.group&&console.group(),console.error(t.explanation),console.group&&console.groupEnd())}("Dependency MicroPlugin is missing",{explanation:'Make sure you either: (1) are using the "standalone" version of Selectize, or (2) require MicroPlugin before you load Selectize.'}),S.extend(w.prototype,{setup:function(){var e,t,n,r,i,o,a,s,l,u,c,d,p,h,f=this,g=f.settings,m=f.eventNS,v=S(window),y=S(document),w=f.$input;if(a=f.settings.mode,s=w.attr("class")||"",e=S("<div>").addClass(g.wrapperClass).addClass(s).addClass(a),t=S("<div>").addClass(g.inputClass).addClass("items").appendTo(e),n=S('<input type="text" autocomplete="off" />').appendTo(t).attr("tabindex",w.is(":disabled")?"-1":f.tabIndex),o=S(g.dropdownParent||e),r=S("<div>").addClass(g.dropdownClass).addClass(a).hide().appendTo(o),i=S("<div>").addClass(g.dropdownContentClass).appendTo(r),(u=w.attr("id"))&&(n.attr("id",u+"-selectized"),S("label[for='"+u+"']").attr("for",u+"-selectized")),f.settings.copyClassesToDropdown&&r.addClass(s),e.css({width:w[0].style.width}),f.plugins.names.length&&(l="plugin-"+f.plugins.names.join(" plugin-"),e.addClass(l),r.addClass(l)),(null===g.maxItems||1<g.maxItems)&&1===f.tagType&&w.attr("multiple","multiple"),f.settings.placeholder&&n.attr("placeholder",g.placeholder),!f.settings.splitOn&&f.settings.delimiter){var b=f.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");f.settings.splitOn=new RegExp("\\s*"+b+"+\\s*")}w.attr("autocorrect")&&n.attr("autocorrect",w.attr("autocorrect")),w.attr("autocapitalize")&&n.attr("autocapitalize",w.attr("autocapitalize")),n[0].type=w[0].type,f.$wrapper=e,f.$control=t,f.$control_input=n,f.$dropdown=r,f.$dropdown_content=i,r.on("mouseenter mousedown click","[data-disabled]>[data-selectable]",function(e){e.stopImmediatePropagation()}),r.on("mouseenter","[data-selectable]",function(){return f.onOptionHover.apply(f,arguments)}),r.on("mousedown click","[data-selectable]",function(){return f.onOptionSelect.apply(f,arguments)}),d="mousedown",p="*:not(input)",h=function(){return f.onItemSelect.apply(f,arguments)},(c=t).on(d,p,function(e){for(var t=e.target;t&&t.parentNode!==c[0];)t=t.parentNode;return e.currentTarget=t,h.apply(this,[e])}),O(n),t.on({mousedown:function(){return f.onMouseDown.apply(f,arguments)},click:function(){return f.onClick.apply(f,arguments)}}),n.on({mousedown:function(e){e.stopPropagation()},keydown:function(){return f.onKeyDown.apply(f,arguments)},keyup:function(){return f.onKeyUp.apply(f,arguments)},keypress:function(){return f.onKeyPress.apply(f,arguments)},resize:function(){f.positionDropdown.apply(f,[])},blur:function(){return f.onBlur.apply(f,arguments)},focus:function(){return f.ignoreBlur=!1,f.onFocus.apply(f,arguments)},paste:function(){return f.onPaste.apply(f,arguments)}}),y.on("keydown"+m,function(e){f.isCmdDown=e[$?"metaKey":"ctrlKey"],f.isCtrlDown=e[$?"altKey":"ctrlKey"],f.isShiftDown=e.shiftKey}),y.on("keyup"+m,function(e){e.keyCode===C&&(f.isCtrlDown=!1),16===e.keyCode&&(f.isShiftDown=!1),e.keyCode===_&&(f.isCmdDown=!1)}),y.on("mousedown"+m,function(e){if(f.isFocused){if(e.target===f.$dropdown[0]||e.target.parentNode===f.$dropdown[0])return!1;f.$control.has(e.target).length||e.target===f.$control[0]||f.blur(e.target)}}),v.on(["scroll"+m,"resize"+m].join(" "),function(){f.isOpen&&f.positionDropdown.apply(f,arguments)}),v.on("mousemove"+m,function(){f.ignoreHover=!1}),this.revertSettings={$children:w.children().detach(),tabindex:w.attr("tabindex")},w.attr("tabindex",-1).hide().after(f.$wrapper),S.isArray(g.items)&&(f.setValue(g.items),delete g.items),D&&w.on("invalid"+m,function(e){e.preventDefault(),f.isInvalid=!0,f.refreshState()}),f.updateOriginalInput(),f.refreshItems(),f.refreshState(),f.updatePlaceholder(),f.isSetup=!0,w.is(":disabled")&&f.disable(),f.on("change",this.onChange),w.data("selectize",f),w.addClass("selectized"),f.trigger("initialize"),!0===g.preload&&f.onSearchChange("")},setupTemplates:function(){var n=this.settings.labelField,r=this.settings.optgroupLabelField,e={optgroup:function(e){return'<div class="optgroup">'+e.html+"</div>"},optgroup_header:function(e,t){return'<div class="optgroup-header">'+t(e[r])+"</div>"},option:function(e,t){return'<div class="option">'+t(e[n])+"</div>"},item:function(e,t){return'<div class="item">'+t(e[n])+"</div>"},option_create:function(e,t){return'<div class="create">Add <strong>'+t(e.input)+"</strong>…</div>"}};this.settings.render=S.extend({},e,this.settings.render)},setupCallbacks:function(){var e,t,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(e in n)n.hasOwnProperty(e)&&(t=this.settings[n[e]])&&this.on(e,t)},onClick:function(e){this.isFocused&&this.isOpen||(this.focus(),e.preventDefault())},onMouseDown:function(e){var t=this,n=e.isDefaultPrevented();S(e.target);if(t.isFocused){if(e.target!==t.$control_input[0])return"single"===t.settings.mode?t.isOpen?t.close():t.open():n||t.setActiveItem(null),!1}else n||window.setTimeout(function(){t.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(e){var i=this;i.isFull()||i.isInputHidden||i.isLocked?e.preventDefault():i.settings.splitOn&&setTimeout(function(){var e=i.$control_input.val();if(e.match(i.settings.splitOn))for(var t=S.trim(e).split(i.settings.splitOn),n=0,r=t.length;n<r;n++)i.createItem(t[n])},0)},onKeyPress:function(e){if(this.isLocked)return e&&e.preventDefault();var t=String.fromCharCode(e.keyCode||e.which);return this.settings.create&&"multi"===this.settings.mode&&t===this.settings.delimiter?(this.createItem(),e.preventDefault(),!1):void 0},onKeyDown:function(e){e.target,this.$control_input[0];var t=this;if(t.isLocked)9!==e.keyCode&&e.preventDefault();else{switch(e.keyCode){case 65:if(t.isCmdDown)return void t.selectAll();break;case 27:return void(t.isOpen&&(e.preventDefault(),e.stopPropagation(),t.close()));case 78:if(!e.ctrlKey||e.altKey)break;case 40:if(!t.isOpen&&t.hasOptions)t.open();else if(t.$activeOption){t.ignoreHover=!0;var n=t.getAdjacentOption(t.$activeOption,1);n.length&&t.setActiveOption(n,!0,!0)}return void e.preventDefault();case 80:if(!e.ctrlKey||e.altKey)break;case 38:if(t.$activeOption){t.ignoreHover=!0;var r=t.getAdjacentOption(t.$activeOption,-1);r.length&&t.setActiveOption(r,!0,!0)}return void e.preventDefault();case 13:return void(t.isOpen&&t.$activeOption&&(t.onOptionSelect({currentTarget:t.$activeOption}),e.preventDefault()));case 37:return void t.advanceSelection(-1,e);case 39:return void t.advanceSelection(1,e);case 9:return t.settings.selectOnTab&&t.isOpen&&t.$activeOption&&(t.onOptionSelect({currentTarget:t.$activeOption}),t.isFull()||e.preventDefault()),void(t.settings.create&&t.createItem()&&e.preventDefault());case 8:case 46:return void t.deleteSelection(e)}!t.isFull()&&!t.isInputHidden||($?e.metaKey:e.ctrlKey)||e.preventDefault()}},onKeyUp:function(e){if(this.isLocked)return e&&e.preventDefault();var t=this.$control_input.val()||"";this.lastValue!==t&&(this.lastValue=t,this.onSearchChange(t),this.refreshOptions(),this.trigger("type",t))},onSearchChange:function(t){var n=this,r=n.settings.load;r&&(n.loadedSearches.hasOwnProperty(t)||(n.loadedSearches[t]=!0,n.load(function(e){r.apply(n,[t,e])})))},onFocus:function(e){var t=this,n=t.isFocused;if(t.isDisabled)return t.blur(),e&&e.preventDefault(),!1;t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.onSearchChange(""),n||t.trigger("focus"),t.$activeItems.length||(t.showInput(),t.setActiveItem(null),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState())},onBlur:function(e,t){var n=this;if(n.isFocused&&(n.isFocused=!1,!n.ignoreFocus)){if(!n.ignoreBlur&&document.activeElement===n.$dropdown_content[0])return n.ignoreBlur=!0,void n.onFocus(e);var r=function(){n.close(),n.setTextboxValue(""),n.setActiveItem(null),n.setActiveOption(null),n.setCaret(n.items.length),n.refreshState(),t&&t.focus&&t.focus(),n.isBlurring=!1,n.ignoreFocus=!1,n.trigger("blur")};n.isBlurring=!0,n.ignoreFocus=!0,n.settings.create&&n.settings.createOnBlur?n.createItem(null,!1,r):r()}},onOptionHover:function(e){this.ignoreHover||this.setActiveOption(e.currentTarget,!1)},onOptionSelect:function(e){var t,n,r=this;e.preventDefault&&(e.preventDefault(),e.stopPropagation()),(n=S(e.currentTarget)).hasClass("create")?r.createItem(null,function(){r.settings.closeAfterSelect&&r.close()}):void 0!==(t=n.attr("data-value"))&&(r.lastQuery=null,r.setTextboxValue(""),r.addItem(t),r.settings.closeAfterSelect?r.close():!r.settings.hideSelected&&e.type&&/mouse/.test(e.type)&&r.setActiveOption(r.getOption(t)))},onItemSelect:function(e){this.isLocked||"multi"===this.settings.mode&&(e.preventDefault(),this.setActiveItem(e.currentTarget,e))},load:function(e){var t=this,n=t.$wrapper.addClass(t.settings.loadingClass);t.loading++,e.apply(t,[function(e){t.loading=Math.max(t.loading-1,0),e&&e.length&&(t.addOption(e),t.refreshOptions(t.isFocused&&!t.isInputHidden)),t.loading||n.removeClass(t.settings.loadingClass),t.trigger("load",e)}])},setTextboxValue:function(e){var t=this.$control_input;t.val()!==e&&(t.val(e).triggerHandler("update"),this.lastValue=e)},getValue:function(){return 1===this.tagType&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(e,t){n(this,t?[]:["change"],function(){this.clear(t),this.addItems(e,t)})},setActiveItem:function(e,t){var n,r,i,o,a,s,l,u,c=this;if("single"!==c.settings.mode){if(!(e=S(e)).length)return S(c.$activeItems).removeClass("active"),c.$activeItems=[],void(c.isFocused&&c.showInput());if("mousedown"===(n=t&&t.type.toLowerCase())&&c.isShiftDown&&c.$activeItems.length){for(u=c.$control.children(".active:last"),o=Array.prototype.indexOf.apply(c.$control[0].childNodes,[u[0]]),(a=Array.prototype.indexOf.apply(c.$control[0].childNodes,[e[0]]))<o&&(l=o,o=a,a=l),r=o;r<=a;r++)s=c.$control[0].childNodes[r],-1===c.$activeItems.indexOf(s)&&(S(s).addClass("active"),c.$activeItems.push(s));t.preventDefault()}else"mousedown"===n&&c.isCtrlDown||"keydown"===n&&this.isShiftDown?e.hasClass("active")?(i=c.$activeItems.indexOf(e[0]),c.$activeItems.splice(i,1),e.removeClass("active")):c.$activeItems.push(e.addClass("active")[0]):(S(c.$activeItems).removeClass("active"),c.$activeItems=[e.addClass("active")[0]]);c.hideInput(),this.isFocused||c.focus()}},setActiveOption:function(e,t,n){var r,i,o,a,s,l=this;l.$activeOption&&l.$activeOption.removeClass("active"),l.$activeOption=null,(e=S(e)).length&&(l.$activeOption=e.addClass("active"),!t&&u(t)||(r=l.$dropdown_content.height(),i=l.$activeOption.outerHeight(!0),t=l.$dropdown_content.scrollTop()||0,s=(a=o=l.$activeOption.offset().top-l.$dropdown_content.offset().top+t)-r+i,r+t<o+i?l.$dropdown_content.stop().animate({scrollTop:s},n?l.settings.scrollDuration:0):o<t&&l.$dropdown_content.stop().animate({scrollTop:a},n?l.settings.scrollDuration:0)))},selectAll:function(){"single"!==this.settings.mode&&(this.$activeItems=Array.prototype.slice.apply(this.$control.children(":not(input)").addClass("active")),this.$activeItems.length&&(this.hideInput(),this.close()),this.focus())},hideInput:function(){this.setTextboxValue(""),this.$control_input.css({opacity:0,position:"absolute",left:this.rtl?1e4:-1e4}),this.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var e=this;e.isDisabled||(e.ignoreFocus=!0,e.$control_input[0].focus(),window.setTimeout(function(){e.ignoreFocus=!1,e.onFocus()},0))},blur:function(e){this.$control_input[0].blur(),this.onBlur(null,e)},getScoreFunction:function(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())},getSearchOptions:function(){var e=this.settings,t=e.sortField;return"string"==typeof t&&(t=[{field:t}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t,nesting:e.nesting}},search:function(e){var t,n,r,i=this.settings,o=this.getSearchOptions();if(i.score&&"function"!=typeof(r=this.settings.score.apply(this,[e])))throw new Error('Selectize "score" setting must be a function that returns a function');if(e!==this.lastQuery?(this.lastQuery=e,n=this.sifter.search(e,S.extend(o,{score:r})),this.currentResults=n):n=S.extend(!0,{},this.currentResults),i.hideSelected)for(t=n.items.length-1;0<=t;t--)-1!==this.items.indexOf(x(n.items[t].id))&&n.items.splice(t,1);return n},refreshOptions:function(e){var t,n,r,i,o,a,s,l,u,c,d,p,h,f,g,m;void 0===e&&(e=!0);var v,y,w=this,b=S.trim(w.$control_input.val()),$=w.search(b),_=w.$dropdown_content,C=w.$activeOption&&x(w.$activeOption.attr("data-value"));for(i=$.items.length,"number"==typeof w.settings.maxOptions&&(i=Math.min(i,w.settings.maxOptions)),o={},a=[],t=0;t<i;t++)for(s=w.options[$.items[t].id],l=w.render("option",s),u=s[w.settings.optgroupField]||"",n=0,r=(c=S.isArray(u)?u:[u])&&c.length;n<r;n++)u=c[n],w.optgroups.hasOwnProperty(u)||(u=""),o.hasOwnProperty(u)||(o[u]=document.createDocumentFragment(),a.push(u)),o[u].appendChild(l);for(this.settings.lockOptgroupOrder&&a.sort(function(e,t){return(w.optgroups[e].$order||0)-(w.optgroups[t].$order||0)}),d=document.createDocumentFragment(),t=0,i=a.length;t<i;t++)u=a[t],w.optgroups.hasOwnProperty(u)&&o[u].childNodes.length?((p=document.createDocumentFragment()).appendChild(w.render("optgroup_header",w.optgroups[u])),p.appendChild(o[u]),d.appendChild(w.render("optgroup",S.extend({},w.optgroups[u],{html:(v=p,y=void 0,y=document.createElement("div"),y.appendChild(v.cloneNode(!0)),y.innerHTML),dom:p})))):d.appendChild(o[u]);if(_.html(d),w.settings.highlight&&(_.removeHighlight(),$.query.length&&$.tokens.length))for(t=0,i=$.tokens.length;t<i;t++)k(_,$.tokens[t].regex);if(!w.settings.hideSelected)for(t=0,i=w.items.length;t<i;t++)w.getOption(w.items[t]).addClass("selected");(h=w.canCreate(b))&&(_.prepend(w.render("option_create",{input:b})),m=S(_[0].childNodes[0])),w.hasOptions=0<$.items.length||h,w.hasOptions?(0<$.items.length?((g=C&&w.getOption(C))&&g.length?f=g:"single"===w.settings.mode&&w.items.length&&(f=w.getOption(w.items[0])),f&&f.length||(f=m&&!w.settings.addPrecedence?w.getAdjacentOption(m,1):_.find("[data-selectable]:first"))):f=m,w.setActiveOption(f),e&&!w.isOpen&&w.open()):(w.setActiveOption(null),e&&w.isOpen&&w.close())},addOption:function(e){var t,n,r;if(S.isArray(e))for(t=0,n=e.length;t<n;t++)this.addOption(e[t]);else(r=this.registerOption(e))&&(this.userOptions[r]=!0,this.lastQuery=null,this.trigger("option_add",r,e))},registerOption:function(e){var t=x(e[this.settings.valueField]);return null!=t&&!this.options.hasOwnProperty(t)&&(e.$order=e.$order||++this.order,this.options[t]=e,t)},registerOptionGroup:function(e){var t=x(e[this.settings.optgroupValueField]);return!!t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)},addOptionGroup:function(e,t){t[this.settings.optgroupValueField]=e,(e=this.registerOptionGroup(t))&&this.trigger("optgroup_add",e,t)},removeOptionGroup:function(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.renderCache={},this.trigger("optgroup_remove",e))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(e,t){var n,r,i,o,a,s,l,u=this;if(e=x(e),i=x(t[u.settings.valueField]),null!==e&&u.options.hasOwnProperty(e)){if("string"!=typeof i)throw new Error("Value must be set in option data");l=u.options[e].$order,i!==e&&(delete u.options[e],-1!==(o=u.items.indexOf(e))&&u.items.splice(o,1,i)),t.$order=t.$order||l,u.options[i]=t,a=u.renderCache.item,s=u.renderCache.option,a&&(delete a[e],delete a[i]),s&&(delete s[e],delete s[i]),-1!==u.items.indexOf(i)&&(n=u.getItem(e),r=S(u.render("item",t)),n.hasClass("active")&&r.addClass("active"),n.replaceWith(r)),u.lastQuery=null,u.isOpen&&u.refreshOptions(!1)}},removeOption:function(e,t){e=x(e);var n=this.renderCache.item,r=this.renderCache.option;n&&delete n[e],r&&delete r[e],delete this.userOptions[e],delete this.options[e],this.lastQuery=null,this.trigger("option_remove",e),this.removeItem(e,t)},clearOptions:function(){var n=this;n.loadedSearches={},n.userOptions={},n.renderCache={};var r=n.options;S.each(n.options,function(e,t){-1==n.items.indexOf(e)&&delete r[e]}),n.options=n.sifter.items=r,n.lastQuery=null,n.trigger("option_clear")},getOption:function(e){return this.getElementWithValue(e,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(e,t){var n=this.$dropdown.find("[data-selectable]"),r=n.index(e)+t;return 0<=r&&r<n.length?n.eq(r):S()},getElementWithValue:function(e,t){if(null!=(e=x(e)))for(var n=0,r=t.length;n<r;n++)if(t[n].getAttribute("data-value")===e)return S(t[n]);return S()},getItem:function(e){return this.getElementWithValue(e,this.$control.children())},addItems:function(e,t){this.buffer=document.createDocumentFragment();for(var n=this.$control[0].childNodes,r=0;r<n.length;r++)this.buffer.appendChild(n[r]);for(var i=S.isArray(e)?e:[e],o=(r=0,i.length);r<o;r++)this.isPending=r<o-1,this.addItem(i[r],t);var a=this.$control[0];a.insertBefore(this.buffer,a.firstChild),this.buffer=null},addItem:function(s,l){n(this,l?[]:["change"],function(){var e,t,n,r,i,o=this,a=o.settings.mode;s=x(s),-1===o.items.indexOf(s)?o.options.hasOwnProperty(s)&&("single"===a&&o.clear(l),"multi"===a&&o.isFull()||(e=S(o.render("item",o.options[s])),i=o.isFull(),o.items.splice(o.caretPos,0,s),o.insertAtCaret(e),(!o.isPending||!i&&o.isFull())&&o.refreshState(),o.isSetup&&(n=o.$dropdown_content.find("[data-selectable]"),o.isPending||(t=o.getOption(s),r=o.getAdjacentOption(t,1).attr("data-value"),o.refreshOptions(o.isFocused&&"single"!==a),r&&o.setActiveOption(o.getOption(r))),!n.length||o.isFull()?o.close():o.isPending||o.positionDropdown(),o.updatePlaceholder(),o.trigger("item_add",s,e),o.isPending||o.updateOriginalInput({silent:l})))):"single"===a&&o.close()})},removeItem:function(e,t){var n,r,i,o=this;n=e instanceof S?e:o.getItem(e),e=x(n.attr("data-value")),-1!==(r=o.items.indexOf(e))&&(n.remove(),n.hasClass("active")&&(i=o.$activeItems.indexOf(n[0]),o.$activeItems.splice(i,1)),o.items.splice(r,1),o.lastQuery=null,!o.settings.persist&&o.userOptions.hasOwnProperty(e)&&o.removeOption(e,t),r<o.caretPos&&o.setCaret(o.caretPos-1),o.refreshState(),o.updatePlaceholder(),o.updateOriginalInput({silent:t}),o.positionDropdown(),o.trigger("item_remove",e,n))},createItem:function(e,n){var r=this,i=r.caretPos;e=e||S.trim(r.$control_input.val()||"");var o=arguments[arguments.length-1];if("function"!=typeof o&&(o=function(){}),"boolean"!=typeof n&&(n=!0),!r.canCreate(e))return o(),!1;r.lock();var t,a,s="function"==typeof r.settings.create?this.settings.create:function(e){var t={};return t[r.settings.labelField]=e,t[r.settings.valueField]=e,t},l=(a=!(t=function(e){if(r.unlock(),!e||"object"!=typeof e)return o();var t=x(e[r.settings.valueField]);if("string"!=typeof t)return o();r.setTextboxValue(""),r.addOption(e),r.setCaret(i),r.addItem(t),r.refreshOptions(n&&"single"!==r.settings.mode),o(e)}),function(){a||(a=!0,t.apply(this,arguments))}),u=s.apply(this,[e,l]);return void 0!==u&&l(u),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){this.refreshValidityState(),this.refreshClasses()},refreshValidityState:function(){if(!this.isRequired)return!1;var e=!this.items.length;this.isInvalid=e,this.$control_input.prop("required",e),this.$input.prop("required",!e)},refreshClasses:function(){var e=this,t=e.isFull(),n=e.isLocked;e.$wrapper.toggleClass("rtl",e.rtl),e.$control.toggleClass("focus",e.isFocused).toggleClass("disabled",e.isDisabled).toggleClass("required",e.isRequired).toggleClass("invalid",e.isInvalid).toggleClass("locked",n).toggleClass("full",t).toggleClass("not-full",!t).toggleClass("input-active",e.isFocused&&!e.isInputHidden).toggleClass("dropdown-active",e.isOpen).toggleClass("has-options",!S.isEmptyObject(e.options)).toggleClass("has-items",0<e.items.length),e.$control_input.data("grow",!t&&!n)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(e){var t,n,r,i,o=this;if(e=e||{},1===o.tagType){for(r=[],t=0,n=o.items.length;t<n;t++)i=o.options[o.items[t]][o.settings.labelField]||"",r.push('<option value="'+s(o.items[t])+'" selected="selected">'+s(i)+"</option>");r.length||this.$input.attr("multiple")||r.push('<option value="" selected="selected"></option>'),o.$input.html(r.join(""))}else o.$input.val(o.getValue()),o.$input.attr("value",o.$input.val());o.isSetup&&(e.silent||o.trigger("change",o.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var e=this.$control_input;this.items.length?e.removeAttr("placeholder"):e.attr("placeholder",this.settings.placeholder),e.triggerHandler("update",{force:!0})}},open:function(){var e=this;e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.focus(),e.isOpen=!0,e.refreshState(),e.$dropdown.css({visibility:"hidden",display:"block"}),e.positionDropdown(),e.$dropdown.css({visibility:"visible"}),e.trigger("dropdown_open",e.$dropdown))},close:function(){var e=this,t=e.isOpen;"single"===e.settings.mode&&e.items.length&&(e.hideInput(),e.isBlurring||e.$control_input.blur()),e.isOpen=!1,e.$dropdown.hide(),e.setActiveOption(null),e.refreshState(),t&&e.trigger("dropdown_close",e.$dropdown)},positionDropdown:function(){var e=this.$control,t="body"===this.settings.dropdownParent?e.offset():e.position();t.top+=e.outerHeight(!0),this.$dropdown.css({width:e[0].getBoundingClientRect().width,top:t.top,left:t.left})},clear:function(e){var t=this;t.items.length&&(t.$control.children(":not(input)").remove(),t.items=[],t.lastQuery=null,t.setCaret(0),t.setActiveItem(null),t.updatePlaceholder(),t.updateOriginalInput({silent:e}),t.refreshState(),t.showInput(),t.trigger("clear"))},insertAtCaret:function(e){var t=Math.min(this.caretPos,this.items.length),n=e[0],r=this.buffer||this.$control[0];0===t?r.insertBefore(n,r.firstChild):r.insertBefore(n,r.childNodes[t]),this.setCaret(t+1)},deleteSelection:function(e){var t,n,r,i,o,a,s,l,u,c=this;if(r=e&&8===e.keyCode?-1:1,i=f(c.$control_input[0]),c.$activeOption&&!c.settings.hideSelected&&(s=c.getAdjacentOption(c.$activeOption,-1).attr("data-value")),o=[],c.$activeItems.length){for(u=c.$control.children(".active:"+(0<r?"last":"first")),a=c.$control.children(":not(input)").index(u),0<r&&a++,t=0,n=c.$activeItems.length;t<n;t++)o.push(S(c.$activeItems[t]).attr("data-value"));e&&(e.preventDefault(),e.stopPropagation())}else(c.isFocused||"single"===c.settings.mode)&&c.items.length&&(r<0&&0===i.start&&0===i.length?o.push(c.items[c.caretPos-1]):0<r&&i.start===c.$control_input.val().length&&o.push(c.items[c.caretPos]));if(!o.length||"function"==typeof c.settings.onDelete&&!1===c.settings.onDelete.apply(c,[o]))return!1;for(void 0!==a&&c.setCaret(a);o.length;)c.removeItem(o.pop());return c.showInput(),c.positionDropdown(),c.refreshOptions(!0),s&&(l=c.getOption(s)).length&&c.setActiveOption(l),!0},advanceSelection:function(e,t){var n,r,i,o,a,s=this;0!==e&&(s.rtl&&(e*=-1),n=0<e?"last":"first",r=f(s.$control_input[0]),s.isFocused&&!s.isInputHidden?(o=s.$control_input.val().length,(e<0?0===r.start&&0===r.length:r.start===o)&&!o&&s.advanceCaret(e,t)):(a=s.$control.children(".active:"+n)).length&&(i=s.$control.children(":not(input)").index(a),s.setActiveItem(null),s.setCaret(0<e?i+1:i)))},advanceCaret:function(e,t){var n,r;0!==e&&(n=0<e?"next":"prev",this.isShiftDown?(r=this.$control_input[n]()).length&&(this.hideInput(),this.setActiveItem(r),t&&t.preventDefault()):this.setCaret(this.caretPos+e))},setCaret:function(e){var t,n,r,i;if(e="single"===this.settings.mode?this.items.length:Math.max(0,Math.min(this.items.length,e)),!this.isPending)for(t=0,n=(r=this.$control.children(":not(input)")).length;t<n;t++)i=S(r[t]).detach(),t<e?this.$control_input.before(i):this.$control.append(i);this.caretPos=e},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){this.$input.prop("disabled",!0),this.$control_input.prop("disabled",!0).prop("tabindex",-1),this.isDisabled=!0,this.lock()},enable:function(){this.$input.prop("disabled",!1),this.$control_input.prop("disabled",!1).prop("tabindex",this.tabIndex),this.isDisabled=!1,this.unlock()},destroy:function(){var e=this,t=e.eventNS,n=e.revertSettings;e.trigger("destroy"),e.off(),e.$wrapper.remove(),e.$dropdown.remove(),e.$input.html("").append(n.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:n.tabindex}).show(),e.$control_input.removeData("grow"),e.$input.removeData("selectize"),0==--w.count&&w.$testInput&&(w.$testInput.remove(),w.$testInput=void 0),S(window).off(t),S(document).off(t),S(document.body).off(t),delete e.$input[0].selectize},render:function(e,t){var n,r,i="",o=!1,a=this;return"option"!==e&&"item"!==e||(o=!!(n=x(t[a.settings.valueField]))),o&&(u(a.renderCache[e])||(a.renderCache[e]={}),a.renderCache[e].hasOwnProperty(n))?a.renderCache[e][n]:(i=S(a.settings.render[e].apply(this,[t,s])),"option"===e||"option_create"===e?t[a.settings.disabledField]||i.attr("data-selectable",""):"optgroup"===e&&(r=t[a.settings.optgroupValueField]||"",i.attr("data-group",r),t[a.settings.disabledField]&&i.attr("data-disabled","")),"option"!==e&&"item"!==e||i.attr("data-value",n||""),o&&(a.renderCache[e][n]=i[0]),i[0])},clearCache:function(e){void 0===e?this.renderCache={}:delete this.renderCache[e]},canCreate:function(e){if(!this.settings.create)return!1;var t=this.settings.createFilter;return e.length&&("function"!=typeof t||t.apply(this,[e]))&&("string"!=typeof t||new RegExp(t).test(e))&&(!(t instanceof RegExp)||t.test(e))}}),w.count=0,w.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},S.fn.selectize=function(i){var o=S.fn.selectize.defaults,d=S.extend({},o,i),p=d.dataAttr,h=d.labelField,f=d.valueField,g=d.disabledField,m=d.optgroupField,v=d.optgroupLabelField,y=d.optgroupValueField;return this.each(function(){if(!this.selectize){var e=S(this),t=this.tagName.toLowerCase(),n=e.attr("placeholder")||e.attr("data-placeholder");n||d.allowEmptyOption||(n=e.children('option[value=""]').text());var r={placeholder:n,options:[],optgroups:[],items:[]};"select"===t?function(e,a){var t,n,r,i,o=a.options,s={},l=function(e){var t=p&&e.attr(p);return"string"==typeof t&&t.length?JSON.parse(t):null},u=function(e,t){e=S(e);var n=x(e.val());if(n||d.allowEmptyOption)if(s.hasOwnProperty(n)){if(t){var r=s[n][m];r?S.isArray(r)?r.push(t):s[n][m]=[r,t]:s[n][m]=t}}else{var i=l(e)||{};i[h]=i[h]||e.text(),i[f]=i[f]||n,i[g]=i[g]||e.prop("disabled"),i[m]=i[m]||t,s[n]=i,o.push(i),e.is(":selected")&&a.items.push(n)}},c=function(e){var t,n,r,i,o;for((r=(e=S(e)).attr("label"))&&((i=l(e)||{})[v]=r,i[y]=r,i[g]=e.prop("disabled"),a.optgroups.push(i)),t=0,n=(o=S("option",e)).length;t<n;t++)u(o[t],r)};for(a.maxItems=e.attr("multiple")?null:1,t=0,n=(i=e.children()).length;t<n;t++)"optgroup"===(r=i[t].tagName.toLowerCase())?c(i[t]):"option"===r&&u(i[t])}(e,r):function(e,t){var n,r,i,o,a=e.attr(p);if(a)for(t.options=JSON.parse(a),n=0,r=t.options.length;n<r;n++)t.items.push(t.options[n][f]);else{var s=S.trim(e.val()||"");if(!d.allowEmptyOption&&!s.length)return;for(n=0,r=(i=s.split(d.delimiter)).length;n<r;n++)(o={})[h]=i[n],o[f]=i[n],t.options.push(o);t.items=i}}(e,r),new w(e,S.extend(!0,{},o,r,i))}})},S.fn.selectize.defaults=w.defaults,S.fn.selectize.support={validity:D},w.define("drag_drop",function(e){if(!S.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var t,n,r,i=this;i.lock=(t=i.lock,function(){var e=i.$control.data("sortable");return e&&e.disable(),t.apply(i,arguments)}),i.unlock=(n=i.unlock,function(){var e=i.$control.data("sortable");return e&&e.enable(),n.apply(i,arguments)}),i.setup=(r=i.setup,function(){r.apply(this,arguments);var n=i.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:i.isLocked,start:function(e,t){t.placeholder.css("width",t.helper.css("width")),n.css({overflow:"visible"})},stop:function(){n.css({overflow:"hidden"});var e=i.$activeItems?i.$activeItems.slice():null,t=[];n.children("[data-value]").each(function(){t.push(S(this).attr("data-value"))}),i.setValue(t),i.setActiveItem(e)}})})}}),w.define("dropdown_header",function(e){var t,n=this;e=S.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(e){return'<div class="'+e.headerClass+'"><div class="'+e.titleRowClass+'"><span class="'+e.labelClass+'">'+e.title+'</span><a href="javascript:void(0)" class="'+e.closeClass+'">×</a></div></div>'}},e),n.setup=(t=n.setup,function(){t.apply(n,arguments),n.$dropdown_header=S(e.html(e)),n.$dropdown.prepend(n.$dropdown_header)})}),w.define("optgroup_columns",function(s){var o,l=this;s=S.extend({equalizeWidth:!0,equalizeHeight:!0},s),this.getAdjacentOption=function(e,t){var n=e.closest("[data-group]").find("[data-selectable]"),r=n.index(e)+t;return 0<=r&&r<n.length?n.eq(r):S()},this.onKeyDown=(o=l.onKeyDown,function(e){var t,n,r,i;return!this.isOpen||37!==e.keyCode&&39!==e.keyCode?o.apply(this,arguments):(l.ignoreHover=!0,t=(i=this.$activeOption.closest("[data-group]")).find("[data-selectable]").index(this.$activeOption),void((n=(r=(i=37===e.keyCode?i.prev("[data-group]"):i.next("[data-group]")).find("[data-selectable]")).eq(Math.min(r.length-1,t))).length&&this.setActiveOption(n)))});var u=function(){var e,t=u.width,n=document;return void 0===t&&((e=n.createElement("div")).innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',e=e.firstChild,n.body.appendChild(e),t=u.width=e.offsetWidth-e.clientWidth,n.body.removeChild(e)),t},e=function(){var e,t,n,r,i,o,a;if((t=(a=S("[data-group]",l.$dropdown_content)).length)&&l.$dropdown_content.width()){if(s.equalizeHeight){for(e=n=0;e<t;e++)n=Math.max(n,a.eq(e).height());a.css({height:n})}s.equalizeWidth&&(o=l.$dropdown_content.innerWidth()-u(),r=Math.round(o/t),a.css({width:r}),1<t&&(i=o-r*(t-1),a.eq(t-1).css({width:i})))}};(s.equalizeHeight||s.equalizeWidth)&&(t.after(this,"positionDropdown",e),t.after(this,"refreshOptions",e))}),w.define("remove_button",function(e){e=S.extend({label:"×",title:"Remove",className:"remove",append:!0},e);var o,t,n,r,a;"single"!==this.settings.mode?(r=o=this,a='<a href="javascript:void(0)" class="'+(t=e).className+'" tabindex="-1" title="'+s(t.title)+'">'+t.label+"</a>",o.setup=(n=r.setup,function(){if(t.append){var i=r.settings.render.item;r.settings.render.item=function(e){return t=i.apply(o,arguments),n=a,r=t.search(/(<\/[^>]+>\s*)$/),t.substring(0,r)+n+t.substring(r);var t,n,r}}n.apply(o,arguments),o.$control.on("click","."+t.className,function(e){if(e.preventDefault(),!r.isLocked){var t=S(e.currentTarget).parent();r.setActiveItem(t),r.deleteSelection()&&r.setCaret(r.items.length)}})})):function(i,t){t.className="remove-single";var n,o=i,a='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+s(t.title)+'">'+t.label+"</a>";i.setup=(n=o.setup,function(){if(t.append){var e=S(o.$input.context).attr("id"),r=(S("#"+e),o.settings.render.item);o.settings.render.item=function(e){return t=r.apply(i,arguments),n=a,S("<span>").append(t).append(n);var t,n}}n.apply(i,arguments),i.$control.on("click","."+t.className,function(e){e.preventDefault(),o.isLocked||o.clear()})})}(this,e)}),w.define("restore_on_backspace",function(r){var i,e=this;r.text=r.text||function(e){return e[this.settings.labelField]},this.onKeyDown=(i=e.onKeyDown,function(e){var t,n;return 8===e.keyCode&&""===this.$control_input.val()&&!this.$activeItems.length&&0<=(t=this.caretPos-1)&&t<this.items.length?(n=this.options[this.items[t]],this.deleteSelection(e)&&(this.setTextboxValue(r.text.apply(this,[n])),this.refreshOptions(!0)),void e.preventDefault()):i.apply(this,arguments)})}),w}),angular.module("selectize",[]).value("selectizeConfig",{}).directive("selectize",["selectizeConfig",function(p){return{restrict:"EA",require:"^ngModel",scope:{ngModel:"=",config:"=?",options:"=?",ngDisabled:"=",ngRequired:"&"},link:function(n,e,t,r){Selectize.defaults.maxItems=null;var i,o=angular.extend({},Selectize.defaults,p,n.config);function a(e){e?i.disable():i.enable()}r.$isEmpty=function(e){return null==e||!e.length};function s(e){return e?(e=angular.isArray(e)||angular.isObject(e)?e:[e],$.map(e,function(e){return"string"==typeof e?(t=e,(n={})[o.labelField]=t,n[o.valueField]=t,n):e;var t,n})):[]}function l(){var e;e=(n.ngRequired()||t.required||o.required)&&r.$isEmpty(n.ngModel),r.$setValidity("required",!e),i.$control.toggleClass("ng-valid",r.$valid),i.$control.toggleClass("ng-invalid",r.$invalid),i.$control.toggleClass("ng-dirty",r.$dirty),i.$control.toggleClass("ng-pristine",r.$pristine),angular.equals(i.items,n.ngModel)||(i.addOption(s(n.ngModel)),i.setValue(n.ngModel))}var u=o.onChange,c=o.onOptionAdd;o.onChange=function(){n.disableOnChange||(angular.equals(i.items,n.ngModel)||n.$evalAsync(function(){var e=angular.copy(i.items);1==o.maxItems&&(e=e[0]),r.$setViewValue(e)}),u&&u.apply(this,arguments))},o.onOptionAdd=function(e,t){-1===n.options.indexOf(t)&&(n.options.push(t),c&&c.apply(this,arguments))},n.options?n.options.splice(0,n.options.length,s(n.options)):n.options=s(angular.copy(n.ngModel));var d=o.onInitialize;o.onInitialize=function(){(i=e[0].selectize).addOption(n.options),i.setValue(n.ngModel),d&&d(i),n.$watch("options",function(){n.disableOnChange=!0,i.clearOptions(),i.addOption(n.options),i.setValue(n.ngModel),n.disableOnChange=!1},!0),n.$watchCollection("ngModel",l),n.$watch("ngDisabled",a)},e.selectize(o),e.on("$destroy",function(){i&&(i.destroy(),e=null)})}}}]),function(e,t){"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof exports?t(require("jquery")):(t(e.jquery),e.bootstrapSwitch={})}(this,function(e){"use strict";var t,n=(t=e)&&t.__esModule?t:{default:t},r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i=function(){function r(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),s=n.default||window.jQuery||window.$,l=function(){function t(r){var i=this,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t),this.$element=s(r),this.options=s.extend({},s.fn.bootstrapSwitch.defaults,this._getElementOptions(),e),this.prevOptions={},this.$wrapper=s("<div>",{class:function(){var e=[];return e.push(i.options.state?"on":"off"),i.options.size&&e.push(i.options.size),i.options.disabled&&e.push("disabled"),i.options.readonly&&e.push("readonly"),i.options.indeterminate&&e.push("indeterminate"),i.options.inverse&&e.push("inverse"),i.$element.attr("id")&&e.push("id-"+i.$element.attr("id")),e.map(i._getClass.bind(i)).concat([i.options.baseClass],i._getClasses(i.options.wrapperClass)).join(" ")}}),this.$container=s("<div>",{class:this._getClass("container")}),this.$on=s("<span>",{html:this.options.onText,class:this._getClass("handle-on")+" "+this._getClass(this.options.onColor)}),this.$off=s("<span>",{html:this.options.offText,class:this._getClass("handle-off")+" "+this._getClass(this.options.offColor)}),this.$label=s("<span>",{html:this.options.labelText,class:this._getClass("label")}),this.$element.on("init.bootstrapSwitch",this.options.onInit.bind(this,r)),this.$element.on("switchChange.bootstrapSwitch",function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];!1===i.options.onSwitchChange.apply(r,t)&&(i.$element.is(":radio")?s('[name="'+i.$element.attr("name")+'"]').trigger("previousState.bootstrapSwitch",!0):i.$element.trigger("previousState.bootstrapSwitch",!0))}),this.$container=this.$element.wrap(this.$container).parent(),this.$wrapper=this.$container.wrap(this.$wrapper).parent(),this.$element.before(this.options.inverse?this.$off:this.$on).before(this.$label).before(this.options.inverse?this.$on:this.$off),this.options.indeterminate&&this.$element.prop("indeterminate",!0),this._init(),this._elementHandlers(),this._handleHandlers(),this._labelHandlers(),this._formHandler(),this._externalLabelHandler(),this.$element.trigger("init.bootstrapSwitch",this.options.state)}return i(t,[{key:"setPrevOptions",value:function(){this.prevOptions=r({},this.options)}},{key:"state",value:function(e,t){return void 0===e?this.options.state:(this.options.disabled||this.options.readonly||this.options.state&&!this.options.radioAllOff&&this.$element.is(":radio")||(this.$element.is(":radio")?s('[name="'+this.$element.attr("name")+'"]').trigger("setPreviousOptions.bootstrapSwitch"):this.$element.trigger("setPreviousOptions.bootstrapSwitch"),this.options.indeterminate&&this.indeterminate(!1),this.$element.prop("checked",!!e).trigger("change.bootstrapSwitch",t)),this.$element)}},{key:"toggleState",value:function(e){return this.options.disabled||this.options.readonly?this.$element:this.options.indeterminate?(this.indeterminate(!1),this.state(!0)):this.$element.prop("checked",!this.options.state).trigger("change.bootstrapSwitch",e)}},{key:"size",value:function(e){return void 0===e?this.options.size:(null!=this.options.size&&this.$wrapper.removeClass(this._getClass(this.options.size)),e&&this.$wrapper.addClass(this._getClass(e)),this._width(),this._containerPosition(),this.options.size=e,this.$element)}},{key:"animate",value:function(e){return void 0===e?this.options.animate:this.options.animate===!!e?this.$element:this.toggleAnimate()}},{key:"toggleAnimate",value:function(){return this.options.animate=!this.options.animate,this.$wrapper.toggleClass(this._getClass("animate")),this.$element}},{key:"disabled",value:function(e){return void 0===e?this.options.disabled:this.options.disabled===!!e?this.$element:this.toggleDisabled()}},{key:"toggleDisabled",value:function(){return this.options.disabled=!this.options.disabled,this.$element.prop("disabled",this.options.disabled),this.$wrapper.toggleClass(this._getClass("disabled")),this.$element}},{key:"readonly",value:function(e){return void 0===e?this.options.readonly:this.options.readonly===!!e?this.$element:this.toggleReadonly()}},{key:"toggleReadonly",value:function(){return this.options.readonly=!this.options.readonly,this.$element.prop("readonly",this.options.readonly),this.$wrapper.toggleClass(this._getClass("readonly")),this.$element}},{key:"indeterminate",value:function(e){return void 0===e?this.options.indeterminate:this.options.indeterminate===!!e?this.$element:this.toggleIndeterminate()}},{key:"toggleIndeterminate",value:function(){return this.options.indeterminate=!this.options.indeterminate,this.$element.prop("indeterminate",this.options.indeterminate),this.$wrapper.toggleClass(this._getClass("indeterminate")),this._containerPosition(),this.$element}},{key:"inverse",value:function(e){return void 0===e?this.options.inverse:this.options.inverse===!!e?this.$element:this.toggleInverse()}},{key:"toggleInverse",value:function(){this.$wrapper.toggleClass(this._getClass("inverse"));var e=this.$on.clone(!0),t=this.$off.clone(!0);return this.$on.replaceWith(t),this.$off.replaceWith(e),this.$on=t,this.$off=e,this.options.inverse=!this.options.inverse,this.$element}},{key:"onColor",value:function(e){return void 0===e?this.options.onColor:(this.options.onColor&&this.$on.removeClass(this._getClass(this.options.onColor)),this.$on.addClass(this._getClass(e)),this.options.onColor=e,this.$element)}},{key:"offColor",value:function(e){return void 0===e?this.options.offColor:(this.options.offColor&&this.$off.removeClass(this._getClass(this.options.offColor)),this.$off.addClass(this._getClass(e)),this.options.offColor=e,this.$element)}},{key:"onText",value:function(e){return void 0===e?this.options.onText:(this.$on.html(e),this._width(),this._containerPosition(),this.options.onText=e,this.$element)}},{key:"offText",value:function(e){return void 0===e?this.options.offText:(this.$off.html(e),this._width(),this._containerPosition(),this.options.offText=e,this.$element)}},{key:"labelText",value:function(e){return void 0===e?this.options.labelText:(this.$label.html(e),this._width(),this.options.labelText=e,this.$element)}},{key:"handleWidth",value:function(e){return void 0===e?this.options.handleWidth:(this.options.handleWidth=e,this._width(),this._containerPosition(),this.$element)}},{key:"labelWidth",value:function(e){return void 0===e?this.options.labelWidth:(this.options.labelWidth=e,this._width(),this._containerPosition(),this.$element)}},{key:"baseClass",value:function(){return this.options.baseClass}},{key:"wrapperClass",value:function(e){return void 0===e?this.options.wrapperClass:(e||(e=s.fn.bootstrapSwitch.defaults.wrapperClass),this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" ")),this.$wrapper.addClass(this._getClasses(e).join(" ")),this.options.wrapperClass=e,this.$element)}},{key:"radioAllOff",value:function(e){if(void 0===e)return this.options.radioAllOff;var t=!!e;return this.options.radioAllOff===t||(this.options.radioAllOff=t),this.$element}},{key:"onInit",value:function(e){return void 0===e?this.options.onInit:(e||(e=s.fn.bootstrapSwitch.defaults.onInit),this.options.onInit=e,this.$element)}},{key:"onSwitchChange",value:function(e){return void 0===e?this.options.onSwitchChange:(e||(e=s.fn.bootstrapSwitch.defaults.onSwitchChange),this.options.onSwitchChange=e,this.$element)}},{key:"destroy",value:function(){var e=this.$element.closest("form");return e.length&&e.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),this.$container.children().not(this.$element).remove(),this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),this.$element}},{key:"_getElementOptions",value:function(){return{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),indeterminate:this.$element.data("indeterminate"),inverse:this.$element.data("inverse"),radioAllOff:this.$element.data("radio-all-off"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text"),handleWidth:this.$element.data("handle-width"),labelWidth:this.$element.data("label-width"),baseClass:this.$element.data("base-class"),wrapperClass:this.$element.data("wrapper-class")}}},{key:"_width",value:function(){var n=this,e=this.$on.add(this.$off).add(this.$label).css("width",""),r="auto"===this.options.handleWidth?Math.round(Math.max(this.$on.width(),this.$off.width())):this.options.handleWidth;return e.width(r),this.$label.width(function(e,t){return"auto"===n.options.labelWidth?t<r?r:t:n.options.labelWidth}),this._handleWidth=this.$on.outerWidth(),this._labelWidth=this.$label.outerWidth(),this.$container.width(2*this._handleWidth+this._labelWidth),this.$wrapper.width(this._handleWidth+this._labelWidth)}},{key:"_containerPosition",value:function(){var t=this,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.options.state;arguments[1];this.$container.css("margin-left",function(){var e=[0,"-"+t._handleWidth+"px"];return t.options.indeterminate?"-"+t._handleWidth/2+"px":n?t.options.inverse?e[1]:e[0]:t.options.inverse?e[0]:e[1]})}},{key:"_init",value:function(){var e=this,t=function(){e.setPrevOptions(),e._width(),e._containerPosition(),setTimeout(function(){if(e.options.animate)return e.$wrapper.addClass(e._getClass("animate"))},50)};if(this.$wrapper.is(":visible"))t();else var n=window.setInterval(function(){if(e.$wrapper.is(":visible"))return t(),window.clearInterval(n)},50)}},{key:"_elementHandlers",value:function(){var r=this;return this.$element.on({"setPreviousOptions.bootstrapSwitch":this.setPrevOptions.bind(this),"previousState.bootstrapSwitch":function(){r.options=r.prevOptions,r.options.indeterminate&&r.$wrapper.addClass(r._getClass("indeterminate")),r.$element.prop("checked",r.options.state).trigger("change.bootstrapSwitch",!0)},"change.bootstrapSwitch":function(e,t){e.preventDefault(),e.stopImmediatePropagation();var n=r.$element.is(":checked");r._containerPosition(n),n===r.options.state||(r.options.state=n,r.$wrapper.toggleClass(r._getClass("off")).toggleClass(r._getClass("on")),!t&&(r.$element.is(":radio")&&s('[name="'+r.$element.attr("name")+'"]').not(r.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),r.$element.trigger("switchChange.bootstrapSwitch",[n])))},"focus.bootstrapSwitch":function(e){e.preventDefault(),r.$wrapper.addClass(r._getClass("focused"))},"blur.bootstrapSwitch":function(e){e.preventDefault(),r.$wrapper.removeClass(r._getClass("focused"))},"keydown.bootstrapSwitch":function(e){!e.which||r.options.disabled||r.options.readonly||(37===e.which||39===e.which)&&(e.preventDefault(),e.stopImmediatePropagation(),r.state(39===e.which))}})}},{key:"_handleHandlers",value:function(){var t=this;return this.$on.on("click.bootstrapSwitch",function(e){return e.preventDefault(),e.stopPropagation(),t.state(!1),t.$element.trigger("focus.bootstrapSwitch")}),this.$off.on("click.bootstrapSwitch",function(e){return e.preventDefault(),e.stopPropagation(),t.state(!0),t.$element.trigger("focus.bootstrapSwitch")})}},{key:"_labelHandlers",value:function(){var n=this;this.$label.on({click:function(e){e.stopPropagation()},"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":function(e){n._dragStart||n.options.disabled||n.options.readonly||(e.preventDefault(),e.stopPropagation(),n._dragStart=(e.pageX||e.originalEvent.touches[0].pageX)-parseInt(n.$container.css("margin-left"),10),n.options.animate&&n.$wrapper.removeClass(n._getClass("animate")),n.$element.trigger("focus.bootstrapSwitch"))},"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":function(e){if(null!=n._dragStart){var t=(e.pageX||e.originalEvent.touches[0].pageX)-n._dragStart;e.preventDefault(),t<-n._handleWidth||0<t||(n._dragEnd=t,n.$container.css("margin-left",n._dragEnd+"px"))}},"mouseup.bootstrapSwitch touchend.bootstrapSwitch":function(e){if(n._dragStart){if(e.preventDefault(),n.options.animate&&n.$wrapper.addClass(n._getClass("animate")),n._dragEnd){var t=n._dragEnd>-n._handleWidth/2;n._dragEnd=!1,n.state(n.options.inverse?!t:t)}else n.state(!n.options.state);n._dragStart=!1}},"mouseleave.bootstrapSwitch":function(){n.$label.trigger("mouseup.bootstrapSwitch")}})}},{key:"_externalLabelHandler",value:function(){var t=this,n=this.$element.closest("label");n.on("click",function(e){e.preventDefault(),e.stopImmediatePropagation(),e.target===n[0]&&t.toggleState()})}},{key:"_formHandler",value:function(){var e=this.$element.closest("form");e.data("bootstrap-switch")||e.on("reset.bootstrapSwitch",function(){window.setTimeout(function(){e.find("input").filter(function(){return s(this).data("bootstrap-switch")}).each(function(){return s(this).bootstrapSwitch("state",this.checked)})},1)}).data("bootstrap-switch",!0)}},{key:"_getClass",value:function(e){return this.options.baseClass+"-"+e}},{key:"_getClasses",value:function(e){return s.isArray(e)?e.map(this._getClass.bind(this)):[this._getClass(e)]}}]),t}();s.fn.bootstrapSwitch=function(o){for(var e=arguments.length,a=Array(1<e?e-1:0),t=1;t<e;t++)a[t-1]=arguments[t];return Array.prototype.reduce.call(this,function(e,t){var n=s(t),r=n.data("bootstrap-switch"),i=r||new l(t,o);return r||n.data("bootstrap-switch",i),"string"==typeof o?i[o].apply(i,a):e},this)},s.fn.bootstrapSwitch.Constructor=l,s.fn.bootstrapSwitch.defaults={state:!0,size:null,animate:!0,disabled:!1,readonly:!1,indeterminate:!1,inverse:!1,radioAllOff:!1,onColor:"primary",offColor:"default",onText:"ON",offText:"OFF",labelText:" ",handleWidth:"auto",labelWidth:"auto",baseClass:"bootstrap-switch",wrapperClass:"wrapper",onInit:function(){},onSwitchChange:function(){}}}),function(e,t){"undefined"!=typeof module&&module.exports?("undefined"==typeof angular?t(require("angular")):t(angular),module.exports="ngDialog"):"function"==typeof define&&define.amd?define(["angular"],t):t(e.angular)}(this,function(O){"use strict";var e=O.module("ngDialog",[]),T=O.element,t=O.isDefined,n=(document.body||document.documentElement).style,u=t(n.animation)||t(n.WebkitAnimation)||t(n.MozAnimation)||t(n.MsAnimation)||t(n.OAnimation),c="animationend webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend",r={html:!1,body:!1},E={},A=[],P=!1,M=!1;return e.provider("ngDialog",function(){var C=this.defaults={className:"ngdialog-theme-default",appendClassName:"",disableAnimation:!1,plain:!1,showClose:!0,closeByDocument:!0,closeByEscape:!0,closeByNavigation:!1,appendTo:!1,preCloseCallback:!1,overlay:!0,cache:!0,trapFocus:!0,preserveFocus:!0,ariaAuto:!0,ariaRole:null,ariaLabelledById:null,ariaLabelledBySelector:null,ariaDescribedById:null,ariaDescribedBySelector:null,bodyClassName:"ngdialog-open",width:null,height:null};this.setForceHtmlReload=function(e){r.html=e||!1},this.setForceBodyReload=function(e){r.body=e||!1},this.setDefaults=function(e){O.extend(C,e)},this.setOpenOnePerName=function(e){M=e||!1};var S,k=0,D=0,x={};this.$get=["$document","$templateCache","$compile","$q","$http","$rootScope","$timeout","$window","$controller","$injector",function(n,o,g,a,s,m,v,y,w,l){var b=[],$={onDocumentKeydown:function(e){27===e.keyCode&&_.close("$escape")},activate:function(e){e.data("$ngDialogOptions").trapFocus&&(e.on("keydown",$.onTrapFocusKeydown),b.body.on("keydown",$.onTrapFocusKeydown))},deactivate:function(e){e.off("keydown",$.onTrapFocusKeydown),b.body.off("keydown",$.onTrapFocusKeydown)},deactivateAll:function(e){O.forEach(e,function(e){var t=O.element(e);$.deactivate(t)})},setBodyPadding:function(e){var t=parseInt(b.body.css("padding-right")||0,10);b.body.css("padding-right",t+e+"px"),b.body.data("ng-dialog-original-padding",t),m.$broadcast("ngDialog.setPadding",e)},resetBodyPadding:function(){var e=b.body.data("ng-dialog-original-padding");e?b.body.css("padding-right",e+"px"):b.body.css("padding-right",""),m.$broadcast("ngDialog.setPadding",0)},performCloseDialog:function(e,t){var n=e.data("$ngDialogOptions"),r=e.attr("id"),i=E[r];if(i){if(void 0!==y.Hammer){var o=i.hammerTime;o.off("tap",S),o.destroy&&o.destroy(),delete i.hammerTime}else e.unbind("click");1===D&&b.body.unbind("keydown",$.onDocumentKeydown),e.hasClass("ngdialog-closing")||(D-=1);var a=e.data("$ngDialogPreviousFocus");a&&a.focus&&a.focus(),m.$broadcast("ngDialog.closing",e,t),D=D<0?0:D,u&&!n.disableAnimation?(i.$destroy(),e.unbind(c).bind(c,function(){$.closeDialogElement(e,t)}).addClass("ngdialog-closing")):(i.$destroy(),$.closeDialogElement(e,t)),x[r]&&(x[r].resolve({id:r,value:t,$dialog:e,remainingDialogs:D}),delete x[r]),E[r]&&delete E[r],A.splice(A.indexOf(r),1),A.length||(b.body.unbind("keydown",$.onDocumentKeydown),P=!1)}},closeDialogElement:function(e,t){var n=e.data("$ngDialogOptions");e.remove(),0===D&&(b.html.removeClass(n.bodyClassName),b.body.removeClass(n.bodyClassName),$.resetBodyPadding()),m.$broadcast("ngDialog.closed",e,t)},closeDialog:function(e,t){var n=e.data("$ngDialogPreCloseCallback");if(n&&O.isFunction(n)){var r=n.call(e,t);if(O.isObject(r))r.closePromise?r.closePromise.then(function(){$.performCloseDialog(e,t)},function(){return!1}):r.then(function(){$.performCloseDialog(e,t)},function(){return!1});else{if(!1===r)return!1;$.performCloseDialog(e,t)}}else $.performCloseDialog(e,t)},onTrapFocusKeydown:function(e){var t,n=O.element(e.currentTarget);if(n.hasClass("ngdialog"))t=n;else if(null===(t=$.getActiveDialog()))return;var r=9===e.keyCode,i=!0===e.shiftKey;r&&$.handleTab(t,e,i)},handleTab:function(e,t,n){var r=$.getFocusableElements(e);if(0!==r.length){var i=document.activeElement,o=Array.prototype.indexOf.call(r,i),a=-1===o,s=0===o,l=o===r.length-1,u=!1;n?(a||s)&&(r[r.length-1].focus(),u=!0):(a||l)&&(r[0].focus(),u=!0),u&&(t.preventDefault(),t.stopPropagation())}else document.activeElement&&document.activeElement.blur&&document.activeElement.blur()},autoFocus:function(e){var t=e[0],n=t.querySelector("*[autofocus]");if(null===n||(n.focus(),document.activeElement!==n)){var r=$.getFocusableElements(e);if(0<r.length)r[0].focus();else{var i=$.filterVisibleElements(t.querySelectorAll("h1,h2,h3,h4,h5,h6,p,span"));if(0<i.length){var o=i[0];T(o).attr("tabindex","-1").css("outline","0"),o.focus()}}}},getFocusableElements:function(e){var t=e[0].querySelectorAll("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]"),n=$.filterTabbableElements(t);return $.filterVisibleElements(n)},filterTabbableElements:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"-1"!==T(r).attr("tabindex")&&t.push(r)}return t},filterVisibleElements:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];(0<r.offsetWidth||0<r.offsetHeight)&&t.push(r)}return t},getActiveDialog:function(){var e=document.querySelectorAll(".ngdialog");return 0===e.length?null:T(e[e.length-1])},applyAriaAttributes:function(e,t){if(t.ariaAuto){if(!t.ariaRole){var n=0<$.getFocusableElements(e).length?"dialog":"alertdialog";t.ariaRole=n}t.ariaLabelledBySelector||(t.ariaLabelledBySelector="h1,h2,h3,h4,h5,h6"),t.ariaDescribedBySelector||(t.ariaDescribedBySelector="article,section,p")}t.ariaRole&&e.attr("role",t.ariaRole),$.applyAriaAttribute(e,"aria-labelledby",t.ariaLabelledById,t.ariaLabelledBySelector),$.applyAriaAttribute(e,"aria-describedby",t.ariaDescribedById,t.ariaDescribedBySelector)},applyAriaAttribute:function(e,t,n,r){if(n&&e.attr(t,n),r){var i=e.attr("id"),o=e[0].querySelector(r);if(!o)return;var a=i+"-"+t;return T(o).attr("id",a),e.attr(t,a),a}},detectUIRouter:function(){try{return O.module("ui.router"),!0}catch(e){return!1}},getRouterLocationEventName:function(){return $.detectUIRouter()?"$stateChangeStart":"$locationChangeStart"}},_={__PRIVATE__:$,open:function(e){var u=null;if(e=e||{},!(M&&e.name&&(u=e.name.toLowerCase().replace(/\s/g,"-")+"-dialog",this.isOpen(u)))){var t,c,d,p,h,f=O.copy(C),n=++k;u=u||"ngdialog"+n,A.push(u),void 0!==f.data&&(void 0===e.data&&(e.data={}),e.data=O.merge(O.copy(f.data),e.data)),O.extend(f,e),x[u]=t=a.defer(),E[u]=c=O.isObject(f.scope)?f.scope.$new():m.$new();var r=O.extend({},f.resolve);return O.forEach(r,function(e,t){r[t]=O.isString(e)?l.get(e):l.invoke(e,null,null,t)}),a.all({template:function(e){if(!e)return"Empty template";if(O.isString(e)&&f.plain)return e;return"boolean"!=typeof f.cache||f.cache?i(e,{cache:o}):i(e,{cache:!1})}(f.template||f.templateUrl),locals:a.all(r)}).then(function(e){var t=e.template,n=e.locals;f.showClose&&(t+='<div class="ngdialog-close"></div>');var r,i=f.overlay?"":" ngdialog-no-overlay";if((d=T('<div id="'+u+'" class="ngdialog'+i+'"></div>')).html(f.overlay?'<div class="ngdialog-overlay"></div><div class="ngdialog-content" role="document">'+t+"</div>":'<div class="ngdialog-content" role="document">'+t+"</div>"),d.data("$ngDialogOptions",f),c.ngDialogId=u,f.data&&O.isString(f.data)){var o=f.data.replace(/^\s*/,"")[0];c.ngDialogData="{"===o||"["===o?O.fromJson(f.data):new String(f.data),c.ngDialogData.ngDialogId=u}else f.data&&O.isObject(f.data)&&(c.ngDialogData=f.data,c.ngDialogData.ngDialogId=u);(f.className&&d.addClass(f.className),f.appendClassName&&d.addClass(f.appendClassName),f.width&&(h=d[0].querySelector(".ngdialog-content"),O.isString(f.width)?h.style.width=f.width:h.style.width=f.width+"px"),f.height&&(h=d[0].querySelector(".ngdialog-content"),O.isString(f.height)?h.style.height=f.height:h.style.height=f.height+"px"),f.disableAnimation&&d.addClass("ngdialog-disabled-animation"),p=f.appendTo&&O.isString(f.appendTo)?O.element(document.querySelector(f.appendTo)):b.body,$.applyAriaAttributes(d,f),f.preCloseCallback)&&(O.isFunction(f.preCloseCallback)?r=f.preCloseCallback:O.isString(f.preCloseCallback)&&c&&(O.isFunction(c[f.preCloseCallback])?r=c[f.preCloseCallback]:c.$parent&&O.isFunction(c.$parent[f.preCloseCallback])?r=c.$parent[f.preCloseCallback]:m&&O.isFunction(m[f.preCloseCallback])&&(r=m[f.preCloseCallback])),r&&d.data("$ngDialogPreCloseCallback",r));if(c.closeThisDialog=function(e){$.closeDialog(d,e)},f.controller&&(O.isString(f.controller)||O.isArray(f.controller)||O.isFunction(f.controller))){var a;f.controllerAs&&O.isString(f.controllerAs)&&(a=f.controllerAs);var s=w(f.controller,O.extend(n,{$scope:c,$element:d}),!0,a);f.bindToController&&O.extend(s.instance,{ngDialogId:c.ngDialogId,ngDialogData:c.ngDialogData,closeThisDialog:c.closeThisDialog,confirm:c.confirm}),"function"==typeof s?d.data("$ngDialogControllerController",s()):d.data("$ngDialogControllerController",s)}if(v(function(){var e=document.querySelectorAll(".ngdialog");$.deactivateAll(e),g(d)(c);var t=y.innerWidth-b.body.prop("clientWidth");b.html.addClass(f.bodyClassName),b.body.addClass(f.bodyClassName);var n=t-(y.innerWidth-b.body.prop("clientWidth"));0<n&&$.setBodyPadding(n),p.append(d),$.activate(d),f.trapFocus&&$.autoFocus(d),f.name?m.$broadcast("ngDialog.opened",{dialog:d,name:f.name}):m.$broadcast("ngDialog.opened",d)}),P||(b.body.bind("keydown",$.onDocumentKeydown),P=!0),f.closeByNavigation){var l=$.getRouterLocationEventName();m.$on(l,function(e){!1===$.closeDialog(d)&&e.preventDefault()})}(f.preserveFocus&&d.data("$ngDialogPreviousFocus",document.activeElement),S=function(e){var t=!!f.closeByDocument&&T(e.target).hasClass("ngdialog-overlay"),n=T(e.target).hasClass("ngdialog-close");(t||n)&&_.close(d.attr("id"),n?"$closeButton":"$document")},void 0!==y.Hammer)?(c.hammerTime=y.Hammer(d[0])).on("tap",S):d.bind("click",S);return D+=1,_}),{id:u,closePromise:t.promise,close:function(e){$.closeDialog(d,e)}}}function i(t,e){return(e=e||{}).headers=e.headers||{},O.extend(e.headers,{Accept:"text/html"}),m.$broadcast("ngDialog.templateLoading",t),s.get(t,e).then(function(e){return m.$broadcast("ngDialog.templateLoaded",t),e.data||""})}},openConfirm:function(e){var n=a.defer(),t=O.copy(C);e=e||{},void 0!==t.data&&(void 0===e.data&&(e.data={}),e.data=O.merge(O.copy(t.data),e.data)),O.extend(t,e),t.scope=O.isObject(t.scope)?t.scope.$new():m.$new(),t.scope.confirm=function(e){n.resolve(e);var t=T(document.getElementById(r.id));$.performCloseDialog(t,e)};var r=_.open(t);if(r)return r.closePromise.then(function(e){return e?n.reject(e.value):n.reject()}),n.promise},isOpen:function(e){return 0<T(document.getElementById(e)).length},close:function(e,t){var n=T(document.getElementById(e));if(n.length)$.closeDialog(n,t);else if("$escape"===e){var r=A[A.length-1];(n=T(document.getElementById(r))).data("$ngDialogOptions").closeByEscape&&$.closeDialog(n,"$escape")}else _.closeAll(t);return _},closeAll:function(e){for(var t=document.querySelectorAll(".ngdialog"),n=t.length-1;0<=n;n--){var r=t[n];$.closeDialog(T(r),e)}},getOpenDialogs:function(){return A},getDefaults:function(){return C}};return O.forEach(["html","body"],function(e){if(b[e]=n.find(e),r[e]){var t=$.getRouterLocationEventName();m.$on(t,function(){b[e]=n.find(e)})}}),_}]}),e.directive("ngDialog",["ngDialog",function(o){return{restrict:"A",scope:{ngDialogScope:"="},link:function(r,e,i){e.on("click",function(e){e.preventDefault();var t=O.isDefined(r.ngDialogScope)?r.ngDialogScope:"noScope";O.isDefined(i.ngDialogClosePrevious)&&o.close(i.ngDialogClosePrevious);var n=o.getDefaults();o.open({template:i.ngDialog,className:i.ngDialogClass||n.className,appendClassName:i.ngDialogAppendClass,controller:i.ngDialogController,controllerAs:i.ngDialogControllerAs,bindToController:i.ngDialogBindToController,disableAnimation:i.ngDialogDisableAnimation,scope:t,data:i.ngDialogData,showClose:"false"!==i.ngDialogShowClose&&("true"===i.ngDialogShowClose||n.showClose),closeByDocument:"false"!==i.ngDialogCloseByDocument&&("true"===i.ngDialogCloseByDocument||n.closeByDocument),closeByEscape:"false"!==i.ngDialogCloseByEscape&&("true"===i.ngDialogCloseByEscape||n.closeByEscape),overlay:"false"!==i.ngDialogOverlay&&("true"===i.ngDialogOverlay||n.overlay),preCloseCallback:i.ngDialogPreCloseCallback||n.preCloseCallback,bodyClassName:i.ngDialogBodyClass||n.bodyClassName})})}}}]),e}),angular.module("ui-notification",[]),angular.module("ui-notification").provider("Notification",function(){this.options={delay:5e3,startTop:10,startRight:10,verticalSpacing:10,horizontalSpacing:10,positionX:"right",positionY:"top",replaceMessage:!1,templateUrl:"angular-ui-notification.html",onClose:void 0,closeOnClick:!0,maxCount:0,container:"body",priority:10},this.setOptions=function(e){if(!angular.isObject(e))throw new Error("Options should be an object!");this.options=angular.extend({},this.options,e)},this.$get=["$timeout","$http","$compile","$templateCache","$rootScope","$injector","$sce","$q","$window",function(u,r,c,i,o,e,f,a,g){var m=this.options,v=m.startTop,y=m.startRight,w=m.verticalSpacing,b=m.horizontalSpacing,s=m.delay,$=[],_=!1,t=function(h,e){function t(e){function t(t){["-webkit-transition","-o-transition","transition"].forEach(function(e){i.css(e,t)})}var n=h.scope.$new();n.message=f.trustAsHtml(h.message),n.title=f.trustAsHtml(h.title),n.t=h.type.substr(0,1),n.delay=h.delay,n.onClose=h.onClose;var d=function(e,t){return e._priority-t._priority},p=function(e,t){return t._priority-e._priority},r=function(){var e=0,t=0,n=y,r=[];"top"===h.positionY?$.sort(d):"bottom"===h.positionY&&$.sort(p);for(var i=$.length-1;0<=i;i--){var o=$[i];if(h.replaceMessage&&i<$.length-1)o.addClass("killed");else{var a=parseInt(o[0].offsetHeight),s=parseInt(o[0].offsetWidth),l=r[o._positionY+o._positionX];u+a>window.innerHeight&&(l=v,t++,e=0);var u=l?0===e?l:l+w:v,c=n+t*(b+s);o.css(o._positionY,u+"px"),"center"==o._positionX?o.css("left",parseInt(window.innerWidth/2-s/2)+"px"):o.css(o._positionX,c+"px"),r[o._positionY+o._positionX]=u+a,0<m.maxCount&&$.length>m.maxCount&&0===i&&o.scope().kill(!0),e++}}},i=c(e)(n);i._positionY=h.positionY,i._positionX=h.positionX,i._priority=h.priority,i.addClass(h.type);var o=function(e){("click"===(e=e.originalEvent||e).type||"opacity"===e.propertyName&&1<=e.elapsedTime)&&(n.onClose&&n.$apply(n.onClose(i)),i.remove(),$.splice($.indexOf(i),1),n.$destroy(),r())};h.closeOnClick&&(i.addClass("clickable"),i.bind("click",o)),i.bind("webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd",o),angular.isNumber(h.delay)&&u(function(){i.addClass("killed")},h.delay),t("none"),angular.element(document.querySelector(h.container)).append(i);var a=-(parseInt(i[0].offsetHeight)+50);if(i.css(i._positionY,a+"px"),$.push(i),"center"==h.positionX){var s=parseInt(i[0].offsetWidth);i.css("left",parseInt(window.innerWidth/2-s/2)+"px")}u(function(){t("")}),n._templateElement=i,n.kill=function(e){e?(n.onClose&&n.$apply(n.onClose(n._templateElement)),$.splice($.indexOf(n._templateElement),1),n._templateElement.remove(),n.$destroy(),u(r)):n._templateElement.addClass("killed")},u(r),_||(angular.element(g).bind("resize",function(e){u(r)}),_=!0),l.resolve(n)}var l=a.defer();"object"==typeof h&&null!==h||(h={message:h}),h.scope=h.scope?h.scope:o,h.template=h.templateUrl?h.templateUrl:m.templateUrl,h.delay=angular.isUndefined(h.delay)?s:h.delay,h.type=e||h.type||m.type||"",h.positionY=h.positionY?h.positionY:m.positionY,h.positionX=h.positionX?h.positionX:m.positionX,h.replaceMessage=h.replaceMessage?h.replaceMessage:m.replaceMessage,h.onClose=h.onClose?h.onClose:m.onClose,h.closeOnClick=null!==h.closeOnClick&&void 0!==h.closeOnClick?h.closeOnClick:m.closeOnClick,h.container=h.container?h.container:m.container,h.priority=h.priority?h.priority:m.priority;var n=i.get(h.template);return n?t(n):r.get(h.template,{cache:!0}).then(function(e){t(e.data)}).catch(function(e){throw new Error("Template ("+h.template+") could not be loaded. "+e)}),l.promise};return t.primary=function(e){return this(e,"primary")},t.error=function(e){return this(e,"error")},t.success=function(e){return this(e,"success")},t.info=function(e){return this(e,"info")},t.warning=function(e){return this(e,"warning")},t.clearAll=function(){angular.forEach($,function(e){e.addClass("killed")})},t}]}),angular.module("ui-notification").run(["$templateCache",function(e){e.put("angular-ui-notification.html",'<div class="ui-notification"><h3 ng-show="title" ng-bind-html="title"></h3><div class="message" ng-bind-html="message"></div></div>')}]),function(){var w="__default";angular.module("angularUtils.directives.dirPagination",[]).directive("dirPaginate",["$compile","$parse","paginationService",function(m,v,y){return{terminal:!0,multiElement:!0,priority:100,compile:function(e,t){var f=t.dirPaginate,n=f.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),r=/\|\s*itemsPerPage\s*:\s*(.*\(\s*\w*\)|([^\)]*?(?=\s+as\s+))|[^\)]*)/;if(null===n[2].match(r))throw"pagination directive: the 'itemsPerPage' filter must be set.";var i=n[2].replace(r,""),g=v(i);o=e,angular.forEach(o,function(e){1===e.nodeType&&angular.element(e).attr("dir-paginate-no-compile",!0)});var o;var a=t.paginationId||w;return y.registerInstance(a),function(e,t,n){var r=v(n.paginationId)(e)||n.paginationId||w;y.registerInstance(r);var i,o,a,s,l,u,c,d=(u=r,c=!!(l=f).match(/(\|\s*itemsPerPage\s*:[^|]*:[^|]*)/),u===w||c?l:l.replace(/(\|\s*itemsPerPage\s*:\s*[^|\s]*)/,"$1 : '"+u+"'"));o=n,a=d,(i=t)[0].hasAttribute("dir-paginate-start")||i[0].hasAttribute("data-dir-paginate-start")?(o.$set("ngRepeatStart",a),i.eq(i.length-1).attr("ng-repeat-end",!0)):o.$set("ngRepeat",a),s=t,angular.forEach(s,function(e){1===e.nodeType&&angular.element(e).removeAttr("dir-paginate-no-compile")}),s.eq(0).removeAttr("dir-paginate-start").removeAttr("dir-paginate").removeAttr("data-dir-paginate-start").removeAttr("data-dir-paginate"),s.eq(s.length-1).removeAttr("dir-paginate-end").removeAttr("data-dir-paginate-end");var p=m(t),h=function(e,t,n){var r;if(t.currentPage)r=v(t.currentPage);else{var i=(n+"__currentPage").replace(/\W/g,"_");e[i]=1,r=v(i)}return r}(e,n,r);y.setCurrentPageParser(r,h,e),void 0!==n.totalItems?(y.setAsyncModeTrue(r),e.$watch(function(){return v(n.totalItems)(e)},function(e){0<=e&&y.setCollectionLength(r,e)})):(y.setAsyncModeFalse(r),e.$watchCollection(function(){return g(e)},function(e){if(e){var t=e instanceof Array?e.length:Object.keys(e).length;y.setCollectionLength(r,t)}})),p(e)}}}}]).directive("dirPaginateNoCompile",function(){return{priority:5e3,terminal:!0}}).directive("dirPaginationControls",["paginationService","paginationTemplate",function(d,n){var p=/^\d+$/,e={restrict:"AE",scope:{maxSize:"=?",onPageChange:"&?",paginationId:"=?",autoHide:"=?"},link:function(r,e,t){var n=t.paginationId||w,i=r.paginationId||t.paginationId||w;if(!d.isRegistered(i)&&!d.isRegistered(n)){var o=i!==w?" (id: "+i+") ":" ";window.console&&console.warn("Pagination directive: the pagination controls"+o+"cannot be used without the corresponding pagination directive, which was not found at link time.")}r.maxSize||(r.maxSize=9);r.autoHide=void 0===r.autoHide||r.autoHide,r.directionLinks=!angular.isDefined(t.directionLinks)||r.$parent.$eval(t.directionLinks),r.boundaryLinks=!!angular.isDefined(t.boundaryLinks)&&r.$parent.$eval(t.boundaryLinks);var a=Math.max(r.maxSize,5);function s(e){if(d.isRegistered(i)&&c(e)){var t=r.pagination.current;r.pages=h(e,d.getCollectionLength(i),d.getItemsPerPage(i),a),r.pagination.current=e,u(),r.onPageChange&&r.onPageChange({newPageNumber:e,oldPageNumber:t})}}function l(){if(d.isRegistered(i)){var e=parseInt(d.getCurrentPage(i))||1;r.pages=h(e,d.getCollectionLength(i),d.getItemsPerPage(i),a),r.pagination.current=e,r.pagination.last=r.pages[r.pages.length-1],r.pagination.last<r.pagination.current?r.setCurrent(r.pagination.last):u()}}function u(){if(d.isRegistered(i)){var e=d.getCurrentPage(i),t=d.getItemsPerPage(i),n=d.getCollectionLength(i);r.range.lower=(e-1)*t+1,r.range.upper=Math.min(e*t,n),r.range.total=n}}function c(e){return p.test(e)&&0<e&&e<=r.pagination.last}r.pages=[],r.pagination={last:1,current:1},r.range={lower:1,upper:1,total:1},r.$watch("maxSize",function(e){e&&(a=Math.max(r.maxSize,5),l())}),r.$watch(function(){if(d.isRegistered(i))return(d.getCollectionLength(i)+1)*d.getItemsPerPage(i)},function(e){0<e&&l()}),r.$watch(function(){if(d.isRegistered(i))return d.getItemsPerPage(i)},function(e,t){e!=t&&void 0!==t&&s(r.pagination.current)}),r.$watch(function(){if(d.isRegistered(i))return d.getCurrentPage(i)},function(e,t){e!=t&&s(e)}),r.setCurrent=function(e){d.isRegistered(i)&&c(e)&&(e=parseInt(e,10),d.setCurrentPage(i,e))},r.tracker=function(e,t){return e+"_"+t}}},t=n.getString();void 0!==t?e.template=t:e.templateUrl=function(e,t){return t.templateUrl||n.getPath()};return e;function h(e,t,n,r){var i,o=[],a=Math.ceil(t/n),s=Math.ceil(r/2);i=e<=s?"start":a-s<e?"end":"middle";for(var l=r<a,u=1;u<=a&&u<=r;){var c=f(u,e,r,a),d=2===u&&("middle"===i||"end"===i),p=u===r-1&&("middle"===i||"start"===i);l&&(d||p)?o.push("..."):o.push(c),u++}return o}function f(e,t,n,r){var i=Math.ceil(n/2);return e===n?r:1===e?e:n<r?r-i<t?r-n+e:i<t?t-i+e:e:e}}]).filter("itemsPerPage",["paginationService",function(a){return function(t,e,n){if(void 0===n&&(n=w),!a.isRegistered(n))throw"pagination directive: the itemsPerPage id argument (id: "+n+") does not match a registered pagination-id.";var r,i;if(angular.isObject(t)){if(e=parseInt(e)||9999999999,i=a.isAsyncMode(n)?0:(a.getCurrentPage(n)-1)*e,r=i+e,a.setItemsPerPage(n,e),t instanceof Array)return t.slice(i,r);var o={};return angular.forEach(function(e){{if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}}(t).slice(i,r),function(e){o[e]=t[e]}),o}return t}}]).service("paginationService",function(){var t,r={};this.registerInstance=function(e){void 0===r[e]&&(r[e]={asyncMode:!1},t=e)},this.deregisterInstance=function(e){delete r[e]},this.isRegistered=function(e){return void 0!==r[e]},this.getLastInstanceId=function(){return t},this.setCurrentPageParser=function(e,t,n){r[e].currentPageParser=t,r[e].context=n},this.setCurrentPage=function(e,t){r[e].currentPageParser.assign(r[e].context,t)},this.getCurrentPage=function(e){var t=r[e].currentPageParser;return t?t(r[e].context):1},this.setItemsPerPage=function(e,t){r[e].itemsPerPage=t},this.getItemsPerPage=function(e){return r[e].itemsPerPage},this.setCollectionLength=function(e,t){r[e].collectionLength=t},this.getCollectionLength=function(e){return r[e].collectionLength},this.setAsyncModeTrue=function(e){r[e].asyncMode=!0},this.setAsyncModeFalse=function(e){r[e].asyncMode=!1},this.isAsyncMode=function(e){return r[e].asyncMode}}).provider("paginationTemplate",function(){var t,n="angularUtils.directives.dirPagination.template";this.setPath=function(e){n=e},this.setString=function(e){t=e},this.$get=function(){return{getPath:function(){return n},getString:function(){return t}}}}).run(["$templateCache",function(e){e.put("angularUtils.directives.dirPagination.template",'<ul class="pagination" ng-if="1 < pages.length || !autoHide"><li ng-if="boundaryLinks" ng-class="{ disabled : pagination.current == 1 }"><a href="" ng-click="setCurrent(1)">«</a></li><li ng-if="directionLinks" ng-class="{ disabled : pagination.current == 1 }"><a href="" ng-click="setCurrent(pagination.current - 1)">‹</a></li><li ng-repeat="pageNumber in pages track by tracker(pageNumber, $index)" ng-class="{ active : pagination.current == pageNumber, disabled : pageNumber == \'...\' || ( ! autoHide && pages.length === 1 ) }"><a href="" ng-click="setCurrent(pageNumber)">{{ pageNumber }}</a></li><li ng-if="directionLinks" ng-class="{ disabled : pagination.current == pagination.last }"><a href="" ng-click="setCurrent(pagination.current + 1)">›</a></li><li ng-if="boundaryLinks" ng-class="{ disabled : pagination.current == pagination.last }"><a href="" ng-click="setCurrent(pagination.last)">»</a></li></ul>')}])}();var com_github_culmat_jsTreeTable=function(){function l(e,r,i){return i=i||"children",$.each(e,function(e,t){!function n(e){e[i]&&$.each(e[i],function(e,t){n(t)}),r(e)}(t)}),e}function t(e,n,o,a){var t=e;n=n||"id",o=o||"parent",a=a||"children";var s=[];$.each(t,function(e,t){s[t[n]]=t});var l=[];return $.each(t,function(e,r){var t=r[o];if($.isArray(t)||(t=[t]),0==t.length)l.push(r);else{var i=!1;$.each(t,function(e,t){var n=s[t];n&&(n[a]||(n[a]=[]),$.inArray(r,n[a])<0&&n[a].push(r),i=!0)}),i||l.push(r)}}),l}function u(e,u,c,d,p,t){u=u||"children",c=c||"id",t=t||{};var n=0,r=$("<table>");$.each(t,function(e,t){"class"==e&&"jsTT"!=t?r.addClass(t):r.attr(e,t)});var i=$("<thead>"),o=$("<tr>"),h=$("<tbody>");return r.append(i),i.append(o),r.append(h),d?$.each(d,function(e,t){$(o).append($("<th>"+t+"</th>"))}):($(o).append($("<th>"+c+"</th>")),$.each(e[0],function(e,t){e!=u&&e!=c&&$(o).append($("<th>"+e+"</th>"))})),function o(e,a,s,l){n=Math.max(n,s),$.each(e,function(e,n){var r,t,i;n["data-tt-level"]=s,r=n,t=l,i=$("<tr>"),$(i).attr("data-tt-id",r[c]),$(i).attr("data-tt-level",r["data-tt-level"]),r[u]&&0!=r[u].length?$(i).attr("data-tt-isnode",!0):$(i).attr("data-tt-isleaf",!0),t&&$(i).attr("data-tt-parent-id",t[c]),p?p($(i),r):d?$.each(d,function(e,t){$(i).append($("<td>"+r[e]+"</td>"))}):($(i).append($("<td>"+r[c]+"</td>")),$.each(r,function(e,t){e!=u&&e!=c&&"data-tt-level"!=e&&$(i).append($("<td>"+t+"</td>"))})),h.append(i),n[a]&&$.each(n[a],function(e,t){o([t],a,s+1,n)})})}(e,u,1),e[0]&&(e[0].maxLevel=n),r}function n(e,t){return $.each(e,function(e,n){$.each(t,function(e,t){n[t]=$(n).attr(t)})}),e}function c(i){i.addClass("jsTT"),i.expandLevel=function(n){$("tr[data-tt-level]",i).each(function(e){var t=parseInt($(this).attr("data-tt-level"));n-1<t?this.trCollapse(!0):t==n-1&&this.trExpand(!0)})},$("tr[data-tt-id]",i).each(function(e,t){(t=$(t)).attr("data-tt-level",function e(t){var n=t.attr("data-tt-level");if(null!=n)return parseInt(n);var r=t.attr("data-tt-parent-id");return null==r?0:e($('tr[data-tt-id="'+r+'"]',i).first())+1}(t))});var e=$("tr[data-tt-level]",i).get();$.each(e,function(e,t){t.trChildrenVisible=!0,t.trChildren=[]}),e=t(e=n(e,["data-tt-id","data-tt-parent-id"]),"data-tt-id","data-tt-parent-id","trChildren");var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHFJREFUeNpi/P//PwMlgImBQsA44C6gvhfa29v3MzAwOODRc6CystIRbxi0t7fjDJjKykpGYrwwi1hxnLHQ3t7+jIGBQRJJ6HllZaUUKYEYRYBPOB0gBShKwKGA////48VtbW3/8clTnBIH3gCKkzJgAGvBX0dDm0sCAAAAAElFTkSuQmCC";return $("tr[data-tt-level]",i).each(function(e,t){var n=$(t).attr("data-tt-level"),r=$("td",t).first();0<t.trChildren.length?r.prepend($('<img id="state" style="cursor:pointer" src="'+o+'"/>')):r.prepend($('<span style="padding-left:16px;" /></span>')),r.prepend($('<span style="padding-left:'+15*parseInt(n-1)+'px;" /></span>')),t.trExpand=function(e){if(!(this.trChildren.length<1)){e&&(this.trChildrenVisible=!0,$("#state",this).get(0).src=o);var n=e||this.trChildrenVisible;$.each(this.trChildren,function(e,t){n&&$(t).css("display","table-row"),t.trExpand()})}},t.trCollapse=function(e){this.trChildren.length<1||(e&&(this.trChildrenVisible=!1,$("#state",this).get(0).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHlJREFUeNrcU1sNgDAQ6wgmcAM2MICGGlg1gJnNzWQcvwQGy1j4oUl/7tH0mpwzM7SgQyO+EZAUWh2MkkzSWhJwuRAlHYsJwEwyvs1gABDuzqoJcTw5qxaIJN0bgQRgIjnlmn1heSO5PE6Y2YXe+5Cr5+h++gs12AcAS6FS+7YOsj4AAAAASUVORK5CYII="),$.each(this.trChildren,function(e,t){$(t).css("display","none"),t.trCollapse()}))},$(t).click(function(){this.trChildrenVisible?this.trCollapse(!0):this.trExpand(!0)})}),i}return{depthFirst:l,makeTree:t,renderTree:u,attr2attr:n,treeTable:c,appendTreetable:function(e,t){(t=t||{}).idAttr=t.idAttr||"id",t.childrenAttr=t.childrenAttr||"children";var n=t.controls||[];t.mountPoint||(t.mountPoint=$("body")),t.depthFirst&&l(e,t.depthFirst,t.childrenAttr);var r=u(e,t.childrenAttr,t.idAttr,t.renderedAttr,t.renderer,t.tableAttributes);c(r),t.replaceContent&&t.mountPoint.html("");var i,o,a=t.initialExpandLevel?parseInt(t.initialExpandLevel):-1;if(a=Math.min(a,e[0].maxLevel),r.expandLevel(a),t.slider){var s=$('<div style="margin-right: 15px;">');s.width("200px"),s.slider({min:1,max:e[0].maxLevel,range:"min",value:a,slide:function(e,t){r.expandLevel(t.value)}}),n=[s].concat(t.controls)}return 0<n.length&&t.mountPoint.append((i=n,o=$("<tr>"),$.each(i,function(e,t){o.append($('<td style="padding-right: 20px;">').append(t))}),$('<table border="0"/>').append(o))),t.mountPoint.append(r),r},jsTreeTable:"1.0",register:function(n){$.each(this,function(e,t){"register"!=e&&(n[e]=t)})}}}();