(function(n,t){var f=t.isDefined,r=t.isUndefined,e=t.isNumber,i=t.isObject,o=t.isArray,s=t.isString,h=t.extend,u=t.toJson;t.module("LocalStorageModule",[]).provider("localStorageService",function(){this.prefix="ls";this.storageType="localStorage";this.cookie={expiry:30,path:"/",secure:!1};this.defaultToCookie=!0;this.notify={setItem:!0,removeItem:!1};this.setPrefix=function(n){return this.prefix=n,this};this.setStorageType=function(n){return this.storageType=n,this};this.setDefaultToCookie=function(n){return this.defaultToCookie=!!n,this};this.setStorageCookie=function(n,t,i){return this.cookie.expiry=n,this.cookie.path=t,this.cookie.secure=i,this};this.setStorageCookieDomain=function(n){return this.cookie.domain=n,this};this.setNotify=function(n,t){return this.notify={setItem:n,removeItem:t},this};this.$get=["$rootScope","$window","$document","$parse","$timeout",function(n,t,c,l,a){function ut(i){if(i||(i=t.event),tt.setItem&&s(i.key)&&pt(i.key)){var r=st(i.key);a(function(){n.$broadcast("LocalStorageModule.notification.changed",{key:r,newvalue:i.newValue,storageType:v.storageType})})}}var v=this,y=v.prefix,nt=v.cookie,tt=v.notify,k=v.storageType,b,vt,yt;c?c[0]&&(c=c[0]):c=document;y.substr(-1)!=="."&&(y=!y?"":y+".");var d=function(n){return y+n},st=function(n){return n.replace(new RegExp("^"+y,"g"),"")},pt=function(n){return n.indexOf(y)===0},ht=function(){try{var i=k in t&&t[k]!==null,r=d("__"+Math.round(Math.random()*1e7));return i&&(b=t[k],b.setItem(r,""),b.removeItem(r)),i}catch(u){return v.defaultToCookie&&(k="cookie"),n.$broadcast("LocalStorageModule.notification.error",u.message),!1}},p=ht(),ft=function(t,i,f){var e=g();try{if(w(f),i=r(i)?null:u(i),!p&&v.defaultToCookie||v.storageType==="cookie")return p||n.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),tt.setItem&&n.$broadcast("LocalStorageModule.notification.setitem",{key:t,newvalue:i,storageType:"cookie"}),it(t,i);try{b&&b.setItem(d(t),i);tt.setItem&&n.$broadcast("LocalStorageModule.notification.setitem",{key:t,newvalue:i,storageType:v.storageType})}catch(o){return n.$broadcast("LocalStorageModule.notification.error",o.message),it(t,i)}return!0}finally{w(e)}},ct=function(t,i){var u=g(),r;try{if(w(i),!p&&v.defaultToCookie||v.storageType==="cookie")return p||n.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),at(t);if(r=b?b.getItem(d(t)):null,!r||r==="null")return null;try{return JSON.parse(r)}catch(f){return r}}finally{w(u)}},lt=function(){var u=g(),r,i,t;try{for(r=0,arguments.length>=1&&(arguments[arguments.length-1]==="localStorage"||arguments[arguments.length-1]==="sessionStorage")&&(r=1,w(arguments[arguments.length-1])),i=0;i<arguments.length-r;i++)if(t=arguments[i],!p&&v.defaultToCookie||v.storageType==="cookie")p||n.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),tt.removeItem&&n.$broadcast("LocalStorageModule.notification.removeitem",{key:t,storageType:"cookie"}),rt(t);else try{b.removeItem(d(t));tt.removeItem&&n.$broadcast("LocalStorageModule.notification.removeitem",{key:t,storageType:v.storageType})}catch(f){n.$broadcast("LocalStorageModule.notification.error",f.message);rt(t)}}finally{w(u)}},wt=function(t){var f=g(),i,r,u;try{if(w(t),!p)return n.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),[];i=y.length;r=[];for(u in b)if(u.substr(0,i)===y)try{r.push(u.substr(i))}catch(e){return n.$broadcast("LocalStorageModule.notification.error",e.Description),[]}return r}finally{w(f)}},bt=function(t,i){var o=g(),f,e,u,r;try{if(w(i),f=!y?new RegExp:new RegExp("^"+y),e=!t?new RegExp:new RegExp(t),!p&&v.defaultToCookie||v.storageType==="cookie")return p||n.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),ot();if(!p&&!v.defaultToCookie)return!1;u=y.length;for(r in b)if(f.test(r)&&e.test(r.substr(u)))try{lt(r.substr(u))}catch(s){return n.$broadcast("LocalStorageModule.notification.error",s.message),ot()}return!0}finally{w(o)}},et=function(){try{return t.navigator.cookieEnabled||"cookie"in c&&(c.cookie.length>0||(c.cookie="test").indexOf.call(c.cookie,"test")>-1)}catch(i){return n.$broadcast("LocalStorageModule.notification.error",i.message),!1}}(),it=function(t,f,s,h){var y;if(r(f))return!1;if((o(f)||i(f))&&(f=u(f)),!et)return n.$broadcast("LocalStorageModule.notification.error","COOKIES_NOT_SUPPORTED"),!1;try{var a="",l=new Date,v="";f===null?(l.setTime(l.getTime()+-864e5),a="; expires="+l.toGMTString(),f=""):e(s)&&s!==0?(l.setTime(l.getTime()+s*864e5),a="; expires="+l.toGMTString()):nt.expiry!==0&&(l.setTime(l.getTime()+nt.expiry*864e5),a="; expires="+l.toGMTString());!t||(y="; path="+nt.path,nt.domain&&(v="; domain="+nt.domain),typeof h=="boolean"?h===!0&&(v+="; secure"):nt.secure===!0&&(v+="; secure"),c.cookie=d(t)+"="+encodeURIComponent(f)+a+y+v)}catch(p){return n.$broadcast("LocalStorageModule.notification.error",p.message),!1}return!0},at=function(t){var f,r,i,u,e;if(!et)return n.$broadcast("LocalStorageModule.notification.error","COOKIES_NOT_SUPPORTED"),!1;for(f=c.cookie&&c.cookie.split(";")||[],r=0;r<f.length;r++){for(i=f[r];i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(d(t)+"=")===0){u=decodeURIComponent(i.substring(y.length+t.length+1,i.length));try{return e=JSON.parse(u),typeof e=="number"?u:e}catch(o){return u}}}return null},rt=function(n){it(n,null)},ot=function(){for(var n=null,u=y.length,i=c.cookie.split(";"),r,t=0;t<i.length;t++){for(n=i[t];n.charAt(0)===" ";)n=n.substring(1,n.length);r=n.substring(u,n.indexOf("="));rt(r)}},g=function(){return k},w=function(n){return n&&k!==n&&(k=n,p=ht()),p},kt=function(n,t,r,u,e){u=u||t;var o=ct(u,e);return o===null&&f(r)?o=r:i(o)&&i(r)&&(o=h(o,r)),l(t).assign(n,o),n.$watch(t,function(n){ft(u,n,e)},i(n[t]))};return p&&(t.addEventListener?(t.addEventListener("storage",ut,!1),n.$on("$destroy",function(){t.removeEventListener("storage",ut)})):t.attachEvent&&(t.attachEvent("onstorage",ut),n.$on("$destroy",function(){t.detachEvent("onstorage",ut)}))),vt=function(n){var f=g(),r,u,i;try{for(w(n),r=0,u=t[k],i=0;i<u.length;i++)u.key(i).indexOf(y)===0&&r++;return r}finally{w(f)}},yt=function(n){y=n},{isSupported:p,getStorageType:g,setStorageType:w,setPrefix:yt,set:ft,add:ft,get:ct,keys:wt,remove:lt,clearAll:bt,bind:kt,deriveKey:d,underiveKey:st,length:vt,defaultToCookie:this.defaultToCookie,cookie:{isSupported:et,set:it,add:it,get:at,remove:rt,clearAll:ot}}}]})})(window,window.angular),function(){"use strict";var n=angular.module("angularModalService",[]);n.factory("ModalService",["$animate","$document","$compile","$controller","$http","$rootScope","$q","$templateRequest","$timeout",function(n,t,i,r,u,f,e,o,s){function c(){var u=this,c=function(n,t){var i=e.defer();return n?i.resolve(n):t?o(t,!0).then(function(n){i.resolve(n)},function(n){i.reject(n)}):i.reject("No template or templateUrl has been specified."),i.promise},t=function(t,i){var r=t.children();return r.length>0?n.enter(i,t,r[r.length-1]):n.enter(i,t)};u.showModal=function(u){var o=e.defer(),l=u.controller;return l?(c(u.template,u.templateUrl).then(function(c){var a=(u.scope||f).$new(),y=e.defer(),k=e.defer(),v={$scope:a,close:function(t,i){(i===undefined||i===null)&&(i=0);s(function(){y.resolve(t);n.leave(l).then(function(){k.resolve(t);a.$destroy();v.close=null;o=null;y=null;b=null;v=null;l=null;a=null})},i)}},d,l,p,w,b;u.inputs&&angular.extend(v,u.inputs);d=i(c);l=d(a);v.$element=l;p=a[u.controllerAs];w=r(u.controller,v,!1,u.controllerAs);u.controllerAs&&p&&angular.extend(w,p);u.appendElement?t(u.appendElement,l):t(h,l);b={controller:w,scope:a,element:l,close:y.promise,closed:k.promise};o.resolve(b)}).then(null,function(n){o.reject(n)}),o.promise):(o.reject("No controller has been specified."),o.promise)}}var h=t.find("body");return new c}])}(),function(n,t){typeof define=="function"&&define.amd?define([],function(){return t()}):typeof exports=="object"?module.exports=t():t()}(this,function(){function t(n){"use strict";var i=n.storageKey(),t=n.storage(),r=function(){var r=n.preferredLanguage();angular.isString(r)?n.use(r):t.put(i,n.use())};r.displayName="fallbackFromIncorrectStorageValue";t?t.get(i)?n.use(t.get(i))["catch"](r):r():angular.isString(n.preferredLanguage())&&n.use(n.preferredLanguage())}function h(){"use strict";var t,i=null,u=!1,f=!1,n;n={sanitize:function(n,t){return t==="text"&&(n=o(n)),n},escape:function(n,t){return t==="text"&&(n=e(n)),n},sanitizeParameters:function(n,t){return t==="params"&&(n=r(n,o)),n},escapeParameters:function(n,t){return t==="params"&&(n=r(n,e)),n}};n.escaped=n.escapeParameters;this.addStrategy=function(t,i){return n[t]=i,this};this.removeStrategy=function(t){return delete n[t],this};this.useStrategy=function(n){return u=!0,i=n,this};this.$get=["$injector","$log",function(r,e){var o={},s=function(t,i,u){return angular.forEach(u,function(u){if(angular.isFunction(u))t=u(t,i);else if(angular.isFunction(n[u]))t=n[u](t,i);else if(angular.isString(n[u])){if(!o[n[u]])try{o[n[u]]=r.get(n[u])}catch(f){o[n[u]]=function(){};throw new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+u+"'");}t=o[n[u]](t,i)}else throw new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+u+"'");}),t},h=function(){u||f||(e.warn("pascalprecht.translate.$translateSanitization: No sanitization strategy has been configured. This can have serious security implications. See http://angular-translate.github.io/docs/#/guide/19_security for details."),f=!0)};return r.has("$sanitize")&&(t=r.get("$sanitize")),{useStrategy:function(n){return function(t){n.useStrategy(t)}}(this),sanitize:function(n,t,r){if(i||h(),arguments.length<3&&(r=i),!r)return n;var u=angular.isArray(r)?r:[r];return s(n,t,u)}}}];var e=function(n){var t=angular.element("<div><\/div>");return t.text(n),t.html()},o=function(n){if(!t)throw new Error("pascalprecht.translate.$translateSanitization: Error cannot find $sanitize service. Either include the ngSanitize module (https://docs.angularjs.org/api/ngSanitize) or use a sanitization strategy which does not depend on $sanitize, such as 'escape'.");return t(n)},r=function(n,t){if(angular.isObject(n)){var i=angular.isArray(n)?[]:{};return angular.forEach(n,function(n,u){i[u]=r(n,t)}),i}return angular.isNumber(n)?n:t(n)}}function i(n,t,i,r){"use strict";var e={},o,b=[],k,u,nt,f,l,a,tt=n,rt,s,pt,ut=[],h,ft="translate-cloak",et,d,g,wt=!1,it=!1,v=".",ot=!1,y,st=0,ht=!0,ct="default",bt={"default":function(n){return(n||"").split("-").join("_")},java:function(n){var i=(n||"").split("-").join("_"),t=i.split("_");return t.length>1?t[0].toLowerCase()+"_"+t[1].toUpperCase():i},bcp47:function(n){var i=(n||"").split("_").join("-"),t=i.split("-");return t.length>1?t[0].toLowerCase()+"-"+t[1].toUpperCase():i}},ni="2.8.1",kt=function(){if(angular.isFunction(r.getLocale))return r.getLocale();var u=t.$get().navigator,f=["language","browserLanguage","systemLanguage","userLanguage"],n,i;if(angular.isArray(u.languages))for(n=0;n<u.languages.length;n++)if(i=u.languages[n],i&&i.length)return i;for(n=0;n<f.length;n++)if(i=u[f[n]],i&&i.length)return i;return null},lt,w,at,vt,yt;kt.displayName="angular-translate/service: getFirstBrowserLanguage";lt=function(){var n=kt()||"";return bt[ct]&&(n=bt[ct](n)),n};lt.displayName="angular-translate/service: getLocale";var c=function(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},dt=function(){return this.toString().replace(/^\s+|\s+$/g,"")},gt=function(n){for(var i=[],s=angular.lowercase(n),u=0,h=b.length,f,t,e,o,r;u<h;u++)i.push(angular.lowercase(b[u]));if(c(i,s)>-1)return n;if(k)for(t in k)if(e=!1,o=Object.prototype.hasOwnProperty.call(k,t)&&angular.lowercase(t)===angular.lowercase(n),t.slice(-1)==="*"&&(e=t.slice(0,-1)===n.slice(0,t.length-1)),(o||e)&&(f=k[t],c(i,angular.lowercase(f))>-1))return f;return n&&(r=n.split("_"),r.length>1&&c(i,angular.lowercase(r[0]))>-1)?r[0]:n},p=function(n,t){if(!n&&!t)return e;if(n&&!t){if(angular.isString(n))return e[n]}else angular.isObject(e[n])||(e[n]={}),angular.extend(e[n],w(t));return this};this.translations=p;this.cloakClassName=function(n){return n?(ft=n,this):ft};this.nestedObjectDelimeter=function(n){return n?(v=n,this):v};w=function(n,t,i,r){var u,e,o,f;t||(t=[]);i||(i={});for(u in n)Object.prototype.hasOwnProperty.call(n,u)&&(f=n[u],angular.isObject(f)?w(f,t.concat(u),i,u):(e=t.length?""+t.join(v)+v+u:u,t.length&&u===r&&(o=""+t.join(v),i[o]="@:"+e),i[e]=f));return i};w.displayName="flatObject";this.addInterpolation=function(n){return ut.push(n),this};this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")};this.useInterpolation=function(n){return pt=n,this};this.useSanitizeValueStrategy=function(n){return i.useStrategy(n),this};this.preferredLanguage=function(n){return n?(at(n),this):o};at=function(n){return n&&(o=n),o};this.translationNotFoundIndicator=function(n){return this.translationNotFoundIndicatorLeft(n),this.translationNotFoundIndicatorRight(n),this};this.translationNotFoundIndicatorLeft=function(n){return n?(d=n,this):d};this.translationNotFoundIndicatorRight=function(n){return n?(g=n,this):g};this.fallbackLanguage=function(n){return vt(n),this};vt=function(n){return n?(angular.isString(n)?(nt=!0,u=[n]):angular.isArray(n)&&(nt=!1,u=n),angular.isString(o)&&c(u,o)<0&&u.push(o),this):nt?u[0]:u};this.use=function(n){if(n){if(!e[n]&&!h)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+n+"'");return f=n,this}return f};yt=function(n){return n?(tt=n,this):rt?rt+tt:tt};this.storageKey=yt;this.useUrlLoader=function(n,t){return this.useLoader("$translateUrlLoader",angular.extend({url:n},t))};this.useStaticFilesLoader=function(n){return this.useLoader("$translateStaticFilesLoader",n)};this.useLoader=function(n,t){return h=n,et=t||{},this};this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")};this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")};this.useStorage=function(n){return a=n,this};this.storagePrefix=function(n){return n?(rt=n,this):n};this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")};this.useMissingTranslationHandler=function(n){return s=n,this};this.usePostCompiling=function(n){return wt=!!n,this};this.forceAsyncReload=function(n){return it=!!n,this};this.uniformLanguageTag=function(n){return n?angular.isString(n)&&(n={standard:n}):n={},ct=n.standard,this};this.determinePreferredLanguage=function(n){var t=n&&angular.isFunction(n)?n():lt();return o=b.length?gt(t):t,this};this.registerAvailableLanguageKeys=function(n,t){return n?(b=n,t&&(k=t),this):b};this.useLoaderCache=function(n){return n===!1?y=undefined:n===!0?y=!0:typeof n=="undefined"?y="$translationCache":n&&(y=n),this};this.directivePriority=function(n){return n===undefined?st:(st=n,this)};this.statefulFilter=function(n){return n===undefined?ht:(ht=n,this)};this.$get=["$log","$injector","$rootScope","$q",function(n,t,i,r){var lt,ri=t.get(pt||"$translateDefaultInterpolation"),rt=!1,ct={},k={},ti,bt,b=function(n,t,i,e){var v,s,h,l;return angular.isArray(n)?(v=function(n){for(var f={},o=[],h=function(n){var u=r.defer(),o=function(t){f[n]=t;u.resolve([n,t])};return b(n,t,i,e).then(o,o),u.promise},u=0,s=n.length;u<s;u++)o.push(h(n[u]));return r.all(o).then(function(){return f})},v(n)):(s=r.defer(),n&&(n=dt.apply(n)),h=function(){var n=o?k[o]:k[f],t,i;return ti=0,a&&!n&&(t=lt.get(tt),n=k[t],u&&u.length&&(i=c(u,t),ti=i===0?1:0,c(u,o)<0&&u.push(o))),n}(),h?(l=function(){wi(n,t,i,e).then(s.resolve,s.reject)},l.displayName="promiseResolved",h["finally"](l,s.reject)):wi(n,t,i,e).then(s.resolve,s.reject),s.promise)},ui=function(n){return d&&(n=[d,n].join(" ")),g&&(n=[n,g].join(" ")),n},fi=function(n){f=n;a&&lt.put(b.storageKey(),f);i.$emit("$translateChangeSuccess",{language:n});ri.setLocale(f);var t=function(n,t){ct[t].setLocale(f)};t.displayName="eachInterpolatorLocaleSetter";angular.forEach(ct,t);i.$emit("$translateChangeEnd",{language:n})},kt=function(n){var f,u,s,e,o;if(!n)throw"No language key specified for loading.";return f=r.defer(),i.$emit("$translateLoadingStart",{language:n}),rt=!0,u=y,typeof u=="string"&&(u=t.get(u)),s=angular.extend({},et,{key:n,$http:angular.extend({},{cache:u},et.$http)}),e=function(t){var r={};i.$emit("$translateLoadingSuccess",{language:n});angular.isArray(t)?angular.forEach(t,function(n){angular.extend(r,w(n))}):angular.extend(r,w(t));rt=!1;f.resolve({key:n,table:r});i.$emit("$translateLoadingEnd",{language:n})},e.displayName="onLoaderSuccess",o=function(n){i.$emit("$translateLoadingError",{language:n});f.reject(n);i.$emit("$translateLoadingEnd",{language:n})},o.displayName="onLoaderError",t.get(h)(s).then(e,o),f.promise},hi,ii,ci,li,ki,oi,di,si;if(a&&(lt=t.get(a),!lt.get||!lt.put))throw new Error("Couldn't use storage '"+a+"', missing get() or put() method!");ut.length&&(hi=function(n){var i=t.get(n);i.setLocale(o||f);ct[i.getInterpolationIdentifier()]=i},hi.displayName="interpolationFactoryAdder",angular.forEach(ut,hi));var gi=function(n){var t=r.defer(),i;return Object.prototype.hasOwnProperty.call(e,n)?t.resolve(e[n]):k[n]?(i=function(n){p(n.key,n.table);t.resolve(n.table)},i.displayName="translationTableResolver",k[n].then(i,t.reject)):t.reject(),t.promise},ai=function(n,t,i,u){var e=r.defer(),o=function(r){if(Object.prototype.hasOwnProperty.call(r,t)){u.setLocale(n);var o=r[t];o.substr(0,2)==="@:"?ai(n,o.substr(2),i,u).then(e.resolve,e.reject):e.resolve(u.interpolate(r[t],i));u.setLocale(f)}else e.reject()};return o.displayName="fallbackTranslationResolver",gi(n).then(o,e.reject),e.promise},vi=function(n,t,i,r){var u,o=e[n];if(o&&Object.prototype.hasOwnProperty.call(o,t)){if(r.setLocale(n),u=r.interpolate(o[t],i),u.substr(0,2)==="@:")return vi(n,u.substr(2),i,r);r.setLocale(f)}return u},ei=function(n,i){if(s){var r=t.get(s)(n,f,i);return r!==undefined?r:n}return n},yi=function(n,t,i,f,e){var o=r.defer(),s;return n<u.length?(s=u[n],ai(s,t,i,f).then(o.resolve,function(){yi(n+1,t,i,f,e).then(o.resolve)})):e?o.resolve(e):o.resolve(ei(t,i)),o.promise},pi=function(n,t,i,r){var f,e;return n<u.length&&(e=u[n],f=vi(e,t,i,r),f||(f=pi(n+1,t,i,r))),f},nr=function(n,t,i,r){return yi(bt>0?bt:ti,n,t,i,r)},tr=function(n,t,i){return pi(bt>0?bt:ti,n,t,i)},wi=function(n,t,i,o){var h=r.defer(),l=f?e[f]:e,v=i?ct[i]:ri,c,a;return l&&Object.prototype.hasOwnProperty.call(l,n)?(c=l[n],c.substr(0,2)==="@:"?b(c.substr(2),t,i,o).then(h.resolve,h.reject):h.resolve(v.interpolate(c,t))):(s&&!rt&&(a=ei(n,t)),f&&u&&u.length?nr(n,t,v,o).then(function(n){h.resolve(n)},function(n){h.reject(ui(n))}):s&&!rt&&a?o?h.resolve(o):h.resolve(a):o?h.resolve(o):h.reject(ui(n))),h.promise},bi=function(n,t,i){var r,h=f?e[f]:e,c=ri,o,l;return ct&&Object.prototype.hasOwnProperty.call(ct,i)&&(c=ct[i]),h&&Object.prototype.hasOwnProperty.call(h,n)?(o=h[n],r=o.substr(0,2)==="@:"?bi(o.substr(2),t,i):c.interpolate(o,t)):(s&&!rt&&(l=ei(n,t)),f&&u&&u.length?(ti=0,r=tr(n,t,c)):r=s&&!rt&&l?l:ui(n)),r},ir=function(n){l===n&&(l=undefined);k[n]=undefined};if(b.preferredLanguage=function(n){return n&&at(n),o},b.cloakClassName=function(){return ft},b.nestedObjectDelimeter=function(){return v},b.fallbackLanguage=function(n){if(n!==undefined&&n!==null){if(vt(n),h&&u&&u.length)for(var t=0,i=u.length;t<i;t++)k[u[t]]||(k[u[t]]=kt(u[t]));b.use(b.use())}return nt?u[0]:u},b.useFallbackLanguage=function(n){if(n!==undefined&&n!==null)if(n){var t=c(u,n);t>-1&&(bt=t)}else bt=0},b.proposedLanguage=function(){return l},b.storage=function(){return lt},b.use=function(n){var t,u;return n?(t=r.defer(),i.$emit("$translateChangeStart",{language:n}),u=gt(n),u&&(n=u),(it||!e[n])&&h&&!k[n]?(l=n,k[n]=kt(n).then(function(i){return p(i.key,i.table),t.resolve(i.key),l===n&&fi(i.key),i},function(n){return i.$emit("$translateChangeError",{language:n}),t.reject(n),i.$emit("$translateChangeEnd",{language:n}),r.reject(n)}),k[n]["finally"](function(){ir(n)})):l===n&&k[n]?k[n].then(function(n){return t.resolve(n.key),n},function(n){return t.reject(n),r.reject(n)}):(t.resolve(n),fi(n)),t.promise):f},b.storageKey=function(){return yt()},b.isPostCompilingEnabled=function(){return wt},b.isForceAsyncReloadEnabled=function(){return it},b.refresh=function(n){function y(){o.resolve();i.$emit("$translateRefreshEnd",{language:n})}function c(){o.reject();i.$emit("$translateRefreshEnd",{language:n})}var o,s,l,t,w,a,v;if(!h)throw new Error("Couldn't refresh translation table, no loader registered!");if(o=r.defer(),i.$emit("$translateRefreshStart",{language:n}),n)e[n]?(v=function(t){p(t.key,t.table);n===f&&fi(f);y()},v.displayName="refreshPostProcessor",kt(n).then(v,c)):c();else{if(s=[],l={},u&&u.length)for(t=0,w=u.length;t<w;t++)s.push(kt(u[t])),l[u[t]]=!0;f&&!l[f]&&s.push(kt(f));a=function(n){e={};angular.forEach(n,function(n){p(n.key,n.table)});f&&fi(f);y()};a.displayName="refreshPostProcessor";r.all(s).then(a,c)}return o.promise},b.instant=function(n,t,i){var a,c,y,r,h,l,p,v;if(n===null||angular.isUndefined(n))return n;if(angular.isArray(n)){for(a={},c=0,y=n.length;c<y;c++)a[n[c]]=b.instant(n[c],t,i);return a}if(angular.isString(n)&&n.length<1)return n;for(n&&(n=dt.apply(n)),h=[],o&&h.push(o),f&&h.push(f),u&&u.length&&(h=h.concat(u)),l=0,p=h.length;l<p;l++)if(v=h[l],e[v]&&(typeof e[v][n]!="undefined"?r=bi(n,t,i):(d||g)&&(r=ui(n))),typeof r!="undefined")break;return r||r===""||(r=ri.interpolate(n,t),s&&!rt&&(r=ei(n,t))),r},b.versionInfo=function(){return ni},b.loaderCache=function(){return y},b.directivePriority=function(){return st},b.statefulFilter=function(){return ht},b.isReady=function(){return ot},ii=r.defer(),ii.promise.then(function(){ot=!0}),b.onReady=function(n){var t=r.defer();return angular.isFunction(n)&&t.promise.then(n),ot?t.resolve():ii.promise.then(t.resolve),t.promise},ci=i.$on("$translateReady",function(){ii.resolve();ci();ci=null}),li=i.$on("$translateChangeEnd",function(){ii.resolve();li();li=null}),h){if(angular.equals(e,{})&&b.use()&&b.use(b.use()),u&&u.length)for(ki=function(n){return p(n.key,n.table),i.$emit("$translateChangeEnd",{language:n.key}),n},oi=0,di=u.length;oi<di;oi++)si=u[oi],(it||!e[si])&&(k[si]=kt(si).then(ki))}else i.$emit("$translateReady",{language:b.use()});return b}]}function r(n,t){"use strict";var i={},r,u="default";return i.setLocale=function(n){r=n},i.getInterpolationIdentifier=function(){return u},i.useSanitizeValueStrategy=function(n){return t.useStrategy(n),this},i.interpolate=function(i,r){r=r||{};r=t.sanitize(r,"params");var u=n(i)(r);return t.sanitize(u,"text")},i}function u(t,i,r,u,f,e){"use strict";var o=function(){return this.toString().replace(/^\s+|\s+$/g,"")};return{restrict:"AE",scope:!0,priority:t.directivePriority(),compile:function(i,s){var c=s.translateValues?s.translateValues:undefined,l=s.translateInterpolation?s.translateInterpolation:undefined,h=i[0].outerHTML.match(/translate-value-+/i),a="^(.*)("+r.startSymbol()+".*"+r.endSymbol()+")(.*)",v="^(.*)"+r.startSymbol()+"(.*)"+r.endSymbol()+"(.*)";return function(i,y,p){var nt,g,it,d,rt;i.interpolateParams={};i.preText="";i.postText="";i.translateNamespace=n(i);var w={},ut=function(n,t,r){var u,e;if(t.translateValues&&angular.extend(n,f(t.translateValues)(i.$parent)),h)for(u in r)Object.prototype.hasOwnProperty.call(t,u)&&u.substr(0,14)==="translateValue"&&u!=="translateValues"&&(e=angular.lowercase(u.substr(14,1))+u.substr(15),n[e]=r[u])},b=function(n){var f,t,u;angular.isFunction(b._unwatchOld)&&(b._unwatchOld(),b._unwatchOld=undefined);angular.equals(n,"")||!angular.isDefined(n)?(f=o.apply(y.text()),t=f.match(a),angular.isArray(t)?(i.preText=t[1],i.postText=t[3],w.translate=r(t[2])(i.$parent),u=f.match(v),angular.isArray(u)&&u[2]&&u[2].length&&(b._unwatchOld=i.$watch(u[2],function(n){w.translate=n;k()}))):w.translate=f):w.translate=n;k()},ft=function(n){p.$observe(n,function(t){w[n]=t;k()})};ut(i.interpolateParams,p,s);nt=!0;p.$observe("translate",function(n){typeof n=="undefined"?b(""):n===""&&nt||(w.translate=n,k());nt=!1});for(g in p)p.hasOwnProperty(g)&&g.substr(0,13)==="translateAttr"&&ft(g);if(p.$observe("translateDefault",function(n){i.defaultText=n}),c&&p.$observe("translateValues",function(n){n&&i.$parent.$watch(function(){angular.extend(i.interpolateParams,f(n)(i.$parent))})}),h){it=function(n){p.$observe(n,function(t){var r=angular.lowercase(n.substr(14,1))+n.substr(15);i.interpolateParams[r]=t})};for(d in p)Object.prototype.hasOwnProperty.call(p,d)&&d.substr(0,14)==="translateValue"&&d!=="translateValues"&&it(d)}var k=function(){for(var n in w)w.hasOwnProperty(n)&&w[n]!==undefined&&et(n,w[n],i,i.interpolateParams,i.defaultText,i.translateNamespace)},et=function(n,i,r,u,f,e){i?(e&&i.charAt(0)==="."&&(i=e+i),t(i,u,l,f).then(function(t){tt(t,r,!0,n)},function(t){tt(t,r,!1,n)})):tt(i,r,!1,n)},tt=function(n,i,r,f){var e;if(f==="translate"){r||typeof i.defaultText=="undefined"||(n=i.defaultText);y.empty().append(i.preText+n+i.postText);var h=t.isPostCompilingEnabled(),o=typeof s.translateCompile!="undefined",c=o&&s.translateCompile!=="false";(h&&!o||c)&&u(y.contents())(i)}else r||typeof i.defaultText=="undefined"||(n=i.defaultText),e=p.$attr[f],e.substr(0,5)==="data-"&&(e=e.substr(5)),e=e.substr(15),y.attr(e,n)};(c||h||p.translateDefault)&&i.$watch("interpolateParams",k,!0);rt=e.$on("$translateChangeSuccess",k);y.text().length?p.translate?b(p.translate):b(""):p.translate&&b(p.translate);k();i.$on("$destroy",rt)}}}}function n(t){"use strict";return t.translateNamespace?t.translateNamespace:t.$parent?n(t.$parent):void 0}function f(n){"use strict";return{compile:function(t){var i=function(){t.addClass(n.cloakClassName())},r=function(){t.removeClass(n.cloakClassName())};n.onReady(function(){r()});return i(),function(t,u,f){f.translateCloak&&f.translateCloak.length&&f.$observe("translateCloak",function(t){n(t).then(r,i)})}}}}function s(){"use strict";return{restrict:"A",scope:!0,compile:function(){return{pre:function(t,i,r){t.translateNamespace=n(t);t.translateNamespace&&r.translateNamespace.charAt(0)==="."?t.translateNamespace+=r.translateNamespace:t.translateNamespace=r.translateNamespace}}}}}function n(t){"use strict";return t.translateNamespace?t.translateNamespace:t.$parent?n(t.$parent):void 0}function e(n,t){"use strict";var i=function(i,r,u){return angular.isObject(r)||(r=n(r)(this)),t.instant(i,r,u)};return t.statefulFilter()&&(i.$stateful=!0),i}function o(n){"use strict";return n("translations")}return angular.module("pascalprecht.translate",["ng"]).run(t),t.$inject=["$translate"],t.displayName="runTranslate",angular.module("pascalprecht.translate").provider("$translateSanitization",h),angular.module("pascalprecht.translate").constant("pascalprechtTranslateOverrider",{}).provider("$translate",i),i.$inject=["$STORAGE_KEY","$windowProvider","$translateSanitizationProvider","pascalprechtTranslateOverrider"],i.displayName="displayName",angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",r),r.$inject=["$interpolate","$translateSanitization"],r.displayName="$translateDefaultInterpolation",angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY"),angular.module("pascalprecht.translate").directive("translate",u),u.$inject=["$translate","$q","$interpolate","$compile","$parse","$rootScope"],u.displayName="translateDirective",angular.module("pascalprecht.translate").directive("translateCloak",f),f.$inject=["$translate"],f.displayName="translateCloakDirective",angular.module("pascalprecht.translate").directive("translateNamespace",s),s.displayName="translateNamespaceDirective",angular.module("pascalprecht.translate").filter("translate",e),e.$inject=["$parse","$translate"],e.displayName="translateFilterFactory",angular.module("pascalprecht.translate").factory("$translationCache",o),o.$inject=["$cacheFactory"],o.displayName="$translationCache","pascalprecht.translate"}),function(n,t){typeof define=="function"&&define.amd?define([],function(){return t()}):typeof exports=="object"?module.exports=t():t()}(this,function(){function n(n,t){"use strict";return function(i){if(!i||!i.url)throw new Error("Couldn't use urlLoader since no url is given!");var r={};return r[i.queryParameter||"lang"]=i.key,t(angular.extend({url:i.url,params:r,method:"GET"},i.$http)).then(function(n){return n.data},function(){return n.reject(i.key)})}}return angular.module("pascalprecht.translate").factory("$translateUrlLoader",n),n.$inject=["$q","$http"],n.displayName="$translateUrlLoader","pascalprecht.translate"}),function(n,t){typeof define=="function"&&define.amd?define([],function(){return t()}):typeof exports=="object"?module.exports=t():t()}(this,function(){function n(n,t){"use strict";return function(i){var r;if(!i||!angular.isArray(i.files)&&(!angular.isString(i.prefix)||!angular.isString(i.suffix)))throw new Error("Couldn't load static files, no files and prefix or suffix specified!");i.files||(i.files=[{prefix:i.prefix,suffix:i.suffix}]);var e=function(r){if(!r||!angular.isString(r.prefix)||!angular.isString(r.suffix))throw new Error("Couldn't load static file, no prefix or suffix specified!");return t(angular.extend({url:[r.prefix,i.key,r.suffix].join(""),method:"GET",params:""},i.$http)).then(function(n){return n.data},function(){return n.reject(i.key)})},u=n.defer(),f=[],o=i.files.length;for(r=0;r<o;r++)f.push(e({prefix:i.files[r].prefix,key:i.key,suffix:i.files[r].suffix}));return n.all(f).then(function(n){for(var f=n.length,r={},i,t=0;t<f;t++)for(i in n[t])r[i]=n[t][i];u.resolve(r)},function(n){u.reject(n)}),u.promise}}return angular.module("pascalprecht.translate").factory("$translateStaticFilesLoader",n),n.$inject=["$q","$http"],n.displayName="$translateStaticFilesLoader","pascalprecht.translate"});typeof module!="undefined"&&typeof exports!="undefined"&&module.exports===exports&&(module.exports="ui.router"),function(n,t,i){"use strict";function w(n,t){return r(new(r(function(){},{prototype:n})),t)}function k(n){return f(arguments,function(t){t!==n&&f(t,function(t,i){n.hasOwnProperty(i)||(n[i]=t)})}),n}function bt(n,t){var r=[],i;for(i in n.path){if(n.path[i]!==t.path[i])break;r.push(n.path[i])}return r}function p(n){if(Object.keys)return Object.keys(n);var t=[];return f(n,function(n,i){t.push(i)}),t}function h(n,t){if(Array.prototype.indexOf)return n.indexOf(t,Number(arguments[2])||0);var r=n.length>>>0,i=Number(arguments[2])||0;for(i=i<0?Math.ceil(i):Math.floor(i),i<0&&(i+=r);i<r;i++)if(i in n&&n[i]===t)return i;return-1}function rt(n,t,i,u){var o=bt(i,u),f,c={},l=[],s,e;for(s in o)if(o[s].params&&(f=p(o[s].params),f.length))for(e in f)h(l,f[e])>=0||(l.push(f[e]),c[f[e]]=n[f[e]]);return r({},c,t)}function d(n,t,i){var f,r,u;if(!i){i=[];for(f in n)i.push(f)}for(r=0;r<i.length;r++)if(u=i[r],n[u]!=t[u])return!1;return!0}function g(n,t){var i={};return f(n,function(n){i[n]=t[n]}),i}function kt(n){var t={},i=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return f(i,function(i){i in n&&(t[i]=n[i])}),t}function b(n){var i={},r=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1)),t;for(t in n)h(r,t)==-1&&(i[t]=n[t]);return i}function nt(n,t){var r=a(n),i=r?[]:{};return f(n,function(n,u){t(n,u)&&(i[r?i.length:u]=n)}),i}function y(n,t){var i=a(n)?[]:{};return f(n,function(n,r){i[r]=t(n,r)}),i}function ut(n,t){var s=1,c=2,o={},a=[],v=o,y=r(n.when(o),{$$promises:o,$$values:o});this.study=function(o){function tt(n,i){if(g[i]!==c){if(d.push(i),g[i]===s){d.splice(0,h(d,i));throw new Error("Cyclic dependency: "+d.join(" -> "));}if(g[i]=s,e(n))w.push(i,[function(){return t.get(n)}],a);else{var r=t.annotate(n);f(r,function(n){n!==i&&o.hasOwnProperty(n)&&tt(o[n],n)});w.push(i,n,r)}d.pop();g[i]=c}}function it(n){return l(n)&&n.then&&n.$$promises}if(!l(o))throw new Error("'invocables' must be an object");var nt=p(o||{}),w=[],d=[],g={};return f(o,tt),o=d=g=null,function(e,o,s){function d(){--ft||(rt||k(c,o.$$values),h.$$values=c,h.$$promises=h.$$promises||!0,delete h.$$inheritedValues,g.resolve(c))}function tt(n){h.$$failure=n;g.reject(n)}function et(i,r,o){function v(n){l.reject(n);tt(n)}function y(){if(!u(h.$$failure))try{l.resolve(t.invoke(r,s,c));l.promise.then(function(n){c[i]=n;d()},v)}catch(n){v(n)}}var l=n.defer(),a=0;f(o,function(n){p.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(a++,p[n].then(function(t){c[n]=t;--a||y()},v))});a||y();p[i]=l.promise}var a,ut;if(it(e)&&s===i&&(s=o,o=e,e=null),e){if(!l(e))throw new Error("'locals' must be an object");}else e=v;if(o){if(!it(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()");}else o=y;var g=n.defer(),h=g.promise,p=h.$$promises={},c=r({},e),ft=1+w.length/3,rt=!1;if(u(o.$$failure))return tt(o.$$failure),h;for(o.$$inheritedValues&&k(c,b(o.$$inheritedValues,nt)),r(p,o.$$promises),o.$$values?(rt=k(c,b(o.$$values,nt)),h.$$inheritedValues=b(o.$$values,nt),d()):(o.$$inheritedValues&&(h.$$inheritedValues=b(o.$$inheritedValues,nt)),o.then(d,tt)),a=0,ut=w.length;a<ut;a+=3)e.hasOwnProperty(w[a])?d():et(w[a],w[a+1],w[a+2]);return h}};this.resolve=function(n,t,i,r){return this.study(n)(t,i,r)}}function ft(n,t,i){this.fromConfig=function(n,t,i){return u(n.template)?this.fromString(n.template,t):u(n.templateUrl)?this.fromUrl(n.templateUrl,t):u(n.templateProvider)?this.fromProvider(n.templateProvider,t,i):null};this.fromString=function(n,t){return s(n)?n(t):n};this.fromUrl=function(i,r){return s(i)&&(i=i(r)),i==null?null:n.get(i,{cache:t,headers:{Accept:"text/html"}}).then(function(n){return n.data})};this.fromProvider=function(n,t,r){return i.invoke(n,null,r||{params:t})}}function v(n,t,u){function nt(t,i,r,u){if(g.push(t),d[t])return d[t];if(!/^\w+(-+\w+)*(?:\[\])?$/.test(t))throw new Error("Invalid parameter name '"+t+"' in pattern '"+n+"'");if(b[t])throw new Error("Duplicate parameter name '"+t+"' in pattern '"+n+"'");return b[t]=new c.Param(t,i,r,u),b[t]}function tt(n,t,i,r){var u=["",""],f=n.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return f;switch(i){case!1:u=["(",")"+(r?"?":"")];break;case!0:u=["?(",")?"];break;default:u=["("+i+"|",")?"]}return f+u[0]+t+u[1]}function it(r,u){var e,f,s,h,l;return e=r[2]||r[3],l=t.params[e],s=n.substring(o,r.index),f=u?r[4]:r[4]||(r[1]=="*"?".*":null),h=c.type(f||"string")||w(c.type("string"),{pattern:new RegExp(f,t.caseInsensitive?"i":i)}),{id:e,regexp:f,segment:s,type:h,cfg:l}}var f,s,e,h,k;t=r({params:{}},l(t)?t:{});var v=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,rt=/([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,y="^",o=0,a,p=this.segments=[],d=u?u.params:{},b=this.params=u?u.params.$$new():new c.ParamSet,g=[];for(this.source=n;a=v.exec(n);){if(f=it(a,!1),f.segment.indexOf("?")>=0)break;s=nt(f.id,f.type,f.cfg,"path");y+=tt(f.segment,s.type.pattern.source,s.squash,s.isOptional);p.push(f.segment);o=v.lastIndex}if(e=n.substring(o),h=e.indexOf("?"),h>=0){if(k=this.sourceSearch=e.substring(h),e=e.substring(0,h),this.sourcePath=n.substring(0,o+h),k.length>0)for(o=0;a=rt.exec(k);)f=it(a,!0),s=nt(f.id,f.type,f.cfg,"search"),o=v.lastIndex}else this.sourcePath=n,this.sourceSearch="";y+=tt(e)+(t.strict===!1?"/?":"")+"$";p.push(e);this.regexp=new RegExp(y,t.caseInsensitive?"i":i);this.prefix=p[0];this.$$paramNames=g}function o(n){r(this,n)}function et(){function rt(n){return n!=null?n.toString().replace(/\//g,"%2F"):n}function ht(n){return n!=null?n.toString().replace(/%2F/g,"/"):n}function ct(){return{strict:g,caseInsensitive:d}}function ot(n){return s(n)||a(n)&&s(n[n.length-1])}function st(){while(it.length){var i=it.shift();if(i.pattern)throw new Error("You cannot override a type's .pattern at runtime.");t.extend(n[i.name],b.invoke(i.def))}}function k(n){r(this,n||{})}c=this;var d=!1,g=!0,tt=!1;var n={},ut=!0,it=[],b,ft={string:{encode:rt,decode:ht,is:function(n){return n==null||!u(n)||typeof n=="string"},pattern:/[^/]*/},int:{encode:rt,decode:function(n){return parseInt(n,10)},is:function(n){return u(n)&&this.decode(n.toString())===n},pattern:/\d+/},bool:{encode:function(n){return n?1:0},decode:function(n){return parseInt(n,10)!==0},is:function(n){return n===!0||n===!1},pattern:/0|1/},date:{encode:function(n){return this.is(n)?[n.getFullYear(),("0"+(n.getMonth()+1)).slice(-2),("0"+n.getDate()).slice(-2)].join("-"):i},decode:function(n){if(this.is(n))return n;var t=this.capture.exec(n);return t?new Date(t[1],t[2]-1,t[3]):i},is:function(n){return n instanceof Date&&!isNaN(n.valueOf())},equals:function(n,t){return this.is(n)&&this.is(t)&&n.toISOString()===t.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:t.toJson,decode:t.fromJson,is:t.isObject,equals:t.equals,pattern:/[^/]*/},any:{encode:t.identity,decode:t.identity,equals:t.equals,pattern:/.*/}};et.$$getDefaultValue=function(n){if(!ot(n.value))return n.value;if(!b)throw new Error("Injectable functions cannot be called at configuration time");return b.invoke(n.value)};this.caseInsensitive=function(n){return u(n)&&(d=n),d};this.strictMode=function(n){return u(n)&&(g=n),g};this.defaultSquashPolicy=function(n){if(!u(n))return tt;if(n!==!0&&n!==!1&&!e(n))throw new Error("Invalid squash policy: "+n+". Valid policies: false, true, arbitrary-string");return tt=n,n};this.compile=function(n,t){return new v(n,r(ct(),t))};this.isMatcher=function(n){if(!l(n))return!1;var t=!0;return f(v.prototype,function(i,r){s(i)&&(t=t&&u(n[r])&&s(n[r]))}),t};this.type=function(t,i,f){if(!u(i))return n[t];if(n.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return n[t]=new o(r({name:t},i)),f&&(it.push({name:t,def:f}),ut||st()),this};f(ft,function(t,i){n[i]=new o(r({name:i},t))});n=w(n,{});this.$get=["$injector",function(t){return b=t,ut=!1,st(),f(ft,function(t,i){n[i]||(n[i]=new o(t))}),this}];this.Param=function(t,f,s,c){function it(n){var t=l(n)?p(n):[],i=h(t,"value")===-1&&h(t,"type")===-1&&h(t,"squash")===-1&&h(t,"array")===-1;return i&&(n={value:n}),n.$$fn=ot(n.value)?n.value:function(){return n.value},n}function rt(i,r,u){if(i.type&&r)throw new Error("Param '"+t+"' has two type configurations.");return r?r:i.type?i.type instanceof o?i.type:new o(i.type):u==="config"?n.any:n.string}function ut(){var n={array:c==="search"?"auto":!1},i=t.match(/\[\]$/)?{array:!0}:{};return r(n,i,s).array}function ft(n,t){var i=n.squash;if(!t||i===!1)return!1;if(!u(i)||i==null)return tt;if(i===!0||e(i))return i;throw new Error("Invalid squash policy: '"+i+"'. Valid policies: false, true, or arbitrary string");}function et(n,t,r,u){var f,o,s=[{from:"",to:r||t?i:""},{from:null,to:r||t?i:""}];return f=a(n.replace)?n.replace:[],e(u)&&f.push({from:u,to:i}),o=y(f,function(n){return n.from}),nt(s,function(n){return h(o,n.from)===-1}).concat(f)}function st(){if(!b)throw new Error("Injectable functions cannot be called at configuration time");var n=b.invoke(s.$$fn);if(n!==null&&n!==i&&!w.type.is(n))throw new Error("Default value ("+n+") for parameter '"+w.id+"' is not an instance of Type ("+w.type.name+")");return n}function ht(n){function t(n){return function(t){return t.from===n}}function i(n){var i=y(nt(w.replace,t(n)),function(n){return n.to});return i.length?i[0]:n}return n=i(n),u(n)?w.type.$normalize(n):st()}function ct(){return"{Param:"+t+" "+f+" squash: '"+d+"' optional: "+k+"}"}var w=this,v;s=it(s);f=rt(s,f,c);v=ut();f=v?f.$asArray(v,c==="search"):f;f.name!=="string"||v||c!=="path"||s.value!==i||(s.value="");var k=s.value!==i,d=ft(s,k),g=et(s,v,k,d);r(this,{id:t,type:f,location:c,array:v,squash:d,replace:g,isOptional:k,value:ht,dynamic:i,config:s,toString:ct})};k.prototype={$$new:function(){return w(this,r(new k,{$$parent:this}))},$$keys:function(){for(var t=[],i=[],n=this,r=p(k.prototype);n;)i.push(n),n=n.$$parent;return i.reverse(),f(i,function(n){f(p(n),function(n){h(t,n)===-1&&h(r,n)===-1&&t.push(n)})}),t},$$values:function(n){var t={},i=this;return f(i.$$keys(),function(r){t[r]=i[r].value(n&&n[r])}),t},$$equals:function(n,t){var i=!0,r=this;return f(r.$$keys(),function(u){var f=n&&n[u],e=t&&t[u];r[u].type.equals(f,e)||(i=!1)}),i},$$validates:function(n){for(var e=this.$$keys(),r,f,o,s,u=0;u<e.length;u++){if(r=this[e[u]],f=n[e[u]],(f===i||f===null)&&r.isOptional)break;if((o=r.type.$normalize(f),!r.type.is(o))||(s=r.type.encode(o),t.isString(s)&&!r.type.pattern.exec(s)))return!1}return!0},$$parent:i};this.ParamSet=k}function ot(n,f){function p(n){var t=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(n.source);return t!=null?t[1].replace(/\\(.)/g,"$1"):""}function w(n,t){return n.replace(/\$(\$|\d{1,2})/,function(n,i){return t[i==="$"?0:Number(i)]})}function v(n,t,i){if(!i)return!1;var r=n.invoke(t,t,{$match:i});return u(r)?r:!0}function y(r,u,f,s){function b(n,t,i){return v==="/"?n:t?v.slice(0,-1)+n:i?v.slice(1)+n:n}function p(n){function u(n){var t=n(f,r);return t?(e(t)&&r.replace().url(t),!0):!1}var c,s,t;if(!n||!n.defaultPrevented){for(c=a&&r.url()===a,a=i,s=o.length,t=0;t<s;t++)if(u(o[t]))return;h&&u(h)}}function w(){return c=c||u.$on("$locationChangeSuccess",p)}var v=s.baseHref(),y=r.url(),a;return l||w(),{sync:function(){p()},listen:function(){return w()},update:function(n){if(n){y=r.url();return}r.url()!==y&&(r.url(y),r.replace())},push:function(n,t,u){var f=n.format(t||{});f!==null&&t&&t["#"]&&(f+="#"+t["#"]);r.url(f);a=u&&u.$$avoidResync?r.url():i;u&&u.replace&&r.replace()},href:function(i,u,f){var o,e,h,s;return i.validates(u)?(o=n.html5Mode(),t.isObject(o)&&(o=o.enabled),e=i.format(u),f=f||{},o||e===null||(e="#"+n.hashPrefix()+e),e!==null&&u&&u["#"]&&(e+="#"+u["#"]),e=b(e,o,f.absolute),!f.absolute||!e)?e:(h=!o&&e?"/":"",s=r.port(),s=s===80||s===443?"":":"+s,[r.protocol(),"://",r.host(),s,h,e].join("")):null}}}var o=[],h=null,l=!1,c;this.rule=function(n){if(!s(n))throw new Error("'rule' must be a function");return o.push(n),this};this.otherwise=function(n){if(e(n)){var t=n;n=function(){return t}}else if(!s(n))throw new Error("'rule' must be a function");return h=n,this};this.when=function(n,t){var i,u=e(t),c,o,h;if(e(n)&&(n=f.compile(n)),!u&&!s(t)&&!a(t))throw new Error("invalid 'handler' in when()");c={matcher:function(n,t){return u&&(i=f.compile(t),t=["$match",function(n){return i.format(n)}]),r(function(i,r){return v(i,t,n.exec(r.path(),r.search()))},{prefix:e(n.prefix)?n.prefix:""})},regex:function(n,t){if(n.global||n.sticky)throw new Error("when() RegExp must not be global or sticky");return u&&(i=t,t=["$match",function(n){return w(i,n)}]),r(function(i,r){return v(i,t,n.exec(r.path()))},{prefix:p(n)})}};o={matcher:f.isMatcher(n),regex:n instanceof RegExp};for(h in o)if(o[h])return this.rule(c[h](n,t));throw new Error("invalid 'what' in when()");};this.deferIntercept=function(n){n===i&&(n=!0);l=n};this.$get=y;y.$inject=["$location","$rootScope","$injector","$browser"]}function st(n,o){function st(n){return n.indexOf(".")===0||n.indexOf("^")===0}function k(n,t){var s;if(!n)return i;var h=e(n),u=h?n:n.name,c=st(u);if(c){if(!t)throw new Error("No reference point given for path '"+u+"'");t=k(t);for(var r=u.split("."),f=0,l=r.length,o=t;f<l;f++){if(r[f]===""&&f===0){o=t;continue}if(r[f]==="^"){if(!o.parent)throw new Error("Path '"+u+"' not valid for state '"+t.name+"'");o=o.parent;continue}break}r=r.slice(f).join(".");u=o.name+(o.name&&r?".":"")+r}return(s=tt[u],s&&(h||!h&&(s===n||s.self===n)))?s:i}function ht(n,t){ut[n]||(ut[n]=[]);ut[n].push(t)}function ct(n){for(var t=ut[n]||[];t.length;)ft(t.shift())}function ft(t){var i,u,r;if(t=w(t,{self:t,resolve:t.resolve||{},toString:function(){return this.name}}),i=t.name,!e(i)||i.indexOf("@")>=0)throw new Error("State must have a valid name");if(tt.hasOwnProperty(i))throw new Error("State '"+i+"'' is already defined");if(u=i.indexOf(".")!==-1?i.substring(0,i.lastIndexOf(".")):e(t.parent)?t.parent:l(t.parent)&&e(t.parent.name)?t.parent.name:"",u&&!tt[u])return ht(u,t.self);for(r in b)s(b[r])&&(t[r]=b[r](t,b.$delegates[r]));return tt[i]=t,!t[et]&&t.url&&n.when(t.url,["$match","$stateParams",function(n,i){v.$current.navigable==t&&d(n,i)||v.transitionTo(t,n,{inherit:!0,location:!1})}]),ct(i),t}function lt(n){return n.indexOf("*")>-1}function at(n){for(var t=n.split("."),i=v.$current.name.split("."),r=0,u=t.length;r<u;r++)t[r]==="*"&&(i[r]="*");return(t[0]==="**"&&(i=i.slice(h(i,t[1])),i.unshift("**")),t[t.length-1]==="**"&&(i.splice(h(i,t[t.length-2])+1,Number.MAX_VALUE),i.push("**")),t.length!=i.length)?!1:i.join("")===t.join("")}function vt(n,t){return e(n)&&!u(t)?b[n]:!s(t)||!e(n)?this:(b[n]&&!b.$delegates[n]&&(b.$delegates[n]=b[n]),b[n]=t,this)}function yt(n,t){return l(n)?t=n:t.name=n,ft(t),this}function ot(n,o,h,c,b,ut,ft){function vt(t,i,r,u){var e=n.$broadcast("$stateNotFound",t,i,r),f;return e.defaultPrevented?(ft.update(),st):e.retry?u.$retry?(ft.update(),ht):(f=v.transition=o.when(e.retry),f.then(function(){return f!==v.transition?ot:(t.options.$retry=!0,v.transitionTo(t.to,t.toParams,t.options))},function(){return st}),ft.update(),f):null}function yt(n,i,r,u,e,l){function w(){var i=[];return f(n.views,function(r,u){var f=r.resolve&&r.resolve!==n.resolve?r.resolve:{};f.$template=[function(){return h.load(u,{view:r,locals:e.globals,params:y,notify:l.notify})||""}];i.push(b.resolve(f,e.globals,e.resolve,n).then(function(i){if(s(r.controllerProvider)||a(r.controllerProvider)){var o=t.extend({},f,e.globals);i.$$controller=c.invoke(r.controllerProvider,null,o)}else i.$$controller=r.controller;i.$$state=n;i.$$controllerAs=r.controllerAs;e[u]=i}))}),o.all(i).then(function(){return e.globals})}var y=r?i:g(n.params.$$keys(),i),p={$stateParams:y},v;return e.resolve=b.resolve(n.resolve,p,e.resolve,n),v=[e.resolve.then(function(n){e.globals=n})],u&&v.push(u),o.all(v).then(w).then(function(){return e})}var ot=o.reject(new Error("transition superseded")),ct=o.reject(new Error("transition prevented")),st=o.reject(new Error("transition aborted")),ht=o.reject(new Error("transition failed"));return nt.locals={resolve:null,globals:{$stateParams:{}}},v={params:{},current:nt.self,$current:nt,transition:null},v.reload=function(n){return v.transitionTo(v.current,ut,{reload:n||!0,inherit:!1,notify:!0})},v.go=function(n,t,i){return v.transitionTo(n,t,r({inherit:!0,relative:v.$current},i))},v.transitionTo=function(t,i,f){var st,dt,gt,bt,lt,kt;i=i||{};f=r({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var y=v.$current,p=v.params,tt=y.path,ni,a=k(t,f.relative),at=i["#"];if(!u(a)){if(st={to:t,toParams:i,options:f},dt=vt(st,y.self,p,f),dt)return dt;if(t=st.to,i=st.toParams,f=st.options,a=k(t,f.relative),!u(a)){if(!f.relative)throw new Error("No such state '"+t+"'");throw new Error("Could not resolve '"+t+"' from state '"+f.relative+"'");}}if(a[et])throw new Error("Cannot transition to abstract state '"+t+"'");if(f.inherit&&(i=rt(ut,i||{},v.$current,a)),!a.params.$$validates(i))return ht;i=a.params.$$values(i);t=a;var b=t.path,h=0,s=b[h],d=nt.locals,wt=[];if(f.reload){if(e(f.reload)||l(f.reload)){if(l(f.reload)&&!f.reload.name)throw new Error("Invalid reload state object");if(gt=f.reload===!0?tt[0]:k(f.reload),f.reload&&!gt)throw new Error("No such reload state '"+(e(f.reload)?f.reload:f.reload.name)+"'");while(s&&s===tt[h]&&s!==gt)d=wt[h]=s.locals,h++,s=b[h]}}else while(s&&s===tt[h]&&s.ownParams.$$equals(i,p))d=wt[h]=s.locals,h++,s=b[h];if(pt(t,i,y,p,d,f))return at&&(i["#"]=at),v.params=i,it(v.params,ut),f.location&&t.navigable&&t.navigable.url&&(ft.push(t.navigable.url,i,{$$avoidResync:!0,replace:f.location==="replace"}),ft.update(!0)),v.transition=null,o.when(v.current);if(i=g(t.params.$$keys(),i||{}),f.notify&&n.$broadcast("$stateChangeStart",t.self,i,y.self,p).defaultPrevented)return n.$broadcast("$stateChangeCancel",t.self,i,y.self,p),ft.update(),ct;for(bt=o.when(d),lt=h;lt<b.length;lt++,s=b[lt])d=wt[lt]=w(d),bt=yt(s,i,s===t,bt,d,f);return kt=v.transition=bt.then(function(){var r,u,e;if(v.transition!==kt)return ot;for(r=tt.length-1;r>=h;r--)e=tt[r],e.self.onExit&&c.invoke(e.self.onExit,e.self,e.locals.globals),e.locals=null;for(r=h;r<b.length;r++)u=b[r],u.locals=wt[r],u.self.onEnter&&c.invoke(u.self.onEnter,u.self,u.locals.globals);return(at&&(i["#"]=at),v.transition!==kt)?ot:(v.$current=t,v.current=t.self,v.params=i,it(v.params,ut),v.transition=null,f.location&&t.navigable&&ft.push(t.navigable.url,t.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:f.location==="replace"}),f.notify&&n.$broadcast("$stateChangeSuccess",t.self,i,y.self,p),ft.update(!0),v.current)},function(r){return v.transition!==kt?ot:(v.transition=null,ni=n.$broadcast("$stateChangeError",t.self,i,y.self,p,r),ni.defaultPrevented||ft.update(),o.reject(r))})},v.is=function(n,t,f){f=r({relative:v.$current},f||{});var e=k(n,f.relative);return u(e)?v.$current!==e?!1:t?d(e.params.$$values(t),ut):!0:i},v.includes=function(n,t,f){if(f=r({relative:v.$current},f||{}),e(n)&&lt(n)){if(!at(n))return!1;n=v.$current.name}var o=k(n,f.relative);return u(o)?u(v.$current.includes[o.name])?t?d(o.params.$$values(t),ut,p(t)):!0:!1:i},v.href=function(n,t,f){var e,o;return(f=r({lossy:!0,inherit:!0,absolute:!1,relative:v.$current},f||{}),e=k(n,f.relative),!u(e))?null:(f.inherit&&(t=rt(ut,t||{},v.$current,e)),o=e&&f.lossy?e.navigable:e,!o||o.url===i||o.url===null)?null:ft.href(o.url,g(e.params.$$keys().concat("#"),t||{}),{absolute:f.absolute})},v.get=function(n,t){if(arguments.length===0)return y(p(tt),function(n){return tt[n].self});var i=k(n,t||v.$current);return i&&i.self?i.self:null},v}function pt(n,t,i,r,u,f){function e(n,t,i){function r(t){return n.params[t].location!="search"}var u=n.params.$$keys().filter(r),f=kt.apply({},[n.params].concat(u)),e=new c.ParamSet(f);return e.$$equals(t,i)}if(!f.reload&&n===i&&(u===i.locals||n.self.reloadOnSearch===!1&&e(i,r,t)))return!0}var nt,tt={},v,ut={},et="abstract",b={parent:function(n){if(u(n.parent)&&n.parent)return k(n.parent);var t=/^(.+)\.[^.]+$/.exec(n.name);return t?k(t[1]):nt},data:function(n){return n.parent&&n.parent.data&&(n.data=n.self.data=r({},n.parent.data,n.data)),n.data},url:function(n){var t=n.url,i={params:n.params||{}};if(e(t))return t.charAt(0)=="^"?o.compile(t.substring(1),i):(n.parent.navigable||nt).url.concat(t,i);if(!t||o.isMatcher(t))return t;throw new Error("Invalid url '"+t+"' in state '"+n+"'");},navigable:function(n){return n.url?n:n.parent?n.parent.navigable:null},ownParams:function(n){var t=n.url&&n.url.params||new c.ParamSet;return f(n.params||{},function(n,i){t[i]||(t[i]=new c.Param(i,null,n,"config"))}),t},params:function(n){return n.parent&&n.parent.params?r(n.parent.params.$$new(),n.ownParams):new c.ParamSet},views:function(n){var t={};return f(u(n.views)?n.views:{"":n},function(i,r){r.indexOf("@")<0&&(r+="@"+n.parent.name);t[r]=i}),t},path:function(n){return n.parent?n.parent.path.concat(n):[]},includes:function(n){var t=n.parent?r({},n.parent.includes):{};return t[n.name]=!0,t},$delegates:{}};nt=ft({name:"",url:"^",views:null,abstract:!0});nt.navigable=null;this.decorator=vt;this.state=yt;this.$get=ot;ot.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function ht(){function n(n,t){return{load:function(i,u){var f;return u=r({template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}},u),u.view&&(f=t.fromConfig(u.view,u.params,u.locals)),f&&u.notify&&n.$broadcast("$viewContentLoading",u),f}}}this.$get=n;n.$inject=["$rootScope","$templateFactory"]}function dt(){var n=!1;this.useAnchorScroll=function(){n=!0};this.$get=["$anchorScroll","$timeout",function(t,i){return n?t:function(n){return i(function(){n[0].scrollIntoView()},0,!1)}}]}function ct(n,i,r,u){function s(){return i.has?function(n){return i.has(n)?i.get(n):null}:function(n){try{return i.get(n)}catch(t){return null}}}function h(n,t){var r=function(){return{enter:function(n,t,i){t.after(n);i()},leave:function(n,t){n.remove();t()}}},i;return e?{enter:function(n,t,i){var r=e.enter(n,null,t,i);r&&r.then&&r.then(i)},leave:function(n,t){var i=e.leave(n,t);i&&i.then&&i.then(t)}}:f?(i=f&&f(t,n),{enter:function(n,t,r){i.enter(n,null,t);r()},leave:function(n,t){i.leave(n);t()}}):r()}var o=s(),f=o("$animator"),e=o("$animate");return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(i,f,e){return function(i,f,o){function b(){c&&(c.remove(),c=null);s&&(s.$destroy(),s=null);l&&(p.leave(l,function(){c=null}),c=l,l=null)}function v(h){var c,v=at(i,o,f,u),d=v&&n.$current&&n.$current.locals[v],k;(h||d!==y)&&(c=i.$new(),y=n.$current.locals[v],k=e(c,function(n){p.enter(n,f,function(){s&&s.$emit("$viewContentAnimationEnded");(t.isDefined(a)&&!a||i.$eval(a))&&r(n)});b()}),l=k,s=c,s.$emit("$viewContentLoaded"),s.$eval(w))}var c,l,s,y,w=o.onload||"",a=o.autoscroll,p=h(o,i);i.$on("$stateChangeSuccess",function(){v(!1)});i.$on("$viewContentLoading",function(){v(!1)});v(!0)}}}}function lt(n,t,i,r){return{restrict:"ECA",priority:-400,compile:function(u){var f=u.html();return function(u,e,o){var c=i.$current,l=at(u,o,e,r),s=c&&c.locals[l],a,h;s&&(e.data("$uiView",{name:l,state:s.$$state}),e.html(s.$template?s.$template:f),a=n(e.contents()),s.$$controller&&(s.$scope=u,s.$element=e,h=t(s.$$controller,s),s.$$controllerAs&&(u[s.$$controllerAs]=h),e.data("$ngControllerController",h),e.children().data("$ngControllerController",h)),a(u))}}}}function at(n,t,i,r){var u=r(t.uiView||t.name||"")(n),f=i.inheritedData("$uiView");return u.indexOf("@")>=0?u:u+"@"+(f?f.state.name:"")}function gt(n,t){var r=n.match(/^\s*({[^}]*})\s*$/),i;if(r&&(n=t+"("+r[1]+")"),i=n.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!i||i.length!==4)throw new Error("Invalid state ref '"+n+"'");return{state:i[1],paramExpr:i[3]||null}}function vt(n){var t=n.parent().inheritedData("$uiView");if(t&&t.state&&t.state.name)return t.state}function yt(n,i){var r=["location","inherit","reload","absolute"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(u,f,e,o){var s=gt(e.uiSref,n.current.name),h=null,w=vt(f)||n.$current,b=Object.prototype.toString.call(f.prop("href"))==="[object SVGAnimatedString]"?"xlink:href":"href",c=null,k=f.prop("tagName").toUpperCase()==="A",v=f[0].nodeName==="FORM",d=v?"action":b,y=!0,l={relative:w,inherit:!0},p=u.$eval(e.uiSrefOpts)||{},a;(t.forEach(r,function(n){n in p&&(l[n]=p[n])}),a=function(i){if(i&&(h=t.copy(i)),y){c=n.href(s.state,h,l);var r=o[1]||o[0];if(r&&r.$$addStateInfo(s.state,h),c===null)return y=!1,!1;e.$set(d,c)}},s.paramExpr&&(u.$watch(s.paramExpr,function(n){n!==h&&a(n)},!0),h=t.copy(u.$eval(s.paramExpr))),a(),v)||f.bind("click",function(t){var e=t.which||t.button,r,u;e>1||t.ctrlKey||t.metaKey||t.shiftKey||f.attr("target")||(r=i(function(){n.go(s.state,h,l)}),t.preventDefault(),u=k&&!c?1:0,t.preventDefault=function(){u--<=0&&i.cancel(r)})})}}}function tt(n,t,i){return{restrict:"A",controller:["$scope","$element","$attrs",function(t,r,u){function o(){s()?r.addClass(e):r.removeClass(e)}function s(){for(var n=0;n<f.length;n++)if(h(f[n].state,f[n].params))return!0;return!1}function h(t,i){return typeof u.uiSrefActiveEq!="undefined"?n.is(t.name,i):n.includes(t.name,i)}var f=[],e;e=i(u.uiSrefActiveEq||u.uiSrefActive||"",!1)(t);this.$$addStateInfo=function(t,i){var u=n.get(t,vt(r));f.push({state:u||{name:t},params:i});o()};t.$on("$stateChangeSuccess",o)}]}}function pt(n){var t=function(t){return n.is(t)};return t.$stateful=!0,t}function wt(n){var t=function(t){return n.includes(t)};return t.$stateful=!0,t}var u=t.isDefined,s=t.isFunction,e=t.isString,l=t.isObject,a=t.isArray,f=t.forEach,r=t.extend,it=t.copy,c;t.module("ui.router.util",["ng"]);t.module("ui.router.router",["ui.router.util"]);t.module("ui.router.state",["ui.router.router","ui.router.util"]);t.module("ui.router",["ui.router.state"]);t.module("ui.router.compat",["ui.router"]);ut.$inject=["$q","$injector"];t.module("ui.router.util").service("$resolve",ut);ft.$inject=["$http","$templateCache","$injector"];t.module("ui.router.util").service("$templateFactory",ft);v.prototype.concat=function(n,t){var i={caseInsensitive:c.caseInsensitive(),strict:c.strictMode(),squash:c.defaultSquashPolicy()};return new v(this.sourcePath+n+this.sourceSearch,r(i,t),this)};v.prototype.toString=function(){return this.source};v.prototype.exec=function(n,t){function a(n){function t(n){return n.split("").reverse().join("")}function i(n){return n.replace(/\\-/g,"-")}var r=t(n).split(/-(?!\\)/),u=y(r,t);return y(u,i).reverse()}var o=this.regexp.exec(n),f,u;if(!o)return null;t=t||{};var s=this.parameters(),l=s.length,c=this.segments.length-1,h={},i,e,r;if(c!==o.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(i=0;i<c;i++){for(r=s[i],f=this.params[r],u=o[i+1],e=0;e<f.replace;e++)f.replace[e].from===u&&(u=f.replace[e].to);u&&f.array===!0&&(u=a(u));h[r]=f.value(u)}for(;i<l;i++)r=s[i],h[r]=this.params[r].value(t[r]);return h};v.prototype.parameters=function(n){return u(n)?this.params[n]||null:this.$$paramNames};v.prototype.validates=function(n){return this.params.$$validates(n)};v.prototype.format=function(n){function g(n){return encodeURIComponent(n).replace(/-/g,function(n){return"%5C%"+n.charCodeAt(0).toString(16).toUpperCase()})}var s,w;n=n||{};var h=this.segments,c=this.parameters(),b=this.params;if(!this.validates(n))return null;for(var l=!1,k=h.length-1,d=c.length,i=h[0],r=0;r<d;r++){var nt=r<k,o=c[r],u=b[o],v=u.value(n[o]),p=u.isOptional&&u.type.equals(u.value(),v),f=p?u.squash:!1,t=u.type.encode(v);if(nt)s=h[r+1],f===!1?(t!=null&&(i+=a(t)?y(t,g).join("-"):encodeURIComponent(t)),i+=s):f===!0?(w=i.match(/\/$/)?/\/?(.*)/:/(.*)/,i+=s.match(w)[1]):e(f)&&(i+=f+s);else{if(t==null||p&&f!==!1)continue;a(t)||(t=[t]);t=y(t,encodeURIComponent).join("&"+o+"=");i+=(l?"&":"?")+(o+"="+t);l=!0}}return i};o.prototype.is=function(){return!0};o.prototype.encode=function(n){return n};o.prototype.decode=function(n){return n};o.prototype.equals=function(n,t){return n==t};o.prototype.$subPattern=function(){var n=this.pattern.toString();return n.substr(1,n.length-2)};o.prototype.pattern=/.*/;o.prototype.toString=function(){return"{Type:"+this.name+"}"};o.prototype.$normalize=function(n){return this.is(n)?n:this.decode(n)};o.prototype.$asArray=function(n,t){function r(n,t){function r(n,t){return function(){return n[t].apply(n,arguments)}}function e(n){return a(n)?n:u(n)?[n]:[]}function o(n){switch(n.length){case 0:return i;case 1:return t==="auto"?n[0]:n;default:return n}}function s(n){return!n}function f(n,t){return function(i){i=e(i);var r=y(i,n);return t===!0?nt(r,s).length===0:o(r)}}function h(n){return function(t,i){var u=e(t),f=e(i),r;if(u.length!==f.length)return!1;for(r=0;r<u.length;r++)if(!n(u[r],f[r]))return!1;return!0}}this.encode=f(r(n,"encode"));this.decode=f(r(n,"decode"));this.is=f(r(n,"is"),!0);this.equals=h(r(n,"equals"));this.pattern=n.pattern;this.$normalize=f(r(n,"$normalize"));this.name=n.name;this.$arrayMode=t}if(!n)return this;if(n==="auto"&&!t)throw new Error("'auto' array mode is for query parameters only");return new r(this,n)};t.module("ui.router.util").provider("$urlMatcherFactory",et);t.module("ui.router.util").run(["$urlMatcherFactory",function(){}]);ot.$inject=["$locationProvider","$urlMatcherFactoryProvider"];t.module("ui.router.router").provider("$urlRouter",ot);st.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"];t.module("ui.router.state").value("$stateParams",{}).provider("$state",st);ht.$inject=[];t.module("ui.router.state").provider("$view",ht);t.module("ui.router.state").provider("$uiViewScroll",dt);ct.$inject=["$state","$injector","$uiViewScroll","$interpolate"];lt.$inject=["$compile","$controller","$state","$interpolate"];t.module("ui.router.state").directive("uiView",ct);t.module("ui.router.state").directive("uiView",lt);yt.$inject=["$state","$timeout"];tt.$inject=["$state","$stateParams","$interpolate"];t.module("ui.router.state").directive("uiSref",yt).directive("uiSrefActive",tt).directive("uiSrefActiveEq",tt);pt.$inject=["$state"];wt.$inject=["$state"];t.module("ui.router.state").filter("isState",pt).filter("includedByState",wt)}(window,window.angular),function(n,t){"use strict";typeof define=="function"&&define.amd?define(["angular"],function(n){t(n)}):typeof exports=="object"?t(require("angular")):t(n.angular)}(this,function(n,t){function k(n,t){var r=[],i;for(i in n.path){if(n.path[i]!==t.path[i])break;r.push(n.path[i])}return r}function d(t){if(Object.keys)return Object.keys(t);var i=[];return n.forEach(t,function(n,t){i.push(t)}),i}function et(n,t){var r=[],i;for(i in n)t&&t.indexOf(i)!==-1||r.push(i);return r}function g(n,t){if(Array.prototype.indexOf)return n.indexOf(t,Number(arguments[2])||0);var r=n.length>>>0,i=Number(arguments[2])||0;for(i=i<0?Math.ceil(i):Math.floor(i),i<0&&(i+=r);i<r;i++)if(i in n&&n[i]===t)return i;return-1}function ot(n,t,i,r){var f=k(i,r),u,h={},c=[],e,o;for(e in f)if(f[e].params&&(u=w(f[e].params)?f[e].params:d(f[e].params),u.length))for(o in u)g(c,u[o])>=0||(c.push(u[o]),h[u[o]]=n[u[o]]);return s({},h,t)}function st(n,t){return s(new(s(function(){},{prototype:n})),t)}function ht(n){p.push(n)}function nt(){a=t}function it(t,r){var f=r,h=f.inheritParams,a=f.objectKeys,c=f.protoKeys,o=f.forEach,s=f.map,u={},l={},e=!1;this.registerStickyState=function(n){l[n.name]=n};this.enableDebug=this.debugMode=function(t){return n.isDefined(t)&&(e=t),e};this.$get=["$rootScope","$state","$stateParams","$injector","$log",function(t,r,f,l,a){function w(){var t={};return n.forEach(u,function(n){for(var u=k(n),r,i=0;i<u.length;i++)r=u[i].parent,t[r.name]=t[r.name]||[],t[r.name].push(n);t[""]&&(t.__inactives=t[""])}),t}function b(){var n={};return o(u,function(t){o(t.path,function(i){i!==t&&(n[i.name]=n[i.name]||[],n[i.name].push(t))})}),n}function k(n){var t=[];if(!n)return t;do n.sticky&&t.push(n),n=n.parent;while(n);return t.reverse(),t}function d(n,t,i,r){var f,e;return r?"reload":(f=u[n.self.name],!f)?"enter":n.self===i?"reload":(e=p(n.ownParams,t,f.locals.globals.$stateParams),e?"reactivate":"reload")}function y(n,t){var i=u[n.name],r;return i?t?(r=p(n.ownParams,t,i.locals.globals.$stateParams),r?i:null):i:null}function p(n,t,i){return typeof n.$$equals=="function"?n.$$equals(t,i):g(t,i,n)}function g(t,i,r){var e,u,f;if(!n.isArray(r)&&n.isObject(r)&&(r=c(r,["$$keys","$$values","$$equals","$$validates","$$new","$$parent"])),!r){r=[];for(e in t)r.push(e)}for(u=0;u<r.length;u++)if(f=r[u],t[f]!=i[f])return!1;return!0}function nt(n){var u=n.fromState.path,e=n.toState.path,o=n.toParams,t=0,i=e[t];for(n.options.inherit&&(o=h(f,o||{},r.$current,n.toState));i&&i===u[t]&&p(i.ownParams,o,n.fromParams);)i=e[++t];return{keep:t,retained:u.slice(0,t),exiting:u.slice(t),entering:e.slice(t)}}var v={getInactiveStates:function(){return s(u,n.identity)},getInactiveStatesByParent:function(){return w()},processTransition:function(t){function e(n){return function(t){return n.indexOf(t)===-1}}function y(n,t){return n.concat(t)}function r(n){return function(t){return t[n]}}function a(n){return function(t){return t.type===n}}function p(n){return function(t){return t.parent===n}}function tt(n){return!n.sticky}var i=nt(t),h=s(u,n.identity),v,f,c,l=i.keep,g=e(i.entering),it=i.exiting[0]&&i.exiting[0].sticky&&i.entering.length>0,o;f=i.exiting.map(function(n){var t=it?"inactivate":"exit";return{type:t,state:n}});o=!!t.options.reload;c=i.entering.map(function(n){var i=d(n,t.toParams,t.reloadStateTree,o);return o=o||i==="reload",{type:i,state:n}});var w=i.entering.map(function(n){return h.filter(p(n.parent))}).reduce(y,[]).filter(g).filter(tt).concat(h.filter(p(t.toState))),rt=b(),k=w.map(function(n){return rt[n.name]}).filter(n.isDefined).reduce(y,[]).concat(w).sort(function(n,t){return n.name.split(".").length-t.name.split(".").length}),ut=f.filter(a("exit")).map(r("state")).concat(k);return v=h.filter(e(ut)).filter(e(i.entering)).concat(f.filter(a("inactivate")).map(r("state"))),{keep:l,enter:new Array(l).concat(c.map(r("type"))),exit:new Array(l).concat(f.map(r("type"))),inactives:v,reactivatingStates:c.filter(a("reactivate")).map(r("state")),orphans:k}},stateInactivated:function(n){u[n.self.name]=n;n.self.status="inactive";n.self.onInactivate&&l.invoke(n.self.onInactivate,n.self,n.locals.globals)},stateReactivated:function(n){u[n.self.name]&&delete u[n.self.name];n.self.status="entered";n.self.onReactivate&&l.invoke(n.self.onReactivate,n.self,n.locals.globals)},stateExiting:function(t,r,f){var o={};n.forEach(r,function(n){o[n.self.name]=!0});n.forEach(u,function(r,f){!o[f]&&r.includes[t.name]&&(e&&a.debug("Exiting "+f+" because it's a substate of "+t.name+" and wasn't found in ",o),r.self.onExit&&l.invoke(r.self.onExit,r.self,r.locals.globals),n.forEach(r.locals,function(n,t){delete i.locals[t]}),r.locals=null,r.self.status="exited",delete u[f])});f&&l.invoke(f,t.self,t.locals.globals);t.locals=null;t.self.status="exited";delete u[t.self.name]},stateEntering:function(n,t,i,r){var u=y(n),f;u&&(r||!y(n,t))&&(f=n.locals,this.stateExiting(u),n.locals=f);n.self.status="entered";i&&l.invoke(i,n.self,n.locals.globals)},reset:function(i,u){function o(n){v.reset(n)}var f,e;return i==="*"?(n.forEach(v.getInactiveStates(),o),!0):(f=r.get(i),!f)?!1:(e=y(f,u),!e)?!1:(v.stateExiting(e),t.$broadcast("$viewContentLoading"),!0)}};return v}]}function l(n){return{resolve:{},locals:{globals:r&&r.locals&&r.locals.globals},views:{},self:{},params:{},ownParams:v.hasParamSet?{$$equals:function(){return!0}}:[],surrogateType:n}}var y=n.module("ct.ui.router.extras.core",["ui.router"]),e={},p=[],a,tt;y.config(["$stateProvider","$injector",function(t){t.decorator("parent",function(t,i){return e[t.self.name]=t,t.self.$$state=function(){return e[t.self.name]},n.forEach(p,function(n){n(t)}),i(t)})}]);var o=n.forEach,s=n.extend,w=n.isArray,b=function(n,t){"use strict";var i=[];return o(n,function(n,r){i.push(t(n,r))}),i},rt=function(n){"use strict";return b(n,function(n,t){return t})},ut=function(n,t){"use strict";var i=[];return o(n,function(n,r){t(n,r)&&i.push(n)}),i},ft=function(n,t){"use strict";var i={};return o(n,function(n,r){t(n,r)&&(i[r]=n)}),i};y.provider("uirextras_core",function(){var t={internalStates:e,onStateRegistered:ht,forEach:o,extend:s,isArray:w,map:b,keys:rt,filter:ut,filterObj:ft,ancestors:k,objectKeys:d,protoKeys:et,arraySearch:g,inheritParams:ot,inherit:st};n.extend(this,t);this.$get=function(){return t}});n.module("ct.ui.router.extras.dsr",["ct.ui.router.extras.core"]).config(["$provide",function(n){var t;n.decorator("$state",["$delegate","$q",function(n,i){return t=n.transitionTo,n.transitionTo=function(r,u,f){return f.ignoreDsr&&(a=f.ignoreDsr),t.apply(n,arguments).then(function(n){return nt(),n},function(n){return nt(),i.reject(n)})},n}])}]);n.module("ct.ui.router.extras.dsr").service("$deepStateRedirect",["$rootScope","$state","$injector",function(i,r,u){function h(n){var t=n.name;if(e.hasOwnProperty(t))return e[t];l(t)}function o(t){var r=t.deepStateRedirect||t.dsr,i;return r?(i={dsr:!0},n.isFunction(r)?i.fn=r:n.isObject(r)&&(i=n.extend(i,r)),n.isString(i["default"])&&(i["default"]={state:i["default"]}),i.fn||(i.fn=["$dsr$",function(n){return n.redirect.state!=n.to.state}]),i):{dsr:!1}}function l(n){var i=r.get(n),s,u,h;return i?(s=o(i),s.dsr&&(e[i.name]=c,f[n]===t&&(f[n]={})),u=i.$$state&&i.$$state().parent,u&&(h=l(u.self.name),h&&e[i.name]===t&&(e[i.name]=y)),e[i.name]||!1):!1}function v(i,r){r===!0&&(r=Object.keys(i));(r===null||r===t)&&(r=[]);var u={};return n.forEach(r.sort(),function(n){u[n]=i[n]}),u}function s(t,i){function f(n){return n?n.toString():n}var u=v(t,i),r={};return n.forEach(u,function(n,t){r[t]=f(n)}),n.toJson(r)}var f={},e={},c="Redirect",y="AncestorRedirect";return i.$on("$stateChangeStart",function(t,i,e){var y=o(i),w,l,b,p,k;!a&&(h(i)===c||y["default"])&&(w=s(e,y.params),l=f[i.name][w]||y["default"],l)&&(b={redirect:{state:l.state,params:l.params},to:{state:i.name,params:e}},p=u.invoke(y.fn,i,{$dsr$:b}),p)&&(p.state&&(l=p),t.preventDefault(),k=v(e,y.params),r.go(l.state,n.extend(k,l.params)))}),i.$on("$stateChangeSuccess",function(t,i,u){var c=h(i),e;c&&(e=i.name,n.forEach(f,function(t,h){var c=o(r.get(h)),l=s(u,c.params);i.$$state().includes[h]&&(f[h][l]={state:e,params:n.copy(u)})}))}),{getRedirect:function(n,t){var i=r.get(n);h(i);var u=o(i),e=s(t,u.params);return f[i.name][e]||u["default"]},reset:function(t,i){var u,e;if(t){if(u=r.get(t),!u)throw new Error("Unknown state: "+t);f[u.name]&&(i?(e=s(i,o(u).params),delete f[u.name][e]):f[u.name]={})}else n.forEach(f,function(n,t){f[t]={}})}}}]);n.module("ct.ui.router.extras.dsr").run(["$deepStateRedirect",function(){}]);n.module("ct.ui.router.extras.sticky",["ct.ui.router.extras.core"]);tt=n.module("ct.ui.router.extras.sticky");it.$inject=["$stateProvider","uirextras_coreProvider"];tt.provider("$stickyState",it);var u,e={},r,h=[],f,i,c={},v={hasParamSet:!1};n.module("ct.ui.router.extras.sticky").run(["$stickyState",function(n){u=n}]);n.module("ct.ui.router.extras.sticky").config(["$provide","$stateProvider","$stickyStateProvider","$urlMatcherFactoryProvider","uirextras_coreProvider",function(e,o,s,a,y){function tt(t,i,r){function f(n,t,i){return n[t]?n[t].toUpperCase()+": "+i.self.name:"("+i.self.name+")"}var e=p(r.inactives,function(n){return n.self.name}),o=p(i.toState.path,function(n,t){return f(r.enter,t,n)}),s=p(i.fromState.path,function(n,t){return f(r.exit,t,n)}),h=i.fromState.self.name+": "+n.toJson(i.fromParams)+":  -> "+i.toState.self.name+": "+n.toJson(i.toParams);t.debug("------------------------------------------------------");t.debug("   Current transition: ",h);t.debug("Before transition, inactives are:   : ",p(u.getInactiveStates(),function(n){return n.self.name}));t.debug("After transition,  inactives will be: ",e);t.debug("Transition will exit:  ",s);t.debug("Transition will enter: ",o)}function it(n,t,i){n.debug("Current state: "+t.self.name+", inactive states: ",p(u.getInactiveStates(),function(n){return n.self.name}));for(var o=function(n,t){return"'"+t+"' ("+n.$$state.name+")"},s=function(n,t){return t!="globals"&&t!="resolve"},e=function(n){var t=p(nt(n.locals,s),o).join(", ");return"("+(n.self.name?n.self.name:"root")+".locals"+(t.length?": "+t:"")+")"},f=e(t),r=t.parent;r&&r!==t;)r.self.name===""&&(f=e(i.$current.path[0])+" / "+f),f=e(r)+" / "+f,t=r,r=t.parent;n.debug("Views: "+f)}var w=y,k=w.internalStates,d=w.inherit,rt=w.inheritParams,b=w.forEach,p=w.map,nt=w.filterObj,g;v.hasParamSet=!!a.ParamSet;i=n.extend(new l("__inactives"),{self:{name:"__inactives"}});r=f=t;h=[];y.onStateRegistered(function(n){n.self.sticky===!0&&s.registerStickyState(n.self)});e.decorator("$state",["$delegate","$log","$q",function(e,o,y){return r=e.$current,k[""]=r,r.parent=i,i.parent=t,i.locals=d(c,i.locals),r.locals=d(i.locals,r.locals),delete i.locals.globals,g=e.transitionTo,e.transitionTo=function(t,w,d){function hi(t){var i=n.extend(new l("reactivate_phase1"),{locals:t.locals});return i.self=n.extend({},t.self),i}function ci(t){var i=n.extend(new l("reactivate_phase2"),t),r=i.self.onEnter;return i.resolve={},i.views={},i.self.onEnter=function(){i.locals=t.locals;u.stateReactivated(t)},nt.addRestoreFunction(function(){t.self.onEnter=r}),i}function li(n){var t=new l("inactivate"),i;return t.self=n.self,i=n.self.onExit,t.self.onExit=function(){u.stateInactivated(n)},nt.addRestoreFunction(function(){n.self.onExit=i}),t}function ai(n,t){var i=n.self.onEnter;return n.self.onEnter=function(){u.stateEntering(n,t,i)},nt.addRestoreFunction(function(){n.self.onEnter=i}),n}function vi(n,t){var i=n.self.onEnter;return n.self.onEnter=function(){u.stateEntering(n,t,i,!0)},nt.addRestoreFunction(function(){n.self.onEnter=i}),n}function fi(n){var t=n.self.onExit;return n.self.onExit=function(){u.stateExiting(n,vt,t)},nt.addRestoreFunction(function(){n.self.onExit=t}),n}var ot=s.debugMode(),ni,ui,nt,ut,ht,yt,pt,ct,lt,ei,et,ft,kt,dt,gt,oi;i.locals||(i.locals=r.locals);ni=h.length;f&&(f(),ot&&o.debug("Restored paths from pending transition"));var st=e.$current,si=e.params,ti=d&&d.relative||e.$current,ii=e.get(t,ti),at,wt,rt,bt=[],vt=[],ri;return w=w||{},arguments[1]=w,ui=function(){},nt=function(){at&&(ut.path=at,at=null);wt&&(st.path=wt,wt=null);n.forEach(nt.restoreFunctions,function(n){n()});nt=ui;f=null;h.splice(ni,1)},nt.restoreFunctions=[],nt.addRestoreFunction=function(n){this.restoreFunctions.push(n)},ii&&(ut=k[ii.name],ut&&(at=ut.path,wt=st.path,ht=d&&d.reload||!1,yt=ht&&(ht===!0?at[0].self:e.get(ht,ti)),d&&ht&&ht!==!0&&delete d.reload,pt={toState:ut,toParams:w||{},fromState:st,fromParams:si||{},options:d,reloadStateTree:yt},h.push(pt),f=nt,yt&&(pt.toParams.$$uirouterextrasreload=Math.random(),ct=yt.$$state().params,lt=yt.$$state().ownParams,v.hasParamSet?(ei=new a.Param("$$uirouterextrasreload"),ct.$$uirouterextrasreload=lt.$$uirouterextrasreload=ei,nt.restoreFunctions.push(function(){delete ct.$$uirouterextrasreload;delete lt.$$uirouterextrasreload})):(ct.push("$$uirouterextrasreload"),lt.push("$$uirouterextrasreload"),nt.restoreFunctions.push(function(){ct.length=ct.length-1;lt.length=lt.length-1}))),rt=u.processTransition(pt),ot&&tt(o,pt,rt),et=ut.path.slice(0,rt.keep),ft=st.path.slice(0,rt.keep),n.forEach(i.locals,function(n,t){t.indexOf("@")!=-1&&delete i.locals[t]}),kt=function(n){return function(t,i){i.indexOf("@")!==-1&&(n[i]=t)}},b(rt.inactives,function(n){b(n.locals,kt(i.locals))}),b(rt.reactivatingStates,function(n){b(n.locals,kt(c))}),nt.addRestoreFunction(function(){b(c,function(n,t){delete c[t]})}),n.forEach(rt.enter,function(n,t){var r,i=ut.path[t];n==="reactivate"?(r=hi(i),et.push(r),ft.push(r),bt.push(ci(i)),ri=i):n==="reload"?(et.push(vi(i)),ri=i):n==="enter"&&et.push(ai(i))}),n.forEach(rt.exit,function(n,t){var i=st.path[t];n==="inactivate"?(ft.push(li(i)),vt.push(i)):n==="exit"&&(ft.push(fi(i)),vt.push(i))}),bt.length&&n.forEach(bt,function(n){et.push(n)}),dt=rt.orphans,ft=ft.concat(p(dt,function(n){return fi(n)})),vt=vt.concat(dt),st.path=ft,ut.path=et,gt=function(n){return(n.surrogateType?n.surrogateType+":":"")+n.self.name},ot&&o.debug("SurrogateFromPath: ",p(ft,gt)),ot&&o.debug("SurrogateToPath:   ",p(et,gt)))),oi=g.apply(e,arguments),oi.then(function(n){return nt(),ot&&it(o,k[n.name],e),n.status="active",n},function(n){return nt(),ot&&n.message!=="transition prevented"&&n.message!=="transition aborted"&&n.message!=="transition superseded"&&(o.debug("transition failed",n),o.debug(n.stack)),y.reject(n)})},e}])}]),function(n,t){function u(t,i,r,u){function p(t,i){var r=n.isObject(t)?t.name:t;return i?f[r]:k[r]}function w(n,t){var r,e,i,s,h,c,u,o;if(t.name)for(r=t.name.split(/\./),t.name.charAt(0)==="."&&(r[0]=n.current.name);r.length;){if(e=r.join("."),n.get(e,{relative:n.current}))return null;if(f[e])return f[e];r.pop()}if(t.url){i=[];for(s in f)h=f[s].urlMatcher,h&&h.exec(t.url)&&i.push(f[s]);for(c=i.slice(0),u=i.length-1;u>=0;u--)for(o=0;o<c.length;o++)i[u]===c[o].parentFutureState&&i.splice(u,1);return i[0]}}function c(n,t){function v(){delete f[t.name]}function y(n){return a==="remove"&&v(),r.reject(n)}var r,o,s,u,h,i,a;if(e=!0,r=n.get("$q"),!t)return o=r.defer(),o.reject("No lazyState passed in "+t),o.promise;if(s=r.when([]),u=t.parentFutureState,u&&f[u.name]&&(s=c(n,f[u.name])),h=t.type,i=l[h],!i)throw Error("No state factory for futureState.type: "+(t&&t.type));return a=i.$options&&i.$options.failedLazyLoadPolicy||"remove",s.then(function(r){var u=n.invoke(i,i,{futureState:t});return u.then(function(n){return v(),n&&r.push(n),r})}).catch(y)}function d(n,i){var r=!1,f=["$rootScope","$urlRouter","$state",function(u,f,s){function l(){r=!0;f.sync();r=!1}if(!v){o().then(l);v=!0;return}var a=w(s,{url:i.path()});if(!a)return n.invoke(h);c(n,a).then(function(n){n.forEach(function(n){n&&(!s.get(n)||n.name&&!s.get(n.name))&&t.state(n)});e=!1;l()},function(){e=!1;l()})}],u;if(!e)return u=r?h:f,n.invoke(u)}var b=u,k=b.internalStates,l={},f={},e=!1,a=[],o,v=!1,y=this,h,s;this.addResolve=function(n){a.push(n)};this.stateFactory=function(n,t){l[n]=t};this.futureState=function(t){var u,e,i,o,s;if(t.stateName&&(t.name=t.stateName),t.urlPrefix&&(t.url="^"+t.urlPrefix),f[t.name]=t,e=t.name.split(/\./).slice(0,-1).join("."),i=p(t.parent||e),i)u=i.url||i.navigable&&i.navigable.url;else if(e==="")u=r.compile("");else{if(o=p(t.parent||e,!0),!o)throw new Error("Couldn't determine parent state of future state. FutureState:"+n.toJson(t));s=o.urlMatcher.source.replace(/\*rest$/,"");u=r.compile(s);t.parentFutureState=o}t.url&&(t.urlMatcher=t.url.charAt(0)==="^"?r.compile(t.url.substring(1)+"*rest"):u.concat(t.url+"*rest"))};this.get=function(){return n.extend({},f)};h=["$log","$location",function(){}];i.otherwise(d);i.otherwise=function(t){if(n.isString(t)){var r=t;t=function(){return r}}else if(!n.isFunction(t))throw new Error("'rule' must be a function");return h=["$injector","$location",t],i};s={getResolvePromise:function(){return o()}};this.$get=["$injector","$state","$q","$rootScope","$urlRouter","$timeout","$log",function(i,r,u,f,h,l){function v(){if(f.$on("$stateNotFound",function(n,u,f,o){var s,h;e||(s=w(r,{name:u.to}),s)&&(n.preventDefault(),h=c(i,s),h.then(function(n){n.forEach(function(n){n&&(!r.get(n)||n.name&&!r.get(n.name))&&t.state(n)});r.go(u.to,u.toParams);e=!1},function(n){console.log("failed to lazy load state ",n);f.name&&r.go(f,o);e=!1}))}),!o){var s=[];n.forEach(a,function(n){s.push(i.invoke(n))});o=function(){return u.all(s)}}o().then(function v(){l(function(){r.transition?r.transition.then(v,v):h.sync()})})}return v(),s.state=t.state,s.futureState=y.futureState,s.get=y.get,s}]}var r=n.module("ct.ui.router.extras.future",["ct.ui.router.extras.core"]),i;u.$inject=["$stateProvider","$urlRouterProvider","$urlMatcherFactoryProvider","uirextras_coreProvider"];r.provider("$futureState",u);i={state:function(n){i.$rootScope&&i.$rootScope.$broadcast("$stateAdded",n)},itsNowRuntimeOhWhatAHappyDay:function(n){i.$rootScope=n},$rootScope:t};r.config(["$stateProvider",function(t){var r=t.state;t.state=function(){var u=r.apply(t,arguments),f=n.isObject(arguments[0])?arguments[0]:arguments[1];return i.state(f),u}}]);r.run(["$futureState",function(n,t){i.itsNowRuntimeOhWhatAHappyDay(t)}])}(n);n.module("ct.ui.router.extras.previous",["ct.ui.router.extras.core","ct.ui.router.extras.transition"]).service("$previousState",["$rootScope","$state","$q",function(n,i,r){var u=null,f=null,e={},o;return n.$on("$transitionStart",function(n,t){function e(){f=null}function o(){u=f}var i=t.from,r=i.state&&i.state.$$state&&i.state.$$state();r&&(f=u,u=t.from,t.promise.then(e)["catch"](o))}),o={get:function(n){return n?e[n]:u},go:function(n,t){var u=o.get(n);return n&&!u?r.reject(new Error("undefined memo")):i.go(u.state,u.params,t)},memo:function(n,t,r){e[n]=u||{state:i.get(t),params:r}},forget:function(n){n?delete e[n]:u=t}}}]);n.module("ct.ui.router.extras.previous").run(["$previousState",function(){}]);n.module("ct.ui.router.extras.transition",["ct.ui.router.extras.core"]).config(["$provide",function(t){t.decorator("$state",["$delegate","$rootScope","$q","$injector",function(t,i,r,u){function c(t){var i=u.invoke,r=u.instantiate;return u.invoke=function(r,u,f){return i(r,u,n.extend({$transition$:t},f))},u.instantiate=function(i,u){return r(i,n.extend({$transition$:t},u))},function(){u.invoke=i;u.instantiate=r}}function s(){o.pop()();e.pop();f--}function l(n,t){return function(r){return s(),i.$broadcast("$transitionSuccess",t),n.resolve(r),r}}function a(n,t){return function(u){return s(),i.$broadcast("$transitionError",t,u),n.reject(u),r.reject(u)}}var h=t.transitionTo,f=-1,e=[],o=[];return t.transitionTo=function(){var n=r.defer(),i=e[++f]={promise:n.promise},u;return o[f]=function(){},u=h.apply(t,arguments),u.then(l(n,i),a(n,i))},i.$on("$stateChangeStart",function(t,r,u,s,h){if(!(f>=e.length)){var l=f,a=n.extend(e[l],{to:{state:r,params:u},from:{state:s,params:h}}),v=c(a);o[l]=v;i.$broadcast("$transitionStart",a)}}),t}])}]),function(){"use strict";function i(t,i,r){return{scope:{width:"@",height:"@"},restrict:"AE",template:"<svg><\/svg>",link:function(i,u){function g(t){t=t.map(function(t){return t.name===""?f:n.copy(t)});n.extend(p,t.reduce(function(n,t){return n[t.name]=t,n},{}));t.forEach(function(n){var i=n.name.split(/\./).slice(0,-1).join("."),t=n.name!=i&&p[i];t&&((t.children||(t.children=[])).push(n),n.px=t.px,n.py=t.py,o.push(n))})}function k(){function r(n){var t=n.name.split(".").pop();return n.sticky&&(t+=" (STICKY)"),n.deepStateRedirect&&(t+=" (DSR)"),t}var t,n,i;a=a.data(l.nodes(f),function(n){return n.name});v=v.data(l.links(o),function(n){return n.target.name});y=y.data(e);o.forEach(function(n){n.y=n.depth*70});t=a.enter();y.enter().append("circle").attr("class","active").attr("r",13).attr("cx",function(n){return n.parent.px||100}).attr("cy",function(n){return n.parent.py||100});t.append("circle").attr("class","node").attr("r",9).attr("cx",function(n){return n.parent.px}).attr("cy",function(n){return n.parent.py});t.append("text").attr("class","label").attr("x",function(n){return n.parent.px}).attr("y",function(n){return n.parent.py}).attr("text-anchor",function(){return"middle"}).text(r).style("fill-opacity",1);v.enter().insert("path",".node").attr("class","link").attr("d",function(n){var t={x:n.source.px,y:n.source.py};return w({source:t,target:t})});n=s.transition().duration(d);n.selectAll(".link").attr("d",w);i={entered:"#AF0",exited:"#777",active:"#0f0",inactive:"#55F",future:"#009"};n.selectAll(".node").attr("cx",function(n){return n.px=n.x}).attr("cy",function(n){return n.py=n.y}).attr("r",function(n){return n.status==="active"?15:10}).style("fill",function(n){return i[n.status]||"#FFF"});n.selectAll(".label").attr("x",function(n){return n.px=n.x}).attr("y",function(n){return n.py=n.y-15}).attr("transform",function(n){return"rotate(-25 "+n.x+" "+n.y+")"});n.selectAll(".active").attr("x",function(n){return n.px=n.x}).attr("y",function(n){return n.py=n.y-15})}var p={},h=i.width||400,c=i.height||400,l=d3.layout.tree().size([h-20,c-20]).separation(function(n,t){return n.parent==t.parent?10:25}),f=t.get().filter(function(n){return n.name===""})[0],o=l(f),e;f.parent=f;f.px=f.x=h/2;f.py=f.y=c/2;e={};e.px=e.x=f.px;e.py=e.y=f.py;var w=d3.svg.diagonal(),s=d3.select(u.find("svg")[0]).attr("width",h).attr("height",c).append("g").attr("transform","translate(10, 10)"),a=s.selectAll(".node"),v=s.selectAll(".link"),y=s.selectAll(".active"),b=200,d=200,nt=setInterval(k,b);r(function(){i.states=t.get();n.forEach(o,function(n){var i=t.get(n.name);i&&(n.status=i.status||"exited")})},250);i.$watchCollection("states",function(n,t){var i=(t||[]).map(function(n){return n.name});g((n||[]).filter(function(n){return i.indexOf(n.name)==-1}))});k(b)}}}var t=n.module("ct.ui.router.extras.statevis",["ct.ui.router.extras.core","ct.ui.router.extras.sticky"]);t.directive("stateVis",["$state","$timeout","$interval",i])}();n.module("ct.ui.router.extras",["ct.ui.router.extras.core","ct.ui.router.extras.dsr","ct.ui.router.extras.future","ct.ui.router.extras.previous","ct.ui.router.extras.statevis","ct.ui.router.extras.sticky","ct.ui.router.extras.transition"])})