{"version":3,"sources":["angular-route.js","angular-gettext.js","angular-resource.js"],"names":["window","angular","shallowCopy","src","dst","isArray","i","ii","length","isObject","key","charAt","routeToRegExp","path","opts","keys","pattern","replace","_","slash","option","optional","star","push","name","ignoreTrailingSlashes","regexp","RegExp","caseInsensitiveMatch","isDefined","noop","ngRouteModule","module","info","angularVersion","provider","$RouteProvider","run","instantiateRoute","$routeMinErr","$$minErr","isEagerInstantiationEnabled","inherit","parent","extra","extend","Object","create","routes","this","when","route","routeCopy","isUndefined","reloadOnUrl","reloadOnSearch","originalPath","redirectPath","substr","redirectTo","otherwise","params","eagerInstantiationEnabled","enabled","$get","$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce","$browser","forceReload","preparedRoute","preparedRouteIsUpdateOnly","$route","reload","fakeLocationEvent","defaultPrevented","preventDefault","fakePreventDefault","$evalAsync","prepareRoute","commitRoute","updateParams","newParams","current","$$route","interpolate","search","$on","switchRouteMatcher","on","m","exec","len","val","$locationEvent","lastRoute","parseRoute","isNavigationUpdateOnly","$broadcast","nextRoute","copy","nextRoutePromise","resolve","$$incOutstandingRequestCount","then","getRedirectionData","handlePossibleRedirection","keepProcessingRoute","resolveLocals","locals","catch","error","finally","$$completeOutstandingRequest","data","hasRedirection","isString","oldPath","oldSearch","newUrl","pathParams","url","resolveRedirectTo","invoke","oldUrl","forEach","value","get","template","getTemplateFor","all","templateUrl","isFunction","loadedTemplateUrl","valueOf","match","newRoute","oldRoute","equals","string","result","split","segment","segmentMatch","join","$inject","$RouteParamsProvider","directive","ngViewFactory","ngViewFillContentFactory","$anchorScroll","$animate","restrict","terminal","priority","transclude","link","scope","$element","attr","ctrl","$transclude","currentScope","currentElement","previousLeaveAnimation","autoScrollExp","autoscroll","onloadExp","onload","update","cleanupLastView","cancel","$destroy","leave","done","response","$template","newScope","$new","clone","enter","onNgViewEnter","$eval","$emit","$compile","$controller","html","contents","controller","$scope","controllerAs","children","resolveAs","constant","str","factory","gettextPlurals","gettextFallbackLanguage","$http","$cacheFactory","$interpolate","catalog","noContext","test","isHTMLModified","element","prefixDebug","debug","currentLanguage","baseLanguage","debugPrefix","addTranslatedMarkers","showTranslatedMarkers","translatedMarkerPrefix","translatedMarkerSuffix","broadcastUpdated","strings","cache","setCurrentLanguage","lang","getCurrentLanguage","setStrings","language","defaultPlural","obj","context","getStringFormFor","n","stringTable","contexts","plurals","getString","fallbackLanguage","getPlural","stringPlural","$count","loadRemote","method","gettextCatalog","$parse","$window","gettextUtil","msie","parseInt","navigator","userAgent","PARAMS_PREFIX","getCtxAttr","lcFirst","handleInterpolationContext","attrs","attributes","filter","startsWith","interpolationContext","unwatchers","attribute","unwatch","$watch","newVal","compile","assert","translatePlural","translateN","msgid","trim","translateContext","slice","post","countFn","pluralScope","linking","translated","oldContents","newWrapper","newContents","langCode","matches","input","$stateful","languageCodes","pt_BR","pt-BR","getLanguageCode","shift","String","prototype","condition","missing","found","Error","target","query","indexOf","first","toLowerCase","$resourceMinErr","MEMBER_NAME_REGEX","isValidDottedPath","lookupDottedPath","undefined","shallowClearAndCopy","hasOwnProperty","ResourceProvider","PROTOCOL_AND_IPV6_REGEX","defaults","stripTrailingSlashes","cancellable","actions","save","remove","delete","$log","$timeout","isNumber","encodeUriQuery","$$encodeUriQuery","encodeUriSegment","$$encodeUriSegment","Route","urlParams","setUrlParams","config","actionUrl","self","encodedVal","protocolAndIpv6","param","isQueryParamValue","paramInfo","urlParam","p1","leadingSlashes","tail","resourceFactory","paramDefaults","options","extractParams","actionParams","ids","defaultResponseInterceptor","resource","Resource","toJSON","$promise","$resolved","$cancelRequest","action","hasBody","numericTimeout","timeout","a1","a2","a3","a4","onSuccess","onError","arguments","isInstanceCall","httpConfig","requestInterceptor","interceptor","request","requestErrorInterceptor","requestError","responseInterceptor","responseErrorInterceptor","responseError","reject","successCallback","headers","status","statusText","errorCallback","timeoutDeferred","numericTimeoutPromise","defer","promise","resp","item","rejectionOrResponse","cancelRequest","success","call"],"mappings":";;;;;CAKA,SAAAA,O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AAiC,SAIAC,KAAArC,SAAAvN,MACAiD,SAAA2M,KACA,OAAAb,oBAAAa,OACA,SAAAE,qBACAA,oBAAAvC,SAAAvN,MACAiD,SAAA6M,oBACA,OAAAd,yBAAAc,uBAGAH,QAAAA,QAAA,WAAA,WACA3P,MAAA2N,UAAA,KACA,IAAAa,gBAAAnD,YAAA,CACArL,MAAA4N,eAAAhU,KACA+R,SAAA9I,OAAA4M,uBACAD,gBAAAC,sBAAAhB,WAAAT,QAAA,QAKA2B,QAAAjR,KAAAyQ,gBAAAI,eAEA,IAAAf,eAAA,CAIAxO,MAAA0N,SAAAiC,QACA3P,MAAA2N,UAAA,MACA,GAAAtC,YAAArL,MAAA4N,eAAAmC,cAEA,OAAA/P,MAIA,OAAA2P,QAEA,SAAAI,cAAA/P,OACA2P,QAAA3Q,MAAApF,MACA,GAAA4V,kBAAA,KAAA,CACAA,gBAAAhR,QAAAwB,UAMAwN,SAAAxD,UAAA,IAAA1Q,MAAA,SAAAqC,OAAAqU,QAAA/Q,OACA,GAAAqB,WAAA3E,QAAA,CACAsD,MAAA+Q,QAAAA,QAAArU,OAAAA,OAAA,GAEA,IAAAmF,OAAA0M,SAAAlU,MAAA2W,KAAAlV,KAAAY,OAAAZ,KAAAiV,QAAA/Q,OACA,OAAA6B,OAAA4M,UAAA5M,UAIA,OAAA0M,SAGA,OAAAR,qBAp4BA,CAy4BAlV,OAAAA,OAAAC","file":"site.angular-source.min.js","sourcesContent":["/**\n * @license AngularJS v1.7.5\n * (c) 2010-2018 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular) {'use strict';\n\n/* global shallowCopy: true */\n\n/**\n * Creates a shallow copy of an object, an array or a primitive.\n *\n * Assumes that there are no proto properties for objects.\n */\nfunction shallowCopy(src, dst) {\n  if (isArray(src)) {\n    dst = dst || [];\n\n    for (var i = 0, ii = src.length; i < ii; i++) {\n      dst[i] = src[i];\n    }\n  } else if (isObject(src)) {\n    dst = dst || {};\n\n    for (var key in src) {\n      if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n        dst[key] = src[key];\n      }\n    }\n  }\n\n  return dst || src;\n}\n\n/* global routeToRegExp: true */\n\n/**\n * @param {string} path - The path to parse. (It is assumed to have query and hash stripped off.)\n * @param {Object} opts - Options.\n * @return {Object} - An object containing an array of path parameter names (`keys`) and a regular\n *     expression (`regexp`) that can be used to identify a matching URL and extract the path\n *     parameter values.\n *\n * @description\n * Parses the given path, extracting path parameter names and a regular expression to match URLs.\n *\n * Originally inspired by `pathRexp` in `visionmedia/express/lib/utils.js`.\n */\nfunction routeToRegExp(path, opts) {\n  var keys = [];\n\n  var pattern = path\n    .replace(/([().])/g, '\\\\$1')\n    .replace(/(\\/)?:(\\w+)(\\*\\?|[?*])?/g, function(_, slash, key, option) {\n      var optional = option === '?' || option === '*?';\n      var star = option === '*' || option === '*?';\n      keys.push({name: key, optional: optional});\n      slash = slash || '';\n      return (\n        (optional ? '(?:' + slash : slash + '(?:') +\n        (star ? '(.+?)' : '([^/]+)') +\n        (optional ? '?)?' : ')')\n      );\n    })\n    .replace(/([/$*])/g, '\\\\$1');\n\n  if (opts.ignoreTrailingSlashes) {\n    pattern = pattern.replace(/\\/+$/, '') + '/*';\n  }\n\n  return {\n    keys: keys,\n    regexp: new RegExp(\n      '^' + pattern + '(?:[?#]|$)',\n      opts.caseInsensitiveMatch ? 'i' : ''\n    )\n  };\n}\n\n/* global routeToRegExp: false */\n/* global shallowCopy: false */\n\n// `isArray` and `isObject` are necessary for `shallowCopy()` (included via `src/shallowCopy.js`).\n// They are initialized inside the `$RouteProvider`, to ensure `window.angular` is available.\nvar isArray;\nvar isObject;\nvar isDefined;\nvar noop;\n\n/**\n * @ngdoc module\n * @name ngRoute\n * @description\n *\n * The `ngRoute` module provides routing and deeplinking services and directives for AngularJS apps.\n *\n * ## Example\n * See {@link ngRoute.$route#examples $route} for an example of configuring and using `ngRoute`.\n *\n */\n/* global -ngRouteModule */\nvar ngRouteModule = angular.\n  module('ngRoute', []).\n  info({ angularVersion: '1.7.5' }).\n  provider('$route', $RouteProvider).\n  // Ensure `$route` will be instantiated in time to capture the initial `$locationChangeSuccess`\n  // event (unless explicitly disabled). This is necessary in case `ngView` is included in an\n  // asynchronously loaded template.\n  run(instantiateRoute);\nvar $routeMinErr = angular.$$minErr('ngRoute');\nvar isEagerInstantiationEnabled;\n\n\n/**\n * @ngdoc provider\n * @name $routeProvider\n * @this\n *\n * @description\n *\n * Used for configuring routes.\n *\n * ## Example\n * See {@link ngRoute.$route#examples $route} for an example of configuring and using `ngRoute`.\n *\n * ## Dependencies\n * Requires the {@link ngRoute `ngRoute`} module to be installed.\n */\nfunction $RouteProvider() {\n  isArray = angular.isArray;\n  isObject = angular.isObject;\n  isDefined = angular.isDefined;\n  noop = angular.noop;\n\n  function inherit(parent, extra) {\n    return angular.extend(Object.create(parent), extra);\n  }\n\n  var routes = {};\n\n  /**\n   * @ngdoc method\n   * @name $routeProvider#when\n   *\n   * @param {string} path Route path (matched against `$location.path`). If `$location.path`\n   *    contains redundant trailing slash or is missing one, the route will still match and the\n   *    `$location.path` will be updated to add or drop the trailing slash to exactly match the\n   *    route definition.\n   *\n   *    * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up\n   *        to the next slash are matched and stored in `$routeParams` under the given `name`\n   *        when the route matches.\n   *    * `path` can contain named groups starting with a colon and ending with a star:\n   *        e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name`\n   *        when the route matches.\n   *    * `path` can contain optional named groups with a question mark: e.g.`:name?`.\n   *\n   *    For example, routes like `/color/:color/largecode/:largecode*\\/edit` will match\n   *    `/color/brown/largecode/code/with/slashes/edit` and extract:\n   *\n   *    * `color: brown`\n   *    * `largecode: code/with/slashes`.\n   *\n   *\n   * @param {Object} route Mapping information to be assigned to `$route.current` on route\n   *    match.\n   *\n   *    Object properties:\n   *\n   *    - `controller` – `{(string|Function)=}` – Controller fn that should be associated with\n   *      newly created scope or the name of a {@link angular.Module#controller registered\n   *      controller} if passed as a string.\n   *    - `controllerAs` – `{string=}` – An identifier name for a reference to the controller.\n   *      If present, the controller will be published to scope under the `controllerAs` name.\n   *    - `template` – `{(string|Function)=}` – html template as a string or a function that\n   *      returns an html template as a string which should be used by {@link\n   *      ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives.\n   *      This property takes precedence over `templateUrl`.\n   *\n   *      If `template` is a function, it will be called with the following parameters:\n   *\n   *      - `{Array.<Object>}` - route parameters extracted from the current\n   *        `$location.path()` by applying the current route\n   *\n   *      One of `template` or `templateUrl` is required.\n   *\n   *    - `templateUrl` – `{(string|Function)=}` – path or function that returns a path to an html\n   *      template that should be used by {@link ngRoute.directive:ngView ngView}.\n   *\n   *      If `templateUrl` is a function, it will be called with the following parameters:\n   *\n   *      - `{Array.<Object>}` - route parameters extracted from the current\n   *        `$location.path()` by applying the current route\n   *\n   *      One of `templateUrl` or `template` is required.\n   *\n   *    - `resolve` - `{Object.<string, Function>=}` - An optional map of dependencies which should\n   *      be injected into the controller. If any of these dependencies are promises, the router\n   *      will wait for them all to be resolved or one to be rejected before the controller is\n   *      instantiated.\n   *      If all the promises are resolved successfully, the values of the resolved promises are\n   *      injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is\n   *      fired. If any of the promises are rejected the\n   *      {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired.\n   *      For easier access to the resolved dependencies from the template, the `resolve` map will\n   *      be available on the scope of the route, under `$resolve` (by default) or a custom name\n   *      specified by the `resolveAs` property (see below). This can be particularly useful, when\n   *      working with {@link angular.Module#component components} as route templates.<br />\n   *      <div class=\"alert alert-warning\">\n   *        **Note:** If your scope already contains a property with this name, it will be hidden\n   *        or overwritten. Make sure, you specify an appropriate name for this property, that\n   *        does not collide with other properties on the scope.\n   *      </div>\n   *      The map object is:\n   *\n   *      - `key` – `{string}`: a name of a dependency to be injected into the controller.\n   *      - `factory` - `{string|Function}`: If `string` then it is an alias for a service.\n   *        Otherwise if function, then it is {@link auto.$injector#invoke injected}\n   *        and the return value is treated as the dependency. If the result is a promise, it is\n   *        resolved before its value is injected into the controller. Be aware that\n   *        `ngRoute.$routeParams` will still refer to the previous route within these resolve\n   *        functions.  Use `$route.current.params` to access the new route parameters, instead.\n   *\n   *    - `resolveAs` - `{string=}` - The name under which the `resolve` map will be available on\n   *      the scope of the route. If omitted, defaults to `$resolve`.\n   *\n   *    - `redirectTo` – `{(string|Function)=}` – value to update\n   *      {@link ng.$location $location} path with and trigger route redirection.\n   *\n   *      If `redirectTo` is a function, it will be called with the following parameters:\n   *\n   *      - `{Object.<string>}` - route parameters extracted from the current\n   *        `$location.path()` by applying the current route templateUrl.\n   *      - `{string}` - current `$location.path()`\n   *      - `{Object}` - current `$location.search()`\n   *\n   *      The custom `redirectTo` function is expected to return a string which will be used\n   *      to update `$location.url()`. If the function throws an error, no further processing will\n   *      take place and the {@link ngRoute.$route#$routeChangeError $routeChangeError} event will\n   *      be fired.\n   *\n   *      Routes that specify `redirectTo` will not have their controllers, template functions\n   *      or resolves called, the `$location` will be changed to the redirect url and route\n   *      processing will stop. The exception to this is if the `redirectTo` is a function that\n   *      returns `undefined`. In this case the route transition occurs as though there was no\n   *      redirection.\n   *\n   *    - `resolveRedirectTo` – `{Function=}` – a function that will (eventually) return the value\n   *      to update {@link ng.$location $location} URL with and trigger route redirection. In\n   *      contrast to `redirectTo`, dependencies can be injected into `resolveRedirectTo` and the\n   *      return value can be either a string or a promise that will be resolved to a string.\n   *\n   *      Similar to `redirectTo`, if the return value is `undefined` (or a promise that gets\n   *      resolved to `undefined`), no redirection takes place and the route transition occurs as\n   *      though there was no redirection.\n   *\n   *      If the function throws an error or the returned promise gets rejected, no further\n   *      processing will take place and the\n   *      {@link ngRoute.$route#$routeChangeError $routeChangeError} event will be fired.\n   *\n   *      `redirectTo` takes precedence over `resolveRedirectTo`, so specifying both on the same\n   *      route definition, will cause the latter to be ignored.\n   *\n   *    - `[reloadOnUrl=true]` - `{boolean=}` - reload route when any part of the URL changes\n   *      (including the path) even if the new URL maps to the same route.\n   *\n   *      If the option is set to `false` and the URL in the browser changes, but the new URL maps\n   *      to the same route, then a `$routeUpdate` event is broadcasted on the root scope (without\n   *      reloading the route).\n   *\n   *    - `[reloadOnSearch=true]` - `{boolean=}` - reload route when only `$location.search()`\n   *      or `$location.hash()` changes.\n   *\n   *      If the option is set to `false` and the URL in the browser changes, then a `$routeUpdate`\n   *      event is broadcasted on the root scope (without reloading the route).\n   *\n   *      <div class=\"alert alert-warning\">\n   *        **Note:** This option has no effect if `reloadOnUrl` is set to `false`.\n   *      </div>\n   *\n   *    - `[caseInsensitiveMatch=false]` - `{boolean=}` - match routes without being case sensitive\n   *\n   *      If the option is set to `true`, then the particular route can be matched without being\n   *      case sensitive\n   *\n   * @returns {Object} self\n   *\n   * @description\n   * Adds a new route definition to the `$route` service.\n   */\n  this.when = function(path, route) {\n    //copy original route object to preserve params inherited from proto chain\n    var routeCopy = shallowCopy(route);\n    if (angular.isUndefined(routeCopy.reloadOnUrl)) {\n      routeCopy.reloadOnUrl = true;\n    }\n    if (angular.isUndefined(routeCopy.reloadOnSearch)) {\n      routeCopy.reloadOnSearch = true;\n    }\n    if (angular.isUndefined(routeCopy.caseInsensitiveMatch)) {\n      routeCopy.caseInsensitiveMatch = this.caseInsensitiveMatch;\n    }\n    routes[path] = angular.extend(\n      routeCopy,\n      {originalPath: path},\n      path && routeToRegExp(path, routeCopy)\n    );\n\n    // create redirection for trailing slashes\n    if (path) {\n      var redirectPath = (path[path.length - 1] === '/')\n            ? path.substr(0, path.length - 1)\n            : path + '/';\n\n      routes[redirectPath] = angular.extend(\n        {originalPath: path, redirectTo: path},\n        routeToRegExp(redirectPath, routeCopy)\n      );\n    }\n\n    return this;\n  };\n\n  /**\n   * @ngdoc property\n   * @name $routeProvider#caseInsensitiveMatch\n   * @description\n   *\n   * A boolean property indicating if routes defined\n   * using this provider should be matched using a case insensitive\n   * algorithm. Defaults to `false`.\n   */\n  this.caseInsensitiveMatch = false;\n\n  /**\n   * @ngdoc method\n   * @name $routeProvider#otherwise\n   *\n   * @description\n   * Sets route definition that will be used on route change when no other route definition\n   * is matched.\n   *\n   * @param {Object|string} params Mapping information to be assigned to `$route.current`.\n   * If called with a string, the value maps to `redirectTo`.\n   * @returns {Object} self\n   */\n  this.otherwise = function(params) {\n    if (typeof params === 'string') {\n      params = {redirectTo: params};\n    }\n    this.when(null, params);\n    return this;\n  };\n\n  /**\n   * @ngdoc method\n   * @name $routeProvider#eagerInstantiationEnabled\n   * @kind function\n   *\n   * @description\n   * Call this method as a setter to enable/disable eager instantiation of the\n   * {@link ngRoute.$route $route} service upon application bootstrap. You can also call it as a\n   * getter (i.e. without any arguments) to get the current value of the\n   * `eagerInstantiationEnabled` flag.\n   *\n   * Instantiating `$route` early is necessary for capturing the initial\n   * {@link ng.$location#$locationChangeStart $locationChangeStart} event and navigating to the\n   * appropriate route. Usually, `$route` is instantiated in time by the\n   * {@link ngRoute.ngView ngView} directive. Yet, in cases where `ngView` is included in an\n   * asynchronously loaded template (e.g. in another directive's template), the directive factory\n   * might not be called soon enough for `$route` to be instantiated _before_ the initial\n   * `$locationChangeSuccess` event is fired. Eager instantiation ensures that `$route` is always\n   * instantiated in time, regardless of when `ngView` will be loaded.\n   *\n   * The default value is true.\n   *\n   * **Note**:<br />\n   * You may want to disable the default behavior when unit-testing modules that depend on\n   * `ngRoute`, in order to avoid an unexpected request for the default route's template.\n   *\n   * @param {boolean=} enabled - If provided, update the internal `eagerInstantiationEnabled` flag.\n   *\n   * @returns {*} The current value of the `eagerInstantiationEnabled` flag if used as a getter or\n   *     itself (for chaining) if used as a setter.\n   */\n  isEagerInstantiationEnabled = true;\n  this.eagerInstantiationEnabled = function eagerInstantiationEnabled(enabled) {\n    if (isDefined(enabled)) {\n      isEagerInstantiationEnabled = enabled;\n      return this;\n    }\n\n    return isEagerInstantiationEnabled;\n  };\n\n\n  this.$get = ['$rootScope',\n               '$location',\n               '$routeParams',\n               '$q',\n               '$injector',\n               '$templateRequest',\n               '$sce',\n               '$browser',\n      function($rootScope, $location, $routeParams, $q, $injector, $templateRequest, $sce, $browser) {\n\n    /**\n     * @ngdoc service\n     * @name $route\n     * @requires $location\n     * @requires $routeParams\n     *\n     * @property {Object} current Reference to the current route definition.\n     * The route definition contains:\n     *\n     *   - `controller`: The controller constructor as defined in the route definition.\n     *   - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for\n     *     controller instantiation. The `locals` contain\n     *     the resolved values of the `resolve` map. Additionally the `locals` also contain:\n     *\n     *     - `$scope` - The current route scope.\n     *     - `$template` - The current route template HTML.\n     *\n     *     The `locals` will be assigned to the route scope's `$resolve` property. You can override\n     *     the property name, using `resolveAs` in the route definition. See\n     *     {@link ngRoute.$routeProvider $routeProvider} for more info.\n     *\n     * @property {Object} routes Object with all route configuration Objects as its properties.\n     *\n     * @description\n     * `$route` is used for deep-linking URLs to controllers and views (HTML partials).\n     * It watches `$location.url()` and tries to map the path to an existing route definition.\n     *\n     * Requires the {@link ngRoute `ngRoute`} module to be installed.\n     *\n     * You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API.\n     *\n     * The `$route` service is typically used in conjunction with the\n     * {@link ngRoute.directive:ngView `ngView`} directive and the\n     * {@link ngRoute.$routeParams `$routeParams`} service.\n     *\n     * @example\n     * This example shows how changing the URL hash causes the `$route` to match a route against the\n     * URL, and the `ngView` pulls in the partial.\n     *\n     * <example name=\"$route-service\" module=\"ngRouteExample\"\n     *          deps=\"angular-route.js\" fixBase=\"true\">\n     *   <file name=\"index.html\">\n     *     <div ng-controller=\"MainController\">\n     *       Choose:\n     *       <a href=\"Book/Moby\">Moby</a> |\n     *       <a href=\"Book/Moby/ch/1\">Moby: Ch1</a> |\n     *       <a href=\"Book/Gatsby\">Gatsby</a> |\n     *       <a href=\"Book/Gatsby/ch/4?key=value\">Gatsby: Ch4</a> |\n     *       <a href=\"Book/Scarlet\">Scarlet Letter</a><br/>\n     *\n     *       <div ng-view></div>\n     *\n     *       <hr />\n     *\n     *       <pre>$location.path() = {{$location.path()}}</pre>\n     *       <pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre>\n     *       <pre>$route.current.params = {{$route.current.params}}</pre>\n     *       <pre>$route.current.scope.name = {{$route.current.scope.name}}</pre>\n     *       <pre>$routeParams = {{$routeParams}}</pre>\n     *     </div>\n     *   </file>\n     *\n     *   <file name=\"book.html\">\n     *     controller: {{name}}<br />\n     *     Book Id: {{params.bookId}}<br />\n     *   </file>\n     *\n     *   <file name=\"chapter.html\">\n     *     controller: {{name}}<br />\n     *     Book Id: {{params.bookId}}<br />\n     *     Chapter Id: {{params.chapterId}}\n     *   </file>\n     *\n     *   <file name=\"script.js\">\n     *     angular.module('ngRouteExample', ['ngRoute'])\n     *\n     *      .controller('MainController', function($scope, $route, $routeParams, $location) {\n     *          $scope.$route = $route;\n     *          $scope.$location = $location;\n     *          $scope.$routeParams = $routeParams;\n     *      })\n     *\n     *      .controller('BookController', function($scope, $routeParams) {\n     *          $scope.name = 'BookController';\n     *          $scope.params = $routeParams;\n     *      })\n     *\n     *      .controller('ChapterController', function($scope, $routeParams) {\n     *          $scope.name = 'ChapterController';\n     *          $scope.params = $routeParams;\n     *      })\n     *\n     *     .config(function($routeProvider, $locationProvider) {\n     *       $routeProvider\n     *        .when('/Book/:bookId', {\n     *         templateUrl: 'book.html',\n     *         controller: 'BookController',\n     *         resolve: {\n     *           // I will cause a 1 second delay\n     *           delay: function($q, $timeout) {\n     *             var delay = $q.defer();\n     *             $timeout(delay.resolve, 1000);\n     *             return delay.promise;\n     *           }\n     *         }\n     *       })\n     *       .when('/Book/:bookId/ch/:chapterId', {\n     *         templateUrl: 'chapter.html',\n     *         controller: 'ChapterController'\n     *       });\n     *\n     *       // configure html5 to get links working on jsfiddle\n     *       $locationProvider.html5Mode(true);\n     *     });\n     *\n     *   </file>\n     *\n     *   <file name=\"protractor.js\" type=\"protractor\">\n     *     it('should load and compile correct template', function() {\n     *       element(by.linkText('Moby: Ch1')).click();\n     *       var content = element(by.css('[ng-view]')).getText();\n     *       expect(content).toMatch(/controller: ChapterController/);\n     *       expect(content).toMatch(/Book Id: Moby/);\n     *       expect(content).toMatch(/Chapter Id: 1/);\n     *\n     *       element(by.partialLinkText('Scarlet')).click();\n     *\n     *       content = element(by.css('[ng-view]')).getText();\n     *       expect(content).toMatch(/controller: BookController/);\n     *       expect(content).toMatch(/Book Id: Scarlet/);\n     *     });\n     *   </file>\n     * </example>\n     */\n\n    /**\n     * @ngdoc event\n     * @name $route#$routeChangeStart\n     * @eventType broadcast on root scope\n     * @description\n     * Broadcasted before a route change. At this  point the route services starts\n     * resolving all of the dependencies needed for the route change to occur.\n     * Typically this involves fetching the view template as well as any dependencies\n     * defined in `resolve` route property. Once  all of the dependencies are resolved\n     * `$routeChangeSuccess` is fired.\n     *\n     * The route change (and the `$location` change that triggered it) can be prevented\n     * by calling `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on}\n     * for more details about event object.\n     *\n     * @param {Object} angularEvent Synthetic event object.\n     * @param {Route} next Future route information.\n     * @param {Route} current Current route information.\n     */\n\n    /**\n     * @ngdoc event\n     * @name $route#$routeChangeSuccess\n     * @eventType broadcast on root scope\n     * @description\n     * Broadcasted after a route change has happened successfully.\n     * The `resolve` dependencies are now available in the `current.locals` property.\n     *\n     * {@link ngRoute.directive:ngView ngView} listens for the directive\n     * to instantiate the controller and render the view.\n     *\n     * @param {Object} angularEvent Synthetic event object.\n     * @param {Route} current Current route information.\n     * @param {Route|Undefined} previous Previous route information, or undefined if current is\n     * first route entered.\n     */\n\n    /**\n     * @ngdoc event\n     * @name $route#$routeChangeError\n     * @eventType broadcast on root scope\n     * @description\n     * Broadcasted if a redirection function fails or any redirection or resolve promises are\n     * rejected.\n     *\n     * @param {Object} angularEvent Synthetic event object\n     * @param {Route} current Current route information.\n     * @param {Route} previous Previous route information.\n     * @param {Route} rejection The thrown error or the rejection reason of the promise. Usually\n     * the rejection reason is the error that caused the promise to get rejected.\n     */\n\n    /**\n     * @ngdoc event\n     * @name $route#$routeUpdate\n     * @eventType broadcast on root scope\n     * @description\n     * Broadcasted if the same instance of a route (including template, controller instance,\n     * resolved dependencies, etc.) is being reused. This can happen if either `reloadOnSearch` or\n     * `reloadOnUrl` has been set to `false`.\n     *\n     * @param {Object} angularEvent Synthetic event object\n     * @param {Route} current Current/previous route information.\n     */\n\n    var forceReload = false,\n        preparedRoute,\n        preparedRouteIsUpdateOnly,\n        $route = {\n          routes: routes,\n\n          /**\n           * @ngdoc method\n           * @name $route#reload\n           *\n           * @description\n           * Causes `$route` service to reload the current route even if\n           * {@link ng.$location $location} hasn't changed.\n           *\n           * As a result of that, {@link ngRoute.directive:ngView ngView}\n           * creates new scope and reinstantiates the controller.\n           */\n          reload: function() {\n            forceReload = true;\n\n            var fakeLocationEvent = {\n              defaultPrevented: false,\n              preventDefault: function fakePreventDefault() {\n                this.defaultPrevented = true;\n                forceReload = false;\n              }\n            };\n\n            $rootScope.$evalAsync(function() {\n              prepareRoute(fakeLocationEvent);\n              if (!fakeLocationEvent.defaultPrevented) commitRoute();\n            });\n          },\n\n          /**\n           * @ngdoc method\n           * @name $route#updateParams\n           *\n           * @description\n           * Causes `$route` service to update the current URL, replacing\n           * current route parameters with those specified in `newParams`.\n           * Provided property names that match the route's path segment\n           * definitions will be interpolated into the location's path, while\n           * remaining properties will be treated as query params.\n           *\n           * @param {!Object<string, string>} newParams mapping of URL parameter names to values\n           */\n          updateParams: function(newParams) {\n            if (this.current && this.current.$$route) {\n              newParams = angular.extend({}, this.current.params, newParams);\n              $location.path(interpolate(this.current.$$route.originalPath, newParams));\n              // interpolate modifies newParams, only query params are left\n              $location.search(newParams);\n            } else {\n              throw $routeMinErr('norout', 'Tried updating route with no current route');\n            }\n          }\n        };\n\n    $rootScope.$on('$locationChangeStart', prepareRoute);\n    $rootScope.$on('$locationChangeSuccess', commitRoute);\n\n    return $route;\n\n    /////////////////////////////////////////////////////\n\n    /**\n     * @param on {string} current url\n     * @param route {Object} route regexp to match the url against\n     * @return {?Object}\n     *\n     * @description\n     * Check if the route matches the current url.\n     *\n     * Inspired by match in\n     * visionmedia/express/lib/router/router.js.\n     */\n    function switchRouteMatcher(on, route) {\n      var keys = route.keys,\n          params = {};\n\n      if (!route.regexp) return null;\n\n      var m = route.regexp.exec(on);\n      if (!m) return null;\n\n      for (var i = 1, len = m.length; i < len; ++i) {\n        var key = keys[i - 1];\n\n        var val = m[i];\n\n        if (key && val) {\n          params[key.name] = val;\n        }\n      }\n      return params;\n    }\n\n    function prepareRoute($locationEvent) {\n      var lastRoute = $route.current;\n\n      preparedRoute = parseRoute();\n      preparedRouteIsUpdateOnly = isNavigationUpdateOnly(preparedRoute, lastRoute);\n\n      if (!preparedRouteIsUpdateOnly && (lastRoute || preparedRoute)) {\n        if ($rootScope.$broadcast('$routeChangeStart', preparedRoute, lastRoute).defaultPrevented) {\n          if ($locationEvent) {\n            $locationEvent.preventDefault();\n          }\n        }\n      }\n    }\n\n    function commitRoute() {\n      var lastRoute = $route.current;\n      var nextRoute = preparedRoute;\n\n      if (preparedRouteIsUpdateOnly) {\n        lastRoute.params = nextRoute.params;\n        angular.copy(lastRoute.params, $routeParams);\n        $rootScope.$broadcast('$routeUpdate', lastRoute);\n      } else if (nextRoute || lastRoute) {\n        forceReload = false;\n        $route.current = nextRoute;\n\n        var nextRoutePromise = $q.resolve(nextRoute);\n\n        $browser.$$incOutstandingRequestCount('$route');\n\n        nextRoutePromise.\n          then(getRedirectionData).\n          then(handlePossibleRedirection).\n          then(function(keepProcessingRoute) {\n            return keepProcessingRoute && nextRoutePromise.\n              then(resolveLocals).\n              then(function(locals) {\n                // after route change\n                if (nextRoute === $route.current) {\n                  if (nextRoute) {\n                    nextRoute.locals = locals;\n                    angular.copy(nextRoute.params, $routeParams);\n                  }\n                  $rootScope.$broadcast('$routeChangeSuccess', nextRoute, lastRoute);\n                }\n              });\n          }).catch(function(error) {\n            if (nextRoute === $route.current) {\n              $rootScope.$broadcast('$routeChangeError', nextRoute, lastRoute, error);\n            }\n          }).finally(function() {\n            // Because `commitRoute()` is called from a `$rootScope.$evalAsync` block (see\n            // `$locationWatch`), this `$$completeOutstandingRequest()` call will not cause\n            // `outstandingRequestCount` to hit zero.  This is important in case we are redirecting\n            // to a new route which also requires some asynchronous work.\n\n            $browser.$$completeOutstandingRequest(noop, '$route');\n          });\n      }\n    }\n\n    function getRedirectionData(route) {\n      var data = {\n        route: route,\n        hasRedirection: false\n      };\n\n      if (route) {\n        if (route.redirectTo) {\n          if (angular.isString(route.redirectTo)) {\n            data.path = interpolate(route.redirectTo, route.params);\n            data.search = route.params;\n            data.hasRedirection = true;\n          } else {\n            var oldPath = $location.path();\n            var oldSearch = $location.search();\n            var newUrl = route.redirectTo(route.pathParams, oldPath, oldSearch);\n\n            if (angular.isDefined(newUrl)) {\n              data.url = newUrl;\n              data.hasRedirection = true;\n            }\n          }\n        } else if (route.resolveRedirectTo) {\n          return $q.\n            resolve($injector.invoke(route.resolveRedirectTo)).\n            then(function(newUrl) {\n              if (angular.isDefined(newUrl)) {\n                data.url = newUrl;\n                data.hasRedirection = true;\n              }\n\n              return data;\n            });\n        }\n      }\n\n      return data;\n    }\n\n    function handlePossibleRedirection(data) {\n      var keepProcessingRoute = true;\n\n      if (data.route !== $route.current) {\n        keepProcessingRoute = false;\n      } else if (data.hasRedirection) {\n        var oldUrl = $location.url();\n        var newUrl = data.url;\n\n        if (newUrl) {\n          $location.\n            url(newUrl).\n            replace();\n        } else {\n          newUrl = $location.\n            path(data.path).\n            search(data.search).\n            replace().\n            url();\n        }\n\n        if (newUrl !== oldUrl) {\n          // Exit out and don't process current next value,\n          // wait for next location change from redirect\n          keepProcessingRoute = false;\n        }\n      }\n\n      return keepProcessingRoute;\n    }\n\n    function resolveLocals(route) {\n      if (route) {\n        var locals = angular.extend({}, route.resolve);\n        angular.forEach(locals, function(value, key) {\n          locals[key] = angular.isString(value) ?\n              $injector.get(value) :\n              $injector.invoke(value, null, null, key);\n        });\n        var template = getTemplateFor(route);\n        if (angular.isDefined(template)) {\n          locals['$template'] = template;\n        }\n        return $q.all(locals);\n      }\n    }\n\n    function getTemplateFor(route) {\n      var template, templateUrl;\n      if (angular.isDefined(template = route.template)) {\n        if (angular.isFunction(template)) {\n          template = template(route.params);\n        }\n      } else if (angular.isDefined(templateUrl = route.templateUrl)) {\n        if (angular.isFunction(templateUrl)) {\n          templateUrl = templateUrl(route.params);\n        }\n        if (angular.isDefined(templateUrl)) {\n          route.loadedTemplateUrl = $sce.valueOf(templateUrl);\n          template = $templateRequest(templateUrl);\n        }\n      }\n      return template;\n    }\n\n    /**\n     * @returns {Object} the current active route, by matching it against the URL\n     */\n    function parseRoute() {\n      // Match a route\n      var params, match;\n      angular.forEach(routes, function(route, path) {\n        if (!match && (params = switchRouteMatcher($location.path(), route))) {\n          match = inherit(route, {\n            params: angular.extend({}, $location.search(), params),\n            pathParams: params});\n          match.$$route = route;\n        }\n      });\n      // No route matched; fallback to \"otherwise\" route\n      return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}});\n    }\n\n    /**\n     * @param {Object} newRoute - The new route configuration (as returned by `parseRoute()`).\n     * @param {Object} oldRoute - The previous route configuration (as returned by `parseRoute()`).\n     * @returns {boolean} Whether this is an \"update-only\" navigation, i.e. the URL maps to the same\n     *                    route and it can be reused (based on the config and the type of change).\n     */\n    function isNavigationUpdateOnly(newRoute, oldRoute) {\n      // IF this is not a forced reload\n      return !forceReload\n          // AND both `newRoute`/`oldRoute` are defined\n          && newRoute && oldRoute\n          // AND they map to the same Route Definition Object\n          && (newRoute.$$route === oldRoute.$$route)\n          // AND `reloadOnUrl` is disabled\n          && (!newRoute.reloadOnUrl\n              // OR `reloadOnSearch` is disabled\n              || (!newRoute.reloadOnSearch\n                  // AND both routes have the same path params\n                  && angular.equals(newRoute.pathParams, oldRoute.pathParams)\n              )\n          );\n    }\n\n    /**\n     * @returns {string} interpolation of the redirect path with the parameters\n     */\n    function interpolate(string, params) {\n      var result = [];\n      angular.forEach((string || '').split(':'), function(segment, i) {\n        if (i === 0) {\n          result.push(segment);\n        } else {\n          var segmentMatch = segment.match(/(\\w+)(?:[?*])?(.*)/);\n          var key = segmentMatch[1];\n          result.push(params[key]);\n          result.push(segmentMatch[2] || '');\n          delete params[key];\n        }\n      });\n      return result.join('');\n    }\n  }];\n}\n\ninstantiateRoute.$inject = ['$injector'];\nfunction instantiateRoute($injector) {\n  if (isEagerInstantiationEnabled) {\n    // Instantiate `$route`\n    $injector.get('$route');\n  }\n}\n\nngRouteModule.provider('$routeParams', $RouteParamsProvider);\n\n\n/**\n * @ngdoc service\n * @name $routeParams\n * @requires $route\n * @this\n *\n * @description\n * The `$routeParams` service allows you to retrieve the current set of route parameters.\n *\n * Requires the {@link ngRoute `ngRoute`} module to be installed.\n *\n * The route parameters are a combination of {@link ng.$location `$location`}'s\n * {@link ng.$location#search `search()`} and {@link ng.$location#path `path()`}.\n * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched.\n *\n * In case of parameter name collision, `path` params take precedence over `search` params.\n *\n * The service guarantees that the identity of the `$routeParams` object will remain unchanged\n * (but its properties will likely change) even when a route change occurs.\n *\n * Note that the `$routeParams` are only updated *after* a route change completes successfully.\n * This means that you cannot rely on `$routeParams` being correct in route resolve functions.\n * Instead you can use `$route.current.params` to access the new route's parameters.\n *\n * @example\n * ```js\n *  // Given:\n *  // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby\n *  // Route: /Chapter/:chapterId/Section/:sectionId\n *  //\n *  // Then\n *  $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'}\n * ```\n */\nfunction $RouteParamsProvider() {\n  this.$get = function() { return {}; };\n}\n\nngRouteModule.directive('ngView', ngViewFactory);\nngRouteModule.directive('ngView', ngViewFillContentFactory);\n\n\n/**\n * @ngdoc directive\n * @name ngView\n * @restrict ECA\n *\n * @description\n * `ngView` is a directive that complements the {@link ngRoute.$route $route} service by\n * including the rendered template of the current route into the main layout (`index.html`) file.\n * Every time the current route changes, the included view changes with it according to the\n * configuration of the `$route` service.\n *\n * Requires the {@link ngRoute `ngRoute`} module to be installed.\n *\n * @animations\n * | Animation                        | Occurs                              |\n * |----------------------------------|-------------------------------------|\n * | {@link ng.$animate#enter enter}  | when the new element is inserted to the DOM |\n * | {@link ng.$animate#leave leave}  | when the old element is removed from to the DOM  |\n *\n * The enter and leave animation occur concurrently.\n *\n * @scope\n * @priority 400\n * @param {string=} onload Expression to evaluate whenever the view updates.\n *\n * @param {string=} autoscroll Whether `ngView` should call {@link ng.$anchorScroll\n *                  $anchorScroll} to scroll the viewport after the view is updated.\n *\n *                  - If the attribute is not set, disable scrolling.\n *                  - If the attribute is set without value, enable scrolling.\n *                  - Otherwise enable scrolling only if the `autoscroll` attribute value evaluated\n *                    as an expression yields a truthy value.\n * @example\n    <example name=\"ngView-directive\" module=\"ngViewExample\"\n             deps=\"angular-route.js;angular-animate.js\"\n             animations=\"true\" fixBase=\"true\">\n      <file name=\"index.html\">\n        <div ng-controller=\"MainCtrl as main\">\n          Choose:\n          <a href=\"Book/Moby\">Moby</a> |\n          <a href=\"Book/Moby/ch/1\">Moby: Ch1</a> |\n          <a href=\"Book/Gatsby\">Gatsby</a> |\n          <a href=\"Book/Gatsby/ch/4?key=value\">Gatsby: Ch4</a> |\n          <a href=\"Book/Scarlet\">Scarlet Letter</a><br/>\n\n          <div class=\"view-animate-container\">\n            <div ng-view class=\"view-animate\"></div>\n          </div>\n          <hr />\n\n          <pre>$location.path() = {{main.$location.path()}}</pre>\n          <pre>$route.current.templateUrl = {{main.$route.current.templateUrl}}</pre>\n          <pre>$route.current.params = {{main.$route.current.params}}</pre>\n          <pre>$routeParams = {{main.$routeParams}}</pre>\n        </div>\n      </file>\n\n      <file name=\"book.html\">\n        <div>\n          controller: {{book.name}}<br />\n          Book Id: {{book.params.bookId}}<br />\n        </div>\n      </file>\n\n      <file name=\"chapter.html\">\n        <div>\n          controller: {{chapter.name}}<br />\n          Book Id: {{chapter.params.bookId}}<br />\n          Chapter Id: {{chapter.params.chapterId}}\n        </div>\n      </file>\n\n      <file name=\"animations.css\">\n        .view-animate-container {\n          position:relative;\n          height:100px!important;\n          background:white;\n          border:1px solid black;\n          height:40px;\n          overflow:hidden;\n        }\n\n        .view-animate {\n          padding:10px;\n        }\n\n        .view-animate.ng-enter, .view-animate.ng-leave {\n          transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;\n\n          display:block;\n          width:100%;\n          border-left:1px solid black;\n\n          position:absolute;\n          top:0;\n          left:0;\n          right:0;\n          bottom:0;\n          padding:10px;\n        }\n\n        .view-animate.ng-enter {\n          left:100%;\n        }\n        .view-animate.ng-enter.ng-enter-active {\n          left:0;\n        }\n        .view-animate.ng-leave.ng-leave-active {\n          left:-100%;\n        }\n      </file>\n\n      <file name=\"script.js\">\n        angular.module('ngViewExample', ['ngRoute', 'ngAnimate'])\n          .config(['$routeProvider', '$locationProvider',\n            function($routeProvider, $locationProvider) {\n              $routeProvider\n                .when('/Book/:bookId', {\n                  templateUrl: 'book.html',\n                  controller: 'BookCtrl',\n                  controllerAs: 'book'\n                })\n                .when('/Book/:bookId/ch/:chapterId', {\n                  templateUrl: 'chapter.html',\n                  controller: 'ChapterCtrl',\n                  controllerAs: 'chapter'\n                });\n\n              $locationProvider.html5Mode(true);\n          }])\n          .controller('MainCtrl', ['$route', '$routeParams', '$location',\n            function MainCtrl($route, $routeParams, $location) {\n              this.$route = $route;\n              this.$location = $location;\n              this.$routeParams = $routeParams;\n          }])\n          .controller('BookCtrl', ['$routeParams', function BookCtrl($routeParams) {\n            this.name = 'BookCtrl';\n            this.params = $routeParams;\n          }])\n          .controller('ChapterCtrl', ['$routeParams', function ChapterCtrl($routeParams) {\n            this.name = 'ChapterCtrl';\n            this.params = $routeParams;\n          }]);\n\n      </file>\n\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should load and compile correct template', function() {\n          element(by.linkText('Moby: Ch1')).click();\n          var content = element(by.css('[ng-view]')).getText();\n          expect(content).toMatch(/controller: ChapterCtrl/);\n          expect(content).toMatch(/Book Id: Moby/);\n          expect(content).toMatch(/Chapter Id: 1/);\n\n          element(by.partialLinkText('Scarlet')).click();\n\n          content = element(by.css('[ng-view]')).getText();\n          expect(content).toMatch(/controller: BookCtrl/);\n          expect(content).toMatch(/Book Id: Scarlet/);\n        });\n      </file>\n    </example>\n */\n\n\n/**\n * @ngdoc event\n * @name ngView#$viewContentLoaded\n * @eventType emit on the current ngView scope\n * @description\n * Emitted every time the ngView content is reloaded.\n */\nngViewFactory.$inject = ['$route', '$anchorScroll', '$animate'];\nfunction ngViewFactory($route, $anchorScroll, $animate) {\n  return {\n    restrict: 'ECA',\n    terminal: true,\n    priority: 400,\n    transclude: 'element',\n    link: function(scope, $element, attr, ctrl, $transclude) {\n        var currentScope,\n            currentElement,\n            previousLeaveAnimation,\n            autoScrollExp = attr.autoscroll,\n            onloadExp = attr.onload || '';\n\n        scope.$on('$routeChangeSuccess', update);\n        update();\n\n        function cleanupLastView() {\n          if (previousLeaveAnimation) {\n            $animate.cancel(previousLeaveAnimation);\n            previousLeaveAnimation = null;\n          }\n\n          if (currentScope) {\n            currentScope.$destroy();\n            currentScope = null;\n          }\n          if (currentElement) {\n            previousLeaveAnimation = $animate.leave(currentElement);\n            previousLeaveAnimation.done(function(response) {\n              if (response !== false) previousLeaveAnimation = null;\n            });\n            currentElement = null;\n          }\n        }\n\n        function update() {\n          var locals = $route.current && $route.current.locals,\n              template = locals && locals.$template;\n\n          if (angular.isDefined(template)) {\n            var newScope = scope.$new();\n            var current = $route.current;\n\n            // Note: This will also link all children of ng-view that were contained in the original\n            // html. If that content contains controllers, ... they could pollute/change the scope.\n            // However, using ng-view on an element with additional content does not make sense...\n            // Note: We can't remove them in the cloneAttchFn of $transclude as that\n            // function is called before linking the content, which would apply child\n            // directives to non existing elements.\n            var clone = $transclude(newScope, function(clone) {\n              $animate.enter(clone, null, currentElement || $element).done(function onNgViewEnter(response) {\n                if (response !== false && angular.isDefined(autoScrollExp)\n                  && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n                  $anchorScroll();\n                }\n              });\n              cleanupLastView();\n            });\n\n            currentElement = clone;\n            currentScope = current.scope = newScope;\n            currentScope.$emit('$viewContentLoaded');\n            currentScope.$eval(onloadExp);\n          } else {\n            cleanupLastView();\n          }\n        }\n    }\n  };\n}\n\n// This directive is called during the $transclude call of the first `ngView` directive.\n// It will replace and compile the content of the element with the loaded template.\n// We need this directive so that the element content is already filled when\n// the link function of another directive on the same element as ngView\n// is called.\nngViewFillContentFactory.$inject = ['$compile', '$controller', '$route'];\nfunction ngViewFillContentFactory($compile, $controller, $route) {\n  return {\n    restrict: 'ECA',\n    priority: -400,\n    link: function(scope, $element) {\n      var current = $route.current,\n          locals = current.locals;\n\n      $element.html(locals.$template);\n\n      var link = $compile($element.contents());\n\n      if (current.controller) {\n        locals.$scope = scope;\n        var controller = $controller(current.controller, locals);\n        if (current.controllerAs) {\n          scope[current.controllerAs] = controller;\n        }\n        $element.data('$ngControllerController', controller);\n        $element.children().data('$ngControllerController', controller);\n      }\n      scope[current.resolveAs || '$resolve'] = locals;\n\n      link(scope);\n    }\n  };\n}\n\n\n})(window, window.angular);\n","/**\n * @ngdoc module\n * @name gettext\n * @packageName angular-gettext\n * @description Super simple Gettext for Angular.JS\n *\n * A sample application can be found at https://github.com/rubenv/angular-gettext-example.\n * This is an adaptation of the [TodoMVC](http://todomvc.com/) example. You can use this as a guideline while adding {@link angular-gettext angular-gettext} to your own application.\n */\n/**\n * @ngdoc factory\n * @module gettext\n * @name gettextPlurals\n * @param {String} [langCode=en] language code\n * @param {Number} [n=0] number to calculate form for\n * @returns {Number} plural form number\n * @description Provides correct plural form id for the given language\n *\n * Example\n * ```js\n * gettextPlurals('ru', 10); // 1\n * gettextPlurals('en', 1);  // 0\n * gettextPlurals();         // 1\n * ```\n */\nangular.module('gettext', []);\n/**\n * @ngdoc object\n * @module gettext\n * @name gettext\n * @kind function\n * @param {String} str annotation key\n * @description Gettext constant function for annotating strings\n *\n * ```js\n * angular.module('myApp', ['gettext']).config(function(gettext) {\n *   /// MyApp document title\n *   gettext('my-app.title');\n *   ...\n * })\n * ```\n */\nangular.module('gettext').constant('gettext', function (str) {\n    /*\n     * Does nothing, simply returns the input string.\n     *\n     * This function serves as a marker for `grunt-angular-gettext` to know that\n     * this string should be extracted for translations.\n     */\n    return str;\n});\n\n/**\n * @ngdoc service\n * @module gettext\n * @name gettextCatalog\n * @requires gettextPlurals\n * @requires gettextFallbackLanguage\n * @requires https://docs.angularjs.org/api/ng/service/$http $http\n * @requires https://docs.angularjs.org/api/ng/service/$cacheFactory $cacheFactory\n * @requires https://docs.angularjs.org/api/ng/service/$interpolate $interpolate\n * @requires https://docs.angularjs.org/api/ng/service/$rootScope $rootScope\n * @description Provides set of method to translate strings\n */\nangular.module('gettext').factory('gettextCatalog', [\"gettextPlurals\", \"gettextFallbackLanguage\", \"$http\", \"$cacheFactory\", \"$interpolate\", \"$rootScope\", function (gettextPlurals, gettextFallbackLanguage, $http, $cacheFactory, $interpolate, $rootScope) {\n    var catalog;\n    var noContext = '$$noContext';\n\n    // IE8 returns UPPER CASE tags, even though the source is lower case.\n    // This can causes the (key) string in the DOM to have a different case to\n    // the string in the `po` files.\n    // IE9, IE10 and IE11 reorders the attributes of tags.\n    var test = '<span id=\"test\" title=\"test\" class=\"tested\">test</span>';\n    var isHTMLModified = (angular.element('<span>' + test + '</span>').html() !== test);\n\n    var prefixDebug = function (string) {\n        if (catalog.debug && catalog.currentLanguage !== catalog.baseLanguage) {\n            return catalog.debugPrefix + string;\n        } else {\n            return string;\n        }\n    };\n\n    var addTranslatedMarkers = function (string) {\n        if (catalog.showTranslatedMarkers) {\n            return catalog.translatedMarkerPrefix + string + catalog.translatedMarkerSuffix;\n        } else {\n            return string;\n        }\n    };\n\n    function broadcastUpdated() {\n        /**\n         * @ngdoc event\n         * @name gettextCatalog#gettextLanguageChanged\n         * @eventType broadcast on $rootScope\n         * @description Fires language change notification without any additional parameters.\n         */\n        $rootScope.$broadcast('gettextLanguageChanged');\n    }\n\n    catalog = {\n        /**\n         * @ngdoc property\n         * @name gettextCatalog#debug\n         * @public\n         * @type {Boolean} false\n         * @see gettextCatalog#debug\n         * @description Whether or not to prefix untranslated strings with `[MISSING]:` or a custom prefix.\n         */\n        debug: false,\n        /**\n         * @ngdoc property\n         * @name gettextCatalog#debugPrefix\n         * @public\n         * @type {String} [MISSING]:\n         * @description Custom prefix for untranslated strings when {@link gettextCatalog#debug gettextCatalog#debug} set to `true`.\n         */\n        debugPrefix: '[MISSING]: ',\n        /**\n         * @ngdoc property\n         * @name gettextCatalog#showTranslatedMarkers\n         * @public\n         * @type {Boolean} false\n         * @description Whether or not to wrap all processed text with markers.\n         *\n         * Example output: `[Welcome]`\n         */\n        showTranslatedMarkers: false,\n        /**\n         * @ngdoc property\n         * @name gettextCatalog#translatedMarkerPrefix\n         * @public\n         * @type {String} [\n         * @description Custom prefix to mark strings that have been run through {@link angular-gettext angular-gettext}.\n         */\n        translatedMarkerPrefix: '[',\n        /**\n         * @ngdoc property\n         * @name gettextCatalog#translatedMarkerSuffix\n         * @public\n         * @type {String} ]\n         * @description Custom suffix to mark strings that have been run through {@link angular-gettext angular-gettext}.\n         */\n        translatedMarkerSuffix: ']',\n        /**\n         * @ngdoc property\n         * @name gettextCatalog#strings\n         * @private\n         * @type {Object}\n         * @description An object of loaded translation strings. Shouldn't be used directly.\n         */\n        strings: {},\n        /**\n         * @ngdoc property\n         * @name gettextCatalog#baseLanguage\n         * @protected\n         * @deprecated\n         * @since 2.0\n         * @type {String} en\n         * @description The default language, in which you're application is written.\n         *\n         * This defaults to English and it's generally a bad idea to use anything else:\n         * if your language has different pluralization rules you'll end up with incorrect translations.\n         */\n        baseLanguage: 'en',\n        /**\n         * @ngdoc property\n         * @name gettextCatalog#currentLanguage\n         * @public\n         * @type {String}\n         * @description Active language.\n         */\n        currentLanguage: 'en',\n        /**\n         * @ngdoc property\n         * @name gettextCatalog#cache\n         * @public\n         * @type {String} en\n         * @description Language cache for lazy load\n         */\n        cache: $cacheFactory('strings'),\n\n        /**\n         * @ngdoc method\n         * @name gettextCatalog#setCurrentLanguage\n         * @public\n         * @param {String} lang language name\n         * @description Sets the current language and makes sure that all translations get updated correctly.\n         */\n        setCurrentLanguage: function (lang) {\n            this.currentLanguage = lang;\n            broadcastUpdated();\n        },\n\n        /**\n         * @ngdoc method\n         * @name gettextCatalog#getCurrentLanguage\n         * @public\n         * @returns {String} current language\n         * @description Returns the current language.\n         */\n        getCurrentLanguage: function () {\n            return this.currentLanguage;\n        },\n\n        /**\n         * @ngdoc method\n         * @name gettextCatalog#setStrings\n         * @public\n         * @param {String} language language name\n         * @param {Object.<String>} strings set of strings where the key is the translation `key` and `value` is the translated text\n         * @description Processes an object of string definitions. {@link guide:manual-setstrings More details here}.\n         */\n        setStrings: function (language, strings) {\n            if (!this.strings[language]) {\n                this.strings[language] = {};\n            }\n\n            var defaultPlural = gettextPlurals(language, 1);\n            for (var key in strings) {\n                var val = strings[key];\n\n                if (isHTMLModified) {\n                    // Use the DOM engine to render any HTML in the key (#131).\n                    key = angular.element('<span>' + key + '</span>').html();\n                }\n\n                if (angular.isString(val) || angular.isArray(val)) {\n                    // No context, wrap it in $$noContext.\n                    var obj = {};\n                    obj[noContext] = val;\n                    val = obj;\n                }\n\n                if (!this.strings[language][key]) {\n                    this.strings[language][key] = {};\n                }\n\n                for (var context in val) {\n                    var str = val[context];\n                    if (!angular.isArray(str)) {\n                        // Expand single strings\n                        this.strings[language][key][context] = [];\n                        this.strings[language][key][context][defaultPlural] = str;\n                    } else {\n                        this.strings[language][key][context] = str;\n                    }\n                }\n            }\n\n            broadcastUpdated();\n        },\n\n        /**\n         * @ngdoc method\n         * @name gettextCatalog#getStringFormFor\n         * @protected\n         * @param {String} language language name\n         * @param {String} string translation key\n         * @param {Number=} n number to build string form for\n         * @param {String=} context translation key context, e.g. {@link doc:context Verb, Noun}\n         * @returns {String|Null} translated or annotated string or null if language is not set\n         * @description Translate a string with the given language, count and context.\n         */\n        getStringFormFor: function (language, string, n, context) {\n            if (!language) {\n                return null;\n            }\n            var stringTable = this.strings[language] || {};\n            var contexts = stringTable[string] || {};\n            var plurals = contexts[context || noContext] || [];\n            return plurals[gettextPlurals(language, n)];\n        },\n\n        /**\n         * @ngdoc method\n         * @name gettextCatalog#getString\n         * @public\n         * @param {String} string translation key\n         * @param {$rootScope.Scope=} scope scope to do interpolation against\n         * @param {String=} context translation key context, e.g. {@link doc:context Verb, Noun}\n         * @returns {String} translated or annotated string\n         * @description Translate a string with the given scope and context.\n         *\n         * First it tries {@link gettextCatalog#currentLanguage gettextCatalog#currentLanguage} (e.g. `en-US`) then {@link gettextFallbackLanguage fallback} (e.g. `en`).\n         *\n         * When `scope` is supplied it uses Angular.JS interpolation, so something like this will do what you expect:\n         * ```js\n         * var hello = gettextCatalog.getString(\"Hello {{name}}!\", { name: \"Ruben\" });\n         * // var hello will be \"Hallo Ruben!\" in Dutch.\n         * ```\n         * Avoid using scopes - this skips interpolation and is a lot faster.\n         */\n        getString: function (string, scope, context) {\n            var fallbackLanguage = gettextFallbackLanguage(this.currentLanguage);\n            string = this.getStringFormFor(this.currentLanguage, string, 1, context) ||\n                     this.getStringFormFor(fallbackLanguage, string, 1, context) ||\n                     prefixDebug(string);\n            string = scope ? $interpolate(string)(scope) : string;\n            return addTranslatedMarkers(string);\n        },\n\n        /**\n         * @ngdoc method\n         * @name gettextCatalog#getPlural\n         * @public\n         * @param {Number} n number to build string form for\n         * @param {String} string translation key\n         * @param {String} stringPlural plural translation key\n         * @param {$rootScope.Scope=} scope scope to do interpolation against\n         * @param {String=} context translation key context, e.g. {@link doc:context Verb, Noun}\n         * @returns {String} translated or annotated string\n         * @see {@link gettextCatalog#getString gettextCatalog#getString} for details\n         * @description Translate a plural string with the given context.\n         */\n        getPlural: function (n, string, stringPlural, scope, context) {\n            var fallbackLanguage = gettextFallbackLanguage(this.currentLanguage);\n            string = this.getStringFormFor(this.currentLanguage, string, n, context) ||\n                     this.getStringFormFor(fallbackLanguage, string, n, context) ||\n                     prefixDebug(n === 1 ? string : stringPlural);\n            if (scope) {\n                scope.$count = n;\n                string = $interpolate(string)(scope);\n            }\n            return addTranslatedMarkers(string);\n        },\n\n        /**\n         * @ngdoc method\n         * @name gettextCatalog#loadRemote\n         * @public\n         * @param {String} url location of the translations\n         * @description Load a set of translation strings from a given URL.\n         *\n         * This should be a JSON catalog generated with [angular-gettext-tools](https://github.com/rubenv/angular-gettext-tools).\n         * {@link guide:lazy-loading More details here}.\n         */\n        loadRemote: function (url) {\n            return $http({\n                method: 'GET',\n                url: url,\n                cache: catalog.cache\n            }).then(function (response) {\n                var data = response.data;\n                for (var lang in data) {\n                    catalog.setStrings(lang, data[lang]);\n                }\n                return response;\n            });\n        }\n    };\n\n    return catalog;\n}]);\n\n/**\n * @ngdoc directive\n * @module gettext\n * @name translate\n * @requires gettextCatalog\n * @requires gettextUtil\n * @requires https://docs.angularjs.org/api/ng/service/$parse $parse\n * @requires https://docs.angularjs.org/api/ng/service/$animate $animate\n * @requires https://docs.angularjs.org/api/ng/service/$compile $compile\n * @requires https://docs.angularjs.org/api/ng/service/$window $window\n * @restrict AE\n * @param {String} [translatePlural] plural form\n * @param {Number} translateN value to watch to substitute correct plural form\n * @param {String} translateContext context value, e.g. {@link doc:context Verb, Noun}\n * @description Annotates and translates text inside directive\n *\n * Full interpolation support is available in translated strings, so the following will work as expected:\n * ```js\n * <div translate>Hello {{name}}!</div>\n * ```\n *\n * You can also use custom context parameters while interpolating. This approach allows usage\n * of angular filters as well as custom logic inside your translated messages without unnecessary impact on translations.\n *\n * So for example when you have message like this:\n * ```js\n * <div translate>Last modified {{modificationDate | date:'yyyy-MM-dd HH:mm:ss Z'}} by {{author}}.</div>\n * ```\n * you will have it extracted in exact same version so it would look like this:\n * `Last modified {{modificationDate | date:'yyyy-MM-dd HH:mm:ss Z'}} by {{author}}`.\n * To start with it might be too complicated to read and handle by non technical translator. It's easy to make mistake\n * when copying format for example. Secondly if you decide to change format by some point of the project translation will broke\n * as it won't be the same string anymore.\n *\n * Instead your translator should only be concerned to place {{modificationDate}} correctly and you should have a free hand\n * to modify implementation details on how to present the results. This is how you can achieve the goal:\n * ```js\n * <div translate translate-params-modification-date=\"modificationDate | date:'yyyy-MM-dd HH:mm:ss Z'\">Last modified {{modificationDate}} by {{author}}.</div>\n * ```\n *\n * There's a few more things worth to point out:\n * 1. You can use as many parameters as you want. Each parameter begins with `translate-params-` followed by snake-case parameter name.\n * Each parameter will be available for interpolation in camelCase manner (just like angular directive works by default).\n * ```js\n * <div translate translate-params-my-custom-param=\"param1\" translate-params-name=\"name\">Param {{myCustomParam}} has been changed by {{name}}.</div>\n * ```\n * 2. You can rename your variables from current scope to simple ones if you like.\n * ```js\n * <div translate translate-params-date=\"veryUnintuitiveNameForDate\">Today's date is: {{date}}.</div>\n * ```\n * 3. You can use translate-params only for some interpolations. Rest would be treated as usual.\n * ```js\n * <div translate translate-params-cost=\"cost | currency\">This product: {{product}} costs {{cost}}.</div>\n * ```\n */\nangular.module('gettext').directive('translate', [\"gettextCatalog\", \"$parse\", \"$animate\", \"$compile\", \"$window\", \"gettextUtil\", function (gettextCatalog, $parse, $animate, $compile, $window, gettextUtil) {\n    var msie = parseInt((/msie (\\d+)/i.exec($window.navigator.userAgent) || [])[1], 10);\n    var PARAMS_PREFIX = 'translateParams';\n\n    function getCtxAttr(key) {\n        return gettextUtil.lcFirst(key.replace(PARAMS_PREFIX, ''));\n    }\n\n    function handleInterpolationContext(scope, attrs, update) {\n        var attributes = Object.keys(attrs).filter(function (key) {\n            return gettextUtil.startsWith(key, PARAMS_PREFIX) && key !== PARAMS_PREFIX;\n        });\n\n        if (!attributes.length) {\n            return null;\n        }\n\n        var interpolationContext = scope.$new();\n        var unwatchers = [];\n        attributes.forEach(function (attribute) {\n            var unwatch = scope.$watch(attrs[attribute], function (newVal) {\n                var key = getCtxAttr(attribute);\n                interpolationContext[key] = newVal;\n                update(interpolationContext);\n            });\n            unwatchers.push(unwatch);\n        });\n        scope.$on('$destroy', function () {\n            unwatchers.forEach(function (unwatch) {\n                unwatch();\n            });\n\n            interpolationContext.$destroy();\n        });\n        return interpolationContext;\n    }\n\n    return {\n        restrict: 'AE',\n        terminal: true,\n        compile: function compile(element, attrs) {\n            // Validate attributes\n            gettextUtil.assert(!attrs.translatePlural || attrs.translateN, 'translate-n', 'translate-plural');\n            gettextUtil.assert(!attrs.translateN || attrs.translatePlural, 'translate-plural', 'translate-n');\n\n            var msgid = gettextUtil.trim(element.html());\n            var translatePlural = attrs.translatePlural;\n            var translateContext = attrs.translateContext;\n\n            if (msie <= 8) {\n                // Workaround fix relating to angular adding a comment node to\n                // anchors. angular/angular.js/#1949 / angular/angular.js/#2013\n                if (msgid.slice(-13) === '<!--IE fix-->') {\n                    msgid = msgid.slice(0, -13);\n                }\n            }\n\n            return {\n                post: function (scope, element, attrs) {\n                    var countFn = $parse(attrs.translateN);\n                    var pluralScope = null;\n                    var linking = true;\n\n                    function update(interpolationContext) {\n                        interpolationContext = interpolationContext || null;\n\n                        // Fetch correct translated string.\n                        var translated;\n                        if (translatePlural) {\n                            scope = pluralScope || (pluralScope = scope.$new());\n                            scope.$count = countFn(scope);\n                            translated = gettextCatalog.getPlural(scope.$count, msgid, translatePlural, null, translateContext);\n                        } else {\n                            translated = gettextCatalog.getString(msgid, null, translateContext);\n                        }\n                        var oldContents = element.contents();\n\n                        if (!oldContents && !translated){\n                            return;\n                        }\n\n                        // Avoid redundant swaps\n                        if (translated === gettextUtil.trim(oldContents.html())){\n                            // Take care of unlinked content\n                            if (linking){\n                                $compile(oldContents)(scope);\n                            }\n                            return;\n                        }\n\n                        // Swap in the translation\n                        var newWrapper = angular.element('<span>' + translated + '</span>');\n                        $compile(newWrapper.contents())(interpolationContext || scope);\n                        var newContents = newWrapper.contents();\n\n                        $animate.enter(newContents, element);\n                        $animate.leave(oldContents);\n                    }\n\n                    var interpolationContext = handleInterpolationContext(scope, attrs, update);\n                    update(interpolationContext);\n                    linking = false;\n\n                    if (attrs.translateN) {\n                        scope.$watch(attrs.translateN, function () {\n                            update(interpolationContext);\n                        });\n                    }\n\n                    /**\n                     * @ngdoc event\n                     * @name translate#gettextLanguageChanged\n                     * @eventType listen on scope\n                     * @description Listens for language updates and changes translation accordingly\n                     */\n                    scope.$on('gettextLanguageChanged', function () {\n                        update(interpolationContext);\n                    });\n\n                }\n            };\n        }\n    };\n}]);\n\n/**\n * @ngdoc factory\n * @module gettext\n * @name gettextFallbackLanguage\n * @param {String} langCode language code\n * @returns {String|Null} fallback language\n * @description Strips regional code and returns language code only\n *\n * Example\n * ```js\n * gettextFallbackLanguage('ru');     // \"null\"\n * gettextFallbackLanguage('en_GB');  // \"en\"\n * gettextFallbackLanguage();         // null\n * ```\n */\nangular.module(\"gettext\").factory(\"gettextFallbackLanguage\", function () {\n    var cache = {};\n    var pattern = /([^_]+)_[^_]+$/;\n\n    return function (langCode) {\n        if (cache[langCode]) {\n            return cache[langCode];\n        }\n\n        var matches = pattern.exec(langCode);\n        if (matches) {\n            cache[langCode] = matches[1];\n            return matches[1];\n        }\n\n        return null;\n    };\n});\n/**\n * @ngdoc filter\n * @module gettext\n * @name translate\n * @requires gettextCatalog\n * @param {String} input translation key\n * @param {String} context context to evaluate key against\n * @returns {String} translated string or annotated key\n * @see {@link doc:context Verb, Noun}\n * @description Takes key and returns string\n *\n * Sometimes it's not an option to use an attribute (e.g. when you want to annotate an attribute value).\n * There's a `translate` filter available for this purpose.\n *\n * ```html\n * <input type=\"text\" placeholder=\"{{'Username'|translate}}\" />\n * ```\n * This filter does not support plural strings.\n *\n * You may want to use {@link guide:custom-annotations custom annotations} to avoid using the `translate` filter all the time. * Is\n */\nangular.module('gettext').filter('translate', [\"gettextCatalog\", function (gettextCatalog) {\n    function filter(input, context) {\n        return gettextCatalog.getString(input, null, context);\n    }\n    filter.$stateful = true;\n    return filter;\n}]);\n\n// Do not edit this file, it is autogenerated using genplurals.py!\nangular.module(\"gettext\").factory(\"gettextPlurals\", function () {\n    var languageCodes = {\n        \"pt_BR\": \"pt_BR\",\n        \"pt-BR\": \"pt_BR\"\n    };\n    return function (langCode, n) {\n        switch (getLanguageCode(langCode)) {\n            case \"ay\":  // Aymará\n            case \"bo\":  // Tibetan\n            case \"cgg\": // Chiga\n            case \"dz\":  // Dzongkha\n            case \"fa\":  // Persian\n            case \"id\":  // Indonesian\n            case \"ja\":  // Japanese\n            case \"jbo\": // Lojban\n            case \"ka\":  // Georgian\n            case \"kk\":  // Kazakh\n            case \"km\":  // Khmer\n            case \"ko\":  // Korean\n            case \"ky\":  // Kyrgyz\n            case \"lo\":  // Lao\n            case \"ms\":  // Malay\n            case \"my\":  // Burmese\n            case \"sah\": // Yakut\n            case \"su\":  // Sundanese\n            case \"th\":  // Thai\n            case \"tt\":  // Tatar\n            case \"ug\":  // Uyghur\n            case \"vi\":  // Vietnamese\n            case \"wo\":  // Wolof\n            case \"zh\":  // Chinese\n                // 1 form\n                return 0;\n            case \"is\":  // Icelandic\n                // 2 forms\n                return (n%10!=1 || n%100==11) ? 1 : 0;\n            case \"jv\":  // Javanese\n                // 2 forms\n                return n!=0 ? 1 : 0;\n            case \"mk\":  // Macedonian\n                // 2 forms\n                return n==1 || n%10==1 ? 0 : 1;\n            case \"ach\": // Acholi\n            case \"ak\":  // Akan\n            case \"am\":  // Amharic\n            case \"arn\": // Mapudungun\n            case \"br\":  // Breton\n            case \"fil\": // Filipino\n            case \"fr\":  // French\n            case \"gun\": // Gun\n            case \"ln\":  // Lingala\n            case \"mfe\": // Mauritian Creole\n            case \"mg\":  // Malagasy\n            case \"mi\":  // Maori\n            case \"oc\":  // Occitan\n            case \"pt_BR\":  // Brazilian Portuguese\n            case \"tg\":  // Tajik\n            case \"ti\":  // Tigrinya\n            case \"tr\":  // Turkish\n            case \"uz\":  // Uzbek\n            case \"wa\":  // Walloon\n            case \"zh\":  // Chinese\n                // 2 forms\n                return n>1 ? 1 : 0;\n            case \"lv\":  // Latvian\n                // 3 forms\n                return (n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);\n            case \"lt\":  // Lithuanian\n                // 3 forms\n                return (n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n            case \"be\":  // Belarusian\n            case \"bs\":  // Bosnian\n            case \"hr\":  // Croatian\n            case \"ru\":  // Russian\n            case \"sr\":  // Serbian\n            case \"uk\":  // Ukrainian\n                // 3 forms\n                return (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n            case \"mnk\": // Mandinka\n                // 3 forms\n                return (n==0 ? 0 : n==1 ? 1 : 2);\n            case \"ro\":  // Romanian\n                // 3 forms\n                return (n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2);\n            case \"pl\":  // Polish\n                // 3 forms\n                return (n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n            case \"cs\":  // Czech\n            case \"sk\":  // Slovak\n                // 3 forms\n                return (n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n            case \"sl\":  // Slovenian\n                // 4 forms\n                return (n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n            case \"mt\":  // Maltese\n                // 4 forms\n                return (n==1 ? 0 : n==0 || ( n%100>1 && n%100<11) ? 1 : (n%100>10 && n%100<20 ) ? 2 : 3);\n            case \"gd\":  // Scottish Gaelic\n                // 4 forms\n                return (n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n            case \"cy\":  // Welsh\n                // 4 forms\n                return (n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;\n            case \"kw\":  // Cornish\n                // 4 forms\n                return (n==1) ? 0 : (n==2) ? 1 : (n == 3) ? 2 : 3;\n            case \"ga\":  // Irish\n                // 5 forms\n                return n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4;\n            case \"ar\":  // Arabic\n                // 6 forms\n                return (n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 ? 4 : 5);\n            default: // Everything else\n                return n != 1 ? 1 : 0;\n        }\n    };\n\n    /**\n     * Method extracts iso639-2 language code from code with locale e.g. pl_PL, en_US, etc.\n     * If it's provided with standalone iso639-2 language code it simply returns it.\n     * @param {String} langCode\n     * @returns {String} iso639-2 language Code\n     */\n    function getLanguageCode(langCode) {\n        if (!languageCodes[langCode]) {\n            languageCodes[langCode] = langCode.split(/\\-|_/).shift();\n        }\n        return languageCodes[langCode];\n    }\n});\n\n/**\n * @ngdoc factory\n * @module gettext\n * @name gettextUtil\n * @description Utility service for common operations and polyfills.\n */\nangular.module('gettext').factory('gettextUtil', function gettextUtil() {\n    /**\n     * @ngdoc method\n     * @name gettextUtil#trim\n     * @public\n     * @param {string} value String to be trimmed.\n     * @description Trim polyfill for old browsers (instead of jQuery). Based on AngularJS-v1.2.2 (angular.js#620).\n     *\n     * Example\n     * ```js\n     * gettextUtil.assert('  no blanks  '); // \"no blanks\"\n     * ```\n     */\n    var trim = (function () {\n        if (!String.prototype.trim) {\n            return function (value) {\n                return (typeof value === 'string') ? value.replace(/^\\s*/, '').replace(/\\s*$/, '') : value;\n            };\n        }\n        return function (value) {\n            return (typeof value === 'string') ? value.trim() : value;\n        };\n    })();\n\n    /**\n     * @ngdoc method\n     * @name gettextUtil#assert\n     * @public\n     * @param {bool} condition condition to check\n     * @param {String} missing name of the directive missing attribute\n     * @param {String} found name of attribute that has been used with directive\n     * @description Throws error if condition is not met, which means that directive was used with certain parameter\n     * that requires another one (which is missing).\n     *\n     * Example\n     * ```js\n     * gettextUtil.assert(!attrs.translatePlural || attrs.translateN, 'translate-n', 'translate-plural');\n     * //You should add a translate-n attribute whenever you add a translate-plural attribute.\n     * ```\n     */\n    function assert(condition, missing, found) {\n        if (!condition) {\n            throw new Error('You should add a ' + missing + ' attribute whenever you add a ' + found + ' attribute.');\n        }\n    }\n\n    /**\n     * @ngdoc method\n     * @name gettextUtil#startsWith\n     * @public\n     * @param {string} target String on which checking will occur.\n     * @param {string} query String expected to be at the beginning of target.\n     * @returns {boolean} Returns true if object has no ownProperties. For arrays returns true if length == 0.\n     * @description Checks if string starts with another string.\n     *\n     * Example\n     * ```js\n     * gettextUtil.startsWith('Home sweet home.', 'Home'); //true\n     * gettextUtil.startsWith('Home sweet home.', 'sweet'); //false\n     * ```\n     */\n    function startsWith(target, query) {\n        return target.indexOf(query) === 0;\n    }\n\n    /**\n     * @ngdoc method\n     * @name gettextUtil#lcFirst\n     * @public\n     * @param {string} target String to transform.\n     * @returns {string} Strings beginning with lowercase letter.\n     * @description Makes first letter of the string lower case\n     *\n     * Example\n     * ```js\n     * gettextUtil.lcFirst('Home Sweet Home.'); //'home Sweet Home'\n     * gettextUtil.lcFirst('ShouldBeCamelCase.'); //'shouldBeCamelCase'\n     * ```\n     */\n    function lcFirst(target) {\n        var first = target.charAt(0).toLowerCase();\n        return first + target.substr(1);\n    }\n\n    return {\n        trim: trim,\n        assert: assert,\n        startsWith: startsWith,\n        lcFirst: lcFirst\n    };\n});\n","/**\n * @license AngularJS v1.7.5\n * (c) 2010-2018 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular) {'use strict';\n\nvar $resourceMinErr = angular.$$minErr('$resource');\n\n// Helper functions and regex to lookup a dotted path on an object\n// stopping at undefined/null.  The path must be composed of ASCII\n// identifiers (just like $parse)\nvar MEMBER_NAME_REGEX = /^(\\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;\n\nfunction isValidDottedPath(path) {\n  return (path != null && path !== '' && path !== 'hasOwnProperty' &&\n      MEMBER_NAME_REGEX.test('.' + path));\n}\n\nfunction lookupDottedPath(obj, path) {\n  if (!isValidDottedPath(path)) {\n    throw $resourceMinErr('badmember', 'Dotted member path \"@{0}\" is invalid.', path);\n  }\n  var keys = path.split('.');\n  for (var i = 0, ii = keys.length; i < ii && angular.isDefined(obj); i++) {\n    var key = keys[i];\n    obj = (obj !== null) ? obj[key] : undefined;\n  }\n  return obj;\n}\n\n/**\n * Create a shallow copy of an object and clear other fields from the destination\n */\nfunction shallowClearAndCopy(src, dst) {\n  dst = dst || {};\n\n  angular.forEach(dst, function(value, key) {\n    delete dst[key];\n  });\n\n  for (var key in src) {\n    if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n      dst[key] = src[key];\n    }\n  }\n\n  return dst;\n}\n\n/**\n * @ngdoc module\n * @name ngResource\n * @description\n *\n * The `ngResource` module provides interaction support with RESTful services\n * via the $resource service.\n *\n * See {@link ngResource.$resourceProvider} and {@link ngResource.$resource} for usage.\n */\n\n/**\n * @ngdoc provider\n * @name $resourceProvider\n *\n * @description\n *\n * Use `$resourceProvider` to change the default behavior of the {@link ngResource.$resource}\n * service.\n *\n * ## Dependencies\n * Requires the {@link ngResource } module to be installed.\n *\n */\n\n/**\n * @ngdoc service\n * @name $resource\n * @requires $http\n * @requires ng.$log\n * @requires $q\n * @requires ng.$timeout\n *\n * @description\n * A factory which creates a resource object that lets you interact with\n * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.\n *\n * The returned resource object has action methods which provide high-level behaviors without\n * the need to interact with the low level {@link ng.$http $http} service.\n *\n * Requires the {@link ngResource `ngResource`} module to be installed.\n *\n * By default, trailing slashes will be stripped from the calculated URLs,\n * which can pose problems with server backends that do not expect that\n * behavior.  This can be disabled by configuring the `$resourceProvider` like\n * this:\n *\n * ```js\n     app.config(['$resourceProvider', function($resourceProvider) {\n       // Don't strip trailing slashes from calculated URLs\n       $resourceProvider.defaults.stripTrailingSlashes = false;\n     }]);\n * ```\n *\n * @param {string} url A parameterized URL template with parameters prefixed by `:` as in\n *   `/user/:username`. If you are using a URL with a port number (e.g.\n *   `http://example.com:8080/api`), it will be respected.\n *\n *   If you are using a url with a suffix, just add the suffix, like this:\n *   `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')`\n *   or even `$resource('http://example.com/resource/:resource_id.:format')`\n *   If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be\n *   collapsed down to a single `.`.  If you need this sequence to appear and not collapse then you\n *   can escape it with `/\\.`.\n *\n * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in\n *   `actions` methods. If a parameter value is a function, it will be called every time\n *   a param value needs to be obtained for a request (unless the param was overridden). The\n *   function will be passed the current data value as an argument.\n *\n *   Each key value in the parameter object is first bound to url template if present and then any\n *   excess keys are appended to the url search query after the `?`.\n *\n *   Given a template `/path/:verb` and parameter `{verb: 'greet', salutation: 'Hello'}` results in\n *   URL `/path/greet?salutation=Hello`.\n *\n *   If the parameter value is prefixed with `@`, then the value for that parameter will be\n *   extracted from the corresponding property on the `data` object (provided when calling actions\n *   with a request body).\n *   For example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of\n *   `someParam` will be `data.someProp`.\n *   Note that the parameter will be ignored, when calling a \"GET\" action method (i.e. an action\n *   method that does not accept a request body).\n *\n * @param {Object.<Object>=} actions Hash with declaration of custom actions that will be available\n *   in addition to the default set of resource actions (see below). If a custom action has the same\n *   key as a default action (e.g. `save`), then the default action will be *overwritten*, and not\n *   extended.\n *\n *   The declaration should be created in the format of {@link ng.$http#usage $http.config}:\n *\n *       {\n *         action1: {method:?, params:?, isArray:?, headers:?, ...},\n *         action2: {method:?, params:?, isArray:?, headers:?, ...},\n *         ...\n *       }\n *\n *   Where:\n *\n *   - **`action`** – {string} – The name of action. This name becomes the name of the method on\n *     your resource object.\n *   - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`,\n *     `DELETE`, `JSONP`, etc).\n *   - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of\n *     the parameter value is a function, it will be called every time when a param value needs to\n *     be obtained for a request (unless the param was overridden). The function will be passed the\n *     current data value as an argument.\n *   - **`url`** – {string} – Action specific `url` override. The url templating is supported just\n *     like for the resource-level urls.\n *   - **`isArray`** – {boolean=} – If true then the returned object for this action is an array,\n *     see `returns` section.\n *   - **`transformRequest`** –\n *     `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –\n *     Transform function or an array of such functions. The transform function takes the http\n *     request body and headers and returns its transformed (typically serialized) version.\n *     By default, transformRequest will contain one function that checks if the request data is\n *     an object and serializes it using `angular.toJson`. To prevent this behavior, set\n *     `transformRequest` to an empty array: `transformRequest: []`\n *   - **`transformResponse`** –\n *     `{function(data, headersGetter, status)|Array.<function(data, headersGetter, status)>}` –\n *     Transform function or an array of such functions. The transform function takes the HTTP\n *     response body, headers and status and returns its transformed (typically deserialized)\n *     version.\n *     By default, transformResponse will contain one function that checks if the response looks\n *     like a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior,\n *     set `transformResponse` to an empty array: `transformResponse: []`\n *   - **`cache`** – `{boolean|Cache}` – A boolean value or object created with\n *     {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of the HTTP response.\n *     See {@link $http#caching $http Caching} for more information.\n *   - **`timeout`** – `{number}` – Timeout in milliseconds.<br />\n *     **Note:** In contrast to {@link ng.$http#usage $http.config}, {@link ng.$q promises} are\n *     **not** supported in `$resource`, because the same value would be used for multiple requests.\n *     If you are looking for a way to cancel requests, you should use the `cancellable` option.\n *   - **`cancellable`** – `{boolean}` – If true, the request made by a \"non-instance\" call will be\n *     cancelled (if not already completed) by calling `$cancelRequest()` on the call's return\n *     value. Calling `$cancelRequest()` for a non-cancellable or an already completed/cancelled\n *     request will have no effect.\n *   - **`withCredentials`** – `{boolean}` – Whether to set the `withCredentials` flag on the\n *     XHR object. See\n *     [XMLHttpRequest.withCredentials](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials)\n *     for more information.\n *   - **`responseType`** – `{string}` – See\n *     [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType).\n *   - **`interceptor`** – `{Object=}` – The interceptor object has four optional methods -\n *     `request`, `requestError`, `response`, and `responseError`. See\n *     {@link ng.$http#interceptors $http interceptors} for details. Note that\n *     `request`/`requestError` interceptors are applied before calling `$http`, thus before any\n *     global `$http` interceptors. Also, rejecting or throwing an error inside the `request`\n *     interceptor will result in calling the `responseError` interceptor.\n *     The resource instance or collection is available on the `resource` property of the\n *     `http response` object passed to `response`/`responseError` interceptors.\n *     Keep in mind that the associated promise will be resolved with the value returned by the\n *     response interceptors. Make sure you return an appropriate value and not the `response`\n *     object passed as input. For reference, the default `response` interceptor (which gets applied\n *     if you don't specify a custom one) returns `response.resource`.<br />\n *     See {@link ngResource.$resource#using-interceptors below} for an example of using\n *     interceptors in `$resource`.\n *   - **`hasBody`** – `{boolean}` – If true, then the request will have a body.\n *     If not specified, then only POST, PUT and PATCH requests will have a body. *\n * @param {Object} options Hash with custom settings that should extend the\n *   default `$resourceProvider` behavior.  The supported options are:\n *\n *   - **`stripTrailingSlashes`** – {boolean} – If true then the trailing\n *   slashes from any calculated URL will be stripped. (Defaults to true.)\n *   - **`cancellable`** – {boolean} – If true, the request made by a \"non-instance\" call will be\n *   cancelled (if not already completed) by calling `$cancelRequest()` on the call's return value.\n *   This can be overwritten per action. (Defaults to false.)\n *\n * @returns {Object} A resource \"class\" object with methods for the default set of resource actions\n *   optionally extended with custom `actions`. The default set contains these actions:\n *   ```js\n *   {\n *     'get':    {method: 'GET'},\n *     'save':   {method: 'POST'},\n *     'query':  {method: 'GET', isArray: true},\n *     'remove': {method: 'DELETE'},\n *     'delete': {method: 'DELETE'}\n *   }\n *   ```\n *\n *   Calling these methods invoke {@link ng.$http} with the specified http method, destination and\n *   parameters. When the data is returned from the server then the object is an instance of the\n *   resource class. The actions `save`, `remove` and `delete` are available on it as methods with\n *   the `$` prefix. This allows you to easily perform CRUD operations (create, read, update,\n *   delete) on server-side data like this:\n *   ```js\n *   var User = $resource('/user/:userId', {userId: '@id'});\n *   User.get({userId: 123}).$promise.then(function(user) {\n *     user.abc = true;\n *     user.$save();\n *   });\n *   ```\n *\n *   It is important to realize that invoking a `$resource` object method immediately returns an\n *   empty reference (object or array depending on `isArray`). Once the data is returned from the\n *   server the existing reference is populated with the actual data. This is a useful trick since\n *   usually the resource is assigned to a model which is then rendered by the view. Having an empty\n *   object results in no rendering, once the data arrives from the server then the object is\n *   populated with the data and the view automatically re-renders itself showing the new data. This\n *   means that in most cases one never has to write a callback function for the action methods.\n *\n *   The action methods on the class object or instance object can be invoked with the following\n *   parameters:\n *\n *   - \"class\" actions without a body: `Resource.action([parameters], [success], [error])`\n *   - \"class\" actions with a body: `Resource.action([parameters], postData, [success], [error])`\n *   - instance actions: `instance.$action([parameters], [success], [error])`\n *\n *\n *   When calling instance methods, the instance itself is used as the request body (if the action\n *   should have a body). By default, only actions using `POST`, `PUT` or `PATCH` have request\n *   bodies, but you can use the `hasBody` configuration option to specify whether an action\n *   should have a body or not (regardless of its HTTP method).\n *\n *\n *   Success callback is called with (value (Object|Array), responseHeaders (Function),\n *   status (number), statusText (string)) arguments, where `value` is the populated resource\n *   instance or collection object. The error callback is called with (httpResponse) argument.\n *\n *   Class actions return an empty instance (with the additional properties listed below).\n *   Instance actions return a promise for the operation.\n *\n *   The Resource instances and collections have these additional properties:\n *\n *   - `$promise`: The {@link ng.$q promise} of the original server interaction that created this\n *     instance or collection.\n *\n *     On success, the promise is resolved with the same resource instance or collection object,\n *     updated with data from server. This makes it easy to use in the\n *     {@link ngRoute.$routeProvider `resolve` section of `$routeProvider.when()`} to defer view\n *     rendering until the resource(s) are loaded.\n *\n *     On failure, the promise is rejected with the {@link ng.$http http response} object.\n *\n *     If an interceptor object was provided, the promise will instead be resolved with the value\n *     returned by the response interceptor (on success) or responceError interceptor (on failure).\n *\n *   - `$resolved`: `true` after first server interaction is completed (either with success or\n *      rejection), `false` before that. Knowing if the Resource has been resolved is useful in\n *      data-binding. If there is a response/responseError interceptor and it returns a promise,\n *      `$resolved` will wait for that too.\n *\n *   The Resource instances and collections have these additional methods:\n *\n *   - `$cancelRequest`: If there is a cancellable, pending request related to the instance or\n *      collection, calling this method will abort the request.\n *\n *   The Resource instances have these additional methods:\n *\n *   - `toJSON`: It returns a simple object without any of the extra properties added as part of\n *     the Resource API. This object can be serialized through {@link angular.toJson} safely\n *     without attaching AngularJS-specific fields. Notice that `JSON.stringify` (and\n *     `angular.toJson`) automatically use this method when serializing a Resource instance\n *     (see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON%28%29_behavior)).\n *\n * @example\n *\n * ### Basic usage\n *\n   ```js\n     // Define a CreditCard class\n     var CreditCard = $resource('/users/:userId/cards/:cardId',\n       {userId: 123, cardId: '@id'}, {\n         charge: {method: 'POST', params: {charge: true}}\n       });\n\n     // We can retrieve a collection from the server\n     var cards = CreditCard.query();\n         // GET: /users/123/cards\n         // server returns: [{id: 456, number: '1234', name: 'Smith'}]\n\n     // Wait for the request to complete\n     cards.$promise.then(function() {\n       var card = cards[0];\n\n       // Each item is an instance of CreditCard\n       expect(card instanceof CreditCard).toEqual(true);\n\n       // Non-GET methods are mapped onto the instances\n       card.name = 'J. Smith';\n       card.$save();\n           // POST: /users/123/cards/456 {id: 456, number: '1234', name: 'J. Smith'}\n           // server returns: {id: 456, number: '1234', name: 'J. Smith'}\n\n       // Our custom method is mapped as well (since it uses POST)\n       card.$charge({amount: 9.99});\n           // POST: /users/123/cards/456?amount=9.99&charge=true {id: 456, number: '1234', name: 'J. Smith'}\n     });\n\n     // We can create an instance as well\n     var newCard = new CreditCard({number: '0123'});\n     newCard.name = 'Mike Smith';\n\n     var savePromise = newCard.$save();\n         // POST: /users/123/cards {number: '0123', name: 'Mike Smith'}\n         // server returns: {id: 789, number: '0123', name: 'Mike Smith'}\n\n     savePromise.then(function() {\n       // Once the promise is resolved, the created instance\n       // is populated with the data returned by the server\n       expect(newCard.id).toEqual(789);\n     });\n   ```\n *\n * The object returned from a call to `$resource` is a resource \"class\" which has one \"static\"\n * method for each action in the definition.\n *\n * Calling these methods invokes `$http` on the `url` template with the given HTTP `method`,\n * `params` and `headers`.\n *\n * @example\n *\n * ### Accessing the response\n *\n * When the data is returned from the server then the object is an instance of the resource type and\n * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD\n * operations (create, read, update, delete) on server-side data.\n *\n   ```js\n     var User = $resource('/users/:userId', {userId: '@id'});\n     User.get({userId: 123}).$promise.then(function(user) {\n       user.abc = true;\n       user.$save();\n     });\n   ```\n *\n * It's worth noting that the success callback for `get`, `query` and other methods gets called with\n * the resource instance (populated with the data that came from the server) as well as an `$http`\n * header getter function, the HTTP status code and the response status text. So one could rewrite\n * the above example and get access to HTTP headers as follows:\n *\n   ```js\n     var User = $resource('/users/:userId', {userId: '@id'});\n     User.get({userId: 123}, function(user, getResponseHeaders) {\n       user.abc = true;\n       user.$save(function(user, putResponseHeaders) {\n         // `user` => saved `User` object\n         // `putResponseHeaders` => `$http` header getter\n       });\n     });\n   ```\n *\n * @example\n *\n * ### Creating custom actions\n *\n * In this example we create a custom method on our resource to make a PUT request:\n *\n   ```js\n      var app = angular.module('app', ['ngResource']);\n\n      // Some APIs expect a PUT request in the format URL/object/ID\n      // Here we are creating an 'update' method\n      app.factory('Notes', ['$resource', function($resource) {\n        return $resource('/notes/:id', {id: '@id'}, {\n          update: {method: 'PUT'}\n        });\n      }]);\n\n      // In our controller we get the ID from the URL using `$location`\n      app.controller('NotesCtrl', ['$location', 'Notes', function($location, Notes) {\n        // First, retrieve the corresponding `Note` object from the server\n        // (Assuming a URL of the form `.../notes?id=XYZ`)\n        var noteId = $location.search().id;\n        var note = Notes.get({id: noteId});\n\n        note.$promise.then(function() {\n          note.content = 'Hello, world!';\n\n          // Now call `update` to save the changes on the server\n          Notes.update(note);\n              // This will PUT /notes/ID with the note object as the request payload\n\n          // Since `update` is a non-GET method, it will also be available on the instance\n          // (prefixed with `$`), so we could replace the `Note.update()` call with:\n          //note.$update();\n        });\n      }]);\n   ```\n *\n * @example\n *\n * ### Cancelling requests\n *\n * If an action's configuration specifies that it is cancellable, you can cancel the request related\n * to an instance or collection (as long as it is a result of a \"non-instance\" call):\n *\n   ```js\n     // ...defining the `Hotel` resource...\n     var Hotel = $resource('/api/hotels/:id', {id: '@id'}, {\n       // Let's make the `query()` method cancellable\n       query: {method: 'get', isArray: true, cancellable: true}\n     });\n\n     // ...somewhere in the PlanVacationController...\n     ...\n     this.onDestinationChanged = function onDestinationChanged(destination) {\n       // We don't care about any pending request for hotels\n       // in a different destination any more\n       if (this.availableHotels) {\n         this.availableHotels.$cancelRequest();\n       }\n\n       // Let's query for hotels in `destination`\n       // (calls: /api/hotels?location=<destination>)\n       this.availableHotels = Hotel.query({location: destination});\n     };\n   ```\n *\n * @example\n *\n * ### Using interceptors\n *\n * You can use interceptors to transform the request or response, perform additional operations, and\n * modify the returned instance/collection. The following example, uses `request` and `response`\n * interceptors to augment the returned instance with additional info:\n *\n   ```js\n     var Thing = $resource('/api/things/:id', {id: '@id'}, {\n       save: {\n         method: 'POST',\n         interceptor: {\n           request: function(config) {\n             // Before the request is sent out, store a timestamp on the request config\n             config.requestTimestamp = Date.now();\n             return config;\n           },\n           response: function(response) {\n             // Get the instance from the response object\n             var instance = response.resource;\n\n             // Augment the instance with a custom `saveLatency` property, computed as the time\n             // between sending the request and receiving the response.\n             instance.saveLatency = Date.now() - response.config.requestTimestamp;\n\n             // Return the instance\n             return instance;\n           }\n         }\n       }\n     });\n\n     Thing.save({foo: 'bar'}).$promise.then(function(thing) {\n       console.log('That thing was saved in ' + thing.saveLatency + 'ms.');\n     });\n   ```\n *\n */\nangular.module('ngResource', ['ng']).\n  info({ angularVersion: '1.7.5' }).\n  provider('$resource', function ResourceProvider() {\n    var PROTOCOL_AND_IPV6_REGEX = /^https?:\\/\\/\\[[^\\]]*][^/]*/;\n\n    var provider = this;\n\n    /**\n     * @ngdoc property\n     * @name $resourceProvider#defaults\n     * @description\n     * Object containing default options used when creating `$resource` instances.\n     *\n     * The default values satisfy a wide range of usecases, but you may choose to overwrite any of\n     * them to further customize your instances. The available properties are:\n     *\n     * - **stripTrailingSlashes** – `{boolean}` – If true, then the trailing slashes from any\n     *   calculated URL will be stripped.<br />\n     *   (Defaults to true.)\n     * - **cancellable** – `{boolean}` – If true, the request made by a \"non-instance\" call will be\n     *   cancelled (if not already completed) by calling `$cancelRequest()` on the call's return\n     *   value. For more details, see {@link ngResource.$resource}. This can be overwritten per\n     *   resource class or action.<br />\n     *   (Defaults to false.)\n     * - **actions** - `{Object.<Object>}` - A hash with default actions declarations. Actions are\n     *   high-level methods corresponding to RESTful actions/methods on resources. An action may\n     *   specify what HTTP method to use, what URL to hit, if the return value will be a single\n     *   object or a collection (array) of objects etc. For more details, see\n     *   {@link ngResource.$resource}. The actions can also be enhanced or overwritten per resource\n     *   class.<br />\n     *   The default actions are:\n     *   ```js\n     *   {\n     *     get: {method: 'GET'},\n     *     save: {method: 'POST'},\n     *     query: {method: 'GET', isArray: true},\n     *     remove: {method: 'DELETE'},\n     *     delete: {method: 'DELETE'}\n     *   }\n     *   ```\n     *\n     * #### Example\n     *\n     * For example, you can specify a new `update` action that uses the `PUT` HTTP verb:\n     *\n     * ```js\n     *   angular.\n     *     module('myApp').\n     *     config(['$resourceProvider', function ($resourceProvider) {\n     *       $resourceProvider.defaults.actions.update = {\n     *         method: 'PUT'\n     *       };\n     *     }]);\n     * ```\n     *\n     * Or you can even overwrite the whole `actions` list and specify your own:\n     *\n     * ```js\n     *   angular.\n     *     module('myApp').\n     *     config(['$resourceProvider', function ($resourceProvider) {\n     *       $resourceProvider.defaults.actions = {\n     *         create: {method: 'POST'},\n     *         get:    {method: 'GET'},\n     *         getAll: {method: 'GET', isArray:true},\n     *         update: {method: 'PUT'},\n     *         delete: {method: 'DELETE'}\n     *       };\n     *     });\n     * ```\n     *\n     */\n    this.defaults = {\n      // Strip slashes by default\n      stripTrailingSlashes: true,\n\n      // Make non-instance requests cancellable (via `$cancelRequest()`)\n      cancellable: false,\n\n      // Default actions configuration\n      actions: {\n        'get': {method: 'GET'},\n        'save': {method: 'POST'},\n        'query': {method: 'GET', isArray: true},\n        'remove': {method: 'DELETE'},\n        'delete': {method: 'DELETE'}\n      }\n    };\n\n    this.$get = ['$http', '$log', '$q', '$timeout', function($http, $log, $q, $timeout) {\n\n      var noop = angular.noop,\n          forEach = angular.forEach,\n          extend = angular.extend,\n          copy = angular.copy,\n          isArray = angular.isArray,\n          isDefined = angular.isDefined,\n          isFunction = angular.isFunction,\n          isNumber = angular.isNumber,\n          encodeUriQuery = angular.$$encodeUriQuery,\n          encodeUriSegment = angular.$$encodeUriSegment;\n\n      function Route(template, defaults) {\n        this.template = template;\n        this.defaults = extend({}, provider.defaults, defaults);\n        this.urlParams = {};\n      }\n\n      Route.prototype = {\n        setUrlParams: function(config, params, actionUrl) {\n          var self = this,\n            url = actionUrl || self.template,\n            val,\n            encodedVal,\n            protocolAndIpv6 = '';\n\n          var urlParams = self.urlParams = Object.create(null);\n          forEach(url.split(/\\W/), function(param) {\n            if (param === 'hasOwnProperty') {\n              throw $resourceMinErr('badname', 'hasOwnProperty is not a valid parameter name.');\n            }\n            if (!(new RegExp('^\\\\d+$').test(param)) && param &&\n              (new RegExp('(^|[^\\\\\\\\]):' + param + '(\\\\W|$)').test(url))) {\n              urlParams[param] = {\n                isQueryParamValue: (new RegExp('\\\\?.*=:' + param + '(?:\\\\W|$)')).test(url)\n              };\n            }\n          });\n          url = url.replace(/\\\\:/g, ':');\n          url = url.replace(PROTOCOL_AND_IPV6_REGEX, function(match) {\n            protocolAndIpv6 = match;\n            return '';\n          });\n\n          params = params || {};\n          forEach(self.urlParams, function(paramInfo, urlParam) {\n            val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];\n            if (isDefined(val) && val !== null) {\n              if (paramInfo.isQueryParamValue) {\n                encodedVal = encodeUriQuery(val, true);\n              } else {\n                encodedVal = encodeUriSegment(val);\n              }\n              url = url.replace(new RegExp(':' + urlParam + '(\\\\W|$)', 'g'), function(match, p1) {\n                return encodedVal + p1;\n              });\n            } else {\n              url = url.replace(new RegExp('(/?):' + urlParam + '(\\\\W|$)', 'g'), function(match,\n                  leadingSlashes, tail) {\n                if (tail.charAt(0) === '/') {\n                  return tail;\n                } else {\n                  return leadingSlashes + tail;\n                }\n              });\n            }\n          });\n\n          // strip trailing slashes and set the url (unless this behavior is specifically disabled)\n          if (self.defaults.stripTrailingSlashes) {\n            url = url.replace(/\\/+$/, '') || '/';\n          }\n\n          // Collapse `/.` if found in the last URL path segment before the query.\n          // E.g. `http://url.com/id/.format?q=x` becomes `http://url.com/id.format?q=x`.\n          url = url.replace(/\\/\\.(?=\\w+($|\\?))/, '.');\n          // Replace escaped `/\\.` with `/.`.\n          // (If `\\.` comes from a param value, it will be encoded as `%5C.`.)\n          config.url = protocolAndIpv6 + url.replace(/\\/(\\\\|%5C)\\./, '/.');\n\n\n          // set params - delegate param encoding to $http\n          forEach(params, function(value, key) {\n            if (!self.urlParams[key]) {\n              config.params = config.params || {};\n              config.params[key] = value;\n            }\n          });\n        }\n      };\n\n\n      function resourceFactory(url, paramDefaults, actions, options) {\n        var route = new Route(url, options);\n\n        actions = extend({}, provider.defaults.actions, actions);\n\n        function extractParams(data, actionParams) {\n          var ids = {};\n          actionParams = extend({}, paramDefaults, actionParams);\n          forEach(actionParams, function(value, key) {\n            if (isFunction(value)) { value = value(data); }\n            ids[key] = value && value.charAt && value.charAt(0) === '@' ?\n              lookupDottedPath(data, value.substr(1)) : value;\n          });\n          return ids;\n        }\n\n        function defaultResponseInterceptor(response) {\n          return response.resource;\n        }\n\n        function Resource(value) {\n          shallowClearAndCopy(value || {}, this);\n        }\n\n        Resource.prototype.toJSON = function() {\n          var data = extend({}, this);\n          delete data.$promise;\n          delete data.$resolved;\n          delete data.$cancelRequest;\n          return data;\n        };\n\n        forEach(actions, function(action, name) {\n          var hasBody = action.hasBody === true || (action.hasBody !== false && /^(POST|PUT|PATCH)$/i.test(action.method));\n          var numericTimeout = action.timeout;\n          var cancellable = isDefined(action.cancellable) ?\n              action.cancellable : route.defaults.cancellable;\n\n          if (numericTimeout && !isNumber(numericTimeout)) {\n            $log.debug('ngResource:\\n' +\n                       '  Only numeric values are allowed as `timeout`.\\n' +\n                       '  Promises are not supported in $resource, because the same value would ' +\n                       'be used for multiple requests. If you are looking for a way to cancel ' +\n                       'requests, you should use the `cancellable` option.');\n            delete action.timeout;\n            numericTimeout = null;\n          }\n\n          Resource[name] = function(a1, a2, a3, a4) {\n            var params = {}, data, onSuccess, onError;\n\n            switch (arguments.length) {\n              case 4:\n                onError = a4;\n                onSuccess = a3;\n                // falls through\n              case 3:\n              case 2:\n                if (isFunction(a2)) {\n                  if (isFunction(a1)) {\n                    onSuccess = a1;\n                    onError = a2;\n                    break;\n                  }\n\n                  onSuccess = a2;\n                  onError = a3;\n                  // falls through\n                } else {\n                  params = a1;\n                  data = a2;\n                  onSuccess = a3;\n                  break;\n                }\n                // falls through\n              case 1:\n                if (isFunction(a1)) onSuccess = a1;\n                else if (hasBody) data = a1;\n                else params = a1;\n                break;\n              case 0: break;\n              default:\n                throw $resourceMinErr('badargs',\n                  'Expected up to 4 arguments [params, data, success, error], got {0} arguments',\n                  arguments.length);\n            }\n\n            var isInstanceCall = this instanceof Resource;\n            var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data));\n            var httpConfig = {};\n            var requestInterceptor = action.interceptor && action.interceptor.request || undefined;\n            var requestErrorInterceptor = action.interceptor && action.interceptor.requestError ||\n              undefined;\n            var responseInterceptor = action.interceptor && action.interceptor.response ||\n              defaultResponseInterceptor;\n            var responseErrorInterceptor = action.interceptor && action.interceptor.responseError ||\n              $q.reject;\n            var successCallback = onSuccess ? function(val) {\n              onSuccess(val, response.headers, response.status, response.statusText);\n            } : undefined;\n            var errorCallback = onError || undefined;\n            var timeoutDeferred;\n            var numericTimeoutPromise;\n            var response;\n\n            forEach(action, function(value, key) {\n              switch (key) {\n                default:\n                  httpConfig[key] = copy(value);\n                  break;\n                case 'params':\n                case 'isArray':\n                case 'interceptor':\n                case 'cancellable':\n                  break;\n              }\n            });\n\n            if (!isInstanceCall && cancellable) {\n              timeoutDeferred = $q.defer();\n              httpConfig.timeout = timeoutDeferred.promise;\n\n              if (numericTimeout) {\n                numericTimeoutPromise = $timeout(timeoutDeferred.resolve, numericTimeout);\n              }\n            }\n\n            if (hasBody) httpConfig.data = data;\n            route.setUrlParams(httpConfig,\n              extend({}, extractParams(data, action.params || {}), params),\n              action.url);\n\n            // Start the promise chain\n            var promise = $q.\n              resolve(httpConfig).\n              then(requestInterceptor).\n              catch(requestErrorInterceptor).\n              then($http);\n\n            promise = promise.then(function(resp) {\n              var data = resp.data;\n\n              if (data) {\n                // Need to convert action.isArray to boolean in case it is undefined\n                if (isArray(data) !== (!!action.isArray)) {\n                  throw $resourceMinErr('badcfg',\n                      'Error in resource configuration for action `{0}`. Expected response to ' +\n                      'contain an {1} but got an {2} (Request: {3} {4})', name, action.isArray ? 'array' : 'object',\n                    isArray(data) ? 'array' : 'object', httpConfig.method, httpConfig.url);\n                }\n                if (action.isArray) {\n                  value.length = 0;\n                  forEach(data, function(item) {\n                    if (typeof item === 'object') {\n                      value.push(new Resource(item));\n                    } else {\n                      // Valid JSON values may be string literals, and these should not be converted\n                      // into objects. These items will not have access to the Resource prototype\n                      // methods, but unfortunately there\n                      value.push(item);\n                    }\n                  });\n                } else {\n                  var promise = value.$promise;     // Save the promise\n                  shallowClearAndCopy(data, value);\n                  value.$promise = promise;         // Restore the promise\n                }\n              }\n\n              resp.resource = value;\n              response = resp;\n              return responseInterceptor(resp);\n            }, function(rejectionOrResponse) {\n              rejectionOrResponse.resource = value;\n              response = rejectionOrResponse;\n              return responseErrorInterceptor(rejectionOrResponse);\n            });\n\n            promise = promise['finally'](function() {\n              value.$resolved = true;\n              if (!isInstanceCall && cancellable) {\n                value.$cancelRequest = noop;\n                $timeout.cancel(numericTimeoutPromise);\n                timeoutDeferred = numericTimeoutPromise = httpConfig.timeout = null;\n              }\n            });\n\n            // Run the `success`/`error` callbacks, but do not let them affect the returned promise.\n            promise.then(successCallback, errorCallback);\n\n            if (!isInstanceCall) {\n              // we are creating instance / collection\n              // - set the initial promise\n              // - return the instance / collection\n              value.$promise = promise;\n              value.$resolved = false;\n              if (cancellable) value.$cancelRequest = cancelRequest;\n\n              return value;\n            }\n\n            // instance call\n            return promise;\n\n            function cancelRequest(value) {\n              promise.catch(noop);\n              if (timeoutDeferred !== null) {\n                timeoutDeferred.resolve(value);\n              }\n            }\n          };\n\n\n          Resource.prototype['$' + name] = function(params, success, error) {\n            if (isFunction(params)) {\n              error = success; success = params; params = {};\n            }\n            var result = Resource[name].call(this, params, this, success, error);\n            return result.$promise || result;\n          };\n        });\n\n        return Resource;\n      }\n\n      return resourceFactory;\n    }];\n  });\n\n\n})(window, window.angular);\n"]}